compound_member_access.carbon 151 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102
  1. // Part of the Carbon Language project, under the Apache License v2.0 with LLVM
  2. // Exceptions. See /LICENSE for license information.
  3. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
  4. //
  5. // INCLUDE-FILE: toolchain/testing/testdata/min_prelude/convert.carbon
  6. // TODO: Add ranges and switch to "--dump-sem-ir-ranges=only".
  7. // EXTRA-ARGS: --dump-sem-ir-ranges=if-present
  8. //
  9. // AUTOUPDATE
  10. // TIP: To test this file alone, run:
  11. // TIP: bazel test //toolchain/testing:file_test --test_arg=--file_tests=toolchain/check/testdata/interface/compound_member_access.carbon
  12. // TIP: To dump output, run:
  13. // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/check/testdata/interface/compound_member_access.carbon
  14. // --- associated_constant.carbon
  15. library "[[@TEST_NAME]]";
  16. interface J {
  17. let U:! type;
  18. }
  19. // Simple member access.
  20. fn Simple1(T:! J, S:! T.U) {}
  21. // This should be equivalent to `Simple1` above, but using compound member access.
  22. fn Compound1(V:! J, W:! V.(J.U)) {}
  23. // --- non_instance.carbon
  24. library "[[@TEST_NAME]]";
  25. interface K1 {
  26. fn Q1();
  27. }
  28. // Simple member access.
  29. fn Simple2(T:! K1) {
  30. T.Q1();
  31. }
  32. // This should be equivalent to `Simple2` above, but using compound member access.
  33. fn Compound2(V:! K1) {
  34. V.(K1.Q1)();
  35. }
  36. // --- fail_caller_instance_interface_not.carbon
  37. library "[[@TEST_NAME]]";
  38. interface K2 {
  39. fn Q2();
  40. }
  41. // Simple member access allows this.
  42. fn Simple3(T:! K2, x: T) {
  43. x.Q2();
  44. }
  45. // Compound member access does not. It tries to convert `y` to `K2`, but only
  46. // its type `V` can.
  47. fn Compound3(V:! K2, y: V) {
  48. // CHECK:STDERR: fail_caller_instance_interface_not.carbon:[[@LINE+7]]:3: error: cannot implicitly convert non-type value of type `V` into type implementing `K2` [ConversionFailureNonTypeToFacet]
  49. // CHECK:STDERR: y.(K2.Q2)();
  50. // CHECK:STDERR: ^~~~~~~~~
  51. // CHECK:STDERR: fail_caller_instance_interface_not.carbon:[[@LINE+4]]:3: note: type `V` does not implement interface `Core.ImplicitAs(K2)` [MissingImplInMemberAccessNote]
  52. // CHECK:STDERR: y.(K2.Q2)();
  53. // CHECK:STDERR: ^~~~~~~~~
  54. // CHECK:STDERR:
  55. y.(K2.Q2)();
  56. }
  57. // --- instance.carbon
  58. library "[[@TEST_NAME]]";
  59. interface L1 {
  60. fn R1[self: Self]();
  61. fn S1[ref self: Self]();
  62. }
  63. // Simple member access.
  64. fn Simple4(T:! L1, x: T, p: T*) {
  65. x.R1();
  66. p->S1();
  67. }
  68. // This should be equivalent to `Simple4` above, but using compound member access.
  69. fn Compound4(V:! L1, y: V, p: V*) {
  70. y.(L1.R1)();
  71. p->(L1.S1)();
  72. }
  73. // --- instance_addr.carbon
  74. library "[[@TEST_NAME]]";
  75. interface L1 {
  76. fn R1[self: Self]();
  77. fn S1[addr self: Self*]();
  78. }
  79. // Simple member access.
  80. fn Simple4(T:! L1, x: T, p: T*) {
  81. x.R1();
  82. p->S1();
  83. }
  84. // This should be equivalent to `Simple4` above, but using compound member access.
  85. fn Compound4(V:! L1, y: V, p: V*) {
  86. y.(L1.R1)();
  87. p->(L1.S1)();
  88. }
  89. // --- fail_interface_instance_caller_not.carbon
  90. library "[[@TEST_NAME]]";
  91. interface L2 {
  92. fn R2[self: Self]();
  93. fn S2[ref self: Self]();
  94. }
  95. // Simple member access. Fails since calling an instance method without an object.
  96. fn Simple5(T:! L2) {
  97. // CHECK:STDERR: fail_interface_instance_caller_not.carbon:[[@LINE+7]]:3: error: missing object argument in method call [MissingObjectInMethodCall]
  98. // CHECK:STDERR: T.R2();
  99. // CHECK:STDERR: ^~~~~~
  100. // CHECK:STDERR: fail_interface_instance_caller_not.carbon:[[@LINE-9]]:3: note: calling function declared here [InCallToFunction]
  101. // CHECK:STDERR: fn R2[self: Self]();
  102. // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~
  103. // CHECK:STDERR:
  104. T.R2();
  105. // CHECK:STDERR: fail_interface_instance_caller_not.carbon:[[@LINE+7]]:3: error: missing object argument in method call [MissingObjectInMethodCall]
  106. // CHECK:STDERR: T.S2();
  107. // CHECK:STDERR: ^~~~~~
  108. // CHECK:STDERR: fail_interface_instance_caller_not.carbon:[[@LINE-16]]:3: note: calling function declared here [InCallToFunction]
  109. // CHECK:STDERR: fn S2[ref self: Self]();
  110. // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~
  111. // CHECK:STDERR:
  112. T.S2();
  113. }
  114. // TODO: Expected to fail in the same way as `Simple5`.
  115. fn Compound5(V:! L2) {
  116. // CHECK:STDERR: fail_interface_instance_caller_not.carbon:[[@LINE+4]]:3: error: cannot access member of interface `L2` in type `L2` that does not implement that interface [MissingImplInMemberAccess]
  117. // CHECK:STDERR: V.(L2.R2)();
  118. // CHECK:STDERR: ^~~~~~~~~
  119. // CHECK:STDERR:
  120. V.(L2.R2)();
  121. // CHECK:STDERR: fail_interface_instance_caller_not.carbon:[[@LINE+4]]:3: error: cannot access member of interface `L2` in type `L2` that does not implement that interface [MissingImplInMemberAccess]
  122. // CHECK:STDERR: V.(L2.S2)();
  123. // CHECK:STDERR: ^~~~~~~~~
  124. // CHECK:STDERR:
  125. V.(L2.S2)();
  126. }
  127. // --- fail_interface_instance_caller_not_addr.carbon
  128. library "[[@TEST_NAME]]";
  129. interface L2 {
  130. fn R2[self: Self]();
  131. fn S2[addr self: Self*]();
  132. }
  133. // Simple member access. Fails since calling an instance method without an object.
  134. fn Simple5(T:! L2) {
  135. // CHECK:STDERR: fail_interface_instance_caller_not_addr.carbon:[[@LINE+7]]:3: error: missing object argument in method call [MissingObjectInMethodCall]
  136. // CHECK:STDERR: T.R2();
  137. // CHECK:STDERR: ^~~~~~
  138. // CHECK:STDERR: fail_interface_instance_caller_not_addr.carbon:[[@LINE-9]]:3: note: calling function declared here [InCallToFunction]
  139. // CHECK:STDERR: fn R2[self: Self]();
  140. // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~
  141. // CHECK:STDERR:
  142. T.R2();
  143. // CHECK:STDERR: fail_interface_instance_caller_not_addr.carbon:[[@LINE+7]]:3: error: missing object argument in method call [MissingObjectInMethodCall]
  144. // CHECK:STDERR: T.S2();
  145. // CHECK:STDERR: ^~~~~~
  146. // CHECK:STDERR: fail_interface_instance_caller_not_addr.carbon:[[@LINE-16]]:3: note: calling function declared here [InCallToFunction]
  147. // CHECK:STDERR: fn S2[addr self: Self*]();
  148. // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~
  149. // CHECK:STDERR:
  150. T.S2();
  151. }
  152. // TODO: Expected to fail in the same way as `Simple5`.
  153. fn Compound5(V:! L2) {
  154. // CHECK:STDERR: fail_interface_instance_caller_not_addr.carbon:[[@LINE+4]]:3: error: cannot access member of interface `L2` in type `L2` that does not implement that interface [MissingImplInMemberAccess]
  155. // CHECK:STDERR: V.(L2.R2)();
  156. // CHECK:STDERR: ^~~~~~~~~
  157. // CHECK:STDERR:
  158. V.(L2.R2)();
  159. // CHECK:STDERR: fail_interface_instance_caller_not_addr.carbon:[[@LINE+4]]:3: error: cannot access member of interface `L2` in type `L2` that does not implement that interface [MissingImplInMemberAccess]
  160. // CHECK:STDERR: V.(L2.S2)();
  161. // CHECK:STDERR: ^~~~~~~~~
  162. // CHECK:STDERR:
  163. V.(L2.S2)();
  164. }
  165. // --- fail_combine_non_instance.carbon
  166. library "[[@TEST_NAME]]";
  167. interface A {
  168. fn G();
  169. }
  170. class C {}
  171. impl C as A {
  172. fn G() {}
  173. }
  174. // Since `A.G` is a non-instance method, compound member access may only be
  175. // used with a type, not an instance.
  176. fn Fails() {
  177. // CHECK:STDERR: fail_combine_non_instance.carbon:[[@LINE+7]]:3: error: cannot implicitly convert non-type value of type `C` into type implementing `A` [ConversionFailureNonTypeToFacet]
  178. // CHECK:STDERR: ({} as C).((A & A).G)();
  179. // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~
  180. // CHECK:STDERR: fail_combine_non_instance.carbon:[[@LINE+4]]:3: note: type `C` does not implement interface `Core.ImplicitAs(A)` [MissingImplInMemberAccessNote]
  181. // CHECK:STDERR: ({} as C).((A & A).G)();
  182. // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~
  183. // CHECK:STDERR:
  184. ({} as C).((A & A).G)();
  185. // CHECK:STDERR: fail_combine_non_instance.carbon:[[@LINE+7]]:3: error: cannot implicitly convert non-type value of type `C` into type implementing `A` [ConversionFailureNonTypeToFacet]
  186. // CHECK:STDERR: (({} as C) as (C as (A & A))).((A & A).G)();
  187. // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  188. // CHECK:STDERR: fail_combine_non_instance.carbon:[[@LINE+4]]:3: note: type `C` does not implement interface `Core.ImplicitAs(A)` [MissingImplInMemberAccessNote]
  189. // CHECK:STDERR: (({} as C) as (C as (A & A))).((A & A).G)();
  190. // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  191. // CHECK:STDERR:
  192. (({} as C) as (C as (A & A))).((A & A).G)();
  193. // CHECK:STDERR: fail_combine_non_instance.carbon:[[@LINE+7]]:3: error: cannot implicitly convert non-type value of type `C` into type implementing `A` [ConversionFailureNonTypeToFacet]
  194. // CHECK:STDERR: (({} as C) as (C as (A & A))).(A.G)();
  195. // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  196. // CHECK:STDERR: fail_combine_non_instance.carbon:[[@LINE+4]]:3: note: type `C` does not implement interface `Core.ImplicitAs(A)` [MissingImplInMemberAccessNote]
  197. // CHECK:STDERR: (({} as C) as (C as (A & A))).(A.G)();
  198. // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  199. // CHECK:STDERR:
  200. (({} as C) as (C as (A & A))).(A.G)();
  201. }
  202. // --- allowed_combine_non_instance.carbon
  203. library "[[@TEST_NAME]]";
  204. interface A {
  205. fn G();
  206. }
  207. class C {}
  208. impl C as A {
  209. fn G() {}
  210. }
  211. fn Works() {
  212. C.((A & A).G)();
  213. (C as (A & A)).((A & A).G)();
  214. (C as (A & A)).(A.G)();
  215. }
  216. // CHECK:STDOUT: --- associated_constant.carbon
  217. // CHECK:STDOUT:
  218. // CHECK:STDOUT: constants {
  219. // CHECK:STDOUT: %J.type: type = facet_type <@J> [concrete]
  220. // CHECK:STDOUT: %Self: %J.type = symbolic_binding Self, 0 [symbolic]
  221. // CHECK:STDOUT: %J.assoc_type: type = assoc_entity_type @J [concrete]
  222. // CHECK:STDOUT: %assoc0: %J.assoc_type = assoc_entity element0, @J.%U [concrete]
  223. // CHECK:STDOUT: %type: type = facet_type <type> [concrete]
  224. // CHECK:STDOUT: %.Self: %type = symbolic_binding .Self [symbolic_self]
  225. // CHECK:STDOUT: %T: %J.type = symbolic_binding T, 0 [symbolic]
  226. // CHECK:STDOUT: %pattern_type.84b: type = pattern_type %J.type [concrete]
  227. // CHECK:STDOUT: %T.binding.as_type: type = symbolic_binding_type T, 0, %T [symbolic]
  228. // CHECK:STDOUT: %J.lookup_impl_witness.cd2552.1: <witness> = lookup_impl_witness %T, @J [symbolic]
  229. // CHECK:STDOUT: %impl.elem0.fa9e71.1: type = impl_witness_access %J.lookup_impl_witness.cd2552.1, element0 [symbolic]
  230. // CHECK:STDOUT: %S: %impl.elem0.fa9e71.1 = symbolic_binding S, 1 [symbolic]
  231. // CHECK:STDOUT: %pattern_type.345548.1: type = pattern_type %impl.elem0.fa9e71.1 [symbolic]
  232. // CHECK:STDOUT: %Simple1.type: type = fn_type @Simple1 [concrete]
  233. // CHECK:STDOUT: %Simple1: %Simple1.type = struct_value () [concrete]
  234. // CHECK:STDOUT: %V: %J.type = symbolic_binding V, 0 [symbolic]
  235. // CHECK:STDOUT: %J.lookup_impl_witness.cd2552.2: <witness> = lookup_impl_witness %V, @J [symbolic]
  236. // CHECK:STDOUT: %impl.elem0.fa9e71.2: type = impl_witness_access %J.lookup_impl_witness.cd2552.2, element0 [symbolic]
  237. // CHECK:STDOUT: %W: %impl.elem0.fa9e71.2 = symbolic_binding W, 1 [symbolic]
  238. // CHECK:STDOUT: %pattern_type.345548.2: type = pattern_type %impl.elem0.fa9e71.2 [symbolic]
  239. // CHECK:STDOUT: %Compound1.type: type = fn_type @Compound1 [concrete]
  240. // CHECK:STDOUT: %Compound1: %Compound1.type = struct_value () [concrete]
  241. // CHECK:STDOUT: }
  242. // CHECK:STDOUT:
  243. // CHECK:STDOUT: imports {
  244. // CHECK:STDOUT: %Core: <namespace> = namespace file.%Core.import, [concrete] {
  245. // CHECK:STDOUT: import Core//prelude
  246. // CHECK:STDOUT: import Core//prelude/...
  247. // CHECK:STDOUT: }
  248. // CHECK:STDOUT: }
  249. // CHECK:STDOUT:
  250. // CHECK:STDOUT: file {
  251. // CHECK:STDOUT: package: <namespace> = namespace [concrete] {
  252. // CHECK:STDOUT: .Core = imports.%Core
  253. // CHECK:STDOUT: .J = %J.decl
  254. // CHECK:STDOUT: .Simple1 = %Simple1.decl
  255. // CHECK:STDOUT: .Compound1 = %Compound1.decl
  256. // CHECK:STDOUT: }
  257. // CHECK:STDOUT: %Core.import = import Core
  258. // CHECK:STDOUT: %J.decl: type = interface_decl @J [concrete = constants.%J.type] {} {}
  259. // CHECK:STDOUT: %Simple1.decl: %Simple1.type = fn_decl @Simple1 [concrete = constants.%Simple1] {
  260. // CHECK:STDOUT: %T.patt: %pattern_type.84b = symbolic_binding_pattern T, 0 [concrete]
  261. // CHECK:STDOUT: %S.patt: @Simple1.%pattern_type (%pattern_type.345548.1) = symbolic_binding_pattern S, 1 [concrete]
  262. // CHECK:STDOUT: } {
  263. // CHECK:STDOUT: %.loc8_16: type = splice_block %J.ref [concrete = constants.%J.type] {
  264. // CHECK:STDOUT: %.Self.2: %type = symbolic_binding .Self [symbolic_self = constants.%.Self]
  265. // CHECK:STDOUT: %J.ref: type = name_ref J, file.%J.decl [concrete = constants.%J.type]
  266. // CHECK:STDOUT: }
  267. // CHECK:STDOUT: %T.loc8_12.2: %J.type = symbolic_binding T, 0 [symbolic = %T.loc8_12.1 (constants.%T)]
  268. // CHECK:STDOUT: %.loc8_24.1: type = splice_block %impl.elem0.loc8_24.2 [symbolic = %impl.elem0.loc8_24.1 (constants.%impl.elem0.fa9e71.1)] {
  269. // CHECK:STDOUT: %.Self.1: %type = symbolic_binding .Self [symbolic_self = constants.%.Self]
  270. // CHECK:STDOUT: %T.ref: %J.type = name_ref T, %T.loc8_12.2 [symbolic = %T.loc8_12.1 (constants.%T)]
  271. // CHECK:STDOUT: %U.ref: %J.assoc_type = name_ref U, @U.%assoc0 [concrete = constants.%assoc0]
  272. // CHECK:STDOUT: %T.as_type: type = facet_access_type %T.ref [symbolic = %T.binding.as_type (constants.%T.binding.as_type)]
  273. // CHECK:STDOUT: %.loc8_24.2: type = converted %T.ref, %T.as_type [symbolic = %T.binding.as_type (constants.%T.binding.as_type)]
  274. // CHECK:STDOUT: %impl.elem0.loc8_24.2: type = impl_witness_access constants.%J.lookup_impl_witness.cd2552.1, element0 [symbolic = %impl.elem0.loc8_24.1 (constants.%impl.elem0.fa9e71.1)]
  275. // CHECK:STDOUT: }
  276. // CHECK:STDOUT: %S.loc8_19.2: @Simple1.%impl.elem0.loc8_24.1 (%impl.elem0.fa9e71.1) = symbolic_binding S, 1 [symbolic = %S.loc8_19.1 (constants.%S)]
  277. // CHECK:STDOUT: }
  278. // CHECK:STDOUT: %Compound1.decl: %Compound1.type = fn_decl @Compound1 [concrete = constants.%Compound1] {
  279. // CHECK:STDOUT: %V.patt: %pattern_type.84b = symbolic_binding_pattern V, 0 [concrete]
  280. // CHECK:STDOUT: %W.patt: @Compound1.%pattern_type (%pattern_type.345548.2) = symbolic_binding_pattern W, 1 [concrete]
  281. // CHECK:STDOUT: } {
  282. // CHECK:STDOUT: %.loc11_18: type = splice_block %J.ref.loc11_18 [concrete = constants.%J.type] {
  283. // CHECK:STDOUT: %.Self.2: %type = symbolic_binding .Self [symbolic_self = constants.%.Self]
  284. // CHECK:STDOUT: %J.ref.loc11_18: type = name_ref J, file.%J.decl [concrete = constants.%J.type]
  285. // CHECK:STDOUT: }
  286. // CHECK:STDOUT: %V.loc11_14.2: %J.type = symbolic_binding V, 0 [symbolic = %V.loc11_14.1 (constants.%V)]
  287. // CHECK:STDOUT: %.loc11_26: type = splice_block %impl.elem0.loc11_26.2 [symbolic = %impl.elem0.loc11_26.1 (constants.%impl.elem0.fa9e71.2)] {
  288. // CHECK:STDOUT: %.Self.1: %type = symbolic_binding .Self [symbolic_self = constants.%.Self]
  289. // CHECK:STDOUT: %V.ref: %J.type = name_ref V, %V.loc11_14.2 [symbolic = %V.loc11_14.1 (constants.%V)]
  290. // CHECK:STDOUT: %J.ref.loc11_28: type = name_ref J, file.%J.decl [concrete = constants.%J.type]
  291. // CHECK:STDOUT: %U.ref: %J.assoc_type = name_ref U, @U.%assoc0 [concrete = constants.%assoc0]
  292. // CHECK:STDOUT: %impl.elem0.loc11_26.2: type = impl_witness_access constants.%J.lookup_impl_witness.cd2552.2, element0 [symbolic = %impl.elem0.loc11_26.1 (constants.%impl.elem0.fa9e71.2)]
  293. // CHECK:STDOUT: }
  294. // CHECK:STDOUT: %W.loc11_21.2: @Compound1.%impl.elem0.loc11_26.1 (%impl.elem0.fa9e71.2) = symbolic_binding W, 1 [symbolic = %W.loc11_21.1 (constants.%W)]
  295. // CHECK:STDOUT: }
  296. // CHECK:STDOUT: }
  297. // CHECK:STDOUT:
  298. // CHECK:STDOUT: interface @J {
  299. // CHECK:STDOUT: %Self: %J.type = symbolic_binding Self, 0 [symbolic = constants.%Self]
  300. // CHECK:STDOUT: %U: type = assoc_const_decl @U [concrete] {
  301. // CHECK:STDOUT: %assoc0: %J.assoc_type = assoc_entity element0, @J.%U [concrete = constants.%assoc0]
  302. // CHECK:STDOUT: }
  303. // CHECK:STDOUT:
  304. // CHECK:STDOUT: !members:
  305. // CHECK:STDOUT: .Self = %Self
  306. // CHECK:STDOUT: .U = @U.%assoc0
  307. // CHECK:STDOUT: witness = (%U)
  308. // CHECK:STDOUT: }
  309. // CHECK:STDOUT:
  310. // CHECK:STDOUT: generic assoc_const @U(@J.%Self: %J.type) {
  311. // CHECK:STDOUT: assoc_const U:! type;
  312. // CHECK:STDOUT: }
  313. // CHECK:STDOUT:
  314. // CHECK:STDOUT: generic fn @Simple1(%T.loc8_12.2: %J.type, %S.loc8_19.2: @Simple1.%impl.elem0.loc8_24.1 (%impl.elem0.fa9e71.1)) {
  315. // CHECK:STDOUT: %T.loc8_12.1: %J.type = symbolic_binding T, 0 [symbolic = %T.loc8_12.1 (constants.%T)]
  316. // CHECK:STDOUT: %T.binding.as_type: type = symbolic_binding_type T, 0, %T.loc8_12.1 [symbolic = %T.binding.as_type (constants.%T.binding.as_type)]
  317. // CHECK:STDOUT: %J.lookup_impl_witness: <witness> = lookup_impl_witness %T.loc8_12.1, @J [symbolic = %J.lookup_impl_witness (constants.%J.lookup_impl_witness.cd2552.1)]
  318. // CHECK:STDOUT: %impl.elem0.loc8_24.1: type = impl_witness_access %J.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc8_24.1 (constants.%impl.elem0.fa9e71.1)]
  319. // CHECK:STDOUT: %S.loc8_19.1: @Simple1.%impl.elem0.loc8_24.1 (%impl.elem0.fa9e71.1) = symbolic_binding S, 1 [symbolic = %S.loc8_19.1 (constants.%S)]
  320. // CHECK:STDOUT: %pattern_type: type = pattern_type %impl.elem0.loc8_24.1 [symbolic = %pattern_type (constants.%pattern_type.345548.1)]
  321. // CHECK:STDOUT:
  322. // CHECK:STDOUT: !definition:
  323. // CHECK:STDOUT:
  324. // CHECK:STDOUT: fn() {
  325. // CHECK:STDOUT: !entry:
  326. // CHECK:STDOUT: return
  327. // CHECK:STDOUT: }
  328. // CHECK:STDOUT: }
  329. // CHECK:STDOUT:
  330. // CHECK:STDOUT: generic fn @Compound1(%V.loc11_14.2: %J.type, %W.loc11_21.2: @Compound1.%impl.elem0.loc11_26.1 (%impl.elem0.fa9e71.2)) {
  331. // CHECK:STDOUT: %V.loc11_14.1: %J.type = symbolic_binding V, 0 [symbolic = %V.loc11_14.1 (constants.%V)]
  332. // CHECK:STDOUT: %J.lookup_impl_witness: <witness> = lookup_impl_witness %V.loc11_14.1, @J [symbolic = %J.lookup_impl_witness (constants.%J.lookup_impl_witness.cd2552.2)]
  333. // CHECK:STDOUT: %impl.elem0.loc11_26.1: type = impl_witness_access %J.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc11_26.1 (constants.%impl.elem0.fa9e71.2)]
  334. // CHECK:STDOUT: %W.loc11_21.1: @Compound1.%impl.elem0.loc11_26.1 (%impl.elem0.fa9e71.2) = symbolic_binding W, 1 [symbolic = %W.loc11_21.1 (constants.%W)]
  335. // CHECK:STDOUT: %pattern_type: type = pattern_type %impl.elem0.loc11_26.1 [symbolic = %pattern_type (constants.%pattern_type.345548.2)]
  336. // CHECK:STDOUT:
  337. // CHECK:STDOUT: !definition:
  338. // CHECK:STDOUT:
  339. // CHECK:STDOUT: fn() {
  340. // CHECK:STDOUT: !entry:
  341. // CHECK:STDOUT: return
  342. // CHECK:STDOUT: }
  343. // CHECK:STDOUT: }
  344. // CHECK:STDOUT:
  345. // CHECK:STDOUT: specific @U(constants.%Self) {}
  346. // CHECK:STDOUT:
  347. // CHECK:STDOUT: specific @U(constants.%T) {}
  348. // CHECK:STDOUT:
  349. // CHECK:STDOUT: specific @Simple1(constants.%T, constants.%S) {
  350. // CHECK:STDOUT: %T.loc8_12.1 => constants.%T
  351. // CHECK:STDOUT: %T.binding.as_type => constants.%T.binding.as_type
  352. // CHECK:STDOUT: %J.lookup_impl_witness => constants.%J.lookup_impl_witness.cd2552.1
  353. // CHECK:STDOUT: %impl.elem0.loc8_24.1 => constants.%impl.elem0.fa9e71.1
  354. // CHECK:STDOUT: %S.loc8_19.1 => constants.%S
  355. // CHECK:STDOUT: %pattern_type => constants.%pattern_type.345548.1
  356. // CHECK:STDOUT: }
  357. // CHECK:STDOUT:
  358. // CHECK:STDOUT: specific @U(constants.%V) {}
  359. // CHECK:STDOUT:
  360. // CHECK:STDOUT: specific @Compound1(constants.%V, constants.%W) {
  361. // CHECK:STDOUT: %V.loc11_14.1 => constants.%V
  362. // CHECK:STDOUT: %J.lookup_impl_witness => constants.%J.lookup_impl_witness.cd2552.2
  363. // CHECK:STDOUT: %impl.elem0.loc11_26.1 => constants.%impl.elem0.fa9e71.2
  364. // CHECK:STDOUT: %W.loc11_21.1 => constants.%W
  365. // CHECK:STDOUT: %pattern_type => constants.%pattern_type.345548.2
  366. // CHECK:STDOUT: }
  367. // CHECK:STDOUT:
  368. // CHECK:STDOUT: --- non_instance.carbon
  369. // CHECK:STDOUT:
  370. // CHECK:STDOUT: constants {
  371. // CHECK:STDOUT: %K1.type: type = facet_type <@K1> [concrete]
  372. // CHECK:STDOUT: %Self: %K1.type = symbolic_binding Self, 0 [symbolic]
  373. // CHECK:STDOUT: %K1.Q1.type: type = fn_type @K1.Q1 [concrete]
  374. // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete]
  375. // CHECK:STDOUT: %K1.Q1: %K1.Q1.type = struct_value () [concrete]
  376. // CHECK:STDOUT: %K1.assoc_type: type = assoc_entity_type @K1 [concrete]
  377. // CHECK:STDOUT: %assoc0: %K1.assoc_type = assoc_entity element0, @K1.%K1.Q1.decl [concrete]
  378. // CHECK:STDOUT: %type: type = facet_type <type> [concrete]
  379. // CHECK:STDOUT: %.Self: %type = symbolic_binding .Self [symbolic_self]
  380. // CHECK:STDOUT: %T: %K1.type = symbolic_binding T, 0 [symbolic]
  381. // CHECK:STDOUT: %pattern_type: type = pattern_type %K1.type [concrete]
  382. // CHECK:STDOUT: %Simple2.type: type = fn_type @Simple2 [concrete]
  383. // CHECK:STDOUT: %Simple2: %Simple2.type = struct_value () [concrete]
  384. // CHECK:STDOUT: %T.binding.as_type: type = symbolic_binding_type T, 0, %T [symbolic]
  385. // CHECK:STDOUT: %K1.lookup_impl_witness.a3a3f1.1: <witness> = lookup_impl_witness %T, @K1 [symbolic]
  386. // CHECK:STDOUT: %.48862d.1: type = fn_type_with_self_type %K1.Q1.type, %T [symbolic]
  387. // CHECK:STDOUT: %impl.elem0.33f0bc.1: %.48862d.1 = impl_witness_access %K1.lookup_impl_witness.a3a3f1.1, element0 [symbolic]
  388. // CHECK:STDOUT: %specific_impl_fn.dd96c4.1: <specific function> = specific_impl_function %impl.elem0.33f0bc.1, @K1.Q1(%T) [symbolic]
  389. // CHECK:STDOUT: %V: %K1.type = symbolic_binding V, 0 [symbolic]
  390. // CHECK:STDOUT: %Compound2.type: type = fn_type @Compound2 [concrete]
  391. // CHECK:STDOUT: %Compound2: %Compound2.type = struct_value () [concrete]
  392. // CHECK:STDOUT: %K1.lookup_impl_witness.a3a3f1.2: <witness> = lookup_impl_witness %V, @K1 [symbolic]
  393. // CHECK:STDOUT: %.48862d.2: type = fn_type_with_self_type %K1.Q1.type, %V [symbolic]
  394. // CHECK:STDOUT: %impl.elem0.33f0bc.2: %.48862d.2 = impl_witness_access %K1.lookup_impl_witness.a3a3f1.2, element0 [symbolic]
  395. // CHECK:STDOUT: %specific_impl_fn.dd96c4.2: <specific function> = specific_impl_function %impl.elem0.33f0bc.2, @K1.Q1(%V) [symbolic]
  396. // CHECK:STDOUT: }
  397. // CHECK:STDOUT:
  398. // CHECK:STDOUT: imports {
  399. // CHECK:STDOUT: %Core: <namespace> = namespace file.%Core.import, [concrete] {
  400. // CHECK:STDOUT: import Core//prelude
  401. // CHECK:STDOUT: import Core//prelude/...
  402. // CHECK:STDOUT: }
  403. // CHECK:STDOUT: }
  404. // CHECK:STDOUT:
  405. // CHECK:STDOUT: file {
  406. // CHECK:STDOUT: package: <namespace> = namespace [concrete] {
  407. // CHECK:STDOUT: .Core = imports.%Core
  408. // CHECK:STDOUT: .K1 = %K1.decl
  409. // CHECK:STDOUT: .Simple2 = %Simple2.decl
  410. // CHECK:STDOUT: .Compound2 = %Compound2.decl
  411. // CHECK:STDOUT: }
  412. // CHECK:STDOUT: %Core.import = import Core
  413. // CHECK:STDOUT: %K1.decl: type = interface_decl @K1 [concrete = constants.%K1.type] {} {}
  414. // CHECK:STDOUT: %Simple2.decl: %Simple2.type = fn_decl @Simple2 [concrete = constants.%Simple2] {
  415. // CHECK:STDOUT: %T.patt: %pattern_type = symbolic_binding_pattern T, 0 [concrete]
  416. // CHECK:STDOUT: } {
  417. // CHECK:STDOUT: %.loc8: type = splice_block %K1.ref [concrete = constants.%K1.type] {
  418. // CHECK:STDOUT: %.Self: %type = symbolic_binding .Self [symbolic_self = constants.%.Self]
  419. // CHECK:STDOUT: %K1.ref: type = name_ref K1, file.%K1.decl [concrete = constants.%K1.type]
  420. // CHECK:STDOUT: }
  421. // CHECK:STDOUT: %T.loc8_12.2: %K1.type = symbolic_binding T, 0 [symbolic = %T.loc8_12.1 (constants.%T)]
  422. // CHECK:STDOUT: }
  423. // CHECK:STDOUT: %Compound2.decl: %Compound2.type = fn_decl @Compound2 [concrete = constants.%Compound2] {
  424. // CHECK:STDOUT: %V.patt: %pattern_type = symbolic_binding_pattern V, 0 [concrete]
  425. // CHECK:STDOUT: } {
  426. // CHECK:STDOUT: %.loc13: type = splice_block %K1.ref.loc13 [concrete = constants.%K1.type] {
  427. // CHECK:STDOUT: %.Self: %type = symbolic_binding .Self [symbolic_self = constants.%.Self]
  428. // CHECK:STDOUT: %K1.ref.loc13: type = name_ref K1, file.%K1.decl [concrete = constants.%K1.type]
  429. // CHECK:STDOUT: }
  430. // CHECK:STDOUT: %V.loc13_14.2: %K1.type = symbolic_binding V, 0 [symbolic = %V.loc13_14.1 (constants.%V)]
  431. // CHECK:STDOUT: }
  432. // CHECK:STDOUT: }
  433. // CHECK:STDOUT:
  434. // CHECK:STDOUT: interface @K1 {
  435. // CHECK:STDOUT: %Self: %K1.type = symbolic_binding Self, 0 [symbolic = constants.%Self]
  436. // CHECK:STDOUT: %K1.Q1.decl: %K1.Q1.type = fn_decl @K1.Q1 [concrete = constants.%K1.Q1] {} {}
  437. // CHECK:STDOUT: %assoc0: %K1.assoc_type = assoc_entity element0, %K1.Q1.decl [concrete = constants.%assoc0]
  438. // CHECK:STDOUT:
  439. // CHECK:STDOUT: !members:
  440. // CHECK:STDOUT: .Self = %Self
  441. // CHECK:STDOUT: .Q1 = %assoc0
  442. // CHECK:STDOUT: witness = (%K1.Q1.decl)
  443. // CHECK:STDOUT: }
  444. // CHECK:STDOUT:
  445. // CHECK:STDOUT: generic fn @K1.Q1(@K1.%Self: %K1.type) {
  446. // CHECK:STDOUT: fn();
  447. // CHECK:STDOUT: }
  448. // CHECK:STDOUT:
  449. // CHECK:STDOUT: generic fn @Simple2(%T.loc8_12.2: %K1.type) {
  450. // CHECK:STDOUT: %T.loc8_12.1: %K1.type = symbolic_binding T, 0 [symbolic = %T.loc8_12.1 (constants.%T)]
  451. // CHECK:STDOUT:
  452. // CHECK:STDOUT: !definition:
  453. // CHECK:STDOUT: %T.binding.as_type: type = symbolic_binding_type T, 0, %T.loc8_12.1 [symbolic = %T.binding.as_type (constants.%T.binding.as_type)]
  454. // CHECK:STDOUT: %K1.lookup_impl_witness: <witness> = lookup_impl_witness %T.loc8_12.1, @K1 [symbolic = %K1.lookup_impl_witness (constants.%K1.lookup_impl_witness.a3a3f1.1)]
  455. // CHECK:STDOUT: %.loc9_4.2: type = fn_type_with_self_type constants.%K1.Q1.type, %T.loc8_12.1 [symbolic = %.loc9_4.2 (constants.%.48862d.1)]
  456. // CHECK:STDOUT: %impl.elem0.loc9_4.2: @Simple2.%.loc9_4.2 (%.48862d.1) = impl_witness_access %K1.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc9_4.2 (constants.%impl.elem0.33f0bc.1)]
  457. // CHECK:STDOUT: %specific_impl_fn.loc9_4.2: <specific function> = specific_impl_function %impl.elem0.loc9_4.2, @K1.Q1(%T.loc8_12.1) [symbolic = %specific_impl_fn.loc9_4.2 (constants.%specific_impl_fn.dd96c4.1)]
  458. // CHECK:STDOUT:
  459. // CHECK:STDOUT: fn() {
  460. // CHECK:STDOUT: !entry:
  461. // CHECK:STDOUT: %T.ref: %K1.type = name_ref T, %T.loc8_12.2 [symbolic = %T.loc8_12.1 (constants.%T)]
  462. // CHECK:STDOUT: %Q1.ref: %K1.assoc_type = name_ref Q1, @K1.%assoc0 [concrete = constants.%assoc0]
  463. // CHECK:STDOUT: %T.as_type: type = facet_access_type %T.ref [symbolic = %T.binding.as_type (constants.%T.binding.as_type)]
  464. // CHECK:STDOUT: %.loc9_4.1: type = converted %T.ref, %T.as_type [symbolic = %T.binding.as_type (constants.%T.binding.as_type)]
  465. // CHECK:STDOUT: %impl.elem0.loc9_4.1: @Simple2.%.loc9_4.2 (%.48862d.1) = impl_witness_access constants.%K1.lookup_impl_witness.a3a3f1.1, element0 [symbolic = %impl.elem0.loc9_4.2 (constants.%impl.elem0.33f0bc.1)]
  466. // CHECK:STDOUT: %specific_impl_fn.loc9_4.1: <specific function> = specific_impl_function %impl.elem0.loc9_4.1, @K1.Q1(constants.%T) [symbolic = %specific_impl_fn.loc9_4.2 (constants.%specific_impl_fn.dd96c4.1)]
  467. // CHECK:STDOUT: %.loc9_8: init %empty_tuple.type = call %specific_impl_fn.loc9_4.1()
  468. // CHECK:STDOUT: return
  469. // CHECK:STDOUT: }
  470. // CHECK:STDOUT: }
  471. // CHECK:STDOUT:
  472. // CHECK:STDOUT: generic fn @Compound2(%V.loc13_14.2: %K1.type) {
  473. // CHECK:STDOUT: %V.loc13_14.1: %K1.type = symbolic_binding V, 0 [symbolic = %V.loc13_14.1 (constants.%V)]
  474. // CHECK:STDOUT:
  475. // CHECK:STDOUT: !definition:
  476. // CHECK:STDOUT: %K1.lookup_impl_witness: <witness> = lookup_impl_witness %V.loc13_14.1, @K1 [symbolic = %K1.lookup_impl_witness (constants.%K1.lookup_impl_witness.a3a3f1.2)]
  477. // CHECK:STDOUT: %.loc14_4: type = fn_type_with_self_type constants.%K1.Q1.type, %V.loc13_14.1 [symbolic = %.loc14_4 (constants.%.48862d.2)]
  478. // CHECK:STDOUT: %impl.elem0.loc14_4.2: @Compound2.%.loc14_4 (%.48862d.2) = impl_witness_access %K1.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc14_4.2 (constants.%impl.elem0.33f0bc.2)]
  479. // CHECK:STDOUT: %specific_impl_fn.loc14_4.2: <specific function> = specific_impl_function %impl.elem0.loc14_4.2, @K1.Q1(%V.loc13_14.1) [symbolic = %specific_impl_fn.loc14_4.2 (constants.%specific_impl_fn.dd96c4.2)]
  480. // CHECK:STDOUT:
  481. // CHECK:STDOUT: fn() {
  482. // CHECK:STDOUT: !entry:
  483. // CHECK:STDOUT: %V.ref: %K1.type = name_ref V, %V.loc13_14.2 [symbolic = %V.loc13_14.1 (constants.%V)]
  484. // CHECK:STDOUT: %K1.ref.loc14: type = name_ref K1, file.%K1.decl [concrete = constants.%K1.type]
  485. // CHECK:STDOUT: %Q1.ref: %K1.assoc_type = name_ref Q1, @K1.%assoc0 [concrete = constants.%assoc0]
  486. // CHECK:STDOUT: %impl.elem0.loc14_4.1: @Compound2.%.loc14_4 (%.48862d.2) = impl_witness_access constants.%K1.lookup_impl_witness.a3a3f1.2, element0 [symbolic = %impl.elem0.loc14_4.2 (constants.%impl.elem0.33f0bc.2)]
  487. // CHECK:STDOUT: %specific_impl_fn.loc14_4.1: <specific function> = specific_impl_function %impl.elem0.loc14_4.1, @K1.Q1(constants.%V) [symbolic = %specific_impl_fn.loc14_4.2 (constants.%specific_impl_fn.dd96c4.2)]
  488. // CHECK:STDOUT: %.loc14_13: init %empty_tuple.type = call %specific_impl_fn.loc14_4.1()
  489. // CHECK:STDOUT: return
  490. // CHECK:STDOUT: }
  491. // CHECK:STDOUT: }
  492. // CHECK:STDOUT:
  493. // CHECK:STDOUT: specific @K1.Q1(constants.%Self) {}
  494. // CHECK:STDOUT:
  495. // CHECK:STDOUT: specific @Simple2(constants.%T) {
  496. // CHECK:STDOUT: %T.loc8_12.1 => constants.%T
  497. // CHECK:STDOUT: }
  498. // CHECK:STDOUT:
  499. // CHECK:STDOUT: specific @K1.Q1(constants.%T) {}
  500. // CHECK:STDOUT:
  501. // CHECK:STDOUT: specific @Compound2(constants.%V) {
  502. // CHECK:STDOUT: %V.loc13_14.1 => constants.%V
  503. // CHECK:STDOUT: }
  504. // CHECK:STDOUT:
  505. // CHECK:STDOUT: specific @K1.Q1(constants.%V) {}
  506. // CHECK:STDOUT:
  507. // CHECK:STDOUT: --- fail_caller_instance_interface_not.carbon
  508. // CHECK:STDOUT:
  509. // CHECK:STDOUT: constants {
  510. // CHECK:STDOUT: %K2.type: type = facet_type <@K2> [concrete]
  511. // CHECK:STDOUT: %Self.98c: %K2.type = symbolic_binding Self, 0 [symbolic]
  512. // CHECK:STDOUT: %K2.Q2.type: type = fn_type @K2.Q2 [concrete]
  513. // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete]
  514. // CHECK:STDOUT: %K2.Q2: %K2.Q2.type = struct_value () [concrete]
  515. // CHECK:STDOUT: %K2.assoc_type: type = assoc_entity_type @K2 [concrete]
  516. // CHECK:STDOUT: %assoc0.d67: %K2.assoc_type = assoc_entity element0, @K2.%K2.Q2.decl [concrete]
  517. // CHECK:STDOUT: %type: type = facet_type <type> [concrete]
  518. // CHECK:STDOUT: %.Self: %type = symbolic_binding .Self [symbolic_self]
  519. // CHECK:STDOUT: %T: %K2.type = symbolic_binding T, 0 [symbolic]
  520. // CHECK:STDOUT: %pattern_type.4d9: type = pattern_type %K2.type [concrete]
  521. // CHECK:STDOUT: %T.binding.as_type: type = symbolic_binding_type T, 0, %T [symbolic]
  522. // CHECK:STDOUT: %pattern_type.91df25.1: type = pattern_type %T.binding.as_type [symbolic]
  523. // CHECK:STDOUT: %Simple3.type: type = fn_type @Simple3 [concrete]
  524. // CHECK:STDOUT: %Simple3: %Simple3.type = struct_value () [concrete]
  525. // CHECK:STDOUT: %require_complete.5fb80b.1: <witness> = require_complete_type %T.binding.as_type [symbolic]
  526. // CHECK:STDOUT: %K2.lookup_impl_witness: <witness> = lookup_impl_witness %T, @K2 [symbolic]
  527. // CHECK:STDOUT: %.19f: type = fn_type_with_self_type %K2.Q2.type, %T [symbolic]
  528. // CHECK:STDOUT: %impl.elem0: %.19f = impl_witness_access %K2.lookup_impl_witness, element0 [symbolic]
  529. // CHECK:STDOUT: %specific_impl_fn: <specific function> = specific_impl_function %impl.elem0, @K2.Q2(%T) [symbolic]
  530. // CHECK:STDOUT: %V: %K2.type = symbolic_binding V, 0 [symbolic]
  531. // CHECK:STDOUT: %V.binding.as_type: type = symbolic_binding_type V, 0, %V [symbolic]
  532. // CHECK:STDOUT: %pattern_type.91df25.2: type = pattern_type %V.binding.as_type [symbolic]
  533. // CHECK:STDOUT: %Compound3.type: type = fn_type @Compound3 [concrete]
  534. // CHECK:STDOUT: %Compound3: %Compound3.type = struct_value () [concrete]
  535. // CHECK:STDOUT: %require_complete.5fb80b.2: <witness> = require_complete_type %V.binding.as_type [symbolic]
  536. // CHECK:STDOUT: %ImplicitAs.type.cc7: type = generic_interface_type @ImplicitAs [concrete]
  537. // CHECK:STDOUT: %ImplicitAs.generic: %ImplicitAs.type.cc7 = struct_value () [concrete]
  538. // CHECK:STDOUT: }
  539. // CHECK:STDOUT:
  540. // CHECK:STDOUT: imports {
  541. // CHECK:STDOUT: %Core: <namespace> = namespace file.%Core.import, [concrete] {
  542. // CHECK:STDOUT: .ImplicitAs = %Core.ImplicitAs
  543. // CHECK:STDOUT: import Core//prelude
  544. // CHECK:STDOUT: import Core//prelude/...
  545. // CHECK:STDOUT: }
  546. // CHECK:STDOUT: %Core.ImplicitAs: %ImplicitAs.type.cc7 = import_ref Core//prelude/parts/as, ImplicitAs, loaded [concrete = constants.%ImplicitAs.generic]
  547. // CHECK:STDOUT: }
  548. // CHECK:STDOUT:
  549. // CHECK:STDOUT: file {
  550. // CHECK:STDOUT: package: <namespace> = namespace [concrete] {
  551. // CHECK:STDOUT: .Core = imports.%Core
  552. // CHECK:STDOUT: .K2 = %K2.decl
  553. // CHECK:STDOUT: .Simple3 = %Simple3.decl
  554. // CHECK:STDOUT: .Compound3 = %Compound3.decl
  555. // CHECK:STDOUT: }
  556. // CHECK:STDOUT: %Core.import = import Core
  557. // CHECK:STDOUT: %K2.decl: type = interface_decl @K2 [concrete = constants.%K2.type] {} {}
  558. // CHECK:STDOUT: %Simple3.decl: %Simple3.type = fn_decl @Simple3 [concrete = constants.%Simple3] {
  559. // CHECK:STDOUT: %T.patt: %pattern_type.4d9 = symbolic_binding_pattern T, 0 [concrete]
  560. // CHECK:STDOUT: %x.patt: @Simple3.%pattern_type (%pattern_type.91df25.1) = value_binding_pattern x [concrete]
  561. // CHECK:STDOUT: %x.param_patt: @Simple3.%pattern_type (%pattern_type.91df25.1) = value_param_pattern %x.patt, call_param0 [concrete]
  562. // CHECK:STDOUT: } {
  563. // CHECK:STDOUT: %.loc8_16: type = splice_block %K2.ref [concrete = constants.%K2.type] {
  564. // CHECK:STDOUT: %.Self: %type = symbolic_binding .Self [symbolic_self = constants.%.Self]
  565. // CHECK:STDOUT: %K2.ref: type = name_ref K2, file.%K2.decl [concrete = constants.%K2.type]
  566. // CHECK:STDOUT: }
  567. // CHECK:STDOUT: %T.loc8_12.2: %K2.type = symbolic_binding T, 0 [symbolic = %T.loc8_12.1 (constants.%T)]
  568. // CHECK:STDOUT: %x.param: @Simple3.%T.binding.as_type (%T.binding.as_type) = value_param call_param0
  569. // CHECK:STDOUT: %.loc8_23.1: type = splice_block %.loc8_23.2 [symbolic = %T.binding.as_type (constants.%T.binding.as_type)] {
  570. // CHECK:STDOUT: %T.ref: %K2.type = name_ref T, %T.loc8_12.2 [symbolic = %T.loc8_12.1 (constants.%T)]
  571. // CHECK:STDOUT: %T.as_type: type = facet_access_type %T.ref [symbolic = %T.binding.as_type (constants.%T.binding.as_type)]
  572. // CHECK:STDOUT: %.loc8_23.2: type = converted %T.ref, %T.as_type [symbolic = %T.binding.as_type (constants.%T.binding.as_type)]
  573. // CHECK:STDOUT: }
  574. // CHECK:STDOUT: %x: @Simple3.%T.binding.as_type (%T.binding.as_type) = value_binding x, %x.param
  575. // CHECK:STDOUT: }
  576. // CHECK:STDOUT: %Compound3.decl: %Compound3.type = fn_decl @Compound3 [concrete = constants.%Compound3] {
  577. // CHECK:STDOUT: %V.patt: %pattern_type.4d9 = symbolic_binding_pattern V, 0 [concrete]
  578. // CHECK:STDOUT: %y.patt: @Compound3.%pattern_type (%pattern_type.91df25.2) = value_binding_pattern y [concrete]
  579. // CHECK:STDOUT: %y.param_patt: @Compound3.%pattern_type (%pattern_type.91df25.2) = value_param_pattern %y.patt, call_param0 [concrete]
  580. // CHECK:STDOUT: } {
  581. // CHECK:STDOUT: %.loc14_18: type = splice_block %K2.ref.loc14 [concrete = constants.%K2.type] {
  582. // CHECK:STDOUT: %.Self: %type = symbolic_binding .Self [symbolic_self = constants.%.Self]
  583. // CHECK:STDOUT: %K2.ref.loc14: type = name_ref K2, file.%K2.decl [concrete = constants.%K2.type]
  584. // CHECK:STDOUT: }
  585. // CHECK:STDOUT: %V.loc14_14.2: %K2.type = symbolic_binding V, 0 [symbolic = %V.loc14_14.1 (constants.%V)]
  586. // CHECK:STDOUT: %y.param: @Compound3.%V.binding.as_type (%V.binding.as_type) = value_param call_param0
  587. // CHECK:STDOUT: %.loc14_25.1: type = splice_block %.loc14_25.2 [symbolic = %V.binding.as_type (constants.%V.binding.as_type)] {
  588. // CHECK:STDOUT: %V.ref: %K2.type = name_ref V, %V.loc14_14.2 [symbolic = %V.loc14_14.1 (constants.%V)]
  589. // CHECK:STDOUT: %V.as_type: type = facet_access_type %V.ref [symbolic = %V.binding.as_type (constants.%V.binding.as_type)]
  590. // CHECK:STDOUT: %.loc14_25.2: type = converted %V.ref, %V.as_type [symbolic = %V.binding.as_type (constants.%V.binding.as_type)]
  591. // CHECK:STDOUT: }
  592. // CHECK:STDOUT: %y: @Compound3.%V.binding.as_type (%V.binding.as_type) = value_binding y, %y.param
  593. // CHECK:STDOUT: }
  594. // CHECK:STDOUT: }
  595. // CHECK:STDOUT:
  596. // CHECK:STDOUT: interface @K2 {
  597. // CHECK:STDOUT: %Self: %K2.type = symbolic_binding Self, 0 [symbolic = constants.%Self.98c]
  598. // CHECK:STDOUT: %K2.Q2.decl: %K2.Q2.type = fn_decl @K2.Q2 [concrete = constants.%K2.Q2] {} {}
  599. // CHECK:STDOUT: %assoc0: %K2.assoc_type = assoc_entity element0, %K2.Q2.decl [concrete = constants.%assoc0.d67]
  600. // CHECK:STDOUT:
  601. // CHECK:STDOUT: !members:
  602. // CHECK:STDOUT: .Self = %Self
  603. // CHECK:STDOUT: .Q2 = %assoc0
  604. // CHECK:STDOUT: witness = (%K2.Q2.decl)
  605. // CHECK:STDOUT: }
  606. // CHECK:STDOUT:
  607. // CHECK:STDOUT: generic fn @K2.Q2(@K2.%Self: %K2.type) {
  608. // CHECK:STDOUT: fn();
  609. // CHECK:STDOUT: }
  610. // CHECK:STDOUT:
  611. // CHECK:STDOUT: generic fn @Simple3(%T.loc8_12.2: %K2.type) {
  612. // CHECK:STDOUT: %T.loc8_12.1: %K2.type = symbolic_binding T, 0 [symbolic = %T.loc8_12.1 (constants.%T)]
  613. // CHECK:STDOUT: %T.binding.as_type: type = symbolic_binding_type T, 0, %T.loc8_12.1 [symbolic = %T.binding.as_type (constants.%T.binding.as_type)]
  614. // CHECK:STDOUT: %pattern_type: type = pattern_type %T.binding.as_type [symbolic = %pattern_type (constants.%pattern_type.91df25.1)]
  615. // CHECK:STDOUT:
  616. // CHECK:STDOUT: !definition:
  617. // CHECK:STDOUT: %require_complete: <witness> = require_complete_type %T.binding.as_type [symbolic = %require_complete (constants.%require_complete.5fb80b.1)]
  618. // CHECK:STDOUT: %K2.lookup_impl_witness: <witness> = lookup_impl_witness %T.loc8_12.1, @K2 [symbolic = %K2.lookup_impl_witness (constants.%K2.lookup_impl_witness)]
  619. // CHECK:STDOUT: %.loc9_4: type = fn_type_with_self_type constants.%K2.Q2.type, %T.loc8_12.1 [symbolic = %.loc9_4 (constants.%.19f)]
  620. // CHECK:STDOUT: %impl.elem0.loc9_4.2: @Simple3.%.loc9_4 (%.19f) = impl_witness_access %K2.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc9_4.2 (constants.%impl.elem0)]
  621. // CHECK:STDOUT: %specific_impl_fn.loc9_4.2: <specific function> = specific_impl_function %impl.elem0.loc9_4.2, @K2.Q2(%T.loc8_12.1) [symbolic = %specific_impl_fn.loc9_4.2 (constants.%specific_impl_fn)]
  622. // CHECK:STDOUT:
  623. // CHECK:STDOUT: fn(%x.param: @Simple3.%T.binding.as_type (%T.binding.as_type)) {
  624. // CHECK:STDOUT: !entry:
  625. // CHECK:STDOUT: %x.ref: @Simple3.%T.binding.as_type (%T.binding.as_type) = name_ref x, %x
  626. // CHECK:STDOUT: %Q2.ref: %K2.assoc_type = name_ref Q2, @K2.%assoc0 [concrete = constants.%assoc0.d67]
  627. // CHECK:STDOUT: %impl.elem0.loc9_4.1: @Simple3.%.loc9_4 (%.19f) = impl_witness_access constants.%K2.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc9_4.2 (constants.%impl.elem0)]
  628. // CHECK:STDOUT: %specific_impl_fn.loc9_4.1: <specific function> = specific_impl_function %impl.elem0.loc9_4.1, @K2.Q2(constants.%T) [symbolic = %specific_impl_fn.loc9_4.2 (constants.%specific_impl_fn)]
  629. // CHECK:STDOUT: %.loc9_8: init %empty_tuple.type = call %specific_impl_fn.loc9_4.1()
  630. // CHECK:STDOUT: return
  631. // CHECK:STDOUT: }
  632. // CHECK:STDOUT: }
  633. // CHECK:STDOUT:
  634. // CHECK:STDOUT: generic fn @Compound3(%V.loc14_14.2: %K2.type) {
  635. // CHECK:STDOUT: %V.loc14_14.1: %K2.type = symbolic_binding V, 0 [symbolic = %V.loc14_14.1 (constants.%V)]
  636. // CHECK:STDOUT: %V.binding.as_type: type = symbolic_binding_type V, 0, %V.loc14_14.1 [symbolic = %V.binding.as_type (constants.%V.binding.as_type)]
  637. // CHECK:STDOUT: %pattern_type: type = pattern_type %V.binding.as_type [symbolic = %pattern_type (constants.%pattern_type.91df25.2)]
  638. // CHECK:STDOUT:
  639. // CHECK:STDOUT: !definition:
  640. // CHECK:STDOUT: %require_complete: <witness> = require_complete_type %V.binding.as_type [symbolic = %require_complete (constants.%require_complete.5fb80b.2)]
  641. // CHECK:STDOUT:
  642. // CHECK:STDOUT: fn(%y.param: @Compound3.%V.binding.as_type (%V.binding.as_type)) {
  643. // CHECK:STDOUT: !entry:
  644. // CHECK:STDOUT: %y.ref: @Compound3.%V.binding.as_type (%V.binding.as_type) = name_ref y, %y
  645. // CHECK:STDOUT: %K2.ref.loc22: type = name_ref K2, file.%K2.decl [concrete = constants.%K2.type]
  646. // CHECK:STDOUT: %Q2.ref: %K2.assoc_type = name_ref Q2, @K2.%assoc0 [concrete = constants.%assoc0.d67]
  647. // CHECK:STDOUT: %.loc22: %K2.type = converted %y.ref, <error> [concrete = <error>]
  648. // CHECK:STDOUT: return
  649. // CHECK:STDOUT: }
  650. // CHECK:STDOUT: }
  651. // CHECK:STDOUT:
  652. // CHECK:STDOUT: specific @K2.Q2(constants.%Self.98c) {}
  653. // CHECK:STDOUT:
  654. // CHECK:STDOUT: specific @Simple3(constants.%T) {
  655. // CHECK:STDOUT: %T.loc8_12.1 => constants.%T
  656. // CHECK:STDOUT: %T.binding.as_type => constants.%T.binding.as_type
  657. // CHECK:STDOUT: %pattern_type => constants.%pattern_type.91df25.1
  658. // CHECK:STDOUT: }
  659. // CHECK:STDOUT:
  660. // CHECK:STDOUT: specific @K2.Q2(constants.%T) {}
  661. // CHECK:STDOUT:
  662. // CHECK:STDOUT: specific @Compound3(constants.%V) {
  663. // CHECK:STDOUT: %V.loc14_14.1 => constants.%V
  664. // CHECK:STDOUT: %V.binding.as_type => constants.%V.binding.as_type
  665. // CHECK:STDOUT: %pattern_type => constants.%pattern_type.91df25.2
  666. // CHECK:STDOUT: }
  667. // CHECK:STDOUT:
  668. // CHECK:STDOUT: --- instance.carbon
  669. // CHECK:STDOUT:
  670. // CHECK:STDOUT: constants {
  671. // CHECK:STDOUT: %L1.type: type = facet_type <@L1> [concrete]
  672. // CHECK:STDOUT: %Self: %L1.type = symbolic_binding Self, 0 [symbolic]
  673. // CHECK:STDOUT: %Self.binding.as_type: type = symbolic_binding_type Self, 0, %Self [symbolic]
  674. // CHECK:STDOUT: %pattern_type.510a66.1: type = pattern_type %Self.binding.as_type [symbolic]
  675. // CHECK:STDOUT: %L1.R1.type: type = fn_type @L1.R1 [concrete]
  676. // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete]
  677. // CHECK:STDOUT: %L1.R1: %L1.R1.type = struct_value () [concrete]
  678. // CHECK:STDOUT: %L1.assoc_type: type = assoc_entity_type @L1 [concrete]
  679. // CHECK:STDOUT: %assoc0: %L1.assoc_type = assoc_entity element0, @L1.%L1.R1.decl [concrete]
  680. // CHECK:STDOUT: %L1.S1.type: type = fn_type @L1.S1 [concrete]
  681. // CHECK:STDOUT: %L1.S1: %L1.S1.type = struct_value () [concrete]
  682. // CHECK:STDOUT: %assoc1: %L1.assoc_type = assoc_entity element1, @L1.%L1.S1.decl [concrete]
  683. // CHECK:STDOUT: %type: type = facet_type <type> [concrete]
  684. // CHECK:STDOUT: %.Self: %type = symbolic_binding .Self [symbolic_self]
  685. // CHECK:STDOUT: %T: %L1.type = symbolic_binding T, 0 [symbolic]
  686. // CHECK:STDOUT: %pattern_type.e3e: type = pattern_type %L1.type [concrete]
  687. // CHECK:STDOUT: %T.binding.as_type: type = symbolic_binding_type T, 0, %T [symbolic]
  688. // CHECK:STDOUT: %pattern_type.510a66.2: type = pattern_type %T.binding.as_type [symbolic]
  689. // CHECK:STDOUT: %ptr.5db4e7.1: type = ptr_type %T.binding.as_type [symbolic]
  690. // CHECK:STDOUT: %pattern_type.f1f60b.1: type = pattern_type %ptr.5db4e7.1 [symbolic]
  691. // CHECK:STDOUT: %Simple4.type: type = fn_type @Simple4 [concrete]
  692. // CHECK:STDOUT: %Simple4: %Simple4.type = struct_value () [concrete]
  693. // CHECK:STDOUT: %require_complete.b98a62.1: <witness> = require_complete_type %T.binding.as_type [symbolic]
  694. // CHECK:STDOUT: %require_complete.80837b.1: <witness> = require_complete_type %ptr.5db4e7.1 [symbolic]
  695. // CHECK:STDOUT: %L1.lookup_impl_witness.497b38.1: <witness> = lookup_impl_witness %T, @L1 [symbolic]
  696. // CHECK:STDOUT: %.2c3978.1: type = fn_type_with_self_type %L1.R1.type, %T [symbolic]
  697. // CHECK:STDOUT: %impl.elem0.d3a613.1: %.2c3978.1 = impl_witness_access %L1.lookup_impl_witness.497b38.1, element0 [symbolic]
  698. // CHECK:STDOUT: %specific_impl_fn.f8ac37.1: <specific function> = specific_impl_function %impl.elem0.d3a613.1, @L1.R1(%T) [symbolic]
  699. // CHECK:STDOUT: %.45c8db.1: type = fn_type_with_self_type %L1.S1.type, %T [symbolic]
  700. // CHECK:STDOUT: %impl.elem1.c3a14a.1: %.45c8db.1 = impl_witness_access %L1.lookup_impl_witness.497b38.1, element1 [symbolic]
  701. // CHECK:STDOUT: %specific_impl_fn.c2ec1e.1: <specific function> = specific_impl_function %impl.elem1.c3a14a.1, @L1.S1(%T) [symbolic]
  702. // CHECK:STDOUT: %V: %L1.type = symbolic_binding V, 0 [symbolic]
  703. // CHECK:STDOUT: %V.binding.as_type: type = symbolic_binding_type V, 0, %V [symbolic]
  704. // CHECK:STDOUT: %pattern_type.510a66.3: type = pattern_type %V.binding.as_type [symbolic]
  705. // CHECK:STDOUT: %ptr.5db4e7.2: type = ptr_type %V.binding.as_type [symbolic]
  706. // CHECK:STDOUT: %pattern_type.f1f60b.2: type = pattern_type %ptr.5db4e7.2 [symbolic]
  707. // CHECK:STDOUT: %Compound4.type: type = fn_type @Compound4 [concrete]
  708. // CHECK:STDOUT: %Compound4: %Compound4.type = struct_value () [concrete]
  709. // CHECK:STDOUT: %require_complete.b98a62.2: <witness> = require_complete_type %V.binding.as_type [symbolic]
  710. // CHECK:STDOUT: %require_complete.80837b.2: <witness> = require_complete_type %ptr.5db4e7.2 [symbolic]
  711. // CHECK:STDOUT: %L1.lookup_impl_witness.497b38.2: <witness> = lookup_impl_witness %V, @L1 [symbolic]
  712. // CHECK:STDOUT: %.2c3978.2: type = fn_type_with_self_type %L1.R1.type, %V [symbolic]
  713. // CHECK:STDOUT: %impl.elem0.d3a613.2: %.2c3978.2 = impl_witness_access %L1.lookup_impl_witness.497b38.2, element0 [symbolic]
  714. // CHECK:STDOUT: %specific_impl_fn.f8ac37.2: <specific function> = specific_impl_function %impl.elem0.d3a613.2, @L1.R1(%V) [symbolic]
  715. // CHECK:STDOUT: %.45c8db.2: type = fn_type_with_self_type %L1.S1.type, %V [symbolic]
  716. // CHECK:STDOUT: %impl.elem1.c3a14a.2: %.45c8db.2 = impl_witness_access %L1.lookup_impl_witness.497b38.2, element1 [symbolic]
  717. // CHECK:STDOUT: %specific_impl_fn.c2ec1e.2: <specific function> = specific_impl_function %impl.elem1.c3a14a.2, @L1.S1(%V) [symbolic]
  718. // CHECK:STDOUT: }
  719. // CHECK:STDOUT:
  720. // CHECK:STDOUT: imports {
  721. // CHECK:STDOUT: %Core: <namespace> = namespace file.%Core.import, [concrete] {
  722. // CHECK:STDOUT: import Core//prelude
  723. // CHECK:STDOUT: import Core//prelude/...
  724. // CHECK:STDOUT: }
  725. // CHECK:STDOUT: }
  726. // CHECK:STDOUT:
  727. // CHECK:STDOUT: file {
  728. // CHECK:STDOUT: package: <namespace> = namespace [concrete] {
  729. // CHECK:STDOUT: .Core = imports.%Core
  730. // CHECK:STDOUT: .L1 = %L1.decl
  731. // CHECK:STDOUT: .Simple4 = %Simple4.decl
  732. // CHECK:STDOUT: .Compound4 = %Compound4.decl
  733. // CHECK:STDOUT: }
  734. // CHECK:STDOUT: %Core.import = import Core
  735. // CHECK:STDOUT: %L1.decl: type = interface_decl @L1 [concrete = constants.%L1.type] {} {}
  736. // CHECK:STDOUT: %Simple4.decl: %Simple4.type = fn_decl @Simple4 [concrete = constants.%Simple4] {
  737. // CHECK:STDOUT: %T.patt: %pattern_type.e3e = symbolic_binding_pattern T, 0 [concrete]
  738. // CHECK:STDOUT: %x.patt: @Simple4.%pattern_type.loc9_20 (%pattern_type.510a66.2) = value_binding_pattern x [concrete]
  739. // CHECK:STDOUT: %x.param_patt: @Simple4.%pattern_type.loc9_20 (%pattern_type.510a66.2) = value_param_pattern %x.patt, call_param0 [concrete]
  740. // CHECK:STDOUT: %p.patt: @Simple4.%pattern_type.loc9_26 (%pattern_type.f1f60b.1) = value_binding_pattern p [concrete]
  741. // CHECK:STDOUT: %p.param_patt: @Simple4.%pattern_type.loc9_26 (%pattern_type.f1f60b.1) = value_param_pattern %p.patt, call_param1 [concrete]
  742. // CHECK:STDOUT: } {
  743. // CHECK:STDOUT: %.loc9_16: type = splice_block %L1.ref [concrete = constants.%L1.type] {
  744. // CHECK:STDOUT: %.Self: %type = symbolic_binding .Self [symbolic_self = constants.%.Self]
  745. // CHECK:STDOUT: %L1.ref: type = name_ref L1, file.%L1.decl [concrete = constants.%L1.type]
  746. // CHECK:STDOUT: }
  747. // CHECK:STDOUT: %T.loc9_12.2: %L1.type = symbolic_binding T, 0 [symbolic = %T.loc9_12.1 (constants.%T)]
  748. // CHECK:STDOUT: %x.param: @Simple4.%T.binding.as_type (%T.binding.as_type) = value_param call_param0
  749. // CHECK:STDOUT: %.loc9_23.1: type = splice_block %.loc9_23.2 [symbolic = %T.binding.as_type (constants.%T.binding.as_type)] {
  750. // CHECK:STDOUT: %T.ref.loc9_23: %L1.type = name_ref T, %T.loc9_12.2 [symbolic = %T.loc9_12.1 (constants.%T)]
  751. // CHECK:STDOUT: %T.as_type.loc9_23: type = facet_access_type %T.ref.loc9_23 [symbolic = %T.binding.as_type (constants.%T.binding.as_type)]
  752. // CHECK:STDOUT: %.loc9_23.2: type = converted %T.ref.loc9_23, %T.as_type.loc9_23 [symbolic = %T.binding.as_type (constants.%T.binding.as_type)]
  753. // CHECK:STDOUT: }
  754. // CHECK:STDOUT: %x: @Simple4.%T.binding.as_type (%T.binding.as_type) = value_binding x, %x.param
  755. // CHECK:STDOUT: %p.param: @Simple4.%ptr.loc9_30.1 (%ptr.5db4e7.1) = value_param call_param1
  756. // CHECK:STDOUT: %.loc9_30.1: type = splice_block %ptr.loc9_30.2 [symbolic = %ptr.loc9_30.1 (constants.%ptr.5db4e7.1)] {
  757. // CHECK:STDOUT: %T.ref.loc9_29: %L1.type = name_ref T, %T.loc9_12.2 [symbolic = %T.loc9_12.1 (constants.%T)]
  758. // CHECK:STDOUT: %T.as_type.loc9_30: type = facet_access_type %T.ref.loc9_29 [symbolic = %T.binding.as_type (constants.%T.binding.as_type)]
  759. // CHECK:STDOUT: %.loc9_30.2: type = converted %T.ref.loc9_29, %T.as_type.loc9_30 [symbolic = %T.binding.as_type (constants.%T.binding.as_type)]
  760. // CHECK:STDOUT: %ptr.loc9_30.2: type = ptr_type %.loc9_30.2 [symbolic = %ptr.loc9_30.1 (constants.%ptr.5db4e7.1)]
  761. // CHECK:STDOUT: }
  762. // CHECK:STDOUT: %p: @Simple4.%ptr.loc9_30.1 (%ptr.5db4e7.1) = value_binding p, %p.param
  763. // CHECK:STDOUT: }
  764. // CHECK:STDOUT: %Compound4.decl: %Compound4.type = fn_decl @Compound4 [concrete = constants.%Compound4] {
  765. // CHECK:STDOUT: %V.patt: %pattern_type.e3e = symbolic_binding_pattern V, 0 [concrete]
  766. // CHECK:STDOUT: %y.patt: @Compound4.%pattern_type.loc15_22 (%pattern_type.510a66.3) = value_binding_pattern y [concrete]
  767. // CHECK:STDOUT: %y.param_patt: @Compound4.%pattern_type.loc15_22 (%pattern_type.510a66.3) = value_param_pattern %y.patt, call_param0 [concrete]
  768. // CHECK:STDOUT: %p.patt: @Compound4.%pattern_type.loc15_28 (%pattern_type.f1f60b.2) = value_binding_pattern p [concrete]
  769. // CHECK:STDOUT: %p.param_patt: @Compound4.%pattern_type.loc15_28 (%pattern_type.f1f60b.2) = value_param_pattern %p.patt, call_param1 [concrete]
  770. // CHECK:STDOUT: } {
  771. // CHECK:STDOUT: %.loc15_18: type = splice_block %L1.ref.loc15 [concrete = constants.%L1.type] {
  772. // CHECK:STDOUT: %.Self: %type = symbolic_binding .Self [symbolic_self = constants.%.Self]
  773. // CHECK:STDOUT: %L1.ref.loc15: type = name_ref L1, file.%L1.decl [concrete = constants.%L1.type]
  774. // CHECK:STDOUT: }
  775. // CHECK:STDOUT: %V.loc15_14.2: %L1.type = symbolic_binding V, 0 [symbolic = %V.loc15_14.1 (constants.%V)]
  776. // CHECK:STDOUT: %y.param: @Compound4.%V.binding.as_type (%V.binding.as_type) = value_param call_param0
  777. // CHECK:STDOUT: %.loc15_25.1: type = splice_block %.loc15_25.2 [symbolic = %V.binding.as_type (constants.%V.binding.as_type)] {
  778. // CHECK:STDOUT: %V.ref.loc15_25: %L1.type = name_ref V, %V.loc15_14.2 [symbolic = %V.loc15_14.1 (constants.%V)]
  779. // CHECK:STDOUT: %V.as_type.loc15_25: type = facet_access_type %V.ref.loc15_25 [symbolic = %V.binding.as_type (constants.%V.binding.as_type)]
  780. // CHECK:STDOUT: %.loc15_25.2: type = converted %V.ref.loc15_25, %V.as_type.loc15_25 [symbolic = %V.binding.as_type (constants.%V.binding.as_type)]
  781. // CHECK:STDOUT: }
  782. // CHECK:STDOUT: %y: @Compound4.%V.binding.as_type (%V.binding.as_type) = value_binding y, %y.param
  783. // CHECK:STDOUT: %p.param: @Compound4.%ptr.loc15_32.1 (%ptr.5db4e7.2) = value_param call_param1
  784. // CHECK:STDOUT: %.loc15_32.1: type = splice_block %ptr.loc15_32.2 [symbolic = %ptr.loc15_32.1 (constants.%ptr.5db4e7.2)] {
  785. // CHECK:STDOUT: %V.ref.loc15_31: %L1.type = name_ref V, %V.loc15_14.2 [symbolic = %V.loc15_14.1 (constants.%V)]
  786. // CHECK:STDOUT: %V.as_type.loc15_32: type = facet_access_type %V.ref.loc15_31 [symbolic = %V.binding.as_type (constants.%V.binding.as_type)]
  787. // CHECK:STDOUT: %.loc15_32.2: type = converted %V.ref.loc15_31, %V.as_type.loc15_32 [symbolic = %V.binding.as_type (constants.%V.binding.as_type)]
  788. // CHECK:STDOUT: %ptr.loc15_32.2: type = ptr_type %.loc15_32.2 [symbolic = %ptr.loc15_32.1 (constants.%ptr.5db4e7.2)]
  789. // CHECK:STDOUT: }
  790. // CHECK:STDOUT: %p: @Compound4.%ptr.loc15_32.1 (%ptr.5db4e7.2) = value_binding p, %p.param
  791. // CHECK:STDOUT: }
  792. // CHECK:STDOUT: }
  793. // CHECK:STDOUT:
  794. // CHECK:STDOUT: interface @L1 {
  795. // CHECK:STDOUT: %Self: %L1.type = symbolic_binding Self, 0 [symbolic = constants.%Self]
  796. // CHECK:STDOUT: %L1.R1.decl: %L1.R1.type = fn_decl @L1.R1 [concrete = constants.%L1.R1] {
  797. // CHECK:STDOUT: %self.patt: @L1.R1.%pattern_type (%pattern_type.510a66.1) = value_binding_pattern self [concrete]
  798. // CHECK:STDOUT: %self.param_patt: @L1.R1.%pattern_type (%pattern_type.510a66.1) = value_param_pattern %self.patt, call_param0 [concrete]
  799. // CHECK:STDOUT: } {
  800. // CHECK:STDOUT: %self.param: @L1.R1.%Self.binding.as_type (%Self.binding.as_type) = value_param call_param0
  801. // CHECK:STDOUT: %.loc4_15.1: type = splice_block %.loc4_15.2 [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)] {
  802. // CHECK:STDOUT: %Self.ref: %L1.type = name_ref Self, @L1.%Self [symbolic = %Self (constants.%Self)]
  803. // CHECK:STDOUT: %Self.as_type: type = facet_access_type %Self.ref [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)]
  804. // CHECK:STDOUT: %.loc4_15.2: type = converted %Self.ref, %Self.as_type [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)]
  805. // CHECK:STDOUT: }
  806. // CHECK:STDOUT: %self: @L1.R1.%Self.binding.as_type (%Self.binding.as_type) = value_binding self, %self.param
  807. // CHECK:STDOUT: }
  808. // CHECK:STDOUT: %assoc0: %L1.assoc_type = assoc_entity element0, %L1.R1.decl [concrete = constants.%assoc0]
  809. // CHECK:STDOUT: %L1.S1.decl: %L1.S1.type = fn_decl @L1.S1 [concrete = constants.%L1.S1] {
  810. // CHECK:STDOUT: %self.patt: @L1.S1.%pattern_type (%pattern_type.510a66.1) = ref_binding_pattern self [concrete]
  811. // CHECK:STDOUT: %self.param_patt: @L1.S1.%pattern_type (%pattern_type.510a66.1) = ref_param_pattern %self.patt, call_param0 [concrete]
  812. // CHECK:STDOUT: } {
  813. // CHECK:STDOUT: %self.param: ref @L1.S1.%Self.binding.as_type (%Self.binding.as_type) = ref_param call_param0
  814. // CHECK:STDOUT: %.loc5_19.1: type = splice_block %.loc5_19.2 [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)] {
  815. // CHECK:STDOUT: %Self.ref: %L1.type = name_ref Self, @L1.%Self [symbolic = %Self (constants.%Self)]
  816. // CHECK:STDOUT: %Self.as_type: type = facet_access_type %Self.ref [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)]
  817. // CHECK:STDOUT: %.loc5_19.2: type = converted %Self.ref, %Self.as_type [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)]
  818. // CHECK:STDOUT: }
  819. // CHECK:STDOUT: %self: ref @L1.S1.%Self.binding.as_type (%Self.binding.as_type) = ref_binding self, %self.param
  820. // CHECK:STDOUT: }
  821. // CHECK:STDOUT: %assoc1: %L1.assoc_type = assoc_entity element1, %L1.S1.decl [concrete = constants.%assoc1]
  822. // CHECK:STDOUT:
  823. // CHECK:STDOUT: !members:
  824. // CHECK:STDOUT: .Self = %Self
  825. // CHECK:STDOUT: .R1 = %assoc0
  826. // CHECK:STDOUT: .S1 = %assoc1
  827. // CHECK:STDOUT: witness = (%L1.R1.decl, %L1.S1.decl)
  828. // CHECK:STDOUT: }
  829. // CHECK:STDOUT:
  830. // CHECK:STDOUT: generic fn @L1.R1(@L1.%Self: %L1.type) {
  831. // CHECK:STDOUT: %Self: %L1.type = symbolic_binding Self, 0 [symbolic = %Self (constants.%Self)]
  832. // CHECK:STDOUT: %Self.binding.as_type: type = symbolic_binding_type Self, 0, %Self [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)]
  833. // CHECK:STDOUT: %pattern_type: type = pattern_type %Self.binding.as_type [symbolic = %pattern_type (constants.%pattern_type.510a66.1)]
  834. // CHECK:STDOUT:
  835. // CHECK:STDOUT: fn(%self.param: @L1.R1.%Self.binding.as_type (%Self.binding.as_type));
  836. // CHECK:STDOUT: }
  837. // CHECK:STDOUT:
  838. // CHECK:STDOUT: generic fn @L1.S1(@L1.%Self: %L1.type) {
  839. // CHECK:STDOUT: %Self: %L1.type = symbolic_binding Self, 0 [symbolic = %Self (constants.%Self)]
  840. // CHECK:STDOUT: %Self.binding.as_type: type = symbolic_binding_type Self, 0, %Self [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)]
  841. // CHECK:STDOUT: %pattern_type: type = pattern_type %Self.binding.as_type [symbolic = %pattern_type (constants.%pattern_type.510a66.1)]
  842. // CHECK:STDOUT:
  843. // CHECK:STDOUT: fn(%self.param: @L1.S1.%Self.binding.as_type (%Self.binding.as_type));
  844. // CHECK:STDOUT: }
  845. // CHECK:STDOUT:
  846. // CHECK:STDOUT: generic fn @Simple4(%T.loc9_12.2: %L1.type) {
  847. // CHECK:STDOUT: %T.loc9_12.1: %L1.type = symbolic_binding T, 0 [symbolic = %T.loc9_12.1 (constants.%T)]
  848. // CHECK:STDOUT: %T.binding.as_type: type = symbolic_binding_type T, 0, %T.loc9_12.1 [symbolic = %T.binding.as_type (constants.%T.binding.as_type)]
  849. // CHECK:STDOUT: %pattern_type.loc9_20: type = pattern_type %T.binding.as_type [symbolic = %pattern_type.loc9_20 (constants.%pattern_type.510a66.2)]
  850. // CHECK:STDOUT: %ptr.loc9_30.1: type = ptr_type %T.binding.as_type [symbolic = %ptr.loc9_30.1 (constants.%ptr.5db4e7.1)]
  851. // CHECK:STDOUT: %pattern_type.loc9_26: type = pattern_type %ptr.loc9_30.1 [symbolic = %pattern_type.loc9_26 (constants.%pattern_type.f1f60b.1)]
  852. // CHECK:STDOUT:
  853. // CHECK:STDOUT: !definition:
  854. // CHECK:STDOUT: %require_complete.loc9_21: <witness> = require_complete_type %T.binding.as_type [symbolic = %require_complete.loc9_21 (constants.%require_complete.b98a62.1)]
  855. // CHECK:STDOUT: %require_complete.loc9_27: <witness> = require_complete_type %ptr.loc9_30.1 [symbolic = %require_complete.loc9_27 (constants.%require_complete.80837b.1)]
  856. // CHECK:STDOUT: %L1.lookup_impl_witness: <witness> = lookup_impl_witness %T.loc9_12.1, @L1 [symbolic = %L1.lookup_impl_witness (constants.%L1.lookup_impl_witness.497b38.1)]
  857. // CHECK:STDOUT: %.loc10_4: type = fn_type_with_self_type constants.%L1.R1.type, %T.loc9_12.1 [symbolic = %.loc10_4 (constants.%.2c3978.1)]
  858. // CHECK:STDOUT: %impl.elem0.loc10_4.2: @Simple4.%.loc10_4 (%.2c3978.1) = impl_witness_access %L1.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc10_4.2 (constants.%impl.elem0.d3a613.1)]
  859. // CHECK:STDOUT: %specific_impl_fn.loc10_4.2: <specific function> = specific_impl_function %impl.elem0.loc10_4.2, @L1.R1(%T.loc9_12.1) [symbolic = %specific_impl_fn.loc10_4.2 (constants.%specific_impl_fn.f8ac37.1)]
  860. // CHECK:STDOUT: %.loc11_4.2: type = fn_type_with_self_type constants.%L1.S1.type, %T.loc9_12.1 [symbolic = %.loc11_4.2 (constants.%.45c8db.1)]
  861. // CHECK:STDOUT: %impl.elem1.loc11_4.2: @Simple4.%.loc11_4.2 (%.45c8db.1) = impl_witness_access %L1.lookup_impl_witness, element1 [symbolic = %impl.elem1.loc11_4.2 (constants.%impl.elem1.c3a14a.1)]
  862. // CHECK:STDOUT: %specific_impl_fn.loc11_4.2: <specific function> = specific_impl_function %impl.elem1.loc11_4.2, @L1.S1(%T.loc9_12.1) [symbolic = %specific_impl_fn.loc11_4.2 (constants.%specific_impl_fn.c2ec1e.1)]
  863. // CHECK:STDOUT:
  864. // CHECK:STDOUT: fn(%x.param: @Simple4.%T.binding.as_type (%T.binding.as_type), %p.param: @Simple4.%ptr.loc9_30.1 (%ptr.5db4e7.1)) {
  865. // CHECK:STDOUT: !entry:
  866. // CHECK:STDOUT: %x.ref: @Simple4.%T.binding.as_type (%T.binding.as_type) = name_ref x, %x
  867. // CHECK:STDOUT: %R1.ref: %L1.assoc_type = name_ref R1, @L1.%assoc0 [concrete = constants.%assoc0]
  868. // CHECK:STDOUT: %impl.elem0.loc10_4.1: @Simple4.%.loc10_4 (%.2c3978.1) = impl_witness_access constants.%L1.lookup_impl_witness.497b38.1, element0 [symbolic = %impl.elem0.loc10_4.2 (constants.%impl.elem0.d3a613.1)]
  869. // CHECK:STDOUT: %bound_method.loc10_4: <bound method> = bound_method %x.ref, %impl.elem0.loc10_4.1
  870. // CHECK:STDOUT: %specific_impl_fn.loc10_4.1: <specific function> = specific_impl_function %impl.elem0.loc10_4.1, @L1.R1(constants.%T) [symbolic = %specific_impl_fn.loc10_4.2 (constants.%specific_impl_fn.f8ac37.1)]
  871. // CHECK:STDOUT: %bound_method.loc10_8: <bound method> = bound_method %x.ref, %specific_impl_fn.loc10_4.1
  872. // CHECK:STDOUT: %.loc10_8: init %empty_tuple.type = call %bound_method.loc10_8(%x.ref)
  873. // CHECK:STDOUT: %p.ref: @Simple4.%ptr.loc9_30.1 (%ptr.5db4e7.1) = name_ref p, %p
  874. // CHECK:STDOUT: %.loc11_4.1: ref @Simple4.%T.binding.as_type (%T.binding.as_type) = deref %p.ref
  875. // CHECK:STDOUT: %S1.ref: %L1.assoc_type = name_ref S1, @L1.%assoc1 [concrete = constants.%assoc1]
  876. // CHECK:STDOUT: %impl.elem1.loc11_4.1: @Simple4.%.loc11_4.2 (%.45c8db.1) = impl_witness_access constants.%L1.lookup_impl_witness.497b38.1, element1 [symbolic = %impl.elem1.loc11_4.2 (constants.%impl.elem1.c3a14a.1)]
  877. // CHECK:STDOUT: %bound_method.loc11_4: <bound method> = bound_method %.loc11_4.1, %impl.elem1.loc11_4.1
  878. // CHECK:STDOUT: %specific_impl_fn.loc11_4.1: <specific function> = specific_impl_function %impl.elem1.loc11_4.1, @L1.S1(constants.%T) [symbolic = %specific_impl_fn.loc11_4.2 (constants.%specific_impl_fn.c2ec1e.1)]
  879. // CHECK:STDOUT: %bound_method.loc11_9: <bound method> = bound_method %.loc11_4.1, %specific_impl_fn.loc11_4.1
  880. // CHECK:STDOUT: %.loc11_9: init %empty_tuple.type = call %bound_method.loc11_9(%.loc11_4.1)
  881. // CHECK:STDOUT: return
  882. // CHECK:STDOUT: }
  883. // CHECK:STDOUT: }
  884. // CHECK:STDOUT:
  885. // CHECK:STDOUT: generic fn @Compound4(%V.loc15_14.2: %L1.type) {
  886. // CHECK:STDOUT: %V.loc15_14.1: %L1.type = symbolic_binding V, 0 [symbolic = %V.loc15_14.1 (constants.%V)]
  887. // CHECK:STDOUT: %V.binding.as_type: type = symbolic_binding_type V, 0, %V.loc15_14.1 [symbolic = %V.binding.as_type (constants.%V.binding.as_type)]
  888. // CHECK:STDOUT: %pattern_type.loc15_22: type = pattern_type %V.binding.as_type [symbolic = %pattern_type.loc15_22 (constants.%pattern_type.510a66.3)]
  889. // CHECK:STDOUT: %ptr.loc15_32.1: type = ptr_type %V.binding.as_type [symbolic = %ptr.loc15_32.1 (constants.%ptr.5db4e7.2)]
  890. // CHECK:STDOUT: %pattern_type.loc15_28: type = pattern_type %ptr.loc15_32.1 [symbolic = %pattern_type.loc15_28 (constants.%pattern_type.f1f60b.2)]
  891. // CHECK:STDOUT:
  892. // CHECK:STDOUT: !definition:
  893. // CHECK:STDOUT: %require_complete.loc15_23: <witness> = require_complete_type %V.binding.as_type [symbolic = %require_complete.loc15_23 (constants.%require_complete.b98a62.2)]
  894. // CHECK:STDOUT: %require_complete.loc15_29: <witness> = require_complete_type %ptr.loc15_32.1 [symbolic = %require_complete.loc15_29 (constants.%require_complete.80837b.2)]
  895. // CHECK:STDOUT: %L1.lookup_impl_witness: <witness> = lookup_impl_witness %V.loc15_14.1, @L1 [symbolic = %L1.lookup_impl_witness (constants.%L1.lookup_impl_witness.497b38.2)]
  896. // CHECK:STDOUT: %.loc16_4: type = fn_type_with_self_type constants.%L1.R1.type, %V.loc15_14.1 [symbolic = %.loc16_4 (constants.%.2c3978.2)]
  897. // CHECK:STDOUT: %impl.elem0.loc16_4.2: @Compound4.%.loc16_4 (%.2c3978.2) = impl_witness_access %L1.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc16_4.2 (constants.%impl.elem0.d3a613.2)]
  898. // CHECK:STDOUT: %specific_impl_fn.loc16_4.2: <specific function> = specific_impl_function %impl.elem0.loc16_4.2, @L1.R1(%V.loc15_14.1) [symbolic = %specific_impl_fn.loc16_4.2 (constants.%specific_impl_fn.f8ac37.2)]
  899. // CHECK:STDOUT: %.loc17_4.2: type = fn_type_with_self_type constants.%L1.S1.type, %V.loc15_14.1 [symbolic = %.loc17_4.2 (constants.%.45c8db.2)]
  900. // CHECK:STDOUT: %impl.elem1.loc17_4.2: @Compound4.%.loc17_4.2 (%.45c8db.2) = impl_witness_access %L1.lookup_impl_witness, element1 [symbolic = %impl.elem1.loc17_4.2 (constants.%impl.elem1.c3a14a.2)]
  901. // CHECK:STDOUT: %specific_impl_fn.loc17_4.2: <specific function> = specific_impl_function %impl.elem1.loc17_4.2, @L1.S1(%V.loc15_14.1) [symbolic = %specific_impl_fn.loc17_4.2 (constants.%specific_impl_fn.c2ec1e.2)]
  902. // CHECK:STDOUT:
  903. // CHECK:STDOUT: fn(%y.param: @Compound4.%V.binding.as_type (%V.binding.as_type), %p.param: @Compound4.%ptr.loc15_32.1 (%ptr.5db4e7.2)) {
  904. // CHECK:STDOUT: !entry:
  905. // CHECK:STDOUT: %y.ref: @Compound4.%V.binding.as_type (%V.binding.as_type) = name_ref y, %y
  906. // CHECK:STDOUT: %L1.ref.loc16: type = name_ref L1, file.%L1.decl [concrete = constants.%L1.type]
  907. // CHECK:STDOUT: %R1.ref: %L1.assoc_type = name_ref R1, @L1.%assoc0 [concrete = constants.%assoc0]
  908. // CHECK:STDOUT: %impl.elem0.loc16_4.1: @Compound4.%.loc16_4 (%.2c3978.2) = impl_witness_access constants.%L1.lookup_impl_witness.497b38.2, element0 [symbolic = %impl.elem0.loc16_4.2 (constants.%impl.elem0.d3a613.2)]
  909. // CHECK:STDOUT: %bound_method.loc16_4: <bound method> = bound_method %y.ref, %impl.elem0.loc16_4.1
  910. // CHECK:STDOUT: %specific_impl_fn.loc16_4.1: <specific function> = specific_impl_function %impl.elem0.loc16_4.1, @L1.R1(constants.%V) [symbolic = %specific_impl_fn.loc16_4.2 (constants.%specific_impl_fn.f8ac37.2)]
  911. // CHECK:STDOUT: %bound_method.loc16_13: <bound method> = bound_method %y.ref, %specific_impl_fn.loc16_4.1
  912. // CHECK:STDOUT: %.loc16_13: init %empty_tuple.type = call %bound_method.loc16_13(%y.ref)
  913. // CHECK:STDOUT: %p.ref: @Compound4.%ptr.loc15_32.1 (%ptr.5db4e7.2) = name_ref p, %p
  914. // CHECK:STDOUT: %L1.ref.loc17: type = name_ref L1, file.%L1.decl [concrete = constants.%L1.type]
  915. // CHECK:STDOUT: %S1.ref: %L1.assoc_type = name_ref S1, @L1.%assoc1 [concrete = constants.%assoc1]
  916. // CHECK:STDOUT: %.loc17_4.1: ref @Compound4.%V.binding.as_type (%V.binding.as_type) = deref %p.ref
  917. // CHECK:STDOUT: %impl.elem1.loc17_4.1: @Compound4.%.loc17_4.2 (%.45c8db.2) = impl_witness_access constants.%L1.lookup_impl_witness.497b38.2, element1 [symbolic = %impl.elem1.loc17_4.2 (constants.%impl.elem1.c3a14a.2)]
  918. // CHECK:STDOUT: %bound_method.loc17_4: <bound method> = bound_method %.loc17_4.1, %impl.elem1.loc17_4.1
  919. // CHECK:STDOUT: %specific_impl_fn.loc17_4.1: <specific function> = specific_impl_function %impl.elem1.loc17_4.1, @L1.S1(constants.%V) [symbolic = %specific_impl_fn.loc17_4.2 (constants.%specific_impl_fn.c2ec1e.2)]
  920. // CHECK:STDOUT: %bound_method.loc17_14: <bound method> = bound_method %.loc17_4.1, %specific_impl_fn.loc17_4.1
  921. // CHECK:STDOUT: %.loc17_14: init %empty_tuple.type = call %bound_method.loc17_14(%.loc17_4.1)
  922. // CHECK:STDOUT: return
  923. // CHECK:STDOUT: }
  924. // CHECK:STDOUT: }
  925. // CHECK:STDOUT:
  926. // CHECK:STDOUT: specific @L1.R1(constants.%Self) {
  927. // CHECK:STDOUT: %Self => constants.%Self
  928. // CHECK:STDOUT: %Self.binding.as_type => constants.%Self.binding.as_type
  929. // CHECK:STDOUT: %pattern_type => constants.%pattern_type.510a66.1
  930. // CHECK:STDOUT: }
  931. // CHECK:STDOUT:
  932. // CHECK:STDOUT: specific @L1.S1(constants.%Self) {
  933. // CHECK:STDOUT: %Self => constants.%Self
  934. // CHECK:STDOUT: %Self.binding.as_type => constants.%Self.binding.as_type
  935. // CHECK:STDOUT: %pattern_type => constants.%pattern_type.510a66.1
  936. // CHECK:STDOUT: }
  937. // CHECK:STDOUT:
  938. // CHECK:STDOUT: specific @Simple4(constants.%T) {
  939. // CHECK:STDOUT: %T.loc9_12.1 => constants.%T
  940. // CHECK:STDOUT: %T.binding.as_type => constants.%T.binding.as_type
  941. // CHECK:STDOUT: %pattern_type.loc9_20 => constants.%pattern_type.510a66.2
  942. // CHECK:STDOUT: %ptr.loc9_30.1 => constants.%ptr.5db4e7.1
  943. // CHECK:STDOUT: %pattern_type.loc9_26 => constants.%pattern_type.f1f60b.1
  944. // CHECK:STDOUT: }
  945. // CHECK:STDOUT:
  946. // CHECK:STDOUT: specific @L1.R1(constants.%T) {
  947. // CHECK:STDOUT: %Self => constants.%T
  948. // CHECK:STDOUT: %Self.binding.as_type => constants.%T.binding.as_type
  949. // CHECK:STDOUT: %pattern_type => constants.%pattern_type.510a66.2
  950. // CHECK:STDOUT: }
  951. // CHECK:STDOUT:
  952. // CHECK:STDOUT: specific @L1.S1(constants.%T) {
  953. // CHECK:STDOUT: %Self => constants.%T
  954. // CHECK:STDOUT: %Self.binding.as_type => constants.%T.binding.as_type
  955. // CHECK:STDOUT: %pattern_type => constants.%pattern_type.510a66.2
  956. // CHECK:STDOUT: }
  957. // CHECK:STDOUT:
  958. // CHECK:STDOUT: specific @Compound4(constants.%V) {
  959. // CHECK:STDOUT: %V.loc15_14.1 => constants.%V
  960. // CHECK:STDOUT: %V.binding.as_type => constants.%V.binding.as_type
  961. // CHECK:STDOUT: %pattern_type.loc15_22 => constants.%pattern_type.510a66.3
  962. // CHECK:STDOUT: %ptr.loc15_32.1 => constants.%ptr.5db4e7.2
  963. // CHECK:STDOUT: %pattern_type.loc15_28 => constants.%pattern_type.f1f60b.2
  964. // CHECK:STDOUT: }
  965. // CHECK:STDOUT:
  966. // CHECK:STDOUT: specific @L1.R1(constants.%V) {
  967. // CHECK:STDOUT: %Self => constants.%V
  968. // CHECK:STDOUT: %Self.binding.as_type => constants.%V.binding.as_type
  969. // CHECK:STDOUT: %pattern_type => constants.%pattern_type.510a66.3
  970. // CHECK:STDOUT: }
  971. // CHECK:STDOUT:
  972. // CHECK:STDOUT: specific @L1.S1(constants.%V) {
  973. // CHECK:STDOUT: %Self => constants.%V
  974. // CHECK:STDOUT: %Self.binding.as_type => constants.%V.binding.as_type
  975. // CHECK:STDOUT: %pattern_type => constants.%pattern_type.510a66.3
  976. // CHECK:STDOUT: }
  977. // CHECK:STDOUT:
  978. // CHECK:STDOUT: --- instance_addr.carbon
  979. // CHECK:STDOUT:
  980. // CHECK:STDOUT: constants {
  981. // CHECK:STDOUT: %L1.type: type = facet_type <@L1> [concrete]
  982. // CHECK:STDOUT: %Self: %L1.type = symbolic_binding Self, 0 [symbolic]
  983. // CHECK:STDOUT: %Self.binding.as_type: type = symbolic_binding_type Self, 0, %Self [symbolic]
  984. // CHECK:STDOUT: %pattern_type.510a66.1: type = pattern_type %Self.binding.as_type [symbolic]
  985. // CHECK:STDOUT: %L1.R1.type: type = fn_type @L1.R1 [concrete]
  986. // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete]
  987. // CHECK:STDOUT: %L1.R1: %L1.R1.type = struct_value () [concrete]
  988. // CHECK:STDOUT: %L1.assoc_type: type = assoc_entity_type @L1 [concrete]
  989. // CHECK:STDOUT: %assoc0: %L1.assoc_type = assoc_entity element0, @L1.%L1.R1.decl [concrete]
  990. // CHECK:STDOUT: %ptr.5db4e7.1: type = ptr_type %Self.binding.as_type [symbolic]
  991. // CHECK:STDOUT: %pattern_type.f1f60b.1: type = pattern_type %ptr.5db4e7.1 [symbolic]
  992. // CHECK:STDOUT: %pattern_type.f6d: type = pattern_type auto [concrete]
  993. // CHECK:STDOUT: %L1.S1.type: type = fn_type @L1.S1 [concrete]
  994. // CHECK:STDOUT: %L1.S1: %L1.S1.type = struct_value () [concrete]
  995. // CHECK:STDOUT: %assoc1: %L1.assoc_type = assoc_entity element1, @L1.%L1.S1.decl [concrete]
  996. // CHECK:STDOUT: %type: type = facet_type <type> [concrete]
  997. // CHECK:STDOUT: %.Self: %type = symbolic_binding .Self [symbolic_self]
  998. // CHECK:STDOUT: %T: %L1.type = symbolic_binding T, 0 [symbolic]
  999. // CHECK:STDOUT: %pattern_type.e3e: type = pattern_type %L1.type [concrete]
  1000. // CHECK:STDOUT: %T.binding.as_type: type = symbolic_binding_type T, 0, %T [symbolic]
  1001. // CHECK:STDOUT: %pattern_type.510a66.2: type = pattern_type %T.binding.as_type [symbolic]
  1002. // CHECK:STDOUT: %ptr.5db4e7.2: type = ptr_type %T.binding.as_type [symbolic]
  1003. // CHECK:STDOUT: %pattern_type.f1f60b.2: type = pattern_type %ptr.5db4e7.2 [symbolic]
  1004. // CHECK:STDOUT: %Simple4.type: type = fn_type @Simple4 [concrete]
  1005. // CHECK:STDOUT: %Simple4: %Simple4.type = struct_value () [concrete]
  1006. // CHECK:STDOUT: %require_complete.b98a62.1: <witness> = require_complete_type %T.binding.as_type [symbolic]
  1007. // CHECK:STDOUT: %require_complete.80837b.1: <witness> = require_complete_type %ptr.5db4e7.2 [symbolic]
  1008. // CHECK:STDOUT: %L1.lookup_impl_witness.497b38.1: <witness> = lookup_impl_witness %T, @L1 [symbolic]
  1009. // CHECK:STDOUT: %.2c3978.1: type = fn_type_with_self_type %L1.R1.type, %T [symbolic]
  1010. // CHECK:STDOUT: %impl.elem0.d3a613.1: %.2c3978.1 = impl_witness_access %L1.lookup_impl_witness.497b38.1, element0 [symbolic]
  1011. // CHECK:STDOUT: %specific_impl_fn.f8ac37.1: <specific function> = specific_impl_function %impl.elem0.d3a613.1, @L1.R1(%T) [symbolic]
  1012. // CHECK:STDOUT: %.45c8db.1: type = fn_type_with_self_type %L1.S1.type, %T [symbolic]
  1013. // CHECK:STDOUT: %impl.elem1.c3a14a.1: %.45c8db.1 = impl_witness_access %L1.lookup_impl_witness.497b38.1, element1 [symbolic]
  1014. // CHECK:STDOUT: %specific_impl_fn.c2ec1e.1: <specific function> = specific_impl_function %impl.elem1.c3a14a.1, @L1.S1(%T) [symbolic]
  1015. // CHECK:STDOUT: %V: %L1.type = symbolic_binding V, 0 [symbolic]
  1016. // CHECK:STDOUT: %V.binding.as_type: type = symbolic_binding_type V, 0, %V [symbolic]
  1017. // CHECK:STDOUT: %pattern_type.510a66.3: type = pattern_type %V.binding.as_type [symbolic]
  1018. // CHECK:STDOUT: %ptr.5db4e7.3: type = ptr_type %V.binding.as_type [symbolic]
  1019. // CHECK:STDOUT: %pattern_type.f1f60b.3: type = pattern_type %ptr.5db4e7.3 [symbolic]
  1020. // CHECK:STDOUT: %Compound4.type: type = fn_type @Compound4 [concrete]
  1021. // CHECK:STDOUT: %Compound4: %Compound4.type = struct_value () [concrete]
  1022. // CHECK:STDOUT: %require_complete.b98a62.2: <witness> = require_complete_type %V.binding.as_type [symbolic]
  1023. // CHECK:STDOUT: %require_complete.80837b.2: <witness> = require_complete_type %ptr.5db4e7.3 [symbolic]
  1024. // CHECK:STDOUT: %L1.lookup_impl_witness.497b38.2: <witness> = lookup_impl_witness %V, @L1 [symbolic]
  1025. // CHECK:STDOUT: %.2c3978.2: type = fn_type_with_self_type %L1.R1.type, %V [symbolic]
  1026. // CHECK:STDOUT: %impl.elem0.d3a613.2: %.2c3978.2 = impl_witness_access %L1.lookup_impl_witness.497b38.2, element0 [symbolic]
  1027. // CHECK:STDOUT: %specific_impl_fn.f8ac37.2: <specific function> = specific_impl_function %impl.elem0.d3a613.2, @L1.R1(%V) [symbolic]
  1028. // CHECK:STDOUT: %.45c8db.2: type = fn_type_with_self_type %L1.S1.type, %V [symbolic]
  1029. // CHECK:STDOUT: %impl.elem1.c3a14a.2: %.45c8db.2 = impl_witness_access %L1.lookup_impl_witness.497b38.2, element1 [symbolic]
  1030. // CHECK:STDOUT: %specific_impl_fn.c2ec1e.2: <specific function> = specific_impl_function %impl.elem1.c3a14a.2, @L1.S1(%V) [symbolic]
  1031. // CHECK:STDOUT: }
  1032. // CHECK:STDOUT:
  1033. // CHECK:STDOUT: imports {
  1034. // CHECK:STDOUT: %Core: <namespace> = namespace file.%Core.import, [concrete] {
  1035. // CHECK:STDOUT: import Core//prelude
  1036. // CHECK:STDOUT: import Core//prelude/...
  1037. // CHECK:STDOUT: }
  1038. // CHECK:STDOUT: }
  1039. // CHECK:STDOUT:
  1040. // CHECK:STDOUT: file {
  1041. // CHECK:STDOUT: package: <namespace> = namespace [concrete] {
  1042. // CHECK:STDOUT: .Core = imports.%Core
  1043. // CHECK:STDOUT: .L1 = %L1.decl
  1044. // CHECK:STDOUT: .Simple4 = %Simple4.decl
  1045. // CHECK:STDOUT: .Compound4 = %Compound4.decl
  1046. // CHECK:STDOUT: }
  1047. // CHECK:STDOUT: %Core.import = import Core
  1048. // CHECK:STDOUT: %L1.decl: type = interface_decl @L1 [concrete = constants.%L1.type] {} {}
  1049. // CHECK:STDOUT: %Simple4.decl: %Simple4.type = fn_decl @Simple4 [concrete = constants.%Simple4] {
  1050. // CHECK:STDOUT: %T.patt: %pattern_type.e3e = symbolic_binding_pattern T, 0 [concrete]
  1051. // CHECK:STDOUT: %x.patt: @Simple4.%pattern_type.loc9_20 (%pattern_type.510a66.2) = value_binding_pattern x [concrete]
  1052. // CHECK:STDOUT: %x.param_patt: @Simple4.%pattern_type.loc9_20 (%pattern_type.510a66.2) = value_param_pattern %x.patt, call_param0 [concrete]
  1053. // CHECK:STDOUT: %p.patt: @Simple4.%pattern_type.loc9_26 (%pattern_type.f1f60b.2) = value_binding_pattern p [concrete]
  1054. // CHECK:STDOUT: %p.param_patt: @Simple4.%pattern_type.loc9_26 (%pattern_type.f1f60b.2) = value_param_pattern %p.patt, call_param1 [concrete]
  1055. // CHECK:STDOUT: } {
  1056. // CHECK:STDOUT: %.loc9_16: type = splice_block %L1.ref [concrete = constants.%L1.type] {
  1057. // CHECK:STDOUT: %.Self: %type = symbolic_binding .Self [symbolic_self = constants.%.Self]
  1058. // CHECK:STDOUT: %L1.ref: type = name_ref L1, file.%L1.decl [concrete = constants.%L1.type]
  1059. // CHECK:STDOUT: }
  1060. // CHECK:STDOUT: %T.loc9_12.2: %L1.type = symbolic_binding T, 0 [symbolic = %T.loc9_12.1 (constants.%T)]
  1061. // CHECK:STDOUT: %x.param: @Simple4.%T.binding.as_type (%T.binding.as_type) = value_param call_param0
  1062. // CHECK:STDOUT: %.loc9_23.1: type = splice_block %.loc9_23.2 [symbolic = %T.binding.as_type (constants.%T.binding.as_type)] {
  1063. // CHECK:STDOUT: %T.ref.loc9_23: %L1.type = name_ref T, %T.loc9_12.2 [symbolic = %T.loc9_12.1 (constants.%T)]
  1064. // CHECK:STDOUT: %T.as_type.loc9_23: type = facet_access_type %T.ref.loc9_23 [symbolic = %T.binding.as_type (constants.%T.binding.as_type)]
  1065. // CHECK:STDOUT: %.loc9_23.2: type = converted %T.ref.loc9_23, %T.as_type.loc9_23 [symbolic = %T.binding.as_type (constants.%T.binding.as_type)]
  1066. // CHECK:STDOUT: }
  1067. // CHECK:STDOUT: %x: @Simple4.%T.binding.as_type (%T.binding.as_type) = value_binding x, %x.param
  1068. // CHECK:STDOUT: %p.param: @Simple4.%ptr.loc9_30.1 (%ptr.5db4e7.2) = value_param call_param1
  1069. // CHECK:STDOUT: %.loc9_30.1: type = splice_block %ptr.loc9_30.2 [symbolic = %ptr.loc9_30.1 (constants.%ptr.5db4e7.2)] {
  1070. // CHECK:STDOUT: %T.ref.loc9_29: %L1.type = name_ref T, %T.loc9_12.2 [symbolic = %T.loc9_12.1 (constants.%T)]
  1071. // CHECK:STDOUT: %T.as_type.loc9_30: type = facet_access_type %T.ref.loc9_29 [symbolic = %T.binding.as_type (constants.%T.binding.as_type)]
  1072. // CHECK:STDOUT: %.loc9_30.2: type = converted %T.ref.loc9_29, %T.as_type.loc9_30 [symbolic = %T.binding.as_type (constants.%T.binding.as_type)]
  1073. // CHECK:STDOUT: %ptr.loc9_30.2: type = ptr_type %.loc9_30.2 [symbolic = %ptr.loc9_30.1 (constants.%ptr.5db4e7.2)]
  1074. // CHECK:STDOUT: }
  1075. // CHECK:STDOUT: %p: @Simple4.%ptr.loc9_30.1 (%ptr.5db4e7.2) = value_binding p, %p.param
  1076. // CHECK:STDOUT: }
  1077. // CHECK:STDOUT: %Compound4.decl: %Compound4.type = fn_decl @Compound4 [concrete = constants.%Compound4] {
  1078. // CHECK:STDOUT: %V.patt: %pattern_type.e3e = symbolic_binding_pattern V, 0 [concrete]
  1079. // CHECK:STDOUT: %y.patt: @Compound4.%pattern_type.loc15_22 (%pattern_type.510a66.3) = value_binding_pattern y [concrete]
  1080. // CHECK:STDOUT: %y.param_patt: @Compound4.%pattern_type.loc15_22 (%pattern_type.510a66.3) = value_param_pattern %y.patt, call_param0 [concrete]
  1081. // CHECK:STDOUT: %p.patt: @Compound4.%pattern_type.loc15_28 (%pattern_type.f1f60b.3) = value_binding_pattern p [concrete]
  1082. // CHECK:STDOUT: %p.param_patt: @Compound4.%pattern_type.loc15_28 (%pattern_type.f1f60b.3) = value_param_pattern %p.patt, call_param1 [concrete]
  1083. // CHECK:STDOUT: } {
  1084. // CHECK:STDOUT: %.loc15_18: type = splice_block %L1.ref.loc15 [concrete = constants.%L1.type] {
  1085. // CHECK:STDOUT: %.Self: %type = symbolic_binding .Self [symbolic_self = constants.%.Self]
  1086. // CHECK:STDOUT: %L1.ref.loc15: type = name_ref L1, file.%L1.decl [concrete = constants.%L1.type]
  1087. // CHECK:STDOUT: }
  1088. // CHECK:STDOUT: %V.loc15_14.2: %L1.type = symbolic_binding V, 0 [symbolic = %V.loc15_14.1 (constants.%V)]
  1089. // CHECK:STDOUT: %y.param: @Compound4.%V.binding.as_type (%V.binding.as_type) = value_param call_param0
  1090. // CHECK:STDOUT: %.loc15_25.1: type = splice_block %.loc15_25.2 [symbolic = %V.binding.as_type (constants.%V.binding.as_type)] {
  1091. // CHECK:STDOUT: %V.ref.loc15_25: %L1.type = name_ref V, %V.loc15_14.2 [symbolic = %V.loc15_14.1 (constants.%V)]
  1092. // CHECK:STDOUT: %V.as_type.loc15_25: type = facet_access_type %V.ref.loc15_25 [symbolic = %V.binding.as_type (constants.%V.binding.as_type)]
  1093. // CHECK:STDOUT: %.loc15_25.2: type = converted %V.ref.loc15_25, %V.as_type.loc15_25 [symbolic = %V.binding.as_type (constants.%V.binding.as_type)]
  1094. // CHECK:STDOUT: }
  1095. // CHECK:STDOUT: %y: @Compound4.%V.binding.as_type (%V.binding.as_type) = value_binding y, %y.param
  1096. // CHECK:STDOUT: %p.param: @Compound4.%ptr.loc15_32.1 (%ptr.5db4e7.3) = value_param call_param1
  1097. // CHECK:STDOUT: %.loc15_32.1: type = splice_block %ptr.loc15_32.2 [symbolic = %ptr.loc15_32.1 (constants.%ptr.5db4e7.3)] {
  1098. // CHECK:STDOUT: %V.ref.loc15_31: %L1.type = name_ref V, %V.loc15_14.2 [symbolic = %V.loc15_14.1 (constants.%V)]
  1099. // CHECK:STDOUT: %V.as_type.loc15_32: type = facet_access_type %V.ref.loc15_31 [symbolic = %V.binding.as_type (constants.%V.binding.as_type)]
  1100. // CHECK:STDOUT: %.loc15_32.2: type = converted %V.ref.loc15_31, %V.as_type.loc15_32 [symbolic = %V.binding.as_type (constants.%V.binding.as_type)]
  1101. // CHECK:STDOUT: %ptr.loc15_32.2: type = ptr_type %.loc15_32.2 [symbolic = %ptr.loc15_32.1 (constants.%ptr.5db4e7.3)]
  1102. // CHECK:STDOUT: }
  1103. // CHECK:STDOUT: %p: @Compound4.%ptr.loc15_32.1 (%ptr.5db4e7.3) = value_binding p, %p.param
  1104. // CHECK:STDOUT: }
  1105. // CHECK:STDOUT: }
  1106. // CHECK:STDOUT:
  1107. // CHECK:STDOUT: interface @L1 {
  1108. // CHECK:STDOUT: %Self: %L1.type = symbolic_binding Self, 0 [symbolic = constants.%Self]
  1109. // CHECK:STDOUT: %L1.R1.decl: %L1.R1.type = fn_decl @L1.R1 [concrete = constants.%L1.R1] {
  1110. // CHECK:STDOUT: %self.patt: @L1.R1.%pattern_type (%pattern_type.510a66.1) = value_binding_pattern self [concrete]
  1111. // CHECK:STDOUT: %self.param_patt: @L1.R1.%pattern_type (%pattern_type.510a66.1) = value_param_pattern %self.patt, call_param0 [concrete]
  1112. // CHECK:STDOUT: } {
  1113. // CHECK:STDOUT: %self.param: @L1.R1.%Self.binding.as_type (%Self.binding.as_type) = value_param call_param0
  1114. // CHECK:STDOUT: %.loc4_15.1: type = splice_block %.loc4_15.2 [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)] {
  1115. // CHECK:STDOUT: %Self.ref: %L1.type = name_ref Self, @L1.%Self [symbolic = %Self (constants.%Self)]
  1116. // CHECK:STDOUT: %Self.as_type: type = facet_access_type %Self.ref [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)]
  1117. // CHECK:STDOUT: %.loc4_15.2: type = converted %Self.ref, %Self.as_type [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)]
  1118. // CHECK:STDOUT: }
  1119. // CHECK:STDOUT: %self: @L1.R1.%Self.binding.as_type (%Self.binding.as_type) = value_binding self, %self.param
  1120. // CHECK:STDOUT: }
  1121. // CHECK:STDOUT: %assoc0: %L1.assoc_type = assoc_entity element0, %L1.R1.decl [concrete = constants.%assoc0]
  1122. // CHECK:STDOUT: %L1.S1.decl: %L1.S1.type = fn_decl @L1.S1 [concrete = constants.%L1.S1] {
  1123. // CHECK:STDOUT: %self.patt: @L1.S1.%pattern_type (%pattern_type.f1f60b.1) = value_binding_pattern self [concrete]
  1124. // CHECK:STDOUT: %self.param_patt: @L1.S1.%pattern_type (%pattern_type.f1f60b.1) = value_param_pattern %self.patt, call_param0 [concrete]
  1125. // CHECK:STDOUT: %.loc5_9: %pattern_type.f6d = addr_pattern %self.param_patt [concrete]
  1126. // CHECK:STDOUT: } {
  1127. // CHECK:STDOUT: %self.param: @L1.S1.%ptr.loc5_24.1 (%ptr.5db4e7.1) = value_param call_param0
  1128. // CHECK:STDOUT: %.loc5_24.1: type = splice_block %ptr.loc5_24.2 [symbolic = %ptr.loc5_24.1 (constants.%ptr.5db4e7.1)] {
  1129. // CHECK:STDOUT: %Self.ref: %L1.type = name_ref Self, @L1.%Self [symbolic = %Self (constants.%Self)]
  1130. // CHECK:STDOUT: %Self.as_type: type = facet_access_type %Self.ref [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)]
  1131. // CHECK:STDOUT: %.loc5_24.2: type = converted %Self.ref, %Self.as_type [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)]
  1132. // CHECK:STDOUT: %ptr.loc5_24.2: type = ptr_type %.loc5_24.2 [symbolic = %ptr.loc5_24.1 (constants.%ptr.5db4e7.1)]
  1133. // CHECK:STDOUT: }
  1134. // CHECK:STDOUT: %self: @L1.S1.%ptr.loc5_24.1 (%ptr.5db4e7.1) = value_binding self, %self.param
  1135. // CHECK:STDOUT: }
  1136. // CHECK:STDOUT: %assoc1: %L1.assoc_type = assoc_entity element1, %L1.S1.decl [concrete = constants.%assoc1]
  1137. // CHECK:STDOUT:
  1138. // CHECK:STDOUT: !members:
  1139. // CHECK:STDOUT: .Self = %Self
  1140. // CHECK:STDOUT: .R1 = %assoc0
  1141. // CHECK:STDOUT: .S1 = %assoc1
  1142. // CHECK:STDOUT: witness = (%L1.R1.decl, %L1.S1.decl)
  1143. // CHECK:STDOUT: }
  1144. // CHECK:STDOUT:
  1145. // CHECK:STDOUT: generic fn @L1.R1(@L1.%Self: %L1.type) {
  1146. // CHECK:STDOUT: %Self: %L1.type = symbolic_binding Self, 0 [symbolic = %Self (constants.%Self)]
  1147. // CHECK:STDOUT: %Self.binding.as_type: type = symbolic_binding_type Self, 0, %Self [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)]
  1148. // CHECK:STDOUT: %pattern_type: type = pattern_type %Self.binding.as_type [symbolic = %pattern_type (constants.%pattern_type.510a66.1)]
  1149. // CHECK:STDOUT:
  1150. // CHECK:STDOUT: fn(%self.param: @L1.R1.%Self.binding.as_type (%Self.binding.as_type));
  1151. // CHECK:STDOUT: }
  1152. // CHECK:STDOUT:
  1153. // CHECK:STDOUT: generic fn @L1.S1(@L1.%Self: %L1.type) {
  1154. // CHECK:STDOUT: %Self: %L1.type = symbolic_binding Self, 0 [symbolic = %Self (constants.%Self)]
  1155. // CHECK:STDOUT: %Self.binding.as_type: type = symbolic_binding_type Self, 0, %Self [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)]
  1156. // CHECK:STDOUT: %ptr.loc5_24.1: type = ptr_type %Self.binding.as_type [symbolic = %ptr.loc5_24.1 (constants.%ptr.5db4e7.1)]
  1157. // CHECK:STDOUT: %pattern_type: type = pattern_type %ptr.loc5_24.1 [symbolic = %pattern_type (constants.%pattern_type.f1f60b.1)]
  1158. // CHECK:STDOUT:
  1159. // CHECK:STDOUT: fn(%self.param: @L1.S1.%ptr.loc5_24.1 (%ptr.5db4e7.1));
  1160. // CHECK:STDOUT: }
  1161. // CHECK:STDOUT:
  1162. // CHECK:STDOUT: generic fn @Simple4(%T.loc9_12.2: %L1.type) {
  1163. // CHECK:STDOUT: %T.loc9_12.1: %L1.type = symbolic_binding T, 0 [symbolic = %T.loc9_12.1 (constants.%T)]
  1164. // CHECK:STDOUT: %T.binding.as_type: type = symbolic_binding_type T, 0, %T.loc9_12.1 [symbolic = %T.binding.as_type (constants.%T.binding.as_type)]
  1165. // CHECK:STDOUT: %pattern_type.loc9_20: type = pattern_type %T.binding.as_type [symbolic = %pattern_type.loc9_20 (constants.%pattern_type.510a66.2)]
  1166. // CHECK:STDOUT: %ptr.loc9_30.1: type = ptr_type %T.binding.as_type [symbolic = %ptr.loc9_30.1 (constants.%ptr.5db4e7.2)]
  1167. // CHECK:STDOUT: %pattern_type.loc9_26: type = pattern_type %ptr.loc9_30.1 [symbolic = %pattern_type.loc9_26 (constants.%pattern_type.f1f60b.2)]
  1168. // CHECK:STDOUT:
  1169. // CHECK:STDOUT: !definition:
  1170. // CHECK:STDOUT: %require_complete.loc9_21: <witness> = require_complete_type %T.binding.as_type [symbolic = %require_complete.loc9_21 (constants.%require_complete.b98a62.1)]
  1171. // CHECK:STDOUT: %require_complete.loc9_27: <witness> = require_complete_type %ptr.loc9_30.1 [symbolic = %require_complete.loc9_27 (constants.%require_complete.80837b.1)]
  1172. // CHECK:STDOUT: %L1.lookup_impl_witness: <witness> = lookup_impl_witness %T.loc9_12.1, @L1 [symbolic = %L1.lookup_impl_witness (constants.%L1.lookup_impl_witness.497b38.1)]
  1173. // CHECK:STDOUT: %.loc10_4: type = fn_type_with_self_type constants.%L1.R1.type, %T.loc9_12.1 [symbolic = %.loc10_4 (constants.%.2c3978.1)]
  1174. // CHECK:STDOUT: %impl.elem0.loc10_4.2: @Simple4.%.loc10_4 (%.2c3978.1) = impl_witness_access %L1.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc10_4.2 (constants.%impl.elem0.d3a613.1)]
  1175. // CHECK:STDOUT: %specific_impl_fn.loc10_4.2: <specific function> = specific_impl_function %impl.elem0.loc10_4.2, @L1.R1(%T.loc9_12.1) [symbolic = %specific_impl_fn.loc10_4.2 (constants.%specific_impl_fn.f8ac37.1)]
  1176. // CHECK:STDOUT: %.loc11_4.2: type = fn_type_with_self_type constants.%L1.S1.type, %T.loc9_12.1 [symbolic = %.loc11_4.2 (constants.%.45c8db.1)]
  1177. // CHECK:STDOUT: %impl.elem1.loc11_4.2: @Simple4.%.loc11_4.2 (%.45c8db.1) = impl_witness_access %L1.lookup_impl_witness, element1 [symbolic = %impl.elem1.loc11_4.2 (constants.%impl.elem1.c3a14a.1)]
  1178. // CHECK:STDOUT: %specific_impl_fn.loc11_4.2: <specific function> = specific_impl_function %impl.elem1.loc11_4.2, @L1.S1(%T.loc9_12.1) [symbolic = %specific_impl_fn.loc11_4.2 (constants.%specific_impl_fn.c2ec1e.1)]
  1179. // CHECK:STDOUT:
  1180. // CHECK:STDOUT: fn(%x.param: @Simple4.%T.binding.as_type (%T.binding.as_type), %p.param: @Simple4.%ptr.loc9_30.1 (%ptr.5db4e7.2)) {
  1181. // CHECK:STDOUT: !entry:
  1182. // CHECK:STDOUT: %x.ref: @Simple4.%T.binding.as_type (%T.binding.as_type) = name_ref x, %x
  1183. // CHECK:STDOUT: %R1.ref: %L1.assoc_type = name_ref R1, @L1.%assoc0 [concrete = constants.%assoc0]
  1184. // CHECK:STDOUT: %impl.elem0.loc10_4.1: @Simple4.%.loc10_4 (%.2c3978.1) = impl_witness_access constants.%L1.lookup_impl_witness.497b38.1, element0 [symbolic = %impl.elem0.loc10_4.2 (constants.%impl.elem0.d3a613.1)]
  1185. // CHECK:STDOUT: %bound_method.loc10_4: <bound method> = bound_method %x.ref, %impl.elem0.loc10_4.1
  1186. // CHECK:STDOUT: %specific_impl_fn.loc10_4.1: <specific function> = specific_impl_function %impl.elem0.loc10_4.1, @L1.R1(constants.%T) [symbolic = %specific_impl_fn.loc10_4.2 (constants.%specific_impl_fn.f8ac37.1)]
  1187. // CHECK:STDOUT: %bound_method.loc10_8: <bound method> = bound_method %x.ref, %specific_impl_fn.loc10_4.1
  1188. // CHECK:STDOUT: %.loc10_8: init %empty_tuple.type = call %bound_method.loc10_8(%x.ref)
  1189. // CHECK:STDOUT: %p.ref: @Simple4.%ptr.loc9_30.1 (%ptr.5db4e7.2) = name_ref p, %p
  1190. // CHECK:STDOUT: %.loc11_4.1: ref @Simple4.%T.binding.as_type (%T.binding.as_type) = deref %p.ref
  1191. // CHECK:STDOUT: %S1.ref: %L1.assoc_type = name_ref S1, @L1.%assoc1 [concrete = constants.%assoc1]
  1192. // CHECK:STDOUT: %impl.elem1.loc11_4.1: @Simple4.%.loc11_4.2 (%.45c8db.1) = impl_witness_access constants.%L1.lookup_impl_witness.497b38.1, element1 [symbolic = %impl.elem1.loc11_4.2 (constants.%impl.elem1.c3a14a.1)]
  1193. // CHECK:STDOUT: %bound_method.loc11_4: <bound method> = bound_method %.loc11_4.1, %impl.elem1.loc11_4.1
  1194. // CHECK:STDOUT: %specific_impl_fn.loc11_4.1: <specific function> = specific_impl_function %impl.elem1.loc11_4.1, @L1.S1(constants.%T) [symbolic = %specific_impl_fn.loc11_4.2 (constants.%specific_impl_fn.c2ec1e.1)]
  1195. // CHECK:STDOUT: %bound_method.loc11_9: <bound method> = bound_method %.loc11_4.1, %specific_impl_fn.loc11_4.1
  1196. // CHECK:STDOUT: %addr: @Simple4.%ptr.loc9_30.1 (%ptr.5db4e7.2) = addr_of %.loc11_4.1
  1197. // CHECK:STDOUT: %.loc11_9: init %empty_tuple.type = call %bound_method.loc11_9(%addr)
  1198. // CHECK:STDOUT: return
  1199. // CHECK:STDOUT: }
  1200. // CHECK:STDOUT: }
  1201. // CHECK:STDOUT:
  1202. // CHECK:STDOUT: generic fn @Compound4(%V.loc15_14.2: %L1.type) {
  1203. // CHECK:STDOUT: %V.loc15_14.1: %L1.type = symbolic_binding V, 0 [symbolic = %V.loc15_14.1 (constants.%V)]
  1204. // CHECK:STDOUT: %V.binding.as_type: type = symbolic_binding_type V, 0, %V.loc15_14.1 [symbolic = %V.binding.as_type (constants.%V.binding.as_type)]
  1205. // CHECK:STDOUT: %pattern_type.loc15_22: type = pattern_type %V.binding.as_type [symbolic = %pattern_type.loc15_22 (constants.%pattern_type.510a66.3)]
  1206. // CHECK:STDOUT: %ptr.loc15_32.1: type = ptr_type %V.binding.as_type [symbolic = %ptr.loc15_32.1 (constants.%ptr.5db4e7.3)]
  1207. // CHECK:STDOUT: %pattern_type.loc15_28: type = pattern_type %ptr.loc15_32.1 [symbolic = %pattern_type.loc15_28 (constants.%pattern_type.f1f60b.3)]
  1208. // CHECK:STDOUT:
  1209. // CHECK:STDOUT: !definition:
  1210. // CHECK:STDOUT: %require_complete.loc15_23: <witness> = require_complete_type %V.binding.as_type [symbolic = %require_complete.loc15_23 (constants.%require_complete.b98a62.2)]
  1211. // CHECK:STDOUT: %require_complete.loc15_29: <witness> = require_complete_type %ptr.loc15_32.1 [symbolic = %require_complete.loc15_29 (constants.%require_complete.80837b.2)]
  1212. // CHECK:STDOUT: %L1.lookup_impl_witness: <witness> = lookup_impl_witness %V.loc15_14.1, @L1 [symbolic = %L1.lookup_impl_witness (constants.%L1.lookup_impl_witness.497b38.2)]
  1213. // CHECK:STDOUT: %.loc16_4: type = fn_type_with_self_type constants.%L1.R1.type, %V.loc15_14.1 [symbolic = %.loc16_4 (constants.%.2c3978.2)]
  1214. // CHECK:STDOUT: %impl.elem0.loc16_4.2: @Compound4.%.loc16_4 (%.2c3978.2) = impl_witness_access %L1.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc16_4.2 (constants.%impl.elem0.d3a613.2)]
  1215. // CHECK:STDOUT: %specific_impl_fn.loc16_4.2: <specific function> = specific_impl_function %impl.elem0.loc16_4.2, @L1.R1(%V.loc15_14.1) [symbolic = %specific_impl_fn.loc16_4.2 (constants.%specific_impl_fn.f8ac37.2)]
  1216. // CHECK:STDOUT: %.loc17_4.2: type = fn_type_with_self_type constants.%L1.S1.type, %V.loc15_14.1 [symbolic = %.loc17_4.2 (constants.%.45c8db.2)]
  1217. // CHECK:STDOUT: %impl.elem1.loc17_4.2: @Compound4.%.loc17_4.2 (%.45c8db.2) = impl_witness_access %L1.lookup_impl_witness, element1 [symbolic = %impl.elem1.loc17_4.2 (constants.%impl.elem1.c3a14a.2)]
  1218. // CHECK:STDOUT: %specific_impl_fn.loc17_4.2: <specific function> = specific_impl_function %impl.elem1.loc17_4.2, @L1.S1(%V.loc15_14.1) [symbolic = %specific_impl_fn.loc17_4.2 (constants.%specific_impl_fn.c2ec1e.2)]
  1219. // CHECK:STDOUT:
  1220. // CHECK:STDOUT: fn(%y.param: @Compound4.%V.binding.as_type (%V.binding.as_type), %p.param: @Compound4.%ptr.loc15_32.1 (%ptr.5db4e7.3)) {
  1221. // CHECK:STDOUT: !entry:
  1222. // CHECK:STDOUT: %y.ref: @Compound4.%V.binding.as_type (%V.binding.as_type) = name_ref y, %y
  1223. // CHECK:STDOUT: %L1.ref.loc16: type = name_ref L1, file.%L1.decl [concrete = constants.%L1.type]
  1224. // CHECK:STDOUT: %R1.ref: %L1.assoc_type = name_ref R1, @L1.%assoc0 [concrete = constants.%assoc0]
  1225. // CHECK:STDOUT: %impl.elem0.loc16_4.1: @Compound4.%.loc16_4 (%.2c3978.2) = impl_witness_access constants.%L1.lookup_impl_witness.497b38.2, element0 [symbolic = %impl.elem0.loc16_4.2 (constants.%impl.elem0.d3a613.2)]
  1226. // CHECK:STDOUT: %bound_method.loc16_4: <bound method> = bound_method %y.ref, %impl.elem0.loc16_4.1
  1227. // CHECK:STDOUT: %specific_impl_fn.loc16_4.1: <specific function> = specific_impl_function %impl.elem0.loc16_4.1, @L1.R1(constants.%V) [symbolic = %specific_impl_fn.loc16_4.2 (constants.%specific_impl_fn.f8ac37.2)]
  1228. // CHECK:STDOUT: %bound_method.loc16_13: <bound method> = bound_method %y.ref, %specific_impl_fn.loc16_4.1
  1229. // CHECK:STDOUT: %.loc16_13: init %empty_tuple.type = call %bound_method.loc16_13(%y.ref)
  1230. // CHECK:STDOUT: %p.ref: @Compound4.%ptr.loc15_32.1 (%ptr.5db4e7.3) = name_ref p, %p
  1231. // CHECK:STDOUT: %L1.ref.loc17: type = name_ref L1, file.%L1.decl [concrete = constants.%L1.type]
  1232. // CHECK:STDOUT: %S1.ref: %L1.assoc_type = name_ref S1, @L1.%assoc1 [concrete = constants.%assoc1]
  1233. // CHECK:STDOUT: %.loc17_4.1: ref @Compound4.%V.binding.as_type (%V.binding.as_type) = deref %p.ref
  1234. // CHECK:STDOUT: %impl.elem1.loc17_4.1: @Compound4.%.loc17_4.2 (%.45c8db.2) = impl_witness_access constants.%L1.lookup_impl_witness.497b38.2, element1 [symbolic = %impl.elem1.loc17_4.2 (constants.%impl.elem1.c3a14a.2)]
  1235. // CHECK:STDOUT: %bound_method.loc17_4: <bound method> = bound_method %.loc17_4.1, %impl.elem1.loc17_4.1
  1236. // CHECK:STDOUT: %specific_impl_fn.loc17_4.1: <specific function> = specific_impl_function %impl.elem1.loc17_4.1, @L1.S1(constants.%V) [symbolic = %specific_impl_fn.loc17_4.2 (constants.%specific_impl_fn.c2ec1e.2)]
  1237. // CHECK:STDOUT: %bound_method.loc17_14: <bound method> = bound_method %.loc17_4.1, %specific_impl_fn.loc17_4.1
  1238. // CHECK:STDOUT: %addr: @Compound4.%ptr.loc15_32.1 (%ptr.5db4e7.3) = addr_of %.loc17_4.1
  1239. // CHECK:STDOUT: %.loc17_14: init %empty_tuple.type = call %bound_method.loc17_14(%addr)
  1240. // CHECK:STDOUT: return
  1241. // CHECK:STDOUT: }
  1242. // CHECK:STDOUT: }
  1243. // CHECK:STDOUT:
  1244. // CHECK:STDOUT: specific @L1.R1(constants.%Self) {
  1245. // CHECK:STDOUT: %Self => constants.%Self
  1246. // CHECK:STDOUT: %Self.binding.as_type => constants.%Self.binding.as_type
  1247. // CHECK:STDOUT: %pattern_type => constants.%pattern_type.510a66.1
  1248. // CHECK:STDOUT: }
  1249. // CHECK:STDOUT:
  1250. // CHECK:STDOUT: specific @L1.S1(constants.%Self) {
  1251. // CHECK:STDOUT: %Self => constants.%Self
  1252. // CHECK:STDOUT: %Self.binding.as_type => constants.%Self.binding.as_type
  1253. // CHECK:STDOUT: %ptr.loc5_24.1 => constants.%ptr.5db4e7.1
  1254. // CHECK:STDOUT: %pattern_type => constants.%pattern_type.f1f60b.1
  1255. // CHECK:STDOUT: }
  1256. // CHECK:STDOUT:
  1257. // CHECK:STDOUT: specific @Simple4(constants.%T) {
  1258. // CHECK:STDOUT: %T.loc9_12.1 => constants.%T
  1259. // CHECK:STDOUT: %T.binding.as_type => constants.%T.binding.as_type
  1260. // CHECK:STDOUT: %pattern_type.loc9_20 => constants.%pattern_type.510a66.2
  1261. // CHECK:STDOUT: %ptr.loc9_30.1 => constants.%ptr.5db4e7.2
  1262. // CHECK:STDOUT: %pattern_type.loc9_26 => constants.%pattern_type.f1f60b.2
  1263. // CHECK:STDOUT: }
  1264. // CHECK:STDOUT:
  1265. // CHECK:STDOUT: specific @L1.R1(constants.%T) {
  1266. // CHECK:STDOUT: %Self => constants.%T
  1267. // CHECK:STDOUT: %Self.binding.as_type => constants.%T.binding.as_type
  1268. // CHECK:STDOUT: %pattern_type => constants.%pattern_type.510a66.2
  1269. // CHECK:STDOUT: }
  1270. // CHECK:STDOUT:
  1271. // CHECK:STDOUT: specific @L1.S1(constants.%T) {
  1272. // CHECK:STDOUT: %Self => constants.%T
  1273. // CHECK:STDOUT: %Self.binding.as_type => constants.%T.binding.as_type
  1274. // CHECK:STDOUT: %ptr.loc5_24.1 => constants.%ptr.5db4e7.2
  1275. // CHECK:STDOUT: %pattern_type => constants.%pattern_type.f1f60b.2
  1276. // CHECK:STDOUT: }
  1277. // CHECK:STDOUT:
  1278. // CHECK:STDOUT: specific @Compound4(constants.%V) {
  1279. // CHECK:STDOUT: %V.loc15_14.1 => constants.%V
  1280. // CHECK:STDOUT: %V.binding.as_type => constants.%V.binding.as_type
  1281. // CHECK:STDOUT: %pattern_type.loc15_22 => constants.%pattern_type.510a66.3
  1282. // CHECK:STDOUT: %ptr.loc15_32.1 => constants.%ptr.5db4e7.3
  1283. // CHECK:STDOUT: %pattern_type.loc15_28 => constants.%pattern_type.f1f60b.3
  1284. // CHECK:STDOUT: }
  1285. // CHECK:STDOUT:
  1286. // CHECK:STDOUT: specific @L1.R1(constants.%V) {
  1287. // CHECK:STDOUT: %Self => constants.%V
  1288. // CHECK:STDOUT: %Self.binding.as_type => constants.%V.binding.as_type
  1289. // CHECK:STDOUT: %pattern_type => constants.%pattern_type.510a66.3
  1290. // CHECK:STDOUT: }
  1291. // CHECK:STDOUT:
  1292. // CHECK:STDOUT: specific @L1.S1(constants.%V) {
  1293. // CHECK:STDOUT: %Self => constants.%V
  1294. // CHECK:STDOUT: %Self.binding.as_type => constants.%V.binding.as_type
  1295. // CHECK:STDOUT: %ptr.loc5_24.1 => constants.%ptr.5db4e7.3
  1296. // CHECK:STDOUT: %pattern_type => constants.%pattern_type.f1f60b.3
  1297. // CHECK:STDOUT: }
  1298. // CHECK:STDOUT:
  1299. // CHECK:STDOUT: --- fail_interface_instance_caller_not.carbon
  1300. // CHECK:STDOUT:
  1301. // CHECK:STDOUT: constants {
  1302. // CHECK:STDOUT: %L2.type: type = facet_type <@L2> [concrete]
  1303. // CHECK:STDOUT: %Self: %L2.type = symbolic_binding Self, 0 [symbolic]
  1304. // CHECK:STDOUT: %Self.binding.as_type: type = symbolic_binding_type Self, 0, %Self [symbolic]
  1305. // CHECK:STDOUT: %pattern_type.c87c75.1: type = pattern_type %Self.binding.as_type [symbolic]
  1306. // CHECK:STDOUT: %L2.R2.type: type = fn_type @L2.R2 [concrete]
  1307. // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete]
  1308. // CHECK:STDOUT: %L2.R2: %L2.R2.type = struct_value () [concrete]
  1309. // CHECK:STDOUT: %L2.assoc_type: type = assoc_entity_type @L2 [concrete]
  1310. // CHECK:STDOUT: %assoc0: %L2.assoc_type = assoc_entity element0, @L2.%L2.R2.decl [concrete]
  1311. // CHECK:STDOUT: %L2.S2.type: type = fn_type @L2.S2 [concrete]
  1312. // CHECK:STDOUT: %L2.S2: %L2.S2.type = struct_value () [concrete]
  1313. // CHECK:STDOUT: %assoc1: %L2.assoc_type = assoc_entity element1, @L2.%L2.S2.decl [concrete]
  1314. // CHECK:STDOUT: %type: type = facet_type <type> [concrete]
  1315. // CHECK:STDOUT: %.Self: %type = symbolic_binding .Self [symbolic_self]
  1316. // CHECK:STDOUT: %T: %L2.type = symbolic_binding T, 0 [symbolic]
  1317. // CHECK:STDOUT: %pattern_type.38f: type = pattern_type %L2.type [concrete]
  1318. // CHECK:STDOUT: %Simple5.type: type = fn_type @Simple5 [concrete]
  1319. // CHECK:STDOUT: %Simple5: %Simple5.type = struct_value () [concrete]
  1320. // CHECK:STDOUT: %T.binding.as_type: type = symbolic_binding_type T, 0, %T [symbolic]
  1321. // CHECK:STDOUT: %L2.lookup_impl_witness: <witness> = lookup_impl_witness %T, @L2 [symbolic]
  1322. // CHECK:STDOUT: %.6fc: type = fn_type_with_self_type %L2.R2.type, %T [symbolic]
  1323. // CHECK:STDOUT: %impl.elem0: %.6fc = impl_witness_access %L2.lookup_impl_witness, element0 [symbolic]
  1324. // CHECK:STDOUT: %pattern_type.c87c75.2: type = pattern_type %T.binding.as_type [symbolic]
  1325. // CHECK:STDOUT: %specific_impl_fn.a65: <specific function> = specific_impl_function %impl.elem0, @L2.R2(%T) [symbolic]
  1326. // CHECK:STDOUT: %.0b4: type = fn_type_with_self_type %L2.S2.type, %T [symbolic]
  1327. // CHECK:STDOUT: %impl.elem1: %.0b4 = impl_witness_access %L2.lookup_impl_witness, element1 [symbolic]
  1328. // CHECK:STDOUT: %specific_impl_fn.b7b: <specific function> = specific_impl_function %impl.elem1, @L2.S2(%T) [symbolic]
  1329. // CHECK:STDOUT: %V: %L2.type = symbolic_binding V, 0 [symbolic]
  1330. // CHECK:STDOUT: %Compound5.type: type = fn_type @Compound5 [concrete]
  1331. // CHECK:STDOUT: %Compound5: %Compound5.type = struct_value () [concrete]
  1332. // CHECK:STDOUT: }
  1333. // CHECK:STDOUT:
  1334. // CHECK:STDOUT: imports {
  1335. // CHECK:STDOUT: %Core: <namespace> = namespace file.%Core.import, [concrete] {
  1336. // CHECK:STDOUT: import Core//prelude
  1337. // CHECK:STDOUT: import Core//prelude/...
  1338. // CHECK:STDOUT: }
  1339. // CHECK:STDOUT: }
  1340. // CHECK:STDOUT:
  1341. // CHECK:STDOUT: file {
  1342. // CHECK:STDOUT: package: <namespace> = namespace [concrete] {
  1343. // CHECK:STDOUT: .Core = imports.%Core
  1344. // CHECK:STDOUT: .L2 = %L2.decl
  1345. // CHECK:STDOUT: .Simple5 = %Simple5.decl
  1346. // CHECK:STDOUT: .Compound5 = %Compound5.decl
  1347. // CHECK:STDOUT: }
  1348. // CHECK:STDOUT: %Core.import = import Core
  1349. // CHECK:STDOUT: %L2.decl: type = interface_decl @L2 [concrete = constants.%L2.type] {} {}
  1350. // CHECK:STDOUT: %Simple5.decl: %Simple5.type = fn_decl @Simple5 [concrete = constants.%Simple5] {
  1351. // CHECK:STDOUT: %T.patt: %pattern_type.38f = symbolic_binding_pattern T, 0 [concrete]
  1352. // CHECK:STDOUT: } {
  1353. // CHECK:STDOUT: %.loc10: type = splice_block %L2.ref [concrete = constants.%L2.type] {
  1354. // CHECK:STDOUT: %.Self: %type = symbolic_binding .Self [symbolic_self = constants.%.Self]
  1355. // CHECK:STDOUT: %L2.ref: type = name_ref L2, file.%L2.decl [concrete = constants.%L2.type]
  1356. // CHECK:STDOUT: }
  1357. // CHECK:STDOUT: %T.loc10_12.2: %L2.type = symbolic_binding T, 0 [symbolic = %T.loc10_12.1 (constants.%T)]
  1358. // CHECK:STDOUT: }
  1359. // CHECK:STDOUT: %Compound5.decl: %Compound5.type = fn_decl @Compound5 [concrete = constants.%Compound5] {
  1360. // CHECK:STDOUT: %V.patt: %pattern_type.38f = symbolic_binding_pattern V, 0 [concrete]
  1361. // CHECK:STDOUT: } {
  1362. // CHECK:STDOUT: %.loc30: type = splice_block %L2.ref.loc30 [concrete = constants.%L2.type] {
  1363. // CHECK:STDOUT: %.Self: %type = symbolic_binding .Self [symbolic_self = constants.%.Self]
  1364. // CHECK:STDOUT: %L2.ref.loc30: type = name_ref L2, file.%L2.decl [concrete = constants.%L2.type]
  1365. // CHECK:STDOUT: }
  1366. // CHECK:STDOUT: %V.loc30_14.2: %L2.type = symbolic_binding V, 0 [symbolic = %V.loc30_14.1 (constants.%V)]
  1367. // CHECK:STDOUT: }
  1368. // CHECK:STDOUT: }
  1369. // CHECK:STDOUT:
  1370. // CHECK:STDOUT: interface @L2 {
  1371. // CHECK:STDOUT: %Self: %L2.type = symbolic_binding Self, 0 [symbolic = constants.%Self]
  1372. // CHECK:STDOUT: %L2.R2.decl: %L2.R2.type = fn_decl @L2.R2 [concrete = constants.%L2.R2] {
  1373. // CHECK:STDOUT: %self.patt: @L2.R2.%pattern_type (%pattern_type.c87c75.1) = value_binding_pattern self [concrete]
  1374. // CHECK:STDOUT: %self.param_patt: @L2.R2.%pattern_type (%pattern_type.c87c75.1) = value_param_pattern %self.patt, call_param0 [concrete]
  1375. // CHECK:STDOUT: } {
  1376. // CHECK:STDOUT: %self.param: @L2.R2.%Self.binding.as_type (%Self.binding.as_type) = value_param call_param0
  1377. // CHECK:STDOUT: %.loc5_15.1: type = splice_block %.loc5_15.2 [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)] {
  1378. // CHECK:STDOUT: %Self.ref: %L2.type = name_ref Self, @L2.%Self [symbolic = %Self (constants.%Self)]
  1379. // CHECK:STDOUT: %Self.as_type: type = facet_access_type %Self.ref [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)]
  1380. // CHECK:STDOUT: %.loc5_15.2: type = converted %Self.ref, %Self.as_type [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)]
  1381. // CHECK:STDOUT: }
  1382. // CHECK:STDOUT: %self: @L2.R2.%Self.binding.as_type (%Self.binding.as_type) = value_binding self, %self.param
  1383. // CHECK:STDOUT: }
  1384. // CHECK:STDOUT: %assoc0: %L2.assoc_type = assoc_entity element0, %L2.R2.decl [concrete = constants.%assoc0]
  1385. // CHECK:STDOUT: %L2.S2.decl: %L2.S2.type = fn_decl @L2.S2 [concrete = constants.%L2.S2] {
  1386. // CHECK:STDOUT: %self.patt: @L2.S2.%pattern_type (%pattern_type.c87c75.1) = ref_binding_pattern self [concrete]
  1387. // CHECK:STDOUT: %self.param_patt: @L2.S2.%pattern_type (%pattern_type.c87c75.1) = ref_param_pattern %self.patt, call_param0 [concrete]
  1388. // CHECK:STDOUT: } {
  1389. // CHECK:STDOUT: %self.param: ref @L2.S2.%Self.binding.as_type (%Self.binding.as_type) = ref_param call_param0
  1390. // CHECK:STDOUT: %.loc6_19.1: type = splice_block %.loc6_19.2 [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)] {
  1391. // CHECK:STDOUT: %Self.ref: %L2.type = name_ref Self, @L2.%Self [symbolic = %Self (constants.%Self)]
  1392. // CHECK:STDOUT: %Self.as_type: type = facet_access_type %Self.ref [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)]
  1393. // CHECK:STDOUT: %.loc6_19.2: type = converted %Self.ref, %Self.as_type [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)]
  1394. // CHECK:STDOUT: }
  1395. // CHECK:STDOUT: %self: ref @L2.S2.%Self.binding.as_type (%Self.binding.as_type) = ref_binding self, %self.param
  1396. // CHECK:STDOUT: }
  1397. // CHECK:STDOUT: %assoc1: %L2.assoc_type = assoc_entity element1, %L2.S2.decl [concrete = constants.%assoc1]
  1398. // CHECK:STDOUT:
  1399. // CHECK:STDOUT: !members:
  1400. // CHECK:STDOUT: .Self = %Self
  1401. // CHECK:STDOUT: .R2 = %assoc0
  1402. // CHECK:STDOUT: .S2 = %assoc1
  1403. // CHECK:STDOUT: witness = (%L2.R2.decl, %L2.S2.decl)
  1404. // CHECK:STDOUT: }
  1405. // CHECK:STDOUT:
  1406. // CHECK:STDOUT: generic fn @L2.R2(@L2.%Self: %L2.type) {
  1407. // CHECK:STDOUT: %Self: %L2.type = symbolic_binding Self, 0 [symbolic = %Self (constants.%Self)]
  1408. // CHECK:STDOUT: %Self.binding.as_type: type = symbolic_binding_type Self, 0, %Self [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)]
  1409. // CHECK:STDOUT: %pattern_type: type = pattern_type %Self.binding.as_type [symbolic = %pattern_type (constants.%pattern_type.c87c75.1)]
  1410. // CHECK:STDOUT:
  1411. // CHECK:STDOUT: fn(%self.param: @L2.R2.%Self.binding.as_type (%Self.binding.as_type));
  1412. // CHECK:STDOUT: }
  1413. // CHECK:STDOUT:
  1414. // CHECK:STDOUT: generic fn @L2.S2(@L2.%Self: %L2.type) {
  1415. // CHECK:STDOUT: %Self: %L2.type = symbolic_binding Self, 0 [symbolic = %Self (constants.%Self)]
  1416. // CHECK:STDOUT: %Self.binding.as_type: type = symbolic_binding_type Self, 0, %Self [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)]
  1417. // CHECK:STDOUT: %pattern_type: type = pattern_type %Self.binding.as_type [symbolic = %pattern_type (constants.%pattern_type.c87c75.1)]
  1418. // CHECK:STDOUT:
  1419. // CHECK:STDOUT: fn(%self.param: @L2.S2.%Self.binding.as_type (%Self.binding.as_type));
  1420. // CHECK:STDOUT: }
  1421. // CHECK:STDOUT:
  1422. // CHECK:STDOUT: generic fn @Simple5(%T.loc10_12.2: %L2.type) {
  1423. // CHECK:STDOUT: %T.loc10_12.1: %L2.type = symbolic_binding T, 0 [symbolic = %T.loc10_12.1 (constants.%T)]
  1424. // CHECK:STDOUT:
  1425. // CHECK:STDOUT: !definition:
  1426. // CHECK:STDOUT: %T.binding.as_type: type = symbolic_binding_type T, 0, %T.loc10_12.1 [symbolic = %T.binding.as_type (constants.%T.binding.as_type)]
  1427. // CHECK:STDOUT: %L2.lookup_impl_witness: <witness> = lookup_impl_witness %T.loc10_12.1, @L2 [symbolic = %L2.lookup_impl_witness (constants.%L2.lookup_impl_witness)]
  1428. // CHECK:STDOUT: %.loc18_4.2: type = fn_type_with_self_type constants.%L2.R2.type, %T.loc10_12.1 [symbolic = %.loc18_4.2 (constants.%.6fc)]
  1429. // CHECK:STDOUT: %impl.elem0.loc18_4.2: @Simple5.%.loc18_4.2 (%.6fc) = impl_witness_access %L2.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc18_4.2 (constants.%impl.elem0)]
  1430. // CHECK:STDOUT: %specific_impl_fn.loc18_4.2: <specific function> = specific_impl_function %impl.elem0.loc18_4.2, @L2.R2(%T.loc10_12.1) [symbolic = %specific_impl_fn.loc18_4.2 (constants.%specific_impl_fn.a65)]
  1431. // CHECK:STDOUT: %.loc26_4.2: type = fn_type_with_self_type constants.%L2.S2.type, %T.loc10_12.1 [symbolic = %.loc26_4.2 (constants.%.0b4)]
  1432. // CHECK:STDOUT: %impl.elem1.loc26_4.2: @Simple5.%.loc26_4.2 (%.0b4) = impl_witness_access %L2.lookup_impl_witness, element1 [symbolic = %impl.elem1.loc26_4.2 (constants.%impl.elem1)]
  1433. // CHECK:STDOUT: %specific_impl_fn.loc26_4.2: <specific function> = specific_impl_function %impl.elem1.loc26_4.2, @L2.S2(%T.loc10_12.1) [symbolic = %specific_impl_fn.loc26_4.2 (constants.%specific_impl_fn.b7b)]
  1434. // CHECK:STDOUT:
  1435. // CHECK:STDOUT: fn() {
  1436. // CHECK:STDOUT: !entry:
  1437. // CHECK:STDOUT: %T.ref.loc18: %L2.type = name_ref T, %T.loc10_12.2 [symbolic = %T.loc10_12.1 (constants.%T)]
  1438. // CHECK:STDOUT: %R2.ref: %L2.assoc_type = name_ref R2, @L2.%assoc0 [concrete = constants.%assoc0]
  1439. // CHECK:STDOUT: %T.as_type.loc18: type = facet_access_type %T.ref.loc18 [symbolic = %T.binding.as_type (constants.%T.binding.as_type)]
  1440. // CHECK:STDOUT: %.loc18_4.1: type = converted %T.ref.loc18, %T.as_type.loc18 [symbolic = %T.binding.as_type (constants.%T.binding.as_type)]
  1441. // CHECK:STDOUT: %impl.elem0.loc18_4.1: @Simple5.%.loc18_4.2 (%.6fc) = impl_witness_access constants.%L2.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc18_4.2 (constants.%impl.elem0)]
  1442. // CHECK:STDOUT: %specific_impl_fn.loc18_4.1: <specific function> = specific_impl_function %impl.elem0.loc18_4.1, @L2.R2(constants.%T) [symbolic = %specific_impl_fn.loc18_4.2 (constants.%specific_impl_fn.a65)]
  1443. // CHECK:STDOUT: %.loc18_8: init %empty_tuple.type = call %specific_impl_fn.loc18_4.1(<error>) [concrete = <error>]
  1444. // CHECK:STDOUT: %T.ref.loc26: %L2.type = name_ref T, %T.loc10_12.2 [symbolic = %T.loc10_12.1 (constants.%T)]
  1445. // CHECK:STDOUT: %S2.ref: %L2.assoc_type = name_ref S2, @L2.%assoc1 [concrete = constants.%assoc1]
  1446. // CHECK:STDOUT: %T.as_type.loc26: type = facet_access_type %T.ref.loc26 [symbolic = %T.binding.as_type (constants.%T.binding.as_type)]
  1447. // CHECK:STDOUT: %.loc26_4.1: type = converted %T.ref.loc26, %T.as_type.loc26 [symbolic = %T.binding.as_type (constants.%T.binding.as_type)]
  1448. // CHECK:STDOUT: %impl.elem1.loc26_4.1: @Simple5.%.loc26_4.2 (%.0b4) = impl_witness_access constants.%L2.lookup_impl_witness, element1 [symbolic = %impl.elem1.loc26_4.2 (constants.%impl.elem1)]
  1449. // CHECK:STDOUT: %specific_impl_fn.loc26_4.1: <specific function> = specific_impl_function %impl.elem1.loc26_4.1, @L2.S2(constants.%T) [symbolic = %specific_impl_fn.loc26_4.2 (constants.%specific_impl_fn.b7b)]
  1450. // CHECK:STDOUT: %.loc26_8: init %empty_tuple.type = call %specific_impl_fn.loc26_4.1(<error>) [concrete = <error>]
  1451. // CHECK:STDOUT: return
  1452. // CHECK:STDOUT: }
  1453. // CHECK:STDOUT: }
  1454. // CHECK:STDOUT:
  1455. // CHECK:STDOUT: generic fn @Compound5(%V.loc30_14.2: %L2.type) {
  1456. // CHECK:STDOUT: %V.loc30_14.1: %L2.type = symbolic_binding V, 0 [symbolic = %V.loc30_14.1 (constants.%V)]
  1457. // CHECK:STDOUT:
  1458. // CHECK:STDOUT: !definition:
  1459. // CHECK:STDOUT:
  1460. // CHECK:STDOUT: fn() {
  1461. // CHECK:STDOUT: !entry:
  1462. // CHECK:STDOUT: %V.ref.loc35: %L2.type = name_ref V, %V.loc30_14.2 [symbolic = %V.loc30_14.1 (constants.%V)]
  1463. // CHECK:STDOUT: %L2.ref.loc35: type = name_ref L2, file.%L2.decl [concrete = constants.%L2.type]
  1464. // CHECK:STDOUT: %R2.ref: %L2.assoc_type = name_ref R2, @L2.%assoc0 [concrete = constants.%assoc0]
  1465. // CHECK:STDOUT: %V.ref.loc40: %L2.type = name_ref V, %V.loc30_14.2 [symbolic = %V.loc30_14.1 (constants.%V)]
  1466. // CHECK:STDOUT: %L2.ref.loc40: type = name_ref L2, file.%L2.decl [concrete = constants.%L2.type]
  1467. // CHECK:STDOUT: %S2.ref: %L2.assoc_type = name_ref S2, @L2.%assoc1 [concrete = constants.%assoc1]
  1468. // CHECK:STDOUT: return
  1469. // CHECK:STDOUT: }
  1470. // CHECK:STDOUT: }
  1471. // CHECK:STDOUT:
  1472. // CHECK:STDOUT: specific @L2.R2(constants.%Self) {
  1473. // CHECK:STDOUT: %Self => constants.%Self
  1474. // CHECK:STDOUT: %Self.binding.as_type => constants.%Self.binding.as_type
  1475. // CHECK:STDOUT: %pattern_type => constants.%pattern_type.c87c75.1
  1476. // CHECK:STDOUT: }
  1477. // CHECK:STDOUT:
  1478. // CHECK:STDOUT: specific @L2.S2(constants.%Self) {
  1479. // CHECK:STDOUT: %Self => constants.%Self
  1480. // CHECK:STDOUT: %Self.binding.as_type => constants.%Self.binding.as_type
  1481. // CHECK:STDOUT: %pattern_type => constants.%pattern_type.c87c75.1
  1482. // CHECK:STDOUT: }
  1483. // CHECK:STDOUT:
  1484. // CHECK:STDOUT: specific @Simple5(constants.%T) {
  1485. // CHECK:STDOUT: %T.loc10_12.1 => constants.%T
  1486. // CHECK:STDOUT: }
  1487. // CHECK:STDOUT:
  1488. // CHECK:STDOUT: specific @L2.R2(constants.%T) {
  1489. // CHECK:STDOUT: %Self => constants.%T
  1490. // CHECK:STDOUT: %Self.binding.as_type => constants.%T.binding.as_type
  1491. // CHECK:STDOUT: %pattern_type => constants.%pattern_type.c87c75.2
  1492. // CHECK:STDOUT: }
  1493. // CHECK:STDOUT:
  1494. // CHECK:STDOUT: specific @L2.S2(constants.%T) {
  1495. // CHECK:STDOUT: %Self => constants.%T
  1496. // CHECK:STDOUT: %Self.binding.as_type => constants.%T.binding.as_type
  1497. // CHECK:STDOUT: %pattern_type => constants.%pattern_type.c87c75.2
  1498. // CHECK:STDOUT: }
  1499. // CHECK:STDOUT:
  1500. // CHECK:STDOUT: specific @Compound5(constants.%V) {
  1501. // CHECK:STDOUT: %V.loc30_14.1 => constants.%V
  1502. // CHECK:STDOUT: }
  1503. // CHECK:STDOUT:
  1504. // CHECK:STDOUT: --- fail_interface_instance_caller_not_addr.carbon
  1505. // CHECK:STDOUT:
  1506. // CHECK:STDOUT: constants {
  1507. // CHECK:STDOUT: %L2.type: type = facet_type <@L2> [concrete]
  1508. // CHECK:STDOUT: %Self: %L2.type = symbolic_binding Self, 0 [symbolic]
  1509. // CHECK:STDOUT: %Self.binding.as_type: type = symbolic_binding_type Self, 0, %Self [symbolic]
  1510. // CHECK:STDOUT: %pattern_type.c87c75.1: type = pattern_type %Self.binding.as_type [symbolic]
  1511. // CHECK:STDOUT: %L2.R2.type: type = fn_type @L2.R2 [concrete]
  1512. // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete]
  1513. // CHECK:STDOUT: %L2.R2: %L2.R2.type = struct_value () [concrete]
  1514. // CHECK:STDOUT: %L2.assoc_type: type = assoc_entity_type @L2 [concrete]
  1515. // CHECK:STDOUT: %assoc0: %L2.assoc_type = assoc_entity element0, @L2.%L2.R2.decl [concrete]
  1516. // CHECK:STDOUT: %ptr.707d07.1: type = ptr_type %Self.binding.as_type [symbolic]
  1517. // CHECK:STDOUT: %pattern_type.2fa31b.1: type = pattern_type %ptr.707d07.1 [symbolic]
  1518. // CHECK:STDOUT: %pattern_type.f6d: type = pattern_type auto [concrete]
  1519. // CHECK:STDOUT: %L2.S2.type: type = fn_type @L2.S2 [concrete]
  1520. // CHECK:STDOUT: %L2.S2: %L2.S2.type = struct_value () [concrete]
  1521. // CHECK:STDOUT: %assoc1: %L2.assoc_type = assoc_entity element1, @L2.%L2.S2.decl [concrete]
  1522. // CHECK:STDOUT: %type: type = facet_type <type> [concrete]
  1523. // CHECK:STDOUT: %.Self: %type = symbolic_binding .Self [symbolic_self]
  1524. // CHECK:STDOUT: %T: %L2.type = symbolic_binding T, 0 [symbolic]
  1525. // CHECK:STDOUT: %pattern_type.38f: type = pattern_type %L2.type [concrete]
  1526. // CHECK:STDOUT: %Simple5.type: type = fn_type @Simple5 [concrete]
  1527. // CHECK:STDOUT: %Simple5: %Simple5.type = struct_value () [concrete]
  1528. // CHECK:STDOUT: %T.binding.as_type: type = symbolic_binding_type T, 0, %T [symbolic]
  1529. // CHECK:STDOUT: %L2.lookup_impl_witness: <witness> = lookup_impl_witness %T, @L2 [symbolic]
  1530. // CHECK:STDOUT: %.6fc: type = fn_type_with_self_type %L2.R2.type, %T [symbolic]
  1531. // CHECK:STDOUT: %impl.elem0: %.6fc = impl_witness_access %L2.lookup_impl_witness, element0 [symbolic]
  1532. // CHECK:STDOUT: %pattern_type.c87c75.2: type = pattern_type %T.binding.as_type [symbolic]
  1533. // CHECK:STDOUT: %specific_impl_fn.a65: <specific function> = specific_impl_function %impl.elem0, @L2.R2(%T) [symbolic]
  1534. // CHECK:STDOUT: %.0b4: type = fn_type_with_self_type %L2.S2.type, %T [symbolic]
  1535. // CHECK:STDOUT: %impl.elem1: %.0b4 = impl_witness_access %L2.lookup_impl_witness, element1 [symbolic]
  1536. // CHECK:STDOUT: %ptr.707d07.2: type = ptr_type %T.binding.as_type [symbolic]
  1537. // CHECK:STDOUT: %pattern_type.2fa31b.2: type = pattern_type %ptr.707d07.2 [symbolic]
  1538. // CHECK:STDOUT: %specific_impl_fn.b7b: <specific function> = specific_impl_function %impl.elem1, @L2.S2(%T) [symbolic]
  1539. // CHECK:STDOUT: %V: %L2.type = symbolic_binding V, 0 [symbolic]
  1540. // CHECK:STDOUT: %Compound5.type: type = fn_type @Compound5 [concrete]
  1541. // CHECK:STDOUT: %Compound5: %Compound5.type = struct_value () [concrete]
  1542. // CHECK:STDOUT: }
  1543. // CHECK:STDOUT:
  1544. // CHECK:STDOUT: imports {
  1545. // CHECK:STDOUT: %Core: <namespace> = namespace file.%Core.import, [concrete] {
  1546. // CHECK:STDOUT: import Core//prelude
  1547. // CHECK:STDOUT: import Core//prelude/...
  1548. // CHECK:STDOUT: }
  1549. // CHECK:STDOUT: }
  1550. // CHECK:STDOUT:
  1551. // CHECK:STDOUT: file {
  1552. // CHECK:STDOUT: package: <namespace> = namespace [concrete] {
  1553. // CHECK:STDOUT: .Core = imports.%Core
  1554. // CHECK:STDOUT: .L2 = %L2.decl
  1555. // CHECK:STDOUT: .Simple5 = %Simple5.decl
  1556. // CHECK:STDOUT: .Compound5 = %Compound5.decl
  1557. // CHECK:STDOUT: }
  1558. // CHECK:STDOUT: %Core.import = import Core
  1559. // CHECK:STDOUT: %L2.decl: type = interface_decl @L2 [concrete = constants.%L2.type] {} {}
  1560. // CHECK:STDOUT: %Simple5.decl: %Simple5.type = fn_decl @Simple5 [concrete = constants.%Simple5] {
  1561. // CHECK:STDOUT: %T.patt: %pattern_type.38f = symbolic_binding_pattern T, 0 [concrete]
  1562. // CHECK:STDOUT: } {
  1563. // CHECK:STDOUT: %.loc10: type = splice_block %L2.ref [concrete = constants.%L2.type] {
  1564. // CHECK:STDOUT: %.Self: %type = symbolic_binding .Self [symbolic_self = constants.%.Self]
  1565. // CHECK:STDOUT: %L2.ref: type = name_ref L2, file.%L2.decl [concrete = constants.%L2.type]
  1566. // CHECK:STDOUT: }
  1567. // CHECK:STDOUT: %T.loc10_12.2: %L2.type = symbolic_binding T, 0 [symbolic = %T.loc10_12.1 (constants.%T)]
  1568. // CHECK:STDOUT: }
  1569. // CHECK:STDOUT: %Compound5.decl: %Compound5.type = fn_decl @Compound5 [concrete = constants.%Compound5] {
  1570. // CHECK:STDOUT: %V.patt: %pattern_type.38f = symbolic_binding_pattern V, 0 [concrete]
  1571. // CHECK:STDOUT: } {
  1572. // CHECK:STDOUT: %.loc30: type = splice_block %L2.ref.loc30 [concrete = constants.%L2.type] {
  1573. // CHECK:STDOUT: %.Self: %type = symbolic_binding .Self [symbolic_self = constants.%.Self]
  1574. // CHECK:STDOUT: %L2.ref.loc30: type = name_ref L2, file.%L2.decl [concrete = constants.%L2.type]
  1575. // CHECK:STDOUT: }
  1576. // CHECK:STDOUT: %V.loc30_14.2: %L2.type = symbolic_binding V, 0 [symbolic = %V.loc30_14.1 (constants.%V)]
  1577. // CHECK:STDOUT: }
  1578. // CHECK:STDOUT: }
  1579. // CHECK:STDOUT:
  1580. // CHECK:STDOUT: interface @L2 {
  1581. // CHECK:STDOUT: %Self: %L2.type = symbolic_binding Self, 0 [symbolic = constants.%Self]
  1582. // CHECK:STDOUT: %L2.R2.decl: %L2.R2.type = fn_decl @L2.R2 [concrete = constants.%L2.R2] {
  1583. // CHECK:STDOUT: %self.patt: @L2.R2.%pattern_type (%pattern_type.c87c75.1) = value_binding_pattern self [concrete]
  1584. // CHECK:STDOUT: %self.param_patt: @L2.R2.%pattern_type (%pattern_type.c87c75.1) = value_param_pattern %self.patt, call_param0 [concrete]
  1585. // CHECK:STDOUT: } {
  1586. // CHECK:STDOUT: %self.param: @L2.R2.%Self.binding.as_type (%Self.binding.as_type) = value_param call_param0
  1587. // CHECK:STDOUT: %.loc5_15.1: type = splice_block %.loc5_15.2 [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)] {
  1588. // CHECK:STDOUT: %Self.ref: %L2.type = name_ref Self, @L2.%Self [symbolic = %Self (constants.%Self)]
  1589. // CHECK:STDOUT: %Self.as_type: type = facet_access_type %Self.ref [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)]
  1590. // CHECK:STDOUT: %.loc5_15.2: type = converted %Self.ref, %Self.as_type [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)]
  1591. // CHECK:STDOUT: }
  1592. // CHECK:STDOUT: %self: @L2.R2.%Self.binding.as_type (%Self.binding.as_type) = value_binding self, %self.param
  1593. // CHECK:STDOUT: }
  1594. // CHECK:STDOUT: %assoc0: %L2.assoc_type = assoc_entity element0, %L2.R2.decl [concrete = constants.%assoc0]
  1595. // CHECK:STDOUT: %L2.S2.decl: %L2.S2.type = fn_decl @L2.S2 [concrete = constants.%L2.S2] {
  1596. // CHECK:STDOUT: %self.patt: @L2.S2.%pattern_type (%pattern_type.2fa31b.1) = value_binding_pattern self [concrete]
  1597. // CHECK:STDOUT: %self.param_patt: @L2.S2.%pattern_type (%pattern_type.2fa31b.1) = value_param_pattern %self.patt, call_param0 [concrete]
  1598. // CHECK:STDOUT: %.loc6_9: %pattern_type.f6d = addr_pattern %self.param_patt [concrete]
  1599. // CHECK:STDOUT: } {
  1600. // CHECK:STDOUT: %self.param: @L2.S2.%ptr.loc6_24.1 (%ptr.707d07.1) = value_param call_param0
  1601. // CHECK:STDOUT: %.loc6_24.1: type = splice_block %ptr.loc6_24.2 [symbolic = %ptr.loc6_24.1 (constants.%ptr.707d07.1)] {
  1602. // CHECK:STDOUT: %Self.ref: %L2.type = name_ref Self, @L2.%Self [symbolic = %Self (constants.%Self)]
  1603. // CHECK:STDOUT: %Self.as_type: type = facet_access_type %Self.ref [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)]
  1604. // CHECK:STDOUT: %.loc6_24.2: type = converted %Self.ref, %Self.as_type [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)]
  1605. // CHECK:STDOUT: %ptr.loc6_24.2: type = ptr_type %.loc6_24.2 [symbolic = %ptr.loc6_24.1 (constants.%ptr.707d07.1)]
  1606. // CHECK:STDOUT: }
  1607. // CHECK:STDOUT: %self: @L2.S2.%ptr.loc6_24.1 (%ptr.707d07.1) = value_binding self, %self.param
  1608. // CHECK:STDOUT: }
  1609. // CHECK:STDOUT: %assoc1: %L2.assoc_type = assoc_entity element1, %L2.S2.decl [concrete = constants.%assoc1]
  1610. // CHECK:STDOUT:
  1611. // CHECK:STDOUT: !members:
  1612. // CHECK:STDOUT: .Self = %Self
  1613. // CHECK:STDOUT: .R2 = %assoc0
  1614. // CHECK:STDOUT: .S2 = %assoc1
  1615. // CHECK:STDOUT: witness = (%L2.R2.decl, %L2.S2.decl)
  1616. // CHECK:STDOUT: }
  1617. // CHECK:STDOUT:
  1618. // CHECK:STDOUT: generic fn @L2.R2(@L2.%Self: %L2.type) {
  1619. // CHECK:STDOUT: %Self: %L2.type = symbolic_binding Self, 0 [symbolic = %Self (constants.%Self)]
  1620. // CHECK:STDOUT: %Self.binding.as_type: type = symbolic_binding_type Self, 0, %Self [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)]
  1621. // CHECK:STDOUT: %pattern_type: type = pattern_type %Self.binding.as_type [symbolic = %pattern_type (constants.%pattern_type.c87c75.1)]
  1622. // CHECK:STDOUT:
  1623. // CHECK:STDOUT: fn(%self.param: @L2.R2.%Self.binding.as_type (%Self.binding.as_type));
  1624. // CHECK:STDOUT: }
  1625. // CHECK:STDOUT:
  1626. // CHECK:STDOUT: generic fn @L2.S2(@L2.%Self: %L2.type) {
  1627. // CHECK:STDOUT: %Self: %L2.type = symbolic_binding Self, 0 [symbolic = %Self (constants.%Self)]
  1628. // CHECK:STDOUT: %Self.binding.as_type: type = symbolic_binding_type Self, 0, %Self [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)]
  1629. // CHECK:STDOUT: %ptr.loc6_24.1: type = ptr_type %Self.binding.as_type [symbolic = %ptr.loc6_24.1 (constants.%ptr.707d07.1)]
  1630. // CHECK:STDOUT: %pattern_type: type = pattern_type %ptr.loc6_24.1 [symbolic = %pattern_type (constants.%pattern_type.2fa31b.1)]
  1631. // CHECK:STDOUT:
  1632. // CHECK:STDOUT: fn(%self.param: @L2.S2.%ptr.loc6_24.1 (%ptr.707d07.1));
  1633. // CHECK:STDOUT: }
  1634. // CHECK:STDOUT:
  1635. // CHECK:STDOUT: generic fn @Simple5(%T.loc10_12.2: %L2.type) {
  1636. // CHECK:STDOUT: %T.loc10_12.1: %L2.type = symbolic_binding T, 0 [symbolic = %T.loc10_12.1 (constants.%T)]
  1637. // CHECK:STDOUT:
  1638. // CHECK:STDOUT: !definition:
  1639. // CHECK:STDOUT: %T.binding.as_type: type = symbolic_binding_type T, 0, %T.loc10_12.1 [symbolic = %T.binding.as_type (constants.%T.binding.as_type)]
  1640. // CHECK:STDOUT: %L2.lookup_impl_witness: <witness> = lookup_impl_witness %T.loc10_12.1, @L2 [symbolic = %L2.lookup_impl_witness (constants.%L2.lookup_impl_witness)]
  1641. // CHECK:STDOUT: %.loc18_4.2: type = fn_type_with_self_type constants.%L2.R2.type, %T.loc10_12.1 [symbolic = %.loc18_4.2 (constants.%.6fc)]
  1642. // CHECK:STDOUT: %impl.elem0.loc18_4.2: @Simple5.%.loc18_4.2 (%.6fc) = impl_witness_access %L2.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc18_4.2 (constants.%impl.elem0)]
  1643. // CHECK:STDOUT: %specific_impl_fn.loc18_4.2: <specific function> = specific_impl_function %impl.elem0.loc18_4.2, @L2.R2(%T.loc10_12.1) [symbolic = %specific_impl_fn.loc18_4.2 (constants.%specific_impl_fn.a65)]
  1644. // CHECK:STDOUT: %.loc26_4.2: type = fn_type_with_self_type constants.%L2.S2.type, %T.loc10_12.1 [symbolic = %.loc26_4.2 (constants.%.0b4)]
  1645. // CHECK:STDOUT: %impl.elem1.loc26_4.2: @Simple5.%.loc26_4.2 (%.0b4) = impl_witness_access %L2.lookup_impl_witness, element1 [symbolic = %impl.elem1.loc26_4.2 (constants.%impl.elem1)]
  1646. // CHECK:STDOUT: %specific_impl_fn.loc26_4.2: <specific function> = specific_impl_function %impl.elem1.loc26_4.2, @L2.S2(%T.loc10_12.1) [symbolic = %specific_impl_fn.loc26_4.2 (constants.%specific_impl_fn.b7b)]
  1647. // CHECK:STDOUT:
  1648. // CHECK:STDOUT: fn() {
  1649. // CHECK:STDOUT: !entry:
  1650. // CHECK:STDOUT: %T.ref.loc18: %L2.type = name_ref T, %T.loc10_12.2 [symbolic = %T.loc10_12.1 (constants.%T)]
  1651. // CHECK:STDOUT: %R2.ref: %L2.assoc_type = name_ref R2, @L2.%assoc0 [concrete = constants.%assoc0]
  1652. // CHECK:STDOUT: %T.as_type.loc18: type = facet_access_type %T.ref.loc18 [symbolic = %T.binding.as_type (constants.%T.binding.as_type)]
  1653. // CHECK:STDOUT: %.loc18_4.1: type = converted %T.ref.loc18, %T.as_type.loc18 [symbolic = %T.binding.as_type (constants.%T.binding.as_type)]
  1654. // CHECK:STDOUT: %impl.elem0.loc18_4.1: @Simple5.%.loc18_4.2 (%.6fc) = impl_witness_access constants.%L2.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc18_4.2 (constants.%impl.elem0)]
  1655. // CHECK:STDOUT: %specific_impl_fn.loc18_4.1: <specific function> = specific_impl_function %impl.elem0.loc18_4.1, @L2.R2(constants.%T) [symbolic = %specific_impl_fn.loc18_4.2 (constants.%specific_impl_fn.a65)]
  1656. // CHECK:STDOUT: %.loc18_8: init %empty_tuple.type = call %specific_impl_fn.loc18_4.1(<error>) [concrete = <error>]
  1657. // CHECK:STDOUT: %T.ref.loc26: %L2.type = name_ref T, %T.loc10_12.2 [symbolic = %T.loc10_12.1 (constants.%T)]
  1658. // CHECK:STDOUT: %S2.ref: %L2.assoc_type = name_ref S2, @L2.%assoc1 [concrete = constants.%assoc1]
  1659. // CHECK:STDOUT: %T.as_type.loc26: type = facet_access_type %T.ref.loc26 [symbolic = %T.binding.as_type (constants.%T.binding.as_type)]
  1660. // CHECK:STDOUT: %.loc26_4.1: type = converted %T.ref.loc26, %T.as_type.loc26 [symbolic = %T.binding.as_type (constants.%T.binding.as_type)]
  1661. // CHECK:STDOUT: %impl.elem1.loc26_4.1: @Simple5.%.loc26_4.2 (%.0b4) = impl_witness_access constants.%L2.lookup_impl_witness, element1 [symbolic = %impl.elem1.loc26_4.2 (constants.%impl.elem1)]
  1662. // CHECK:STDOUT: %specific_impl_fn.loc26_4.1: <specific function> = specific_impl_function %impl.elem1.loc26_4.1, @L2.S2(constants.%T) [symbolic = %specific_impl_fn.loc26_4.2 (constants.%specific_impl_fn.b7b)]
  1663. // CHECK:STDOUT: %addr: <error> = addr_of <error> [concrete = <error>]
  1664. // CHECK:STDOUT: %.loc26_8: init %empty_tuple.type = call %specific_impl_fn.loc26_4.1(<error>) [concrete = <error>]
  1665. // CHECK:STDOUT: return
  1666. // CHECK:STDOUT: }
  1667. // CHECK:STDOUT: }
  1668. // CHECK:STDOUT:
  1669. // CHECK:STDOUT: generic fn @Compound5(%V.loc30_14.2: %L2.type) {
  1670. // CHECK:STDOUT: %V.loc30_14.1: %L2.type = symbolic_binding V, 0 [symbolic = %V.loc30_14.1 (constants.%V)]
  1671. // CHECK:STDOUT:
  1672. // CHECK:STDOUT: !definition:
  1673. // CHECK:STDOUT:
  1674. // CHECK:STDOUT: fn() {
  1675. // CHECK:STDOUT: !entry:
  1676. // CHECK:STDOUT: %V.ref.loc35: %L2.type = name_ref V, %V.loc30_14.2 [symbolic = %V.loc30_14.1 (constants.%V)]
  1677. // CHECK:STDOUT: %L2.ref.loc35: type = name_ref L2, file.%L2.decl [concrete = constants.%L2.type]
  1678. // CHECK:STDOUT: %R2.ref: %L2.assoc_type = name_ref R2, @L2.%assoc0 [concrete = constants.%assoc0]
  1679. // CHECK:STDOUT: %V.ref.loc40: %L2.type = name_ref V, %V.loc30_14.2 [symbolic = %V.loc30_14.1 (constants.%V)]
  1680. // CHECK:STDOUT: %L2.ref.loc40: type = name_ref L2, file.%L2.decl [concrete = constants.%L2.type]
  1681. // CHECK:STDOUT: %S2.ref: %L2.assoc_type = name_ref S2, @L2.%assoc1 [concrete = constants.%assoc1]
  1682. // CHECK:STDOUT: return
  1683. // CHECK:STDOUT: }
  1684. // CHECK:STDOUT: }
  1685. // CHECK:STDOUT:
  1686. // CHECK:STDOUT: specific @L2.R2(constants.%Self) {
  1687. // CHECK:STDOUT: %Self => constants.%Self
  1688. // CHECK:STDOUT: %Self.binding.as_type => constants.%Self.binding.as_type
  1689. // CHECK:STDOUT: %pattern_type => constants.%pattern_type.c87c75.1
  1690. // CHECK:STDOUT: }
  1691. // CHECK:STDOUT:
  1692. // CHECK:STDOUT: specific @L2.S2(constants.%Self) {
  1693. // CHECK:STDOUT: %Self => constants.%Self
  1694. // CHECK:STDOUT: %Self.binding.as_type => constants.%Self.binding.as_type
  1695. // CHECK:STDOUT: %ptr.loc6_24.1 => constants.%ptr.707d07.1
  1696. // CHECK:STDOUT: %pattern_type => constants.%pattern_type.2fa31b.1
  1697. // CHECK:STDOUT: }
  1698. // CHECK:STDOUT:
  1699. // CHECK:STDOUT: specific @Simple5(constants.%T) {
  1700. // CHECK:STDOUT: %T.loc10_12.1 => constants.%T
  1701. // CHECK:STDOUT: }
  1702. // CHECK:STDOUT:
  1703. // CHECK:STDOUT: specific @L2.R2(constants.%T) {
  1704. // CHECK:STDOUT: %Self => constants.%T
  1705. // CHECK:STDOUT: %Self.binding.as_type => constants.%T.binding.as_type
  1706. // CHECK:STDOUT: %pattern_type => constants.%pattern_type.c87c75.2
  1707. // CHECK:STDOUT: }
  1708. // CHECK:STDOUT:
  1709. // CHECK:STDOUT: specific @L2.S2(constants.%T) {
  1710. // CHECK:STDOUT: %Self => constants.%T
  1711. // CHECK:STDOUT: %Self.binding.as_type => constants.%T.binding.as_type
  1712. // CHECK:STDOUT: %ptr.loc6_24.1 => constants.%ptr.707d07.2
  1713. // CHECK:STDOUT: %pattern_type => constants.%pattern_type.2fa31b.2
  1714. // CHECK:STDOUT: }
  1715. // CHECK:STDOUT:
  1716. // CHECK:STDOUT: specific @Compound5(constants.%V) {
  1717. // CHECK:STDOUT: %V.loc30_14.1 => constants.%V
  1718. // CHECK:STDOUT: }
  1719. // CHECK:STDOUT:
  1720. // CHECK:STDOUT: --- fail_combine_non_instance.carbon
  1721. // CHECK:STDOUT:
  1722. // CHECK:STDOUT: constants {
  1723. // CHECK:STDOUT: %A.type: type = facet_type <@A> [concrete]
  1724. // CHECK:STDOUT: %Self.803: %A.type = symbolic_binding Self, 0 [symbolic]
  1725. // CHECK:STDOUT: %A.G.type: type = fn_type @A.G [concrete]
  1726. // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete]
  1727. // CHECK:STDOUT: %A.G: %A.G.type = struct_value () [concrete]
  1728. // CHECK:STDOUT: %A.assoc_type: type = assoc_entity_type @A [concrete]
  1729. // CHECK:STDOUT: %assoc0.d52: %A.assoc_type = assoc_entity element0, @A.%A.G.decl [concrete]
  1730. // CHECK:STDOUT: %C: type = class_type @C [concrete]
  1731. // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete]
  1732. // CHECK:STDOUT: %complete_type.357: <witness> = complete_type_witness %empty_struct_type [concrete]
  1733. // CHECK:STDOUT: %A.impl_witness: <witness> = impl_witness file.%A.impl_witness_table [concrete]
  1734. // CHECK:STDOUT: %C.as.A.impl.G.type: type = fn_type @C.as.A.impl.G [concrete]
  1735. // CHECK:STDOUT: %C.as.A.impl.G: %C.as.A.impl.G.type = struct_value () [concrete]
  1736. // CHECK:STDOUT: %A.facet: %A.type = facet_value %C, (%A.impl_witness) [concrete]
  1737. // CHECK:STDOUT: %Fails.type: type = fn_type @Fails [concrete]
  1738. // CHECK:STDOUT: %Fails: %Fails.type = struct_value () [concrete]
  1739. // CHECK:STDOUT: %C.val: %C = struct_value () [concrete]
  1740. // CHECK:STDOUT: %BitAndWith.type.f2e: type = generic_interface_type @BitAndWith [concrete]
  1741. // CHECK:STDOUT: %BitAndWith.generic: %BitAndWith.type.f2e = struct_value () [concrete]
  1742. // CHECK:STDOUT: %BitAndWith.type.8a6: type = facet_type <@BitAndWith, @BitAndWith(type)> [concrete]
  1743. // CHECK:STDOUT: %BitAndWith.Op.type.9a3: type = fn_type @BitAndWith.Op, @BitAndWith(type) [concrete]
  1744. // CHECK:STDOUT: %BitAndWith.impl_witness: <witness> = impl_witness imports.%BitAndWith.impl_witness_table [concrete]
  1745. // CHECK:STDOUT: %BitAndWith.facet: %BitAndWith.type.8a6 = facet_value type, (%BitAndWith.impl_witness) [concrete]
  1746. // CHECK:STDOUT: %.fa7: type = fn_type_with_self_type %BitAndWith.Op.type.9a3, %BitAndWith.facet [concrete]
  1747. // CHECK:STDOUT: %type.as.BitAndWith.impl.Op.type: type = fn_type @type.as.BitAndWith.impl.Op [concrete]
  1748. // CHECK:STDOUT: %type.as.BitAndWith.impl.Op: %type.as.BitAndWith.impl.Op.type = struct_value () [concrete]
  1749. // CHECK:STDOUT: %type.as.BitAndWith.impl.Op.bound: <bound method> = bound_method %A.type, %type.as.BitAndWith.impl.Op [concrete]
  1750. // CHECK:STDOUT: %ImplicitAs.type.cc7: type = generic_interface_type @ImplicitAs [concrete]
  1751. // CHECK:STDOUT: %ImplicitAs.generic: %ImplicitAs.type.cc7 = struct_value () [concrete]
  1752. // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete]
  1753. // CHECK:STDOUT: %type_where: type = facet_type <type where .Self impls <CanDestroy>> [concrete]
  1754. // CHECK:STDOUT: %facet_value: %type_where = facet_value %C, () [concrete]
  1755. // CHECK:STDOUT: %DestroyT.binding.as_type.as.Destroy.impl.Op.type.eeb: type = fn_type @DestroyT.binding.as_type.as.Destroy.impl.Op, @DestroyT.binding.as_type.as.Destroy.impl(%facet_value) [concrete]
  1756. // CHECK:STDOUT: %DestroyT.binding.as_type.as.Destroy.impl.Op.88a: %DestroyT.binding.as_type.as.Destroy.impl.Op.type.eeb = struct_value () [concrete]
  1757. // CHECK:STDOUT: %ptr.019: type = ptr_type %C [concrete]
  1758. // CHECK:STDOUT: %DestroyT.binding.as_type.as.Destroy.impl.Op.specific_fn: <specific function> = specific_function %DestroyT.binding.as_type.as.Destroy.impl.Op.88a, @DestroyT.binding.as_type.as.Destroy.impl.Op(%facet_value) [concrete]
  1759. // CHECK:STDOUT: }
  1760. // CHECK:STDOUT:
  1761. // CHECK:STDOUT: imports {
  1762. // CHECK:STDOUT: %Core: <namespace> = namespace file.%Core.import, [concrete] {
  1763. // CHECK:STDOUT: .BitAndWith = %Core.BitAndWith
  1764. // CHECK:STDOUT: .ImplicitAs = %Core.ImplicitAs
  1765. // CHECK:STDOUT: .Destroy = %Core.Destroy
  1766. // CHECK:STDOUT: import Core//prelude
  1767. // CHECK:STDOUT: import Core//prelude/...
  1768. // CHECK:STDOUT: }
  1769. // CHECK:STDOUT: %Core.BitAndWith: %BitAndWith.type.f2e = import_ref Core//prelude/parts/as, BitAndWith, loaded [concrete = constants.%BitAndWith.generic]
  1770. // CHECK:STDOUT: %Core.import_ref.636: %type.as.BitAndWith.impl.Op.type = import_ref Core//prelude/parts/as, loc{{\d+_\d+}}, loaded [concrete = constants.%type.as.BitAndWith.impl.Op]
  1771. // CHECK:STDOUT: %BitAndWith.impl_witness_table = impl_witness_table (%Core.import_ref.636), @type.as.BitAndWith.impl [concrete]
  1772. // CHECK:STDOUT: %Core.ImplicitAs: %ImplicitAs.type.cc7 = import_ref Core//prelude/parts/as, ImplicitAs, loaded [concrete = constants.%ImplicitAs.generic]
  1773. // CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type]
  1774. // CHECK:STDOUT: }
  1775. // CHECK:STDOUT:
  1776. // CHECK:STDOUT: file {
  1777. // CHECK:STDOUT: package: <namespace> = namespace [concrete] {
  1778. // CHECK:STDOUT: .Core = imports.%Core
  1779. // CHECK:STDOUT: .A = %A.decl
  1780. // CHECK:STDOUT: .C = %C.decl
  1781. // CHECK:STDOUT: .Fails = %Fails.decl
  1782. // CHECK:STDOUT: }
  1783. // CHECK:STDOUT: %Core.import = import Core
  1784. // CHECK:STDOUT: %A.decl: type = interface_decl @A [concrete = constants.%A.type] {} {}
  1785. // CHECK:STDOUT: %C.decl: type = class_decl @C [concrete = constants.%C] {} {}
  1786. // CHECK:STDOUT: impl_decl @C.as.A.impl [concrete] {} {
  1787. // CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [concrete = constants.%C]
  1788. // CHECK:STDOUT: %A.ref: type = name_ref A, file.%A.decl [concrete = constants.%A.type]
  1789. // CHECK:STDOUT: }
  1790. // CHECK:STDOUT: %A.impl_witness_table = impl_witness_table (@C.as.A.impl.%C.as.A.impl.G.decl), @C.as.A.impl [concrete]
  1791. // CHECK:STDOUT: %A.impl_witness: <witness> = impl_witness %A.impl_witness_table [concrete = constants.%A.impl_witness]
  1792. // CHECK:STDOUT: %Fails.decl: %Fails.type = fn_decl @Fails [concrete = constants.%Fails] {} {}
  1793. // CHECK:STDOUT: }
  1794. // CHECK:STDOUT:
  1795. // CHECK:STDOUT: interface @A {
  1796. // CHECK:STDOUT: %Self: %A.type = symbolic_binding Self, 0 [symbolic = constants.%Self.803]
  1797. // CHECK:STDOUT: %A.G.decl: %A.G.type = fn_decl @A.G [concrete = constants.%A.G] {} {}
  1798. // CHECK:STDOUT: %assoc0: %A.assoc_type = assoc_entity element0, %A.G.decl [concrete = constants.%assoc0.d52]
  1799. // CHECK:STDOUT:
  1800. // CHECK:STDOUT: !members:
  1801. // CHECK:STDOUT: .Self = %Self
  1802. // CHECK:STDOUT: .G = %assoc0
  1803. // CHECK:STDOUT: witness = (%A.G.decl)
  1804. // CHECK:STDOUT: }
  1805. // CHECK:STDOUT:
  1806. // CHECK:STDOUT: impl @C.as.A.impl: %C.ref as %A.ref {
  1807. // CHECK:STDOUT: %C.as.A.impl.G.decl: %C.as.A.impl.G.type = fn_decl @C.as.A.impl.G [concrete = constants.%C.as.A.impl.G] {} {}
  1808. // CHECK:STDOUT:
  1809. // CHECK:STDOUT: !members:
  1810. // CHECK:STDOUT: .G = %C.as.A.impl.G.decl
  1811. // CHECK:STDOUT: witness = file.%A.impl_witness
  1812. // CHECK:STDOUT: }
  1813. // CHECK:STDOUT:
  1814. // CHECK:STDOUT: class @C {
  1815. // CHECK:STDOUT: %complete_type: <witness> = complete_type_witness constants.%empty_struct_type [concrete = constants.%complete_type.357]
  1816. // CHECK:STDOUT: complete_type_witness = %complete_type
  1817. // CHECK:STDOUT:
  1818. // CHECK:STDOUT: !members:
  1819. // CHECK:STDOUT: .Self = constants.%C
  1820. // CHECK:STDOUT: }
  1821. // CHECK:STDOUT:
  1822. // CHECK:STDOUT: generic fn @A.G(@A.%Self: %A.type) {
  1823. // CHECK:STDOUT: fn();
  1824. // CHECK:STDOUT: }
  1825. // CHECK:STDOUT:
  1826. // CHECK:STDOUT: fn @C.as.A.impl.G() {
  1827. // CHECK:STDOUT: !entry:
  1828. // CHECK:STDOUT: return
  1829. // CHECK:STDOUT: }
  1830. // CHECK:STDOUT:
  1831. // CHECK:STDOUT: fn @Fails() {
  1832. // CHECK:STDOUT: !entry:
  1833. // CHECK:STDOUT: %.loc22_5.1: %empty_struct_type = struct_literal ()
  1834. // CHECK:STDOUT: %C.ref.loc22: type = name_ref C, file.%C.decl [concrete = constants.%C]
  1835. // CHECK:STDOUT: %.loc22_5.2: ref %C = temporary_storage
  1836. // CHECK:STDOUT: %.loc22_5.3: init %C = class_init (), %.loc22_5.2 [concrete = constants.%C.val]
  1837. // CHECK:STDOUT: %.loc22_5.4: ref %C = temporary %.loc22_5.2, %.loc22_5.3
  1838. // CHECK:STDOUT: %.loc22_7: ref %C = converted %.loc22_5.1, %.loc22_5.4
  1839. // CHECK:STDOUT: %A.ref.loc22_15: type = name_ref A, file.%A.decl [concrete = constants.%A.type]
  1840. // CHECK:STDOUT: %A.ref.loc22_19: type = name_ref A, file.%A.decl [concrete = constants.%A.type]
  1841. // CHECK:STDOUT: %impl.elem0.loc22: %.fa7 = impl_witness_access constants.%BitAndWith.impl_witness, element0 [concrete = constants.%type.as.BitAndWith.impl.Op]
  1842. // CHECK:STDOUT: %bound_method.loc22_17: <bound method> = bound_method %A.ref.loc22_15, %impl.elem0.loc22 [concrete = constants.%type.as.BitAndWith.impl.Op.bound]
  1843. // CHECK:STDOUT: %type.as.BitAndWith.impl.Op.call.loc22: init type = call %bound_method.loc22_17(%A.ref.loc22_15, %A.ref.loc22_19) [concrete = constants.%A.type]
  1844. // CHECK:STDOUT: %G.ref.loc22: %A.assoc_type = name_ref G, @A.%assoc0 [concrete = constants.%assoc0.d52]
  1845. // CHECK:STDOUT: %.loc22_12: %A.type = converted %.loc22_7, <error> [concrete = <error>]
  1846. // CHECK:STDOUT: %.loc30_6.1: %empty_struct_type = struct_literal ()
  1847. // CHECK:STDOUT: %C.ref.loc30_11: type = name_ref C, file.%C.decl [concrete = constants.%C]
  1848. // CHECK:STDOUT: %.loc30_6.2: ref %C = temporary_storage
  1849. // CHECK:STDOUT: %.loc30_6.3: init %C = class_init (), %.loc30_6.2 [concrete = constants.%C.val]
  1850. // CHECK:STDOUT: %.loc30_6.4: ref %C = temporary %.loc30_6.2, %.loc30_6.3
  1851. // CHECK:STDOUT: %.loc30_8: ref %C = converted %.loc30_6.1, %.loc30_6.4
  1852. // CHECK:STDOUT: %C.ref.loc30_18: type = name_ref C, file.%C.decl [concrete = constants.%C]
  1853. // CHECK:STDOUT: %A.ref.loc30_24: type = name_ref A, file.%A.decl [concrete = constants.%A.type]
  1854. // CHECK:STDOUT: %A.ref.loc30_28: type = name_ref A, file.%A.decl [concrete = constants.%A.type]
  1855. // CHECK:STDOUT: %impl.elem0.loc30_26: %.fa7 = impl_witness_access constants.%BitAndWith.impl_witness, element0 [concrete = constants.%type.as.BitAndWith.impl.Op]
  1856. // CHECK:STDOUT: %bound_method.loc30_26: <bound method> = bound_method %A.ref.loc30_24, %impl.elem0.loc30_26 [concrete = constants.%type.as.BitAndWith.impl.Op.bound]
  1857. // CHECK:STDOUT: %type.as.BitAndWith.impl.Op.call.loc30_26: init type = call %bound_method.loc30_26(%A.ref.loc30_24, %A.ref.loc30_28) [concrete = constants.%A.type]
  1858. // CHECK:STDOUT: %.loc30_29.1: type = value_of_initializer %type.as.BitAndWith.impl.Op.call.loc30_26 [concrete = constants.%A.type]
  1859. // CHECK:STDOUT: %.loc30_29.2: type = converted %type.as.BitAndWith.impl.Op.call.loc30_26, %.loc30_29.1 [concrete = constants.%A.type]
  1860. // CHECK:STDOUT: %A.facet.loc30: %A.type = facet_value %C.ref.loc30_18, (constants.%A.impl_witness) [concrete = constants.%A.facet]
  1861. // CHECK:STDOUT: %.loc30_20: %A.type = converted %C.ref.loc30_18, %A.facet.loc30 [concrete = constants.%A.facet]
  1862. // CHECK:STDOUT: %as_type.loc30: type = facet_access_type %.loc30_20 [concrete = constants.%C]
  1863. // CHECK:STDOUT: %.loc30_30: type = converted %.loc30_20, %as_type.loc30 [concrete = constants.%C]
  1864. // CHECK:STDOUT: %A.ref.loc30_35: type = name_ref A, file.%A.decl [concrete = constants.%A.type]
  1865. // CHECK:STDOUT: %A.ref.loc30_39: type = name_ref A, file.%A.decl [concrete = constants.%A.type]
  1866. // CHECK:STDOUT: %impl.elem0.loc30_37: %.fa7 = impl_witness_access constants.%BitAndWith.impl_witness, element0 [concrete = constants.%type.as.BitAndWith.impl.Op]
  1867. // CHECK:STDOUT: %bound_method.loc30_37: <bound method> = bound_method %A.ref.loc30_35, %impl.elem0.loc30_37 [concrete = constants.%type.as.BitAndWith.impl.Op.bound]
  1868. // CHECK:STDOUT: %type.as.BitAndWith.impl.Op.call.loc30_37: init type = call %bound_method.loc30_37(%A.ref.loc30_35, %A.ref.loc30_39) [concrete = constants.%A.type]
  1869. // CHECK:STDOUT: %G.ref.loc30: %A.assoc_type = name_ref G, @A.%assoc0 [concrete = constants.%assoc0.d52]
  1870. // CHECK:STDOUT: %.loc30_32: %A.type = converted %.loc30_8, <error> [concrete = <error>]
  1871. // CHECK:STDOUT: %.loc38_6.1: %empty_struct_type = struct_literal ()
  1872. // CHECK:STDOUT: %C.ref.loc38_11: type = name_ref C, file.%C.decl [concrete = constants.%C]
  1873. // CHECK:STDOUT: %.loc38_6.2: ref %C = temporary_storage
  1874. // CHECK:STDOUT: %.loc38_6.3: init %C = class_init (), %.loc38_6.2 [concrete = constants.%C.val]
  1875. // CHECK:STDOUT: %.loc38_6.4: ref %C = temporary %.loc38_6.2, %.loc38_6.3
  1876. // CHECK:STDOUT: %.loc38_8: ref %C = converted %.loc38_6.1, %.loc38_6.4
  1877. // CHECK:STDOUT: %C.ref.loc38_18: type = name_ref C, file.%C.decl [concrete = constants.%C]
  1878. // CHECK:STDOUT: %A.ref.loc38_24: type = name_ref A, file.%A.decl [concrete = constants.%A.type]
  1879. // CHECK:STDOUT: %A.ref.loc38_28: type = name_ref A, file.%A.decl [concrete = constants.%A.type]
  1880. // CHECK:STDOUT: %impl.elem0.loc38: %.fa7 = impl_witness_access constants.%BitAndWith.impl_witness, element0 [concrete = constants.%type.as.BitAndWith.impl.Op]
  1881. // CHECK:STDOUT: %bound_method.loc38_26: <bound method> = bound_method %A.ref.loc38_24, %impl.elem0.loc38 [concrete = constants.%type.as.BitAndWith.impl.Op.bound]
  1882. // CHECK:STDOUT: %type.as.BitAndWith.impl.Op.call.loc38: init type = call %bound_method.loc38_26(%A.ref.loc38_24, %A.ref.loc38_28) [concrete = constants.%A.type]
  1883. // CHECK:STDOUT: %.loc38_29.1: type = value_of_initializer %type.as.BitAndWith.impl.Op.call.loc38 [concrete = constants.%A.type]
  1884. // CHECK:STDOUT: %.loc38_29.2: type = converted %type.as.BitAndWith.impl.Op.call.loc38, %.loc38_29.1 [concrete = constants.%A.type]
  1885. // CHECK:STDOUT: %A.facet.loc38: %A.type = facet_value %C.ref.loc38_18, (constants.%A.impl_witness) [concrete = constants.%A.facet]
  1886. // CHECK:STDOUT: %.loc38_20: %A.type = converted %C.ref.loc38_18, %A.facet.loc38 [concrete = constants.%A.facet]
  1887. // CHECK:STDOUT: %as_type.loc38: type = facet_access_type %.loc38_20 [concrete = constants.%C]
  1888. // CHECK:STDOUT: %.loc38_30: type = converted %.loc38_20, %as_type.loc38 [concrete = constants.%C]
  1889. // CHECK:STDOUT: %A.ref.loc38_34: type = name_ref A, file.%A.decl [concrete = constants.%A.type]
  1890. // CHECK:STDOUT: %G.ref.loc38: %A.assoc_type = name_ref G, @A.%assoc0 [concrete = constants.%assoc0.d52]
  1891. // CHECK:STDOUT: %.loc38_32: %A.type = converted %.loc38_8, <error> [concrete = <error>]
  1892. // CHECK:STDOUT: %DestroyT.binding.as_type.as.Destroy.impl.Op.bound.loc38: <bound method> = bound_method %.loc38_6.4, constants.%DestroyT.binding.as_type.as.Destroy.impl.Op.88a
  1893. // CHECK:STDOUT: %DestroyT.binding.as_type.as.Destroy.impl.Op.specific_fn.1: <specific function> = specific_function constants.%DestroyT.binding.as_type.as.Destroy.impl.Op.88a, @DestroyT.binding.as_type.as.Destroy.impl.Op(constants.%facet_value) [concrete = constants.%DestroyT.binding.as_type.as.Destroy.impl.Op.specific_fn]
  1894. // CHECK:STDOUT: %bound_method.loc38_6: <bound method> = bound_method %.loc38_6.4, %DestroyT.binding.as_type.as.Destroy.impl.Op.specific_fn.1
  1895. // CHECK:STDOUT: %addr.loc38: %ptr.019 = addr_of %.loc38_6.4
  1896. // CHECK:STDOUT: %DestroyT.binding.as_type.as.Destroy.impl.Op.call.loc38: init %empty_tuple.type = call %bound_method.loc38_6(%addr.loc38)
  1897. // CHECK:STDOUT: %DestroyT.binding.as_type.as.Destroy.impl.Op.bound.loc30: <bound method> = bound_method %.loc30_6.4, constants.%DestroyT.binding.as_type.as.Destroy.impl.Op.88a
  1898. // CHECK:STDOUT: %DestroyT.binding.as_type.as.Destroy.impl.Op.specific_fn.2: <specific function> = specific_function constants.%DestroyT.binding.as_type.as.Destroy.impl.Op.88a, @DestroyT.binding.as_type.as.Destroy.impl.Op(constants.%facet_value) [concrete = constants.%DestroyT.binding.as_type.as.Destroy.impl.Op.specific_fn]
  1899. // CHECK:STDOUT: %bound_method.loc30_6: <bound method> = bound_method %.loc30_6.4, %DestroyT.binding.as_type.as.Destroy.impl.Op.specific_fn.2
  1900. // CHECK:STDOUT: %addr.loc30: %ptr.019 = addr_of %.loc30_6.4
  1901. // CHECK:STDOUT: %DestroyT.binding.as_type.as.Destroy.impl.Op.call.loc30: init %empty_tuple.type = call %bound_method.loc30_6(%addr.loc30)
  1902. // CHECK:STDOUT: %DestroyT.binding.as_type.as.Destroy.impl.Op.bound.loc22: <bound method> = bound_method %.loc22_5.4, constants.%DestroyT.binding.as_type.as.Destroy.impl.Op.88a
  1903. // CHECK:STDOUT: %DestroyT.binding.as_type.as.Destroy.impl.Op.specific_fn.3: <specific function> = specific_function constants.%DestroyT.binding.as_type.as.Destroy.impl.Op.88a, @DestroyT.binding.as_type.as.Destroy.impl.Op(constants.%facet_value) [concrete = constants.%DestroyT.binding.as_type.as.Destroy.impl.Op.specific_fn]
  1904. // CHECK:STDOUT: %bound_method.loc22_5: <bound method> = bound_method %.loc22_5.4, %DestroyT.binding.as_type.as.Destroy.impl.Op.specific_fn.3
  1905. // CHECK:STDOUT: %addr.loc22: %ptr.019 = addr_of %.loc22_5.4
  1906. // CHECK:STDOUT: %DestroyT.binding.as_type.as.Destroy.impl.Op.call.loc22: init %empty_tuple.type = call %bound_method.loc22_5(%addr.loc22)
  1907. // CHECK:STDOUT: return
  1908. // CHECK:STDOUT: }
  1909. // CHECK:STDOUT:
  1910. // CHECK:STDOUT: specific @A.G(constants.%Self.803) {}
  1911. // CHECK:STDOUT:
  1912. // CHECK:STDOUT: specific @A.G(constants.%A.facet) {}
  1913. // CHECK:STDOUT:
  1914. // CHECK:STDOUT: --- allowed_combine_non_instance.carbon
  1915. // CHECK:STDOUT:
  1916. // CHECK:STDOUT: constants {
  1917. // CHECK:STDOUT: %A.type: type = facet_type <@A> [concrete]
  1918. // CHECK:STDOUT: %Self.803: %A.type = symbolic_binding Self, 0 [symbolic]
  1919. // CHECK:STDOUT: %A.G.type: type = fn_type @A.G [concrete]
  1920. // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete]
  1921. // CHECK:STDOUT: %A.G: %A.G.type = struct_value () [concrete]
  1922. // CHECK:STDOUT: %A.assoc_type: type = assoc_entity_type @A [concrete]
  1923. // CHECK:STDOUT: %assoc0.d52: %A.assoc_type = assoc_entity element0, @A.%A.G.decl [concrete]
  1924. // CHECK:STDOUT: %C: type = class_type @C [concrete]
  1925. // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete]
  1926. // CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %empty_struct_type [concrete]
  1927. // CHECK:STDOUT: %A.impl_witness: <witness> = impl_witness file.%A.impl_witness_table [concrete]
  1928. // CHECK:STDOUT: %C.as.A.impl.G.type: type = fn_type @C.as.A.impl.G [concrete]
  1929. // CHECK:STDOUT: %C.as.A.impl.G: %C.as.A.impl.G.type = struct_value () [concrete]
  1930. // CHECK:STDOUT: %A.facet: %A.type = facet_value %C, (%A.impl_witness) [concrete]
  1931. // CHECK:STDOUT: %Works.type: type = fn_type @Works [concrete]
  1932. // CHECK:STDOUT: %Works: %Works.type = struct_value () [concrete]
  1933. // CHECK:STDOUT: %BitAndWith.type.f2e: type = generic_interface_type @BitAndWith [concrete]
  1934. // CHECK:STDOUT: %BitAndWith.generic: %BitAndWith.type.f2e = struct_value () [concrete]
  1935. // CHECK:STDOUT: %BitAndWith.type.8a6: type = facet_type <@BitAndWith, @BitAndWith(type)> [concrete]
  1936. // CHECK:STDOUT: %BitAndWith.Op.type.9a3: type = fn_type @BitAndWith.Op, @BitAndWith(type) [concrete]
  1937. // CHECK:STDOUT: %BitAndWith.impl_witness: <witness> = impl_witness imports.%BitAndWith.impl_witness_table [concrete]
  1938. // CHECK:STDOUT: %BitAndWith.facet: %BitAndWith.type.8a6 = facet_value type, (%BitAndWith.impl_witness) [concrete]
  1939. // CHECK:STDOUT: %.fa7: type = fn_type_with_self_type %BitAndWith.Op.type.9a3, %BitAndWith.facet [concrete]
  1940. // CHECK:STDOUT: %type.as.BitAndWith.impl.Op.type: type = fn_type @type.as.BitAndWith.impl.Op [concrete]
  1941. // CHECK:STDOUT: %type.as.BitAndWith.impl.Op: %type.as.BitAndWith.impl.Op.type = struct_value () [concrete]
  1942. // CHECK:STDOUT: %type.as.BitAndWith.impl.Op.bound: <bound method> = bound_method %A.type, %type.as.BitAndWith.impl.Op [concrete]
  1943. // CHECK:STDOUT: %.69a: type = fn_type_with_self_type %A.G.type, %A.facet [concrete]
  1944. // CHECK:STDOUT: }
  1945. // CHECK:STDOUT:
  1946. // CHECK:STDOUT: imports {
  1947. // CHECK:STDOUT: %Core: <namespace> = namespace file.%Core.import, [concrete] {
  1948. // CHECK:STDOUT: .BitAndWith = %Core.BitAndWith
  1949. // CHECK:STDOUT: import Core//prelude
  1950. // CHECK:STDOUT: import Core//prelude/...
  1951. // CHECK:STDOUT: }
  1952. // CHECK:STDOUT: %Core.BitAndWith: %BitAndWith.type.f2e = import_ref Core//prelude/parts/as, BitAndWith, loaded [concrete = constants.%BitAndWith.generic]
  1953. // CHECK:STDOUT: %Core.import_ref.636: %type.as.BitAndWith.impl.Op.type = import_ref Core//prelude/parts/as, loc{{\d+_\d+}}, loaded [concrete = constants.%type.as.BitAndWith.impl.Op]
  1954. // CHECK:STDOUT: %BitAndWith.impl_witness_table = impl_witness_table (%Core.import_ref.636), @type.as.BitAndWith.impl [concrete]
  1955. // CHECK:STDOUT: }
  1956. // CHECK:STDOUT:
  1957. // CHECK:STDOUT: file {
  1958. // CHECK:STDOUT: package: <namespace> = namespace [concrete] {
  1959. // CHECK:STDOUT: .Core = imports.%Core
  1960. // CHECK:STDOUT: .A = %A.decl
  1961. // CHECK:STDOUT: .C = %C.decl
  1962. // CHECK:STDOUT: .Works = %Works.decl
  1963. // CHECK:STDOUT: }
  1964. // CHECK:STDOUT: %Core.import = import Core
  1965. // CHECK:STDOUT: %A.decl: type = interface_decl @A [concrete = constants.%A.type] {} {}
  1966. // CHECK:STDOUT: %C.decl: type = class_decl @C [concrete = constants.%C] {} {}
  1967. // CHECK:STDOUT: impl_decl @C.as.A.impl [concrete] {} {
  1968. // CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [concrete = constants.%C]
  1969. // CHECK:STDOUT: %A.ref: type = name_ref A, file.%A.decl [concrete = constants.%A.type]
  1970. // CHECK:STDOUT: }
  1971. // CHECK:STDOUT: %A.impl_witness_table = impl_witness_table (@C.as.A.impl.%C.as.A.impl.G.decl), @C.as.A.impl [concrete]
  1972. // CHECK:STDOUT: %A.impl_witness: <witness> = impl_witness %A.impl_witness_table [concrete = constants.%A.impl_witness]
  1973. // CHECK:STDOUT: %Works.decl: %Works.type = fn_decl @Works [concrete = constants.%Works] {} {}
  1974. // CHECK:STDOUT: }
  1975. // CHECK:STDOUT:
  1976. // CHECK:STDOUT: interface @A {
  1977. // CHECK:STDOUT: %Self: %A.type = symbolic_binding Self, 0 [symbolic = constants.%Self.803]
  1978. // CHECK:STDOUT: %A.G.decl: %A.G.type = fn_decl @A.G [concrete = constants.%A.G] {} {}
  1979. // CHECK:STDOUT: %assoc0: %A.assoc_type = assoc_entity element0, %A.G.decl [concrete = constants.%assoc0.d52]
  1980. // CHECK:STDOUT:
  1981. // CHECK:STDOUT: !members:
  1982. // CHECK:STDOUT: .Self = %Self
  1983. // CHECK:STDOUT: .G = %assoc0
  1984. // CHECK:STDOUT: witness = (%A.G.decl)
  1985. // CHECK:STDOUT: }
  1986. // CHECK:STDOUT:
  1987. // CHECK:STDOUT: impl @C.as.A.impl: %C.ref as %A.ref {
  1988. // CHECK:STDOUT: %C.as.A.impl.G.decl: %C.as.A.impl.G.type = fn_decl @C.as.A.impl.G [concrete = constants.%C.as.A.impl.G] {} {}
  1989. // CHECK:STDOUT:
  1990. // CHECK:STDOUT: !members:
  1991. // CHECK:STDOUT: .G = %C.as.A.impl.G.decl
  1992. // CHECK:STDOUT: witness = file.%A.impl_witness
  1993. // CHECK:STDOUT: }
  1994. // CHECK:STDOUT:
  1995. // CHECK:STDOUT: class @C {
  1996. // CHECK:STDOUT: %complete_type: <witness> = complete_type_witness constants.%empty_struct_type [concrete = constants.%complete_type]
  1997. // CHECK:STDOUT: complete_type_witness = %complete_type
  1998. // CHECK:STDOUT:
  1999. // CHECK:STDOUT: !members:
  2000. // CHECK:STDOUT: .Self = constants.%C
  2001. // CHECK:STDOUT: }
  2002. // CHECK:STDOUT:
  2003. // CHECK:STDOUT: generic fn @A.G(@A.%Self: %A.type) {
  2004. // CHECK:STDOUT: fn();
  2005. // CHECK:STDOUT: }
  2006. // CHECK:STDOUT:
  2007. // CHECK:STDOUT: fn @C.as.A.impl.G() {
  2008. // CHECK:STDOUT: !entry:
  2009. // CHECK:STDOUT: return
  2010. // CHECK:STDOUT: }
  2011. // CHECK:STDOUT:
  2012. // CHECK:STDOUT: fn @Works() {
  2013. // CHECK:STDOUT: !entry:
  2014. // CHECK:STDOUT: %C.ref.loc13: type = name_ref C, file.%C.decl [concrete = constants.%C]
  2015. // CHECK:STDOUT: %A.ref.loc13_7: type = name_ref A, file.%A.decl [concrete = constants.%A.type]
  2016. // CHECK:STDOUT: %A.ref.loc13_11: type = name_ref A, file.%A.decl [concrete = constants.%A.type]
  2017. // CHECK:STDOUT: %impl.elem0.loc13_9: %.fa7 = impl_witness_access constants.%BitAndWith.impl_witness, element0 [concrete = constants.%type.as.BitAndWith.impl.Op]
  2018. // CHECK:STDOUT: %bound_method.loc13: <bound method> = bound_method %A.ref.loc13_7, %impl.elem0.loc13_9 [concrete = constants.%type.as.BitAndWith.impl.Op.bound]
  2019. // CHECK:STDOUT: %type.as.BitAndWith.impl.Op.call.loc13: init type = call %bound_method.loc13(%A.ref.loc13_7, %A.ref.loc13_11) [concrete = constants.%A.type]
  2020. // CHECK:STDOUT: %G.ref.loc13: %A.assoc_type = name_ref G, @A.%assoc0 [concrete = constants.%assoc0.d52]
  2021. // CHECK:STDOUT: %A.facet.loc13: %A.type = facet_value %C.ref.loc13, (constants.%A.impl_witness) [concrete = constants.%A.facet]
  2022. // CHECK:STDOUT: %.loc13: %A.type = converted %C.ref.loc13, %A.facet.loc13 [concrete = constants.%A.facet]
  2023. // CHECK:STDOUT: %impl.elem0.loc13_4: %.69a = impl_witness_access constants.%A.impl_witness, element0 [concrete = constants.%C.as.A.impl.G]
  2024. // CHECK:STDOUT: %C.as.A.impl.G.call.loc13: init %empty_tuple.type = call %impl.elem0.loc13_4()
  2025. // CHECK:STDOUT: %C.ref.loc14: type = name_ref C, file.%C.decl [concrete = constants.%C]
  2026. // CHECK:STDOUT: %A.ref.loc14_10: type = name_ref A, file.%A.decl [concrete = constants.%A.type]
  2027. // CHECK:STDOUT: %A.ref.loc14_14: type = name_ref A, file.%A.decl [concrete = constants.%A.type]
  2028. // CHECK:STDOUT: %impl.elem0.loc14_12: %.fa7 = impl_witness_access constants.%BitAndWith.impl_witness, element0 [concrete = constants.%type.as.BitAndWith.impl.Op]
  2029. // CHECK:STDOUT: %bound_method.loc14_12: <bound method> = bound_method %A.ref.loc14_10, %impl.elem0.loc14_12 [concrete = constants.%type.as.BitAndWith.impl.Op.bound]
  2030. // CHECK:STDOUT: %type.as.BitAndWith.impl.Op.call.loc14_12: init type = call %bound_method.loc14_12(%A.ref.loc14_10, %A.ref.loc14_14) [concrete = constants.%A.type]
  2031. // CHECK:STDOUT: %.loc14_15.1: type = value_of_initializer %type.as.BitAndWith.impl.Op.call.loc14_12 [concrete = constants.%A.type]
  2032. // CHECK:STDOUT: %.loc14_15.2: type = converted %type.as.BitAndWith.impl.Op.call.loc14_12, %.loc14_15.1 [concrete = constants.%A.type]
  2033. // CHECK:STDOUT: %A.facet.loc14: %A.type = facet_value %C.ref.loc14, (constants.%A.impl_witness) [concrete = constants.%A.facet]
  2034. // CHECK:STDOUT: %.loc14_6: %A.type = converted %C.ref.loc14, %A.facet.loc14 [concrete = constants.%A.facet]
  2035. // CHECK:STDOUT: %A.ref.loc14_20: type = name_ref A, file.%A.decl [concrete = constants.%A.type]
  2036. // CHECK:STDOUT: %A.ref.loc14_24: type = name_ref A, file.%A.decl [concrete = constants.%A.type]
  2037. // CHECK:STDOUT: %impl.elem0.loc14_22: %.fa7 = impl_witness_access constants.%BitAndWith.impl_witness, element0 [concrete = constants.%type.as.BitAndWith.impl.Op]
  2038. // CHECK:STDOUT: %bound_method.loc14_22: <bound method> = bound_method %A.ref.loc14_20, %impl.elem0.loc14_22 [concrete = constants.%type.as.BitAndWith.impl.Op.bound]
  2039. // CHECK:STDOUT: %type.as.BitAndWith.impl.Op.call.loc14_22: init type = call %bound_method.loc14_22(%A.ref.loc14_20, %A.ref.loc14_24) [concrete = constants.%A.type]
  2040. // CHECK:STDOUT: %G.ref.loc14: %A.assoc_type = name_ref G, @A.%assoc0 [concrete = constants.%assoc0.d52]
  2041. // CHECK:STDOUT: %impl.elem0.loc14_17: %.69a = impl_witness_access constants.%A.impl_witness, element0 [concrete = constants.%C.as.A.impl.G]
  2042. // CHECK:STDOUT: %C.as.A.impl.G.call.loc14: init %empty_tuple.type = call %impl.elem0.loc14_17()
  2043. // CHECK:STDOUT: %C.ref.loc15: type = name_ref C, file.%C.decl [concrete = constants.%C]
  2044. // CHECK:STDOUT: %A.ref.loc15_10: type = name_ref A, file.%A.decl [concrete = constants.%A.type]
  2045. // CHECK:STDOUT: %A.ref.loc15_14: type = name_ref A, file.%A.decl [concrete = constants.%A.type]
  2046. // CHECK:STDOUT: %impl.elem0.loc15_12: %.fa7 = impl_witness_access constants.%BitAndWith.impl_witness, element0 [concrete = constants.%type.as.BitAndWith.impl.Op]
  2047. // CHECK:STDOUT: %bound_method.loc15: <bound method> = bound_method %A.ref.loc15_10, %impl.elem0.loc15_12 [concrete = constants.%type.as.BitAndWith.impl.Op.bound]
  2048. // CHECK:STDOUT: %type.as.BitAndWith.impl.Op.call.loc15: init type = call %bound_method.loc15(%A.ref.loc15_10, %A.ref.loc15_14) [concrete = constants.%A.type]
  2049. // CHECK:STDOUT: %.loc15_15.1: type = value_of_initializer %type.as.BitAndWith.impl.Op.call.loc15 [concrete = constants.%A.type]
  2050. // CHECK:STDOUT: %.loc15_15.2: type = converted %type.as.BitAndWith.impl.Op.call.loc15, %.loc15_15.1 [concrete = constants.%A.type]
  2051. // CHECK:STDOUT: %A.facet.loc15: %A.type = facet_value %C.ref.loc15, (constants.%A.impl_witness) [concrete = constants.%A.facet]
  2052. // CHECK:STDOUT: %.loc15_6: %A.type = converted %C.ref.loc15, %A.facet.loc15 [concrete = constants.%A.facet]
  2053. // CHECK:STDOUT: %A.ref.loc15_19: type = name_ref A, file.%A.decl [concrete = constants.%A.type]
  2054. // CHECK:STDOUT: %G.ref.loc15: %A.assoc_type = name_ref G, @A.%assoc0 [concrete = constants.%assoc0.d52]
  2055. // CHECK:STDOUT: %impl.elem0.loc15_17: %.69a = impl_witness_access constants.%A.impl_witness, element0 [concrete = constants.%C.as.A.impl.G]
  2056. // CHECK:STDOUT: %C.as.A.impl.G.call.loc15: init %empty_tuple.type = call %impl.elem0.loc15_17()
  2057. // CHECK:STDOUT: return
  2058. // CHECK:STDOUT: }
  2059. // CHECK:STDOUT:
  2060. // CHECK:STDOUT: specific @A.G(constants.%Self.803) {}
  2061. // CHECK:STDOUT:
  2062. // CHECK:STDOUT: specific @A.G(constants.%A.facet) {}
  2063. // CHECK:STDOUT: