compound_member_access.carbon 112 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594
  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/testdata/min_prelude/convert.carbon
  6. // TODO: Add ranges and switch to "--dump-sem-ir-ranges=only".
  7. // EXTRA-ARGS: --dump-sem-ir-ranges=if-present
  8. //
  9. // AUTOUPDATE
  10. // TIP: To test this file alone, run:
  11. // TIP: bazel test //toolchain/testing:file_test --test_arg=--file_tests=toolchain/check/testdata/interface/compound_member_access.carbon
  12. // TIP: To dump output, run:
  13. // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/check/testdata/interface/compound_member_access.carbon
  14. // --- associated_constant.carbon
  15. library "[[@TEST_NAME]]";
  16. interface J {
  17. let U:! type;
  18. }
  19. // Simple member access.
  20. fn Simple1(T:! J, S:! T.U) {}
  21. // This should be equivalent to `Simple1` above, but using compound member access.
  22. fn Compound1(V:! J, W:! V.(J.U)) {}
  23. // --- non_instance.carbon
  24. library "[[@TEST_NAME]]";
  25. interface K1 {
  26. fn Q1();
  27. }
  28. // Simple member access.
  29. fn Simple2(T:! K1) {
  30. T.Q1();
  31. }
  32. // This should be equivalent to `Simple2` above, but using compound member access.
  33. fn Compound2(V:! K1) {
  34. V.(K1.Q1)();
  35. }
  36. // --- fail_caller_instance_interface_not.carbon
  37. library "[[@TEST_NAME]]";
  38. interface K2 {
  39. fn Q2();
  40. }
  41. // Simple member access allows this.
  42. fn Simple3(T:! K2, x: T) {
  43. x.Q2();
  44. }
  45. // Compound member access does not. It tries to convert `y` to `K2`, but only
  46. // its type `V` can.
  47. fn Compound3(V:! K2, y: V) {
  48. // CHECK:STDERR: fail_caller_instance_interface_not.carbon:[[@LINE+7]]:3: error: cannot implicitly convert non-type value of type `V` into type implementing `K2` [ConversionFailureNonTypeToFacet]
  49. // CHECK:STDERR: y.(K2.Q2)();
  50. // CHECK:STDERR: ^~~~~~~~~
  51. // CHECK:STDERR: fail_caller_instance_interface_not.carbon:[[@LINE+4]]:3: note: type `V` does not implement interface `Core.ImplicitAs(K2)` [MissingImplInMemberAccessNote]
  52. // CHECK:STDERR: y.(K2.Q2)();
  53. // CHECK:STDERR: ^~~~~~~~~
  54. // CHECK:STDERR:
  55. y.(K2.Q2)();
  56. }
  57. // --- instance.carbon
  58. library "[[@TEST_NAME]]";
  59. interface L1 {
  60. fn R1[self: Self]();
  61. fn S1[addr self: Self*]();
  62. }
  63. // Simple member access.
  64. fn Simple4(T:! L1, x: T, p: T*) {
  65. x.R1();
  66. p->S1();
  67. }
  68. // This should be equivalent to `Simple4` above, but using compound member access.
  69. fn Compound4(V:! L1, y: V, p: V*) {
  70. y.(L1.R1)();
  71. p->(L1.S1)();
  72. }
  73. // --- fail_interface_instance_caller_not.carbon
  74. library "[[@TEST_NAME]]";
  75. interface L2 {
  76. fn R2[self: Self]();
  77. fn S2[addr self: Self*]();
  78. }
  79. // Simple member access. Fails since calling an instance method without an object.
  80. fn Simple5(T:! L2) {
  81. // CHECK:STDERR: fail_interface_instance_caller_not.carbon:[[@LINE+7]]:3: error: missing object argument in method call [MissingObjectInMethodCall]
  82. // CHECK:STDERR: T.R2();
  83. // CHECK:STDERR: ^~~~~~
  84. // CHECK:STDERR: fail_interface_instance_caller_not.carbon:[[@LINE-9]]:3: note: calling function declared here [InCallToFunction]
  85. // CHECK:STDERR: fn R2[self: Self]();
  86. // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~
  87. // CHECK:STDERR:
  88. T.R2();
  89. // CHECK:STDERR: fail_interface_instance_caller_not.carbon:[[@LINE+7]]:3: error: missing object argument in method call [MissingObjectInMethodCall]
  90. // CHECK:STDERR: T.S2();
  91. // CHECK:STDERR: ^~~~~~
  92. // CHECK:STDERR: fail_interface_instance_caller_not.carbon:[[@LINE-16]]:3: note: calling function declared here [InCallToFunction]
  93. // CHECK:STDERR: fn S2[addr self: Self*]();
  94. // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~
  95. // CHECK:STDERR:
  96. T.S2();
  97. }
  98. // TODO: Expected to fail in the same way as `Simple5`.
  99. fn Compound5(V:! L2) {
  100. // CHECK:STDERR: fail_interface_instance_caller_not.carbon:[[@LINE+4]]:3: error: cannot access member of interface `L2` in type `L2` that does not implement that interface [MissingImplInMemberAccess]
  101. // CHECK:STDERR: V.(L2.R2)();
  102. // CHECK:STDERR: ^~~~~~~~~
  103. // CHECK:STDERR:
  104. V.(L2.R2)();
  105. // CHECK:STDERR: fail_interface_instance_caller_not.carbon:[[@LINE+4]]:3: error: cannot access member of interface `L2` in type `L2` that does not implement that interface [MissingImplInMemberAccess]
  106. // CHECK:STDERR: V.(L2.S2)();
  107. // CHECK:STDERR: ^~~~~~~~~
  108. // CHECK:STDERR:
  109. V.(L2.S2)();
  110. }
  111. // --- fail_combine_non_instance.carbon
  112. library "[[@TEST_NAME]]";
  113. interface A {
  114. fn G();
  115. }
  116. class C {}
  117. impl C as A {
  118. fn G() {}
  119. }
  120. // Since `A.G` is a non-instance method, compound member access may only be
  121. // used with a type, not an instance.
  122. fn Fails() {
  123. // CHECK:STDERR: fail_combine_non_instance.carbon:[[@LINE+7]]:3: error: cannot implicitly convert non-type value of type `C` into type implementing `A` [ConversionFailureNonTypeToFacet]
  124. // CHECK:STDERR: ({} as C).((A & A).G)();
  125. // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~
  126. // CHECK:STDERR: fail_combine_non_instance.carbon:[[@LINE+4]]:3: note: type `C` does not implement interface `Core.ImplicitAs(A)` [MissingImplInMemberAccessNote]
  127. // CHECK:STDERR: ({} as C).((A & A).G)();
  128. // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~
  129. // CHECK:STDERR:
  130. ({} as C).((A & A).G)();
  131. // CHECK:STDERR: fail_combine_non_instance.carbon:[[@LINE+7]]:3: error: cannot implicitly convert non-type value of type `C` into type implementing `A` [ConversionFailureNonTypeToFacet]
  132. // CHECK:STDERR: (({} as C) as (C as (A & A))).((A & A).G)();
  133. // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  134. // CHECK:STDERR: fail_combine_non_instance.carbon:[[@LINE+4]]:3: note: type `C` does not implement interface `Core.ImplicitAs(A)` [MissingImplInMemberAccessNote]
  135. // CHECK:STDERR: (({} as C) as (C as (A & A))).((A & A).G)();
  136. // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  137. // CHECK:STDERR:
  138. (({} as C) as (C as (A & A))).((A & A).G)();
  139. // CHECK:STDERR: fail_combine_non_instance.carbon:[[@LINE+7]]:3: error: cannot implicitly convert non-type value of type `C` into type implementing `A` [ConversionFailureNonTypeToFacet]
  140. // CHECK:STDERR: (({} as C) as (C as (A & A))).(A.G)();
  141. // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  142. // CHECK:STDERR: fail_combine_non_instance.carbon:[[@LINE+4]]:3: note: type `C` does not implement interface `Core.ImplicitAs(A)` [MissingImplInMemberAccessNote]
  143. // CHECK:STDERR: (({} as C) as (C as (A & A))).(A.G)();
  144. // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  145. // CHECK:STDERR:
  146. (({} as C) as (C as (A & A))).(A.G)();
  147. }
  148. // --- allowed_combine_non_instance.carbon
  149. library "[[@TEST_NAME]]";
  150. interface A {
  151. fn G();
  152. }
  153. class C {}
  154. impl C as A {
  155. fn G() {}
  156. }
  157. fn Works() {
  158. C.((A & A).G)();
  159. (C as (A & A)).((A & A).G)();
  160. (C as (A & A)).(A.G)();
  161. }
  162. // CHECK:STDOUT: --- associated_constant.carbon
  163. // CHECK:STDOUT:
  164. // CHECK:STDOUT: constants {
  165. // CHECK:STDOUT: %J.type: type = facet_type <@J> [concrete]
  166. // CHECK:STDOUT: %Self: %J.type = bind_symbolic_name Self, 0 [symbolic]
  167. // CHECK:STDOUT: %J.assoc_type: type = assoc_entity_type @J [concrete]
  168. // CHECK:STDOUT: %assoc0: %J.assoc_type = assoc_entity element0, @J.%U [concrete]
  169. // CHECK:STDOUT: %type: type = facet_type <type> [concrete]
  170. // CHECK:STDOUT: %.Self: %type = bind_symbolic_name .Self [symbolic_self]
  171. // CHECK:STDOUT: %T: %J.type = bind_symbolic_name T, 0 [symbolic]
  172. // CHECK:STDOUT: %pattern_type.84b: type = pattern_type %J.type [concrete]
  173. // CHECK:STDOUT: %T.as_type: type = facet_access_type %T [symbolic]
  174. // CHECK:STDOUT: %J.lookup_impl_witness.0802bc.1: <witness> = lookup_impl_witness %T, @J [symbolic]
  175. // CHECK:STDOUT: %J.facet.c211a5.1: %J.type = facet_value %T.as_type, (%J.lookup_impl_witness.0802bc.1) [symbolic]
  176. // CHECK:STDOUT: %impl.elem0.312582.1: type = impl_witness_access %J.lookup_impl_witness.0802bc.1, element0 [symbolic]
  177. // CHECK:STDOUT: %S: %impl.elem0.312582.1 = bind_symbolic_name S, 1 [symbolic]
  178. // CHECK:STDOUT: %pattern_type.9d9270.1: type = pattern_type %impl.elem0.312582.1 [symbolic]
  179. // CHECK:STDOUT: %Simple1.type: type = fn_type @Simple1 [concrete]
  180. // CHECK:STDOUT: %Simple1: %Simple1.type = struct_value () [concrete]
  181. // CHECK:STDOUT: %V: %J.type = bind_symbolic_name V, 0 [symbolic]
  182. // CHECK:STDOUT: %V.as_type: type = facet_access_type %V [symbolic]
  183. // CHECK:STDOUT: %J.lookup_impl_witness.0802bc.2: <witness> = lookup_impl_witness %V, @J [symbolic]
  184. // CHECK:STDOUT: %J.facet.c211a5.2: %J.type = facet_value %V.as_type, (%J.lookup_impl_witness.0802bc.2) [symbolic]
  185. // CHECK:STDOUT: %impl.elem0.312582.2: type = impl_witness_access %J.lookup_impl_witness.0802bc.2, element0 [symbolic]
  186. // CHECK:STDOUT: %W: %impl.elem0.312582.2 = bind_symbolic_name W, 1 [symbolic]
  187. // CHECK:STDOUT: %pattern_type.9d9270.2: type = pattern_type %impl.elem0.312582.2 [symbolic]
  188. // CHECK:STDOUT: %Compound1.type: type = fn_type @Compound1 [concrete]
  189. // CHECK:STDOUT: %Compound1: %Compound1.type = struct_value () [concrete]
  190. // CHECK:STDOUT: }
  191. // CHECK:STDOUT:
  192. // CHECK:STDOUT: imports {
  193. // CHECK:STDOUT: %Core: <namespace> = namespace file.%Core.import, [concrete] {
  194. // CHECK:STDOUT: import Core//prelude
  195. // CHECK:STDOUT: import Core//prelude/...
  196. // CHECK:STDOUT: }
  197. // CHECK:STDOUT: }
  198. // CHECK:STDOUT:
  199. // CHECK:STDOUT: file {
  200. // CHECK:STDOUT: package: <namespace> = namespace [concrete] {
  201. // CHECK:STDOUT: .Core = imports.%Core
  202. // CHECK:STDOUT: .J = %J.decl
  203. // CHECK:STDOUT: .Simple1 = %Simple1.decl
  204. // CHECK:STDOUT: .Compound1 = %Compound1.decl
  205. // CHECK:STDOUT: }
  206. // CHECK:STDOUT: %Core.import = import Core
  207. // CHECK:STDOUT: %J.decl: type = interface_decl @J [concrete = constants.%J.type] {} {}
  208. // CHECK:STDOUT: %Simple1.decl: %Simple1.type = fn_decl @Simple1 [concrete = constants.%Simple1] {
  209. // CHECK:STDOUT: %T.patt: %pattern_type.84b = symbolic_binding_pattern T, 0 [concrete]
  210. // CHECK:STDOUT: %S.patt: @Simple1.%pattern_type (%pattern_type.9d9270.1) = symbolic_binding_pattern S, 1 [concrete]
  211. // CHECK:STDOUT: } {
  212. // CHECK:STDOUT: %.loc8_16: type = splice_block %J.ref [concrete = constants.%J.type] {
  213. // CHECK:STDOUT: %.Self.2: %type = bind_symbolic_name .Self [symbolic_self = constants.%.Self]
  214. // CHECK:STDOUT: %J.ref: type = name_ref J, file.%J.decl [concrete = constants.%J.type]
  215. // CHECK:STDOUT: }
  216. // CHECK:STDOUT: %T.loc8_12.2: %J.type = bind_symbolic_name T, 0 [symbolic = %T.loc8_12.1 (constants.%T)]
  217. // CHECK:STDOUT: %.loc8_24.1: type = splice_block %impl.elem0.loc8_24.2 [symbolic = %impl.elem0.loc8_24.1 (constants.%impl.elem0.312582.1)] {
  218. // CHECK:STDOUT: %.Self.1: %type = bind_symbolic_name .Self [symbolic_self = constants.%.Self]
  219. // CHECK:STDOUT: %T.ref: %J.type = name_ref T, %T.loc8_12.2 [symbolic = %T.loc8_12.1 (constants.%T)]
  220. // CHECK:STDOUT: %U.ref: %J.assoc_type = name_ref U, @U.%assoc0 [concrete = constants.%assoc0]
  221. // CHECK:STDOUT: %T.as_type.loc8_24.2: type = facet_access_type %T.ref [symbolic = %T.as_type.loc8_24.1 (constants.%T.as_type)]
  222. // CHECK:STDOUT: %.loc8_24.2: type = converted %T.ref, %T.as_type.loc8_24.2 [symbolic = %T.as_type.loc8_24.1 (constants.%T.as_type)]
  223. // CHECK:STDOUT: %impl.elem0.loc8_24.2: type = impl_witness_access constants.%J.lookup_impl_witness.0802bc.1, element0 [symbolic = %impl.elem0.loc8_24.1 (constants.%impl.elem0.312582.1)]
  224. // CHECK:STDOUT: }
  225. // CHECK:STDOUT: %S.loc8_19.2: @Simple1.%impl.elem0.loc8_24.1 (%impl.elem0.312582.1) = bind_symbolic_name S, 1 [symbolic = %S.loc8_19.1 (constants.%S)]
  226. // CHECK:STDOUT: }
  227. // CHECK:STDOUT: %Compound1.decl: %Compound1.type = fn_decl @Compound1 [concrete = constants.%Compound1] {
  228. // CHECK:STDOUT: %V.patt: %pattern_type.84b = symbolic_binding_pattern V, 0 [concrete]
  229. // CHECK:STDOUT: %W.patt: @Compound1.%pattern_type (%pattern_type.9d9270.2) = symbolic_binding_pattern W, 1 [concrete]
  230. // CHECK:STDOUT: } {
  231. // CHECK:STDOUT: %.loc11_18: type = splice_block %J.ref.loc11_18 [concrete = constants.%J.type] {
  232. // CHECK:STDOUT: %.Self.2: %type = bind_symbolic_name .Self [symbolic_self = constants.%.Self]
  233. // CHECK:STDOUT: %J.ref.loc11_18: type = name_ref J, file.%J.decl [concrete = constants.%J.type]
  234. // CHECK:STDOUT: }
  235. // CHECK:STDOUT: %V.loc11_14.2: %J.type = bind_symbolic_name V, 0 [symbolic = %V.loc11_14.1 (constants.%V)]
  236. // CHECK:STDOUT: %.loc11_26: type = splice_block %impl.elem0.loc11_26.2 [symbolic = %impl.elem0.loc11_26.1 (constants.%impl.elem0.312582.2)] {
  237. // CHECK:STDOUT: %.Self.1: %type = bind_symbolic_name .Self [symbolic_self = constants.%.Self]
  238. // CHECK:STDOUT: %V.ref: %J.type = name_ref V, %V.loc11_14.2 [symbolic = %V.loc11_14.1 (constants.%V)]
  239. // CHECK:STDOUT: %J.ref.loc11_28: type = name_ref J, file.%J.decl [concrete = constants.%J.type]
  240. // CHECK:STDOUT: %U.ref: %J.assoc_type = name_ref U, @U.%assoc0 [concrete = constants.%assoc0]
  241. // CHECK:STDOUT: %impl.elem0.loc11_26.2: type = impl_witness_access constants.%J.lookup_impl_witness.0802bc.2, element0 [symbolic = %impl.elem0.loc11_26.1 (constants.%impl.elem0.312582.2)]
  242. // CHECK:STDOUT: }
  243. // CHECK:STDOUT: %W.loc11_21.2: @Compound1.%impl.elem0.loc11_26.1 (%impl.elem0.312582.2) = bind_symbolic_name W, 1 [symbolic = %W.loc11_21.1 (constants.%W)]
  244. // CHECK:STDOUT: }
  245. // CHECK:STDOUT: }
  246. // CHECK:STDOUT:
  247. // CHECK:STDOUT: interface @J {
  248. // CHECK:STDOUT: %Self: %J.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self]
  249. // CHECK:STDOUT: %U: type = assoc_const_decl @U [concrete] {
  250. // CHECK:STDOUT: %assoc0: %J.assoc_type = assoc_entity element0, @J.%U [concrete = constants.%assoc0]
  251. // CHECK:STDOUT: }
  252. // CHECK:STDOUT:
  253. // CHECK:STDOUT: !members:
  254. // CHECK:STDOUT: .Self = %Self
  255. // CHECK:STDOUT: .U = @U.%assoc0
  256. // CHECK:STDOUT: witness = (%U)
  257. // CHECK:STDOUT: }
  258. // CHECK:STDOUT:
  259. // CHECK:STDOUT: generic assoc_const @U(@J.%Self: %J.type) {
  260. // CHECK:STDOUT: assoc_const U:! type;
  261. // CHECK:STDOUT: }
  262. // CHECK:STDOUT:
  263. // CHECK:STDOUT: generic fn @Simple1(%T.loc8_12.2: %J.type, %S.loc8_19.2: @Simple1.%impl.elem0.loc8_24.1 (%impl.elem0.312582.1)) {
  264. // CHECK:STDOUT: %T.loc8_12.1: %J.type = bind_symbolic_name T, 0 [symbolic = %T.loc8_12.1 (constants.%T)]
  265. // CHECK:STDOUT: %T.as_type.loc8_24.1: type = facet_access_type %T.loc8_12.1 [symbolic = %T.as_type.loc8_24.1 (constants.%T.as_type)]
  266. // CHECK:STDOUT: %J.lookup_impl_witness: <witness> = lookup_impl_witness %T.loc8_12.1, @J [symbolic = %J.lookup_impl_witness (constants.%J.lookup_impl_witness.0802bc.1)]
  267. // CHECK:STDOUT: %impl.elem0.loc8_24.1: type = impl_witness_access %J.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc8_24.1 (constants.%impl.elem0.312582.1)]
  268. // CHECK:STDOUT: %S.loc8_19.1: @Simple1.%impl.elem0.loc8_24.1 (%impl.elem0.312582.1) = bind_symbolic_name S, 1 [symbolic = %S.loc8_19.1 (constants.%S)]
  269. // CHECK:STDOUT: %pattern_type: type = pattern_type %impl.elem0.loc8_24.1 [symbolic = %pattern_type (constants.%pattern_type.9d9270.1)]
  270. // CHECK:STDOUT:
  271. // CHECK:STDOUT: !definition:
  272. // CHECK:STDOUT:
  273. // CHECK:STDOUT: fn() {
  274. // CHECK:STDOUT: !entry:
  275. // CHECK:STDOUT: return
  276. // CHECK:STDOUT: }
  277. // CHECK:STDOUT: }
  278. // CHECK:STDOUT:
  279. // CHECK:STDOUT: generic fn @Compound1(%V.loc11_14.2: %J.type, %W.loc11_21.2: @Compound1.%impl.elem0.loc11_26.1 (%impl.elem0.312582.2)) {
  280. // CHECK:STDOUT: %V.loc11_14.1: %J.type = bind_symbolic_name V, 0 [symbolic = %V.loc11_14.1 (constants.%V)]
  281. // CHECK:STDOUT: %J.lookup_impl_witness: <witness> = lookup_impl_witness %V.loc11_14.1, @J [symbolic = %J.lookup_impl_witness (constants.%J.lookup_impl_witness.0802bc.2)]
  282. // CHECK:STDOUT: %impl.elem0.loc11_26.1: type = impl_witness_access %J.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc11_26.1 (constants.%impl.elem0.312582.2)]
  283. // CHECK:STDOUT: %W.loc11_21.1: @Compound1.%impl.elem0.loc11_26.1 (%impl.elem0.312582.2) = bind_symbolic_name W, 1 [symbolic = %W.loc11_21.1 (constants.%W)]
  284. // CHECK:STDOUT: %pattern_type: type = pattern_type %impl.elem0.loc11_26.1 [symbolic = %pattern_type (constants.%pattern_type.9d9270.2)]
  285. // CHECK:STDOUT:
  286. // CHECK:STDOUT: !definition:
  287. // CHECK:STDOUT:
  288. // CHECK:STDOUT: fn() {
  289. // CHECK:STDOUT: !entry:
  290. // CHECK:STDOUT: return
  291. // CHECK:STDOUT: }
  292. // CHECK:STDOUT: }
  293. // CHECK:STDOUT:
  294. // CHECK:STDOUT: specific @U(constants.%Self) {}
  295. // CHECK:STDOUT:
  296. // CHECK:STDOUT: specific @U(constants.%J.facet.c211a5.1) {}
  297. // CHECK:STDOUT:
  298. // CHECK:STDOUT: specific @Simple1(constants.%T, constants.%S) {
  299. // CHECK:STDOUT: %T.loc8_12.1 => constants.%T
  300. // CHECK:STDOUT: %T.as_type.loc8_24.1 => constants.%T.as_type
  301. // CHECK:STDOUT: %J.lookup_impl_witness => constants.%J.lookup_impl_witness.0802bc.1
  302. // CHECK:STDOUT: %impl.elem0.loc8_24.1 => constants.%impl.elem0.312582.1
  303. // CHECK:STDOUT: %S.loc8_19.1 => constants.%S
  304. // CHECK:STDOUT: %pattern_type => constants.%pattern_type.9d9270.1
  305. // CHECK:STDOUT: }
  306. // CHECK:STDOUT:
  307. // CHECK:STDOUT: specific @U(constants.%J.facet.c211a5.2) {}
  308. // CHECK:STDOUT:
  309. // CHECK:STDOUT: specific @Compound1(constants.%V, constants.%W) {
  310. // CHECK:STDOUT: %V.loc11_14.1 => constants.%V
  311. // CHECK:STDOUT: %J.lookup_impl_witness => constants.%J.lookup_impl_witness.0802bc.2
  312. // CHECK:STDOUT: %impl.elem0.loc11_26.1 => constants.%impl.elem0.312582.2
  313. // CHECK:STDOUT: %W.loc11_21.1 => constants.%W
  314. // CHECK:STDOUT: %pattern_type => constants.%pattern_type.9d9270.2
  315. // CHECK:STDOUT: }
  316. // CHECK:STDOUT:
  317. // CHECK:STDOUT: --- non_instance.carbon
  318. // CHECK:STDOUT:
  319. // CHECK:STDOUT: constants {
  320. // CHECK:STDOUT: %K1.type: type = facet_type <@K1> [concrete]
  321. // CHECK:STDOUT: %Self: %K1.type = bind_symbolic_name Self, 0 [symbolic]
  322. // CHECK:STDOUT: %K1.Q1.type: type = fn_type @K1.Q1 [concrete]
  323. // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete]
  324. // CHECK:STDOUT: %K1.Q1: %K1.Q1.type = struct_value () [concrete]
  325. // CHECK:STDOUT: %K1.assoc_type: type = assoc_entity_type @K1 [concrete]
  326. // CHECK:STDOUT: %assoc0: %K1.assoc_type = assoc_entity element0, @K1.%K1.Q1.decl [concrete]
  327. // CHECK:STDOUT: %type: type = facet_type <type> [concrete]
  328. // CHECK:STDOUT: %.Self: %type = bind_symbolic_name .Self [symbolic_self]
  329. // CHECK:STDOUT: %T: %K1.type = bind_symbolic_name T, 0 [symbolic]
  330. // CHECK:STDOUT: %pattern_type: type = pattern_type %K1.type [concrete]
  331. // CHECK:STDOUT: %Simple2.type: type = fn_type @Simple2 [concrete]
  332. // CHECK:STDOUT: %Simple2: %Simple2.type = struct_value () [concrete]
  333. // CHECK:STDOUT: %T.as_type: type = facet_access_type %T [symbolic]
  334. // CHECK:STDOUT: %K1.lookup_impl_witness.5aa361.1: <witness> = lookup_impl_witness %T, @K1 [symbolic]
  335. // CHECK:STDOUT: %K1.facet.992bb7.1: %K1.type = facet_value %T.as_type, (%K1.lookup_impl_witness.5aa361.1) [symbolic]
  336. // CHECK:STDOUT: %.17a596.1: type = fn_type_with_self_type %K1.Q1.type, %K1.facet.992bb7.1 [symbolic]
  337. // CHECK:STDOUT: %impl.elem0.2491f4.1: %.17a596.1 = impl_witness_access %K1.lookup_impl_witness.5aa361.1, element0 [symbolic]
  338. // CHECK:STDOUT: %specific_impl_fn.4e92aa.1: <specific function> = specific_impl_function %impl.elem0.2491f4.1, @K1.Q1(%K1.facet.992bb7.1) [symbolic]
  339. // CHECK:STDOUT: %V: %K1.type = bind_symbolic_name V, 0 [symbolic]
  340. // CHECK:STDOUT: %Compound2.type: type = fn_type @Compound2 [concrete]
  341. // CHECK:STDOUT: %Compound2: %Compound2.type = struct_value () [concrete]
  342. // CHECK:STDOUT: %V.as_type: type = facet_access_type %V [symbolic]
  343. // CHECK:STDOUT: %K1.lookup_impl_witness.5aa361.2: <witness> = lookup_impl_witness %V, @K1 [symbolic]
  344. // CHECK:STDOUT: %K1.facet.992bb7.2: %K1.type = facet_value %V.as_type, (%K1.lookup_impl_witness.5aa361.2) [symbolic]
  345. // CHECK:STDOUT: %.17a596.2: type = fn_type_with_self_type %K1.Q1.type, %K1.facet.992bb7.2 [symbolic]
  346. // CHECK:STDOUT: %impl.elem0.2491f4.2: %.17a596.2 = impl_witness_access %K1.lookup_impl_witness.5aa361.2, element0 [symbolic]
  347. // CHECK:STDOUT: %specific_impl_fn.4e92aa.2: <specific function> = specific_impl_function %impl.elem0.2491f4.2, @K1.Q1(%K1.facet.992bb7.2) [symbolic]
  348. // CHECK:STDOUT: }
  349. // CHECK:STDOUT:
  350. // CHECK:STDOUT: imports {
  351. // CHECK:STDOUT: %Core: <namespace> = namespace file.%Core.import, [concrete] {
  352. // CHECK:STDOUT: import Core//prelude
  353. // CHECK:STDOUT: import Core//prelude/...
  354. // CHECK:STDOUT: }
  355. // CHECK:STDOUT: }
  356. // CHECK:STDOUT:
  357. // CHECK:STDOUT: file {
  358. // CHECK:STDOUT: package: <namespace> = namespace [concrete] {
  359. // CHECK:STDOUT: .Core = imports.%Core
  360. // CHECK:STDOUT: .K1 = %K1.decl
  361. // CHECK:STDOUT: .Simple2 = %Simple2.decl
  362. // CHECK:STDOUT: .Compound2 = %Compound2.decl
  363. // CHECK:STDOUT: }
  364. // CHECK:STDOUT: %Core.import = import Core
  365. // CHECK:STDOUT: %K1.decl: type = interface_decl @K1 [concrete = constants.%K1.type] {} {}
  366. // CHECK:STDOUT: %Simple2.decl: %Simple2.type = fn_decl @Simple2 [concrete = constants.%Simple2] {
  367. // CHECK:STDOUT: %T.patt: %pattern_type = symbolic_binding_pattern T, 0 [concrete]
  368. // CHECK:STDOUT: } {
  369. // CHECK:STDOUT: %.loc8: type = splice_block %K1.ref [concrete = constants.%K1.type] {
  370. // CHECK:STDOUT: %.Self: %type = bind_symbolic_name .Self [symbolic_self = constants.%.Self]
  371. // CHECK:STDOUT: %K1.ref: type = name_ref K1, file.%K1.decl [concrete = constants.%K1.type]
  372. // CHECK:STDOUT: }
  373. // CHECK:STDOUT: %T.loc8_12.2: %K1.type = bind_symbolic_name T, 0 [symbolic = %T.loc8_12.1 (constants.%T)]
  374. // CHECK:STDOUT: }
  375. // CHECK:STDOUT: %Compound2.decl: %Compound2.type = fn_decl @Compound2 [concrete = constants.%Compound2] {
  376. // CHECK:STDOUT: %V.patt: %pattern_type = symbolic_binding_pattern V, 0 [concrete]
  377. // CHECK:STDOUT: } {
  378. // CHECK:STDOUT: %.loc13: type = splice_block %K1.ref.loc13 [concrete = constants.%K1.type] {
  379. // CHECK:STDOUT: %.Self: %type = bind_symbolic_name .Self [symbolic_self = constants.%.Self]
  380. // CHECK:STDOUT: %K1.ref.loc13: type = name_ref K1, file.%K1.decl [concrete = constants.%K1.type]
  381. // CHECK:STDOUT: }
  382. // CHECK:STDOUT: %V.loc13_14.2: %K1.type = bind_symbolic_name V, 0 [symbolic = %V.loc13_14.1 (constants.%V)]
  383. // CHECK:STDOUT: }
  384. // CHECK:STDOUT: }
  385. // CHECK:STDOUT:
  386. // CHECK:STDOUT: interface @K1 {
  387. // CHECK:STDOUT: %Self: %K1.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self]
  388. // CHECK:STDOUT: %K1.Q1.decl: %K1.Q1.type = fn_decl @K1.Q1 [concrete = constants.%K1.Q1] {} {}
  389. // CHECK:STDOUT: %assoc0: %K1.assoc_type = assoc_entity element0, %K1.Q1.decl [concrete = constants.%assoc0]
  390. // CHECK:STDOUT:
  391. // CHECK:STDOUT: !members:
  392. // CHECK:STDOUT: .Self = %Self
  393. // CHECK:STDOUT: .Q1 = %assoc0
  394. // CHECK:STDOUT: witness = (%K1.Q1.decl)
  395. // CHECK:STDOUT: }
  396. // CHECK:STDOUT:
  397. // CHECK:STDOUT: generic fn @K1.Q1(@K1.%Self: %K1.type) {
  398. // CHECK:STDOUT: fn();
  399. // CHECK:STDOUT: }
  400. // CHECK:STDOUT:
  401. // CHECK:STDOUT: generic fn @Simple2(%T.loc8_12.2: %K1.type) {
  402. // CHECK:STDOUT: %T.loc8_12.1: %K1.type = bind_symbolic_name T, 0 [symbolic = %T.loc8_12.1 (constants.%T)]
  403. // CHECK:STDOUT:
  404. // CHECK:STDOUT: !definition:
  405. // CHECK:STDOUT: %T.as_type.loc9_4.2: type = facet_access_type %T.loc8_12.1 [symbolic = %T.as_type.loc9_4.2 (constants.%T.as_type)]
  406. // CHECK:STDOUT: %K1.lookup_impl_witness: <witness> = lookup_impl_witness %T.loc8_12.1, @K1 [symbolic = %K1.lookup_impl_witness (constants.%K1.lookup_impl_witness.5aa361.1)]
  407. // CHECK:STDOUT: %K1.facet: %K1.type = facet_value %T.as_type.loc9_4.2, (%K1.lookup_impl_witness) [symbolic = %K1.facet (constants.%K1.facet.992bb7.1)]
  408. // CHECK:STDOUT: %.loc9_4.2: type = fn_type_with_self_type constants.%K1.Q1.type, %K1.facet [symbolic = %.loc9_4.2 (constants.%.17a596.1)]
  409. // CHECK:STDOUT: %impl.elem0.loc9_4.2: @Simple2.%.loc9_4.2 (%.17a596.1) = impl_witness_access %K1.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc9_4.2 (constants.%impl.elem0.2491f4.1)]
  410. // CHECK:STDOUT: %specific_impl_fn.loc9_4.2: <specific function> = specific_impl_function %impl.elem0.loc9_4.2, @K1.Q1(%K1.facet) [symbolic = %specific_impl_fn.loc9_4.2 (constants.%specific_impl_fn.4e92aa.1)]
  411. // CHECK:STDOUT:
  412. // CHECK:STDOUT: fn() {
  413. // CHECK:STDOUT: !entry:
  414. // CHECK:STDOUT: %T.ref: %K1.type = name_ref T, %T.loc8_12.2 [symbolic = %T.loc8_12.1 (constants.%T)]
  415. // CHECK:STDOUT: %Q1.ref: %K1.assoc_type = name_ref Q1, @K1.%assoc0 [concrete = constants.%assoc0]
  416. // CHECK:STDOUT: %T.as_type.loc9_4.1: type = facet_access_type %T.ref [symbolic = %T.as_type.loc9_4.2 (constants.%T.as_type)]
  417. // CHECK:STDOUT: %.loc9_4.1: type = converted %T.ref, %T.as_type.loc9_4.1 [symbolic = %T.as_type.loc9_4.2 (constants.%T.as_type)]
  418. // CHECK:STDOUT: %impl.elem0.loc9_4.1: @Simple2.%.loc9_4.2 (%.17a596.1) = impl_witness_access constants.%K1.lookup_impl_witness.5aa361.1, element0 [symbolic = %impl.elem0.loc9_4.2 (constants.%impl.elem0.2491f4.1)]
  419. // CHECK:STDOUT: %specific_impl_fn.loc9_4.1: <specific function> = specific_impl_function %impl.elem0.loc9_4.1, @K1.Q1(constants.%K1.facet.992bb7.1) [symbolic = %specific_impl_fn.loc9_4.2 (constants.%specific_impl_fn.4e92aa.1)]
  420. // CHECK:STDOUT: %.loc9_8: init %empty_tuple.type = call %specific_impl_fn.loc9_4.1()
  421. // CHECK:STDOUT: return
  422. // CHECK:STDOUT: }
  423. // CHECK:STDOUT: }
  424. // CHECK:STDOUT:
  425. // CHECK:STDOUT: generic fn @Compound2(%V.loc13_14.2: %K1.type) {
  426. // CHECK:STDOUT: %V.loc13_14.1: %K1.type = bind_symbolic_name V, 0 [symbolic = %V.loc13_14.1 (constants.%V)]
  427. // CHECK:STDOUT:
  428. // CHECK:STDOUT: !definition:
  429. // CHECK:STDOUT: %K1.lookup_impl_witness: <witness> = lookup_impl_witness %V.loc13_14.1, @K1 [symbolic = %K1.lookup_impl_witness (constants.%K1.lookup_impl_witness.5aa361.2)]
  430. // CHECK:STDOUT: %V.as_type: type = facet_access_type %V.loc13_14.1 [symbolic = %V.as_type (constants.%V.as_type)]
  431. // CHECK:STDOUT: %K1.facet: %K1.type = facet_value %V.as_type, (%K1.lookup_impl_witness) [symbolic = %K1.facet (constants.%K1.facet.992bb7.2)]
  432. // CHECK:STDOUT: %.loc14_4: type = fn_type_with_self_type constants.%K1.Q1.type, %K1.facet [symbolic = %.loc14_4 (constants.%.17a596.2)]
  433. // CHECK:STDOUT: %impl.elem0.loc14_4.2: @Compound2.%.loc14_4 (%.17a596.2) = impl_witness_access %K1.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc14_4.2 (constants.%impl.elem0.2491f4.2)]
  434. // CHECK:STDOUT: %specific_impl_fn.loc14_4.2: <specific function> = specific_impl_function %impl.elem0.loc14_4.2, @K1.Q1(%K1.facet) [symbolic = %specific_impl_fn.loc14_4.2 (constants.%specific_impl_fn.4e92aa.2)]
  435. // CHECK:STDOUT:
  436. // CHECK:STDOUT: fn() {
  437. // CHECK:STDOUT: !entry:
  438. // CHECK:STDOUT: %V.ref: %K1.type = name_ref V, %V.loc13_14.2 [symbolic = %V.loc13_14.1 (constants.%V)]
  439. // CHECK:STDOUT: %K1.ref.loc14: type = name_ref K1, file.%K1.decl [concrete = constants.%K1.type]
  440. // CHECK:STDOUT: %Q1.ref: %K1.assoc_type = name_ref Q1, @K1.%assoc0 [concrete = constants.%assoc0]
  441. // CHECK:STDOUT: %impl.elem0.loc14_4.1: @Compound2.%.loc14_4 (%.17a596.2) = impl_witness_access constants.%K1.lookup_impl_witness.5aa361.2, element0 [symbolic = %impl.elem0.loc14_4.2 (constants.%impl.elem0.2491f4.2)]
  442. // CHECK:STDOUT: %specific_impl_fn.loc14_4.1: <specific function> = specific_impl_function %impl.elem0.loc14_4.1, @K1.Q1(constants.%K1.facet.992bb7.2) [symbolic = %specific_impl_fn.loc14_4.2 (constants.%specific_impl_fn.4e92aa.2)]
  443. // CHECK:STDOUT: %.loc14_13: init %empty_tuple.type = call %specific_impl_fn.loc14_4.1()
  444. // CHECK:STDOUT: return
  445. // CHECK:STDOUT: }
  446. // CHECK:STDOUT: }
  447. // CHECK:STDOUT:
  448. // CHECK:STDOUT: specific @K1.Q1(constants.%Self) {}
  449. // CHECK:STDOUT:
  450. // CHECK:STDOUT: specific @Simple2(constants.%T) {
  451. // CHECK:STDOUT: %T.loc8_12.1 => constants.%T
  452. // CHECK:STDOUT: }
  453. // CHECK:STDOUT:
  454. // CHECK:STDOUT: specific @K1.Q1(constants.%K1.facet.992bb7.1) {}
  455. // CHECK:STDOUT:
  456. // CHECK:STDOUT: specific @Compound2(constants.%V) {
  457. // CHECK:STDOUT: %V.loc13_14.1 => constants.%V
  458. // CHECK:STDOUT: }
  459. // CHECK:STDOUT:
  460. // CHECK:STDOUT: specific @K1.Q1(constants.%K1.facet.992bb7.2) {}
  461. // CHECK:STDOUT:
  462. // CHECK:STDOUT: --- fail_caller_instance_interface_not.carbon
  463. // CHECK:STDOUT:
  464. // CHECK:STDOUT: constants {
  465. // CHECK:STDOUT: %K2.type: type = facet_type <@K2> [concrete]
  466. // CHECK:STDOUT: %Self.d82: %K2.type = bind_symbolic_name Self, 0 [symbolic]
  467. // CHECK:STDOUT: %K2.Q2.type: type = fn_type @K2.Q2 [concrete]
  468. // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete]
  469. // CHECK:STDOUT: %K2.Q2: %K2.Q2.type = struct_value () [concrete]
  470. // CHECK:STDOUT: %K2.assoc_type: type = assoc_entity_type @K2 [concrete]
  471. // CHECK:STDOUT: %assoc0.d67: %K2.assoc_type = assoc_entity element0, @K2.%K2.Q2.decl [concrete]
  472. // CHECK:STDOUT: %type: type = facet_type <type> [concrete]
  473. // CHECK:STDOUT: %.Self: %type = bind_symbolic_name .Self [symbolic_self]
  474. // CHECK:STDOUT: %T: %K2.type = bind_symbolic_name T, 0 [symbolic]
  475. // CHECK:STDOUT: %pattern_type.4d9: type = pattern_type %K2.type [concrete]
  476. // CHECK:STDOUT: %T.as_type: type = facet_access_type %T [symbolic]
  477. // CHECK:STDOUT: %pattern_type.0e3df3.1: type = pattern_type %T.as_type [symbolic]
  478. // CHECK:STDOUT: %Simple3.type: type = fn_type @Simple3 [concrete]
  479. // CHECK:STDOUT: %Simple3: %Simple3.type = struct_value () [concrete]
  480. // CHECK:STDOUT: %require_complete.c496eb.1: <witness> = require_complete_type %T.as_type [symbolic]
  481. // CHECK:STDOUT: %K2.lookup_impl_witness: <witness> = lookup_impl_witness %T, @K2 [symbolic]
  482. // CHECK:STDOUT: %K2.facet: %K2.type = facet_value %T.as_type, (%K2.lookup_impl_witness) [symbolic]
  483. // CHECK:STDOUT: %.f94: type = fn_type_with_self_type %K2.Q2.type, %K2.facet [symbolic]
  484. // CHECK:STDOUT: %impl.elem0: %.f94 = impl_witness_access %K2.lookup_impl_witness, element0 [symbolic]
  485. // CHECK:STDOUT: %specific_impl_fn: <specific function> = specific_impl_function %impl.elem0, @K2.Q2(%K2.facet) [symbolic]
  486. // CHECK:STDOUT: %V: %K2.type = bind_symbolic_name V, 0 [symbolic]
  487. // CHECK:STDOUT: %V.as_type: type = facet_access_type %V [symbolic]
  488. // CHECK:STDOUT: %pattern_type.0e3df3.2: type = pattern_type %V.as_type [symbolic]
  489. // CHECK:STDOUT: %Compound3.type: type = fn_type @Compound3 [concrete]
  490. // CHECK:STDOUT: %Compound3: %Compound3.type = struct_value () [concrete]
  491. // CHECK:STDOUT: %require_complete.c496eb.2: <witness> = require_complete_type %V.as_type [symbolic]
  492. // CHECK:STDOUT: %ImplicitAs.type.cc7: type = generic_interface_type @ImplicitAs [concrete]
  493. // CHECK:STDOUT: %ImplicitAs.generic: %ImplicitAs.type.cc7 = struct_value () [concrete]
  494. // CHECK:STDOUT: }
  495. // CHECK:STDOUT:
  496. // CHECK:STDOUT: imports {
  497. // CHECK:STDOUT: %Core: <namespace> = namespace file.%Core.import, [concrete] {
  498. // CHECK:STDOUT: .ImplicitAs = %Core.ImplicitAs
  499. // CHECK:STDOUT: import Core//prelude
  500. // CHECK:STDOUT: import Core//prelude/...
  501. // CHECK:STDOUT: }
  502. // CHECK:STDOUT: %Core.ImplicitAs: %ImplicitAs.type.cc7 = import_ref Core//prelude/parts/as, ImplicitAs, loaded [concrete = constants.%ImplicitAs.generic]
  503. // CHECK:STDOUT: }
  504. // CHECK:STDOUT:
  505. // CHECK:STDOUT: file {
  506. // CHECK:STDOUT: package: <namespace> = namespace [concrete] {
  507. // CHECK:STDOUT: .Core = imports.%Core
  508. // CHECK:STDOUT: .K2 = %K2.decl
  509. // CHECK:STDOUT: .Simple3 = %Simple3.decl
  510. // CHECK:STDOUT: .Compound3 = %Compound3.decl
  511. // CHECK:STDOUT: }
  512. // CHECK:STDOUT: %Core.import = import Core
  513. // CHECK:STDOUT: %K2.decl: type = interface_decl @K2 [concrete = constants.%K2.type] {} {}
  514. // CHECK:STDOUT: %Simple3.decl: %Simple3.type = fn_decl @Simple3 [concrete = constants.%Simple3] {
  515. // CHECK:STDOUT: %T.patt: %pattern_type.4d9 = symbolic_binding_pattern T, 0 [concrete]
  516. // CHECK:STDOUT: %x.patt: @Simple3.%pattern_type (%pattern_type.0e3df3.1) = binding_pattern x [concrete]
  517. // CHECK:STDOUT: %x.param_patt: @Simple3.%pattern_type (%pattern_type.0e3df3.1) = value_param_pattern %x.patt, call_param0 [concrete]
  518. // CHECK:STDOUT: } {
  519. // CHECK:STDOUT: %.loc8_16: type = splice_block %K2.ref [concrete = constants.%K2.type] {
  520. // CHECK:STDOUT: %.Self: %type = bind_symbolic_name .Self [symbolic_self = constants.%.Self]
  521. // CHECK:STDOUT: %K2.ref: type = name_ref K2, file.%K2.decl [concrete = constants.%K2.type]
  522. // CHECK:STDOUT: }
  523. // CHECK:STDOUT: %T.loc8_12.2: %K2.type = bind_symbolic_name T, 0 [symbolic = %T.loc8_12.1 (constants.%T)]
  524. // CHECK:STDOUT: %x.param: @Simple3.%T.as_type.loc8_23.1 (%T.as_type) = value_param call_param0
  525. // CHECK:STDOUT: %.loc8_23.1: type = splice_block %.loc8_23.2 [symbolic = %T.as_type.loc8_23.1 (constants.%T.as_type)] {
  526. // CHECK:STDOUT: %T.ref: %K2.type = name_ref T, %T.loc8_12.2 [symbolic = %T.loc8_12.1 (constants.%T)]
  527. // CHECK:STDOUT: %T.as_type.loc8_23.2: type = facet_access_type %T.ref [symbolic = %T.as_type.loc8_23.1 (constants.%T.as_type)]
  528. // CHECK:STDOUT: %.loc8_23.2: type = converted %T.ref, %T.as_type.loc8_23.2 [symbolic = %T.as_type.loc8_23.1 (constants.%T.as_type)]
  529. // CHECK:STDOUT: }
  530. // CHECK:STDOUT: %x: @Simple3.%T.as_type.loc8_23.1 (%T.as_type) = bind_name x, %x.param
  531. // CHECK:STDOUT: }
  532. // CHECK:STDOUT: %Compound3.decl: %Compound3.type = fn_decl @Compound3 [concrete = constants.%Compound3] {
  533. // CHECK:STDOUT: %V.patt: %pattern_type.4d9 = symbolic_binding_pattern V, 0 [concrete]
  534. // CHECK:STDOUT: %y.patt: @Compound3.%pattern_type (%pattern_type.0e3df3.2) = binding_pattern y [concrete]
  535. // CHECK:STDOUT: %y.param_patt: @Compound3.%pattern_type (%pattern_type.0e3df3.2) = value_param_pattern %y.patt, call_param0 [concrete]
  536. // CHECK:STDOUT: } {
  537. // CHECK:STDOUT: %.loc14_18: type = splice_block %K2.ref.loc14 [concrete = constants.%K2.type] {
  538. // CHECK:STDOUT: %.Self: %type = bind_symbolic_name .Self [symbolic_self = constants.%.Self]
  539. // CHECK:STDOUT: %K2.ref.loc14: type = name_ref K2, file.%K2.decl [concrete = constants.%K2.type]
  540. // CHECK:STDOUT: }
  541. // CHECK:STDOUT: %V.loc14_14.2: %K2.type = bind_symbolic_name V, 0 [symbolic = %V.loc14_14.1 (constants.%V)]
  542. // CHECK:STDOUT: %y.param: @Compound3.%V.as_type.loc14_25.1 (%V.as_type) = value_param call_param0
  543. // CHECK:STDOUT: %.loc14_25.1: type = splice_block %.loc14_25.2 [symbolic = %V.as_type.loc14_25.1 (constants.%V.as_type)] {
  544. // CHECK:STDOUT: %V.ref: %K2.type = name_ref V, %V.loc14_14.2 [symbolic = %V.loc14_14.1 (constants.%V)]
  545. // CHECK:STDOUT: %V.as_type.loc14_25.2: type = facet_access_type %V.ref [symbolic = %V.as_type.loc14_25.1 (constants.%V.as_type)]
  546. // CHECK:STDOUT: %.loc14_25.2: type = converted %V.ref, %V.as_type.loc14_25.2 [symbolic = %V.as_type.loc14_25.1 (constants.%V.as_type)]
  547. // CHECK:STDOUT: }
  548. // CHECK:STDOUT: %y: @Compound3.%V.as_type.loc14_25.1 (%V.as_type) = bind_name y, %y.param
  549. // CHECK:STDOUT: }
  550. // CHECK:STDOUT: }
  551. // CHECK:STDOUT:
  552. // CHECK:STDOUT: interface @K2 {
  553. // CHECK:STDOUT: %Self: %K2.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self.d82]
  554. // CHECK:STDOUT: %K2.Q2.decl: %K2.Q2.type = fn_decl @K2.Q2 [concrete = constants.%K2.Q2] {} {}
  555. // CHECK:STDOUT: %assoc0: %K2.assoc_type = assoc_entity element0, %K2.Q2.decl [concrete = constants.%assoc0.d67]
  556. // CHECK:STDOUT:
  557. // CHECK:STDOUT: !members:
  558. // CHECK:STDOUT: .Self = %Self
  559. // CHECK:STDOUT: .Q2 = %assoc0
  560. // CHECK:STDOUT: witness = (%K2.Q2.decl)
  561. // CHECK:STDOUT: }
  562. // CHECK:STDOUT:
  563. // CHECK:STDOUT: generic fn @K2.Q2(@K2.%Self: %K2.type) {
  564. // CHECK:STDOUT: fn();
  565. // CHECK:STDOUT: }
  566. // CHECK:STDOUT:
  567. // CHECK:STDOUT: generic fn @Simple3(%T.loc8_12.2: %K2.type) {
  568. // CHECK:STDOUT: %T.loc8_12.1: %K2.type = bind_symbolic_name T, 0 [symbolic = %T.loc8_12.1 (constants.%T)]
  569. // CHECK:STDOUT: %T.as_type.loc8_23.1: type = facet_access_type %T.loc8_12.1 [symbolic = %T.as_type.loc8_23.1 (constants.%T.as_type)]
  570. // CHECK:STDOUT: %pattern_type: type = pattern_type %T.as_type.loc8_23.1 [symbolic = %pattern_type (constants.%pattern_type.0e3df3.1)]
  571. // CHECK:STDOUT:
  572. // CHECK:STDOUT: !definition:
  573. // CHECK:STDOUT: %require_complete: <witness> = require_complete_type %T.as_type.loc8_23.1 [symbolic = %require_complete (constants.%require_complete.c496eb.1)]
  574. // CHECK:STDOUT: %K2.lookup_impl_witness: <witness> = lookup_impl_witness %T.loc8_12.1, @K2 [symbolic = %K2.lookup_impl_witness (constants.%K2.lookup_impl_witness)]
  575. // CHECK:STDOUT: %K2.facet: %K2.type = facet_value %T.as_type.loc8_23.1, (%K2.lookup_impl_witness) [symbolic = %K2.facet (constants.%K2.facet)]
  576. // CHECK:STDOUT: %.loc9_4.2: type = fn_type_with_self_type constants.%K2.Q2.type, %K2.facet [symbolic = %.loc9_4.2 (constants.%.f94)]
  577. // CHECK:STDOUT: %impl.elem0.loc9_4.2: @Simple3.%.loc9_4.2 (%.f94) = impl_witness_access %K2.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc9_4.2 (constants.%impl.elem0)]
  578. // CHECK:STDOUT: %specific_impl_fn.loc9_4.2: <specific function> = specific_impl_function %impl.elem0.loc9_4.2, @K2.Q2(%K2.facet) [symbolic = %specific_impl_fn.loc9_4.2 (constants.%specific_impl_fn)]
  579. // CHECK:STDOUT:
  580. // CHECK:STDOUT: fn(%x.param: @Simple3.%T.as_type.loc8_23.1 (%T.as_type)) {
  581. // CHECK:STDOUT: !entry:
  582. // CHECK:STDOUT: %x.ref: @Simple3.%T.as_type.loc8_23.1 (%T.as_type) = name_ref x, %x
  583. // CHECK:STDOUT: %Q2.ref: %K2.assoc_type = name_ref Q2, @K2.%assoc0 [concrete = constants.%assoc0.d67]
  584. // CHECK:STDOUT: %T.as_type.loc9: type = facet_access_type constants.%T [symbolic = %T.as_type.loc8_23.1 (constants.%T.as_type)]
  585. // CHECK:STDOUT: %.loc9_4.1: type = converted constants.%T, %T.as_type.loc9 [symbolic = %T.as_type.loc8_23.1 (constants.%T.as_type)]
  586. // CHECK:STDOUT: %impl.elem0.loc9_4.1: @Simple3.%.loc9_4.2 (%.f94) = impl_witness_access constants.%K2.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc9_4.2 (constants.%impl.elem0)]
  587. // CHECK:STDOUT: %specific_impl_fn.loc9_4.1: <specific function> = specific_impl_function %impl.elem0.loc9_4.1, @K2.Q2(constants.%K2.facet) [symbolic = %specific_impl_fn.loc9_4.2 (constants.%specific_impl_fn)]
  588. // CHECK:STDOUT: %.loc9_8: init %empty_tuple.type = call %specific_impl_fn.loc9_4.1()
  589. // CHECK:STDOUT: return
  590. // CHECK:STDOUT: }
  591. // CHECK:STDOUT: }
  592. // CHECK:STDOUT:
  593. // CHECK:STDOUT: generic fn @Compound3(%V.loc14_14.2: %K2.type) {
  594. // CHECK:STDOUT: %V.loc14_14.1: %K2.type = bind_symbolic_name V, 0 [symbolic = %V.loc14_14.1 (constants.%V)]
  595. // CHECK:STDOUT: %V.as_type.loc14_25.1: type = facet_access_type %V.loc14_14.1 [symbolic = %V.as_type.loc14_25.1 (constants.%V.as_type)]
  596. // CHECK:STDOUT: %pattern_type: type = pattern_type %V.as_type.loc14_25.1 [symbolic = %pattern_type (constants.%pattern_type.0e3df3.2)]
  597. // CHECK:STDOUT:
  598. // CHECK:STDOUT: !definition:
  599. // CHECK:STDOUT: %require_complete: <witness> = require_complete_type %V.as_type.loc14_25.1 [symbolic = %require_complete (constants.%require_complete.c496eb.2)]
  600. // CHECK:STDOUT:
  601. // CHECK:STDOUT: fn(%y.param: @Compound3.%V.as_type.loc14_25.1 (%V.as_type)) {
  602. // CHECK:STDOUT: !entry:
  603. // CHECK:STDOUT: %y.ref: @Compound3.%V.as_type.loc14_25.1 (%V.as_type) = name_ref y, %y
  604. // CHECK:STDOUT: %K2.ref.loc22: type = name_ref K2, file.%K2.decl [concrete = constants.%K2.type]
  605. // CHECK:STDOUT: %Q2.ref: %K2.assoc_type = name_ref Q2, @K2.%assoc0 [concrete = constants.%assoc0.d67]
  606. // CHECK:STDOUT: %.loc22: %K2.type = converted %y.ref, <error> [concrete = <error>]
  607. // CHECK:STDOUT: return
  608. // CHECK:STDOUT: }
  609. // CHECK:STDOUT: }
  610. // CHECK:STDOUT:
  611. // CHECK:STDOUT: specific @K2.Q2(constants.%Self.d82) {}
  612. // CHECK:STDOUT:
  613. // CHECK:STDOUT: specific @Simple3(constants.%T) {
  614. // CHECK:STDOUT: %T.loc8_12.1 => constants.%T
  615. // CHECK:STDOUT: %T.as_type.loc8_23.1 => constants.%T.as_type
  616. // CHECK:STDOUT: %pattern_type => constants.%pattern_type.0e3df3.1
  617. // CHECK:STDOUT: }
  618. // CHECK:STDOUT:
  619. // CHECK:STDOUT: specific @K2.Q2(constants.%K2.facet) {}
  620. // CHECK:STDOUT:
  621. // CHECK:STDOUT: specific @Compound3(constants.%V) {
  622. // CHECK:STDOUT: %V.loc14_14.1 => constants.%V
  623. // CHECK:STDOUT: %V.as_type.loc14_25.1 => constants.%V.as_type
  624. // CHECK:STDOUT: %pattern_type => constants.%pattern_type.0e3df3.2
  625. // CHECK:STDOUT: }
  626. // CHECK:STDOUT:
  627. // CHECK:STDOUT: --- instance.carbon
  628. // CHECK:STDOUT:
  629. // CHECK:STDOUT: constants {
  630. // CHECK:STDOUT: %L1.type: type = facet_type <@L1> [concrete]
  631. // CHECK:STDOUT: %Self: %L1.type = bind_symbolic_name Self, 0 [symbolic]
  632. // CHECK:STDOUT: %Self.as_type: type = facet_access_type %Self [symbolic]
  633. // CHECK:STDOUT: %pattern_type.b73027.1: type = pattern_type %Self.as_type [symbolic]
  634. // CHECK:STDOUT: %L1.R1.type: type = fn_type @L1.R1 [concrete]
  635. // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete]
  636. // CHECK:STDOUT: %L1.R1: %L1.R1.type = struct_value () [concrete]
  637. // CHECK:STDOUT: %L1.assoc_type: type = assoc_entity_type @L1 [concrete]
  638. // CHECK:STDOUT: %assoc0: %L1.assoc_type = assoc_entity element0, @L1.%L1.R1.decl [concrete]
  639. // CHECK:STDOUT: %ptr.be473c.1: type = ptr_type %Self.as_type [symbolic]
  640. // CHECK:STDOUT: %pattern_type.c147e0.1: type = pattern_type %ptr.be473c.1 [symbolic]
  641. // CHECK:STDOUT: %pattern_type.f6d: type = pattern_type auto [concrete]
  642. // CHECK:STDOUT: %L1.S1.type: type = fn_type @L1.S1 [concrete]
  643. // CHECK:STDOUT: %L1.S1: %L1.S1.type = struct_value () [concrete]
  644. // CHECK:STDOUT: %assoc1: %L1.assoc_type = assoc_entity element1, @L1.%L1.S1.decl [concrete]
  645. // CHECK:STDOUT: %type: type = facet_type <type> [concrete]
  646. // CHECK:STDOUT: %.Self: %type = bind_symbolic_name .Self [symbolic_self]
  647. // CHECK:STDOUT: %T: %L1.type = bind_symbolic_name T, 0 [symbolic]
  648. // CHECK:STDOUT: %pattern_type.e3e: type = pattern_type %L1.type [concrete]
  649. // CHECK:STDOUT: %T.as_type: type = facet_access_type %T [symbolic]
  650. // CHECK:STDOUT: %pattern_type.b73027.2: type = pattern_type %T.as_type [symbolic]
  651. // CHECK:STDOUT: %ptr.be473c.2: type = ptr_type %T.as_type [symbolic]
  652. // CHECK:STDOUT: %pattern_type.c147e0.2: type = pattern_type %ptr.be473c.2 [symbolic]
  653. // CHECK:STDOUT: %Simple4.type: type = fn_type @Simple4 [concrete]
  654. // CHECK:STDOUT: %Simple4: %Simple4.type = struct_value () [concrete]
  655. // CHECK:STDOUT: %require_complete.7cc52f.1: <witness> = require_complete_type %T.as_type [symbolic]
  656. // CHECK:STDOUT: %require_complete.b75e15.1: <witness> = require_complete_type %ptr.be473c.2 [symbolic]
  657. // CHECK:STDOUT: %L1.lookup_impl_witness.771a6e.1: <witness> = lookup_impl_witness %T, @L1 [symbolic]
  658. // CHECK:STDOUT: %L1.facet.6a0270.1: %L1.type = facet_value %T.as_type, (%L1.lookup_impl_witness.771a6e.1) [symbolic]
  659. // CHECK:STDOUT: %.fd3043.1: type = fn_type_with_self_type %L1.R1.type, %L1.facet.6a0270.1 [symbolic]
  660. // CHECK:STDOUT: %impl.elem0.eb2432.1: %.fd3043.1 = impl_witness_access %L1.lookup_impl_witness.771a6e.1, element0 [symbolic]
  661. // CHECK:STDOUT: %specific_impl_fn.3f1bf1.1: <specific function> = specific_impl_function %impl.elem0.eb2432.1, @L1.R1(%L1.facet.6a0270.1) [symbolic]
  662. // CHECK:STDOUT: %.d0547b.1: type = fn_type_with_self_type %L1.S1.type, %L1.facet.6a0270.1 [symbolic]
  663. // CHECK:STDOUT: %impl.elem1.d9ff45.1: %.d0547b.1 = impl_witness_access %L1.lookup_impl_witness.771a6e.1, element1 [symbolic]
  664. // CHECK:STDOUT: %specific_impl_fn.9be07e.1: <specific function> = specific_impl_function %impl.elem1.d9ff45.1, @L1.S1(%L1.facet.6a0270.1) [symbolic]
  665. // CHECK:STDOUT: %V: %L1.type = bind_symbolic_name V, 0 [symbolic]
  666. // CHECK:STDOUT: %V.as_type: type = facet_access_type %V [symbolic]
  667. // CHECK:STDOUT: %pattern_type.b73027.3: type = pattern_type %V.as_type [symbolic]
  668. // CHECK:STDOUT: %ptr.be473c.3: type = ptr_type %V.as_type [symbolic]
  669. // CHECK:STDOUT: %pattern_type.c147e0.3: type = pattern_type %ptr.be473c.3 [symbolic]
  670. // CHECK:STDOUT: %Compound4.type: type = fn_type @Compound4 [concrete]
  671. // CHECK:STDOUT: %Compound4: %Compound4.type = struct_value () [concrete]
  672. // CHECK:STDOUT: %require_complete.7cc52f.2: <witness> = require_complete_type %V.as_type [symbolic]
  673. // CHECK:STDOUT: %require_complete.b75e15.2: <witness> = require_complete_type %ptr.be473c.3 [symbolic]
  674. // CHECK:STDOUT: %L1.lookup_impl_witness.771a6e.2: <witness> = lookup_impl_witness %V, @L1 [symbolic]
  675. // CHECK:STDOUT: %L1.facet.6a0270.2: %L1.type = facet_value %V.as_type, (%L1.lookup_impl_witness.771a6e.2) [symbolic]
  676. // CHECK:STDOUT: %.fd3043.2: type = fn_type_with_self_type %L1.R1.type, %L1.facet.6a0270.2 [symbolic]
  677. // CHECK:STDOUT: %impl.elem0.eb2432.2: %.fd3043.2 = impl_witness_access %L1.lookup_impl_witness.771a6e.2, element0 [symbolic]
  678. // CHECK:STDOUT: %specific_impl_fn.3f1bf1.2: <specific function> = specific_impl_function %impl.elem0.eb2432.2, @L1.R1(%L1.facet.6a0270.2) [symbolic]
  679. // CHECK:STDOUT: %.d0547b.2: type = fn_type_with_self_type %L1.S1.type, %L1.facet.6a0270.2 [symbolic]
  680. // CHECK:STDOUT: %impl.elem1.d9ff45.2: %.d0547b.2 = impl_witness_access %L1.lookup_impl_witness.771a6e.2, element1 [symbolic]
  681. // CHECK:STDOUT: %specific_impl_fn.9be07e.2: <specific function> = specific_impl_function %impl.elem1.d9ff45.2, @L1.S1(%L1.facet.6a0270.2) [symbolic]
  682. // CHECK:STDOUT: }
  683. // CHECK:STDOUT:
  684. // CHECK:STDOUT: imports {
  685. // CHECK:STDOUT: %Core: <namespace> = namespace file.%Core.import, [concrete] {
  686. // CHECK:STDOUT: import Core//prelude
  687. // CHECK:STDOUT: import Core//prelude/...
  688. // CHECK:STDOUT: }
  689. // CHECK:STDOUT: }
  690. // CHECK:STDOUT:
  691. // CHECK:STDOUT: file {
  692. // CHECK:STDOUT: package: <namespace> = namespace [concrete] {
  693. // CHECK:STDOUT: .Core = imports.%Core
  694. // CHECK:STDOUT: .L1 = %L1.decl
  695. // CHECK:STDOUT: .Simple4 = %Simple4.decl
  696. // CHECK:STDOUT: .Compound4 = %Compound4.decl
  697. // CHECK:STDOUT: }
  698. // CHECK:STDOUT: %Core.import = import Core
  699. // CHECK:STDOUT: %L1.decl: type = interface_decl @L1 [concrete = constants.%L1.type] {} {}
  700. // CHECK:STDOUT: %Simple4.decl: %Simple4.type = fn_decl @Simple4 [concrete = constants.%Simple4] {
  701. // CHECK:STDOUT: %T.patt: %pattern_type.e3e = symbolic_binding_pattern T, 0 [concrete]
  702. // CHECK:STDOUT: %x.patt: @Simple4.%pattern_type.loc9_20 (%pattern_type.b73027.2) = binding_pattern x [concrete]
  703. // CHECK:STDOUT: %x.param_patt: @Simple4.%pattern_type.loc9_20 (%pattern_type.b73027.2) = value_param_pattern %x.patt, call_param0 [concrete]
  704. // CHECK:STDOUT: %p.patt: @Simple4.%pattern_type.loc9_26 (%pattern_type.c147e0.2) = binding_pattern p [concrete]
  705. // CHECK:STDOUT: %p.param_patt: @Simple4.%pattern_type.loc9_26 (%pattern_type.c147e0.2) = value_param_pattern %p.patt, call_param1 [concrete]
  706. // CHECK:STDOUT: } {
  707. // CHECK:STDOUT: %.loc9_16: type = splice_block %L1.ref [concrete = constants.%L1.type] {
  708. // CHECK:STDOUT: %.Self: %type = bind_symbolic_name .Self [symbolic_self = constants.%.Self]
  709. // CHECK:STDOUT: %L1.ref: type = name_ref L1, file.%L1.decl [concrete = constants.%L1.type]
  710. // CHECK:STDOUT: }
  711. // CHECK:STDOUT: %T.loc9_12.2: %L1.type = bind_symbolic_name T, 0 [symbolic = %T.loc9_12.1 (constants.%T)]
  712. // CHECK:STDOUT: %x.param: @Simple4.%T.as_type.loc9_23.1 (%T.as_type) = value_param call_param0
  713. // CHECK:STDOUT: %.loc9_23.1: type = splice_block %.loc9_23.2 [symbolic = %T.as_type.loc9_23.1 (constants.%T.as_type)] {
  714. // CHECK:STDOUT: %T.ref.loc9_23: %L1.type = name_ref T, %T.loc9_12.2 [symbolic = %T.loc9_12.1 (constants.%T)]
  715. // CHECK:STDOUT: %T.as_type.loc9_23.2: type = facet_access_type %T.ref.loc9_23 [symbolic = %T.as_type.loc9_23.1 (constants.%T.as_type)]
  716. // CHECK:STDOUT: %.loc9_23.2: type = converted %T.ref.loc9_23, %T.as_type.loc9_23.2 [symbolic = %T.as_type.loc9_23.1 (constants.%T.as_type)]
  717. // CHECK:STDOUT: }
  718. // CHECK:STDOUT: %x: @Simple4.%T.as_type.loc9_23.1 (%T.as_type) = bind_name x, %x.param
  719. // CHECK:STDOUT: %p.param: @Simple4.%ptr.loc9_30.1 (%ptr.be473c.2) = value_param call_param1
  720. // CHECK:STDOUT: %.loc9_30.1: type = splice_block %ptr.loc9_30.2 [symbolic = %ptr.loc9_30.1 (constants.%ptr.be473c.2)] {
  721. // CHECK:STDOUT: %T.ref.loc9_29: %L1.type = name_ref T, %T.loc9_12.2 [symbolic = %T.loc9_12.1 (constants.%T)]
  722. // CHECK:STDOUT: %T.as_type.loc9_30: type = facet_access_type %T.ref.loc9_29 [symbolic = %T.as_type.loc9_23.1 (constants.%T.as_type)]
  723. // CHECK:STDOUT: %.loc9_30.2: type = converted %T.ref.loc9_29, %T.as_type.loc9_30 [symbolic = %T.as_type.loc9_23.1 (constants.%T.as_type)]
  724. // CHECK:STDOUT: %ptr.loc9_30.2: type = ptr_type %.loc9_30.2 [symbolic = %ptr.loc9_30.1 (constants.%ptr.be473c.2)]
  725. // CHECK:STDOUT: }
  726. // CHECK:STDOUT: %p: @Simple4.%ptr.loc9_30.1 (%ptr.be473c.2) = bind_name p, %p.param
  727. // CHECK:STDOUT: }
  728. // CHECK:STDOUT: %Compound4.decl: %Compound4.type = fn_decl @Compound4 [concrete = constants.%Compound4] {
  729. // CHECK:STDOUT: %V.patt: %pattern_type.e3e = symbolic_binding_pattern V, 0 [concrete]
  730. // CHECK:STDOUT: %y.patt: @Compound4.%pattern_type.loc15_22 (%pattern_type.b73027.3) = binding_pattern y [concrete]
  731. // CHECK:STDOUT: %y.param_patt: @Compound4.%pattern_type.loc15_22 (%pattern_type.b73027.3) = value_param_pattern %y.patt, call_param0 [concrete]
  732. // CHECK:STDOUT: %p.patt: @Compound4.%pattern_type.loc15_28 (%pattern_type.c147e0.3) = binding_pattern p [concrete]
  733. // CHECK:STDOUT: %p.param_patt: @Compound4.%pattern_type.loc15_28 (%pattern_type.c147e0.3) = value_param_pattern %p.patt, call_param1 [concrete]
  734. // CHECK:STDOUT: } {
  735. // CHECK:STDOUT: %.loc15_18: type = splice_block %L1.ref.loc15 [concrete = constants.%L1.type] {
  736. // CHECK:STDOUT: %.Self: %type = bind_symbolic_name .Self [symbolic_self = constants.%.Self]
  737. // CHECK:STDOUT: %L1.ref.loc15: type = name_ref L1, file.%L1.decl [concrete = constants.%L1.type]
  738. // CHECK:STDOUT: }
  739. // CHECK:STDOUT: %V.loc15_14.2: %L1.type = bind_symbolic_name V, 0 [symbolic = %V.loc15_14.1 (constants.%V)]
  740. // CHECK:STDOUT: %y.param: @Compound4.%V.as_type.loc15_25.1 (%V.as_type) = value_param call_param0
  741. // CHECK:STDOUT: %.loc15_25.1: type = splice_block %.loc15_25.2 [symbolic = %V.as_type.loc15_25.1 (constants.%V.as_type)] {
  742. // CHECK:STDOUT: %V.ref.loc15_25: %L1.type = name_ref V, %V.loc15_14.2 [symbolic = %V.loc15_14.1 (constants.%V)]
  743. // CHECK:STDOUT: %V.as_type.loc15_25.2: type = facet_access_type %V.ref.loc15_25 [symbolic = %V.as_type.loc15_25.1 (constants.%V.as_type)]
  744. // CHECK:STDOUT: %.loc15_25.2: type = converted %V.ref.loc15_25, %V.as_type.loc15_25.2 [symbolic = %V.as_type.loc15_25.1 (constants.%V.as_type)]
  745. // CHECK:STDOUT: }
  746. // CHECK:STDOUT: %y: @Compound4.%V.as_type.loc15_25.1 (%V.as_type) = bind_name y, %y.param
  747. // CHECK:STDOUT: %p.param: @Compound4.%ptr.loc15_32.1 (%ptr.be473c.3) = value_param call_param1
  748. // CHECK:STDOUT: %.loc15_32.1: type = splice_block %ptr.loc15_32.2 [symbolic = %ptr.loc15_32.1 (constants.%ptr.be473c.3)] {
  749. // CHECK:STDOUT: %V.ref.loc15_31: %L1.type = name_ref V, %V.loc15_14.2 [symbolic = %V.loc15_14.1 (constants.%V)]
  750. // CHECK:STDOUT: %V.as_type.loc15_32: type = facet_access_type %V.ref.loc15_31 [symbolic = %V.as_type.loc15_25.1 (constants.%V.as_type)]
  751. // CHECK:STDOUT: %.loc15_32.2: type = converted %V.ref.loc15_31, %V.as_type.loc15_32 [symbolic = %V.as_type.loc15_25.1 (constants.%V.as_type)]
  752. // CHECK:STDOUT: %ptr.loc15_32.2: type = ptr_type %.loc15_32.2 [symbolic = %ptr.loc15_32.1 (constants.%ptr.be473c.3)]
  753. // CHECK:STDOUT: }
  754. // CHECK:STDOUT: %p: @Compound4.%ptr.loc15_32.1 (%ptr.be473c.3) = bind_name p, %p.param
  755. // CHECK:STDOUT: }
  756. // CHECK:STDOUT: }
  757. // CHECK:STDOUT:
  758. // CHECK:STDOUT: interface @L1 {
  759. // CHECK:STDOUT: %Self: %L1.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self]
  760. // CHECK:STDOUT: %L1.R1.decl: %L1.R1.type = fn_decl @L1.R1 [concrete = constants.%L1.R1] {
  761. // CHECK:STDOUT: %self.patt: @L1.R1.%pattern_type (%pattern_type.b73027.1) = binding_pattern self [concrete]
  762. // CHECK:STDOUT: %self.param_patt: @L1.R1.%pattern_type (%pattern_type.b73027.1) = value_param_pattern %self.patt, call_param0 [concrete]
  763. // CHECK:STDOUT: } {
  764. // CHECK:STDOUT: %self.param: @L1.R1.%Self.as_type.loc4_15.1 (%Self.as_type) = value_param call_param0
  765. // CHECK:STDOUT: %.loc4_15.1: type = splice_block %.loc4_15.2 [symbolic = %Self.as_type.loc4_15.1 (constants.%Self.as_type)] {
  766. // CHECK:STDOUT: %Self.ref: %L1.type = name_ref Self, @L1.%Self [symbolic = %Self (constants.%Self)]
  767. // CHECK:STDOUT: %Self.as_type.loc4_15.2: type = facet_access_type %Self.ref [symbolic = %Self.as_type.loc4_15.1 (constants.%Self.as_type)]
  768. // CHECK:STDOUT: %.loc4_15.2: type = converted %Self.ref, %Self.as_type.loc4_15.2 [symbolic = %Self.as_type.loc4_15.1 (constants.%Self.as_type)]
  769. // CHECK:STDOUT: }
  770. // CHECK:STDOUT: %self: @L1.R1.%Self.as_type.loc4_15.1 (%Self.as_type) = bind_name self, %self.param
  771. // CHECK:STDOUT: }
  772. // CHECK:STDOUT: %assoc0: %L1.assoc_type = assoc_entity element0, %L1.R1.decl [concrete = constants.%assoc0]
  773. // CHECK:STDOUT: %L1.S1.decl: %L1.S1.type = fn_decl @L1.S1 [concrete = constants.%L1.S1] {
  774. // CHECK:STDOUT: %self.patt: @L1.S1.%pattern_type (%pattern_type.c147e0.1) = binding_pattern self [concrete]
  775. // CHECK:STDOUT: %self.param_patt: @L1.S1.%pattern_type (%pattern_type.c147e0.1) = value_param_pattern %self.patt, call_param0 [concrete]
  776. // CHECK:STDOUT: %.loc5_9: %pattern_type.f6d = addr_pattern %self.param_patt [concrete]
  777. // CHECK:STDOUT: } {
  778. // CHECK:STDOUT: %self.param: @L1.S1.%ptr.loc5_24.1 (%ptr.be473c.1) = value_param call_param0
  779. // CHECK:STDOUT: %.loc5_24.1: type = splice_block %ptr.loc5_24.2 [symbolic = %ptr.loc5_24.1 (constants.%ptr.be473c.1)] {
  780. // CHECK:STDOUT: %Self.ref: %L1.type = name_ref Self, @L1.%Self [symbolic = %Self (constants.%Self)]
  781. // CHECK:STDOUT: %Self.as_type.loc5_24.2: type = facet_access_type %Self.ref [symbolic = %Self.as_type.loc5_24.1 (constants.%Self.as_type)]
  782. // CHECK:STDOUT: %.loc5_24.2: type = converted %Self.ref, %Self.as_type.loc5_24.2 [symbolic = %Self.as_type.loc5_24.1 (constants.%Self.as_type)]
  783. // CHECK:STDOUT: %ptr.loc5_24.2: type = ptr_type %.loc5_24.2 [symbolic = %ptr.loc5_24.1 (constants.%ptr.be473c.1)]
  784. // CHECK:STDOUT: }
  785. // CHECK:STDOUT: %self: @L1.S1.%ptr.loc5_24.1 (%ptr.be473c.1) = bind_name self, %self.param
  786. // CHECK:STDOUT: }
  787. // CHECK:STDOUT: %assoc1: %L1.assoc_type = assoc_entity element1, %L1.S1.decl [concrete = constants.%assoc1]
  788. // CHECK:STDOUT:
  789. // CHECK:STDOUT: !members:
  790. // CHECK:STDOUT: .Self = %Self
  791. // CHECK:STDOUT: .R1 = %assoc0
  792. // CHECK:STDOUT: .S1 = %assoc1
  793. // CHECK:STDOUT: witness = (%L1.R1.decl, %L1.S1.decl)
  794. // CHECK:STDOUT: }
  795. // CHECK:STDOUT:
  796. // CHECK:STDOUT: generic fn @L1.R1(@L1.%Self: %L1.type) {
  797. // CHECK:STDOUT: %Self: %L1.type = bind_symbolic_name Self, 0 [symbolic = %Self (constants.%Self)]
  798. // CHECK:STDOUT: %Self.as_type.loc4_15.1: type = facet_access_type %Self [symbolic = %Self.as_type.loc4_15.1 (constants.%Self.as_type)]
  799. // CHECK:STDOUT: %pattern_type: type = pattern_type %Self.as_type.loc4_15.1 [symbolic = %pattern_type (constants.%pattern_type.b73027.1)]
  800. // CHECK:STDOUT:
  801. // CHECK:STDOUT: fn(%self.param: @L1.R1.%Self.as_type.loc4_15.1 (%Self.as_type));
  802. // CHECK:STDOUT: }
  803. // CHECK:STDOUT:
  804. // CHECK:STDOUT: generic fn @L1.S1(@L1.%Self: %L1.type) {
  805. // CHECK:STDOUT: %Self: %L1.type = bind_symbolic_name Self, 0 [symbolic = %Self (constants.%Self)]
  806. // CHECK:STDOUT: %Self.as_type.loc5_24.1: type = facet_access_type %Self [symbolic = %Self.as_type.loc5_24.1 (constants.%Self.as_type)]
  807. // CHECK:STDOUT: %ptr.loc5_24.1: type = ptr_type %Self.as_type.loc5_24.1 [symbolic = %ptr.loc5_24.1 (constants.%ptr.be473c.1)]
  808. // CHECK:STDOUT: %pattern_type: type = pattern_type %ptr.loc5_24.1 [symbolic = %pattern_type (constants.%pattern_type.c147e0.1)]
  809. // CHECK:STDOUT:
  810. // CHECK:STDOUT: fn(%self.param: @L1.S1.%ptr.loc5_24.1 (%ptr.be473c.1));
  811. // CHECK:STDOUT: }
  812. // CHECK:STDOUT:
  813. // CHECK:STDOUT: generic fn @Simple4(%T.loc9_12.2: %L1.type) {
  814. // CHECK:STDOUT: %T.loc9_12.1: %L1.type = bind_symbolic_name T, 0 [symbolic = %T.loc9_12.1 (constants.%T)]
  815. // CHECK:STDOUT: %T.as_type.loc9_23.1: type = facet_access_type %T.loc9_12.1 [symbolic = %T.as_type.loc9_23.1 (constants.%T.as_type)]
  816. // CHECK:STDOUT: %pattern_type.loc9_20: type = pattern_type %T.as_type.loc9_23.1 [symbolic = %pattern_type.loc9_20 (constants.%pattern_type.b73027.2)]
  817. // CHECK:STDOUT: %ptr.loc9_30.1: type = ptr_type %T.as_type.loc9_23.1 [symbolic = %ptr.loc9_30.1 (constants.%ptr.be473c.2)]
  818. // CHECK:STDOUT: %pattern_type.loc9_26: type = pattern_type %ptr.loc9_30.1 [symbolic = %pattern_type.loc9_26 (constants.%pattern_type.c147e0.2)]
  819. // CHECK:STDOUT:
  820. // CHECK:STDOUT: !definition:
  821. // CHECK:STDOUT: %require_complete.loc9_21: <witness> = require_complete_type %T.as_type.loc9_23.1 [symbolic = %require_complete.loc9_21 (constants.%require_complete.7cc52f.1)]
  822. // CHECK:STDOUT: %require_complete.loc9_27: <witness> = require_complete_type %ptr.loc9_30.1 [symbolic = %require_complete.loc9_27 (constants.%require_complete.b75e15.1)]
  823. // CHECK:STDOUT: %L1.lookup_impl_witness: <witness> = lookup_impl_witness %T.loc9_12.1, @L1 [symbolic = %L1.lookup_impl_witness (constants.%L1.lookup_impl_witness.771a6e.1)]
  824. // CHECK:STDOUT: %L1.facet: %L1.type = facet_value %T.as_type.loc9_23.1, (%L1.lookup_impl_witness) [symbolic = %L1.facet (constants.%L1.facet.6a0270.1)]
  825. // CHECK:STDOUT: %.loc10_4.2: type = fn_type_with_self_type constants.%L1.R1.type, %L1.facet [symbolic = %.loc10_4.2 (constants.%.fd3043.1)]
  826. // CHECK:STDOUT: %impl.elem0.loc10_4.2: @Simple4.%.loc10_4.2 (%.fd3043.1) = impl_witness_access %L1.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc10_4.2 (constants.%impl.elem0.eb2432.1)]
  827. // CHECK:STDOUT: %specific_impl_fn.loc10_4.2: <specific function> = specific_impl_function %impl.elem0.loc10_4.2, @L1.R1(%L1.facet) [symbolic = %specific_impl_fn.loc10_4.2 (constants.%specific_impl_fn.3f1bf1.1)]
  828. // CHECK:STDOUT: %.loc11_4.3: type = fn_type_with_self_type constants.%L1.S1.type, %L1.facet [symbolic = %.loc11_4.3 (constants.%.d0547b.1)]
  829. // CHECK:STDOUT: %impl.elem1.loc11_4.2: @Simple4.%.loc11_4.3 (%.d0547b.1) = impl_witness_access %L1.lookup_impl_witness, element1 [symbolic = %impl.elem1.loc11_4.2 (constants.%impl.elem1.d9ff45.1)]
  830. // CHECK:STDOUT: %specific_impl_fn.loc11_4.2: <specific function> = specific_impl_function %impl.elem1.loc11_4.2, @L1.S1(%L1.facet) [symbolic = %specific_impl_fn.loc11_4.2 (constants.%specific_impl_fn.9be07e.1)]
  831. // CHECK:STDOUT:
  832. // CHECK:STDOUT: fn(%x.param: @Simple4.%T.as_type.loc9_23.1 (%T.as_type), %p.param: @Simple4.%ptr.loc9_30.1 (%ptr.be473c.2)) {
  833. // CHECK:STDOUT: !entry:
  834. // CHECK:STDOUT: %x.ref: @Simple4.%T.as_type.loc9_23.1 (%T.as_type) = name_ref x, %x
  835. // CHECK:STDOUT: %R1.ref: %L1.assoc_type = name_ref R1, @L1.%assoc0 [concrete = constants.%assoc0]
  836. // CHECK:STDOUT: %T.as_type.loc10: type = facet_access_type constants.%T [symbolic = %T.as_type.loc9_23.1 (constants.%T.as_type)]
  837. // CHECK:STDOUT: %.loc10_4.1: type = converted constants.%T, %T.as_type.loc10 [symbolic = %T.as_type.loc9_23.1 (constants.%T.as_type)]
  838. // CHECK:STDOUT: %impl.elem0.loc10_4.1: @Simple4.%.loc10_4.2 (%.fd3043.1) = impl_witness_access constants.%L1.lookup_impl_witness.771a6e.1, element0 [symbolic = %impl.elem0.loc10_4.2 (constants.%impl.elem0.eb2432.1)]
  839. // CHECK:STDOUT: %bound_method.loc10_4: <bound method> = bound_method %x.ref, %impl.elem0.loc10_4.1
  840. // CHECK:STDOUT: %specific_impl_fn.loc10_4.1: <specific function> = specific_impl_function %impl.elem0.loc10_4.1, @L1.R1(constants.%L1.facet.6a0270.1) [symbolic = %specific_impl_fn.loc10_4.2 (constants.%specific_impl_fn.3f1bf1.1)]
  841. // CHECK:STDOUT: %bound_method.loc10_8: <bound method> = bound_method %x.ref, %specific_impl_fn.loc10_4.1
  842. // CHECK:STDOUT: %.loc10_8: init %empty_tuple.type = call %bound_method.loc10_8(%x.ref)
  843. // CHECK:STDOUT: %p.ref: @Simple4.%ptr.loc9_30.1 (%ptr.be473c.2) = name_ref p, %p
  844. // CHECK:STDOUT: %.loc11_4.1: ref @Simple4.%T.as_type.loc9_23.1 (%T.as_type) = deref %p.ref
  845. // CHECK:STDOUT: %S1.ref: %L1.assoc_type = name_ref S1, @L1.%assoc1 [concrete = constants.%assoc1]
  846. // CHECK:STDOUT: %T.as_type.loc11: type = facet_access_type constants.%T [symbolic = %T.as_type.loc9_23.1 (constants.%T.as_type)]
  847. // CHECK:STDOUT: %.loc11_4.2: type = converted constants.%T, %T.as_type.loc11 [symbolic = %T.as_type.loc9_23.1 (constants.%T.as_type)]
  848. // CHECK:STDOUT: %impl.elem1.loc11_4.1: @Simple4.%.loc11_4.3 (%.d0547b.1) = impl_witness_access constants.%L1.lookup_impl_witness.771a6e.1, element1 [symbolic = %impl.elem1.loc11_4.2 (constants.%impl.elem1.d9ff45.1)]
  849. // CHECK:STDOUT: %bound_method.loc11_4: <bound method> = bound_method %.loc11_4.1, %impl.elem1.loc11_4.1
  850. // CHECK:STDOUT: %specific_impl_fn.loc11_4.1: <specific function> = specific_impl_function %impl.elem1.loc11_4.1, @L1.S1(constants.%L1.facet.6a0270.1) [symbolic = %specific_impl_fn.loc11_4.2 (constants.%specific_impl_fn.9be07e.1)]
  851. // CHECK:STDOUT: %bound_method.loc11_9: <bound method> = bound_method %.loc11_4.1, %specific_impl_fn.loc11_4.1
  852. // CHECK:STDOUT: %addr: @Simple4.%ptr.loc9_30.1 (%ptr.be473c.2) = addr_of %.loc11_4.1
  853. // CHECK:STDOUT: %.loc11_9: init %empty_tuple.type = call %bound_method.loc11_9(%addr)
  854. // CHECK:STDOUT: return
  855. // CHECK:STDOUT: }
  856. // CHECK:STDOUT: }
  857. // CHECK:STDOUT:
  858. // CHECK:STDOUT: generic fn @Compound4(%V.loc15_14.2: %L1.type) {
  859. // CHECK:STDOUT: %V.loc15_14.1: %L1.type = bind_symbolic_name V, 0 [symbolic = %V.loc15_14.1 (constants.%V)]
  860. // CHECK:STDOUT: %V.as_type.loc15_25.1: type = facet_access_type %V.loc15_14.1 [symbolic = %V.as_type.loc15_25.1 (constants.%V.as_type)]
  861. // CHECK:STDOUT: %pattern_type.loc15_22: type = pattern_type %V.as_type.loc15_25.1 [symbolic = %pattern_type.loc15_22 (constants.%pattern_type.b73027.3)]
  862. // CHECK:STDOUT: %ptr.loc15_32.1: type = ptr_type %V.as_type.loc15_25.1 [symbolic = %ptr.loc15_32.1 (constants.%ptr.be473c.3)]
  863. // CHECK:STDOUT: %pattern_type.loc15_28: type = pattern_type %ptr.loc15_32.1 [symbolic = %pattern_type.loc15_28 (constants.%pattern_type.c147e0.3)]
  864. // CHECK:STDOUT:
  865. // CHECK:STDOUT: !definition:
  866. // CHECK:STDOUT: %require_complete.loc15_23: <witness> = require_complete_type %V.as_type.loc15_25.1 [symbolic = %require_complete.loc15_23 (constants.%require_complete.7cc52f.2)]
  867. // CHECK:STDOUT: %require_complete.loc15_29: <witness> = require_complete_type %ptr.loc15_32.1 [symbolic = %require_complete.loc15_29 (constants.%require_complete.b75e15.2)]
  868. // CHECK:STDOUT: %L1.lookup_impl_witness: <witness> = lookup_impl_witness %V.loc15_14.1, @L1 [symbolic = %L1.lookup_impl_witness (constants.%L1.lookup_impl_witness.771a6e.2)]
  869. // CHECK:STDOUT: %L1.facet: %L1.type = facet_value %V.as_type.loc15_25.1, (%L1.lookup_impl_witness) [symbolic = %L1.facet (constants.%L1.facet.6a0270.2)]
  870. // CHECK:STDOUT: %.loc16_4: type = fn_type_with_self_type constants.%L1.R1.type, %L1.facet [symbolic = %.loc16_4 (constants.%.fd3043.2)]
  871. // CHECK:STDOUT: %impl.elem0.loc16_4.2: @Compound4.%.loc16_4 (%.fd3043.2) = impl_witness_access %L1.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc16_4.2 (constants.%impl.elem0.eb2432.2)]
  872. // CHECK:STDOUT: %specific_impl_fn.loc16_4.2: <specific function> = specific_impl_function %impl.elem0.loc16_4.2, @L1.R1(%L1.facet) [symbolic = %specific_impl_fn.loc16_4.2 (constants.%specific_impl_fn.3f1bf1.2)]
  873. // CHECK:STDOUT: %.loc17_4.2: type = fn_type_with_self_type constants.%L1.S1.type, %L1.facet [symbolic = %.loc17_4.2 (constants.%.d0547b.2)]
  874. // CHECK:STDOUT: %impl.elem1.loc17_4.2: @Compound4.%.loc17_4.2 (%.d0547b.2) = impl_witness_access %L1.lookup_impl_witness, element1 [symbolic = %impl.elem1.loc17_4.2 (constants.%impl.elem1.d9ff45.2)]
  875. // CHECK:STDOUT: %specific_impl_fn.loc17_4.2: <specific function> = specific_impl_function %impl.elem1.loc17_4.2, @L1.S1(%L1.facet) [symbolic = %specific_impl_fn.loc17_4.2 (constants.%specific_impl_fn.9be07e.2)]
  876. // CHECK:STDOUT:
  877. // CHECK:STDOUT: fn(%y.param: @Compound4.%V.as_type.loc15_25.1 (%V.as_type), %p.param: @Compound4.%ptr.loc15_32.1 (%ptr.be473c.3)) {
  878. // CHECK:STDOUT: !entry:
  879. // CHECK:STDOUT: %y.ref: @Compound4.%V.as_type.loc15_25.1 (%V.as_type) = name_ref y, %y
  880. // CHECK:STDOUT: %L1.ref.loc16: type = name_ref L1, file.%L1.decl [concrete = constants.%L1.type]
  881. // CHECK:STDOUT: %R1.ref: %L1.assoc_type = name_ref R1, @L1.%assoc0 [concrete = constants.%assoc0]
  882. // CHECK:STDOUT: %impl.elem0.loc16_4.1: @Compound4.%.loc16_4 (%.fd3043.2) = impl_witness_access constants.%L1.lookup_impl_witness.771a6e.2, element0 [symbolic = %impl.elem0.loc16_4.2 (constants.%impl.elem0.eb2432.2)]
  883. // CHECK:STDOUT: %bound_method.loc16_4: <bound method> = bound_method %y.ref, %impl.elem0.loc16_4.1
  884. // CHECK:STDOUT: %specific_impl_fn.loc16_4.1: <specific function> = specific_impl_function %impl.elem0.loc16_4.1, @L1.R1(constants.%L1.facet.6a0270.2) [symbolic = %specific_impl_fn.loc16_4.2 (constants.%specific_impl_fn.3f1bf1.2)]
  885. // CHECK:STDOUT: %bound_method.loc16_13: <bound method> = bound_method %y.ref, %specific_impl_fn.loc16_4.1
  886. // CHECK:STDOUT: %.loc16_13: init %empty_tuple.type = call %bound_method.loc16_13(%y.ref)
  887. // CHECK:STDOUT: %p.ref: @Compound4.%ptr.loc15_32.1 (%ptr.be473c.3) = name_ref p, %p
  888. // CHECK:STDOUT: %L1.ref.loc17: type = name_ref L1, file.%L1.decl [concrete = constants.%L1.type]
  889. // CHECK:STDOUT: %S1.ref: %L1.assoc_type = name_ref S1, @L1.%assoc1 [concrete = constants.%assoc1]
  890. // CHECK:STDOUT: %.loc17_4.1: ref @Compound4.%V.as_type.loc15_25.1 (%V.as_type) = deref %p.ref
  891. // CHECK:STDOUT: %impl.elem1.loc17_4.1: @Compound4.%.loc17_4.2 (%.d0547b.2) = impl_witness_access constants.%L1.lookup_impl_witness.771a6e.2, element1 [symbolic = %impl.elem1.loc17_4.2 (constants.%impl.elem1.d9ff45.2)]
  892. // CHECK:STDOUT: %bound_method.loc17_4: <bound method> = bound_method %.loc17_4.1, %impl.elem1.loc17_4.1
  893. // CHECK:STDOUT: %specific_impl_fn.loc17_4.1: <specific function> = specific_impl_function %impl.elem1.loc17_4.1, @L1.S1(constants.%L1.facet.6a0270.2) [symbolic = %specific_impl_fn.loc17_4.2 (constants.%specific_impl_fn.9be07e.2)]
  894. // CHECK:STDOUT: %bound_method.loc17_14: <bound method> = bound_method %.loc17_4.1, %specific_impl_fn.loc17_4.1
  895. // CHECK:STDOUT: %addr: @Compound4.%ptr.loc15_32.1 (%ptr.be473c.3) = addr_of %.loc17_4.1
  896. // CHECK:STDOUT: %.loc17_14: init %empty_tuple.type = call %bound_method.loc17_14(%addr)
  897. // CHECK:STDOUT: return
  898. // CHECK:STDOUT: }
  899. // CHECK:STDOUT: }
  900. // CHECK:STDOUT:
  901. // CHECK:STDOUT: specific @L1.R1(constants.%Self) {
  902. // CHECK:STDOUT: %Self => constants.%Self
  903. // CHECK:STDOUT: %Self.as_type.loc4_15.1 => constants.%Self.as_type
  904. // CHECK:STDOUT: %pattern_type => constants.%pattern_type.b73027.1
  905. // CHECK:STDOUT: }
  906. // CHECK:STDOUT:
  907. // CHECK:STDOUT: specific @L1.S1(constants.%Self) {
  908. // CHECK:STDOUT: %Self => constants.%Self
  909. // CHECK:STDOUT: %Self.as_type.loc5_24.1 => constants.%Self.as_type
  910. // CHECK:STDOUT: %ptr.loc5_24.1 => constants.%ptr.be473c.1
  911. // CHECK:STDOUT: %pattern_type => constants.%pattern_type.c147e0.1
  912. // CHECK:STDOUT: }
  913. // CHECK:STDOUT:
  914. // CHECK:STDOUT: specific @Simple4(constants.%T) {
  915. // CHECK:STDOUT: %T.loc9_12.1 => constants.%T
  916. // CHECK:STDOUT: %T.as_type.loc9_23.1 => constants.%T.as_type
  917. // CHECK:STDOUT: %pattern_type.loc9_20 => constants.%pattern_type.b73027.2
  918. // CHECK:STDOUT: %ptr.loc9_30.1 => constants.%ptr.be473c.2
  919. // CHECK:STDOUT: %pattern_type.loc9_26 => constants.%pattern_type.c147e0.2
  920. // CHECK:STDOUT: }
  921. // CHECK:STDOUT:
  922. // CHECK:STDOUT: specific @L1.R1(constants.%L1.facet.6a0270.1) {
  923. // CHECK:STDOUT: %Self => constants.%L1.facet.6a0270.1
  924. // CHECK:STDOUT: %Self.as_type.loc4_15.1 => constants.%T.as_type
  925. // CHECK:STDOUT: %pattern_type => constants.%pattern_type.b73027.2
  926. // CHECK:STDOUT: }
  927. // CHECK:STDOUT:
  928. // CHECK:STDOUT: specific @L1.S1(constants.%L1.facet.6a0270.1) {
  929. // CHECK:STDOUT: %Self => constants.%L1.facet.6a0270.1
  930. // CHECK:STDOUT: %Self.as_type.loc5_24.1 => constants.%T.as_type
  931. // CHECK:STDOUT: %ptr.loc5_24.1 => constants.%ptr.be473c.2
  932. // CHECK:STDOUT: %pattern_type => constants.%pattern_type.c147e0.2
  933. // CHECK:STDOUT: }
  934. // CHECK:STDOUT:
  935. // CHECK:STDOUT: specific @Compound4(constants.%V) {
  936. // CHECK:STDOUT: %V.loc15_14.1 => constants.%V
  937. // CHECK:STDOUT: %V.as_type.loc15_25.1 => constants.%V.as_type
  938. // CHECK:STDOUT: %pattern_type.loc15_22 => constants.%pattern_type.b73027.3
  939. // CHECK:STDOUT: %ptr.loc15_32.1 => constants.%ptr.be473c.3
  940. // CHECK:STDOUT: %pattern_type.loc15_28 => constants.%pattern_type.c147e0.3
  941. // CHECK:STDOUT: }
  942. // CHECK:STDOUT:
  943. // CHECK:STDOUT: specific @L1.R1(constants.%L1.facet.6a0270.2) {
  944. // CHECK:STDOUT: %Self => constants.%L1.facet.6a0270.2
  945. // CHECK:STDOUT: %Self.as_type.loc4_15.1 => constants.%V.as_type
  946. // CHECK:STDOUT: %pattern_type => constants.%pattern_type.b73027.3
  947. // CHECK:STDOUT: }
  948. // CHECK:STDOUT:
  949. // CHECK:STDOUT: specific @L1.S1(constants.%L1.facet.6a0270.2) {
  950. // CHECK:STDOUT: %Self => constants.%L1.facet.6a0270.2
  951. // CHECK:STDOUT: %Self.as_type.loc5_24.1 => constants.%V.as_type
  952. // CHECK:STDOUT: %ptr.loc5_24.1 => constants.%ptr.be473c.3
  953. // CHECK:STDOUT: %pattern_type => constants.%pattern_type.c147e0.3
  954. // CHECK:STDOUT: }
  955. // CHECK:STDOUT:
  956. // CHECK:STDOUT: --- fail_interface_instance_caller_not.carbon
  957. // CHECK:STDOUT:
  958. // CHECK:STDOUT: constants {
  959. // CHECK:STDOUT: %L2.type: type = facet_type <@L2> [concrete]
  960. // CHECK:STDOUT: %Self: %L2.type = bind_symbolic_name Self, 0 [symbolic]
  961. // CHECK:STDOUT: %Self.as_type: type = facet_access_type %Self [symbolic]
  962. // CHECK:STDOUT: %pattern_type.dcd64e.1: type = pattern_type %Self.as_type [symbolic]
  963. // CHECK:STDOUT: %L2.R2.type: type = fn_type @L2.R2 [concrete]
  964. // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete]
  965. // CHECK:STDOUT: %L2.R2: %L2.R2.type = struct_value () [concrete]
  966. // CHECK:STDOUT: %L2.assoc_type: type = assoc_entity_type @L2 [concrete]
  967. // CHECK:STDOUT: %assoc0: %L2.assoc_type = assoc_entity element0, @L2.%L2.R2.decl [concrete]
  968. // CHECK:STDOUT: %ptr.6e05d5.1: type = ptr_type %Self.as_type [symbolic]
  969. // CHECK:STDOUT: %pattern_type.f863f7.1: type = pattern_type %ptr.6e05d5.1 [symbolic]
  970. // CHECK:STDOUT: %pattern_type.f6d: type = pattern_type auto [concrete]
  971. // CHECK:STDOUT: %L2.S2.type: type = fn_type @L2.S2 [concrete]
  972. // CHECK:STDOUT: %L2.S2: %L2.S2.type = struct_value () [concrete]
  973. // CHECK:STDOUT: %assoc1: %L2.assoc_type = assoc_entity element1, @L2.%L2.S2.decl [concrete]
  974. // CHECK:STDOUT: %type: type = facet_type <type> [concrete]
  975. // CHECK:STDOUT: %.Self: %type = bind_symbolic_name .Self [symbolic_self]
  976. // CHECK:STDOUT: %T: %L2.type = bind_symbolic_name T, 0 [symbolic]
  977. // CHECK:STDOUT: %pattern_type.38f: type = pattern_type %L2.type [concrete]
  978. // CHECK:STDOUT: %Simple5.type: type = fn_type @Simple5 [concrete]
  979. // CHECK:STDOUT: %Simple5: %Simple5.type = struct_value () [concrete]
  980. // CHECK:STDOUT: %T.as_type: type = facet_access_type %T [symbolic]
  981. // CHECK:STDOUT: %L2.lookup_impl_witness: <witness> = lookup_impl_witness %T, @L2 [symbolic]
  982. // CHECK:STDOUT: %L2.facet: %L2.type = facet_value %T.as_type, (%L2.lookup_impl_witness) [symbolic]
  983. // CHECK:STDOUT: %.dc2: type = fn_type_with_self_type %L2.R2.type, %L2.facet [symbolic]
  984. // CHECK:STDOUT: %impl.elem0: %.dc2 = impl_witness_access %L2.lookup_impl_witness, element0 [symbolic]
  985. // CHECK:STDOUT: %pattern_type.dcd64e.2: type = pattern_type %T.as_type [symbolic]
  986. // CHECK:STDOUT: %specific_impl_fn.814: <specific function> = specific_impl_function %impl.elem0, @L2.R2(%L2.facet) [symbolic]
  987. // CHECK:STDOUT: %.630: type = fn_type_with_self_type %L2.S2.type, %L2.facet [symbolic]
  988. // CHECK:STDOUT: %impl.elem1: %.630 = impl_witness_access %L2.lookup_impl_witness, element1 [symbolic]
  989. // CHECK:STDOUT: %ptr.6e05d5.2: type = ptr_type %T.as_type [symbolic]
  990. // CHECK:STDOUT: %pattern_type.f863f7.2: type = pattern_type %ptr.6e05d5.2 [symbolic]
  991. // CHECK:STDOUT: %specific_impl_fn.5ec: <specific function> = specific_impl_function %impl.elem1, @L2.S2(%L2.facet) [symbolic]
  992. // CHECK:STDOUT: %V: %L2.type = bind_symbolic_name V, 0 [symbolic]
  993. // CHECK:STDOUT: %Compound5.type: type = fn_type @Compound5 [concrete]
  994. // CHECK:STDOUT: %Compound5: %Compound5.type = struct_value () [concrete]
  995. // CHECK:STDOUT: }
  996. // CHECK:STDOUT:
  997. // CHECK:STDOUT: imports {
  998. // CHECK:STDOUT: %Core: <namespace> = namespace file.%Core.import, [concrete] {
  999. // CHECK:STDOUT: import Core//prelude
  1000. // CHECK:STDOUT: import Core//prelude/...
  1001. // CHECK:STDOUT: }
  1002. // CHECK:STDOUT: }
  1003. // CHECK:STDOUT:
  1004. // CHECK:STDOUT: file {
  1005. // CHECK:STDOUT: package: <namespace> = namespace [concrete] {
  1006. // CHECK:STDOUT: .Core = imports.%Core
  1007. // CHECK:STDOUT: .L2 = %L2.decl
  1008. // CHECK:STDOUT: .Simple5 = %Simple5.decl
  1009. // CHECK:STDOUT: .Compound5 = %Compound5.decl
  1010. // CHECK:STDOUT: }
  1011. // CHECK:STDOUT: %Core.import = import Core
  1012. // CHECK:STDOUT: %L2.decl: type = interface_decl @L2 [concrete = constants.%L2.type] {} {}
  1013. // CHECK:STDOUT: %Simple5.decl: %Simple5.type = fn_decl @Simple5 [concrete = constants.%Simple5] {
  1014. // CHECK:STDOUT: %T.patt: %pattern_type.38f = symbolic_binding_pattern T, 0 [concrete]
  1015. // CHECK:STDOUT: } {
  1016. // CHECK:STDOUT: %.loc10: type = splice_block %L2.ref [concrete = constants.%L2.type] {
  1017. // CHECK:STDOUT: %.Self: %type = bind_symbolic_name .Self [symbolic_self = constants.%.Self]
  1018. // CHECK:STDOUT: %L2.ref: type = name_ref L2, file.%L2.decl [concrete = constants.%L2.type]
  1019. // CHECK:STDOUT: }
  1020. // CHECK:STDOUT: %T.loc10_12.2: %L2.type = bind_symbolic_name T, 0 [symbolic = %T.loc10_12.1 (constants.%T)]
  1021. // CHECK:STDOUT: }
  1022. // CHECK:STDOUT: %Compound5.decl: %Compound5.type = fn_decl @Compound5 [concrete = constants.%Compound5] {
  1023. // CHECK:STDOUT: %V.patt: %pattern_type.38f = symbolic_binding_pattern V, 0 [concrete]
  1024. // CHECK:STDOUT: } {
  1025. // CHECK:STDOUT: %.loc30: type = splice_block %L2.ref.loc30 [concrete = constants.%L2.type] {
  1026. // CHECK:STDOUT: %.Self: %type = bind_symbolic_name .Self [symbolic_self = constants.%.Self]
  1027. // CHECK:STDOUT: %L2.ref.loc30: type = name_ref L2, file.%L2.decl [concrete = constants.%L2.type]
  1028. // CHECK:STDOUT: }
  1029. // CHECK:STDOUT: %V.loc30_14.2: %L2.type = bind_symbolic_name V, 0 [symbolic = %V.loc30_14.1 (constants.%V)]
  1030. // CHECK:STDOUT: }
  1031. // CHECK:STDOUT: }
  1032. // CHECK:STDOUT:
  1033. // CHECK:STDOUT: interface @L2 {
  1034. // CHECK:STDOUT: %Self: %L2.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self]
  1035. // CHECK:STDOUT: %L2.R2.decl: %L2.R2.type = fn_decl @L2.R2 [concrete = constants.%L2.R2] {
  1036. // CHECK:STDOUT: %self.patt: @L2.R2.%pattern_type (%pattern_type.dcd64e.1) = binding_pattern self [concrete]
  1037. // CHECK:STDOUT: %self.param_patt: @L2.R2.%pattern_type (%pattern_type.dcd64e.1) = value_param_pattern %self.patt, call_param0 [concrete]
  1038. // CHECK:STDOUT: } {
  1039. // CHECK:STDOUT: %self.param: @L2.R2.%Self.as_type.loc5_15.1 (%Self.as_type) = value_param call_param0
  1040. // CHECK:STDOUT: %.loc5_15.1: type = splice_block %.loc5_15.2 [symbolic = %Self.as_type.loc5_15.1 (constants.%Self.as_type)] {
  1041. // CHECK:STDOUT: %Self.ref: %L2.type = name_ref Self, @L2.%Self [symbolic = %Self (constants.%Self)]
  1042. // CHECK:STDOUT: %Self.as_type.loc5_15.2: type = facet_access_type %Self.ref [symbolic = %Self.as_type.loc5_15.1 (constants.%Self.as_type)]
  1043. // CHECK:STDOUT: %.loc5_15.2: type = converted %Self.ref, %Self.as_type.loc5_15.2 [symbolic = %Self.as_type.loc5_15.1 (constants.%Self.as_type)]
  1044. // CHECK:STDOUT: }
  1045. // CHECK:STDOUT: %self: @L2.R2.%Self.as_type.loc5_15.1 (%Self.as_type) = bind_name self, %self.param
  1046. // CHECK:STDOUT: }
  1047. // CHECK:STDOUT: %assoc0: %L2.assoc_type = assoc_entity element0, %L2.R2.decl [concrete = constants.%assoc0]
  1048. // CHECK:STDOUT: %L2.S2.decl: %L2.S2.type = fn_decl @L2.S2 [concrete = constants.%L2.S2] {
  1049. // CHECK:STDOUT: %self.patt: @L2.S2.%pattern_type (%pattern_type.f863f7.1) = binding_pattern self [concrete]
  1050. // CHECK:STDOUT: %self.param_patt: @L2.S2.%pattern_type (%pattern_type.f863f7.1) = value_param_pattern %self.patt, call_param0 [concrete]
  1051. // CHECK:STDOUT: %.loc6_9: %pattern_type.f6d = addr_pattern %self.param_patt [concrete]
  1052. // CHECK:STDOUT: } {
  1053. // CHECK:STDOUT: %self.param: @L2.S2.%ptr.loc6_24.1 (%ptr.6e05d5.1) = value_param call_param0
  1054. // CHECK:STDOUT: %.loc6_24.1: type = splice_block %ptr.loc6_24.2 [symbolic = %ptr.loc6_24.1 (constants.%ptr.6e05d5.1)] {
  1055. // CHECK:STDOUT: %Self.ref: %L2.type = name_ref Self, @L2.%Self [symbolic = %Self (constants.%Self)]
  1056. // CHECK:STDOUT: %Self.as_type.loc6_24.2: type = facet_access_type %Self.ref [symbolic = %Self.as_type.loc6_24.1 (constants.%Self.as_type)]
  1057. // CHECK:STDOUT: %.loc6_24.2: type = converted %Self.ref, %Self.as_type.loc6_24.2 [symbolic = %Self.as_type.loc6_24.1 (constants.%Self.as_type)]
  1058. // CHECK:STDOUT: %ptr.loc6_24.2: type = ptr_type %.loc6_24.2 [symbolic = %ptr.loc6_24.1 (constants.%ptr.6e05d5.1)]
  1059. // CHECK:STDOUT: }
  1060. // CHECK:STDOUT: %self: @L2.S2.%ptr.loc6_24.1 (%ptr.6e05d5.1) = bind_name self, %self.param
  1061. // CHECK:STDOUT: }
  1062. // CHECK:STDOUT: %assoc1: %L2.assoc_type = assoc_entity element1, %L2.S2.decl [concrete = constants.%assoc1]
  1063. // CHECK:STDOUT:
  1064. // CHECK:STDOUT: !members:
  1065. // CHECK:STDOUT: .Self = %Self
  1066. // CHECK:STDOUT: .R2 = %assoc0
  1067. // CHECK:STDOUT: .S2 = %assoc1
  1068. // CHECK:STDOUT: witness = (%L2.R2.decl, %L2.S2.decl)
  1069. // CHECK:STDOUT: }
  1070. // CHECK:STDOUT:
  1071. // CHECK:STDOUT: generic fn @L2.R2(@L2.%Self: %L2.type) {
  1072. // CHECK:STDOUT: %Self: %L2.type = bind_symbolic_name Self, 0 [symbolic = %Self (constants.%Self)]
  1073. // CHECK:STDOUT: %Self.as_type.loc5_15.1: type = facet_access_type %Self [symbolic = %Self.as_type.loc5_15.1 (constants.%Self.as_type)]
  1074. // CHECK:STDOUT: %pattern_type: type = pattern_type %Self.as_type.loc5_15.1 [symbolic = %pattern_type (constants.%pattern_type.dcd64e.1)]
  1075. // CHECK:STDOUT:
  1076. // CHECK:STDOUT: fn(%self.param: @L2.R2.%Self.as_type.loc5_15.1 (%Self.as_type));
  1077. // CHECK:STDOUT: }
  1078. // CHECK:STDOUT:
  1079. // CHECK:STDOUT: generic fn @L2.S2(@L2.%Self: %L2.type) {
  1080. // CHECK:STDOUT: %Self: %L2.type = bind_symbolic_name Self, 0 [symbolic = %Self (constants.%Self)]
  1081. // CHECK:STDOUT: %Self.as_type.loc6_24.1: type = facet_access_type %Self [symbolic = %Self.as_type.loc6_24.1 (constants.%Self.as_type)]
  1082. // CHECK:STDOUT: %ptr.loc6_24.1: type = ptr_type %Self.as_type.loc6_24.1 [symbolic = %ptr.loc6_24.1 (constants.%ptr.6e05d5.1)]
  1083. // CHECK:STDOUT: %pattern_type: type = pattern_type %ptr.loc6_24.1 [symbolic = %pattern_type (constants.%pattern_type.f863f7.1)]
  1084. // CHECK:STDOUT:
  1085. // CHECK:STDOUT: fn(%self.param: @L2.S2.%ptr.loc6_24.1 (%ptr.6e05d5.1));
  1086. // CHECK:STDOUT: }
  1087. // CHECK:STDOUT:
  1088. // CHECK:STDOUT: generic fn @Simple5(%T.loc10_12.2: %L2.type) {
  1089. // CHECK:STDOUT: %T.loc10_12.1: %L2.type = bind_symbolic_name T, 0 [symbolic = %T.loc10_12.1 (constants.%T)]
  1090. // CHECK:STDOUT:
  1091. // CHECK:STDOUT: !definition:
  1092. // CHECK:STDOUT: %T.as_type.loc18_4.2: type = facet_access_type %T.loc10_12.1 [symbolic = %T.as_type.loc18_4.2 (constants.%T.as_type)]
  1093. // CHECK:STDOUT: %L2.lookup_impl_witness: <witness> = lookup_impl_witness %T.loc10_12.1, @L2 [symbolic = %L2.lookup_impl_witness (constants.%L2.lookup_impl_witness)]
  1094. // CHECK:STDOUT: %L2.facet: %L2.type = facet_value %T.as_type.loc18_4.2, (%L2.lookup_impl_witness) [symbolic = %L2.facet (constants.%L2.facet)]
  1095. // CHECK:STDOUT: %.loc18_4.2: type = fn_type_with_self_type constants.%L2.R2.type, %L2.facet [symbolic = %.loc18_4.2 (constants.%.dc2)]
  1096. // CHECK:STDOUT: %impl.elem0.loc18_4.2: @Simple5.%.loc18_4.2 (%.dc2) = impl_witness_access %L2.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc18_4.2 (constants.%impl.elem0)]
  1097. // CHECK:STDOUT: %specific_impl_fn.loc18_4.2: <specific function> = specific_impl_function %impl.elem0.loc18_4.2, @L2.R2(%L2.facet) [symbolic = %specific_impl_fn.loc18_4.2 (constants.%specific_impl_fn.814)]
  1098. // CHECK:STDOUT: %.loc26_4.2: type = fn_type_with_self_type constants.%L2.S2.type, %L2.facet [symbolic = %.loc26_4.2 (constants.%.630)]
  1099. // CHECK:STDOUT: %impl.elem1.loc26_4.2: @Simple5.%.loc26_4.2 (%.630) = impl_witness_access %L2.lookup_impl_witness, element1 [symbolic = %impl.elem1.loc26_4.2 (constants.%impl.elem1)]
  1100. // CHECK:STDOUT: %specific_impl_fn.loc26_4.2: <specific function> = specific_impl_function %impl.elem1.loc26_4.2, @L2.S2(%L2.facet) [symbolic = %specific_impl_fn.loc26_4.2 (constants.%specific_impl_fn.5ec)]
  1101. // CHECK:STDOUT:
  1102. // CHECK:STDOUT: fn() {
  1103. // CHECK:STDOUT: !entry:
  1104. // CHECK:STDOUT: %T.ref.loc18: %L2.type = name_ref T, %T.loc10_12.2 [symbolic = %T.loc10_12.1 (constants.%T)]
  1105. // CHECK:STDOUT: %R2.ref: %L2.assoc_type = name_ref R2, @L2.%assoc0 [concrete = constants.%assoc0]
  1106. // CHECK:STDOUT: %T.as_type.loc18_4.1: type = facet_access_type %T.ref.loc18 [symbolic = %T.as_type.loc18_4.2 (constants.%T.as_type)]
  1107. // CHECK:STDOUT: %.loc18_4.1: type = converted %T.ref.loc18, %T.as_type.loc18_4.1 [symbolic = %T.as_type.loc18_4.2 (constants.%T.as_type)]
  1108. // CHECK:STDOUT: %impl.elem0.loc18_4.1: @Simple5.%.loc18_4.2 (%.dc2) = impl_witness_access constants.%L2.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc18_4.2 (constants.%impl.elem0)]
  1109. // CHECK:STDOUT: %specific_impl_fn.loc18_4.1: <specific function> = specific_impl_function %impl.elem0.loc18_4.1, @L2.R2(constants.%L2.facet) [symbolic = %specific_impl_fn.loc18_4.2 (constants.%specific_impl_fn.814)]
  1110. // CHECK:STDOUT: %.loc18_8: init %empty_tuple.type = call %specific_impl_fn.loc18_4.1(<error>) [concrete = <error>]
  1111. // CHECK:STDOUT: %T.ref.loc26: %L2.type = name_ref T, %T.loc10_12.2 [symbolic = %T.loc10_12.1 (constants.%T)]
  1112. // CHECK:STDOUT: %S2.ref: %L2.assoc_type = name_ref S2, @L2.%assoc1 [concrete = constants.%assoc1]
  1113. // CHECK:STDOUT: %T.as_type.loc26: type = facet_access_type %T.ref.loc26 [symbolic = %T.as_type.loc18_4.2 (constants.%T.as_type)]
  1114. // CHECK:STDOUT: %.loc26_4.1: type = converted %T.ref.loc26, %T.as_type.loc26 [symbolic = %T.as_type.loc18_4.2 (constants.%T.as_type)]
  1115. // CHECK:STDOUT: %impl.elem1.loc26_4.1: @Simple5.%.loc26_4.2 (%.630) = impl_witness_access constants.%L2.lookup_impl_witness, element1 [symbolic = %impl.elem1.loc26_4.2 (constants.%impl.elem1)]
  1116. // CHECK:STDOUT: %specific_impl_fn.loc26_4.1: <specific function> = specific_impl_function %impl.elem1.loc26_4.1, @L2.S2(constants.%L2.facet) [symbolic = %specific_impl_fn.loc26_4.2 (constants.%specific_impl_fn.5ec)]
  1117. // CHECK:STDOUT: %addr: <error> = addr_of <error> [concrete = <error>]
  1118. // CHECK:STDOUT: %.loc26_8: init %empty_tuple.type = call %specific_impl_fn.loc26_4.1(<error>) [concrete = <error>]
  1119. // CHECK:STDOUT: return
  1120. // CHECK:STDOUT: }
  1121. // CHECK:STDOUT: }
  1122. // CHECK:STDOUT:
  1123. // CHECK:STDOUT: generic fn @Compound5(%V.loc30_14.2: %L2.type) {
  1124. // CHECK:STDOUT: %V.loc30_14.1: %L2.type = bind_symbolic_name V, 0 [symbolic = %V.loc30_14.1 (constants.%V)]
  1125. // CHECK:STDOUT:
  1126. // CHECK:STDOUT: !definition:
  1127. // CHECK:STDOUT:
  1128. // CHECK:STDOUT: fn() {
  1129. // CHECK:STDOUT: !entry:
  1130. // CHECK:STDOUT: %V.ref.loc35: %L2.type = name_ref V, %V.loc30_14.2 [symbolic = %V.loc30_14.1 (constants.%V)]
  1131. // CHECK:STDOUT: %L2.ref.loc35: type = name_ref L2, file.%L2.decl [concrete = constants.%L2.type]
  1132. // CHECK:STDOUT: %R2.ref: %L2.assoc_type = name_ref R2, @L2.%assoc0 [concrete = constants.%assoc0]
  1133. // CHECK:STDOUT: %V.ref.loc40: %L2.type = name_ref V, %V.loc30_14.2 [symbolic = %V.loc30_14.1 (constants.%V)]
  1134. // CHECK:STDOUT: %L2.ref.loc40: type = name_ref L2, file.%L2.decl [concrete = constants.%L2.type]
  1135. // CHECK:STDOUT: %S2.ref: %L2.assoc_type = name_ref S2, @L2.%assoc1 [concrete = constants.%assoc1]
  1136. // CHECK:STDOUT: return
  1137. // CHECK:STDOUT: }
  1138. // CHECK:STDOUT: }
  1139. // CHECK:STDOUT:
  1140. // CHECK:STDOUT: specific @L2.R2(constants.%Self) {
  1141. // CHECK:STDOUT: %Self => constants.%Self
  1142. // CHECK:STDOUT: %Self.as_type.loc5_15.1 => constants.%Self.as_type
  1143. // CHECK:STDOUT: %pattern_type => constants.%pattern_type.dcd64e.1
  1144. // CHECK:STDOUT: }
  1145. // CHECK:STDOUT:
  1146. // CHECK:STDOUT: specific @L2.S2(constants.%Self) {
  1147. // CHECK:STDOUT: %Self => constants.%Self
  1148. // CHECK:STDOUT: %Self.as_type.loc6_24.1 => constants.%Self.as_type
  1149. // CHECK:STDOUT: %ptr.loc6_24.1 => constants.%ptr.6e05d5.1
  1150. // CHECK:STDOUT: %pattern_type => constants.%pattern_type.f863f7.1
  1151. // CHECK:STDOUT: }
  1152. // CHECK:STDOUT:
  1153. // CHECK:STDOUT: specific @Simple5(constants.%T) {
  1154. // CHECK:STDOUT: %T.loc10_12.1 => constants.%T
  1155. // CHECK:STDOUT: }
  1156. // CHECK:STDOUT:
  1157. // CHECK:STDOUT: specific @L2.R2(constants.%L2.facet) {
  1158. // CHECK:STDOUT: %Self => constants.%L2.facet
  1159. // CHECK:STDOUT: %Self.as_type.loc5_15.1 => constants.%T.as_type
  1160. // CHECK:STDOUT: %pattern_type => constants.%pattern_type.dcd64e.2
  1161. // CHECK:STDOUT: }
  1162. // CHECK:STDOUT:
  1163. // CHECK:STDOUT: specific @L2.S2(constants.%L2.facet) {
  1164. // CHECK:STDOUT: %Self => constants.%L2.facet
  1165. // CHECK:STDOUT: %Self.as_type.loc6_24.1 => constants.%T.as_type
  1166. // CHECK:STDOUT: %ptr.loc6_24.1 => constants.%ptr.6e05d5.2
  1167. // CHECK:STDOUT: %pattern_type => constants.%pattern_type.f863f7.2
  1168. // CHECK:STDOUT: }
  1169. // CHECK:STDOUT:
  1170. // CHECK:STDOUT: specific @Compound5(constants.%V) {
  1171. // CHECK:STDOUT: %V.loc30_14.1 => constants.%V
  1172. // CHECK:STDOUT: }
  1173. // CHECK:STDOUT:
  1174. // CHECK:STDOUT: --- fail_combine_non_instance.carbon
  1175. // CHECK:STDOUT:
  1176. // CHECK:STDOUT: constants {
  1177. // CHECK:STDOUT: %A.type: type = facet_type <@A> [concrete]
  1178. // CHECK:STDOUT: %Self.0dd: %A.type = bind_symbolic_name Self, 0 [symbolic]
  1179. // CHECK:STDOUT: %A.G.type: type = fn_type @A.G [concrete]
  1180. // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete]
  1181. // CHECK:STDOUT: %A.G: %A.G.type = struct_value () [concrete]
  1182. // CHECK:STDOUT: %A.assoc_type: type = assoc_entity_type @A [concrete]
  1183. // CHECK:STDOUT: %assoc0.d52: %A.assoc_type = assoc_entity element0, @A.%A.G.decl [concrete]
  1184. // CHECK:STDOUT: %C: type = class_type @C [concrete]
  1185. // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete]
  1186. // CHECK:STDOUT: %pattern_type.f6d: type = pattern_type auto [concrete]
  1187. // CHECK:STDOUT: %Destroy.impl_witness.071: <witness> = impl_witness @C.%Destroy.impl_witness_table [concrete]
  1188. // CHECK:STDOUT: %ptr.019: type = ptr_type %C [concrete]
  1189. // CHECK:STDOUT: %pattern_type.44a: type = pattern_type %ptr.019 [concrete]
  1190. // CHECK:STDOUT: %C.as.Destroy.impl.Op.type: type = fn_type @C.as.Destroy.impl.Op [concrete]
  1191. // CHECK:STDOUT: %C.as.Destroy.impl.Op: %C.as.Destroy.impl.Op.type = struct_value () [concrete]
  1192. // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete]
  1193. // CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %empty_struct_type [concrete]
  1194. // CHECK:STDOUT: %A.impl_witness: <witness> = impl_witness file.%A.impl_witness_table [concrete]
  1195. // CHECK:STDOUT: %C.as.A.impl.G.type: type = fn_type @C.as.A.impl.G [concrete]
  1196. // CHECK:STDOUT: %C.as.A.impl.G: %C.as.A.impl.G.type = struct_value () [concrete]
  1197. // CHECK:STDOUT: %A.facet: %A.type = facet_value %C, (%A.impl_witness) [concrete]
  1198. // CHECK:STDOUT: %Fails.type: type = fn_type @Fails [concrete]
  1199. // CHECK:STDOUT: %Fails: %Fails.type = struct_value () [concrete]
  1200. // CHECK:STDOUT: %C.val: %C = struct_value () [concrete]
  1201. // CHECK:STDOUT: %BitAndWith.type.f2e: type = generic_interface_type @BitAndWith [concrete]
  1202. // CHECK:STDOUT: %BitAndWith.generic: %BitAndWith.type.f2e = struct_value () [concrete]
  1203. // CHECK:STDOUT: %BitAndWith.type.8a6: type = facet_type <@BitAndWith, @BitAndWith(type)> [concrete]
  1204. // CHECK:STDOUT: %BitAndWith.Op.type.9a3: type = fn_type @BitAndWith.Op, @BitAndWith(type) [concrete]
  1205. // CHECK:STDOUT: %BitAndWith.impl_witness: <witness> = impl_witness imports.%BitAndWith.impl_witness_table [concrete]
  1206. // CHECK:STDOUT: %BitAndWith.facet: %BitAndWith.type.8a6 = facet_value type, (%BitAndWith.impl_witness) [concrete]
  1207. // CHECK:STDOUT: %.fa7: type = fn_type_with_self_type %BitAndWith.Op.type.9a3, %BitAndWith.facet [concrete]
  1208. // CHECK:STDOUT: %type.as.BitAndWith.impl.Op.type: type = fn_type @type.as.BitAndWith.impl.Op [concrete]
  1209. // CHECK:STDOUT: %type.as.BitAndWith.impl.Op: %type.as.BitAndWith.impl.Op.type = struct_value () [concrete]
  1210. // CHECK:STDOUT: %type.as.BitAndWith.impl.Op.bound: <bound method> = bound_method %A.type, %type.as.BitAndWith.impl.Op [concrete]
  1211. // CHECK:STDOUT: %ImplicitAs.type.cc7: type = generic_interface_type @ImplicitAs [concrete]
  1212. // CHECK:STDOUT: %ImplicitAs.generic: %ImplicitAs.type.cc7 = struct_value () [concrete]
  1213. // CHECK:STDOUT: }
  1214. // CHECK:STDOUT:
  1215. // CHECK:STDOUT: imports {
  1216. // CHECK:STDOUT: %Core: <namespace> = namespace file.%Core.import, [concrete] {
  1217. // CHECK:STDOUT: .Destroy = %Core.Destroy
  1218. // CHECK:STDOUT: .BitAndWith = %Core.BitAndWith
  1219. // CHECK:STDOUT: .ImplicitAs = %Core.ImplicitAs
  1220. // CHECK:STDOUT: import Core//prelude
  1221. // CHECK:STDOUT: import Core//prelude/...
  1222. // CHECK:STDOUT: }
  1223. // CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type]
  1224. // CHECK:STDOUT: %Core.BitAndWith: %BitAndWith.type.f2e = import_ref Core//prelude/parts/as, BitAndWith, loaded [concrete = constants.%BitAndWith.generic]
  1225. // CHECK:STDOUT: %Core.import_ref.636: %type.as.BitAndWith.impl.Op.type = import_ref Core//prelude/parts/as, loc25_42, loaded [concrete = constants.%type.as.BitAndWith.impl.Op]
  1226. // CHECK:STDOUT: %BitAndWith.impl_witness_table = impl_witness_table (%Core.import_ref.636), @type.as.BitAndWith.impl [concrete]
  1227. // CHECK:STDOUT: %Core.ImplicitAs: %ImplicitAs.type.cc7 = import_ref Core//prelude/parts/as, ImplicitAs, loaded [concrete = constants.%ImplicitAs.generic]
  1228. // CHECK:STDOUT: }
  1229. // CHECK:STDOUT:
  1230. // CHECK:STDOUT: file {
  1231. // CHECK:STDOUT: package: <namespace> = namespace [concrete] {
  1232. // CHECK:STDOUT: .Core = imports.%Core
  1233. // CHECK:STDOUT: .A = %A.decl
  1234. // CHECK:STDOUT: .C = %C.decl
  1235. // CHECK:STDOUT: .Fails = %Fails.decl
  1236. // CHECK:STDOUT: }
  1237. // CHECK:STDOUT: %Core.import = import Core
  1238. // CHECK:STDOUT: %A.decl: type = interface_decl @A [concrete = constants.%A.type] {} {}
  1239. // CHECK:STDOUT: %C.decl: type = class_decl @C [concrete = constants.%C] {} {}
  1240. // CHECK:STDOUT: impl_decl @C.as.A.impl [concrete] {} {
  1241. // CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [concrete = constants.%C]
  1242. // CHECK:STDOUT: %A.ref: type = name_ref A, file.%A.decl [concrete = constants.%A.type]
  1243. // CHECK:STDOUT: }
  1244. // CHECK:STDOUT: %A.impl_witness_table = impl_witness_table (@C.as.A.impl.%C.as.A.impl.G.decl), @C.as.A.impl [concrete]
  1245. // CHECK:STDOUT: %A.impl_witness: <witness> = impl_witness %A.impl_witness_table [concrete = constants.%A.impl_witness]
  1246. // CHECK:STDOUT: %Fails.decl: %Fails.type = fn_decl @Fails [concrete = constants.%Fails] {} {}
  1247. // CHECK:STDOUT: }
  1248. // CHECK:STDOUT:
  1249. // CHECK:STDOUT: interface @A {
  1250. // CHECK:STDOUT: %Self: %A.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self.0dd]
  1251. // CHECK:STDOUT: %A.G.decl: %A.G.type = fn_decl @A.G [concrete = constants.%A.G] {} {}
  1252. // CHECK:STDOUT: %assoc0: %A.assoc_type = assoc_entity element0, %A.G.decl [concrete = constants.%assoc0.d52]
  1253. // CHECK:STDOUT:
  1254. // CHECK:STDOUT: !members:
  1255. // CHECK:STDOUT: .Self = %Self
  1256. // CHECK:STDOUT: .G = %assoc0
  1257. // CHECK:STDOUT: witness = (%A.G.decl)
  1258. // CHECK:STDOUT: }
  1259. // CHECK:STDOUT:
  1260. // CHECK:STDOUT: impl @C.as.Destroy.impl: @C.%Self.ref as constants.%Destroy.type {
  1261. // CHECK:STDOUT: %C.as.Destroy.impl.Op.decl: %C.as.Destroy.impl.Op.type = fn_decl @C.as.Destroy.impl.Op [concrete = constants.%C.as.Destroy.impl.Op] {
  1262. // CHECK:STDOUT: %self.patt: %pattern_type.44a = binding_pattern self [concrete]
  1263. // CHECK:STDOUT: %self.param_patt: %pattern_type.44a = value_param_pattern %self.patt, call_param0 [concrete]
  1264. // CHECK:STDOUT: %.loc7: %pattern_type.f6d = addr_pattern %self.param_patt [concrete]
  1265. // CHECK:STDOUT: } {
  1266. // CHECK:STDOUT: %self.param: %ptr.019 = value_param call_param0
  1267. // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%C [concrete = constants.%C]
  1268. // CHECK:STDOUT: %self: %ptr.019 = bind_name self, %self.param
  1269. // CHECK:STDOUT: }
  1270. // CHECK:STDOUT:
  1271. // CHECK:STDOUT: !members:
  1272. // CHECK:STDOUT: .Op = %C.as.Destroy.impl.Op.decl
  1273. // CHECK:STDOUT: witness = @C.%Destroy.impl_witness
  1274. // CHECK:STDOUT: }
  1275. // CHECK:STDOUT:
  1276. // CHECK:STDOUT: impl @C.as.A.impl: %C.ref as %A.ref {
  1277. // CHECK:STDOUT: %C.as.A.impl.G.decl: %C.as.A.impl.G.type = fn_decl @C.as.A.impl.G [concrete = constants.%C.as.A.impl.G] {} {}
  1278. // CHECK:STDOUT:
  1279. // CHECK:STDOUT: !members:
  1280. // CHECK:STDOUT: .G = %C.as.A.impl.G.decl
  1281. // CHECK:STDOUT: witness = file.%A.impl_witness
  1282. // CHECK:STDOUT: }
  1283. // CHECK:STDOUT:
  1284. // CHECK:STDOUT: class @C {
  1285. // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%C [concrete = constants.%C]
  1286. // CHECK:STDOUT: impl_decl @C.as.Destroy.impl [concrete] {} {}
  1287. // CHECK:STDOUT: %Destroy.impl_witness_table = impl_witness_table (@C.as.Destroy.impl.%C.as.Destroy.impl.Op.decl), @C.as.Destroy.impl [concrete]
  1288. // CHECK:STDOUT: %Destroy.impl_witness: <witness> = impl_witness %Destroy.impl_witness_table [concrete = constants.%Destroy.impl_witness.071]
  1289. // CHECK:STDOUT: %complete_type: <witness> = complete_type_witness constants.%empty_struct_type [concrete = constants.%complete_type]
  1290. // CHECK:STDOUT: complete_type_witness = %complete_type
  1291. // CHECK:STDOUT:
  1292. // CHECK:STDOUT: !members:
  1293. // CHECK:STDOUT: .Self = constants.%C
  1294. // CHECK:STDOUT: }
  1295. // CHECK:STDOUT:
  1296. // CHECK:STDOUT: generic fn @A.G(@A.%Self: %A.type) {
  1297. // CHECK:STDOUT: fn();
  1298. // CHECK:STDOUT: }
  1299. // CHECK:STDOUT:
  1300. // CHECK:STDOUT: fn @C.as.Destroy.impl.Op(%self.param: %ptr.019) = "no_op";
  1301. // CHECK:STDOUT:
  1302. // CHECK:STDOUT: fn @C.as.A.impl.G() {
  1303. // CHECK:STDOUT: !entry:
  1304. // CHECK:STDOUT: return
  1305. // CHECK:STDOUT: }
  1306. // CHECK:STDOUT:
  1307. // CHECK:STDOUT: fn @Fails() {
  1308. // CHECK:STDOUT: !entry:
  1309. // CHECK:STDOUT: %.loc22_5.1: %empty_struct_type = struct_literal ()
  1310. // CHECK:STDOUT: %C.ref.loc22: type = name_ref C, file.%C.decl [concrete = constants.%C]
  1311. // CHECK:STDOUT: %.loc22_5.2: ref %C = temporary_storage
  1312. // CHECK:STDOUT: %.loc22_5.3: init %C = class_init (), %.loc22_5.2 [concrete = constants.%C.val]
  1313. // CHECK:STDOUT: %.loc22_5.4: ref %C = temporary %.loc22_5.2, %.loc22_5.3
  1314. // CHECK:STDOUT: %.loc22_7: ref %C = converted %.loc22_5.1, %.loc22_5.4
  1315. // CHECK:STDOUT: %A.ref.loc22_15: type = name_ref A, file.%A.decl [concrete = constants.%A.type]
  1316. // CHECK:STDOUT: %A.ref.loc22_19: type = name_ref A, file.%A.decl [concrete = constants.%A.type]
  1317. // CHECK:STDOUT: %impl.elem0.loc22: %.fa7 = impl_witness_access constants.%BitAndWith.impl_witness, element0 [concrete = constants.%type.as.BitAndWith.impl.Op]
  1318. // CHECK:STDOUT: %bound_method.loc22: <bound method> = bound_method %A.ref.loc22_15, %impl.elem0.loc22 [concrete = constants.%type.as.BitAndWith.impl.Op.bound]
  1319. // CHECK:STDOUT: %type.as.BitAndWith.impl.Op.call.loc22: init type = call %bound_method.loc22(%A.ref.loc22_15, %A.ref.loc22_19) [concrete = constants.%A.type]
  1320. // CHECK:STDOUT: %G.ref.loc22: %A.assoc_type = name_ref G, @A.%assoc0 [concrete = constants.%assoc0.d52]
  1321. // CHECK:STDOUT: %.loc22_12: %A.type = converted %.loc22_7, <error> [concrete = <error>]
  1322. // CHECK:STDOUT: %.loc30_6.1: %empty_struct_type = struct_literal ()
  1323. // CHECK:STDOUT: %C.ref.loc30_11: type = name_ref C, file.%C.decl [concrete = constants.%C]
  1324. // CHECK:STDOUT: %.loc30_6.2: ref %C = temporary_storage
  1325. // CHECK:STDOUT: %.loc30_6.3: init %C = class_init (), %.loc30_6.2 [concrete = constants.%C.val]
  1326. // CHECK:STDOUT: %.loc30_6.4: ref %C = temporary %.loc30_6.2, %.loc30_6.3
  1327. // CHECK:STDOUT: %.loc30_8: ref %C = converted %.loc30_6.1, %.loc30_6.4
  1328. // CHECK:STDOUT: %C.ref.loc30_18: type = name_ref C, file.%C.decl [concrete = constants.%C]
  1329. // CHECK:STDOUT: %A.ref.loc30_24: type = name_ref A, file.%A.decl [concrete = constants.%A.type]
  1330. // CHECK:STDOUT: %A.ref.loc30_28: type = name_ref A, file.%A.decl [concrete = constants.%A.type]
  1331. // CHECK:STDOUT: %impl.elem0.loc30_26: %.fa7 = impl_witness_access constants.%BitAndWith.impl_witness, element0 [concrete = constants.%type.as.BitAndWith.impl.Op]
  1332. // CHECK:STDOUT: %bound_method.loc30_26: <bound method> = bound_method %A.ref.loc30_24, %impl.elem0.loc30_26 [concrete = constants.%type.as.BitAndWith.impl.Op.bound]
  1333. // CHECK:STDOUT: %type.as.BitAndWith.impl.Op.call.loc30_26: init type = call %bound_method.loc30_26(%A.ref.loc30_24, %A.ref.loc30_28) [concrete = constants.%A.type]
  1334. // CHECK:STDOUT: %.loc30_29.1: type = value_of_initializer %type.as.BitAndWith.impl.Op.call.loc30_26 [concrete = constants.%A.type]
  1335. // CHECK:STDOUT: %.loc30_29.2: type = converted %type.as.BitAndWith.impl.Op.call.loc30_26, %.loc30_29.1 [concrete = constants.%A.type]
  1336. // CHECK:STDOUT: %A.facet.loc30: %A.type = facet_value constants.%C, (constants.%A.impl_witness) [concrete = constants.%A.facet]
  1337. // CHECK:STDOUT: %.loc30_20: %A.type = converted %C.ref.loc30_18, %A.facet.loc30 [concrete = constants.%A.facet]
  1338. // CHECK:STDOUT: %as_type.loc30: type = facet_access_type %.loc30_20 [concrete = constants.%C]
  1339. // CHECK:STDOUT: %.loc30_30: type = converted %.loc30_20, %as_type.loc30 [concrete = constants.%C]
  1340. // CHECK:STDOUT: %A.ref.loc30_35: type = name_ref A, file.%A.decl [concrete = constants.%A.type]
  1341. // CHECK:STDOUT: %A.ref.loc30_39: type = name_ref A, file.%A.decl [concrete = constants.%A.type]
  1342. // CHECK:STDOUT: %impl.elem0.loc30_37: %.fa7 = impl_witness_access constants.%BitAndWith.impl_witness, element0 [concrete = constants.%type.as.BitAndWith.impl.Op]
  1343. // CHECK:STDOUT: %bound_method.loc30_37: <bound method> = bound_method %A.ref.loc30_35, %impl.elem0.loc30_37 [concrete = constants.%type.as.BitAndWith.impl.Op.bound]
  1344. // CHECK:STDOUT: %type.as.BitAndWith.impl.Op.call.loc30_37: init type = call %bound_method.loc30_37(%A.ref.loc30_35, %A.ref.loc30_39) [concrete = constants.%A.type]
  1345. // CHECK:STDOUT: %G.ref.loc30: %A.assoc_type = name_ref G, @A.%assoc0 [concrete = constants.%assoc0.d52]
  1346. // CHECK:STDOUT: %.loc30_32: %A.type = converted %.loc30_8, <error> [concrete = <error>]
  1347. // CHECK:STDOUT: %.loc38_6.1: %empty_struct_type = struct_literal ()
  1348. // CHECK:STDOUT: %C.ref.loc38_11: type = name_ref C, file.%C.decl [concrete = constants.%C]
  1349. // CHECK:STDOUT: %.loc38_6.2: ref %C = temporary_storage
  1350. // CHECK:STDOUT: %.loc38_6.3: init %C = class_init (), %.loc38_6.2 [concrete = constants.%C.val]
  1351. // CHECK:STDOUT: %.loc38_6.4: ref %C = temporary %.loc38_6.2, %.loc38_6.3
  1352. // CHECK:STDOUT: %.loc38_8: ref %C = converted %.loc38_6.1, %.loc38_6.4
  1353. // CHECK:STDOUT: %C.ref.loc38_18: type = name_ref C, file.%C.decl [concrete = constants.%C]
  1354. // CHECK:STDOUT: %A.ref.loc38_24: type = name_ref A, file.%A.decl [concrete = constants.%A.type]
  1355. // CHECK:STDOUT: %A.ref.loc38_28: type = name_ref A, file.%A.decl [concrete = constants.%A.type]
  1356. // CHECK:STDOUT: %impl.elem0.loc38: %.fa7 = impl_witness_access constants.%BitAndWith.impl_witness, element0 [concrete = constants.%type.as.BitAndWith.impl.Op]
  1357. // CHECK:STDOUT: %bound_method.loc38: <bound method> = bound_method %A.ref.loc38_24, %impl.elem0.loc38 [concrete = constants.%type.as.BitAndWith.impl.Op.bound]
  1358. // CHECK:STDOUT: %type.as.BitAndWith.impl.Op.call.loc38: init type = call %bound_method.loc38(%A.ref.loc38_24, %A.ref.loc38_28) [concrete = constants.%A.type]
  1359. // CHECK:STDOUT: %.loc38_29.1: type = value_of_initializer %type.as.BitAndWith.impl.Op.call.loc38 [concrete = constants.%A.type]
  1360. // CHECK:STDOUT: %.loc38_29.2: type = converted %type.as.BitAndWith.impl.Op.call.loc38, %.loc38_29.1 [concrete = constants.%A.type]
  1361. // CHECK:STDOUT: %A.facet.loc38: %A.type = facet_value constants.%C, (constants.%A.impl_witness) [concrete = constants.%A.facet]
  1362. // CHECK:STDOUT: %.loc38_20: %A.type = converted %C.ref.loc38_18, %A.facet.loc38 [concrete = constants.%A.facet]
  1363. // CHECK:STDOUT: %as_type.loc38: type = facet_access_type %.loc38_20 [concrete = constants.%C]
  1364. // CHECK:STDOUT: %.loc38_30: type = converted %.loc38_20, %as_type.loc38 [concrete = constants.%C]
  1365. // CHECK:STDOUT: %A.ref.loc38_34: type = name_ref A, file.%A.decl [concrete = constants.%A.type]
  1366. // CHECK:STDOUT: %G.ref.loc38: %A.assoc_type = name_ref G, @A.%assoc0 [concrete = constants.%assoc0.d52]
  1367. // CHECK:STDOUT: %.loc38_32: %A.type = converted %.loc38_8, <error> [concrete = <error>]
  1368. // CHECK:STDOUT: %C.as.Destroy.impl.Op.bound.loc38: <bound method> = bound_method %.loc38_6.4, constants.%C.as.Destroy.impl.Op
  1369. // CHECK:STDOUT: %addr.loc38: %ptr.019 = addr_of %.loc38_6.4
  1370. // CHECK:STDOUT: %C.as.Destroy.impl.Op.call.loc38: init %empty_tuple.type = call %C.as.Destroy.impl.Op.bound.loc38(%addr.loc38)
  1371. // CHECK:STDOUT: %C.as.Destroy.impl.Op.bound.loc30: <bound method> = bound_method %.loc30_6.4, constants.%C.as.Destroy.impl.Op
  1372. // CHECK:STDOUT: %addr.loc30: %ptr.019 = addr_of %.loc30_6.4
  1373. // CHECK:STDOUT: %C.as.Destroy.impl.Op.call.loc30: init %empty_tuple.type = call %C.as.Destroy.impl.Op.bound.loc30(%addr.loc30)
  1374. // CHECK:STDOUT: %C.as.Destroy.impl.Op.bound.loc22: <bound method> = bound_method %.loc22_5.4, constants.%C.as.Destroy.impl.Op
  1375. // CHECK:STDOUT: %addr.loc22: %ptr.019 = addr_of %.loc22_5.4
  1376. // CHECK:STDOUT: %C.as.Destroy.impl.Op.call.loc22: init %empty_tuple.type = call %C.as.Destroy.impl.Op.bound.loc22(%addr.loc22)
  1377. // CHECK:STDOUT: return
  1378. // CHECK:STDOUT: }
  1379. // CHECK:STDOUT:
  1380. // CHECK:STDOUT: specific @A.G(constants.%Self.0dd) {}
  1381. // CHECK:STDOUT:
  1382. // CHECK:STDOUT: specific @A.G(constants.%A.facet) {}
  1383. // CHECK:STDOUT:
  1384. // CHECK:STDOUT: --- allowed_combine_non_instance.carbon
  1385. // CHECK:STDOUT:
  1386. // CHECK:STDOUT: constants {
  1387. // CHECK:STDOUT: %A.type: type = facet_type <@A> [concrete]
  1388. // CHECK:STDOUT: %Self.0dd: %A.type = bind_symbolic_name Self, 0 [symbolic]
  1389. // CHECK:STDOUT: %A.G.type: type = fn_type @A.G [concrete]
  1390. // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete]
  1391. // CHECK:STDOUT: %A.G: %A.G.type = struct_value () [concrete]
  1392. // CHECK:STDOUT: %A.assoc_type: type = assoc_entity_type @A [concrete]
  1393. // CHECK:STDOUT: %assoc0.d52: %A.assoc_type = assoc_entity element0, @A.%A.G.decl [concrete]
  1394. // CHECK:STDOUT: %C: type = class_type @C [concrete]
  1395. // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete]
  1396. // CHECK:STDOUT: %pattern_type.f6d: type = pattern_type auto [concrete]
  1397. // CHECK:STDOUT: %Destroy.impl_witness: <witness> = impl_witness @C.%Destroy.impl_witness_table [concrete]
  1398. // CHECK:STDOUT: %ptr.019: type = ptr_type %C [concrete]
  1399. // CHECK:STDOUT: %pattern_type.44a: type = pattern_type %ptr.019 [concrete]
  1400. // CHECK:STDOUT: %C.as.Destroy.impl.Op.type: type = fn_type @C.as.Destroy.impl.Op [concrete]
  1401. // CHECK:STDOUT: %C.as.Destroy.impl.Op: %C.as.Destroy.impl.Op.type = struct_value () [concrete]
  1402. // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete]
  1403. // CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %empty_struct_type [concrete]
  1404. // CHECK:STDOUT: %A.impl_witness: <witness> = impl_witness file.%A.impl_witness_table [concrete]
  1405. // CHECK:STDOUT: %C.as.A.impl.G.type: type = fn_type @C.as.A.impl.G [concrete]
  1406. // CHECK:STDOUT: %C.as.A.impl.G: %C.as.A.impl.G.type = struct_value () [concrete]
  1407. // CHECK:STDOUT: %A.facet: %A.type = facet_value %C, (%A.impl_witness) [concrete]
  1408. // CHECK:STDOUT: %Works.type: type = fn_type @Works [concrete]
  1409. // CHECK:STDOUT: %Works: %Works.type = struct_value () [concrete]
  1410. // CHECK:STDOUT: %BitAndWith.type.f2e: type = generic_interface_type @BitAndWith [concrete]
  1411. // CHECK:STDOUT: %BitAndWith.generic: %BitAndWith.type.f2e = struct_value () [concrete]
  1412. // CHECK:STDOUT: %BitAndWith.type.8a6: type = facet_type <@BitAndWith, @BitAndWith(type)> [concrete]
  1413. // CHECK:STDOUT: %BitAndWith.Op.type.9a3: type = fn_type @BitAndWith.Op, @BitAndWith(type) [concrete]
  1414. // CHECK:STDOUT: %BitAndWith.impl_witness: <witness> = impl_witness imports.%BitAndWith.impl_witness_table [concrete]
  1415. // CHECK:STDOUT: %BitAndWith.facet: %BitAndWith.type.8a6 = facet_value type, (%BitAndWith.impl_witness) [concrete]
  1416. // CHECK:STDOUT: %.fa7: type = fn_type_with_self_type %BitAndWith.Op.type.9a3, %BitAndWith.facet [concrete]
  1417. // CHECK:STDOUT: %type.as.BitAndWith.impl.Op.type: type = fn_type @type.as.BitAndWith.impl.Op [concrete]
  1418. // CHECK:STDOUT: %type.as.BitAndWith.impl.Op: %type.as.BitAndWith.impl.Op.type = struct_value () [concrete]
  1419. // CHECK:STDOUT: %type.as.BitAndWith.impl.Op.bound: <bound method> = bound_method %A.type, %type.as.BitAndWith.impl.Op [concrete]
  1420. // CHECK:STDOUT: %.69a: type = fn_type_with_self_type %A.G.type, %A.facet [concrete]
  1421. // CHECK:STDOUT: }
  1422. // CHECK:STDOUT:
  1423. // CHECK:STDOUT: imports {
  1424. // CHECK:STDOUT: %Core: <namespace> = namespace file.%Core.import, [concrete] {
  1425. // CHECK:STDOUT: .Destroy = %Core.Destroy
  1426. // CHECK:STDOUT: .BitAndWith = %Core.BitAndWith
  1427. // CHECK:STDOUT: import Core//prelude
  1428. // CHECK:STDOUT: import Core//prelude/...
  1429. // CHECK:STDOUT: }
  1430. // CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type]
  1431. // CHECK:STDOUT: %Core.BitAndWith: %BitAndWith.type.f2e = import_ref Core//prelude/parts/as, BitAndWith, loaded [concrete = constants.%BitAndWith.generic]
  1432. // CHECK:STDOUT: %Core.import_ref.636: %type.as.BitAndWith.impl.Op.type = import_ref Core//prelude/parts/as, loc25_42, loaded [concrete = constants.%type.as.BitAndWith.impl.Op]
  1433. // CHECK:STDOUT: %BitAndWith.impl_witness_table = impl_witness_table (%Core.import_ref.636), @type.as.BitAndWith.impl [concrete]
  1434. // CHECK:STDOUT: }
  1435. // CHECK:STDOUT:
  1436. // CHECK:STDOUT: file {
  1437. // CHECK:STDOUT: package: <namespace> = namespace [concrete] {
  1438. // CHECK:STDOUT: .Core = imports.%Core
  1439. // CHECK:STDOUT: .A = %A.decl
  1440. // CHECK:STDOUT: .C = %C.decl
  1441. // CHECK:STDOUT: .Works = %Works.decl
  1442. // CHECK:STDOUT: }
  1443. // CHECK:STDOUT: %Core.import = import Core
  1444. // CHECK:STDOUT: %A.decl: type = interface_decl @A [concrete = constants.%A.type] {} {}
  1445. // CHECK:STDOUT: %C.decl: type = class_decl @C [concrete = constants.%C] {} {}
  1446. // CHECK:STDOUT: impl_decl @C.as.A.impl [concrete] {} {
  1447. // CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [concrete = constants.%C]
  1448. // CHECK:STDOUT: %A.ref: type = name_ref A, file.%A.decl [concrete = constants.%A.type]
  1449. // CHECK:STDOUT: }
  1450. // CHECK:STDOUT: %A.impl_witness_table = impl_witness_table (@C.as.A.impl.%C.as.A.impl.G.decl), @C.as.A.impl [concrete]
  1451. // CHECK:STDOUT: %A.impl_witness: <witness> = impl_witness %A.impl_witness_table [concrete = constants.%A.impl_witness]
  1452. // CHECK:STDOUT: %Works.decl: %Works.type = fn_decl @Works [concrete = constants.%Works] {} {}
  1453. // CHECK:STDOUT: }
  1454. // CHECK:STDOUT:
  1455. // CHECK:STDOUT: interface @A {
  1456. // CHECK:STDOUT: %Self: %A.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self.0dd]
  1457. // CHECK:STDOUT: %A.G.decl: %A.G.type = fn_decl @A.G [concrete = constants.%A.G] {} {}
  1458. // CHECK:STDOUT: %assoc0: %A.assoc_type = assoc_entity element0, %A.G.decl [concrete = constants.%assoc0.d52]
  1459. // CHECK:STDOUT:
  1460. // CHECK:STDOUT: !members:
  1461. // CHECK:STDOUT: .Self = %Self
  1462. // CHECK:STDOUT: .G = %assoc0
  1463. // CHECK:STDOUT: witness = (%A.G.decl)
  1464. // CHECK:STDOUT: }
  1465. // CHECK:STDOUT:
  1466. // CHECK:STDOUT: impl @C.as.Destroy.impl: @C.%Self.ref as constants.%Destroy.type {
  1467. // CHECK:STDOUT: %C.as.Destroy.impl.Op.decl: %C.as.Destroy.impl.Op.type = fn_decl @C.as.Destroy.impl.Op [concrete = constants.%C.as.Destroy.impl.Op] {
  1468. // CHECK:STDOUT: %self.patt: %pattern_type.44a = binding_pattern self [concrete]
  1469. // CHECK:STDOUT: %self.param_patt: %pattern_type.44a = value_param_pattern %self.patt, call_param0 [concrete]
  1470. // CHECK:STDOUT: %.loc7: %pattern_type.f6d = addr_pattern %self.param_patt [concrete]
  1471. // CHECK:STDOUT: } {
  1472. // CHECK:STDOUT: %self.param: %ptr.019 = value_param call_param0
  1473. // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%C [concrete = constants.%C]
  1474. // CHECK:STDOUT: %self: %ptr.019 = bind_name self, %self.param
  1475. // CHECK:STDOUT: }
  1476. // CHECK:STDOUT:
  1477. // CHECK:STDOUT: !members:
  1478. // CHECK:STDOUT: .Op = %C.as.Destroy.impl.Op.decl
  1479. // CHECK:STDOUT: witness = @C.%Destroy.impl_witness
  1480. // CHECK:STDOUT: }
  1481. // CHECK:STDOUT:
  1482. // CHECK:STDOUT: impl @C.as.A.impl: %C.ref as %A.ref {
  1483. // CHECK:STDOUT: %C.as.A.impl.G.decl: %C.as.A.impl.G.type = fn_decl @C.as.A.impl.G [concrete = constants.%C.as.A.impl.G] {} {}
  1484. // CHECK:STDOUT:
  1485. // CHECK:STDOUT: !members:
  1486. // CHECK:STDOUT: .G = %C.as.A.impl.G.decl
  1487. // CHECK:STDOUT: witness = file.%A.impl_witness
  1488. // CHECK:STDOUT: }
  1489. // CHECK:STDOUT:
  1490. // CHECK:STDOUT: class @C {
  1491. // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%C [concrete = constants.%C]
  1492. // CHECK:STDOUT: impl_decl @C.as.Destroy.impl [concrete] {} {}
  1493. // CHECK:STDOUT: %Destroy.impl_witness_table = impl_witness_table (@C.as.Destroy.impl.%C.as.Destroy.impl.Op.decl), @C.as.Destroy.impl [concrete]
  1494. // CHECK:STDOUT: %Destroy.impl_witness: <witness> = impl_witness %Destroy.impl_witness_table [concrete = constants.%Destroy.impl_witness]
  1495. // CHECK:STDOUT: %complete_type: <witness> = complete_type_witness constants.%empty_struct_type [concrete = constants.%complete_type]
  1496. // CHECK:STDOUT: complete_type_witness = %complete_type
  1497. // CHECK:STDOUT:
  1498. // CHECK:STDOUT: !members:
  1499. // CHECK:STDOUT: .Self = constants.%C
  1500. // CHECK:STDOUT: }
  1501. // CHECK:STDOUT:
  1502. // CHECK:STDOUT: generic fn @A.G(@A.%Self: %A.type) {
  1503. // CHECK:STDOUT: fn();
  1504. // CHECK:STDOUT: }
  1505. // CHECK:STDOUT:
  1506. // CHECK:STDOUT: fn @C.as.Destroy.impl.Op(%self.param: %ptr.019) = "no_op";
  1507. // CHECK:STDOUT:
  1508. // CHECK:STDOUT: fn @C.as.A.impl.G() {
  1509. // CHECK:STDOUT: !entry:
  1510. // CHECK:STDOUT: return
  1511. // CHECK:STDOUT: }
  1512. // CHECK:STDOUT:
  1513. // CHECK:STDOUT: fn @Works() {
  1514. // CHECK:STDOUT: !entry:
  1515. // CHECK:STDOUT: %C.ref.loc13: type = name_ref C, file.%C.decl [concrete = constants.%C]
  1516. // CHECK:STDOUT: %A.ref.loc13_7: type = name_ref A, file.%A.decl [concrete = constants.%A.type]
  1517. // CHECK:STDOUT: %A.ref.loc13_11: type = name_ref A, file.%A.decl [concrete = constants.%A.type]
  1518. // CHECK:STDOUT: %impl.elem0.loc13_9: %.fa7 = impl_witness_access constants.%BitAndWith.impl_witness, element0 [concrete = constants.%type.as.BitAndWith.impl.Op]
  1519. // CHECK:STDOUT: %bound_method.loc13: <bound method> = bound_method %A.ref.loc13_7, %impl.elem0.loc13_9 [concrete = constants.%type.as.BitAndWith.impl.Op.bound]
  1520. // CHECK:STDOUT: %type.as.BitAndWith.impl.Op.call.loc13: init type = call %bound_method.loc13(%A.ref.loc13_7, %A.ref.loc13_11) [concrete = constants.%A.type]
  1521. // CHECK:STDOUT: %G.ref.loc13: %A.assoc_type = name_ref G, @A.%assoc0 [concrete = constants.%assoc0.d52]
  1522. // CHECK:STDOUT: %A.facet.loc13: %A.type = facet_value constants.%C, (constants.%A.impl_witness) [concrete = constants.%A.facet]
  1523. // CHECK:STDOUT: %.loc13: %A.type = converted %C.ref.loc13, %A.facet.loc13 [concrete = constants.%A.facet]
  1524. // CHECK:STDOUT: %impl.elem0.loc13_4: %.69a = impl_witness_access constants.%A.impl_witness, element0 [concrete = constants.%C.as.A.impl.G]
  1525. // CHECK:STDOUT: %C.as.A.impl.G.call.loc13: init %empty_tuple.type = call %impl.elem0.loc13_4()
  1526. // CHECK:STDOUT: %C.ref.loc14: type = name_ref C, file.%C.decl [concrete = constants.%C]
  1527. // CHECK:STDOUT: %A.ref.loc14_10: type = name_ref A, file.%A.decl [concrete = constants.%A.type]
  1528. // CHECK:STDOUT: %A.ref.loc14_14: type = name_ref A, file.%A.decl [concrete = constants.%A.type]
  1529. // CHECK:STDOUT: %impl.elem0.loc14_12: %.fa7 = impl_witness_access constants.%BitAndWith.impl_witness, element0 [concrete = constants.%type.as.BitAndWith.impl.Op]
  1530. // CHECK:STDOUT: %bound_method.loc14_12: <bound method> = bound_method %A.ref.loc14_10, %impl.elem0.loc14_12 [concrete = constants.%type.as.BitAndWith.impl.Op.bound]
  1531. // CHECK:STDOUT: %type.as.BitAndWith.impl.Op.call.loc14_12: init type = call %bound_method.loc14_12(%A.ref.loc14_10, %A.ref.loc14_14) [concrete = constants.%A.type]
  1532. // CHECK:STDOUT: %.loc14_15.1: type = value_of_initializer %type.as.BitAndWith.impl.Op.call.loc14_12 [concrete = constants.%A.type]
  1533. // CHECK:STDOUT: %.loc14_15.2: type = converted %type.as.BitAndWith.impl.Op.call.loc14_12, %.loc14_15.1 [concrete = constants.%A.type]
  1534. // CHECK:STDOUT: %A.facet.loc14: %A.type = facet_value constants.%C, (constants.%A.impl_witness) [concrete = constants.%A.facet]
  1535. // CHECK:STDOUT: %.loc14_6: %A.type = converted %C.ref.loc14, %A.facet.loc14 [concrete = constants.%A.facet]
  1536. // CHECK:STDOUT: %A.ref.loc14_20: type = name_ref A, file.%A.decl [concrete = constants.%A.type]
  1537. // CHECK:STDOUT: %A.ref.loc14_24: type = name_ref A, file.%A.decl [concrete = constants.%A.type]
  1538. // CHECK:STDOUT: %impl.elem0.loc14_22: %.fa7 = impl_witness_access constants.%BitAndWith.impl_witness, element0 [concrete = constants.%type.as.BitAndWith.impl.Op]
  1539. // CHECK:STDOUT: %bound_method.loc14_22: <bound method> = bound_method %A.ref.loc14_20, %impl.elem0.loc14_22 [concrete = constants.%type.as.BitAndWith.impl.Op.bound]
  1540. // CHECK:STDOUT: %type.as.BitAndWith.impl.Op.call.loc14_22: init type = call %bound_method.loc14_22(%A.ref.loc14_20, %A.ref.loc14_24) [concrete = constants.%A.type]
  1541. // CHECK:STDOUT: %G.ref.loc14: %A.assoc_type = name_ref G, @A.%assoc0 [concrete = constants.%assoc0.d52]
  1542. // CHECK:STDOUT: %impl.elem0.loc14_17: %.69a = impl_witness_access constants.%A.impl_witness, element0 [concrete = constants.%C.as.A.impl.G]
  1543. // CHECK:STDOUT: %C.as.A.impl.G.call.loc14: init %empty_tuple.type = call %impl.elem0.loc14_17()
  1544. // CHECK:STDOUT: %C.ref.loc15: type = name_ref C, file.%C.decl [concrete = constants.%C]
  1545. // CHECK:STDOUT: %A.ref.loc15_10: type = name_ref A, file.%A.decl [concrete = constants.%A.type]
  1546. // CHECK:STDOUT: %A.ref.loc15_14: type = name_ref A, file.%A.decl [concrete = constants.%A.type]
  1547. // CHECK:STDOUT: %impl.elem0.loc15_12: %.fa7 = impl_witness_access constants.%BitAndWith.impl_witness, element0 [concrete = constants.%type.as.BitAndWith.impl.Op]
  1548. // CHECK:STDOUT: %bound_method.loc15: <bound method> = bound_method %A.ref.loc15_10, %impl.elem0.loc15_12 [concrete = constants.%type.as.BitAndWith.impl.Op.bound]
  1549. // CHECK:STDOUT: %type.as.BitAndWith.impl.Op.call.loc15: init type = call %bound_method.loc15(%A.ref.loc15_10, %A.ref.loc15_14) [concrete = constants.%A.type]
  1550. // CHECK:STDOUT: %.loc15_15.1: type = value_of_initializer %type.as.BitAndWith.impl.Op.call.loc15 [concrete = constants.%A.type]
  1551. // CHECK:STDOUT: %.loc15_15.2: type = converted %type.as.BitAndWith.impl.Op.call.loc15, %.loc15_15.1 [concrete = constants.%A.type]
  1552. // CHECK:STDOUT: %A.facet.loc15: %A.type = facet_value constants.%C, (constants.%A.impl_witness) [concrete = constants.%A.facet]
  1553. // CHECK:STDOUT: %.loc15_6: %A.type = converted %C.ref.loc15, %A.facet.loc15 [concrete = constants.%A.facet]
  1554. // CHECK:STDOUT: %A.ref.loc15_19: type = name_ref A, file.%A.decl [concrete = constants.%A.type]
  1555. // CHECK:STDOUT: %G.ref.loc15: %A.assoc_type = name_ref G, @A.%assoc0 [concrete = constants.%assoc0.d52]
  1556. // CHECK:STDOUT: %impl.elem0.loc15_17: %.69a = impl_witness_access constants.%A.impl_witness, element0 [concrete = constants.%C.as.A.impl.G]
  1557. // CHECK:STDOUT: %C.as.A.impl.G.call.loc15: init %empty_tuple.type = call %impl.elem0.loc15_17()
  1558. // CHECK:STDOUT: return
  1559. // CHECK:STDOUT: }
  1560. // CHECK:STDOUT:
  1561. // CHECK:STDOUT: specific @A.G(constants.%Self.0dd) {}
  1562. // CHECK:STDOUT:
  1563. // CHECK:STDOUT: specific @A.G(constants.%A.facet) {}
  1564. // CHECK:STDOUT: