runtime_value.carbon 51 KB

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