specialization_with_symbolic_rewrite.carbon 110 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559
  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/impl/lookup/specialization_with_symbolic_rewrite.carbon
  12. // TIP: To dump output, run:
  13. // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/check/testdata/impl/lookup/specialization_with_symbolic_rewrite.carbon
  14. // --- final_specialized_symbolic_rewrite.carbon
  15. library "[[@TEST_NAME]]";
  16. interface Z(T:! type) {
  17. let X:! type;
  18. }
  19. class C {}
  20. impl forall [T:! type, S:! type] T as Z(S) where .X = () {}
  21. final impl forall [T:! type] T as Z(C) where .X = T {}
  22. fn F(T:! Z(C), t: T) {
  23. // This should typecheck, the `final impl` should give the same `T`.
  24. let unused a: T.X = t;
  25. }
  26. // --- fail_nonfinal_specialized_symbolic_rewrite.carbon
  27. library "[[@TEST_NAME]]";
  28. interface Z(T:! type) {
  29. let X:! type;
  30. }
  31. interface Y {}
  32. class C {}
  33. impl forall [T:! type, S:! type] T as Z(S) where .X = () {}
  34. impl forall [T:! type] T as Z(C) where .X = T {}
  35. fn F(T:! Z(C), t: T) {
  36. // CHECK:STDERR: fail_nonfinal_specialized_symbolic_rewrite.carbon:[[@LINE+7]]:23: error: cannot implicitly convert expression of type `T` to `T.(Z(C).X)` [ConversionFailure]
  37. // CHECK:STDERR: let unused a: T.X = t;
  38. // CHECK:STDERR: ^
  39. // CHECK:STDERR: fail_nonfinal_specialized_symbolic_rewrite.carbon:[[@LINE+4]]:23: note: type `T` does not implement interface `Core.ImplicitAs(T.(Z(C).X))` [MissingImplInMemberAccessInContext]
  40. // CHECK:STDERR: let unused a: T.X = t;
  41. // CHECK:STDERR: ^
  42. // CHECK:STDERR:
  43. let unused a: T.X = t;
  44. }
  45. // --- final_impl_rewrite_of_symbolic_through_impl_lookup.carbon
  46. library "[[@TEST_NAME]]";
  47. interface Ptr {
  48. let Type:! type;
  49. }
  50. final impl forall [U:! type] U as Ptr where .Type = U* {}
  51. fn F[T:! type](var t: T) -> T.(Ptr.Type) {
  52. return &t;
  53. }
  54. // --- final_impl_rewrite_of_symbolic_through_facet_access_type.carbon
  55. library "[[@TEST_NAME]]";
  56. interface Ptr {
  57. let Type:! type;
  58. }
  59. final impl forall [U:! type] U as Ptr where .Type = U* {}
  60. fn F[T:! Ptr](var t: T) -> T.Type {
  61. return &t;
  62. }
  63. // --- final_impl_rewrite_of_symbolic_through_facet_value.carbon
  64. library "[[@TEST_NAME]]";
  65. interface Ptr {
  66. let Type:! type;
  67. }
  68. final impl forall [U:! type] U as Ptr where .Type = U* {}
  69. fn F[T:! Ptr](var t: T) -> T.(Ptr.Type) {
  70. return &t;
  71. }
  72. // CHECK:STDOUT: --- final_specialized_symbolic_rewrite.carbon
  73. // CHECK:STDOUT:
  74. // CHECK:STDOUT: constants {
  75. // CHECK:STDOUT: %type: type = facet_type <type> [concrete]
  76. // CHECK:STDOUT: %.Self.c39: %type = symbolic_binding .Self [symbolic_self]
  77. // CHECK:STDOUT: %pattern_type.98f: type = pattern_type type [concrete]
  78. // CHECK:STDOUT: %T.67d: type = symbolic_binding T, 0 [symbolic]
  79. // CHECK:STDOUT: %Z.type.352: type = generic_interface_type @Z [concrete]
  80. // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete]
  81. // CHECK:STDOUT: %Z.generic: %Z.type.352 = struct_value () [concrete]
  82. // CHECK:STDOUT: %Z.type.0ed: type = facet_type <@Z, @Z(%T.67d)> [symbolic]
  83. // CHECK:STDOUT: %Self.822: %Z.type.0ed = symbolic_binding Self, 1 [symbolic]
  84. // CHECK:STDOUT: %Z.assoc_type.0bf: type = assoc_entity_type @Z, @Z(%T.67d) [symbolic]
  85. // CHECK:STDOUT: %assoc0.f33: %Z.assoc_type.0bf = assoc_entity element0, @Z.WithSelf.%X [symbolic]
  86. // CHECK:STDOUT: %C: type = class_type @C [concrete]
  87. // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete]
  88. // CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %empty_struct_type [concrete]
  89. // CHECK:STDOUT: %S: type = symbolic_binding S, 1 [symbolic]
  90. // CHECK:STDOUT: %Z.type.4d0: type = facet_type <@Z, @Z(%S)> [symbolic]
  91. // CHECK:STDOUT: %.Self.90f: %Z.type.4d0 = symbolic_binding .Self [symbolic]
  92. // CHECK:STDOUT: %Self.427: %Z.type.4d0 = symbolic_binding Self, 1 [symbolic]
  93. // CHECK:STDOUT: %Z.assoc_type.5b2: type = assoc_entity_type @Z, @Z(%S) [symbolic]
  94. // CHECK:STDOUT: %assoc0.8bc: %Z.assoc_type.5b2 = assoc_entity element0, @Z.WithSelf.%X [symbolic]
  95. // CHECK:STDOUT: %require_complete.72d: <witness> = require_complete_type %Z.type.4d0 [symbolic]
  96. // CHECK:STDOUT: %.Self.as_type.faa: type = facet_access_type %.Self.90f [symbolic]
  97. // CHECK:STDOUT: %Z.lookup_impl_witness.7d6: <witness> = lookup_impl_witness %.Self.90f, @Z, @Z(%S) [symbolic]
  98. // CHECK:STDOUT: %impl.elem0.e5e: type = impl_witness_access %Z.lookup_impl_witness.7d6, element0 [symbolic]
  99. // CHECK:STDOUT: %empty_tuple: %empty_tuple.type = tuple_value () [concrete]
  100. // CHECK:STDOUT: %Z_where.type.a76: type = facet_type <@Z, @Z(%S) where %impl.elem0.e5e = %empty_tuple.type> [symbolic]
  101. // CHECK:STDOUT: %Z.impl_witness.cfe: <witness> = impl_witness @T.as.Z.impl.34a.%Z.impl_witness_table, @T.as.Z.impl.34a(%T.67d, %S) [symbolic]
  102. // CHECK:STDOUT: %require_complete.1f8: <witness> = require_complete_type %Z_where.type.a76 [symbolic]
  103. // CHECK:STDOUT: %Z.facet.100: %Z.type.4d0 = facet_value %T.67d, (%Z.impl_witness.cfe) [symbolic]
  104. // CHECK:STDOUT: %Z.type.be4: type = facet_type <@Z, @Z(%C)> [concrete]
  105. // CHECK:STDOUT: %.Self.bf2: %Z.type.be4 = symbolic_binding .Self [symbolic_self]
  106. // CHECK:STDOUT: %Self.af9: %Z.type.be4 = symbolic_binding Self, 1 [symbolic]
  107. // CHECK:STDOUT: %Z.assoc_type.553: type = assoc_entity_type @Z, @Z(%C) [concrete]
  108. // CHECK:STDOUT: %assoc0.1e0: %Z.assoc_type.553 = assoc_entity element0, @Z.WithSelf.%X [concrete]
  109. // CHECK:STDOUT: %.Self.as_type.acb: type = facet_access_type %.Self.bf2 [symbolic_self]
  110. // CHECK:STDOUT: %Z.lookup_impl_witness.c06: <witness> = lookup_impl_witness %.Self.bf2, @Z, @Z(%C) [symbolic_self]
  111. // CHECK:STDOUT: %impl.elem0.2cd: type = impl_witness_access %Z.lookup_impl_witness.c06, element0 [symbolic_self]
  112. // CHECK:STDOUT: %Z_where.type.c3e: type = facet_type <@Z, @Z(%C) where %impl.elem0.2cd = %T.67d> [symbolic]
  113. // CHECK:STDOUT: %Z.impl_witness.9b0: <witness> = impl_witness @T.as.Z.impl.cf0.%Z.impl_witness_table, @T.as.Z.impl.cf0(%T.67d) [symbolic]
  114. // CHECK:STDOUT: %require_complete.864: <witness> = require_complete_type %Z_where.type.c3e [symbolic]
  115. // CHECK:STDOUT: %Z.facet.738: %Z.type.be4 = facet_value %T.67d, (%Z.impl_witness.9b0) [symbolic]
  116. // CHECK:STDOUT: %pattern_type.53f: type = pattern_type %Z.type.be4 [concrete]
  117. // CHECK:STDOUT: %T.fe5: %Z.type.be4 = symbolic_binding T, 0 [symbolic]
  118. // CHECK:STDOUT: %T.as_type: type = facet_access_type %T.fe5 [symbolic]
  119. // CHECK:STDOUT: %pattern_type.177: type = pattern_type %T.as_type [symbolic]
  120. // CHECK:STDOUT: %F.type: type = fn_type @F [concrete]
  121. // CHECK:STDOUT: %F: %F.type = struct_value () [concrete]
  122. // CHECK:STDOUT: %require_complete.7c5: <witness> = require_complete_type %T.as_type [symbolic]
  123. // CHECK:STDOUT: %Z_where.type.238: type = facet_type <@Z, @Z(%C) where %impl.elem0.2cd = %T.as_type> [symbolic]
  124. // CHECK:STDOUT: %Z.impl_witness.4c9: <witness> = impl_witness @T.as.Z.impl.cf0.%Z.impl_witness_table, @T.as.Z.impl.cf0(%T.as_type) [symbolic]
  125. // CHECK:STDOUT: %require_complete.d03: <witness> = require_complete_type %Z_where.type.238 [symbolic]
  126. // CHECK:STDOUT: %.75b: require_specific_def_type = require_specific_def @T.as.Z.impl.cf0(%T.as_type) [symbolic]
  127. // CHECK:STDOUT: }
  128. // CHECK:STDOUT:
  129. // CHECK:STDOUT: imports {
  130. // CHECK:STDOUT: %Core: <namespace> = namespace file.%Core.import, [concrete] {
  131. // CHECK:STDOUT: import Core//prelude
  132. // CHECK:STDOUT: import Core//prelude/...
  133. // CHECK:STDOUT: }
  134. // CHECK:STDOUT: }
  135. // CHECK:STDOUT:
  136. // CHECK:STDOUT: file {
  137. // CHECK:STDOUT: package: <namespace> = namespace [concrete] {
  138. // CHECK:STDOUT: .Core = imports.%Core
  139. // CHECK:STDOUT: .Z = %Z.decl
  140. // CHECK:STDOUT: .C = %C.decl
  141. // CHECK:STDOUT: .F = %F.decl
  142. // CHECK:STDOUT: }
  143. // CHECK:STDOUT: %Core.import = import Core
  144. // CHECK:STDOUT: %Z.decl: %Z.type.352 = interface_decl @Z [concrete = constants.%Z.generic] {
  145. // CHECK:STDOUT: %T.patt: %pattern_type.98f = symbolic_binding_pattern T, 0 [concrete]
  146. // CHECK:STDOUT: } {
  147. // CHECK:STDOUT: %.loc3_17.1: type = splice_block %.loc3_17.2 [concrete = type] {
  148. // CHECK:STDOUT: %.Self: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.c39]
  149. // CHECK:STDOUT: %.loc3_17.2: type = type_literal type [concrete = type]
  150. // CHECK:STDOUT: }
  151. // CHECK:STDOUT: %T.loc3_14.2: type = symbolic_binding T, 0 [symbolic = %T.loc3_14.1 (constants.%T.67d)]
  152. // CHECK:STDOUT: }
  153. // CHECK:STDOUT: %C.decl: type = class_decl @C [concrete = constants.%C] {} {}
  154. // CHECK:STDOUT: impl_decl @T.as.Z.impl.34a [concrete] {
  155. // CHECK:STDOUT: %T.patt: %pattern_type.98f = symbolic_binding_pattern T, 0 [concrete]
  156. // CHECK:STDOUT: %S.patt: %pattern_type.98f = symbolic_binding_pattern S, 1 [concrete]
  157. // CHECK:STDOUT: } {
  158. // CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc9_15.1 [symbolic = %T.loc9_15.2 (constants.%T.67d)]
  159. // CHECK:STDOUT: %Z.ref: %Z.type.352 = name_ref Z, file.%Z.decl [concrete = constants.%Z.generic]
  160. // CHECK:STDOUT: %S.ref: type = name_ref S, %S.loc9_25.1 [symbolic = %S.loc9_25.2 (constants.%S)]
  161. // CHECK:STDOUT: %Z.type.loc9_42.1: type = facet_type <@Z, @Z(constants.%S)> [symbolic = %Z.type.loc9_42.2 (constants.%Z.type.4d0)]
  162. // CHECK:STDOUT: %.Self.1: @T.as.Z.impl.34a.%Z.type.loc9_42.2 (%Z.type.4d0) = symbolic_binding .Self [symbolic = %.Self.4 (constants.%.Self.90f)]
  163. // CHECK:STDOUT: %.Self.ref: @T.as.Z.impl.34a.%Z.type.loc9_42.2 (%Z.type.4d0) = name_ref .Self, %.Self.1 [symbolic = %.Self.4 (constants.%.Self.90f)]
  164. // CHECK:STDOUT: %.Self.as_type.loc9_50.1: type = facet_access_type %.Self.ref [symbolic = %.Self.as_type.loc9_50.2 (constants.%.Self.as_type.faa)]
  165. // CHECK:STDOUT: %.loc9_50.1: type = converted %.Self.ref, %.Self.as_type.loc9_50.1 [symbolic = %.Self.as_type.loc9_50.2 (constants.%.Self.as_type.faa)]
  166. // CHECK:STDOUT: %.loc9_50.2: @T.as.Z.impl.34a.%Z.assoc_type (%Z.assoc_type.5b2) = specific_constant @X.%assoc0, @Z.WithSelf(constants.%S, constants.%.Self.90f) [symbolic = %assoc0 (constants.%assoc0.8bc)]
  167. // CHECK:STDOUT: %X.ref: @T.as.Z.impl.34a.%Z.assoc_type (%Z.assoc_type.5b2) = name_ref X, %.loc9_50.2 [symbolic = %assoc0 (constants.%assoc0.8bc)]
  168. // CHECK:STDOUT: %impl.elem0.loc9_50.1: type = impl_witness_access constants.%Z.lookup_impl_witness.7d6, element0 [symbolic = %impl.elem0.loc9_50.2 (constants.%impl.elem0.e5e)]
  169. // CHECK:STDOUT: %.loc9_56.1: %empty_tuple.type = tuple_literal () [concrete = constants.%empty_tuple]
  170. // CHECK:STDOUT: %.loc9_56.2: type = converted %.loc9_56.1, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type]
  171. // CHECK:STDOUT: %.loc9_44: type = where_expr [symbolic = %Z_where.type (constants.%Z_where.type.a76)] {
  172. // CHECK:STDOUT: requirement_base_facet_type %Z.type.loc9_42.1
  173. // CHECK:STDOUT: requirement_rewrite %impl.elem0.loc9_50.1, %.loc9_56.2
  174. // CHECK:STDOUT: }
  175. // CHECK:STDOUT: %.loc9_18.1: type = splice_block %.loc9_18.2 [concrete = type] {
  176. // CHECK:STDOUT: %.Self.3: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.c39]
  177. // CHECK:STDOUT: %.loc9_18.2: type = type_literal type [concrete = type]
  178. // CHECK:STDOUT: }
  179. // CHECK:STDOUT: %T.loc9_15.1: type = symbolic_binding T, 0 [symbolic = %T.loc9_15.2 (constants.%T.67d)]
  180. // CHECK:STDOUT: %.loc9_28.1: type = splice_block %.loc9_28.2 [concrete = type] {
  181. // CHECK:STDOUT: %.Self.2: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.c39]
  182. // CHECK:STDOUT: %.loc9_28.2: type = type_literal type [concrete = type]
  183. // CHECK:STDOUT: }
  184. // CHECK:STDOUT: %S.loc9_25.1: type = symbolic_binding S, 1 [symbolic = %S.loc9_25.2 (constants.%S)]
  185. // CHECK:STDOUT: }
  186. // CHECK:STDOUT: impl_decl @T.as.Z.impl.cf0 [concrete] {
  187. // CHECK:STDOUT: %T.patt: %pattern_type.98f = symbolic_binding_pattern T, 0 [concrete]
  188. // CHECK:STDOUT: } {
  189. // CHECK:STDOUT: %T.ref.loc11_30: type = name_ref T, %T.loc11_21.1 [symbolic = %T.loc11_21.2 (constants.%T.67d)]
  190. // CHECK:STDOUT: %Z.ref: %Z.type.352 = name_ref Z, file.%Z.decl [concrete = constants.%Z.generic]
  191. // CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [concrete = constants.%C]
  192. // CHECK:STDOUT: %Z.type: type = facet_type <@Z, @Z(constants.%C)> [concrete = constants.%Z.type.be4]
  193. // CHECK:STDOUT: %.Self.1: %Z.type.be4 = symbolic_binding .Self [symbolic_self = constants.%.Self.bf2]
  194. // CHECK:STDOUT: %.Self.ref: %Z.type.be4 = name_ref .Self, %.Self.1 [symbolic_self = constants.%.Self.bf2]
  195. // CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self.ref [symbolic_self = constants.%.Self.as_type.acb]
  196. // CHECK:STDOUT: %.loc11_46.1: type = converted %.Self.ref, %.Self.as_type [symbolic_self = constants.%.Self.as_type.acb]
  197. // CHECK:STDOUT: %.loc11_46.2: %Z.assoc_type.553 = specific_constant @X.%assoc0, @Z.WithSelf(constants.%C, constants.%.Self.bf2) [concrete = constants.%assoc0.1e0]
  198. // CHECK:STDOUT: %X.ref: %Z.assoc_type.553 = name_ref X, %.loc11_46.2 [concrete = constants.%assoc0.1e0]
  199. // CHECK:STDOUT: %impl.elem0: type = impl_witness_access constants.%Z.lookup_impl_witness.c06, element0 [symbolic_self = constants.%impl.elem0.2cd]
  200. // CHECK:STDOUT: %T.ref.loc11_51: type = name_ref T, %T.loc11_21.1 [symbolic = %T.loc11_21.2 (constants.%T.67d)]
  201. // CHECK:STDOUT: %.loc11_40: type = where_expr [symbolic = %Z_where.type (constants.%Z_where.type.c3e)] {
  202. // CHECK:STDOUT: requirement_base_facet_type %Z.type
  203. // CHECK:STDOUT: requirement_rewrite %impl.elem0, %T.ref.loc11_51
  204. // CHECK:STDOUT: }
  205. // CHECK:STDOUT: %.loc11_24.1: type = splice_block %.loc11_24.2 [concrete = type] {
  206. // CHECK:STDOUT: %.Self.2: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.c39]
  207. // CHECK:STDOUT: %.loc11_24.2: type = type_literal type [concrete = type]
  208. // CHECK:STDOUT: }
  209. // CHECK:STDOUT: %T.loc11_21.1: type = symbolic_binding T, 0 [symbolic = %T.loc11_21.2 (constants.%T.67d)]
  210. // CHECK:STDOUT: }
  211. // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [concrete = constants.%F] {
  212. // CHECK:STDOUT: %T.patt: %pattern_type.53f = symbolic_binding_pattern T, 0 [concrete]
  213. // CHECK:STDOUT: %t.param_patt: @F.%pattern_type (%pattern_type.177) = value_param_pattern [concrete]
  214. // CHECK:STDOUT: %t.patt: @F.%pattern_type (%pattern_type.177) = at_binding_pattern t, %t.param_patt [concrete]
  215. // CHECK:STDOUT: } {
  216. // CHECK:STDOUT: %.loc13_13: type = splice_block %Z.type [concrete = constants.%Z.type.be4] {
  217. // CHECK:STDOUT: %.Self: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.c39]
  218. // CHECK:STDOUT: %Z.ref: %Z.type.352 = name_ref Z, file.%Z.decl [concrete = constants.%Z.generic]
  219. // CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [concrete = constants.%C]
  220. // CHECK:STDOUT: %Z.type: type = facet_type <@Z, @Z(constants.%C)> [concrete = constants.%Z.type.be4]
  221. // CHECK:STDOUT: }
  222. // CHECK:STDOUT: %T.loc13_7.2: %Z.type.be4 = symbolic_binding T, 0 [symbolic = %T.loc13_7.1 (constants.%T.fe5)]
  223. // CHECK:STDOUT: %t.param: @F.%T.as_type.loc13_19.1 (%T.as_type) = value_param call_param0
  224. // CHECK:STDOUT: %.loc13_19.1: type = splice_block %.loc13_19.2 [symbolic = %T.as_type.loc13_19.1 (constants.%T.as_type)] {
  225. // CHECK:STDOUT: %T.ref.loc13: %Z.type.be4 = name_ref T, %T.loc13_7.2 [symbolic = %T.loc13_7.1 (constants.%T.fe5)]
  226. // CHECK:STDOUT: %T.as_type.loc13_19.2: type = facet_access_type %T.ref.loc13 [symbolic = %T.as_type.loc13_19.1 (constants.%T.as_type)]
  227. // CHECK:STDOUT: %.loc13_19.2: type = converted %T.ref.loc13, %T.as_type.loc13_19.2 [symbolic = %T.as_type.loc13_19.1 (constants.%T.as_type)]
  228. // CHECK:STDOUT: }
  229. // CHECK:STDOUT: %t: @F.%T.as_type.loc13_19.1 (%T.as_type) = value_binding t, %t.param
  230. // CHECK:STDOUT: }
  231. // CHECK:STDOUT: }
  232. // CHECK:STDOUT:
  233. // CHECK:STDOUT: generic interface @Z(%T.loc3_14.2: type) {
  234. // CHECK:STDOUT: %T.loc3_14.1: type = symbolic_binding T, 0 [symbolic = %T.loc3_14.1 (constants.%T.67d)]
  235. // CHECK:STDOUT:
  236. // CHECK:STDOUT: !definition:
  237. // CHECK:STDOUT: %Z.type: type = facet_type <@Z, @Z(%T.loc3_14.1)> [symbolic = %Z.type (constants.%Z.type.0ed)]
  238. // CHECK:STDOUT: %Self.loc3_23.2: @Z.%Z.type (%Z.type.0ed) = symbolic_binding Self, 1 [symbolic = %Self.loc3_23.2 (constants.%Self.822)]
  239. // CHECK:STDOUT:
  240. // CHECK:STDOUT: interface {
  241. // CHECK:STDOUT: %Self.loc3_23.1: @Z.%Z.type (%Z.type.0ed) = symbolic_binding Self, 1 [symbolic = %Self.loc3_23.2 (constants.%Self.822)]
  242. // CHECK:STDOUT: %Z.WithSelf.decl = interface_with_self_decl @Z [concrete]
  243. // CHECK:STDOUT:
  244. // CHECK:STDOUT: !with Self:
  245. // CHECK:STDOUT: %X: type = assoc_const_decl @X [concrete] {
  246. // CHECK:STDOUT: %assoc0: @Z.WithSelf.%Z.assoc_type (%Z.assoc_type.0bf) = assoc_entity element0, @Z.WithSelf.%X [symbolic = @Z.WithSelf.%assoc0 (constants.%assoc0.f33)]
  247. // CHECK:STDOUT: }
  248. // CHECK:STDOUT:
  249. // CHECK:STDOUT: !members:
  250. // CHECK:STDOUT: .Self = %Self.loc3_23.1
  251. // CHECK:STDOUT: .X = @X.%assoc0
  252. // CHECK:STDOUT: witness = (@Z.WithSelf.%X)
  253. // CHECK:STDOUT:
  254. // CHECK:STDOUT: !requires:
  255. // CHECK:STDOUT: }
  256. // CHECK:STDOUT: }
  257. // CHECK:STDOUT:
  258. // CHECK:STDOUT: generic impl @T.as.Z.impl.34a(%T.loc9_15.1: type, %S.loc9_25.1: type) {
  259. // CHECK:STDOUT: %T.loc9_15.2: type = symbolic_binding T, 0 [symbolic = %T.loc9_15.2 (constants.%T.67d)]
  260. // CHECK:STDOUT: %S.loc9_25.2: type = symbolic_binding S, 1 [symbolic = %S.loc9_25.2 (constants.%S)]
  261. // CHECK:STDOUT: %Z.type.loc9_42.2: type = facet_type <@Z, @Z(%S.loc9_25.2)> [symbolic = %Z.type.loc9_42.2 (constants.%Z.type.4d0)]
  262. // CHECK:STDOUT: %.Self.4: @T.as.Z.impl.34a.%Z.type.loc9_42.2 (%Z.type.4d0) = symbolic_binding .Self [symbolic = %.Self.4 (constants.%.Self.90f)]
  263. // CHECK:STDOUT: %require_complete.loc9_50: <witness> = require_complete_type %Z.type.loc9_42.2 [symbolic = %require_complete.loc9_50 (constants.%require_complete.72d)]
  264. // CHECK:STDOUT: %.Self.as_type.loc9_50.2: type = facet_access_type %.Self.4 [symbolic = %.Self.as_type.loc9_50.2 (constants.%.Self.as_type.faa)]
  265. // CHECK:STDOUT: %Z.assoc_type: type = assoc_entity_type @Z, @Z(%S.loc9_25.2) [symbolic = %Z.assoc_type (constants.%Z.assoc_type.5b2)]
  266. // CHECK:STDOUT: %assoc0: @T.as.Z.impl.34a.%Z.assoc_type (%Z.assoc_type.5b2) = assoc_entity element0, @Z.WithSelf.%X [symbolic = %assoc0 (constants.%assoc0.8bc)]
  267. // CHECK:STDOUT: %Z.lookup_impl_witness: <witness> = lookup_impl_witness %.Self.4, @Z, @Z(%S.loc9_25.2) [symbolic = %Z.lookup_impl_witness (constants.%Z.lookup_impl_witness.7d6)]
  268. // CHECK:STDOUT: %impl.elem0.loc9_50.2: type = impl_witness_access %Z.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc9_50.2 (constants.%impl.elem0.e5e)]
  269. // CHECK:STDOUT: %Z_where.type: type = facet_type <@Z, @Z(%S.loc9_25.2) where %impl.elem0.loc9_50.2 = constants.%empty_tuple.type> [symbolic = %Z_where.type (constants.%Z_where.type.a76)]
  270. // CHECK:STDOUT: %Z.impl_witness.loc9_58.2: <witness> = impl_witness %Z.impl_witness_table, @T.as.Z.impl.34a(%T.loc9_15.2, %S.loc9_25.2) [symbolic = %Z.impl_witness.loc9_58.2 (constants.%Z.impl_witness.cfe)]
  271. // CHECK:STDOUT:
  272. // CHECK:STDOUT: !definition:
  273. // CHECK:STDOUT: %require_complete.loc9_44: <witness> = require_complete_type %Z_where.type [symbolic = %require_complete.loc9_44 (constants.%require_complete.1f8)]
  274. // CHECK:STDOUT:
  275. // CHECK:STDOUT: impl: %T.ref as %.loc9_44 {
  276. // CHECK:STDOUT: %Z.impl_witness_table = impl_witness_table (%impl_witness_assoc_constant), @T.as.Z.impl.34a [concrete]
  277. // CHECK:STDOUT: %Z.impl_witness.loc9_58.1: <witness> = impl_witness %Z.impl_witness_table, @T.as.Z.impl.34a(constants.%T.67d, constants.%S) [symbolic = %Z.impl_witness.loc9_58.2 (constants.%Z.impl_witness.cfe)]
  278. // CHECK:STDOUT: %impl_witness_assoc_constant: type = impl_witness_assoc_constant constants.%empty_tuple.type [concrete = constants.%empty_tuple.type]
  279. // CHECK:STDOUT:
  280. // CHECK:STDOUT: !members:
  281. // CHECK:STDOUT: witness = %Z.impl_witness.loc9_58.1
  282. // CHECK:STDOUT: }
  283. // CHECK:STDOUT: }
  284. // CHECK:STDOUT:
  285. // CHECK:STDOUT: generic impl @T.as.Z.impl.cf0(%T.loc11_21.1: type) {
  286. // CHECK:STDOUT: %T.loc11_21.2: type = symbolic_binding T, 0 [symbolic = %T.loc11_21.2 (constants.%T.67d)]
  287. // CHECK:STDOUT: %Z_where.type: type = facet_type <@Z, @Z(constants.%C) where constants.%impl.elem0.2cd = %T.loc11_21.2> [symbolic = %Z_where.type (constants.%Z_where.type.c3e)]
  288. // CHECK:STDOUT: %Z.impl_witness.loc11_53.2: <witness> = impl_witness %Z.impl_witness_table, @T.as.Z.impl.cf0(%T.loc11_21.2) [symbolic = %Z.impl_witness.loc11_53.2 (constants.%Z.impl_witness.9b0)]
  289. // CHECK:STDOUT:
  290. // CHECK:STDOUT: !definition:
  291. // CHECK:STDOUT: %require_complete: <witness> = require_complete_type %Z_where.type [symbolic = %require_complete (constants.%require_complete.864)]
  292. // CHECK:STDOUT:
  293. // CHECK:STDOUT: impl: %T.ref.loc11_30 as %.loc11_40 {
  294. // CHECK:STDOUT: %Z.impl_witness_table = impl_witness_table (%impl_witness_assoc_constant), @T.as.Z.impl.cf0 [concrete]
  295. // CHECK:STDOUT: %Z.impl_witness.loc11_53.1: <witness> = impl_witness %Z.impl_witness_table, @T.as.Z.impl.cf0(constants.%T.67d) [symbolic = %Z.impl_witness.loc11_53.2 (constants.%Z.impl_witness.9b0)]
  296. // CHECK:STDOUT: %impl_witness_assoc_constant: type = impl_witness_assoc_constant constants.%T.67d [symbolic = %T.loc11_21.2 (constants.%T.67d)]
  297. // CHECK:STDOUT:
  298. // CHECK:STDOUT: !members:
  299. // CHECK:STDOUT: witness = %Z.impl_witness.loc11_53.1
  300. // CHECK:STDOUT: }
  301. // CHECK:STDOUT: }
  302. // CHECK:STDOUT:
  303. // CHECK:STDOUT: class @C {
  304. // CHECK:STDOUT: %complete_type: <witness> = complete_type_witness constants.%empty_struct_type [concrete = constants.%complete_type]
  305. // CHECK:STDOUT: complete_type_witness = %complete_type
  306. // CHECK:STDOUT:
  307. // CHECK:STDOUT: !members:
  308. // CHECK:STDOUT: .Self = constants.%C
  309. // CHECK:STDOUT: }
  310. // CHECK:STDOUT:
  311. // CHECK:STDOUT: generic fn @F(%T.loc13_7.2: %Z.type.be4) {
  312. // CHECK:STDOUT: %T.loc13_7.1: %Z.type.be4 = symbolic_binding T, 0 [symbolic = %T.loc13_7.1 (constants.%T.fe5)]
  313. // CHECK:STDOUT: %T.as_type.loc13_19.1: type = facet_access_type %T.loc13_7.1 [symbolic = %T.as_type.loc13_19.1 (constants.%T.as_type)]
  314. // CHECK:STDOUT: %pattern_type: type = pattern_type %T.as_type.loc13_19.1 [symbolic = %pattern_type (constants.%pattern_type.177)]
  315. // CHECK:STDOUT:
  316. // CHECK:STDOUT: !definition:
  317. // CHECK:STDOUT: %require_complete: <witness> = require_complete_type %T.as_type.loc13_19.1 [symbolic = %require_complete (constants.%require_complete.7c5)]
  318. // CHECK:STDOUT: %.loc15_18.4: require_specific_def_type = require_specific_def @T.as.Z.impl.cf0(%T.as_type.loc13_19.1) [symbolic = %.loc15_18.4 (constants.%.75b)]
  319. // CHECK:STDOUT:
  320. // CHECK:STDOUT: fn(%t.param: @F.%T.as_type.loc13_19.1 (%T.as_type)) {
  321. // CHECK:STDOUT: !entry:
  322. // CHECK:STDOUT: name_binding_decl {
  323. // CHECK:STDOUT: %a.patt: @F.%pattern_type (%pattern_type.177) = value_binding_pattern a [concrete]
  324. // CHECK:STDOUT: }
  325. // CHECK:STDOUT: %t.ref: @F.%T.as_type.loc13_19.1 (%T.as_type) = name_ref t, %t
  326. // CHECK:STDOUT: %.loc15_18.1: type = splice_block %impl.elem0 [symbolic = %T.as_type.loc13_19.1 (constants.%T.as_type)] {
  327. // CHECK:STDOUT: %T.ref.loc15: %Z.type.be4 = name_ref T, %T.loc13_7.2 [symbolic = %T.loc13_7.1 (constants.%T.fe5)]
  328. // CHECK:STDOUT: %T.as_type.loc15: type = facet_access_type %T.ref.loc15 [symbolic = %T.as_type.loc13_19.1 (constants.%T.as_type)]
  329. // CHECK:STDOUT: %.loc15_18.2: type = converted %T.ref.loc15, %T.as_type.loc15 [symbolic = %T.as_type.loc13_19.1 (constants.%T.as_type)]
  330. // CHECK:STDOUT: %.loc15_18.3: %Z.assoc_type.553 = specific_constant @X.%assoc0, @Z.WithSelf(constants.%C, constants.%T.fe5) [concrete = constants.%assoc0.1e0]
  331. // CHECK:STDOUT: %X.ref: %Z.assoc_type.553 = name_ref X, %.loc15_18.3 [concrete = constants.%assoc0.1e0]
  332. // CHECK:STDOUT: %impl.elem0: type = impl_witness_access constants.%Z.impl_witness.4c9, element0 [symbolic = %T.as_type.loc13_19.1 (constants.%T.as_type)]
  333. // CHECK:STDOUT: }
  334. // CHECK:STDOUT: %a: @F.%T.as_type.loc13_19.1 (%T.as_type) = value_binding a, %t.ref
  335. // CHECK:STDOUT: return
  336. // CHECK:STDOUT: }
  337. // CHECK:STDOUT: }
  338. // CHECK:STDOUT:
  339. // CHECK:STDOUT: specific @Z(constants.%T.67d) {
  340. // CHECK:STDOUT: %T.loc3_14.1 => constants.%T.67d
  341. // CHECK:STDOUT: }
  342. // CHECK:STDOUT:
  343. // CHECK:STDOUT: specific @Z.WithSelf(constants.%T.67d, constants.%Self.822) {}
  344. // CHECK:STDOUT:
  345. // CHECK:STDOUT: specific @Z(constants.%S) {
  346. // CHECK:STDOUT: %T.loc3_14.1 => constants.%S
  347. // CHECK:STDOUT:
  348. // CHECK:STDOUT: !definition:
  349. // CHECK:STDOUT: %Z.type => constants.%Z.type.4d0
  350. // CHECK:STDOUT: %Self.loc3_23.2 => constants.%Self.427
  351. // CHECK:STDOUT: }
  352. // CHECK:STDOUT:
  353. // CHECK:STDOUT: specific @Z.WithSelf(constants.%S, constants.%Self.822) {
  354. // CHECK:STDOUT: !definition:
  355. // CHECK:STDOUT: %T => constants.%S
  356. // CHECK:STDOUT: %Z.assoc_type => constants.%Z.assoc_type.5b2
  357. // CHECK:STDOUT: %assoc0 => constants.%assoc0.8bc
  358. // CHECK:STDOUT: }
  359. // CHECK:STDOUT:
  360. // CHECK:STDOUT: specific @Z.WithSelf(constants.%S, constants.%.Self.90f) {
  361. // CHECK:STDOUT: !definition:
  362. // CHECK:STDOUT: %T => constants.%S
  363. // CHECK:STDOUT: %Z.assoc_type => constants.%Z.assoc_type.5b2
  364. // CHECK:STDOUT: %assoc0 => constants.%assoc0.8bc
  365. // CHECK:STDOUT: }
  366. // CHECK:STDOUT:
  367. // CHECK:STDOUT: specific @T.as.Z.impl.34a(constants.%T.67d, constants.%S) {
  368. // CHECK:STDOUT: %T.loc9_15.2 => constants.%T.67d
  369. // CHECK:STDOUT: %S.loc9_25.2 => constants.%S
  370. // CHECK:STDOUT: %Z.type.loc9_42.2 => constants.%Z.type.4d0
  371. // CHECK:STDOUT: %.Self.4 => constants.%.Self.90f
  372. // CHECK:STDOUT: %require_complete.loc9_50 => constants.%require_complete.72d
  373. // CHECK:STDOUT: %.Self.as_type.loc9_50.2 => constants.%.Self.as_type.faa
  374. // CHECK:STDOUT: %Z.assoc_type => constants.%Z.assoc_type.5b2
  375. // CHECK:STDOUT: %assoc0 => constants.%assoc0.8bc
  376. // CHECK:STDOUT: %Z.lookup_impl_witness => constants.%Z.lookup_impl_witness.7d6
  377. // CHECK:STDOUT: %impl.elem0.loc9_50.2 => constants.%impl.elem0.e5e
  378. // CHECK:STDOUT: %Z_where.type => constants.%Z_where.type.a76
  379. // CHECK:STDOUT: %Z.impl_witness.loc9_58.2 => constants.%Z.impl_witness.cfe
  380. // CHECK:STDOUT: }
  381. // CHECK:STDOUT:
  382. // CHECK:STDOUT: specific @Z.WithSelf(constants.%S, constants.%Z.facet.100) {
  383. // CHECK:STDOUT: !definition:
  384. // CHECK:STDOUT: %T => constants.%S
  385. // CHECK:STDOUT: %Z.assoc_type => constants.%Z.assoc_type.5b2
  386. // CHECK:STDOUT: %assoc0 => constants.%assoc0.8bc
  387. // CHECK:STDOUT: }
  388. // CHECK:STDOUT:
  389. // CHECK:STDOUT: specific @Z(constants.%C) {
  390. // CHECK:STDOUT: %T.loc3_14.1 => constants.%C
  391. // CHECK:STDOUT:
  392. // CHECK:STDOUT: !definition:
  393. // CHECK:STDOUT: %Z.type => constants.%Z.type.be4
  394. // CHECK:STDOUT: %Self.loc3_23.2 => constants.%Self.af9
  395. // CHECK:STDOUT: }
  396. // CHECK:STDOUT:
  397. // CHECK:STDOUT: specific @Z.WithSelf(constants.%C, constants.%Self.822) {
  398. // CHECK:STDOUT: !definition:
  399. // CHECK:STDOUT: %T => constants.%C
  400. // CHECK:STDOUT: %Z.assoc_type => constants.%Z.assoc_type.553
  401. // CHECK:STDOUT: %assoc0 => constants.%assoc0.1e0
  402. // CHECK:STDOUT: }
  403. // CHECK:STDOUT:
  404. // CHECK:STDOUT: specific @Z.WithSelf(constants.%C, constants.%.Self.bf2) {
  405. // CHECK:STDOUT: !definition:
  406. // CHECK:STDOUT: %T => constants.%C
  407. // CHECK:STDOUT: %Z.assoc_type => constants.%Z.assoc_type.553
  408. // CHECK:STDOUT: %assoc0 => constants.%assoc0.1e0
  409. // CHECK:STDOUT: }
  410. // CHECK:STDOUT:
  411. // CHECK:STDOUT: specific @T.as.Z.impl.cf0(constants.%T.67d) {
  412. // CHECK:STDOUT: %T.loc11_21.2 => constants.%T.67d
  413. // CHECK:STDOUT: %Z_where.type => constants.%Z_where.type.c3e
  414. // CHECK:STDOUT: %Z.impl_witness.loc11_53.2 => constants.%Z.impl_witness.9b0
  415. // CHECK:STDOUT: }
  416. // CHECK:STDOUT:
  417. // CHECK:STDOUT: specific @Z.WithSelf(constants.%C, constants.%Z.facet.738) {
  418. // CHECK:STDOUT: !definition:
  419. // CHECK:STDOUT: %T => constants.%C
  420. // CHECK:STDOUT: %Z.assoc_type => constants.%Z.assoc_type.553
  421. // CHECK:STDOUT: %assoc0 => constants.%assoc0.1e0
  422. // CHECK:STDOUT: }
  423. // CHECK:STDOUT:
  424. // CHECK:STDOUT: specific @F(constants.%T.fe5) {
  425. // CHECK:STDOUT: %T.loc13_7.1 => constants.%T.fe5
  426. // CHECK:STDOUT: %T.as_type.loc13_19.1 => constants.%T.as_type
  427. // CHECK:STDOUT: %pattern_type => constants.%pattern_type.177
  428. // CHECK:STDOUT: }
  429. // CHECK:STDOUT:
  430. // CHECK:STDOUT: specific @Z.WithSelf(constants.%C, constants.%T.fe5) {
  431. // CHECK:STDOUT: !definition:
  432. // CHECK:STDOUT: %T => constants.%C
  433. // CHECK:STDOUT: %Z.assoc_type => constants.%Z.assoc_type.553
  434. // CHECK:STDOUT: %assoc0 => constants.%assoc0.1e0
  435. // CHECK:STDOUT: }
  436. // CHECK:STDOUT:
  437. // CHECK:STDOUT: specific @T.as.Z.impl.cf0(constants.%T.as_type) {
  438. // CHECK:STDOUT: %T.loc11_21.2 => constants.%T.as_type
  439. // CHECK:STDOUT: %Z_where.type => constants.%Z_where.type.238
  440. // CHECK:STDOUT: %Z.impl_witness.loc11_53.2 => constants.%Z.impl_witness.4c9
  441. // CHECK:STDOUT:
  442. // CHECK:STDOUT: !definition:
  443. // CHECK:STDOUT: %require_complete => constants.%require_complete.d03
  444. // CHECK:STDOUT: }
  445. // CHECK:STDOUT:
  446. // CHECK:STDOUT: --- fail_nonfinal_specialized_symbolic_rewrite.carbon
  447. // CHECK:STDOUT:
  448. // CHECK:STDOUT: constants {
  449. // CHECK:STDOUT: %type: type = facet_type <type> [concrete]
  450. // CHECK:STDOUT: %.Self.c39: %type = symbolic_binding .Self [symbolic_self]
  451. // CHECK:STDOUT: %pattern_type.98f: type = pattern_type type [concrete]
  452. // CHECK:STDOUT: %T.67d: type = symbolic_binding T, 0 [symbolic]
  453. // CHECK:STDOUT: %Z.type.352: type = generic_interface_type @Z [concrete]
  454. // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete]
  455. // CHECK:STDOUT: %Z.generic: %Z.type.352 = struct_value () [concrete]
  456. // CHECK:STDOUT: %Z.type.0ed: type = facet_type <@Z, @Z(%T.67d)> [symbolic]
  457. // CHECK:STDOUT: %Self.822: %Z.type.0ed = symbolic_binding Self, 1 [symbolic]
  458. // CHECK:STDOUT: %Z.assoc_type.0bf: type = assoc_entity_type @Z, @Z(%T.67d) [symbolic]
  459. // CHECK:STDOUT: %assoc0.f33: %Z.assoc_type.0bf = assoc_entity element0, @Z.WithSelf.%X [symbolic]
  460. // CHECK:STDOUT: %Y.type: type = facet_type <@Y> [concrete]
  461. // CHECK:STDOUT: %Self.162: %Y.type = symbolic_binding Self, 0 [symbolic]
  462. // CHECK:STDOUT: %C: type = class_type @C [concrete]
  463. // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete]
  464. // CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %empty_struct_type [concrete]
  465. // CHECK:STDOUT: %S: type = symbolic_binding S, 1 [symbolic]
  466. // CHECK:STDOUT: %Z.type.4d0: type = facet_type <@Z, @Z(%S)> [symbolic]
  467. // CHECK:STDOUT: %.Self.90f: %Z.type.4d0 = symbolic_binding .Self [symbolic]
  468. // CHECK:STDOUT: %Self.427: %Z.type.4d0 = symbolic_binding Self, 1 [symbolic]
  469. // CHECK:STDOUT: %Z.assoc_type.5b2: type = assoc_entity_type @Z, @Z(%S) [symbolic]
  470. // CHECK:STDOUT: %assoc0.8bc: %Z.assoc_type.5b2 = assoc_entity element0, @Z.WithSelf.%X [symbolic]
  471. // CHECK:STDOUT: %require_complete.72d: <witness> = require_complete_type %Z.type.4d0 [symbolic]
  472. // CHECK:STDOUT: %.Self.as_type.faa: type = facet_access_type %.Self.90f [symbolic]
  473. // CHECK:STDOUT: %Z.lookup_impl_witness.7d6: <witness> = lookup_impl_witness %.Self.90f, @Z, @Z(%S) [symbolic]
  474. // CHECK:STDOUT: %impl.elem0.e5e: type = impl_witness_access %Z.lookup_impl_witness.7d6, element0 [symbolic]
  475. // CHECK:STDOUT: %empty_tuple: %empty_tuple.type = tuple_value () [concrete]
  476. // CHECK:STDOUT: %Z_where.type.a76: type = facet_type <@Z, @Z(%S) where %impl.elem0.e5e = %empty_tuple.type> [symbolic]
  477. // CHECK:STDOUT: %Z.impl_witness.cfe: <witness> = impl_witness @T.as.Z.impl.34a.%Z.impl_witness_table, @T.as.Z.impl.34a(%T.67d, %S) [symbolic]
  478. // CHECK:STDOUT: %require_complete.1f8: <witness> = require_complete_type %Z_where.type.a76 [symbolic]
  479. // CHECK:STDOUT: %Z.facet.100: %Z.type.4d0 = facet_value %T.67d, (%Z.impl_witness.cfe) [symbolic]
  480. // CHECK:STDOUT: %Z.type.be4: type = facet_type <@Z, @Z(%C)> [concrete]
  481. // CHECK:STDOUT: %.Self.bf2: %Z.type.be4 = symbolic_binding .Self [symbolic_self]
  482. // CHECK:STDOUT: %Self.af9: %Z.type.be4 = symbolic_binding Self, 1 [symbolic]
  483. // CHECK:STDOUT: %Z.assoc_type.553: type = assoc_entity_type @Z, @Z(%C) [concrete]
  484. // CHECK:STDOUT: %assoc0.1e0: %Z.assoc_type.553 = assoc_entity element0, @Z.WithSelf.%X [concrete]
  485. // CHECK:STDOUT: %.Self.as_type.acb: type = facet_access_type %.Self.bf2 [symbolic_self]
  486. // CHECK:STDOUT: %Z.lookup_impl_witness.c06: <witness> = lookup_impl_witness %.Self.bf2, @Z, @Z(%C) [symbolic_self]
  487. // CHECK:STDOUT: %impl.elem0.2cd: type = impl_witness_access %Z.lookup_impl_witness.c06, element0 [symbolic_self]
  488. // CHECK:STDOUT: %Z_where.type.c3e: type = facet_type <@Z, @Z(%C) where %impl.elem0.2cd = %T.67d> [symbolic]
  489. // CHECK:STDOUT: %Z.impl_witness.9b0: <witness> = impl_witness @T.as.Z.impl.cf0.%Z.impl_witness_table, @T.as.Z.impl.cf0(%T.67d) [symbolic]
  490. // CHECK:STDOUT: %require_complete.864: <witness> = require_complete_type %Z_where.type.c3e [symbolic]
  491. // CHECK:STDOUT: %Z.facet.738: %Z.type.be4 = facet_value %T.67d, (%Z.impl_witness.9b0) [symbolic]
  492. // CHECK:STDOUT: %pattern_type.53f: type = pattern_type %Z.type.be4 [concrete]
  493. // CHECK:STDOUT: %T.fe5: %Z.type.be4 = symbolic_binding T, 0 [symbolic]
  494. // CHECK:STDOUT: %T.as_type: type = facet_access_type %T.fe5 [symbolic]
  495. // CHECK:STDOUT: %pattern_type.177: type = pattern_type %T.as_type [symbolic]
  496. // CHECK:STDOUT: %F.type: type = fn_type @F [concrete]
  497. // CHECK:STDOUT: %F: %F.type = struct_value () [concrete]
  498. // CHECK:STDOUT: %require_complete.7c5: <witness> = require_complete_type %T.as_type [symbolic]
  499. // CHECK:STDOUT: %Z.lookup_impl_witness.1cb: <witness> = lookup_impl_witness %T.fe5, @Z, @Z(%C) [symbolic]
  500. // CHECK:STDOUT: %impl.elem0.a5e: type = impl_witness_access %Z.lookup_impl_witness.1cb, element0 [symbolic]
  501. // CHECK:STDOUT: %require_complete.7cf: <witness> = require_complete_type %impl.elem0.a5e [symbolic]
  502. // CHECK:STDOUT: %pattern_type.7ae: type = pattern_type %impl.elem0.a5e [symbolic]
  503. // CHECK:STDOUT: %ImplicitAs.type.cc7: type = generic_interface_type @ImplicitAs [concrete]
  504. // CHECK:STDOUT: %ImplicitAs.generic: %ImplicitAs.type.cc7 = struct_value () [concrete]
  505. // CHECK:STDOUT: %Dest: type = symbolic_binding Dest, 0 [symbolic]
  506. // CHECK:STDOUT: %ImplicitAs.type.031: type = facet_type <@ImplicitAs, @ImplicitAs(%Dest)> [symbolic]
  507. // CHECK:STDOUT: %Self.738: %ImplicitAs.type.031 = symbolic_binding Self, 1 [symbolic]
  508. // CHECK:STDOUT: %ImplicitAs.assoc_type.ff3: type = assoc_entity_type @ImplicitAs, @ImplicitAs(%Dest) [symbolic]
  509. // CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.b3a: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs.WithSelf(%Dest, %Self.738) [symbolic]
  510. // CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.1de: %ImplicitAs.WithSelf.Convert.type.b3a = struct_value () [symbolic]
  511. // CHECK:STDOUT: %ImplicitAs.type.7e4: type = facet_type <@ImplicitAs, @ImplicitAs(%impl.elem0.a5e)> [symbolic]
  512. // CHECK:STDOUT: %ImplicitAs.assoc_type.ac6: type = assoc_entity_type @ImplicitAs, @ImplicitAs(%impl.elem0.a5e) [symbolic]
  513. // CHECK:STDOUT: %assoc0.ae8: %ImplicitAs.assoc_type.ac6 = assoc_entity element0, imports.%Core.import_ref.201 [symbolic]
  514. // CHECK:STDOUT: %require_complete.591: <witness> = require_complete_type %ImplicitAs.type.7e4 [symbolic]
  515. // CHECK:STDOUT: %assoc0.843: %ImplicitAs.assoc_type.ff3 = assoc_entity element0, imports.%Core.import_ref.cc1 [symbolic]
  516. // CHECK:STDOUT: }
  517. // CHECK:STDOUT:
  518. // CHECK:STDOUT: imports {
  519. // CHECK:STDOUT: %Core: <namespace> = namespace file.%Core.import, [concrete] {
  520. // CHECK:STDOUT: .ImplicitAs = %Core.ImplicitAs
  521. // CHECK:STDOUT: import Core//prelude
  522. // CHECK:STDOUT: import Core//prelude/...
  523. // CHECK:STDOUT: }
  524. // CHECK:STDOUT: %Core.ImplicitAs: %ImplicitAs.type.cc7 = import_ref Core//prelude/parts/as, ImplicitAs, loaded [concrete = constants.%ImplicitAs.generic]
  525. // CHECK:STDOUT: %Core.import_ref.178: @ImplicitAs.WithSelf.%ImplicitAs.assoc_type (%ImplicitAs.assoc_type.ff3) = import_ref Core//prelude/parts/as, loc{{\d+_\d+}}, loaded [symbolic = @ImplicitAs.WithSelf.%assoc0 (constants.%assoc0.843)]
  526. // CHECK:STDOUT: %Core.import_ref.201: @ImplicitAs.WithSelf.%ImplicitAs.WithSelf.Convert.type (%ImplicitAs.WithSelf.Convert.type.b3a) = import_ref Core//prelude/parts/as, loc{{\d+_\d+}}, loaded [symbolic = @ImplicitAs.WithSelf.%ImplicitAs.WithSelf.Convert (constants.%ImplicitAs.WithSelf.Convert.1de)]
  527. // CHECK:STDOUT: %Core.import_ref.cc1 = import_ref Core//prelude/parts/as, loc{{\d+_\d+}}, unloaded
  528. // CHECK:STDOUT: }
  529. // CHECK:STDOUT:
  530. // CHECK:STDOUT: file {
  531. // CHECK:STDOUT: package: <namespace> = namespace [concrete] {
  532. // CHECK:STDOUT: .Core = imports.%Core
  533. // CHECK:STDOUT: .Z = %Z.decl
  534. // CHECK:STDOUT: .Y = %Y.decl
  535. // CHECK:STDOUT: .C = %C.decl
  536. // CHECK:STDOUT: .F = %F.decl
  537. // CHECK:STDOUT: }
  538. // CHECK:STDOUT: %Core.import = import Core
  539. // CHECK:STDOUT: %Z.decl: %Z.type.352 = interface_decl @Z [concrete = constants.%Z.generic] {
  540. // CHECK:STDOUT: %T.patt: %pattern_type.98f = symbolic_binding_pattern T, 0 [concrete]
  541. // CHECK:STDOUT: } {
  542. // CHECK:STDOUT: %.loc3_17.1: type = splice_block %.loc3_17.2 [concrete = type] {
  543. // CHECK:STDOUT: %.Self: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.c39]
  544. // CHECK:STDOUT: %.loc3_17.2: type = type_literal type [concrete = type]
  545. // CHECK:STDOUT: }
  546. // CHECK:STDOUT: %T.loc3_14.2: type = symbolic_binding T, 0 [symbolic = %T.loc3_14.1 (constants.%T.67d)]
  547. // CHECK:STDOUT: }
  548. // CHECK:STDOUT: %Y.decl: type = interface_decl @Y [concrete = constants.%Y.type] {} {}
  549. // CHECK:STDOUT: %C.decl: type = class_decl @C [concrete = constants.%C] {} {}
  550. // CHECK:STDOUT: impl_decl @T.as.Z.impl.34a [concrete] {
  551. // CHECK:STDOUT: %T.patt: %pattern_type.98f = symbolic_binding_pattern T, 0 [concrete]
  552. // CHECK:STDOUT: %S.patt: %pattern_type.98f = symbolic_binding_pattern S, 1 [concrete]
  553. // CHECK:STDOUT: } {
  554. // CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc10_15.1 [symbolic = %T.loc10_15.2 (constants.%T.67d)]
  555. // CHECK:STDOUT: %Z.ref: %Z.type.352 = name_ref Z, file.%Z.decl [concrete = constants.%Z.generic]
  556. // CHECK:STDOUT: %S.ref: type = name_ref S, %S.loc10_25.1 [symbolic = %S.loc10_25.2 (constants.%S)]
  557. // CHECK:STDOUT: %Z.type.loc10_42.1: type = facet_type <@Z, @Z(constants.%S)> [symbolic = %Z.type.loc10_42.2 (constants.%Z.type.4d0)]
  558. // CHECK:STDOUT: %.Self.1: @T.as.Z.impl.34a.%Z.type.loc10_42.2 (%Z.type.4d0) = symbolic_binding .Self [symbolic = %.Self.4 (constants.%.Self.90f)]
  559. // CHECK:STDOUT: %.Self.ref: @T.as.Z.impl.34a.%Z.type.loc10_42.2 (%Z.type.4d0) = name_ref .Self, %.Self.1 [symbolic = %.Self.4 (constants.%.Self.90f)]
  560. // CHECK:STDOUT: %.Self.as_type.loc10_50.1: type = facet_access_type %.Self.ref [symbolic = %.Self.as_type.loc10_50.2 (constants.%.Self.as_type.faa)]
  561. // CHECK:STDOUT: %.loc10_50.1: type = converted %.Self.ref, %.Self.as_type.loc10_50.1 [symbolic = %.Self.as_type.loc10_50.2 (constants.%.Self.as_type.faa)]
  562. // CHECK:STDOUT: %.loc10_50.2: @T.as.Z.impl.34a.%Z.assoc_type (%Z.assoc_type.5b2) = specific_constant @X.%assoc0, @Z.WithSelf(constants.%S, constants.%.Self.90f) [symbolic = %assoc0 (constants.%assoc0.8bc)]
  563. // CHECK:STDOUT: %X.ref: @T.as.Z.impl.34a.%Z.assoc_type (%Z.assoc_type.5b2) = name_ref X, %.loc10_50.2 [symbolic = %assoc0 (constants.%assoc0.8bc)]
  564. // CHECK:STDOUT: %impl.elem0.loc10_50.1: type = impl_witness_access constants.%Z.lookup_impl_witness.7d6, element0 [symbolic = %impl.elem0.loc10_50.2 (constants.%impl.elem0.e5e)]
  565. // CHECK:STDOUT: %.loc10_56.1: %empty_tuple.type = tuple_literal () [concrete = constants.%empty_tuple]
  566. // CHECK:STDOUT: %.loc10_56.2: type = converted %.loc10_56.1, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type]
  567. // CHECK:STDOUT: %.loc10_44: type = where_expr [symbolic = %Z_where.type (constants.%Z_where.type.a76)] {
  568. // CHECK:STDOUT: requirement_base_facet_type %Z.type.loc10_42.1
  569. // CHECK:STDOUT: requirement_rewrite %impl.elem0.loc10_50.1, %.loc10_56.2
  570. // CHECK:STDOUT: }
  571. // CHECK:STDOUT: %.loc10_18.1: type = splice_block %.loc10_18.2 [concrete = type] {
  572. // CHECK:STDOUT: %.Self.3: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.c39]
  573. // CHECK:STDOUT: %.loc10_18.2: type = type_literal type [concrete = type]
  574. // CHECK:STDOUT: }
  575. // CHECK:STDOUT: %T.loc10_15.1: type = symbolic_binding T, 0 [symbolic = %T.loc10_15.2 (constants.%T.67d)]
  576. // CHECK:STDOUT: %.loc10_28.1: type = splice_block %.loc10_28.2 [concrete = type] {
  577. // CHECK:STDOUT: %.Self.2: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.c39]
  578. // CHECK:STDOUT: %.loc10_28.2: type = type_literal type [concrete = type]
  579. // CHECK:STDOUT: }
  580. // CHECK:STDOUT: %S.loc10_25.1: type = symbolic_binding S, 1 [symbolic = %S.loc10_25.2 (constants.%S)]
  581. // CHECK:STDOUT: }
  582. // CHECK:STDOUT: impl_decl @T.as.Z.impl.cf0 [concrete] {
  583. // CHECK:STDOUT: %T.patt: %pattern_type.98f = symbolic_binding_pattern T, 0 [concrete]
  584. // CHECK:STDOUT: } {
  585. // CHECK:STDOUT: %T.ref.loc12_24: type = name_ref T, %T.loc12_15.1 [symbolic = %T.loc12_15.2 (constants.%T.67d)]
  586. // CHECK:STDOUT: %Z.ref: %Z.type.352 = name_ref Z, file.%Z.decl [concrete = constants.%Z.generic]
  587. // CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [concrete = constants.%C]
  588. // CHECK:STDOUT: %Z.type: type = facet_type <@Z, @Z(constants.%C)> [concrete = constants.%Z.type.be4]
  589. // CHECK:STDOUT: %.Self.1: %Z.type.be4 = symbolic_binding .Self [symbolic_self = constants.%.Self.bf2]
  590. // CHECK:STDOUT: %.Self.ref: %Z.type.be4 = name_ref .Self, %.Self.1 [symbolic_self = constants.%.Self.bf2]
  591. // CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self.ref [symbolic_self = constants.%.Self.as_type.acb]
  592. // CHECK:STDOUT: %.loc12_40.1: type = converted %.Self.ref, %.Self.as_type [symbolic_self = constants.%.Self.as_type.acb]
  593. // CHECK:STDOUT: %.loc12_40.2: %Z.assoc_type.553 = specific_constant @X.%assoc0, @Z.WithSelf(constants.%C, constants.%.Self.bf2) [concrete = constants.%assoc0.1e0]
  594. // CHECK:STDOUT: %X.ref: %Z.assoc_type.553 = name_ref X, %.loc12_40.2 [concrete = constants.%assoc0.1e0]
  595. // CHECK:STDOUT: %impl.elem0: type = impl_witness_access constants.%Z.lookup_impl_witness.c06, element0 [symbolic_self = constants.%impl.elem0.2cd]
  596. // CHECK:STDOUT: %T.ref.loc12_45: type = name_ref T, %T.loc12_15.1 [symbolic = %T.loc12_15.2 (constants.%T.67d)]
  597. // CHECK:STDOUT: %.loc12_34: type = where_expr [symbolic = %Z_where.type (constants.%Z_where.type.c3e)] {
  598. // CHECK:STDOUT: requirement_base_facet_type %Z.type
  599. // CHECK:STDOUT: requirement_rewrite %impl.elem0, %T.ref.loc12_45
  600. // CHECK:STDOUT: }
  601. // CHECK:STDOUT: %.loc12_18.1: type = splice_block %.loc12_18.2 [concrete = type] {
  602. // CHECK:STDOUT: %.Self.2: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.c39]
  603. // CHECK:STDOUT: %.loc12_18.2: type = type_literal type [concrete = type]
  604. // CHECK:STDOUT: }
  605. // CHECK:STDOUT: %T.loc12_15.1: type = symbolic_binding T, 0 [symbolic = %T.loc12_15.2 (constants.%T.67d)]
  606. // CHECK:STDOUT: }
  607. // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [concrete = constants.%F] {
  608. // CHECK:STDOUT: %T.patt: %pattern_type.53f = symbolic_binding_pattern T, 0 [concrete]
  609. // CHECK:STDOUT: %t.param_patt: @F.%pattern_type.loc14 (%pattern_type.177) = value_param_pattern [concrete]
  610. // CHECK:STDOUT: %t.patt: @F.%pattern_type.loc14 (%pattern_type.177) = at_binding_pattern t, %t.param_patt [concrete]
  611. // CHECK:STDOUT: } {
  612. // CHECK:STDOUT: %.loc14_13: type = splice_block %Z.type [concrete = constants.%Z.type.be4] {
  613. // CHECK:STDOUT: %.Self: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.c39]
  614. // CHECK:STDOUT: %Z.ref: %Z.type.352 = name_ref Z, file.%Z.decl [concrete = constants.%Z.generic]
  615. // CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [concrete = constants.%C]
  616. // CHECK:STDOUT: %Z.type: type = facet_type <@Z, @Z(constants.%C)> [concrete = constants.%Z.type.be4]
  617. // CHECK:STDOUT: }
  618. // CHECK:STDOUT: %T.loc14_7.2: %Z.type.be4 = symbolic_binding T, 0 [symbolic = %T.loc14_7.1 (constants.%T.fe5)]
  619. // CHECK:STDOUT: %t.param: @F.%T.as_type.loc14_19.1 (%T.as_type) = value_param call_param0
  620. // CHECK:STDOUT: %.loc14_19.1: type = splice_block %.loc14_19.2 [symbolic = %T.as_type.loc14_19.1 (constants.%T.as_type)] {
  621. // CHECK:STDOUT: %T.ref.loc14: %Z.type.be4 = name_ref T, %T.loc14_7.2 [symbolic = %T.loc14_7.1 (constants.%T.fe5)]
  622. // CHECK:STDOUT: %T.as_type.loc14_19.2: type = facet_access_type %T.ref.loc14 [symbolic = %T.as_type.loc14_19.1 (constants.%T.as_type)]
  623. // CHECK:STDOUT: %.loc14_19.2: type = converted %T.ref.loc14, %T.as_type.loc14_19.2 [symbolic = %T.as_type.loc14_19.1 (constants.%T.as_type)]
  624. // CHECK:STDOUT: }
  625. // CHECK:STDOUT: %t: @F.%T.as_type.loc14_19.1 (%T.as_type) = value_binding t, %t.param
  626. // CHECK:STDOUT: }
  627. // CHECK:STDOUT: }
  628. // CHECK:STDOUT:
  629. // CHECK:STDOUT: generic interface @Z(%T.loc3_14.2: type) {
  630. // CHECK:STDOUT: %T.loc3_14.1: type = symbolic_binding T, 0 [symbolic = %T.loc3_14.1 (constants.%T.67d)]
  631. // CHECK:STDOUT:
  632. // CHECK:STDOUT: !definition:
  633. // CHECK:STDOUT: %Z.type: type = facet_type <@Z, @Z(%T.loc3_14.1)> [symbolic = %Z.type (constants.%Z.type.0ed)]
  634. // CHECK:STDOUT: %Self.loc3_23.2: @Z.%Z.type (%Z.type.0ed) = symbolic_binding Self, 1 [symbolic = %Self.loc3_23.2 (constants.%Self.822)]
  635. // CHECK:STDOUT:
  636. // CHECK:STDOUT: interface {
  637. // CHECK:STDOUT: %Self.loc3_23.1: @Z.%Z.type (%Z.type.0ed) = symbolic_binding Self, 1 [symbolic = %Self.loc3_23.2 (constants.%Self.822)]
  638. // CHECK:STDOUT: %Z.WithSelf.decl = interface_with_self_decl @Z [concrete]
  639. // CHECK:STDOUT:
  640. // CHECK:STDOUT: !with Self:
  641. // CHECK:STDOUT: %X: type = assoc_const_decl @X [concrete] {
  642. // CHECK:STDOUT: %assoc0: @Z.WithSelf.%Z.assoc_type (%Z.assoc_type.0bf) = assoc_entity element0, @Z.WithSelf.%X [symbolic = @Z.WithSelf.%assoc0 (constants.%assoc0.f33)]
  643. // CHECK:STDOUT: }
  644. // CHECK:STDOUT:
  645. // CHECK:STDOUT: !members:
  646. // CHECK:STDOUT: .Self = %Self.loc3_23.1
  647. // CHECK:STDOUT: .X = @X.%assoc0
  648. // CHECK:STDOUT: witness = (@Z.WithSelf.%X)
  649. // CHECK:STDOUT:
  650. // CHECK:STDOUT: !requires:
  651. // CHECK:STDOUT: }
  652. // CHECK:STDOUT: }
  653. // CHECK:STDOUT:
  654. // CHECK:STDOUT: interface @Y {
  655. // CHECK:STDOUT: %Self: %Y.type = symbolic_binding Self, 0 [symbolic = constants.%Self.162]
  656. // CHECK:STDOUT: %Y.WithSelf.decl = interface_with_self_decl @Y [concrete]
  657. // CHECK:STDOUT:
  658. // CHECK:STDOUT: !members:
  659. // CHECK:STDOUT: .Self = %Self
  660. // CHECK:STDOUT: witness = ()
  661. // CHECK:STDOUT:
  662. // CHECK:STDOUT: !requires:
  663. // CHECK:STDOUT: }
  664. // CHECK:STDOUT:
  665. // CHECK:STDOUT: generic impl @T.as.Z.impl.34a(%T.loc10_15.1: type, %S.loc10_25.1: type) {
  666. // CHECK:STDOUT: %T.loc10_15.2: type = symbolic_binding T, 0 [symbolic = %T.loc10_15.2 (constants.%T.67d)]
  667. // CHECK:STDOUT: %S.loc10_25.2: type = symbolic_binding S, 1 [symbolic = %S.loc10_25.2 (constants.%S)]
  668. // CHECK:STDOUT: %Z.type.loc10_42.2: type = facet_type <@Z, @Z(%S.loc10_25.2)> [symbolic = %Z.type.loc10_42.2 (constants.%Z.type.4d0)]
  669. // CHECK:STDOUT: %.Self.4: @T.as.Z.impl.34a.%Z.type.loc10_42.2 (%Z.type.4d0) = symbolic_binding .Self [symbolic = %.Self.4 (constants.%.Self.90f)]
  670. // CHECK:STDOUT: %require_complete.loc10_50: <witness> = require_complete_type %Z.type.loc10_42.2 [symbolic = %require_complete.loc10_50 (constants.%require_complete.72d)]
  671. // CHECK:STDOUT: %.Self.as_type.loc10_50.2: type = facet_access_type %.Self.4 [symbolic = %.Self.as_type.loc10_50.2 (constants.%.Self.as_type.faa)]
  672. // CHECK:STDOUT: %Z.assoc_type: type = assoc_entity_type @Z, @Z(%S.loc10_25.2) [symbolic = %Z.assoc_type (constants.%Z.assoc_type.5b2)]
  673. // CHECK:STDOUT: %assoc0: @T.as.Z.impl.34a.%Z.assoc_type (%Z.assoc_type.5b2) = assoc_entity element0, @Z.WithSelf.%X [symbolic = %assoc0 (constants.%assoc0.8bc)]
  674. // CHECK:STDOUT: %Z.lookup_impl_witness: <witness> = lookup_impl_witness %.Self.4, @Z, @Z(%S.loc10_25.2) [symbolic = %Z.lookup_impl_witness (constants.%Z.lookup_impl_witness.7d6)]
  675. // CHECK:STDOUT: %impl.elem0.loc10_50.2: type = impl_witness_access %Z.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc10_50.2 (constants.%impl.elem0.e5e)]
  676. // CHECK:STDOUT: %Z_where.type: type = facet_type <@Z, @Z(%S.loc10_25.2) where %impl.elem0.loc10_50.2 = constants.%empty_tuple.type> [symbolic = %Z_where.type (constants.%Z_where.type.a76)]
  677. // CHECK:STDOUT: %Z.impl_witness.loc10_58.2: <witness> = impl_witness %Z.impl_witness_table, @T.as.Z.impl.34a(%T.loc10_15.2, %S.loc10_25.2) [symbolic = %Z.impl_witness.loc10_58.2 (constants.%Z.impl_witness.cfe)]
  678. // CHECK:STDOUT:
  679. // CHECK:STDOUT: !definition:
  680. // CHECK:STDOUT: %require_complete.loc10_44: <witness> = require_complete_type %Z_where.type [symbolic = %require_complete.loc10_44 (constants.%require_complete.1f8)]
  681. // CHECK:STDOUT:
  682. // CHECK:STDOUT: impl: %T.ref as %.loc10_44 {
  683. // CHECK:STDOUT: %Z.impl_witness_table = impl_witness_table (%impl_witness_assoc_constant), @T.as.Z.impl.34a [concrete]
  684. // CHECK:STDOUT: %Z.impl_witness.loc10_58.1: <witness> = impl_witness %Z.impl_witness_table, @T.as.Z.impl.34a(constants.%T.67d, constants.%S) [symbolic = %Z.impl_witness.loc10_58.2 (constants.%Z.impl_witness.cfe)]
  685. // CHECK:STDOUT: %impl_witness_assoc_constant: type = impl_witness_assoc_constant constants.%empty_tuple.type [concrete = constants.%empty_tuple.type]
  686. // CHECK:STDOUT:
  687. // CHECK:STDOUT: !members:
  688. // CHECK:STDOUT: witness = %Z.impl_witness.loc10_58.1
  689. // CHECK:STDOUT: }
  690. // CHECK:STDOUT: }
  691. // CHECK:STDOUT:
  692. // CHECK:STDOUT: generic impl @T.as.Z.impl.cf0(%T.loc12_15.1: type) {
  693. // CHECK:STDOUT: %T.loc12_15.2: type = symbolic_binding T, 0 [symbolic = %T.loc12_15.2 (constants.%T.67d)]
  694. // CHECK:STDOUT: %Z_where.type: type = facet_type <@Z, @Z(constants.%C) where constants.%impl.elem0.2cd = %T.loc12_15.2> [symbolic = %Z_where.type (constants.%Z_where.type.c3e)]
  695. // CHECK:STDOUT: %Z.impl_witness.loc12_47.2: <witness> = impl_witness %Z.impl_witness_table, @T.as.Z.impl.cf0(%T.loc12_15.2) [symbolic = %Z.impl_witness.loc12_47.2 (constants.%Z.impl_witness.9b0)]
  696. // CHECK:STDOUT:
  697. // CHECK:STDOUT: !definition:
  698. // CHECK:STDOUT: %require_complete: <witness> = require_complete_type %Z_where.type [symbolic = %require_complete (constants.%require_complete.864)]
  699. // CHECK:STDOUT:
  700. // CHECK:STDOUT: impl: %T.ref.loc12_24 as %.loc12_34 {
  701. // CHECK:STDOUT: %Z.impl_witness_table = impl_witness_table (%impl_witness_assoc_constant), @T.as.Z.impl.cf0 [concrete]
  702. // CHECK:STDOUT: %Z.impl_witness.loc12_47.1: <witness> = impl_witness %Z.impl_witness_table, @T.as.Z.impl.cf0(constants.%T.67d) [symbolic = %Z.impl_witness.loc12_47.2 (constants.%Z.impl_witness.9b0)]
  703. // CHECK:STDOUT: %impl_witness_assoc_constant: type = impl_witness_assoc_constant constants.%T.67d [symbolic = %T.loc12_15.2 (constants.%T.67d)]
  704. // CHECK:STDOUT:
  705. // CHECK:STDOUT: !members:
  706. // CHECK:STDOUT: witness = %Z.impl_witness.loc12_47.1
  707. // CHECK:STDOUT: }
  708. // CHECK:STDOUT: }
  709. // CHECK:STDOUT:
  710. // CHECK:STDOUT: class @C {
  711. // CHECK:STDOUT: %complete_type: <witness> = complete_type_witness constants.%empty_struct_type [concrete = constants.%complete_type]
  712. // CHECK:STDOUT: complete_type_witness = %complete_type
  713. // CHECK:STDOUT:
  714. // CHECK:STDOUT: !members:
  715. // CHECK:STDOUT: .Self = constants.%C
  716. // CHECK:STDOUT: }
  717. // CHECK:STDOUT:
  718. // CHECK:STDOUT: generic fn @F(%T.loc14_7.2: %Z.type.be4) {
  719. // CHECK:STDOUT: %T.loc14_7.1: %Z.type.be4 = symbolic_binding T, 0 [symbolic = %T.loc14_7.1 (constants.%T.fe5)]
  720. // CHECK:STDOUT: %T.as_type.loc14_19.1: type = facet_access_type %T.loc14_7.1 [symbolic = %T.as_type.loc14_19.1 (constants.%T.as_type)]
  721. // CHECK:STDOUT: %pattern_type.loc14: type = pattern_type %T.as_type.loc14_19.1 [symbolic = %pattern_type.loc14 (constants.%pattern_type.177)]
  722. // CHECK:STDOUT:
  723. // CHECK:STDOUT: !definition:
  724. // CHECK:STDOUT: %require_complete.loc14: <witness> = require_complete_type %T.as_type.loc14_19.1 [symbolic = %require_complete.loc14 (constants.%require_complete.7c5)]
  725. // CHECK:STDOUT: %Z.lookup_impl_witness: <witness> = lookup_impl_witness %T.loc14_7.1, @Z, @Z(constants.%C) [symbolic = %Z.lookup_impl_witness (constants.%Z.lookup_impl_witness.1cb)]
  726. // CHECK:STDOUT: %impl.elem0.loc22_18.2: type = impl_witness_access %Z.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc22_18.2 (constants.%impl.elem0.a5e)]
  727. // CHECK:STDOUT: %require_complete.loc22_18: <witness> = require_complete_type %impl.elem0.loc22_18.2 [symbolic = %require_complete.loc22_18 (constants.%require_complete.7cf)]
  728. // CHECK:STDOUT: %pattern_type.loc22: type = pattern_type %impl.elem0.loc22_18.2 [symbolic = %pattern_type.loc22 (constants.%pattern_type.7ae)]
  729. // CHECK:STDOUT: %ImplicitAs.type.loc22_23.2: type = facet_type <@ImplicitAs, @ImplicitAs(%impl.elem0.loc22_18.2)> [symbolic = %ImplicitAs.type.loc22_23.2 (constants.%ImplicitAs.type.7e4)]
  730. // CHECK:STDOUT: %require_complete.loc22_23: <witness> = require_complete_type %ImplicitAs.type.loc22_23.2 [symbolic = %require_complete.loc22_23 (constants.%require_complete.591)]
  731. // CHECK:STDOUT: %ImplicitAs.assoc_type: type = assoc_entity_type @ImplicitAs, @ImplicitAs(%impl.elem0.loc22_18.2) [symbolic = %ImplicitAs.assoc_type (constants.%ImplicitAs.assoc_type.ac6)]
  732. // CHECK:STDOUT: %assoc0: @F.%ImplicitAs.assoc_type (%ImplicitAs.assoc_type.ac6) = assoc_entity element0, imports.%Core.import_ref.201 [symbolic = %assoc0 (constants.%assoc0.ae8)]
  733. // CHECK:STDOUT:
  734. // CHECK:STDOUT: fn(%t.param: @F.%T.as_type.loc14_19.1 (%T.as_type)) {
  735. // CHECK:STDOUT: !entry:
  736. // CHECK:STDOUT: name_binding_decl {
  737. // CHECK:STDOUT: %a.patt: @F.%pattern_type.loc22 (%pattern_type.7ae) = value_binding_pattern a [concrete]
  738. // CHECK:STDOUT: }
  739. // CHECK:STDOUT: %t.ref: @F.%T.as_type.loc14_19.1 (%T.as_type) = name_ref t, %t
  740. // CHECK:STDOUT: %.loc22_18.1: type = splice_block %impl.elem0.loc22_18.1 [symbolic = %impl.elem0.loc22_18.2 (constants.%impl.elem0.a5e)] {
  741. // CHECK:STDOUT: %T.ref.loc22: %Z.type.be4 = name_ref T, %T.loc14_7.2 [symbolic = %T.loc14_7.1 (constants.%T.fe5)]
  742. // CHECK:STDOUT: %T.as_type.loc22: type = facet_access_type %T.ref.loc22 [symbolic = %T.as_type.loc14_19.1 (constants.%T.as_type)]
  743. // CHECK:STDOUT: %.loc22_18.2: type = converted %T.ref.loc22, %T.as_type.loc22 [symbolic = %T.as_type.loc14_19.1 (constants.%T.as_type)]
  744. // CHECK:STDOUT: %.loc22_18.3: %Z.assoc_type.553 = specific_constant @X.%assoc0, @Z.WithSelf(constants.%C, constants.%T.fe5) [concrete = constants.%assoc0.1e0]
  745. // CHECK:STDOUT: %X.ref: %Z.assoc_type.553 = name_ref X, %.loc22_18.3 [concrete = constants.%assoc0.1e0]
  746. // CHECK:STDOUT: %impl.elem0.loc22_18.1: type = impl_witness_access constants.%Z.lookup_impl_witness.1cb, element0 [symbolic = %impl.elem0.loc22_18.2 (constants.%impl.elem0.a5e)]
  747. // CHECK:STDOUT: }
  748. // CHECK:STDOUT: %ImplicitAs.type.loc22_23.1: type = facet_type <@ImplicitAs, @ImplicitAs(constants.%impl.elem0.a5e)> [symbolic = %ImplicitAs.type.loc22_23.2 (constants.%ImplicitAs.type.7e4)]
  749. // CHECK:STDOUT: %.loc22_23.1: @F.%ImplicitAs.assoc_type (%ImplicitAs.assoc_type.ac6) = specific_constant imports.%Core.import_ref.178, @ImplicitAs.WithSelf(constants.%impl.elem0.a5e, constants.%Self.738) [symbolic = %assoc0 (constants.%assoc0.ae8)]
  750. // CHECK:STDOUT: %Convert.ref: @F.%ImplicitAs.assoc_type (%ImplicitAs.assoc_type.ac6) = name_ref Convert, %.loc22_23.1 [symbolic = %assoc0 (constants.%assoc0.ae8)]
  751. // CHECK:STDOUT: %.loc22_23.2: @F.%impl.elem0.loc22_18.2 (%impl.elem0.a5e) = converted %t.ref, <error> [concrete = <error>]
  752. // CHECK:STDOUT: %a: @F.%impl.elem0.loc22_18.2 (%impl.elem0.a5e) = value_binding a, <error> [concrete = <error>]
  753. // CHECK:STDOUT: return
  754. // CHECK:STDOUT: }
  755. // CHECK:STDOUT: }
  756. // CHECK:STDOUT:
  757. // CHECK:STDOUT: specific @Z(constants.%T.67d) {
  758. // CHECK:STDOUT: %T.loc3_14.1 => constants.%T.67d
  759. // CHECK:STDOUT: }
  760. // CHECK:STDOUT:
  761. // CHECK:STDOUT: specific @Z.WithSelf(constants.%T.67d, constants.%Self.822) {}
  762. // CHECK:STDOUT:
  763. // CHECK:STDOUT: specific @Y.WithSelf(constants.%Self.162) {}
  764. // CHECK:STDOUT:
  765. // CHECK:STDOUT: specific @Z(constants.%S) {
  766. // CHECK:STDOUT: %T.loc3_14.1 => constants.%S
  767. // CHECK:STDOUT:
  768. // CHECK:STDOUT: !definition:
  769. // CHECK:STDOUT: %Z.type => constants.%Z.type.4d0
  770. // CHECK:STDOUT: %Self.loc3_23.2 => constants.%Self.427
  771. // CHECK:STDOUT: }
  772. // CHECK:STDOUT:
  773. // CHECK:STDOUT: specific @Z.WithSelf(constants.%S, constants.%Self.822) {
  774. // CHECK:STDOUT: !definition:
  775. // CHECK:STDOUT: %T => constants.%S
  776. // CHECK:STDOUT: %Z.assoc_type => constants.%Z.assoc_type.5b2
  777. // CHECK:STDOUT: %assoc0 => constants.%assoc0.8bc
  778. // CHECK:STDOUT: }
  779. // CHECK:STDOUT:
  780. // CHECK:STDOUT: specific @Z.WithSelf(constants.%S, constants.%.Self.90f) {
  781. // CHECK:STDOUT: !definition:
  782. // CHECK:STDOUT: %T => constants.%S
  783. // CHECK:STDOUT: %Z.assoc_type => constants.%Z.assoc_type.5b2
  784. // CHECK:STDOUT: %assoc0 => constants.%assoc0.8bc
  785. // CHECK:STDOUT: }
  786. // CHECK:STDOUT:
  787. // CHECK:STDOUT: specific @T.as.Z.impl.34a(constants.%T.67d, constants.%S) {
  788. // CHECK:STDOUT: %T.loc10_15.2 => constants.%T.67d
  789. // CHECK:STDOUT: %S.loc10_25.2 => constants.%S
  790. // CHECK:STDOUT: %Z.type.loc10_42.2 => constants.%Z.type.4d0
  791. // CHECK:STDOUT: %.Self.4 => constants.%.Self.90f
  792. // CHECK:STDOUT: %require_complete.loc10_50 => constants.%require_complete.72d
  793. // CHECK:STDOUT: %.Self.as_type.loc10_50.2 => constants.%.Self.as_type.faa
  794. // CHECK:STDOUT: %Z.assoc_type => constants.%Z.assoc_type.5b2
  795. // CHECK:STDOUT: %assoc0 => constants.%assoc0.8bc
  796. // CHECK:STDOUT: %Z.lookup_impl_witness => constants.%Z.lookup_impl_witness.7d6
  797. // CHECK:STDOUT: %impl.elem0.loc10_50.2 => constants.%impl.elem0.e5e
  798. // CHECK:STDOUT: %Z_where.type => constants.%Z_where.type.a76
  799. // CHECK:STDOUT: %Z.impl_witness.loc10_58.2 => constants.%Z.impl_witness.cfe
  800. // CHECK:STDOUT: }
  801. // CHECK:STDOUT:
  802. // CHECK:STDOUT: specific @Z.WithSelf(constants.%S, constants.%Z.facet.100) {
  803. // CHECK:STDOUT: !definition:
  804. // CHECK:STDOUT: %T => constants.%S
  805. // CHECK:STDOUT: %Z.assoc_type => constants.%Z.assoc_type.5b2
  806. // CHECK:STDOUT: %assoc0 => constants.%assoc0.8bc
  807. // CHECK:STDOUT: }
  808. // CHECK:STDOUT:
  809. // CHECK:STDOUT: specific @Z(constants.%C) {
  810. // CHECK:STDOUT: %T.loc3_14.1 => constants.%C
  811. // CHECK:STDOUT:
  812. // CHECK:STDOUT: !definition:
  813. // CHECK:STDOUT: %Z.type => constants.%Z.type.be4
  814. // CHECK:STDOUT: %Self.loc3_23.2 => constants.%Self.af9
  815. // CHECK:STDOUT: }
  816. // CHECK:STDOUT:
  817. // CHECK:STDOUT: specific @Z.WithSelf(constants.%C, constants.%Self.822) {
  818. // CHECK:STDOUT: !definition:
  819. // CHECK:STDOUT: %T => constants.%C
  820. // CHECK:STDOUT: %Z.assoc_type => constants.%Z.assoc_type.553
  821. // CHECK:STDOUT: %assoc0 => constants.%assoc0.1e0
  822. // CHECK:STDOUT: }
  823. // CHECK:STDOUT:
  824. // CHECK:STDOUT: specific @Z.WithSelf(constants.%C, constants.%.Self.bf2) {
  825. // CHECK:STDOUT: !definition:
  826. // CHECK:STDOUT: %T => constants.%C
  827. // CHECK:STDOUT: %Z.assoc_type => constants.%Z.assoc_type.553
  828. // CHECK:STDOUT: %assoc0 => constants.%assoc0.1e0
  829. // CHECK:STDOUT: }
  830. // CHECK:STDOUT:
  831. // CHECK:STDOUT: specific @T.as.Z.impl.cf0(constants.%T.67d) {
  832. // CHECK:STDOUT: %T.loc12_15.2 => constants.%T.67d
  833. // CHECK:STDOUT: %Z_where.type => constants.%Z_where.type.c3e
  834. // CHECK:STDOUT: %Z.impl_witness.loc12_47.2 => constants.%Z.impl_witness.9b0
  835. // CHECK:STDOUT: }
  836. // CHECK:STDOUT:
  837. // CHECK:STDOUT: specific @Z.WithSelf(constants.%C, constants.%Z.facet.738) {
  838. // CHECK:STDOUT: !definition:
  839. // CHECK:STDOUT: %T => constants.%C
  840. // CHECK:STDOUT: %Z.assoc_type => constants.%Z.assoc_type.553
  841. // CHECK:STDOUT: %assoc0 => constants.%assoc0.1e0
  842. // CHECK:STDOUT: }
  843. // CHECK:STDOUT:
  844. // CHECK:STDOUT: specific @F(constants.%T.fe5) {
  845. // CHECK:STDOUT: %T.loc14_7.1 => constants.%T.fe5
  846. // CHECK:STDOUT: %T.as_type.loc14_19.1 => constants.%T.as_type
  847. // CHECK:STDOUT: %pattern_type.loc14 => constants.%pattern_type.177
  848. // CHECK:STDOUT: }
  849. // CHECK:STDOUT:
  850. // CHECK:STDOUT: specific @Z.WithSelf(constants.%C, constants.%T.fe5) {
  851. // CHECK:STDOUT: !definition:
  852. // CHECK:STDOUT: %T => constants.%C
  853. // CHECK:STDOUT: %Z.assoc_type => constants.%Z.assoc_type.553
  854. // CHECK:STDOUT: %assoc0 => constants.%assoc0.1e0
  855. // CHECK:STDOUT: }
  856. // CHECK:STDOUT:
  857. // CHECK:STDOUT: --- final_impl_rewrite_of_symbolic_through_impl_lookup.carbon
  858. // CHECK:STDOUT:
  859. // CHECK:STDOUT: constants {
  860. // CHECK:STDOUT: %Ptr.type: type = facet_type <@Ptr> [concrete]
  861. // CHECK:STDOUT: %Self.0e0: %Ptr.type = symbolic_binding Self, 0 [symbolic]
  862. // CHECK:STDOUT: %Ptr.assoc_type: type = assoc_entity_type @Ptr [concrete]
  863. // CHECK:STDOUT: %assoc0.6bc: %Ptr.assoc_type = assoc_entity element0, @Ptr.WithSelf.%Type [concrete]
  864. // CHECK:STDOUT: %type: type = facet_type <type> [concrete]
  865. // CHECK:STDOUT: %.Self.c39: %type = symbolic_binding .Self [symbolic_self]
  866. // CHECK:STDOUT: %pattern_type.98f: type = pattern_type type [concrete]
  867. // CHECK:STDOUT: %U.67d: type = symbolic_binding U, 0 [symbolic]
  868. // CHECK:STDOUT: %.Self.47a: %Ptr.type = symbolic_binding .Self [symbolic_self]
  869. // CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self.47a [symbolic_self]
  870. // CHECK:STDOUT: %Ptr.lookup_impl_witness: <witness> = lookup_impl_witness %.Self.47a, @Ptr [symbolic_self]
  871. // CHECK:STDOUT: %impl.elem0.4ac: type = impl_witness_access %Ptr.lookup_impl_witness, element0 [symbolic_self]
  872. // CHECK:STDOUT: %ptr.e8f8f9.1: type = ptr_type %U.67d [symbolic]
  873. // CHECK:STDOUT: %Ptr_where.type.3963c5.1: type = facet_type <@Ptr where %impl.elem0.4ac = %ptr.e8f8f9.1> [symbolic]
  874. // CHECK:STDOUT: %Ptr.impl_witness.117547.1: <witness> = impl_witness @U.as.Ptr.impl.%Ptr.impl_witness_table, @U.as.Ptr.impl(%U.67d) [symbolic]
  875. // CHECK:STDOUT: %require_complete.73ad1d.1: <witness> = require_complete_type %Ptr_where.type.3963c5.1 [symbolic]
  876. // CHECK:STDOUT: %Ptr.facet.5445c3.1: %Ptr.type = facet_value %U.67d, (%Ptr.impl_witness.117547.1) [symbolic]
  877. // CHECK:STDOUT: %T.67d: type = symbolic_binding T, 0 [symbolic]
  878. // CHECK:STDOUT: %pattern_type.51d: type = pattern_type %T.67d [symbolic]
  879. // CHECK:STDOUT: %ptr.e8f8f9.2: type = ptr_type %T.67d [symbolic]
  880. // CHECK:STDOUT: %Ptr_where.type.3963c5.2: type = facet_type <@Ptr where %impl.elem0.4ac = %ptr.e8f8f9.2> [symbolic]
  881. // CHECK:STDOUT: %Ptr.impl_witness.117547.2: <witness> = impl_witness @U.as.Ptr.impl.%Ptr.impl_witness_table, @U.as.Ptr.impl(%T.67d) [symbolic]
  882. // CHECK:STDOUT: %require_complete.73ad1d.2: <witness> = require_complete_type %Ptr_where.type.3963c5.2 [symbolic]
  883. // CHECK:STDOUT: %.656: require_specific_def_type = require_specific_def @U.as.Ptr.impl(%T.67d) [symbolic]
  884. // CHECK:STDOUT: %Ptr.facet.5445c3.2: %Ptr.type = facet_value %T.67d, (%Ptr.impl_witness.117547.2) [symbolic]
  885. // CHECK:STDOUT: %.cb6: Core.Form = init_form %ptr.e8f8f9.2 [symbolic]
  886. // CHECK:STDOUT: %pattern_type.4f4: type = pattern_type %ptr.e8f8f9.2 [symbolic]
  887. // CHECK:STDOUT: %F.type: type = fn_type @F [concrete]
  888. // CHECK:STDOUT: %F: %F.type = struct_value () [concrete]
  889. // CHECK:STDOUT: %require_complete.944: <witness> = require_complete_type %T.67d [symbolic]
  890. // CHECK:STDOUT: %require_complete.ef1: <witness> = require_complete_type %ptr.e8f8f9.2 [symbolic]
  891. // CHECK:STDOUT: %Copy.type: type = facet_type <@Copy> [concrete]
  892. // CHECK:STDOUT: %Copy.lookup_impl_witness.2e6: <witness> = lookup_impl_witness %ptr.e8f8f9.2, @Copy [symbolic]
  893. // CHECK:STDOUT: %.2f2: require_specific_def_type = require_specific_def @ptr.as.Copy.impl(%T.67d) [symbolic]
  894. // CHECK:STDOUT: %Copy.facet: %Copy.type = facet_value %ptr.e8f8f9.2, (%Copy.lookup_impl_witness.2e6) [symbolic]
  895. // CHECK:STDOUT: %Copy.WithSelf.Op.type.d82: type = fn_type @Copy.WithSelf.Op, @Copy.WithSelf(%Copy.facet) [symbolic]
  896. // CHECK:STDOUT: %.299: type = fn_type_with_self_type %Copy.WithSelf.Op.type.d82, %Copy.facet [symbolic]
  897. // CHECK:STDOUT: %impl.elem0.1c7: %.299 = impl_witness_access %Copy.lookup_impl_witness.2e6, element0 [symbolic]
  898. // CHECK:STDOUT: %specific_impl_fn.366: <specific function> = specific_impl_function %impl.elem0.1c7, @Copy.WithSelf.Op(%Copy.facet) [symbolic]
  899. // CHECK:STDOUT: }
  900. // CHECK:STDOUT:
  901. // CHECK:STDOUT: imports {
  902. // CHECK:STDOUT: %Core: <namespace> = namespace file.%Core.import, [concrete] {
  903. // CHECK:STDOUT: .Copy = %Core.Copy
  904. // CHECK:STDOUT: import Core//prelude
  905. // CHECK:STDOUT: import Core//prelude/...
  906. // CHECK:STDOUT: }
  907. // CHECK:STDOUT: %Core.Copy: type = import_ref Core//prelude/parts/copy, Copy, loaded [concrete = constants.%Copy.type]
  908. // CHECK:STDOUT: }
  909. // CHECK:STDOUT:
  910. // CHECK:STDOUT: file {
  911. // CHECK:STDOUT: package: <namespace> = namespace [concrete] {
  912. // CHECK:STDOUT: .Core = imports.%Core
  913. // CHECK:STDOUT: .Ptr = %Ptr.decl
  914. // CHECK:STDOUT: .F = %F.decl
  915. // CHECK:STDOUT: }
  916. // CHECK:STDOUT: %Core.import = import Core
  917. // CHECK:STDOUT: %Ptr.decl: type = interface_decl @Ptr [concrete = constants.%Ptr.type] {} {}
  918. // CHECK:STDOUT: impl_decl @U.as.Ptr.impl [concrete] {
  919. // CHECK:STDOUT: %U.patt: %pattern_type.98f = symbolic_binding_pattern U, 0 [concrete]
  920. // CHECK:STDOUT: } {
  921. // CHECK:STDOUT: %U.ref.loc7_30: type = name_ref U, %U.loc7_21.1 [symbolic = %U.loc7_21.2 (constants.%U.67d)]
  922. // CHECK:STDOUT: %Ptr.ref: type = name_ref Ptr, file.%Ptr.decl [concrete = constants.%Ptr.type]
  923. // CHECK:STDOUT: %.Self.1: %Ptr.type = symbolic_binding .Self [symbolic_self = constants.%.Self.47a]
  924. // CHECK:STDOUT: %.Self.ref: %Ptr.type = name_ref .Self, %.Self.1 [symbolic_self = constants.%.Self.47a]
  925. // CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self.ref [symbolic_self = constants.%.Self.as_type]
  926. // CHECK:STDOUT: %.loc7_45: type = converted %.Self.ref, %.Self.as_type [symbolic_self = constants.%.Self.as_type]
  927. // CHECK:STDOUT: %Type.ref: %Ptr.assoc_type = name_ref Type, @Type.%assoc0 [concrete = constants.%assoc0.6bc]
  928. // CHECK:STDOUT: %impl.elem0: type = impl_witness_access constants.%Ptr.lookup_impl_witness, element0 [symbolic_self = constants.%impl.elem0.4ac]
  929. // CHECK:STDOUT: %U.ref.loc7_53: type = name_ref U, %U.loc7_21.1 [symbolic = %U.loc7_21.2 (constants.%U.67d)]
  930. // CHECK:STDOUT: %ptr.loc7_54.1: type = ptr_type %U.ref.loc7_53 [symbolic = %ptr.loc7_54.2 (constants.%ptr.e8f8f9.1)]
  931. // CHECK:STDOUT: %.loc7_39: type = where_expr [symbolic = %Ptr_where.type (constants.%Ptr_where.type.3963c5.1)] {
  932. // CHECK:STDOUT: requirement_base_facet_type %Ptr.ref
  933. // CHECK:STDOUT: requirement_rewrite %impl.elem0, %ptr.loc7_54.1
  934. // CHECK:STDOUT: }
  935. // CHECK:STDOUT: %.loc7_24.1: type = splice_block %.loc7_24.2 [concrete = type] {
  936. // CHECK:STDOUT: %.Self.2: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.c39]
  937. // CHECK:STDOUT: %.loc7_24.2: type = type_literal type [concrete = type]
  938. // CHECK:STDOUT: }
  939. // CHECK:STDOUT: %U.loc7_21.1: type = symbolic_binding U, 0 [symbolic = %U.loc7_21.2 (constants.%U.67d)]
  940. // CHECK:STDOUT: }
  941. // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [concrete = constants.%F] {
  942. // CHECK:STDOUT: %T.patt: %pattern_type.98f = symbolic_binding_pattern T, 0 [concrete]
  943. // CHECK:STDOUT: %t.patt: @F.%pattern_type.loc9_21 (%pattern_type.51d) = ref_binding_pattern t [concrete]
  944. // CHECK:STDOUT: %t.param_patt: @F.%pattern_type.loc9_21 (%pattern_type.51d) = var_param_pattern %t.patt [concrete]
  945. // CHECK:STDOUT: %return.param_patt: @F.%pattern_type.loc9_30 (%pattern_type.4f4) = out_param_pattern [concrete]
  946. // CHECK:STDOUT: %return.patt: @F.%pattern_type.loc9_30 (%pattern_type.4f4) = return_slot_pattern %return.param_patt, %impl.elem0.loc9 [concrete]
  947. // CHECK:STDOUT: } {
  948. // CHECK:STDOUT: %T.ref.loc9_29: type = name_ref T, %T.loc9_7.2 [symbolic = %T.loc9_7.1 (constants.%T.67d)]
  949. // CHECK:STDOUT: %Ptr.ref: type = name_ref Ptr, file.%Ptr.decl [concrete = constants.%Ptr.type]
  950. // CHECK:STDOUT: %Type.ref: %Ptr.assoc_type = name_ref Type, @Type.%assoc0 [concrete = constants.%assoc0.6bc]
  951. // CHECK:STDOUT: %Ptr.facet.loc9_30.2: %Ptr.type = facet_value %T.ref.loc9_29, (constants.%Ptr.impl_witness.117547.2) [symbolic = %Ptr.facet.loc9_30.1 (constants.%Ptr.facet.5445c3.2)]
  952. // CHECK:STDOUT: %.loc9_30.3: %Ptr.type = converted %T.ref.loc9_29, %Ptr.facet.loc9_30.2 [symbolic = %Ptr.facet.loc9_30.1 (constants.%Ptr.facet.5445c3.2)]
  953. // CHECK:STDOUT: %impl.elem0.loc9: type = impl_witness_access constants.%Ptr.impl_witness.117547.2, element0 [symbolic = %ptr (constants.%ptr.e8f8f9.2)]
  954. // CHECK:STDOUT: %.loc9_30.4: Core.Form = init_form %impl.elem0.loc9 [symbolic = %.loc9_30.2 (constants.%.cb6)]
  955. // CHECK:STDOUT: %.loc9_10.1: type = splice_block %.loc9_10.2 [concrete = type] {
  956. // CHECK:STDOUT: %.Self: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.c39]
  957. // CHECK:STDOUT: %.loc9_10.2: type = type_literal type [concrete = type]
  958. // CHECK:STDOUT: }
  959. // CHECK:STDOUT: %T.loc9_7.2: type = symbolic_binding T, 0 [symbolic = %T.loc9_7.1 (constants.%T.67d)]
  960. // CHECK:STDOUT: %t.param: ref @F.%T.loc9_7.1 (%T.67d) = ref_param call_param0
  961. // CHECK:STDOUT: %T.ref.loc9_23: type = name_ref T, %T.loc9_7.2 [symbolic = %T.loc9_7.1 (constants.%T.67d)]
  962. // CHECK:STDOUT: %t: ref @F.%T.loc9_7.1 (%T.67d) = ref_binding t, %t.param
  963. // CHECK:STDOUT: %return.param: ref @F.%ptr (%ptr.e8f8f9.2) = out_param call_param1
  964. // CHECK:STDOUT: %return: ref @F.%ptr (%ptr.e8f8f9.2) = return_slot %return.param
  965. // CHECK:STDOUT: }
  966. // CHECK:STDOUT: }
  967. // CHECK:STDOUT:
  968. // CHECK:STDOUT: interface @Ptr {
  969. // CHECK:STDOUT: %Self: %Ptr.type = symbolic_binding Self, 0 [symbolic = constants.%Self.0e0]
  970. // CHECK:STDOUT: %Ptr.WithSelf.decl = interface_with_self_decl @Ptr [concrete]
  971. // CHECK:STDOUT:
  972. // CHECK:STDOUT: !with Self:
  973. // CHECK:STDOUT: %Type: type = assoc_const_decl @Type [concrete] {
  974. // CHECK:STDOUT: %assoc0: %Ptr.assoc_type = assoc_entity element0, @Ptr.WithSelf.%Type [concrete = constants.%assoc0.6bc]
  975. // CHECK:STDOUT: }
  976. // CHECK:STDOUT:
  977. // CHECK:STDOUT: !members:
  978. // CHECK:STDOUT: .Self = %Self
  979. // CHECK:STDOUT: .Type = @Type.%assoc0
  980. // CHECK:STDOUT: witness = (@Ptr.WithSelf.%Type)
  981. // CHECK:STDOUT:
  982. // CHECK:STDOUT: !requires:
  983. // CHECK:STDOUT: }
  984. // CHECK:STDOUT:
  985. // CHECK:STDOUT: generic impl @U.as.Ptr.impl(%U.loc7_21.1: type) {
  986. // CHECK:STDOUT: %U.loc7_21.2: type = symbolic_binding U, 0 [symbolic = %U.loc7_21.2 (constants.%U.67d)]
  987. // CHECK:STDOUT: %ptr.loc7_54.2: type = ptr_type %U.loc7_21.2 [symbolic = %ptr.loc7_54.2 (constants.%ptr.e8f8f9.1)]
  988. // CHECK:STDOUT: %Ptr_where.type: type = facet_type <@Ptr where constants.%impl.elem0.4ac = %ptr.loc7_54.2> [symbolic = %Ptr_where.type (constants.%Ptr_where.type.3963c5.1)]
  989. // CHECK:STDOUT: %Ptr.impl_witness.loc7_56.2: <witness> = impl_witness %Ptr.impl_witness_table, @U.as.Ptr.impl(%U.loc7_21.2) [symbolic = %Ptr.impl_witness.loc7_56.2 (constants.%Ptr.impl_witness.117547.1)]
  990. // CHECK:STDOUT:
  991. // CHECK:STDOUT: !definition:
  992. // CHECK:STDOUT: %require_complete: <witness> = require_complete_type %Ptr_where.type [symbolic = %require_complete (constants.%require_complete.73ad1d.1)]
  993. // CHECK:STDOUT:
  994. // CHECK:STDOUT: impl: %U.ref.loc7_30 as %.loc7_39 {
  995. // CHECK:STDOUT: %Ptr.impl_witness_table = impl_witness_table (%impl_witness_assoc_constant), @U.as.Ptr.impl [concrete]
  996. // CHECK:STDOUT: %Ptr.impl_witness.loc7_56.1: <witness> = impl_witness %Ptr.impl_witness_table, @U.as.Ptr.impl(constants.%U.67d) [symbolic = %Ptr.impl_witness.loc7_56.2 (constants.%Ptr.impl_witness.117547.1)]
  997. // CHECK:STDOUT: %impl_witness_assoc_constant: type = impl_witness_assoc_constant constants.%ptr.e8f8f9.1 [symbolic = %ptr.loc7_54.2 (constants.%ptr.e8f8f9.1)]
  998. // CHECK:STDOUT:
  999. // CHECK:STDOUT: !members:
  1000. // CHECK:STDOUT: witness = %Ptr.impl_witness.loc7_56.1
  1001. // CHECK:STDOUT: }
  1002. // CHECK:STDOUT: }
  1003. // CHECK:STDOUT:
  1004. // CHECK:STDOUT: generic fn @F(%T.loc9_7.2: type) {
  1005. // CHECK:STDOUT: %T.loc9_7.1: type = symbolic_binding T, 0 [symbolic = %T.loc9_7.1 (constants.%T.67d)]
  1006. // CHECK:STDOUT: %pattern_type.loc9_21: type = pattern_type %T.loc9_7.1 [symbolic = %pattern_type.loc9_21 (constants.%pattern_type.51d)]
  1007. // CHECK:STDOUT: %.loc9_30.1: require_specific_def_type = require_specific_def @U.as.Ptr.impl(%T.loc9_7.1) [symbolic = %.loc9_30.1 (constants.%.656)]
  1008. // CHECK:STDOUT: %Ptr.impl_witness: <witness> = impl_witness @U.as.Ptr.impl.%Ptr.impl_witness_table, @U.as.Ptr.impl(%T.loc9_7.1) [symbolic = %Ptr.impl_witness (constants.%Ptr.impl_witness.117547.2)]
  1009. // CHECK:STDOUT: %Ptr.facet.loc9_30.1: %Ptr.type = facet_value %T.loc9_7.1, (%Ptr.impl_witness) [symbolic = %Ptr.facet.loc9_30.1 (constants.%Ptr.facet.5445c3.2)]
  1010. // CHECK:STDOUT: %ptr: type = ptr_type %T.loc9_7.1 [symbolic = %ptr (constants.%ptr.e8f8f9.2)]
  1011. // CHECK:STDOUT: %.loc9_30.2: Core.Form = init_form %ptr [symbolic = %.loc9_30.2 (constants.%.cb6)]
  1012. // CHECK:STDOUT: %pattern_type.loc9_30: type = pattern_type %ptr [symbolic = %pattern_type.loc9_30 (constants.%pattern_type.4f4)]
  1013. // CHECK:STDOUT:
  1014. // CHECK:STDOUT: !definition:
  1015. // CHECK:STDOUT: %require_complete.loc9_16: <witness> = require_complete_type %T.loc9_7.1 [symbolic = %require_complete.loc9_16 (constants.%require_complete.944)]
  1016. // CHECK:STDOUT: %require_complete.loc9_26: <witness> = require_complete_type %ptr [symbolic = %require_complete.loc9_26 (constants.%require_complete.ef1)]
  1017. // CHECK:STDOUT: %.loc10_10.1: require_specific_def_type = require_specific_def @ptr.as.Copy.impl(%T.loc9_7.1) [symbolic = %.loc10_10.1 (constants.%.2f2)]
  1018. // CHECK:STDOUT: %Copy.lookup_impl_witness: <witness> = lookup_impl_witness %ptr, @Copy [symbolic = %Copy.lookup_impl_witness (constants.%Copy.lookup_impl_witness.2e6)]
  1019. // CHECK:STDOUT: %Copy.facet: %Copy.type = facet_value %ptr, (%Copy.lookup_impl_witness) [symbolic = %Copy.facet (constants.%Copy.facet)]
  1020. // 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)]
  1021. // CHECK:STDOUT: %.loc10_10.2: type = fn_type_with_self_type %Copy.WithSelf.Op.type, %Copy.facet [symbolic = %.loc10_10.2 (constants.%.299)]
  1022. // CHECK:STDOUT: %impl.elem0.loc10_10.2: @F.%.loc10_10.2 (%.299) = impl_witness_access %Copy.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc10_10.2 (constants.%impl.elem0.1c7)]
  1023. // CHECK:STDOUT: %specific_impl_fn.loc10_10.2: <specific function> = specific_impl_function %impl.elem0.loc10_10.2, @Copy.WithSelf.Op(%Copy.facet) [symbolic = %specific_impl_fn.loc10_10.2 (constants.%specific_impl_fn.366)]
  1024. // CHECK:STDOUT:
  1025. // CHECK:STDOUT: fn(%t.param: ref @F.%T.loc9_7.1 (%T.67d)) -> out %return.param: @F.%ptr (%ptr.e8f8f9.2) {
  1026. // CHECK:STDOUT: !entry:
  1027. // CHECK:STDOUT: %t.ref: ref @F.%T.loc9_7.1 (%T.67d) = name_ref t, %t
  1028. // CHECK:STDOUT: %addr: @F.%ptr (%ptr.e8f8f9.2) = addr_of %t.ref
  1029. // CHECK:STDOUT: %impl.elem0.loc10_10.1: @F.%.loc10_10.2 (%.299) = impl_witness_access constants.%Copy.lookup_impl_witness.2e6, element0 [symbolic = %impl.elem0.loc10_10.2 (constants.%impl.elem0.1c7)]
  1030. // CHECK:STDOUT: %bound_method.loc10_10.1: <bound method> = bound_method %addr, %impl.elem0.loc10_10.1
  1031. // CHECK:STDOUT: %specific_impl_fn.loc10_10.1: <specific function> = specific_impl_function %impl.elem0.loc10_10.1, @Copy.WithSelf.Op(constants.%Copy.facet) [symbolic = %specific_impl_fn.loc10_10.2 (constants.%specific_impl_fn.366)]
  1032. // CHECK:STDOUT: %bound_method.loc10_10.2: <bound method> = bound_method %addr, %specific_impl_fn.loc10_10.1
  1033. // CHECK:STDOUT: %Copy.WithSelf.Op.call: init @F.%ptr (%ptr.e8f8f9.2) = call %bound_method.loc10_10.2(%addr)
  1034. // CHECK:STDOUT: return %Copy.WithSelf.Op.call
  1035. // CHECK:STDOUT: }
  1036. // CHECK:STDOUT: }
  1037. // CHECK:STDOUT:
  1038. // CHECK:STDOUT: specific @Ptr.WithSelf(constants.%Self.0e0) {
  1039. // CHECK:STDOUT: !definition:
  1040. // CHECK:STDOUT: }
  1041. // CHECK:STDOUT:
  1042. // CHECK:STDOUT: specific @Ptr.WithSelf(constants.%.Self.47a) {
  1043. // CHECK:STDOUT: !definition:
  1044. // CHECK:STDOUT: }
  1045. // CHECK:STDOUT:
  1046. // CHECK:STDOUT: specific @U.as.Ptr.impl(constants.%U.67d) {
  1047. // CHECK:STDOUT: %U.loc7_21.2 => constants.%U.67d
  1048. // CHECK:STDOUT: %ptr.loc7_54.2 => constants.%ptr.e8f8f9.1
  1049. // CHECK:STDOUT: %Ptr_where.type => constants.%Ptr_where.type.3963c5.1
  1050. // CHECK:STDOUT: %Ptr.impl_witness.loc7_56.2 => constants.%Ptr.impl_witness.117547.1
  1051. // CHECK:STDOUT: }
  1052. // CHECK:STDOUT:
  1053. // CHECK:STDOUT: specific @Ptr.WithSelf(constants.%Ptr.facet.5445c3.1) {
  1054. // CHECK:STDOUT: !definition:
  1055. // CHECK:STDOUT: }
  1056. // CHECK:STDOUT:
  1057. // CHECK:STDOUT: specific @U.as.Ptr.impl(constants.%T.67d) {
  1058. // CHECK:STDOUT: %U.loc7_21.2 => constants.%T.67d
  1059. // CHECK:STDOUT: %ptr.loc7_54.2 => constants.%ptr.e8f8f9.2
  1060. // CHECK:STDOUT: %Ptr_where.type => constants.%Ptr_where.type.3963c5.2
  1061. // CHECK:STDOUT: %Ptr.impl_witness.loc7_56.2 => constants.%Ptr.impl_witness.117547.2
  1062. // CHECK:STDOUT:
  1063. // CHECK:STDOUT: !definition:
  1064. // CHECK:STDOUT: %require_complete => constants.%require_complete.73ad1d.2
  1065. // CHECK:STDOUT: }
  1066. // CHECK:STDOUT:
  1067. // CHECK:STDOUT: specific @Ptr.WithSelf(constants.%Ptr.facet.5445c3.2) {
  1068. // CHECK:STDOUT: !definition:
  1069. // CHECK:STDOUT: }
  1070. // CHECK:STDOUT:
  1071. // CHECK:STDOUT: specific @F(constants.%T.67d) {
  1072. // CHECK:STDOUT: %T.loc9_7.1 => constants.%T.67d
  1073. // CHECK:STDOUT: %pattern_type.loc9_21 => constants.%pattern_type.51d
  1074. // CHECK:STDOUT: %.loc9_30.1 => constants.%.656
  1075. // CHECK:STDOUT: %Ptr.impl_witness => constants.%Ptr.impl_witness.117547.2
  1076. // CHECK:STDOUT: %Ptr.facet.loc9_30.1 => constants.%Ptr.facet.5445c3.2
  1077. // CHECK:STDOUT: %ptr => constants.%ptr.e8f8f9.2
  1078. // CHECK:STDOUT: %.loc9_30.2 => constants.%.cb6
  1079. // CHECK:STDOUT: %pattern_type.loc9_30 => constants.%pattern_type.4f4
  1080. // CHECK:STDOUT: }
  1081. // CHECK:STDOUT:
  1082. // CHECK:STDOUT: --- final_impl_rewrite_of_symbolic_through_facet_access_type.carbon
  1083. // CHECK:STDOUT:
  1084. // CHECK:STDOUT: constants {
  1085. // CHECK:STDOUT: %Ptr.type: type = facet_type <@Ptr> [concrete]
  1086. // CHECK:STDOUT: %Self.0e0: %Ptr.type = symbolic_binding Self, 0 [symbolic]
  1087. // CHECK:STDOUT: %Ptr.assoc_type: type = assoc_entity_type @Ptr [concrete]
  1088. // CHECK:STDOUT: %assoc0.6bc: %Ptr.assoc_type = assoc_entity element0, @Ptr.WithSelf.%Type [concrete]
  1089. // CHECK:STDOUT: %type: type = facet_type <type> [concrete]
  1090. // CHECK:STDOUT: %.Self.c39: %type = symbolic_binding .Self [symbolic_self]
  1091. // CHECK:STDOUT: %pattern_type.98f: type = pattern_type type [concrete]
  1092. // CHECK:STDOUT: %U.67d: type = symbolic_binding U, 0 [symbolic]
  1093. // CHECK:STDOUT: %.Self.47a: %Ptr.type = symbolic_binding .Self [symbolic_self]
  1094. // CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self.47a [symbolic_self]
  1095. // CHECK:STDOUT: %Ptr.lookup_impl_witness: <witness> = lookup_impl_witness %.Self.47a, @Ptr [symbolic_self]
  1096. // CHECK:STDOUT: %impl.elem0.4ac: type = impl_witness_access %Ptr.lookup_impl_witness, element0 [symbolic_self]
  1097. // CHECK:STDOUT: %ptr.e8f8f9.1: type = ptr_type %U.67d [symbolic]
  1098. // CHECK:STDOUT: %Ptr_where.type.396: type = facet_type <@Ptr where %impl.elem0.4ac = %ptr.e8f8f9.1> [symbolic]
  1099. // CHECK:STDOUT: %Ptr.impl_witness.117: <witness> = impl_witness @U.as.Ptr.impl.%Ptr.impl_witness_table, @U.as.Ptr.impl(%U.67d) [symbolic]
  1100. // CHECK:STDOUT: %require_complete.73a: <witness> = require_complete_type %Ptr_where.type.396 [symbolic]
  1101. // CHECK:STDOUT: %Ptr.facet: %Ptr.type = facet_value %U.67d, (%Ptr.impl_witness.117) [symbolic]
  1102. // CHECK:STDOUT: %pattern_type.6d2: type = pattern_type %Ptr.type [concrete]
  1103. // CHECK:STDOUT: %T.ffa: %Ptr.type = symbolic_binding T, 0 [symbolic]
  1104. // CHECK:STDOUT: %T.as_type.c3c: type = facet_access_type %T.ffa [symbolic]
  1105. // CHECK:STDOUT: %pattern_type.c27: type = pattern_type %T.as_type.c3c [symbolic]
  1106. // CHECK:STDOUT: %ptr.734: type = ptr_type %T.as_type.c3c [symbolic]
  1107. // CHECK:STDOUT: %Ptr_where.type.85e: type = facet_type <@Ptr where %impl.elem0.4ac = %ptr.734> [symbolic]
  1108. // CHECK:STDOUT: %Ptr.impl_witness.9f8: <witness> = impl_witness @U.as.Ptr.impl.%Ptr.impl_witness_table, @U.as.Ptr.impl(%T.as_type.c3c) [symbolic]
  1109. // CHECK:STDOUT: %require_complete.1ff: <witness> = require_complete_type %Ptr_where.type.85e [symbolic]
  1110. // CHECK:STDOUT: %.f62: require_specific_def_type = require_specific_def @U.as.Ptr.impl(%T.as_type.c3c) [symbolic]
  1111. // CHECK:STDOUT: %.420: Core.Form = init_form %ptr.734 [symbolic]
  1112. // CHECK:STDOUT: %pattern_type.1c0: type = pattern_type %ptr.734 [symbolic]
  1113. // CHECK:STDOUT: %F.type: type = fn_type @F [concrete]
  1114. // CHECK:STDOUT: %F: %F.type = struct_value () [concrete]
  1115. // CHECK:STDOUT: %require_complete.e7f: <witness> = require_complete_type %T.as_type.c3c [symbolic]
  1116. // CHECK:STDOUT: %require_complete.06a: <witness> = require_complete_type %ptr.734 [symbolic]
  1117. // CHECK:STDOUT: %Copy.type: type = facet_type <@Copy> [concrete]
  1118. // CHECK:STDOUT: %Copy.lookup_impl_witness.48d: <witness> = lookup_impl_witness %ptr.734, @Copy [symbolic]
  1119. // CHECK:STDOUT: %.592: require_specific_def_type = require_specific_def @ptr.as.Copy.impl(%T.as_type.c3c) [symbolic]
  1120. // CHECK:STDOUT: %Copy.facet: %Copy.type = facet_value %ptr.734, (%Copy.lookup_impl_witness.48d) [symbolic]
  1121. // CHECK:STDOUT: %Copy.WithSelf.Op.type.bc6: type = fn_type @Copy.WithSelf.Op, @Copy.WithSelf(%Copy.facet) [symbolic]
  1122. // CHECK:STDOUT: %.307: type = fn_type_with_self_type %Copy.WithSelf.Op.type.bc6, %Copy.facet [symbolic]
  1123. // CHECK:STDOUT: %impl.elem0.c24: %.307 = impl_witness_access %Copy.lookup_impl_witness.48d, element0 [symbolic]
  1124. // CHECK:STDOUT: %specific_impl_fn.79e: <specific function> = specific_impl_function %impl.elem0.c24, @Copy.WithSelf.Op(%Copy.facet) [symbolic]
  1125. // CHECK:STDOUT: }
  1126. // CHECK:STDOUT:
  1127. // CHECK:STDOUT: imports {
  1128. // CHECK:STDOUT: %Core: <namespace> = namespace file.%Core.import, [concrete] {
  1129. // CHECK:STDOUT: .Copy = %Core.Copy
  1130. // CHECK:STDOUT: import Core//prelude
  1131. // CHECK:STDOUT: import Core//prelude/...
  1132. // CHECK:STDOUT: }
  1133. // CHECK:STDOUT: %Core.Copy: type = import_ref Core//prelude/parts/copy, Copy, loaded [concrete = constants.%Copy.type]
  1134. // CHECK:STDOUT: }
  1135. // CHECK:STDOUT:
  1136. // CHECK:STDOUT: file {
  1137. // CHECK:STDOUT: package: <namespace> = namespace [concrete] {
  1138. // CHECK:STDOUT: .Core = imports.%Core
  1139. // CHECK:STDOUT: .Ptr = %Ptr.decl
  1140. // CHECK:STDOUT: .F = %F.decl
  1141. // CHECK:STDOUT: }
  1142. // CHECK:STDOUT: %Core.import = import Core
  1143. // CHECK:STDOUT: %Ptr.decl: type = interface_decl @Ptr [concrete = constants.%Ptr.type] {} {}
  1144. // CHECK:STDOUT: impl_decl @U.as.Ptr.impl [concrete] {
  1145. // CHECK:STDOUT: %U.patt: %pattern_type.98f = symbolic_binding_pattern U, 0 [concrete]
  1146. // CHECK:STDOUT: } {
  1147. // CHECK:STDOUT: %U.ref.loc7_30: type = name_ref U, %U.loc7_21.1 [symbolic = %U.loc7_21.2 (constants.%U.67d)]
  1148. // CHECK:STDOUT: %Ptr.ref: type = name_ref Ptr, file.%Ptr.decl [concrete = constants.%Ptr.type]
  1149. // CHECK:STDOUT: %.Self.1: %Ptr.type = symbolic_binding .Self [symbolic_self = constants.%.Self.47a]
  1150. // CHECK:STDOUT: %.Self.ref: %Ptr.type = name_ref .Self, %.Self.1 [symbolic_self = constants.%.Self.47a]
  1151. // CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self.ref [symbolic_self = constants.%.Self.as_type]
  1152. // CHECK:STDOUT: %.loc7_45: type = converted %.Self.ref, %.Self.as_type [symbolic_self = constants.%.Self.as_type]
  1153. // CHECK:STDOUT: %Type.ref: %Ptr.assoc_type = name_ref Type, @Type.%assoc0 [concrete = constants.%assoc0.6bc]
  1154. // CHECK:STDOUT: %impl.elem0: type = impl_witness_access constants.%Ptr.lookup_impl_witness, element0 [symbolic_self = constants.%impl.elem0.4ac]
  1155. // CHECK:STDOUT: %U.ref.loc7_53: type = name_ref U, %U.loc7_21.1 [symbolic = %U.loc7_21.2 (constants.%U.67d)]
  1156. // CHECK:STDOUT: %ptr.loc7_54.1: type = ptr_type %U.ref.loc7_53 [symbolic = %ptr.loc7_54.2 (constants.%ptr.e8f8f9.1)]
  1157. // CHECK:STDOUT: %.loc7_39: type = where_expr [symbolic = %Ptr_where.type (constants.%Ptr_where.type.396)] {
  1158. // CHECK:STDOUT: requirement_base_facet_type %Ptr.ref
  1159. // CHECK:STDOUT: requirement_rewrite %impl.elem0, %ptr.loc7_54.1
  1160. // CHECK:STDOUT: }
  1161. // CHECK:STDOUT: %.loc7_24.1: type = splice_block %.loc7_24.2 [concrete = type] {
  1162. // CHECK:STDOUT: %.Self.2: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.c39]
  1163. // CHECK:STDOUT: %.loc7_24.2: type = type_literal type [concrete = type]
  1164. // CHECK:STDOUT: }
  1165. // CHECK:STDOUT: %U.loc7_21.1: type = symbolic_binding U, 0 [symbolic = %U.loc7_21.2 (constants.%U.67d)]
  1166. // CHECK:STDOUT: }
  1167. // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [concrete = constants.%F] {
  1168. // CHECK:STDOUT: %T.patt: %pattern_type.6d2 = symbolic_binding_pattern T, 0 [concrete]
  1169. // CHECK:STDOUT: %t.patt: @F.%pattern_type.loc9_20 (%pattern_type.c27) = ref_binding_pattern t [concrete]
  1170. // CHECK:STDOUT: %t.param_patt: @F.%pattern_type.loc9_20 (%pattern_type.c27) = var_param_pattern %t.patt [concrete]
  1171. // CHECK:STDOUT: %return.param_patt: @F.%pattern_type.loc9_29 (%pattern_type.1c0) = out_param_pattern [concrete]
  1172. // CHECK:STDOUT: %return.patt: @F.%pattern_type.loc9_29 (%pattern_type.1c0) = return_slot_pattern %return.param_patt, %impl.elem0.loc9 [concrete]
  1173. // CHECK:STDOUT: } {
  1174. // CHECK:STDOUT: %T.ref.loc9_28: %Ptr.type = name_ref T, %T.loc9_7.2 [symbolic = %T.loc9_7.1 (constants.%T.ffa)]
  1175. // CHECK:STDOUT: %T.as_type.loc9_29: type = facet_access_type %T.ref.loc9_28 [symbolic = %T.as_type.loc9_22.1 (constants.%T.as_type.c3c)]
  1176. // CHECK:STDOUT: %.loc9_29.3: type = converted %T.ref.loc9_28, %T.as_type.loc9_29 [symbolic = %T.as_type.loc9_22.1 (constants.%T.as_type.c3c)]
  1177. // CHECK:STDOUT: %Type.ref: %Ptr.assoc_type = name_ref Type, @Type.%assoc0 [concrete = constants.%assoc0.6bc]
  1178. // CHECK:STDOUT: %impl.elem0.loc9: type = impl_witness_access constants.%Ptr.impl_witness.9f8, element0 [symbolic = %ptr (constants.%ptr.734)]
  1179. // CHECK:STDOUT: %.loc9_29.4: Core.Form = init_form %impl.elem0.loc9 [symbolic = %.loc9_29.2 (constants.%.420)]
  1180. // CHECK:STDOUT: %.loc9_10: type = splice_block %Ptr.ref [concrete = constants.%Ptr.type] {
  1181. // CHECK:STDOUT: %.Self: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.c39]
  1182. // CHECK:STDOUT: %Ptr.ref: type = name_ref Ptr, file.%Ptr.decl [concrete = constants.%Ptr.type]
  1183. // CHECK:STDOUT: }
  1184. // CHECK:STDOUT: %T.loc9_7.2: %Ptr.type = symbolic_binding T, 0 [symbolic = %T.loc9_7.1 (constants.%T.ffa)]
  1185. // CHECK:STDOUT: %t.param: ref @F.%T.as_type.loc9_22.1 (%T.as_type.c3c) = ref_param call_param0
  1186. // CHECK:STDOUT: %.loc9_22.1: type = splice_block %.loc9_22.2 [symbolic = %T.as_type.loc9_22.1 (constants.%T.as_type.c3c)] {
  1187. // CHECK:STDOUT: %T.ref.loc9_22: %Ptr.type = name_ref T, %T.loc9_7.2 [symbolic = %T.loc9_7.1 (constants.%T.ffa)]
  1188. // CHECK:STDOUT: %T.as_type.loc9_22.2: type = facet_access_type %T.ref.loc9_22 [symbolic = %T.as_type.loc9_22.1 (constants.%T.as_type.c3c)]
  1189. // CHECK:STDOUT: %.loc9_22.2: type = converted %T.ref.loc9_22, %T.as_type.loc9_22.2 [symbolic = %T.as_type.loc9_22.1 (constants.%T.as_type.c3c)]
  1190. // CHECK:STDOUT: }
  1191. // CHECK:STDOUT: %t: ref @F.%T.as_type.loc9_22.1 (%T.as_type.c3c) = ref_binding t, %t.param
  1192. // CHECK:STDOUT: %return.param: ref @F.%ptr (%ptr.734) = out_param call_param1
  1193. // CHECK:STDOUT: %return: ref @F.%ptr (%ptr.734) = return_slot %return.param
  1194. // CHECK:STDOUT: }
  1195. // CHECK:STDOUT: }
  1196. // CHECK:STDOUT:
  1197. // CHECK:STDOUT: interface @Ptr {
  1198. // CHECK:STDOUT: %Self: %Ptr.type = symbolic_binding Self, 0 [symbolic = constants.%Self.0e0]
  1199. // CHECK:STDOUT: %Ptr.WithSelf.decl = interface_with_self_decl @Ptr [concrete]
  1200. // CHECK:STDOUT:
  1201. // CHECK:STDOUT: !with Self:
  1202. // CHECK:STDOUT: %Type: type = assoc_const_decl @Type [concrete] {
  1203. // CHECK:STDOUT: %assoc0: %Ptr.assoc_type = assoc_entity element0, @Ptr.WithSelf.%Type [concrete = constants.%assoc0.6bc]
  1204. // CHECK:STDOUT: }
  1205. // CHECK:STDOUT:
  1206. // CHECK:STDOUT: !members:
  1207. // CHECK:STDOUT: .Self = %Self
  1208. // CHECK:STDOUT: .Type = @Type.%assoc0
  1209. // CHECK:STDOUT: witness = (@Ptr.WithSelf.%Type)
  1210. // CHECK:STDOUT:
  1211. // CHECK:STDOUT: !requires:
  1212. // CHECK:STDOUT: }
  1213. // CHECK:STDOUT:
  1214. // CHECK:STDOUT: generic impl @U.as.Ptr.impl(%U.loc7_21.1: type) {
  1215. // CHECK:STDOUT: %U.loc7_21.2: type = symbolic_binding U, 0 [symbolic = %U.loc7_21.2 (constants.%U.67d)]
  1216. // CHECK:STDOUT: %ptr.loc7_54.2: type = ptr_type %U.loc7_21.2 [symbolic = %ptr.loc7_54.2 (constants.%ptr.e8f8f9.1)]
  1217. // CHECK:STDOUT: %Ptr_where.type: type = facet_type <@Ptr where constants.%impl.elem0.4ac = %ptr.loc7_54.2> [symbolic = %Ptr_where.type (constants.%Ptr_where.type.396)]
  1218. // CHECK:STDOUT: %Ptr.impl_witness.loc7_56.2: <witness> = impl_witness %Ptr.impl_witness_table, @U.as.Ptr.impl(%U.loc7_21.2) [symbolic = %Ptr.impl_witness.loc7_56.2 (constants.%Ptr.impl_witness.117)]
  1219. // CHECK:STDOUT:
  1220. // CHECK:STDOUT: !definition:
  1221. // CHECK:STDOUT: %require_complete: <witness> = require_complete_type %Ptr_where.type [symbolic = %require_complete (constants.%require_complete.73a)]
  1222. // CHECK:STDOUT:
  1223. // CHECK:STDOUT: impl: %U.ref.loc7_30 as %.loc7_39 {
  1224. // CHECK:STDOUT: %Ptr.impl_witness_table = impl_witness_table (%impl_witness_assoc_constant), @U.as.Ptr.impl [concrete]
  1225. // CHECK:STDOUT: %Ptr.impl_witness.loc7_56.1: <witness> = impl_witness %Ptr.impl_witness_table, @U.as.Ptr.impl(constants.%U.67d) [symbolic = %Ptr.impl_witness.loc7_56.2 (constants.%Ptr.impl_witness.117)]
  1226. // CHECK:STDOUT: %impl_witness_assoc_constant: type = impl_witness_assoc_constant constants.%ptr.e8f8f9.1 [symbolic = %ptr.loc7_54.2 (constants.%ptr.e8f8f9.1)]
  1227. // CHECK:STDOUT:
  1228. // CHECK:STDOUT: !members:
  1229. // CHECK:STDOUT: witness = %Ptr.impl_witness.loc7_56.1
  1230. // CHECK:STDOUT: }
  1231. // CHECK:STDOUT: }
  1232. // CHECK:STDOUT:
  1233. // CHECK:STDOUT: generic fn @F(%T.loc9_7.2: %Ptr.type) {
  1234. // CHECK:STDOUT: %T.loc9_7.1: %Ptr.type = symbolic_binding T, 0 [symbolic = %T.loc9_7.1 (constants.%T.ffa)]
  1235. // CHECK:STDOUT: %T.as_type.loc9_22.1: type = facet_access_type %T.loc9_7.1 [symbolic = %T.as_type.loc9_22.1 (constants.%T.as_type.c3c)]
  1236. // CHECK:STDOUT: %pattern_type.loc9_20: type = pattern_type %T.as_type.loc9_22.1 [symbolic = %pattern_type.loc9_20 (constants.%pattern_type.c27)]
  1237. // CHECK:STDOUT: %.loc9_29.1: require_specific_def_type = require_specific_def @U.as.Ptr.impl(%T.as_type.loc9_22.1) [symbolic = %.loc9_29.1 (constants.%.f62)]
  1238. // CHECK:STDOUT: %ptr: type = ptr_type %T.as_type.loc9_22.1 [symbolic = %ptr (constants.%ptr.734)]
  1239. // CHECK:STDOUT: %.loc9_29.2: Core.Form = init_form %ptr [symbolic = %.loc9_29.2 (constants.%.420)]
  1240. // CHECK:STDOUT: %pattern_type.loc9_29: type = pattern_type %ptr [symbolic = %pattern_type.loc9_29 (constants.%pattern_type.1c0)]
  1241. // CHECK:STDOUT:
  1242. // CHECK:STDOUT: !definition:
  1243. // CHECK:STDOUT: %require_complete.loc9_15: <witness> = require_complete_type %T.as_type.loc9_22.1 [symbolic = %require_complete.loc9_15 (constants.%require_complete.e7f)]
  1244. // CHECK:STDOUT: %require_complete.loc9_25: <witness> = require_complete_type %ptr [symbolic = %require_complete.loc9_25 (constants.%require_complete.06a)]
  1245. // CHECK:STDOUT: %.loc10_10.1: require_specific_def_type = require_specific_def @ptr.as.Copy.impl(%T.as_type.loc9_22.1) [symbolic = %.loc10_10.1 (constants.%.592)]
  1246. // CHECK:STDOUT: %Copy.lookup_impl_witness: <witness> = lookup_impl_witness %ptr, @Copy [symbolic = %Copy.lookup_impl_witness (constants.%Copy.lookup_impl_witness.48d)]
  1247. // CHECK:STDOUT: %Copy.facet: %Copy.type = facet_value %ptr, (%Copy.lookup_impl_witness) [symbolic = %Copy.facet (constants.%Copy.facet)]
  1248. // 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.bc6)]
  1249. // CHECK:STDOUT: %.loc10_10.2: type = fn_type_with_self_type %Copy.WithSelf.Op.type, %Copy.facet [symbolic = %.loc10_10.2 (constants.%.307)]
  1250. // CHECK:STDOUT: %impl.elem0.loc10_10.2: @F.%.loc10_10.2 (%.307) = impl_witness_access %Copy.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc10_10.2 (constants.%impl.elem0.c24)]
  1251. // CHECK:STDOUT: %specific_impl_fn.loc10_10.2: <specific function> = specific_impl_function %impl.elem0.loc10_10.2, @Copy.WithSelf.Op(%Copy.facet) [symbolic = %specific_impl_fn.loc10_10.2 (constants.%specific_impl_fn.79e)]
  1252. // CHECK:STDOUT:
  1253. // CHECK:STDOUT: fn(%t.param: ref @F.%T.as_type.loc9_22.1 (%T.as_type.c3c)) -> out %return.param: @F.%ptr (%ptr.734) {
  1254. // CHECK:STDOUT: !entry:
  1255. // CHECK:STDOUT: %t.ref: ref @F.%T.as_type.loc9_22.1 (%T.as_type.c3c) = name_ref t, %t
  1256. // CHECK:STDOUT: %addr: @F.%ptr (%ptr.734) = addr_of %t.ref
  1257. // CHECK:STDOUT: %impl.elem0.loc10_10.1: @F.%.loc10_10.2 (%.307) = impl_witness_access constants.%Copy.lookup_impl_witness.48d, element0 [symbolic = %impl.elem0.loc10_10.2 (constants.%impl.elem0.c24)]
  1258. // CHECK:STDOUT: %bound_method.loc10_10.1: <bound method> = bound_method %addr, %impl.elem0.loc10_10.1
  1259. // CHECK:STDOUT: %specific_impl_fn.loc10_10.1: <specific function> = specific_impl_function %impl.elem0.loc10_10.1, @Copy.WithSelf.Op(constants.%Copy.facet) [symbolic = %specific_impl_fn.loc10_10.2 (constants.%specific_impl_fn.79e)]
  1260. // CHECK:STDOUT: %bound_method.loc10_10.2: <bound method> = bound_method %addr, %specific_impl_fn.loc10_10.1
  1261. // CHECK:STDOUT: %Copy.WithSelf.Op.call: init @F.%ptr (%ptr.734) = call %bound_method.loc10_10.2(%addr)
  1262. // CHECK:STDOUT: return %Copy.WithSelf.Op.call
  1263. // CHECK:STDOUT: }
  1264. // CHECK:STDOUT: }
  1265. // CHECK:STDOUT:
  1266. // CHECK:STDOUT: specific @Ptr.WithSelf(constants.%Self.0e0) {
  1267. // CHECK:STDOUT: !definition:
  1268. // CHECK:STDOUT: }
  1269. // CHECK:STDOUT:
  1270. // CHECK:STDOUT: specific @Ptr.WithSelf(constants.%.Self.47a) {
  1271. // CHECK:STDOUT: !definition:
  1272. // CHECK:STDOUT: }
  1273. // CHECK:STDOUT:
  1274. // CHECK:STDOUT: specific @U.as.Ptr.impl(constants.%U.67d) {
  1275. // CHECK:STDOUT: %U.loc7_21.2 => constants.%U.67d
  1276. // CHECK:STDOUT: %ptr.loc7_54.2 => constants.%ptr.e8f8f9.1
  1277. // CHECK:STDOUT: %Ptr_where.type => constants.%Ptr_where.type.396
  1278. // CHECK:STDOUT: %Ptr.impl_witness.loc7_56.2 => constants.%Ptr.impl_witness.117
  1279. // CHECK:STDOUT: }
  1280. // CHECK:STDOUT:
  1281. // CHECK:STDOUT: specific @Ptr.WithSelf(constants.%Ptr.facet) {
  1282. // CHECK:STDOUT: !definition:
  1283. // CHECK:STDOUT: }
  1284. // CHECK:STDOUT:
  1285. // CHECK:STDOUT: specific @Ptr.WithSelf(constants.%T.ffa) {
  1286. // CHECK:STDOUT: !definition:
  1287. // CHECK:STDOUT: }
  1288. // CHECK:STDOUT:
  1289. // CHECK:STDOUT: specific @U.as.Ptr.impl(constants.%T.as_type.c3c) {
  1290. // CHECK:STDOUT: %U.loc7_21.2 => constants.%T.as_type.c3c
  1291. // CHECK:STDOUT: %ptr.loc7_54.2 => constants.%ptr.734
  1292. // CHECK:STDOUT: %Ptr_where.type => constants.%Ptr_where.type.85e
  1293. // CHECK:STDOUT: %Ptr.impl_witness.loc7_56.2 => constants.%Ptr.impl_witness.9f8
  1294. // CHECK:STDOUT:
  1295. // CHECK:STDOUT: !definition:
  1296. // CHECK:STDOUT: %require_complete => constants.%require_complete.1ff
  1297. // CHECK:STDOUT: }
  1298. // CHECK:STDOUT:
  1299. // CHECK:STDOUT: specific @F(constants.%T.ffa) {
  1300. // CHECK:STDOUT: %T.loc9_7.1 => constants.%T.ffa
  1301. // CHECK:STDOUT: %T.as_type.loc9_22.1 => constants.%T.as_type.c3c
  1302. // CHECK:STDOUT: %pattern_type.loc9_20 => constants.%pattern_type.c27
  1303. // CHECK:STDOUT: %.loc9_29.1 => constants.%.f62
  1304. // CHECK:STDOUT: %ptr => constants.%ptr.734
  1305. // CHECK:STDOUT: %.loc9_29.2 => constants.%.420
  1306. // CHECK:STDOUT: %pattern_type.loc9_29 => constants.%pattern_type.1c0
  1307. // CHECK:STDOUT: }
  1308. // CHECK:STDOUT:
  1309. // CHECK:STDOUT: --- final_impl_rewrite_of_symbolic_through_facet_value.carbon
  1310. // CHECK:STDOUT:
  1311. // CHECK:STDOUT: constants {
  1312. // CHECK:STDOUT: %Ptr.type: type = facet_type <@Ptr> [concrete]
  1313. // CHECK:STDOUT: %Self.0e0: %Ptr.type = symbolic_binding Self, 0 [symbolic]
  1314. // CHECK:STDOUT: %Ptr.assoc_type: type = assoc_entity_type @Ptr [concrete]
  1315. // CHECK:STDOUT: %assoc0.6bc: %Ptr.assoc_type = assoc_entity element0, @Ptr.WithSelf.%Type [concrete]
  1316. // CHECK:STDOUT: %type: type = facet_type <type> [concrete]
  1317. // CHECK:STDOUT: %.Self.c39: %type = symbolic_binding .Self [symbolic_self]
  1318. // CHECK:STDOUT: %pattern_type.98f: type = pattern_type type [concrete]
  1319. // CHECK:STDOUT: %U.67d: type = symbolic_binding U, 0 [symbolic]
  1320. // CHECK:STDOUT: %.Self.47a: %Ptr.type = symbolic_binding .Self [symbolic_self]
  1321. // CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self.47a [symbolic_self]
  1322. // CHECK:STDOUT: %Ptr.lookup_impl_witness: <witness> = lookup_impl_witness %.Self.47a, @Ptr [symbolic_self]
  1323. // CHECK:STDOUT: %impl.elem0.4ac: type = impl_witness_access %Ptr.lookup_impl_witness, element0 [symbolic_self]
  1324. // CHECK:STDOUT: %ptr.e8f8f9.1: type = ptr_type %U.67d [symbolic]
  1325. // CHECK:STDOUT: %Ptr_where.type.396: type = facet_type <@Ptr where %impl.elem0.4ac = %ptr.e8f8f9.1> [symbolic]
  1326. // CHECK:STDOUT: %Ptr.impl_witness.117: <witness> = impl_witness @U.as.Ptr.impl.%Ptr.impl_witness_table, @U.as.Ptr.impl(%U.67d) [symbolic]
  1327. // CHECK:STDOUT: %require_complete.73a: <witness> = require_complete_type %Ptr_where.type.396 [symbolic]
  1328. // CHECK:STDOUT: %Ptr.facet: %Ptr.type = facet_value %U.67d, (%Ptr.impl_witness.117) [symbolic]
  1329. // CHECK:STDOUT: %pattern_type.6d2: type = pattern_type %Ptr.type [concrete]
  1330. // CHECK:STDOUT: %T.ffa: %Ptr.type = symbolic_binding T, 0 [symbolic]
  1331. // CHECK:STDOUT: %T.as_type.c3c: type = facet_access_type %T.ffa [symbolic]
  1332. // CHECK:STDOUT: %pattern_type.c27: type = pattern_type %T.as_type.c3c [symbolic]
  1333. // CHECK:STDOUT: %ptr.734: type = ptr_type %T.as_type.c3c [symbolic]
  1334. // CHECK:STDOUT: %Ptr_where.type.85e: type = facet_type <@Ptr where %impl.elem0.4ac = %ptr.734> [symbolic]
  1335. // CHECK:STDOUT: %Ptr.impl_witness.9f8: <witness> = impl_witness @U.as.Ptr.impl.%Ptr.impl_witness_table, @U.as.Ptr.impl(%T.as_type.c3c) [symbolic]
  1336. // CHECK:STDOUT: %require_complete.1ff: <witness> = require_complete_type %Ptr_where.type.85e [symbolic]
  1337. // CHECK:STDOUT: %.f62: require_specific_def_type = require_specific_def @U.as.Ptr.impl(%T.as_type.c3c) [symbolic]
  1338. // CHECK:STDOUT: %.420: Core.Form = init_form %ptr.734 [symbolic]
  1339. // CHECK:STDOUT: %pattern_type.1c0: type = pattern_type %ptr.734 [symbolic]
  1340. // CHECK:STDOUT: %F.type: type = fn_type @F [concrete]
  1341. // CHECK:STDOUT: %F: %F.type = struct_value () [concrete]
  1342. // CHECK:STDOUT: %require_complete.e7f: <witness> = require_complete_type %T.as_type.c3c [symbolic]
  1343. // CHECK:STDOUT: %require_complete.06a: <witness> = require_complete_type %ptr.734 [symbolic]
  1344. // CHECK:STDOUT: %Copy.type: type = facet_type <@Copy> [concrete]
  1345. // CHECK:STDOUT: %Copy.lookup_impl_witness.48d: <witness> = lookup_impl_witness %ptr.734, @Copy [symbolic]
  1346. // CHECK:STDOUT: %.592: require_specific_def_type = require_specific_def @ptr.as.Copy.impl(%T.as_type.c3c) [symbolic]
  1347. // CHECK:STDOUT: %Copy.facet: %Copy.type = facet_value %ptr.734, (%Copy.lookup_impl_witness.48d) [symbolic]
  1348. // CHECK:STDOUT: %Copy.WithSelf.Op.type.bc6: type = fn_type @Copy.WithSelf.Op, @Copy.WithSelf(%Copy.facet) [symbolic]
  1349. // CHECK:STDOUT: %.307: type = fn_type_with_self_type %Copy.WithSelf.Op.type.bc6, %Copy.facet [symbolic]
  1350. // CHECK:STDOUT: %impl.elem0.c24: %.307 = impl_witness_access %Copy.lookup_impl_witness.48d, element0 [symbolic]
  1351. // CHECK:STDOUT: %specific_impl_fn.79e: <specific function> = specific_impl_function %impl.elem0.c24, @Copy.WithSelf.Op(%Copy.facet) [symbolic]
  1352. // CHECK:STDOUT: }
  1353. // CHECK:STDOUT:
  1354. // CHECK:STDOUT: imports {
  1355. // CHECK:STDOUT: %Core: <namespace> = namespace file.%Core.import, [concrete] {
  1356. // CHECK:STDOUT: .Copy = %Core.Copy
  1357. // CHECK:STDOUT: import Core//prelude
  1358. // CHECK:STDOUT: import Core//prelude/...
  1359. // CHECK:STDOUT: }
  1360. // CHECK:STDOUT: %Core.Copy: type = import_ref Core//prelude/parts/copy, Copy, loaded [concrete = constants.%Copy.type]
  1361. // CHECK:STDOUT: }
  1362. // CHECK:STDOUT:
  1363. // CHECK:STDOUT: file {
  1364. // CHECK:STDOUT: package: <namespace> = namespace [concrete] {
  1365. // CHECK:STDOUT: .Core = imports.%Core
  1366. // CHECK:STDOUT: .Ptr = %Ptr.decl
  1367. // CHECK:STDOUT: .F = %F.decl
  1368. // CHECK:STDOUT: }
  1369. // CHECK:STDOUT: %Core.import = import Core
  1370. // CHECK:STDOUT: %Ptr.decl: type = interface_decl @Ptr [concrete = constants.%Ptr.type] {} {}
  1371. // CHECK:STDOUT: impl_decl @U.as.Ptr.impl [concrete] {
  1372. // CHECK:STDOUT: %U.patt: %pattern_type.98f = symbolic_binding_pattern U, 0 [concrete]
  1373. // CHECK:STDOUT: } {
  1374. // CHECK:STDOUT: %U.ref.loc7_30: type = name_ref U, %U.loc7_21.1 [symbolic = %U.loc7_21.2 (constants.%U.67d)]
  1375. // CHECK:STDOUT: %Ptr.ref: type = name_ref Ptr, file.%Ptr.decl [concrete = constants.%Ptr.type]
  1376. // CHECK:STDOUT: %.Self.1: %Ptr.type = symbolic_binding .Self [symbolic_self = constants.%.Self.47a]
  1377. // CHECK:STDOUT: %.Self.ref: %Ptr.type = name_ref .Self, %.Self.1 [symbolic_self = constants.%.Self.47a]
  1378. // CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self.ref [symbolic_self = constants.%.Self.as_type]
  1379. // CHECK:STDOUT: %.loc7_45: type = converted %.Self.ref, %.Self.as_type [symbolic_self = constants.%.Self.as_type]
  1380. // CHECK:STDOUT: %Type.ref: %Ptr.assoc_type = name_ref Type, @Type.%assoc0 [concrete = constants.%assoc0.6bc]
  1381. // CHECK:STDOUT: %impl.elem0: type = impl_witness_access constants.%Ptr.lookup_impl_witness, element0 [symbolic_self = constants.%impl.elem0.4ac]
  1382. // CHECK:STDOUT: %U.ref.loc7_53: type = name_ref U, %U.loc7_21.1 [symbolic = %U.loc7_21.2 (constants.%U.67d)]
  1383. // CHECK:STDOUT: %ptr.loc7_54.1: type = ptr_type %U.ref.loc7_53 [symbolic = %ptr.loc7_54.2 (constants.%ptr.e8f8f9.1)]
  1384. // CHECK:STDOUT: %.loc7_39: type = where_expr [symbolic = %Ptr_where.type (constants.%Ptr_where.type.396)] {
  1385. // CHECK:STDOUT: requirement_base_facet_type %Ptr.ref
  1386. // CHECK:STDOUT: requirement_rewrite %impl.elem0, %ptr.loc7_54.1
  1387. // CHECK:STDOUT: }
  1388. // CHECK:STDOUT: %.loc7_24.1: type = splice_block %.loc7_24.2 [concrete = type] {
  1389. // CHECK:STDOUT: %.Self.2: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.c39]
  1390. // CHECK:STDOUT: %.loc7_24.2: type = type_literal type [concrete = type]
  1391. // CHECK:STDOUT: }
  1392. // CHECK:STDOUT: %U.loc7_21.1: type = symbolic_binding U, 0 [symbolic = %U.loc7_21.2 (constants.%U.67d)]
  1393. // CHECK:STDOUT: }
  1394. // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [concrete = constants.%F] {
  1395. // CHECK:STDOUT: %T.patt: %pattern_type.6d2 = symbolic_binding_pattern T, 0 [concrete]
  1396. // CHECK:STDOUT: %t.patt: @F.%pattern_type.loc9_20 (%pattern_type.c27) = ref_binding_pattern t [concrete]
  1397. // CHECK:STDOUT: %t.param_patt: @F.%pattern_type.loc9_20 (%pattern_type.c27) = var_param_pattern %t.patt [concrete]
  1398. // CHECK:STDOUT: %return.param_patt: @F.%pattern_type.loc9_29 (%pattern_type.1c0) = out_param_pattern [concrete]
  1399. // CHECK:STDOUT: %return.patt: @F.%pattern_type.loc9_29 (%pattern_type.1c0) = return_slot_pattern %return.param_patt, %impl.elem0.loc9 [concrete]
  1400. // CHECK:STDOUT: } {
  1401. // CHECK:STDOUT: %T.ref.loc9_28: %Ptr.type = name_ref T, %T.loc9_7.2 [symbolic = %T.loc9_7.1 (constants.%T.ffa)]
  1402. // CHECK:STDOUT: %Ptr.ref.loc9_31: type = name_ref Ptr, file.%Ptr.decl [concrete = constants.%Ptr.type]
  1403. // CHECK:STDOUT: %Type.ref: %Ptr.assoc_type = name_ref Type, @Type.%assoc0 [concrete = constants.%assoc0.6bc]
  1404. // CHECK:STDOUT: %impl.elem0.loc9: type = impl_witness_access constants.%Ptr.impl_witness.9f8, element0 [symbolic = %ptr (constants.%ptr.734)]
  1405. // CHECK:STDOUT: %.loc9_29.3: Core.Form = init_form %impl.elem0.loc9 [symbolic = %.loc9_29.2 (constants.%.420)]
  1406. // CHECK:STDOUT: %.loc9_10: type = splice_block %Ptr.ref.loc9_10 [concrete = constants.%Ptr.type] {
  1407. // CHECK:STDOUT: %.Self: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.c39]
  1408. // CHECK:STDOUT: %Ptr.ref.loc9_10: type = name_ref Ptr, file.%Ptr.decl [concrete = constants.%Ptr.type]
  1409. // CHECK:STDOUT: }
  1410. // CHECK:STDOUT: %T.loc9_7.2: %Ptr.type = symbolic_binding T, 0 [symbolic = %T.loc9_7.1 (constants.%T.ffa)]
  1411. // CHECK:STDOUT: %t.param: ref @F.%T.as_type.loc9_22.1 (%T.as_type.c3c) = ref_param call_param0
  1412. // CHECK:STDOUT: %.loc9_22.1: type = splice_block %.loc9_22.2 [symbolic = %T.as_type.loc9_22.1 (constants.%T.as_type.c3c)] {
  1413. // CHECK:STDOUT: %T.ref.loc9_22: %Ptr.type = name_ref T, %T.loc9_7.2 [symbolic = %T.loc9_7.1 (constants.%T.ffa)]
  1414. // CHECK:STDOUT: %T.as_type.loc9_22.2: type = facet_access_type %T.ref.loc9_22 [symbolic = %T.as_type.loc9_22.1 (constants.%T.as_type.c3c)]
  1415. // CHECK:STDOUT: %.loc9_22.2: type = converted %T.ref.loc9_22, %T.as_type.loc9_22.2 [symbolic = %T.as_type.loc9_22.1 (constants.%T.as_type.c3c)]
  1416. // CHECK:STDOUT: }
  1417. // CHECK:STDOUT: %t: ref @F.%T.as_type.loc9_22.1 (%T.as_type.c3c) = ref_binding t, %t.param
  1418. // CHECK:STDOUT: %return.param: ref @F.%ptr (%ptr.734) = out_param call_param1
  1419. // CHECK:STDOUT: %return: ref @F.%ptr (%ptr.734) = return_slot %return.param
  1420. // CHECK:STDOUT: }
  1421. // CHECK:STDOUT: }
  1422. // CHECK:STDOUT:
  1423. // CHECK:STDOUT: interface @Ptr {
  1424. // CHECK:STDOUT: %Self: %Ptr.type = symbolic_binding Self, 0 [symbolic = constants.%Self.0e0]
  1425. // CHECK:STDOUT: %Ptr.WithSelf.decl = interface_with_self_decl @Ptr [concrete]
  1426. // CHECK:STDOUT:
  1427. // CHECK:STDOUT: !with Self:
  1428. // CHECK:STDOUT: %Type: type = assoc_const_decl @Type [concrete] {
  1429. // CHECK:STDOUT: %assoc0: %Ptr.assoc_type = assoc_entity element0, @Ptr.WithSelf.%Type [concrete = constants.%assoc0.6bc]
  1430. // CHECK:STDOUT: }
  1431. // CHECK:STDOUT:
  1432. // CHECK:STDOUT: !members:
  1433. // CHECK:STDOUT: .Self = %Self
  1434. // CHECK:STDOUT: .Type = @Type.%assoc0
  1435. // CHECK:STDOUT: witness = (@Ptr.WithSelf.%Type)
  1436. // CHECK:STDOUT:
  1437. // CHECK:STDOUT: !requires:
  1438. // CHECK:STDOUT: }
  1439. // CHECK:STDOUT:
  1440. // CHECK:STDOUT: generic impl @U.as.Ptr.impl(%U.loc7_21.1: type) {
  1441. // CHECK:STDOUT: %U.loc7_21.2: type = symbolic_binding U, 0 [symbolic = %U.loc7_21.2 (constants.%U.67d)]
  1442. // CHECK:STDOUT: %ptr.loc7_54.2: type = ptr_type %U.loc7_21.2 [symbolic = %ptr.loc7_54.2 (constants.%ptr.e8f8f9.1)]
  1443. // CHECK:STDOUT: %Ptr_where.type: type = facet_type <@Ptr where constants.%impl.elem0.4ac = %ptr.loc7_54.2> [symbolic = %Ptr_where.type (constants.%Ptr_where.type.396)]
  1444. // CHECK:STDOUT: %Ptr.impl_witness.loc7_56.2: <witness> = impl_witness %Ptr.impl_witness_table, @U.as.Ptr.impl(%U.loc7_21.2) [symbolic = %Ptr.impl_witness.loc7_56.2 (constants.%Ptr.impl_witness.117)]
  1445. // CHECK:STDOUT:
  1446. // CHECK:STDOUT: !definition:
  1447. // CHECK:STDOUT: %require_complete: <witness> = require_complete_type %Ptr_where.type [symbolic = %require_complete (constants.%require_complete.73a)]
  1448. // CHECK:STDOUT:
  1449. // CHECK:STDOUT: impl: %U.ref.loc7_30 as %.loc7_39 {
  1450. // CHECK:STDOUT: %Ptr.impl_witness_table = impl_witness_table (%impl_witness_assoc_constant), @U.as.Ptr.impl [concrete]
  1451. // CHECK:STDOUT: %Ptr.impl_witness.loc7_56.1: <witness> = impl_witness %Ptr.impl_witness_table, @U.as.Ptr.impl(constants.%U.67d) [symbolic = %Ptr.impl_witness.loc7_56.2 (constants.%Ptr.impl_witness.117)]
  1452. // CHECK:STDOUT: %impl_witness_assoc_constant: type = impl_witness_assoc_constant constants.%ptr.e8f8f9.1 [symbolic = %ptr.loc7_54.2 (constants.%ptr.e8f8f9.1)]
  1453. // CHECK:STDOUT:
  1454. // CHECK:STDOUT: !members:
  1455. // CHECK:STDOUT: witness = %Ptr.impl_witness.loc7_56.1
  1456. // CHECK:STDOUT: }
  1457. // CHECK:STDOUT: }
  1458. // CHECK:STDOUT:
  1459. // CHECK:STDOUT: generic fn @F(%T.loc9_7.2: %Ptr.type) {
  1460. // CHECK:STDOUT: %T.loc9_7.1: %Ptr.type = symbolic_binding T, 0 [symbolic = %T.loc9_7.1 (constants.%T.ffa)]
  1461. // CHECK:STDOUT: %T.as_type.loc9_22.1: type = facet_access_type %T.loc9_7.1 [symbolic = %T.as_type.loc9_22.1 (constants.%T.as_type.c3c)]
  1462. // CHECK:STDOUT: %pattern_type.loc9_20: type = pattern_type %T.as_type.loc9_22.1 [symbolic = %pattern_type.loc9_20 (constants.%pattern_type.c27)]
  1463. // CHECK:STDOUT: %.loc9_29.1: require_specific_def_type = require_specific_def @U.as.Ptr.impl(%T.as_type.loc9_22.1) [symbolic = %.loc9_29.1 (constants.%.f62)]
  1464. // CHECK:STDOUT: %ptr: type = ptr_type %T.as_type.loc9_22.1 [symbolic = %ptr (constants.%ptr.734)]
  1465. // CHECK:STDOUT: %.loc9_29.2: Core.Form = init_form %ptr [symbolic = %.loc9_29.2 (constants.%.420)]
  1466. // CHECK:STDOUT: %pattern_type.loc9_29: type = pattern_type %ptr [symbolic = %pattern_type.loc9_29 (constants.%pattern_type.1c0)]
  1467. // CHECK:STDOUT:
  1468. // CHECK:STDOUT: !definition:
  1469. // CHECK:STDOUT: %require_complete.loc9_15: <witness> = require_complete_type %T.as_type.loc9_22.1 [symbolic = %require_complete.loc9_15 (constants.%require_complete.e7f)]
  1470. // CHECK:STDOUT: %require_complete.loc9_25: <witness> = require_complete_type %ptr [symbolic = %require_complete.loc9_25 (constants.%require_complete.06a)]
  1471. // CHECK:STDOUT: %.loc10_10.1: require_specific_def_type = require_specific_def @ptr.as.Copy.impl(%T.as_type.loc9_22.1) [symbolic = %.loc10_10.1 (constants.%.592)]
  1472. // CHECK:STDOUT: %Copy.lookup_impl_witness: <witness> = lookup_impl_witness %ptr, @Copy [symbolic = %Copy.lookup_impl_witness (constants.%Copy.lookup_impl_witness.48d)]
  1473. // CHECK:STDOUT: %Copy.facet: %Copy.type = facet_value %ptr, (%Copy.lookup_impl_witness) [symbolic = %Copy.facet (constants.%Copy.facet)]
  1474. // 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.bc6)]
  1475. // CHECK:STDOUT: %.loc10_10.2: type = fn_type_with_self_type %Copy.WithSelf.Op.type, %Copy.facet [symbolic = %.loc10_10.2 (constants.%.307)]
  1476. // CHECK:STDOUT: %impl.elem0.loc10_10.2: @F.%.loc10_10.2 (%.307) = impl_witness_access %Copy.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc10_10.2 (constants.%impl.elem0.c24)]
  1477. // CHECK:STDOUT: %specific_impl_fn.loc10_10.2: <specific function> = specific_impl_function %impl.elem0.loc10_10.2, @Copy.WithSelf.Op(%Copy.facet) [symbolic = %specific_impl_fn.loc10_10.2 (constants.%specific_impl_fn.79e)]
  1478. // CHECK:STDOUT:
  1479. // CHECK:STDOUT: fn(%t.param: ref @F.%T.as_type.loc9_22.1 (%T.as_type.c3c)) -> out %return.param: @F.%ptr (%ptr.734) {
  1480. // CHECK:STDOUT: !entry:
  1481. // CHECK:STDOUT: %t.ref: ref @F.%T.as_type.loc9_22.1 (%T.as_type.c3c) = name_ref t, %t
  1482. // CHECK:STDOUT: %addr: @F.%ptr (%ptr.734) = addr_of %t.ref
  1483. // CHECK:STDOUT: %impl.elem0.loc10_10.1: @F.%.loc10_10.2 (%.307) = impl_witness_access constants.%Copy.lookup_impl_witness.48d, element0 [symbolic = %impl.elem0.loc10_10.2 (constants.%impl.elem0.c24)]
  1484. // CHECK:STDOUT: %bound_method.loc10_10.1: <bound method> = bound_method %addr, %impl.elem0.loc10_10.1
  1485. // CHECK:STDOUT: %specific_impl_fn.loc10_10.1: <specific function> = specific_impl_function %impl.elem0.loc10_10.1, @Copy.WithSelf.Op(constants.%Copy.facet) [symbolic = %specific_impl_fn.loc10_10.2 (constants.%specific_impl_fn.79e)]
  1486. // CHECK:STDOUT: %bound_method.loc10_10.2: <bound method> = bound_method %addr, %specific_impl_fn.loc10_10.1
  1487. // CHECK:STDOUT: %Copy.WithSelf.Op.call: init @F.%ptr (%ptr.734) = call %bound_method.loc10_10.2(%addr)
  1488. // CHECK:STDOUT: return %Copy.WithSelf.Op.call
  1489. // CHECK:STDOUT: }
  1490. // CHECK:STDOUT: }
  1491. // CHECK:STDOUT:
  1492. // CHECK:STDOUT: specific @Ptr.WithSelf(constants.%Self.0e0) {
  1493. // CHECK:STDOUT: !definition:
  1494. // CHECK:STDOUT: }
  1495. // CHECK:STDOUT:
  1496. // CHECK:STDOUT: specific @Ptr.WithSelf(constants.%.Self.47a) {
  1497. // CHECK:STDOUT: !definition:
  1498. // CHECK:STDOUT: }
  1499. // CHECK:STDOUT:
  1500. // CHECK:STDOUT: specific @U.as.Ptr.impl(constants.%U.67d) {
  1501. // CHECK:STDOUT: %U.loc7_21.2 => constants.%U.67d
  1502. // CHECK:STDOUT: %ptr.loc7_54.2 => constants.%ptr.e8f8f9.1
  1503. // CHECK:STDOUT: %Ptr_where.type => constants.%Ptr_where.type.396
  1504. // CHECK:STDOUT: %Ptr.impl_witness.loc7_56.2 => constants.%Ptr.impl_witness.117
  1505. // CHECK:STDOUT: }
  1506. // CHECK:STDOUT:
  1507. // CHECK:STDOUT: specific @Ptr.WithSelf(constants.%Ptr.facet) {
  1508. // CHECK:STDOUT: !definition:
  1509. // CHECK:STDOUT: }
  1510. // CHECK:STDOUT:
  1511. // CHECK:STDOUT: specific @U.as.Ptr.impl(constants.%T.as_type.c3c) {
  1512. // CHECK:STDOUT: %U.loc7_21.2 => constants.%T.as_type.c3c
  1513. // CHECK:STDOUT: %ptr.loc7_54.2 => constants.%ptr.734
  1514. // CHECK:STDOUT: %Ptr_where.type => constants.%Ptr_where.type.85e
  1515. // CHECK:STDOUT: %Ptr.impl_witness.loc7_56.2 => constants.%Ptr.impl_witness.9f8
  1516. // CHECK:STDOUT:
  1517. // CHECK:STDOUT: !definition:
  1518. // CHECK:STDOUT: %require_complete => constants.%require_complete.1ff
  1519. // CHECK:STDOUT: }
  1520. // CHECK:STDOUT:
  1521. // CHECK:STDOUT: specific @Ptr.WithSelf(constants.%T.ffa) {
  1522. // CHECK:STDOUT: !definition:
  1523. // CHECK:STDOUT: }
  1524. // CHECK:STDOUT:
  1525. // CHECK:STDOUT: specific @F(constants.%T.ffa) {
  1526. // CHECK:STDOUT: %T.loc9_7.1 => constants.%T.ffa
  1527. // CHECK:STDOUT: %T.as_type.loc9_22.1 => constants.%T.as_type.c3c
  1528. // CHECK:STDOUT: %pattern_type.loc9_20 => constants.%pattern_type.c27
  1529. // CHECK:STDOUT: %.loc9_29.1 => constants.%.f62
  1530. // CHECK:STDOUT: %ptr => constants.%ptr.734
  1531. // CHECK:STDOUT: %.loc9_29.2 => constants.%.420
  1532. // CHECK:STDOUT: %pattern_type.loc9_29 => constants.%pattern_type.1c0
  1533. // CHECK:STDOUT: }
  1534. // CHECK:STDOUT: