generic_method.carbon 109 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439
  1. // Part of the Carbon Language project, under the Apache License v2.0 with LLVM
  2. // Exceptions. See /LICENSE for license information.
  3. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
  4. //
  5. // INCLUDE-FILE: toolchain/testing/testdata/min_prelude/convert.carbon
  6. // TODO: Add ranges and switch to "--dump-sem-ir-ranges=only".
  7. // EXTRA-ARGS: --dump-sem-ir-ranges=if-present
  8. //
  9. // AUTOUPDATE
  10. // TIP: To test this file alone, run:
  11. // TIP: bazel test //toolchain/testing:file_test --test_arg=--file_tests=toolchain/check/testdata/interface/generic_method.carbon
  12. // TIP: To dump output, run:
  13. // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/check/testdata/interface/generic_method.carbon
  14. // --- generic_method_fewer_params.carbon
  15. library "[[@TEST_NAME]]";
  16. // T has index 0, Self has index 1, U has index 2.
  17. interface A(T:! type) {
  18. fn F(U:! type, u: U*) -> (T, Self, U*);
  19. }
  20. class X {}
  21. class Y {}
  22. class Z {}
  23. impl Y as A(X) {
  24. // Here, U has index 0. The specific used for A.F needs to renumber its U from
  25. // index 2 to index 0.
  26. fn F(U:! type, u: U*) -> (X, Y, U*) {
  27. return ({}, {}, u);
  28. }
  29. }
  30. fn Call() {
  31. var u: Z;
  32. (Y as A(X)).F(Z, &u);
  33. }
  34. fn CallGeneric(T:! A(X)) {
  35. var u: Z;
  36. T.F(Z, &u);
  37. }
  38. fn CallIndirect() {
  39. CallGeneric(Y);
  40. }
  41. // --- generic_method_more_params.carbon
  42. library "[[@TEST_NAME]]";
  43. // T has index 0, Self has index 1, U has index 2.
  44. interface A(T:! type) {
  45. fn F(U:! type, u: U) -> (T, Self, U);
  46. }
  47. class X {}
  48. class Y1 {}
  49. class Y2 {}
  50. class Z {}
  51. impl forall [V1:! type, V2:! type, W:! type] (V1, V2) as A(W) {
  52. // Here, U has index 3. The specific used for A.F needs to renumber its U from
  53. // index 2 to index 3.
  54. fn F(U:! type, u: U) -> (W, (V1, V2), U) {
  55. return F(U, u);
  56. }
  57. }
  58. fn Call() {
  59. // TODO: The `as type` here should not be necessary.
  60. (((Y1, Y2) as type) as A(X)).F(Z, {});
  61. }
  62. fn CallGeneric(T:! A(X)) {
  63. T.F(Z, {});
  64. }
  65. fn CallIndirect() {
  66. // TODO: The `as type` here should not be necessary.
  67. CallGeneric((Y1, Y2) as type);
  68. }
  69. // CHECK:STDOUT: --- generic_method_fewer_params.carbon
  70. // CHECK:STDOUT:
  71. // CHECK:STDOUT: constants {
  72. // CHECK:STDOUT: %type: type = facet_type <type> [concrete]
  73. // CHECK:STDOUT: %.Self: %type = symbolic_binding .Self [symbolic_self]
  74. // CHECK:STDOUT: %T.67d: type = symbolic_binding T, 0 [symbolic]
  75. // CHECK:STDOUT: %pattern_type.98f: type = pattern_type type [concrete]
  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: %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) [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, %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: %.2f2: require_specific_def_type = require_specific_def @ptr.as.Copy.impl(%U.67d) [symbolic]
  131. // CHECK:STDOUT: %Copy.lookup_impl_witness.2e6: <witness> = lookup_impl_witness %ptr.e8f8f9.1, @Copy [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: %.de2: type = fn_type_with_self_type %A.WithSelf.F.type.12f, %A.facet [concrete]
  141. // CHECK:STDOUT: %ptr.2a0: type = ptr_type %Z [concrete]
  142. // CHECK:STDOUT: %pattern_type.771: type = pattern_type %ptr.2a0 [concrete]
  143. // CHECK:STDOUT: %tuple.84f: %tuple.type.ff9 = tuple_value (%X, %Y, %ptr.2a0) [concrete]
  144. // CHECK:STDOUT: %tuple.type.847: type = tuple_type (%X, %Y, %ptr.2a0) [concrete]
  145. // CHECK:STDOUT: %.88e: Core.Form = init_form %tuple.type.847 [concrete]
  146. // CHECK:STDOUT: %pattern_type.79c: type = pattern_type %tuple.type.847 [concrete]
  147. // 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]
  148. // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete]
  149. // CHECK:STDOUT: %Destroy.Op.type.bae255.1: type = fn_type @Destroy.Op.loc23 [concrete]
  150. // CHECK:STDOUT: %Destroy.Op.651ba6.1: %Destroy.Op.type.bae255.1 = struct_value () [concrete]
  151. // CHECK:STDOUT: %custom_witness.8d7fae.1: <witness> = custom_witness (%Destroy.Op.651ba6.1), @Destroy [concrete]
  152. // CHECK:STDOUT: %Destroy.facet.bba: %Destroy.type = facet_value %tuple.type.847, (%custom_witness.8d7fae.1) [concrete]
  153. // CHECK:STDOUT: %Destroy.WithSelf.Op.type.770: type = fn_type @Destroy.WithSelf.Op, @Destroy.WithSelf(%Destroy.facet.bba) [concrete]
  154. // CHECK:STDOUT: %.f4b: type = fn_type_with_self_type %Destroy.WithSelf.Op.type.770, %Destroy.facet.bba [concrete]
  155. // CHECK:STDOUT: %Destroy.Op.type.bae255.2: type = fn_type @Destroy.Op.loc22 [concrete]
  156. // CHECK:STDOUT: %Destroy.Op.651ba6.2: %Destroy.Op.type.bae255.2 = struct_value () [concrete]
  157. // CHECK:STDOUT: %T.2bc: %A.type.ab6 = symbolic_binding T, 0 [symbolic]
  158. // CHECK:STDOUT: %pattern_type.143: type = pattern_type %A.type.ab6 [concrete]
  159. // CHECK:STDOUT: %CallGeneric.type: type = fn_type @CallGeneric [concrete]
  160. // CHECK:STDOUT: %CallGeneric: %CallGeneric.type = struct_value () [concrete]
  161. // CHECK:STDOUT: %A.WithSelf.F.type.f08: type = fn_type @A.WithSelf.F, @A.WithSelf(%X, %T.2bc) [symbolic]
  162. // CHECK:STDOUT: %A.WithSelf.F.7ad: %A.WithSelf.F.type.f08 = struct_value () [symbolic]
  163. // CHECK:STDOUT: %T.binding.as_type.3d0: type = symbolic_binding_type T, 0, %T.2bc [symbolic]
  164. // CHECK:STDOUT: %A.lookup_impl_witness: <witness> = lookup_impl_witness %T.2bc, @A, @A(%X) [symbolic]
  165. // CHECK:STDOUT: %.189: type = fn_type_with_self_type %A.WithSelf.F.type.f08, %T.2bc [symbolic]
  166. // CHECK:STDOUT: %impl.elem0.86f8: %.189 = impl_witness_access %A.lookup_impl_witness, element0 [symbolic]
  167. // CHECK:STDOUT: %tuple.d24: %tuple.type.f96 = tuple_value (%X, %T.2bc, %ptr.2a0) [symbolic]
  168. // CHECK:STDOUT: %tuple.type.a50: type = tuple_type (%X, %T.binding.as_type.3d0, %ptr.2a0) [symbolic]
  169. // CHECK:STDOUT: %.69c: Core.Form = init_form %tuple.type.a50 [symbolic]
  170. // CHECK:STDOUT: %pattern_type.160: type = pattern_type %tuple.type.a50 [symbolic]
  171. // CHECK:STDOUT: %specific_impl_fn.44b: <specific function> = specific_impl_function %impl.elem0.86f8, @A.WithSelf.F(%X, %T.2bc, %Z) [symbolic]
  172. // CHECK:STDOUT: %require_complete.8fa: <witness> = require_complete_type %tuple.type.a50 [symbolic]
  173. // CHECK:STDOUT: %Destroy.lookup_impl_witness: <witness> = lookup_impl_witness %tuple.type.a50, @Destroy [symbolic]
  174. // CHECK:STDOUT: %Destroy.facet.df5: %Destroy.type = facet_value %tuple.type.a50, (%Destroy.lookup_impl_witness) [symbolic]
  175. // CHECK:STDOUT: %Destroy.WithSelf.Op.type.707: type = fn_type @Destroy.WithSelf.Op, @Destroy.WithSelf(%Destroy.facet.df5) [symbolic]
  176. // CHECK:STDOUT: %.11e: type = fn_type_with_self_type %Destroy.WithSelf.Op.type.707, %Destroy.facet.df5 [symbolic]
  177. // CHECK:STDOUT: %impl.elem0.853: %.11e = impl_witness_access %Destroy.lookup_impl_witness, element0 [symbolic]
  178. // CHECK:STDOUT: %specific_impl_fn.8a5: <specific function> = specific_impl_function %impl.elem0.853, @Destroy.WithSelf.Op(%Destroy.facet.df5) [symbolic]
  179. // CHECK:STDOUT: %CallIndirect.type: type = fn_type @CallIndirect [concrete]
  180. // CHECK:STDOUT: %CallIndirect: %CallIndirect.type = struct_value () [concrete]
  181. // CHECK:STDOUT: %CallGeneric.specific_fn: <specific function> = specific_function %CallGeneric, @CallGeneric(%A.facet) [concrete]
  182. // CHECK:STDOUT: %complete_type.543: <witness> = complete_type_witness %ptr.2a0 [concrete]
  183. // CHECK:STDOUT: %complete_type.28e: <witness> = complete_type_witness %tuple.type.847 [concrete]
  184. // CHECK:STDOUT: %tuple.type.0dd: type = tuple_type (%empty_struct_type, %empty_struct_type, %ptr.2a0) [concrete]
  185. // CHECK:STDOUT: %Copy.impl_witness.425: <witness> = impl_witness imports.%Copy.impl_witness_table.c3a, @ptr.as.Copy.impl(%Z) [concrete]
  186. // CHECK:STDOUT: %ptr.as.Copy.impl.Op.type.505: type = fn_type @ptr.as.Copy.impl.Op, @ptr.as.Copy.impl(%Z) [concrete]
  187. // CHECK:STDOUT: %ptr.as.Copy.impl.Op.7d1: %ptr.as.Copy.impl.Op.type.505 = struct_value () [concrete]
  188. // CHECK:STDOUT: %.157: require_specific_def_type = require_specific_def @ptr.as.Copy.impl(%Z) [concrete]
  189. // CHECK:STDOUT: %Copy.facet.26e: %Copy.type = facet_value %ptr.2a0, (%Copy.impl_witness.425) [concrete]
  190. // CHECK:STDOUT: %Copy.WithSelf.Op.type.a8b: type = fn_type @Copy.WithSelf.Op, @Copy.WithSelf(%Copy.facet.26e) [concrete]
  191. // CHECK:STDOUT: %.2ef: type = fn_type_with_self_type %Copy.WithSelf.Op.type.a8b, %Copy.facet.26e [concrete]
  192. // 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]
  193. // CHECK:STDOUT: %tuple.6cd: %tuple.type.f96 = tuple_value (%X, %A.facet, %ptr.2a0) [concrete]
  194. // CHECK:STDOUT: }
  195. // CHECK:STDOUT:
  196. // CHECK:STDOUT: imports {
  197. // CHECK:STDOUT: %Core: <namespace> = namespace file.%Core.import, [concrete] {
  198. // CHECK:STDOUT: .Copy = %Core.Copy
  199. // CHECK:STDOUT: .Destroy = %Core.Destroy
  200. // CHECK:STDOUT: import Core//prelude
  201. // CHECK:STDOUT: import Core//prelude/...
  202. // CHECK:STDOUT: }
  203. // CHECK:STDOUT: %Core.Copy: type = import_ref Core//prelude/parts/copy, Copy, loaded [concrete = constants.%Copy.type]
  204. // 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)]
  205. // CHECK:STDOUT: %Copy.impl_witness_table.c3a = impl_witness_table (%Core.import_ref.203), @ptr.as.Copy.impl [concrete]
  206. // CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type]
  207. // CHECK:STDOUT: }
  208. // CHECK:STDOUT:
  209. // CHECK:STDOUT: file {
  210. // CHECK:STDOUT: package: <namespace> = namespace [concrete] {
  211. // CHECK:STDOUT: .Core = imports.%Core
  212. // CHECK:STDOUT: .A = %A.decl
  213. // CHECK:STDOUT: .X = %X.decl
  214. // CHECK:STDOUT: .Y = %Y.decl
  215. // CHECK:STDOUT: .Z = %Z.decl
  216. // CHECK:STDOUT: .Call = %Call.decl
  217. // CHECK:STDOUT: .CallGeneric = %CallGeneric.decl
  218. // CHECK:STDOUT: .CallIndirect = %CallIndirect.decl
  219. // CHECK:STDOUT: }
  220. // CHECK:STDOUT: %Core.import = import Core
  221. // CHECK:STDOUT: %A.decl: %A.type.464 = interface_decl @A [concrete = constants.%A.generic] {
  222. // CHECK:STDOUT: %T.patt: %pattern_type.98f = symbolic_binding_pattern T, 0 [concrete]
  223. // CHECK:STDOUT: } {
  224. // CHECK:STDOUT: %.loc5_17.1: type = splice_block %.loc5_17.2 [concrete = type] {
  225. // CHECK:STDOUT: %.Self: %type = symbolic_binding .Self [symbolic_self = constants.%.Self]
  226. // CHECK:STDOUT: %.loc5_17.2: type = type_literal type [concrete = type]
  227. // CHECK:STDOUT: }
  228. // CHECK:STDOUT: %T.loc5_13.2: type = symbolic_binding T, 0 [symbolic = %T.loc5_13.1 (constants.%T.67d)]
  229. // CHECK:STDOUT: }
  230. // CHECK:STDOUT: %X.decl: type = class_decl @X [concrete = constants.%X] {} {}
  231. // CHECK:STDOUT: %Y.decl: type = class_decl @Y [concrete = constants.%Y] {} {}
  232. // CHECK:STDOUT: %Z.decl: type = class_decl @Z [concrete = constants.%Z] {} {}
  233. // CHECK:STDOUT: impl_decl @Y.as.A.impl [concrete] {} {
  234. // CHECK:STDOUT: %Y.ref: type = name_ref Y, file.%Y.decl [concrete = constants.%Y]
  235. // CHECK:STDOUT: %A.ref: %A.type.464 = name_ref A, file.%A.decl [concrete = constants.%A.generic]
  236. // CHECK:STDOUT: %X.ref: type = name_ref X, file.%X.decl [concrete = constants.%X]
  237. // CHECK:STDOUT: %A.type: type = facet_type <@A, @A(constants.%X)> [concrete = constants.%A.type.ab6]
  238. // CHECK:STDOUT: }
  239. // CHECK:STDOUT: %Call.decl: %Call.type = fn_decl @Call [concrete = constants.%Call] {} {}
  240. // CHECK:STDOUT: %CallGeneric.decl: %CallGeneric.type = fn_decl @CallGeneric [concrete = constants.%CallGeneric] {
  241. // CHECK:STDOUT: %T.patt: %pattern_type.143 = symbolic_binding_pattern T, 0 [concrete]
  242. // CHECK:STDOUT: } {
  243. // CHECK:STDOUT: %.loc26: type = splice_block %A.type [concrete = constants.%A.type.ab6] {
  244. // CHECK:STDOUT: %.Self: %type = symbolic_binding .Self [symbolic_self = constants.%.Self]
  245. // CHECK:STDOUT: %A.ref: %A.type.464 = name_ref A, file.%A.decl [concrete = constants.%A.generic]
  246. // CHECK:STDOUT: %X.ref: type = name_ref X, file.%X.decl [concrete = constants.%X]
  247. // CHECK:STDOUT: %A.type: type = facet_type <@A, @A(constants.%X)> [concrete = constants.%A.type.ab6]
  248. // CHECK:STDOUT: }
  249. // CHECK:STDOUT: %T.loc26_16.2: %A.type.ab6 = symbolic_binding T, 0 [symbolic = %T.loc26_16.1 (constants.%T.2bc)]
  250. // CHECK:STDOUT: }
  251. // CHECK:STDOUT: %CallIndirect.decl: %CallIndirect.type = fn_decl @CallIndirect [concrete = constants.%CallIndirect] {} {}
  252. // CHECK:STDOUT: }
  253. // CHECK:STDOUT:
  254. // CHECK:STDOUT: generic interface @A(%T.loc5_13.2: type) {
  255. // CHECK:STDOUT: %T.loc5_13.1: type = symbolic_binding T, 0 [symbolic = %T.loc5_13.1 (constants.%T.67d)]
  256. // CHECK:STDOUT:
  257. // CHECK:STDOUT: !definition:
  258. // CHECK:STDOUT: %A.type: type = facet_type <@A, @A(%T.loc5_13.1)> [symbolic = %A.type (constants.%A.type.ade)]
  259. // CHECK:STDOUT: %Self.loc5_23.2: @A.%A.type (%A.type.ade) = symbolic_binding Self, 1 [symbolic = %Self.loc5_23.2 (constants.%Self.362)]
  260. // CHECK:STDOUT:
  261. // CHECK:STDOUT: interface {
  262. // CHECK:STDOUT: %Self.loc5_23.1: @A.%A.type (%A.type.ade) = symbolic_binding Self, 1 [symbolic = %Self.loc5_23.2 (constants.%Self.362)]
  263. // CHECK:STDOUT: %A.WithSelf.decl = interface_with_self_decl @A [concrete]
  264. // CHECK:STDOUT:
  265. // CHECK:STDOUT: !with Self:
  266. // 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)] {
  267. // CHECK:STDOUT: %U.patt: %pattern_type.98f = symbolic_binding_pattern U, 2 [concrete]
  268. // CHECK:STDOUT: %u.patt: @A.WithSelf.F.%pattern_type.loc6_18 (%pattern_type.986) = value_binding_pattern u [concrete]
  269. // CHECK:STDOUT: %u.param_patt: @A.WithSelf.F.%pattern_type.loc6_18 (%pattern_type.986) = value_param_pattern %u.patt [concrete]
  270. // CHECK:STDOUT: %return.patt: @A.WithSelf.F.%pattern_type.loc6_25 (%pattern_type.f66) = return_slot_pattern [concrete]
  271. // CHECK:STDOUT: %return.param_patt: @A.WithSelf.F.%pattern_type.loc6_25 (%pattern_type.f66) = out_param_pattern %return.patt [concrete]
  272. // CHECK:STDOUT: } {
  273. // CHECK:STDOUT: %T.ref: type = name_ref T, @A.%T.loc5_13.2 [symbolic = %T (constants.%T.67d)]
  274. // 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)]
  275. // CHECK:STDOUT: %Self.ref: @A.WithSelf.F.%A.type (%A.type.ade) = name_ref Self, %.loc6_32 [symbolic = %Self (constants.%Self.362)]
  276. // CHECK:STDOUT: %U.ref.loc6_38: type = name_ref U, %U.loc6_8.2 [symbolic = %U.loc6_8.1 (constants.%U.4e7)]
  277. // CHECK:STDOUT: %ptr.loc6_39: type = ptr_type %U.ref.loc6_38 [symbolic = %ptr.loc6_22.1 (constants.%ptr.8f6)]
  278. // 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)]
  279. // CHECK:STDOUT: %Self.as_type: type = facet_access_type constants.%Self.362 [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type.7ec)]
  280. // CHECK:STDOUT: %.loc6_40.3: type = converted constants.%Self.362, %Self.as_type [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type.7ec)]
  281. // CHECK:STDOUT: %.loc6_40.4: type = converted %.loc6_40.2, constants.%tuple.type.762 [symbolic = %tuple.type.loc6_40.2 (constants.%tuple.type.762)]
  282. // CHECK:STDOUT: %.loc6_40.5: Core.Form = init_form %.loc6_40.4 [symbolic = %.loc6_40.1 (constants.%.54f)]
  283. // CHECK:STDOUT: %.loc6_12.1: type = splice_block %.loc6_12.2 [concrete = type] {
  284. // CHECK:STDOUT: %.Self: %type = symbolic_binding .Self [symbolic_self = constants.%.Self]
  285. // CHECK:STDOUT: %.loc6_12.2: type = type_literal type [concrete = type]
  286. // CHECK:STDOUT: }
  287. // CHECK:STDOUT: %U.loc6_8.2: type = symbolic_binding U, 2 [symbolic = %U.loc6_8.1 (constants.%U.4e7)]
  288. // CHECK:STDOUT: %u.param: @A.WithSelf.F.%ptr.loc6_22.1 (%ptr.8f6) = value_param call_param0
  289. // CHECK:STDOUT: %.loc6_22: type = splice_block %ptr.loc6_22.2 [symbolic = %ptr.loc6_22.1 (constants.%ptr.8f6)] {
  290. // CHECK:STDOUT: %U.ref.loc6_21: type = name_ref U, %U.loc6_8.2 [symbolic = %U.loc6_8.1 (constants.%U.4e7)]
  291. // CHECK:STDOUT: %ptr.loc6_22.2: type = ptr_type %U.ref.loc6_21 [symbolic = %ptr.loc6_22.1 (constants.%ptr.8f6)]
  292. // CHECK:STDOUT: }
  293. // CHECK:STDOUT: %u: @A.WithSelf.F.%ptr.loc6_22.1 (%ptr.8f6) = value_binding u, %u.param
  294. // CHECK:STDOUT: %return.param: ref @A.WithSelf.F.%tuple.type.loc6_40.2 (%tuple.type.762) = out_param call_param1
  295. // CHECK:STDOUT: %return: ref @A.WithSelf.F.%tuple.type.loc6_40.2 (%tuple.type.762) = return_slot %return.param
  296. // CHECK:STDOUT: }
  297. // 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)]
  298. // CHECK:STDOUT:
  299. // CHECK:STDOUT: !members:
  300. // CHECK:STDOUT: .Self = %Self.loc5_23.1
  301. // CHECK:STDOUT: .T = <poisoned>
  302. // CHECK:STDOUT: .T = <poisoned>
  303. // CHECK:STDOUT: .F = @A.WithSelf.%assoc0.loc6_41.1
  304. // CHECK:STDOUT: witness = (@A.WithSelf.%A.WithSelf.F.decl)
  305. // CHECK:STDOUT:
  306. // CHECK:STDOUT: !requires:
  307. // CHECK:STDOUT: }
  308. // CHECK:STDOUT: }
  309. // CHECK:STDOUT:
  310. // CHECK:STDOUT: impl @Y.as.A.impl: %Y.ref as %A.type {
  311. // 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] {
  312. // CHECK:STDOUT: %U.patt: %pattern_type.98f = symbolic_binding_pattern U, 0 [concrete]
  313. // CHECK:STDOUT: %u.patt: @Y.as.A.impl.F.%pattern_type.loc16_18 (%pattern_type.4f4b84.1) = value_binding_pattern u [concrete]
  314. // CHECK:STDOUT: %u.param_patt: @Y.as.A.impl.F.%pattern_type.loc16_18 (%pattern_type.4f4b84.1) = value_param_pattern %u.patt [concrete]
  315. // CHECK:STDOUT: %return.patt: @Y.as.A.impl.F.%pattern_type.loc16_25 (%pattern_type.06d) = return_slot_pattern [concrete]
  316. // CHECK:STDOUT: %return.param_patt: @Y.as.A.impl.F.%pattern_type.loc16_25 (%pattern_type.06d) = out_param_pattern %return.patt [concrete]
  317. // CHECK:STDOUT: } {
  318. // CHECK:STDOUT: %X.ref: type = name_ref X, file.%X.decl [concrete = constants.%X]
  319. // CHECK:STDOUT: %Y.ref: type = name_ref Y, file.%Y.decl [concrete = constants.%Y]
  320. // CHECK:STDOUT: %U.ref.loc16_35: type = name_ref U, %U.loc16_8.2 [symbolic = %U.loc16_8.1 (constants.%U.67d)]
  321. // CHECK:STDOUT: %ptr.loc16_36: type = ptr_type %U.ref.loc16_35 [symbolic = %ptr.loc16_22.1 (constants.%ptr.e8f8f9.1)]
  322. // CHECK:STDOUT: %.loc16_37.2: %tuple.type.ff9 = tuple_literal (%X.ref, %Y.ref, %ptr.loc16_36) [symbolic = %tuple (constants.%tuple.7ab)]
  323. // CHECK:STDOUT: %.loc16_37.3: type = converted %.loc16_37.2, constants.%tuple.type.244 [symbolic = %tuple.type.loc16 (constants.%tuple.type.244)]
  324. // CHECK:STDOUT: %.loc16_37.4: Core.Form = init_form %.loc16_37.3 [symbolic = %.loc16_37.1 (constants.%.0dc)]
  325. // CHECK:STDOUT: %.loc16_12.1: type = splice_block %.loc16_12.2 [concrete = type] {
  326. // CHECK:STDOUT: %.Self: %type = symbolic_binding .Self [symbolic_self = constants.%.Self]
  327. // CHECK:STDOUT: %.loc16_12.2: type = type_literal type [concrete = type]
  328. // CHECK:STDOUT: }
  329. // CHECK:STDOUT: %U.loc16_8.2: type = symbolic_binding U, 0 [symbolic = %U.loc16_8.1 (constants.%U.67d)]
  330. // CHECK:STDOUT: %u.param: @Y.as.A.impl.F.%ptr.loc16_22.1 (%ptr.e8f8f9.1) = value_param call_param0
  331. // CHECK:STDOUT: %.loc16_22: type = splice_block %ptr.loc16_22.2 [symbolic = %ptr.loc16_22.1 (constants.%ptr.e8f8f9.1)] {
  332. // CHECK:STDOUT: %U.ref.loc16_21: type = name_ref U, %U.loc16_8.2 [symbolic = %U.loc16_8.1 (constants.%U.67d)]
  333. // CHECK:STDOUT: %ptr.loc16_22.2: type = ptr_type %U.ref.loc16_21 [symbolic = %ptr.loc16_22.1 (constants.%ptr.e8f8f9.1)]
  334. // CHECK:STDOUT: }
  335. // CHECK:STDOUT: %u: @Y.as.A.impl.F.%ptr.loc16_22.1 (%ptr.e8f8f9.1) = value_binding u, %u.param
  336. // CHECK:STDOUT: %return.param: ref @Y.as.A.impl.F.%tuple.type.loc16 (%tuple.type.244) = out_param call_param1
  337. // CHECK:STDOUT: %return: ref @Y.as.A.impl.F.%tuple.type.loc16 (%tuple.type.244) = return_slot %return.param
  338. // CHECK:STDOUT: }
  339. // CHECK:STDOUT: %A.impl_witness_table = impl_witness_table (%Y.as.A.impl.F.decl), @Y.as.A.impl [concrete]
  340. // CHECK:STDOUT: %A.impl_witness: <witness> = impl_witness %A.impl_witness_table [concrete = constants.%A.impl_witness]
  341. // CHECK:STDOUT:
  342. // CHECK:STDOUT: !members:
  343. // CHECK:STDOUT: .X = <poisoned>
  344. // CHECK:STDOUT: .Y = <poisoned>
  345. // CHECK:STDOUT: .F = %Y.as.A.impl.F.decl
  346. // CHECK:STDOUT: witness = %A.impl_witness
  347. // CHECK:STDOUT: }
  348. // CHECK:STDOUT:
  349. // CHECK:STDOUT: class @X {
  350. // CHECK:STDOUT: %complete_type: <witness> = complete_type_witness constants.%empty_struct_type [concrete = constants.%complete_type.357]
  351. // CHECK:STDOUT: complete_type_witness = %complete_type
  352. // CHECK:STDOUT:
  353. // CHECK:STDOUT: !members:
  354. // CHECK:STDOUT: .Self = constants.%X
  355. // CHECK:STDOUT: }
  356. // CHECK:STDOUT:
  357. // CHECK:STDOUT: class @Y {
  358. // CHECK:STDOUT: %complete_type: <witness> = complete_type_witness constants.%empty_struct_type [concrete = constants.%complete_type.357]
  359. // CHECK:STDOUT: complete_type_witness = %complete_type
  360. // CHECK:STDOUT:
  361. // CHECK:STDOUT: !members:
  362. // CHECK:STDOUT: .Self = constants.%Y
  363. // CHECK:STDOUT: }
  364. // CHECK:STDOUT:
  365. // CHECK:STDOUT: class @Z {
  366. // CHECK:STDOUT: %complete_type: <witness> = complete_type_witness constants.%empty_struct_type [concrete = constants.%complete_type.357]
  367. // CHECK:STDOUT: complete_type_witness = %complete_type
  368. // CHECK:STDOUT:
  369. // CHECK:STDOUT: !members:
  370. // CHECK:STDOUT: .Self = constants.%Z
  371. // CHECK:STDOUT: }
  372. // CHECK:STDOUT:
  373. // CHECK:STDOUT: generic fn @A.WithSelf.F(@A.%T.loc5_13.2: type, @A.%Self.loc5_23.1: @A.%A.type (%A.type.ade), %U.loc6_8.2: type) {
  374. // CHECK:STDOUT: %U.loc6_8.1: type = symbolic_binding U, 2 [symbolic = %U.loc6_8.1 (constants.%U.4e7)]
  375. // CHECK:STDOUT: %ptr.loc6_22.1: type = ptr_type %U.loc6_8.1 [symbolic = %ptr.loc6_22.1 (constants.%ptr.8f6)]
  376. // CHECK:STDOUT: %pattern_type.loc6_18: type = pattern_type %ptr.loc6_22.1 [symbolic = %pattern_type.loc6_18 (constants.%pattern_type.986)]
  377. // CHECK:STDOUT: %T: type = symbolic_binding T, 0 [symbolic = %T (constants.%T.67d)]
  378. // CHECK:STDOUT: %A.type: type = facet_type <@A, @A(%T)> [symbolic = %A.type (constants.%A.type.ade)]
  379. // CHECK:STDOUT: %Self: @A.WithSelf.F.%A.type (%A.type.ade) = symbolic_binding Self, 1 [symbolic = %Self (constants.%Self.362)]
  380. // CHECK:STDOUT: %tuple.type.loc6_40.1: type = tuple_type (type, %A.type, type) [symbolic = %tuple.type.loc6_40.1 (constants.%tuple.type.f2d)]
  381. // 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)]
  382. // CHECK:STDOUT: %Self.binding.as_type: type = symbolic_binding_type Self, 1, %Self [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type.7ec)]
  383. // 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)]
  384. // CHECK:STDOUT: %.loc6_40.1: Core.Form = init_form %tuple.type.loc6_40.2 [symbolic = %.loc6_40.1 (constants.%.54f)]
  385. // CHECK:STDOUT: %pattern_type.loc6_25: type = pattern_type %tuple.type.loc6_40.2 [symbolic = %pattern_type.loc6_25 (constants.%pattern_type.f66)]
  386. // CHECK:STDOUT:
  387. // 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);
  388. // CHECK:STDOUT: }
  389. // CHECK:STDOUT:
  390. // CHECK:STDOUT: generic fn @Y.as.A.impl.F(%U.loc16_8.2: type) {
  391. // CHECK:STDOUT: %U.loc16_8.1: type = symbolic_binding U, 0 [symbolic = %U.loc16_8.1 (constants.%U.67d)]
  392. // CHECK:STDOUT: %ptr.loc16_22.1: type = ptr_type %U.loc16_8.1 [symbolic = %ptr.loc16_22.1 (constants.%ptr.e8f8f9.1)]
  393. // CHECK:STDOUT: %pattern_type.loc16_18: type = pattern_type %ptr.loc16_22.1 [symbolic = %pattern_type.loc16_18 (constants.%pattern_type.4f4b84.1)]
  394. // CHECK:STDOUT: %tuple: %tuple.type.ff9 = tuple_value (constants.%X, constants.%Y, %ptr.loc16_22.1) [symbolic = %tuple (constants.%tuple.7ab)]
  395. // CHECK:STDOUT: %tuple.type.loc16: type = tuple_type (constants.%X, constants.%Y, %ptr.loc16_22.1) [symbolic = %tuple.type.loc16 (constants.%tuple.type.244)]
  396. // CHECK:STDOUT: %.loc16_37.1: Core.Form = init_form %tuple.type.loc16 [symbolic = %.loc16_37.1 (constants.%.0dc)]
  397. // CHECK:STDOUT: %pattern_type.loc16_25: type = pattern_type %tuple.type.loc16 [symbolic = %pattern_type.loc16_25 (constants.%pattern_type.06d)]
  398. // CHECK:STDOUT:
  399. // CHECK:STDOUT: !definition:
  400. // CHECK:STDOUT: %require_complete.loc16_19: <witness> = require_complete_type %ptr.loc16_22.1 [symbolic = %require_complete.loc16_19 (constants.%require_complete.ef162c.1)]
  401. // CHECK:STDOUT: %require_complete.loc16_37: <witness> = require_complete_type %tuple.type.loc16 [symbolic = %require_complete.loc16_37 (constants.%require_complete.034)]
  402. // 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)]
  403. // CHECK:STDOUT: %.loc17_21.1: require_specific_def_type = require_specific_def @ptr.as.Copy.impl(%U.loc16_8.1) [symbolic = %.loc17_21.1 (constants.%.2f2)]
  404. // 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)]
  405. // CHECK:STDOUT: %Copy.facet: %Copy.type = facet_value %ptr.loc16_22.1, (%Copy.lookup_impl_witness) [symbolic = %Copy.facet (constants.%Copy.facet.c25)]
  406. // 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)]
  407. // CHECK:STDOUT: %.loc17_21.2: type = fn_type_with_self_type %Copy.WithSelf.Op.type, %Copy.facet [symbolic = %.loc17_21.2 (constants.%.299)]
  408. // 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)]
  409. // 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)]
  410. // CHECK:STDOUT:
  411. // 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) {
  412. // CHECK:STDOUT: !entry:
  413. // CHECK:STDOUT: %.loc17_14.1: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct]
  414. // CHECK:STDOUT: %.loc17_18.1: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct]
  415. // CHECK:STDOUT: %u.ref: @Y.as.A.impl.F.%ptr.loc16_22.1 (%ptr.e8f8f9.1) = name_ref u, %u
  416. // 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)
  417. // CHECK:STDOUT: %tuple.elem0: ref %X = tuple_access %return.param, element0
  418. // CHECK:STDOUT: %.loc17_14.2: init %X to %tuple.elem0 = class_init () [concrete = constants.%X.val]
  419. // CHECK:STDOUT: %.loc17_22.2: init %X = converted %.loc17_14.1, %.loc17_14.2 [concrete = constants.%X.val]
  420. // CHECK:STDOUT: %tuple.elem1: ref %Y = tuple_access %return.param, element1
  421. // CHECK:STDOUT: %.loc17_18.2: init %Y to %tuple.elem1 = class_init () [concrete = constants.%Y.val]
  422. // CHECK:STDOUT: %.loc17_22.3: init %Y = converted %.loc17_18.1, %.loc17_18.2 [concrete = constants.%Y.val]
  423. // 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)]
  424. // CHECK:STDOUT: %bound_method.loc17_21.1: <bound method> = bound_method %u.ref, %impl.elem0.loc17_21.1
  425. // 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)]
  426. // CHECK:STDOUT: %bound_method.loc17_21.2: <bound method> = bound_method %u.ref, %specific_impl_fn.loc17_21.1
  427. // 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)
  428. // CHECK:STDOUT: %tuple.elem2: ref @Y.as.A.impl.F.%ptr.loc16_22.1 (%ptr.e8f8f9.1) = tuple_access %return.param, element2
  429. // 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
  430. // 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)
  431. // CHECK:STDOUT: %.loc17_23: init @Y.as.A.impl.F.%tuple.type.loc16 (%tuple.type.244) = converted %.loc17_22.1, %.loc17_22.5
  432. // CHECK:STDOUT: return %.loc17_23 to %return.param
  433. // CHECK:STDOUT: }
  434. // CHECK:STDOUT: }
  435. // CHECK:STDOUT:
  436. // CHECK:STDOUT: fn @Call() {
  437. // CHECK:STDOUT: !entry:
  438. // CHECK:STDOUT: name_binding_decl {
  439. // CHECK:STDOUT: %u.patt: %pattern_type.bdb = ref_binding_pattern u [concrete]
  440. // CHECK:STDOUT: %u.var_patt: %pattern_type.bdb = var_pattern %u.patt [concrete]
  441. // CHECK:STDOUT: }
  442. // CHECK:STDOUT: %u.var: ref %Z = var %u.var_patt
  443. // CHECK:STDOUT: %Z.ref.loc22: type = name_ref Z, file.%Z.decl [concrete = constants.%Z]
  444. // CHECK:STDOUT: %u: ref %Z = ref_binding u, %u.var
  445. // CHECK:STDOUT: %Y.ref: type = name_ref Y, file.%Y.decl [concrete = constants.%Y]
  446. // CHECK:STDOUT: %A.ref: %A.type.464 = name_ref A, file.%A.decl [concrete = constants.%A.generic]
  447. // CHECK:STDOUT: %X.ref: type = name_ref X, file.%X.decl [concrete = constants.%X]
  448. // CHECK:STDOUT: %A.type: type = facet_type <@A, @A(constants.%X)> [concrete = constants.%A.type.ab6]
  449. // CHECK:STDOUT: %A.facet: %A.type.ab6 = facet_value %Y.ref, (constants.%A.impl_witness) [concrete = constants.%A.facet]
  450. // CHECK:STDOUT: %.loc23_6: %A.type.ab6 = converted %Y.ref, %A.facet [concrete = constants.%A.facet]
  451. // CHECK:STDOUT: %as_type: type = facet_access_type %.loc23_6 [concrete = constants.%Y]
  452. // CHECK:STDOUT: %.loc23_14.1: type = converted %.loc23_6, %as_type [concrete = constants.%Y]
  453. // CHECK:STDOUT: %.loc23_14.2: %A.assoc_type.f05 = specific_constant @A.WithSelf.%assoc0.loc6_41.1, @A.WithSelf(constants.%X, constants.%A.facet) [concrete = constants.%assoc0.368]
  454. // CHECK:STDOUT: %F.ref: %A.assoc_type.f05 = name_ref F, %.loc23_14.2 [concrete = constants.%assoc0.368]
  455. // CHECK:STDOUT: %impl.elem0: %.de2 = impl_witness_access constants.%A.impl_witness, element0 [concrete = constants.%Y.as.A.impl.F]
  456. // CHECK:STDOUT: %Z.ref.loc23: type = name_ref Z, file.%Z.decl [concrete = constants.%Z]
  457. // CHECK:STDOUT: %u.ref: ref %Z = name_ref u, %u
  458. // CHECK:STDOUT: %addr: %ptr.2a0 = addr_of %u.ref
  459. // 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]
  460. // CHECK:STDOUT: %.loc23_22.1: ref %tuple.type.847 = temporary_storage
  461. // CHECK:STDOUT: %Y.as.A.impl.F.call: init %tuple.type.847 to %.loc23_22.1 = call %specific_fn(%addr)
  462. // CHECK:STDOUT: %.loc23_22.2: ref %tuple.type.847 = temporary %.loc23_22.1, %Y.as.A.impl.F.call
  463. // CHECK:STDOUT: %Destroy.Op.bound.loc23: <bound method> = bound_method %.loc23_22.2, constants.%Destroy.Op.651ba6.1
  464. // CHECK:STDOUT: %Destroy.Op.call.loc23: init %empty_tuple.type = call %Destroy.Op.bound.loc23(%.loc23_22.2)
  465. // CHECK:STDOUT: %Destroy.Op.bound.loc22: <bound method> = bound_method %u.var, constants.%Destroy.Op.651ba6.2
  466. // CHECK:STDOUT: %Destroy.Op.call.loc22: init %empty_tuple.type = call %Destroy.Op.bound.loc22(%u.var)
  467. // CHECK:STDOUT: return
  468. // CHECK:STDOUT: }
  469. // CHECK:STDOUT:
  470. // CHECK:STDOUT: fn @Destroy.Op.loc23(%self.param: ref %tuple.type.847) = "no_op";
  471. // CHECK:STDOUT:
  472. // CHECK:STDOUT: fn @Destroy.Op.loc22(%self.param: ref %Z) = "no_op";
  473. // CHECK:STDOUT:
  474. // CHECK:STDOUT: generic fn @CallGeneric(%T.loc26_16.2: %A.type.ab6) {
  475. // CHECK:STDOUT: %T.loc26_16.1: %A.type.ab6 = symbolic_binding T, 0 [symbolic = %T.loc26_16.1 (constants.%T.2bc)]
  476. // CHECK:STDOUT:
  477. // CHECK:STDOUT: !definition:
  478. // CHECK:STDOUT: %T.binding.as_type: type = symbolic_binding_type T, 0, %T.loc26_16.1 [symbolic = %T.binding.as_type (constants.%T.binding.as_type.3d0)]
  479. // CHECK:STDOUT: %A.lookup_impl_witness: <witness> = lookup_impl_witness %T.loc26_16.1, @A, @A(constants.%X) [symbolic = %A.lookup_impl_witness (constants.%A.lookup_impl_witness)]
  480. // CHECK:STDOUT: %A.WithSelf.F.type: type = fn_type @A.WithSelf.F, @A.WithSelf(constants.%X, %T.loc26_16.1) [symbolic = %A.WithSelf.F.type (constants.%A.WithSelf.F.type.f08)]
  481. // CHECK:STDOUT: %.loc28_4.3: type = fn_type_with_self_type %A.WithSelf.F.type, %T.loc26_16.1 [symbolic = %.loc28_4.3 (constants.%.189)]
  482. // CHECK:STDOUT: %impl.elem0.loc28_4.2: @CallGeneric.%.loc28_4.3 (%.189) = impl_witness_access %A.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc28_4.2 (constants.%impl.elem0.86f8)]
  483. // CHECK:STDOUT: %specific_impl_fn.loc28_4.2: <specific function> = specific_impl_function %impl.elem0.loc28_4.2, @A.WithSelf.F(constants.%X, %T.loc26_16.1, constants.%Z) [symbolic = %specific_impl_fn.loc28_4.2 (constants.%specific_impl_fn.44b)]
  484. // CHECK:STDOUT: %tuple.type: type = tuple_type (constants.%X, %T.binding.as_type, constants.%ptr.2a0) [symbolic = %tuple.type (constants.%tuple.type.a50)]
  485. // CHECK:STDOUT: %require_complete: <witness> = require_complete_type %tuple.type [symbolic = %require_complete (constants.%require_complete.8fa)]
  486. // CHECK:STDOUT: %Destroy.lookup_impl_witness: <witness> = lookup_impl_witness %tuple.type, @Destroy [symbolic = %Destroy.lookup_impl_witness (constants.%Destroy.lookup_impl_witness)]
  487. // CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %tuple.type, (%Destroy.lookup_impl_witness) [symbolic = %Destroy.facet (constants.%Destroy.facet.df5)]
  488. // 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.707)]
  489. // CHECK:STDOUT: %.loc28_12.3: type = fn_type_with_self_type %Destroy.WithSelf.Op.type, %Destroy.facet [symbolic = %.loc28_12.3 (constants.%.11e)]
  490. // CHECK:STDOUT: %impl.elem0.loc28_12.2: @CallGeneric.%.loc28_12.3 (%.11e) = impl_witness_access %Destroy.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc28_12.2 (constants.%impl.elem0.853)]
  491. // 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.8a5)]
  492. // CHECK:STDOUT:
  493. // CHECK:STDOUT: fn() {
  494. // CHECK:STDOUT: !entry:
  495. // CHECK:STDOUT: name_binding_decl {
  496. // CHECK:STDOUT: %u.patt: %pattern_type.bdb = ref_binding_pattern u [concrete]
  497. // CHECK:STDOUT: %u.var_patt: %pattern_type.bdb = var_pattern %u.patt [concrete]
  498. // CHECK:STDOUT: }
  499. // CHECK:STDOUT: %u.var: ref %Z = var %u.var_patt
  500. // CHECK:STDOUT: %Z.ref.loc27: type = name_ref Z, file.%Z.decl [concrete = constants.%Z]
  501. // CHECK:STDOUT: %u: ref %Z = ref_binding u, %u.var
  502. // CHECK:STDOUT: %T.ref: %A.type.ab6 = name_ref T, %T.loc26_16.2 [symbolic = %T.loc26_16.1 (constants.%T.2bc)]
  503. // CHECK:STDOUT: %T.as_type: type = facet_access_type %T.ref [symbolic = %T.binding.as_type (constants.%T.binding.as_type.3d0)]
  504. // CHECK:STDOUT: %.loc28_4.1: type = converted %T.ref, %T.as_type [symbolic = %T.binding.as_type (constants.%T.binding.as_type.3d0)]
  505. // CHECK:STDOUT: %.loc28_4.2: %A.assoc_type.f05 = specific_constant @A.WithSelf.%assoc0.loc6_41.1, @A.WithSelf(constants.%X, constants.%T.2bc) [concrete = constants.%assoc0.368]
  506. // CHECK:STDOUT: %F.ref: %A.assoc_type.f05 = name_ref F, %.loc28_4.2 [concrete = constants.%assoc0.368]
  507. // CHECK:STDOUT: %impl.elem0.loc28_4.1: @CallGeneric.%.loc28_4.3 (%.189) = impl_witness_access constants.%A.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc28_4.2 (constants.%impl.elem0.86f8)]
  508. // CHECK:STDOUT: %Z.ref.loc28: type = name_ref Z, file.%Z.decl [concrete = constants.%Z]
  509. // CHECK:STDOUT: %u.ref: ref %Z = name_ref u, %u
  510. // CHECK:STDOUT: %addr: %ptr.2a0 = addr_of %u.ref
  511. // CHECK:STDOUT: %specific_impl_fn.loc28_4.1: <specific function> = specific_impl_function %impl.elem0.loc28_4.1, @A.WithSelf.F(constants.%X, constants.%T.2bc, constants.%Z) [symbolic = %specific_impl_fn.loc28_4.2 (constants.%specific_impl_fn.44b)]
  512. // CHECK:STDOUT: %.loc28_12.1: ref @CallGeneric.%tuple.type (%tuple.type.a50) = temporary_storage
  513. // CHECK:STDOUT: %A.WithSelf.F.call: init @CallGeneric.%tuple.type (%tuple.type.a50) to %.loc28_12.1 = call %specific_impl_fn.loc28_4.1(%addr)
  514. // CHECK:STDOUT: %.loc28_12.2: ref @CallGeneric.%tuple.type (%tuple.type.a50) = temporary %.loc28_12.1, %A.WithSelf.F.call
  515. // CHECK:STDOUT: %impl.elem0.loc28_12.1: @CallGeneric.%.loc28_12.3 (%.11e) = impl_witness_access constants.%Destroy.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc28_12.2 (constants.%impl.elem0.853)]
  516. // CHECK:STDOUT: %bound_method.loc28_12.1: <bound method> = bound_method %.loc28_12.2, %impl.elem0.loc28_12.1
  517. // CHECK:STDOUT: %specific_impl_fn.loc28_12.1: <specific function> = specific_impl_function %impl.elem0.loc28_12.1, @Destroy.WithSelf.Op(constants.%Destroy.facet.df5) [symbolic = %specific_impl_fn.loc28_12.2 (constants.%specific_impl_fn.8a5)]
  518. // CHECK:STDOUT: %bound_method.loc28_12.2: <bound method> = bound_method %.loc28_12.2, %specific_impl_fn.loc28_12.1
  519. // CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call %bound_method.loc28_12.2(%.loc28_12.2)
  520. // CHECK:STDOUT: %Destroy.Op.bound: <bound method> = bound_method %u.var, constants.%Destroy.Op.651ba6.2
  521. // CHECK:STDOUT: %Destroy.Op.call: init %empty_tuple.type = call %Destroy.Op.bound(%u.var)
  522. // CHECK:STDOUT: return
  523. // CHECK:STDOUT: }
  524. // CHECK:STDOUT: }
  525. // CHECK:STDOUT:
  526. // CHECK:STDOUT: fn @CallIndirect() {
  527. // CHECK:STDOUT: !entry:
  528. // CHECK:STDOUT: %CallGeneric.ref: %CallGeneric.type = name_ref CallGeneric, file.%CallGeneric.decl [concrete = constants.%CallGeneric]
  529. // CHECK:STDOUT: %Y.ref: type = name_ref Y, file.%Y.decl [concrete = constants.%Y]
  530. // CHECK:STDOUT: %A.facet: %A.type.ab6 = facet_value %Y.ref, (constants.%A.impl_witness) [concrete = constants.%A.facet]
  531. // CHECK:STDOUT: %.loc32: %A.type.ab6 = converted %Y.ref, %A.facet [concrete = constants.%A.facet]
  532. // CHECK:STDOUT: %CallGeneric.specific_fn: <specific function> = specific_function %CallGeneric.ref, @CallGeneric(constants.%A.facet) [concrete = constants.%CallGeneric.specific_fn]
  533. // CHECK:STDOUT: %CallGeneric.call: init %empty_tuple.type = call %CallGeneric.specific_fn()
  534. // CHECK:STDOUT: return
  535. // CHECK:STDOUT: }
  536. // CHECK:STDOUT:
  537. // CHECK:STDOUT: specific @A(constants.%T.67d) {
  538. // CHECK:STDOUT: %T.loc5_13.1 => constants.%T.67d
  539. // CHECK:STDOUT: }
  540. // CHECK:STDOUT:
  541. // CHECK:STDOUT: specific @A.WithSelf(constants.%T.67d, constants.%Self.362) {}
  542. // CHECK:STDOUT:
  543. // CHECK:STDOUT: specific @A.WithSelf.F(constants.%T.67d, constants.%Self.362, constants.%U.4e7) {
  544. // CHECK:STDOUT: %U.loc6_8.1 => constants.%U.4e7
  545. // CHECK:STDOUT: %ptr.loc6_22.1 => constants.%ptr.8f6
  546. // CHECK:STDOUT: %pattern_type.loc6_18 => constants.%pattern_type.986
  547. // CHECK:STDOUT: %T => constants.%T.67d
  548. // CHECK:STDOUT: %A.type => constants.%A.type.ade
  549. // CHECK:STDOUT: %Self => constants.%Self.362
  550. // CHECK:STDOUT: %tuple.type.loc6_40.1 => constants.%tuple.type.f2d
  551. // CHECK:STDOUT: %tuple => constants.%tuple.2c7
  552. // CHECK:STDOUT: %Self.binding.as_type => constants.%Self.binding.as_type.7ec
  553. // CHECK:STDOUT: %tuple.type.loc6_40.2 => constants.%tuple.type.762
  554. // CHECK:STDOUT: %.loc6_40.1 => constants.%.54f
  555. // CHECK:STDOUT: %pattern_type.loc6_25 => constants.%pattern_type.f66
  556. // CHECK:STDOUT: }
  557. // CHECK:STDOUT:
  558. // CHECK:STDOUT: specific @A(constants.%X) {
  559. // CHECK:STDOUT: %T.loc5_13.1 => constants.%X
  560. // CHECK:STDOUT:
  561. // CHECK:STDOUT: !definition:
  562. // CHECK:STDOUT: %A.type => constants.%A.type.ab6
  563. // CHECK:STDOUT: %Self.loc5_23.2 => constants.%Self.e87
  564. // CHECK:STDOUT: }
  565. // CHECK:STDOUT:
  566. // CHECK:STDOUT: specific @A.WithSelf(constants.%X, constants.%Self.362) {
  567. // CHECK:STDOUT: !definition:
  568. // CHECK:STDOUT: %T => constants.%X
  569. // CHECK:STDOUT: %A.type => constants.%A.type.ab6
  570. // CHECK:STDOUT: %Self => constants.%Self.362
  571. // CHECK:STDOUT: %A.WithSelf.F.type => constants.%A.WithSelf.F.type.ba2
  572. // CHECK:STDOUT: %A.WithSelf.F => constants.%A.WithSelf.F.e5f
  573. // CHECK:STDOUT: %A.assoc_type => constants.%A.assoc_type.f05
  574. // CHECK:STDOUT: %assoc0.loc6_41.2 => constants.%assoc0.368
  575. // CHECK:STDOUT: }
  576. // CHECK:STDOUT:
  577. // CHECK:STDOUT: specific @Y.as.A.impl.F(constants.%U.67d) {
  578. // CHECK:STDOUT: %U.loc16_8.1 => constants.%U.67d
  579. // CHECK:STDOUT: %ptr.loc16_22.1 => constants.%ptr.e8f8f9.1
  580. // CHECK:STDOUT: %pattern_type.loc16_18 => constants.%pattern_type.4f4b84.1
  581. // CHECK:STDOUT: %tuple => constants.%tuple.7ab
  582. // CHECK:STDOUT: %tuple.type.loc16 => constants.%tuple.type.244
  583. // CHECK:STDOUT: %.loc16_37.1 => constants.%.0dc
  584. // CHECK:STDOUT: %pattern_type.loc16_25 => constants.%pattern_type.06d
  585. // CHECK:STDOUT: }
  586. // CHECK:STDOUT:
  587. // CHECK:STDOUT: specific @A.WithSelf(constants.%X, constants.%A.facet) {
  588. // CHECK:STDOUT: !definition:
  589. // CHECK:STDOUT: %T => constants.%X
  590. // CHECK:STDOUT: %A.type => constants.%A.type.ab6
  591. // CHECK:STDOUT: %Self => constants.%A.facet
  592. // CHECK:STDOUT: %A.WithSelf.F.type => constants.%A.WithSelf.F.type.12f
  593. // CHECK:STDOUT: %A.WithSelf.F => constants.%A.WithSelf.F.48c
  594. // CHECK:STDOUT: %A.assoc_type => constants.%A.assoc_type.f05
  595. // CHECK:STDOUT: %assoc0.loc6_41.2 => constants.%assoc0.368
  596. // CHECK:STDOUT: }
  597. // CHECK:STDOUT:
  598. // CHECK:STDOUT: specific @A.WithSelf.F(constants.%X, constants.%A.facet, constants.%U.67d) {
  599. // CHECK:STDOUT: %U.loc6_8.1 => constants.%U.67d
  600. // CHECK:STDOUT: %ptr.loc6_22.1 => constants.%ptr.e8f8f9.1
  601. // CHECK:STDOUT: %pattern_type.loc6_18 => constants.%pattern_type.4f4b84.1
  602. // CHECK:STDOUT: %T => constants.%X
  603. // CHECK:STDOUT: %A.type => constants.%A.type.ab6
  604. // CHECK:STDOUT: %Self => constants.%A.facet
  605. // CHECK:STDOUT: %tuple.type.loc6_40.1 => constants.%tuple.type.f96
  606. // CHECK:STDOUT: %tuple => constants.%tuple.5c5
  607. // CHECK:STDOUT: %Self.binding.as_type => constants.%Y
  608. // CHECK:STDOUT: %tuple.type.loc6_40.2 => constants.%tuple.type.244
  609. // CHECK:STDOUT: %.loc6_40.1 => constants.%.0dc
  610. // CHECK:STDOUT: %pattern_type.loc6_25 => constants.%pattern_type.06d
  611. // CHECK:STDOUT: }
  612. // CHECK:STDOUT:
  613. // CHECK:STDOUT: specific @Y.as.A.impl.F(constants.%Z) {
  614. // CHECK:STDOUT: %U.loc16_8.1 => constants.%Z
  615. // CHECK:STDOUT: %ptr.loc16_22.1 => constants.%ptr.2a0
  616. // CHECK:STDOUT: %pattern_type.loc16_18 => constants.%pattern_type.771
  617. // CHECK:STDOUT: %tuple => constants.%tuple.84f
  618. // CHECK:STDOUT: %tuple.type.loc16 => constants.%tuple.type.847
  619. // CHECK:STDOUT: %.loc16_37.1 => constants.%.88e
  620. // CHECK:STDOUT: %pattern_type.loc16_25 => constants.%pattern_type.79c
  621. // CHECK:STDOUT:
  622. // CHECK:STDOUT: !definition:
  623. // CHECK:STDOUT: %require_complete.loc16_19 => constants.%complete_type.543
  624. // CHECK:STDOUT: %require_complete.loc16_37 => constants.%complete_type.28e
  625. // CHECK:STDOUT: %tuple.type.loc17 => constants.%tuple.type.0dd
  626. // CHECK:STDOUT: %.loc17_21.1 => constants.%.157
  627. // CHECK:STDOUT: %Copy.lookup_impl_witness => constants.%Copy.impl_witness.425
  628. // CHECK:STDOUT: %Copy.facet => constants.%Copy.facet.26e
  629. // CHECK:STDOUT: %Copy.WithSelf.Op.type => constants.%Copy.WithSelf.Op.type.a8b
  630. // CHECK:STDOUT: %.loc17_21.2 => constants.%.2ef
  631. // CHECK:STDOUT: %impl.elem0.loc17_21.2 => constants.%ptr.as.Copy.impl.Op.7d1
  632. // CHECK:STDOUT: %specific_impl_fn.loc17_21.2 => constants.%ptr.as.Copy.impl.Op.specific_fn
  633. // CHECK:STDOUT: }
  634. // CHECK:STDOUT:
  635. // CHECK:STDOUT: specific @CallGeneric(constants.%T.2bc) {
  636. // CHECK:STDOUT: %T.loc26_16.1 => constants.%T.2bc
  637. // CHECK:STDOUT: }
  638. // CHECK:STDOUT:
  639. // CHECK:STDOUT: specific @A.WithSelf(constants.%X, constants.%T.2bc) {
  640. // CHECK:STDOUT: !definition:
  641. // CHECK:STDOUT: %T => constants.%X
  642. // CHECK:STDOUT: %A.type => constants.%A.type.ab6
  643. // CHECK:STDOUT: %Self => constants.%T.2bc
  644. // CHECK:STDOUT: %A.WithSelf.F.type => constants.%A.WithSelf.F.type.f08
  645. // CHECK:STDOUT: %A.WithSelf.F => constants.%A.WithSelf.F.7ad
  646. // CHECK:STDOUT: %A.assoc_type => constants.%A.assoc_type.f05
  647. // CHECK:STDOUT: %assoc0.loc6_41.2 => constants.%assoc0.368
  648. // CHECK:STDOUT: }
  649. // CHECK:STDOUT:
  650. // CHECK:STDOUT: specific @A.WithSelf.F(constants.%X, constants.%T.2bc, constants.%Z) {
  651. // CHECK:STDOUT: %U.loc6_8.1 => constants.%Z
  652. // CHECK:STDOUT: %ptr.loc6_22.1 => constants.%ptr.2a0
  653. // CHECK:STDOUT: %pattern_type.loc6_18 => constants.%pattern_type.771
  654. // CHECK:STDOUT: %T => constants.%X
  655. // CHECK:STDOUT: %A.type => constants.%A.type.ab6
  656. // CHECK:STDOUT: %Self => constants.%T.2bc
  657. // CHECK:STDOUT: %tuple.type.loc6_40.1 => constants.%tuple.type.f96
  658. // CHECK:STDOUT: %tuple => constants.%tuple.d24
  659. // CHECK:STDOUT: %Self.binding.as_type => constants.%T.binding.as_type.3d0
  660. // CHECK:STDOUT: %tuple.type.loc6_40.2 => constants.%tuple.type.a50
  661. // CHECK:STDOUT: %.loc6_40.1 => constants.%.69c
  662. // CHECK:STDOUT: %pattern_type.loc6_25 => constants.%pattern_type.160
  663. // CHECK:STDOUT: }
  664. // CHECK:STDOUT:
  665. // CHECK:STDOUT: specific @CallGeneric(constants.%A.facet) {
  666. // CHECK:STDOUT: %T.loc26_16.1 => constants.%A.facet
  667. // CHECK:STDOUT:
  668. // CHECK:STDOUT: !definition:
  669. // CHECK:STDOUT: %T.binding.as_type => constants.%Y
  670. // CHECK:STDOUT: %A.lookup_impl_witness => constants.%A.impl_witness
  671. // CHECK:STDOUT: %A.WithSelf.F.type => constants.%A.WithSelf.F.type.12f
  672. // CHECK:STDOUT: %.loc28_4.3 => constants.%.de2
  673. // CHECK:STDOUT: %impl.elem0.loc28_4.2 => constants.%Y.as.A.impl.F
  674. // CHECK:STDOUT: %specific_impl_fn.loc28_4.2 => constants.%Y.as.A.impl.F.specific_fn
  675. // CHECK:STDOUT: %tuple.type => constants.%tuple.type.847
  676. // CHECK:STDOUT: %require_complete => constants.%complete_type.28e
  677. // CHECK:STDOUT: %Destroy.lookup_impl_witness => constants.%custom_witness.8d7fae.1
  678. // CHECK:STDOUT: %Destroy.facet => constants.%Destroy.facet.bba
  679. // CHECK:STDOUT: %Destroy.WithSelf.Op.type => constants.%Destroy.WithSelf.Op.type.770
  680. // CHECK:STDOUT: %.loc28_12.3 => constants.%.f4b
  681. // CHECK:STDOUT: %impl.elem0.loc28_12.2 => constants.%Destroy.Op.651ba6.1
  682. // CHECK:STDOUT: %specific_impl_fn.loc28_12.2 => constants.%Destroy.Op.651ba6.1
  683. // CHECK:STDOUT: }
  684. // CHECK:STDOUT:
  685. // CHECK:STDOUT: specific @A.WithSelf.F(constants.%X, constants.%A.facet, constants.%Z) {
  686. // CHECK:STDOUT: %U.loc6_8.1 => constants.%Z
  687. // CHECK:STDOUT: %ptr.loc6_22.1 => constants.%ptr.2a0
  688. // CHECK:STDOUT: %pattern_type.loc6_18 => constants.%pattern_type.771
  689. // CHECK:STDOUT: %T => constants.%X
  690. // CHECK:STDOUT: %A.type => constants.%A.type.ab6
  691. // CHECK:STDOUT: %Self => constants.%A.facet
  692. // CHECK:STDOUT: %tuple.type.loc6_40.1 => constants.%tuple.type.f96
  693. // CHECK:STDOUT: %tuple => constants.%tuple.6cd
  694. // CHECK:STDOUT: %Self.binding.as_type => constants.%Y
  695. // CHECK:STDOUT: %tuple.type.loc6_40.2 => constants.%tuple.type.847
  696. // CHECK:STDOUT: %.loc6_40.1 => constants.%.88e
  697. // CHECK:STDOUT: %pattern_type.loc6_25 => constants.%pattern_type.79c
  698. // CHECK:STDOUT: }
  699. // CHECK:STDOUT:
  700. // CHECK:STDOUT: --- generic_method_more_params.carbon
  701. // CHECK:STDOUT:
  702. // CHECK:STDOUT: constants {
  703. // CHECK:STDOUT: %type: type = facet_type <type> [concrete]
  704. // CHECK:STDOUT: %.Self: %type = symbolic_binding .Self [symbolic_self]
  705. // CHECK:STDOUT: %T.67d: type = symbolic_binding T, 0 [symbolic]
  706. // CHECK:STDOUT: %pattern_type.98f: type = pattern_type type [concrete]
  707. // CHECK:STDOUT: %A.type.464: type = generic_interface_type @A [concrete]
  708. // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete]
  709. // CHECK:STDOUT: %A.generic: %A.type.464 = struct_value () [concrete]
  710. // CHECK:STDOUT: %A.type.ade: type = facet_type <@A, @A(%T.67d)> [symbolic]
  711. // CHECK:STDOUT: %Self.362: %A.type.ade = symbolic_binding Self, 1 [symbolic]
  712. // CHECK:STDOUT: %U.4e7: type = symbolic_binding U, 2 [symbolic]
  713. // CHECK:STDOUT: %pattern_type.62e: type = pattern_type %U.4e7 [symbolic]
  714. // CHECK:STDOUT: %tuple.type.f2d: type = tuple_type (type, %A.type.ade, type) [symbolic]
  715. // CHECK:STDOUT: %tuple.f25: %tuple.type.f2d = tuple_value (%T.67d, %Self.362, %U.4e7) [symbolic]
  716. // CHECK:STDOUT: %Self.binding.as_type.7ec: type = symbolic_binding_type Self, 1, %Self.362 [symbolic]
  717. // CHECK:STDOUT: %tuple.type.7f3: type = tuple_type (%T.67d, %Self.binding.as_type.7ec, %U.4e7) [symbolic]
  718. // CHECK:STDOUT: %.0ad: Core.Form = init_form %tuple.type.7f3 [symbolic]
  719. // CHECK:STDOUT: %pattern_type.22d: type = pattern_type %tuple.type.7f3 [symbolic]
  720. // CHECK:STDOUT: %A.WithSelf.F.type.0ed: type = fn_type @A.WithSelf.F, @A.WithSelf(%T.67d, %Self.362) [symbolic]
  721. // CHECK:STDOUT: %A.WithSelf.F.33a: %A.WithSelf.F.type.0ed = struct_value () [symbolic]
  722. // CHECK:STDOUT: %A.assoc_type.9f4: type = assoc_entity_type @A, @A(%T.67d) [symbolic]
  723. // CHECK:STDOUT: %assoc0.146: %A.assoc_type.9f4 = assoc_entity element0, @A.WithSelf.%A.WithSelf.F.decl [symbolic]
  724. // CHECK:STDOUT: %X: type = class_type @X [concrete]
  725. // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete]
  726. // CHECK:STDOUT: %complete_type.357: <witness> = complete_type_witness %empty_struct_type [concrete]
  727. // CHECK:STDOUT: %Y1: type = class_type @Y1 [concrete]
  728. // CHECK:STDOUT: %Y2: type = class_type @Y2 [concrete]
  729. // CHECK:STDOUT: %Z: type = class_type @Z [concrete]
  730. // CHECK:STDOUT: %V1: type = symbolic_binding V1, 0 [symbolic]
  731. // CHECK:STDOUT: %V2: type = symbolic_binding V2, 1 [symbolic]
  732. // CHECK:STDOUT: %W: type = symbolic_binding W, 2 [symbolic]
  733. // CHECK:STDOUT: %tuple.type.24b: type = tuple_type (type, type) [concrete]
  734. // CHECK:STDOUT: %tuple.4b9: %tuple.type.24b = tuple_value (%V1, %V2) [symbolic]
  735. // CHECK:STDOUT: %tuple.type.a5e: type = tuple_type (%V1, %V2) [symbolic]
  736. // CHECK:STDOUT: %A.type.fe7: type = facet_type <@A, @A(%W)> [symbolic]
  737. // 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]
  738. // CHECK:STDOUT: %Self.d33: %A.type.fe7 = symbolic_binding Self, 1 [symbolic]
  739. // CHECK:STDOUT: %A.WithSelf.F.type.986: type = fn_type @A.WithSelf.F, @A.WithSelf(%W, %Self.362) [symbolic]
  740. // CHECK:STDOUT: %A.WithSelf.F.0f5: %A.WithSelf.F.type.986 = struct_value () [symbolic]
  741. // CHECK:STDOUT: %A.assoc_type.7a9: type = assoc_entity_type @A, @A(%W) [symbolic]
  742. // CHECK:STDOUT: %assoc0.dfc: %A.assoc_type.7a9 = assoc_entity element0, @A.WithSelf.%A.WithSelf.F.decl [symbolic]
  743. // CHECK:STDOUT: %require_complete.9a5: <witness> = require_complete_type %A.type.fe7 [symbolic]
  744. // CHECK:STDOUT: %U.ce4: type = symbolic_binding U, 3 [symbolic]
  745. // CHECK:STDOUT: %pattern_type.e4a: type = pattern_type %U.ce4 [symbolic]
  746. // CHECK:STDOUT: %tuple.type.11f: type = tuple_type (type, %tuple.type.24b, type) [concrete]
  747. // CHECK:STDOUT: %tuple.117: %tuple.type.11f = tuple_value (%W, %tuple.4b9, %U.ce4) [symbolic]
  748. // CHECK:STDOUT: %tuple.type.897: type = tuple_type (%W, %tuple.type.a5e, %U.ce4) [symbolic]
  749. // CHECK:STDOUT: %.f8e: Core.Form = init_form %tuple.type.897 [symbolic]
  750. // CHECK:STDOUT: %pattern_type.5cc: type = pattern_type %tuple.type.897 [symbolic]
  751. // 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]
  752. // CHECK:STDOUT: %tuple.type.as.A.impl.F.74d: %tuple.type.as.A.impl.F.type.ce6 = struct_value () [symbolic]
  753. // CHECK:STDOUT: %A.facet.56b: %A.type.fe7 = facet_value %tuple.type.a5e, (%A.impl_witness.be2) [symbolic]
  754. // CHECK:STDOUT: %A.WithSelf.F.type.104: type = fn_type @A.WithSelf.F, @A.WithSelf(%W, %A.facet.56b) [symbolic]
  755. // CHECK:STDOUT: %A.WithSelf.F.028: %A.WithSelf.F.type.104 = struct_value () [symbolic]
  756. // CHECK:STDOUT: %tuple.type.52a: type = tuple_type (type, %A.type.fe7, type) [symbolic]
  757. // CHECK:STDOUT: %tuple.ec4: %tuple.type.52a = tuple_value (%W, %A.facet.56b, %U.ce4) [symbolic]
  758. // CHECK:STDOUT: %require_complete.5a4: <witness> = require_complete_type %U.ce4 [symbolic]
  759. // CHECK:STDOUT: %require_complete.da0: <witness> = require_complete_type %tuple.type.897 [symbolic]
  760. // 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]
  761. // CHECK:STDOUT: %Call.type: type = fn_type @Call [concrete]
  762. // CHECK:STDOUT: %Call: %Call.type = struct_value () [concrete]
  763. // CHECK:STDOUT: %tuple.dd5: %tuple.type.24b = tuple_value (%Y1, %Y2) [concrete]
  764. // CHECK:STDOUT: %tuple.type.ab2: type = tuple_type (%Y1, %Y2) [concrete]
  765. // CHECK:STDOUT: %A.type.ab6: type = facet_type <@A, @A(%X)> [concrete]
  766. // 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]
  767. // CHECK:STDOUT: %Self.e87: %A.type.ab6 = symbolic_binding Self, 1 [symbolic]
  768. // CHECK:STDOUT: %A.WithSelf.F.type.ba2: type = fn_type @A.WithSelf.F, @A.WithSelf(%X, %Self.362) [symbolic]
  769. // CHECK:STDOUT: %A.WithSelf.F.e5f: %A.WithSelf.F.type.ba2 = struct_value () [symbolic]
  770. // CHECK:STDOUT: %A.assoc_type.f05: type = assoc_entity_type @A, @A(%X) [concrete]
  771. // CHECK:STDOUT: %assoc0.368: %A.assoc_type.f05 = assoc_entity element0, @A.WithSelf.%A.WithSelf.F.decl [concrete]
  772. // CHECK:STDOUT: %complete_type.a36: <witness> = complete_type_witness %A.type.ab6 [concrete]
  773. // 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]
  774. // CHECK:STDOUT: %tuple.type.as.A.impl.F.cc8: %tuple.type.as.A.impl.F.type.d14 = struct_value () [concrete]
  775. // CHECK:STDOUT: %A.facet.906: %A.type.ab6 = facet_value %tuple.type.ab2, (%A.impl_witness.b3a) [concrete]
  776. // CHECK:STDOUT: %A.WithSelf.F.type.757: type = fn_type @A.WithSelf.F, @A.WithSelf(%X, %A.facet.906) [concrete]
  777. // CHECK:STDOUT: %A.WithSelf.F.8b6: %A.WithSelf.F.type.757 = struct_value () [concrete]
  778. // CHECK:STDOUT: %.fa2: type = fn_type_with_self_type %A.WithSelf.F.type.757, %A.facet.906 [concrete]
  779. // CHECK:STDOUT: %empty_struct: %empty_struct_type = struct_value () [concrete]
  780. // CHECK:STDOUT: %pattern_type.bdb: type = pattern_type %Z [concrete]
  781. // CHECK:STDOUT: %tuple.66d: %tuple.type.11f = tuple_value (%X, %tuple.dd5, %Z) [concrete]
  782. // CHECK:STDOUT: %tuple.type.65a: type = tuple_type (%X, %tuple.type.ab2, %Z) [concrete]
  783. // CHECK:STDOUT: %.241: Core.Form = init_form %tuple.type.65a [concrete]
  784. // CHECK:STDOUT: %pattern_type.30b: type = pattern_type %tuple.type.65a [concrete]
  785. // 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]
  786. // CHECK:STDOUT: %Z.val: %Z = struct_value () [concrete]
  787. // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete]
  788. // CHECK:STDOUT: %Destroy.Op.type.bae255.1: type = fn_type @Destroy.Op.loc24_39 [concrete]
  789. // CHECK:STDOUT: %Destroy.Op.651ba6.1: %Destroy.Op.type.bae255.1 = struct_value () [concrete]
  790. // CHECK:STDOUT: %custom_witness.8d7fae.1: <witness> = custom_witness (%Destroy.Op.651ba6.1), @Destroy [concrete]
  791. // CHECK:STDOUT: %Destroy.facet.9fd: %Destroy.type = facet_value %tuple.type.65a, (%custom_witness.8d7fae.1) [concrete]
  792. // CHECK:STDOUT: %Destroy.WithSelf.Op.type.d36: type = fn_type @Destroy.WithSelf.Op, @Destroy.WithSelf(%Destroy.facet.9fd) [concrete]
  793. // CHECK:STDOUT: %.498: type = fn_type_with_self_type %Destroy.WithSelf.Op.type.d36, %Destroy.facet.9fd [concrete]
  794. // CHECK:STDOUT: %Destroy.Op.type.bae255.2: type = fn_type @Destroy.Op.loc24_38 [concrete]
  795. // CHECK:STDOUT: %Destroy.Op.651ba6.2: %Destroy.Op.type.bae255.2 = struct_value () [concrete]
  796. // CHECK:STDOUT: %T.2bc: %A.type.ab6 = symbolic_binding T, 0 [symbolic]
  797. // CHECK:STDOUT: %pattern_type.143: type = pattern_type %A.type.ab6 [concrete]
  798. // CHECK:STDOUT: %CallGeneric.type: type = fn_type @CallGeneric [concrete]
  799. // CHECK:STDOUT: %CallGeneric: %CallGeneric.type = struct_value () [concrete]
  800. // CHECK:STDOUT: %A.WithSelf.F.type.f08: type = fn_type @A.WithSelf.F, @A.WithSelf(%X, %T.2bc) [symbolic]
  801. // CHECK:STDOUT: %A.WithSelf.F.7ad: %A.WithSelf.F.type.f08 = struct_value () [symbolic]
  802. // CHECK:STDOUT: %T.binding.as_type: type = symbolic_binding_type T, 0, %T.2bc [symbolic]
  803. // CHECK:STDOUT: %A.lookup_impl_witness: <witness> = lookup_impl_witness %T.2bc, @A, @A(%X) [symbolic]
  804. // CHECK:STDOUT: %.189: type = fn_type_with_self_type %A.WithSelf.F.type.f08, %T.2bc [symbolic]
  805. // CHECK:STDOUT: %impl.elem0.86f: %.189 = impl_witness_access %A.lookup_impl_witness, element0 [symbolic]
  806. // CHECK:STDOUT: %tuple.type.f96: type = tuple_type (type, %A.type.ab6, type) [concrete]
  807. // CHECK:STDOUT: %tuple.631: %tuple.type.f96 = tuple_value (%X, %T.2bc, %Z) [symbolic]
  808. // CHECK:STDOUT: %tuple.type.856: type = tuple_type (%X, %T.binding.as_type, %Z) [symbolic]
  809. // CHECK:STDOUT: %.5b0: Core.Form = init_form %tuple.type.856 [symbolic]
  810. // CHECK:STDOUT: %pattern_type.4b2: type = pattern_type %tuple.type.856 [symbolic]
  811. // CHECK:STDOUT: %specific_impl_fn.44b: <specific function> = specific_impl_function %impl.elem0.86f, @A.WithSelf.F(%X, %T.2bc, %Z) [symbolic]
  812. // CHECK:STDOUT: %require_complete.7d4: <witness> = require_complete_type %tuple.type.856 [symbolic]
  813. // CHECK:STDOUT: %Destroy.lookup_impl_witness: <witness> = lookup_impl_witness %tuple.type.856, @Destroy [symbolic]
  814. // CHECK:STDOUT: %Destroy.facet.a1c: %Destroy.type = facet_value %tuple.type.856, (%Destroy.lookup_impl_witness) [symbolic]
  815. // CHECK:STDOUT: %Destroy.WithSelf.Op.type.725: type = fn_type @Destroy.WithSelf.Op, @Destroy.WithSelf(%Destroy.facet.a1c) [symbolic]
  816. // CHECK:STDOUT: %.949: type = fn_type_with_self_type %Destroy.WithSelf.Op.type.725, %Destroy.facet.a1c [symbolic]
  817. // CHECK:STDOUT: %impl.elem0.487: %.949 = impl_witness_access %Destroy.lookup_impl_witness, element0 [symbolic]
  818. // CHECK:STDOUT: %specific_impl_fn.56d: <specific function> = specific_impl_function %impl.elem0.487, @Destroy.WithSelf.Op(%Destroy.facet.a1c) [symbolic]
  819. // CHECK:STDOUT: %CallIndirect.type: type = fn_type @CallIndirect [concrete]
  820. // CHECK:STDOUT: %CallIndirect: %CallIndirect.type = struct_value () [concrete]
  821. // CHECK:STDOUT: %CallGeneric.specific_fn: <specific function> = specific_function %CallGeneric, @CallGeneric(%A.facet.906) [concrete]
  822. // CHECK:STDOUT: %complete_type.cf2: <witness> = complete_type_witness %tuple.type.65a [concrete]
  823. // CHECK:STDOUT: %tuple.5e4: %tuple.type.f96 = tuple_value (%X, %A.facet.906, %Z) [concrete]
  824. // CHECK:STDOUT: }
  825. // CHECK:STDOUT:
  826. // CHECK:STDOUT: imports {
  827. // CHECK:STDOUT: %Core: <namespace> = namespace file.%Core.import, [concrete] {
  828. // CHECK:STDOUT: .Destroy = %Core.Destroy
  829. // CHECK:STDOUT: import Core//prelude
  830. // CHECK:STDOUT: import Core//prelude/...
  831. // CHECK:STDOUT: }
  832. // CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type]
  833. // CHECK:STDOUT: }
  834. // CHECK:STDOUT:
  835. // CHECK:STDOUT: file {
  836. // CHECK:STDOUT: package: <namespace> = namespace [concrete] {
  837. // CHECK:STDOUT: .Core = imports.%Core
  838. // CHECK:STDOUT: .A = %A.decl
  839. // CHECK:STDOUT: .X = %X.decl
  840. // CHECK:STDOUT: .Y1 = %Y1.decl
  841. // CHECK:STDOUT: .Y2 = %Y2.decl
  842. // CHECK:STDOUT: .Z = %Z.decl
  843. // CHECK:STDOUT: .Call = %Call.decl
  844. // CHECK:STDOUT: .CallGeneric = %CallGeneric.decl
  845. // CHECK:STDOUT: .CallIndirect = %CallIndirect.decl
  846. // CHECK:STDOUT: }
  847. // CHECK:STDOUT: %Core.import = import Core
  848. // CHECK:STDOUT: %A.decl: %A.type.464 = interface_decl @A [concrete = constants.%A.generic] {
  849. // CHECK:STDOUT: %T.patt: %pattern_type.98f = symbolic_binding_pattern T, 0 [concrete]
  850. // CHECK:STDOUT: } {
  851. // CHECK:STDOUT: %.loc5_17.1: type = splice_block %.loc5_17.2 [concrete = type] {
  852. // CHECK:STDOUT: %.Self: %type = symbolic_binding .Self [symbolic_self = constants.%.Self]
  853. // CHECK:STDOUT: %.loc5_17.2: type = type_literal type [concrete = type]
  854. // CHECK:STDOUT: }
  855. // CHECK:STDOUT: %T.loc5_13.2: type = symbolic_binding T, 0 [symbolic = %T.loc5_13.1 (constants.%T.67d)]
  856. // CHECK:STDOUT: }
  857. // CHECK:STDOUT: %X.decl: type = class_decl @X [concrete = constants.%X] {} {}
  858. // CHECK:STDOUT: %Y1.decl: type = class_decl @Y1 [concrete = constants.%Y1] {} {}
  859. // CHECK:STDOUT: %Y2.decl: type = class_decl @Y2 [concrete = constants.%Y2] {} {}
  860. // CHECK:STDOUT: %Z.decl: type = class_decl @Z [concrete = constants.%Z] {} {}
  861. // CHECK:STDOUT: impl_decl @tuple.type.as.A.impl [concrete] {
  862. // CHECK:STDOUT: %V1.patt: %pattern_type.98f = symbolic_binding_pattern V1, 0 [concrete]
  863. // CHECK:STDOUT: %V2.patt: %pattern_type.98f = symbolic_binding_pattern V2, 1 [concrete]
  864. // CHECK:STDOUT: %W.patt: %pattern_type.98f = symbolic_binding_pattern W, 2 [concrete]
  865. // CHECK:STDOUT: } {
  866. // CHECK:STDOUT: %V1.ref: type = name_ref V1, %V1.loc14_14.2 [symbolic = %V1.loc14_14.1 (constants.%V1)]
  867. // CHECK:STDOUT: %V2.ref: type = name_ref V2, %V2.loc14_25.2 [symbolic = %V2.loc14_25.1 (constants.%V2)]
  868. // CHECK:STDOUT: %.loc14_53.1: %tuple.type.24b = tuple_literal (%V1.ref, %V2.ref) [symbolic = %tuple (constants.%tuple.4b9)]
  869. // CHECK:STDOUT: %.loc14_53.2: type = converted %.loc14_53.1, constants.%tuple.type.a5e [symbolic = %tuple.type (constants.%tuple.type.a5e)]
  870. // CHECK:STDOUT: %A.ref: %A.type.464 = name_ref A, file.%A.decl [concrete = constants.%A.generic]
  871. // CHECK:STDOUT: %W.ref: type = name_ref W, %W.loc14_36.2 [symbolic = %W.loc14_36.1 (constants.%W)]
  872. // CHECK:STDOUT: %A.type.loc14_61.2: type = facet_type <@A, @A(constants.%W)> [symbolic = %A.type.loc14_61.1 (constants.%A.type.fe7)]
  873. // CHECK:STDOUT: %.loc14_19.1: type = splice_block %.loc14_19.2 [concrete = type] {
  874. // CHECK:STDOUT: %.Self.3: %type = symbolic_binding .Self [symbolic_self = constants.%.Self]
  875. // CHECK:STDOUT: %.loc14_19.2: type = type_literal type [concrete = type]
  876. // CHECK:STDOUT: }
  877. // CHECK:STDOUT: %V1.loc14_14.2: type = symbolic_binding V1, 0 [symbolic = %V1.loc14_14.1 (constants.%V1)]
  878. // CHECK:STDOUT: %.loc14_30.1: type = splice_block %.loc14_30.2 [concrete = type] {
  879. // CHECK:STDOUT: %.Self.2: %type = symbolic_binding .Self [symbolic_self = constants.%.Self]
  880. // CHECK:STDOUT: %.loc14_30.2: type = type_literal type [concrete = type]
  881. // CHECK:STDOUT: }
  882. // CHECK:STDOUT: %V2.loc14_25.2: type = symbolic_binding V2, 1 [symbolic = %V2.loc14_25.1 (constants.%V2)]
  883. // CHECK:STDOUT: %.loc14_40.1: type = splice_block %.loc14_40.2 [concrete = type] {
  884. // CHECK:STDOUT: %.Self.1: %type = symbolic_binding .Self [symbolic_self = constants.%.Self]
  885. // CHECK:STDOUT: %.loc14_40.2: type = type_literal type [concrete = type]
  886. // CHECK:STDOUT: }
  887. // CHECK:STDOUT: %W.loc14_36.2: type = symbolic_binding W, 2 [symbolic = %W.loc14_36.1 (constants.%W)]
  888. // CHECK:STDOUT: }
  889. // CHECK:STDOUT: %Call.decl: %Call.type = fn_decl @Call [concrete = constants.%Call] {} {}
  890. // CHECK:STDOUT: %CallGeneric.decl: %CallGeneric.type = fn_decl @CallGeneric [concrete = constants.%CallGeneric] {
  891. // CHECK:STDOUT: %T.patt: %pattern_type.143 = symbolic_binding_pattern T, 0 [concrete]
  892. // CHECK:STDOUT: } {
  893. // CHECK:STDOUT: %.loc27: type = splice_block %A.type [concrete = constants.%A.type.ab6] {
  894. // CHECK:STDOUT: %.Self: %type = symbolic_binding .Self [symbolic_self = constants.%.Self]
  895. // CHECK:STDOUT: %A.ref: %A.type.464 = name_ref A, file.%A.decl [concrete = constants.%A.generic]
  896. // CHECK:STDOUT: %X.ref: type = name_ref X, file.%X.decl [concrete = constants.%X]
  897. // CHECK:STDOUT: %A.type: type = facet_type <@A, @A(constants.%X)> [concrete = constants.%A.type.ab6]
  898. // CHECK:STDOUT: }
  899. // CHECK:STDOUT: %T.loc27_16.2: %A.type.ab6 = symbolic_binding T, 0 [symbolic = %T.loc27_16.1 (constants.%T.2bc)]
  900. // CHECK:STDOUT: }
  901. // CHECK:STDOUT: %CallIndirect.decl: %CallIndirect.type = fn_decl @CallIndirect [concrete = constants.%CallIndirect] {} {}
  902. // CHECK:STDOUT: }
  903. // CHECK:STDOUT:
  904. // CHECK:STDOUT: generic interface @A(%T.loc5_13.2: type) {
  905. // CHECK:STDOUT: %T.loc5_13.1: type = symbolic_binding T, 0 [symbolic = %T.loc5_13.1 (constants.%T.67d)]
  906. // CHECK:STDOUT:
  907. // CHECK:STDOUT: !definition:
  908. // CHECK:STDOUT: %A.type: type = facet_type <@A, @A(%T.loc5_13.1)> [symbolic = %A.type (constants.%A.type.ade)]
  909. // CHECK:STDOUT: %Self.loc5_23.2: @A.%A.type (%A.type.ade) = symbolic_binding Self, 1 [symbolic = %Self.loc5_23.2 (constants.%Self.362)]
  910. // CHECK:STDOUT:
  911. // CHECK:STDOUT: interface {
  912. // CHECK:STDOUT: %Self.loc5_23.1: @A.%A.type (%A.type.ade) = symbolic_binding Self, 1 [symbolic = %Self.loc5_23.2 (constants.%Self.362)]
  913. // CHECK:STDOUT: %A.WithSelf.decl = interface_with_self_decl @A [concrete]
  914. // CHECK:STDOUT:
  915. // CHECK:STDOUT: !with Self:
  916. // 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)] {
  917. // CHECK:STDOUT: %U.patt: %pattern_type.98f = symbolic_binding_pattern U, 2 [concrete]
  918. // CHECK:STDOUT: %u.patt: @A.WithSelf.F.%pattern_type.loc6_18 (%pattern_type.62e) = value_binding_pattern u [concrete]
  919. // CHECK:STDOUT: %u.param_patt: @A.WithSelf.F.%pattern_type.loc6_18 (%pattern_type.62e) = value_param_pattern %u.patt [concrete]
  920. // CHECK:STDOUT: %return.patt: @A.WithSelf.F.%pattern_type.loc6_24 (%pattern_type.22d) = return_slot_pattern [concrete]
  921. // CHECK:STDOUT: %return.param_patt: @A.WithSelf.F.%pattern_type.loc6_24 (%pattern_type.22d) = out_param_pattern %return.patt [concrete]
  922. // CHECK:STDOUT: } {
  923. // CHECK:STDOUT: %T.ref: type = name_ref T, @A.%T.loc5_13.2 [symbolic = %T (constants.%T.67d)]
  924. // 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)]
  925. // CHECK:STDOUT: %Self.ref: @A.WithSelf.F.%A.type (%A.type.ade) = name_ref Self, %.loc6_31 [symbolic = %Self (constants.%Self.362)]
  926. // CHECK:STDOUT: %U.ref.loc6_37: type = name_ref U, %U.loc6_8.2 [symbolic = %U.loc6_8.1 (constants.%U.4e7)]
  927. // 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)]
  928. // CHECK:STDOUT: %Self.as_type: type = facet_access_type constants.%Self.362 [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type.7ec)]
  929. // CHECK:STDOUT: %.loc6_38.3: type = converted constants.%Self.362, %Self.as_type [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type.7ec)]
  930. // CHECK:STDOUT: %.loc6_38.4: type = converted %.loc6_38.2, constants.%tuple.type.7f3 [symbolic = %tuple.type.loc6_38.2 (constants.%tuple.type.7f3)]
  931. // CHECK:STDOUT: %.loc6_38.5: Core.Form = init_form %.loc6_38.4 [symbolic = %.loc6_38.1 (constants.%.0ad)]
  932. // CHECK:STDOUT: %.loc6_12.1: type = splice_block %.loc6_12.2 [concrete = type] {
  933. // CHECK:STDOUT: %.Self: %type = symbolic_binding .Self [symbolic_self = constants.%.Self]
  934. // CHECK:STDOUT: %.loc6_12.2: type = type_literal type [concrete = type]
  935. // CHECK:STDOUT: }
  936. // CHECK:STDOUT: %U.loc6_8.2: type = symbolic_binding U, 2 [symbolic = %U.loc6_8.1 (constants.%U.4e7)]
  937. // CHECK:STDOUT: %u.param: @A.WithSelf.F.%U.loc6_8.1 (%U.4e7) = value_param call_param0
  938. // CHECK:STDOUT: %U.ref.loc6_21: type = name_ref U, %U.loc6_8.2 [symbolic = %U.loc6_8.1 (constants.%U.4e7)]
  939. // CHECK:STDOUT: %u: @A.WithSelf.F.%U.loc6_8.1 (%U.4e7) = value_binding u, %u.param
  940. // CHECK:STDOUT: %return.param: ref @A.WithSelf.F.%tuple.type.loc6_38.2 (%tuple.type.7f3) = out_param call_param1
  941. // CHECK:STDOUT: %return: ref @A.WithSelf.F.%tuple.type.loc6_38.2 (%tuple.type.7f3) = return_slot %return.param
  942. // CHECK:STDOUT: }
  943. // 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)]
  944. // CHECK:STDOUT:
  945. // CHECK:STDOUT: !members:
  946. // CHECK:STDOUT: .Self = %Self.loc5_23.1
  947. // CHECK:STDOUT: .T = <poisoned>
  948. // CHECK:STDOUT: .T = <poisoned>
  949. // CHECK:STDOUT: .F = @A.WithSelf.%assoc0.loc6_39.1
  950. // CHECK:STDOUT: witness = (@A.WithSelf.%A.WithSelf.F.decl)
  951. // CHECK:STDOUT:
  952. // CHECK:STDOUT: !requires:
  953. // CHECK:STDOUT: }
  954. // CHECK:STDOUT: }
  955. // CHECK:STDOUT:
  956. // CHECK:STDOUT: generic impl @tuple.type.as.A.impl(%V1.loc14_14.2: type, %V2.loc14_25.2: type, %W.loc14_36.2: type) {
  957. // CHECK:STDOUT: %V1.loc14_14.1: type = symbolic_binding V1, 0 [symbolic = %V1.loc14_14.1 (constants.%V1)]
  958. // CHECK:STDOUT: %V2.loc14_25.1: type = symbolic_binding V2, 1 [symbolic = %V2.loc14_25.1 (constants.%V2)]
  959. // CHECK:STDOUT: %W.loc14_36.1: type = symbolic_binding W, 2 [symbolic = %W.loc14_36.1 (constants.%W)]
  960. // CHECK:STDOUT: %tuple: %tuple.type.24b = tuple_value (%V1.loc14_14.1, %V2.loc14_25.1) [symbolic = %tuple (constants.%tuple.4b9)]
  961. // CHECK:STDOUT: %tuple.type: type = tuple_type (%V1.loc14_14.1, %V2.loc14_25.1) [symbolic = %tuple.type (constants.%tuple.type.a5e)]
  962. // CHECK:STDOUT: %A.type.loc14_61.1: type = facet_type <@A, @A(%W.loc14_36.1)> [symbolic = %A.type.loc14_61.1 (constants.%A.type.fe7)]
  963. // CHECK:STDOUT: %A.impl_witness.loc14_63.2: <witness> = impl_witness %A.impl_witness_table, @tuple.type.as.A.impl(%V1.loc14_14.1, %V2.loc14_25.1, %W.loc14_36.1) [symbolic = %A.impl_witness.loc14_63.2 (constants.%A.impl_witness.be2)]
  964. // CHECK:STDOUT:
  965. // CHECK:STDOUT: !definition:
  966. // CHECK:STDOUT: %require_complete: <witness> = require_complete_type %A.type.loc14_61.1 [symbolic = %require_complete (constants.%require_complete.9a5)]
  967. // CHECK:STDOUT: %tuple.type.as.A.impl.F.type: type = fn_type @tuple.type.as.A.impl.F, @tuple.type.as.A.impl(%V1.loc14_14.1, %V2.loc14_25.1, %W.loc14_36.1) [symbolic = %tuple.type.as.A.impl.F.type (constants.%tuple.type.as.A.impl.F.type.ce6)]
  968. // 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)]
  969. // CHECK:STDOUT:
  970. // CHECK:STDOUT: impl: %.loc14_53.2 as %A.type.loc14_61.2 {
  971. // 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)] {
  972. // CHECK:STDOUT: %U.patt: %pattern_type.98f = symbolic_binding_pattern U, 3 [concrete]
  973. // CHECK:STDOUT: %u.patt: @tuple.type.as.A.impl.F.%pattern_type.loc17_18 (%pattern_type.e4a) = value_binding_pattern u [concrete]
  974. // CHECK:STDOUT: %u.param_patt: @tuple.type.as.A.impl.F.%pattern_type.loc17_18 (%pattern_type.e4a) = value_param_pattern %u.patt [concrete]
  975. // CHECK:STDOUT: %return.patt: @tuple.type.as.A.impl.F.%pattern_type.loc17_24 (%pattern_type.5cc) = return_slot_pattern [concrete]
  976. // CHECK:STDOUT: %return.param_patt: @tuple.type.as.A.impl.F.%pattern_type.loc17_24 (%pattern_type.5cc) = out_param_pattern %return.patt [concrete]
  977. // CHECK:STDOUT: } {
  978. // CHECK:STDOUT: %W.ref: type = name_ref W, @tuple.type.as.A.impl.%W.loc14_36.2 [symbolic = %W (constants.%W)]
  979. // CHECK:STDOUT: %V1.ref: type = name_ref V1, @tuple.type.as.A.impl.%V1.loc14_14.2 [symbolic = %V1 (constants.%V1)]
  980. // CHECK:STDOUT: %V2.ref: type = name_ref V2, @tuple.type.as.A.impl.%V2.loc14_25.2 [symbolic = %V2 (constants.%V2)]
  981. // CHECK:STDOUT: %.loc17_38: %tuple.type.24b = tuple_literal (%V1.ref, %V2.ref) [symbolic = %tuple.loc17_38 (constants.%tuple.4b9)]
  982. // CHECK:STDOUT: %U.ref.loc17_41: type = name_ref U, %U.loc17_8.2 [symbolic = %U.loc17_8.1 (constants.%U.ce4)]
  983. // 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)]
  984. // CHECK:STDOUT: %.loc17_42.4: type = converted constants.%tuple.4b9, constants.%tuple.type.a5e [symbolic = %tuple.type.loc17_42.1 (constants.%tuple.type.a5e)]
  985. // CHECK:STDOUT: %.loc17_42.5: type = converted %.loc17_42.3, constants.%tuple.type.897 [symbolic = %tuple.type.loc17_42.2 (constants.%tuple.type.897)]
  986. // CHECK:STDOUT: %.loc17_42.6: Core.Form = init_form %.loc17_42.5 [symbolic = %.loc17_42.2 (constants.%.f8e)]
  987. // CHECK:STDOUT: %.loc17_12.1: type = splice_block %.loc17_12.2 [concrete = type] {
  988. // CHECK:STDOUT: %.Self: %type = symbolic_binding .Self [symbolic_self = constants.%.Self]
  989. // CHECK:STDOUT: %.loc17_12.2: type = type_literal type [concrete = type]
  990. // CHECK:STDOUT: }
  991. // CHECK:STDOUT: %U.loc17_8.2: type = symbolic_binding U, 3 [symbolic = %U.loc17_8.1 (constants.%U.ce4)]
  992. // CHECK:STDOUT: %u.param: @tuple.type.as.A.impl.F.%U.loc17_8.1 (%U.ce4) = value_param call_param0
  993. // CHECK:STDOUT: %U.ref.loc17_21: type = name_ref U, %U.loc17_8.2 [symbolic = %U.loc17_8.1 (constants.%U.ce4)]
  994. // CHECK:STDOUT: %u: @tuple.type.as.A.impl.F.%U.loc17_8.1 (%U.ce4) = value_binding u, %u.param
  995. // CHECK:STDOUT: %return.param: ref @tuple.type.as.A.impl.F.%tuple.type.loc17_42.2 (%tuple.type.897) = out_param call_param1
  996. // CHECK:STDOUT: %return: ref @tuple.type.as.A.impl.F.%tuple.type.loc17_42.2 (%tuple.type.897) = return_slot %return.param
  997. // CHECK:STDOUT: }
  998. // CHECK:STDOUT: %A.impl_witness_table = impl_witness_table (%tuple.type.as.A.impl.F.decl), @tuple.type.as.A.impl [concrete]
  999. // 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)]
  1000. // CHECK:STDOUT:
  1001. // CHECK:STDOUT: !members:
  1002. // CHECK:STDOUT: .W = <poisoned>
  1003. // CHECK:STDOUT: .V1 = <poisoned>
  1004. // CHECK:STDOUT: .V2 = <poisoned>
  1005. // CHECK:STDOUT: .F = %tuple.type.as.A.impl.F.decl
  1006. // CHECK:STDOUT: witness = %A.impl_witness.loc14_63.1
  1007. // CHECK:STDOUT: }
  1008. // CHECK:STDOUT: }
  1009. // CHECK:STDOUT:
  1010. // CHECK:STDOUT: class @X {
  1011. // CHECK:STDOUT: %complete_type: <witness> = complete_type_witness constants.%empty_struct_type [concrete = constants.%complete_type.357]
  1012. // CHECK:STDOUT: complete_type_witness = %complete_type
  1013. // CHECK:STDOUT:
  1014. // CHECK:STDOUT: !members:
  1015. // CHECK:STDOUT: .Self = constants.%X
  1016. // CHECK:STDOUT: }
  1017. // CHECK:STDOUT:
  1018. // CHECK:STDOUT: class @Y1 {
  1019. // CHECK:STDOUT: %complete_type: <witness> = complete_type_witness constants.%empty_struct_type [concrete = constants.%complete_type.357]
  1020. // CHECK:STDOUT: complete_type_witness = %complete_type
  1021. // CHECK:STDOUT:
  1022. // CHECK:STDOUT: !members:
  1023. // CHECK:STDOUT: .Self = constants.%Y1
  1024. // CHECK:STDOUT: }
  1025. // CHECK:STDOUT:
  1026. // CHECK:STDOUT: class @Y2 {
  1027. // CHECK:STDOUT: %complete_type: <witness> = complete_type_witness constants.%empty_struct_type [concrete = constants.%complete_type.357]
  1028. // CHECK:STDOUT: complete_type_witness = %complete_type
  1029. // CHECK:STDOUT:
  1030. // CHECK:STDOUT: !members:
  1031. // CHECK:STDOUT: .Self = constants.%Y2
  1032. // CHECK:STDOUT: }
  1033. // CHECK:STDOUT:
  1034. // CHECK:STDOUT: class @Z {
  1035. // CHECK:STDOUT: %complete_type: <witness> = complete_type_witness constants.%empty_struct_type [concrete = constants.%complete_type.357]
  1036. // CHECK:STDOUT: complete_type_witness = %complete_type
  1037. // CHECK:STDOUT:
  1038. // CHECK:STDOUT: !members:
  1039. // CHECK:STDOUT: .Self = constants.%Z
  1040. // CHECK:STDOUT: }
  1041. // CHECK:STDOUT:
  1042. // CHECK:STDOUT: generic fn @A.WithSelf.F(@A.%T.loc5_13.2: type, @A.%Self.loc5_23.1: @A.%A.type (%A.type.ade), %U.loc6_8.2: type) {
  1043. // CHECK:STDOUT: %U.loc6_8.1: type = symbolic_binding U, 2 [symbolic = %U.loc6_8.1 (constants.%U.4e7)]
  1044. // CHECK:STDOUT: %pattern_type.loc6_18: type = pattern_type %U.loc6_8.1 [symbolic = %pattern_type.loc6_18 (constants.%pattern_type.62e)]
  1045. // CHECK:STDOUT: %T: type = symbolic_binding T, 0 [symbolic = %T (constants.%T.67d)]
  1046. // CHECK:STDOUT: %A.type: type = facet_type <@A, @A(%T)> [symbolic = %A.type (constants.%A.type.ade)]
  1047. // CHECK:STDOUT: %Self: @A.WithSelf.F.%A.type (%A.type.ade) = symbolic_binding Self, 1 [symbolic = %Self (constants.%Self.362)]
  1048. // CHECK:STDOUT: %tuple.type.loc6_38.1: type = tuple_type (type, %A.type, type) [symbolic = %tuple.type.loc6_38.1 (constants.%tuple.type.f2d)]
  1049. // CHECK:STDOUT: %tuple: @A.WithSelf.F.%tuple.type.loc6_38.1 (%tuple.type.f2d) = tuple_value (%T, %Self, %U.loc6_8.1) [symbolic = %tuple (constants.%tuple.f25)]
  1050. // CHECK:STDOUT: %Self.binding.as_type: type = symbolic_binding_type Self, 1, %Self [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type.7ec)]
  1051. // CHECK:STDOUT: %tuple.type.loc6_38.2: type = tuple_type (%T, %Self.binding.as_type, %U.loc6_8.1) [symbolic = %tuple.type.loc6_38.2 (constants.%tuple.type.7f3)]
  1052. // CHECK:STDOUT: %.loc6_38.1: Core.Form = init_form %tuple.type.loc6_38.2 [symbolic = %.loc6_38.1 (constants.%.0ad)]
  1053. // CHECK:STDOUT: %pattern_type.loc6_24: type = pattern_type %tuple.type.loc6_38.2 [symbolic = %pattern_type.loc6_24 (constants.%pattern_type.22d)]
  1054. // CHECK:STDOUT:
  1055. // CHECK:STDOUT: fn(%u.param: @A.WithSelf.F.%U.loc6_8.1 (%U.4e7)) -> out %return.param: @A.WithSelf.F.%tuple.type.loc6_38.2 (%tuple.type.7f3);
  1056. // CHECK:STDOUT: }
  1057. // CHECK:STDOUT:
  1058. // CHECK:STDOUT: generic fn @tuple.type.as.A.impl.F(@tuple.type.as.A.impl.%V1.loc14_14.2: type, @tuple.type.as.A.impl.%V2.loc14_25.2: type, @tuple.type.as.A.impl.%W.loc14_36.2: type, %U.loc17_8.2: type) {
  1059. // CHECK:STDOUT: %U.loc17_8.1: type = symbolic_binding U, 3 [symbolic = %U.loc17_8.1 (constants.%U.ce4)]
  1060. // CHECK:STDOUT: %pattern_type.loc17_18: type = pattern_type %U.loc17_8.1 [symbolic = %pattern_type.loc17_18 (constants.%pattern_type.e4a)]
  1061. // CHECK:STDOUT: %W: type = symbolic_binding W, 2 [symbolic = %W (constants.%W)]
  1062. // CHECK:STDOUT: %V1: type = symbolic_binding V1, 0 [symbolic = %V1 (constants.%V1)]
  1063. // CHECK:STDOUT: %V2: type = symbolic_binding V2, 1 [symbolic = %V2 (constants.%V2)]
  1064. // CHECK:STDOUT: %tuple.loc17_38: %tuple.type.24b = tuple_value (%V1, %V2) [symbolic = %tuple.loc17_38 (constants.%tuple.4b9)]
  1065. // CHECK:STDOUT: %tuple.loc17_42: %tuple.type.11f = tuple_value (%W, %tuple.loc17_38, %U.loc17_8.1) [symbolic = %tuple.loc17_42 (constants.%tuple.117)]
  1066. // CHECK:STDOUT: %tuple.type.loc17_42.1: type = tuple_type (%V1, %V2) [symbolic = %tuple.type.loc17_42.1 (constants.%tuple.type.a5e)]
  1067. // CHECK:STDOUT: %tuple.type.loc17_42.2: type = tuple_type (%W, %tuple.type.loc17_42.1, %U.loc17_8.1) [symbolic = %tuple.type.loc17_42.2 (constants.%tuple.type.897)]
  1068. // CHECK:STDOUT: %.loc17_42.2: Core.Form = init_form %tuple.type.loc17_42.2 [symbolic = %.loc17_42.2 (constants.%.f8e)]
  1069. // CHECK:STDOUT: %pattern_type.loc17_24: type = pattern_type %tuple.type.loc17_42.2 [symbolic = %pattern_type.loc17_24 (constants.%pattern_type.5cc)]
  1070. // CHECK:STDOUT:
  1071. // CHECK:STDOUT: !definition:
  1072. // CHECK:STDOUT: %require_complete.loc17_19: <witness> = require_complete_type %U.loc17_8.1 [symbolic = %require_complete.loc17_19 (constants.%require_complete.5a4)]
  1073. // CHECK:STDOUT: %require_complete.loc17_42: <witness> = require_complete_type %tuple.type.loc17_42.2 [symbolic = %require_complete.loc17_42 (constants.%require_complete.da0)]
  1074. // 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)]
  1075. // 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)]
  1076. // CHECK:STDOUT: %tuple.type.as.A.impl.F.specific_fn.loc18_12.2: <specific function> = specific_function %tuple.type.as.A.impl.F, @tuple.type.as.A.impl.F(%V1, %V2, %W, %U.loc17_8.1) [symbolic = %tuple.type.as.A.impl.F.specific_fn.loc18_12.2 (constants.%tuple.type.as.A.impl.F.specific_fn.009)]
  1077. // CHECK:STDOUT:
  1078. // CHECK:STDOUT: fn(%u.param: @tuple.type.as.A.impl.F.%U.loc17_8.1 (%U.ce4)) -> out %return.param: @tuple.type.as.A.impl.F.%tuple.type.loc17_42.2 (%tuple.type.897) {
  1079. // CHECK:STDOUT: !entry:
  1080. // 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)]
  1081. // 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)]
  1082. // CHECK:STDOUT: %U.ref.loc18: type = name_ref U, %U.loc17_8.2 [symbolic = %U.loc17_8.1 (constants.%U.ce4)]
  1083. // CHECK:STDOUT: %u.ref: @tuple.type.as.A.impl.F.%U.loc17_8.1 (%U.ce4) = name_ref u, %u
  1084. // 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)]
  1085. // CHECK:STDOUT: %.loc17_42.1: ref @tuple.type.as.A.impl.F.%tuple.type.loc17_42.2 (%tuple.type.897) = splice_block %return.param {}
  1086. // 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)
  1087. // CHECK:STDOUT: return %tuple.type.as.A.impl.F.call to %return.param
  1088. // CHECK:STDOUT: }
  1089. // CHECK:STDOUT: }
  1090. // CHECK:STDOUT:
  1091. // CHECK:STDOUT: fn @Call() {
  1092. // CHECK:STDOUT: !entry:
  1093. // CHECK:STDOUT: %Y1.ref: type = name_ref Y1, file.%Y1.decl [concrete = constants.%Y1]
  1094. // CHECK:STDOUT: %Y2.ref: type = name_ref Y2, file.%Y2.decl [concrete = constants.%Y2]
  1095. // CHECK:STDOUT: %.loc24_12: %tuple.type.24b = tuple_literal (%Y1.ref, %Y2.ref) [concrete = constants.%tuple.dd5]
  1096. // CHECK:STDOUT: %.loc24_17: type = type_literal type [concrete = type]
  1097. // CHECK:STDOUT: %.loc24_14: type = converted %.loc24_12, constants.%tuple.type.ab2 [concrete = constants.%tuple.type.ab2]
  1098. // CHECK:STDOUT: %A.ref: %A.type.464 = name_ref A, file.%A.decl [concrete = constants.%A.generic]
  1099. // CHECK:STDOUT: %X.ref: type = name_ref X, file.%X.decl [concrete = constants.%X]
  1100. // CHECK:STDOUT: %A.type: type = facet_type <@A, @A(constants.%X)> [concrete = constants.%A.type.ab6]
  1101. // CHECK:STDOUT: %A.facet: %A.type.ab6 = facet_value %.loc24_14, (constants.%A.impl_witness.b3a) [concrete = constants.%A.facet.906]
  1102. // CHECK:STDOUT: %.loc24_23: %A.type.ab6 = converted %.loc24_14, %A.facet [concrete = constants.%A.facet.906]
  1103. // CHECK:STDOUT: %as_type: type = facet_access_type %.loc24_23 [concrete = constants.%tuple.type.ab2]
  1104. // CHECK:STDOUT: %.loc24_31.1: type = converted %.loc24_23, %as_type [concrete = constants.%tuple.type.ab2]
  1105. // 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]
  1106. // CHECK:STDOUT: %F.ref: %A.assoc_type.f05 = name_ref F, %.loc24_31.2 [concrete = constants.%assoc0.368]
  1107. // CHECK:STDOUT: %impl.elem0: %.fa2 = impl_witness_access constants.%A.impl_witness.b3a, element0 [concrete = constants.%tuple.type.as.A.impl.F.cc8]
  1108. // CHECK:STDOUT: %Z.ref: type = name_ref Z, file.%Z.decl [concrete = constants.%Z]
  1109. // CHECK:STDOUT: %.loc24_38.1: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct]
  1110. // 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]
  1111. // CHECK:STDOUT: %.loc24_39.1: ref %tuple.type.65a = temporary_storage
  1112. // CHECK:STDOUT: %.loc24_38.2: ref %Z = temporary_storage
  1113. // CHECK:STDOUT: %.loc24_38.3: init %Z to %.loc24_38.2 = class_init () [concrete = constants.%Z.val]
  1114. // CHECK:STDOUT: %.loc24_38.4: init %Z = converted %.loc24_38.1, %.loc24_38.3 [concrete = constants.%Z.val]
  1115. // CHECK:STDOUT: %.loc24_38.5: ref %Z = temporary %.loc24_38.2, %.loc24_38.4
  1116. // CHECK:STDOUT: %.loc24_38.6: %Z = acquire_value %.loc24_38.5
  1117. // CHECK:STDOUT: %tuple.type.as.A.impl.F.call: init %tuple.type.65a to %.loc24_39.1 = call %specific_fn(%.loc24_38.6)
  1118. // CHECK:STDOUT: %.loc24_39.2: ref %tuple.type.65a = temporary %.loc24_39.1, %tuple.type.as.A.impl.F.call
  1119. // CHECK:STDOUT: %Destroy.Op.bound.loc24_39: <bound method> = bound_method %.loc24_39.2, constants.%Destroy.Op.651ba6.1
  1120. // CHECK:STDOUT: %Destroy.Op.call.loc24_39: init %empty_tuple.type = call %Destroy.Op.bound.loc24_39(%.loc24_39.2)
  1121. // CHECK:STDOUT: %Destroy.Op.bound.loc24_38: <bound method> = bound_method %.loc24_38.5, constants.%Destroy.Op.651ba6.2
  1122. // CHECK:STDOUT: %Destroy.Op.call.loc24_38: init %empty_tuple.type = call %Destroy.Op.bound.loc24_38(%.loc24_38.5)
  1123. // CHECK:STDOUT: return
  1124. // CHECK:STDOUT: }
  1125. // CHECK:STDOUT:
  1126. // CHECK:STDOUT: fn @Destroy.Op.loc24_39(%self.param: ref %tuple.type.65a) = "no_op";
  1127. // CHECK:STDOUT:
  1128. // CHECK:STDOUT: fn @Destroy.Op.loc24_38(%self.param: ref %Z) = "no_op";
  1129. // CHECK:STDOUT:
  1130. // CHECK:STDOUT: generic fn @CallGeneric(%T.loc27_16.2: %A.type.ab6) {
  1131. // CHECK:STDOUT: %T.loc27_16.1: %A.type.ab6 = symbolic_binding T, 0 [symbolic = %T.loc27_16.1 (constants.%T.2bc)]
  1132. // CHECK:STDOUT:
  1133. // CHECK:STDOUT: !definition:
  1134. // CHECK:STDOUT: %T.binding.as_type: type = symbolic_binding_type T, 0, %T.loc27_16.1 [symbolic = %T.binding.as_type (constants.%T.binding.as_type)]
  1135. // CHECK:STDOUT: %A.lookup_impl_witness: <witness> = lookup_impl_witness %T.loc27_16.1, @A, @A(constants.%X) [symbolic = %A.lookup_impl_witness (constants.%A.lookup_impl_witness)]
  1136. // CHECK:STDOUT: %A.WithSelf.F.type: type = fn_type @A.WithSelf.F, @A.WithSelf(constants.%X, %T.loc27_16.1) [symbolic = %A.WithSelf.F.type (constants.%A.WithSelf.F.type.f08)]
  1137. // CHECK:STDOUT: %.loc28_4.3: type = fn_type_with_self_type %A.WithSelf.F.type, %T.loc27_16.1 [symbolic = %.loc28_4.3 (constants.%.189)]
  1138. // CHECK:STDOUT: %impl.elem0.loc28_4.2: @CallGeneric.%.loc28_4.3 (%.189) = impl_witness_access %A.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc28_4.2 (constants.%impl.elem0.86f)]
  1139. // CHECK:STDOUT: %specific_impl_fn.loc28_4.2: <specific function> = specific_impl_function %impl.elem0.loc28_4.2, @A.WithSelf.F(constants.%X, %T.loc27_16.1, constants.%Z) [symbolic = %specific_impl_fn.loc28_4.2 (constants.%specific_impl_fn.44b)]
  1140. // CHECK:STDOUT: %tuple.type: type = tuple_type (constants.%X, %T.binding.as_type, constants.%Z) [symbolic = %tuple.type (constants.%tuple.type.856)]
  1141. // CHECK:STDOUT: %require_complete: <witness> = require_complete_type %tuple.type [symbolic = %require_complete (constants.%require_complete.7d4)]
  1142. // CHECK:STDOUT: %Destroy.lookup_impl_witness: <witness> = lookup_impl_witness %tuple.type, @Destroy [symbolic = %Destroy.lookup_impl_witness (constants.%Destroy.lookup_impl_witness)]
  1143. // CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %tuple.type, (%Destroy.lookup_impl_witness) [symbolic = %Destroy.facet (constants.%Destroy.facet.a1c)]
  1144. // 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.725)]
  1145. // CHECK:STDOUT: %.loc28_12.3: type = fn_type_with_self_type %Destroy.WithSelf.Op.type, %Destroy.facet [symbolic = %.loc28_12.3 (constants.%.949)]
  1146. // CHECK:STDOUT: %impl.elem0.loc28_12.2: @CallGeneric.%.loc28_12.3 (%.949) = impl_witness_access %Destroy.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc28_12.2 (constants.%impl.elem0.487)]
  1147. // 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.56d)]
  1148. // CHECK:STDOUT:
  1149. // CHECK:STDOUT: fn() {
  1150. // CHECK:STDOUT: !entry:
  1151. // CHECK:STDOUT: %T.ref: %A.type.ab6 = name_ref T, %T.loc27_16.2 [symbolic = %T.loc27_16.1 (constants.%T.2bc)]
  1152. // CHECK:STDOUT: %T.as_type: type = facet_access_type %T.ref [symbolic = %T.binding.as_type (constants.%T.binding.as_type)]
  1153. // CHECK:STDOUT: %.loc28_4.1: type = converted %T.ref, %T.as_type [symbolic = %T.binding.as_type (constants.%T.binding.as_type)]
  1154. // CHECK:STDOUT: %.loc28_4.2: %A.assoc_type.f05 = specific_constant @A.WithSelf.%assoc0.loc6_39.1, @A.WithSelf(constants.%X, constants.%T.2bc) [concrete = constants.%assoc0.368]
  1155. // CHECK:STDOUT: %F.ref: %A.assoc_type.f05 = name_ref F, %.loc28_4.2 [concrete = constants.%assoc0.368]
  1156. // CHECK:STDOUT: %impl.elem0.loc28_4.1: @CallGeneric.%.loc28_4.3 (%.189) = impl_witness_access constants.%A.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc28_4.2 (constants.%impl.elem0.86f)]
  1157. // CHECK:STDOUT: %Z.ref: type = name_ref Z, file.%Z.decl [concrete = constants.%Z]
  1158. // CHECK:STDOUT: %.loc28_11.1: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct]
  1159. // CHECK:STDOUT: %specific_impl_fn.loc28_4.1: <specific function> = specific_impl_function %impl.elem0.loc28_4.1, @A.WithSelf.F(constants.%X, constants.%T.2bc, constants.%Z) [symbolic = %specific_impl_fn.loc28_4.2 (constants.%specific_impl_fn.44b)]
  1160. // CHECK:STDOUT: %.loc28_12.1: ref @CallGeneric.%tuple.type (%tuple.type.856) = temporary_storage
  1161. // CHECK:STDOUT: %.loc28_11.2: ref %Z = temporary_storage
  1162. // CHECK:STDOUT: %.loc28_11.3: init %Z to %.loc28_11.2 = class_init () [concrete = constants.%Z.val]
  1163. // CHECK:STDOUT: %.loc28_11.4: init %Z = converted %.loc28_11.1, %.loc28_11.3 [concrete = constants.%Z.val]
  1164. // CHECK:STDOUT: %.loc28_11.5: ref %Z = temporary %.loc28_11.2, %.loc28_11.4
  1165. // CHECK:STDOUT: %.loc28_11.6: %Z = acquire_value %.loc28_11.5
  1166. // CHECK:STDOUT: %A.WithSelf.F.call: init @CallGeneric.%tuple.type (%tuple.type.856) to %.loc28_12.1 = call %specific_impl_fn.loc28_4.1(%.loc28_11.6)
  1167. // CHECK:STDOUT: %.loc28_12.2: ref @CallGeneric.%tuple.type (%tuple.type.856) = temporary %.loc28_12.1, %A.WithSelf.F.call
  1168. // CHECK:STDOUT: %impl.elem0.loc28_12.1: @CallGeneric.%.loc28_12.3 (%.949) = impl_witness_access constants.%Destroy.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc28_12.2 (constants.%impl.elem0.487)]
  1169. // CHECK:STDOUT: %bound_method.loc28_12.1: <bound method> = bound_method %.loc28_12.2, %impl.elem0.loc28_12.1
  1170. // CHECK:STDOUT: %specific_impl_fn.loc28_12.1: <specific function> = specific_impl_function %impl.elem0.loc28_12.1, @Destroy.WithSelf.Op(constants.%Destroy.facet.a1c) [symbolic = %specific_impl_fn.loc28_12.2 (constants.%specific_impl_fn.56d)]
  1171. // CHECK:STDOUT: %bound_method.loc28_12.2: <bound method> = bound_method %.loc28_12.2, %specific_impl_fn.loc28_12.1
  1172. // CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call %bound_method.loc28_12.2(%.loc28_12.2)
  1173. // CHECK:STDOUT: %Destroy.Op.bound: <bound method> = bound_method %.loc28_11.5, constants.%Destroy.Op.651ba6.2
  1174. // CHECK:STDOUT: %Destroy.Op.call: init %empty_tuple.type = call %Destroy.Op.bound(%.loc28_11.5)
  1175. // CHECK:STDOUT: return
  1176. // CHECK:STDOUT: }
  1177. // CHECK:STDOUT: }
  1178. // CHECK:STDOUT:
  1179. // CHECK:STDOUT: fn @CallIndirect() {
  1180. // CHECK:STDOUT: !entry:
  1181. // CHECK:STDOUT: %CallGeneric.ref: %CallGeneric.type = name_ref CallGeneric, file.%CallGeneric.decl [concrete = constants.%CallGeneric]
  1182. // CHECK:STDOUT: %Y1.ref: type = name_ref Y1, file.%Y1.decl [concrete = constants.%Y1]
  1183. // CHECK:STDOUT: %Y2.ref: type = name_ref Y2, file.%Y2.decl [concrete = constants.%Y2]
  1184. // CHECK:STDOUT: %.loc33_22: %tuple.type.24b = tuple_literal (%Y1.ref, %Y2.ref) [concrete = constants.%tuple.dd5]
  1185. // CHECK:STDOUT: %.loc33_27: type = type_literal type [concrete = type]
  1186. // CHECK:STDOUT: %.loc33_24: type = converted %.loc33_22, constants.%tuple.type.ab2 [concrete = constants.%tuple.type.ab2]
  1187. // CHECK:STDOUT: %A.facet: %A.type.ab6 = facet_value %.loc33_24, (constants.%A.impl_witness.b3a) [concrete = constants.%A.facet.906]
  1188. // CHECK:STDOUT: %.loc33_31: %A.type.ab6 = converted %.loc33_24, %A.facet [concrete = constants.%A.facet.906]
  1189. // CHECK:STDOUT: %CallGeneric.specific_fn: <specific function> = specific_function %CallGeneric.ref, @CallGeneric(constants.%A.facet.906) [concrete = constants.%CallGeneric.specific_fn]
  1190. // CHECK:STDOUT: %CallGeneric.call: init %empty_tuple.type = call %CallGeneric.specific_fn()
  1191. // CHECK:STDOUT: return
  1192. // CHECK:STDOUT: }
  1193. // CHECK:STDOUT:
  1194. // CHECK:STDOUT: specific @A(constants.%T.67d) {
  1195. // CHECK:STDOUT: %T.loc5_13.1 => constants.%T.67d
  1196. // CHECK:STDOUT: }
  1197. // CHECK:STDOUT:
  1198. // CHECK:STDOUT: specific @A.WithSelf(constants.%T.67d, constants.%Self.362) {}
  1199. // CHECK:STDOUT:
  1200. // CHECK:STDOUT: specific @A.WithSelf.F(constants.%T.67d, constants.%Self.362, constants.%U.4e7) {
  1201. // CHECK:STDOUT: %U.loc6_8.1 => constants.%U.4e7
  1202. // CHECK:STDOUT: %pattern_type.loc6_18 => constants.%pattern_type.62e
  1203. // CHECK:STDOUT: %T => constants.%T.67d
  1204. // CHECK:STDOUT: %A.type => constants.%A.type.ade
  1205. // CHECK:STDOUT: %Self => constants.%Self.362
  1206. // CHECK:STDOUT: %tuple.type.loc6_38.1 => constants.%tuple.type.f2d
  1207. // CHECK:STDOUT: %tuple => constants.%tuple.f25
  1208. // CHECK:STDOUT: %Self.binding.as_type => constants.%Self.binding.as_type.7ec
  1209. // CHECK:STDOUT: %tuple.type.loc6_38.2 => constants.%tuple.type.7f3
  1210. // CHECK:STDOUT: %.loc6_38.1 => constants.%.0ad
  1211. // CHECK:STDOUT: %pattern_type.loc6_24 => constants.%pattern_type.22d
  1212. // CHECK:STDOUT: }
  1213. // CHECK:STDOUT:
  1214. // CHECK:STDOUT: specific @A(constants.%W) {
  1215. // CHECK:STDOUT: %T.loc5_13.1 => constants.%W
  1216. // CHECK:STDOUT:
  1217. // CHECK:STDOUT: !definition:
  1218. // CHECK:STDOUT: %A.type => constants.%A.type.fe7
  1219. // CHECK:STDOUT: %Self.loc5_23.2 => constants.%Self.d33
  1220. // CHECK:STDOUT: }
  1221. // CHECK:STDOUT:
  1222. // CHECK:STDOUT: specific @tuple.type.as.A.impl(constants.%V1, constants.%V2, constants.%W) {
  1223. // CHECK:STDOUT: %V1.loc14_14.1 => constants.%V1
  1224. // CHECK:STDOUT: %V2.loc14_25.1 => constants.%V2
  1225. // CHECK:STDOUT: %W.loc14_36.1 => constants.%W
  1226. // CHECK:STDOUT: %tuple => constants.%tuple.4b9
  1227. // CHECK:STDOUT: %tuple.type => constants.%tuple.type.a5e
  1228. // CHECK:STDOUT: %A.type.loc14_61.1 => constants.%A.type.fe7
  1229. // CHECK:STDOUT: %A.impl_witness.loc14_63.2 => constants.%A.impl_witness.be2
  1230. // CHECK:STDOUT:
  1231. // CHECK:STDOUT: !definition:
  1232. // CHECK:STDOUT: %require_complete => constants.%require_complete.9a5
  1233. // CHECK:STDOUT: %tuple.type.as.A.impl.F.type => constants.%tuple.type.as.A.impl.F.type.ce6
  1234. // CHECK:STDOUT: %tuple.type.as.A.impl.F => constants.%tuple.type.as.A.impl.F.74d
  1235. // CHECK:STDOUT: }
  1236. // CHECK:STDOUT:
  1237. // CHECK:STDOUT: specific @A.WithSelf(constants.%W, constants.%Self.362) {
  1238. // CHECK:STDOUT: !definition:
  1239. // CHECK:STDOUT: %T => constants.%W
  1240. // CHECK:STDOUT: %A.type => constants.%A.type.fe7
  1241. // CHECK:STDOUT: %Self => constants.%Self.362
  1242. // CHECK:STDOUT: %A.WithSelf.F.type => constants.%A.WithSelf.F.type.986
  1243. // CHECK:STDOUT: %A.WithSelf.F => constants.%A.WithSelf.F.0f5
  1244. // CHECK:STDOUT: %A.assoc_type => constants.%A.assoc_type.7a9
  1245. // CHECK:STDOUT: %assoc0.loc6_39.2 => constants.%assoc0.dfc
  1246. // CHECK:STDOUT: }
  1247. // CHECK:STDOUT:
  1248. // CHECK:STDOUT: specific @tuple.type.as.A.impl.F(constants.%V1, constants.%V2, constants.%W, constants.%U.ce4) {
  1249. // CHECK:STDOUT: %U.loc17_8.1 => constants.%U.ce4
  1250. // CHECK:STDOUT: %pattern_type.loc17_18 => constants.%pattern_type.e4a
  1251. // CHECK:STDOUT: %W => constants.%W
  1252. // CHECK:STDOUT: %V1 => constants.%V1
  1253. // CHECK:STDOUT: %V2 => constants.%V2
  1254. // CHECK:STDOUT: %tuple.loc17_38 => constants.%tuple.4b9
  1255. // CHECK:STDOUT: %tuple.loc17_42 => constants.%tuple.117
  1256. // CHECK:STDOUT: %tuple.type.loc17_42.1 => constants.%tuple.type.a5e
  1257. // CHECK:STDOUT: %tuple.type.loc17_42.2 => constants.%tuple.type.897
  1258. // CHECK:STDOUT: %.loc17_42.2 => constants.%.f8e
  1259. // CHECK:STDOUT: %pattern_type.loc17_24 => constants.%pattern_type.5cc
  1260. // CHECK:STDOUT:
  1261. // CHECK:STDOUT: !definition:
  1262. // CHECK:STDOUT: %require_complete.loc17_19 => constants.%require_complete.5a4
  1263. // CHECK:STDOUT: %require_complete.loc17_42 => constants.%require_complete.da0
  1264. // CHECK:STDOUT: %tuple.type.as.A.impl.F.type => constants.%tuple.type.as.A.impl.F.type.ce6
  1265. // CHECK:STDOUT: %tuple.type.as.A.impl.F => constants.%tuple.type.as.A.impl.F.74d
  1266. // CHECK:STDOUT: %tuple.type.as.A.impl.F.specific_fn.loc18_12.2 => constants.%tuple.type.as.A.impl.F.specific_fn.009
  1267. // CHECK:STDOUT: }
  1268. // CHECK:STDOUT:
  1269. // CHECK:STDOUT: specific @A.WithSelf(constants.%W, constants.%A.facet.56b) {
  1270. // CHECK:STDOUT: !definition:
  1271. // CHECK:STDOUT: %T => constants.%W
  1272. // CHECK:STDOUT: %A.type => constants.%A.type.fe7
  1273. // CHECK:STDOUT: %Self => constants.%A.facet.56b
  1274. // CHECK:STDOUT: %A.WithSelf.F.type => constants.%A.WithSelf.F.type.104
  1275. // CHECK:STDOUT: %A.WithSelf.F => constants.%A.WithSelf.F.028
  1276. // CHECK:STDOUT: %A.assoc_type => constants.%A.assoc_type.7a9
  1277. // CHECK:STDOUT: %assoc0.loc6_39.2 => constants.%assoc0.dfc
  1278. // CHECK:STDOUT: }
  1279. // CHECK:STDOUT:
  1280. // CHECK:STDOUT: specific @A.WithSelf.F(constants.%W, constants.%A.facet.56b, constants.%U.ce4) {
  1281. // CHECK:STDOUT: %U.loc6_8.1 => constants.%U.ce4
  1282. // CHECK:STDOUT: %pattern_type.loc6_18 => constants.%pattern_type.e4a
  1283. // CHECK:STDOUT: %T => constants.%W
  1284. // CHECK:STDOUT: %A.type => constants.%A.type.fe7
  1285. // CHECK:STDOUT: %Self => constants.%A.facet.56b
  1286. // CHECK:STDOUT: %tuple.type.loc6_38.1 => constants.%tuple.type.52a
  1287. // CHECK:STDOUT: %tuple => constants.%tuple.ec4
  1288. // CHECK:STDOUT: %Self.binding.as_type => constants.%tuple.type.a5e
  1289. // CHECK:STDOUT: %tuple.type.loc6_38.2 => constants.%tuple.type.897
  1290. // CHECK:STDOUT: %.loc6_38.1 => constants.%.f8e
  1291. // CHECK:STDOUT: %pattern_type.loc6_24 => constants.%pattern_type.5cc
  1292. // CHECK:STDOUT: }
  1293. // CHECK:STDOUT:
  1294. // CHECK:STDOUT: specific @A(constants.%X) {
  1295. // CHECK:STDOUT: %T.loc5_13.1 => constants.%X
  1296. // CHECK:STDOUT:
  1297. // CHECK:STDOUT: !definition:
  1298. // CHECK:STDOUT: %A.type => constants.%A.type.ab6
  1299. // CHECK:STDOUT: %Self.loc5_23.2 => constants.%Self.e87
  1300. // CHECK:STDOUT: }
  1301. // CHECK:STDOUT:
  1302. // CHECK:STDOUT: specific @tuple.type.as.A.impl(constants.%Y1, constants.%Y2, constants.%X) {
  1303. // CHECK:STDOUT: %V1.loc14_14.1 => constants.%Y1
  1304. // CHECK:STDOUT: %V2.loc14_25.1 => constants.%Y2
  1305. // CHECK:STDOUT: %W.loc14_36.1 => constants.%X
  1306. // CHECK:STDOUT: %tuple => constants.%tuple.dd5
  1307. // CHECK:STDOUT: %tuple.type => constants.%tuple.type.ab2
  1308. // CHECK:STDOUT: %A.type.loc14_61.1 => constants.%A.type.ab6
  1309. // CHECK:STDOUT: %A.impl_witness.loc14_63.2 => constants.%A.impl_witness.b3a
  1310. // CHECK:STDOUT:
  1311. // CHECK:STDOUT: !definition:
  1312. // CHECK:STDOUT: %require_complete => constants.%complete_type.a36
  1313. // CHECK:STDOUT: %tuple.type.as.A.impl.F.type => constants.%tuple.type.as.A.impl.F.type.d14
  1314. // CHECK:STDOUT: %tuple.type.as.A.impl.F => constants.%tuple.type.as.A.impl.F.cc8
  1315. // CHECK:STDOUT: }
  1316. // CHECK:STDOUT:
  1317. // CHECK:STDOUT: specific @A.WithSelf(constants.%X, constants.%Self.362) {
  1318. // CHECK:STDOUT: !definition:
  1319. // CHECK:STDOUT: %T => constants.%X
  1320. // CHECK:STDOUT: %A.type => constants.%A.type.ab6
  1321. // CHECK:STDOUT: %Self => constants.%Self.362
  1322. // CHECK:STDOUT: %A.WithSelf.F.type => constants.%A.WithSelf.F.type.ba2
  1323. // CHECK:STDOUT: %A.WithSelf.F => constants.%A.WithSelf.F.e5f
  1324. // CHECK:STDOUT: %A.assoc_type => constants.%A.assoc_type.f05
  1325. // CHECK:STDOUT: %assoc0.loc6_39.2 => constants.%assoc0.368
  1326. // CHECK:STDOUT: }
  1327. // CHECK:STDOUT:
  1328. // CHECK:STDOUT: specific @A.WithSelf(constants.%X, constants.%A.facet.906) {
  1329. // CHECK:STDOUT: !definition:
  1330. // CHECK:STDOUT: %T => constants.%X
  1331. // CHECK:STDOUT: %A.type => constants.%A.type.ab6
  1332. // CHECK:STDOUT: %Self => constants.%A.facet.906
  1333. // CHECK:STDOUT: %A.WithSelf.F.type => constants.%A.WithSelf.F.type.757
  1334. // CHECK:STDOUT: %A.WithSelf.F => constants.%A.WithSelf.F.8b6
  1335. // CHECK:STDOUT: %A.assoc_type => constants.%A.assoc_type.f05
  1336. // CHECK:STDOUT: %assoc0.loc6_39.2 => constants.%assoc0.368
  1337. // CHECK:STDOUT: }
  1338. // CHECK:STDOUT:
  1339. // CHECK:STDOUT: specific @tuple.type.as.A.impl.F(constants.%Y1, constants.%Y2, constants.%X, constants.%Z) {
  1340. // CHECK:STDOUT: %U.loc17_8.1 => constants.%Z
  1341. // CHECK:STDOUT: %pattern_type.loc17_18 => constants.%pattern_type.bdb
  1342. // CHECK:STDOUT: %W => constants.%X
  1343. // CHECK:STDOUT: %V1 => constants.%Y1
  1344. // CHECK:STDOUT: %V2 => constants.%Y2
  1345. // CHECK:STDOUT: %tuple.loc17_38 => constants.%tuple.dd5
  1346. // CHECK:STDOUT: %tuple.loc17_42 => constants.%tuple.66d
  1347. // CHECK:STDOUT: %tuple.type.loc17_42.1 => constants.%tuple.type.ab2
  1348. // CHECK:STDOUT: %tuple.type.loc17_42.2 => constants.%tuple.type.65a
  1349. // CHECK:STDOUT: %.loc17_42.2 => constants.%.241
  1350. // CHECK:STDOUT: %pattern_type.loc17_24 => constants.%pattern_type.30b
  1351. // CHECK:STDOUT:
  1352. // CHECK:STDOUT: !definition:
  1353. // CHECK:STDOUT: %require_complete.loc17_19 => constants.%complete_type.357
  1354. // CHECK:STDOUT: %require_complete.loc17_42 => constants.%complete_type.cf2
  1355. // CHECK:STDOUT: %tuple.type.as.A.impl.F.type => constants.%tuple.type.as.A.impl.F.type.d14
  1356. // CHECK:STDOUT: %tuple.type.as.A.impl.F => constants.%tuple.type.as.A.impl.F.cc8
  1357. // CHECK:STDOUT: %tuple.type.as.A.impl.F.specific_fn.loc18_12.2 => constants.%tuple.type.as.A.impl.F.specific_fn.af6
  1358. // CHECK:STDOUT: }
  1359. // CHECK:STDOUT:
  1360. // CHECK:STDOUT: specific @CallGeneric(constants.%T.2bc) {
  1361. // CHECK:STDOUT: %T.loc27_16.1 => constants.%T.2bc
  1362. // CHECK:STDOUT: }
  1363. // CHECK:STDOUT:
  1364. // CHECK:STDOUT: specific @A.WithSelf(constants.%X, constants.%T.2bc) {
  1365. // CHECK:STDOUT: !definition:
  1366. // CHECK:STDOUT: %T => constants.%X
  1367. // CHECK:STDOUT: %A.type => constants.%A.type.ab6
  1368. // CHECK:STDOUT: %Self => constants.%T.2bc
  1369. // CHECK:STDOUT: %A.WithSelf.F.type => constants.%A.WithSelf.F.type.f08
  1370. // CHECK:STDOUT: %A.WithSelf.F => constants.%A.WithSelf.F.7ad
  1371. // CHECK:STDOUT: %A.assoc_type => constants.%A.assoc_type.f05
  1372. // CHECK:STDOUT: %assoc0.loc6_39.2 => constants.%assoc0.368
  1373. // CHECK:STDOUT: }
  1374. // CHECK:STDOUT:
  1375. // CHECK:STDOUT: specific @A.WithSelf.F(constants.%X, constants.%T.2bc, constants.%Z) {
  1376. // CHECK:STDOUT: %U.loc6_8.1 => constants.%Z
  1377. // CHECK:STDOUT: %pattern_type.loc6_18 => constants.%pattern_type.bdb
  1378. // CHECK:STDOUT: %T => constants.%X
  1379. // CHECK:STDOUT: %A.type => constants.%A.type.ab6
  1380. // CHECK:STDOUT: %Self => constants.%T.2bc
  1381. // CHECK:STDOUT: %tuple.type.loc6_38.1 => constants.%tuple.type.f96
  1382. // CHECK:STDOUT: %tuple => constants.%tuple.631
  1383. // CHECK:STDOUT: %Self.binding.as_type => constants.%T.binding.as_type
  1384. // CHECK:STDOUT: %tuple.type.loc6_38.2 => constants.%tuple.type.856
  1385. // CHECK:STDOUT: %.loc6_38.1 => constants.%.5b0
  1386. // CHECK:STDOUT: %pattern_type.loc6_24 => constants.%pattern_type.4b2
  1387. // CHECK:STDOUT: }
  1388. // CHECK:STDOUT:
  1389. // CHECK:STDOUT: specific @CallGeneric(constants.%A.facet.906) {
  1390. // CHECK:STDOUT: %T.loc27_16.1 => constants.%A.facet.906
  1391. // CHECK:STDOUT:
  1392. // CHECK:STDOUT: !definition:
  1393. // CHECK:STDOUT: %T.binding.as_type => constants.%tuple.type.ab2
  1394. // CHECK:STDOUT: %A.lookup_impl_witness => constants.%A.impl_witness.b3a
  1395. // CHECK:STDOUT: %A.WithSelf.F.type => constants.%A.WithSelf.F.type.757
  1396. // CHECK:STDOUT: %.loc28_4.3 => constants.%.fa2
  1397. // CHECK:STDOUT: %impl.elem0.loc28_4.2 => constants.%tuple.type.as.A.impl.F.cc8
  1398. // CHECK:STDOUT: %specific_impl_fn.loc28_4.2 => constants.%tuple.type.as.A.impl.F.specific_fn.af6
  1399. // CHECK:STDOUT: %tuple.type => constants.%tuple.type.65a
  1400. // CHECK:STDOUT: %require_complete => constants.%complete_type.cf2
  1401. // CHECK:STDOUT: %Destroy.lookup_impl_witness => constants.%custom_witness.8d7fae.1
  1402. // CHECK:STDOUT: %Destroy.facet => constants.%Destroy.facet.9fd
  1403. // CHECK:STDOUT: %Destroy.WithSelf.Op.type => constants.%Destroy.WithSelf.Op.type.d36
  1404. // CHECK:STDOUT: %.loc28_12.3 => constants.%.498
  1405. // CHECK:STDOUT: %impl.elem0.loc28_12.2 => constants.%Destroy.Op.651ba6.1
  1406. // CHECK:STDOUT: %specific_impl_fn.loc28_12.2 => constants.%Destroy.Op.651ba6.1
  1407. // CHECK:STDOUT: }
  1408. // CHECK:STDOUT:
  1409. // CHECK:STDOUT: specific @A.WithSelf.F(constants.%X, constants.%A.facet.906, constants.%Z) {
  1410. // CHECK:STDOUT: %U.loc6_8.1 => constants.%Z
  1411. // CHECK:STDOUT: %pattern_type.loc6_18 => constants.%pattern_type.bdb
  1412. // CHECK:STDOUT: %T => constants.%X
  1413. // CHECK:STDOUT: %A.type => constants.%A.type.ab6
  1414. // CHECK:STDOUT: %Self => constants.%A.facet.906
  1415. // CHECK:STDOUT: %tuple.type.loc6_38.1 => constants.%tuple.type.f96
  1416. // CHECK:STDOUT: %tuple => constants.%tuple.5e4
  1417. // CHECK:STDOUT: %Self.binding.as_type => constants.%tuple.type.ab2
  1418. // CHECK:STDOUT: %tuple.type.loc6_38.2 => constants.%tuple.type.65a
  1419. // CHECK:STDOUT: %.loc6_38.1 => constants.%.241
  1420. // CHECK:STDOUT: %pattern_type.loc6_24 => constants.%pattern_type.30b
  1421. // CHECK:STDOUT: }
  1422. // CHECK:STDOUT: