generic_method.carbon 106 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294
  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/generic_method.carbon
  12. // TIP: To dump output, run:
  13. // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/check/testdata/interface/generic_method.carbon
  14. // --- generic_method_fewer_params.carbon
  15. library "[[@TEST_NAME]]";
  16. // T has index 0, Self has index 1, U has index 2.
  17. interface A(T:! type) {
  18. fn F(U:! type, u: U*) -> (T, Self, U*);
  19. }
  20. class X {}
  21. class Y {}
  22. class Z {}
  23. impl Y as A(X) {
  24. // Here, U has index 0. The specific used for A.F needs to renumber its U from
  25. // index 2 to index 0.
  26. fn F(U:! type, u: U*) -> (X, Y, U*) {
  27. return ({}, {}, u);
  28. }
  29. }
  30. fn Call() {
  31. var u: Z;
  32. (Y as A(X)).F(Z, &u);
  33. }
  34. fn CallGeneric(T:! A(X)) {
  35. var u: Z;
  36. T.F(Z, &u);
  37. }
  38. fn CallIndirect() {
  39. CallGeneric(Y);
  40. }
  41. // --- generic_method_more_params.carbon
  42. library "[[@TEST_NAME]]";
  43. // T has index 0, Self has index 1, U has index 2.
  44. interface A(T:! type) {
  45. fn F(U:! type, u: U) -> (T, Self, U);
  46. }
  47. class X {}
  48. class Y1 {}
  49. class Y2 {}
  50. class Z {}
  51. impl forall [V1:! type, V2:! type, W:! type] (V1, V2) as A(W) {
  52. // Here, U has index 3. The specific used for A.F needs to renumber its U from
  53. // index 2 to index 3.
  54. fn F(U:! type, u: U) -> (W, (V1, V2), U) {
  55. return F(U, u);
  56. }
  57. }
  58. fn Call() {
  59. // TODO: The `as type` here should not be necessary.
  60. (((Y1, Y2) as type) as A(X)).F(Z, {});
  61. }
  62. fn CallGeneric(T:! A(X)) {
  63. T.F(Z, {});
  64. }
  65. fn CallIndirect() {
  66. // TODO: The `as type` here should not be necessary.
  67. CallGeneric((Y1, Y2) as type);
  68. }
  69. // CHECK:STDOUT: --- generic_method_fewer_params.carbon
  70. // CHECK:STDOUT:
  71. // CHECK:STDOUT: constants {
  72. // CHECK:STDOUT: %type: type = facet_type <type> [concrete]
  73. // CHECK:STDOUT: %.Self: %type = bind_symbolic_name .Self [symbolic_self]
  74. // CHECK:STDOUT: %T.8b3: type = bind_symbolic_name T, 0 [symbolic]
  75. // CHECK:STDOUT: %pattern_type.98f: type = pattern_type type [concrete]
  76. // CHECK:STDOUT: %A.type.495: type = generic_interface_type @A [concrete]
  77. // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete]
  78. // CHECK:STDOUT: %A.generic: %A.type.495 = struct_value () [concrete]
  79. // CHECK:STDOUT: %A.type.d88: type = facet_type <@A, @A(%T.8b3)> [symbolic]
  80. // CHECK:STDOUT: %Self.c6b: %A.type.d88 = bind_symbolic_name Self, 1 [symbolic]
  81. // CHECK:STDOUT: %U.2cb: type = bind_symbolic_name U, 2 [symbolic]
  82. // CHECK:STDOUT: %ptr.204: type = ptr_type %U.2cb [symbolic]
  83. // CHECK:STDOUT: %pattern_type.eee: type = pattern_type %ptr.204 [symbolic]
  84. // CHECK:STDOUT: %tuple.type.098: type = tuple_type (type, %A.type.d88, type) [symbolic]
  85. // CHECK:STDOUT: %Self.binding.as_type.0eb: type = symbolic_binding_type Self, 1, %Self.c6b [symbolic]
  86. // CHECK:STDOUT: %tuple.type.eee: type = tuple_type (%T.8b3, %Self.binding.as_type.0eb, %ptr.204) [symbolic]
  87. // CHECK:STDOUT: %pattern_type.e5a: type = pattern_type %tuple.type.eee [symbolic]
  88. // CHECK:STDOUT: %A.F.type.17a: type = fn_type @A.F, @A(%T.8b3) [symbolic]
  89. // CHECK:STDOUT: %A.F.0d8: %A.F.type.17a = struct_value () [symbolic]
  90. // CHECK:STDOUT: %A.assoc_type.ed3: type = assoc_entity_type @A, @A(%T.8b3) [symbolic]
  91. // CHECK:STDOUT: %assoc0.fcb: %A.assoc_type.ed3 = assoc_entity element0, @A.%A.F.decl [symbolic]
  92. // CHECK:STDOUT: %X: type = class_type @X [concrete]
  93. // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete]
  94. // CHECK:STDOUT: %complete_type.357: <witness> = complete_type_witness %empty_struct_type [concrete]
  95. // CHECK:STDOUT: %Y: type = class_type @Y [concrete]
  96. // CHECK:STDOUT: %Z: type = class_type @Z [concrete]
  97. // CHECK:STDOUT: %A.type.0a4: type = facet_type <@A, @A(%X)> [concrete]
  98. // CHECK:STDOUT: %Self.08e: %A.type.0a4 = bind_symbolic_name Self, 1 [symbolic]
  99. // CHECK:STDOUT: %A.F.type.13d: type = fn_type @A.F, @A(%X) [concrete]
  100. // CHECK:STDOUT: %A.F.d83: %A.F.type.13d = struct_value () [concrete]
  101. // CHECK:STDOUT: %A.assoc_type.296: type = assoc_entity_type @A, @A(%X) [concrete]
  102. // CHECK:STDOUT: %assoc0.5f6: %A.assoc_type.296 = assoc_entity element0, @A.%A.F.decl [concrete]
  103. // CHECK:STDOUT: %A.impl_witness: <witness> = impl_witness file.%A.impl_witness_table [concrete]
  104. // CHECK:STDOUT: %U.8b3: type = bind_symbolic_name U, 0 [symbolic]
  105. // CHECK:STDOUT: %ptr.79f131.1: type = ptr_type %U.8b3 [symbolic]
  106. // CHECK:STDOUT: %pattern_type.afe393.1: type = pattern_type %ptr.79f131.1 [symbolic]
  107. // CHECK:STDOUT: %tuple.type.ff9: type = tuple_type (type, type, type) [concrete]
  108. // CHECK:STDOUT: %tuple.type.c14: type = tuple_type (%X, %Y, %ptr.79f131.1) [symbolic]
  109. // CHECK:STDOUT: %pattern_type.ac9: type = pattern_type %tuple.type.c14 [symbolic]
  110. // CHECK:STDOUT: %Y.as.A.impl.F.type: type = fn_type @Y.as.A.impl.F [concrete]
  111. // CHECK:STDOUT: %Y.as.A.impl.F: %Y.as.A.impl.F.type = struct_value () [concrete]
  112. // CHECK:STDOUT: %A.facet: %A.type.0a4 = facet_value %Y, (%A.impl_witness) [concrete]
  113. // CHECK:STDOUT: %tuple.type.5a1: type = tuple_type (type, %A.type.0a4, type) [concrete]
  114. // CHECK:STDOUT: %require_complete.86f: <witness> = require_complete_type %tuple.type.c14 [symbolic]
  115. // CHECK:STDOUT: %require_complete.6e5e64.1: <witness> = require_complete_type %ptr.79f131.1 [symbolic]
  116. // CHECK:STDOUT: %tuple.type.e44: type = tuple_type (%empty_struct_type, %empty_struct_type, %ptr.79f131.1) [symbolic]
  117. // CHECK:STDOUT: %X.val: %X = struct_value () [concrete]
  118. // CHECK:STDOUT: %Y.val: %Y = struct_value () [concrete]
  119. // CHECK:STDOUT: %Copy.type: type = facet_type <@Copy> [concrete]
  120. // CHECK:STDOUT: %Copy.Op.type: type = fn_type @Copy.Op [concrete]
  121. // CHECK:STDOUT: %ptr.as.Copy.impl.Op.type.31ff4e.1: type = fn_type @ptr.as.Copy.impl.Op, @ptr.as.Copy.impl(%T.8b3) [symbolic]
  122. // CHECK:STDOUT: %ptr.as.Copy.impl.Op.8a8b1a.1: %ptr.as.Copy.impl.Op.type.31ff4e.1 = struct_value () [symbolic]
  123. // CHECK:STDOUT: %Copy.lookup_impl_witness.cb2: <witness> = lookup_impl_witness %ptr.79f131.1, @Copy [symbolic]
  124. // CHECK:STDOUT: %Copy.facet.2d1: %Copy.type = facet_value %ptr.79f131.1, (%Copy.lookup_impl_witness.cb2) [symbolic]
  125. // CHECK:STDOUT: %.1cc: type = fn_type_with_self_type %Copy.Op.type, %Copy.facet.2d1 [symbolic]
  126. // CHECK:STDOUT: %impl.elem0.751: %.1cc = impl_witness_access %Copy.lookup_impl_witness.cb2, element0 [symbolic]
  127. // CHECK:STDOUT: %specific_impl_fn.f44: <specific function> = specific_impl_function %impl.elem0.751, @Copy.Op(%Copy.facet.2d1) [symbolic]
  128. // CHECK:STDOUT: %Call.type: type = fn_type @Call [concrete]
  129. // CHECK:STDOUT: %Call: %Call.type = struct_value () [concrete]
  130. // CHECK:STDOUT: %pattern_type.8f9: type = pattern_type %Z [concrete]
  131. // CHECK:STDOUT: %.d35: type = fn_type_with_self_type %A.F.type.13d, %A.facet [concrete]
  132. // CHECK:STDOUT: %ptr.fb6: type = ptr_type %Z [concrete]
  133. // CHECK:STDOUT: %pattern_type.f76: type = pattern_type %ptr.fb6 [concrete]
  134. // CHECK:STDOUT: %tuple.type.092: type = tuple_type (%X, %Y, %ptr.fb6) [concrete]
  135. // CHECK:STDOUT: %pattern_type.48d: type = pattern_type %tuple.type.092 [concrete]
  136. // CHECK:STDOUT: %Y.as.A.impl.F.specific_fn: <specific function> = specific_function %Y.as.A.impl.F, @Y.as.A.impl.F(%Z) [concrete]
  137. // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete]
  138. // CHECK:STDOUT: %Destroy.Op.type: type = fn_type @Destroy.Op [concrete]
  139. // CHECK:STDOUT: %type_where: type = facet_type <type where .Self impls <CanDestroy>> [concrete]
  140. // CHECK:STDOUT: %DestroyT: %type_where = bind_symbolic_name DestroyT, 0 [symbolic]
  141. // CHECK:STDOUT: %DestroyT.binding.as_type.as.Destroy.impl.Op.type.b5d: type = fn_type @DestroyT.binding.as_type.as.Destroy.impl.Op, @DestroyT.binding.as_type.as.Destroy.impl(%DestroyT) [symbolic]
  142. // CHECK:STDOUT: %DestroyT.binding.as_type.as.Destroy.impl.Op.544: %DestroyT.binding.as_type.as.Destroy.impl.Op.type.b5d = struct_value () [symbolic]
  143. // CHECK:STDOUT: %facet_value.352: %type_where = facet_value %tuple.type.092, () [concrete]
  144. // CHECK:STDOUT: %Destroy.impl_witness.0cc: <witness> = impl_witness imports.%Destroy.impl_witness_table, @DestroyT.binding.as_type.as.Destroy.impl(%facet_value.352) [concrete]
  145. // CHECK:STDOUT: %DestroyT.binding.as_type.as.Destroy.impl.Op.type.092: type = fn_type @DestroyT.binding.as_type.as.Destroy.impl.Op, @DestroyT.binding.as_type.as.Destroy.impl(%facet_value.352) [concrete]
  146. // CHECK:STDOUT: %DestroyT.binding.as_type.as.Destroy.impl.Op.3da: %DestroyT.binding.as_type.as.Destroy.impl.Op.type.092 = struct_value () [concrete]
  147. // CHECK:STDOUT: %ptr.5df: type = ptr_type %tuple.type.092 [concrete]
  148. // CHECK:STDOUT: %complete_type.aab: <witness> = complete_type_witness %ptr.5df [concrete]
  149. // CHECK:STDOUT: %Destroy.facet.f67: %Destroy.type = facet_value %tuple.type.092, (%Destroy.impl_witness.0cc) [concrete]
  150. // CHECK:STDOUT: %.620: type = fn_type_with_self_type %Destroy.Op.type, %Destroy.facet.f67 [concrete]
  151. // CHECK:STDOUT: %DestroyT.binding.as_type.as.Destroy.impl.Op.specific_fn.cd3: <specific function> = specific_function %DestroyT.binding.as_type.as.Destroy.impl.Op.3da, @DestroyT.binding.as_type.as.Destroy.impl.Op(%facet_value.352) [concrete]
  152. // CHECK:STDOUT: %facet_value.4e3: %type_where = facet_value %Z, () [concrete]
  153. // CHECK:STDOUT: %DestroyT.binding.as_type.as.Destroy.impl.Op.type.766: type = fn_type @DestroyT.binding.as_type.as.Destroy.impl.Op, @DestroyT.binding.as_type.as.Destroy.impl(%facet_value.4e3) [concrete]
  154. // CHECK:STDOUT: %DestroyT.binding.as_type.as.Destroy.impl.Op.8e8: %DestroyT.binding.as_type.as.Destroy.impl.Op.type.766 = struct_value () [concrete]
  155. // CHECK:STDOUT: %complete_type.d3e: <witness> = complete_type_witness %ptr.fb6 [concrete]
  156. // CHECK:STDOUT: %DestroyT.binding.as_type.as.Destroy.impl.Op.specific_fn.97f: <specific function> = specific_function %DestroyT.binding.as_type.as.Destroy.impl.Op.8e8, @DestroyT.binding.as_type.as.Destroy.impl.Op(%facet_value.4e3) [concrete]
  157. // CHECK:STDOUT: %T.7bf: %A.type.0a4 = bind_symbolic_name T, 0 [symbolic]
  158. // CHECK:STDOUT: %pattern_type.809: type = pattern_type %A.type.0a4 [concrete]
  159. // CHECK:STDOUT: %CallGeneric.type: type = fn_type @CallGeneric [concrete]
  160. // CHECK:STDOUT: %CallGeneric: %CallGeneric.type = struct_value () [concrete]
  161. // CHECK:STDOUT: %T.binding.as_type.4c5: type = symbolic_binding_type T, 0, %T.7bf [symbolic]
  162. // CHECK:STDOUT: %A.lookup_impl_witness: <witness> = lookup_impl_witness %T.7bf, @A, @A(%X) [symbolic]
  163. // CHECK:STDOUT: %.0c6: type = fn_type_with_self_type %A.F.type.13d, %T.7bf [symbolic]
  164. // CHECK:STDOUT: %impl.elem0.dd2: %.0c6 = impl_witness_access %A.lookup_impl_witness, element0 [symbolic]
  165. // CHECK:STDOUT: %tuple.type.6ee: type = tuple_type (%X, %T.binding.as_type.4c5, %ptr.fb6) [symbolic]
  166. // CHECK:STDOUT: %pattern_type.4fd: type = pattern_type %tuple.type.6ee [symbolic]
  167. // CHECK:STDOUT: %specific_impl_fn.304: <specific function> = specific_impl_function %impl.elem0.dd2, @A.F(%X, %T.7bf, %Z) [symbolic]
  168. // CHECK:STDOUT: %require_complete.439: <witness> = require_complete_type %tuple.type.6ee [symbolic]
  169. // CHECK:STDOUT: %facet_value.017: %type_where = facet_value %tuple.type.6ee, () [symbolic]
  170. // CHECK:STDOUT: %Destroy.impl_witness.5b3: <witness> = impl_witness imports.%Destroy.impl_witness_table, @DestroyT.binding.as_type.as.Destroy.impl(%facet_value.017) [symbolic]
  171. // CHECK:STDOUT: %DestroyT.binding.as_type.as.Destroy.impl.Op.type.e71: type = fn_type @DestroyT.binding.as_type.as.Destroy.impl.Op, @DestroyT.binding.as_type.as.Destroy.impl(%facet_value.017) [symbolic]
  172. // CHECK:STDOUT: %DestroyT.binding.as_type.as.Destroy.impl.Op.833: %DestroyT.binding.as_type.as.Destroy.impl.Op.type.e71 = struct_value () [symbolic]
  173. // CHECK:STDOUT: %ptr.641a: type = ptr_type %tuple.type.6ee [symbolic]
  174. // CHECK:STDOUT: %require_complete.3d6: <witness> = require_complete_type %ptr.641a [symbolic]
  175. // CHECK:STDOUT: %Destroy.facet.b1d: %Destroy.type = facet_value %tuple.type.6ee, (%Destroy.impl_witness.5b3) [symbolic]
  176. // CHECK:STDOUT: %.dff: type = fn_type_with_self_type %Destroy.Op.type, %Destroy.facet.b1d [symbolic]
  177. // CHECK:STDOUT: %DestroyT.binding.as_type.as.Destroy.impl.Op.specific_fn.446: <specific function> = specific_function %DestroyT.binding.as_type.as.Destroy.impl.Op.833, @DestroyT.binding.as_type.as.Destroy.impl.Op(%facet_value.017) [symbolic]
  178. // CHECK:STDOUT: %CallIndirect.type: type = fn_type @CallIndirect [concrete]
  179. // CHECK:STDOUT: %CallIndirect: %CallIndirect.type = struct_value () [concrete]
  180. // CHECK:STDOUT: %CallGeneric.specific_fn: <specific function> = specific_function %CallGeneric, @CallGeneric(%A.facet) [concrete]
  181. // CHECK:STDOUT: %complete_type.05d: <witness> = complete_type_witness %tuple.type.092 [concrete]
  182. // CHECK:STDOUT: %tuple.type.953: type = tuple_type (%empty_struct_type, %empty_struct_type, %ptr.fb6) [concrete]
  183. // CHECK:STDOUT: %Copy.impl_witness.4b2: <witness> = impl_witness imports.%Copy.impl_witness_table.53c, @ptr.as.Copy.impl(%Z) [concrete]
  184. // CHECK:STDOUT: %ptr.as.Copy.impl.Op.type.8a3: type = fn_type @ptr.as.Copy.impl.Op, @ptr.as.Copy.impl(%Z) [concrete]
  185. // CHECK:STDOUT: %ptr.as.Copy.impl.Op.0c5: %ptr.as.Copy.impl.Op.type.8a3 = struct_value () [concrete]
  186. // CHECK:STDOUT: %Copy.facet.cd8: %Copy.type = facet_value %ptr.fb6, (%Copy.impl_witness.4b2) [concrete]
  187. // CHECK:STDOUT: %.7f9: type = fn_type_with_self_type %Copy.Op.type, %Copy.facet.cd8 [concrete]
  188. // CHECK:STDOUT: %ptr.as.Copy.impl.Op.specific_fn: <specific function> = specific_function %ptr.as.Copy.impl.Op.0c5, @ptr.as.Copy.impl.Op(%Z) [concrete]
  189. // CHECK:STDOUT: }
  190. // CHECK:STDOUT:
  191. // CHECK:STDOUT: imports {
  192. // CHECK:STDOUT: %Core: <namespace> = namespace file.%Core.import, [concrete] {
  193. // CHECK:STDOUT: .Copy = %Core.Copy
  194. // CHECK:STDOUT: .Destroy = %Core.Destroy
  195. // CHECK:STDOUT: import Core//prelude
  196. // CHECK:STDOUT: import Core//prelude/...
  197. // CHECK:STDOUT: }
  198. // CHECK:STDOUT: %Core.Copy: type = import_ref Core//prelude/parts/copy, Copy, loaded [concrete = constants.%Copy.type]
  199. // CHECK:STDOUT: %Core.import_ref.0e4: @ptr.as.Copy.impl.%ptr.as.Copy.impl.Op.type (%ptr.as.Copy.impl.Op.type.31ff4e.1) = import_ref Core//prelude/parts/copy, loc{{\d+_\d+}}, loaded [symbolic = @ptr.as.Copy.impl.%ptr.as.Copy.impl.Op (constants.%ptr.as.Copy.impl.Op.8a8b1a.1)]
  200. // CHECK:STDOUT: %Copy.impl_witness_table.53c = impl_witness_table (%Core.import_ref.0e4), @ptr.as.Copy.impl [concrete]
  201. // CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type]
  202. // CHECK:STDOUT: %Core.import_ref.950: @DestroyT.binding.as_type.as.Destroy.impl.%DestroyT.binding.as_type.as.Destroy.impl.Op.type (%DestroyT.binding.as_type.as.Destroy.impl.Op.type.b5d) = import_ref Core//prelude/parts/destroy, loc{{\d+_\d+}}, loaded [symbolic = @DestroyT.binding.as_type.as.Destroy.impl.%DestroyT.binding.as_type.as.Destroy.impl.Op (constants.%DestroyT.binding.as_type.as.Destroy.impl.Op.544)]
  203. // CHECK:STDOUT: %Destroy.impl_witness_table = impl_witness_table (%Core.import_ref.950), @DestroyT.binding.as_type.as.Destroy.impl [concrete]
  204. // CHECK:STDOUT: }
  205. // CHECK:STDOUT:
  206. // CHECK:STDOUT: file {
  207. // CHECK:STDOUT: package: <namespace> = namespace [concrete] {
  208. // CHECK:STDOUT: .Core = imports.%Core
  209. // CHECK:STDOUT: .A = %A.decl
  210. // CHECK:STDOUT: .X = %X.decl
  211. // CHECK:STDOUT: .Y = %Y.decl
  212. // CHECK:STDOUT: .Z = %Z.decl
  213. // CHECK:STDOUT: .Call = %Call.decl
  214. // CHECK:STDOUT: .CallGeneric = %CallGeneric.decl
  215. // CHECK:STDOUT: .CallIndirect = %CallIndirect.decl
  216. // CHECK:STDOUT: }
  217. // CHECK:STDOUT: %Core.import = import Core
  218. // CHECK:STDOUT: %A.decl: %A.type.495 = interface_decl @A [concrete = constants.%A.generic] {
  219. // CHECK:STDOUT: %T.patt: %pattern_type.98f = symbolic_binding_pattern T, 0 [concrete]
  220. // CHECK:STDOUT: } {
  221. // CHECK:STDOUT: %.Self: %type = bind_symbolic_name .Self [symbolic_self = constants.%.Self]
  222. // CHECK:STDOUT: %T.loc5_13.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc5_13.1 (constants.%T.8b3)]
  223. // CHECK:STDOUT: }
  224. // CHECK:STDOUT: %X.decl: type = class_decl @X [concrete = constants.%X] {} {}
  225. // CHECK:STDOUT: %Y.decl: type = class_decl @Y [concrete = constants.%Y] {} {}
  226. // CHECK:STDOUT: %Z.decl: type = class_decl @Z [concrete = constants.%Z] {} {}
  227. // CHECK:STDOUT: impl_decl @Y.as.A.impl [concrete] {} {
  228. // CHECK:STDOUT: %Y.ref: type = name_ref Y, file.%Y.decl [concrete = constants.%Y]
  229. // CHECK:STDOUT: %A.ref: %A.type.495 = name_ref A, file.%A.decl [concrete = constants.%A.generic]
  230. // CHECK:STDOUT: %X.ref: type = name_ref X, file.%X.decl [concrete = constants.%X]
  231. // CHECK:STDOUT: %A.type: type = facet_type <@A, @A(constants.%X)> [concrete = constants.%A.type.0a4]
  232. // CHECK:STDOUT: }
  233. // CHECK:STDOUT: %A.impl_witness_table = impl_witness_table (@Y.as.A.impl.%Y.as.A.impl.F.decl), @Y.as.A.impl [concrete]
  234. // CHECK:STDOUT: %A.impl_witness: <witness> = impl_witness %A.impl_witness_table [concrete = constants.%A.impl_witness]
  235. // CHECK:STDOUT: %Call.decl: %Call.type = fn_decl @Call [concrete = constants.%Call] {} {}
  236. // CHECK:STDOUT: %CallGeneric.decl: %CallGeneric.type = fn_decl @CallGeneric [concrete = constants.%CallGeneric] {
  237. // CHECK:STDOUT: %T.patt: %pattern_type.809 = symbolic_binding_pattern T, 0 [concrete]
  238. // CHECK:STDOUT: } {
  239. // CHECK:STDOUT: %.loc26: type = splice_block %A.type [concrete = constants.%A.type.0a4] {
  240. // CHECK:STDOUT: %.Self: %type = bind_symbolic_name .Self [symbolic_self = constants.%.Self]
  241. // CHECK:STDOUT: %A.ref: %A.type.495 = name_ref A, file.%A.decl [concrete = constants.%A.generic]
  242. // CHECK:STDOUT: %X.ref: type = name_ref X, file.%X.decl [concrete = constants.%X]
  243. // CHECK:STDOUT: %A.type: type = facet_type <@A, @A(constants.%X)> [concrete = constants.%A.type.0a4]
  244. // CHECK:STDOUT: }
  245. // CHECK:STDOUT: %T.loc26_16.2: %A.type.0a4 = bind_symbolic_name T, 0 [symbolic = %T.loc26_16.1 (constants.%T.7bf)]
  246. // CHECK:STDOUT: }
  247. // CHECK:STDOUT: %CallIndirect.decl: %CallIndirect.type = fn_decl @CallIndirect [concrete = constants.%CallIndirect] {} {}
  248. // CHECK:STDOUT: }
  249. // CHECK:STDOUT:
  250. // CHECK:STDOUT: generic interface @A(%T.loc5_13.2: type) {
  251. // CHECK:STDOUT: %T.loc5_13.1: type = bind_symbolic_name T, 0 [symbolic = %T.loc5_13.1 (constants.%T.8b3)]
  252. // CHECK:STDOUT:
  253. // CHECK:STDOUT: !definition:
  254. // CHECK:STDOUT: %A.type: type = facet_type <@A, @A(%T.loc5_13.1)> [symbolic = %A.type (constants.%A.type.d88)]
  255. // CHECK:STDOUT: %Self.2: @A.%A.type (%A.type.d88) = bind_symbolic_name Self, 1 [symbolic = %Self.2 (constants.%Self.c6b)]
  256. // CHECK:STDOUT: %A.F.type: type = fn_type @A.F, @A(%T.loc5_13.1) [symbolic = %A.F.type (constants.%A.F.type.17a)]
  257. // CHECK:STDOUT: %A.F: @A.%A.F.type (%A.F.type.17a) = struct_value () [symbolic = %A.F (constants.%A.F.0d8)]
  258. // CHECK:STDOUT: %A.assoc_type: type = assoc_entity_type @A, @A(%T.loc5_13.1) [symbolic = %A.assoc_type (constants.%A.assoc_type.ed3)]
  259. // CHECK:STDOUT: %assoc0.loc6_41.2: @A.%A.assoc_type (%A.assoc_type.ed3) = assoc_entity element0, %A.F.decl [symbolic = %assoc0.loc6_41.2 (constants.%assoc0.fcb)]
  260. // CHECK:STDOUT:
  261. // CHECK:STDOUT: interface {
  262. // CHECK:STDOUT: %Self.1: @A.%A.type (%A.type.d88) = bind_symbolic_name Self, 1 [symbolic = %Self.2 (constants.%Self.c6b)]
  263. // CHECK:STDOUT: %A.F.decl: @A.%A.F.type (%A.F.type.17a) = fn_decl @A.F [symbolic = @A.%A.F (constants.%A.F.0d8)] {
  264. // CHECK:STDOUT: %U.patt: %pattern_type.98f = symbolic_binding_pattern U, 2 [concrete]
  265. // CHECK:STDOUT: %u.patt: @A.F.%pattern_type.loc6_18 (%pattern_type.eee) = binding_pattern u [concrete]
  266. // CHECK:STDOUT: %u.param_patt: @A.F.%pattern_type.loc6_18 (%pattern_type.eee) = value_param_pattern %u.patt, call_param0 [concrete]
  267. // CHECK:STDOUT: %return.patt: @A.F.%pattern_type.loc6_25 (%pattern_type.e5a) = return_slot_pattern [concrete]
  268. // CHECK:STDOUT: %return.param_patt: @A.F.%pattern_type.loc6_25 (%pattern_type.e5a) = out_param_pattern %return.patt, call_param1 [concrete]
  269. // CHECK:STDOUT: } {
  270. // CHECK:STDOUT: %T.ref: type = name_ref T, @A.%T.loc5_13.2 [symbolic = %T (constants.%T.8b3)]
  271. // CHECK:STDOUT: %.loc6_32: @A.F.%A.type (%A.type.d88) = specific_constant @A.%Self.1, @A(constants.%T.8b3) [symbolic = %Self (constants.%Self.c6b)]
  272. // CHECK:STDOUT: %Self.ref: @A.F.%A.type (%A.type.d88) = name_ref Self, %.loc6_32 [symbolic = %Self (constants.%Self.c6b)]
  273. // CHECK:STDOUT: %U.ref.loc6_38: type = name_ref U, %U.loc6_8.2 [symbolic = %U.loc6_8.1 (constants.%U.2cb)]
  274. // CHECK:STDOUT: %ptr.loc6_39: type = ptr_type %U.ref.loc6_38 [symbolic = %ptr.loc6_22.1 (constants.%ptr.204)]
  275. // CHECK:STDOUT: %.loc6_40.1: @A.F.%tuple.type.loc6_40.1 (%tuple.type.098) = tuple_literal (%T.ref, %Self.ref, %ptr.loc6_39)
  276. // CHECK:STDOUT: %Self.as_type: type = facet_access_type %Self.ref [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type.0eb)]
  277. // CHECK:STDOUT: %.loc6_40.2: type = converted %Self.ref, %Self.as_type [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type.0eb)]
  278. // CHECK:STDOUT: %.loc6_40.3: type = converted %.loc6_40.1, constants.%tuple.type.eee [symbolic = %tuple.type.loc6_40.2 (constants.%tuple.type.eee)]
  279. // CHECK:STDOUT: %.Self: %type = bind_symbolic_name .Self [symbolic_self = constants.%.Self]
  280. // CHECK:STDOUT: %U.loc6_8.2: type = bind_symbolic_name U, 2 [symbolic = %U.loc6_8.1 (constants.%U.2cb)]
  281. // CHECK:STDOUT: %u.param: @A.F.%ptr.loc6_22.1 (%ptr.204) = value_param call_param0
  282. // CHECK:STDOUT: %.loc6_22: type = splice_block %ptr.loc6_22.2 [symbolic = %ptr.loc6_22.1 (constants.%ptr.204)] {
  283. // CHECK:STDOUT: %U.ref.loc6_21: type = name_ref U, %U.loc6_8.2 [symbolic = %U.loc6_8.1 (constants.%U.2cb)]
  284. // CHECK:STDOUT: %ptr.loc6_22.2: type = ptr_type %U.ref.loc6_21 [symbolic = %ptr.loc6_22.1 (constants.%ptr.204)]
  285. // CHECK:STDOUT: }
  286. // CHECK:STDOUT: %u: @A.F.%ptr.loc6_22.1 (%ptr.204) = bind_name u, %u.param
  287. // CHECK:STDOUT: %return.param: ref @A.F.%tuple.type.loc6_40.2 (%tuple.type.eee) = out_param call_param1
  288. // CHECK:STDOUT: %return: ref @A.F.%tuple.type.loc6_40.2 (%tuple.type.eee) = return_slot %return.param
  289. // CHECK:STDOUT: }
  290. // CHECK:STDOUT: %assoc0.loc6_41.1: @A.%A.assoc_type (%A.assoc_type.ed3) = assoc_entity element0, %A.F.decl [symbolic = %assoc0.loc6_41.2 (constants.%assoc0.fcb)]
  291. // CHECK:STDOUT:
  292. // CHECK:STDOUT: !members:
  293. // CHECK:STDOUT: .Self = %Self.1
  294. // CHECK:STDOUT: .T = <poisoned>
  295. // CHECK:STDOUT: .F = %assoc0.loc6_41.1
  296. // CHECK:STDOUT: witness = (%A.F.decl)
  297. // CHECK:STDOUT: }
  298. // CHECK:STDOUT: }
  299. // CHECK:STDOUT:
  300. // CHECK:STDOUT: impl @Y.as.A.impl: %Y.ref as %A.type {
  301. // CHECK:STDOUT: %Y.as.A.impl.F.decl: %Y.as.A.impl.F.type = fn_decl @Y.as.A.impl.F [concrete = constants.%Y.as.A.impl.F] {
  302. // CHECK:STDOUT: %U.patt: %pattern_type.98f = symbolic_binding_pattern U, 0 [concrete]
  303. // CHECK:STDOUT: %u.patt: @Y.as.A.impl.F.%pattern_type.loc16_18 (%pattern_type.afe393.1) = binding_pattern u [concrete]
  304. // CHECK:STDOUT: %u.param_patt: @Y.as.A.impl.F.%pattern_type.loc16_18 (%pattern_type.afe393.1) = value_param_pattern %u.patt, call_param0 [concrete]
  305. // CHECK:STDOUT: %return.patt: @Y.as.A.impl.F.%pattern_type.loc16_25 (%pattern_type.ac9) = return_slot_pattern [concrete]
  306. // CHECK:STDOUT: %return.param_patt: @Y.as.A.impl.F.%pattern_type.loc16_25 (%pattern_type.ac9) = out_param_pattern %return.patt, call_param1 [concrete]
  307. // CHECK:STDOUT: } {
  308. // CHECK:STDOUT: %X.ref: type = name_ref X, file.%X.decl [concrete = constants.%X]
  309. // CHECK:STDOUT: %Y.ref: type = name_ref Y, file.%Y.decl [concrete = constants.%Y]
  310. // CHECK:STDOUT: %U.ref.loc16_35: type = name_ref U, %U.loc16_8.2 [symbolic = %U.loc16_8.1 (constants.%U.8b3)]
  311. // CHECK:STDOUT: %ptr.loc16_36: type = ptr_type %U.ref.loc16_35 [symbolic = %ptr.loc16_22.1 (constants.%ptr.79f131.1)]
  312. // CHECK:STDOUT: %.loc16_37.1: %tuple.type.ff9 = tuple_literal (%X.ref, %Y.ref, %ptr.loc16_36)
  313. // CHECK:STDOUT: %.loc16_37.2: type = converted %.loc16_37.1, constants.%tuple.type.c14 [symbolic = %tuple.type.loc16 (constants.%tuple.type.c14)]
  314. // CHECK:STDOUT: %.Self: %type = bind_symbolic_name .Self [symbolic_self = constants.%.Self]
  315. // CHECK:STDOUT: %U.loc16_8.2: type = bind_symbolic_name U, 0 [symbolic = %U.loc16_8.1 (constants.%U.8b3)]
  316. // CHECK:STDOUT: %u.param: @Y.as.A.impl.F.%ptr.loc16_22.1 (%ptr.79f131.1) = value_param call_param0
  317. // CHECK:STDOUT: %.loc16_22: type = splice_block %ptr.loc16_22.2 [symbolic = %ptr.loc16_22.1 (constants.%ptr.79f131.1)] {
  318. // CHECK:STDOUT: %U.ref.loc16_21: type = name_ref U, %U.loc16_8.2 [symbolic = %U.loc16_8.1 (constants.%U.8b3)]
  319. // CHECK:STDOUT: %ptr.loc16_22.2: type = ptr_type %U.ref.loc16_21 [symbolic = %ptr.loc16_22.1 (constants.%ptr.79f131.1)]
  320. // CHECK:STDOUT: }
  321. // CHECK:STDOUT: %u: @Y.as.A.impl.F.%ptr.loc16_22.1 (%ptr.79f131.1) = bind_name u, %u.param
  322. // CHECK:STDOUT: %return.param: ref @Y.as.A.impl.F.%tuple.type.loc16 (%tuple.type.c14) = out_param call_param1
  323. // CHECK:STDOUT: %return: ref @Y.as.A.impl.F.%tuple.type.loc16 (%tuple.type.c14) = return_slot %return.param
  324. // CHECK:STDOUT: }
  325. // CHECK:STDOUT:
  326. // CHECK:STDOUT: !members:
  327. // CHECK:STDOUT: .X = <poisoned>
  328. // CHECK:STDOUT: .Y = <poisoned>
  329. // CHECK:STDOUT: .F = %Y.as.A.impl.F.decl
  330. // CHECK:STDOUT: witness = file.%A.impl_witness
  331. // CHECK:STDOUT: }
  332. // CHECK:STDOUT:
  333. // CHECK:STDOUT: class @X {
  334. // CHECK:STDOUT: %complete_type: <witness> = complete_type_witness constants.%empty_struct_type [concrete = constants.%complete_type.357]
  335. // CHECK:STDOUT: complete_type_witness = %complete_type
  336. // CHECK:STDOUT:
  337. // CHECK:STDOUT: !members:
  338. // CHECK:STDOUT: .Self = constants.%X
  339. // CHECK:STDOUT: }
  340. // CHECK:STDOUT:
  341. // CHECK:STDOUT: class @Y {
  342. // CHECK:STDOUT: %complete_type: <witness> = complete_type_witness constants.%empty_struct_type [concrete = constants.%complete_type.357]
  343. // CHECK:STDOUT: complete_type_witness = %complete_type
  344. // CHECK:STDOUT:
  345. // CHECK:STDOUT: !members:
  346. // CHECK:STDOUT: .Self = constants.%Y
  347. // CHECK:STDOUT: }
  348. // CHECK:STDOUT:
  349. // CHECK:STDOUT: class @Z {
  350. // CHECK:STDOUT: %complete_type: <witness> = complete_type_witness constants.%empty_struct_type [concrete = constants.%complete_type.357]
  351. // CHECK:STDOUT: complete_type_witness = %complete_type
  352. // CHECK:STDOUT:
  353. // CHECK:STDOUT: !members:
  354. // CHECK:STDOUT: .Self = constants.%Z
  355. // CHECK:STDOUT: }
  356. // CHECK:STDOUT:
  357. // CHECK:STDOUT: generic fn @A.F(@A.%T.loc5_13.2: type, @A.%Self.1: @A.%A.type (%A.type.d88), %U.loc6_8.2: type) {
  358. // CHECK:STDOUT: %U.loc6_8.1: type = bind_symbolic_name U, 2 [symbolic = %U.loc6_8.1 (constants.%U.2cb)]
  359. // CHECK:STDOUT: %ptr.loc6_22.1: type = ptr_type %U.loc6_8.1 [symbolic = %ptr.loc6_22.1 (constants.%ptr.204)]
  360. // CHECK:STDOUT: %pattern_type.loc6_18: type = pattern_type %ptr.loc6_22.1 [symbolic = %pattern_type.loc6_18 (constants.%pattern_type.eee)]
  361. // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic = %T (constants.%T.8b3)]
  362. // CHECK:STDOUT: %A.type: type = facet_type <@A, @A(%T)> [symbolic = %A.type (constants.%A.type.d88)]
  363. // CHECK:STDOUT: %Self: @A.F.%A.type (%A.type.d88) = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.c6b)]
  364. // CHECK:STDOUT: %tuple.type.loc6_40.1: type = tuple_type (type, %A.type, type) [symbolic = %tuple.type.loc6_40.1 (constants.%tuple.type.098)]
  365. // CHECK:STDOUT: %Self.binding.as_type: type = symbolic_binding_type Self, 1, %Self [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type.0eb)]
  366. // CHECK:STDOUT: %tuple.type.loc6_40.2: type = tuple_type (%T, %Self.binding.as_type, %ptr.loc6_22.1) [symbolic = %tuple.type.loc6_40.2 (constants.%tuple.type.eee)]
  367. // CHECK:STDOUT: %pattern_type.loc6_25: type = pattern_type %tuple.type.loc6_40.2 [symbolic = %pattern_type.loc6_25 (constants.%pattern_type.e5a)]
  368. // CHECK:STDOUT:
  369. // CHECK:STDOUT: fn(%u.param: @A.F.%ptr.loc6_22.1 (%ptr.204)) -> @A.F.%tuple.type.loc6_40.2 (%tuple.type.eee);
  370. // CHECK:STDOUT: }
  371. // CHECK:STDOUT:
  372. // CHECK:STDOUT: generic fn @Y.as.A.impl.F(%U.loc16_8.2: type) {
  373. // CHECK:STDOUT: %U.loc16_8.1: type = bind_symbolic_name U, 0 [symbolic = %U.loc16_8.1 (constants.%U.8b3)]
  374. // CHECK:STDOUT: %ptr.loc16_22.1: type = ptr_type %U.loc16_8.1 [symbolic = %ptr.loc16_22.1 (constants.%ptr.79f131.1)]
  375. // CHECK:STDOUT: %pattern_type.loc16_18: type = pattern_type %ptr.loc16_22.1 [symbolic = %pattern_type.loc16_18 (constants.%pattern_type.afe393.1)]
  376. // CHECK:STDOUT: %tuple.type.loc16: type = tuple_type (constants.%X, constants.%Y, %ptr.loc16_22.1) [symbolic = %tuple.type.loc16 (constants.%tuple.type.c14)]
  377. // CHECK:STDOUT: %pattern_type.loc16_25: type = pattern_type %tuple.type.loc16 [symbolic = %pattern_type.loc16_25 (constants.%pattern_type.ac9)]
  378. // CHECK:STDOUT:
  379. // CHECK:STDOUT: !definition:
  380. // CHECK:STDOUT: %require_complete.loc16_25: <witness> = require_complete_type %tuple.type.loc16 [symbolic = %require_complete.loc16_25 (constants.%require_complete.86f)]
  381. // CHECK:STDOUT: %require_complete.loc16_19: <witness> = require_complete_type %ptr.loc16_22.1 [symbolic = %require_complete.loc16_19 (constants.%require_complete.6e5e64.1)]
  382. // CHECK:STDOUT: %tuple.type.loc17: type = tuple_type (constants.%empty_struct_type, constants.%empty_struct_type, %ptr.loc16_22.1) [symbolic = %tuple.type.loc17 (constants.%tuple.type.e44)]
  383. // CHECK:STDOUT: %Copy.lookup_impl_witness: <witness> = lookup_impl_witness %ptr.loc16_22.1, @Copy [symbolic = %Copy.lookup_impl_witness (constants.%Copy.lookup_impl_witness.cb2)]
  384. // CHECK:STDOUT: %Copy.facet: %Copy.type = facet_value %ptr.loc16_22.1, (%Copy.lookup_impl_witness) [symbolic = %Copy.facet (constants.%Copy.facet.2d1)]
  385. // CHECK:STDOUT: %.loc17_21.2: type = fn_type_with_self_type constants.%Copy.Op.type, %Copy.facet [symbolic = %.loc17_21.2 (constants.%.1cc)]
  386. // CHECK:STDOUT: %impl.elem0.loc17_21.2: @Y.as.A.impl.F.%.loc17_21.2 (%.1cc) = impl_witness_access %Copy.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc17_21.2 (constants.%impl.elem0.751)]
  387. // CHECK:STDOUT: %specific_impl_fn.loc17_21.2: <specific function> = specific_impl_function %impl.elem0.loc17_21.2, @Copy.Op(%Copy.facet) [symbolic = %specific_impl_fn.loc17_21.2 (constants.%specific_impl_fn.f44)]
  388. // CHECK:STDOUT:
  389. // CHECK:STDOUT: fn(%u.param: @Y.as.A.impl.F.%ptr.loc16_22.1 (%ptr.79f131.1)) -> %return.param: @Y.as.A.impl.F.%tuple.type.loc16 (%tuple.type.c14) {
  390. // CHECK:STDOUT: !entry:
  391. // CHECK:STDOUT: %.loc17_14.1: %empty_struct_type = struct_literal ()
  392. // CHECK:STDOUT: %.loc17_18.1: %empty_struct_type = struct_literal ()
  393. // CHECK:STDOUT: %u.ref: @Y.as.A.impl.F.%ptr.loc16_22.1 (%ptr.79f131.1) = name_ref u, %u
  394. // CHECK:STDOUT: %.loc17_22.1: @Y.as.A.impl.F.%tuple.type.loc17 (%tuple.type.e44) = tuple_literal (%.loc17_14.1, %.loc17_18.1, %u.ref)
  395. // CHECK:STDOUT: %tuple.elem0: ref %X = tuple_access %return, element0
  396. // CHECK:STDOUT: %.loc17_14.2: init %X = class_init (), %tuple.elem0 [concrete = constants.%X.val]
  397. // CHECK:STDOUT: %.loc17_22.2: init %X = converted %.loc17_14.1, %.loc17_14.2 [concrete = constants.%X.val]
  398. // CHECK:STDOUT: %tuple.elem1: ref %Y = tuple_access %return, element1
  399. // CHECK:STDOUT: %.loc17_18.2: init %Y = class_init (), %tuple.elem1 [concrete = constants.%Y.val]
  400. // CHECK:STDOUT: %.loc17_22.3: init %Y = converted %.loc17_18.1, %.loc17_18.2 [concrete = constants.%Y.val]
  401. // CHECK:STDOUT: %impl.elem0.loc17_21.1: @Y.as.A.impl.F.%.loc17_21.2 (%.1cc) = impl_witness_access constants.%Copy.lookup_impl_witness.cb2, element0 [symbolic = %impl.elem0.loc17_21.2 (constants.%impl.elem0.751)]
  402. // CHECK:STDOUT: %bound_method.loc17_21.1: <bound method> = bound_method %u.ref, %impl.elem0.loc17_21.1
  403. // CHECK:STDOUT: %specific_impl_fn.loc17_21.1: <specific function> = specific_impl_function %impl.elem0.loc17_21.1, @Copy.Op(constants.%Copy.facet.2d1) [symbolic = %specific_impl_fn.loc17_21.2 (constants.%specific_impl_fn.f44)]
  404. // CHECK:STDOUT: %bound_method.loc17_21.2: <bound method> = bound_method %u.ref, %specific_impl_fn.loc17_21.1
  405. // CHECK:STDOUT: %.loc17_21.1: init @Y.as.A.impl.F.%ptr.loc16_22.1 (%ptr.79f131.1) = call %bound_method.loc17_21.2(%u.ref)
  406. // CHECK:STDOUT: %tuple.elem2: ref @Y.as.A.impl.F.%ptr.loc16_22.1 (%ptr.79f131.1) = tuple_access %return, element2
  407. // CHECK:STDOUT: %.loc17_22.4: init @Y.as.A.impl.F.%ptr.loc16_22.1 (%ptr.79f131.1) = initialize_from %.loc17_21.1 to %tuple.elem2
  408. // CHECK:STDOUT: %.loc17_22.5: init @Y.as.A.impl.F.%tuple.type.loc16 (%tuple.type.c14) = tuple_init (%.loc17_22.2, %.loc17_22.3, %.loc17_22.4) to %return
  409. // CHECK:STDOUT: %.loc17_23: init @Y.as.A.impl.F.%tuple.type.loc16 (%tuple.type.c14) = converted %.loc17_22.1, %.loc17_22.5
  410. // CHECK:STDOUT: return %.loc17_23 to %return
  411. // CHECK:STDOUT: }
  412. // CHECK:STDOUT: }
  413. // CHECK:STDOUT:
  414. // CHECK:STDOUT: fn @Call() {
  415. // CHECK:STDOUT: !entry:
  416. // CHECK:STDOUT: name_binding_decl {
  417. // CHECK:STDOUT: %u.patt: %pattern_type.8f9 = binding_pattern u [concrete]
  418. // CHECK:STDOUT: %u.var_patt: %pattern_type.8f9 = var_pattern %u.patt [concrete]
  419. // CHECK:STDOUT: }
  420. // CHECK:STDOUT: %u.var: ref %Z = var %u.var_patt
  421. // CHECK:STDOUT: %Z.ref.loc22: type = name_ref Z, file.%Z.decl [concrete = constants.%Z]
  422. // CHECK:STDOUT: %u: ref %Z = bind_name u, %u.var
  423. // CHECK:STDOUT: %Y.ref: type = name_ref Y, file.%Y.decl [concrete = constants.%Y]
  424. // CHECK:STDOUT: %A.ref: %A.type.495 = name_ref A, file.%A.decl [concrete = constants.%A.generic]
  425. // CHECK:STDOUT: %X.ref: type = name_ref X, file.%X.decl [concrete = constants.%X]
  426. // CHECK:STDOUT: %A.type: type = facet_type <@A, @A(constants.%X)> [concrete = constants.%A.type.0a4]
  427. // CHECK:STDOUT: %A.facet: %A.type.0a4 = facet_value %Y.ref, (constants.%A.impl_witness) [concrete = constants.%A.facet]
  428. // CHECK:STDOUT: %.loc23_6: %A.type.0a4 = converted %Y.ref, %A.facet [concrete = constants.%A.facet]
  429. // CHECK:STDOUT: %.loc23_14.1: %A.assoc_type.296 = specific_constant @A.%assoc0.loc6_41.1, @A(constants.%X) [concrete = constants.%assoc0.5f6]
  430. // CHECK:STDOUT: %F.ref: %A.assoc_type.296 = name_ref F, %.loc23_14.1 [concrete = constants.%assoc0.5f6]
  431. // CHECK:STDOUT: %as_type: type = facet_access_type %.loc23_6 [concrete = constants.%Y]
  432. // CHECK:STDOUT: %.loc23_14.2: type = converted %.loc23_6, %as_type [concrete = constants.%Y]
  433. // CHECK:STDOUT: %impl.elem0: %.d35 = impl_witness_access constants.%A.impl_witness, element0 [concrete = constants.%Y.as.A.impl.F]
  434. // CHECK:STDOUT: %Z.ref.loc23: type = name_ref Z, file.%Z.decl [concrete = constants.%Z]
  435. // CHECK:STDOUT: %u.ref: ref %Z = name_ref u, %u
  436. // CHECK:STDOUT: %addr.loc23_20: %ptr.fb6 = addr_of %u.ref
  437. // CHECK:STDOUT: %specific_fn: <specific function> = specific_function %impl.elem0, @Y.as.A.impl.F(constants.%Z) [concrete = constants.%Y.as.A.impl.F.specific_fn]
  438. // CHECK:STDOUT: %.loc23_22.1: ref %tuple.type.092 = temporary_storage
  439. // CHECK:STDOUT: %Y.as.A.impl.F.call: init %tuple.type.092 = call %specific_fn(%addr.loc23_20) to %.loc23_22.1
  440. // CHECK:STDOUT: %.loc23_22.2: ref %tuple.type.092 = temporary %.loc23_22.1, %Y.as.A.impl.F.call
  441. // CHECK:STDOUT: %DestroyT.binding.as_type.as.Destroy.impl.Op.bound.loc23: <bound method> = bound_method %.loc23_22.2, constants.%DestroyT.binding.as_type.as.Destroy.impl.Op.3da
  442. // CHECK:STDOUT: %DestroyT.binding.as_type.as.Destroy.impl.Op.specific_fn.1: <specific function> = specific_function constants.%DestroyT.binding.as_type.as.Destroy.impl.Op.3da, @DestroyT.binding.as_type.as.Destroy.impl.Op(constants.%facet_value.352) [concrete = constants.%DestroyT.binding.as_type.as.Destroy.impl.Op.specific_fn.cd3]
  443. // CHECK:STDOUT: %bound_method.loc23: <bound method> = bound_method %.loc23_22.2, %DestroyT.binding.as_type.as.Destroy.impl.Op.specific_fn.1
  444. // CHECK:STDOUT: %addr.loc23_22: %ptr.5df = addr_of %.loc23_22.2
  445. // CHECK:STDOUT: %DestroyT.binding.as_type.as.Destroy.impl.Op.call.loc23: init %empty_tuple.type = call %bound_method.loc23(%addr.loc23_22)
  446. // CHECK:STDOUT: %DestroyT.binding.as_type.as.Destroy.impl.Op.bound.loc22: <bound method> = bound_method %u.var, constants.%DestroyT.binding.as_type.as.Destroy.impl.Op.8e8
  447. // CHECK:STDOUT: %DestroyT.binding.as_type.as.Destroy.impl.Op.specific_fn.2: <specific function> = specific_function constants.%DestroyT.binding.as_type.as.Destroy.impl.Op.8e8, @DestroyT.binding.as_type.as.Destroy.impl.Op(constants.%facet_value.4e3) [concrete = constants.%DestroyT.binding.as_type.as.Destroy.impl.Op.specific_fn.97f]
  448. // CHECK:STDOUT: %bound_method.loc22: <bound method> = bound_method %u.var, %DestroyT.binding.as_type.as.Destroy.impl.Op.specific_fn.2
  449. // CHECK:STDOUT: %addr.loc22: %ptr.fb6 = addr_of %u.var
  450. // CHECK:STDOUT: %DestroyT.binding.as_type.as.Destroy.impl.Op.call.loc22: init %empty_tuple.type = call %bound_method.loc22(%addr.loc22)
  451. // CHECK:STDOUT: return
  452. // CHECK:STDOUT: }
  453. // CHECK:STDOUT:
  454. // CHECK:STDOUT: generic fn @CallGeneric(%T.loc26_16.2: %A.type.0a4) {
  455. // CHECK:STDOUT: %T.loc26_16.1: %A.type.0a4 = bind_symbolic_name T, 0 [symbolic = %T.loc26_16.1 (constants.%T.7bf)]
  456. // CHECK:STDOUT:
  457. // CHECK:STDOUT: !definition:
  458. // CHECK:STDOUT: %T.binding.as_type: type = symbolic_binding_type T, 0, %T.loc26_16.1 [symbolic = %T.binding.as_type (constants.%T.binding.as_type.4c5)]
  459. // CHECK:STDOUT: %A.lookup_impl_witness: <witness> = lookup_impl_witness %T.loc26_16.1, @A, @A(constants.%X) [symbolic = %A.lookup_impl_witness (constants.%A.lookup_impl_witness)]
  460. // CHECK:STDOUT: %.loc28_4.3: type = fn_type_with_self_type constants.%A.F.type.13d, %T.loc26_16.1 [symbolic = %.loc28_4.3 (constants.%.0c6)]
  461. // CHECK:STDOUT: %impl.elem0.loc28_4.2: @CallGeneric.%.loc28_4.3 (%.0c6) = impl_witness_access %A.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc28_4.2 (constants.%impl.elem0.dd2)]
  462. // CHECK:STDOUT: %specific_impl_fn.loc28_4.2: <specific function> = specific_impl_function %impl.elem0.loc28_4.2, @A.F(constants.%X, %T.loc26_16.1, constants.%Z) [symbolic = %specific_impl_fn.loc28_4.2 (constants.%specific_impl_fn.304)]
  463. // CHECK:STDOUT: %tuple.type: type = tuple_type (constants.%X, %T.binding.as_type, constants.%ptr.fb6) [symbolic = %tuple.type (constants.%tuple.type.6ee)]
  464. // CHECK:STDOUT: %require_complete.loc28_12.1: <witness> = require_complete_type %tuple.type [symbolic = %require_complete.loc28_12.1 (constants.%require_complete.439)]
  465. // CHECK:STDOUT: %facet_value: %type_where = facet_value %tuple.type, () [symbolic = %facet_value (constants.%facet_value.017)]
  466. // CHECK:STDOUT: %Destroy.impl_witness: <witness> = impl_witness imports.%Destroy.impl_witness_table, @DestroyT.binding.as_type.as.Destroy.impl(%facet_value) [symbolic = %Destroy.impl_witness (constants.%Destroy.impl_witness.5b3)]
  467. // CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %tuple.type, (%Destroy.impl_witness) [symbolic = %Destroy.facet (constants.%Destroy.facet.b1d)]
  468. // CHECK:STDOUT: %.loc28_12.4: type = fn_type_with_self_type constants.%Destroy.Op.type, %Destroy.facet [symbolic = %.loc28_12.4 (constants.%.dff)]
  469. // CHECK:STDOUT: %DestroyT.binding.as_type.as.Destroy.impl.Op.type: type = fn_type @DestroyT.binding.as_type.as.Destroy.impl.Op, @DestroyT.binding.as_type.as.Destroy.impl(%facet_value) [symbolic = %DestroyT.binding.as_type.as.Destroy.impl.Op.type (constants.%DestroyT.binding.as_type.as.Destroy.impl.Op.type.e71)]
  470. // CHECK:STDOUT: %DestroyT.binding.as_type.as.Destroy.impl.Op: @CallGeneric.%DestroyT.binding.as_type.as.Destroy.impl.Op.type (%DestroyT.binding.as_type.as.Destroy.impl.Op.type.e71) = struct_value () [symbolic = %DestroyT.binding.as_type.as.Destroy.impl.Op (constants.%DestroyT.binding.as_type.as.Destroy.impl.Op.833)]
  471. // CHECK:STDOUT: %DestroyT.binding.as_type.as.Destroy.impl.Op.specific_fn.loc28: <specific function> = specific_function %DestroyT.binding.as_type.as.Destroy.impl.Op, @DestroyT.binding.as_type.as.Destroy.impl.Op(%facet_value) [symbolic = %DestroyT.binding.as_type.as.Destroy.impl.Op.specific_fn.loc28 (constants.%DestroyT.binding.as_type.as.Destroy.impl.Op.specific_fn.446)]
  472. // CHECK:STDOUT: %ptr: type = ptr_type %tuple.type [symbolic = %ptr (constants.%ptr.641a)]
  473. // CHECK:STDOUT: %require_complete.loc28_12.2: <witness> = require_complete_type %ptr [symbolic = %require_complete.loc28_12.2 (constants.%require_complete.3d6)]
  474. // CHECK:STDOUT:
  475. // CHECK:STDOUT: fn() {
  476. // CHECK:STDOUT: !entry:
  477. // CHECK:STDOUT: name_binding_decl {
  478. // CHECK:STDOUT: %u.patt: %pattern_type.8f9 = binding_pattern u [concrete]
  479. // CHECK:STDOUT: %u.var_patt: %pattern_type.8f9 = var_pattern %u.patt [concrete]
  480. // CHECK:STDOUT: }
  481. // CHECK:STDOUT: %u.var: ref %Z = var %u.var_patt
  482. // CHECK:STDOUT: %Z.ref.loc27: type = name_ref Z, file.%Z.decl [concrete = constants.%Z]
  483. // CHECK:STDOUT: %u: ref %Z = bind_name u, %u.var
  484. // CHECK:STDOUT: %T.ref: %A.type.0a4 = name_ref T, %T.loc26_16.2 [symbolic = %T.loc26_16.1 (constants.%T.7bf)]
  485. // CHECK:STDOUT: %.loc28_4.1: %A.assoc_type.296 = specific_constant @A.%assoc0.loc6_41.1, @A(constants.%X) [concrete = constants.%assoc0.5f6]
  486. // CHECK:STDOUT: %F.ref: %A.assoc_type.296 = name_ref F, %.loc28_4.1 [concrete = constants.%assoc0.5f6]
  487. // CHECK:STDOUT: %T.as_type: type = facet_access_type %T.ref [symbolic = %T.binding.as_type (constants.%T.binding.as_type.4c5)]
  488. // CHECK:STDOUT: %.loc28_4.2: type = converted %T.ref, %T.as_type [symbolic = %T.binding.as_type (constants.%T.binding.as_type.4c5)]
  489. // CHECK:STDOUT: %impl.elem0.loc28_4.1: @CallGeneric.%.loc28_4.3 (%.0c6) = impl_witness_access constants.%A.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc28_4.2 (constants.%impl.elem0.dd2)]
  490. // CHECK:STDOUT: %Z.ref.loc28: type = name_ref Z, file.%Z.decl [concrete = constants.%Z]
  491. // CHECK:STDOUT: %u.ref: ref %Z = name_ref u, %u
  492. // CHECK:STDOUT: %addr.loc28_10: %ptr.fb6 = addr_of %u.ref
  493. // CHECK:STDOUT: %specific_impl_fn.loc28_4.1: <specific function> = specific_impl_function %impl.elem0.loc28_4.1, @A.F(constants.%X, constants.%T.7bf, constants.%Z) [symbolic = %specific_impl_fn.loc28_4.2 (constants.%specific_impl_fn.304)]
  494. // CHECK:STDOUT: %.loc28_12.1: ref @CallGeneric.%tuple.type (%tuple.type.6ee) = temporary_storage
  495. // CHECK:STDOUT: %.loc28_12.2: init @CallGeneric.%tuple.type (%tuple.type.6ee) = call %specific_impl_fn.loc28_4.1(%addr.loc28_10) to %.loc28_12.1
  496. // CHECK:STDOUT: %.loc28_12.3: ref @CallGeneric.%tuple.type (%tuple.type.6ee) = temporary %.loc28_12.1, %.loc28_12.2
  497. // CHECK:STDOUT: %impl.elem0.loc28_12: @CallGeneric.%.loc28_12.4 (%.dff) = impl_witness_access constants.%Destroy.impl_witness.5b3, element0 [symbolic = %DestroyT.binding.as_type.as.Destroy.impl.Op (constants.%DestroyT.binding.as_type.as.Destroy.impl.Op.833)]
  498. // CHECK:STDOUT: %bound_method.loc28_12.1: <bound method> = bound_method %.loc28_12.3, %impl.elem0.loc28_12
  499. // CHECK:STDOUT: %specific_fn: <specific function> = specific_function %impl.elem0.loc28_12, @DestroyT.binding.as_type.as.Destroy.impl.Op(constants.%facet_value.017) [symbolic = %DestroyT.binding.as_type.as.Destroy.impl.Op.specific_fn.loc28 (constants.%DestroyT.binding.as_type.as.Destroy.impl.Op.specific_fn.446)]
  500. // CHECK:STDOUT: %bound_method.loc28_12.2: <bound method> = bound_method %.loc28_12.3, %specific_fn
  501. // CHECK:STDOUT: %addr.loc28_12: @CallGeneric.%ptr (%ptr.641a) = addr_of %.loc28_12.3
  502. // CHECK:STDOUT: %DestroyT.binding.as_type.as.Destroy.impl.Op.call.loc28: init %empty_tuple.type = call %bound_method.loc28_12.2(%addr.loc28_12)
  503. // CHECK:STDOUT: %DestroyT.binding.as_type.as.Destroy.impl.Op.bound: <bound method> = bound_method %u.var, constants.%DestroyT.binding.as_type.as.Destroy.impl.Op.8e8
  504. // CHECK:STDOUT: %DestroyT.binding.as_type.as.Destroy.impl.Op.specific_fn.1: <specific function> = specific_function constants.%DestroyT.binding.as_type.as.Destroy.impl.Op.8e8, @DestroyT.binding.as_type.as.Destroy.impl.Op(constants.%facet_value.4e3) [concrete = constants.%DestroyT.binding.as_type.as.Destroy.impl.Op.specific_fn.97f]
  505. // CHECK:STDOUT: %bound_method.loc27: <bound method> = bound_method %u.var, %DestroyT.binding.as_type.as.Destroy.impl.Op.specific_fn.1
  506. // CHECK:STDOUT: %addr.loc27: %ptr.fb6 = addr_of %u.var
  507. // CHECK:STDOUT: %DestroyT.binding.as_type.as.Destroy.impl.Op.call.loc27: init %empty_tuple.type = call %bound_method.loc27(%addr.loc27)
  508. // CHECK:STDOUT: return
  509. // CHECK:STDOUT: }
  510. // CHECK:STDOUT: }
  511. // CHECK:STDOUT:
  512. // CHECK:STDOUT: fn @CallIndirect() {
  513. // CHECK:STDOUT: !entry:
  514. // CHECK:STDOUT: %CallGeneric.ref: %CallGeneric.type = name_ref CallGeneric, file.%CallGeneric.decl [concrete = constants.%CallGeneric]
  515. // CHECK:STDOUT: %Y.ref: type = name_ref Y, file.%Y.decl [concrete = constants.%Y]
  516. // CHECK:STDOUT: %A.facet: %A.type.0a4 = facet_value %Y.ref, (constants.%A.impl_witness) [concrete = constants.%A.facet]
  517. // CHECK:STDOUT: %.loc32: %A.type.0a4 = converted %Y.ref, %A.facet [concrete = constants.%A.facet]
  518. // CHECK:STDOUT: %CallGeneric.specific_fn: <specific function> = specific_function %CallGeneric.ref, @CallGeneric(constants.%A.facet) [concrete = constants.%CallGeneric.specific_fn]
  519. // CHECK:STDOUT: %CallGeneric.call: init %empty_tuple.type = call %CallGeneric.specific_fn()
  520. // CHECK:STDOUT: return
  521. // CHECK:STDOUT: }
  522. // CHECK:STDOUT:
  523. // CHECK:STDOUT: specific @A(constants.%T.8b3) {
  524. // CHECK:STDOUT: %T.loc5_13.1 => constants.%T.8b3
  525. // CHECK:STDOUT: }
  526. // CHECK:STDOUT:
  527. // CHECK:STDOUT: specific @A.F(constants.%T.8b3, constants.%Self.c6b, constants.%U.2cb) {
  528. // CHECK:STDOUT: %U.loc6_8.1 => constants.%U.2cb
  529. // CHECK:STDOUT: %ptr.loc6_22.1 => constants.%ptr.204
  530. // CHECK:STDOUT: %pattern_type.loc6_18 => constants.%pattern_type.eee
  531. // CHECK:STDOUT: %T => constants.%T.8b3
  532. // CHECK:STDOUT: %A.type => constants.%A.type.d88
  533. // CHECK:STDOUT: %Self => constants.%Self.c6b
  534. // CHECK:STDOUT: %tuple.type.loc6_40.1 => constants.%tuple.type.098
  535. // CHECK:STDOUT: %Self.binding.as_type => constants.%Self.binding.as_type.0eb
  536. // CHECK:STDOUT: %tuple.type.loc6_40.2 => constants.%tuple.type.eee
  537. // CHECK:STDOUT: %pattern_type.loc6_25 => constants.%pattern_type.e5a
  538. // CHECK:STDOUT: }
  539. // CHECK:STDOUT:
  540. // CHECK:STDOUT: specific @A(constants.%X) {
  541. // CHECK:STDOUT: %T.loc5_13.1 => constants.%X
  542. // CHECK:STDOUT:
  543. // CHECK:STDOUT: !definition:
  544. // CHECK:STDOUT: %A.type => constants.%A.type.0a4
  545. // CHECK:STDOUT: %Self.2 => constants.%Self.08e
  546. // CHECK:STDOUT: %A.F.type => constants.%A.F.type.13d
  547. // CHECK:STDOUT: %A.F => constants.%A.F.d83
  548. // CHECK:STDOUT: %A.assoc_type => constants.%A.assoc_type.296
  549. // CHECK:STDOUT: %assoc0.loc6_41.2 => constants.%assoc0.5f6
  550. // CHECK:STDOUT: }
  551. // CHECK:STDOUT:
  552. // CHECK:STDOUT: specific @Y.as.A.impl.F(constants.%U.8b3) {
  553. // CHECK:STDOUT: %U.loc16_8.1 => constants.%U.8b3
  554. // CHECK:STDOUT: %ptr.loc16_22.1 => constants.%ptr.79f131.1
  555. // CHECK:STDOUT: %pattern_type.loc16_18 => constants.%pattern_type.afe393.1
  556. // CHECK:STDOUT: %tuple.type.loc16 => constants.%tuple.type.c14
  557. // CHECK:STDOUT: %pattern_type.loc16_25 => constants.%pattern_type.ac9
  558. // CHECK:STDOUT: }
  559. // CHECK:STDOUT:
  560. // CHECK:STDOUT: specific @A.F(constants.%X, constants.%A.facet, constants.%U.8b3) {
  561. // CHECK:STDOUT: %U.loc6_8.1 => constants.%U.8b3
  562. // CHECK:STDOUT: %ptr.loc6_22.1 => constants.%ptr.79f131.1
  563. // CHECK:STDOUT: %pattern_type.loc6_18 => constants.%pattern_type.afe393.1
  564. // CHECK:STDOUT: %T => constants.%X
  565. // CHECK:STDOUT: %A.type => constants.%A.type.0a4
  566. // CHECK:STDOUT: %Self => constants.%A.facet
  567. // CHECK:STDOUT: %tuple.type.loc6_40.1 => constants.%tuple.type.5a1
  568. // CHECK:STDOUT: %Self.binding.as_type => constants.%Y
  569. // CHECK:STDOUT: %tuple.type.loc6_40.2 => constants.%tuple.type.c14
  570. // CHECK:STDOUT: %pattern_type.loc6_25 => constants.%pattern_type.ac9
  571. // CHECK:STDOUT: }
  572. // CHECK:STDOUT:
  573. // CHECK:STDOUT: specific @Y.as.A.impl.F(constants.%Z) {
  574. // CHECK:STDOUT: %U.loc16_8.1 => constants.%Z
  575. // CHECK:STDOUT: %ptr.loc16_22.1 => constants.%ptr.fb6
  576. // CHECK:STDOUT: %pattern_type.loc16_18 => constants.%pattern_type.f76
  577. // CHECK:STDOUT: %tuple.type.loc16 => constants.%tuple.type.092
  578. // CHECK:STDOUT: %pattern_type.loc16_25 => constants.%pattern_type.48d
  579. // CHECK:STDOUT:
  580. // CHECK:STDOUT: !definition:
  581. // CHECK:STDOUT: %require_complete.loc16_25 => constants.%complete_type.05d
  582. // CHECK:STDOUT: %require_complete.loc16_19 => constants.%complete_type.d3e
  583. // CHECK:STDOUT: %tuple.type.loc17 => constants.%tuple.type.953
  584. // CHECK:STDOUT: %Copy.lookup_impl_witness => constants.%Copy.impl_witness.4b2
  585. // CHECK:STDOUT: %Copy.facet => constants.%Copy.facet.cd8
  586. // CHECK:STDOUT: %.loc17_21.2 => constants.%.7f9
  587. // CHECK:STDOUT: %impl.elem0.loc17_21.2 => constants.%ptr.as.Copy.impl.Op.0c5
  588. // CHECK:STDOUT: %specific_impl_fn.loc17_21.2 => constants.%ptr.as.Copy.impl.Op.specific_fn
  589. // CHECK:STDOUT: }
  590. // CHECK:STDOUT:
  591. // CHECK:STDOUT: specific @CallGeneric(constants.%T.7bf) {
  592. // CHECK:STDOUT: %T.loc26_16.1 => constants.%T.7bf
  593. // CHECK:STDOUT: }
  594. // CHECK:STDOUT:
  595. // CHECK:STDOUT: specific @A.F(constants.%X, constants.%T.7bf, constants.%Z) {
  596. // CHECK:STDOUT: %U.loc6_8.1 => constants.%Z
  597. // CHECK:STDOUT: %ptr.loc6_22.1 => constants.%ptr.fb6
  598. // CHECK:STDOUT: %pattern_type.loc6_18 => constants.%pattern_type.f76
  599. // CHECK:STDOUT: %T => constants.%X
  600. // CHECK:STDOUT: %A.type => constants.%A.type.0a4
  601. // CHECK:STDOUT: %Self => constants.%T.7bf
  602. // CHECK:STDOUT: %tuple.type.loc6_40.1 => constants.%tuple.type.5a1
  603. // CHECK:STDOUT: %Self.binding.as_type => constants.%T.binding.as_type.4c5
  604. // CHECK:STDOUT: %tuple.type.loc6_40.2 => constants.%tuple.type.6ee
  605. // CHECK:STDOUT: %pattern_type.loc6_25 => constants.%pattern_type.4fd
  606. // CHECK:STDOUT: }
  607. // CHECK:STDOUT:
  608. // CHECK:STDOUT: specific @CallGeneric(constants.%A.facet) {
  609. // CHECK:STDOUT: %T.loc26_16.1 => constants.%A.facet
  610. // CHECK:STDOUT:
  611. // CHECK:STDOUT: !definition:
  612. // CHECK:STDOUT: %T.binding.as_type => constants.%Y
  613. // CHECK:STDOUT: %A.lookup_impl_witness => constants.%A.impl_witness
  614. // CHECK:STDOUT: %.loc28_4.3 => constants.%.d35
  615. // CHECK:STDOUT: %impl.elem0.loc28_4.2 => constants.%Y.as.A.impl.F
  616. // CHECK:STDOUT: %specific_impl_fn.loc28_4.2 => constants.%Y.as.A.impl.F.specific_fn
  617. // CHECK:STDOUT: %tuple.type => constants.%tuple.type.092
  618. // CHECK:STDOUT: %require_complete.loc28_12.1 => constants.%complete_type.05d
  619. // CHECK:STDOUT: %facet_value => constants.%facet_value.352
  620. // CHECK:STDOUT: %Destroy.impl_witness => constants.%Destroy.impl_witness.0cc
  621. // CHECK:STDOUT: %Destroy.facet => constants.%Destroy.facet.f67
  622. // CHECK:STDOUT: %.loc28_12.4 => constants.%.620
  623. // CHECK:STDOUT: %DestroyT.binding.as_type.as.Destroy.impl.Op.type => constants.%DestroyT.binding.as_type.as.Destroy.impl.Op.type.092
  624. // CHECK:STDOUT: %DestroyT.binding.as_type.as.Destroy.impl.Op => constants.%DestroyT.binding.as_type.as.Destroy.impl.Op.3da
  625. // CHECK:STDOUT: %DestroyT.binding.as_type.as.Destroy.impl.Op.specific_fn.loc28 => constants.%DestroyT.binding.as_type.as.Destroy.impl.Op.specific_fn.cd3
  626. // CHECK:STDOUT: %ptr => constants.%ptr.5df
  627. // CHECK:STDOUT: %require_complete.loc28_12.2 => constants.%complete_type.aab
  628. // CHECK:STDOUT: }
  629. // CHECK:STDOUT:
  630. // CHECK:STDOUT: specific @A.F(constants.%X, constants.%A.facet, constants.%Z) {
  631. // CHECK:STDOUT: %U.loc6_8.1 => constants.%Z
  632. // CHECK:STDOUT: %ptr.loc6_22.1 => constants.%ptr.fb6
  633. // CHECK:STDOUT: %pattern_type.loc6_18 => constants.%pattern_type.f76
  634. // CHECK:STDOUT: %T => constants.%X
  635. // CHECK:STDOUT: %A.type => constants.%A.type.0a4
  636. // CHECK:STDOUT: %Self => constants.%A.facet
  637. // CHECK:STDOUT: %tuple.type.loc6_40.1 => constants.%tuple.type.5a1
  638. // CHECK:STDOUT: %Self.binding.as_type => constants.%Y
  639. // CHECK:STDOUT: %tuple.type.loc6_40.2 => constants.%tuple.type.092
  640. // CHECK:STDOUT: %pattern_type.loc6_25 => constants.%pattern_type.48d
  641. // CHECK:STDOUT: }
  642. // CHECK:STDOUT:
  643. // CHECK:STDOUT: --- generic_method_more_params.carbon
  644. // CHECK:STDOUT:
  645. // CHECK:STDOUT: constants {
  646. // CHECK:STDOUT: %type: type = facet_type <type> [concrete]
  647. // CHECK:STDOUT: %.Self: %type = bind_symbolic_name .Self [symbolic_self]
  648. // CHECK:STDOUT: %T.8b3: type = bind_symbolic_name T, 0 [symbolic]
  649. // CHECK:STDOUT: %pattern_type.98f: type = pattern_type type [concrete]
  650. // CHECK:STDOUT: %A.type.495: type = generic_interface_type @A [concrete]
  651. // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete]
  652. // CHECK:STDOUT: %A.generic: %A.type.495 = struct_value () [concrete]
  653. // CHECK:STDOUT: %A.type.d88: type = facet_type <@A, @A(%T.8b3)> [symbolic]
  654. // CHECK:STDOUT: %Self.c6b: %A.type.d88 = bind_symbolic_name Self, 1 [symbolic]
  655. // CHECK:STDOUT: %U.2cb: type = bind_symbolic_name U, 2 [symbolic]
  656. // CHECK:STDOUT: %pattern_type.20f: type = pattern_type %U.2cb [symbolic]
  657. // CHECK:STDOUT: %tuple.type.098: type = tuple_type (type, %A.type.d88, type) [symbolic]
  658. // CHECK:STDOUT: %Self.binding.as_type.0eb: type = symbolic_binding_type Self, 1, %Self.c6b [symbolic]
  659. // CHECK:STDOUT: %tuple.type.253: type = tuple_type (%T.8b3, %Self.binding.as_type.0eb, %U.2cb) [symbolic]
  660. // CHECK:STDOUT: %pattern_type.bca: type = pattern_type %tuple.type.253 [symbolic]
  661. // CHECK:STDOUT: %A.F.type.17a: type = fn_type @A.F, @A(%T.8b3) [symbolic]
  662. // CHECK:STDOUT: %A.F.0d8: %A.F.type.17a = struct_value () [symbolic]
  663. // CHECK:STDOUT: %A.assoc_type.ed3: type = assoc_entity_type @A, @A(%T.8b3) [symbolic]
  664. // CHECK:STDOUT: %assoc0.fcb: %A.assoc_type.ed3 = assoc_entity element0, @A.%A.F.decl [symbolic]
  665. // CHECK:STDOUT: %X: type = class_type @X [concrete]
  666. // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete]
  667. // CHECK:STDOUT: %complete_type.357: <witness> = complete_type_witness %empty_struct_type [concrete]
  668. // CHECK:STDOUT: %Y1: type = class_type @Y1 [concrete]
  669. // CHECK:STDOUT: %Y2: type = class_type @Y2 [concrete]
  670. // CHECK:STDOUT: %Z: type = class_type @Z [concrete]
  671. // CHECK:STDOUT: %V1: type = bind_symbolic_name V1, 0 [symbolic]
  672. // CHECK:STDOUT: %V2: type = bind_symbolic_name V2, 1 [symbolic]
  673. // CHECK:STDOUT: %W: type = bind_symbolic_name W, 2 [symbolic]
  674. // CHECK:STDOUT: %tuple.type.24b: type = tuple_type (type, type) [concrete]
  675. // CHECK:STDOUT: %tuple.type.30b: type = tuple_type (%V1, %V2) [symbolic]
  676. // CHECK:STDOUT: %A.type.ff4: type = facet_type <@A, @A(%W)> [symbolic]
  677. // CHECK:STDOUT: %Self.6c5: %A.type.ff4 = bind_symbolic_name Self, 1 [symbolic]
  678. // CHECK:STDOUT: %A.F.type.904: type = fn_type @A.F, @A(%W) [symbolic]
  679. // CHECK:STDOUT: %A.F.1ee: %A.F.type.904 = struct_value () [symbolic]
  680. // CHECK:STDOUT: %A.assoc_type.b05: type = assoc_entity_type @A, @A(%W) [symbolic]
  681. // CHECK:STDOUT: %assoc0.c82: %A.assoc_type.b05 = assoc_entity element0, @A.%A.F.decl [symbolic]
  682. // CHECK:STDOUT: %require_complete.651: <witness> = require_complete_type %A.type.ff4 [symbolic]
  683. // CHECK:STDOUT: %A.impl_witness.4bf: <witness> = impl_witness file.%A.impl_witness_table, @tuple.type.as.A.impl(%V1, %V2, %W) [symbolic]
  684. // CHECK:STDOUT: %U.753: type = bind_symbolic_name U, 3 [symbolic]
  685. // CHECK:STDOUT: %pattern_type.549: type = pattern_type %U.753 [symbolic]
  686. // CHECK:STDOUT: %tuple.type.11f: type = tuple_type (type, %tuple.type.24b, type) [concrete]
  687. // CHECK:STDOUT: %tuple.type.8ae: type = tuple_type (%W, %tuple.type.30b, %U.753) [symbolic]
  688. // CHECK:STDOUT: %pattern_type.d4a: type = pattern_type %tuple.type.8ae [symbolic]
  689. // CHECK:STDOUT: %tuple.type.as.A.impl.F.type.ce1: type = fn_type @tuple.type.as.A.impl.F, @tuple.type.as.A.impl(%V1, %V2, %W) [symbolic]
  690. // CHECK:STDOUT: %tuple.type.as.A.impl.F.cb7: %tuple.type.as.A.impl.F.type.ce1 = struct_value () [symbolic]
  691. // CHECK:STDOUT: %A.facet.452: %A.type.ff4 = facet_value %tuple.type.30b, (%A.impl_witness.4bf) [symbolic]
  692. // CHECK:STDOUT: %tuple.type.42f: type = tuple_type (type, %A.type.ff4, type) [symbolic]
  693. // CHECK:STDOUT: %require_complete.d4d: <witness> = require_complete_type %tuple.type.8ae [symbolic]
  694. // CHECK:STDOUT: %require_complete.ed4: <witness> = require_complete_type %U.753 [symbolic]
  695. // CHECK:STDOUT: %tuple.type.as.A.impl.F.specific_fn.0dd: <specific function> = specific_function %tuple.type.as.A.impl.F.cb7, @tuple.type.as.A.impl.F(%V1, %V2, %W, %U.753) [symbolic]
  696. // CHECK:STDOUT: %Call.type: type = fn_type @Call [concrete]
  697. // CHECK:STDOUT: %Call: %Call.type = struct_value () [concrete]
  698. // CHECK:STDOUT: %tuple.type.a46: type = tuple_type (%Y1, %Y2) [concrete]
  699. // CHECK:STDOUT: %A.type.0a4: type = facet_type <@A, @A(%X)> [concrete]
  700. // CHECK:STDOUT: %Self.08e: %A.type.0a4 = bind_symbolic_name Self, 1 [symbolic]
  701. // CHECK:STDOUT: %A.F.type.13d: type = fn_type @A.F, @A(%X) [concrete]
  702. // CHECK:STDOUT: %A.F.d83: %A.F.type.13d = struct_value () [concrete]
  703. // CHECK:STDOUT: %A.assoc_type.296: type = assoc_entity_type @A, @A(%X) [concrete]
  704. // CHECK:STDOUT: %assoc0.5f6: %A.assoc_type.296 = assoc_entity element0, @A.%A.F.decl [concrete]
  705. // CHECK:STDOUT: %complete_type.e2d: <witness> = complete_type_witness %A.type.0a4 [concrete]
  706. // CHECK:STDOUT: %A.impl_witness.c8b: <witness> = impl_witness file.%A.impl_witness_table, @tuple.type.as.A.impl(%Y1, %Y2, %X) [concrete]
  707. // CHECK:STDOUT: %tuple.type.as.A.impl.F.type.bdb: type = fn_type @tuple.type.as.A.impl.F, @tuple.type.as.A.impl(%Y1, %Y2, %X) [concrete]
  708. // CHECK:STDOUT: %tuple.type.as.A.impl.F.e39: %tuple.type.as.A.impl.F.type.bdb = struct_value () [concrete]
  709. // CHECK:STDOUT: %A.facet.cdd: %A.type.0a4 = facet_value %tuple.type.a46, (%A.impl_witness.c8b) [concrete]
  710. // CHECK:STDOUT: %.9b3: type = fn_type_with_self_type %A.F.type.13d, %A.facet.cdd [concrete]
  711. // CHECK:STDOUT: %pattern_type.8f9: type = pattern_type %Z [concrete]
  712. // CHECK:STDOUT: %tuple.type.415: type = tuple_type (%X, %tuple.type.a46, %Z) [concrete]
  713. // CHECK:STDOUT: %pattern_type.0b2: type = pattern_type %tuple.type.415 [concrete]
  714. // CHECK:STDOUT: %tuple.type.as.A.impl.F.specific_fn.417: <specific function> = specific_function %tuple.type.as.A.impl.F.e39, @tuple.type.as.A.impl.F(%Y1, %Y2, %X, %Z) [concrete]
  715. // CHECK:STDOUT: %Z.val: %Z = struct_value () [concrete]
  716. // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete]
  717. // CHECK:STDOUT: %Destroy.Op.type: type = fn_type @Destroy.Op [concrete]
  718. // CHECK:STDOUT: %type_where: type = facet_type <type where .Self impls <CanDestroy>> [concrete]
  719. // CHECK:STDOUT: %DestroyT: %type_where = bind_symbolic_name DestroyT, 0 [symbolic]
  720. // CHECK:STDOUT: %DestroyT.binding.as_type.as.Destroy.impl.Op.type.b5d: type = fn_type @DestroyT.binding.as_type.as.Destroy.impl.Op, @DestroyT.binding.as_type.as.Destroy.impl(%DestroyT) [symbolic]
  721. // CHECK:STDOUT: %DestroyT.binding.as_type.as.Destroy.impl.Op.544: %DestroyT.binding.as_type.as.Destroy.impl.Op.type.b5d = struct_value () [symbolic]
  722. // CHECK:STDOUT: %facet_value.71a: %type_where = facet_value %tuple.type.415, () [concrete]
  723. // CHECK:STDOUT: %Destroy.impl_witness.5ea: <witness> = impl_witness imports.%Destroy.impl_witness_table, @DestroyT.binding.as_type.as.Destroy.impl(%facet_value.71a) [concrete]
  724. // CHECK:STDOUT: %DestroyT.binding.as_type.as.Destroy.impl.Op.type.6ef: type = fn_type @DestroyT.binding.as_type.as.Destroy.impl.Op, @DestroyT.binding.as_type.as.Destroy.impl(%facet_value.71a) [concrete]
  725. // CHECK:STDOUT: %DestroyT.binding.as_type.as.Destroy.impl.Op.aa7: %DestroyT.binding.as_type.as.Destroy.impl.Op.type.6ef = struct_value () [concrete]
  726. // CHECK:STDOUT: %ptr.ad9: type = ptr_type %tuple.type.415 [concrete]
  727. // CHECK:STDOUT: %complete_type.e23: <witness> = complete_type_witness %ptr.ad9 [concrete]
  728. // CHECK:STDOUT: %Destroy.facet.ec3: %Destroy.type = facet_value %tuple.type.415, (%Destroy.impl_witness.5ea) [concrete]
  729. // CHECK:STDOUT: %.e92: type = fn_type_with_self_type %Destroy.Op.type, %Destroy.facet.ec3 [concrete]
  730. // CHECK:STDOUT: %DestroyT.binding.as_type.as.Destroy.impl.Op.specific_fn.300: <specific function> = specific_function %DestroyT.binding.as_type.as.Destroy.impl.Op.aa7, @DestroyT.binding.as_type.as.Destroy.impl.Op(%facet_value.71a) [concrete]
  731. // CHECK:STDOUT: %facet_value.4e3: %type_where = facet_value %Z, () [concrete]
  732. // CHECK:STDOUT: %DestroyT.binding.as_type.as.Destroy.impl.Op.type.766: type = fn_type @DestroyT.binding.as_type.as.Destroy.impl.Op, @DestroyT.binding.as_type.as.Destroy.impl(%facet_value.4e3) [concrete]
  733. // CHECK:STDOUT: %DestroyT.binding.as_type.as.Destroy.impl.Op.8e8: %DestroyT.binding.as_type.as.Destroy.impl.Op.type.766 = struct_value () [concrete]
  734. // CHECK:STDOUT: %ptr.fb6: type = ptr_type %Z [concrete]
  735. // CHECK:STDOUT: %DestroyT.binding.as_type.as.Destroy.impl.Op.specific_fn.97f: <specific function> = specific_function %DestroyT.binding.as_type.as.Destroy.impl.Op.8e8, @DestroyT.binding.as_type.as.Destroy.impl.Op(%facet_value.4e3) [concrete]
  736. // CHECK:STDOUT: %T.7bf: %A.type.0a4 = bind_symbolic_name T, 0 [symbolic]
  737. // CHECK:STDOUT: %pattern_type.809: type = pattern_type %A.type.0a4 [concrete]
  738. // CHECK:STDOUT: %CallGeneric.type: type = fn_type @CallGeneric [concrete]
  739. // CHECK:STDOUT: %CallGeneric: %CallGeneric.type = struct_value () [concrete]
  740. // CHECK:STDOUT: %T.binding.as_type: type = symbolic_binding_type T, 0, %T.7bf [symbolic]
  741. // CHECK:STDOUT: %A.lookup_impl_witness: <witness> = lookup_impl_witness %T.7bf, @A, @A(%X) [symbolic]
  742. // CHECK:STDOUT: %.0c6: type = fn_type_with_self_type %A.F.type.13d, %T.7bf [symbolic]
  743. // CHECK:STDOUT: %impl.elem0: %.0c6 = impl_witness_access %A.lookup_impl_witness, element0 [symbolic]
  744. // CHECK:STDOUT: %tuple.type.5a1: type = tuple_type (type, %A.type.0a4, type) [concrete]
  745. // CHECK:STDOUT: %tuple.type.16c: type = tuple_type (%X, %T.binding.as_type, %Z) [symbolic]
  746. // CHECK:STDOUT: %pattern_type.c32: type = pattern_type %tuple.type.16c [symbolic]
  747. // CHECK:STDOUT: %specific_impl_fn: <specific function> = specific_impl_function %impl.elem0, @A.F(%X, %T.7bf, %Z) [symbolic]
  748. // CHECK:STDOUT: %require_complete.788: <witness> = require_complete_type %tuple.type.16c [symbolic]
  749. // CHECK:STDOUT: %facet_value.237: %type_where = facet_value %tuple.type.16c, () [symbolic]
  750. // CHECK:STDOUT: %Destroy.impl_witness.6de: <witness> = impl_witness imports.%Destroy.impl_witness_table, @DestroyT.binding.as_type.as.Destroy.impl(%facet_value.237) [symbolic]
  751. // CHECK:STDOUT: %DestroyT.binding.as_type.as.Destroy.impl.Op.type.b35: type = fn_type @DestroyT.binding.as_type.as.Destroy.impl.Op, @DestroyT.binding.as_type.as.Destroy.impl(%facet_value.237) [symbolic]
  752. // CHECK:STDOUT: %DestroyT.binding.as_type.as.Destroy.impl.Op.cae: %DestroyT.binding.as_type.as.Destroy.impl.Op.type.b35 = struct_value () [symbolic]
  753. // CHECK:STDOUT: %ptr.784: type = ptr_type %tuple.type.16c [symbolic]
  754. // CHECK:STDOUT: %require_complete.8be: <witness> = require_complete_type %ptr.784 [symbolic]
  755. // CHECK:STDOUT: %Destroy.facet.837: %Destroy.type = facet_value %tuple.type.16c, (%Destroy.impl_witness.6de) [symbolic]
  756. // CHECK:STDOUT: %.a5a: type = fn_type_with_self_type %Destroy.Op.type, %Destroy.facet.837 [symbolic]
  757. // CHECK:STDOUT: %DestroyT.binding.as_type.as.Destroy.impl.Op.specific_fn.d49: <specific function> = specific_function %DestroyT.binding.as_type.as.Destroy.impl.Op.cae, @DestroyT.binding.as_type.as.Destroy.impl.Op(%facet_value.237) [symbolic]
  758. // CHECK:STDOUT: %CallIndirect.type: type = fn_type @CallIndirect [concrete]
  759. // CHECK:STDOUT: %CallIndirect: %CallIndirect.type = struct_value () [concrete]
  760. // CHECK:STDOUT: %CallGeneric.specific_fn: <specific function> = specific_function %CallGeneric, @CallGeneric(%A.facet.cdd) [concrete]
  761. // CHECK:STDOUT: %complete_type.aa8: <witness> = complete_type_witness %tuple.type.415 [concrete]
  762. // CHECK:STDOUT: }
  763. // CHECK:STDOUT:
  764. // CHECK:STDOUT: imports {
  765. // CHECK:STDOUT: %Core: <namespace> = namespace file.%Core.import, [concrete] {
  766. // CHECK:STDOUT: .Destroy = %Core.Destroy
  767. // CHECK:STDOUT: import Core//prelude
  768. // CHECK:STDOUT: import Core//prelude/...
  769. // CHECK:STDOUT: }
  770. // CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type]
  771. // CHECK:STDOUT: %Core.import_ref.950: @DestroyT.binding.as_type.as.Destroy.impl.%DestroyT.binding.as_type.as.Destroy.impl.Op.type (%DestroyT.binding.as_type.as.Destroy.impl.Op.type.b5d) = import_ref Core//prelude/parts/destroy, loc{{\d+_\d+}}, loaded [symbolic = @DestroyT.binding.as_type.as.Destroy.impl.%DestroyT.binding.as_type.as.Destroy.impl.Op (constants.%DestroyT.binding.as_type.as.Destroy.impl.Op.544)]
  772. // CHECK:STDOUT: %Destroy.impl_witness_table = impl_witness_table (%Core.import_ref.950), @DestroyT.binding.as_type.as.Destroy.impl [concrete]
  773. // CHECK:STDOUT: }
  774. // CHECK:STDOUT:
  775. // CHECK:STDOUT: file {
  776. // CHECK:STDOUT: package: <namespace> = namespace [concrete] {
  777. // CHECK:STDOUT: .Core = imports.%Core
  778. // CHECK:STDOUT: .A = %A.decl
  779. // CHECK:STDOUT: .X = %X.decl
  780. // CHECK:STDOUT: .Y1 = %Y1.decl
  781. // CHECK:STDOUT: .Y2 = %Y2.decl
  782. // CHECK:STDOUT: .Z = %Z.decl
  783. // CHECK:STDOUT: .Call = %Call.decl
  784. // CHECK:STDOUT: .CallGeneric = %CallGeneric.decl
  785. // CHECK:STDOUT: .CallIndirect = %CallIndirect.decl
  786. // CHECK:STDOUT: }
  787. // CHECK:STDOUT: %Core.import = import Core
  788. // CHECK:STDOUT: %A.decl: %A.type.495 = interface_decl @A [concrete = constants.%A.generic] {
  789. // CHECK:STDOUT: %T.patt: %pattern_type.98f = symbolic_binding_pattern T, 0 [concrete]
  790. // CHECK:STDOUT: } {
  791. // CHECK:STDOUT: %.Self: %type = bind_symbolic_name .Self [symbolic_self = constants.%.Self]
  792. // CHECK:STDOUT: %T.loc5_13.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc5_13.1 (constants.%T.8b3)]
  793. // CHECK:STDOUT: }
  794. // CHECK:STDOUT: %X.decl: type = class_decl @X [concrete = constants.%X] {} {}
  795. // CHECK:STDOUT: %Y1.decl: type = class_decl @Y1 [concrete = constants.%Y1] {} {}
  796. // CHECK:STDOUT: %Y2.decl: type = class_decl @Y2 [concrete = constants.%Y2] {} {}
  797. // CHECK:STDOUT: %Z.decl: type = class_decl @Z [concrete = constants.%Z] {} {}
  798. // CHECK:STDOUT: impl_decl @tuple.type.as.A.impl [concrete] {
  799. // CHECK:STDOUT: %V1.patt: %pattern_type.98f = symbolic_binding_pattern V1, 0 [concrete]
  800. // CHECK:STDOUT: %V2.patt: %pattern_type.98f = symbolic_binding_pattern V2, 1 [concrete]
  801. // CHECK:STDOUT: %W.patt: %pattern_type.98f = symbolic_binding_pattern W, 2 [concrete]
  802. // CHECK:STDOUT: } {
  803. // CHECK:STDOUT: %V1.ref: type = name_ref V1, %V1.loc14_14.2 [symbolic = %V1.loc14_14.1 (constants.%V1)]
  804. // CHECK:STDOUT: %V2.ref: type = name_ref V2, %V2.loc14_25.2 [symbolic = %V2.loc14_25.1 (constants.%V2)]
  805. // CHECK:STDOUT: %.loc14_53.1: %tuple.type.24b = tuple_literal (%V1.ref, %V2.ref)
  806. // CHECK:STDOUT: %.loc14_53.2: type = converted %.loc14_53.1, constants.%tuple.type.30b [symbolic = %tuple.type (constants.%tuple.type.30b)]
  807. // CHECK:STDOUT: %A.ref: %A.type.495 = name_ref A, file.%A.decl [concrete = constants.%A.generic]
  808. // CHECK:STDOUT: %W.ref: type = name_ref W, %W.loc14_36.2 [symbolic = %W.loc14_36.1 (constants.%W)]
  809. // CHECK:STDOUT: %A.type.loc14_61.2: type = facet_type <@A, @A(constants.%W)> [symbolic = %A.type.loc14_61.1 (constants.%A.type.ff4)]
  810. // CHECK:STDOUT: %.Self.1: %type = bind_symbolic_name .Self [symbolic_self = constants.%.Self]
  811. // CHECK:STDOUT: %V1.loc14_14.2: type = bind_symbolic_name V1, 0 [symbolic = %V1.loc14_14.1 (constants.%V1)]
  812. // CHECK:STDOUT: %.Self.2: %type = bind_symbolic_name .Self [symbolic_self = constants.%.Self]
  813. // CHECK:STDOUT: %V2.loc14_25.2: type = bind_symbolic_name V2, 1 [symbolic = %V2.loc14_25.1 (constants.%V2)]
  814. // CHECK:STDOUT: %.Self.3: %type = bind_symbolic_name .Self [symbolic_self = constants.%.Self]
  815. // CHECK:STDOUT: %W.loc14_36.2: type = bind_symbolic_name W, 2 [symbolic = %W.loc14_36.1 (constants.%W)]
  816. // CHECK:STDOUT: }
  817. // CHECK:STDOUT: %A.impl_witness_table = impl_witness_table (@tuple.type.as.A.impl.%tuple.type.as.A.impl.F.decl), @tuple.type.as.A.impl [concrete]
  818. // CHECK:STDOUT: %A.impl_witness: <witness> = impl_witness %A.impl_witness_table, @tuple.type.as.A.impl(constants.%V1, constants.%V2, constants.%W) [symbolic = @tuple.type.as.A.impl.%A.impl_witness (constants.%A.impl_witness.4bf)]
  819. // CHECK:STDOUT: %Call.decl: %Call.type = fn_decl @Call [concrete = constants.%Call] {} {}
  820. // CHECK:STDOUT: %CallGeneric.decl: %CallGeneric.type = fn_decl @CallGeneric [concrete = constants.%CallGeneric] {
  821. // CHECK:STDOUT: %T.patt: %pattern_type.809 = symbolic_binding_pattern T, 0 [concrete]
  822. // CHECK:STDOUT: } {
  823. // CHECK:STDOUT: %.loc27: type = splice_block %A.type [concrete = constants.%A.type.0a4] {
  824. // CHECK:STDOUT: %.Self: %type = bind_symbolic_name .Self [symbolic_self = constants.%.Self]
  825. // CHECK:STDOUT: %A.ref: %A.type.495 = name_ref A, file.%A.decl [concrete = constants.%A.generic]
  826. // CHECK:STDOUT: %X.ref: type = name_ref X, file.%X.decl [concrete = constants.%X]
  827. // CHECK:STDOUT: %A.type: type = facet_type <@A, @A(constants.%X)> [concrete = constants.%A.type.0a4]
  828. // CHECK:STDOUT: }
  829. // CHECK:STDOUT: %T.loc27_16.2: %A.type.0a4 = bind_symbolic_name T, 0 [symbolic = %T.loc27_16.1 (constants.%T.7bf)]
  830. // CHECK:STDOUT: }
  831. // CHECK:STDOUT: %CallIndirect.decl: %CallIndirect.type = fn_decl @CallIndirect [concrete = constants.%CallIndirect] {} {}
  832. // CHECK:STDOUT: }
  833. // CHECK:STDOUT:
  834. // CHECK:STDOUT: generic interface @A(%T.loc5_13.2: type) {
  835. // CHECK:STDOUT: %T.loc5_13.1: type = bind_symbolic_name T, 0 [symbolic = %T.loc5_13.1 (constants.%T.8b3)]
  836. // CHECK:STDOUT:
  837. // CHECK:STDOUT: !definition:
  838. // CHECK:STDOUT: %A.type: type = facet_type <@A, @A(%T.loc5_13.1)> [symbolic = %A.type (constants.%A.type.d88)]
  839. // CHECK:STDOUT: %Self.2: @A.%A.type (%A.type.d88) = bind_symbolic_name Self, 1 [symbolic = %Self.2 (constants.%Self.c6b)]
  840. // CHECK:STDOUT: %A.F.type: type = fn_type @A.F, @A(%T.loc5_13.1) [symbolic = %A.F.type (constants.%A.F.type.17a)]
  841. // CHECK:STDOUT: %A.F: @A.%A.F.type (%A.F.type.17a) = struct_value () [symbolic = %A.F (constants.%A.F.0d8)]
  842. // CHECK:STDOUT: %A.assoc_type: type = assoc_entity_type @A, @A(%T.loc5_13.1) [symbolic = %A.assoc_type (constants.%A.assoc_type.ed3)]
  843. // CHECK:STDOUT: %assoc0.loc6_39.2: @A.%A.assoc_type (%A.assoc_type.ed3) = assoc_entity element0, %A.F.decl [symbolic = %assoc0.loc6_39.2 (constants.%assoc0.fcb)]
  844. // CHECK:STDOUT:
  845. // CHECK:STDOUT: interface {
  846. // CHECK:STDOUT: %Self.1: @A.%A.type (%A.type.d88) = bind_symbolic_name Self, 1 [symbolic = %Self.2 (constants.%Self.c6b)]
  847. // CHECK:STDOUT: %A.F.decl: @A.%A.F.type (%A.F.type.17a) = fn_decl @A.F [symbolic = @A.%A.F (constants.%A.F.0d8)] {
  848. // CHECK:STDOUT: %U.patt: %pattern_type.98f = symbolic_binding_pattern U, 2 [concrete]
  849. // CHECK:STDOUT: %u.patt: @A.F.%pattern_type.loc6_18 (%pattern_type.20f) = binding_pattern u [concrete]
  850. // CHECK:STDOUT: %u.param_patt: @A.F.%pattern_type.loc6_18 (%pattern_type.20f) = value_param_pattern %u.patt, call_param0 [concrete]
  851. // CHECK:STDOUT: %return.patt: @A.F.%pattern_type.loc6_24 (%pattern_type.bca) = return_slot_pattern [concrete]
  852. // CHECK:STDOUT: %return.param_patt: @A.F.%pattern_type.loc6_24 (%pattern_type.bca) = out_param_pattern %return.patt, call_param1 [concrete]
  853. // CHECK:STDOUT: } {
  854. // CHECK:STDOUT: %T.ref: type = name_ref T, @A.%T.loc5_13.2 [symbolic = %T (constants.%T.8b3)]
  855. // CHECK:STDOUT: %.loc6_31: @A.F.%A.type (%A.type.d88) = specific_constant @A.%Self.1, @A(constants.%T.8b3) [symbolic = %Self (constants.%Self.c6b)]
  856. // CHECK:STDOUT: %Self.ref: @A.F.%A.type (%A.type.d88) = name_ref Self, %.loc6_31 [symbolic = %Self (constants.%Self.c6b)]
  857. // CHECK:STDOUT: %U.ref.loc6_37: type = name_ref U, %U.loc6_8.2 [symbolic = %U.loc6_8.1 (constants.%U.2cb)]
  858. // CHECK:STDOUT: %.loc6_38.1: @A.F.%tuple.type.loc6_38.1 (%tuple.type.098) = tuple_literal (%T.ref, %Self.ref, %U.ref.loc6_37)
  859. // CHECK:STDOUT: %Self.as_type: type = facet_access_type %Self.ref [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type.0eb)]
  860. // CHECK:STDOUT: %.loc6_38.2: type = converted %Self.ref, %Self.as_type [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type.0eb)]
  861. // CHECK:STDOUT: %.loc6_38.3: type = converted %.loc6_38.1, constants.%tuple.type.253 [symbolic = %tuple.type.loc6_38.2 (constants.%tuple.type.253)]
  862. // CHECK:STDOUT: %.Self: %type = bind_symbolic_name .Self [symbolic_self = constants.%.Self]
  863. // CHECK:STDOUT: %U.loc6_8.2: type = bind_symbolic_name U, 2 [symbolic = %U.loc6_8.1 (constants.%U.2cb)]
  864. // CHECK:STDOUT: %u.param: @A.F.%U.loc6_8.1 (%U.2cb) = value_param call_param0
  865. // CHECK:STDOUT: %U.ref.loc6_21: type = name_ref U, %U.loc6_8.2 [symbolic = %U.loc6_8.1 (constants.%U.2cb)]
  866. // CHECK:STDOUT: %u: @A.F.%U.loc6_8.1 (%U.2cb) = bind_name u, %u.param
  867. // CHECK:STDOUT: %return.param: ref @A.F.%tuple.type.loc6_38.2 (%tuple.type.253) = out_param call_param1
  868. // CHECK:STDOUT: %return: ref @A.F.%tuple.type.loc6_38.2 (%tuple.type.253) = return_slot %return.param
  869. // CHECK:STDOUT: }
  870. // CHECK:STDOUT: %assoc0.loc6_39.1: @A.%A.assoc_type (%A.assoc_type.ed3) = assoc_entity element0, %A.F.decl [symbolic = %assoc0.loc6_39.2 (constants.%assoc0.fcb)]
  871. // CHECK:STDOUT:
  872. // CHECK:STDOUT: !members:
  873. // CHECK:STDOUT: .Self = %Self.1
  874. // CHECK:STDOUT: .T = <poisoned>
  875. // CHECK:STDOUT: .F = %assoc0.loc6_39.1
  876. // CHECK:STDOUT: witness = (%A.F.decl)
  877. // CHECK:STDOUT: }
  878. // CHECK:STDOUT: }
  879. // CHECK:STDOUT:
  880. // CHECK:STDOUT: generic impl @tuple.type.as.A.impl(%V1.loc14_14.2: type, %V2.loc14_25.2: type, %W.loc14_36.2: type) {
  881. // CHECK:STDOUT: %V1.loc14_14.1: type = bind_symbolic_name V1, 0 [symbolic = %V1.loc14_14.1 (constants.%V1)]
  882. // CHECK:STDOUT: %V2.loc14_25.1: type = bind_symbolic_name V2, 1 [symbolic = %V2.loc14_25.1 (constants.%V2)]
  883. // CHECK:STDOUT: %W.loc14_36.1: type = bind_symbolic_name W, 2 [symbolic = %W.loc14_36.1 (constants.%W)]
  884. // CHECK:STDOUT: %tuple.type: type = tuple_type (%V1.loc14_14.1, %V2.loc14_25.1) [symbolic = %tuple.type (constants.%tuple.type.30b)]
  885. // CHECK:STDOUT: %A.type.loc14_61.1: type = facet_type <@A, @A(%W.loc14_36.1)> [symbolic = %A.type.loc14_61.1 (constants.%A.type.ff4)]
  886. // CHECK:STDOUT: %require_complete: <witness> = require_complete_type %A.type.loc14_61.1 [symbolic = %require_complete (constants.%require_complete.651)]
  887. // CHECK:STDOUT: %A.impl_witness: <witness> = impl_witness file.%A.impl_witness_table, @tuple.type.as.A.impl(%V1.loc14_14.1, %V2.loc14_25.1, %W.loc14_36.1) [symbolic = %A.impl_witness (constants.%A.impl_witness.4bf)]
  888. // CHECK:STDOUT:
  889. // CHECK:STDOUT: !definition:
  890. // CHECK:STDOUT: %tuple.type.as.A.impl.F.type: type = fn_type @tuple.type.as.A.impl.F, @tuple.type.as.A.impl(%V1.loc14_14.1, %V2.loc14_25.1, %W.loc14_36.1) [symbolic = %tuple.type.as.A.impl.F.type (constants.%tuple.type.as.A.impl.F.type.ce1)]
  891. // CHECK:STDOUT: %tuple.type.as.A.impl.F: @tuple.type.as.A.impl.%tuple.type.as.A.impl.F.type (%tuple.type.as.A.impl.F.type.ce1) = struct_value () [symbolic = %tuple.type.as.A.impl.F (constants.%tuple.type.as.A.impl.F.cb7)]
  892. // CHECK:STDOUT:
  893. // CHECK:STDOUT: impl: %.loc14_53.2 as %A.type.loc14_61.2 {
  894. // CHECK:STDOUT: %tuple.type.as.A.impl.F.decl: @tuple.type.as.A.impl.%tuple.type.as.A.impl.F.type (%tuple.type.as.A.impl.F.type.ce1) = fn_decl @tuple.type.as.A.impl.F [symbolic = @tuple.type.as.A.impl.%tuple.type.as.A.impl.F (constants.%tuple.type.as.A.impl.F.cb7)] {
  895. // CHECK:STDOUT: %U.patt: %pattern_type.98f = symbolic_binding_pattern U, 3 [concrete]
  896. // CHECK:STDOUT: %u.patt: @tuple.type.as.A.impl.F.%pattern_type.loc17_18 (%pattern_type.549) = binding_pattern u [concrete]
  897. // CHECK:STDOUT: %u.param_patt: @tuple.type.as.A.impl.F.%pattern_type.loc17_18 (%pattern_type.549) = value_param_pattern %u.patt, call_param0 [concrete]
  898. // CHECK:STDOUT: %return.patt: @tuple.type.as.A.impl.F.%pattern_type.loc17_24 (%pattern_type.d4a) = return_slot_pattern [concrete]
  899. // CHECK:STDOUT: %return.param_patt: @tuple.type.as.A.impl.F.%pattern_type.loc17_24 (%pattern_type.d4a) = out_param_pattern %return.patt, call_param1 [concrete]
  900. // CHECK:STDOUT: } {
  901. // CHECK:STDOUT: %W.ref: type = name_ref W, @tuple.type.as.A.impl.%W.loc14_36.2 [symbolic = %W (constants.%W)]
  902. // CHECK:STDOUT: %V1.ref: type = name_ref V1, @tuple.type.as.A.impl.%V1.loc14_14.2 [symbolic = %V1 (constants.%V1)]
  903. // CHECK:STDOUT: %V2.ref: type = name_ref V2, @tuple.type.as.A.impl.%V2.loc14_25.2 [symbolic = %V2 (constants.%V2)]
  904. // CHECK:STDOUT: %.loc17_38: %tuple.type.24b = tuple_literal (%V1.ref, %V2.ref)
  905. // CHECK:STDOUT: %U.ref.loc17_41: type = name_ref U, %U.loc17_8.2 [symbolic = %U.loc17_8.1 (constants.%U.753)]
  906. // CHECK:STDOUT: %.loc17_42.1: %tuple.type.11f = tuple_literal (%W.ref, %.loc17_38, %U.ref.loc17_41)
  907. // CHECK:STDOUT: %.loc17_42.2: type = converted %.loc17_38, constants.%tuple.type.30b [symbolic = %tuple.type.loc17_42.1 (constants.%tuple.type.30b)]
  908. // CHECK:STDOUT: %.loc17_42.3: type = converted %.loc17_42.1, constants.%tuple.type.8ae [symbolic = %tuple.type.loc17_42.2 (constants.%tuple.type.8ae)]
  909. // CHECK:STDOUT: %.Self: %type = bind_symbolic_name .Self [symbolic_self = constants.%.Self]
  910. // CHECK:STDOUT: %U.loc17_8.2: type = bind_symbolic_name U, 3 [symbolic = %U.loc17_8.1 (constants.%U.753)]
  911. // CHECK:STDOUT: %u.param: @tuple.type.as.A.impl.F.%U.loc17_8.1 (%U.753) = value_param call_param0
  912. // CHECK:STDOUT: %U.ref.loc17_21: type = name_ref U, %U.loc17_8.2 [symbolic = %U.loc17_8.1 (constants.%U.753)]
  913. // CHECK:STDOUT: %u: @tuple.type.as.A.impl.F.%U.loc17_8.1 (%U.753) = bind_name u, %u.param
  914. // CHECK:STDOUT: %return.param: ref @tuple.type.as.A.impl.F.%tuple.type.loc17_42.2 (%tuple.type.8ae) = out_param call_param1
  915. // CHECK:STDOUT: %return: ref @tuple.type.as.A.impl.F.%tuple.type.loc17_42.2 (%tuple.type.8ae) = return_slot %return.param
  916. // CHECK:STDOUT: }
  917. // CHECK:STDOUT:
  918. // CHECK:STDOUT: !members:
  919. // CHECK:STDOUT: .W = <poisoned>
  920. // CHECK:STDOUT: .V1 = <poisoned>
  921. // CHECK:STDOUT: .V2 = <poisoned>
  922. // CHECK:STDOUT: .F = %tuple.type.as.A.impl.F.decl
  923. // CHECK:STDOUT: witness = file.%A.impl_witness
  924. // CHECK:STDOUT: }
  925. // CHECK:STDOUT: }
  926. // CHECK:STDOUT:
  927. // CHECK:STDOUT: class @X {
  928. // CHECK:STDOUT: %complete_type: <witness> = complete_type_witness constants.%empty_struct_type [concrete = constants.%complete_type.357]
  929. // CHECK:STDOUT: complete_type_witness = %complete_type
  930. // CHECK:STDOUT:
  931. // CHECK:STDOUT: !members:
  932. // CHECK:STDOUT: .Self = constants.%X
  933. // CHECK:STDOUT: }
  934. // CHECK:STDOUT:
  935. // CHECK:STDOUT: class @Y1 {
  936. // CHECK:STDOUT: %complete_type: <witness> = complete_type_witness constants.%empty_struct_type [concrete = constants.%complete_type.357]
  937. // CHECK:STDOUT: complete_type_witness = %complete_type
  938. // CHECK:STDOUT:
  939. // CHECK:STDOUT: !members:
  940. // CHECK:STDOUT: .Self = constants.%Y1
  941. // CHECK:STDOUT: }
  942. // CHECK:STDOUT:
  943. // CHECK:STDOUT: class @Y2 {
  944. // CHECK:STDOUT: %complete_type: <witness> = complete_type_witness constants.%empty_struct_type [concrete = constants.%complete_type.357]
  945. // CHECK:STDOUT: complete_type_witness = %complete_type
  946. // CHECK:STDOUT:
  947. // CHECK:STDOUT: !members:
  948. // CHECK:STDOUT: .Self = constants.%Y2
  949. // CHECK:STDOUT: }
  950. // CHECK:STDOUT:
  951. // CHECK:STDOUT: class @Z {
  952. // CHECK:STDOUT: %complete_type: <witness> = complete_type_witness constants.%empty_struct_type [concrete = constants.%complete_type.357]
  953. // CHECK:STDOUT: complete_type_witness = %complete_type
  954. // CHECK:STDOUT:
  955. // CHECK:STDOUT: !members:
  956. // CHECK:STDOUT: .Self = constants.%Z
  957. // CHECK:STDOUT: }
  958. // CHECK:STDOUT:
  959. // CHECK:STDOUT: generic fn @A.F(@A.%T.loc5_13.2: type, @A.%Self.1: @A.%A.type (%A.type.d88), %U.loc6_8.2: type) {
  960. // CHECK:STDOUT: %U.loc6_8.1: type = bind_symbolic_name U, 2 [symbolic = %U.loc6_8.1 (constants.%U.2cb)]
  961. // CHECK:STDOUT: %pattern_type.loc6_18: type = pattern_type %U.loc6_8.1 [symbolic = %pattern_type.loc6_18 (constants.%pattern_type.20f)]
  962. // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic = %T (constants.%T.8b3)]
  963. // CHECK:STDOUT: %A.type: type = facet_type <@A, @A(%T)> [symbolic = %A.type (constants.%A.type.d88)]
  964. // CHECK:STDOUT: %Self: @A.F.%A.type (%A.type.d88) = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.c6b)]
  965. // CHECK:STDOUT: %tuple.type.loc6_38.1: type = tuple_type (type, %A.type, type) [symbolic = %tuple.type.loc6_38.1 (constants.%tuple.type.098)]
  966. // CHECK:STDOUT: %Self.binding.as_type: type = symbolic_binding_type Self, 1, %Self [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type.0eb)]
  967. // CHECK:STDOUT: %tuple.type.loc6_38.2: type = tuple_type (%T, %Self.binding.as_type, %U.loc6_8.1) [symbolic = %tuple.type.loc6_38.2 (constants.%tuple.type.253)]
  968. // CHECK:STDOUT: %pattern_type.loc6_24: type = pattern_type %tuple.type.loc6_38.2 [symbolic = %pattern_type.loc6_24 (constants.%pattern_type.bca)]
  969. // CHECK:STDOUT:
  970. // CHECK:STDOUT: fn(%u.param: @A.F.%U.loc6_8.1 (%U.2cb)) -> @A.F.%tuple.type.loc6_38.2 (%tuple.type.253);
  971. // CHECK:STDOUT: }
  972. // CHECK:STDOUT:
  973. // CHECK:STDOUT: generic fn @tuple.type.as.A.impl.F(@tuple.type.as.A.impl.%V1.loc14_14.2: type, @tuple.type.as.A.impl.%V2.loc14_25.2: type, @tuple.type.as.A.impl.%W.loc14_36.2: type, %U.loc17_8.2: type) {
  974. // CHECK:STDOUT: %U.loc17_8.1: type = bind_symbolic_name U, 3 [symbolic = %U.loc17_8.1 (constants.%U.753)]
  975. // CHECK:STDOUT: %pattern_type.loc17_18: type = pattern_type %U.loc17_8.1 [symbolic = %pattern_type.loc17_18 (constants.%pattern_type.549)]
  976. // CHECK:STDOUT: %W: type = bind_symbolic_name W, 2 [symbolic = %W (constants.%W)]
  977. // CHECK:STDOUT: %V1: type = bind_symbolic_name V1, 0 [symbolic = %V1 (constants.%V1)]
  978. // CHECK:STDOUT: %V2: type = bind_symbolic_name V2, 1 [symbolic = %V2 (constants.%V2)]
  979. // CHECK:STDOUT: %tuple.type.loc17_42.1: type = tuple_type (%V1, %V2) [symbolic = %tuple.type.loc17_42.1 (constants.%tuple.type.30b)]
  980. // CHECK:STDOUT: %tuple.type.loc17_42.2: type = tuple_type (%W, %tuple.type.loc17_42.1, %U.loc17_8.1) [symbolic = %tuple.type.loc17_42.2 (constants.%tuple.type.8ae)]
  981. // CHECK:STDOUT: %pattern_type.loc17_24: type = pattern_type %tuple.type.loc17_42.2 [symbolic = %pattern_type.loc17_24 (constants.%pattern_type.d4a)]
  982. // CHECK:STDOUT:
  983. // CHECK:STDOUT: !definition:
  984. // CHECK:STDOUT: %require_complete.loc17_24: <witness> = require_complete_type %tuple.type.loc17_42.2 [symbolic = %require_complete.loc17_24 (constants.%require_complete.d4d)]
  985. // CHECK:STDOUT: %require_complete.loc17_19: <witness> = require_complete_type %U.loc17_8.1 [symbolic = %require_complete.loc17_19 (constants.%require_complete.ed4)]
  986. // CHECK:STDOUT: %tuple.type.as.A.impl.F.type: type = fn_type @tuple.type.as.A.impl.F, @tuple.type.as.A.impl(%V1, %V2, %W) [symbolic = %tuple.type.as.A.impl.F.type (constants.%tuple.type.as.A.impl.F.type.ce1)]
  987. // CHECK:STDOUT: %tuple.type.as.A.impl.F: @tuple.type.as.A.impl.F.%tuple.type.as.A.impl.F.type (%tuple.type.as.A.impl.F.type.ce1) = struct_value () [symbolic = %tuple.type.as.A.impl.F (constants.%tuple.type.as.A.impl.F.cb7)]
  988. // CHECK:STDOUT: %tuple.type.as.A.impl.F.specific_fn.loc18_12.2: <specific function> = specific_function %tuple.type.as.A.impl.F, @tuple.type.as.A.impl.F(%V1, %V2, %W, %U.loc17_8.1) [symbolic = %tuple.type.as.A.impl.F.specific_fn.loc18_12.2 (constants.%tuple.type.as.A.impl.F.specific_fn.0dd)]
  989. // CHECK:STDOUT:
  990. // CHECK:STDOUT: fn(%u.param: @tuple.type.as.A.impl.F.%U.loc17_8.1 (%U.753)) -> %return.param: @tuple.type.as.A.impl.F.%tuple.type.loc17_42.2 (%tuple.type.8ae) {
  991. // CHECK:STDOUT: !entry:
  992. // CHECK:STDOUT: %.loc18: @tuple.type.as.A.impl.F.%tuple.type.as.A.impl.F.type (%tuple.type.as.A.impl.F.type.ce1) = specific_constant @tuple.type.as.A.impl.%tuple.type.as.A.impl.F.decl, @tuple.type.as.A.impl(constants.%V1, constants.%V2, constants.%W) [symbolic = %tuple.type.as.A.impl.F (constants.%tuple.type.as.A.impl.F.cb7)]
  993. // CHECK:STDOUT: %F.ref: @tuple.type.as.A.impl.F.%tuple.type.as.A.impl.F.type (%tuple.type.as.A.impl.F.type.ce1) = name_ref F, %.loc18 [symbolic = %tuple.type.as.A.impl.F (constants.%tuple.type.as.A.impl.F.cb7)]
  994. // CHECK:STDOUT: %U.ref.loc18: type = name_ref U, %U.loc17_8.2 [symbolic = %U.loc17_8.1 (constants.%U.753)]
  995. // CHECK:STDOUT: %u.ref: @tuple.type.as.A.impl.F.%U.loc17_8.1 (%U.753) = name_ref u, %u
  996. // CHECK:STDOUT: %tuple.type.as.A.impl.F.specific_fn.loc18_12.1: <specific function> = specific_function %F.ref, @tuple.type.as.A.impl.F(constants.%V1, constants.%V2, constants.%W, constants.%U.753) [symbolic = %tuple.type.as.A.impl.F.specific_fn.loc18_12.2 (constants.%tuple.type.as.A.impl.F.specific_fn.0dd)]
  997. // CHECK:STDOUT: %.loc17_24: ref @tuple.type.as.A.impl.F.%tuple.type.loc17_42.2 (%tuple.type.8ae) = splice_block %return {}
  998. // CHECK:STDOUT: %tuple.type.as.A.impl.F.call: init @tuple.type.as.A.impl.F.%tuple.type.loc17_42.2 (%tuple.type.8ae) = call %tuple.type.as.A.impl.F.specific_fn.loc18_12.1(%u.ref) to %.loc17_24
  999. // CHECK:STDOUT: return %tuple.type.as.A.impl.F.call to %return
  1000. // CHECK:STDOUT: }
  1001. // CHECK:STDOUT: }
  1002. // CHECK:STDOUT:
  1003. // CHECK:STDOUT: fn @Call() {
  1004. // CHECK:STDOUT: !entry:
  1005. // CHECK:STDOUT: %Y1.ref: type = name_ref Y1, file.%Y1.decl [concrete = constants.%Y1]
  1006. // CHECK:STDOUT: %Y2.ref: type = name_ref Y2, file.%Y2.decl [concrete = constants.%Y2]
  1007. // CHECK:STDOUT: %.loc24_12: %tuple.type.24b = tuple_literal (%Y1.ref, %Y2.ref)
  1008. // CHECK:STDOUT: %.loc24_14: type = converted %.loc24_12, constants.%tuple.type.a46 [concrete = constants.%tuple.type.a46]
  1009. // CHECK:STDOUT: %A.ref: %A.type.495 = name_ref A, file.%A.decl [concrete = constants.%A.generic]
  1010. // CHECK:STDOUT: %X.ref: type = name_ref X, file.%X.decl [concrete = constants.%X]
  1011. // CHECK:STDOUT: %A.type: type = facet_type <@A, @A(constants.%X)> [concrete = constants.%A.type.0a4]
  1012. // CHECK:STDOUT: %A.facet: %A.type.0a4 = facet_value %.loc24_14, (constants.%A.impl_witness.c8b) [concrete = constants.%A.facet.cdd]
  1013. // CHECK:STDOUT: %.loc24_23: %A.type.0a4 = converted %.loc24_14, %A.facet [concrete = constants.%A.facet.cdd]
  1014. // CHECK:STDOUT: %.loc24_31.1: %A.assoc_type.296 = specific_constant @A.%assoc0.loc6_39.1, @A(constants.%X) [concrete = constants.%assoc0.5f6]
  1015. // CHECK:STDOUT: %F.ref: %A.assoc_type.296 = name_ref F, %.loc24_31.1 [concrete = constants.%assoc0.5f6]
  1016. // CHECK:STDOUT: %as_type: type = facet_access_type %.loc24_23 [concrete = constants.%tuple.type.a46]
  1017. // CHECK:STDOUT: %.loc24_31.2: type = converted %.loc24_23, %as_type [concrete = constants.%tuple.type.a46]
  1018. // CHECK:STDOUT: %impl.elem0: %.9b3 = impl_witness_access constants.%A.impl_witness.c8b, element0 [concrete = constants.%tuple.type.as.A.impl.F.e39]
  1019. // CHECK:STDOUT: %Z.ref: type = name_ref Z, file.%Z.decl [concrete = constants.%Z]
  1020. // CHECK:STDOUT: %.loc24_38.1: %empty_struct_type = struct_literal ()
  1021. // CHECK:STDOUT: %specific_fn: <specific function> = specific_function %impl.elem0, @tuple.type.as.A.impl.F(constants.%Y1, constants.%Y2, constants.%X, constants.%Z) [concrete = constants.%tuple.type.as.A.impl.F.specific_fn.417]
  1022. // CHECK:STDOUT: %.loc24_39.1: ref %tuple.type.415 = temporary_storage
  1023. // CHECK:STDOUT: %.loc24_38.2: ref %Z = temporary_storage
  1024. // CHECK:STDOUT: %.loc24_38.3: init %Z = class_init (), %.loc24_38.2 [concrete = constants.%Z.val]
  1025. // CHECK:STDOUT: %.loc24_38.4: ref %Z = temporary %.loc24_38.2, %.loc24_38.3
  1026. // CHECK:STDOUT: %.loc24_38.5: ref %Z = converted %.loc24_38.1, %.loc24_38.4
  1027. // CHECK:STDOUT: %.loc24_38.6: %Z = bind_value %.loc24_38.5
  1028. // CHECK:STDOUT: %tuple.type.as.A.impl.F.call: init %tuple.type.415 = call %specific_fn(%.loc24_38.6) to %.loc24_39.1
  1029. // CHECK:STDOUT: %.loc24_39.2: ref %tuple.type.415 = temporary %.loc24_39.1, %tuple.type.as.A.impl.F.call
  1030. // CHECK:STDOUT: %DestroyT.binding.as_type.as.Destroy.impl.Op.bound.loc24_39: <bound method> = bound_method %.loc24_39.2, constants.%DestroyT.binding.as_type.as.Destroy.impl.Op.aa7
  1031. // CHECK:STDOUT: %DestroyT.binding.as_type.as.Destroy.impl.Op.specific_fn.1: <specific function> = specific_function constants.%DestroyT.binding.as_type.as.Destroy.impl.Op.aa7, @DestroyT.binding.as_type.as.Destroy.impl.Op(constants.%facet_value.71a) [concrete = constants.%DestroyT.binding.as_type.as.Destroy.impl.Op.specific_fn.300]
  1032. // CHECK:STDOUT: %bound_method.loc24_39: <bound method> = bound_method %.loc24_39.2, %DestroyT.binding.as_type.as.Destroy.impl.Op.specific_fn.1
  1033. // CHECK:STDOUT: %addr.loc24_39: %ptr.ad9 = addr_of %.loc24_39.2
  1034. // CHECK:STDOUT: %DestroyT.binding.as_type.as.Destroy.impl.Op.call.loc24_39: init %empty_tuple.type = call %bound_method.loc24_39(%addr.loc24_39)
  1035. // CHECK:STDOUT: %DestroyT.binding.as_type.as.Destroy.impl.Op.bound.loc24_38: <bound method> = bound_method %.loc24_38.4, constants.%DestroyT.binding.as_type.as.Destroy.impl.Op.8e8
  1036. // CHECK:STDOUT: %DestroyT.binding.as_type.as.Destroy.impl.Op.specific_fn.2: <specific function> = specific_function constants.%DestroyT.binding.as_type.as.Destroy.impl.Op.8e8, @DestroyT.binding.as_type.as.Destroy.impl.Op(constants.%facet_value.4e3) [concrete = constants.%DestroyT.binding.as_type.as.Destroy.impl.Op.specific_fn.97f]
  1037. // CHECK:STDOUT: %bound_method.loc24_38: <bound method> = bound_method %.loc24_38.4, %DestroyT.binding.as_type.as.Destroy.impl.Op.specific_fn.2
  1038. // CHECK:STDOUT: %addr.loc24_38: %ptr.fb6 = addr_of %.loc24_38.4
  1039. // CHECK:STDOUT: %DestroyT.binding.as_type.as.Destroy.impl.Op.call.loc24_38: init %empty_tuple.type = call %bound_method.loc24_38(%addr.loc24_38)
  1040. // CHECK:STDOUT: return
  1041. // CHECK:STDOUT: }
  1042. // CHECK:STDOUT:
  1043. // CHECK:STDOUT: generic fn @CallGeneric(%T.loc27_16.2: %A.type.0a4) {
  1044. // CHECK:STDOUT: %T.loc27_16.1: %A.type.0a4 = bind_symbolic_name T, 0 [symbolic = %T.loc27_16.1 (constants.%T.7bf)]
  1045. // CHECK:STDOUT:
  1046. // CHECK:STDOUT: !definition:
  1047. // CHECK:STDOUT: %T.binding.as_type: type = symbolic_binding_type T, 0, %T.loc27_16.1 [symbolic = %T.binding.as_type (constants.%T.binding.as_type)]
  1048. // CHECK:STDOUT: %A.lookup_impl_witness: <witness> = lookup_impl_witness %T.loc27_16.1, @A, @A(constants.%X) [symbolic = %A.lookup_impl_witness (constants.%A.lookup_impl_witness)]
  1049. // CHECK:STDOUT: %.loc28_4.3: type = fn_type_with_self_type constants.%A.F.type.13d, %T.loc27_16.1 [symbolic = %.loc28_4.3 (constants.%.0c6)]
  1050. // CHECK:STDOUT: %impl.elem0.loc28_4.2: @CallGeneric.%.loc28_4.3 (%.0c6) = impl_witness_access %A.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc28_4.2 (constants.%impl.elem0)]
  1051. // CHECK:STDOUT: %specific_impl_fn.loc28_4.2: <specific function> = specific_impl_function %impl.elem0.loc28_4.2, @A.F(constants.%X, %T.loc27_16.1, constants.%Z) [symbolic = %specific_impl_fn.loc28_4.2 (constants.%specific_impl_fn)]
  1052. // CHECK:STDOUT: %tuple.type: type = tuple_type (constants.%X, %T.binding.as_type, constants.%Z) [symbolic = %tuple.type (constants.%tuple.type.16c)]
  1053. // CHECK:STDOUT: %require_complete.loc28_12.1: <witness> = require_complete_type %tuple.type [symbolic = %require_complete.loc28_12.1 (constants.%require_complete.788)]
  1054. // CHECK:STDOUT: %facet_value: %type_where = facet_value %tuple.type, () [symbolic = %facet_value (constants.%facet_value.237)]
  1055. // CHECK:STDOUT: %Destroy.impl_witness: <witness> = impl_witness imports.%Destroy.impl_witness_table, @DestroyT.binding.as_type.as.Destroy.impl(%facet_value) [symbolic = %Destroy.impl_witness (constants.%Destroy.impl_witness.6de)]
  1056. // CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %tuple.type, (%Destroy.impl_witness) [symbolic = %Destroy.facet (constants.%Destroy.facet.837)]
  1057. // CHECK:STDOUT: %.loc28_12.4: type = fn_type_with_self_type constants.%Destroy.Op.type, %Destroy.facet [symbolic = %.loc28_12.4 (constants.%.a5a)]
  1058. // CHECK:STDOUT: %DestroyT.binding.as_type.as.Destroy.impl.Op.type: type = fn_type @DestroyT.binding.as_type.as.Destroy.impl.Op, @DestroyT.binding.as_type.as.Destroy.impl(%facet_value) [symbolic = %DestroyT.binding.as_type.as.Destroy.impl.Op.type (constants.%DestroyT.binding.as_type.as.Destroy.impl.Op.type.b35)]
  1059. // CHECK:STDOUT: %DestroyT.binding.as_type.as.Destroy.impl.Op: @CallGeneric.%DestroyT.binding.as_type.as.Destroy.impl.Op.type (%DestroyT.binding.as_type.as.Destroy.impl.Op.type.b35) = struct_value () [symbolic = %DestroyT.binding.as_type.as.Destroy.impl.Op (constants.%DestroyT.binding.as_type.as.Destroy.impl.Op.cae)]
  1060. // CHECK:STDOUT: %DestroyT.binding.as_type.as.Destroy.impl.Op.specific_fn.loc28: <specific function> = specific_function %DestroyT.binding.as_type.as.Destroy.impl.Op, @DestroyT.binding.as_type.as.Destroy.impl.Op(%facet_value) [symbolic = %DestroyT.binding.as_type.as.Destroy.impl.Op.specific_fn.loc28 (constants.%DestroyT.binding.as_type.as.Destroy.impl.Op.specific_fn.d49)]
  1061. // CHECK:STDOUT: %ptr: type = ptr_type %tuple.type [symbolic = %ptr (constants.%ptr.784)]
  1062. // CHECK:STDOUT: %require_complete.loc28_12.2: <witness> = require_complete_type %ptr [symbolic = %require_complete.loc28_12.2 (constants.%require_complete.8be)]
  1063. // CHECK:STDOUT:
  1064. // CHECK:STDOUT: fn() {
  1065. // CHECK:STDOUT: !entry:
  1066. // CHECK:STDOUT: %T.ref: %A.type.0a4 = name_ref T, %T.loc27_16.2 [symbolic = %T.loc27_16.1 (constants.%T.7bf)]
  1067. // CHECK:STDOUT: %.loc28_4.1: %A.assoc_type.296 = specific_constant @A.%assoc0.loc6_39.1, @A(constants.%X) [concrete = constants.%assoc0.5f6]
  1068. // CHECK:STDOUT: %F.ref: %A.assoc_type.296 = name_ref F, %.loc28_4.1 [concrete = constants.%assoc0.5f6]
  1069. // CHECK:STDOUT: %T.as_type: type = facet_access_type %T.ref [symbolic = %T.binding.as_type (constants.%T.binding.as_type)]
  1070. // CHECK:STDOUT: %.loc28_4.2: type = converted %T.ref, %T.as_type [symbolic = %T.binding.as_type (constants.%T.binding.as_type)]
  1071. // CHECK:STDOUT: %impl.elem0.loc28_4.1: @CallGeneric.%.loc28_4.3 (%.0c6) = impl_witness_access constants.%A.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc28_4.2 (constants.%impl.elem0)]
  1072. // CHECK:STDOUT: %Z.ref: type = name_ref Z, file.%Z.decl [concrete = constants.%Z]
  1073. // CHECK:STDOUT: %.loc28_11.1: %empty_struct_type = struct_literal ()
  1074. // CHECK:STDOUT: %specific_impl_fn.loc28_4.1: <specific function> = specific_impl_function %impl.elem0.loc28_4.1, @A.F(constants.%X, constants.%T.7bf, constants.%Z) [symbolic = %specific_impl_fn.loc28_4.2 (constants.%specific_impl_fn)]
  1075. // CHECK:STDOUT: %.loc28_12.1: ref @CallGeneric.%tuple.type (%tuple.type.16c) = temporary_storage
  1076. // CHECK:STDOUT: %.loc28_11.2: ref %Z = temporary_storage
  1077. // CHECK:STDOUT: %.loc28_11.3: init %Z = class_init (), %.loc28_11.2 [concrete = constants.%Z.val]
  1078. // CHECK:STDOUT: %.loc28_11.4: ref %Z = temporary %.loc28_11.2, %.loc28_11.3
  1079. // CHECK:STDOUT: %.loc28_11.5: ref %Z = converted %.loc28_11.1, %.loc28_11.4
  1080. // CHECK:STDOUT: %.loc28_11.6: %Z = bind_value %.loc28_11.5
  1081. // CHECK:STDOUT: %.loc28_12.2: init @CallGeneric.%tuple.type (%tuple.type.16c) = call %specific_impl_fn.loc28_4.1(%.loc28_11.6) to %.loc28_12.1
  1082. // CHECK:STDOUT: %.loc28_12.3: ref @CallGeneric.%tuple.type (%tuple.type.16c) = temporary %.loc28_12.1, %.loc28_12.2
  1083. // CHECK:STDOUT: %impl.elem0.loc28_12: @CallGeneric.%.loc28_12.4 (%.a5a) = impl_witness_access constants.%Destroy.impl_witness.6de, element0 [symbolic = %DestroyT.binding.as_type.as.Destroy.impl.Op (constants.%DestroyT.binding.as_type.as.Destroy.impl.Op.cae)]
  1084. // CHECK:STDOUT: %bound_method.loc28_12.1: <bound method> = bound_method %.loc28_12.3, %impl.elem0.loc28_12
  1085. // CHECK:STDOUT: %specific_fn: <specific function> = specific_function %impl.elem0.loc28_12, @DestroyT.binding.as_type.as.Destroy.impl.Op(constants.%facet_value.237) [symbolic = %DestroyT.binding.as_type.as.Destroy.impl.Op.specific_fn.loc28 (constants.%DestroyT.binding.as_type.as.Destroy.impl.Op.specific_fn.d49)]
  1086. // CHECK:STDOUT: %bound_method.loc28_12.2: <bound method> = bound_method %.loc28_12.3, %specific_fn
  1087. // CHECK:STDOUT: %addr.loc28_12: @CallGeneric.%ptr (%ptr.784) = addr_of %.loc28_12.3
  1088. // CHECK:STDOUT: %DestroyT.binding.as_type.as.Destroy.impl.Op.call.loc28_12: init %empty_tuple.type = call %bound_method.loc28_12.2(%addr.loc28_12)
  1089. // CHECK:STDOUT: %DestroyT.binding.as_type.as.Destroy.impl.Op.bound: <bound method> = bound_method %.loc28_11.4, constants.%DestroyT.binding.as_type.as.Destroy.impl.Op.8e8
  1090. // CHECK:STDOUT: %DestroyT.binding.as_type.as.Destroy.impl.Op.specific_fn.1: <specific function> = specific_function constants.%DestroyT.binding.as_type.as.Destroy.impl.Op.8e8, @DestroyT.binding.as_type.as.Destroy.impl.Op(constants.%facet_value.4e3) [concrete = constants.%DestroyT.binding.as_type.as.Destroy.impl.Op.specific_fn.97f]
  1091. // CHECK:STDOUT: %bound_method.loc28_11: <bound method> = bound_method %.loc28_11.4, %DestroyT.binding.as_type.as.Destroy.impl.Op.specific_fn.1
  1092. // CHECK:STDOUT: %addr.loc28_11: %ptr.fb6 = addr_of %.loc28_11.4
  1093. // CHECK:STDOUT: %DestroyT.binding.as_type.as.Destroy.impl.Op.call.loc28_11: init %empty_tuple.type = call %bound_method.loc28_11(%addr.loc28_11)
  1094. // CHECK:STDOUT: return
  1095. // CHECK:STDOUT: }
  1096. // CHECK:STDOUT: }
  1097. // CHECK:STDOUT:
  1098. // CHECK:STDOUT: fn @CallIndirect() {
  1099. // CHECK:STDOUT: !entry:
  1100. // CHECK:STDOUT: %CallGeneric.ref: %CallGeneric.type = name_ref CallGeneric, file.%CallGeneric.decl [concrete = constants.%CallGeneric]
  1101. // CHECK:STDOUT: %Y1.ref: type = name_ref Y1, file.%Y1.decl [concrete = constants.%Y1]
  1102. // CHECK:STDOUT: %Y2.ref: type = name_ref Y2, file.%Y2.decl [concrete = constants.%Y2]
  1103. // CHECK:STDOUT: %.loc33_22: %tuple.type.24b = tuple_literal (%Y1.ref, %Y2.ref)
  1104. // CHECK:STDOUT: %.loc33_24: type = converted %.loc33_22, constants.%tuple.type.a46 [concrete = constants.%tuple.type.a46]
  1105. // CHECK:STDOUT: %A.facet: %A.type.0a4 = facet_value %.loc33_24, (constants.%A.impl_witness.c8b) [concrete = constants.%A.facet.cdd]
  1106. // CHECK:STDOUT: %.loc33_31: %A.type.0a4 = converted %.loc33_24, %A.facet [concrete = constants.%A.facet.cdd]
  1107. // CHECK:STDOUT: %CallGeneric.specific_fn: <specific function> = specific_function %CallGeneric.ref, @CallGeneric(constants.%A.facet.cdd) [concrete = constants.%CallGeneric.specific_fn]
  1108. // CHECK:STDOUT: %CallGeneric.call: init %empty_tuple.type = call %CallGeneric.specific_fn()
  1109. // CHECK:STDOUT: return
  1110. // CHECK:STDOUT: }
  1111. // CHECK:STDOUT:
  1112. // CHECK:STDOUT: specific @A(constants.%T.8b3) {
  1113. // CHECK:STDOUT: %T.loc5_13.1 => constants.%T.8b3
  1114. // CHECK:STDOUT: }
  1115. // CHECK:STDOUT:
  1116. // CHECK:STDOUT: specific @A.F(constants.%T.8b3, constants.%Self.c6b, constants.%U.2cb) {
  1117. // CHECK:STDOUT: %U.loc6_8.1 => constants.%U.2cb
  1118. // CHECK:STDOUT: %pattern_type.loc6_18 => constants.%pattern_type.20f
  1119. // CHECK:STDOUT: %T => constants.%T.8b3
  1120. // CHECK:STDOUT: %A.type => constants.%A.type.d88
  1121. // CHECK:STDOUT: %Self => constants.%Self.c6b
  1122. // CHECK:STDOUT: %tuple.type.loc6_38.1 => constants.%tuple.type.098
  1123. // CHECK:STDOUT: %Self.binding.as_type => constants.%Self.binding.as_type.0eb
  1124. // CHECK:STDOUT: %tuple.type.loc6_38.2 => constants.%tuple.type.253
  1125. // CHECK:STDOUT: %pattern_type.loc6_24 => constants.%pattern_type.bca
  1126. // CHECK:STDOUT: }
  1127. // CHECK:STDOUT:
  1128. // CHECK:STDOUT: specific @A(constants.%W) {
  1129. // CHECK:STDOUT: %T.loc5_13.1 => constants.%W
  1130. // CHECK:STDOUT:
  1131. // CHECK:STDOUT: !definition:
  1132. // CHECK:STDOUT: %A.type => constants.%A.type.ff4
  1133. // CHECK:STDOUT: %Self.2 => constants.%Self.6c5
  1134. // CHECK:STDOUT: %A.F.type => constants.%A.F.type.904
  1135. // CHECK:STDOUT: %A.F => constants.%A.F.1ee
  1136. // CHECK:STDOUT: %A.assoc_type => constants.%A.assoc_type.b05
  1137. // CHECK:STDOUT: %assoc0.loc6_39.2 => constants.%assoc0.c82
  1138. // CHECK:STDOUT: }
  1139. // CHECK:STDOUT:
  1140. // CHECK:STDOUT: specific @tuple.type.as.A.impl(constants.%V1, constants.%V2, constants.%W) {
  1141. // CHECK:STDOUT: %V1.loc14_14.1 => constants.%V1
  1142. // CHECK:STDOUT: %V2.loc14_25.1 => constants.%V2
  1143. // CHECK:STDOUT: %W.loc14_36.1 => constants.%W
  1144. // CHECK:STDOUT: %tuple.type => constants.%tuple.type.30b
  1145. // CHECK:STDOUT: %A.type.loc14_61.1 => constants.%A.type.ff4
  1146. // CHECK:STDOUT: %require_complete => constants.%require_complete.651
  1147. // CHECK:STDOUT: %A.impl_witness => constants.%A.impl_witness.4bf
  1148. // CHECK:STDOUT:
  1149. // CHECK:STDOUT: !definition:
  1150. // CHECK:STDOUT: %tuple.type.as.A.impl.F.type => constants.%tuple.type.as.A.impl.F.type.ce1
  1151. // CHECK:STDOUT: %tuple.type.as.A.impl.F => constants.%tuple.type.as.A.impl.F.cb7
  1152. // CHECK:STDOUT: }
  1153. // CHECK:STDOUT:
  1154. // CHECK:STDOUT: specific @tuple.type.as.A.impl.F(constants.%V1, constants.%V2, constants.%W, constants.%U.753) {
  1155. // CHECK:STDOUT: %U.loc17_8.1 => constants.%U.753
  1156. // CHECK:STDOUT: %pattern_type.loc17_18 => constants.%pattern_type.549
  1157. // CHECK:STDOUT: %W => constants.%W
  1158. // CHECK:STDOUT: %V1 => constants.%V1
  1159. // CHECK:STDOUT: %V2 => constants.%V2
  1160. // CHECK:STDOUT: %tuple.type.loc17_42.1 => constants.%tuple.type.30b
  1161. // CHECK:STDOUT: %tuple.type.loc17_42.2 => constants.%tuple.type.8ae
  1162. // CHECK:STDOUT: %pattern_type.loc17_24 => constants.%pattern_type.d4a
  1163. // CHECK:STDOUT:
  1164. // CHECK:STDOUT: !definition:
  1165. // CHECK:STDOUT: %require_complete.loc17_24 => constants.%require_complete.d4d
  1166. // CHECK:STDOUT: %require_complete.loc17_19 => constants.%require_complete.ed4
  1167. // CHECK:STDOUT: %tuple.type.as.A.impl.F.type => constants.%tuple.type.as.A.impl.F.type.ce1
  1168. // CHECK:STDOUT: %tuple.type.as.A.impl.F => constants.%tuple.type.as.A.impl.F.cb7
  1169. // CHECK:STDOUT: %tuple.type.as.A.impl.F.specific_fn.loc18_12.2 => constants.%tuple.type.as.A.impl.F.specific_fn.0dd
  1170. // CHECK:STDOUT: }
  1171. // CHECK:STDOUT:
  1172. // CHECK:STDOUT: specific @A.F(constants.%W, constants.%A.facet.452, constants.%U.753) {
  1173. // CHECK:STDOUT: %U.loc6_8.1 => constants.%U.753
  1174. // CHECK:STDOUT: %pattern_type.loc6_18 => constants.%pattern_type.549
  1175. // CHECK:STDOUT: %T => constants.%W
  1176. // CHECK:STDOUT: %A.type => constants.%A.type.ff4
  1177. // CHECK:STDOUT: %Self => constants.%A.facet.452
  1178. // CHECK:STDOUT: %tuple.type.loc6_38.1 => constants.%tuple.type.42f
  1179. // CHECK:STDOUT: %Self.binding.as_type => constants.%tuple.type.30b
  1180. // CHECK:STDOUT: %tuple.type.loc6_38.2 => constants.%tuple.type.8ae
  1181. // CHECK:STDOUT: %pattern_type.loc6_24 => constants.%pattern_type.d4a
  1182. // CHECK:STDOUT: }
  1183. // CHECK:STDOUT:
  1184. // CHECK:STDOUT: specific @A(constants.%X) {
  1185. // CHECK:STDOUT: %T.loc5_13.1 => constants.%X
  1186. // CHECK:STDOUT:
  1187. // CHECK:STDOUT: !definition:
  1188. // CHECK:STDOUT: %A.type => constants.%A.type.0a4
  1189. // CHECK:STDOUT: %Self.2 => constants.%Self.08e
  1190. // CHECK:STDOUT: %A.F.type => constants.%A.F.type.13d
  1191. // CHECK:STDOUT: %A.F => constants.%A.F.d83
  1192. // CHECK:STDOUT: %A.assoc_type => constants.%A.assoc_type.296
  1193. // CHECK:STDOUT: %assoc0.loc6_39.2 => constants.%assoc0.5f6
  1194. // CHECK:STDOUT: }
  1195. // CHECK:STDOUT:
  1196. // CHECK:STDOUT: specific @tuple.type.as.A.impl(constants.%Y1, constants.%Y2, constants.%X) {
  1197. // CHECK:STDOUT: %V1.loc14_14.1 => constants.%Y1
  1198. // CHECK:STDOUT: %V2.loc14_25.1 => constants.%Y2
  1199. // CHECK:STDOUT: %W.loc14_36.1 => constants.%X
  1200. // CHECK:STDOUT: %tuple.type => constants.%tuple.type.a46
  1201. // CHECK:STDOUT: %A.type.loc14_61.1 => constants.%A.type.0a4
  1202. // CHECK:STDOUT: %require_complete => constants.%complete_type.e2d
  1203. // CHECK:STDOUT: %A.impl_witness => constants.%A.impl_witness.c8b
  1204. // CHECK:STDOUT:
  1205. // CHECK:STDOUT: !definition:
  1206. // CHECK:STDOUT: %tuple.type.as.A.impl.F.type => constants.%tuple.type.as.A.impl.F.type.bdb
  1207. // CHECK:STDOUT: %tuple.type.as.A.impl.F => constants.%tuple.type.as.A.impl.F.e39
  1208. // CHECK:STDOUT: }
  1209. // CHECK:STDOUT:
  1210. // CHECK:STDOUT: specific @tuple.type.as.A.impl.F(constants.%Y1, constants.%Y2, constants.%X, constants.%Z) {
  1211. // CHECK:STDOUT: %U.loc17_8.1 => constants.%Z
  1212. // CHECK:STDOUT: %pattern_type.loc17_18 => constants.%pattern_type.8f9
  1213. // CHECK:STDOUT: %W => constants.%X
  1214. // CHECK:STDOUT: %V1 => constants.%Y1
  1215. // CHECK:STDOUT: %V2 => constants.%Y2
  1216. // CHECK:STDOUT: %tuple.type.loc17_42.1 => constants.%tuple.type.a46
  1217. // CHECK:STDOUT: %tuple.type.loc17_42.2 => constants.%tuple.type.415
  1218. // CHECK:STDOUT: %pattern_type.loc17_24 => constants.%pattern_type.0b2
  1219. // CHECK:STDOUT:
  1220. // CHECK:STDOUT: !definition:
  1221. // CHECK:STDOUT: %require_complete.loc17_24 => constants.%complete_type.aa8
  1222. // CHECK:STDOUT: %require_complete.loc17_19 => constants.%complete_type.357
  1223. // CHECK:STDOUT: %tuple.type.as.A.impl.F.type => constants.%tuple.type.as.A.impl.F.type.bdb
  1224. // CHECK:STDOUT: %tuple.type.as.A.impl.F => constants.%tuple.type.as.A.impl.F.e39
  1225. // CHECK:STDOUT: %tuple.type.as.A.impl.F.specific_fn.loc18_12.2 => constants.%tuple.type.as.A.impl.F.specific_fn.417
  1226. // CHECK:STDOUT: }
  1227. // CHECK:STDOUT:
  1228. // CHECK:STDOUT: specific @CallGeneric(constants.%T.7bf) {
  1229. // CHECK:STDOUT: %T.loc27_16.1 => constants.%T.7bf
  1230. // CHECK:STDOUT: }
  1231. // CHECK:STDOUT:
  1232. // CHECK:STDOUT: specific @A.F(constants.%X, constants.%T.7bf, constants.%Z) {
  1233. // CHECK:STDOUT: %U.loc6_8.1 => constants.%Z
  1234. // CHECK:STDOUT: %pattern_type.loc6_18 => constants.%pattern_type.8f9
  1235. // CHECK:STDOUT: %T => constants.%X
  1236. // CHECK:STDOUT: %A.type => constants.%A.type.0a4
  1237. // CHECK:STDOUT: %Self => constants.%T.7bf
  1238. // CHECK:STDOUT: %tuple.type.loc6_38.1 => constants.%tuple.type.5a1
  1239. // CHECK:STDOUT: %Self.binding.as_type => constants.%T.binding.as_type
  1240. // CHECK:STDOUT: %tuple.type.loc6_38.2 => constants.%tuple.type.16c
  1241. // CHECK:STDOUT: %pattern_type.loc6_24 => constants.%pattern_type.c32
  1242. // CHECK:STDOUT: }
  1243. // CHECK:STDOUT:
  1244. // CHECK:STDOUT: specific @CallGeneric(constants.%A.facet.cdd) {
  1245. // CHECK:STDOUT: %T.loc27_16.1 => constants.%A.facet.cdd
  1246. // CHECK:STDOUT:
  1247. // CHECK:STDOUT: !definition:
  1248. // CHECK:STDOUT: %T.binding.as_type => constants.%tuple.type.a46
  1249. // CHECK:STDOUT: %A.lookup_impl_witness => constants.%A.impl_witness.c8b
  1250. // CHECK:STDOUT: %.loc28_4.3 => constants.%.9b3
  1251. // CHECK:STDOUT: %impl.elem0.loc28_4.2 => constants.%tuple.type.as.A.impl.F.e39
  1252. // CHECK:STDOUT: %specific_impl_fn.loc28_4.2 => constants.%tuple.type.as.A.impl.F.specific_fn.417
  1253. // CHECK:STDOUT: %tuple.type => constants.%tuple.type.415
  1254. // CHECK:STDOUT: %require_complete.loc28_12.1 => constants.%complete_type.aa8
  1255. // CHECK:STDOUT: %facet_value => constants.%facet_value.71a
  1256. // CHECK:STDOUT: %Destroy.impl_witness => constants.%Destroy.impl_witness.5ea
  1257. // CHECK:STDOUT: %Destroy.facet => constants.%Destroy.facet.ec3
  1258. // CHECK:STDOUT: %.loc28_12.4 => constants.%.e92
  1259. // CHECK:STDOUT: %DestroyT.binding.as_type.as.Destroy.impl.Op.type => constants.%DestroyT.binding.as_type.as.Destroy.impl.Op.type.6ef
  1260. // CHECK:STDOUT: %DestroyT.binding.as_type.as.Destroy.impl.Op => constants.%DestroyT.binding.as_type.as.Destroy.impl.Op.aa7
  1261. // CHECK:STDOUT: %DestroyT.binding.as_type.as.Destroy.impl.Op.specific_fn.loc28 => constants.%DestroyT.binding.as_type.as.Destroy.impl.Op.specific_fn.300
  1262. // CHECK:STDOUT: %ptr => constants.%ptr.ad9
  1263. // CHECK:STDOUT: %require_complete.loc28_12.2 => constants.%complete_type.e23
  1264. // CHECK:STDOUT: }
  1265. // CHECK:STDOUT:
  1266. // CHECK:STDOUT: specific @A.F(constants.%X, constants.%A.facet.cdd, constants.%Z) {
  1267. // CHECK:STDOUT: %U.loc6_8.1 => constants.%Z
  1268. // CHECK:STDOUT: %pattern_type.loc6_18 => constants.%pattern_type.8f9
  1269. // CHECK:STDOUT: %T => constants.%X
  1270. // CHECK:STDOUT: %A.type => constants.%A.type.0a4
  1271. // CHECK:STDOUT: %Self => constants.%A.facet.cdd
  1272. // CHECK:STDOUT: %tuple.type.loc6_38.1 => constants.%tuple.type.5a1
  1273. // CHECK:STDOUT: %Self.binding.as_type => constants.%tuple.type.a46
  1274. // CHECK:STDOUT: %tuple.type.loc6_38.2 => constants.%tuple.type.415
  1275. // CHECK:STDOUT: %pattern_type.loc6_24 => constants.%pattern_type.0b2
  1276. // CHECK:STDOUT: }
  1277. // CHECK:STDOUT: