runtime_value.carbon 52 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835
  1. // Part of the Carbon Language project, under the Apache License v2.0 with LLVM
  2. // Exceptions. See /LICENSE for license information.
  3. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
  4. //
  5. // INCLUDE-FILE: toolchain/testing/min_prelude/facet_types.carbon
  6. // EXTRA-ARGS: --custom-core
  7. //
  8. // AUTOUPDATE
  9. // TIP: To test this file alone, run:
  10. // TIP: bazel test //toolchain/testing:file_test --test_arg=--file_tests=toolchain/check/testdata/facet/min_prelude/runtime_value.carbon
  11. // TIP: To dump output, run:
  12. // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/check/testdata/facet/min_prelude/runtime_value.carbon
  13. // --- facet_value_copy_from_reference.carbon
  14. library "[[@TEST_NAME]]";
  15. interface I {}
  16. class C {
  17. var i: I;
  18. }
  19. fn F(c: C) {
  20. // Member access produces a reference, which is copied into the value
  21. // binding.
  22. let a: I = c.i;
  23. }
  24. // --- fail_todo_facet_copy_narrowing_from_reference.carbon
  25. library "[[@TEST_NAME]]";
  26. interface I {}
  27. interface J {}
  28. class C {
  29. var ij: I & J;
  30. }
  31. fn F(c: C) {
  32. // Member access produces a reference, which is copied into the value
  33. // binding.
  34. // CHECK:STDERR: fail_todo_facet_copy_narrowing_from_reference.carbon:[[@LINE+4]]:14: error: semantics TODO: `conversion of runtime facet value` [SemanticsTodo]
  35. // CHECK:STDERR: let a: I = c.ij;
  36. // CHECK:STDERR: ^~~~
  37. // CHECK:STDERR:
  38. let a: I = c.ij;
  39. }
  40. // --- fail_todo_member_lookup_in_runtime_value.carbon
  41. interface Z(T:! type) {
  42. let X:! type;
  43. }
  44. class C {}
  45. final impl forall [T:! type] T as Z(C) where .X = () {}
  46. // CHECK:STDERR: fail_todo_member_lookup_in_runtime_value.carbon:[[@LINE+4]]:18: error: semantics TODO: `associated value lookup on runtime facet value` [SemanticsTodo]
  47. // CHECK:STDERR: fn F(T: Z(C)) -> T.(Z(C).X) {
  48. // CHECK:STDERR: ^~~~~~~~~~
  49. // CHECK:STDERR:
  50. fn F(T: Z(C)) -> T.(Z(C).X) {
  51. return ();
  52. }
  53. // CHECK:STDOUT: --- facet_value_copy_from_reference.carbon
  54. // CHECK:STDOUT:
  55. // CHECK:STDOUT: constants {
  56. // CHECK:STDOUT: %I.type: type = facet_type <@I> [concrete]
  57. // CHECK:STDOUT: %Self: %I.type = bind_symbolic_name Self, 0 [symbolic]
  58. // CHECK:STDOUT: %C: type = class_type @C [concrete]
  59. // CHECK:STDOUT: %C.elem: type = unbound_element_type %C, %I.type [concrete]
  60. // CHECK:STDOUT: %struct_type.i: type = struct_type {.i: %I.type} [concrete]
  61. // CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %struct_type.i [concrete]
  62. // CHECK:STDOUT: %F.type: type = fn_type @F [concrete]
  63. // CHECK:STDOUT: %F: %F.type = struct_value () [concrete]
  64. // CHECK:STDOUT: }
  65. // CHECK:STDOUT:
  66. // CHECK:STDOUT: imports {
  67. // CHECK:STDOUT: %Core: <namespace> = namespace file.%Core.import, [concrete] {
  68. // CHECK:STDOUT: import Core//prelude
  69. // CHECK:STDOUT: }
  70. // CHECK:STDOUT: }
  71. // CHECK:STDOUT:
  72. // CHECK:STDOUT: file {
  73. // CHECK:STDOUT: package: <namespace> = namespace [concrete] {
  74. // CHECK:STDOUT: .Core = imports.%Core
  75. // CHECK:STDOUT: .I = %I.decl
  76. // CHECK:STDOUT: .C = %C.decl
  77. // CHECK:STDOUT: .F = %F.decl
  78. // CHECK:STDOUT: }
  79. // CHECK:STDOUT: %Core.import = import Core
  80. // CHECK:STDOUT: %I.decl: type = interface_decl @I [concrete = constants.%I.type] {} {}
  81. // CHECK:STDOUT: %C.decl: type = class_decl @C [concrete = constants.%C] {} {}
  82. // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [concrete = constants.%F] {
  83. // CHECK:STDOUT: %c.patt: %C = binding_pattern c
  84. // CHECK:STDOUT: %c.param_patt: %C = value_param_pattern %c.patt, call_param0
  85. // CHECK:STDOUT: } {
  86. // CHECK:STDOUT: %c.param: %C = value_param call_param0
  87. // CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [concrete = constants.%C]
  88. // CHECK:STDOUT: %c: %C = bind_name c, %c.param
  89. // CHECK:STDOUT: }
  90. // CHECK:STDOUT: }
  91. // CHECK:STDOUT:
  92. // CHECK:STDOUT: interface @I {
  93. // CHECK:STDOUT: %Self: %I.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self]
  94. // CHECK:STDOUT:
  95. // CHECK:STDOUT: !members:
  96. // CHECK:STDOUT: .Self = %Self
  97. // CHECK:STDOUT: witness = ()
  98. // CHECK:STDOUT: }
  99. // CHECK:STDOUT:
  100. // CHECK:STDOUT: class @C {
  101. // CHECK:STDOUT: %I.ref: type = name_ref I, file.%I.decl [concrete = constants.%I.type]
  102. // CHECK:STDOUT: %.loc6: %C.elem = field_decl i, element0 [concrete]
  103. // CHECK:STDOUT: %struct_type.i: type = struct_type {.i: %I.type} [concrete = constants.%struct_type.i]
  104. // CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %struct_type.i [concrete = constants.%complete_type]
  105. // CHECK:STDOUT: complete_type_witness = %complete_type
  106. // CHECK:STDOUT:
  107. // CHECK:STDOUT: !members:
  108. // CHECK:STDOUT: .Self = constants.%C
  109. // CHECK:STDOUT: .I = <poisoned>
  110. // CHECK:STDOUT: .i = %.loc6
  111. // CHECK:STDOUT: }
  112. // CHECK:STDOUT:
  113. // CHECK:STDOUT: fn @F(%c.param: %C) {
  114. // CHECK:STDOUT: !entry:
  115. // CHECK:STDOUT: name_binding_decl {
  116. // CHECK:STDOUT: %a.patt: %I.type = binding_pattern a
  117. // CHECK:STDOUT: }
  118. // CHECK:STDOUT: %c.ref: %C = name_ref c, %c
  119. // CHECK:STDOUT: %i.ref: %C.elem = name_ref i, @C.%.loc6 [concrete = @C.%.loc6]
  120. // CHECK:STDOUT: %.loc12_15.1: ref %I.type = class_element_access %c.ref, element0
  121. // CHECK:STDOUT: %.loc12_15.2: %I.type = bind_value %.loc12_15.1
  122. // CHECK:STDOUT: %I.ref: type = name_ref I, file.%I.decl [concrete = constants.%I.type]
  123. // CHECK:STDOUT: %a: %I.type = bind_name a, %.loc12_15.2
  124. // CHECK:STDOUT: return
  125. // CHECK:STDOUT: }
  126. // CHECK:STDOUT:
  127. // CHECK:STDOUT: --- fail_todo_facet_copy_narrowing_from_reference.carbon
  128. // CHECK:STDOUT:
  129. // CHECK:STDOUT: constants {
  130. // CHECK:STDOUT: %I.type: type = facet_type <@I> [concrete]
  131. // CHECK:STDOUT: %Self.826: %I.type = bind_symbolic_name Self, 0 [symbolic]
  132. // CHECK:STDOUT: %J.type: type = facet_type <@J> [concrete]
  133. // CHECK:STDOUT: %Self.ccd: %J.type = bind_symbolic_name Self, 0 [symbolic]
  134. // CHECK:STDOUT: %C: type = class_type @C [concrete]
  135. // CHECK:STDOUT: %BitAnd.type: type = facet_type <@BitAnd> [concrete]
  136. // CHECK:STDOUT: %Self.25f: %BitAnd.type = bind_symbolic_name Self, 0 [symbolic]
  137. // CHECK:STDOUT: %BitAnd.assoc_type: type = assoc_entity_type @BitAnd [concrete]
  138. // CHECK:STDOUT: %assoc0: %BitAnd.assoc_type = assoc_entity element0, imports.%Core.import_ref.a93 [concrete]
  139. // CHECK:STDOUT: %Op.type.27a: type = fn_type @Op.1 [concrete]
  140. // CHECK:STDOUT: %Self.as_type: type = facet_access_type %Self.25f [symbolic]
  141. // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic]
  142. // CHECK:STDOUT: %T.patt: type = symbolic_binding_pattern T, 0 [symbolic]
  143. // CHECK:STDOUT: %BitAnd.impl_witness_table = impl_witness_table (imports.%Core.import_ref.1e6), @impl [concrete]
  144. // CHECK:STDOUT: %BitAnd.impl_witness.b7b: <witness> = impl_witness %BitAnd.impl_witness_table, @impl(%T) [symbolic]
  145. // CHECK:STDOUT: %Op.type.f99: type = fn_type @Op.2, @impl(%T) [symbolic]
  146. // CHECK:STDOUT: %Op.05a: %Op.type.f99 = struct_value () [symbolic]
  147. // CHECK:STDOUT: %require_complete: <witness> = require_complete_type %T [symbolic]
  148. // CHECK:STDOUT: %BitAnd.impl_witness.0e5: <witness> = impl_witness %BitAnd.impl_witness_table, @impl(type) [concrete]
  149. // CHECK:STDOUT: %Op.type.eb8: type = fn_type @Op.2, @impl(type) [concrete]
  150. // CHECK:STDOUT: %Op.444: %Op.type.eb8 = struct_value () [concrete]
  151. // CHECK:STDOUT: %complete_type.473: <witness> = complete_type_witness type [concrete]
  152. // CHECK:STDOUT: %BitAnd.facet: %BitAnd.type = facet_value type, (%BitAnd.impl_witness.0e5) [concrete]
  153. // CHECK:STDOUT: %.518: type = fn_type_with_self_type %Op.type.27a, %BitAnd.facet [concrete]
  154. // CHECK:STDOUT: %Op.bound: <bound method> = bound_method %I.type, %Op.444 [concrete]
  155. // CHECK:STDOUT: %Op.specific_fn: <specific function> = specific_function %Op.444, @Op.2(type) [concrete]
  156. // CHECK:STDOUT: %bound_method: <bound method> = bound_method %I.type, %Op.specific_fn [concrete]
  157. // CHECK:STDOUT: %facet_type: type = facet_type <@I & @J> [concrete]
  158. // CHECK:STDOUT: %C.elem: type = unbound_element_type %C, %facet_type [concrete]
  159. // CHECK:STDOUT: %struct_type.ij: type = struct_type {.ij: %facet_type} [concrete]
  160. // CHECK:STDOUT: %complete_type.559: <witness> = complete_type_witness %struct_type.ij [concrete]
  161. // CHECK:STDOUT: %F.type: type = fn_type @F [concrete]
  162. // CHECK:STDOUT: %F: %F.type = struct_value () [concrete]
  163. // CHECK:STDOUT: }
  164. // CHECK:STDOUT:
  165. // CHECK:STDOUT: imports {
  166. // CHECK:STDOUT: %Core: <namespace> = namespace file.%Core.import, [concrete] {
  167. // CHECK:STDOUT: .BitAnd = %Core.BitAnd
  168. // CHECK:STDOUT: import Core//prelude
  169. // CHECK:STDOUT: }
  170. // CHECK:STDOUT: %Core.import_ref.ad0 = import_ref Core//prelude, inst102 [no loc], unloaded
  171. // CHECK:STDOUT: %Core.import_ref.a46: %BitAnd.assoc_type = import_ref Core//prelude, loc18_41, loaded [concrete = constants.%assoc0]
  172. // CHECK:STDOUT: %Core.Op = import_ref Core//prelude, Op, unloaded
  173. // CHECK:STDOUT: %Core.import_ref.040: %BitAnd.type = import_ref Core//prelude, inst102 [no loc], loaded [symbolic = constants.%Self.25f]
  174. // CHECK:STDOUT: %Core.import_ref.140: <witness> = import_ref Core//prelude, loc21_36, loaded [symbolic = @impl.%BitAnd.impl_witness (constants.%BitAnd.impl_witness.b7b)]
  175. // CHECK:STDOUT: %Core.import_ref.5ab3ec.1: type = import_ref Core//prelude, loc21_14, loaded [symbolic = @impl.%T (constants.%T)]
  176. // CHECK:STDOUT: %Core.import_ref.583: type = import_ref Core//prelude, loc21_24, loaded [symbolic = @impl.%T (constants.%T)]
  177. // CHECK:STDOUT: %Core.import_ref.9c1: type = import_ref Core//prelude, loc21_29, loaded [concrete = constants.%BitAnd.type]
  178. // CHECK:STDOUT: %Core.import_ref.5ab3ec.2: type = import_ref Core//prelude, loc21_14, loaded [symbolic = @impl.%T (constants.%T)]
  179. // CHECK:STDOUT: }
  180. // CHECK:STDOUT:
  181. // CHECK:STDOUT: file {
  182. // CHECK:STDOUT: package: <namespace> = namespace [concrete] {
  183. // CHECK:STDOUT: .Core = imports.%Core
  184. // CHECK:STDOUT: .I = %I.decl
  185. // CHECK:STDOUT: .J = %J.decl
  186. // CHECK:STDOUT: .C = %C.decl
  187. // CHECK:STDOUT: .F = %F.decl
  188. // CHECK:STDOUT: }
  189. // CHECK:STDOUT: %Core.import = import Core
  190. // CHECK:STDOUT: %I.decl: type = interface_decl @I [concrete = constants.%I.type] {} {}
  191. // CHECK:STDOUT: %J.decl: type = interface_decl @J [concrete = constants.%J.type] {} {}
  192. // CHECK:STDOUT: %C.decl: type = class_decl @C [concrete = constants.%C] {} {}
  193. // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [concrete = constants.%F] {
  194. // CHECK:STDOUT: %c.patt: %C = binding_pattern c
  195. // CHECK:STDOUT: %c.param_patt: %C = value_param_pattern %c.patt, call_param0
  196. // CHECK:STDOUT: } {
  197. // CHECK:STDOUT: %c.param: %C = value_param call_param0
  198. // CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [concrete = constants.%C]
  199. // CHECK:STDOUT: %c: %C = bind_name c, %c.param
  200. // CHECK:STDOUT: }
  201. // CHECK:STDOUT: }
  202. // CHECK:STDOUT:
  203. // CHECK:STDOUT: interface @I {
  204. // CHECK:STDOUT: %Self: %I.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self.826]
  205. // CHECK:STDOUT:
  206. // CHECK:STDOUT: !members:
  207. // CHECK:STDOUT: .Self = %Self
  208. // CHECK:STDOUT: witness = ()
  209. // CHECK:STDOUT: }
  210. // CHECK:STDOUT:
  211. // CHECK:STDOUT: interface @J {
  212. // CHECK:STDOUT: %Self: %J.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self.ccd]
  213. // CHECK:STDOUT:
  214. // CHECK:STDOUT: !members:
  215. // CHECK:STDOUT: .Self = %Self
  216. // CHECK:STDOUT: witness = ()
  217. // CHECK:STDOUT: }
  218. // CHECK:STDOUT:
  219. // CHECK:STDOUT: interface @BitAnd [from "include_files/facet_types.carbon"] {
  220. // CHECK:STDOUT: !members:
  221. // CHECK:STDOUT: .Self = imports.%Core.import_ref.ad0
  222. // CHECK:STDOUT: .Op = imports.%Core.import_ref.a46
  223. // CHECK:STDOUT: witness = (imports.%Core.Op)
  224. // CHECK:STDOUT: }
  225. // CHECK:STDOUT:
  226. // CHECK:STDOUT: generic impl @impl(imports.%Core.import_ref.5ab3ec.1: type) [from "include_files/facet_types.carbon"] {
  227. // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic = %T (constants.%T)]
  228. // CHECK:STDOUT: %T.patt: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt (constants.%T.patt)]
  229. // CHECK:STDOUT: %BitAnd.impl_witness: <witness> = impl_witness constants.%BitAnd.impl_witness_table, @impl(%T) [symbolic = %BitAnd.impl_witness (constants.%BitAnd.impl_witness.b7b)]
  230. // CHECK:STDOUT:
  231. // CHECK:STDOUT: !definition:
  232. // CHECK:STDOUT: %Op.type: type = fn_type @Op.2, @impl(%T) [symbolic = %Op.type (constants.%Op.type.f99)]
  233. // CHECK:STDOUT: %Op: @impl.%Op.type (%Op.type.f99) = struct_value () [symbolic = %Op (constants.%Op.05a)]
  234. // CHECK:STDOUT: %require_complete: <witness> = require_complete_type %T [symbolic = %require_complete (constants.%require_complete)]
  235. // CHECK:STDOUT:
  236. // CHECK:STDOUT: impl: imports.%Core.import_ref.583 as imports.%Core.import_ref.9c1 {
  237. // CHECK:STDOUT: !members:
  238. // CHECK:STDOUT: witness = imports.%Core.import_ref.140
  239. // CHECK:STDOUT: }
  240. // CHECK:STDOUT: }
  241. // CHECK:STDOUT:
  242. // CHECK:STDOUT: class @C {
  243. // CHECK:STDOUT: %I.ref: type = name_ref I, file.%I.decl [concrete = constants.%I.type]
  244. // CHECK:STDOUT: %J.ref: type = name_ref J, file.%J.decl [concrete = constants.%J.type]
  245. // CHECK:STDOUT: %impl.elem0: %.518 = impl_witness_access constants.%BitAnd.impl_witness.0e5, element0 [concrete = constants.%Op.444]
  246. // CHECK:STDOUT: %bound_method.loc7_13.1: <bound method> = bound_method %I.ref, %impl.elem0 [concrete = constants.%Op.bound]
  247. // CHECK:STDOUT: %specific_fn: <specific function> = specific_function %impl.elem0, @Op.2(type) [concrete = constants.%Op.specific_fn]
  248. // CHECK:STDOUT: %bound_method.loc7_13.2: <bound method> = bound_method %I.ref, %specific_fn [concrete = constants.%bound_method]
  249. // CHECK:STDOUT: %type.and: init type = call %bound_method.loc7_13.2(%I.ref, %J.ref) [concrete = constants.%facet_type]
  250. // CHECK:STDOUT: %.loc7_13.1: type = value_of_initializer %type.and [concrete = constants.%facet_type]
  251. // CHECK:STDOUT: %.loc7_13.2: type = converted %type.and, %.loc7_13.1 [concrete = constants.%facet_type]
  252. // CHECK:STDOUT: %.loc7_9: %C.elem = field_decl ij, element0 [concrete]
  253. // CHECK:STDOUT: %struct_type.ij: type = struct_type {.ij: %facet_type} [concrete = constants.%struct_type.ij]
  254. // CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %struct_type.ij [concrete = constants.%complete_type.559]
  255. // CHECK:STDOUT: complete_type_witness = %complete_type
  256. // CHECK:STDOUT:
  257. // CHECK:STDOUT: !members:
  258. // CHECK:STDOUT: .Self = constants.%C
  259. // CHECK:STDOUT: .I = <poisoned>
  260. // CHECK:STDOUT: .J = <poisoned>
  261. // CHECK:STDOUT: .ij = %.loc7_9
  262. // CHECK:STDOUT: }
  263. // CHECK:STDOUT:
  264. // CHECK:STDOUT: generic fn @Op.1(imports.%Core.import_ref.040: %BitAnd.type) [from "include_files/facet_types.carbon"] {
  265. // CHECK:STDOUT: %Self: %BitAnd.type = bind_symbolic_name Self, 0 [symbolic = %Self (constants.%Self.25f)]
  266. // CHECK:STDOUT: %Self.as_type: type = facet_access_type %Self [symbolic = %Self.as_type (constants.%Self.as_type)]
  267. // CHECK:STDOUT:
  268. // CHECK:STDOUT: fn;
  269. // CHECK:STDOUT: }
  270. // CHECK:STDOUT:
  271. // CHECK:STDOUT: generic fn @Op.2(imports.%Core.import_ref.5ab3ec.2: type) [from "include_files/facet_types.carbon"] {
  272. // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic = %T (constants.%T)]
  273. // CHECK:STDOUT:
  274. // CHECK:STDOUT: !definition:
  275. // CHECK:STDOUT:
  276. // CHECK:STDOUT: fn = "type.and";
  277. // CHECK:STDOUT: }
  278. // CHECK:STDOUT:
  279. // CHECK:STDOUT: fn @F(%c.param: %C) {
  280. // CHECK:STDOUT: !entry:
  281. // CHECK:STDOUT: name_binding_decl {
  282. // CHECK:STDOUT: %a.patt: %I.type = binding_pattern a
  283. // CHECK:STDOUT: }
  284. // CHECK:STDOUT: %c.ref: %C = name_ref c, %c
  285. // CHECK:STDOUT: %ij.ref: %C.elem = name_ref ij, @C.%.loc7_9 [concrete = @C.%.loc7_9]
  286. // CHECK:STDOUT: %.loc17_15.1: ref %facet_type = class_element_access %c.ref, element0
  287. // CHECK:STDOUT: %.loc17_15.2: %facet_type = bind_value %.loc17_15.1
  288. // CHECK:STDOUT: %I.ref: type = name_ref I, file.%I.decl [concrete = constants.%I.type]
  289. // CHECK:STDOUT: %a: %I.type = bind_name a, <error>
  290. // CHECK:STDOUT: return
  291. // CHECK:STDOUT: }
  292. // CHECK:STDOUT:
  293. // CHECK:STDOUT: specific @Op.1(constants.%Self.25f) {
  294. // CHECK:STDOUT: %Self => constants.%Self.25f
  295. // CHECK:STDOUT: %Self.as_type => constants.%Self.as_type
  296. // CHECK:STDOUT: }
  297. // CHECK:STDOUT:
  298. // CHECK:STDOUT: specific @impl(constants.%T) {
  299. // CHECK:STDOUT: %T => constants.%T
  300. // CHECK:STDOUT: %T.patt => constants.%T.patt
  301. // CHECK:STDOUT: %BitAnd.impl_witness => constants.%BitAnd.impl_witness.b7b
  302. // CHECK:STDOUT: }
  303. // CHECK:STDOUT:
  304. // CHECK:STDOUT: specific @impl(%T) {}
  305. // CHECK:STDOUT:
  306. // CHECK:STDOUT: specific @Op.2(constants.%T) {
  307. // CHECK:STDOUT: %T => constants.%T
  308. // CHECK:STDOUT: }
  309. // CHECK:STDOUT:
  310. // CHECK:STDOUT: specific @impl(type) {
  311. // CHECK:STDOUT: %T => type
  312. // CHECK:STDOUT: %T.patt => constants.%T.patt
  313. // CHECK:STDOUT: %BitAnd.impl_witness => constants.%BitAnd.impl_witness.0e5
  314. // CHECK:STDOUT:
  315. // CHECK:STDOUT: !definition:
  316. // CHECK:STDOUT: %Op.type => constants.%Op.type.eb8
  317. // CHECK:STDOUT: %Op => constants.%Op.444
  318. // CHECK:STDOUT: %require_complete => constants.%complete_type.473
  319. // CHECK:STDOUT: }
  320. // CHECK:STDOUT:
  321. // CHECK:STDOUT: specific @Op.2(type) {
  322. // CHECK:STDOUT: %T => type
  323. // CHECK:STDOUT:
  324. // CHECK:STDOUT: !definition:
  325. // CHECK:STDOUT: }
  326. // CHECK:STDOUT:
  327. // CHECK:STDOUT: --- fail_todo_member_lookup_in_runtime_value.carbon
  328. // CHECK:STDOUT:
  329. // CHECK:STDOUT: constants {
  330. // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic]
  331. // CHECK:STDOUT: %T.patt: type = symbolic_binding_pattern T, 0 [symbolic]
  332. // CHECK:STDOUT: %Z.type.9fb: type = generic_interface_type @Z [concrete]
  333. // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete]
  334. // CHECK:STDOUT: %Z.generic: %Z.type.9fb = struct_value () [concrete]
  335. // CHECK:STDOUT: %Z.type.a61: type = facet_type <@Z, @Z(%T)> [symbolic]
  336. // CHECK:STDOUT: %Self.2bc: %Z.type.a61 = bind_symbolic_name Self, 1 [symbolic]
  337. // CHECK:STDOUT: %Z.assoc_type.26e: type = assoc_entity_type @Z, @Z(%T) [symbolic]
  338. // CHECK:STDOUT: %assoc0.1cd: %Z.assoc_type.26e = assoc_entity element0, @Z.%X [symbolic]
  339. // CHECK:STDOUT: %C: type = class_type @C [concrete]
  340. // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete]
  341. // CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %empty_struct_type [concrete]
  342. // CHECK:STDOUT: %Z.type.049: type = facet_type <@Z, @Z(%C)> [concrete]
  343. // CHECK:STDOUT: %.Self: %Z.type.049 = bind_symbolic_name .Self [symbolic_self]
  344. // CHECK:STDOUT: %Self.a38: %Z.type.049 = bind_symbolic_name Self, 1 [symbolic]
  345. // CHECK:STDOUT: %Z.assoc_type.252: type = assoc_entity_type @Z, @Z(%C) [concrete]
  346. // CHECK:STDOUT: %assoc0.ea4: %Z.assoc_type.252 = assoc_entity element0, @Z.%X [concrete]
  347. // CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self [symbolic_self]
  348. // CHECK:STDOUT: %Z.lookup_impl_witness: <witness> = lookup_impl_witness %.Self, @Z, @Z(%C) [symbolic_self]
  349. // CHECK:STDOUT: %Z.facet: %Z.type.049 = facet_value %.Self.as_type, (%Z.lookup_impl_witness) [symbolic_self]
  350. // CHECK:STDOUT: %impl.elem0: type = impl_witness_access %Z.lookup_impl_witness, element0 [symbolic_self]
  351. // CHECK:STDOUT: %Z_where.type: type = facet_type <@Z, @Z(%C) where %impl.elem0 = %empty_tuple.type> [concrete]
  352. // CHECK:STDOUT: %Z.impl_witness: <witness> = impl_witness file.%Z.impl_witness_table, @impl(%T) [symbolic]
  353. // CHECK:STDOUT: %F.type: type = fn_type @F [concrete]
  354. // CHECK:STDOUT: %F: %F.type = struct_value () [concrete]
  355. // CHECK:STDOUT: }
  356. // CHECK:STDOUT:
  357. // CHECK:STDOUT: imports {
  358. // CHECK:STDOUT: %Core: <namespace> = namespace file.%Core.import, [concrete] {
  359. // CHECK:STDOUT: import Core//prelude
  360. // CHECK:STDOUT: }
  361. // CHECK:STDOUT: }
  362. // CHECK:STDOUT:
  363. // CHECK:STDOUT: file {
  364. // CHECK:STDOUT: package: <namespace> = namespace [concrete] {
  365. // CHECK:STDOUT: .Core = imports.%Core
  366. // CHECK:STDOUT: .Z = %Z.decl
  367. // CHECK:STDOUT: .C = %C.decl
  368. // CHECK:STDOUT: .F = %F.decl
  369. // CHECK:STDOUT: }
  370. // CHECK:STDOUT: %Core.import = import Core
  371. // CHECK:STDOUT: %Z.decl: %Z.type.9fb = interface_decl @Z [concrete = constants.%Z.generic] {
  372. // CHECK:STDOUT: %T.patt.loc2_13.1: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc2_13.2 (constants.%T.patt)]
  373. // CHECK:STDOUT: } {
  374. // CHECK:STDOUT: %T.loc2_13.1: type = bind_symbolic_name T, 0 [symbolic = %T.loc2_13.2 (constants.%T)]
  375. // CHECK:STDOUT: }
  376. // CHECK:STDOUT: %C.decl: type = class_decl @C [concrete = constants.%C] {} {}
  377. // CHECK:STDOUT: impl_decl @impl [concrete] {
  378. // CHECK:STDOUT: %T.patt.loc8_20.1: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc8_20.2 (constants.%T.patt)]
  379. // CHECK:STDOUT: } {
  380. // CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc8_20.1 [symbolic = %T.loc8_20.2 (constants.%T)]
  381. // CHECK:STDOUT: %Z.ref: %Z.type.9fb = name_ref Z, file.%Z.decl [concrete = constants.%Z.generic]
  382. // CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [concrete = constants.%C]
  383. // CHECK:STDOUT: %Z.type: type = facet_type <@Z, @Z(constants.%C)> [concrete = constants.%Z.type.049]
  384. // CHECK:STDOUT: %.Self: %Z.type.049 = bind_symbolic_name .Self [symbolic_self = constants.%.Self]
  385. // CHECK:STDOUT: %.Self.ref: %Z.type.049 = name_ref .Self, %.Self [symbolic_self = constants.%.Self]
  386. // CHECK:STDOUT: %.loc8_46.1: %Z.assoc_type.252 = specific_constant @X.%assoc0, @Z(constants.%C) [concrete = constants.%assoc0.ea4]
  387. // CHECK:STDOUT: %X.ref: %Z.assoc_type.252 = name_ref X, %.loc8_46.1 [concrete = constants.%assoc0.ea4]
  388. // CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self.ref [symbolic_self = constants.%.Self.as_type]
  389. // CHECK:STDOUT: %.loc8_46.2: type = converted %.Self.ref, %.Self.as_type [symbolic_self = constants.%.Self.as_type]
  390. // CHECK:STDOUT: %impl.elem0: type = impl_witness_access constants.%Z.lookup_impl_witness, element0 [symbolic_self = constants.%impl.elem0]
  391. // CHECK:STDOUT: %.loc8_52.1: %empty_tuple.type = tuple_literal ()
  392. // CHECK:STDOUT: %.loc8_52.2: type = converted %.loc8_52.1, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type]
  393. // CHECK:STDOUT: %.loc8_40: type = where_expr %.Self [concrete = constants.%Z_where.type] {
  394. // CHECK:STDOUT: requirement_rewrite %impl.elem0, %.loc8_52.2
  395. // CHECK:STDOUT: }
  396. // CHECK:STDOUT: %T.loc8_20.1: type = bind_symbolic_name T, 0 [symbolic = %T.loc8_20.2 (constants.%T)]
  397. // CHECK:STDOUT: }
  398. // CHECK:STDOUT: %Z.impl_witness_table = impl_witness_table (%impl_witness_assoc_constant), @impl [concrete]
  399. // CHECK:STDOUT: %Z.impl_witness: <witness> = impl_witness %Z.impl_witness_table, @impl(constants.%T) [symbolic = @impl.%Z.impl_witness (constants.%Z.impl_witness)]
  400. // CHECK:STDOUT: %impl_witness_assoc_constant: type = impl_witness_assoc_constant constants.%empty_tuple.type [concrete = constants.%empty_tuple.type]
  401. // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [concrete = constants.%F] {
  402. // CHECK:STDOUT: %T.patt: %Z.type.049 = binding_pattern T
  403. // CHECK:STDOUT: %T.param_patt: %Z.type.049 = value_param_pattern %T.patt, call_param0
  404. // CHECK:STDOUT: %return.patt: <error> = return_slot_pattern
  405. // CHECK:STDOUT: %return.param_patt: <error> = out_param_pattern %return.patt, call_param1
  406. // CHECK:STDOUT: } {
  407. // CHECK:STDOUT: %T.ref: %Z.type.049 = name_ref T, %T
  408. // CHECK:STDOUT: %Z.ref.loc14_21: %Z.type.9fb = name_ref Z, file.%Z.decl [concrete = constants.%Z.generic]
  409. // CHECK:STDOUT: %C.ref.loc14_23: type = name_ref C, file.%C.decl [concrete = constants.%C]
  410. // CHECK:STDOUT: %Z.type.loc14_24: type = facet_type <@Z, @Z(constants.%C)> [concrete = constants.%Z.type.049]
  411. // CHECK:STDOUT: %.loc14_25: %Z.assoc_type.252 = specific_constant @X.%assoc0, @Z(constants.%C) [concrete = constants.%assoc0.ea4]
  412. // CHECK:STDOUT: %X.ref: %Z.assoc_type.252 = name_ref X, %.loc14_25 [concrete = constants.%assoc0.ea4]
  413. // CHECK:STDOUT: %T.param: %Z.type.049 = value_param call_param0
  414. // CHECK:STDOUT: %.loc14_12: type = splice_block %Z.type.loc14_12 [concrete = constants.%Z.type.049] {
  415. // CHECK:STDOUT: %Z.ref.loc14_9: %Z.type.9fb = name_ref Z, file.%Z.decl [concrete = constants.%Z.generic]
  416. // CHECK:STDOUT: %C.ref.loc14_11: type = name_ref C, file.%C.decl [concrete = constants.%C]
  417. // CHECK:STDOUT: %Z.type.loc14_12: type = facet_type <@Z, @Z(constants.%C)> [concrete = constants.%Z.type.049]
  418. // CHECK:STDOUT: }
  419. // CHECK:STDOUT: %T: %Z.type.049 = bind_name T, %T.param
  420. // CHECK:STDOUT: %return.param: ref <error> = out_param call_param1
  421. // CHECK:STDOUT: %return: ref <error> = return_slot %return.param
  422. // CHECK:STDOUT: }
  423. // CHECK:STDOUT: }
  424. // CHECK:STDOUT:
  425. // CHECK:STDOUT: generic interface @Z(%T.loc2_13.1: type) {
  426. // CHECK:STDOUT: %T.loc2_13.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc2_13.2 (constants.%T)]
  427. // CHECK:STDOUT: %T.patt.loc2_13.2: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc2_13.2 (constants.%T.patt)]
  428. // CHECK:STDOUT:
  429. // CHECK:STDOUT: !definition:
  430. // CHECK:STDOUT: %Z.type: type = facet_type <@Z, @Z(%T.loc2_13.2)> [symbolic = %Z.type (constants.%Z.type.a61)]
  431. // CHECK:STDOUT: %Self.2: @Z.%Z.type (%Z.type.a61) = bind_symbolic_name Self, 1 [symbolic = %Self.2 (constants.%Self.2bc)]
  432. // CHECK:STDOUT: %Z.assoc_type: type = assoc_entity_type @Z, @Z(%T.loc2_13.2) [symbolic = %Z.assoc_type (constants.%Z.assoc_type.26e)]
  433. // CHECK:STDOUT: %assoc0: @Z.%Z.assoc_type (%Z.assoc_type.26e) = assoc_entity element0, %X [symbolic = %assoc0 (constants.%assoc0.1cd)]
  434. // CHECK:STDOUT:
  435. // CHECK:STDOUT: interface {
  436. // CHECK:STDOUT: %Self.1: @Z.%Z.type (%Z.type.a61) = bind_symbolic_name Self, 1 [symbolic = %Self.2 (constants.%Self.2bc)]
  437. // CHECK:STDOUT: %X: type = assoc_const_decl @X [concrete] {
  438. // CHECK:STDOUT: %assoc0: @Z.%Z.assoc_type (%Z.assoc_type.26e) = assoc_entity element0, @Z.%X [symbolic = @Z.%assoc0 (constants.%assoc0.1cd)]
  439. // CHECK:STDOUT: }
  440. // CHECK:STDOUT:
  441. // CHECK:STDOUT: !members:
  442. // CHECK:STDOUT: .Self = %Self.1
  443. // CHECK:STDOUT: .X = @X.%assoc0
  444. // CHECK:STDOUT: witness = (%X)
  445. // CHECK:STDOUT: }
  446. // CHECK:STDOUT: }
  447. // CHECK:STDOUT:
  448. // CHECK:STDOUT: generic assoc_const @X(@Z.%T.loc2_13.1: type, @Z.%Self.1: @Z.%Z.type (%Z.type.a61)) {
  449. // CHECK:STDOUT: assoc_const X:! type;
  450. // CHECK:STDOUT: }
  451. // CHECK:STDOUT:
  452. // CHECK:STDOUT: generic impl @impl(%T.loc8_20.1: type) {
  453. // CHECK:STDOUT: %T.loc8_20.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc8_20.2 (constants.%T)]
  454. // CHECK:STDOUT: %T.patt.loc8_20.2: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc8_20.2 (constants.%T.patt)]
  455. // CHECK:STDOUT: %Z.impl_witness: <witness> = impl_witness file.%Z.impl_witness_table, @impl(%T.loc8_20.2) [symbolic = %Z.impl_witness (constants.%Z.impl_witness)]
  456. // CHECK:STDOUT:
  457. // CHECK:STDOUT: !definition:
  458. // CHECK:STDOUT:
  459. // CHECK:STDOUT: impl: %T.ref as %.loc8_40 {
  460. // CHECK:STDOUT: !members:
  461. // CHECK:STDOUT: witness = file.%Z.impl_witness
  462. // CHECK:STDOUT: }
  463. // CHECK:STDOUT: }
  464. // CHECK:STDOUT:
  465. // CHECK:STDOUT: class @C {
  466. // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete = constants.%empty_struct_type]
  467. // CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %empty_struct_type [concrete = constants.%complete_type]
  468. // CHECK:STDOUT: complete_type_witness = %complete_type
  469. // CHECK:STDOUT:
  470. // CHECK:STDOUT: !members:
  471. // CHECK:STDOUT: .Self = constants.%C
  472. // CHECK:STDOUT: }
  473. // CHECK:STDOUT:
  474. // CHECK:STDOUT: fn @F(%T.param: %Z.type.049) -> <error> {
  475. // CHECK:STDOUT: !entry:
  476. // CHECK:STDOUT: %.loc15: %empty_tuple.type = tuple_literal ()
  477. // CHECK:STDOUT: return <error>
  478. // CHECK:STDOUT: }
  479. // CHECK:STDOUT:
  480. // CHECK:STDOUT: specific @Z(constants.%T) {
  481. // CHECK:STDOUT: %T.loc2_13.2 => constants.%T
  482. // CHECK:STDOUT: %T.patt.loc2_13.2 => constants.%T.patt
  483. // CHECK:STDOUT: }
  484. // CHECK:STDOUT:
  485. // CHECK:STDOUT: specific @X(constants.%T, constants.%Self.2bc) {}
  486. // CHECK:STDOUT:
  487. // CHECK:STDOUT: specific @Z(%T.loc2_13.2) {}
  488. // CHECK:STDOUT:
  489. // CHECK:STDOUT: specific @Z(constants.%C) {
  490. // CHECK:STDOUT: %T.loc2_13.2 => constants.%C
  491. // CHECK:STDOUT: %T.patt.loc2_13.2 => constants.%T.patt
  492. // CHECK:STDOUT:
  493. // CHECK:STDOUT: !definition:
  494. // CHECK:STDOUT: %Z.type => constants.%Z.type.049
  495. // CHECK:STDOUT: %Self.2 => constants.%Self.a38
  496. // CHECK:STDOUT: %Z.assoc_type => constants.%Z.assoc_type.252
  497. // CHECK:STDOUT: %assoc0 => constants.%assoc0.ea4
  498. // CHECK:STDOUT: }
  499. // CHECK:STDOUT:
  500. // CHECK:STDOUT: specific @X(constants.%C, constants.%Z.facet) {}
  501. // CHECK:STDOUT:
  502. // CHECK:STDOUT: specific @impl(constants.%T) {
  503. // CHECK:STDOUT: %T.loc8_20.2 => constants.%T
  504. // CHECK:STDOUT: %T.patt.loc8_20.2 => constants.%T.patt
  505. // CHECK:STDOUT: %Z.impl_witness => constants.%Z.impl_witness
  506. // CHECK:STDOUT: }
  507. // CHECK:STDOUT:
  508. // CHECK:STDOUT: specific @impl(%T.loc8_20.2) {}
  509. // CHECK:STDOUT:
  510. // CHECK:STDOUT: --- include_files/facet_types.carbon
  511. // CHECK:STDOUT:
  512. // CHECK:STDOUT: constants {
  513. // CHECK:STDOUT: %Dest: type = bind_symbolic_name Dest, 0 [symbolic]
  514. // CHECK:STDOUT: %Dest.patt: type = symbolic_binding_pattern Dest, 0 [symbolic]
  515. // CHECK:STDOUT: %As.type.b51: type = generic_interface_type @As [concrete]
  516. // CHECK:STDOUT: %As.generic: %As.type.b51 = struct_value () [concrete]
  517. // CHECK:STDOUT: %As.type.8ba: type = facet_type <@As, @As(%Dest)> [symbolic]
  518. // CHECK:STDOUT: %Self.b4e: %As.type.8ba = bind_symbolic_name Self, 1 [symbolic]
  519. // CHECK:STDOUT: %Self.as_type.7f0: type = facet_access_type %Self.b4e [symbolic]
  520. // CHECK:STDOUT: %Convert.type.ad1: type = fn_type @Convert.1, @As(%Dest) [symbolic]
  521. // CHECK:STDOUT: %Convert.0ed: %Convert.type.ad1 = struct_value () [symbolic]
  522. // CHECK:STDOUT: %As.assoc_type: type = assoc_entity_type @As, @As(%Dest) [symbolic]
  523. // CHECK:STDOUT: %assoc0.1d5: %As.assoc_type = assoc_entity element0, @As.%Convert.decl [symbolic]
  524. // CHECK:STDOUT: %ImplicitAs.type.96f: type = generic_interface_type @ImplicitAs [concrete]
  525. // CHECK:STDOUT: %ImplicitAs.generic: %ImplicitAs.type.96f = struct_value () [concrete]
  526. // CHECK:STDOUT: %ImplicitAs.type.07f: type = facet_type <@ImplicitAs, @ImplicitAs(%Dest)> [symbolic]
  527. // CHECK:STDOUT: %Self.0f3: %ImplicitAs.type.07f = bind_symbolic_name Self, 1 [symbolic]
  528. // CHECK:STDOUT: %Self.as_type.419: type = facet_access_type %Self.0f3 [symbolic]
  529. // CHECK:STDOUT: %Convert.type.4cf: type = fn_type @Convert.2, @ImplicitAs(%Dest) [symbolic]
  530. // CHECK:STDOUT: %Convert.147: %Convert.type.4cf = struct_value () [symbolic]
  531. // CHECK:STDOUT: %ImplicitAs.assoc_type: type = assoc_entity_type @ImplicitAs, @ImplicitAs(%Dest) [symbolic]
  532. // CHECK:STDOUT: %assoc0.8f8: %ImplicitAs.assoc_type = assoc_entity element0, @ImplicitAs.%Convert.decl [symbolic]
  533. // CHECK:STDOUT: %BitAnd.type: type = facet_type <@BitAnd> [concrete]
  534. // CHECK:STDOUT: %Self.e44: %BitAnd.type = bind_symbolic_name Self, 0 [symbolic]
  535. // CHECK:STDOUT: %Self.as_type.560: type = facet_access_type %Self.e44 [symbolic]
  536. // CHECK:STDOUT: %Op.type.613: type = fn_type @Op.1 [concrete]
  537. // CHECK:STDOUT: %Op.d98: %Op.type.613 = struct_value () [concrete]
  538. // CHECK:STDOUT: %BitAnd.assoc_type: type = assoc_entity_type @BitAnd [concrete]
  539. // CHECK:STDOUT: %assoc0.220: %BitAnd.assoc_type = assoc_entity element0, @BitAnd.%Op.decl [concrete]
  540. // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic]
  541. // CHECK:STDOUT: %T.patt: type = symbolic_binding_pattern T, 0 [symbolic]
  542. // CHECK:STDOUT: %BitAnd.impl_witness: <witness> = impl_witness file.%BitAnd.impl_witness_table, @impl(%T) [symbolic]
  543. // CHECK:STDOUT: %Op.type.28d: type = fn_type @Op.2, @impl(%T) [symbolic]
  544. // CHECK:STDOUT: %Op.902: %Op.type.28d = struct_value () [symbolic]
  545. // CHECK:STDOUT: %require_complete: <witness> = require_complete_type %T [symbolic]
  546. // CHECK:STDOUT: %BitAnd.facet: %BitAnd.type = facet_value %T, (%BitAnd.impl_witness) [symbolic]
  547. // CHECK:STDOUT: }
  548. // CHECK:STDOUT:
  549. // CHECK:STDOUT: file {
  550. // CHECK:STDOUT: package: <namespace> = namespace [concrete] {
  551. // CHECK:STDOUT: .As = %As.decl
  552. // CHECK:STDOUT: .ImplicitAs = %ImplicitAs.decl
  553. // CHECK:STDOUT: .BitAnd = %BitAnd.decl
  554. // CHECK:STDOUT: }
  555. // CHECK:STDOUT: %As.decl: %As.type.b51 = interface_decl @As [concrete = constants.%As.generic] {
  556. // CHECK:STDOUT: %Dest.patt.loc9_14.1: type = symbolic_binding_pattern Dest, 0 [symbolic = %Dest.patt.loc9_14.2 (constants.%Dest.patt)]
  557. // CHECK:STDOUT: } {
  558. // CHECK:STDOUT: %Dest.loc9_14.1: type = bind_symbolic_name Dest, 0 [symbolic = %Dest.loc9_14.2 (constants.%Dest)]
  559. // CHECK:STDOUT: }
  560. // CHECK:STDOUT: %ImplicitAs.decl: %ImplicitAs.type.96f = interface_decl @ImplicitAs [concrete = constants.%ImplicitAs.generic] {
  561. // CHECK:STDOUT: %Dest.patt.loc13_22.1: type = symbolic_binding_pattern Dest, 0 [symbolic = %Dest.patt.loc13_22.2 (constants.%Dest.patt)]
  562. // CHECK:STDOUT: } {
  563. // CHECK:STDOUT: %Dest.loc13_22.1: type = bind_symbolic_name Dest, 0 [symbolic = %Dest.loc13_22.2 (constants.%Dest)]
  564. // CHECK:STDOUT: }
  565. // CHECK:STDOUT: %BitAnd.decl: type = interface_decl @BitAnd [concrete = constants.%BitAnd.type] {} {}
  566. // CHECK:STDOUT: impl_decl @impl [concrete] {
  567. // CHECK:STDOUT: %T.patt.loc21_14.1: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc21_14.2 (constants.%T.patt)]
  568. // CHECK:STDOUT: } {
  569. // CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc21_14.1 [symbolic = %T.loc21_14.2 (constants.%T)]
  570. // CHECK:STDOUT: %BitAnd.ref: type = name_ref BitAnd, file.%BitAnd.decl [concrete = constants.%BitAnd.type]
  571. // CHECK:STDOUT: %T.loc21_14.1: type = bind_symbolic_name T, 0 [symbolic = %T.loc21_14.2 (constants.%T)]
  572. // CHECK:STDOUT: }
  573. // CHECK:STDOUT: %BitAnd.impl_witness_table = impl_witness_table (@impl.%Op.decl), @impl [concrete]
  574. // CHECK:STDOUT: %BitAnd.impl_witness: <witness> = impl_witness %BitAnd.impl_witness_table, @impl(constants.%T) [symbolic = @impl.%BitAnd.impl_witness (constants.%BitAnd.impl_witness)]
  575. // CHECK:STDOUT: }
  576. // CHECK:STDOUT:
  577. // CHECK:STDOUT: generic interface @As(%Dest.loc9_14.1: type) {
  578. // CHECK:STDOUT: %Dest.loc9_14.2: type = bind_symbolic_name Dest, 0 [symbolic = %Dest.loc9_14.2 (constants.%Dest)]
  579. // CHECK:STDOUT: %Dest.patt.loc9_14.2: type = symbolic_binding_pattern Dest, 0 [symbolic = %Dest.patt.loc9_14.2 (constants.%Dest.patt)]
  580. // CHECK:STDOUT:
  581. // CHECK:STDOUT: !definition:
  582. // CHECK:STDOUT: %As.type: type = facet_type <@As, @As(%Dest.loc9_14.2)> [symbolic = %As.type (constants.%As.type.8ba)]
  583. // CHECK:STDOUT: %Self.2: @As.%As.type (%As.type.8ba) = bind_symbolic_name Self, 1 [symbolic = %Self.2 (constants.%Self.b4e)]
  584. // CHECK:STDOUT: %Convert.type: type = fn_type @Convert.1, @As(%Dest.loc9_14.2) [symbolic = %Convert.type (constants.%Convert.type.ad1)]
  585. // CHECK:STDOUT: %Convert: @As.%Convert.type (%Convert.type.ad1) = struct_value () [symbolic = %Convert (constants.%Convert.0ed)]
  586. // CHECK:STDOUT: %As.assoc_type: type = assoc_entity_type @As, @As(%Dest.loc9_14.2) [symbolic = %As.assoc_type (constants.%As.assoc_type)]
  587. // CHECK:STDOUT: %assoc0.loc10_35.2: @As.%As.assoc_type (%As.assoc_type) = assoc_entity element0, %Convert.decl [symbolic = %assoc0.loc10_35.2 (constants.%assoc0.1d5)]
  588. // CHECK:STDOUT:
  589. // CHECK:STDOUT: interface {
  590. // CHECK:STDOUT: %Self.1: @As.%As.type (%As.type.8ba) = bind_symbolic_name Self, 1 [symbolic = %Self.2 (constants.%Self.b4e)]
  591. // CHECK:STDOUT: %Convert.decl: @As.%Convert.type (%Convert.type.ad1) = fn_decl @Convert.1 [symbolic = @As.%Convert (constants.%Convert.0ed)] {
  592. // CHECK:STDOUT: %self.patt: @Convert.1.%Self.as_type.loc10_20.1 (%Self.as_type.7f0) = binding_pattern self
  593. // CHECK:STDOUT: %self.param_patt: @Convert.1.%Self.as_type.loc10_20.1 (%Self.as_type.7f0) = value_param_pattern %self.patt, call_param0
  594. // CHECK:STDOUT: %return.patt: @Convert.1.%Dest (%Dest) = return_slot_pattern
  595. // CHECK:STDOUT: %return.param_patt: @Convert.1.%Dest (%Dest) = out_param_pattern %return.patt, call_param1
  596. // CHECK:STDOUT: } {
  597. // CHECK:STDOUT: %Dest.ref: type = name_ref Dest, @As.%Dest.loc9_14.1 [symbolic = %Dest (constants.%Dest)]
  598. // CHECK:STDOUT: %self.param: @Convert.1.%Self.as_type.loc10_20.1 (%Self.as_type.7f0) = value_param call_param0
  599. // CHECK:STDOUT: %.loc10_20.1: type = splice_block %.loc10_20.3 [symbolic = %Self.as_type.loc10_20.1 (constants.%Self.as_type.7f0)] {
  600. // CHECK:STDOUT: %.loc10_20.2: @Convert.1.%As.type (%As.type.8ba) = specific_constant @As.%Self.1, @As(constants.%Dest) [symbolic = %Self (constants.%Self.b4e)]
  601. // CHECK:STDOUT: %Self.ref: @Convert.1.%As.type (%As.type.8ba) = name_ref Self, %.loc10_20.2 [symbolic = %Self (constants.%Self.b4e)]
  602. // CHECK:STDOUT: %Self.as_type.loc10_20.2: type = facet_access_type %Self.ref [symbolic = %Self.as_type.loc10_20.1 (constants.%Self.as_type.7f0)]
  603. // CHECK:STDOUT: %.loc10_20.3: type = converted %Self.ref, %Self.as_type.loc10_20.2 [symbolic = %Self.as_type.loc10_20.1 (constants.%Self.as_type.7f0)]
  604. // CHECK:STDOUT: }
  605. // CHECK:STDOUT: %self: @Convert.1.%Self.as_type.loc10_20.1 (%Self.as_type.7f0) = bind_name self, %self.param
  606. // CHECK:STDOUT: %return.param: ref @Convert.1.%Dest (%Dest) = out_param call_param1
  607. // CHECK:STDOUT: %return: ref @Convert.1.%Dest (%Dest) = return_slot %return.param
  608. // CHECK:STDOUT: }
  609. // CHECK:STDOUT: %assoc0.loc10_35.1: @As.%As.assoc_type (%As.assoc_type) = assoc_entity element0, %Convert.decl [symbolic = %assoc0.loc10_35.2 (constants.%assoc0.1d5)]
  610. // CHECK:STDOUT:
  611. // CHECK:STDOUT: !members:
  612. // CHECK:STDOUT: .Self = %Self.1
  613. // CHECK:STDOUT: .Dest = <poisoned>
  614. // CHECK:STDOUT: .Convert = %assoc0.loc10_35.1
  615. // CHECK:STDOUT: witness = (%Convert.decl)
  616. // CHECK:STDOUT: }
  617. // CHECK:STDOUT: }
  618. // CHECK:STDOUT:
  619. // CHECK:STDOUT: generic interface @ImplicitAs(%Dest.loc13_22.1: type) {
  620. // CHECK:STDOUT: %Dest.loc13_22.2: type = bind_symbolic_name Dest, 0 [symbolic = %Dest.loc13_22.2 (constants.%Dest)]
  621. // CHECK:STDOUT: %Dest.patt.loc13_22.2: type = symbolic_binding_pattern Dest, 0 [symbolic = %Dest.patt.loc13_22.2 (constants.%Dest.patt)]
  622. // CHECK:STDOUT:
  623. // CHECK:STDOUT: !definition:
  624. // CHECK:STDOUT: %ImplicitAs.type: type = facet_type <@ImplicitAs, @ImplicitAs(%Dest.loc13_22.2)> [symbolic = %ImplicitAs.type (constants.%ImplicitAs.type.07f)]
  625. // CHECK:STDOUT: %Self.2: @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.07f) = bind_symbolic_name Self, 1 [symbolic = %Self.2 (constants.%Self.0f3)]
  626. // CHECK:STDOUT: %Convert.type: type = fn_type @Convert.2, @ImplicitAs(%Dest.loc13_22.2) [symbolic = %Convert.type (constants.%Convert.type.4cf)]
  627. // CHECK:STDOUT: %Convert: @ImplicitAs.%Convert.type (%Convert.type.4cf) = struct_value () [symbolic = %Convert (constants.%Convert.147)]
  628. // CHECK:STDOUT: %ImplicitAs.assoc_type: type = assoc_entity_type @ImplicitAs, @ImplicitAs(%Dest.loc13_22.2) [symbolic = %ImplicitAs.assoc_type (constants.%ImplicitAs.assoc_type)]
  629. // CHECK:STDOUT: %assoc0.loc14_35.2: @ImplicitAs.%ImplicitAs.assoc_type (%ImplicitAs.assoc_type) = assoc_entity element0, %Convert.decl [symbolic = %assoc0.loc14_35.2 (constants.%assoc0.8f8)]
  630. // CHECK:STDOUT:
  631. // CHECK:STDOUT: interface {
  632. // CHECK:STDOUT: %Self.1: @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.07f) = bind_symbolic_name Self, 1 [symbolic = %Self.2 (constants.%Self.0f3)]
  633. // CHECK:STDOUT: %Convert.decl: @ImplicitAs.%Convert.type (%Convert.type.4cf) = fn_decl @Convert.2 [symbolic = @ImplicitAs.%Convert (constants.%Convert.147)] {
  634. // CHECK:STDOUT: %self.patt: @Convert.2.%Self.as_type.loc14_20.1 (%Self.as_type.419) = binding_pattern self
  635. // CHECK:STDOUT: %self.param_patt: @Convert.2.%Self.as_type.loc14_20.1 (%Self.as_type.419) = value_param_pattern %self.patt, call_param0
  636. // CHECK:STDOUT: %return.patt: @Convert.2.%Dest (%Dest) = return_slot_pattern
  637. // CHECK:STDOUT: %return.param_patt: @Convert.2.%Dest (%Dest) = out_param_pattern %return.patt, call_param1
  638. // CHECK:STDOUT: } {
  639. // CHECK:STDOUT: %Dest.ref: type = name_ref Dest, @ImplicitAs.%Dest.loc13_22.1 [symbolic = %Dest (constants.%Dest)]
  640. // CHECK:STDOUT: %self.param: @Convert.2.%Self.as_type.loc14_20.1 (%Self.as_type.419) = value_param call_param0
  641. // CHECK:STDOUT: %.loc14_20.1: type = splice_block %.loc14_20.3 [symbolic = %Self.as_type.loc14_20.1 (constants.%Self.as_type.419)] {
  642. // CHECK:STDOUT: %.loc14_20.2: @Convert.2.%ImplicitAs.type (%ImplicitAs.type.07f) = specific_constant @ImplicitAs.%Self.1, @ImplicitAs(constants.%Dest) [symbolic = %Self (constants.%Self.0f3)]
  643. // CHECK:STDOUT: %Self.ref: @Convert.2.%ImplicitAs.type (%ImplicitAs.type.07f) = name_ref Self, %.loc14_20.2 [symbolic = %Self (constants.%Self.0f3)]
  644. // CHECK:STDOUT: %Self.as_type.loc14_20.2: type = facet_access_type %Self.ref [symbolic = %Self.as_type.loc14_20.1 (constants.%Self.as_type.419)]
  645. // CHECK:STDOUT: %.loc14_20.3: type = converted %Self.ref, %Self.as_type.loc14_20.2 [symbolic = %Self.as_type.loc14_20.1 (constants.%Self.as_type.419)]
  646. // CHECK:STDOUT: }
  647. // CHECK:STDOUT: %self: @Convert.2.%Self.as_type.loc14_20.1 (%Self.as_type.419) = bind_name self, %self.param
  648. // CHECK:STDOUT: %return.param: ref @Convert.2.%Dest (%Dest) = out_param call_param1
  649. // CHECK:STDOUT: %return: ref @Convert.2.%Dest (%Dest) = return_slot %return.param
  650. // CHECK:STDOUT: }
  651. // CHECK:STDOUT: %assoc0.loc14_35.1: @ImplicitAs.%ImplicitAs.assoc_type (%ImplicitAs.assoc_type) = assoc_entity element0, %Convert.decl [symbolic = %assoc0.loc14_35.2 (constants.%assoc0.8f8)]
  652. // CHECK:STDOUT:
  653. // CHECK:STDOUT: !members:
  654. // CHECK:STDOUT: .Self = %Self.1
  655. // CHECK:STDOUT: .Dest = <poisoned>
  656. // CHECK:STDOUT: .Convert = %assoc0.loc14_35.1
  657. // CHECK:STDOUT: witness = (%Convert.decl)
  658. // CHECK:STDOUT: }
  659. // CHECK:STDOUT: }
  660. // CHECK:STDOUT:
  661. // CHECK:STDOUT: interface @BitAnd {
  662. // CHECK:STDOUT: %Self: %BitAnd.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self.e44]
  663. // CHECK:STDOUT: %Op.decl: %Op.type.613 = fn_decl @Op.1 [concrete = constants.%Op.d98] {
  664. // CHECK:STDOUT: %self.patt: @Op.1.%Self.as_type.loc18_15.1 (%Self.as_type.560) = binding_pattern self
  665. // CHECK:STDOUT: %self.param_patt: @Op.1.%Self.as_type.loc18_15.1 (%Self.as_type.560) = value_param_pattern %self.patt, call_param0
  666. // CHECK:STDOUT: %other.patt: @Op.1.%Self.as_type.loc18_15.1 (%Self.as_type.560) = binding_pattern other
  667. // CHECK:STDOUT: %other.param_patt: @Op.1.%Self.as_type.loc18_15.1 (%Self.as_type.560) = value_param_pattern %other.patt, call_param1
  668. // CHECK:STDOUT: %return.patt: @Op.1.%Self.as_type.loc18_15.1 (%Self.as_type.560) = return_slot_pattern
  669. // CHECK:STDOUT: %return.param_patt: @Op.1.%Self.as_type.loc18_15.1 (%Self.as_type.560) = out_param_pattern %return.patt, call_param2
  670. // CHECK:STDOUT: } {
  671. // CHECK:STDOUT: %Self.ref.loc18_37: %BitAnd.type = name_ref Self, @BitAnd.%Self [symbolic = %Self (constants.%Self.e44)]
  672. // CHECK:STDOUT: %Self.as_type.loc18_37: type = facet_access_type %Self.ref.loc18_37 [symbolic = %Self.as_type.loc18_15.1 (constants.%Self.as_type.560)]
  673. // CHECK:STDOUT: %.loc18_37: type = converted %Self.ref.loc18_37, %Self.as_type.loc18_37 [symbolic = %Self.as_type.loc18_15.1 (constants.%Self.as_type.560)]
  674. // CHECK:STDOUT: %self.param: @Op.1.%Self.as_type.loc18_15.1 (%Self.as_type.560) = value_param call_param0
  675. // CHECK:STDOUT: %.loc18_15.1: type = splice_block %.loc18_15.2 [symbolic = %Self.as_type.loc18_15.1 (constants.%Self.as_type.560)] {
  676. // CHECK:STDOUT: %Self.ref.loc18_15: %BitAnd.type = name_ref Self, @BitAnd.%Self [symbolic = %Self (constants.%Self.e44)]
  677. // CHECK:STDOUT: %Self.as_type.loc18_15.2: type = facet_access_type %Self.ref.loc18_15 [symbolic = %Self.as_type.loc18_15.1 (constants.%Self.as_type.560)]
  678. // CHECK:STDOUT: %.loc18_15.2: type = converted %Self.ref.loc18_15, %Self.as_type.loc18_15.2 [symbolic = %Self.as_type.loc18_15.1 (constants.%Self.as_type.560)]
  679. // CHECK:STDOUT: }
  680. // CHECK:STDOUT: %self: @Op.1.%Self.as_type.loc18_15.1 (%Self.as_type.560) = bind_name self, %self.param
  681. // CHECK:STDOUT: %other.param: @Op.1.%Self.as_type.loc18_15.1 (%Self.as_type.560) = value_param call_param1
  682. // CHECK:STDOUT: %.loc18_28.1: type = splice_block %.loc18_28.2 [symbolic = %Self.as_type.loc18_15.1 (constants.%Self.as_type.560)] {
  683. // CHECK:STDOUT: %Self.ref.loc18_28: %BitAnd.type = name_ref Self, @BitAnd.%Self [symbolic = %Self (constants.%Self.e44)]
  684. // CHECK:STDOUT: %Self.as_type.loc18_28: type = facet_access_type %Self.ref.loc18_28 [symbolic = %Self.as_type.loc18_15.1 (constants.%Self.as_type.560)]
  685. // CHECK:STDOUT: %.loc18_28.2: type = converted %Self.ref.loc18_28, %Self.as_type.loc18_28 [symbolic = %Self.as_type.loc18_15.1 (constants.%Self.as_type.560)]
  686. // CHECK:STDOUT: }
  687. // CHECK:STDOUT: %other: @Op.1.%Self.as_type.loc18_15.1 (%Self.as_type.560) = bind_name other, %other.param
  688. // CHECK:STDOUT: %return.param: ref @Op.1.%Self.as_type.loc18_15.1 (%Self.as_type.560) = out_param call_param2
  689. // CHECK:STDOUT: %return: ref @Op.1.%Self.as_type.loc18_15.1 (%Self.as_type.560) = return_slot %return.param
  690. // CHECK:STDOUT: }
  691. // CHECK:STDOUT: %assoc0: %BitAnd.assoc_type = assoc_entity element0, %Op.decl [concrete = constants.%assoc0.220]
  692. // CHECK:STDOUT:
  693. // CHECK:STDOUT: !members:
  694. // CHECK:STDOUT: .Self = %Self
  695. // CHECK:STDOUT: .Op = %assoc0
  696. // CHECK:STDOUT: witness = (%Op.decl)
  697. // CHECK:STDOUT: }
  698. // CHECK:STDOUT:
  699. // CHECK:STDOUT: generic impl @impl(%T.loc21_14.1: type) {
  700. // CHECK:STDOUT: %T.loc21_14.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc21_14.2 (constants.%T)]
  701. // CHECK:STDOUT: %T.patt.loc21_14.2: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc21_14.2 (constants.%T.patt)]
  702. // CHECK:STDOUT: %BitAnd.impl_witness: <witness> = impl_witness file.%BitAnd.impl_witness_table, @impl(%T.loc21_14.2) [symbolic = %BitAnd.impl_witness (constants.%BitAnd.impl_witness)]
  703. // CHECK:STDOUT:
  704. // CHECK:STDOUT: !definition:
  705. // CHECK:STDOUT: %Op.type: type = fn_type @Op.2, @impl(%T.loc21_14.2) [symbolic = %Op.type (constants.%Op.type.28d)]
  706. // CHECK:STDOUT: %Op: @impl.%Op.type (%Op.type.28d) = struct_value () [symbolic = %Op (constants.%Op.902)]
  707. // CHECK:STDOUT: %require_complete: <witness> = require_complete_type %T.loc21_14.2 [symbolic = %require_complete (constants.%require_complete)]
  708. // CHECK:STDOUT:
  709. // CHECK:STDOUT: impl: %T.ref as %BitAnd.ref {
  710. // CHECK:STDOUT: %Op.decl: @impl.%Op.type (%Op.type.28d) = fn_decl @Op.2 [symbolic = @impl.%Op (constants.%Op.902)] {
  711. // CHECK:STDOUT: %self.patt: @Op.2.%T (%T) = binding_pattern self
  712. // CHECK:STDOUT: %self.param_patt: @Op.2.%T (%T) = value_param_pattern %self.patt, call_param0
  713. // CHECK:STDOUT: %other.patt: @Op.2.%T (%T) = binding_pattern other
  714. // CHECK:STDOUT: %other.param_patt: @Op.2.%T (%T) = value_param_pattern %other.patt, call_param1
  715. // CHECK:STDOUT: %return.patt: @Op.2.%T (%T) = return_slot_pattern
  716. // CHECK:STDOUT: %return.param_patt: @Op.2.%T (%T) = out_param_pattern %return.patt, call_param2
  717. // CHECK:STDOUT: } {
  718. // CHECK:STDOUT: %Self.ref.loc22_37: type = name_ref Self, @impl.%T.ref [symbolic = %T (constants.%T)]
  719. // CHECK:STDOUT: %self.param: @Op.2.%T (%T) = value_param call_param0
  720. // CHECK:STDOUT: %Self.ref.loc22_15: type = name_ref Self, @impl.%T.ref [symbolic = %T (constants.%T)]
  721. // CHECK:STDOUT: %self: @Op.2.%T (%T) = bind_name self, %self.param
  722. // CHECK:STDOUT: %other.param: @Op.2.%T (%T) = value_param call_param1
  723. // CHECK:STDOUT: %Self.ref.loc22_28: type = name_ref Self, @impl.%T.ref [symbolic = %T (constants.%T)]
  724. // CHECK:STDOUT: %other: @Op.2.%T (%T) = bind_name other, %other.param
  725. // CHECK:STDOUT: %return.param: ref @Op.2.%T (%T) = out_param call_param2
  726. // CHECK:STDOUT: %return: ref @Op.2.%T (%T) = return_slot %return.param
  727. // CHECK:STDOUT: }
  728. // CHECK:STDOUT:
  729. // CHECK:STDOUT: !members:
  730. // CHECK:STDOUT: .Op = %Op.decl
  731. // CHECK:STDOUT: witness = file.%BitAnd.impl_witness
  732. // CHECK:STDOUT: }
  733. // CHECK:STDOUT: }
  734. // CHECK:STDOUT:
  735. // CHECK:STDOUT: generic fn @Convert.1(@As.%Dest.loc9_14.1: type, @As.%Self.1: @As.%As.type (%As.type.8ba)) {
  736. // CHECK:STDOUT: %Dest: type = bind_symbolic_name Dest, 0 [symbolic = %Dest (constants.%Dest)]
  737. // CHECK:STDOUT: %As.type: type = facet_type <@As, @As(%Dest)> [symbolic = %As.type (constants.%As.type.8ba)]
  738. // CHECK:STDOUT: %Self: @Convert.1.%As.type (%As.type.8ba) = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.b4e)]
  739. // CHECK:STDOUT: %Self.as_type.loc10_20.1: type = facet_access_type %Self [symbolic = %Self.as_type.loc10_20.1 (constants.%Self.as_type.7f0)]
  740. // CHECK:STDOUT:
  741. // CHECK:STDOUT: fn(%self.param: @Convert.1.%Self.as_type.loc10_20.1 (%Self.as_type.7f0)) -> @Convert.1.%Dest (%Dest);
  742. // CHECK:STDOUT: }
  743. // CHECK:STDOUT:
  744. // CHECK:STDOUT: generic fn @Convert.2(@ImplicitAs.%Dest.loc13_22.1: type, @ImplicitAs.%Self.1: @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.07f)) {
  745. // CHECK:STDOUT: %Dest: type = bind_symbolic_name Dest, 0 [symbolic = %Dest (constants.%Dest)]
  746. // CHECK:STDOUT: %ImplicitAs.type: type = facet_type <@ImplicitAs, @ImplicitAs(%Dest)> [symbolic = %ImplicitAs.type (constants.%ImplicitAs.type.07f)]
  747. // CHECK:STDOUT: %Self: @Convert.2.%ImplicitAs.type (%ImplicitAs.type.07f) = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.0f3)]
  748. // CHECK:STDOUT: %Self.as_type.loc14_20.1: type = facet_access_type %Self [symbolic = %Self.as_type.loc14_20.1 (constants.%Self.as_type.419)]
  749. // CHECK:STDOUT:
  750. // CHECK:STDOUT: fn(%self.param: @Convert.2.%Self.as_type.loc14_20.1 (%Self.as_type.419)) -> @Convert.2.%Dest (%Dest);
  751. // CHECK:STDOUT: }
  752. // CHECK:STDOUT:
  753. // CHECK:STDOUT: generic fn @Op.1(@BitAnd.%Self: %BitAnd.type) {
  754. // CHECK:STDOUT: %Self: %BitAnd.type = bind_symbolic_name Self, 0 [symbolic = %Self (constants.%Self.e44)]
  755. // CHECK:STDOUT: %Self.as_type.loc18_15.1: type = facet_access_type %Self [symbolic = %Self.as_type.loc18_15.1 (constants.%Self.as_type.560)]
  756. // CHECK:STDOUT:
  757. // CHECK:STDOUT: fn(%self.param: @Op.1.%Self.as_type.loc18_15.1 (%Self.as_type.560), %other.param: @Op.1.%Self.as_type.loc18_15.1 (%Self.as_type.560)) -> @Op.1.%Self.as_type.loc18_15.1 (%Self.as_type.560);
  758. // CHECK:STDOUT: }
  759. // CHECK:STDOUT:
  760. // CHECK:STDOUT: generic fn @Op.2(@impl.%T.loc21_14.1: type) {
  761. // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic = %T (constants.%T)]
  762. // CHECK:STDOUT:
  763. // CHECK:STDOUT: !definition:
  764. // CHECK:STDOUT:
  765. // CHECK:STDOUT: fn(%self.param: @Op.2.%T (%T), %other.param: @Op.2.%T (%T)) -> @Op.2.%T (%T) = "type.and";
  766. // CHECK:STDOUT: }
  767. // CHECK:STDOUT:
  768. // CHECK:STDOUT: specific @As(constants.%Dest) {
  769. // CHECK:STDOUT: %Dest.loc9_14.2 => constants.%Dest
  770. // CHECK:STDOUT: %Dest.patt.loc9_14.2 => constants.%Dest.patt
  771. // CHECK:STDOUT: }
  772. // CHECK:STDOUT:
  773. // CHECK:STDOUT: specific @Convert.1(constants.%Dest, constants.%Self.b4e) {
  774. // CHECK:STDOUT: %Dest => constants.%Dest
  775. // CHECK:STDOUT: %As.type => constants.%As.type.8ba
  776. // CHECK:STDOUT: %Self => constants.%Self.b4e
  777. // CHECK:STDOUT: %Self.as_type.loc10_20.1 => constants.%Self.as_type.7f0
  778. // CHECK:STDOUT: }
  779. // CHECK:STDOUT:
  780. // CHECK:STDOUT: specific @As(@Convert.1.%Dest) {}
  781. // CHECK:STDOUT:
  782. // CHECK:STDOUT: specific @As(%Dest.loc9_14.2) {}
  783. // CHECK:STDOUT:
  784. // CHECK:STDOUT: specific @ImplicitAs(constants.%Dest) {
  785. // CHECK:STDOUT: %Dest.loc13_22.2 => constants.%Dest
  786. // CHECK:STDOUT: %Dest.patt.loc13_22.2 => constants.%Dest.patt
  787. // CHECK:STDOUT: }
  788. // CHECK:STDOUT:
  789. // CHECK:STDOUT: specific @Convert.2(constants.%Dest, constants.%Self.0f3) {
  790. // CHECK:STDOUT: %Dest => constants.%Dest
  791. // CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.07f
  792. // CHECK:STDOUT: %Self => constants.%Self.0f3
  793. // CHECK:STDOUT: %Self.as_type.loc14_20.1 => constants.%Self.as_type.419
  794. // CHECK:STDOUT: }
  795. // CHECK:STDOUT:
  796. // CHECK:STDOUT: specific @ImplicitAs(@Convert.2.%Dest) {}
  797. // CHECK:STDOUT:
  798. // CHECK:STDOUT: specific @ImplicitAs(%Dest.loc13_22.2) {}
  799. // CHECK:STDOUT:
  800. // CHECK:STDOUT: specific @Op.1(constants.%Self.e44) {
  801. // CHECK:STDOUT: %Self => constants.%Self.e44
  802. // CHECK:STDOUT: %Self.as_type.loc18_15.1 => constants.%Self.as_type.560
  803. // CHECK:STDOUT: }
  804. // CHECK:STDOUT:
  805. // CHECK:STDOUT: specific @impl(constants.%T) {
  806. // CHECK:STDOUT: %T.loc21_14.2 => constants.%T
  807. // CHECK:STDOUT: %T.patt.loc21_14.2 => constants.%T.patt
  808. // CHECK:STDOUT: %BitAnd.impl_witness => constants.%BitAnd.impl_witness
  809. // CHECK:STDOUT: }
  810. // CHECK:STDOUT:
  811. // CHECK:STDOUT: specific @impl(%T.loc21_14.2) {}
  812. // CHECK:STDOUT:
  813. // CHECK:STDOUT: specific @Op.2(constants.%T) {
  814. // CHECK:STDOUT: %T => constants.%T
  815. // CHECK:STDOUT: }
  816. // CHECK:STDOUT:
  817. // CHECK:STDOUT: specific @Op.1(constants.%BitAnd.facet) {
  818. // CHECK:STDOUT: %Self => constants.%BitAnd.facet
  819. // CHECK:STDOUT: %Self.as_type.loc18_15.1 => constants.%T
  820. // CHECK:STDOUT: }
  821. // CHECK:STDOUT: