generic_method.carbon 123 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599
  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) & Core.Destroy) {
  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) & Core.Destroy) {
  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 = symbolic_binding .Self [symbolic_self]
  74. // CHECK:STDOUT: %pattern_type.98f: type = pattern_type type [concrete]
  75. // CHECK:STDOUT: %T.67d: type = symbolic_binding T, 0 [symbolic]
  76. // CHECK:STDOUT: %A.type.464: type = generic_interface_type @A [concrete]
  77. // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete]
  78. // CHECK:STDOUT: %A.generic: %A.type.464 = struct_value () [concrete]
  79. // CHECK:STDOUT: %A.type.ade: type = facet_type <@A, @A(%T.67d)> [symbolic]
  80. // CHECK:STDOUT: %Self.362: %A.type.ade = symbolic_binding Self, 1 [symbolic]
  81. // CHECK:STDOUT: %U.4e7: type = symbolic_binding U, 2 [symbolic]
  82. // CHECK:STDOUT: %ptr.8f6: type = ptr_type %U.4e7 [symbolic]
  83. // CHECK:STDOUT: %pattern_type.986: type = pattern_type %ptr.8f6 [symbolic]
  84. // CHECK:STDOUT: %tuple.type.f2d: type = tuple_type (type, %A.type.ade, type) [symbolic]
  85. // CHECK:STDOUT: %tuple.2c7: %tuple.type.f2d = tuple_value (%T.67d, %Self.362, %ptr.8f6) [symbolic]
  86. // CHECK:STDOUT: %Self.binding.as_type.7ec: type = symbolic_binding_type Self, 1, %Self.362 [symbolic]
  87. // CHECK:STDOUT: %tuple.type.762: type = tuple_type (%T.67d, %Self.binding.as_type.7ec, %ptr.8f6) [symbolic]
  88. // CHECK:STDOUT: %.54f: Core.Form = init_form %tuple.type.762 [symbolic]
  89. // CHECK:STDOUT: %pattern_type.f66: type = pattern_type %tuple.type.762 [symbolic]
  90. // CHECK:STDOUT: %A.WithSelf.F.type.0ed: type = fn_type @A.WithSelf.F, @A.WithSelf(%T.67d, %Self.362) [symbolic]
  91. // CHECK:STDOUT: %A.WithSelf.F.33a: %A.WithSelf.F.type.0ed = struct_value () [symbolic]
  92. // CHECK:STDOUT: %A.assoc_type.9f4: type = assoc_entity_type @A, @A(%T.67d) [symbolic]
  93. // CHECK:STDOUT: %assoc0.146: %A.assoc_type.9f4 = assoc_entity element0, @A.WithSelf.%A.WithSelf.F.decl [symbolic]
  94. // CHECK:STDOUT: %X: type = class_type @X [concrete]
  95. // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete]
  96. // CHECK:STDOUT: %complete_type.357: <witness> = complete_type_witness %empty_struct_type [concrete]
  97. // CHECK:STDOUT: %Y: type = class_type @Y [concrete]
  98. // CHECK:STDOUT: %Z: type = class_type @Z [concrete]
  99. // CHECK:STDOUT: %A.type.ab6: type = facet_type <@A, @A(%X)> [concrete]
  100. // CHECK:STDOUT: %A.impl_witness: <witness> = impl_witness @Y.as.A.impl.%A.impl_witness_table [concrete]
  101. // CHECK:STDOUT: %Self.e87: %A.type.ab6 = symbolic_binding Self, 1 [symbolic]
  102. // CHECK:STDOUT: %A.WithSelf.F.type.ba2: type = fn_type @A.WithSelf.F, @A.WithSelf(%X, %Self.362) [symbolic]
  103. // CHECK:STDOUT: %A.WithSelf.F.e5f: %A.WithSelf.F.type.ba2 = struct_value () [symbolic]
  104. // CHECK:STDOUT: %A.assoc_type.f05: type = assoc_entity_type @A, @A(%X) [concrete]
  105. // CHECK:STDOUT: %assoc0.368: %A.assoc_type.f05 = assoc_entity element0, @A.WithSelf.%A.WithSelf.F.decl [concrete]
  106. // CHECK:STDOUT: %U.67d: type = symbolic_binding U, 0 [symbolic]
  107. // CHECK:STDOUT: %ptr.e8f8f9.1: type = ptr_type %U.67d [symbolic]
  108. // CHECK:STDOUT: %pattern_type.4f4b84.1: type = pattern_type %ptr.e8f8f9.1 [symbolic]
  109. // CHECK:STDOUT: %tuple.type.ff9: type = tuple_type (type, type, type) [concrete]
  110. // CHECK:STDOUT: %tuple.7ab: %tuple.type.ff9 = tuple_value (%X, %Y, %ptr.e8f8f9.1) [symbolic]
  111. // CHECK:STDOUT: %tuple.type.244: type = tuple_type (%X, %Y, %ptr.e8f8f9.1) [symbolic]
  112. // CHECK:STDOUT: %.0dc: Core.Form = init_form %tuple.type.244 [symbolic]
  113. // CHECK:STDOUT: %pattern_type.06d: type = pattern_type %tuple.type.244 [symbolic]
  114. // CHECK:STDOUT: %Y.as.A.impl.F.type: type = fn_type @Y.as.A.impl.F [concrete]
  115. // CHECK:STDOUT: %Y.as.A.impl.F: %Y.as.A.impl.F.type = struct_value () [concrete]
  116. // CHECK:STDOUT: %A.facet.04e: %A.type.ab6 = facet_value %Y, (%A.impl_witness) [concrete]
  117. // CHECK:STDOUT: %A.WithSelf.F.type.12f: type = fn_type @A.WithSelf.F, @A.WithSelf(%X, %A.facet.04e) [concrete]
  118. // CHECK:STDOUT: %A.WithSelf.F.48c: %A.WithSelf.F.type.12f = struct_value () [concrete]
  119. // CHECK:STDOUT: %tuple.type.f96: type = tuple_type (type, %A.type.ab6, type) [concrete]
  120. // CHECK:STDOUT: %tuple.5c5: %tuple.type.f96 = tuple_value (%X, %A.facet.04e, %ptr.e8f8f9.1) [symbolic]
  121. // CHECK:STDOUT: %require_complete.ef162c.1: <witness> = require_complete_type %ptr.e8f8f9.1 [symbolic]
  122. // CHECK:STDOUT: %require_complete.034: <witness> = require_complete_type %tuple.type.244 [symbolic]
  123. // CHECK:STDOUT: %empty_struct: %empty_struct_type = struct_value () [concrete]
  124. // CHECK:STDOUT: %tuple.type.dd2: type = tuple_type (%empty_struct_type, %empty_struct_type, %ptr.e8f8f9.1) [symbolic]
  125. // CHECK:STDOUT: %X.val: %X = struct_value () [concrete]
  126. // CHECK:STDOUT: %Y.val: %Y = struct_value () [concrete]
  127. // CHECK:STDOUT: %Copy.type: type = facet_type <@Copy> [concrete]
  128. // CHECK:STDOUT: %ptr.as.Copy.impl.Op.type.2d4455.1: type = fn_type @ptr.as.Copy.impl.Op, @ptr.as.Copy.impl(%T.67d) [symbolic]
  129. // CHECK:STDOUT: %ptr.as.Copy.impl.Op.74e93b.1: %ptr.as.Copy.impl.Op.type.2d4455.1 = struct_value () [symbolic]
  130. // CHECK:STDOUT: %Copy.lookup_impl_witness.2e6: <witness> = lookup_impl_witness %ptr.e8f8f9.1, @Copy [symbolic]
  131. // CHECK:STDOUT: %.2f2: require_specific_def_type = require_specific_def @ptr.as.Copy.impl(%U.67d) [symbolic]
  132. // CHECK:STDOUT: %Copy.facet.c25: %Copy.type = facet_value %ptr.e8f8f9.1, (%Copy.lookup_impl_witness.2e6) [symbolic]
  133. // CHECK:STDOUT: %Copy.WithSelf.Op.type.d82: type = fn_type @Copy.WithSelf.Op, @Copy.WithSelf(%Copy.facet.c25) [symbolic]
  134. // CHECK:STDOUT: %.299: type = fn_type_with_self_type %Copy.WithSelf.Op.type.d82, %Copy.facet.c25 [symbolic]
  135. // CHECK:STDOUT: %impl.elem0.1c7: %.299 = impl_witness_access %Copy.lookup_impl_witness.2e6, element0 [symbolic]
  136. // CHECK:STDOUT: %specific_impl_fn.366: <specific function> = specific_impl_function %impl.elem0.1c7, @Copy.WithSelf.Op(%Copy.facet.c25) [symbolic]
  137. // CHECK:STDOUT: %Call.type: type = fn_type @Call [concrete]
  138. // CHECK:STDOUT: %Call: %Call.type = struct_value () [concrete]
  139. // CHECK:STDOUT: %pattern_type.bdb: type = pattern_type %Z [concrete]
  140. // CHECK:STDOUT: %DefaultOrUnformed.type: type = facet_type <@DefaultOrUnformed> [concrete]
  141. // CHECK:STDOUT: %T.as.DefaultOrUnformed.impl.Op.type.6c6: type = fn_type @T.as.DefaultOrUnformed.impl.Op, @T.as.DefaultOrUnformed.impl(%T.67d) [symbolic]
  142. // CHECK:STDOUT: %T.as.DefaultOrUnformed.impl.Op.ae1: %T.as.DefaultOrUnformed.impl.Op.type.6c6 = struct_value () [symbolic]
  143. // CHECK:STDOUT: %DefaultOrUnformed.impl_witness.263: <witness> = impl_witness imports.%DefaultOrUnformed.impl_witness_table.349, @T.as.DefaultOrUnformed.impl(%Z) [concrete]
  144. // CHECK:STDOUT: %T.as.DefaultOrUnformed.impl.Op.type.b84: type = fn_type @T.as.DefaultOrUnformed.impl.Op, @T.as.DefaultOrUnformed.impl(%Z) [concrete]
  145. // CHECK:STDOUT: %T.as.DefaultOrUnformed.impl.Op.4f1: %T.as.DefaultOrUnformed.impl.Op.type.b84 = struct_value () [concrete]
  146. // CHECK:STDOUT: %DefaultOrUnformed.facet: %DefaultOrUnformed.type = facet_value %Z, (%DefaultOrUnformed.impl_witness.263) [concrete]
  147. // CHECK:STDOUT: %T.as.DefaultOrUnformed.impl.Op.specific_fn: <specific function> = specific_function %T.as.DefaultOrUnformed.impl.Op.4f1, @T.as.DefaultOrUnformed.impl.Op(%Z) [concrete]
  148. // CHECK:STDOUT: %.de2: type = fn_type_with_self_type %A.WithSelf.F.type.12f, %A.facet.04e [concrete]
  149. // CHECK:STDOUT: %ptr.2a0: type = ptr_type %Z [concrete]
  150. // CHECK:STDOUT: %pattern_type.771: type = pattern_type %ptr.2a0 [concrete]
  151. // CHECK:STDOUT: %tuple.84f: %tuple.type.ff9 = tuple_value (%X, %Y, %ptr.2a0) [concrete]
  152. // CHECK:STDOUT: %tuple.type.847: type = tuple_type (%X, %Y, %ptr.2a0) [concrete]
  153. // CHECK:STDOUT: %.88e: Core.Form = init_form %tuple.type.847 [concrete]
  154. // CHECK:STDOUT: %pattern_type.79c: type = pattern_type %tuple.type.847 [concrete]
  155. // 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]
  156. // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete]
  157. // CHECK:STDOUT: %Destroy.Op.type.bae255.3: type = fn_type @Destroy.Op.loc23_22.3 [concrete]
  158. // CHECK:STDOUT: %Destroy.Op.651ba6.3: %Destroy.Op.type.bae255.3 = struct_value () [concrete]
  159. // CHECK:STDOUT: %custom_witness.8d7fae.3: <witness> = custom_witness (%Destroy.Op.651ba6.3), @Destroy [concrete]
  160. // CHECK:STDOUT: %Destroy.Op.type.bae255.5: type = fn_type @Destroy.Op.loc23_22.5 [concrete]
  161. // CHECK:STDOUT: %Destroy.Op.651ba6.5: %Destroy.Op.type.bae255.5 = struct_value () [concrete]
  162. // CHECK:STDOUT: %custom_witness.8d7fae.5: <witness> = custom_witness (%Destroy.Op.651ba6.5), @Destroy [concrete]
  163. // CHECK:STDOUT: %Destroy.facet.bba: %Destroy.type = facet_value %tuple.type.847, (%custom_witness.8d7fae.5) [concrete]
  164. // CHECK:STDOUT: %Destroy.WithSelf.Op.type.770: type = fn_type @Destroy.WithSelf.Op, @Destroy.WithSelf(%Destroy.facet.bba) [concrete]
  165. // CHECK:STDOUT: %.f4b: type = fn_type_with_self_type %Destroy.WithSelf.Op.type.770, %Destroy.facet.bba [concrete]
  166. // CHECK:STDOUT: %Destroy.Op.type.bae255.6: type = fn_type @Destroy.Op.loc22 [concrete]
  167. // CHECK:STDOUT: %Destroy.Op.651ba6.6: %Destroy.Op.type.bae255.6 = struct_value () [concrete]
  168. // CHECK:STDOUT: %BitAndWith.type.f2e: type = generic_interface_type @BitAndWith [concrete]
  169. // CHECK:STDOUT: %BitAndWith.generic: %BitAndWith.type.f2e = struct_value () [concrete]
  170. // CHECK:STDOUT: %BitAndWith.type.b10: type = facet_type <@BitAndWith, @BitAndWith(type)> [concrete]
  171. // CHECK:STDOUT: %BitAndWith.impl_witness: <witness> = impl_witness imports.%BitAndWith.impl_witness_table [concrete]
  172. // CHECK:STDOUT: %BitAndWith.facet: %BitAndWith.type.b10 = facet_value type, (%BitAndWith.impl_witness) [concrete]
  173. // CHECK:STDOUT: %BitAndWith.WithSelf.Op.type.4bd: type = fn_type @BitAndWith.WithSelf.Op, @BitAndWith.WithSelf(type, %BitAndWith.facet) [concrete]
  174. // CHECK:STDOUT: %.d15: type = fn_type_with_self_type %BitAndWith.WithSelf.Op.type.4bd, %BitAndWith.facet [concrete]
  175. // CHECK:STDOUT: %type.as.BitAndWith.impl.Op.type: type = fn_type @type.as.BitAndWith.impl.Op [concrete]
  176. // CHECK:STDOUT: %type.as.BitAndWith.impl.Op: %type.as.BitAndWith.impl.Op.type = struct_value () [concrete]
  177. // CHECK:STDOUT: %type.as.BitAndWith.impl.Op.bound: <bound method> = bound_method %A.type.ab6, %type.as.BitAndWith.impl.Op [concrete]
  178. // CHECK:STDOUT: %facet_type: type = facet_type <@A, @A(%X) & @Destroy> [concrete]
  179. // CHECK:STDOUT: %pattern_type.2a4: type = pattern_type %facet_type [concrete]
  180. // CHECK:STDOUT: %T.5da: %facet_type = symbolic_binding T, 0 [symbolic]
  181. // CHECK:STDOUT: %CallGeneric.type: type = fn_type @CallGeneric [concrete]
  182. // CHECK:STDOUT: %CallGeneric: %CallGeneric.type = struct_value () [concrete]
  183. // CHECK:STDOUT: %A.WithSelf.F.type.6cc: type = fn_type @A.WithSelf.F, @A.WithSelf(%X, %T.5da) [symbolic]
  184. // CHECK:STDOUT: %A.WithSelf.F.dc9: %A.WithSelf.F.type.6cc = struct_value () [symbolic]
  185. // CHECK:STDOUT: %T.binding.as_type.833: type = symbolic_binding_type T, 0, %T.5da [symbolic]
  186. // CHECK:STDOUT: %A.lookup_impl_witness: <witness> = lookup_impl_witness %T.5da, @A, @A(%X) [symbolic]
  187. // CHECK:STDOUT: %A.facet.b04: %A.type.ab6 = facet_value %T.binding.as_type.833, (%A.lookup_impl_witness) [symbolic]
  188. // CHECK:STDOUT: %A.WithSelf.F.type.416: type = fn_type @A.WithSelf.F, @A.WithSelf(%X, %A.facet.b04) [symbolic]
  189. // CHECK:STDOUT: %A.WithSelf.F.d39: %A.WithSelf.F.type.416 = struct_value () [symbolic]
  190. // CHECK:STDOUT: %.8ed: type = fn_type_with_self_type %A.WithSelf.F.type.416, %A.facet.b04 [symbolic]
  191. // CHECK:STDOUT: %impl.elem0.138: %.8ed = impl_witness_access %A.lookup_impl_witness, element0 [symbolic]
  192. // CHECK:STDOUT: %tuple.2df: %tuple.type.f96 = tuple_value (%X, %A.facet.b04, %ptr.2a0) [symbolic]
  193. // CHECK:STDOUT: %tuple.type.726: type = tuple_type (%X, %T.binding.as_type.833, %ptr.2a0) [symbolic]
  194. // CHECK:STDOUT: %.ef7: Core.Form = init_form %tuple.type.726 [symbolic]
  195. // CHECK:STDOUT: %pattern_type.41c: type = pattern_type %tuple.type.726 [symbolic]
  196. // CHECK:STDOUT: %specific_impl_fn.1d5: <specific function> = specific_impl_function %impl.elem0.138, @A.WithSelf.F(%X, %A.facet.b04, %Z) [symbolic]
  197. // CHECK:STDOUT: %require_complete.b02: <witness> = require_complete_type %tuple.type.726 [symbolic]
  198. // CHECK:STDOUT: %Destroy.lookup_impl_witness.6c0: <witness> = lookup_impl_witness %tuple.type.726, @Destroy [symbolic]
  199. // CHECK:STDOUT: %Destroy.facet.f94: %Destroy.type = facet_value %tuple.type.726, (%Destroy.lookup_impl_witness.6c0) [symbolic]
  200. // CHECK:STDOUT: %Destroy.WithSelf.Op.type.3e6: type = fn_type @Destroy.WithSelf.Op, @Destroy.WithSelf(%Destroy.facet.f94) [symbolic]
  201. // CHECK:STDOUT: %.29b: type = fn_type_with_self_type %Destroy.WithSelf.Op.type.3e6, %Destroy.facet.f94 [symbolic]
  202. // CHECK:STDOUT: %impl.elem0.571: %.29b = impl_witness_access %Destroy.lookup_impl_witness.6c0, element0 [symbolic]
  203. // CHECK:STDOUT: %specific_impl_fn.a73: <specific function> = specific_impl_function %impl.elem0.571, @Destroy.WithSelf.Op(%Destroy.facet.f94) [symbolic]
  204. // CHECK:STDOUT: %CallIndirect.type: type = fn_type @CallIndirect [concrete]
  205. // CHECK:STDOUT: %CallIndirect: %CallIndirect.type = struct_value () [concrete]
  206. // CHECK:STDOUT: %facet_value: %facet_type = facet_value %Y, (%A.impl_witness, %custom_witness.8d7fae.3) [concrete]
  207. // CHECK:STDOUT: %CallGeneric.specific_fn: <specific function> = specific_function %CallGeneric, @CallGeneric(%facet_value) [concrete]
  208. // CHECK:STDOUT: %complete_type.543: <witness> = complete_type_witness %ptr.2a0 [concrete]
  209. // CHECK:STDOUT: %complete_type.28e: <witness> = complete_type_witness %tuple.type.847 [concrete]
  210. // CHECK:STDOUT: %tuple.type.0dd: type = tuple_type (%empty_struct_type, %empty_struct_type, %ptr.2a0) [concrete]
  211. // CHECK:STDOUT: %Copy.impl_witness.425: <witness> = impl_witness imports.%Copy.impl_witness_table.c3a, @ptr.as.Copy.impl(%Z) [concrete]
  212. // CHECK:STDOUT: %ptr.as.Copy.impl.Op.type.505: type = fn_type @ptr.as.Copy.impl.Op, @ptr.as.Copy.impl(%Z) [concrete]
  213. // CHECK:STDOUT: %ptr.as.Copy.impl.Op.7d1: %ptr.as.Copy.impl.Op.type.505 = struct_value () [concrete]
  214. // CHECK:STDOUT: %.157: require_specific_def_type = require_specific_def @ptr.as.Copy.impl(%Z) [concrete]
  215. // CHECK:STDOUT: %Copy.facet.26e: %Copy.type = facet_value %ptr.2a0, (%Copy.impl_witness.425) [concrete]
  216. // CHECK:STDOUT: %Copy.WithSelf.Op.type.a8b: type = fn_type @Copy.WithSelf.Op, @Copy.WithSelf(%Copy.facet.26e) [concrete]
  217. // CHECK:STDOUT: %.2ef: type = fn_type_with_self_type %Copy.WithSelf.Op.type.a8b, %Copy.facet.26e [concrete]
  218. // CHECK:STDOUT: %ptr.as.Copy.impl.Op.specific_fn: <specific function> = specific_function %ptr.as.Copy.impl.Op.7d1, @ptr.as.Copy.impl.Op(%Z) [concrete]
  219. // CHECK:STDOUT: %tuple.6cd: %tuple.type.f96 = tuple_value (%X, %A.facet.04e, %ptr.2a0) [concrete]
  220. // CHECK:STDOUT: }
  221. // CHECK:STDOUT:
  222. // CHECK:STDOUT: imports {
  223. // CHECK:STDOUT: %Core: <namespace> = namespace file.%Core.import, [concrete] {
  224. // CHECK:STDOUT: .Copy = %Core.Copy
  225. // CHECK:STDOUT: .DefaultOrUnformed = %Core.DefaultOrUnformed
  226. // CHECK:STDOUT: .Destroy = %Core.Destroy
  227. // CHECK:STDOUT: .BitAndWith = %Core.BitAndWith
  228. // CHECK:STDOUT: import Core//prelude
  229. // CHECK:STDOUT: import Core//prelude/...
  230. // CHECK:STDOUT: }
  231. // CHECK:STDOUT: %Core.Copy: type = import_ref Core//prelude/parts/copy, Copy, loaded [concrete = constants.%Copy.type]
  232. // CHECK:STDOUT: %Core.import_ref.203: @ptr.as.Copy.impl.%ptr.as.Copy.impl.Op.type (%ptr.as.Copy.impl.Op.type.2d4455.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.74e93b.1)]
  233. // CHECK:STDOUT: %Copy.impl_witness_table.c3a = impl_witness_table (%Core.import_ref.203), @ptr.as.Copy.impl [concrete]
  234. // CHECK:STDOUT: %Core.DefaultOrUnformed: type = import_ref Core//prelude/parts/default, DefaultOrUnformed, loaded [concrete = constants.%DefaultOrUnformed.type]
  235. // CHECK:STDOUT: %Core.import_ref.01d: @T.as.DefaultOrUnformed.impl.%T.as.DefaultOrUnformed.impl.Op.type (%T.as.DefaultOrUnformed.impl.Op.type.6c6) = import_ref Core//prelude/parts/default, loc{{\d+_\d+}}, loaded [symbolic = @T.as.DefaultOrUnformed.impl.%T.as.DefaultOrUnformed.impl.Op (constants.%T.as.DefaultOrUnformed.impl.Op.ae1)]
  236. // CHECK:STDOUT: %DefaultOrUnformed.impl_witness_table.349 = impl_witness_table (%Core.import_ref.01d), @T.as.DefaultOrUnformed.impl [concrete]
  237. // CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type]
  238. // CHECK:STDOUT: %Core.BitAndWith: %BitAndWith.type.f2e = import_ref Core//prelude/parts/as, BitAndWith, loaded [concrete = constants.%BitAndWith.generic]
  239. // CHECK:STDOUT: %Core.import_ref.8d3: %type.as.BitAndWith.impl.Op.type = import_ref Core//prelude/parts/as, loc{{\d+_\d+}}, loaded [concrete = constants.%type.as.BitAndWith.impl.Op]
  240. // CHECK:STDOUT: %BitAndWith.impl_witness_table = impl_witness_table (%Core.import_ref.8d3), @type.as.BitAndWith.impl [concrete]
  241. // CHECK:STDOUT: }
  242. // CHECK:STDOUT:
  243. // CHECK:STDOUT: file {
  244. // CHECK:STDOUT: package: <namespace> = namespace [concrete] {
  245. // CHECK:STDOUT: .Core = imports.%Core
  246. // CHECK:STDOUT: .A = %A.decl
  247. // CHECK:STDOUT: .X = %X.decl
  248. // CHECK:STDOUT: .Y = %Y.decl
  249. // CHECK:STDOUT: .Z = %Z.decl
  250. // CHECK:STDOUT: .Call = %Call.decl
  251. // CHECK:STDOUT: .CallGeneric = %CallGeneric.decl
  252. // CHECK:STDOUT: .CallIndirect = %CallIndirect.decl
  253. // CHECK:STDOUT: }
  254. // CHECK:STDOUT: %Core.import = import Core
  255. // CHECK:STDOUT: %A.decl: %A.type.464 = interface_decl @A [concrete = constants.%A.generic] {
  256. // CHECK:STDOUT: %T.patt: %pattern_type.98f = symbolic_binding_pattern T, 0 [concrete]
  257. // CHECK:STDOUT: } {
  258. // CHECK:STDOUT: %.loc5_17.1: type = splice_block %.loc5_17.2 [concrete = type] {
  259. // CHECK:STDOUT: %.Self: %type = symbolic_binding .Self [symbolic_self = constants.%.Self]
  260. // CHECK:STDOUT: %.loc5_17.2: type = type_literal type [concrete = type]
  261. // CHECK:STDOUT: }
  262. // CHECK:STDOUT: %T.loc5_14.2: type = symbolic_binding T, 0 [symbolic = %T.loc5_14.1 (constants.%T.67d)]
  263. // CHECK:STDOUT: }
  264. // CHECK:STDOUT: %X.decl: type = class_decl @X [concrete = constants.%X] {} {}
  265. // CHECK:STDOUT: %Y.decl: type = class_decl @Y [concrete = constants.%Y] {} {}
  266. // CHECK:STDOUT: %Z.decl: type = class_decl @Z [concrete = constants.%Z] {} {}
  267. // CHECK:STDOUT: impl_decl @Y.as.A.impl [concrete] {} {
  268. // CHECK:STDOUT: %Y.ref: type = name_ref Y, file.%Y.decl [concrete = constants.%Y]
  269. // CHECK:STDOUT: %A.ref: %A.type.464 = name_ref A, file.%A.decl [concrete = constants.%A.generic]
  270. // CHECK:STDOUT: %X.ref: type = name_ref X, file.%X.decl [concrete = constants.%X]
  271. // CHECK:STDOUT: %A.type: type = facet_type <@A, @A(constants.%X)> [concrete = constants.%A.type.ab6]
  272. // CHECK:STDOUT: }
  273. // CHECK:STDOUT: %Call.decl: %Call.type = fn_decl @Call [concrete = constants.%Call] {} {}
  274. // CHECK:STDOUT: %CallGeneric.decl: %CallGeneric.type = fn_decl @CallGeneric [concrete = constants.%CallGeneric] {
  275. // CHECK:STDOUT: %T.patt: %pattern_type.2a4 = symbolic_binding_pattern T, 0 [concrete]
  276. // CHECK:STDOUT: } {
  277. // CHECK:STDOUT: %.loc26_25.1: type = splice_block %.loc26_25.3 [concrete = constants.%facet_type] {
  278. // CHECK:STDOUT: %.Self: %type = symbolic_binding .Self [symbolic_self = constants.%.Self]
  279. // CHECK:STDOUT: %A.ref: %A.type.464 = name_ref A, file.%A.decl [concrete = constants.%A.generic]
  280. // CHECK:STDOUT: %X.ref: type = name_ref X, file.%X.decl [concrete = constants.%X]
  281. // CHECK:STDOUT: %A.type: type = facet_type <@A, @A(constants.%X)> [concrete = constants.%A.type.ab6]
  282. // CHECK:STDOUT: %Core.ref: <namespace> = name_ref Core, imports.%Core [concrete = imports.%Core]
  283. // CHECK:STDOUT: %Destroy.ref: type = name_ref Destroy, imports.%Core.Destroy [concrete = constants.%Destroy.type]
  284. // CHECK:STDOUT: %impl.elem0.loc26: %.d15 = impl_witness_access constants.%BitAndWith.impl_witness, element0 [concrete = constants.%type.as.BitAndWith.impl.Op]
  285. // CHECK:STDOUT: %bound_method.loc26: <bound method> = bound_method %A.type, %impl.elem0.loc26 [concrete = constants.%type.as.BitAndWith.impl.Op.bound]
  286. // CHECK:STDOUT: %type.as.BitAndWith.impl.Op.call: init type = call %bound_method.loc26(%A.type, %Destroy.ref) [concrete = constants.%facet_type]
  287. // CHECK:STDOUT: %.loc26_25.2: type = value_of_initializer %type.as.BitAndWith.impl.Op.call [concrete = constants.%facet_type]
  288. // CHECK:STDOUT: %.loc26_25.3: type = converted %type.as.BitAndWith.impl.Op.call, %.loc26_25.2 [concrete = constants.%facet_type]
  289. // CHECK:STDOUT: }
  290. // CHECK:STDOUT: %T.loc26_17.2: %facet_type = symbolic_binding T, 0 [symbolic = %T.loc26_17.1 (constants.%T.5da)]
  291. // CHECK:STDOUT: }
  292. // CHECK:STDOUT: %CallIndirect.decl: %CallIndirect.type = fn_decl @CallIndirect [concrete = constants.%CallIndirect] {} {}
  293. // CHECK:STDOUT: }
  294. // CHECK:STDOUT:
  295. // CHECK:STDOUT: generic interface @A(%T.loc5_14.2: type) {
  296. // CHECK:STDOUT: %T.loc5_14.1: type = symbolic_binding T, 0 [symbolic = %T.loc5_14.1 (constants.%T.67d)]
  297. // CHECK:STDOUT:
  298. // CHECK:STDOUT: !definition:
  299. // CHECK:STDOUT: %A.type: type = facet_type <@A, @A(%T.loc5_14.1)> [symbolic = %A.type (constants.%A.type.ade)]
  300. // CHECK:STDOUT: %Self.loc5_23.2: @A.%A.type (%A.type.ade) = symbolic_binding Self, 1 [symbolic = %Self.loc5_23.2 (constants.%Self.362)]
  301. // CHECK:STDOUT:
  302. // CHECK:STDOUT: interface {
  303. // CHECK:STDOUT: %Self.loc5_23.1: @A.%A.type (%A.type.ade) = symbolic_binding Self, 1 [symbolic = %Self.loc5_23.2 (constants.%Self.362)]
  304. // CHECK:STDOUT: %A.WithSelf.decl = interface_with_self_decl @A [concrete]
  305. // CHECK:STDOUT:
  306. // CHECK:STDOUT: !with Self:
  307. // CHECK:STDOUT: %A.WithSelf.F.decl: @A.WithSelf.%A.WithSelf.F.type (%A.WithSelf.F.type.0ed) = fn_decl @A.WithSelf.F [symbolic = @A.WithSelf.%A.WithSelf.F (constants.%A.WithSelf.F.33a)] {
  308. // CHECK:STDOUT: %U.patt: %pattern_type.98f = symbolic_binding_pattern U, 2 [concrete]
  309. // CHECK:STDOUT: %u.param_patt: @A.WithSelf.F.%pattern_type.loc6_19 (%pattern_type.986) = value_param_pattern [concrete]
  310. // CHECK:STDOUT: %u.patt: @A.WithSelf.F.%pattern_type.loc6_19 (%pattern_type.986) = at_binding_pattern u, %u.param_patt [concrete]
  311. // CHECK:STDOUT: %return.param_patt: @A.WithSelf.F.%pattern_type.loc6_40 (%pattern_type.f66) = out_param_pattern [concrete]
  312. // CHECK:STDOUT: %return.patt: @A.WithSelf.F.%pattern_type.loc6_40 (%pattern_type.f66) = return_slot_pattern %return.param_patt, %.loc6_40.4 [concrete]
  313. // CHECK:STDOUT: } {
  314. // CHECK:STDOUT: %T.ref: type = name_ref T, @A.%T.loc5_14.2 [symbolic = %T (constants.%T.67d)]
  315. // CHECK:STDOUT: %.loc6_32: @A.WithSelf.F.%A.type (%A.type.ade) = specific_constant @A.%Self.loc5_23.1, @A(constants.%T.67d) [symbolic = %Self (constants.%Self.362)]
  316. // CHECK:STDOUT: %Self.ref: @A.WithSelf.F.%A.type (%A.type.ade) = name_ref Self, %.loc6_32 [symbolic = %Self (constants.%Self.362)]
  317. // CHECK:STDOUT: %U.ref.loc6_38: type = name_ref U, %U.loc6_9.2 [symbolic = %U.loc6_9.1 (constants.%U.4e7)]
  318. // CHECK:STDOUT: %ptr.loc6_39: type = ptr_type %U.ref.loc6_38 [symbolic = %ptr.loc6_22.1 (constants.%ptr.8f6)]
  319. // CHECK:STDOUT: %.loc6_40.2: @A.WithSelf.F.%tuple.type.loc6_40.1 (%tuple.type.f2d) = tuple_literal (%T.ref, %Self.ref, %ptr.loc6_39) [symbolic = %tuple (constants.%tuple.2c7)]
  320. // CHECK:STDOUT: %Self.as_type: type = facet_access_type constants.%Self.362 [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type.7ec)]
  321. // CHECK:STDOUT: %.loc6_40.3: type = converted constants.%Self.362, %Self.as_type [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type.7ec)]
  322. // CHECK:STDOUT: %.loc6_40.4: type = converted %.loc6_40.2, constants.%tuple.type.762 [symbolic = %tuple.type.loc6_40.2 (constants.%tuple.type.762)]
  323. // CHECK:STDOUT: %.loc6_40.5: Core.Form = init_form %.loc6_40.4 [symbolic = %.loc6_40.1 (constants.%.54f)]
  324. // CHECK:STDOUT: %.loc6_12.1: type = splice_block %.loc6_12.2 [concrete = type] {
  325. // CHECK:STDOUT: %.Self: %type = symbolic_binding .Self [symbolic_self = constants.%.Self]
  326. // CHECK:STDOUT: %.loc6_12.2: type = type_literal type [concrete = type]
  327. // CHECK:STDOUT: }
  328. // CHECK:STDOUT: %U.loc6_9.2: type = symbolic_binding U, 2 [symbolic = %U.loc6_9.1 (constants.%U.4e7)]
  329. // CHECK:STDOUT: %u.param: @A.WithSelf.F.%ptr.loc6_22.1 (%ptr.8f6) = value_param call_param0
  330. // CHECK:STDOUT: %.loc6_22: type = splice_block %ptr.loc6_22.2 [symbolic = %ptr.loc6_22.1 (constants.%ptr.8f6)] {
  331. // CHECK:STDOUT: %U.ref.loc6_21: type = name_ref U, %U.loc6_9.2 [symbolic = %U.loc6_9.1 (constants.%U.4e7)]
  332. // CHECK:STDOUT: %ptr.loc6_22.2: type = ptr_type %U.ref.loc6_21 [symbolic = %ptr.loc6_22.1 (constants.%ptr.8f6)]
  333. // CHECK:STDOUT: }
  334. // CHECK:STDOUT: %u: @A.WithSelf.F.%ptr.loc6_22.1 (%ptr.8f6) = value_binding u, %u.param
  335. // CHECK:STDOUT: %return.param: ref @A.WithSelf.F.%tuple.type.loc6_40.2 (%tuple.type.762) = out_param call_param1
  336. // CHECK:STDOUT: %return: ref @A.WithSelf.F.%tuple.type.loc6_40.2 (%tuple.type.762) = return_slot %return.param
  337. // CHECK:STDOUT: }
  338. // CHECK:STDOUT: %assoc0.loc6_41.1: @A.WithSelf.%A.assoc_type (%A.assoc_type.9f4) = assoc_entity element0, %A.WithSelf.F.decl [symbolic = %assoc0.loc6_41.2 (constants.%assoc0.146)]
  339. // CHECK:STDOUT:
  340. // CHECK:STDOUT: !members:
  341. // CHECK:STDOUT: .Self = %Self.loc5_23.1
  342. // CHECK:STDOUT: .T = <poisoned>
  343. // CHECK:STDOUT: .T = <poisoned>
  344. // CHECK:STDOUT: .F = @A.WithSelf.%assoc0.loc6_41.1
  345. // CHECK:STDOUT: witness = (@A.WithSelf.%A.WithSelf.F.decl)
  346. // CHECK:STDOUT:
  347. // CHECK:STDOUT: !requires:
  348. // CHECK:STDOUT: }
  349. // CHECK:STDOUT: }
  350. // CHECK:STDOUT:
  351. // CHECK:STDOUT: impl @Y.as.A.impl: %Y.ref as %A.type {
  352. // 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] {
  353. // CHECK:STDOUT: %U.patt: %pattern_type.98f = symbolic_binding_pattern U, 0 [concrete]
  354. // CHECK:STDOUT: %u.param_patt: @Y.as.A.impl.F.%pattern_type.loc16_19 (%pattern_type.4f4b84.1) = value_param_pattern [concrete]
  355. // CHECK:STDOUT: %u.patt: @Y.as.A.impl.F.%pattern_type.loc16_19 (%pattern_type.4f4b84.1) = at_binding_pattern u, %u.param_patt [concrete]
  356. // CHECK:STDOUT: %return.param_patt: @Y.as.A.impl.F.%pattern_type.loc16_37 (%pattern_type.06d) = out_param_pattern [concrete]
  357. // CHECK:STDOUT: %return.patt: @Y.as.A.impl.F.%pattern_type.loc16_37 (%pattern_type.06d) = return_slot_pattern %return.param_patt, %.loc16_37.3 [concrete]
  358. // CHECK:STDOUT: } {
  359. // CHECK:STDOUT: %X.ref: type = name_ref X, file.%X.decl [concrete = constants.%X]
  360. // CHECK:STDOUT: %Y.ref: type = name_ref Y, file.%Y.decl [concrete = constants.%Y]
  361. // CHECK:STDOUT: %U.ref.loc16_35: type = name_ref U, %U.loc16_9.2 [symbolic = %U.loc16_9.1 (constants.%U.67d)]
  362. // CHECK:STDOUT: %ptr.loc16_36: type = ptr_type %U.ref.loc16_35 [symbolic = %ptr.loc16_22.1 (constants.%ptr.e8f8f9.1)]
  363. // CHECK:STDOUT: %.loc16_37.2: %tuple.type.ff9 = tuple_literal (%X.ref, %Y.ref, %ptr.loc16_36) [symbolic = %tuple (constants.%tuple.7ab)]
  364. // CHECK:STDOUT: %.loc16_37.3: type = converted %.loc16_37.2, constants.%tuple.type.244 [symbolic = %tuple.type.loc16 (constants.%tuple.type.244)]
  365. // CHECK:STDOUT: %.loc16_37.4: Core.Form = init_form %.loc16_37.3 [symbolic = %.loc16_37.1 (constants.%.0dc)]
  366. // CHECK:STDOUT: %.loc16_12.1: type = splice_block %.loc16_12.2 [concrete = type] {
  367. // CHECK:STDOUT: %.Self: %type = symbolic_binding .Self [symbolic_self = constants.%.Self]
  368. // CHECK:STDOUT: %.loc16_12.2: type = type_literal type [concrete = type]
  369. // CHECK:STDOUT: }
  370. // CHECK:STDOUT: %U.loc16_9.2: type = symbolic_binding U, 0 [symbolic = %U.loc16_9.1 (constants.%U.67d)]
  371. // CHECK:STDOUT: %u.param: @Y.as.A.impl.F.%ptr.loc16_22.1 (%ptr.e8f8f9.1) = value_param call_param0
  372. // CHECK:STDOUT: %.loc16_22: type = splice_block %ptr.loc16_22.2 [symbolic = %ptr.loc16_22.1 (constants.%ptr.e8f8f9.1)] {
  373. // CHECK:STDOUT: %U.ref.loc16_21: type = name_ref U, %U.loc16_9.2 [symbolic = %U.loc16_9.1 (constants.%U.67d)]
  374. // CHECK:STDOUT: %ptr.loc16_22.2: type = ptr_type %U.ref.loc16_21 [symbolic = %ptr.loc16_22.1 (constants.%ptr.e8f8f9.1)]
  375. // CHECK:STDOUT: }
  376. // CHECK:STDOUT: %u: @Y.as.A.impl.F.%ptr.loc16_22.1 (%ptr.e8f8f9.1) = value_binding u, %u.param
  377. // CHECK:STDOUT: %return.param: ref @Y.as.A.impl.F.%tuple.type.loc16 (%tuple.type.244) = out_param call_param1
  378. // CHECK:STDOUT: %return: ref @Y.as.A.impl.F.%tuple.type.loc16 (%tuple.type.244) = return_slot %return.param
  379. // CHECK:STDOUT: }
  380. // CHECK:STDOUT: %A.impl_witness_table = impl_witness_table (%Y.as.A.impl.F.decl), @Y.as.A.impl [concrete]
  381. // CHECK:STDOUT: %A.impl_witness: <witness> = impl_witness %A.impl_witness_table [concrete = constants.%A.impl_witness]
  382. // CHECK:STDOUT:
  383. // CHECK:STDOUT: !members:
  384. // CHECK:STDOUT: .X = <poisoned>
  385. // CHECK:STDOUT: .Y = <poisoned>
  386. // CHECK:STDOUT: .F = %Y.as.A.impl.F.decl
  387. // CHECK:STDOUT: witness = %A.impl_witness
  388. // CHECK:STDOUT: }
  389. // CHECK:STDOUT:
  390. // CHECK:STDOUT: class @X {
  391. // CHECK:STDOUT: %complete_type: <witness> = complete_type_witness constants.%empty_struct_type [concrete = constants.%complete_type.357]
  392. // CHECK:STDOUT: complete_type_witness = %complete_type
  393. // CHECK:STDOUT:
  394. // CHECK:STDOUT: !members:
  395. // CHECK:STDOUT: .Self = constants.%X
  396. // CHECK:STDOUT: }
  397. // CHECK:STDOUT:
  398. // CHECK:STDOUT: class @Y {
  399. // CHECK:STDOUT: %complete_type: <witness> = complete_type_witness constants.%empty_struct_type [concrete = constants.%complete_type.357]
  400. // CHECK:STDOUT: complete_type_witness = %complete_type
  401. // CHECK:STDOUT:
  402. // CHECK:STDOUT: !members:
  403. // CHECK:STDOUT: .Self = constants.%Y
  404. // CHECK:STDOUT: }
  405. // CHECK:STDOUT:
  406. // CHECK:STDOUT: class @Z {
  407. // CHECK:STDOUT: %complete_type: <witness> = complete_type_witness constants.%empty_struct_type [concrete = constants.%complete_type.357]
  408. // CHECK:STDOUT: complete_type_witness = %complete_type
  409. // CHECK:STDOUT:
  410. // CHECK:STDOUT: !members:
  411. // CHECK:STDOUT: .Self = constants.%Z
  412. // CHECK:STDOUT: }
  413. // CHECK:STDOUT:
  414. // CHECK:STDOUT: generic fn @A.WithSelf.F(@A.%T.loc5_14.2: type, @A.%Self.loc5_23.1: @A.%A.type (%A.type.ade), %U.loc6_9.2: type) {
  415. // CHECK:STDOUT: %U.loc6_9.1: type = symbolic_binding U, 2 [symbolic = %U.loc6_9.1 (constants.%U.4e7)]
  416. // CHECK:STDOUT: %ptr.loc6_22.1: type = ptr_type %U.loc6_9.1 [symbolic = %ptr.loc6_22.1 (constants.%ptr.8f6)]
  417. // CHECK:STDOUT: %pattern_type.loc6_19: type = pattern_type %ptr.loc6_22.1 [symbolic = %pattern_type.loc6_19 (constants.%pattern_type.986)]
  418. // CHECK:STDOUT: %T: type = symbolic_binding T, 0 [symbolic = %T (constants.%T.67d)]
  419. // CHECK:STDOUT: %A.type: type = facet_type <@A, @A(%T)> [symbolic = %A.type (constants.%A.type.ade)]
  420. // CHECK:STDOUT: %Self: @A.WithSelf.F.%A.type (%A.type.ade) = symbolic_binding Self, 1 [symbolic = %Self (constants.%Self.362)]
  421. // CHECK:STDOUT: %tuple.type.loc6_40.1: type = tuple_type (type, %A.type, type) [symbolic = %tuple.type.loc6_40.1 (constants.%tuple.type.f2d)]
  422. // CHECK:STDOUT: %tuple: @A.WithSelf.F.%tuple.type.loc6_40.1 (%tuple.type.f2d) = tuple_value (%T, %Self, %ptr.loc6_22.1) [symbolic = %tuple (constants.%tuple.2c7)]
  423. // CHECK:STDOUT: %Self.binding.as_type: type = symbolic_binding_type Self, 1, %Self [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type.7ec)]
  424. // 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.762)]
  425. // CHECK:STDOUT: %.loc6_40.1: Core.Form = init_form %tuple.type.loc6_40.2 [symbolic = %.loc6_40.1 (constants.%.54f)]
  426. // CHECK:STDOUT: %pattern_type.loc6_40: type = pattern_type %tuple.type.loc6_40.2 [symbolic = %pattern_type.loc6_40 (constants.%pattern_type.f66)]
  427. // CHECK:STDOUT:
  428. // CHECK:STDOUT: fn(%u.param: @A.WithSelf.F.%ptr.loc6_22.1 (%ptr.8f6)) -> out %return.param: @A.WithSelf.F.%tuple.type.loc6_40.2 (%tuple.type.762);
  429. // CHECK:STDOUT: }
  430. // CHECK:STDOUT:
  431. // CHECK:STDOUT: generic fn @Y.as.A.impl.F(%U.loc16_9.2: type) {
  432. // CHECK:STDOUT: %U.loc16_9.1: type = symbolic_binding U, 0 [symbolic = %U.loc16_9.1 (constants.%U.67d)]
  433. // CHECK:STDOUT: %ptr.loc16_22.1: type = ptr_type %U.loc16_9.1 [symbolic = %ptr.loc16_22.1 (constants.%ptr.e8f8f9.1)]
  434. // CHECK:STDOUT: %pattern_type.loc16_19: type = pattern_type %ptr.loc16_22.1 [symbolic = %pattern_type.loc16_19 (constants.%pattern_type.4f4b84.1)]
  435. // CHECK:STDOUT: %tuple: %tuple.type.ff9 = tuple_value (constants.%X, constants.%Y, %ptr.loc16_22.1) [symbolic = %tuple (constants.%tuple.7ab)]
  436. // CHECK:STDOUT: %tuple.type.loc16: type = tuple_type (constants.%X, constants.%Y, %ptr.loc16_22.1) [symbolic = %tuple.type.loc16 (constants.%tuple.type.244)]
  437. // CHECK:STDOUT: %.loc16_37.1: Core.Form = init_form %tuple.type.loc16 [symbolic = %.loc16_37.1 (constants.%.0dc)]
  438. // CHECK:STDOUT: %pattern_type.loc16_37: type = pattern_type %tuple.type.loc16 [symbolic = %pattern_type.loc16_37 (constants.%pattern_type.06d)]
  439. // CHECK:STDOUT:
  440. // CHECK:STDOUT: !definition:
  441. // CHECK:STDOUT: %require_complete.loc16_19: <witness> = require_complete_type %ptr.loc16_22.1 [symbolic = %require_complete.loc16_19 (constants.%require_complete.ef162c.1)]
  442. // CHECK:STDOUT: %require_complete.loc16_37: <witness> = require_complete_type %tuple.type.loc16 [symbolic = %require_complete.loc16_37 (constants.%require_complete.034)]
  443. // 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.dd2)]
  444. // CHECK:STDOUT: %.loc17_21.1: require_specific_def_type = require_specific_def @ptr.as.Copy.impl(%U.loc16_9.1) [symbolic = %.loc17_21.1 (constants.%.2f2)]
  445. // 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.2e6)]
  446. // CHECK:STDOUT: %Copy.facet: %Copy.type = facet_value %ptr.loc16_22.1, (%Copy.lookup_impl_witness) [symbolic = %Copy.facet (constants.%Copy.facet.c25)]
  447. // CHECK:STDOUT: %Copy.WithSelf.Op.type: type = fn_type @Copy.WithSelf.Op, @Copy.WithSelf(%Copy.facet) [symbolic = %Copy.WithSelf.Op.type (constants.%Copy.WithSelf.Op.type.d82)]
  448. // CHECK:STDOUT: %.loc17_21.2: type = fn_type_with_self_type %Copy.WithSelf.Op.type, %Copy.facet [symbolic = %.loc17_21.2 (constants.%.299)]
  449. // CHECK:STDOUT: %impl.elem0.loc17_21.2: @Y.as.A.impl.F.%.loc17_21.2 (%.299) = impl_witness_access %Copy.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc17_21.2 (constants.%impl.elem0.1c7)]
  450. // CHECK:STDOUT: %specific_impl_fn.loc17_21.2: <specific function> = specific_impl_function %impl.elem0.loc17_21.2, @Copy.WithSelf.Op(%Copy.facet) [symbolic = %specific_impl_fn.loc17_21.2 (constants.%specific_impl_fn.366)]
  451. // CHECK:STDOUT:
  452. // CHECK:STDOUT: fn(%u.param: @Y.as.A.impl.F.%ptr.loc16_22.1 (%ptr.e8f8f9.1)) -> out %return.param: @Y.as.A.impl.F.%tuple.type.loc16 (%tuple.type.244) {
  453. // CHECK:STDOUT: !entry:
  454. // CHECK:STDOUT: %.loc17_14.1: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct]
  455. // CHECK:STDOUT: %.loc17_18.1: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct]
  456. // CHECK:STDOUT: %u.ref: @Y.as.A.impl.F.%ptr.loc16_22.1 (%ptr.e8f8f9.1) = name_ref u, %u
  457. // CHECK:STDOUT: %.loc17_22.1: @Y.as.A.impl.F.%tuple.type.loc17 (%tuple.type.dd2) = tuple_literal (%.loc17_14.1, %.loc17_18.1, %u.ref)
  458. // CHECK:STDOUT: %tuple.elem0: ref %X = tuple_access %return.param, element0
  459. // CHECK:STDOUT: %.loc17_14.2: init %X to %tuple.elem0 = class_init () [concrete = constants.%X.val]
  460. // CHECK:STDOUT: %.loc17_22.2: init %X = converted %.loc17_14.1, %.loc17_14.2 [concrete = constants.%X.val]
  461. // CHECK:STDOUT: %tuple.elem1: ref %Y = tuple_access %return.param, element1
  462. // CHECK:STDOUT: %.loc17_18.2: init %Y to %tuple.elem1 = class_init () [concrete = constants.%Y.val]
  463. // CHECK:STDOUT: %.loc17_22.3: init %Y = converted %.loc17_18.1, %.loc17_18.2 [concrete = constants.%Y.val]
  464. // CHECK:STDOUT: %impl.elem0.loc17_21.1: @Y.as.A.impl.F.%.loc17_21.2 (%.299) = impl_witness_access constants.%Copy.lookup_impl_witness.2e6, element0 [symbolic = %impl.elem0.loc17_21.2 (constants.%impl.elem0.1c7)]
  465. // CHECK:STDOUT: %bound_method.loc17_21.1: <bound method> = bound_method %u.ref, %impl.elem0.loc17_21.1
  466. // CHECK:STDOUT: %specific_impl_fn.loc17_21.1: <specific function> = specific_impl_function %impl.elem0.loc17_21.1, @Copy.WithSelf.Op(constants.%Copy.facet.c25) [symbolic = %specific_impl_fn.loc17_21.2 (constants.%specific_impl_fn.366)]
  467. // CHECK:STDOUT: %bound_method.loc17_21.2: <bound method> = bound_method %u.ref, %specific_impl_fn.loc17_21.1
  468. // CHECK:STDOUT: %Copy.WithSelf.Op.call: init @Y.as.A.impl.F.%ptr.loc16_22.1 (%ptr.e8f8f9.1) = call %bound_method.loc17_21.2(%u.ref)
  469. // CHECK:STDOUT: %tuple.elem2: ref @Y.as.A.impl.F.%ptr.loc16_22.1 (%ptr.e8f8f9.1) = tuple_access %return.param, element2
  470. // CHECK:STDOUT: %.loc17_22.4: init @Y.as.A.impl.F.%ptr.loc16_22.1 (%ptr.e8f8f9.1) to %tuple.elem2 = in_place_init %Copy.WithSelf.Op.call
  471. // CHECK:STDOUT: %.loc17_22.5: init @Y.as.A.impl.F.%tuple.type.loc16 (%tuple.type.244) to %return.param = tuple_init (%.loc17_22.2, %.loc17_22.3, %.loc17_22.4)
  472. // CHECK:STDOUT: %.loc17_23: init @Y.as.A.impl.F.%tuple.type.loc16 (%tuple.type.244) = converted %.loc17_22.1, %.loc17_22.5
  473. // CHECK:STDOUT: return %.loc17_23 to %return.param
  474. // CHECK:STDOUT: }
  475. // CHECK:STDOUT: }
  476. // CHECK:STDOUT:
  477. // CHECK:STDOUT: fn @Call() {
  478. // CHECK:STDOUT: !entry:
  479. // CHECK:STDOUT: name_binding_decl {
  480. // CHECK:STDOUT: %u.patt: %pattern_type.bdb = ref_binding_pattern u [concrete]
  481. // CHECK:STDOUT: %u.var_patt: %pattern_type.bdb = var_pattern %u.patt [concrete]
  482. // CHECK:STDOUT: }
  483. // CHECK:STDOUT: %u.var: ref %Z = var %u.var_patt
  484. // CHECK:STDOUT: %DefaultOrUnformed.facet: %DefaultOrUnformed.type = facet_value constants.%Z, (constants.%DefaultOrUnformed.impl_witness.263) [concrete = constants.%DefaultOrUnformed.facet]
  485. // CHECK:STDOUT: %.loc22_11.1: %DefaultOrUnformed.type = converted constants.%Z, %DefaultOrUnformed.facet [concrete = constants.%DefaultOrUnformed.facet]
  486. // CHECK:STDOUT: %as_type.loc22: type = facet_access_type %.loc22_11.1 [concrete = constants.%Z]
  487. // CHECK:STDOUT: %.loc22_11.2: type = converted %.loc22_11.1, %as_type.loc22 [concrete = constants.%Z]
  488. // CHECK:STDOUT: %T.as.DefaultOrUnformed.impl.Op.specific_fn: <specific function> = specific_function constants.%T.as.DefaultOrUnformed.impl.Op.4f1, @T.as.DefaultOrUnformed.impl.Op(constants.%Z) [concrete = constants.%T.as.DefaultOrUnformed.impl.Op.specific_fn]
  489. // CHECK:STDOUT: %.loc22_3: ref %Z = splice_block %u.var {}
  490. // CHECK:STDOUT: %T.as.DefaultOrUnformed.impl.Op.call: init %Z to %.loc22_3 = call %T.as.DefaultOrUnformed.impl.Op.specific_fn()
  491. // CHECK:STDOUT: assign %u.var, %T.as.DefaultOrUnformed.impl.Op.call
  492. // CHECK:STDOUT: %Z.ref.loc22: type = name_ref Z, file.%Z.decl [concrete = constants.%Z]
  493. // CHECK:STDOUT: %u: ref %Z = ref_binding u, %u.var
  494. // CHECK:STDOUT: %Y.ref: type = name_ref Y, file.%Y.decl [concrete = constants.%Y]
  495. // CHECK:STDOUT: %A.ref: %A.type.464 = name_ref A, file.%A.decl [concrete = constants.%A.generic]
  496. // CHECK:STDOUT: %X.ref: type = name_ref X, file.%X.decl [concrete = constants.%X]
  497. // CHECK:STDOUT: %A.type: type = facet_type <@A, @A(constants.%X)> [concrete = constants.%A.type.ab6]
  498. // CHECK:STDOUT: %A.facet: %A.type.ab6 = facet_value %Y.ref, (constants.%A.impl_witness) [concrete = constants.%A.facet.04e]
  499. // CHECK:STDOUT: %.loc23_6: %A.type.ab6 = converted %Y.ref, %A.facet [concrete = constants.%A.facet.04e]
  500. // CHECK:STDOUT: %as_type.loc23: type = facet_access_type %.loc23_6 [concrete = constants.%Y]
  501. // CHECK:STDOUT: %.loc23_14.1: type = converted %.loc23_6, %as_type.loc23 [concrete = constants.%Y]
  502. // CHECK:STDOUT: %.loc23_14.2: %A.assoc_type.f05 = specific_constant @A.WithSelf.%assoc0.loc6_41.1, @A.WithSelf(constants.%X, constants.%A.facet.04e) [concrete = constants.%assoc0.368]
  503. // CHECK:STDOUT: %F.ref: %A.assoc_type.f05 = name_ref F, %.loc23_14.2 [concrete = constants.%assoc0.368]
  504. // CHECK:STDOUT: %impl.elem0: %.de2 = impl_witness_access constants.%A.impl_witness, element0 [concrete = constants.%Y.as.A.impl.F]
  505. // CHECK:STDOUT: %Z.ref.loc23: type = name_ref Z, file.%Z.decl [concrete = constants.%Z]
  506. // CHECK:STDOUT: %u.ref: ref %Z = name_ref u, %u
  507. // CHECK:STDOUT: %addr: %ptr.2a0 = addr_of %u.ref
  508. // 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]
  509. // CHECK:STDOUT: %.loc23_22.1: ref %tuple.type.847 = temporary_storage
  510. // CHECK:STDOUT: %Y.as.A.impl.F.call: init %tuple.type.847 to %.loc23_22.1 = call %specific_fn(%addr)
  511. // CHECK:STDOUT: %.loc23_22.2: ref %tuple.type.847 = temporary %.loc23_22.1, %Y.as.A.impl.F.call
  512. // CHECK:STDOUT: %Destroy.Op.bound.loc23: <bound method> = bound_method %.loc23_22.2, constants.%Destroy.Op.651ba6.5
  513. // CHECK:STDOUT: %Destroy.Op.call.loc23: init %empty_tuple.type = call %Destroy.Op.bound.loc23(%.loc23_22.2)
  514. // CHECK:STDOUT: %Destroy.Op.bound.loc22: <bound method> = bound_method %u.var, constants.%Destroy.Op.651ba6.6
  515. // CHECK:STDOUT: %Destroy.Op.call.loc22: init %empty_tuple.type = call %Destroy.Op.bound.loc22(%u.var)
  516. // CHECK:STDOUT: return
  517. // CHECK:STDOUT: }
  518. // CHECK:STDOUT:
  519. // CHECK:STDOUT: fn @Destroy.Op.loc23_22.1(%self.param: ref %empty_struct_type) = "no_op";
  520. // CHECK:STDOUT:
  521. // CHECK:STDOUT: fn @Destroy.Op.loc23_22.2(%self.param: ref %X) {
  522. // CHECK:STDOUT: !entry:
  523. // CHECK:STDOUT: return
  524. // CHECK:STDOUT: }
  525. // CHECK:STDOUT:
  526. // CHECK:STDOUT: fn @Destroy.Op.loc23_22.3(%self.param: ref %Y) {
  527. // CHECK:STDOUT: !entry:
  528. // CHECK:STDOUT: return
  529. // CHECK:STDOUT: }
  530. // CHECK:STDOUT:
  531. // CHECK:STDOUT: fn @Destroy.Op.loc23_22.4(%self.param: ref %ptr.2a0) = "no_op";
  532. // CHECK:STDOUT:
  533. // CHECK:STDOUT: fn @Destroy.Op.loc23_22.5(%self.param: ref %tuple.type.847) {
  534. // CHECK:STDOUT: !entry:
  535. // CHECK:STDOUT: return
  536. // CHECK:STDOUT: }
  537. // CHECK:STDOUT:
  538. // CHECK:STDOUT: fn @Destroy.Op.loc22(%self.param: ref %Z) {
  539. // CHECK:STDOUT: !entry:
  540. // CHECK:STDOUT: return
  541. // CHECK:STDOUT: }
  542. // CHECK:STDOUT:
  543. // CHECK:STDOUT: generic fn @CallGeneric(%T.loc26_17.2: %facet_type) {
  544. // CHECK:STDOUT: %T.loc26_17.1: %facet_type = symbolic_binding T, 0 [symbolic = %T.loc26_17.1 (constants.%T.5da)]
  545. // CHECK:STDOUT:
  546. // CHECK:STDOUT: !definition:
  547. // CHECK:STDOUT: %T.binding.as_type: type = symbolic_binding_type T, 0, %T.loc26_17.1 [symbolic = %T.binding.as_type (constants.%T.binding.as_type.833)]
  548. // CHECK:STDOUT: %A.lookup_impl_witness: <witness> = lookup_impl_witness %T.loc26_17.1, @A, @A(constants.%X) [symbolic = %A.lookup_impl_witness (constants.%A.lookup_impl_witness)]
  549. // CHECK:STDOUT: %A.facet: %A.type.ab6 = facet_value %T.binding.as_type, (%A.lookup_impl_witness) [symbolic = %A.facet (constants.%A.facet.b04)]
  550. // CHECK:STDOUT: %A.WithSelf.F.type: type = fn_type @A.WithSelf.F, @A.WithSelf(constants.%X, %A.facet) [symbolic = %A.WithSelf.F.type (constants.%A.WithSelf.F.type.416)]
  551. // CHECK:STDOUT: %.loc28_4.3: type = fn_type_with_self_type %A.WithSelf.F.type, %A.facet [symbolic = %.loc28_4.3 (constants.%.8ed)]
  552. // CHECK:STDOUT: %impl.elem0.loc28_4.2: @CallGeneric.%.loc28_4.3 (%.8ed) = impl_witness_access %A.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc28_4.2 (constants.%impl.elem0.138)]
  553. // CHECK:STDOUT: %specific_impl_fn.loc28_4.2: <specific function> = specific_impl_function %impl.elem0.loc28_4.2, @A.WithSelf.F(constants.%X, %A.facet, constants.%Z) [symbolic = %specific_impl_fn.loc28_4.2 (constants.%specific_impl_fn.1d5)]
  554. // CHECK:STDOUT: %tuple.type: type = tuple_type (constants.%X, %T.binding.as_type, constants.%ptr.2a0) [symbolic = %tuple.type (constants.%tuple.type.726)]
  555. // CHECK:STDOUT: %require_complete: <witness> = require_complete_type %tuple.type [symbolic = %require_complete (constants.%require_complete.b02)]
  556. // CHECK:STDOUT: %Destroy.lookup_impl_witness: <witness> = lookup_impl_witness %tuple.type, @Destroy [symbolic = %Destroy.lookup_impl_witness (constants.%Destroy.lookup_impl_witness.6c0)]
  557. // CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %tuple.type, (%Destroy.lookup_impl_witness) [symbolic = %Destroy.facet (constants.%Destroy.facet.f94)]
  558. // CHECK:STDOUT: %Destroy.WithSelf.Op.type: type = fn_type @Destroy.WithSelf.Op, @Destroy.WithSelf(%Destroy.facet) [symbolic = %Destroy.WithSelf.Op.type (constants.%Destroy.WithSelf.Op.type.3e6)]
  559. // CHECK:STDOUT: %.loc28_12.3: type = fn_type_with_self_type %Destroy.WithSelf.Op.type, %Destroy.facet [symbolic = %.loc28_12.3 (constants.%.29b)]
  560. // CHECK:STDOUT: %impl.elem0.loc28_12.2: @CallGeneric.%.loc28_12.3 (%.29b) = impl_witness_access %Destroy.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc28_12.2 (constants.%impl.elem0.571)]
  561. // CHECK:STDOUT: %specific_impl_fn.loc28_12.2: <specific function> = specific_impl_function %impl.elem0.loc28_12.2, @Destroy.WithSelf.Op(%Destroy.facet) [symbolic = %specific_impl_fn.loc28_12.2 (constants.%specific_impl_fn.a73)]
  562. // CHECK:STDOUT:
  563. // CHECK:STDOUT: fn() {
  564. // CHECK:STDOUT: !entry:
  565. // CHECK:STDOUT: name_binding_decl {
  566. // CHECK:STDOUT: %u.patt: %pattern_type.bdb = ref_binding_pattern u [concrete]
  567. // CHECK:STDOUT: %u.var_patt: %pattern_type.bdb = var_pattern %u.patt [concrete]
  568. // CHECK:STDOUT: }
  569. // CHECK:STDOUT: %u.var: ref %Z = var %u.var_patt
  570. // CHECK:STDOUT: %DefaultOrUnformed.facet: %DefaultOrUnformed.type = facet_value constants.%Z, (constants.%DefaultOrUnformed.impl_witness.263) [concrete = constants.%DefaultOrUnformed.facet]
  571. // CHECK:STDOUT: %.loc27_11.1: %DefaultOrUnformed.type = converted constants.%Z, %DefaultOrUnformed.facet [concrete = constants.%DefaultOrUnformed.facet]
  572. // CHECK:STDOUT: %as_type: type = facet_access_type %.loc27_11.1 [concrete = constants.%Z]
  573. // CHECK:STDOUT: %.loc27_11.2: type = converted %.loc27_11.1, %as_type [concrete = constants.%Z]
  574. // CHECK:STDOUT: %T.as.DefaultOrUnformed.impl.Op.specific_fn: <specific function> = specific_function constants.%T.as.DefaultOrUnformed.impl.Op.4f1, @T.as.DefaultOrUnformed.impl.Op(constants.%Z) [concrete = constants.%T.as.DefaultOrUnformed.impl.Op.specific_fn]
  575. // CHECK:STDOUT: %.loc27_3: ref %Z = splice_block %u.var {}
  576. // CHECK:STDOUT: %T.as.DefaultOrUnformed.impl.Op.call: init %Z to %.loc27_3 = call %T.as.DefaultOrUnformed.impl.Op.specific_fn()
  577. // CHECK:STDOUT: assign %u.var, %T.as.DefaultOrUnformed.impl.Op.call
  578. // CHECK:STDOUT: %Z.ref.loc27: type = name_ref Z, file.%Z.decl [concrete = constants.%Z]
  579. // CHECK:STDOUT: %u: ref %Z = ref_binding u, %u.var
  580. // CHECK:STDOUT: %T.ref: %facet_type = name_ref T, %T.loc26_17.2 [symbolic = %T.loc26_17.1 (constants.%T.5da)]
  581. // CHECK:STDOUT: %T.as_type: type = facet_access_type %T.ref [symbolic = %T.binding.as_type (constants.%T.binding.as_type.833)]
  582. // CHECK:STDOUT: %.loc28_4.1: type = converted %T.ref, %T.as_type [symbolic = %T.binding.as_type (constants.%T.binding.as_type.833)]
  583. // CHECK:STDOUT: %.loc28_4.2: %A.assoc_type.f05 = specific_constant @A.WithSelf.%assoc0.loc6_41.1, @A.WithSelf(constants.%X, constants.%T.5da) [concrete = constants.%assoc0.368]
  584. // CHECK:STDOUT: %F.ref: %A.assoc_type.f05 = name_ref F, %.loc28_4.2 [concrete = constants.%assoc0.368]
  585. // CHECK:STDOUT: %impl.elem0.loc28_4.1: @CallGeneric.%.loc28_4.3 (%.8ed) = impl_witness_access constants.%A.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc28_4.2 (constants.%impl.elem0.138)]
  586. // CHECK:STDOUT: %Z.ref.loc28: type = name_ref Z, file.%Z.decl [concrete = constants.%Z]
  587. // CHECK:STDOUT: %u.ref: ref %Z = name_ref u, %u
  588. // CHECK:STDOUT: %addr: %ptr.2a0 = addr_of %u.ref
  589. // CHECK:STDOUT: %specific_impl_fn.loc28_4.1: <specific function> = specific_impl_function %impl.elem0.loc28_4.1, @A.WithSelf.F(constants.%X, constants.%A.facet.b04, constants.%Z) [symbolic = %specific_impl_fn.loc28_4.2 (constants.%specific_impl_fn.1d5)]
  590. // CHECK:STDOUT: %.loc28_12.1: ref @CallGeneric.%tuple.type (%tuple.type.726) = temporary_storage
  591. // CHECK:STDOUT: %A.WithSelf.F.call: init @CallGeneric.%tuple.type (%tuple.type.726) to %.loc28_12.1 = call %specific_impl_fn.loc28_4.1(%addr)
  592. // CHECK:STDOUT: %.loc28_12.2: ref @CallGeneric.%tuple.type (%tuple.type.726) = temporary %.loc28_12.1, %A.WithSelf.F.call
  593. // CHECK:STDOUT: %impl.elem0.loc28_12.1: @CallGeneric.%.loc28_12.3 (%.29b) = impl_witness_access constants.%Destroy.lookup_impl_witness.6c0, element0 [symbolic = %impl.elem0.loc28_12.2 (constants.%impl.elem0.571)]
  594. // CHECK:STDOUT: %bound_method.loc28_12.1: <bound method> = bound_method %.loc28_12.2, %impl.elem0.loc28_12.1
  595. // CHECK:STDOUT: %specific_impl_fn.loc28_12.1: <specific function> = specific_impl_function %impl.elem0.loc28_12.1, @Destroy.WithSelf.Op(constants.%Destroy.facet.f94) [symbolic = %specific_impl_fn.loc28_12.2 (constants.%specific_impl_fn.a73)]
  596. // CHECK:STDOUT: %bound_method.loc28_12.2: <bound method> = bound_method %.loc28_12.2, %specific_impl_fn.loc28_12.1
  597. // CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call %bound_method.loc28_12.2(%.loc28_12.2)
  598. // CHECK:STDOUT: %Destroy.Op.bound: <bound method> = bound_method %u.var, constants.%Destroy.Op.651ba6.6
  599. // CHECK:STDOUT: %Destroy.Op.call: init %empty_tuple.type = call %Destroy.Op.bound(%u.var)
  600. // CHECK:STDOUT: return
  601. // CHECK:STDOUT: }
  602. // CHECK:STDOUT: }
  603. // CHECK:STDOUT:
  604. // CHECK:STDOUT: fn @CallIndirect() {
  605. // CHECK:STDOUT: !entry:
  606. // CHECK:STDOUT: %CallGeneric.ref: %CallGeneric.type = name_ref CallGeneric, file.%CallGeneric.decl [concrete = constants.%CallGeneric]
  607. // CHECK:STDOUT: %Y.ref: type = name_ref Y, file.%Y.decl [concrete = constants.%Y]
  608. // CHECK:STDOUT: %facet_value: %facet_type = facet_value %Y.ref, (constants.%A.impl_witness, constants.%custom_witness.8d7fae.3) [concrete = constants.%facet_value]
  609. // CHECK:STDOUT: %.loc32: %facet_type = converted %Y.ref, %facet_value [concrete = constants.%facet_value]
  610. // CHECK:STDOUT: %CallGeneric.specific_fn: <specific function> = specific_function %CallGeneric.ref, @CallGeneric(constants.%facet_value) [concrete = constants.%CallGeneric.specific_fn]
  611. // CHECK:STDOUT: %CallGeneric.call: init %empty_tuple.type = call %CallGeneric.specific_fn()
  612. // CHECK:STDOUT: return
  613. // CHECK:STDOUT: }
  614. // CHECK:STDOUT:
  615. // CHECK:STDOUT: specific @A(constants.%T.67d) {
  616. // CHECK:STDOUT: %T.loc5_14.1 => constants.%T.67d
  617. // CHECK:STDOUT: }
  618. // CHECK:STDOUT:
  619. // CHECK:STDOUT: specific @A.WithSelf(constants.%T.67d, constants.%Self.362) {}
  620. // CHECK:STDOUT:
  621. // CHECK:STDOUT: specific @A.WithSelf.F(constants.%T.67d, constants.%Self.362, constants.%U.4e7) {
  622. // CHECK:STDOUT: %U.loc6_9.1 => constants.%U.4e7
  623. // CHECK:STDOUT: %ptr.loc6_22.1 => constants.%ptr.8f6
  624. // CHECK:STDOUT: %pattern_type.loc6_19 => constants.%pattern_type.986
  625. // CHECK:STDOUT: %T => constants.%T.67d
  626. // CHECK:STDOUT: %A.type => constants.%A.type.ade
  627. // CHECK:STDOUT: %Self => constants.%Self.362
  628. // CHECK:STDOUT: %tuple.type.loc6_40.1 => constants.%tuple.type.f2d
  629. // CHECK:STDOUT: %tuple => constants.%tuple.2c7
  630. // CHECK:STDOUT: %Self.binding.as_type => constants.%Self.binding.as_type.7ec
  631. // CHECK:STDOUT: %tuple.type.loc6_40.2 => constants.%tuple.type.762
  632. // CHECK:STDOUT: %.loc6_40.1 => constants.%.54f
  633. // CHECK:STDOUT: %pattern_type.loc6_40 => constants.%pattern_type.f66
  634. // CHECK:STDOUT: }
  635. // CHECK:STDOUT:
  636. // CHECK:STDOUT: specific @A(constants.%X) {
  637. // CHECK:STDOUT: %T.loc5_14.1 => constants.%X
  638. // CHECK:STDOUT:
  639. // CHECK:STDOUT: !definition:
  640. // CHECK:STDOUT: %A.type => constants.%A.type.ab6
  641. // CHECK:STDOUT: %Self.loc5_23.2 => constants.%Self.e87
  642. // CHECK:STDOUT: }
  643. // CHECK:STDOUT:
  644. // CHECK:STDOUT: specific @A.WithSelf(constants.%X, constants.%Self.362) {
  645. // CHECK:STDOUT: !definition:
  646. // CHECK:STDOUT: %T => constants.%X
  647. // CHECK:STDOUT: %A.type => constants.%A.type.ab6
  648. // CHECK:STDOUT: %Self => constants.%Self.362
  649. // CHECK:STDOUT: %A.WithSelf.F.type => constants.%A.WithSelf.F.type.ba2
  650. // CHECK:STDOUT: %A.WithSelf.F => constants.%A.WithSelf.F.e5f
  651. // CHECK:STDOUT: %A.assoc_type => constants.%A.assoc_type.f05
  652. // CHECK:STDOUT: %assoc0.loc6_41.2 => constants.%assoc0.368
  653. // CHECK:STDOUT: }
  654. // CHECK:STDOUT:
  655. // CHECK:STDOUT: specific @Y.as.A.impl.F(constants.%U.67d) {
  656. // CHECK:STDOUT: %U.loc16_9.1 => constants.%U.67d
  657. // CHECK:STDOUT: %ptr.loc16_22.1 => constants.%ptr.e8f8f9.1
  658. // CHECK:STDOUT: %pattern_type.loc16_19 => constants.%pattern_type.4f4b84.1
  659. // CHECK:STDOUT: %tuple => constants.%tuple.7ab
  660. // CHECK:STDOUT: %tuple.type.loc16 => constants.%tuple.type.244
  661. // CHECK:STDOUT: %.loc16_37.1 => constants.%.0dc
  662. // CHECK:STDOUT: %pattern_type.loc16_37 => constants.%pattern_type.06d
  663. // CHECK:STDOUT: }
  664. // CHECK:STDOUT:
  665. // CHECK:STDOUT: specific @A.WithSelf(constants.%X, constants.%A.facet.04e) {
  666. // CHECK:STDOUT: !definition:
  667. // CHECK:STDOUT: %T => constants.%X
  668. // CHECK:STDOUT: %A.type => constants.%A.type.ab6
  669. // CHECK:STDOUT: %Self => constants.%A.facet.04e
  670. // CHECK:STDOUT: %A.WithSelf.F.type => constants.%A.WithSelf.F.type.12f
  671. // CHECK:STDOUT: %A.WithSelf.F => constants.%A.WithSelf.F.48c
  672. // CHECK:STDOUT: %A.assoc_type => constants.%A.assoc_type.f05
  673. // CHECK:STDOUT: %assoc0.loc6_41.2 => constants.%assoc0.368
  674. // CHECK:STDOUT: }
  675. // CHECK:STDOUT:
  676. // CHECK:STDOUT: specific @A.WithSelf.F(constants.%X, constants.%A.facet.04e, constants.%U.67d) {
  677. // CHECK:STDOUT: %U.loc6_9.1 => constants.%U.67d
  678. // CHECK:STDOUT: %ptr.loc6_22.1 => constants.%ptr.e8f8f9.1
  679. // CHECK:STDOUT: %pattern_type.loc6_19 => constants.%pattern_type.4f4b84.1
  680. // CHECK:STDOUT: %T => constants.%X
  681. // CHECK:STDOUT: %A.type => constants.%A.type.ab6
  682. // CHECK:STDOUT: %Self => constants.%A.facet.04e
  683. // CHECK:STDOUT: %tuple.type.loc6_40.1 => constants.%tuple.type.f96
  684. // CHECK:STDOUT: %tuple => constants.%tuple.5c5
  685. // CHECK:STDOUT: %Self.binding.as_type => constants.%Y
  686. // CHECK:STDOUT: %tuple.type.loc6_40.2 => constants.%tuple.type.244
  687. // CHECK:STDOUT: %.loc6_40.1 => constants.%.0dc
  688. // CHECK:STDOUT: %pattern_type.loc6_40 => constants.%pattern_type.06d
  689. // CHECK:STDOUT: }
  690. // CHECK:STDOUT:
  691. // CHECK:STDOUT: specific @Y.as.A.impl.F(constants.%Z) {
  692. // CHECK:STDOUT: %U.loc16_9.1 => constants.%Z
  693. // CHECK:STDOUT: %ptr.loc16_22.1 => constants.%ptr.2a0
  694. // CHECK:STDOUT: %pattern_type.loc16_19 => constants.%pattern_type.771
  695. // CHECK:STDOUT: %tuple => constants.%tuple.84f
  696. // CHECK:STDOUT: %tuple.type.loc16 => constants.%tuple.type.847
  697. // CHECK:STDOUT: %.loc16_37.1 => constants.%.88e
  698. // CHECK:STDOUT: %pattern_type.loc16_37 => constants.%pattern_type.79c
  699. // CHECK:STDOUT:
  700. // CHECK:STDOUT: !definition:
  701. // CHECK:STDOUT: %require_complete.loc16_19 => constants.%complete_type.543
  702. // CHECK:STDOUT: %require_complete.loc16_37 => constants.%complete_type.28e
  703. // CHECK:STDOUT: %tuple.type.loc17 => constants.%tuple.type.0dd
  704. // CHECK:STDOUT: %.loc17_21.1 => constants.%.157
  705. // CHECK:STDOUT: %Copy.lookup_impl_witness => constants.%Copy.impl_witness.425
  706. // CHECK:STDOUT: %Copy.facet => constants.%Copy.facet.26e
  707. // CHECK:STDOUT: %Copy.WithSelf.Op.type => constants.%Copy.WithSelf.Op.type.a8b
  708. // CHECK:STDOUT: %.loc17_21.2 => constants.%.2ef
  709. // CHECK:STDOUT: %impl.elem0.loc17_21.2 => constants.%ptr.as.Copy.impl.Op.7d1
  710. // CHECK:STDOUT: %specific_impl_fn.loc17_21.2 => constants.%ptr.as.Copy.impl.Op.specific_fn
  711. // CHECK:STDOUT: }
  712. // CHECK:STDOUT:
  713. // CHECK:STDOUT: specific @CallGeneric(constants.%T.5da) {
  714. // CHECK:STDOUT: %T.loc26_17.1 => constants.%T.5da
  715. // CHECK:STDOUT: }
  716. // CHECK:STDOUT:
  717. // CHECK:STDOUT: specific @A.WithSelf(constants.%X, constants.%T.5da) {
  718. // CHECK:STDOUT: !definition:
  719. // CHECK:STDOUT: %T => constants.%X
  720. // CHECK:STDOUT: %A.type => constants.%A.type.ab6
  721. // CHECK:STDOUT: %Self => constants.%T.5da
  722. // CHECK:STDOUT: %A.WithSelf.F.type => constants.%A.WithSelf.F.type.6cc
  723. // CHECK:STDOUT: %A.WithSelf.F => constants.%A.WithSelf.F.dc9
  724. // CHECK:STDOUT: %A.assoc_type => constants.%A.assoc_type.f05
  725. // CHECK:STDOUT: %assoc0.loc6_41.2 => constants.%assoc0.368
  726. // CHECK:STDOUT: }
  727. // CHECK:STDOUT:
  728. // CHECK:STDOUT: specific @A.WithSelf(constants.%X, constants.%A.facet.b04) {
  729. // CHECK:STDOUT: !definition:
  730. // CHECK:STDOUT: %T => constants.%X
  731. // CHECK:STDOUT: %A.type => constants.%A.type.ab6
  732. // CHECK:STDOUT: %Self => constants.%A.facet.b04
  733. // CHECK:STDOUT: %A.WithSelf.F.type => constants.%A.WithSelf.F.type.416
  734. // CHECK:STDOUT: %A.WithSelf.F => constants.%A.WithSelf.F.d39
  735. // CHECK:STDOUT: %A.assoc_type => constants.%A.assoc_type.f05
  736. // CHECK:STDOUT: %assoc0.loc6_41.2 => constants.%assoc0.368
  737. // CHECK:STDOUT: }
  738. // CHECK:STDOUT:
  739. // CHECK:STDOUT: specific @A.WithSelf.F(constants.%X, constants.%A.facet.b04, constants.%Z) {
  740. // CHECK:STDOUT: %U.loc6_9.1 => constants.%Z
  741. // CHECK:STDOUT: %ptr.loc6_22.1 => constants.%ptr.2a0
  742. // CHECK:STDOUT: %pattern_type.loc6_19 => constants.%pattern_type.771
  743. // CHECK:STDOUT: %T => constants.%X
  744. // CHECK:STDOUT: %A.type => constants.%A.type.ab6
  745. // CHECK:STDOUT: %Self => constants.%A.facet.b04
  746. // CHECK:STDOUT: %tuple.type.loc6_40.1 => constants.%tuple.type.f96
  747. // CHECK:STDOUT: %tuple => constants.%tuple.2df
  748. // CHECK:STDOUT: %Self.binding.as_type => constants.%T.binding.as_type.833
  749. // CHECK:STDOUT: %tuple.type.loc6_40.2 => constants.%tuple.type.726
  750. // CHECK:STDOUT: %.loc6_40.1 => constants.%.ef7
  751. // CHECK:STDOUT: %pattern_type.loc6_40 => constants.%pattern_type.41c
  752. // CHECK:STDOUT: }
  753. // CHECK:STDOUT:
  754. // CHECK:STDOUT: specific @CallGeneric(constants.%facet_value) {
  755. // CHECK:STDOUT: %T.loc26_17.1 => constants.%facet_value
  756. // CHECK:STDOUT:
  757. // CHECK:STDOUT: !definition:
  758. // CHECK:STDOUT: %T.binding.as_type => constants.%Y
  759. // CHECK:STDOUT: %A.lookup_impl_witness => constants.%A.impl_witness
  760. // CHECK:STDOUT: %A.facet => constants.%A.facet.04e
  761. // CHECK:STDOUT: %A.WithSelf.F.type => constants.%A.WithSelf.F.type.12f
  762. // CHECK:STDOUT: %.loc28_4.3 => constants.%.de2
  763. // CHECK:STDOUT: %impl.elem0.loc28_4.2 => constants.%Y.as.A.impl.F
  764. // CHECK:STDOUT: %specific_impl_fn.loc28_4.2 => constants.%Y.as.A.impl.F.specific_fn
  765. // CHECK:STDOUT: %tuple.type => constants.%tuple.type.847
  766. // CHECK:STDOUT: %require_complete => constants.%complete_type.28e
  767. // CHECK:STDOUT: %Destroy.lookup_impl_witness => constants.%custom_witness.8d7fae.5
  768. // CHECK:STDOUT: %Destroy.facet => constants.%Destroy.facet.bba
  769. // CHECK:STDOUT: %Destroy.WithSelf.Op.type => constants.%Destroy.WithSelf.Op.type.770
  770. // CHECK:STDOUT: %.loc28_12.3 => constants.%.f4b
  771. // CHECK:STDOUT: %impl.elem0.loc28_12.2 => constants.%Destroy.Op.651ba6.5
  772. // CHECK:STDOUT: %specific_impl_fn.loc28_12.2 => constants.%Destroy.Op.651ba6.5
  773. // CHECK:STDOUT: }
  774. // CHECK:STDOUT:
  775. // CHECK:STDOUT: specific @A.WithSelf.F(constants.%X, constants.%A.facet.04e, constants.%Z) {
  776. // CHECK:STDOUT: %U.loc6_9.1 => constants.%Z
  777. // CHECK:STDOUT: %ptr.loc6_22.1 => constants.%ptr.2a0
  778. // CHECK:STDOUT: %pattern_type.loc6_19 => constants.%pattern_type.771
  779. // CHECK:STDOUT: %T => constants.%X
  780. // CHECK:STDOUT: %A.type => constants.%A.type.ab6
  781. // CHECK:STDOUT: %Self => constants.%A.facet.04e
  782. // CHECK:STDOUT: %tuple.type.loc6_40.1 => constants.%tuple.type.f96
  783. // CHECK:STDOUT: %tuple => constants.%tuple.6cd
  784. // CHECK:STDOUT: %Self.binding.as_type => constants.%Y
  785. // CHECK:STDOUT: %tuple.type.loc6_40.2 => constants.%tuple.type.847
  786. // CHECK:STDOUT: %.loc6_40.1 => constants.%.88e
  787. // CHECK:STDOUT: %pattern_type.loc6_40 => constants.%pattern_type.79c
  788. // CHECK:STDOUT: }
  789. // CHECK:STDOUT:
  790. // CHECK:STDOUT: --- generic_method_more_params.carbon
  791. // CHECK:STDOUT:
  792. // CHECK:STDOUT: constants {
  793. // CHECK:STDOUT: %type: type = facet_type <type> [concrete]
  794. // CHECK:STDOUT: %.Self: %type = symbolic_binding .Self [symbolic_self]
  795. // CHECK:STDOUT: %pattern_type.98f: type = pattern_type type [concrete]
  796. // CHECK:STDOUT: %T.67d: type = symbolic_binding T, 0 [symbolic]
  797. // CHECK:STDOUT: %A.type.464: type = generic_interface_type @A [concrete]
  798. // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete]
  799. // CHECK:STDOUT: %A.generic: %A.type.464 = struct_value () [concrete]
  800. // CHECK:STDOUT: %A.type.ade: type = facet_type <@A, @A(%T.67d)> [symbolic]
  801. // CHECK:STDOUT: %Self.362: %A.type.ade = symbolic_binding Self, 1 [symbolic]
  802. // CHECK:STDOUT: %U.4e7: type = symbolic_binding U, 2 [symbolic]
  803. // CHECK:STDOUT: %pattern_type.62e: type = pattern_type %U.4e7 [symbolic]
  804. // CHECK:STDOUT: %tuple.type.f2d: type = tuple_type (type, %A.type.ade, type) [symbolic]
  805. // CHECK:STDOUT: %tuple.f25: %tuple.type.f2d = tuple_value (%T.67d, %Self.362, %U.4e7) [symbolic]
  806. // CHECK:STDOUT: %Self.binding.as_type.7ec: type = symbolic_binding_type Self, 1, %Self.362 [symbolic]
  807. // CHECK:STDOUT: %tuple.type.7f3: type = tuple_type (%T.67d, %Self.binding.as_type.7ec, %U.4e7) [symbolic]
  808. // CHECK:STDOUT: %.0ad: Core.Form = init_form %tuple.type.7f3 [symbolic]
  809. // CHECK:STDOUT: %pattern_type.22d: type = pattern_type %tuple.type.7f3 [symbolic]
  810. // CHECK:STDOUT: %A.WithSelf.F.type.0ed: type = fn_type @A.WithSelf.F, @A.WithSelf(%T.67d, %Self.362) [symbolic]
  811. // CHECK:STDOUT: %A.WithSelf.F.33a: %A.WithSelf.F.type.0ed = struct_value () [symbolic]
  812. // CHECK:STDOUT: %A.assoc_type.9f4: type = assoc_entity_type @A, @A(%T.67d) [symbolic]
  813. // CHECK:STDOUT: %assoc0.146: %A.assoc_type.9f4 = assoc_entity element0, @A.WithSelf.%A.WithSelf.F.decl [symbolic]
  814. // CHECK:STDOUT: %X: type = class_type @X [concrete]
  815. // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete]
  816. // CHECK:STDOUT: %complete_type.357: <witness> = complete_type_witness %empty_struct_type [concrete]
  817. // CHECK:STDOUT: %Y1: type = class_type @Y1 [concrete]
  818. // CHECK:STDOUT: %Y2: type = class_type @Y2 [concrete]
  819. // CHECK:STDOUT: %Z: type = class_type @Z [concrete]
  820. // CHECK:STDOUT: %V1: type = symbolic_binding V1, 0 [symbolic]
  821. // CHECK:STDOUT: %V2: type = symbolic_binding V2, 1 [symbolic]
  822. // CHECK:STDOUT: %W: type = symbolic_binding W, 2 [symbolic]
  823. // CHECK:STDOUT: %tuple.type.24b: type = tuple_type (type, type) [concrete]
  824. // CHECK:STDOUT: %tuple.4b9: %tuple.type.24b = tuple_value (%V1, %V2) [symbolic]
  825. // CHECK:STDOUT: %tuple.type.a5e: type = tuple_type (%V1, %V2) [symbolic]
  826. // CHECK:STDOUT: %A.type.fe7: type = facet_type <@A, @A(%W)> [symbolic]
  827. // CHECK:STDOUT: %A.impl_witness.be2: <witness> = impl_witness @tuple.type.as.A.impl.%A.impl_witness_table, @tuple.type.as.A.impl(%V1, %V2, %W) [symbolic]
  828. // CHECK:STDOUT: %Self.d33: %A.type.fe7 = symbolic_binding Self, 1 [symbolic]
  829. // CHECK:STDOUT: %A.WithSelf.F.type.986: type = fn_type @A.WithSelf.F, @A.WithSelf(%W, %Self.362) [symbolic]
  830. // CHECK:STDOUT: %A.WithSelf.F.0f5: %A.WithSelf.F.type.986 = struct_value () [symbolic]
  831. // CHECK:STDOUT: %A.assoc_type.7a9: type = assoc_entity_type @A, @A(%W) [symbolic]
  832. // CHECK:STDOUT: %assoc0.dfc: %A.assoc_type.7a9 = assoc_entity element0, @A.WithSelf.%A.WithSelf.F.decl [symbolic]
  833. // CHECK:STDOUT: %require_complete.9a5: <witness> = require_complete_type %A.type.fe7 [symbolic]
  834. // CHECK:STDOUT: %U.ce4: type = symbolic_binding U, 3 [symbolic]
  835. // CHECK:STDOUT: %pattern_type.e4a: type = pattern_type %U.ce4 [symbolic]
  836. // CHECK:STDOUT: %tuple.type.11f: type = tuple_type (type, %tuple.type.24b, type) [concrete]
  837. // CHECK:STDOUT: %tuple.117: %tuple.type.11f = tuple_value (%W, %tuple.4b9, %U.ce4) [symbolic]
  838. // CHECK:STDOUT: %tuple.type.897: type = tuple_type (%W, %tuple.type.a5e, %U.ce4) [symbolic]
  839. // CHECK:STDOUT: %.f8e: Core.Form = init_form %tuple.type.897 [symbolic]
  840. // CHECK:STDOUT: %pattern_type.5cc: type = pattern_type %tuple.type.897 [symbolic]
  841. // CHECK:STDOUT: %tuple.type.as.A.impl.F.type.ce6: type = fn_type @tuple.type.as.A.impl.F, @tuple.type.as.A.impl(%V1, %V2, %W) [symbolic]
  842. // CHECK:STDOUT: %tuple.type.as.A.impl.F.74d: %tuple.type.as.A.impl.F.type.ce6 = struct_value () [symbolic]
  843. // CHECK:STDOUT: %A.facet.56b: %A.type.fe7 = facet_value %tuple.type.a5e, (%A.impl_witness.be2) [symbolic]
  844. // CHECK:STDOUT: %A.WithSelf.F.type.104: type = fn_type @A.WithSelf.F, @A.WithSelf(%W, %A.facet.56b) [symbolic]
  845. // CHECK:STDOUT: %A.WithSelf.F.028: %A.WithSelf.F.type.104 = struct_value () [symbolic]
  846. // CHECK:STDOUT: %tuple.type.52a: type = tuple_type (type, %A.type.fe7, type) [symbolic]
  847. // CHECK:STDOUT: %tuple.ec4: %tuple.type.52a = tuple_value (%W, %A.facet.56b, %U.ce4) [symbolic]
  848. // CHECK:STDOUT: %require_complete.5a4: <witness> = require_complete_type %U.ce4 [symbolic]
  849. // CHECK:STDOUT: %require_complete.da0: <witness> = require_complete_type %tuple.type.897 [symbolic]
  850. // CHECK:STDOUT: %tuple.type.as.A.impl.F.specific_fn.009: <specific function> = specific_function %tuple.type.as.A.impl.F.74d, @tuple.type.as.A.impl.F(%V1, %V2, %W, %U.ce4) [symbolic]
  851. // CHECK:STDOUT: %Call.type: type = fn_type @Call [concrete]
  852. // CHECK:STDOUT: %Call: %Call.type = struct_value () [concrete]
  853. // CHECK:STDOUT: %tuple.dd5: %tuple.type.24b = tuple_value (%Y1, %Y2) [concrete]
  854. // CHECK:STDOUT: %tuple.type.ab2: type = tuple_type (%Y1, %Y2) [concrete]
  855. // CHECK:STDOUT: %A.type.ab6: type = facet_type <@A, @A(%X)> [concrete]
  856. // CHECK:STDOUT: %A.impl_witness.b3a: <witness> = impl_witness @tuple.type.as.A.impl.%A.impl_witness_table, @tuple.type.as.A.impl(%Y1, %Y2, %X) [concrete]
  857. // CHECK:STDOUT: %Self.e87: %A.type.ab6 = symbolic_binding Self, 1 [symbolic]
  858. // CHECK:STDOUT: %A.WithSelf.F.type.ba2: type = fn_type @A.WithSelf.F, @A.WithSelf(%X, %Self.362) [symbolic]
  859. // CHECK:STDOUT: %A.WithSelf.F.e5f: %A.WithSelf.F.type.ba2 = struct_value () [symbolic]
  860. // CHECK:STDOUT: %A.assoc_type.f05: type = assoc_entity_type @A, @A(%X) [concrete]
  861. // CHECK:STDOUT: %assoc0.368: %A.assoc_type.f05 = assoc_entity element0, @A.WithSelf.%A.WithSelf.F.decl [concrete]
  862. // CHECK:STDOUT: %complete_type.a36: <witness> = complete_type_witness %A.type.ab6 [concrete]
  863. // CHECK:STDOUT: %tuple.type.as.A.impl.F.type.d14: type = fn_type @tuple.type.as.A.impl.F, @tuple.type.as.A.impl(%Y1, %Y2, %X) [concrete]
  864. // CHECK:STDOUT: %tuple.type.as.A.impl.F.cc8: %tuple.type.as.A.impl.F.type.d14 = struct_value () [concrete]
  865. // CHECK:STDOUT: %A.facet.906: %A.type.ab6 = facet_value %tuple.type.ab2, (%A.impl_witness.b3a) [concrete]
  866. // CHECK:STDOUT: %A.WithSelf.F.type.757: type = fn_type @A.WithSelf.F, @A.WithSelf(%X, %A.facet.906) [concrete]
  867. // CHECK:STDOUT: %A.WithSelf.F.8b6: %A.WithSelf.F.type.757 = struct_value () [concrete]
  868. // CHECK:STDOUT: %.fa2: type = fn_type_with_self_type %A.WithSelf.F.type.757, %A.facet.906 [concrete]
  869. // CHECK:STDOUT: %empty_struct: %empty_struct_type = struct_value () [concrete]
  870. // CHECK:STDOUT: %pattern_type.bdb: type = pattern_type %Z [concrete]
  871. // CHECK:STDOUT: %tuple.66d: %tuple.type.11f = tuple_value (%X, %tuple.dd5, %Z) [concrete]
  872. // CHECK:STDOUT: %tuple.type.65a: type = tuple_type (%X, %tuple.type.ab2, %Z) [concrete]
  873. // CHECK:STDOUT: %.241: Core.Form = init_form %tuple.type.65a [concrete]
  874. // CHECK:STDOUT: %pattern_type.30b: type = pattern_type %tuple.type.65a [concrete]
  875. // CHECK:STDOUT: %tuple.type.as.A.impl.F.specific_fn.af6: <specific function> = specific_function %tuple.type.as.A.impl.F.cc8, @tuple.type.as.A.impl.F(%Y1, %Y2, %X, %Z) [concrete]
  876. // CHECK:STDOUT: %Z.val: %Z = struct_value () [concrete]
  877. // CHECK:STDOUT: %.318: ref %Z = temporary invalid, %Z.val [concrete]
  878. // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete]
  879. // CHECK:STDOUT: %Destroy.Op.type.bae255.5: type = fn_type @Destroy.Op.loc24_39.5 [concrete]
  880. // CHECK:STDOUT: %Destroy.Op.651ba6.5: %Destroy.Op.type.bae255.5 = struct_value () [concrete]
  881. // CHECK:STDOUT: %custom_witness.8d7fae.5: <witness> = custom_witness (%Destroy.Op.651ba6.5), @Destroy [concrete]
  882. // CHECK:STDOUT: %Destroy.Op.type.bae255.6: type = fn_type @Destroy.Op.loc24_39.6 [concrete]
  883. // CHECK:STDOUT: %Destroy.Op.651ba6.6: %Destroy.Op.type.bae255.6 = struct_value () [concrete]
  884. // CHECK:STDOUT: %Destroy.Op.type.bae255.7: type = fn_type @Destroy.Op.loc24_39.7 [concrete]
  885. // CHECK:STDOUT: %Destroy.Op.651ba6.7: %Destroy.Op.type.bae255.7 = struct_value () [concrete]
  886. // CHECK:STDOUT: %custom_witness.8d7fae.7: <witness> = custom_witness (%Destroy.Op.651ba6.7), @Destroy [concrete]
  887. // CHECK:STDOUT: %Destroy.facet.9fd: %Destroy.type = facet_value %tuple.type.65a, (%custom_witness.8d7fae.7) [concrete]
  888. // CHECK:STDOUT: %Destroy.WithSelf.Op.type.d36: type = fn_type @Destroy.WithSelf.Op, @Destroy.WithSelf(%Destroy.facet.9fd) [concrete]
  889. // CHECK:STDOUT: %.498: type = fn_type_with_self_type %Destroy.WithSelf.Op.type.d36, %Destroy.facet.9fd [concrete]
  890. // CHECK:STDOUT: %Destroy.Op.bound: <bound method> = bound_method %.318, %Destroy.Op.651ba6.6 [concrete]
  891. // CHECK:STDOUT: %BitAndWith.type.f2e: type = generic_interface_type @BitAndWith [concrete]
  892. // CHECK:STDOUT: %BitAndWith.generic: %BitAndWith.type.f2e = struct_value () [concrete]
  893. // CHECK:STDOUT: %BitAndWith.type.b10: type = facet_type <@BitAndWith, @BitAndWith(type)> [concrete]
  894. // CHECK:STDOUT: %BitAndWith.impl_witness: <witness> = impl_witness imports.%BitAndWith.impl_witness_table [concrete]
  895. // CHECK:STDOUT: %BitAndWith.facet: %BitAndWith.type.b10 = facet_value type, (%BitAndWith.impl_witness) [concrete]
  896. // CHECK:STDOUT: %BitAndWith.WithSelf.Op.type.4bd: type = fn_type @BitAndWith.WithSelf.Op, @BitAndWith.WithSelf(type, %BitAndWith.facet) [concrete]
  897. // CHECK:STDOUT: %.d15: type = fn_type_with_self_type %BitAndWith.WithSelf.Op.type.4bd, %BitAndWith.facet [concrete]
  898. // CHECK:STDOUT: %type.as.BitAndWith.impl.Op.type: type = fn_type @type.as.BitAndWith.impl.Op [concrete]
  899. // CHECK:STDOUT: %type.as.BitAndWith.impl.Op: %type.as.BitAndWith.impl.Op.type = struct_value () [concrete]
  900. // CHECK:STDOUT: %type.as.BitAndWith.impl.Op.bound: <bound method> = bound_method %A.type.ab6, %type.as.BitAndWith.impl.Op [concrete]
  901. // CHECK:STDOUT: %facet_type: type = facet_type <@A, @A(%X) & @Destroy> [concrete]
  902. // CHECK:STDOUT: %pattern_type.2a4: type = pattern_type %facet_type [concrete]
  903. // CHECK:STDOUT: %T.5da: %facet_type = symbolic_binding T, 0 [symbolic]
  904. // CHECK:STDOUT: %CallGeneric.type: type = fn_type @CallGeneric [concrete]
  905. // CHECK:STDOUT: %CallGeneric: %CallGeneric.type = struct_value () [concrete]
  906. // CHECK:STDOUT: %A.WithSelf.F.type.6cc: type = fn_type @A.WithSelf.F, @A.WithSelf(%X, %T.5da) [symbolic]
  907. // CHECK:STDOUT: %A.WithSelf.F.dc9: %A.WithSelf.F.type.6cc = struct_value () [symbolic]
  908. // CHECK:STDOUT: %T.binding.as_type: type = symbolic_binding_type T, 0, %T.5da [symbolic]
  909. // CHECK:STDOUT: %A.lookup_impl_witness: <witness> = lookup_impl_witness %T.5da, @A, @A(%X) [symbolic]
  910. // CHECK:STDOUT: %A.facet.b04: %A.type.ab6 = facet_value %T.binding.as_type, (%A.lookup_impl_witness) [symbolic]
  911. // CHECK:STDOUT: %A.WithSelf.F.type.416: type = fn_type @A.WithSelf.F, @A.WithSelf(%X, %A.facet.b04) [symbolic]
  912. // CHECK:STDOUT: %A.WithSelf.F.d39: %A.WithSelf.F.type.416 = struct_value () [symbolic]
  913. // CHECK:STDOUT: %.8ed: type = fn_type_with_self_type %A.WithSelf.F.type.416, %A.facet.b04 [symbolic]
  914. // CHECK:STDOUT: %impl.elem0.138: %.8ed = impl_witness_access %A.lookup_impl_witness, element0 [symbolic]
  915. // CHECK:STDOUT: %tuple.type.f96: type = tuple_type (type, %A.type.ab6, type) [concrete]
  916. // CHECK:STDOUT: %tuple.5a0: %tuple.type.f96 = tuple_value (%X, %A.facet.b04, %Z) [symbolic]
  917. // CHECK:STDOUT: %tuple.type.f23: type = tuple_type (%X, %T.binding.as_type, %Z) [symbolic]
  918. // CHECK:STDOUT: %.c4a: Core.Form = init_form %tuple.type.f23 [symbolic]
  919. // CHECK:STDOUT: %pattern_type.434: type = pattern_type %tuple.type.f23 [symbolic]
  920. // CHECK:STDOUT: %specific_impl_fn.1d5: <specific function> = specific_impl_function %impl.elem0.138, @A.WithSelf.F(%X, %A.facet.b04, %Z) [symbolic]
  921. // CHECK:STDOUT: %require_complete.247: <witness> = require_complete_type %tuple.type.f23 [symbolic]
  922. // CHECK:STDOUT: %Destroy.lookup_impl_witness.74b: <witness> = lookup_impl_witness %tuple.type.f23, @Destroy [symbolic]
  923. // CHECK:STDOUT: %Destroy.facet.8b5: %Destroy.type = facet_value %tuple.type.f23, (%Destroy.lookup_impl_witness.74b) [symbolic]
  924. // CHECK:STDOUT: %Destroy.WithSelf.Op.type.209: type = fn_type @Destroy.WithSelf.Op, @Destroy.WithSelf(%Destroy.facet.8b5) [symbolic]
  925. // CHECK:STDOUT: %.509: type = fn_type_with_self_type %Destroy.WithSelf.Op.type.209, %Destroy.facet.8b5 [symbolic]
  926. // CHECK:STDOUT: %impl.elem0.243: %.509 = impl_witness_access %Destroy.lookup_impl_witness.74b, element0 [symbolic]
  927. // CHECK:STDOUT: %specific_impl_fn.d18: <specific function> = specific_impl_function %impl.elem0.243, @Destroy.WithSelf.Op(%Destroy.facet.8b5) [symbolic]
  928. // CHECK:STDOUT: %CallIndirect.type: type = fn_type @CallIndirect [concrete]
  929. // CHECK:STDOUT: %CallIndirect: %CallIndirect.type = struct_value () [concrete]
  930. // CHECK:STDOUT: %facet_value: %facet_type = facet_value %tuple.type.ab2, (%A.impl_witness.b3a, %custom_witness.8d7fae.5) [concrete]
  931. // CHECK:STDOUT: %CallGeneric.specific_fn: <specific function> = specific_function %CallGeneric, @CallGeneric(%facet_value) [concrete]
  932. // CHECK:STDOUT: %complete_type.cf2: <witness> = complete_type_witness %tuple.type.65a [concrete]
  933. // CHECK:STDOUT: %tuple.5e4: %tuple.type.f96 = tuple_value (%X, %A.facet.906, %Z) [concrete]
  934. // CHECK:STDOUT: }
  935. // CHECK:STDOUT:
  936. // CHECK:STDOUT: imports {
  937. // CHECK:STDOUT: %Core: <namespace> = namespace file.%Core.import, [concrete] {
  938. // CHECK:STDOUT: .Destroy = %Core.Destroy
  939. // CHECK:STDOUT: .BitAndWith = %Core.BitAndWith
  940. // CHECK:STDOUT: import Core//prelude
  941. // CHECK:STDOUT: import Core//prelude/...
  942. // CHECK:STDOUT: }
  943. // CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type]
  944. // CHECK:STDOUT: %Core.BitAndWith: %BitAndWith.type.f2e = import_ref Core//prelude/parts/as, BitAndWith, loaded [concrete = constants.%BitAndWith.generic]
  945. // CHECK:STDOUT: %Core.import_ref.8d3: %type.as.BitAndWith.impl.Op.type = import_ref Core//prelude/parts/as, loc{{\d+_\d+}}, loaded [concrete = constants.%type.as.BitAndWith.impl.Op]
  946. // CHECK:STDOUT: %BitAndWith.impl_witness_table = impl_witness_table (%Core.import_ref.8d3), @type.as.BitAndWith.impl [concrete]
  947. // CHECK:STDOUT: }
  948. // CHECK:STDOUT:
  949. // CHECK:STDOUT: file {
  950. // CHECK:STDOUT: package: <namespace> = namespace [concrete] {
  951. // CHECK:STDOUT: .Core = imports.%Core
  952. // CHECK:STDOUT: .A = %A.decl
  953. // CHECK:STDOUT: .X = %X.decl
  954. // CHECK:STDOUT: .Y1 = %Y1.decl
  955. // CHECK:STDOUT: .Y2 = %Y2.decl
  956. // CHECK:STDOUT: .Z = %Z.decl
  957. // CHECK:STDOUT: .Call = %Call.decl
  958. // CHECK:STDOUT: .CallGeneric = %CallGeneric.decl
  959. // CHECK:STDOUT: .CallIndirect = %CallIndirect.decl
  960. // CHECK:STDOUT: }
  961. // CHECK:STDOUT: %Core.import = import Core
  962. // CHECK:STDOUT: %A.decl: %A.type.464 = interface_decl @A [concrete = constants.%A.generic] {
  963. // CHECK:STDOUT: %T.patt: %pattern_type.98f = symbolic_binding_pattern T, 0 [concrete]
  964. // CHECK:STDOUT: } {
  965. // CHECK:STDOUT: %.loc5_17.1: type = splice_block %.loc5_17.2 [concrete = type] {
  966. // CHECK:STDOUT: %.Self: %type = symbolic_binding .Self [symbolic_self = constants.%.Self]
  967. // CHECK:STDOUT: %.loc5_17.2: type = type_literal type [concrete = type]
  968. // CHECK:STDOUT: }
  969. // CHECK:STDOUT: %T.loc5_14.2: type = symbolic_binding T, 0 [symbolic = %T.loc5_14.1 (constants.%T.67d)]
  970. // CHECK:STDOUT: }
  971. // CHECK:STDOUT: %X.decl: type = class_decl @X [concrete = constants.%X] {} {}
  972. // CHECK:STDOUT: %Y1.decl: type = class_decl @Y1 [concrete = constants.%Y1] {} {}
  973. // CHECK:STDOUT: %Y2.decl: type = class_decl @Y2 [concrete = constants.%Y2] {} {}
  974. // CHECK:STDOUT: %Z.decl: type = class_decl @Z [concrete = constants.%Z] {} {}
  975. // CHECK:STDOUT: impl_decl @tuple.type.as.A.impl [concrete] {
  976. // CHECK:STDOUT: %V1.patt: %pattern_type.98f = symbolic_binding_pattern V1, 0 [concrete]
  977. // CHECK:STDOUT: %V2.patt: %pattern_type.98f = symbolic_binding_pattern V2, 1 [concrete]
  978. // CHECK:STDOUT: %W.patt: %pattern_type.98f = symbolic_binding_pattern W, 2 [concrete]
  979. // CHECK:STDOUT: } {
  980. // CHECK:STDOUT: %V1.ref: type = name_ref V1, %V1.loc14_16.2 [symbolic = %V1.loc14_16.1 (constants.%V1)]
  981. // CHECK:STDOUT: %V2.ref: type = name_ref V2, %V2.loc14_27.2 [symbolic = %V2.loc14_27.1 (constants.%V2)]
  982. // CHECK:STDOUT: %.loc14_53.1: %tuple.type.24b = tuple_literal (%V1.ref, %V2.ref) [symbolic = %tuple (constants.%tuple.4b9)]
  983. // CHECK:STDOUT: %.loc14_53.2: type = converted %.loc14_53.1, constants.%tuple.type.a5e [symbolic = %tuple.type (constants.%tuple.type.a5e)]
  984. // CHECK:STDOUT: %A.ref: %A.type.464 = name_ref A, file.%A.decl [concrete = constants.%A.generic]
  985. // CHECK:STDOUT: %W.ref: type = name_ref W, %W.loc14_37.2 [symbolic = %W.loc14_37.1 (constants.%W)]
  986. // CHECK:STDOUT: %A.type.loc14_61.2: type = facet_type <@A, @A(constants.%W)> [symbolic = %A.type.loc14_61.1 (constants.%A.type.fe7)]
  987. // CHECK:STDOUT: %.loc14_19.1: type = splice_block %.loc14_19.2 [concrete = type] {
  988. // CHECK:STDOUT: %.Self.3: %type = symbolic_binding .Self [symbolic_self = constants.%.Self]
  989. // CHECK:STDOUT: %.loc14_19.2: type = type_literal type [concrete = type]
  990. // CHECK:STDOUT: }
  991. // CHECK:STDOUT: %V1.loc14_16.2: type = symbolic_binding V1, 0 [symbolic = %V1.loc14_16.1 (constants.%V1)]
  992. // CHECK:STDOUT: %.loc14_30.1: type = splice_block %.loc14_30.2 [concrete = type] {
  993. // CHECK:STDOUT: %.Self.2: %type = symbolic_binding .Self [symbolic_self = constants.%.Self]
  994. // CHECK:STDOUT: %.loc14_30.2: type = type_literal type [concrete = type]
  995. // CHECK:STDOUT: }
  996. // CHECK:STDOUT: %V2.loc14_27.2: type = symbolic_binding V2, 1 [symbolic = %V2.loc14_27.1 (constants.%V2)]
  997. // CHECK:STDOUT: %.loc14_40.1: type = splice_block %.loc14_40.2 [concrete = type] {
  998. // CHECK:STDOUT: %.Self.1: %type = symbolic_binding .Self [symbolic_self = constants.%.Self]
  999. // CHECK:STDOUT: %.loc14_40.2: type = type_literal type [concrete = type]
  1000. // CHECK:STDOUT: }
  1001. // CHECK:STDOUT: %W.loc14_37.2: type = symbolic_binding W, 2 [symbolic = %W.loc14_37.1 (constants.%W)]
  1002. // CHECK:STDOUT: }
  1003. // CHECK:STDOUT: %Call.decl: %Call.type = fn_decl @Call [concrete = constants.%Call] {} {}
  1004. // CHECK:STDOUT: %CallGeneric.decl: %CallGeneric.type = fn_decl @CallGeneric [concrete = constants.%CallGeneric] {
  1005. // CHECK:STDOUT: %T.patt: %pattern_type.2a4 = symbolic_binding_pattern T, 0 [concrete]
  1006. // CHECK:STDOUT: } {
  1007. // CHECK:STDOUT: %.loc27_25.1: type = splice_block %.loc27_25.3 [concrete = constants.%facet_type] {
  1008. // CHECK:STDOUT: %.Self: %type = symbolic_binding .Self [symbolic_self = constants.%.Self]
  1009. // CHECK:STDOUT: %A.ref: %A.type.464 = 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.ab6]
  1012. // CHECK:STDOUT: %Core.ref: <namespace> = name_ref Core, imports.%Core [concrete = imports.%Core]
  1013. // CHECK:STDOUT: %Destroy.ref: type = name_ref Destroy, imports.%Core.Destroy [concrete = constants.%Destroy.type]
  1014. // CHECK:STDOUT: %impl.elem0.loc27: %.d15 = impl_witness_access constants.%BitAndWith.impl_witness, element0 [concrete = constants.%type.as.BitAndWith.impl.Op]
  1015. // CHECK:STDOUT: %bound_method.loc27: <bound method> = bound_method %A.type, %impl.elem0.loc27 [concrete = constants.%type.as.BitAndWith.impl.Op.bound]
  1016. // CHECK:STDOUT: %type.as.BitAndWith.impl.Op.call: init type = call %bound_method.loc27(%A.type, %Destroy.ref) [concrete = constants.%facet_type]
  1017. // CHECK:STDOUT: %.loc27_25.2: type = value_of_initializer %type.as.BitAndWith.impl.Op.call [concrete = constants.%facet_type]
  1018. // CHECK:STDOUT: %.loc27_25.3: type = converted %type.as.BitAndWith.impl.Op.call, %.loc27_25.2 [concrete = constants.%facet_type]
  1019. // CHECK:STDOUT: }
  1020. // CHECK:STDOUT: %T.loc27_17.2: %facet_type = symbolic_binding T, 0 [symbolic = %T.loc27_17.1 (constants.%T.5da)]
  1021. // CHECK:STDOUT: }
  1022. // CHECK:STDOUT: %CallIndirect.decl: %CallIndirect.type = fn_decl @CallIndirect [concrete = constants.%CallIndirect] {} {}
  1023. // CHECK:STDOUT: }
  1024. // CHECK:STDOUT:
  1025. // CHECK:STDOUT: generic interface @A(%T.loc5_14.2: type) {
  1026. // CHECK:STDOUT: %T.loc5_14.1: type = symbolic_binding T, 0 [symbolic = %T.loc5_14.1 (constants.%T.67d)]
  1027. // CHECK:STDOUT:
  1028. // CHECK:STDOUT: !definition:
  1029. // CHECK:STDOUT: %A.type: type = facet_type <@A, @A(%T.loc5_14.1)> [symbolic = %A.type (constants.%A.type.ade)]
  1030. // CHECK:STDOUT: %Self.loc5_23.2: @A.%A.type (%A.type.ade) = symbolic_binding Self, 1 [symbolic = %Self.loc5_23.2 (constants.%Self.362)]
  1031. // CHECK:STDOUT:
  1032. // CHECK:STDOUT: interface {
  1033. // CHECK:STDOUT: %Self.loc5_23.1: @A.%A.type (%A.type.ade) = symbolic_binding Self, 1 [symbolic = %Self.loc5_23.2 (constants.%Self.362)]
  1034. // CHECK:STDOUT: %A.WithSelf.decl = interface_with_self_decl @A [concrete]
  1035. // CHECK:STDOUT:
  1036. // CHECK:STDOUT: !with Self:
  1037. // CHECK:STDOUT: %A.WithSelf.F.decl: @A.WithSelf.%A.WithSelf.F.type (%A.WithSelf.F.type.0ed) = fn_decl @A.WithSelf.F [symbolic = @A.WithSelf.%A.WithSelf.F (constants.%A.WithSelf.F.33a)] {
  1038. // CHECK:STDOUT: %U.patt: %pattern_type.98f = symbolic_binding_pattern U, 2 [concrete]
  1039. // CHECK:STDOUT: %u.param_patt: @A.WithSelf.F.%pattern_type.loc6_19 (%pattern_type.62e) = value_param_pattern [concrete]
  1040. // CHECK:STDOUT: %u.patt: @A.WithSelf.F.%pattern_type.loc6_19 (%pattern_type.62e) = at_binding_pattern u, %u.param_patt [concrete]
  1041. // CHECK:STDOUT: %return.param_patt: @A.WithSelf.F.%pattern_type.loc6_38 (%pattern_type.22d) = out_param_pattern [concrete]
  1042. // CHECK:STDOUT: %return.patt: @A.WithSelf.F.%pattern_type.loc6_38 (%pattern_type.22d) = return_slot_pattern %return.param_patt, %.loc6_38.4 [concrete]
  1043. // CHECK:STDOUT: } {
  1044. // CHECK:STDOUT: %T.ref: type = name_ref T, @A.%T.loc5_14.2 [symbolic = %T (constants.%T.67d)]
  1045. // CHECK:STDOUT: %.loc6_31: @A.WithSelf.F.%A.type (%A.type.ade) = specific_constant @A.%Self.loc5_23.1, @A(constants.%T.67d) [symbolic = %Self (constants.%Self.362)]
  1046. // CHECK:STDOUT: %Self.ref: @A.WithSelf.F.%A.type (%A.type.ade) = name_ref Self, %.loc6_31 [symbolic = %Self (constants.%Self.362)]
  1047. // CHECK:STDOUT: %U.ref.loc6_37: type = name_ref U, %U.loc6_9.2 [symbolic = %U.loc6_9.1 (constants.%U.4e7)]
  1048. // CHECK:STDOUT: %.loc6_38.2: @A.WithSelf.F.%tuple.type.loc6_38.1 (%tuple.type.f2d) = tuple_literal (%T.ref, %Self.ref, %U.ref.loc6_37) [symbolic = %tuple (constants.%tuple.f25)]
  1049. // CHECK:STDOUT: %Self.as_type: type = facet_access_type constants.%Self.362 [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type.7ec)]
  1050. // CHECK:STDOUT: %.loc6_38.3: type = converted constants.%Self.362, %Self.as_type [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type.7ec)]
  1051. // CHECK:STDOUT: %.loc6_38.4: type = converted %.loc6_38.2, constants.%tuple.type.7f3 [symbolic = %tuple.type.loc6_38.2 (constants.%tuple.type.7f3)]
  1052. // CHECK:STDOUT: %.loc6_38.5: Core.Form = init_form %.loc6_38.4 [symbolic = %.loc6_38.1 (constants.%.0ad)]
  1053. // CHECK:STDOUT: %.loc6_12.1: type = splice_block %.loc6_12.2 [concrete = type] {
  1054. // CHECK:STDOUT: %.Self: %type = symbolic_binding .Self [symbolic_self = constants.%.Self]
  1055. // CHECK:STDOUT: %.loc6_12.2: type = type_literal type [concrete = type]
  1056. // CHECK:STDOUT: }
  1057. // CHECK:STDOUT: %U.loc6_9.2: type = symbolic_binding U, 2 [symbolic = %U.loc6_9.1 (constants.%U.4e7)]
  1058. // CHECK:STDOUT: %u.param: @A.WithSelf.F.%U.loc6_9.1 (%U.4e7) = value_param call_param0
  1059. // CHECK:STDOUT: %U.ref.loc6_21: type = name_ref U, %U.loc6_9.2 [symbolic = %U.loc6_9.1 (constants.%U.4e7)]
  1060. // CHECK:STDOUT: %u: @A.WithSelf.F.%U.loc6_9.1 (%U.4e7) = value_binding u, %u.param
  1061. // CHECK:STDOUT: %return.param: ref @A.WithSelf.F.%tuple.type.loc6_38.2 (%tuple.type.7f3) = out_param call_param1
  1062. // CHECK:STDOUT: %return: ref @A.WithSelf.F.%tuple.type.loc6_38.2 (%tuple.type.7f3) = return_slot %return.param
  1063. // CHECK:STDOUT: }
  1064. // CHECK:STDOUT: %assoc0.loc6_39.1: @A.WithSelf.%A.assoc_type (%A.assoc_type.9f4) = assoc_entity element0, %A.WithSelf.F.decl [symbolic = %assoc0.loc6_39.2 (constants.%assoc0.146)]
  1065. // CHECK:STDOUT:
  1066. // CHECK:STDOUT: !members:
  1067. // CHECK:STDOUT: .Self = %Self.loc5_23.1
  1068. // CHECK:STDOUT: .T = <poisoned>
  1069. // CHECK:STDOUT: .T = <poisoned>
  1070. // CHECK:STDOUT: .F = @A.WithSelf.%assoc0.loc6_39.1
  1071. // CHECK:STDOUT: witness = (@A.WithSelf.%A.WithSelf.F.decl)
  1072. // CHECK:STDOUT:
  1073. // CHECK:STDOUT: !requires:
  1074. // CHECK:STDOUT: }
  1075. // CHECK:STDOUT: }
  1076. // CHECK:STDOUT:
  1077. // CHECK:STDOUT: generic impl @tuple.type.as.A.impl(%V1.loc14_16.2: type, %V2.loc14_27.2: type, %W.loc14_37.2: type) {
  1078. // CHECK:STDOUT: %V1.loc14_16.1: type = symbolic_binding V1, 0 [symbolic = %V1.loc14_16.1 (constants.%V1)]
  1079. // CHECK:STDOUT: %V2.loc14_27.1: type = symbolic_binding V2, 1 [symbolic = %V2.loc14_27.1 (constants.%V2)]
  1080. // CHECK:STDOUT: %W.loc14_37.1: type = symbolic_binding W, 2 [symbolic = %W.loc14_37.1 (constants.%W)]
  1081. // CHECK:STDOUT: %tuple: %tuple.type.24b = tuple_value (%V1.loc14_16.1, %V2.loc14_27.1) [symbolic = %tuple (constants.%tuple.4b9)]
  1082. // CHECK:STDOUT: %tuple.type: type = tuple_type (%V1.loc14_16.1, %V2.loc14_27.1) [symbolic = %tuple.type (constants.%tuple.type.a5e)]
  1083. // CHECK:STDOUT: %A.type.loc14_61.1: type = facet_type <@A, @A(%W.loc14_37.1)> [symbolic = %A.type.loc14_61.1 (constants.%A.type.fe7)]
  1084. // CHECK:STDOUT: %A.impl_witness.loc14_63.2: <witness> = impl_witness %A.impl_witness_table, @tuple.type.as.A.impl(%V1.loc14_16.1, %V2.loc14_27.1, %W.loc14_37.1) [symbolic = %A.impl_witness.loc14_63.2 (constants.%A.impl_witness.be2)]
  1085. // CHECK:STDOUT:
  1086. // CHECK:STDOUT: !definition:
  1087. // CHECK:STDOUT: %require_complete: <witness> = require_complete_type %A.type.loc14_61.1 [symbolic = %require_complete (constants.%require_complete.9a5)]
  1088. // 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_16.1, %V2.loc14_27.1, %W.loc14_37.1) [symbolic = %tuple.type.as.A.impl.F.type (constants.%tuple.type.as.A.impl.F.type.ce6)]
  1089. // 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.ce6) = struct_value () [symbolic = %tuple.type.as.A.impl.F (constants.%tuple.type.as.A.impl.F.74d)]
  1090. // CHECK:STDOUT:
  1091. // CHECK:STDOUT: impl: %.loc14_53.2 as %A.type.loc14_61.2 {
  1092. // 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.ce6) = 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.74d)] {
  1093. // CHECK:STDOUT: %U.patt: %pattern_type.98f = symbolic_binding_pattern U, 3 [concrete]
  1094. // CHECK:STDOUT: %u.param_patt: @tuple.type.as.A.impl.F.%pattern_type.loc17_19 (%pattern_type.e4a) = value_param_pattern [concrete]
  1095. // CHECK:STDOUT: %u.patt: @tuple.type.as.A.impl.F.%pattern_type.loc17_19 (%pattern_type.e4a) = at_binding_pattern u, %u.param_patt [concrete]
  1096. // CHECK:STDOUT: %return.param_patt: @tuple.type.as.A.impl.F.%pattern_type.loc17_42 (%pattern_type.5cc) = out_param_pattern [concrete]
  1097. // CHECK:STDOUT: %return.patt: @tuple.type.as.A.impl.F.%pattern_type.loc17_42 (%pattern_type.5cc) = return_slot_pattern %return.param_patt, %.loc17_42.5 [concrete]
  1098. // CHECK:STDOUT: } {
  1099. // CHECK:STDOUT: %W.ref: type = name_ref W, @tuple.type.as.A.impl.%W.loc14_37.2 [symbolic = %W (constants.%W)]
  1100. // CHECK:STDOUT: %V1.ref: type = name_ref V1, @tuple.type.as.A.impl.%V1.loc14_16.2 [symbolic = %V1 (constants.%V1)]
  1101. // CHECK:STDOUT: %V2.ref: type = name_ref V2, @tuple.type.as.A.impl.%V2.loc14_27.2 [symbolic = %V2 (constants.%V2)]
  1102. // CHECK:STDOUT: %.loc17_38: %tuple.type.24b = tuple_literal (%V1.ref, %V2.ref) [symbolic = %tuple.loc17_38 (constants.%tuple.4b9)]
  1103. // CHECK:STDOUT: %U.ref.loc17_41: type = name_ref U, %U.loc17_9.2 [symbolic = %U.loc17_9.1 (constants.%U.ce4)]
  1104. // CHECK:STDOUT: %.loc17_42.3: %tuple.type.11f = tuple_literal (%W.ref, %.loc17_38, %U.ref.loc17_41) [symbolic = %tuple.loc17_42 (constants.%tuple.117)]
  1105. // CHECK:STDOUT: %.loc17_42.4: type = converted constants.%tuple.4b9, constants.%tuple.type.a5e [symbolic = %tuple.type.loc17_42.1 (constants.%tuple.type.a5e)]
  1106. // CHECK:STDOUT: %.loc17_42.5: type = converted %.loc17_42.3, constants.%tuple.type.897 [symbolic = %tuple.type.loc17_42.2 (constants.%tuple.type.897)]
  1107. // CHECK:STDOUT: %.loc17_42.6: Core.Form = init_form %.loc17_42.5 [symbolic = %.loc17_42.2 (constants.%.f8e)]
  1108. // CHECK:STDOUT: %.loc17_12.1: type = splice_block %.loc17_12.2 [concrete = type] {
  1109. // CHECK:STDOUT: %.Self: %type = symbolic_binding .Self [symbolic_self = constants.%.Self]
  1110. // CHECK:STDOUT: %.loc17_12.2: type = type_literal type [concrete = type]
  1111. // CHECK:STDOUT: }
  1112. // CHECK:STDOUT: %U.loc17_9.2: type = symbolic_binding U, 3 [symbolic = %U.loc17_9.1 (constants.%U.ce4)]
  1113. // CHECK:STDOUT: %u.param: @tuple.type.as.A.impl.F.%U.loc17_9.1 (%U.ce4) = value_param call_param0
  1114. // CHECK:STDOUT: %U.ref.loc17_21: type = name_ref U, %U.loc17_9.2 [symbolic = %U.loc17_9.1 (constants.%U.ce4)]
  1115. // CHECK:STDOUT: %u: @tuple.type.as.A.impl.F.%U.loc17_9.1 (%U.ce4) = value_binding u, %u.param
  1116. // CHECK:STDOUT: %return.param: ref @tuple.type.as.A.impl.F.%tuple.type.loc17_42.2 (%tuple.type.897) = out_param call_param1
  1117. // CHECK:STDOUT: %return: ref @tuple.type.as.A.impl.F.%tuple.type.loc17_42.2 (%tuple.type.897) = return_slot %return.param
  1118. // CHECK:STDOUT: }
  1119. // CHECK:STDOUT: %A.impl_witness_table = impl_witness_table (%tuple.type.as.A.impl.F.decl), @tuple.type.as.A.impl [concrete]
  1120. // CHECK:STDOUT: %A.impl_witness.loc14_63.1: <witness> = impl_witness %A.impl_witness_table, @tuple.type.as.A.impl(constants.%V1, constants.%V2, constants.%W) [symbolic = %A.impl_witness.loc14_63.2 (constants.%A.impl_witness.be2)]
  1121. // CHECK:STDOUT:
  1122. // CHECK:STDOUT: !members:
  1123. // CHECK:STDOUT: .W = <poisoned>
  1124. // CHECK:STDOUT: .V1 = <poisoned>
  1125. // CHECK:STDOUT: .V2 = <poisoned>
  1126. // CHECK:STDOUT: .F = %tuple.type.as.A.impl.F.decl
  1127. // CHECK:STDOUT: witness = %A.impl_witness.loc14_63.1
  1128. // CHECK:STDOUT: }
  1129. // CHECK:STDOUT: }
  1130. // CHECK:STDOUT:
  1131. // CHECK:STDOUT: class @X {
  1132. // CHECK:STDOUT: %complete_type: <witness> = complete_type_witness constants.%empty_struct_type [concrete = constants.%complete_type.357]
  1133. // CHECK:STDOUT: complete_type_witness = %complete_type
  1134. // CHECK:STDOUT:
  1135. // CHECK:STDOUT: !members:
  1136. // CHECK:STDOUT: .Self = constants.%X
  1137. // CHECK:STDOUT: }
  1138. // CHECK:STDOUT:
  1139. // CHECK:STDOUT: class @Y1 {
  1140. // CHECK:STDOUT: %complete_type: <witness> = complete_type_witness constants.%empty_struct_type [concrete = constants.%complete_type.357]
  1141. // CHECK:STDOUT: complete_type_witness = %complete_type
  1142. // CHECK:STDOUT:
  1143. // CHECK:STDOUT: !members:
  1144. // CHECK:STDOUT: .Self = constants.%Y1
  1145. // CHECK:STDOUT: }
  1146. // CHECK:STDOUT:
  1147. // CHECK:STDOUT: class @Y2 {
  1148. // CHECK:STDOUT: %complete_type: <witness> = complete_type_witness constants.%empty_struct_type [concrete = constants.%complete_type.357]
  1149. // CHECK:STDOUT: complete_type_witness = %complete_type
  1150. // CHECK:STDOUT:
  1151. // CHECK:STDOUT: !members:
  1152. // CHECK:STDOUT: .Self = constants.%Y2
  1153. // CHECK:STDOUT: }
  1154. // CHECK:STDOUT:
  1155. // CHECK:STDOUT: class @Z {
  1156. // CHECK:STDOUT: %complete_type: <witness> = complete_type_witness constants.%empty_struct_type [concrete = constants.%complete_type.357]
  1157. // CHECK:STDOUT: complete_type_witness = %complete_type
  1158. // CHECK:STDOUT:
  1159. // CHECK:STDOUT: !members:
  1160. // CHECK:STDOUT: .Self = constants.%Z
  1161. // CHECK:STDOUT: }
  1162. // CHECK:STDOUT:
  1163. // CHECK:STDOUT: generic fn @A.WithSelf.F(@A.%T.loc5_14.2: type, @A.%Self.loc5_23.1: @A.%A.type (%A.type.ade), %U.loc6_9.2: type) {
  1164. // CHECK:STDOUT: %U.loc6_9.1: type = symbolic_binding U, 2 [symbolic = %U.loc6_9.1 (constants.%U.4e7)]
  1165. // CHECK:STDOUT: %pattern_type.loc6_19: type = pattern_type %U.loc6_9.1 [symbolic = %pattern_type.loc6_19 (constants.%pattern_type.62e)]
  1166. // CHECK:STDOUT: %T: type = symbolic_binding T, 0 [symbolic = %T (constants.%T.67d)]
  1167. // CHECK:STDOUT: %A.type: type = facet_type <@A, @A(%T)> [symbolic = %A.type (constants.%A.type.ade)]
  1168. // CHECK:STDOUT: %Self: @A.WithSelf.F.%A.type (%A.type.ade) = symbolic_binding Self, 1 [symbolic = %Self (constants.%Self.362)]
  1169. // CHECK:STDOUT: %tuple.type.loc6_38.1: type = tuple_type (type, %A.type, type) [symbolic = %tuple.type.loc6_38.1 (constants.%tuple.type.f2d)]
  1170. // CHECK:STDOUT: %tuple: @A.WithSelf.F.%tuple.type.loc6_38.1 (%tuple.type.f2d) = tuple_value (%T, %Self, %U.loc6_9.1) [symbolic = %tuple (constants.%tuple.f25)]
  1171. // CHECK:STDOUT: %Self.binding.as_type: type = symbolic_binding_type Self, 1, %Self [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type.7ec)]
  1172. // CHECK:STDOUT: %tuple.type.loc6_38.2: type = tuple_type (%T, %Self.binding.as_type, %U.loc6_9.1) [symbolic = %tuple.type.loc6_38.2 (constants.%tuple.type.7f3)]
  1173. // CHECK:STDOUT: %.loc6_38.1: Core.Form = init_form %tuple.type.loc6_38.2 [symbolic = %.loc6_38.1 (constants.%.0ad)]
  1174. // CHECK:STDOUT: %pattern_type.loc6_38: type = pattern_type %tuple.type.loc6_38.2 [symbolic = %pattern_type.loc6_38 (constants.%pattern_type.22d)]
  1175. // CHECK:STDOUT:
  1176. // CHECK:STDOUT: fn(%u.param: @A.WithSelf.F.%U.loc6_9.1 (%U.4e7)) -> out %return.param: @A.WithSelf.F.%tuple.type.loc6_38.2 (%tuple.type.7f3);
  1177. // CHECK:STDOUT: }
  1178. // CHECK:STDOUT:
  1179. // CHECK:STDOUT: generic fn @tuple.type.as.A.impl.F(@tuple.type.as.A.impl.%V1.loc14_16.2: type, @tuple.type.as.A.impl.%V2.loc14_27.2: type, @tuple.type.as.A.impl.%W.loc14_37.2: type, %U.loc17_9.2: type) {
  1180. // CHECK:STDOUT: %U.loc17_9.1: type = symbolic_binding U, 3 [symbolic = %U.loc17_9.1 (constants.%U.ce4)]
  1181. // CHECK:STDOUT: %pattern_type.loc17_19: type = pattern_type %U.loc17_9.1 [symbolic = %pattern_type.loc17_19 (constants.%pattern_type.e4a)]
  1182. // CHECK:STDOUT: %W: type = symbolic_binding W, 2 [symbolic = %W (constants.%W)]
  1183. // CHECK:STDOUT: %V1: type = symbolic_binding V1, 0 [symbolic = %V1 (constants.%V1)]
  1184. // CHECK:STDOUT: %V2: type = symbolic_binding V2, 1 [symbolic = %V2 (constants.%V2)]
  1185. // CHECK:STDOUT: %tuple.loc17_38: %tuple.type.24b = tuple_value (%V1, %V2) [symbolic = %tuple.loc17_38 (constants.%tuple.4b9)]
  1186. // CHECK:STDOUT: %tuple.loc17_42: %tuple.type.11f = tuple_value (%W, %tuple.loc17_38, %U.loc17_9.1) [symbolic = %tuple.loc17_42 (constants.%tuple.117)]
  1187. // CHECK:STDOUT: %tuple.type.loc17_42.1: type = tuple_type (%V1, %V2) [symbolic = %tuple.type.loc17_42.1 (constants.%tuple.type.a5e)]
  1188. // CHECK:STDOUT: %tuple.type.loc17_42.2: type = tuple_type (%W, %tuple.type.loc17_42.1, %U.loc17_9.1) [symbolic = %tuple.type.loc17_42.2 (constants.%tuple.type.897)]
  1189. // CHECK:STDOUT: %.loc17_42.2: Core.Form = init_form %tuple.type.loc17_42.2 [symbolic = %.loc17_42.2 (constants.%.f8e)]
  1190. // CHECK:STDOUT: %pattern_type.loc17_42: type = pattern_type %tuple.type.loc17_42.2 [symbolic = %pattern_type.loc17_42 (constants.%pattern_type.5cc)]
  1191. // CHECK:STDOUT:
  1192. // CHECK:STDOUT: !definition:
  1193. // CHECK:STDOUT: %require_complete.loc17_19: <witness> = require_complete_type %U.loc17_9.1 [symbolic = %require_complete.loc17_19 (constants.%require_complete.5a4)]
  1194. // CHECK:STDOUT: %require_complete.loc17_42: <witness> = require_complete_type %tuple.type.loc17_42.2 [symbolic = %require_complete.loc17_42 (constants.%require_complete.da0)]
  1195. // 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.ce6)]
  1196. // 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.ce6) = struct_value () [symbolic = %tuple.type.as.A.impl.F (constants.%tuple.type.as.A.impl.F.74d)]
  1197. // 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_9.1) [symbolic = %tuple.type.as.A.impl.F.specific_fn.loc18_12.2 (constants.%tuple.type.as.A.impl.F.specific_fn.009)]
  1198. // CHECK:STDOUT:
  1199. // CHECK:STDOUT: fn(%u.param: @tuple.type.as.A.impl.F.%U.loc17_9.1 (%U.ce4)) -> out %return.param: @tuple.type.as.A.impl.F.%tuple.type.loc17_42.2 (%tuple.type.897) {
  1200. // CHECK:STDOUT: !entry:
  1201. // CHECK:STDOUT: %.loc18: @tuple.type.as.A.impl.F.%tuple.type.as.A.impl.F.type (%tuple.type.as.A.impl.F.type.ce6) = 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.74d)]
  1202. // CHECK:STDOUT: %F.ref: @tuple.type.as.A.impl.F.%tuple.type.as.A.impl.F.type (%tuple.type.as.A.impl.F.type.ce6) = name_ref F, %.loc18 [symbolic = %tuple.type.as.A.impl.F (constants.%tuple.type.as.A.impl.F.74d)]
  1203. // CHECK:STDOUT: %U.ref.loc18: type = name_ref U, %U.loc17_9.2 [symbolic = %U.loc17_9.1 (constants.%U.ce4)]
  1204. // CHECK:STDOUT: %u.ref: @tuple.type.as.A.impl.F.%U.loc17_9.1 (%U.ce4) = name_ref u, %u
  1205. // 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.ce4) [symbolic = %tuple.type.as.A.impl.F.specific_fn.loc18_12.2 (constants.%tuple.type.as.A.impl.F.specific_fn.009)]
  1206. // CHECK:STDOUT: %.loc17_42.1: ref @tuple.type.as.A.impl.F.%tuple.type.loc17_42.2 (%tuple.type.897) = splice_block %return.param {}
  1207. // CHECK:STDOUT: %tuple.type.as.A.impl.F.call: init @tuple.type.as.A.impl.F.%tuple.type.loc17_42.2 (%tuple.type.897) to %.loc17_42.1 = call %tuple.type.as.A.impl.F.specific_fn.loc18_12.1(%u.ref)
  1208. // CHECK:STDOUT: return %tuple.type.as.A.impl.F.call to %return.param
  1209. // CHECK:STDOUT: }
  1210. // CHECK:STDOUT: }
  1211. // CHECK:STDOUT:
  1212. // CHECK:STDOUT: fn @Call() {
  1213. // CHECK:STDOUT: !entry:
  1214. // CHECK:STDOUT: %Y1.ref: type = name_ref Y1, file.%Y1.decl [concrete = constants.%Y1]
  1215. // CHECK:STDOUT: %Y2.ref: type = name_ref Y2, file.%Y2.decl [concrete = constants.%Y2]
  1216. // CHECK:STDOUT: %.loc24_12: %tuple.type.24b = tuple_literal (%Y1.ref, %Y2.ref) [concrete = constants.%tuple.dd5]
  1217. // CHECK:STDOUT: %.loc24_17: type = type_literal type [concrete = type]
  1218. // CHECK:STDOUT: %.loc24_14: type = converted %.loc24_12, constants.%tuple.type.ab2 [concrete = constants.%tuple.type.ab2]
  1219. // CHECK:STDOUT: %A.ref: %A.type.464 = name_ref A, file.%A.decl [concrete = constants.%A.generic]
  1220. // CHECK:STDOUT: %X.ref: type = name_ref X, file.%X.decl [concrete = constants.%X]
  1221. // CHECK:STDOUT: %A.type: type = facet_type <@A, @A(constants.%X)> [concrete = constants.%A.type.ab6]
  1222. // CHECK:STDOUT: %A.facet: %A.type.ab6 = facet_value %.loc24_14, (constants.%A.impl_witness.b3a) [concrete = constants.%A.facet.906]
  1223. // CHECK:STDOUT: %.loc24_23: %A.type.ab6 = converted %.loc24_14, %A.facet [concrete = constants.%A.facet.906]
  1224. // CHECK:STDOUT: %as_type: type = facet_access_type %.loc24_23 [concrete = constants.%tuple.type.ab2]
  1225. // CHECK:STDOUT: %.loc24_31.1: type = converted %.loc24_23, %as_type [concrete = constants.%tuple.type.ab2]
  1226. // CHECK:STDOUT: %.loc24_31.2: %A.assoc_type.f05 = specific_constant @A.WithSelf.%assoc0.loc6_39.1, @A.WithSelf(constants.%X, constants.%A.facet.906) [concrete = constants.%assoc0.368]
  1227. // CHECK:STDOUT: %F.ref: %A.assoc_type.f05 = name_ref F, %.loc24_31.2 [concrete = constants.%assoc0.368]
  1228. // CHECK:STDOUT: %impl.elem0: %.fa2 = impl_witness_access constants.%A.impl_witness.b3a, element0 [concrete = constants.%tuple.type.as.A.impl.F.cc8]
  1229. // CHECK:STDOUT: %Z.ref: type = name_ref Z, file.%Z.decl [concrete = constants.%Z]
  1230. // CHECK:STDOUT: %.loc24_38.1: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct]
  1231. // 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.af6]
  1232. // CHECK:STDOUT: %.loc24_39.1: ref %tuple.type.65a = temporary_storage
  1233. // CHECK:STDOUT: %.loc24_38.2: ref %Z = temporary_storage
  1234. // CHECK:STDOUT: %.loc24_38.3: init %Z to %.loc24_38.2 = class_init () [concrete = constants.%Z.val]
  1235. // CHECK:STDOUT: %.loc24_38.4: init %Z = converted %.loc24_38.1, %.loc24_38.3 [concrete = constants.%Z.val]
  1236. // CHECK:STDOUT: %.loc24_38.5: ref %Z = temporary %.loc24_38.2, %.loc24_38.4 [concrete = constants.%.318]
  1237. // CHECK:STDOUT: %.loc24_38.6: %Z = acquire_value %.loc24_38.5 [concrete = constants.%Z.val]
  1238. // CHECK:STDOUT: %tuple.type.as.A.impl.F.call: init %tuple.type.65a to %.loc24_39.1 = call %specific_fn(%.loc24_38.6)
  1239. // CHECK:STDOUT: %.loc24_39.2: ref %tuple.type.65a = temporary %.loc24_39.1, %tuple.type.as.A.impl.F.call
  1240. // CHECK:STDOUT: %Destroy.Op.bound: <bound method> = bound_method %.loc24_39.2, constants.%Destroy.Op.651ba6.7
  1241. // CHECK:STDOUT: %Destroy.Op.call.loc24_39: init %empty_tuple.type = call %Destroy.Op.bound(%.loc24_39.2)
  1242. // CHECK:STDOUT: %Destroy.Op.call.loc24_38: init %empty_tuple.type = call constants.%Destroy.Op.bound(constants.%.318)
  1243. // CHECK:STDOUT: return
  1244. // CHECK:STDOUT: }
  1245. // CHECK:STDOUT:
  1246. // CHECK:STDOUT: fn @Destroy.Op.loc24_39.1(%self.param: ref %empty_struct_type) = "no_op";
  1247. // CHECK:STDOUT:
  1248. // CHECK:STDOUT: fn @Destroy.Op.loc24_39.2(%self.param: ref %X) {
  1249. // CHECK:STDOUT: !entry:
  1250. // CHECK:STDOUT: return
  1251. // CHECK:STDOUT: }
  1252. // CHECK:STDOUT:
  1253. // CHECK:STDOUT: fn @Destroy.Op.loc24_39.3(%self.param: ref %Y1) {
  1254. // CHECK:STDOUT: !entry:
  1255. // CHECK:STDOUT: return
  1256. // CHECK:STDOUT: }
  1257. // CHECK:STDOUT:
  1258. // CHECK:STDOUT: fn @Destroy.Op.loc24_39.4(%self.param: ref %Y2) {
  1259. // CHECK:STDOUT: !entry:
  1260. // CHECK:STDOUT: return
  1261. // CHECK:STDOUT: }
  1262. // CHECK:STDOUT:
  1263. // CHECK:STDOUT: fn @Destroy.Op.loc24_39.5(%self.param: ref %tuple.type.ab2) {
  1264. // CHECK:STDOUT: !entry:
  1265. // CHECK:STDOUT: return
  1266. // CHECK:STDOUT: }
  1267. // CHECK:STDOUT:
  1268. // CHECK:STDOUT: fn @Destroy.Op.loc24_39.6(%self.param: ref %Z) {
  1269. // CHECK:STDOUT: !entry:
  1270. // CHECK:STDOUT: return
  1271. // CHECK:STDOUT: }
  1272. // CHECK:STDOUT:
  1273. // CHECK:STDOUT: fn @Destroy.Op.loc24_39.7(%self.param: ref %tuple.type.65a) {
  1274. // CHECK:STDOUT: !entry:
  1275. // CHECK:STDOUT: return
  1276. // CHECK:STDOUT: }
  1277. // CHECK:STDOUT:
  1278. // CHECK:STDOUT: generic fn @CallGeneric(%T.loc27_17.2: %facet_type) {
  1279. // CHECK:STDOUT: %T.loc27_17.1: %facet_type = symbolic_binding T, 0 [symbolic = %T.loc27_17.1 (constants.%T.5da)]
  1280. // CHECK:STDOUT:
  1281. // CHECK:STDOUT: !definition:
  1282. // CHECK:STDOUT: %T.binding.as_type: type = symbolic_binding_type T, 0, %T.loc27_17.1 [symbolic = %T.binding.as_type (constants.%T.binding.as_type)]
  1283. // CHECK:STDOUT: %A.lookup_impl_witness: <witness> = lookup_impl_witness %T.loc27_17.1, @A, @A(constants.%X) [symbolic = %A.lookup_impl_witness (constants.%A.lookup_impl_witness)]
  1284. // CHECK:STDOUT: %A.facet: %A.type.ab6 = facet_value %T.binding.as_type, (%A.lookup_impl_witness) [symbolic = %A.facet (constants.%A.facet.b04)]
  1285. // CHECK:STDOUT: %A.WithSelf.F.type: type = fn_type @A.WithSelf.F, @A.WithSelf(constants.%X, %A.facet) [symbolic = %A.WithSelf.F.type (constants.%A.WithSelf.F.type.416)]
  1286. // CHECK:STDOUT: %.loc28_4.3: type = fn_type_with_self_type %A.WithSelf.F.type, %A.facet [symbolic = %.loc28_4.3 (constants.%.8ed)]
  1287. // CHECK:STDOUT: %impl.elem0.loc28_4.2: @CallGeneric.%.loc28_4.3 (%.8ed) = impl_witness_access %A.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc28_4.2 (constants.%impl.elem0.138)]
  1288. // CHECK:STDOUT: %specific_impl_fn.loc28_4.2: <specific function> = specific_impl_function %impl.elem0.loc28_4.2, @A.WithSelf.F(constants.%X, %A.facet, constants.%Z) [symbolic = %specific_impl_fn.loc28_4.2 (constants.%specific_impl_fn.1d5)]
  1289. // CHECK:STDOUT: %tuple.type: type = tuple_type (constants.%X, %T.binding.as_type, constants.%Z) [symbolic = %tuple.type (constants.%tuple.type.f23)]
  1290. // CHECK:STDOUT: %require_complete: <witness> = require_complete_type %tuple.type [symbolic = %require_complete (constants.%require_complete.247)]
  1291. // CHECK:STDOUT: %Destroy.lookup_impl_witness: <witness> = lookup_impl_witness %tuple.type, @Destroy [symbolic = %Destroy.lookup_impl_witness (constants.%Destroy.lookup_impl_witness.74b)]
  1292. // CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %tuple.type, (%Destroy.lookup_impl_witness) [symbolic = %Destroy.facet (constants.%Destroy.facet.8b5)]
  1293. // CHECK:STDOUT: %Destroy.WithSelf.Op.type: type = fn_type @Destroy.WithSelf.Op, @Destroy.WithSelf(%Destroy.facet) [symbolic = %Destroy.WithSelf.Op.type (constants.%Destroy.WithSelf.Op.type.209)]
  1294. // CHECK:STDOUT: %.loc28_12.3: type = fn_type_with_self_type %Destroy.WithSelf.Op.type, %Destroy.facet [symbolic = %.loc28_12.3 (constants.%.509)]
  1295. // CHECK:STDOUT: %impl.elem0.loc28_12.2: @CallGeneric.%.loc28_12.3 (%.509) = impl_witness_access %Destroy.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc28_12.2 (constants.%impl.elem0.243)]
  1296. // CHECK:STDOUT: %specific_impl_fn.loc28_12.2: <specific function> = specific_impl_function %impl.elem0.loc28_12.2, @Destroy.WithSelf.Op(%Destroy.facet) [symbolic = %specific_impl_fn.loc28_12.2 (constants.%specific_impl_fn.d18)]
  1297. // CHECK:STDOUT:
  1298. // CHECK:STDOUT: fn() {
  1299. // CHECK:STDOUT: !entry:
  1300. // CHECK:STDOUT: %T.ref: %facet_type = name_ref T, %T.loc27_17.2 [symbolic = %T.loc27_17.1 (constants.%T.5da)]
  1301. // CHECK:STDOUT: %T.as_type: type = facet_access_type %T.ref [symbolic = %T.binding.as_type (constants.%T.binding.as_type)]
  1302. // CHECK:STDOUT: %.loc28_4.1: type = converted %T.ref, %T.as_type [symbolic = %T.binding.as_type (constants.%T.binding.as_type)]
  1303. // CHECK:STDOUT: %.loc28_4.2: %A.assoc_type.f05 = specific_constant @A.WithSelf.%assoc0.loc6_39.1, @A.WithSelf(constants.%X, constants.%T.5da) [concrete = constants.%assoc0.368]
  1304. // CHECK:STDOUT: %F.ref: %A.assoc_type.f05 = name_ref F, %.loc28_4.2 [concrete = constants.%assoc0.368]
  1305. // CHECK:STDOUT: %impl.elem0.loc28_4.1: @CallGeneric.%.loc28_4.3 (%.8ed) = impl_witness_access constants.%A.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc28_4.2 (constants.%impl.elem0.138)]
  1306. // CHECK:STDOUT: %Z.ref: type = name_ref Z, file.%Z.decl [concrete = constants.%Z]
  1307. // CHECK:STDOUT: %.loc28_11.1: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct]
  1308. // CHECK:STDOUT: %specific_impl_fn.loc28_4.1: <specific function> = specific_impl_function %impl.elem0.loc28_4.1, @A.WithSelf.F(constants.%X, constants.%A.facet.b04, constants.%Z) [symbolic = %specific_impl_fn.loc28_4.2 (constants.%specific_impl_fn.1d5)]
  1309. // CHECK:STDOUT: %.loc28_12.1: ref @CallGeneric.%tuple.type (%tuple.type.f23) = temporary_storage
  1310. // CHECK:STDOUT: %.loc28_11.2: ref %Z = temporary_storage
  1311. // CHECK:STDOUT: %.loc28_11.3: init %Z to %.loc28_11.2 = class_init () [concrete = constants.%Z.val]
  1312. // CHECK:STDOUT: %.loc28_11.4: init %Z = converted %.loc28_11.1, %.loc28_11.3 [concrete = constants.%Z.val]
  1313. // CHECK:STDOUT: %.loc28_11.5: ref %Z = temporary %.loc28_11.2, %.loc28_11.4 [concrete = constants.%.318]
  1314. // CHECK:STDOUT: %.loc28_11.6: %Z = acquire_value %.loc28_11.5 [concrete = constants.%Z.val]
  1315. // CHECK:STDOUT: %A.WithSelf.F.call: init @CallGeneric.%tuple.type (%tuple.type.f23) to %.loc28_12.1 = call %specific_impl_fn.loc28_4.1(%.loc28_11.6)
  1316. // CHECK:STDOUT: %.loc28_12.2: ref @CallGeneric.%tuple.type (%tuple.type.f23) = temporary %.loc28_12.1, %A.WithSelf.F.call
  1317. // CHECK:STDOUT: %impl.elem0.loc28_12.1: @CallGeneric.%.loc28_12.3 (%.509) = impl_witness_access constants.%Destroy.lookup_impl_witness.74b, element0 [symbolic = %impl.elem0.loc28_12.2 (constants.%impl.elem0.243)]
  1318. // CHECK:STDOUT: %bound_method.loc28_12.1: <bound method> = bound_method %.loc28_12.2, %impl.elem0.loc28_12.1
  1319. // CHECK:STDOUT: %specific_impl_fn.loc28_12.1: <specific function> = specific_impl_function %impl.elem0.loc28_12.1, @Destroy.WithSelf.Op(constants.%Destroy.facet.8b5) [symbolic = %specific_impl_fn.loc28_12.2 (constants.%specific_impl_fn.d18)]
  1320. // CHECK:STDOUT: %bound_method.loc28_12.2: <bound method> = bound_method %.loc28_12.2, %specific_impl_fn.loc28_12.1
  1321. // CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call %bound_method.loc28_12.2(%.loc28_12.2)
  1322. // CHECK:STDOUT: %Destroy.Op.call: init %empty_tuple.type = call constants.%Destroy.Op.bound(constants.%.318)
  1323. // CHECK:STDOUT: return
  1324. // CHECK:STDOUT: }
  1325. // CHECK:STDOUT: }
  1326. // CHECK:STDOUT:
  1327. // CHECK:STDOUT: fn @CallIndirect() {
  1328. // CHECK:STDOUT: !entry:
  1329. // CHECK:STDOUT: %CallGeneric.ref: %CallGeneric.type = name_ref CallGeneric, file.%CallGeneric.decl [concrete = constants.%CallGeneric]
  1330. // CHECK:STDOUT: %Y1.ref: type = name_ref Y1, file.%Y1.decl [concrete = constants.%Y1]
  1331. // CHECK:STDOUT: %Y2.ref: type = name_ref Y2, file.%Y2.decl [concrete = constants.%Y2]
  1332. // CHECK:STDOUT: %.loc33_22: %tuple.type.24b = tuple_literal (%Y1.ref, %Y2.ref) [concrete = constants.%tuple.dd5]
  1333. // CHECK:STDOUT: %.loc33_27: type = type_literal type [concrete = type]
  1334. // CHECK:STDOUT: %.loc33_24: type = converted %.loc33_22, constants.%tuple.type.ab2 [concrete = constants.%tuple.type.ab2]
  1335. // CHECK:STDOUT: %facet_value: %facet_type = facet_value %.loc33_24, (constants.%A.impl_witness.b3a, constants.%custom_witness.8d7fae.5) [concrete = constants.%facet_value]
  1336. // CHECK:STDOUT: %.loc33_31: %facet_type = converted %.loc33_24, %facet_value [concrete = constants.%facet_value]
  1337. // CHECK:STDOUT: %CallGeneric.specific_fn: <specific function> = specific_function %CallGeneric.ref, @CallGeneric(constants.%facet_value) [concrete = constants.%CallGeneric.specific_fn]
  1338. // CHECK:STDOUT: %CallGeneric.call: init %empty_tuple.type = call %CallGeneric.specific_fn()
  1339. // CHECK:STDOUT: return
  1340. // CHECK:STDOUT: }
  1341. // CHECK:STDOUT:
  1342. // CHECK:STDOUT: specific @A(constants.%T.67d) {
  1343. // CHECK:STDOUT: %T.loc5_14.1 => constants.%T.67d
  1344. // CHECK:STDOUT: }
  1345. // CHECK:STDOUT:
  1346. // CHECK:STDOUT: specific @A.WithSelf(constants.%T.67d, constants.%Self.362) {}
  1347. // CHECK:STDOUT:
  1348. // CHECK:STDOUT: specific @A.WithSelf.F(constants.%T.67d, constants.%Self.362, constants.%U.4e7) {
  1349. // CHECK:STDOUT: %U.loc6_9.1 => constants.%U.4e7
  1350. // CHECK:STDOUT: %pattern_type.loc6_19 => constants.%pattern_type.62e
  1351. // CHECK:STDOUT: %T => constants.%T.67d
  1352. // CHECK:STDOUT: %A.type => constants.%A.type.ade
  1353. // CHECK:STDOUT: %Self => constants.%Self.362
  1354. // CHECK:STDOUT: %tuple.type.loc6_38.1 => constants.%tuple.type.f2d
  1355. // CHECK:STDOUT: %tuple => constants.%tuple.f25
  1356. // CHECK:STDOUT: %Self.binding.as_type => constants.%Self.binding.as_type.7ec
  1357. // CHECK:STDOUT: %tuple.type.loc6_38.2 => constants.%tuple.type.7f3
  1358. // CHECK:STDOUT: %.loc6_38.1 => constants.%.0ad
  1359. // CHECK:STDOUT: %pattern_type.loc6_38 => constants.%pattern_type.22d
  1360. // CHECK:STDOUT: }
  1361. // CHECK:STDOUT:
  1362. // CHECK:STDOUT: specific @A(constants.%W) {
  1363. // CHECK:STDOUT: %T.loc5_14.1 => constants.%W
  1364. // CHECK:STDOUT:
  1365. // CHECK:STDOUT: !definition:
  1366. // CHECK:STDOUT: %A.type => constants.%A.type.fe7
  1367. // CHECK:STDOUT: %Self.loc5_23.2 => constants.%Self.d33
  1368. // CHECK:STDOUT: }
  1369. // CHECK:STDOUT:
  1370. // CHECK:STDOUT: specific @tuple.type.as.A.impl(constants.%V1, constants.%V2, constants.%W) {
  1371. // CHECK:STDOUT: %V1.loc14_16.1 => constants.%V1
  1372. // CHECK:STDOUT: %V2.loc14_27.1 => constants.%V2
  1373. // CHECK:STDOUT: %W.loc14_37.1 => constants.%W
  1374. // CHECK:STDOUT: %tuple => constants.%tuple.4b9
  1375. // CHECK:STDOUT: %tuple.type => constants.%tuple.type.a5e
  1376. // CHECK:STDOUT: %A.type.loc14_61.1 => constants.%A.type.fe7
  1377. // CHECK:STDOUT: %A.impl_witness.loc14_63.2 => constants.%A.impl_witness.be2
  1378. // CHECK:STDOUT:
  1379. // CHECK:STDOUT: !definition:
  1380. // CHECK:STDOUT: %require_complete => constants.%require_complete.9a5
  1381. // CHECK:STDOUT: %tuple.type.as.A.impl.F.type => constants.%tuple.type.as.A.impl.F.type.ce6
  1382. // CHECK:STDOUT: %tuple.type.as.A.impl.F => constants.%tuple.type.as.A.impl.F.74d
  1383. // CHECK:STDOUT: }
  1384. // CHECK:STDOUT:
  1385. // CHECK:STDOUT: specific @A.WithSelf(constants.%W, constants.%Self.362) {
  1386. // CHECK:STDOUT: !definition:
  1387. // CHECK:STDOUT: %T => constants.%W
  1388. // CHECK:STDOUT: %A.type => constants.%A.type.fe7
  1389. // CHECK:STDOUT: %Self => constants.%Self.362
  1390. // CHECK:STDOUT: %A.WithSelf.F.type => constants.%A.WithSelf.F.type.986
  1391. // CHECK:STDOUT: %A.WithSelf.F => constants.%A.WithSelf.F.0f5
  1392. // CHECK:STDOUT: %A.assoc_type => constants.%A.assoc_type.7a9
  1393. // CHECK:STDOUT: %assoc0.loc6_39.2 => constants.%assoc0.dfc
  1394. // CHECK:STDOUT: }
  1395. // CHECK:STDOUT:
  1396. // CHECK:STDOUT: specific @tuple.type.as.A.impl.F(constants.%V1, constants.%V2, constants.%W, constants.%U.ce4) {
  1397. // CHECK:STDOUT: %U.loc17_9.1 => constants.%U.ce4
  1398. // CHECK:STDOUT: %pattern_type.loc17_19 => constants.%pattern_type.e4a
  1399. // CHECK:STDOUT: %W => constants.%W
  1400. // CHECK:STDOUT: %V1 => constants.%V1
  1401. // CHECK:STDOUT: %V2 => constants.%V2
  1402. // CHECK:STDOUT: %tuple.loc17_38 => constants.%tuple.4b9
  1403. // CHECK:STDOUT: %tuple.loc17_42 => constants.%tuple.117
  1404. // CHECK:STDOUT: %tuple.type.loc17_42.1 => constants.%tuple.type.a5e
  1405. // CHECK:STDOUT: %tuple.type.loc17_42.2 => constants.%tuple.type.897
  1406. // CHECK:STDOUT: %.loc17_42.2 => constants.%.f8e
  1407. // CHECK:STDOUT: %pattern_type.loc17_42 => constants.%pattern_type.5cc
  1408. // CHECK:STDOUT:
  1409. // CHECK:STDOUT: !definition:
  1410. // CHECK:STDOUT: %require_complete.loc17_19 => constants.%require_complete.5a4
  1411. // CHECK:STDOUT: %require_complete.loc17_42 => constants.%require_complete.da0
  1412. // CHECK:STDOUT: %tuple.type.as.A.impl.F.type => constants.%tuple.type.as.A.impl.F.type.ce6
  1413. // CHECK:STDOUT: %tuple.type.as.A.impl.F => constants.%tuple.type.as.A.impl.F.74d
  1414. // CHECK:STDOUT: %tuple.type.as.A.impl.F.specific_fn.loc18_12.2 => constants.%tuple.type.as.A.impl.F.specific_fn.009
  1415. // CHECK:STDOUT: }
  1416. // CHECK:STDOUT:
  1417. // CHECK:STDOUT: specific @A.WithSelf(constants.%W, constants.%A.facet.56b) {
  1418. // CHECK:STDOUT: !definition:
  1419. // CHECK:STDOUT: %T => constants.%W
  1420. // CHECK:STDOUT: %A.type => constants.%A.type.fe7
  1421. // CHECK:STDOUT: %Self => constants.%A.facet.56b
  1422. // CHECK:STDOUT: %A.WithSelf.F.type => constants.%A.WithSelf.F.type.104
  1423. // CHECK:STDOUT: %A.WithSelf.F => constants.%A.WithSelf.F.028
  1424. // CHECK:STDOUT: %A.assoc_type => constants.%A.assoc_type.7a9
  1425. // CHECK:STDOUT: %assoc0.loc6_39.2 => constants.%assoc0.dfc
  1426. // CHECK:STDOUT: }
  1427. // CHECK:STDOUT:
  1428. // CHECK:STDOUT: specific @A.WithSelf.F(constants.%W, constants.%A.facet.56b, constants.%U.ce4) {
  1429. // CHECK:STDOUT: %U.loc6_9.1 => constants.%U.ce4
  1430. // CHECK:STDOUT: %pattern_type.loc6_19 => constants.%pattern_type.e4a
  1431. // CHECK:STDOUT: %T => constants.%W
  1432. // CHECK:STDOUT: %A.type => constants.%A.type.fe7
  1433. // CHECK:STDOUT: %Self => constants.%A.facet.56b
  1434. // CHECK:STDOUT: %tuple.type.loc6_38.1 => constants.%tuple.type.52a
  1435. // CHECK:STDOUT: %tuple => constants.%tuple.ec4
  1436. // CHECK:STDOUT: %Self.binding.as_type => constants.%tuple.type.a5e
  1437. // CHECK:STDOUT: %tuple.type.loc6_38.2 => constants.%tuple.type.897
  1438. // CHECK:STDOUT: %.loc6_38.1 => constants.%.f8e
  1439. // CHECK:STDOUT: %pattern_type.loc6_38 => constants.%pattern_type.5cc
  1440. // CHECK:STDOUT: }
  1441. // CHECK:STDOUT:
  1442. // CHECK:STDOUT: specific @A(constants.%X) {
  1443. // CHECK:STDOUT: %T.loc5_14.1 => constants.%X
  1444. // CHECK:STDOUT:
  1445. // CHECK:STDOUT: !definition:
  1446. // CHECK:STDOUT: %A.type => constants.%A.type.ab6
  1447. // CHECK:STDOUT: %Self.loc5_23.2 => constants.%Self.e87
  1448. // CHECK:STDOUT: }
  1449. // CHECK:STDOUT:
  1450. // CHECK:STDOUT: specific @tuple.type.as.A.impl(constants.%Y1, constants.%Y2, constants.%X) {
  1451. // CHECK:STDOUT: %V1.loc14_16.1 => constants.%Y1
  1452. // CHECK:STDOUT: %V2.loc14_27.1 => constants.%Y2
  1453. // CHECK:STDOUT: %W.loc14_37.1 => constants.%X
  1454. // CHECK:STDOUT: %tuple => constants.%tuple.dd5
  1455. // CHECK:STDOUT: %tuple.type => constants.%tuple.type.ab2
  1456. // CHECK:STDOUT: %A.type.loc14_61.1 => constants.%A.type.ab6
  1457. // CHECK:STDOUT: %A.impl_witness.loc14_63.2 => constants.%A.impl_witness.b3a
  1458. // CHECK:STDOUT:
  1459. // CHECK:STDOUT: !definition:
  1460. // CHECK:STDOUT: %require_complete => constants.%complete_type.a36
  1461. // CHECK:STDOUT: %tuple.type.as.A.impl.F.type => constants.%tuple.type.as.A.impl.F.type.d14
  1462. // CHECK:STDOUT: %tuple.type.as.A.impl.F => constants.%tuple.type.as.A.impl.F.cc8
  1463. // CHECK:STDOUT: }
  1464. // CHECK:STDOUT:
  1465. // CHECK:STDOUT: specific @A.WithSelf(constants.%X, constants.%Self.362) {
  1466. // CHECK:STDOUT: !definition:
  1467. // CHECK:STDOUT: %T => constants.%X
  1468. // CHECK:STDOUT: %A.type => constants.%A.type.ab6
  1469. // CHECK:STDOUT: %Self => constants.%Self.362
  1470. // CHECK:STDOUT: %A.WithSelf.F.type => constants.%A.WithSelf.F.type.ba2
  1471. // CHECK:STDOUT: %A.WithSelf.F => constants.%A.WithSelf.F.e5f
  1472. // CHECK:STDOUT: %A.assoc_type => constants.%A.assoc_type.f05
  1473. // CHECK:STDOUT: %assoc0.loc6_39.2 => constants.%assoc0.368
  1474. // CHECK:STDOUT: }
  1475. // CHECK:STDOUT:
  1476. // CHECK:STDOUT: specific @A.WithSelf(constants.%X, constants.%A.facet.906) {
  1477. // CHECK:STDOUT: !definition:
  1478. // CHECK:STDOUT: %T => constants.%X
  1479. // CHECK:STDOUT: %A.type => constants.%A.type.ab6
  1480. // CHECK:STDOUT: %Self => constants.%A.facet.906
  1481. // CHECK:STDOUT: %A.WithSelf.F.type => constants.%A.WithSelf.F.type.757
  1482. // CHECK:STDOUT: %A.WithSelf.F => constants.%A.WithSelf.F.8b6
  1483. // CHECK:STDOUT: %A.assoc_type => constants.%A.assoc_type.f05
  1484. // CHECK:STDOUT: %assoc0.loc6_39.2 => constants.%assoc0.368
  1485. // CHECK:STDOUT: }
  1486. // CHECK:STDOUT:
  1487. // CHECK:STDOUT: specific @tuple.type.as.A.impl.F(constants.%Y1, constants.%Y2, constants.%X, constants.%Z) {
  1488. // CHECK:STDOUT: %U.loc17_9.1 => constants.%Z
  1489. // CHECK:STDOUT: %pattern_type.loc17_19 => constants.%pattern_type.bdb
  1490. // CHECK:STDOUT: %W => constants.%X
  1491. // CHECK:STDOUT: %V1 => constants.%Y1
  1492. // CHECK:STDOUT: %V2 => constants.%Y2
  1493. // CHECK:STDOUT: %tuple.loc17_38 => constants.%tuple.dd5
  1494. // CHECK:STDOUT: %tuple.loc17_42 => constants.%tuple.66d
  1495. // CHECK:STDOUT: %tuple.type.loc17_42.1 => constants.%tuple.type.ab2
  1496. // CHECK:STDOUT: %tuple.type.loc17_42.2 => constants.%tuple.type.65a
  1497. // CHECK:STDOUT: %.loc17_42.2 => constants.%.241
  1498. // CHECK:STDOUT: %pattern_type.loc17_42 => constants.%pattern_type.30b
  1499. // CHECK:STDOUT:
  1500. // CHECK:STDOUT: !definition:
  1501. // CHECK:STDOUT: %require_complete.loc17_19 => constants.%complete_type.357
  1502. // CHECK:STDOUT: %require_complete.loc17_42 => constants.%complete_type.cf2
  1503. // CHECK:STDOUT: %tuple.type.as.A.impl.F.type => constants.%tuple.type.as.A.impl.F.type.d14
  1504. // CHECK:STDOUT: %tuple.type.as.A.impl.F => constants.%tuple.type.as.A.impl.F.cc8
  1505. // CHECK:STDOUT: %tuple.type.as.A.impl.F.specific_fn.loc18_12.2 => constants.%tuple.type.as.A.impl.F.specific_fn.af6
  1506. // CHECK:STDOUT: }
  1507. // CHECK:STDOUT:
  1508. // CHECK:STDOUT: specific @CallGeneric(constants.%T.5da) {
  1509. // CHECK:STDOUT: %T.loc27_17.1 => constants.%T.5da
  1510. // CHECK:STDOUT: }
  1511. // CHECK:STDOUT:
  1512. // CHECK:STDOUT: specific @A.WithSelf(constants.%X, constants.%T.5da) {
  1513. // CHECK:STDOUT: !definition:
  1514. // CHECK:STDOUT: %T => constants.%X
  1515. // CHECK:STDOUT: %A.type => constants.%A.type.ab6
  1516. // CHECK:STDOUT: %Self => constants.%T.5da
  1517. // CHECK:STDOUT: %A.WithSelf.F.type => constants.%A.WithSelf.F.type.6cc
  1518. // CHECK:STDOUT: %A.WithSelf.F => constants.%A.WithSelf.F.dc9
  1519. // CHECK:STDOUT: %A.assoc_type => constants.%A.assoc_type.f05
  1520. // CHECK:STDOUT: %assoc0.loc6_39.2 => constants.%assoc0.368
  1521. // CHECK:STDOUT: }
  1522. // CHECK:STDOUT:
  1523. // CHECK:STDOUT: specific @A.WithSelf(constants.%X, constants.%A.facet.b04) {
  1524. // CHECK:STDOUT: !definition:
  1525. // CHECK:STDOUT: %T => constants.%X
  1526. // CHECK:STDOUT: %A.type => constants.%A.type.ab6
  1527. // CHECK:STDOUT: %Self => constants.%A.facet.b04
  1528. // CHECK:STDOUT: %A.WithSelf.F.type => constants.%A.WithSelf.F.type.416
  1529. // CHECK:STDOUT: %A.WithSelf.F => constants.%A.WithSelf.F.d39
  1530. // CHECK:STDOUT: %A.assoc_type => constants.%A.assoc_type.f05
  1531. // CHECK:STDOUT: %assoc0.loc6_39.2 => constants.%assoc0.368
  1532. // CHECK:STDOUT: }
  1533. // CHECK:STDOUT:
  1534. // CHECK:STDOUT: specific @A.WithSelf.F(constants.%X, constants.%A.facet.b04, constants.%Z) {
  1535. // CHECK:STDOUT: %U.loc6_9.1 => constants.%Z
  1536. // CHECK:STDOUT: %pattern_type.loc6_19 => constants.%pattern_type.bdb
  1537. // CHECK:STDOUT: %T => constants.%X
  1538. // CHECK:STDOUT: %A.type => constants.%A.type.ab6
  1539. // CHECK:STDOUT: %Self => constants.%A.facet.b04
  1540. // CHECK:STDOUT: %tuple.type.loc6_38.1 => constants.%tuple.type.f96
  1541. // CHECK:STDOUT: %tuple => constants.%tuple.5a0
  1542. // CHECK:STDOUT: %Self.binding.as_type => constants.%T.binding.as_type
  1543. // CHECK:STDOUT: %tuple.type.loc6_38.2 => constants.%tuple.type.f23
  1544. // CHECK:STDOUT: %.loc6_38.1 => constants.%.c4a
  1545. // CHECK:STDOUT: %pattern_type.loc6_38 => constants.%pattern_type.434
  1546. // CHECK:STDOUT: }
  1547. // CHECK:STDOUT:
  1548. // CHECK:STDOUT: specific @CallGeneric(constants.%facet_value) {
  1549. // CHECK:STDOUT: %T.loc27_17.1 => constants.%facet_value
  1550. // CHECK:STDOUT:
  1551. // CHECK:STDOUT: !definition:
  1552. // CHECK:STDOUT: %T.binding.as_type => constants.%tuple.type.ab2
  1553. // CHECK:STDOUT: %A.lookup_impl_witness => constants.%A.impl_witness.b3a
  1554. // CHECK:STDOUT: %A.facet => constants.%A.facet.906
  1555. // CHECK:STDOUT: %A.WithSelf.F.type => constants.%A.WithSelf.F.type.757
  1556. // CHECK:STDOUT: %.loc28_4.3 => constants.%.fa2
  1557. // CHECK:STDOUT: %impl.elem0.loc28_4.2 => constants.%tuple.type.as.A.impl.F.cc8
  1558. // CHECK:STDOUT: %specific_impl_fn.loc28_4.2 => constants.%tuple.type.as.A.impl.F.specific_fn.af6
  1559. // CHECK:STDOUT: %tuple.type => constants.%tuple.type.65a
  1560. // CHECK:STDOUT: %require_complete => constants.%complete_type.cf2
  1561. // CHECK:STDOUT: %Destroy.lookup_impl_witness => constants.%custom_witness.8d7fae.7
  1562. // CHECK:STDOUT: %Destroy.facet => constants.%Destroy.facet.9fd
  1563. // CHECK:STDOUT: %Destroy.WithSelf.Op.type => constants.%Destroy.WithSelf.Op.type.d36
  1564. // CHECK:STDOUT: %.loc28_12.3 => constants.%.498
  1565. // CHECK:STDOUT: %impl.elem0.loc28_12.2 => constants.%Destroy.Op.651ba6.7
  1566. // CHECK:STDOUT: %specific_impl_fn.loc28_12.2 => constants.%Destroy.Op.651ba6.7
  1567. // CHECK:STDOUT: }
  1568. // CHECK:STDOUT:
  1569. // CHECK:STDOUT: specific @A.WithSelf.F(constants.%X, constants.%A.facet.906, constants.%Z) {
  1570. // CHECK:STDOUT: %U.loc6_9.1 => constants.%Z
  1571. // CHECK:STDOUT: %pattern_type.loc6_19 => constants.%pattern_type.bdb
  1572. // CHECK:STDOUT: %T => constants.%X
  1573. // CHECK:STDOUT: %A.type => constants.%A.type.ab6
  1574. // CHECK:STDOUT: %Self => constants.%A.facet.906
  1575. // CHECK:STDOUT: %tuple.type.loc6_38.1 => constants.%tuple.type.f96
  1576. // CHECK:STDOUT: %tuple => constants.%tuple.5e4
  1577. // CHECK:STDOUT: %Self.binding.as_type => constants.%tuple.type.ab2
  1578. // CHECK:STDOUT: %tuple.type.loc6_38.2 => constants.%tuple.type.65a
  1579. // CHECK:STDOUT: %.loc6_38.1 => constants.%.241
  1580. // CHECK:STDOUT: %pattern_type.loc6_38 => constants.%pattern_type.30b
  1581. // CHECK:STDOUT: }
  1582. // CHECK:STDOUT: