import_generic.carbon 141 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327
  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/none.carbon
  6. // TODO: Add ranges and switch to "--dump-sem-ir-ranges=only".
  7. // EXTRA-ARGS: --dump-sem-ir-ranges=if-present
  8. //
  9. // AUTOUPDATE
  10. // TIP: To test this file alone, run:
  11. // TIP: bazel test //toolchain/testing:file_test --test_arg=--file_tests=toolchain/check/testdata/impl/import_generic.carbon
  12. // TIP: To dump output, run:
  13. // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/check/testdata/impl/import_generic.carbon
  14. // --- basic_import_generic_interface.carbon
  15. library "[[@TEST_NAME]]";
  16. interface I(T:! type) {}
  17. interface J(T:! type) {
  18. extend require impls I(T);
  19. }
  20. // --- basic_import_generic_interface.impl.carbon
  21. impl library "[[@TEST_NAME]]";
  22. class C {}
  23. impl C as I({}) {}
  24. impl C as J({}) {}
  25. // --- basic_import_generic_constraint.carbon
  26. library "[[@TEST_NAME]]";
  27. interface I(T:! type) {}
  28. constraint J(T:! type) {
  29. extend require impls I(T);
  30. }
  31. // --- basic_import_generic_constraint.impl.carbon
  32. impl library "[[@TEST_NAME]]";
  33. class C {}
  34. impl C as J({}) {}
  35. // --- import_generic.carbon
  36. library "[[@TEST_NAME]]";
  37. class C {}
  38. interface I(T:! type) {}
  39. // Has both declaration and definition.
  40. impl forall [T:! type] C as I(T);
  41. impl forall [T:! type] C as I(T) {}
  42. // Only has definition.
  43. impl forall [T:! type] C as I(T*) {}
  44. constraint N(T:! type) {
  45. extend require impls I(T);
  46. }
  47. // --- fail_import_generic.impl.carbon
  48. impl library "[[@TEST_NAME]]";
  49. // CHECK:STDERR: fail_import_generic.impl.carbon:[[@LINE+4]]:1: error: redeclaration of imported impl [RedeclImportedImpl]
  50. // CHECK:STDERR: impl forall [T:! type] C as I(T);
  51. // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  52. // CHECK:STDERR:
  53. impl forall [T:! type] C as I(T);
  54. // CHECK:STDERR: fail_import_generic.impl.carbon:[[@LINE+4]]:1: error: redeclaration of imported impl [RedeclImportedImpl]
  55. // CHECK:STDERR: impl forall [T:! type] C as I(T) {}
  56. // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  57. // CHECK:STDERR:
  58. impl forall [T:! type] C as I(T) {}
  59. // CHECK:STDERR: fail_import_generic.impl.carbon:[[@LINE+4]]:1: error: redeclaration of imported impl [RedeclImportedImpl]
  60. // CHECK:STDERR: impl forall [T:! type] C as I(T*);
  61. // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  62. // CHECK:STDERR:
  63. impl forall [T:! type] C as I(T*);
  64. // CHECK:STDERR: fail_import_generic.impl.carbon:[[@LINE+4]]:1: error: redeclaration of imported impl [RedeclImportedImpl]
  65. // CHECK:STDERR: impl forall [T:! type] C as I(T*) {}
  66. // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  67. // CHECK:STDERR:
  68. impl forall [T:! type] C as I(T*) {}
  69. // CHECK:STDERR: fail_import_generic.impl.carbon:[[@LINE+4]]:1: error: redeclaration of imported impl [RedeclImportedImpl]
  70. // CHECK:STDERR: impl forall [T:! type] C as N(T);
  71. // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  72. // CHECK:STDERR:
  73. impl forall [T:! type] C as N(T);
  74. // CHECK:STDERR: fail_import_generic.impl.carbon:[[@LINE+4]]:1: error: redeclaration of imported impl [RedeclImportedImpl]
  75. // CHECK:STDERR: impl forall [T:! type] C as N(T*);
  76. // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  77. // CHECK:STDERR:
  78. impl forall [T:! type] C as N(T*);
  79. // --- import_generic_with_different_specific.carbon
  80. library "[[@TEST_NAME]]";
  81. class C {}
  82. interface I(T:! type) {}
  83. impl forall [T:! type] C as I(T) {}
  84. constraint N(T:! type) {
  85. extend require impls I(T);
  86. }
  87. // --- import_generic_with_different_specific.impl.carbon
  88. impl library "[[@TEST_NAME]]";
  89. // These have different specifics than any impl decl in the api file, so they
  90. // are allowed.
  91. impl forall [T:! type] C as I(T*) {}
  92. impl forall [T:! type] C as N(T**) {}
  93. // --- fail_import_generic_decl.carbon
  94. library "[[@TEST_NAME]]";
  95. class D {}
  96. interface J(T:! type) {}
  97. constraint N(T:! type) {
  98. extend require impls J(T);
  99. }
  100. // CHECK:STDERR: fail_import_generic_decl.carbon:[[@LINE+4]]:1: error: impl declared but not defined [ImplMissingDefinition]
  101. // CHECK:STDERR: impl forall [T:! type] D as J(T);
  102. // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  103. // CHECK:STDERR:
  104. impl forall [T:! type] D as J(T);
  105. // CHECK:STDERR: fail_import_generic_decl.carbon:[[@LINE+4]]:1: error: impl declared but not defined [ImplMissingDefinition]
  106. // CHECK:STDERR: impl forall [T:! type] D as J(T*);
  107. // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  108. // CHECK:STDERR:
  109. impl forall [T:! type] D as J(T*);
  110. // --- fail_import_generic_decl.impl.carbon
  111. impl library "[[@TEST_NAME]]";
  112. // CHECK:STDERR: fail_import_generic_decl.impl.carbon:[[@LINE+4]]:1: error: redeclaration of imported impl [RedeclImportedImpl]
  113. // CHECK:STDERR: impl forall [T:! type] D as J(T);
  114. // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  115. // CHECK:STDERR:
  116. impl forall [T:! type] D as J(T);
  117. // CHECK:STDERR: fail_import_generic_decl.impl.carbon:[[@LINE+4]]:1: error: redeclaration of imported impl [RedeclImportedImpl]
  118. // CHECK:STDERR: impl forall [T:! type] D as J(T) {}
  119. // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  120. // CHECK:STDERR:
  121. impl forall [T:! type] D as J(T) {}
  122. // CHECK:STDERR: fail_import_generic_decl.impl.carbon:[[@LINE+4]]:1: error: redeclaration of imported impl [RedeclImportedImpl]
  123. // CHECK:STDERR: impl forall [T:! type] D as J(T*);
  124. // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  125. // CHECK:STDERR:
  126. impl forall [T:! type] D as J(T*);
  127. // CHECK:STDERR: fail_import_generic_decl.impl.carbon:[[@LINE+4]]:1: error: redeclaration of imported impl [RedeclImportedImpl]
  128. // CHECK:STDERR: impl forall [T:! type] D as J(T*) {}
  129. // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  130. // CHECK:STDERR:
  131. impl forall [T:! type] D as J(T*) {}
  132. // CHECK:STDERR: fail_import_generic_decl.impl.carbon:[[@LINE+4]]:1: error: redeclaration of imported impl [RedeclImportedImpl]
  133. // CHECK:STDERR: impl forall [T:! type] D as N(T) {}
  134. // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  135. // CHECK:STDERR:
  136. impl forall [T:! type] D as N(T) {}
  137. // CHECK:STDERR: fail_import_generic_decl.impl.carbon:[[@LINE+4]]:1: error: redeclaration of imported impl [RedeclImportedImpl]
  138. // CHECK:STDERR: impl forall [T:! type] D as N(T*) {}
  139. // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  140. // CHECK:STDERR:
  141. impl forall [T:! type] D as N(T*) {}
  142. // CHECK:STDOUT: --- basic_import_generic_interface.carbon
  143. // CHECK:STDOUT:
  144. // CHECK:STDOUT: constants {
  145. // CHECK:STDOUT: %type: type = facet_type <type> [concrete]
  146. // CHECK:STDOUT: %.Self: %type = symbolic_binding .Self [symbolic_self]
  147. // CHECK:STDOUT: %T: type = symbolic_binding T, 0 [symbolic]
  148. // CHECK:STDOUT: %pattern_type: type = pattern_type type [concrete]
  149. // CHECK:STDOUT: %I.type.609: type = generic_interface_type @I [concrete]
  150. // CHECK:STDOUT: %I.generic: %I.type.609 = struct_value () [concrete]
  151. // CHECK:STDOUT: %I.type.1ab: type = facet_type <@I, @I(%T)> [symbolic]
  152. // CHECK:STDOUT: %Self.fdb: %I.type.1ab = symbolic_binding Self, 1 [symbolic]
  153. // CHECK:STDOUT: %J.type.885: type = generic_interface_type @J [concrete]
  154. // CHECK:STDOUT: %J.generic: %J.type.885 = struct_value () [concrete]
  155. // CHECK:STDOUT: %J.type.04e: type = facet_type <@J, @J(%T)> [symbolic]
  156. // CHECK:STDOUT: %Self.a60: %J.type.04e = symbolic_binding Self, 1 [symbolic]
  157. // CHECK:STDOUT: %Self.binding.as_type: type = symbolic_binding_type Self, 1, %Self.a60 [symbolic]
  158. // CHECK:STDOUT: %require_complete: <witness> = require_complete_type %I.type.1ab [symbolic]
  159. // CHECK:STDOUT: }
  160. // CHECK:STDOUT:
  161. // CHECK:STDOUT: file {
  162. // CHECK:STDOUT: package: <namespace> = namespace [concrete] {
  163. // CHECK:STDOUT: .I = %I.decl
  164. // CHECK:STDOUT: .J = %J.decl
  165. // CHECK:STDOUT: }
  166. // CHECK:STDOUT: %I.decl: %I.type.609 = interface_decl @I [concrete = constants.%I.generic] {
  167. // CHECK:STDOUT: %T.patt: %pattern_type = symbolic_binding_pattern T, 0 [concrete]
  168. // CHECK:STDOUT: } {
  169. // CHECK:STDOUT: %.Self: %type = symbolic_binding .Self [symbolic_self = constants.%.Self]
  170. // CHECK:STDOUT: %T.loc3_13.2: type = symbolic_binding T, 0 [symbolic = %T.loc3_13.1 (constants.%T)]
  171. // CHECK:STDOUT: }
  172. // CHECK:STDOUT: %J.decl: %J.type.885 = interface_decl @J [concrete = constants.%J.generic] {
  173. // CHECK:STDOUT: %T.patt: %pattern_type = symbolic_binding_pattern T, 0 [concrete]
  174. // CHECK:STDOUT: } {
  175. // CHECK:STDOUT: %.Self: %type = symbolic_binding .Self [symbolic_self = constants.%.Self]
  176. // CHECK:STDOUT: %T.loc4_13.2: type = symbolic_binding T, 0 [symbolic = %T.loc4_13.1 (constants.%T)]
  177. // CHECK:STDOUT: }
  178. // CHECK:STDOUT: }
  179. // CHECK:STDOUT:
  180. // CHECK:STDOUT: generic interface @I(%T.loc3_13.2: type) {
  181. // CHECK:STDOUT: %T.loc3_13.1: type = symbolic_binding T, 0 [symbolic = %T.loc3_13.1 (constants.%T)]
  182. // CHECK:STDOUT:
  183. // CHECK:STDOUT: !definition:
  184. // CHECK:STDOUT: %I.type: type = facet_type <@I, @I(%T.loc3_13.1)> [symbolic = %I.type (constants.%I.type.1ab)]
  185. // CHECK:STDOUT: %Self.loc3_23.2: @I.%I.type (%I.type.1ab) = symbolic_binding Self, 1 [symbolic = %Self.loc3_23.2 (constants.%Self.fdb)]
  186. // CHECK:STDOUT:
  187. // CHECK:STDOUT: interface {
  188. // CHECK:STDOUT: %Self.loc3_23.1: @I.%I.type (%I.type.1ab) = symbolic_binding Self, 1 [symbolic = %Self.loc3_23.2 (constants.%Self.fdb)]
  189. // CHECK:STDOUT:
  190. // CHECK:STDOUT: !members:
  191. // CHECK:STDOUT: .Self = %Self.loc3_23.1
  192. // CHECK:STDOUT: witness = ()
  193. // CHECK:STDOUT:
  194. // CHECK:STDOUT: !requires:
  195. // CHECK:STDOUT: }
  196. // CHECK:STDOUT: }
  197. // CHECK:STDOUT:
  198. // CHECK:STDOUT: generic interface @J(%T.loc4_13.2: type) {
  199. // CHECK:STDOUT: %T.loc4_13.1: type = symbolic_binding T, 0 [symbolic = %T.loc4_13.1 (constants.%T)]
  200. // CHECK:STDOUT:
  201. // CHECK:STDOUT: !definition:
  202. // CHECK:STDOUT: %J.type: type = facet_type <@J, @J(%T.loc4_13.1)> [symbolic = %J.type (constants.%J.type.04e)]
  203. // CHECK:STDOUT: %Self.loc4_23.2: @J.%J.type (%J.type.04e) = symbolic_binding Self, 1 [symbolic = %Self.loc4_23.2 (constants.%Self.a60)]
  204. // CHECK:STDOUT: %I.type: type = facet_type <@I, @I(%T.loc4_13.1)> [symbolic = %I.type (constants.%I.type.1ab)]
  205. // CHECK:STDOUT: %require_complete: <witness> = require_complete_type %I.type [symbolic = %require_complete (constants.%require_complete)]
  206. // CHECK:STDOUT:
  207. // CHECK:STDOUT: interface {
  208. // CHECK:STDOUT: %Self.loc4_23.1: @J.%J.type (%J.type.04e) = symbolic_binding Self, 1 [symbolic = %Self.loc4_23.2 (constants.%Self.a60)]
  209. // CHECK:STDOUT: %J.Self.binding.as_type.impls.I.type.require.decl = require_decl @J.Self.binding.as_type.impls.I.type.require [concrete] {
  210. // CHECK:STDOUT: require %Self.as_type impls %I.type.loc5_27.1
  211. // CHECK:STDOUT: } {
  212. // CHECK:STDOUT: %Self.as_type: type = facet_access_type @J.%Self.loc4_23.1 [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)]
  213. // CHECK:STDOUT: %I.ref: %I.type.609 = name_ref I, file.%I.decl [concrete = constants.%I.generic]
  214. // CHECK:STDOUT: %T.ref: type = name_ref T, @J.%T.loc4_13.2 [symbolic = %T (constants.%T)]
  215. // CHECK:STDOUT: %I.type.loc5_27.1: type = facet_type <@I, @I(constants.%T)> [symbolic = %I.type.loc5_27.2 (constants.%I.type.1ab)]
  216. // CHECK:STDOUT: }
  217. // CHECK:STDOUT: %.loc5: type = specific_constant @J.Self.binding.as_type.impls.I.type.require.%I.type.loc5_27.1, @J.Self.binding.as_type.impls.I.type.require(constants.%T, constants.%Self.a60) [symbolic = %I.type (constants.%I.type.1ab)]
  218. // CHECK:STDOUT:
  219. // CHECK:STDOUT: !members:
  220. // CHECK:STDOUT: .Self = %Self.loc4_23.1
  221. // CHECK:STDOUT: .I = <poisoned>
  222. // CHECK:STDOUT: .T = <poisoned>
  223. // CHECK:STDOUT: extend %.loc5
  224. // CHECK:STDOUT: witness = ()
  225. // CHECK:STDOUT:
  226. // CHECK:STDOUT: !requires:
  227. // CHECK:STDOUT: @J.Self.binding.as_type.impls.I.type.require {
  228. // CHECK:STDOUT: require @J.Self.binding.as_type.impls.I.type.require.%Self.as_type impls @J.Self.binding.as_type.impls.I.type.require.%I.type.loc5_27.1
  229. // CHECK:STDOUT: }
  230. // CHECK:STDOUT: }
  231. // CHECK:STDOUT: }
  232. // CHECK:STDOUT:
  233. // CHECK:STDOUT: generic require @J.Self.binding.as_type.impls.I.type.require(@J.%T.loc4_13.2: type, @J.%Self.loc4_23.1: @J.%J.type (%J.type.04e)) {
  234. // CHECK:STDOUT: %T: type = symbolic_binding T, 0 [symbolic = %T (constants.%T)]
  235. // CHECK:STDOUT: %J.type: type = facet_type <@J, @J(%T)> [symbolic = %J.type (constants.%J.type.04e)]
  236. // CHECK:STDOUT: %Self: @J.Self.binding.as_type.impls.I.type.require.%J.type (%J.type.04e) = symbolic_binding Self, 1 [symbolic = %Self (constants.%Self.a60)]
  237. // CHECK:STDOUT: %Self.binding.as_type: type = symbolic_binding_type Self, 1, %Self [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)]
  238. // CHECK:STDOUT: %I.type.loc5_27.2: type = facet_type <@I, @I(%T)> [symbolic = %I.type.loc5_27.2 (constants.%I.type.1ab)]
  239. // CHECK:STDOUT: }
  240. // CHECK:STDOUT:
  241. // CHECK:STDOUT: specific @I(constants.%T) {
  242. // CHECK:STDOUT: %T.loc3_13.1 => constants.%T
  243. // CHECK:STDOUT:
  244. // CHECK:STDOUT: !definition:
  245. // CHECK:STDOUT: %I.type => constants.%I.type.1ab
  246. // CHECK:STDOUT: %Self.loc3_23.2 => constants.%Self.fdb
  247. // CHECK:STDOUT: }
  248. // CHECK:STDOUT:
  249. // CHECK:STDOUT: specific @J(constants.%T) {
  250. // CHECK:STDOUT: %T.loc4_13.1 => constants.%T
  251. // CHECK:STDOUT: }
  252. // CHECK:STDOUT:
  253. // CHECK:STDOUT: specific @J.Self.binding.as_type.impls.I.type.require(constants.%T, constants.%Self.a60) {
  254. // CHECK:STDOUT: %T => constants.%T
  255. // CHECK:STDOUT: %J.type => constants.%J.type.04e
  256. // CHECK:STDOUT: %Self => constants.%Self.a60
  257. // CHECK:STDOUT: %Self.binding.as_type => constants.%Self.binding.as_type
  258. // CHECK:STDOUT: %I.type.loc5_27.2 => constants.%I.type.1ab
  259. // CHECK:STDOUT: }
  260. // CHECK:STDOUT:
  261. // CHECK:STDOUT: --- basic_import_generic_interface.impl.carbon
  262. // CHECK:STDOUT:
  263. // CHECK:STDOUT: constants {
  264. // CHECK:STDOUT: %C: type = class_type @C [concrete]
  265. // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete]
  266. // CHECK:STDOUT: %complete_type.357: <witness> = complete_type_witness %empty_struct_type [concrete]
  267. // CHECK:STDOUT: %I.type.609: type = generic_interface_type @I [concrete]
  268. // CHECK:STDOUT: %I.generic: %I.type.609 = struct_value () [concrete]
  269. // CHECK:STDOUT: %T: type = symbolic_binding T, 0 [symbolic]
  270. // CHECK:STDOUT: %I.type.1ab: type = facet_type <@I, @I(%T)> [symbolic]
  271. // CHECK:STDOUT: %Self.c1b: %I.type.1ab = symbolic_binding Self, 1 [symbolic]
  272. // CHECK:STDOUT: %empty_struct: %empty_struct_type = struct_value () [concrete]
  273. // CHECK:STDOUT: %I.type.ab5: type = facet_type <@I, @I(%empty_struct_type)> [concrete]
  274. // CHECK:STDOUT: %I.impl_witness: <witness> = impl_witness @C.as.I.impl.%I.impl_witness_table [concrete]
  275. // CHECK:STDOUT: %Self.025: %I.type.ab5 = symbolic_binding Self, 1 [symbolic]
  276. // CHECK:STDOUT: %J.type.885: type = generic_interface_type @J [concrete]
  277. // CHECK:STDOUT: %J.generic: %J.type.885 = struct_value () [concrete]
  278. // CHECK:STDOUT: %J.type.04e: type = facet_type <@J, @J(%T)> [symbolic]
  279. // CHECK:STDOUT: %Self.c25: %J.type.04e = symbolic_binding Self, 1 [symbolic]
  280. // CHECK:STDOUT: %Self.binding.as_type: type = symbolic_binding_type Self, 1, %Self.c25 [symbolic]
  281. // CHECK:STDOUT: %require_complete: <witness> = require_complete_type %I.type.1ab [symbolic]
  282. // CHECK:STDOUT: %J.type.d6f: type = facet_type <@J, @J(%empty_struct_type)> [concrete]
  283. // CHECK:STDOUT: %J.impl_witness: <witness> = impl_witness @C.as.J.impl.%J.impl_witness_table [concrete]
  284. // CHECK:STDOUT: %type: type = facet_type <type> [concrete]
  285. // CHECK:STDOUT: %C.type.facet: %type = facet_value %C, () [concrete]
  286. // CHECK:STDOUT: %Self.9e4: %J.type.d6f = symbolic_binding Self, 1 [symbolic]
  287. // CHECK:STDOUT: %complete_type.5b1: <witness> = complete_type_witness %I.type.ab5 [concrete]
  288. // CHECK:STDOUT: }
  289. // CHECK:STDOUT:
  290. // CHECK:STDOUT: imports {
  291. // CHECK:STDOUT: %Main.I: %I.type.609 = import_ref Main//basic_import_generic_interface, I, loaded [concrete = constants.%I.generic]
  292. // CHECK:STDOUT: %Main.J: %J.type.885 = import_ref Main//basic_import_generic_interface, J, loaded [concrete = constants.%J.generic]
  293. // CHECK:STDOUT: %Main.import_ref.3fa = import_ref Main//basic_import_generic_interface, loc3_23, unloaded
  294. // CHECK:STDOUT: %Main.import_ref.b3bc94.1: type = import_ref Main//basic_import_generic_interface, loc3_13, loaded [symbolic = @I.%T (constants.%T)]
  295. // CHECK:STDOUT: %Main.import_ref.2ff: type = import_ref Main//basic_import_generic_interface, loc5_18, loaded [symbolic = @J.Self.binding.as_type.impls.I.type.require.%Self.binding.as_type (constants.%Self.binding.as_type)]
  296. // CHECK:STDOUT: %Main.import_ref.358: type = import_ref Main//basic_import_generic_interface, loc5_27, loaded [symbolic = @J.Self.binding.as_type.impls.I.type.require.%I.type (constants.%I.type.1ab)]
  297. // CHECK:STDOUT: %Main.import_ref.b3bc94.2: type = import_ref Main//basic_import_generic_interface, loc4_13, loaded [symbolic = @J.%T (constants.%T)]
  298. // CHECK:STDOUT: %Main.import_ref.99f: @J.%J.type (%J.type.04e) = import_ref Main//basic_import_generic_interface, loc4_23, loaded [symbolic = @J.%Self (constants.%Self.c25)]
  299. // CHECK:STDOUT: %Main.import_ref.e9b = import_ref Main//basic_import_generic_interface, loc4_23, unloaded
  300. // CHECK:STDOUT: %Main.import_ref.b55 = import_ref Main//basic_import_generic_interface, loc5_28, unloaded
  301. // CHECK:STDOUT: %Main.import_ref.b3bc94.3: type = import_ref Main//basic_import_generic_interface, loc4_13, loaded [symbolic = @J.%T (constants.%T)]
  302. // CHECK:STDOUT: }
  303. // CHECK:STDOUT:
  304. // CHECK:STDOUT: file {
  305. // CHECK:STDOUT: package: <namespace> = namespace [concrete] {
  306. // CHECK:STDOUT: .I = imports.%Main.I
  307. // CHECK:STDOUT: .J = imports.%Main.J
  308. // CHECK:STDOUT: .C = %C.decl
  309. // CHECK:STDOUT: }
  310. // CHECK:STDOUT: %default.import.loc1_46.1 = import <none>
  311. // CHECK:STDOUT: %default.import.loc1_46.2 = import <none>
  312. // CHECK:STDOUT: %C.decl: type = class_decl @C [concrete = constants.%C] {} {}
  313. // CHECK:STDOUT: impl_decl @C.as.I.impl [concrete] {} {
  314. // CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [concrete = constants.%C]
  315. // CHECK:STDOUT: %I.ref: %I.type.609 = name_ref I, imports.%Main.I [concrete = constants.%I.generic]
  316. // CHECK:STDOUT: %.loc5_14: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct]
  317. // CHECK:STDOUT: %.loc5_15: type = converted %.loc5_14, constants.%empty_struct_type [concrete = constants.%empty_struct_type]
  318. // CHECK:STDOUT: %I.type: type = facet_type <@I, @I(constants.%empty_struct_type)> [concrete = constants.%I.type.ab5]
  319. // CHECK:STDOUT: }
  320. // CHECK:STDOUT: impl_decl @C.as.J.impl [concrete] {} {
  321. // CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [concrete = constants.%C]
  322. // CHECK:STDOUT: %J.ref: %J.type.885 = name_ref J, imports.%Main.J [concrete = constants.%J.generic]
  323. // CHECK:STDOUT: %.loc7_14: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct]
  324. // CHECK:STDOUT: %.loc7_15: type = converted %.loc7_14, constants.%empty_struct_type [concrete = constants.%empty_struct_type]
  325. // CHECK:STDOUT: %J.type: type = facet_type <@J, @J(constants.%empty_struct_type)> [concrete = constants.%J.type.d6f]
  326. // CHECK:STDOUT: }
  327. // CHECK:STDOUT: }
  328. // CHECK:STDOUT:
  329. // CHECK:STDOUT: generic interface @I(imports.%Main.import_ref.b3bc94.1: type) [from "basic_import_generic_interface.carbon"] {
  330. // CHECK:STDOUT: %T: type = symbolic_binding T, 0 [symbolic = %T (constants.%T)]
  331. // CHECK:STDOUT:
  332. // CHECK:STDOUT: !definition:
  333. // CHECK:STDOUT: %I.type: type = facet_type <@I, @I(%T)> [symbolic = %I.type (constants.%I.type.1ab)]
  334. // CHECK:STDOUT: %Self: @I.%I.type (%I.type.1ab) = symbolic_binding Self, 1 [symbolic = %Self (constants.%Self.c1b)]
  335. // CHECK:STDOUT:
  336. // CHECK:STDOUT: interface {
  337. // CHECK:STDOUT: !members:
  338. // CHECK:STDOUT: .Self = imports.%Main.import_ref.3fa
  339. // CHECK:STDOUT: witness = ()
  340. // CHECK:STDOUT:
  341. // CHECK:STDOUT: !requires:
  342. // CHECK:STDOUT: }
  343. // CHECK:STDOUT: }
  344. // CHECK:STDOUT:
  345. // CHECK:STDOUT: generic interface @J(imports.%Main.import_ref.b3bc94.3: type) [from "basic_import_generic_interface.carbon"] {
  346. // CHECK:STDOUT: %T: type = symbolic_binding T, 0 [symbolic = %T (constants.%T)]
  347. // CHECK:STDOUT:
  348. // CHECK:STDOUT: !definition:
  349. // CHECK:STDOUT: %J.type: type = facet_type <@J, @J(%T)> [symbolic = %J.type (constants.%J.type.04e)]
  350. // CHECK:STDOUT: %Self: @J.%J.type (%J.type.04e) = symbolic_binding Self, 1 [symbolic = %Self (constants.%Self.c25)]
  351. // CHECK:STDOUT: %I.type: type = facet_type <@I, @I(%T)> [symbolic = %I.type (constants.%I.type.1ab)]
  352. // CHECK:STDOUT: %require_complete: <witness> = require_complete_type %I.type [symbolic = %require_complete (constants.%require_complete)]
  353. // CHECK:STDOUT:
  354. // CHECK:STDOUT: interface {
  355. // CHECK:STDOUT: !members:
  356. // CHECK:STDOUT: .Self = imports.%Main.import_ref.e9b
  357. // CHECK:STDOUT: extend imports.%Main.import_ref.b55
  358. // CHECK:STDOUT: witness = ()
  359. // CHECK:STDOUT:
  360. // CHECK:STDOUT: !requires:
  361. // CHECK:STDOUT: @J.Self.binding.as_type.impls.I.type.require {
  362. // CHECK:STDOUT: require imports.%Main.import_ref.2ff impls imports.%Main.import_ref.358
  363. // CHECK:STDOUT: }
  364. // CHECK:STDOUT: }
  365. // CHECK:STDOUT: }
  366. // CHECK:STDOUT:
  367. // CHECK:STDOUT: generic require @J.Self.binding.as_type.impls.I.type.require(imports.%Main.import_ref.b3bc94.2: type, imports.%Main.import_ref.99f: @J.%J.type (%J.type.04e)) [from "basic_import_generic_interface.carbon"] {
  368. // CHECK:STDOUT: %T: type = symbolic_binding T, 0 [symbolic = %T (constants.%T)]
  369. // CHECK:STDOUT: %J.type: type = facet_type <@J, @J(%T)> [symbolic = %J.type (constants.%J.type.04e)]
  370. // CHECK:STDOUT: %Self: @J.Self.binding.as_type.impls.I.type.require.%J.type (%J.type.04e) = symbolic_binding Self, 1 [symbolic = %Self (constants.%Self.c25)]
  371. // CHECK:STDOUT: %Self.binding.as_type: type = symbolic_binding_type Self, 1, %Self [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)]
  372. // CHECK:STDOUT: %I.type: type = facet_type <@I, @I(%T)> [symbolic = %I.type (constants.%I.type.1ab)]
  373. // CHECK:STDOUT: }
  374. // CHECK:STDOUT:
  375. // CHECK:STDOUT: impl @C.as.I.impl: %C.ref as %I.type {
  376. // CHECK:STDOUT: %I.impl_witness_table = impl_witness_table (), @C.as.I.impl [concrete]
  377. // CHECK:STDOUT: %I.impl_witness: <witness> = impl_witness %I.impl_witness_table [concrete = constants.%I.impl_witness]
  378. // CHECK:STDOUT:
  379. // CHECK:STDOUT: !members:
  380. // CHECK:STDOUT: witness = %I.impl_witness
  381. // CHECK:STDOUT: }
  382. // CHECK:STDOUT:
  383. // CHECK:STDOUT: impl @C.as.J.impl: %C.ref as %J.type {
  384. // CHECK:STDOUT: %J.impl_witness_table = impl_witness_table (), @C.as.J.impl [concrete]
  385. // CHECK:STDOUT: %J.impl_witness: <witness> = impl_witness %J.impl_witness_table [concrete = constants.%J.impl_witness]
  386. // CHECK:STDOUT:
  387. // CHECK:STDOUT: !members:
  388. // CHECK:STDOUT: witness = %J.impl_witness
  389. // CHECK:STDOUT: }
  390. // CHECK:STDOUT:
  391. // CHECK:STDOUT: class @C {
  392. // CHECK:STDOUT: %complete_type: <witness> = complete_type_witness constants.%empty_struct_type [concrete = constants.%complete_type.357]
  393. // CHECK:STDOUT: complete_type_witness = %complete_type
  394. // CHECK:STDOUT:
  395. // CHECK:STDOUT: !members:
  396. // CHECK:STDOUT: .Self = constants.%C
  397. // CHECK:STDOUT: }
  398. // CHECK:STDOUT:
  399. // CHECK:STDOUT: specific @I(constants.%T) {
  400. // CHECK:STDOUT: %T => constants.%T
  401. // CHECK:STDOUT:
  402. // CHECK:STDOUT: !definition:
  403. // CHECK:STDOUT: %I.type => constants.%I.type.1ab
  404. // CHECK:STDOUT: %Self => constants.%Self.c1b
  405. // CHECK:STDOUT: }
  406. // CHECK:STDOUT:
  407. // CHECK:STDOUT: specific @I(constants.%empty_struct_type) {
  408. // CHECK:STDOUT: %T => constants.%empty_struct_type
  409. // CHECK:STDOUT:
  410. // CHECK:STDOUT: !definition:
  411. // CHECK:STDOUT: %I.type => constants.%I.type.ab5
  412. // CHECK:STDOUT: %Self => constants.%Self.025
  413. // CHECK:STDOUT: }
  414. // CHECK:STDOUT:
  415. // CHECK:STDOUT: specific @J(constants.%T) {
  416. // CHECK:STDOUT: %T => constants.%T
  417. // CHECK:STDOUT: }
  418. // CHECK:STDOUT:
  419. // CHECK:STDOUT: specific @J.Self.binding.as_type.impls.I.type.require(constants.%T, constants.%Self.c25) {
  420. // CHECK:STDOUT: %T => constants.%T
  421. // CHECK:STDOUT: %J.type => constants.%J.type.04e
  422. // CHECK:STDOUT: %Self => constants.%Self.c25
  423. // CHECK:STDOUT: %Self.binding.as_type => constants.%Self.binding.as_type
  424. // CHECK:STDOUT: %I.type => constants.%I.type.1ab
  425. // CHECK:STDOUT: }
  426. // CHECK:STDOUT:
  427. // CHECK:STDOUT: specific @J(constants.%empty_struct_type) {
  428. // CHECK:STDOUT: %T => constants.%empty_struct_type
  429. // CHECK:STDOUT:
  430. // CHECK:STDOUT: !definition:
  431. // CHECK:STDOUT: %J.type => constants.%J.type.d6f
  432. // CHECK:STDOUT: %Self => constants.%Self.9e4
  433. // CHECK:STDOUT: %I.type => constants.%I.type.ab5
  434. // CHECK:STDOUT: %require_complete => constants.%complete_type.5b1
  435. // CHECK:STDOUT: }
  436. // CHECK:STDOUT:
  437. // CHECK:STDOUT: specific @J.Self.binding.as_type.impls.I.type.require(constants.%empty_struct_type, constants.%C.type.facet) {
  438. // CHECK:STDOUT: %T => constants.%empty_struct_type
  439. // CHECK:STDOUT: %J.type => constants.%J.type.d6f
  440. // CHECK:STDOUT: %Self => constants.%C.type.facet
  441. // CHECK:STDOUT: %Self.binding.as_type => constants.%C
  442. // CHECK:STDOUT: %I.type => constants.%I.type.ab5
  443. // CHECK:STDOUT: }
  444. // CHECK:STDOUT:
  445. // CHECK:STDOUT: --- basic_import_generic_constraint.carbon
  446. // CHECK:STDOUT:
  447. // CHECK:STDOUT: constants {
  448. // CHECK:STDOUT: %type: type = facet_type <type> [concrete]
  449. // CHECK:STDOUT: %.Self: %type = symbolic_binding .Self [symbolic_self]
  450. // CHECK:STDOUT: %T: type = symbolic_binding T, 0 [symbolic]
  451. // CHECK:STDOUT: %pattern_type: type = pattern_type type [concrete]
  452. // CHECK:STDOUT: %I.type.609: type = generic_interface_type @I [concrete]
  453. // CHECK:STDOUT: %I.generic: %I.type.609 = struct_value () [concrete]
  454. // CHECK:STDOUT: %I.type.1ab: type = facet_type <@I, @I(%T)> [symbolic]
  455. // CHECK:STDOUT: %Self.fdb: %I.type.1ab = symbolic_binding Self, 1 [symbolic]
  456. // CHECK:STDOUT: %J.type.d08: type = generic_named_constaint_type @J [concrete]
  457. // CHECK:STDOUT: %empty_struct: %J.type.d08 = struct_value () [concrete]
  458. // CHECK:STDOUT: %J.type.d68: type = facet_type <@J, @J(%T)> [symbolic]
  459. // CHECK:STDOUT: %Self.31c: %J.type.d68 = symbolic_binding Self, 1 [symbolic]
  460. // CHECK:STDOUT: %Self.binding.as_type: type = symbolic_binding_type Self, 1, %Self.31c [symbolic]
  461. // CHECK:STDOUT: %require_complete: <witness> = require_complete_type %I.type.1ab [symbolic]
  462. // CHECK:STDOUT: }
  463. // CHECK:STDOUT:
  464. // CHECK:STDOUT: file {
  465. // CHECK:STDOUT: package: <namespace> = namespace [concrete] {
  466. // CHECK:STDOUT: .I = %I.decl
  467. // CHECK:STDOUT: .J = %J.decl
  468. // CHECK:STDOUT: }
  469. // CHECK:STDOUT: %I.decl: %I.type.609 = interface_decl @I [concrete = constants.%I.generic] {
  470. // CHECK:STDOUT: %T.patt: %pattern_type = symbolic_binding_pattern T, 0 [concrete]
  471. // CHECK:STDOUT: } {
  472. // CHECK:STDOUT: %.Self: %type = symbolic_binding .Self [symbolic_self = constants.%.Self]
  473. // CHECK:STDOUT: %T.loc3_13.2: type = symbolic_binding T, 0 [symbolic = %T.loc3_13.1 (constants.%T)]
  474. // CHECK:STDOUT: }
  475. // CHECK:STDOUT: %J.decl: %J.type.d08 = constraint_decl @J [concrete = constants.%empty_struct] {
  476. // CHECK:STDOUT: %T.patt: %pattern_type = symbolic_binding_pattern T, 0 [concrete]
  477. // CHECK:STDOUT: } {
  478. // CHECK:STDOUT: %.Self: %type = symbolic_binding .Self [symbolic_self = constants.%.Self]
  479. // CHECK:STDOUT: %T.loc4_14.2: type = symbolic_binding T, 0 [symbolic = %T.loc4_14.1 (constants.%T)]
  480. // CHECK:STDOUT: }
  481. // CHECK:STDOUT: }
  482. // CHECK:STDOUT:
  483. // CHECK:STDOUT: generic interface @I(%T.loc3_13.2: type) {
  484. // CHECK:STDOUT: %T.loc3_13.1: type = symbolic_binding T, 0 [symbolic = %T.loc3_13.1 (constants.%T)]
  485. // CHECK:STDOUT:
  486. // CHECK:STDOUT: !definition:
  487. // CHECK:STDOUT: %I.type: type = facet_type <@I, @I(%T.loc3_13.1)> [symbolic = %I.type (constants.%I.type.1ab)]
  488. // CHECK:STDOUT: %Self.loc3_23.2: @I.%I.type (%I.type.1ab) = symbolic_binding Self, 1 [symbolic = %Self.loc3_23.2 (constants.%Self.fdb)]
  489. // CHECK:STDOUT:
  490. // CHECK:STDOUT: interface {
  491. // CHECK:STDOUT: %Self.loc3_23.1: @I.%I.type (%I.type.1ab) = symbolic_binding Self, 1 [symbolic = %Self.loc3_23.2 (constants.%Self.fdb)]
  492. // CHECK:STDOUT:
  493. // CHECK:STDOUT: !members:
  494. // CHECK:STDOUT: .Self = %Self.loc3_23.1
  495. // CHECK:STDOUT: witness = ()
  496. // CHECK:STDOUT:
  497. // CHECK:STDOUT: !requires:
  498. // CHECK:STDOUT: }
  499. // CHECK:STDOUT: }
  500. // CHECK:STDOUT:
  501. // CHECK:STDOUT: generic constraint @J(%T.loc4_14.2: type) {
  502. // CHECK:STDOUT: %T.loc4_14.1: type = symbolic_binding T, 0 [symbolic = %T.loc4_14.1 (constants.%T)]
  503. // CHECK:STDOUT:
  504. // CHECK:STDOUT: !definition:
  505. // CHECK:STDOUT: %J.type: type = facet_type <@J, @J(%T.loc4_14.1)> [symbolic = %J.type (constants.%J.type.d68)]
  506. // CHECK:STDOUT: %Self.loc4_24.2: @J.%J.type (%J.type.d68) = symbolic_binding Self, 1 [symbolic = %Self.loc4_24.2 (constants.%Self.31c)]
  507. // CHECK:STDOUT: %I.type: type = facet_type <@I, @I(%T.loc4_14.1)> [symbolic = %I.type (constants.%I.type.1ab)]
  508. // CHECK:STDOUT: %require_complete: <witness> = require_complete_type %I.type [symbolic = %require_complete (constants.%require_complete)]
  509. // CHECK:STDOUT:
  510. // CHECK:STDOUT: constraint {
  511. // CHECK:STDOUT: %Self.loc4_24.1: @J.%J.type (%J.type.d68) = symbolic_binding Self, 1 [symbolic = %Self.loc4_24.2 (constants.%Self.31c)]
  512. // CHECK:STDOUT: %J.Self.binding.as_type.impls.I.type.require.decl = require_decl @J.Self.binding.as_type.impls.I.type.require [concrete] {
  513. // CHECK:STDOUT: require %Self.as_type impls %I.type.loc5_27.1
  514. // CHECK:STDOUT: } {
  515. // CHECK:STDOUT: %Self.as_type: type = facet_access_type @J.%Self.loc4_24.1 [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)]
  516. // CHECK:STDOUT: %I.ref: %I.type.609 = name_ref I, file.%I.decl [concrete = constants.%I.generic]
  517. // CHECK:STDOUT: %T.ref: type = name_ref T, @J.%T.loc4_14.2 [symbolic = %T (constants.%T)]
  518. // CHECK:STDOUT: %I.type.loc5_27.1: type = facet_type <@I, @I(constants.%T)> [symbolic = %I.type.loc5_27.2 (constants.%I.type.1ab)]
  519. // CHECK:STDOUT: }
  520. // CHECK:STDOUT: %.loc5: type = specific_constant @J.Self.binding.as_type.impls.I.type.require.%I.type.loc5_27.1, @J.Self.binding.as_type.impls.I.type.require(constants.%T, constants.%Self.31c) [symbolic = %I.type (constants.%I.type.1ab)]
  521. // CHECK:STDOUT:
  522. // CHECK:STDOUT: !members:
  523. // CHECK:STDOUT: .Self = %Self.loc4_24.1
  524. // CHECK:STDOUT: .I = <poisoned>
  525. // CHECK:STDOUT: .T = <poisoned>
  526. // CHECK:STDOUT: extend %.loc5
  527. // CHECK:STDOUT:
  528. // CHECK:STDOUT: !requires:
  529. // CHECK:STDOUT: @J.Self.binding.as_type.impls.I.type.require {
  530. // CHECK:STDOUT: require @J.Self.binding.as_type.impls.I.type.require.%Self.as_type impls @J.Self.binding.as_type.impls.I.type.require.%I.type.loc5_27.1
  531. // CHECK:STDOUT: }
  532. // CHECK:STDOUT: }
  533. // CHECK:STDOUT: }
  534. // CHECK:STDOUT:
  535. // CHECK:STDOUT: generic require @J.Self.binding.as_type.impls.I.type.require(@J.%T.loc4_14.2: type, @J.%Self.loc4_24.1: @J.%J.type (%J.type.d68)) {
  536. // CHECK:STDOUT: %T: type = symbolic_binding T, 0 [symbolic = %T (constants.%T)]
  537. // CHECK:STDOUT: %J.type: type = facet_type <@J, @J(%T)> [symbolic = %J.type (constants.%J.type.d68)]
  538. // CHECK:STDOUT: %Self: @J.Self.binding.as_type.impls.I.type.require.%J.type (%J.type.d68) = symbolic_binding Self, 1 [symbolic = %Self (constants.%Self.31c)]
  539. // CHECK:STDOUT: %Self.binding.as_type: type = symbolic_binding_type Self, 1, %Self [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)]
  540. // CHECK:STDOUT: %I.type.loc5_27.2: type = facet_type <@I, @I(%T)> [symbolic = %I.type.loc5_27.2 (constants.%I.type.1ab)]
  541. // CHECK:STDOUT: }
  542. // CHECK:STDOUT:
  543. // CHECK:STDOUT: specific @I(constants.%T) {
  544. // CHECK:STDOUT: %T.loc3_13.1 => constants.%T
  545. // CHECK:STDOUT:
  546. // CHECK:STDOUT: !definition:
  547. // CHECK:STDOUT: %I.type => constants.%I.type.1ab
  548. // CHECK:STDOUT: %Self.loc3_23.2 => constants.%Self.fdb
  549. // CHECK:STDOUT: }
  550. // CHECK:STDOUT:
  551. // CHECK:STDOUT: specific @J(constants.%T) {
  552. // CHECK:STDOUT: %T.loc4_14.1 => constants.%T
  553. // CHECK:STDOUT: }
  554. // CHECK:STDOUT:
  555. // CHECK:STDOUT: specific @J.Self.binding.as_type.impls.I.type.require(constants.%T, constants.%Self.31c) {
  556. // CHECK:STDOUT: %T => constants.%T
  557. // CHECK:STDOUT: %J.type => constants.%J.type.d68
  558. // CHECK:STDOUT: %Self => constants.%Self.31c
  559. // CHECK:STDOUT: %Self.binding.as_type => constants.%Self.binding.as_type
  560. // CHECK:STDOUT: %I.type.loc5_27.2 => constants.%I.type.1ab
  561. // CHECK:STDOUT: }
  562. // CHECK:STDOUT:
  563. // CHECK:STDOUT: --- basic_import_generic_constraint.impl.carbon
  564. // CHECK:STDOUT:
  565. // CHECK:STDOUT: constants {
  566. // CHECK:STDOUT: %C: type = class_type @C [concrete]
  567. // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete]
  568. // CHECK:STDOUT: %complete_type.357: <witness> = complete_type_witness %empty_struct_type [concrete]
  569. // CHECK:STDOUT: %J.type.d08: type = generic_named_constaint_type @J [concrete]
  570. // CHECK:STDOUT: %empty_struct.d2a: %J.type.d08 = struct_value () [concrete]
  571. // CHECK:STDOUT: %T: type = symbolic_binding T, 0 [symbolic]
  572. // CHECK:STDOUT: %J.type.d682d6.1: type = facet_type <@J, @J(%T)> [symbolic]
  573. // CHECK:STDOUT: %Self.e1f642.1: %J.type.d682d6.1 = symbolic_binding Self, 1 [symbolic]
  574. // CHECK:STDOUT: %I.type.1ab: type = facet_type <@I, @I(%T)> [symbolic]
  575. // CHECK:STDOUT: %Self.c1b: %I.type.1ab = symbolic_binding Self, 1 [symbolic]
  576. // CHECK:STDOUT: %Self.binding.as_type: type = symbolic_binding_type Self, 1, %Self.e1f642.1 [symbolic]
  577. // CHECK:STDOUT: %require_complete: <witness> = require_complete_type %I.type.1ab [symbolic]
  578. // CHECK:STDOUT: %empty_struct.a40: %empty_struct_type = struct_value () [concrete]
  579. // CHECK:STDOUT: %J.type.d682d6.2: type = facet_type <@J, @J(%empty_struct_type)> [concrete]
  580. // CHECK:STDOUT: %type: type = facet_type <type> [concrete]
  581. // CHECK:STDOUT: %C.type.facet: %type = facet_value %C, () [concrete]
  582. // CHECK:STDOUT: %I.type.ab5: type = facet_type <@I, @I(%empty_struct_type)> [concrete]
  583. // CHECK:STDOUT: %I.impl_witness: <witness> = impl_witness @C.as.I.impl.%I.impl_witness_table [concrete]
  584. // CHECK:STDOUT: %Self.e1f642.2: %J.type.d682d6.2 = symbolic_binding Self, 1 [symbolic]
  585. // CHECK:STDOUT: %Self.025: %I.type.ab5 = symbolic_binding Self, 1 [symbolic]
  586. // CHECK:STDOUT: %complete_type.5b1: <witness> = complete_type_witness %I.type.ab5 [concrete]
  587. // CHECK:STDOUT: }
  588. // CHECK:STDOUT:
  589. // CHECK:STDOUT: imports {
  590. // CHECK:STDOUT: %Main.I = import_ref Main//basic_import_generic_constraint, I, unloaded
  591. // CHECK:STDOUT: %Main.J: %J.type.d08 = import_ref Main//basic_import_generic_constraint, J, loaded [concrete = constants.%empty_struct.d2a]
  592. // CHECK:STDOUT: %Main.import_ref.3fa = import_ref Main//basic_import_generic_constraint, loc3_23, unloaded
  593. // CHECK:STDOUT: %Main.import_ref.b3bc94.1: type = import_ref Main//basic_import_generic_constraint, loc3_13, loaded [symbolic = @I.%T (constants.%T)]
  594. // CHECK:STDOUT: %Main.import_ref.213: type = import_ref Main//basic_import_generic_constraint, loc5_18, loaded [symbolic = @J.Self.binding.as_type.impls.I.type.require.%Self.binding.as_type (constants.%Self.binding.as_type)]
  595. // CHECK:STDOUT: %Main.import_ref.358: type = import_ref Main//basic_import_generic_constraint, loc5_27, loaded [symbolic = @J.Self.binding.as_type.impls.I.type.require.%I.type (constants.%I.type.1ab)]
  596. // CHECK:STDOUT: %Main.import_ref.b3bc94.2: type = import_ref Main//basic_import_generic_constraint, loc4_14, loaded [symbolic = @J.%T (constants.%T)]
  597. // CHECK:STDOUT: %Main.import_ref.2fc: @J.%J.type (%J.type.d682d6.1) = import_ref Main//basic_import_generic_constraint, loc4_24, loaded [symbolic = @J.%Self (constants.%Self.e1f642.1)]
  598. // CHECK:STDOUT: %Main.import_ref.830 = import_ref Main//basic_import_generic_constraint, loc4_24, unloaded
  599. // CHECK:STDOUT: %Main.import_ref.b41 = import_ref Main//basic_import_generic_constraint, loc5_28, unloaded
  600. // CHECK:STDOUT: %Main.import_ref.b3bc94.3: type = import_ref Main//basic_import_generic_constraint, loc4_14, loaded [symbolic = @J.%T (constants.%T)]
  601. // CHECK:STDOUT: }
  602. // CHECK:STDOUT:
  603. // CHECK:STDOUT: file {
  604. // CHECK:STDOUT: package: <namespace> = namespace [concrete] {
  605. // CHECK:STDOUT: .I = imports.%Main.I
  606. // CHECK:STDOUT: .J = imports.%Main.J
  607. // CHECK:STDOUT: .C = %C.decl
  608. // CHECK:STDOUT: }
  609. // CHECK:STDOUT: %default.import.loc1_47.1 = import <none>
  610. // CHECK:STDOUT: %default.import.loc1_47.2 = import <none>
  611. // CHECK:STDOUT: %C.decl: type = class_decl @C [concrete = constants.%C] {} {}
  612. // CHECK:STDOUT: impl_decl @C.as.I.impl [concrete] {} {
  613. // CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [concrete = constants.%C]
  614. // CHECK:STDOUT: %J.ref: %J.type.d08 = name_ref J, imports.%Main.J [concrete = constants.%empty_struct.d2a]
  615. // CHECK:STDOUT: %.loc5_14: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct.a40]
  616. // CHECK:STDOUT: %.loc5_15: type = converted %.loc5_14, constants.%empty_struct_type [concrete = constants.%empty_struct_type]
  617. // CHECK:STDOUT: %J.type: type = facet_type <@J, @J(constants.%empty_struct_type)> [concrete = constants.%J.type.d682d6.2]
  618. // CHECK:STDOUT: }
  619. // CHECK:STDOUT: }
  620. // CHECK:STDOUT:
  621. // CHECK:STDOUT: generic interface @I(imports.%Main.import_ref.b3bc94.1: type) [from "basic_import_generic_constraint.carbon"] {
  622. // CHECK:STDOUT: %T: type = symbolic_binding T, 0 [symbolic = %T (constants.%T)]
  623. // CHECK:STDOUT:
  624. // CHECK:STDOUT: !definition:
  625. // CHECK:STDOUT: %I.type: type = facet_type <@I, @I(%T)> [symbolic = %I.type (constants.%I.type.1ab)]
  626. // CHECK:STDOUT: %Self: @I.%I.type (%I.type.1ab) = symbolic_binding Self, 1 [symbolic = %Self (constants.%Self.c1b)]
  627. // CHECK:STDOUT:
  628. // CHECK:STDOUT: interface {
  629. // CHECK:STDOUT: !members:
  630. // CHECK:STDOUT: .Self = imports.%Main.import_ref.3fa
  631. // CHECK:STDOUT: witness = ()
  632. // CHECK:STDOUT:
  633. // CHECK:STDOUT: !requires:
  634. // CHECK:STDOUT: }
  635. // CHECK:STDOUT: }
  636. // CHECK:STDOUT:
  637. // CHECK:STDOUT: generic constraint @J(imports.%Main.import_ref.b3bc94.3: type) [from "basic_import_generic_constraint.carbon"] {
  638. // CHECK:STDOUT: %T: type = symbolic_binding T, 0 [symbolic = %T (constants.%T)]
  639. // CHECK:STDOUT:
  640. // CHECK:STDOUT: !definition:
  641. // CHECK:STDOUT: %J.type: type = facet_type <@J, @J(%T)> [symbolic = %J.type (constants.%J.type.d682d6.1)]
  642. // CHECK:STDOUT: %Self: @J.%J.type (%J.type.d682d6.1) = symbolic_binding Self, 1 [symbolic = %Self (constants.%Self.e1f642.1)]
  643. // CHECK:STDOUT: %I.type: type = facet_type <@I, @I(%T)> [symbolic = %I.type (constants.%I.type.1ab)]
  644. // CHECK:STDOUT: %require_complete: <witness> = require_complete_type %I.type [symbolic = %require_complete (constants.%require_complete)]
  645. // CHECK:STDOUT:
  646. // CHECK:STDOUT: constraint {
  647. // CHECK:STDOUT: !members:
  648. // CHECK:STDOUT: .Self = imports.%Main.import_ref.830
  649. // CHECK:STDOUT: extend imports.%Main.import_ref.b41
  650. // CHECK:STDOUT:
  651. // CHECK:STDOUT: !requires:
  652. // CHECK:STDOUT: @J.Self.binding.as_type.impls.I.type.require {
  653. // CHECK:STDOUT: require imports.%Main.import_ref.213 impls imports.%Main.import_ref.358
  654. // CHECK:STDOUT: }
  655. // CHECK:STDOUT: }
  656. // CHECK:STDOUT: }
  657. // CHECK:STDOUT:
  658. // CHECK:STDOUT: generic require @J.Self.binding.as_type.impls.I.type.require(imports.%Main.import_ref.b3bc94.2: type, imports.%Main.import_ref.2fc: @J.%J.type (%J.type.d682d6.1)) [from "basic_import_generic_constraint.carbon"] {
  659. // CHECK:STDOUT: %T: type = symbolic_binding T, 0 [symbolic = %T (constants.%T)]
  660. // CHECK:STDOUT: %J.type: type = facet_type <@J, @J(%T)> [symbolic = %J.type (constants.%J.type.d682d6.1)]
  661. // CHECK:STDOUT: %Self: @J.Self.binding.as_type.impls.I.type.require.%J.type (%J.type.d682d6.1) = symbolic_binding Self, 1 [symbolic = %Self (constants.%Self.e1f642.1)]
  662. // CHECK:STDOUT: %Self.binding.as_type: type = symbolic_binding_type Self, 1, %Self [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)]
  663. // CHECK:STDOUT: %I.type: type = facet_type <@I, @I(%T)> [symbolic = %I.type (constants.%I.type.1ab)]
  664. // CHECK:STDOUT: }
  665. // CHECK:STDOUT:
  666. // CHECK:STDOUT: impl @C.as.I.impl: %C.ref as %J.type {
  667. // CHECK:STDOUT: %I.impl_witness_table = impl_witness_table (), @C.as.I.impl [concrete]
  668. // CHECK:STDOUT: %I.impl_witness: <witness> = impl_witness %I.impl_witness_table [concrete = constants.%I.impl_witness]
  669. // CHECK:STDOUT:
  670. // CHECK:STDOUT: !members:
  671. // CHECK:STDOUT: witness = %I.impl_witness
  672. // CHECK:STDOUT: }
  673. // CHECK:STDOUT:
  674. // CHECK:STDOUT: class @C {
  675. // CHECK:STDOUT: %complete_type: <witness> = complete_type_witness constants.%empty_struct_type [concrete = constants.%complete_type.357]
  676. // CHECK:STDOUT: complete_type_witness = %complete_type
  677. // CHECK:STDOUT:
  678. // CHECK:STDOUT: !members:
  679. // CHECK:STDOUT: .Self = constants.%C
  680. // CHECK:STDOUT: }
  681. // CHECK:STDOUT:
  682. // CHECK:STDOUT: specific @J(constants.%T) {
  683. // CHECK:STDOUT: %T => constants.%T
  684. // CHECK:STDOUT: }
  685. // CHECK:STDOUT:
  686. // CHECK:STDOUT: specific @I(constants.%T) {
  687. // CHECK:STDOUT: %T => constants.%T
  688. // CHECK:STDOUT:
  689. // CHECK:STDOUT: !definition:
  690. // CHECK:STDOUT: %I.type => constants.%I.type.1ab
  691. // CHECK:STDOUT: %Self => constants.%Self.c1b
  692. // CHECK:STDOUT: }
  693. // CHECK:STDOUT:
  694. // CHECK:STDOUT: specific @J.Self.binding.as_type.impls.I.type.require(constants.%T, constants.%Self.e1f642.1) {
  695. // CHECK:STDOUT: %T => constants.%T
  696. // CHECK:STDOUT: %J.type => constants.%J.type.d682d6.1
  697. // CHECK:STDOUT: %Self => constants.%Self.e1f642.1
  698. // CHECK:STDOUT: %Self.binding.as_type => constants.%Self.binding.as_type
  699. // CHECK:STDOUT: %I.type => constants.%I.type.1ab
  700. // CHECK:STDOUT: }
  701. // CHECK:STDOUT:
  702. // CHECK:STDOUT: specific @J(constants.%empty_struct_type) {
  703. // CHECK:STDOUT: %T => constants.%empty_struct_type
  704. // CHECK:STDOUT:
  705. // CHECK:STDOUT: !definition:
  706. // CHECK:STDOUT: %J.type => constants.%J.type.d682d6.2
  707. // CHECK:STDOUT: %Self => constants.%Self.e1f642.2
  708. // CHECK:STDOUT: %I.type => constants.%I.type.ab5
  709. // CHECK:STDOUT: %require_complete => constants.%complete_type.5b1
  710. // CHECK:STDOUT: }
  711. // CHECK:STDOUT:
  712. // CHECK:STDOUT: specific @J.Self.binding.as_type.impls.I.type.require(constants.%empty_struct_type, constants.%C.type.facet) {
  713. // CHECK:STDOUT: %T => constants.%empty_struct_type
  714. // CHECK:STDOUT: %J.type => constants.%J.type.d682d6.2
  715. // CHECK:STDOUT: %Self => constants.%C.type.facet
  716. // CHECK:STDOUT: %Self.binding.as_type => constants.%C
  717. // CHECK:STDOUT: %I.type => constants.%I.type.ab5
  718. // CHECK:STDOUT: }
  719. // CHECK:STDOUT:
  720. // CHECK:STDOUT: specific @I(constants.%empty_struct_type) {
  721. // CHECK:STDOUT: %T => constants.%empty_struct_type
  722. // CHECK:STDOUT:
  723. // CHECK:STDOUT: !definition:
  724. // CHECK:STDOUT: %I.type => constants.%I.type.ab5
  725. // CHECK:STDOUT: %Self => constants.%Self.025
  726. // CHECK:STDOUT: }
  727. // CHECK:STDOUT:
  728. // CHECK:STDOUT: --- import_generic.carbon
  729. // CHECK:STDOUT:
  730. // CHECK:STDOUT: constants {
  731. // CHECK:STDOUT: %C: type = class_type @C [concrete]
  732. // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete]
  733. // CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %empty_struct_type [concrete]
  734. // CHECK:STDOUT: %type: type = facet_type <type> [concrete]
  735. // CHECK:STDOUT: %.Self: %type = symbolic_binding .Self [symbolic_self]
  736. // CHECK:STDOUT: %T: type = symbolic_binding T, 0 [symbolic]
  737. // CHECK:STDOUT: %pattern_type: type = pattern_type type [concrete]
  738. // CHECK:STDOUT: %I.type.609: type = generic_interface_type @I [concrete]
  739. // CHECK:STDOUT: %I.generic: %I.type.609 = struct_value () [concrete]
  740. // CHECK:STDOUT: %I.type.1ab: type = facet_type <@I, @I(%T)> [symbolic]
  741. // CHECK:STDOUT: %Self.fdb: %I.type.1ab = symbolic_binding Self, 1 [symbolic]
  742. // CHECK:STDOUT: %I.impl_witness.9f5: <witness> = impl_witness @C.as.I.impl.431.%I.impl_witness_table, @C.as.I.impl.431(%T) [symbolic]
  743. // CHECK:STDOUT: %require_complete.e36: <witness> = require_complete_type %I.type.1ab [symbolic]
  744. // CHECK:STDOUT: %ptr: type = ptr_type %T [symbolic]
  745. // CHECK:STDOUT: %I.type.e19: type = facet_type <@I, @I(%ptr)> [symbolic]
  746. // CHECK:STDOUT: %I.impl_witness.18a: <witness> = impl_witness @C.as.I.impl.815.%I.impl_witness_table, @C.as.I.impl.815(%T) [symbolic]
  747. // CHECK:STDOUT: %Self.eff: %I.type.e19 = symbolic_binding Self, 1 [symbolic]
  748. // CHECK:STDOUT: %require_complete.ffd: <witness> = require_complete_type %I.type.e19 [symbolic]
  749. // CHECK:STDOUT: %N.type.b47: type = generic_named_constaint_type @N [concrete]
  750. // CHECK:STDOUT: %empty_struct: %N.type.b47 = struct_value () [concrete]
  751. // CHECK:STDOUT: %N.type.d68: type = facet_type <@N, @N(%T)> [symbolic]
  752. // CHECK:STDOUT: %Self.31c: %N.type.d68 = symbolic_binding Self, 1 [symbolic]
  753. // CHECK:STDOUT: %Self.binding.as_type: type = symbolic_binding_type Self, 1, %Self.31c [symbolic]
  754. // CHECK:STDOUT: }
  755. // CHECK:STDOUT:
  756. // CHECK:STDOUT: file {
  757. // CHECK:STDOUT: package: <namespace> = namespace [concrete] {
  758. // CHECK:STDOUT: .C = %C.decl
  759. // CHECK:STDOUT: .I = %I.decl
  760. // CHECK:STDOUT: .N = %N.decl
  761. // CHECK:STDOUT: }
  762. // CHECK:STDOUT: %C.decl: type = class_decl @C [concrete = constants.%C] {} {}
  763. // CHECK:STDOUT: %I.decl: %I.type.609 = interface_decl @I [concrete = constants.%I.generic] {
  764. // CHECK:STDOUT: %T.patt: %pattern_type = symbolic_binding_pattern T, 0 [concrete]
  765. // CHECK:STDOUT: } {
  766. // CHECK:STDOUT: %.Self: %type = symbolic_binding .Self [symbolic_self = constants.%.Self]
  767. // CHECK:STDOUT: %T.loc5_13.2: type = symbolic_binding T, 0 [symbolic = %T.loc5_13.1 (constants.%T)]
  768. // CHECK:STDOUT: }
  769. // CHECK:STDOUT: impl_decl @C.as.I.impl.431 [concrete] {
  770. // CHECK:STDOUT: %T.patt: %pattern_type = symbolic_binding_pattern T, 0 [concrete]
  771. // CHECK:STDOUT: } {
  772. // CHECK:STDOUT: %C.ref.loc8: type = name_ref C, file.%C.decl [concrete = constants.%C]
  773. // CHECK:STDOUT: %I.ref.loc8: %I.type.609 = name_ref I, file.%I.decl [concrete = constants.%I.generic]
  774. // CHECK:STDOUT: %T.ref.loc8: type = name_ref T, %T.loc8_14.1 [symbolic = %T.loc8_14.2 (constants.%T)]
  775. // CHECK:STDOUT: %I.type.loc8_32.1: type = facet_type <@I, @I(constants.%T)> [symbolic = %I.type.loc8_32.2 (constants.%I.type.1ab)]
  776. // CHECK:STDOUT: %.Self.2: %type = symbolic_binding .Self [symbolic_self = constants.%.Self]
  777. // CHECK:STDOUT: %T.loc8_14.1: type = symbolic_binding T, 0 [symbolic = %T.loc8_14.2 (constants.%T)]
  778. // CHECK:STDOUT: }
  779. // CHECK:STDOUT: impl_decl @C.as.I.impl.431 [concrete] {
  780. // CHECK:STDOUT: %T.patt: %pattern_type = symbolic_binding_pattern T, 0 [concrete]
  781. // CHECK:STDOUT: } {
  782. // CHECK:STDOUT: %C.ref.loc9: type = name_ref C, file.%C.decl [concrete = constants.%C]
  783. // CHECK:STDOUT: %I.ref.loc9: %I.type.609 = name_ref I, file.%I.decl [concrete = constants.%I.generic]
  784. // CHECK:STDOUT: %T.ref.loc9: type = name_ref T, %T.loc9 [symbolic = %T.loc8_14.2 (constants.%T)]
  785. // CHECK:STDOUT: %I.type.loc9: type = facet_type <@I, @I(constants.%T)> [symbolic = %I.type.loc8_32.2 (constants.%I.type.1ab)]
  786. // CHECK:STDOUT: %.Self.1: %type = symbolic_binding .Self [symbolic_self = constants.%.Self]
  787. // CHECK:STDOUT: %T.loc9: type = symbolic_binding T, 0 [symbolic = %T.loc8_14.2 (constants.%T)]
  788. // CHECK:STDOUT: }
  789. // CHECK:STDOUT: impl_decl @C.as.I.impl.815 [concrete] {
  790. // CHECK:STDOUT: %T.patt: %pattern_type = symbolic_binding_pattern T, 0 [concrete]
  791. // CHECK:STDOUT: } {
  792. // CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [concrete = constants.%C]
  793. // CHECK:STDOUT: %I.ref: %I.type.609 = name_ref I, file.%I.decl [concrete = constants.%I.generic]
  794. // CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc12_14.1 [symbolic = %T.loc12_14.2 (constants.%T)]
  795. // CHECK:STDOUT: %ptr.loc12_32.1: type = ptr_type %T.ref [symbolic = %ptr.loc12_32.2 (constants.%ptr)]
  796. // CHECK:STDOUT: %I.type.loc12_33.1: type = facet_type <@I, @I(constants.%ptr)> [symbolic = %I.type.loc12_33.2 (constants.%I.type.e19)]
  797. // CHECK:STDOUT: %.Self: %type = symbolic_binding .Self [symbolic_self = constants.%.Self]
  798. // CHECK:STDOUT: %T.loc12_14.1: type = symbolic_binding T, 0 [symbolic = %T.loc12_14.2 (constants.%T)]
  799. // CHECK:STDOUT: }
  800. // CHECK:STDOUT: %N.decl: %N.type.b47 = constraint_decl @N [concrete = constants.%empty_struct] {
  801. // CHECK:STDOUT: %T.patt: %pattern_type = symbolic_binding_pattern T, 0 [concrete]
  802. // CHECK:STDOUT: } {
  803. // CHECK:STDOUT: %.Self: %type = symbolic_binding .Self [symbolic_self = constants.%.Self]
  804. // CHECK:STDOUT: %T.loc14_14.2: type = symbolic_binding T, 0 [symbolic = %T.loc14_14.1 (constants.%T)]
  805. // CHECK:STDOUT: }
  806. // CHECK:STDOUT: }
  807. // CHECK:STDOUT:
  808. // CHECK:STDOUT: generic interface @I(%T.loc5_13.2: type) {
  809. // CHECK:STDOUT: %T.loc5_13.1: type = symbolic_binding T, 0 [symbolic = %T.loc5_13.1 (constants.%T)]
  810. // CHECK:STDOUT:
  811. // CHECK:STDOUT: !definition:
  812. // CHECK:STDOUT: %I.type: type = facet_type <@I, @I(%T.loc5_13.1)> [symbolic = %I.type (constants.%I.type.1ab)]
  813. // CHECK:STDOUT: %Self.loc5_23.2: @I.%I.type (%I.type.1ab) = symbolic_binding Self, 1 [symbolic = %Self.loc5_23.2 (constants.%Self.fdb)]
  814. // CHECK:STDOUT:
  815. // CHECK:STDOUT: interface {
  816. // CHECK:STDOUT: %Self.loc5_23.1: @I.%I.type (%I.type.1ab) = symbolic_binding Self, 1 [symbolic = %Self.loc5_23.2 (constants.%Self.fdb)]
  817. // CHECK:STDOUT:
  818. // CHECK:STDOUT: !members:
  819. // CHECK:STDOUT: .Self = %Self.loc5_23.1
  820. // CHECK:STDOUT: witness = ()
  821. // CHECK:STDOUT:
  822. // CHECK:STDOUT: !requires:
  823. // CHECK:STDOUT: }
  824. // CHECK:STDOUT: }
  825. // CHECK:STDOUT:
  826. // CHECK:STDOUT: generic constraint @N(%T.loc14_14.2: type) {
  827. // CHECK:STDOUT: %T.loc14_14.1: type = symbolic_binding T, 0 [symbolic = %T.loc14_14.1 (constants.%T)]
  828. // CHECK:STDOUT:
  829. // CHECK:STDOUT: !definition:
  830. // CHECK:STDOUT: %N.type: type = facet_type <@N, @N(%T.loc14_14.1)> [symbolic = %N.type (constants.%N.type.d68)]
  831. // CHECK:STDOUT: %Self.loc14_24.2: @N.%N.type (%N.type.d68) = symbolic_binding Self, 1 [symbolic = %Self.loc14_24.2 (constants.%Self.31c)]
  832. // CHECK:STDOUT: %I.type: type = facet_type <@I, @I(%T.loc14_14.1)> [symbolic = %I.type (constants.%I.type.1ab)]
  833. // CHECK:STDOUT: %require_complete: <witness> = require_complete_type %I.type [symbolic = %require_complete (constants.%require_complete.e36)]
  834. // CHECK:STDOUT:
  835. // CHECK:STDOUT: constraint {
  836. // CHECK:STDOUT: %Self.loc14_24.1: @N.%N.type (%N.type.d68) = symbolic_binding Self, 1 [symbolic = %Self.loc14_24.2 (constants.%Self.31c)]
  837. // CHECK:STDOUT: %N.Self.binding.as_type.impls.I.type.require.decl = require_decl @N.Self.binding.as_type.impls.I.type.require [concrete] {
  838. // CHECK:STDOUT: require %Self.as_type impls %I.type.loc15_27.1
  839. // CHECK:STDOUT: } {
  840. // CHECK:STDOUT: %Self.as_type: type = facet_access_type @N.%Self.loc14_24.1 [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)]
  841. // CHECK:STDOUT: %I.ref: %I.type.609 = name_ref I, file.%I.decl [concrete = constants.%I.generic]
  842. // CHECK:STDOUT: %T.ref: type = name_ref T, @N.%T.loc14_14.2 [symbolic = %T (constants.%T)]
  843. // CHECK:STDOUT: %I.type.loc15_27.1: type = facet_type <@I, @I(constants.%T)> [symbolic = %I.type.loc15_27.2 (constants.%I.type.1ab)]
  844. // CHECK:STDOUT: }
  845. // CHECK:STDOUT: %.loc15: type = specific_constant @N.Self.binding.as_type.impls.I.type.require.%I.type.loc15_27.1, @N.Self.binding.as_type.impls.I.type.require(constants.%T, constants.%Self.31c) [symbolic = %I.type (constants.%I.type.1ab)]
  846. // CHECK:STDOUT:
  847. // CHECK:STDOUT: !members:
  848. // CHECK:STDOUT: .Self = %Self.loc14_24.1
  849. // CHECK:STDOUT: .I = <poisoned>
  850. // CHECK:STDOUT: .T = <poisoned>
  851. // CHECK:STDOUT: extend %.loc15
  852. // CHECK:STDOUT:
  853. // CHECK:STDOUT: !requires:
  854. // CHECK:STDOUT: @N.Self.binding.as_type.impls.I.type.require {
  855. // CHECK:STDOUT: require @N.Self.binding.as_type.impls.I.type.require.%Self.as_type impls @N.Self.binding.as_type.impls.I.type.require.%I.type.loc15_27.1
  856. // CHECK:STDOUT: }
  857. // CHECK:STDOUT: }
  858. // CHECK:STDOUT: }
  859. // CHECK:STDOUT:
  860. // CHECK:STDOUT: generic require @N.Self.binding.as_type.impls.I.type.require(@N.%T.loc14_14.2: type, @N.%Self.loc14_24.1: @N.%N.type (%N.type.d68)) {
  861. // CHECK:STDOUT: %T: type = symbolic_binding T, 0 [symbolic = %T (constants.%T)]
  862. // CHECK:STDOUT: %N.type: type = facet_type <@N, @N(%T)> [symbolic = %N.type (constants.%N.type.d68)]
  863. // CHECK:STDOUT: %Self: @N.Self.binding.as_type.impls.I.type.require.%N.type (%N.type.d68) = symbolic_binding Self, 1 [symbolic = %Self (constants.%Self.31c)]
  864. // CHECK:STDOUT: %Self.binding.as_type: type = symbolic_binding_type Self, 1, %Self [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)]
  865. // CHECK:STDOUT: %I.type.loc15_27.2: type = facet_type <@I, @I(%T)> [symbolic = %I.type.loc15_27.2 (constants.%I.type.1ab)]
  866. // CHECK:STDOUT: }
  867. // CHECK:STDOUT:
  868. // CHECK:STDOUT: generic impl @C.as.I.impl.431(%T.loc8_14.1: type) {
  869. // CHECK:STDOUT: %T.loc8_14.2: type = symbolic_binding T, 0 [symbolic = %T.loc8_14.2 (constants.%T)]
  870. // CHECK:STDOUT: %I.type.loc8_32.2: type = facet_type <@I, @I(%T.loc8_14.2)> [symbolic = %I.type.loc8_32.2 (constants.%I.type.1ab)]
  871. // CHECK:STDOUT: %I.impl_witness.loc8_33.2: <witness> = impl_witness %I.impl_witness_table, @C.as.I.impl.431(%T.loc8_14.2) [symbolic = %I.impl_witness.loc8_33.2 (constants.%I.impl_witness.9f5)]
  872. // CHECK:STDOUT:
  873. // CHECK:STDOUT: !definition:
  874. // CHECK:STDOUT: %require_complete: <witness> = require_complete_type %I.type.loc8_32.2 [symbolic = %require_complete (constants.%require_complete.e36)]
  875. // CHECK:STDOUT:
  876. // CHECK:STDOUT: impl: %C.ref.loc8 as %I.type.loc8_32.1 {
  877. // CHECK:STDOUT: %I.impl_witness_table = impl_witness_table (), @C.as.I.impl.431 [concrete]
  878. // CHECK:STDOUT: %I.impl_witness.loc8_33.1: <witness> = impl_witness %I.impl_witness_table, @C.as.I.impl.431(constants.%T) [symbolic = %I.impl_witness.loc8_33.2 (constants.%I.impl_witness.9f5)]
  879. // CHECK:STDOUT:
  880. // CHECK:STDOUT: !members:
  881. // CHECK:STDOUT: witness = %I.impl_witness.loc8_33.1
  882. // CHECK:STDOUT: }
  883. // CHECK:STDOUT: }
  884. // CHECK:STDOUT:
  885. // CHECK:STDOUT: generic impl @C.as.I.impl.815(%T.loc12_14.1: type) {
  886. // CHECK:STDOUT: %T.loc12_14.2: type = symbolic_binding T, 0 [symbolic = %T.loc12_14.2 (constants.%T)]
  887. // CHECK:STDOUT: %ptr.loc12_32.2: type = ptr_type %T.loc12_14.2 [symbolic = %ptr.loc12_32.2 (constants.%ptr)]
  888. // CHECK:STDOUT: %I.type.loc12_33.2: type = facet_type <@I, @I(%ptr.loc12_32.2)> [symbolic = %I.type.loc12_33.2 (constants.%I.type.e19)]
  889. // CHECK:STDOUT: %I.impl_witness.loc12_35.2: <witness> = impl_witness %I.impl_witness_table, @C.as.I.impl.815(%T.loc12_14.2) [symbolic = %I.impl_witness.loc12_35.2 (constants.%I.impl_witness.18a)]
  890. // CHECK:STDOUT:
  891. // CHECK:STDOUT: !definition:
  892. // CHECK:STDOUT: %require_complete: <witness> = require_complete_type %I.type.loc12_33.2 [symbolic = %require_complete (constants.%require_complete.ffd)]
  893. // CHECK:STDOUT:
  894. // CHECK:STDOUT: impl: %C.ref as %I.type.loc12_33.1 {
  895. // CHECK:STDOUT: %I.impl_witness_table = impl_witness_table (), @C.as.I.impl.815 [concrete]
  896. // CHECK:STDOUT: %I.impl_witness.loc12_35.1: <witness> = impl_witness %I.impl_witness_table, @C.as.I.impl.815(constants.%T) [symbolic = %I.impl_witness.loc12_35.2 (constants.%I.impl_witness.18a)]
  897. // CHECK:STDOUT:
  898. // CHECK:STDOUT: !members:
  899. // CHECK:STDOUT: witness = %I.impl_witness.loc12_35.1
  900. // CHECK:STDOUT: }
  901. // CHECK:STDOUT: }
  902. // CHECK:STDOUT:
  903. // CHECK:STDOUT: class @C {
  904. // CHECK:STDOUT: %complete_type: <witness> = complete_type_witness constants.%empty_struct_type [concrete = constants.%complete_type]
  905. // CHECK:STDOUT: complete_type_witness = %complete_type
  906. // CHECK:STDOUT:
  907. // CHECK:STDOUT: !members:
  908. // CHECK:STDOUT: .Self = constants.%C
  909. // CHECK:STDOUT: }
  910. // CHECK:STDOUT:
  911. // CHECK:STDOUT: specific @I(constants.%T) {
  912. // CHECK:STDOUT: %T.loc5_13.1 => constants.%T
  913. // CHECK:STDOUT:
  914. // CHECK:STDOUT: !definition:
  915. // CHECK:STDOUT: %I.type => constants.%I.type.1ab
  916. // CHECK:STDOUT: %Self.loc5_23.2 => constants.%Self.fdb
  917. // CHECK:STDOUT: }
  918. // CHECK:STDOUT:
  919. // CHECK:STDOUT: specific @C.as.I.impl.431(constants.%T) {
  920. // CHECK:STDOUT: %T.loc8_14.2 => constants.%T
  921. // CHECK:STDOUT: %I.type.loc8_32.2 => constants.%I.type.1ab
  922. // CHECK:STDOUT: %I.impl_witness.loc8_33.2 => constants.%I.impl_witness.9f5
  923. // CHECK:STDOUT: }
  924. // CHECK:STDOUT:
  925. // CHECK:STDOUT: specific @I(constants.%ptr) {
  926. // CHECK:STDOUT: %T.loc5_13.1 => constants.%ptr
  927. // CHECK:STDOUT:
  928. // CHECK:STDOUT: !definition:
  929. // CHECK:STDOUT: %I.type => constants.%I.type.e19
  930. // CHECK:STDOUT: %Self.loc5_23.2 => constants.%Self.eff
  931. // CHECK:STDOUT: }
  932. // CHECK:STDOUT:
  933. // CHECK:STDOUT: specific @C.as.I.impl.815(constants.%T) {
  934. // CHECK:STDOUT: %T.loc12_14.2 => constants.%T
  935. // CHECK:STDOUT: %ptr.loc12_32.2 => constants.%ptr
  936. // CHECK:STDOUT: %I.type.loc12_33.2 => constants.%I.type.e19
  937. // CHECK:STDOUT: %I.impl_witness.loc12_35.2 => constants.%I.impl_witness.18a
  938. // CHECK:STDOUT: }
  939. // CHECK:STDOUT:
  940. // CHECK:STDOUT: specific @N(constants.%T) {
  941. // CHECK:STDOUT: %T.loc14_14.1 => constants.%T
  942. // CHECK:STDOUT: }
  943. // CHECK:STDOUT:
  944. // CHECK:STDOUT: specific @N.Self.binding.as_type.impls.I.type.require(constants.%T, constants.%Self.31c) {
  945. // CHECK:STDOUT: %T => constants.%T
  946. // CHECK:STDOUT: %N.type => constants.%N.type.d68
  947. // CHECK:STDOUT: %Self => constants.%Self.31c
  948. // CHECK:STDOUT: %Self.binding.as_type => constants.%Self.binding.as_type
  949. // CHECK:STDOUT: %I.type.loc15_27.2 => constants.%I.type.1ab
  950. // CHECK:STDOUT: }
  951. // CHECK:STDOUT:
  952. // CHECK:STDOUT: --- fail_import_generic.impl.carbon
  953. // CHECK:STDOUT:
  954. // CHECK:STDOUT: constants {
  955. // CHECK:STDOUT: %T: type = symbolic_binding T, 0 [symbolic]
  956. // CHECK:STDOUT: %I.type.609: type = generic_interface_type @I [concrete]
  957. // CHECK:STDOUT: %I.generic: %I.type.609 = struct_value () [concrete]
  958. // CHECK:STDOUT: %I.type.1ab: type = facet_type <@I, @I(%T)> [symbolic]
  959. // CHECK:STDOUT: %Self.c1b: %I.type.1ab = symbolic_binding Self, 1 [symbolic]
  960. // CHECK:STDOUT: %pattern_type: type = pattern_type type [concrete]
  961. // CHECK:STDOUT: %C: type = class_type @C [concrete]
  962. // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete]
  963. // CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %empty_struct_type [concrete]
  964. // CHECK:STDOUT: %I.impl_witness.9f5: <witness> = impl_witness imports.%I.impl_witness_table.2ac, @C.as.I.impl.431d5e.1(%T) [symbolic]
  965. // CHECK:STDOUT: %require_complete.e36: <witness> = require_complete_type %I.type.1ab [symbolic]
  966. // CHECK:STDOUT: %ptr: type = ptr_type %T [symbolic]
  967. // CHECK:STDOUT: %I.type.e19: type = facet_type <@I, @I(%ptr)> [symbolic]
  968. // CHECK:STDOUT: %Self.dda: %I.type.e19 = symbolic_binding Self, 1 [symbolic]
  969. // CHECK:STDOUT: %I.impl_witness.18a: <witness> = impl_witness imports.%I.impl_witness_table.a23, @C.as.I.impl.8159c7.1(%T) [symbolic]
  970. // CHECK:STDOUT: %require_complete.ffd: <witness> = require_complete_type %I.type.e19 [symbolic]
  971. // CHECK:STDOUT: %type: type = facet_type <type> [concrete]
  972. // CHECK:STDOUT: %.Self: %type = symbolic_binding .Self [symbolic_self]
  973. // CHECK:STDOUT: %N.type.b47: type = generic_named_constaint_type @N [concrete]
  974. // CHECK:STDOUT: %empty_struct: %N.type.b47 = struct_value () [concrete]
  975. // CHECK:STDOUT: %N.type.d682d6.1: type = facet_type <@N, @N(%T)> [symbolic]
  976. // CHECK:STDOUT: %Self.e1f: %N.type.d682d6.1 = symbolic_binding Self, 1 [symbolic]
  977. // CHECK:STDOUT: %Self.binding.as_type: type = symbolic_binding_type Self, 1, %Self.e1f [symbolic]
  978. // CHECK:STDOUT: %C.type.facet: %type = facet_value %C, () [concrete]
  979. // CHECK:STDOUT: %N.type.d682d6.2: type = facet_type <@N, @N(%ptr)> [symbolic]
  980. // CHECK:STDOUT: }
  981. // CHECK:STDOUT:
  982. // CHECK:STDOUT: imports {
  983. // CHECK:STDOUT: %Main.C: type = import_ref Main//import_generic, C, loaded [concrete = constants.%C]
  984. // CHECK:STDOUT: %Main.I: %I.type.609 = import_ref Main//import_generic, I, loaded [concrete = constants.%I.generic]
  985. // CHECK:STDOUT: %Main.N: %N.type.b47 = import_ref Main//import_generic, N, loaded [concrete = constants.%empty_struct]
  986. // CHECK:STDOUT: %Main.import_ref.3fa = import_ref Main//import_generic, loc5_23, unloaded
  987. // CHECK:STDOUT: %Main.import_ref.b3bc94.1: type = import_ref Main//import_generic, loc5_13, loaded [symbolic = @I.%T (constants.%T)]
  988. // CHECK:STDOUT: %Main.import_ref.e08 = import_ref Main//import_generic, loc8_33, unloaded
  989. // CHECK:STDOUT: %Main.import_ref.8f2: <witness> = import_ref Main//import_generic, loc4_10, loaded [concrete = constants.%complete_type]
  990. // CHECK:STDOUT: %Main.import_ref.743 = import_ref Main//import_generic, inst{{[0-9A-F]+}} [no loc], unloaded
  991. // CHECK:STDOUT: %I.impl_witness_table.2ac = impl_witness_table (), @C.as.I.impl.431d5e.1 [concrete]
  992. // CHECK:STDOUT: %Main.import_ref.61cd7d.1: type = import_ref Main//import_generic, loc8_24, loaded [concrete = constants.%C]
  993. // CHECK:STDOUT: %Main.import_ref.3582b1.1: type = import_ref Main//import_generic, loc8_32, loaded [symbolic = @C.as.I.impl.431d5e.1.%I.type (constants.%I.type.1ab)]
  994. // CHECK:STDOUT: %Main.import_ref.b3bc94.2: type = import_ref Main//import_generic, loc8_14, loaded [symbolic = @C.as.I.impl.431d5e.1.%T (constants.%T)]
  995. // CHECK:STDOUT: %Main.import_ref.2c7 = import_ref Main//import_generic, loc12_35, unloaded
  996. // CHECK:STDOUT: %I.impl_witness_table.a23 = impl_witness_table (), @C.as.I.impl.8159c7.1 [concrete]
  997. // CHECK:STDOUT: %Main.import_ref.61cd7d.2: type = import_ref Main//import_generic, loc12_24, loaded [concrete = constants.%C]
  998. // CHECK:STDOUT: %Main.import_ref.ada: type = import_ref Main//import_generic, loc12_33, loaded [symbolic = @C.as.I.impl.8159c7.1.%I.type (constants.%I.type.e19)]
  999. // CHECK:STDOUT: %Main.import_ref.b3bc94.3: type = import_ref Main//import_generic, loc12_14, loaded [symbolic = @C.as.I.impl.8159c7.1.%T (constants.%T)]
  1000. // CHECK:STDOUT: %Main.import_ref.213: type = import_ref Main//import_generic, loc15_18, loaded [symbolic = @N.Self.binding.as_type.impls.I.type.require.%Self.binding.as_type (constants.%Self.binding.as_type)]
  1001. // CHECK:STDOUT: %Main.import_ref.3582b1.2: type = import_ref Main//import_generic, loc15_27, loaded [symbolic = @N.Self.binding.as_type.impls.I.type.require.%I.type (constants.%I.type.1ab)]
  1002. // CHECK:STDOUT: %Main.import_ref.b3bc94.4: type = import_ref Main//import_generic, loc14_14, loaded [symbolic = @N.%T (constants.%T)]
  1003. // CHECK:STDOUT: %Main.import_ref.2fc: @N.%N.type (%N.type.d682d6.1) = import_ref Main//import_generic, loc14_24, loaded [symbolic = @N.%Self (constants.%Self.e1f)]
  1004. // CHECK:STDOUT: %Main.import_ref.830 = import_ref Main//import_generic, loc14_24, unloaded
  1005. // CHECK:STDOUT: %Main.import_ref.b41 = import_ref Main//import_generic, loc15_28, unloaded
  1006. // CHECK:STDOUT: %Main.import_ref.b3bc94.5: type = import_ref Main//import_generic, loc14_14, loaded [symbolic = @N.%T (constants.%T)]
  1007. // CHECK:STDOUT: }
  1008. // CHECK:STDOUT:
  1009. // CHECK:STDOUT: file {
  1010. // CHECK:STDOUT: package: <namespace> = namespace [concrete] {
  1011. // CHECK:STDOUT: .C = imports.%Main.C
  1012. // CHECK:STDOUT: .I = imports.%Main.I
  1013. // CHECK:STDOUT: .N = imports.%Main.N
  1014. // CHECK:STDOUT: }
  1015. // CHECK:STDOUT: %default.import.loc2_30.1 = import <none>
  1016. // CHECK:STDOUT: %default.import.loc2_30.2 = import <none>
  1017. // CHECK:STDOUT: impl_decl @C.as.I.impl.431d5e.2 [concrete] {
  1018. // CHECK:STDOUT: %T.patt: %pattern_type = symbolic_binding_pattern T, 0 [concrete]
  1019. // CHECK:STDOUT: } {
  1020. // CHECK:STDOUT: %C.ref: type = name_ref C, imports.%Main.C [concrete = constants.%C]
  1021. // CHECK:STDOUT: %I.ref: %I.type.609 = name_ref I, imports.%Main.I [concrete = constants.%I.generic]
  1022. // CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc8_14.1 [symbolic = %T.loc8_14.2 (constants.%T)]
  1023. // CHECK:STDOUT: %I.type.loc8_32.1: type = facet_type <@I, @I(constants.%T)> [symbolic = %I.type.loc8_32.2 (constants.%I.type.1ab)]
  1024. // CHECK:STDOUT: %.Self: %type = symbolic_binding .Self [symbolic_self = constants.%.Self]
  1025. // CHECK:STDOUT: %T.loc8_14.1: type = symbolic_binding T, 0 [symbolic = %T.loc8_14.2 (constants.%T)]
  1026. // CHECK:STDOUT: }
  1027. // CHECK:STDOUT: impl_decl @C.as.I.impl.431d5e.3 [concrete] {
  1028. // CHECK:STDOUT: %T.patt: %pattern_type = symbolic_binding_pattern T, 0 [concrete]
  1029. // CHECK:STDOUT: } {
  1030. // CHECK:STDOUT: %C.ref: type = name_ref C, imports.%Main.C [concrete = constants.%C]
  1031. // CHECK:STDOUT: %I.ref: %I.type.609 = name_ref I, imports.%Main.I [concrete = constants.%I.generic]
  1032. // CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc14_14.1 [symbolic = %T.loc14_14.2 (constants.%T)]
  1033. // CHECK:STDOUT: %I.type.loc14_32.1: type = facet_type <@I, @I(constants.%T)> [symbolic = %I.type.loc14_32.2 (constants.%I.type.1ab)]
  1034. // CHECK:STDOUT: %.Self: %type = symbolic_binding .Self [symbolic_self = constants.%.Self]
  1035. // CHECK:STDOUT: %T.loc14_14.1: type = symbolic_binding T, 0 [symbolic = %T.loc14_14.2 (constants.%T)]
  1036. // CHECK:STDOUT: }
  1037. // CHECK:STDOUT: impl_decl @C.as.I.impl.8159c7.2 [concrete] {
  1038. // CHECK:STDOUT: %T.patt: %pattern_type = symbolic_binding_pattern T, 0 [concrete]
  1039. // CHECK:STDOUT: } {
  1040. // CHECK:STDOUT: %C.ref: type = name_ref C, imports.%Main.C [concrete = constants.%C]
  1041. // CHECK:STDOUT: %I.ref: %I.type.609 = name_ref I, imports.%Main.I [concrete = constants.%I.generic]
  1042. // CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc20_14.1 [symbolic = %T.loc20_14.2 (constants.%T)]
  1043. // CHECK:STDOUT: %ptr.loc20_32.1: type = ptr_type %T.ref [symbolic = %ptr.loc20_32.2 (constants.%ptr)]
  1044. // CHECK:STDOUT: %I.type.loc20_33.1: type = facet_type <@I, @I(constants.%ptr)> [symbolic = %I.type.loc20_33.2 (constants.%I.type.e19)]
  1045. // CHECK:STDOUT: %.Self: %type = symbolic_binding .Self [symbolic_self = constants.%.Self]
  1046. // CHECK:STDOUT: %T.loc20_14.1: type = symbolic_binding T, 0 [symbolic = %T.loc20_14.2 (constants.%T)]
  1047. // CHECK:STDOUT: }
  1048. // CHECK:STDOUT: impl_decl @C.as.I.impl.8159c7.3 [concrete] {
  1049. // CHECK:STDOUT: %T.patt: %pattern_type = symbolic_binding_pattern T, 0 [concrete]
  1050. // CHECK:STDOUT: } {
  1051. // CHECK:STDOUT: %C.ref: type = name_ref C, imports.%Main.C [concrete = constants.%C]
  1052. // CHECK:STDOUT: %I.ref: %I.type.609 = name_ref I, imports.%Main.I [concrete = constants.%I.generic]
  1053. // CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc26_14.1 [symbolic = %T.loc26_14.2 (constants.%T)]
  1054. // CHECK:STDOUT: %ptr.loc26_32.1: type = ptr_type %T.ref [symbolic = %ptr.loc26_32.2 (constants.%ptr)]
  1055. // CHECK:STDOUT: %I.type.loc26_33.1: type = facet_type <@I, @I(constants.%ptr)> [symbolic = %I.type.loc26_33.2 (constants.%I.type.e19)]
  1056. // CHECK:STDOUT: %.Self: %type = symbolic_binding .Self [symbolic_self = constants.%.Self]
  1057. // CHECK:STDOUT: %T.loc26_14.1: type = symbolic_binding T, 0 [symbolic = %T.loc26_14.2 (constants.%T)]
  1058. // CHECK:STDOUT: }
  1059. // CHECK:STDOUT: impl_decl @C.as.I.impl.c9332a.1 [concrete] {
  1060. // CHECK:STDOUT: %T.patt: %pattern_type = symbolic_binding_pattern T, 0 [concrete]
  1061. // CHECK:STDOUT: } {
  1062. // CHECK:STDOUT: %C.ref: type = name_ref C, imports.%Main.C [concrete = constants.%C]
  1063. // CHECK:STDOUT: %N.ref: %N.type.b47 = name_ref N, imports.%Main.N [concrete = constants.%empty_struct]
  1064. // CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc32_14.1 [symbolic = %T.loc32_14.2 (constants.%T)]
  1065. // CHECK:STDOUT: %N.type.loc32_32.1: type = facet_type <@N, @N(constants.%T)> [symbolic = %N.type.loc32_32.2 (constants.%N.type.d682d6.1)]
  1066. // CHECK:STDOUT: %.Self: %type = symbolic_binding .Self [symbolic_self = constants.%.Self]
  1067. // CHECK:STDOUT: %T.loc32_14.1: type = symbolic_binding T, 0 [symbolic = %T.loc32_14.2 (constants.%T)]
  1068. // CHECK:STDOUT: }
  1069. // CHECK:STDOUT: impl_decl @C.as.I.impl.c9332a.2 [concrete] {
  1070. // CHECK:STDOUT: %T.patt: %pattern_type = symbolic_binding_pattern T, 0 [concrete]
  1071. // CHECK:STDOUT: } {
  1072. // CHECK:STDOUT: %C.ref: type = name_ref C, imports.%Main.C [concrete = constants.%C]
  1073. // CHECK:STDOUT: %N.ref: %N.type.b47 = name_ref N, imports.%Main.N [concrete = constants.%empty_struct]
  1074. // CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc37_14.1 [symbolic = %T.loc37_14.2 (constants.%T)]
  1075. // CHECK:STDOUT: %ptr.loc37_32.1: type = ptr_type %T.ref [symbolic = %ptr.loc37_32.2 (constants.%ptr)]
  1076. // CHECK:STDOUT: %N.type.loc37_33.1: type = facet_type <@N, @N(constants.%ptr)> [symbolic = %N.type.loc37_33.2 (constants.%N.type.d682d6.2)]
  1077. // CHECK:STDOUT: %.Self: %type = symbolic_binding .Self [symbolic_self = constants.%.Self]
  1078. // CHECK:STDOUT: %T.loc37_14.1: type = symbolic_binding T, 0 [symbolic = %T.loc37_14.2 (constants.%T)]
  1079. // CHECK:STDOUT: }
  1080. // CHECK:STDOUT: }
  1081. // CHECK:STDOUT:
  1082. // CHECK:STDOUT: generic interface @I(imports.%Main.import_ref.b3bc94.1: type) [from "import_generic.carbon"] {
  1083. // CHECK:STDOUT: %T: type = symbolic_binding T, 0 [symbolic = %T (constants.%T)]
  1084. // CHECK:STDOUT:
  1085. // CHECK:STDOUT: !definition:
  1086. // CHECK:STDOUT: %I.type: type = facet_type <@I, @I(%T)> [symbolic = %I.type (constants.%I.type.1ab)]
  1087. // CHECK:STDOUT: %Self: @I.%I.type (%I.type.1ab) = symbolic_binding Self, 1 [symbolic = %Self (constants.%Self.c1b)]
  1088. // CHECK:STDOUT:
  1089. // CHECK:STDOUT: interface {
  1090. // CHECK:STDOUT: !members:
  1091. // CHECK:STDOUT: .Self = imports.%Main.import_ref.3fa
  1092. // CHECK:STDOUT: witness = ()
  1093. // CHECK:STDOUT:
  1094. // CHECK:STDOUT: !requires:
  1095. // CHECK:STDOUT: }
  1096. // CHECK:STDOUT: }
  1097. // CHECK:STDOUT:
  1098. // CHECK:STDOUT: generic constraint @N(imports.%Main.import_ref.b3bc94.5: type) [from "import_generic.carbon"] {
  1099. // CHECK:STDOUT: %T: type = symbolic_binding T, 0 [symbolic = %T (constants.%T)]
  1100. // CHECK:STDOUT:
  1101. // CHECK:STDOUT: !definition:
  1102. // CHECK:STDOUT: %N.type: type = facet_type <@N, @N(%T)> [symbolic = %N.type (constants.%N.type.d682d6.1)]
  1103. // CHECK:STDOUT: %Self: @N.%N.type (%N.type.d682d6.1) = symbolic_binding Self, 1 [symbolic = %Self (constants.%Self.e1f)]
  1104. // CHECK:STDOUT: %I.type: type = facet_type <@I, @I(%T)> [symbolic = %I.type (constants.%I.type.1ab)]
  1105. // CHECK:STDOUT: %require_complete: <witness> = require_complete_type %I.type [symbolic = %require_complete (constants.%require_complete.e36)]
  1106. // CHECK:STDOUT:
  1107. // CHECK:STDOUT: constraint {
  1108. // CHECK:STDOUT: !members:
  1109. // CHECK:STDOUT: .Self = imports.%Main.import_ref.830
  1110. // CHECK:STDOUT: extend imports.%Main.import_ref.b41
  1111. // CHECK:STDOUT:
  1112. // CHECK:STDOUT: !requires:
  1113. // CHECK:STDOUT: @N.Self.binding.as_type.impls.I.type.require {
  1114. // CHECK:STDOUT: require imports.%Main.import_ref.213 impls imports.%Main.import_ref.3582b1.2
  1115. // CHECK:STDOUT: }
  1116. // CHECK:STDOUT: }
  1117. // CHECK:STDOUT: }
  1118. // CHECK:STDOUT:
  1119. // CHECK:STDOUT: generic require @N.Self.binding.as_type.impls.I.type.require(imports.%Main.import_ref.b3bc94.4: type, imports.%Main.import_ref.2fc: @N.%N.type (%N.type.d682d6.1)) [from "import_generic.carbon"] {
  1120. // CHECK:STDOUT: %T: type = symbolic_binding T, 0 [symbolic = %T (constants.%T)]
  1121. // CHECK:STDOUT: %N.type: type = facet_type <@N, @N(%T)> [symbolic = %N.type (constants.%N.type.d682d6.1)]
  1122. // CHECK:STDOUT: %Self: @N.Self.binding.as_type.impls.I.type.require.%N.type (%N.type.d682d6.1) = symbolic_binding Self, 1 [symbolic = %Self (constants.%Self.e1f)]
  1123. // CHECK:STDOUT: %Self.binding.as_type: type = symbolic_binding_type Self, 1, %Self [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)]
  1124. // CHECK:STDOUT: %I.type: type = facet_type <@I, @I(%T)> [symbolic = %I.type (constants.%I.type.1ab)]
  1125. // CHECK:STDOUT: }
  1126. // CHECK:STDOUT:
  1127. // CHECK:STDOUT: generic impl @C.as.I.impl.431d5e.1(imports.%Main.import_ref.b3bc94.2: type) [from "import_generic.carbon"] {
  1128. // CHECK:STDOUT: %T: type = symbolic_binding T, 0 [symbolic = %T (constants.%T)]
  1129. // CHECK:STDOUT: %I.type: type = facet_type <@I, @I(%T)> [symbolic = %I.type (constants.%I.type.1ab)]
  1130. // CHECK:STDOUT: %I.impl_witness: <witness> = impl_witness imports.%I.impl_witness_table.2ac, @C.as.I.impl.431d5e.1(%T) [symbolic = %I.impl_witness (constants.%I.impl_witness.9f5)]
  1131. // CHECK:STDOUT:
  1132. // CHECK:STDOUT: !definition:
  1133. // CHECK:STDOUT: %require_complete: <witness> = require_complete_type %I.type [symbolic = %require_complete (constants.%require_complete.e36)]
  1134. // CHECK:STDOUT:
  1135. // CHECK:STDOUT: impl: imports.%Main.import_ref.61cd7d.1 as imports.%Main.import_ref.3582b1.1 {
  1136. // CHECK:STDOUT: !members:
  1137. // CHECK:STDOUT: witness = imports.%Main.import_ref.e08
  1138. // CHECK:STDOUT: }
  1139. // CHECK:STDOUT: }
  1140. // CHECK:STDOUT:
  1141. // CHECK:STDOUT: generic impl @C.as.I.impl.8159c7.1(imports.%Main.import_ref.b3bc94.3: type) [from "import_generic.carbon"] {
  1142. // CHECK:STDOUT: %T: type = symbolic_binding T, 0 [symbolic = %T (constants.%T)]
  1143. // CHECK:STDOUT: %ptr: type = ptr_type %T [symbolic = %ptr (constants.%ptr)]
  1144. // CHECK:STDOUT: %I.type: type = facet_type <@I, @I(%ptr)> [symbolic = %I.type (constants.%I.type.e19)]
  1145. // CHECK:STDOUT: %I.impl_witness: <witness> = impl_witness imports.%I.impl_witness_table.a23, @C.as.I.impl.8159c7.1(%T) [symbolic = %I.impl_witness (constants.%I.impl_witness.18a)]
  1146. // CHECK:STDOUT:
  1147. // CHECK:STDOUT: !definition:
  1148. // CHECK:STDOUT: %require_complete: <witness> = require_complete_type %I.type [symbolic = %require_complete (constants.%require_complete.ffd)]
  1149. // CHECK:STDOUT:
  1150. // CHECK:STDOUT: impl: imports.%Main.import_ref.61cd7d.2 as imports.%Main.import_ref.ada {
  1151. // CHECK:STDOUT: !members:
  1152. // CHECK:STDOUT: witness = imports.%Main.import_ref.2c7
  1153. // CHECK:STDOUT: }
  1154. // CHECK:STDOUT: }
  1155. // CHECK:STDOUT:
  1156. // CHECK:STDOUT: generic impl @C.as.I.impl.431d5e.2(%T.loc8_14.1: type) {
  1157. // CHECK:STDOUT: %T.loc8_14.2: type = symbolic_binding T, 0 [symbolic = %T.loc8_14.2 (constants.%T)]
  1158. // CHECK:STDOUT: %I.type.loc8_32.2: type = facet_type <@I, @I(%T.loc8_14.2)> [symbolic = %I.type.loc8_32.2 (constants.%I.type.1ab)]
  1159. // CHECK:STDOUT:
  1160. // CHECK:STDOUT: impl: %C.ref as %I.type.loc8_32.1;
  1161. // CHECK:STDOUT: }
  1162. // CHECK:STDOUT:
  1163. // CHECK:STDOUT: generic impl @C.as.I.impl.431d5e.3(%T.loc14_14.1: type) {
  1164. // CHECK:STDOUT: %T.loc14_14.2: type = symbolic_binding T, 0 [symbolic = %T.loc14_14.2 (constants.%T)]
  1165. // CHECK:STDOUT: %I.type.loc14_32.2: type = facet_type <@I, @I(%T.loc14_14.2)> [symbolic = %I.type.loc14_32.2 (constants.%I.type.1ab)]
  1166. // CHECK:STDOUT:
  1167. // CHECK:STDOUT: !definition:
  1168. // CHECK:STDOUT:
  1169. // CHECK:STDOUT: impl: %C.ref as %I.type.loc14_32.1 {
  1170. // CHECK:STDOUT: !members:
  1171. // CHECK:STDOUT: witness = <error>
  1172. // CHECK:STDOUT: }
  1173. // CHECK:STDOUT: }
  1174. // CHECK:STDOUT:
  1175. // CHECK:STDOUT: generic impl @C.as.I.impl.8159c7.2(%T.loc20_14.1: type) {
  1176. // CHECK:STDOUT: %T.loc20_14.2: type = symbolic_binding T, 0 [symbolic = %T.loc20_14.2 (constants.%T)]
  1177. // CHECK:STDOUT: %ptr.loc20_32.2: type = ptr_type %T.loc20_14.2 [symbolic = %ptr.loc20_32.2 (constants.%ptr)]
  1178. // CHECK:STDOUT: %I.type.loc20_33.2: type = facet_type <@I, @I(%ptr.loc20_32.2)> [symbolic = %I.type.loc20_33.2 (constants.%I.type.e19)]
  1179. // CHECK:STDOUT:
  1180. // CHECK:STDOUT: impl: %C.ref as %I.type.loc20_33.1;
  1181. // CHECK:STDOUT: }
  1182. // CHECK:STDOUT:
  1183. // CHECK:STDOUT: generic impl @C.as.I.impl.8159c7.3(%T.loc26_14.1: type) {
  1184. // CHECK:STDOUT: %T.loc26_14.2: type = symbolic_binding T, 0 [symbolic = %T.loc26_14.2 (constants.%T)]
  1185. // CHECK:STDOUT: %ptr.loc26_32.2: type = ptr_type %T.loc26_14.2 [symbolic = %ptr.loc26_32.2 (constants.%ptr)]
  1186. // CHECK:STDOUT: %I.type.loc26_33.2: type = facet_type <@I, @I(%ptr.loc26_32.2)> [symbolic = %I.type.loc26_33.2 (constants.%I.type.e19)]
  1187. // CHECK:STDOUT:
  1188. // CHECK:STDOUT: !definition:
  1189. // CHECK:STDOUT:
  1190. // CHECK:STDOUT: impl: %C.ref as %I.type.loc26_33.1 {
  1191. // CHECK:STDOUT: !members:
  1192. // CHECK:STDOUT: witness = <error>
  1193. // CHECK:STDOUT: }
  1194. // CHECK:STDOUT: }
  1195. // CHECK:STDOUT:
  1196. // CHECK:STDOUT: generic impl @C.as.I.impl.c9332a.1(%T.loc32_14.1: type) {
  1197. // CHECK:STDOUT: %T.loc32_14.2: type = symbolic_binding T, 0 [symbolic = %T.loc32_14.2 (constants.%T)]
  1198. // CHECK:STDOUT: %N.type.loc32_32.2: type = facet_type <@N, @N(%T.loc32_14.2)> [symbolic = %N.type.loc32_32.2 (constants.%N.type.d682d6.1)]
  1199. // CHECK:STDOUT:
  1200. // CHECK:STDOUT: impl: %C.ref as %N.type.loc32_32.1;
  1201. // CHECK:STDOUT: }
  1202. // CHECK:STDOUT:
  1203. // CHECK:STDOUT: generic impl @C.as.I.impl.c9332a.2(%T.loc37_14.1: type) {
  1204. // CHECK:STDOUT: %T.loc37_14.2: type = symbolic_binding T, 0 [symbolic = %T.loc37_14.2 (constants.%T)]
  1205. // CHECK:STDOUT: %ptr.loc37_32.2: type = ptr_type %T.loc37_14.2 [symbolic = %ptr.loc37_32.2 (constants.%ptr)]
  1206. // CHECK:STDOUT: %N.type.loc37_33.2: type = facet_type <@N, @N(%ptr.loc37_32.2)> [symbolic = %N.type.loc37_33.2 (constants.%N.type.d682d6.2)]
  1207. // CHECK:STDOUT:
  1208. // CHECK:STDOUT: impl: %C.ref as %N.type.loc37_33.1;
  1209. // CHECK:STDOUT: }
  1210. // CHECK:STDOUT:
  1211. // CHECK:STDOUT: class @C [from "import_generic.carbon"] {
  1212. // CHECK:STDOUT: complete_type_witness = imports.%Main.import_ref.8f2
  1213. // CHECK:STDOUT:
  1214. // CHECK:STDOUT: !members:
  1215. // CHECK:STDOUT: .Self = imports.%Main.import_ref.743
  1216. // CHECK:STDOUT: }
  1217. // CHECK:STDOUT:
  1218. // CHECK:STDOUT: specific @I(constants.%T) {
  1219. // CHECK:STDOUT: %T => constants.%T
  1220. // CHECK:STDOUT:
  1221. // CHECK:STDOUT: !definition:
  1222. // CHECK:STDOUT: %I.type => constants.%I.type.1ab
  1223. // CHECK:STDOUT: %Self => constants.%Self.c1b
  1224. // CHECK:STDOUT: }
  1225. // CHECK:STDOUT:
  1226. // CHECK:STDOUT: specific @C.as.I.impl.431d5e.1(constants.%T) {
  1227. // CHECK:STDOUT: %T => constants.%T
  1228. // CHECK:STDOUT: %I.type => constants.%I.type.1ab
  1229. // CHECK:STDOUT: %I.impl_witness => constants.%I.impl_witness.9f5
  1230. // CHECK:STDOUT: }
  1231. // CHECK:STDOUT:
  1232. // CHECK:STDOUT: specific @I(constants.%ptr) {
  1233. // CHECK:STDOUT: %T => constants.%ptr
  1234. // CHECK:STDOUT:
  1235. // CHECK:STDOUT: !definition:
  1236. // CHECK:STDOUT: %I.type => constants.%I.type.e19
  1237. // CHECK:STDOUT: %Self => constants.%Self.dda
  1238. // CHECK:STDOUT: }
  1239. // CHECK:STDOUT:
  1240. // CHECK:STDOUT: specific @C.as.I.impl.8159c7.1(constants.%T) {
  1241. // CHECK:STDOUT: %T => constants.%T
  1242. // CHECK:STDOUT: %ptr => constants.%ptr
  1243. // CHECK:STDOUT: %I.type => constants.%I.type.e19
  1244. // CHECK:STDOUT: %I.impl_witness => constants.%I.impl_witness.18a
  1245. // CHECK:STDOUT: }
  1246. // CHECK:STDOUT:
  1247. // CHECK:STDOUT: specific @C.as.I.impl.431d5e.2(constants.%T) {
  1248. // CHECK:STDOUT: %T.loc8_14.2 => constants.%T
  1249. // CHECK:STDOUT: %I.type.loc8_32.2 => constants.%I.type.1ab
  1250. // CHECK:STDOUT: }
  1251. // CHECK:STDOUT:
  1252. // CHECK:STDOUT: specific @C.as.I.impl.431d5e.3(constants.%T) {
  1253. // CHECK:STDOUT: %T.loc14_14.2 => constants.%T
  1254. // CHECK:STDOUT: %I.type.loc14_32.2 => constants.%I.type.1ab
  1255. // CHECK:STDOUT: }
  1256. // CHECK:STDOUT:
  1257. // CHECK:STDOUT: specific @C.as.I.impl.8159c7.2(constants.%T) {
  1258. // CHECK:STDOUT: %T.loc20_14.2 => constants.%T
  1259. // CHECK:STDOUT: %ptr.loc20_32.2 => constants.%ptr
  1260. // CHECK:STDOUT: %I.type.loc20_33.2 => constants.%I.type.e19
  1261. // CHECK:STDOUT: }
  1262. // CHECK:STDOUT:
  1263. // CHECK:STDOUT: specific @C.as.I.impl.8159c7.3(constants.%T) {
  1264. // CHECK:STDOUT: %T.loc26_14.2 => constants.%T
  1265. // CHECK:STDOUT: %ptr.loc26_32.2 => constants.%ptr
  1266. // CHECK:STDOUT: %I.type.loc26_33.2 => constants.%I.type.e19
  1267. // CHECK:STDOUT: }
  1268. // CHECK:STDOUT:
  1269. // CHECK:STDOUT: specific @N(constants.%T) {
  1270. // CHECK:STDOUT: %T => constants.%T
  1271. // CHECK:STDOUT: }
  1272. // CHECK:STDOUT:
  1273. // CHECK:STDOUT: specific @N.Self.binding.as_type.impls.I.type.require(constants.%T, constants.%Self.e1f) {
  1274. // CHECK:STDOUT: %T => constants.%T
  1275. // CHECK:STDOUT: %N.type => constants.%N.type.d682d6.1
  1276. // CHECK:STDOUT: %Self => constants.%Self.e1f
  1277. // CHECK:STDOUT: %Self.binding.as_type => constants.%Self.binding.as_type
  1278. // CHECK:STDOUT: %I.type => constants.%I.type.1ab
  1279. // CHECK:STDOUT: }
  1280. // CHECK:STDOUT:
  1281. // CHECK:STDOUT: specific @N.Self.binding.as_type.impls.I.type.require(constants.%T, constants.%C.type.facet) {
  1282. // CHECK:STDOUT: %T => constants.%T
  1283. // CHECK:STDOUT: %N.type => constants.%N.type.d682d6.1
  1284. // CHECK:STDOUT: %Self => constants.%C.type.facet
  1285. // CHECK:STDOUT: %Self.binding.as_type => constants.%C
  1286. // CHECK:STDOUT: %I.type => constants.%I.type.1ab
  1287. // CHECK:STDOUT: }
  1288. // CHECK:STDOUT:
  1289. // CHECK:STDOUT: specific @C.as.I.impl.c9332a.1(constants.%T) {
  1290. // CHECK:STDOUT: %T.loc32_14.2 => constants.%T
  1291. // CHECK:STDOUT: %N.type.loc32_32.2 => constants.%N.type.d682d6.1
  1292. // CHECK:STDOUT: }
  1293. // CHECK:STDOUT:
  1294. // CHECK:STDOUT: specific @N(constants.%ptr) {
  1295. // CHECK:STDOUT: %T => constants.%ptr
  1296. // CHECK:STDOUT: }
  1297. // CHECK:STDOUT:
  1298. // CHECK:STDOUT: specific @N.Self.binding.as_type.impls.I.type.require(constants.%ptr, constants.%C.type.facet) {
  1299. // CHECK:STDOUT: %T => constants.%ptr
  1300. // CHECK:STDOUT: %N.type => constants.%N.type.d682d6.2
  1301. // CHECK:STDOUT: %Self => constants.%C.type.facet
  1302. // CHECK:STDOUT: %Self.binding.as_type => constants.%C
  1303. // CHECK:STDOUT: %I.type => constants.%I.type.e19
  1304. // CHECK:STDOUT: }
  1305. // CHECK:STDOUT:
  1306. // CHECK:STDOUT: specific @C.as.I.impl.c9332a.2(constants.%T) {
  1307. // CHECK:STDOUT: %T.loc37_14.2 => constants.%T
  1308. // CHECK:STDOUT: %ptr.loc37_32.2 => constants.%ptr
  1309. // CHECK:STDOUT: %N.type.loc37_33.2 => constants.%N.type.d682d6.2
  1310. // CHECK:STDOUT: }
  1311. // CHECK:STDOUT:
  1312. // CHECK:STDOUT: --- import_generic_with_different_specific.carbon
  1313. // CHECK:STDOUT:
  1314. // CHECK:STDOUT: constants {
  1315. // CHECK:STDOUT: %C: type = class_type @C [concrete]
  1316. // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete]
  1317. // CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %empty_struct_type [concrete]
  1318. // CHECK:STDOUT: %type: type = facet_type <type> [concrete]
  1319. // CHECK:STDOUT: %.Self: %type = symbolic_binding .Self [symbolic_self]
  1320. // CHECK:STDOUT: %T: type = symbolic_binding T, 0 [symbolic]
  1321. // CHECK:STDOUT: %pattern_type: type = pattern_type type [concrete]
  1322. // CHECK:STDOUT: %I.type.609: type = generic_interface_type @I [concrete]
  1323. // CHECK:STDOUT: %I.generic: %I.type.609 = struct_value () [concrete]
  1324. // CHECK:STDOUT: %I.type.1ab: type = facet_type <@I, @I(%T)> [symbolic]
  1325. // CHECK:STDOUT: %Self.fdb: %I.type.1ab = symbolic_binding Self, 1 [symbolic]
  1326. // CHECK:STDOUT: %I.impl_witness: <witness> = impl_witness @C.as.I.impl.%I.impl_witness_table, @C.as.I.impl(%T) [symbolic]
  1327. // CHECK:STDOUT: %require_complete: <witness> = require_complete_type %I.type.1ab [symbolic]
  1328. // CHECK:STDOUT: %N.type.b47: type = generic_named_constaint_type @N [concrete]
  1329. // CHECK:STDOUT: %empty_struct: %N.type.b47 = struct_value () [concrete]
  1330. // CHECK:STDOUT: %N.type.d68: type = facet_type <@N, @N(%T)> [symbolic]
  1331. // CHECK:STDOUT: %Self.31c: %N.type.d68 = symbolic_binding Self, 1 [symbolic]
  1332. // CHECK:STDOUT: %Self.binding.as_type: type = symbolic_binding_type Self, 1, %Self.31c [symbolic]
  1333. // CHECK:STDOUT: }
  1334. // CHECK:STDOUT:
  1335. // CHECK:STDOUT: file {
  1336. // CHECK:STDOUT: package: <namespace> = namespace [concrete] {
  1337. // CHECK:STDOUT: .C = %C.decl
  1338. // CHECK:STDOUT: .I = %I.decl
  1339. // CHECK:STDOUT: .N = %N.decl
  1340. // CHECK:STDOUT: }
  1341. // CHECK:STDOUT: %C.decl: type = class_decl @C [concrete = constants.%C] {} {}
  1342. // CHECK:STDOUT: %I.decl: %I.type.609 = interface_decl @I [concrete = constants.%I.generic] {
  1343. // CHECK:STDOUT: %T.patt: %pattern_type = symbolic_binding_pattern T, 0 [concrete]
  1344. // CHECK:STDOUT: } {
  1345. // CHECK:STDOUT: %.Self: %type = symbolic_binding .Self [symbolic_self = constants.%.Self]
  1346. // CHECK:STDOUT: %T.loc5_13.2: type = symbolic_binding T, 0 [symbolic = %T.loc5_13.1 (constants.%T)]
  1347. // CHECK:STDOUT: }
  1348. // CHECK:STDOUT: impl_decl @C.as.I.impl [concrete] {
  1349. // CHECK:STDOUT: %T.patt: %pattern_type = symbolic_binding_pattern T, 0 [concrete]
  1350. // CHECK:STDOUT: } {
  1351. // CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [concrete = constants.%C]
  1352. // CHECK:STDOUT: %I.ref: %I.type.609 = name_ref I, file.%I.decl [concrete = constants.%I.generic]
  1353. // CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc7_14.1 [symbolic = %T.loc7_14.2 (constants.%T)]
  1354. // CHECK:STDOUT: %I.type.loc7_32.1: type = facet_type <@I, @I(constants.%T)> [symbolic = %I.type.loc7_32.2 (constants.%I.type.1ab)]
  1355. // CHECK:STDOUT: %.Self: %type = symbolic_binding .Self [symbolic_self = constants.%.Self]
  1356. // CHECK:STDOUT: %T.loc7_14.1: type = symbolic_binding T, 0 [symbolic = %T.loc7_14.2 (constants.%T)]
  1357. // CHECK:STDOUT: }
  1358. // CHECK:STDOUT: %N.decl: %N.type.b47 = constraint_decl @N [concrete = constants.%empty_struct] {
  1359. // CHECK:STDOUT: %T.patt: %pattern_type = symbolic_binding_pattern T, 0 [concrete]
  1360. // CHECK:STDOUT: } {
  1361. // CHECK:STDOUT: %.Self: %type = symbolic_binding .Self [symbolic_self = constants.%.Self]
  1362. // CHECK:STDOUT: %T.loc9_14.2: type = symbolic_binding T, 0 [symbolic = %T.loc9_14.1 (constants.%T)]
  1363. // CHECK:STDOUT: }
  1364. // CHECK:STDOUT: }
  1365. // CHECK:STDOUT:
  1366. // CHECK:STDOUT: generic interface @I(%T.loc5_13.2: type) {
  1367. // CHECK:STDOUT: %T.loc5_13.1: type = symbolic_binding T, 0 [symbolic = %T.loc5_13.1 (constants.%T)]
  1368. // CHECK:STDOUT:
  1369. // CHECK:STDOUT: !definition:
  1370. // CHECK:STDOUT: %I.type: type = facet_type <@I, @I(%T.loc5_13.1)> [symbolic = %I.type (constants.%I.type.1ab)]
  1371. // CHECK:STDOUT: %Self.loc5_23.2: @I.%I.type (%I.type.1ab) = symbolic_binding Self, 1 [symbolic = %Self.loc5_23.2 (constants.%Self.fdb)]
  1372. // CHECK:STDOUT:
  1373. // CHECK:STDOUT: interface {
  1374. // CHECK:STDOUT: %Self.loc5_23.1: @I.%I.type (%I.type.1ab) = symbolic_binding Self, 1 [symbolic = %Self.loc5_23.2 (constants.%Self.fdb)]
  1375. // CHECK:STDOUT:
  1376. // CHECK:STDOUT: !members:
  1377. // CHECK:STDOUT: .Self = %Self.loc5_23.1
  1378. // CHECK:STDOUT: witness = ()
  1379. // CHECK:STDOUT:
  1380. // CHECK:STDOUT: !requires:
  1381. // CHECK:STDOUT: }
  1382. // CHECK:STDOUT: }
  1383. // CHECK:STDOUT:
  1384. // CHECK:STDOUT: generic constraint @N(%T.loc9_14.2: type) {
  1385. // CHECK:STDOUT: %T.loc9_14.1: type = symbolic_binding T, 0 [symbolic = %T.loc9_14.1 (constants.%T)]
  1386. // CHECK:STDOUT:
  1387. // CHECK:STDOUT: !definition:
  1388. // CHECK:STDOUT: %N.type: type = facet_type <@N, @N(%T.loc9_14.1)> [symbolic = %N.type (constants.%N.type.d68)]
  1389. // CHECK:STDOUT: %Self.loc9_24.2: @N.%N.type (%N.type.d68) = symbolic_binding Self, 1 [symbolic = %Self.loc9_24.2 (constants.%Self.31c)]
  1390. // CHECK:STDOUT: %I.type: type = facet_type <@I, @I(%T.loc9_14.1)> [symbolic = %I.type (constants.%I.type.1ab)]
  1391. // CHECK:STDOUT: %require_complete: <witness> = require_complete_type %I.type [symbolic = %require_complete (constants.%require_complete)]
  1392. // CHECK:STDOUT:
  1393. // CHECK:STDOUT: constraint {
  1394. // CHECK:STDOUT: %Self.loc9_24.1: @N.%N.type (%N.type.d68) = symbolic_binding Self, 1 [symbolic = %Self.loc9_24.2 (constants.%Self.31c)]
  1395. // CHECK:STDOUT: %N.Self.binding.as_type.impls.I.type.require.decl = require_decl @N.Self.binding.as_type.impls.I.type.require [concrete] {
  1396. // CHECK:STDOUT: require %Self.as_type impls %I.type.loc10_27.1
  1397. // CHECK:STDOUT: } {
  1398. // CHECK:STDOUT: %Self.as_type: type = facet_access_type @N.%Self.loc9_24.1 [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)]
  1399. // CHECK:STDOUT: %I.ref: %I.type.609 = name_ref I, file.%I.decl [concrete = constants.%I.generic]
  1400. // CHECK:STDOUT: %T.ref: type = name_ref T, @N.%T.loc9_14.2 [symbolic = %T (constants.%T)]
  1401. // CHECK:STDOUT: %I.type.loc10_27.1: type = facet_type <@I, @I(constants.%T)> [symbolic = %I.type.loc10_27.2 (constants.%I.type.1ab)]
  1402. // CHECK:STDOUT: }
  1403. // CHECK:STDOUT: %.loc10: type = specific_constant @N.Self.binding.as_type.impls.I.type.require.%I.type.loc10_27.1, @N.Self.binding.as_type.impls.I.type.require(constants.%T, constants.%Self.31c) [symbolic = %I.type (constants.%I.type.1ab)]
  1404. // CHECK:STDOUT:
  1405. // CHECK:STDOUT: !members:
  1406. // CHECK:STDOUT: .Self = %Self.loc9_24.1
  1407. // CHECK:STDOUT: .I = <poisoned>
  1408. // CHECK:STDOUT: .T = <poisoned>
  1409. // CHECK:STDOUT: extend %.loc10
  1410. // CHECK:STDOUT:
  1411. // CHECK:STDOUT: !requires:
  1412. // CHECK:STDOUT: @N.Self.binding.as_type.impls.I.type.require {
  1413. // CHECK:STDOUT: require @N.Self.binding.as_type.impls.I.type.require.%Self.as_type impls @N.Self.binding.as_type.impls.I.type.require.%I.type.loc10_27.1
  1414. // CHECK:STDOUT: }
  1415. // CHECK:STDOUT: }
  1416. // CHECK:STDOUT: }
  1417. // CHECK:STDOUT:
  1418. // CHECK:STDOUT: generic require @N.Self.binding.as_type.impls.I.type.require(@N.%T.loc9_14.2: type, @N.%Self.loc9_24.1: @N.%N.type (%N.type.d68)) {
  1419. // CHECK:STDOUT: %T: type = symbolic_binding T, 0 [symbolic = %T (constants.%T)]
  1420. // CHECK:STDOUT: %N.type: type = facet_type <@N, @N(%T)> [symbolic = %N.type (constants.%N.type.d68)]
  1421. // CHECK:STDOUT: %Self: @N.Self.binding.as_type.impls.I.type.require.%N.type (%N.type.d68) = symbolic_binding Self, 1 [symbolic = %Self (constants.%Self.31c)]
  1422. // CHECK:STDOUT: %Self.binding.as_type: type = symbolic_binding_type Self, 1, %Self [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)]
  1423. // CHECK:STDOUT: %I.type.loc10_27.2: type = facet_type <@I, @I(%T)> [symbolic = %I.type.loc10_27.2 (constants.%I.type.1ab)]
  1424. // CHECK:STDOUT: }
  1425. // CHECK:STDOUT:
  1426. // CHECK:STDOUT: generic impl @C.as.I.impl(%T.loc7_14.1: type) {
  1427. // CHECK:STDOUT: %T.loc7_14.2: type = symbolic_binding T, 0 [symbolic = %T.loc7_14.2 (constants.%T)]
  1428. // CHECK:STDOUT: %I.type.loc7_32.2: type = facet_type <@I, @I(%T.loc7_14.2)> [symbolic = %I.type.loc7_32.2 (constants.%I.type.1ab)]
  1429. // CHECK:STDOUT: %I.impl_witness.loc7_34.2: <witness> = impl_witness %I.impl_witness_table, @C.as.I.impl(%T.loc7_14.2) [symbolic = %I.impl_witness.loc7_34.2 (constants.%I.impl_witness)]
  1430. // CHECK:STDOUT:
  1431. // CHECK:STDOUT: !definition:
  1432. // CHECK:STDOUT: %require_complete: <witness> = require_complete_type %I.type.loc7_32.2 [symbolic = %require_complete (constants.%require_complete)]
  1433. // CHECK:STDOUT:
  1434. // CHECK:STDOUT: impl: %C.ref as %I.type.loc7_32.1 {
  1435. // CHECK:STDOUT: %I.impl_witness_table = impl_witness_table (), @C.as.I.impl [concrete]
  1436. // CHECK:STDOUT: %I.impl_witness.loc7_34.1: <witness> = impl_witness %I.impl_witness_table, @C.as.I.impl(constants.%T) [symbolic = %I.impl_witness.loc7_34.2 (constants.%I.impl_witness)]
  1437. // CHECK:STDOUT:
  1438. // CHECK:STDOUT: !members:
  1439. // CHECK:STDOUT: witness = %I.impl_witness.loc7_34.1
  1440. // CHECK:STDOUT: }
  1441. // CHECK:STDOUT: }
  1442. // CHECK:STDOUT:
  1443. // CHECK:STDOUT: class @C {
  1444. // CHECK:STDOUT: %complete_type: <witness> = complete_type_witness constants.%empty_struct_type [concrete = constants.%complete_type]
  1445. // CHECK:STDOUT: complete_type_witness = %complete_type
  1446. // CHECK:STDOUT:
  1447. // CHECK:STDOUT: !members:
  1448. // CHECK:STDOUT: .Self = constants.%C
  1449. // CHECK:STDOUT: }
  1450. // CHECK:STDOUT:
  1451. // CHECK:STDOUT: specific @I(constants.%T) {
  1452. // CHECK:STDOUT: %T.loc5_13.1 => constants.%T
  1453. // CHECK:STDOUT:
  1454. // CHECK:STDOUT: !definition:
  1455. // CHECK:STDOUT: %I.type => constants.%I.type.1ab
  1456. // CHECK:STDOUT: %Self.loc5_23.2 => constants.%Self.fdb
  1457. // CHECK:STDOUT: }
  1458. // CHECK:STDOUT:
  1459. // CHECK:STDOUT: specific @C.as.I.impl(constants.%T) {
  1460. // CHECK:STDOUT: %T.loc7_14.2 => constants.%T
  1461. // CHECK:STDOUT: %I.type.loc7_32.2 => constants.%I.type.1ab
  1462. // CHECK:STDOUT: %I.impl_witness.loc7_34.2 => constants.%I.impl_witness
  1463. // CHECK:STDOUT: }
  1464. // CHECK:STDOUT:
  1465. // CHECK:STDOUT: specific @N(constants.%T) {
  1466. // CHECK:STDOUT: %T.loc9_14.1 => constants.%T
  1467. // CHECK:STDOUT: }
  1468. // CHECK:STDOUT:
  1469. // CHECK:STDOUT: specific @N.Self.binding.as_type.impls.I.type.require(constants.%T, constants.%Self.31c) {
  1470. // CHECK:STDOUT: %T => constants.%T
  1471. // CHECK:STDOUT: %N.type => constants.%N.type.d68
  1472. // CHECK:STDOUT: %Self => constants.%Self.31c
  1473. // CHECK:STDOUT: %Self.binding.as_type => constants.%Self.binding.as_type
  1474. // CHECK:STDOUT: %I.type.loc10_27.2 => constants.%I.type.1ab
  1475. // CHECK:STDOUT: }
  1476. // CHECK:STDOUT:
  1477. // CHECK:STDOUT: --- import_generic_with_different_specific.impl.carbon
  1478. // CHECK:STDOUT:
  1479. // CHECK:STDOUT: constants {
  1480. // CHECK:STDOUT: %T: type = symbolic_binding T, 0 [symbolic]
  1481. // CHECK:STDOUT: %I.type.609: type = generic_interface_type @I [concrete]
  1482. // CHECK:STDOUT: %I.generic: %I.type.609 = struct_value () [concrete]
  1483. // CHECK:STDOUT: %I.type.1ab: type = facet_type <@I, @I(%T)> [symbolic]
  1484. // CHECK:STDOUT: %Self.c1b: %I.type.1ab = symbolic_binding Self, 1 [symbolic]
  1485. // CHECK:STDOUT: %pattern_type: type = pattern_type type [concrete]
  1486. // CHECK:STDOUT: %C: type = class_type @C [concrete]
  1487. // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete]
  1488. // CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %empty_struct_type [concrete]
  1489. // CHECK:STDOUT: %I.impl_witness.9f5: <witness> = impl_witness imports.%I.impl_witness_table, @C.as.I.impl.431(%T) [symbolic]
  1490. // CHECK:STDOUT: %require_complete.e36: <witness> = require_complete_type %I.type.1ab [symbolic]
  1491. // CHECK:STDOUT: %type: type = facet_type <type> [concrete]
  1492. // CHECK:STDOUT: %.Self: %type = symbolic_binding .Self [symbolic_self]
  1493. // CHECK:STDOUT: %ptr.e8f: type = ptr_type %T [symbolic]
  1494. // CHECK:STDOUT: %I.type.e19: type = facet_type <@I, @I(%ptr.e8f)> [symbolic]
  1495. // CHECK:STDOUT: %I.impl_witness.18a: <witness> = impl_witness @C.as.I.impl.815.%I.impl_witness_table, @C.as.I.impl.815(%T) [symbolic]
  1496. // CHECK:STDOUT: %Self.dda: %I.type.e19 = symbolic_binding Self, 1 [symbolic]
  1497. // CHECK:STDOUT: %require_complete.ffd: <witness> = require_complete_type %I.type.e19 [symbolic]
  1498. // CHECK:STDOUT: %N.type.b47: type = generic_named_constaint_type @N [concrete]
  1499. // CHECK:STDOUT: %empty_struct: %N.type.b47 = struct_value () [concrete]
  1500. // CHECK:STDOUT: %N.type.d682d6.1: type = facet_type <@N, @N(%T)> [symbolic]
  1501. // CHECK:STDOUT: %Self.e1f642.1: %N.type.d682d6.1 = symbolic_binding Self, 1 [symbolic]
  1502. // CHECK:STDOUT: %Self.binding.as_type: type = symbolic_binding_type Self, 1, %Self.e1f642.1 [symbolic]
  1503. // CHECK:STDOUT: %ptr.125: type = ptr_type %ptr.e8f [symbolic]
  1504. // CHECK:STDOUT: %N.type.d682d6.2: type = facet_type <@N, @N(%ptr.125)> [symbolic]
  1505. // CHECK:STDOUT: %C.type.facet: %type = facet_value %C, () [concrete]
  1506. // CHECK:STDOUT: %I.type.08a: type = facet_type <@I, @I(%ptr.125)> [symbolic]
  1507. // CHECK:STDOUT: %I.impl_witness.d57: <witness> = impl_witness @C.as.I.impl.c93.%I.impl_witness_table, @C.as.I.impl.c93(%T) [symbolic]
  1508. // CHECK:STDOUT: %Self.e1f642.2: %N.type.d682d6.2 = symbolic_binding Self, 1 [symbolic]
  1509. // CHECK:STDOUT: %require_complete.ea6: <witness> = require_complete_type %I.type.08a [symbolic]
  1510. // CHECK:STDOUT: %require_complete.533: <witness> = require_complete_type %N.type.d682d6.2 [symbolic]
  1511. // CHECK:STDOUT: }
  1512. // CHECK:STDOUT:
  1513. // CHECK:STDOUT: imports {
  1514. // CHECK:STDOUT: %Main.C: type = import_ref Main//import_generic_with_different_specific, C, loaded [concrete = constants.%C]
  1515. // CHECK:STDOUT: %Main.I: %I.type.609 = import_ref Main//import_generic_with_different_specific, I, loaded [concrete = constants.%I.generic]
  1516. // CHECK:STDOUT: %Main.N: %N.type.b47 = import_ref Main//import_generic_with_different_specific, N, loaded [concrete = constants.%empty_struct]
  1517. // CHECK:STDOUT: %Main.import_ref.3fa = import_ref Main//import_generic_with_different_specific, loc5_23, unloaded
  1518. // CHECK:STDOUT: %Main.import_ref.b3bc94.1: type = import_ref Main//import_generic_with_different_specific, loc5_13, loaded [symbolic = @I.%T (constants.%T)]
  1519. // CHECK:STDOUT: %Main.import_ref.e08 = import_ref Main//import_generic_with_different_specific, loc7_34, unloaded
  1520. // CHECK:STDOUT: %Main.import_ref.8f2: <witness> = import_ref Main//import_generic_with_different_specific, loc4_10, loaded [concrete = constants.%complete_type]
  1521. // CHECK:STDOUT: %Main.import_ref.743 = import_ref Main//import_generic_with_different_specific, inst{{[0-9A-F]+}} [no loc], unloaded
  1522. // CHECK:STDOUT: %I.impl_witness_table = impl_witness_table (), @C.as.I.impl.431 [concrete]
  1523. // CHECK:STDOUT: %Main.import_ref.61c: type = import_ref Main//import_generic_with_different_specific, loc7_24, loaded [concrete = constants.%C]
  1524. // CHECK:STDOUT: %Main.import_ref.3582b1.1: type = import_ref Main//import_generic_with_different_specific, loc7_32, loaded [symbolic = @C.as.I.impl.431.%I.type (constants.%I.type.1ab)]
  1525. // CHECK:STDOUT: %Main.import_ref.b3bc94.2: type = import_ref Main//import_generic_with_different_specific, loc7_14, loaded [symbolic = @C.as.I.impl.431.%T (constants.%T)]
  1526. // CHECK:STDOUT: %Main.import_ref.213: type = import_ref Main//import_generic_with_different_specific, loc10_18, loaded [symbolic = @N.Self.binding.as_type.impls.I.type.require.%Self.binding.as_type (constants.%Self.binding.as_type)]
  1527. // CHECK:STDOUT: %Main.import_ref.3582b1.2: type = import_ref Main//import_generic_with_different_specific, loc10_27, loaded [symbolic = @N.Self.binding.as_type.impls.I.type.require.%I.type (constants.%I.type.1ab)]
  1528. // CHECK:STDOUT: %Main.import_ref.b3bc94.3: type = import_ref Main//import_generic_with_different_specific, loc9_14, loaded [symbolic = @N.%T (constants.%T)]
  1529. // CHECK:STDOUT: %Main.import_ref.2fc: @N.%N.type (%N.type.d682d6.1) = import_ref Main//import_generic_with_different_specific, loc9_24, loaded [symbolic = @N.%Self (constants.%Self.e1f642.1)]
  1530. // CHECK:STDOUT: %Main.import_ref.830 = import_ref Main//import_generic_with_different_specific, loc9_24, unloaded
  1531. // CHECK:STDOUT: %Main.import_ref.b41 = import_ref Main//import_generic_with_different_specific, loc10_28, unloaded
  1532. // CHECK:STDOUT: %Main.import_ref.b3bc94.4: type = import_ref Main//import_generic_with_different_specific, loc9_14, loaded [symbolic = @N.%T (constants.%T)]
  1533. // CHECK:STDOUT: }
  1534. // CHECK:STDOUT:
  1535. // CHECK:STDOUT: file {
  1536. // CHECK:STDOUT: package: <namespace> = namespace [concrete] {
  1537. // CHECK:STDOUT: .C = imports.%Main.C
  1538. // CHECK:STDOUT: .I = imports.%Main.I
  1539. // CHECK:STDOUT: .N = imports.%Main.N
  1540. // CHECK:STDOUT: }
  1541. // CHECK:STDOUT: %default.import.loc1_54.1 = import <none>
  1542. // CHECK:STDOUT: %default.import.loc1_54.2 = import <none>
  1543. // CHECK:STDOUT: impl_decl @C.as.I.impl.815 [concrete] {
  1544. // CHECK:STDOUT: %T.patt: %pattern_type = symbolic_binding_pattern T, 0 [concrete]
  1545. // CHECK:STDOUT: } {
  1546. // CHECK:STDOUT: %C.ref: type = name_ref C, imports.%Main.C [concrete = constants.%C]
  1547. // CHECK:STDOUT: %I.ref: %I.type.609 = name_ref I, imports.%Main.I [concrete = constants.%I.generic]
  1548. // CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc5_14.1 [symbolic = %T.loc5_14.2 (constants.%T)]
  1549. // CHECK:STDOUT: %ptr.loc5_32.1: type = ptr_type %T.ref [symbolic = %ptr.loc5_32.2 (constants.%ptr.e8f)]
  1550. // CHECK:STDOUT: %I.type.loc5_33.1: type = facet_type <@I, @I(constants.%ptr.e8f)> [symbolic = %I.type.loc5_33.2 (constants.%I.type.e19)]
  1551. // CHECK:STDOUT: %.Self: %type = symbolic_binding .Self [symbolic_self = constants.%.Self]
  1552. // CHECK:STDOUT: %T.loc5_14.1: type = symbolic_binding T, 0 [symbolic = %T.loc5_14.2 (constants.%T)]
  1553. // CHECK:STDOUT: }
  1554. // CHECK:STDOUT: impl_decl @C.as.I.impl.c93 [concrete] {
  1555. // CHECK:STDOUT: %T.patt: %pattern_type = symbolic_binding_pattern T, 0 [concrete]
  1556. // CHECK:STDOUT: } {
  1557. // CHECK:STDOUT: %C.ref: type = name_ref C, imports.%Main.C [concrete = constants.%C]
  1558. // CHECK:STDOUT: %N.ref: %N.type.b47 = name_ref N, imports.%Main.N [concrete = constants.%empty_struct]
  1559. // CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc6_14.1 [symbolic = %T.loc6_14.2 (constants.%T)]
  1560. // CHECK:STDOUT: %ptr.loc6_32.1: type = ptr_type %T.ref [symbolic = %ptr.loc6_32.2 (constants.%ptr.e8f)]
  1561. // CHECK:STDOUT: %ptr.loc6_33.1: type = ptr_type %ptr.loc6_32.1 [symbolic = %ptr.loc6_33.2 (constants.%ptr.125)]
  1562. // CHECK:STDOUT: %N.type.loc6_34.1: type = facet_type <@N, @N(constants.%ptr.125)> [symbolic = %N.type.loc6_34.2 (constants.%N.type.d682d6.2)]
  1563. // CHECK:STDOUT: %.Self: %type = symbolic_binding .Self [symbolic_self = constants.%.Self]
  1564. // CHECK:STDOUT: %T.loc6_14.1: type = symbolic_binding T, 0 [symbolic = %T.loc6_14.2 (constants.%T)]
  1565. // CHECK:STDOUT: }
  1566. // CHECK:STDOUT: }
  1567. // CHECK:STDOUT:
  1568. // CHECK:STDOUT: generic interface @I(imports.%Main.import_ref.b3bc94.1: type) [from "import_generic_with_different_specific.carbon"] {
  1569. // CHECK:STDOUT: %T: type = symbolic_binding T, 0 [symbolic = %T (constants.%T)]
  1570. // CHECK:STDOUT:
  1571. // CHECK:STDOUT: !definition:
  1572. // CHECK:STDOUT: %I.type: type = facet_type <@I, @I(%T)> [symbolic = %I.type (constants.%I.type.1ab)]
  1573. // CHECK:STDOUT: %Self: @I.%I.type (%I.type.1ab) = symbolic_binding Self, 1 [symbolic = %Self (constants.%Self.c1b)]
  1574. // CHECK:STDOUT:
  1575. // CHECK:STDOUT: interface {
  1576. // CHECK:STDOUT: !members:
  1577. // CHECK:STDOUT: .Self = imports.%Main.import_ref.3fa
  1578. // CHECK:STDOUT: witness = ()
  1579. // CHECK:STDOUT:
  1580. // CHECK:STDOUT: !requires:
  1581. // CHECK:STDOUT: }
  1582. // CHECK:STDOUT: }
  1583. // CHECK:STDOUT:
  1584. // CHECK:STDOUT: generic constraint @N(imports.%Main.import_ref.b3bc94.4: type) [from "import_generic_with_different_specific.carbon"] {
  1585. // CHECK:STDOUT: %T: type = symbolic_binding T, 0 [symbolic = %T (constants.%T)]
  1586. // CHECK:STDOUT:
  1587. // CHECK:STDOUT: !definition:
  1588. // CHECK:STDOUT: %N.type: type = facet_type <@N, @N(%T)> [symbolic = %N.type (constants.%N.type.d682d6.1)]
  1589. // CHECK:STDOUT: %Self: @N.%N.type (%N.type.d682d6.1) = symbolic_binding Self, 1 [symbolic = %Self (constants.%Self.e1f642.1)]
  1590. // CHECK:STDOUT: %I.type: type = facet_type <@I, @I(%T)> [symbolic = %I.type (constants.%I.type.1ab)]
  1591. // CHECK:STDOUT: %require_complete: <witness> = require_complete_type %I.type [symbolic = %require_complete (constants.%require_complete.e36)]
  1592. // CHECK:STDOUT:
  1593. // CHECK:STDOUT: constraint {
  1594. // CHECK:STDOUT: !members:
  1595. // CHECK:STDOUT: .Self = imports.%Main.import_ref.830
  1596. // CHECK:STDOUT: extend imports.%Main.import_ref.b41
  1597. // CHECK:STDOUT:
  1598. // CHECK:STDOUT: !requires:
  1599. // CHECK:STDOUT: @N.Self.binding.as_type.impls.I.type.require {
  1600. // CHECK:STDOUT: require imports.%Main.import_ref.213 impls imports.%Main.import_ref.3582b1.2
  1601. // CHECK:STDOUT: }
  1602. // CHECK:STDOUT: }
  1603. // CHECK:STDOUT: }
  1604. // CHECK:STDOUT:
  1605. // CHECK:STDOUT: generic require @N.Self.binding.as_type.impls.I.type.require(imports.%Main.import_ref.b3bc94.3: type, imports.%Main.import_ref.2fc: @N.%N.type (%N.type.d682d6.1)) [from "import_generic_with_different_specific.carbon"] {
  1606. // CHECK:STDOUT: %T: type = symbolic_binding T, 0 [symbolic = %T (constants.%T)]
  1607. // CHECK:STDOUT: %N.type: type = facet_type <@N, @N(%T)> [symbolic = %N.type (constants.%N.type.d682d6.1)]
  1608. // CHECK:STDOUT: %Self: @N.Self.binding.as_type.impls.I.type.require.%N.type (%N.type.d682d6.1) = symbolic_binding Self, 1 [symbolic = %Self (constants.%Self.e1f642.1)]
  1609. // CHECK:STDOUT: %Self.binding.as_type: type = symbolic_binding_type Self, 1, %Self [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)]
  1610. // CHECK:STDOUT: %I.type: type = facet_type <@I, @I(%T)> [symbolic = %I.type (constants.%I.type.1ab)]
  1611. // CHECK:STDOUT: }
  1612. // CHECK:STDOUT:
  1613. // CHECK:STDOUT: generic impl @C.as.I.impl.431(imports.%Main.import_ref.b3bc94.2: type) [from "import_generic_with_different_specific.carbon"] {
  1614. // CHECK:STDOUT: %T: type = symbolic_binding T, 0 [symbolic = %T (constants.%T)]
  1615. // CHECK:STDOUT: %I.type: type = facet_type <@I, @I(%T)> [symbolic = %I.type (constants.%I.type.1ab)]
  1616. // CHECK:STDOUT: %I.impl_witness: <witness> = impl_witness imports.%I.impl_witness_table, @C.as.I.impl.431(%T) [symbolic = %I.impl_witness (constants.%I.impl_witness.9f5)]
  1617. // CHECK:STDOUT:
  1618. // CHECK:STDOUT: !definition:
  1619. // CHECK:STDOUT: %require_complete: <witness> = require_complete_type %I.type [symbolic = %require_complete (constants.%require_complete.e36)]
  1620. // CHECK:STDOUT:
  1621. // CHECK:STDOUT: impl: imports.%Main.import_ref.61c as imports.%Main.import_ref.3582b1.1 {
  1622. // CHECK:STDOUT: !members:
  1623. // CHECK:STDOUT: witness = imports.%Main.import_ref.e08
  1624. // CHECK:STDOUT: }
  1625. // CHECK:STDOUT: }
  1626. // CHECK:STDOUT:
  1627. // CHECK:STDOUT: generic impl @C.as.I.impl.815(%T.loc5_14.1: type) {
  1628. // CHECK:STDOUT: %T.loc5_14.2: type = symbolic_binding T, 0 [symbolic = %T.loc5_14.2 (constants.%T)]
  1629. // CHECK:STDOUT: %ptr.loc5_32.2: type = ptr_type %T.loc5_14.2 [symbolic = %ptr.loc5_32.2 (constants.%ptr.e8f)]
  1630. // CHECK:STDOUT: %I.type.loc5_33.2: type = facet_type <@I, @I(%ptr.loc5_32.2)> [symbolic = %I.type.loc5_33.2 (constants.%I.type.e19)]
  1631. // CHECK:STDOUT: %I.impl_witness.loc5_35.2: <witness> = impl_witness %I.impl_witness_table, @C.as.I.impl.815(%T.loc5_14.2) [symbolic = %I.impl_witness.loc5_35.2 (constants.%I.impl_witness.18a)]
  1632. // CHECK:STDOUT:
  1633. // CHECK:STDOUT: !definition:
  1634. // CHECK:STDOUT: %require_complete: <witness> = require_complete_type %I.type.loc5_33.2 [symbolic = %require_complete (constants.%require_complete.ffd)]
  1635. // CHECK:STDOUT:
  1636. // CHECK:STDOUT: impl: %C.ref as %I.type.loc5_33.1 {
  1637. // CHECK:STDOUT: %I.impl_witness_table = impl_witness_table (), @C.as.I.impl.815 [concrete]
  1638. // CHECK:STDOUT: %I.impl_witness.loc5_35.1: <witness> = impl_witness %I.impl_witness_table, @C.as.I.impl.815(constants.%T) [symbolic = %I.impl_witness.loc5_35.2 (constants.%I.impl_witness.18a)]
  1639. // CHECK:STDOUT:
  1640. // CHECK:STDOUT: !members:
  1641. // CHECK:STDOUT: witness = %I.impl_witness.loc5_35.1
  1642. // CHECK:STDOUT: }
  1643. // CHECK:STDOUT: }
  1644. // CHECK:STDOUT:
  1645. // CHECK:STDOUT: generic impl @C.as.I.impl.c93(%T.loc6_14.1: type) {
  1646. // CHECK:STDOUT: %T.loc6_14.2: type = symbolic_binding T, 0 [symbolic = %T.loc6_14.2 (constants.%T)]
  1647. // CHECK:STDOUT: %ptr.loc6_32.2: type = ptr_type %T.loc6_14.2 [symbolic = %ptr.loc6_32.2 (constants.%ptr.e8f)]
  1648. // CHECK:STDOUT: %ptr.loc6_33.2: type = ptr_type %ptr.loc6_32.2 [symbolic = %ptr.loc6_33.2 (constants.%ptr.125)]
  1649. // CHECK:STDOUT: %N.type.loc6_34.2: type = facet_type <@N, @N(%ptr.loc6_33.2)> [symbolic = %N.type.loc6_34.2 (constants.%N.type.d682d6.2)]
  1650. // CHECK:STDOUT: %I.impl_witness.loc6_36.2: <witness> = impl_witness %I.impl_witness_table, @C.as.I.impl.c93(%T.loc6_14.2) [symbolic = %I.impl_witness.loc6_36.2 (constants.%I.impl_witness.d57)]
  1651. // CHECK:STDOUT:
  1652. // CHECK:STDOUT: !definition:
  1653. // CHECK:STDOUT: %require_complete: <witness> = require_complete_type %N.type.loc6_34.2 [symbolic = %require_complete (constants.%require_complete.533)]
  1654. // CHECK:STDOUT:
  1655. // CHECK:STDOUT: impl: %C.ref as %N.type.loc6_34.1 {
  1656. // CHECK:STDOUT: %I.impl_witness_table = impl_witness_table (), @C.as.I.impl.c93 [concrete]
  1657. // CHECK:STDOUT: %I.impl_witness.loc6_36.1: <witness> = impl_witness %I.impl_witness_table, @C.as.I.impl.c93(constants.%T) [symbolic = %I.impl_witness.loc6_36.2 (constants.%I.impl_witness.d57)]
  1658. // CHECK:STDOUT:
  1659. // CHECK:STDOUT: !members:
  1660. // CHECK:STDOUT: witness = %I.impl_witness.loc6_36.1
  1661. // CHECK:STDOUT: }
  1662. // CHECK:STDOUT: }
  1663. // CHECK:STDOUT:
  1664. // CHECK:STDOUT: class @C [from "import_generic_with_different_specific.carbon"] {
  1665. // CHECK:STDOUT: complete_type_witness = imports.%Main.import_ref.8f2
  1666. // CHECK:STDOUT:
  1667. // CHECK:STDOUT: !members:
  1668. // CHECK:STDOUT: .Self = imports.%Main.import_ref.743
  1669. // CHECK:STDOUT: }
  1670. // CHECK:STDOUT:
  1671. // CHECK:STDOUT: specific @I(constants.%T) {
  1672. // CHECK:STDOUT: %T => constants.%T
  1673. // CHECK:STDOUT:
  1674. // CHECK:STDOUT: !definition:
  1675. // CHECK:STDOUT: %I.type => constants.%I.type.1ab
  1676. // CHECK:STDOUT: %Self => constants.%Self.c1b
  1677. // CHECK:STDOUT: }
  1678. // CHECK:STDOUT:
  1679. // CHECK:STDOUT: specific @C.as.I.impl.431(constants.%T) {
  1680. // CHECK:STDOUT: %T => constants.%T
  1681. // CHECK:STDOUT: %I.type => constants.%I.type.1ab
  1682. // CHECK:STDOUT: %I.impl_witness => constants.%I.impl_witness.9f5
  1683. // CHECK:STDOUT: }
  1684. // CHECK:STDOUT:
  1685. // CHECK:STDOUT: specific @I(constants.%ptr.e8f) {
  1686. // CHECK:STDOUT: %T => constants.%ptr.e8f
  1687. // CHECK:STDOUT:
  1688. // CHECK:STDOUT: !definition:
  1689. // CHECK:STDOUT: %I.type => constants.%I.type.e19
  1690. // CHECK:STDOUT: %Self => constants.%Self.dda
  1691. // CHECK:STDOUT: }
  1692. // CHECK:STDOUT:
  1693. // CHECK:STDOUT: specific @C.as.I.impl.815(constants.%T) {
  1694. // CHECK:STDOUT: %T.loc5_14.2 => constants.%T
  1695. // CHECK:STDOUT: %ptr.loc5_32.2 => constants.%ptr.e8f
  1696. // CHECK:STDOUT: %I.type.loc5_33.2 => constants.%I.type.e19
  1697. // CHECK:STDOUT: %I.impl_witness.loc5_35.2 => constants.%I.impl_witness.18a
  1698. // CHECK:STDOUT: }
  1699. // CHECK:STDOUT:
  1700. // CHECK:STDOUT: specific @N(constants.%T) {
  1701. // CHECK:STDOUT: %T => constants.%T
  1702. // CHECK:STDOUT: }
  1703. // CHECK:STDOUT:
  1704. // CHECK:STDOUT: specific @N.Self.binding.as_type.impls.I.type.require(constants.%T, constants.%Self.e1f642.1) {
  1705. // CHECK:STDOUT: %T => constants.%T
  1706. // CHECK:STDOUT: %N.type => constants.%N.type.d682d6.1
  1707. // CHECK:STDOUT: %Self => constants.%Self.e1f642.1
  1708. // CHECK:STDOUT: %Self.binding.as_type => constants.%Self.binding.as_type
  1709. // CHECK:STDOUT: %I.type => constants.%I.type.1ab
  1710. // CHECK:STDOUT: }
  1711. // CHECK:STDOUT:
  1712. // CHECK:STDOUT: specific @N(constants.%ptr.125) {
  1713. // CHECK:STDOUT: %T => constants.%ptr.125
  1714. // CHECK:STDOUT:
  1715. // CHECK:STDOUT: !definition:
  1716. // CHECK:STDOUT: %N.type => constants.%N.type.d682d6.2
  1717. // CHECK:STDOUT: %Self => constants.%Self.e1f642.2
  1718. // CHECK:STDOUT: %I.type => constants.%I.type.08a
  1719. // CHECK:STDOUT: %require_complete => constants.%require_complete.ea6
  1720. // CHECK:STDOUT: }
  1721. // CHECK:STDOUT:
  1722. // CHECK:STDOUT: specific @N.Self.binding.as_type.impls.I.type.require(constants.%ptr.125, constants.%C.type.facet) {
  1723. // CHECK:STDOUT: %T => constants.%ptr.125
  1724. // CHECK:STDOUT: %N.type => constants.%N.type.d682d6.2
  1725. // CHECK:STDOUT: %Self => constants.%C.type.facet
  1726. // CHECK:STDOUT: %Self.binding.as_type => constants.%C
  1727. // CHECK:STDOUT: %I.type => constants.%I.type.08a
  1728. // CHECK:STDOUT: }
  1729. // CHECK:STDOUT:
  1730. // CHECK:STDOUT: specific @I(constants.%ptr.125) {
  1731. // CHECK:STDOUT: %T => constants.%ptr.125
  1732. // CHECK:STDOUT: }
  1733. // CHECK:STDOUT:
  1734. // CHECK:STDOUT: specific @C.as.I.impl.c93(constants.%T) {
  1735. // CHECK:STDOUT: %T.loc6_14.2 => constants.%T
  1736. // CHECK:STDOUT: %ptr.loc6_32.2 => constants.%ptr.e8f
  1737. // CHECK:STDOUT: %ptr.loc6_33.2 => constants.%ptr.125
  1738. // CHECK:STDOUT: %N.type.loc6_34.2 => constants.%N.type.d682d6.2
  1739. // CHECK:STDOUT: %I.impl_witness.loc6_36.2 => constants.%I.impl_witness.d57
  1740. // CHECK:STDOUT: }
  1741. // CHECK:STDOUT:
  1742. // CHECK:STDOUT: --- fail_import_generic_decl.carbon
  1743. // CHECK:STDOUT:
  1744. // CHECK:STDOUT: constants {
  1745. // CHECK:STDOUT: %D: type = class_type @D [concrete]
  1746. // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete]
  1747. // CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %empty_struct_type [concrete]
  1748. // CHECK:STDOUT: %type: type = facet_type <type> [concrete]
  1749. // CHECK:STDOUT: %.Self: %type = symbolic_binding .Self [symbolic_self]
  1750. // CHECK:STDOUT: %T: type = symbolic_binding T, 0 [symbolic]
  1751. // CHECK:STDOUT: %pattern_type: type = pattern_type type [concrete]
  1752. // CHECK:STDOUT: %J.type.885: type = generic_interface_type @J [concrete]
  1753. // CHECK:STDOUT: %J.generic: %J.type.885 = struct_value () [concrete]
  1754. // CHECK:STDOUT: %J.type.04e: type = facet_type <@J, @J(%T)> [symbolic]
  1755. // CHECK:STDOUT: %Self.a60: %J.type.04e = symbolic_binding Self, 1 [symbolic]
  1756. // CHECK:STDOUT: %N.type.b47: type = generic_named_constaint_type @N [concrete]
  1757. // CHECK:STDOUT: %empty_struct: %N.type.b47 = struct_value () [concrete]
  1758. // CHECK:STDOUT: %N.type.d68: type = facet_type <@N, @N(%T)> [symbolic]
  1759. // CHECK:STDOUT: %Self.31c: %N.type.d68 = symbolic_binding Self, 1 [symbolic]
  1760. // CHECK:STDOUT: %Self.binding.as_type: type = symbolic_binding_type Self, 1, %Self.31c [symbolic]
  1761. // CHECK:STDOUT: %require_complete: <witness> = require_complete_type %J.type.04e [symbolic]
  1762. // CHECK:STDOUT: %J.impl_witness.861: <witness> = impl_witness @D.as.J.impl.b25.%J.impl_witness_table, @D.as.J.impl.b25(%T) [symbolic]
  1763. // CHECK:STDOUT: %ptr: type = ptr_type %T [symbolic]
  1764. // CHECK:STDOUT: %J.type.80f: type = facet_type <@J, @J(%ptr)> [symbolic]
  1765. // CHECK:STDOUT: %J.impl_witness.f4f: <witness> = impl_witness @D.as.J.impl.f05.%J.impl_witness_table, @D.as.J.impl.f05(%T) [symbolic]
  1766. // CHECK:STDOUT: }
  1767. // CHECK:STDOUT:
  1768. // CHECK:STDOUT: file {
  1769. // CHECK:STDOUT: package: <namespace> = namespace [concrete] {
  1770. // CHECK:STDOUT: .D = %D.decl
  1771. // CHECK:STDOUT: .J = %J.decl
  1772. // CHECK:STDOUT: .N = %N.decl
  1773. // CHECK:STDOUT: }
  1774. // CHECK:STDOUT: %D.decl: type = class_decl @D [concrete = constants.%D] {} {}
  1775. // CHECK:STDOUT: %J.decl: %J.type.885 = interface_decl @J [concrete = constants.%J.generic] {
  1776. // CHECK:STDOUT: %T.patt: %pattern_type = symbolic_binding_pattern T, 0 [concrete]
  1777. // CHECK:STDOUT: } {
  1778. // CHECK:STDOUT: %.Self: %type = symbolic_binding .Self [symbolic_self = constants.%.Self]
  1779. // CHECK:STDOUT: %T.loc5_13.2: type = symbolic_binding T, 0 [symbolic = %T.loc5_13.1 (constants.%T)]
  1780. // CHECK:STDOUT: }
  1781. // CHECK:STDOUT: %N.decl: %N.type.b47 = constraint_decl @N [concrete = constants.%empty_struct] {
  1782. // CHECK:STDOUT: %T.patt: %pattern_type = symbolic_binding_pattern T, 0 [concrete]
  1783. // CHECK:STDOUT: } {
  1784. // CHECK:STDOUT: %.Self: %type = symbolic_binding .Self [symbolic_self = constants.%.Self]
  1785. // CHECK:STDOUT: %T.loc7_14.2: type = symbolic_binding T, 0 [symbolic = %T.loc7_14.1 (constants.%T)]
  1786. // CHECK:STDOUT: }
  1787. // CHECK:STDOUT: impl_decl @D.as.J.impl.b25 [concrete] {
  1788. // CHECK:STDOUT: %T.patt: %pattern_type = symbolic_binding_pattern T, 0 [concrete]
  1789. // CHECK:STDOUT: } {
  1790. // CHECK:STDOUT: %D.ref: type = name_ref D, file.%D.decl [concrete = constants.%D]
  1791. // CHECK:STDOUT: %J.ref: %J.type.885 = name_ref J, file.%J.decl [concrete = constants.%J.generic]
  1792. // CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc15_14.1 [symbolic = %T.loc15_14.2 (constants.%T)]
  1793. // CHECK:STDOUT: %J.type.loc15_32.1: type = facet_type <@J, @J(constants.%T)> [symbolic = %J.type.loc15_32.2 (constants.%J.type.04e)]
  1794. // CHECK:STDOUT: %.Self: %type = symbolic_binding .Self [symbolic_self = constants.%.Self]
  1795. // CHECK:STDOUT: %T.loc15_14.1: type = symbolic_binding T, 0 [symbolic = %T.loc15_14.2 (constants.%T)]
  1796. // CHECK:STDOUT: }
  1797. // CHECK:STDOUT: impl_decl @D.as.J.impl.f05 [concrete] {
  1798. // CHECK:STDOUT: %T.patt: %pattern_type = symbolic_binding_pattern T, 0 [concrete]
  1799. // CHECK:STDOUT: } {
  1800. // CHECK:STDOUT: %D.ref: type = name_ref D, file.%D.decl [concrete = constants.%D]
  1801. // CHECK:STDOUT: %J.ref: %J.type.885 = name_ref J, file.%J.decl [concrete = constants.%J.generic]
  1802. // CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc21_14.1 [symbolic = %T.loc21_14.2 (constants.%T)]
  1803. // CHECK:STDOUT: %ptr.loc21_32.1: type = ptr_type %T.ref [symbolic = %ptr.loc21_32.2 (constants.%ptr)]
  1804. // CHECK:STDOUT: %J.type.loc21_33.1: type = facet_type <@J, @J(constants.%ptr)> [symbolic = %J.type.loc21_33.2 (constants.%J.type.80f)]
  1805. // CHECK:STDOUT: %.Self: %type = symbolic_binding .Self [symbolic_self = constants.%.Self]
  1806. // CHECK:STDOUT: %T.loc21_14.1: type = symbolic_binding T, 0 [symbolic = %T.loc21_14.2 (constants.%T)]
  1807. // CHECK:STDOUT: }
  1808. // CHECK:STDOUT: }
  1809. // CHECK:STDOUT:
  1810. // CHECK:STDOUT: generic interface @J(%T.loc5_13.2: type) {
  1811. // CHECK:STDOUT: %T.loc5_13.1: type = symbolic_binding T, 0 [symbolic = %T.loc5_13.1 (constants.%T)]
  1812. // CHECK:STDOUT:
  1813. // CHECK:STDOUT: !definition:
  1814. // CHECK:STDOUT: %J.type: type = facet_type <@J, @J(%T.loc5_13.1)> [symbolic = %J.type (constants.%J.type.04e)]
  1815. // CHECK:STDOUT: %Self.loc5_23.2: @J.%J.type (%J.type.04e) = symbolic_binding Self, 1 [symbolic = %Self.loc5_23.2 (constants.%Self.a60)]
  1816. // CHECK:STDOUT:
  1817. // CHECK:STDOUT: interface {
  1818. // CHECK:STDOUT: %Self.loc5_23.1: @J.%J.type (%J.type.04e) = symbolic_binding Self, 1 [symbolic = %Self.loc5_23.2 (constants.%Self.a60)]
  1819. // CHECK:STDOUT:
  1820. // CHECK:STDOUT: !members:
  1821. // CHECK:STDOUT: .Self = %Self.loc5_23.1
  1822. // CHECK:STDOUT: witness = ()
  1823. // CHECK:STDOUT:
  1824. // CHECK:STDOUT: !requires:
  1825. // CHECK:STDOUT: }
  1826. // CHECK:STDOUT: }
  1827. // CHECK:STDOUT:
  1828. // CHECK:STDOUT: generic constraint @N(%T.loc7_14.2: type) {
  1829. // CHECK:STDOUT: %T.loc7_14.1: type = symbolic_binding T, 0 [symbolic = %T.loc7_14.1 (constants.%T)]
  1830. // CHECK:STDOUT:
  1831. // CHECK:STDOUT: !definition:
  1832. // CHECK:STDOUT: %N.type: type = facet_type <@N, @N(%T.loc7_14.1)> [symbolic = %N.type (constants.%N.type.d68)]
  1833. // CHECK:STDOUT: %Self.loc7_24.2: @N.%N.type (%N.type.d68) = symbolic_binding Self, 1 [symbolic = %Self.loc7_24.2 (constants.%Self.31c)]
  1834. // CHECK:STDOUT: %J.type: type = facet_type <@J, @J(%T.loc7_14.1)> [symbolic = %J.type (constants.%J.type.04e)]
  1835. // CHECK:STDOUT: %require_complete: <witness> = require_complete_type %J.type [symbolic = %require_complete (constants.%require_complete)]
  1836. // CHECK:STDOUT:
  1837. // CHECK:STDOUT: constraint {
  1838. // CHECK:STDOUT: %Self.loc7_24.1: @N.%N.type (%N.type.d68) = symbolic_binding Self, 1 [symbolic = %Self.loc7_24.2 (constants.%Self.31c)]
  1839. // CHECK:STDOUT: %N.Self.binding.as_type.impls.J.type.require.decl = require_decl @N.Self.binding.as_type.impls.J.type.require [concrete] {
  1840. // CHECK:STDOUT: require %Self.as_type impls %J.type.loc8_27.1
  1841. // CHECK:STDOUT: } {
  1842. // CHECK:STDOUT: %Self.as_type: type = facet_access_type @N.%Self.loc7_24.1 [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)]
  1843. // CHECK:STDOUT: %J.ref: %J.type.885 = name_ref J, file.%J.decl [concrete = constants.%J.generic]
  1844. // CHECK:STDOUT: %T.ref: type = name_ref T, @N.%T.loc7_14.2 [symbolic = %T (constants.%T)]
  1845. // CHECK:STDOUT: %J.type.loc8_27.1: type = facet_type <@J, @J(constants.%T)> [symbolic = %J.type.loc8_27.2 (constants.%J.type.04e)]
  1846. // CHECK:STDOUT: }
  1847. // CHECK:STDOUT: %.loc8: type = specific_constant @N.Self.binding.as_type.impls.J.type.require.%J.type.loc8_27.1, @N.Self.binding.as_type.impls.J.type.require(constants.%T, constants.%Self.31c) [symbolic = %J.type (constants.%J.type.04e)]
  1848. // CHECK:STDOUT:
  1849. // CHECK:STDOUT: !members:
  1850. // CHECK:STDOUT: .Self = %Self.loc7_24.1
  1851. // CHECK:STDOUT: .J = <poisoned>
  1852. // CHECK:STDOUT: .T = <poisoned>
  1853. // CHECK:STDOUT: extend %.loc8
  1854. // CHECK:STDOUT:
  1855. // CHECK:STDOUT: !requires:
  1856. // CHECK:STDOUT: @N.Self.binding.as_type.impls.J.type.require {
  1857. // CHECK:STDOUT: require @N.Self.binding.as_type.impls.J.type.require.%Self.as_type impls @N.Self.binding.as_type.impls.J.type.require.%J.type.loc8_27.1
  1858. // CHECK:STDOUT: }
  1859. // CHECK:STDOUT: }
  1860. // CHECK:STDOUT: }
  1861. // CHECK:STDOUT:
  1862. // CHECK:STDOUT: generic require @N.Self.binding.as_type.impls.J.type.require(@N.%T.loc7_14.2: type, @N.%Self.loc7_24.1: @N.%N.type (%N.type.d68)) {
  1863. // CHECK:STDOUT: %T: type = symbolic_binding T, 0 [symbolic = %T (constants.%T)]
  1864. // CHECK:STDOUT: %N.type: type = facet_type <@N, @N(%T)> [symbolic = %N.type (constants.%N.type.d68)]
  1865. // CHECK:STDOUT: %Self: @N.Self.binding.as_type.impls.J.type.require.%N.type (%N.type.d68) = symbolic_binding Self, 1 [symbolic = %Self (constants.%Self.31c)]
  1866. // CHECK:STDOUT: %Self.binding.as_type: type = symbolic_binding_type Self, 1, %Self [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)]
  1867. // CHECK:STDOUT: %J.type.loc8_27.2: type = facet_type <@J, @J(%T)> [symbolic = %J.type.loc8_27.2 (constants.%J.type.04e)]
  1868. // CHECK:STDOUT: }
  1869. // CHECK:STDOUT:
  1870. // CHECK:STDOUT: generic impl @D.as.J.impl.b25(%T.loc15_14.1: type) {
  1871. // CHECK:STDOUT: %T.loc15_14.2: type = symbolic_binding T, 0 [symbolic = %T.loc15_14.2 (constants.%T)]
  1872. // CHECK:STDOUT: %J.type.loc15_32.2: type = facet_type <@J, @J(%T.loc15_14.2)> [symbolic = %J.type.loc15_32.2 (constants.%J.type.04e)]
  1873. // CHECK:STDOUT: %J.impl_witness.loc15_33.2: <witness> = impl_witness %J.impl_witness_table, @D.as.J.impl.b25(%T.loc15_14.2) [symbolic = %J.impl_witness.loc15_33.2 (constants.%J.impl_witness.861)]
  1874. // CHECK:STDOUT:
  1875. // CHECK:STDOUT: impl: %D.ref as %J.type.loc15_32.1;
  1876. // CHECK:STDOUT: }
  1877. // CHECK:STDOUT:
  1878. // CHECK:STDOUT: generic impl @D.as.J.impl.f05(%T.loc21_14.1: type) {
  1879. // CHECK:STDOUT: %T.loc21_14.2: type = symbolic_binding T, 0 [symbolic = %T.loc21_14.2 (constants.%T)]
  1880. // CHECK:STDOUT: %ptr.loc21_32.2: type = ptr_type %T.loc21_14.2 [symbolic = %ptr.loc21_32.2 (constants.%ptr)]
  1881. // CHECK:STDOUT: %J.type.loc21_33.2: type = facet_type <@J, @J(%ptr.loc21_32.2)> [symbolic = %J.type.loc21_33.2 (constants.%J.type.80f)]
  1882. // CHECK:STDOUT: %J.impl_witness.loc21_34.2: <witness> = impl_witness %J.impl_witness_table, @D.as.J.impl.f05(%T.loc21_14.2) [symbolic = %J.impl_witness.loc21_34.2 (constants.%J.impl_witness.f4f)]
  1883. // CHECK:STDOUT:
  1884. // CHECK:STDOUT: impl: %D.ref as %J.type.loc21_33.1;
  1885. // CHECK:STDOUT: }
  1886. // CHECK:STDOUT:
  1887. // CHECK:STDOUT: class @D {
  1888. // CHECK:STDOUT: %complete_type: <witness> = complete_type_witness constants.%empty_struct_type [concrete = constants.%complete_type]
  1889. // CHECK:STDOUT: complete_type_witness = %complete_type
  1890. // CHECK:STDOUT:
  1891. // CHECK:STDOUT: !members:
  1892. // CHECK:STDOUT: .Self = constants.%D
  1893. // CHECK:STDOUT: }
  1894. // CHECK:STDOUT:
  1895. // CHECK:STDOUT: specific @J(constants.%T) {
  1896. // CHECK:STDOUT: %T.loc5_13.1 => constants.%T
  1897. // CHECK:STDOUT:
  1898. // CHECK:STDOUT: !definition:
  1899. // CHECK:STDOUT: %J.type => constants.%J.type.04e
  1900. // CHECK:STDOUT: %Self.loc5_23.2 => constants.%Self.a60
  1901. // CHECK:STDOUT: }
  1902. // CHECK:STDOUT:
  1903. // CHECK:STDOUT: specific @N(constants.%T) {
  1904. // CHECK:STDOUT: %T.loc7_14.1 => constants.%T
  1905. // CHECK:STDOUT: }
  1906. // CHECK:STDOUT:
  1907. // CHECK:STDOUT: specific @N.Self.binding.as_type.impls.J.type.require(constants.%T, constants.%Self.31c) {
  1908. // CHECK:STDOUT: %T => constants.%T
  1909. // CHECK:STDOUT: %N.type => constants.%N.type.d68
  1910. // CHECK:STDOUT: %Self => constants.%Self.31c
  1911. // CHECK:STDOUT: %Self.binding.as_type => constants.%Self.binding.as_type
  1912. // CHECK:STDOUT: %J.type.loc8_27.2 => constants.%J.type.04e
  1913. // CHECK:STDOUT: }
  1914. // CHECK:STDOUT:
  1915. // CHECK:STDOUT: specific @D.as.J.impl.b25(constants.%T) {
  1916. // CHECK:STDOUT: %T.loc15_14.2 => constants.%T
  1917. // CHECK:STDOUT: %J.type.loc15_32.2 => constants.%J.type.04e
  1918. // CHECK:STDOUT: %J.impl_witness.loc15_33.2 => constants.%J.impl_witness.861
  1919. // CHECK:STDOUT: }
  1920. // CHECK:STDOUT:
  1921. // CHECK:STDOUT: specific @J(constants.%ptr) {
  1922. // CHECK:STDOUT: %T.loc5_13.1 => constants.%ptr
  1923. // CHECK:STDOUT: }
  1924. // CHECK:STDOUT:
  1925. // CHECK:STDOUT: specific @D.as.J.impl.f05(constants.%T) {
  1926. // CHECK:STDOUT: %T.loc21_14.2 => constants.%T
  1927. // CHECK:STDOUT: %ptr.loc21_32.2 => constants.%ptr
  1928. // CHECK:STDOUT: %J.type.loc21_33.2 => constants.%J.type.80f
  1929. // CHECK:STDOUT: %J.impl_witness.loc21_34.2 => constants.%J.impl_witness.f4f
  1930. // CHECK:STDOUT: }
  1931. // CHECK:STDOUT:
  1932. // CHECK:STDOUT: --- fail_import_generic_decl.impl.carbon
  1933. // CHECK:STDOUT:
  1934. // CHECK:STDOUT: constants {
  1935. // CHECK:STDOUT: %T: type = symbolic_binding T, 0 [symbolic]
  1936. // CHECK:STDOUT: %J.type.885: type = generic_interface_type @J [concrete]
  1937. // CHECK:STDOUT: %J.generic: %J.type.885 = struct_value () [concrete]
  1938. // CHECK:STDOUT: %J.type.04e: type = facet_type <@J, @J(%T)> [symbolic]
  1939. // CHECK:STDOUT: %Self.c25: %J.type.04e = symbolic_binding Self, 1 [symbolic]
  1940. // CHECK:STDOUT: %pattern_type: type = pattern_type type [concrete]
  1941. // CHECK:STDOUT: %D: type = class_type @D [concrete]
  1942. // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete]
  1943. // CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %empty_struct_type [concrete]
  1944. // CHECK:STDOUT: %J.impl_witness.861: <witness> = impl_witness imports.%J.impl_witness_table.50b, @D.as.J.impl.b25a4e.1(%T) [symbolic]
  1945. // CHECK:STDOUT: %ptr: type = ptr_type %T [symbolic]
  1946. // CHECK:STDOUT: %J.type.80f: type = facet_type <@J, @J(%ptr)> [symbolic]
  1947. // CHECK:STDOUT: %J.impl_witness.f4f: <witness> = impl_witness imports.%J.impl_witness_table.a37, @D.as.J.impl.f050b9.1(%T) [symbolic]
  1948. // CHECK:STDOUT: %type: type = facet_type <type> [concrete]
  1949. // CHECK:STDOUT: %.Self: %type = symbolic_binding .Self [symbolic_self]
  1950. // CHECK:STDOUT: %N.type.b47: type = generic_named_constaint_type @N [concrete]
  1951. // CHECK:STDOUT: %empty_struct: %N.type.b47 = struct_value () [concrete]
  1952. // CHECK:STDOUT: %N.type.d682d6.1: type = facet_type <@N, @N(%T)> [symbolic]
  1953. // CHECK:STDOUT: %Self.e1f: %N.type.d682d6.1 = symbolic_binding Self, 1 [symbolic]
  1954. // CHECK:STDOUT: %Self.binding.as_type: type = symbolic_binding_type Self, 1, %Self.e1f [symbolic]
  1955. // CHECK:STDOUT: %require_complete: <witness> = require_complete_type %J.type.04e [symbolic]
  1956. // CHECK:STDOUT: %D.type.facet: %type = facet_value %D, () [concrete]
  1957. // CHECK:STDOUT: %N.type.d682d6.2: type = facet_type <@N, @N(%ptr)> [symbolic]
  1958. // CHECK:STDOUT: }
  1959. // CHECK:STDOUT:
  1960. // CHECK:STDOUT: imports {
  1961. // CHECK:STDOUT: %Main.D: type = import_ref Main//import_generic_decl, D, loaded [concrete = constants.%D]
  1962. // CHECK:STDOUT: %Main.J: %J.type.885 = import_ref Main//import_generic_decl, J, loaded [concrete = constants.%J.generic]
  1963. // CHECK:STDOUT: %Main.N: %N.type.b47 = import_ref Main//import_generic_decl, N, loaded [concrete = constants.%empty_struct]
  1964. // CHECK:STDOUT: %Main.import_ref.e9b = import_ref Main//import_generic_decl, loc5_23, unloaded
  1965. // CHECK:STDOUT: %Main.import_ref.b3bc94.1: type = import_ref Main//import_generic_decl, loc5_13, loaded [symbolic = @J.%T (constants.%T)]
  1966. // CHECK:STDOUT: %Main.import_ref.8f2: <witness> = import_ref Main//import_generic_decl, loc4_10, loaded [concrete = constants.%complete_type]
  1967. // CHECK:STDOUT: %Main.import_ref.1d5 = import_ref Main//import_generic_decl, inst{{[0-9A-F]+}} [no loc], unloaded
  1968. // CHECK:STDOUT: %J.impl_witness_table.50b = impl_witness_table (), @D.as.J.impl.b25a4e.1 [concrete]
  1969. // CHECK:STDOUT: %Main.import_ref.4ae308.1: type = import_ref Main//import_generic_decl, loc15_24, loaded [concrete = constants.%D]
  1970. // CHECK:STDOUT: %Main.import_ref.f2a55c.1: type = import_ref Main//import_generic_decl, loc15_32, loaded [symbolic = @D.as.J.impl.b25a4e.1.%J.type (constants.%J.type.04e)]
  1971. // CHECK:STDOUT: %Main.import_ref.b3bc94.2: type = import_ref Main//import_generic_decl, loc15_14, loaded [symbolic = @D.as.J.impl.b25a4e.1.%T (constants.%T)]
  1972. // CHECK:STDOUT: %J.impl_witness_table.a37 = impl_witness_table (), @D.as.J.impl.f050b9.1 [concrete]
  1973. // CHECK:STDOUT: %Main.import_ref.4ae308.2: type = import_ref Main//import_generic_decl, loc21_24, loaded [concrete = constants.%D]
  1974. // CHECK:STDOUT: %Main.import_ref.739: type = import_ref Main//import_generic_decl, loc21_33, loaded [symbolic = @D.as.J.impl.f050b9.1.%J.type (constants.%J.type.80f)]
  1975. // CHECK:STDOUT: %Main.import_ref.b3bc94.3: type = import_ref Main//import_generic_decl, loc21_14, loaded [symbolic = @D.as.J.impl.f050b9.1.%T (constants.%T)]
  1976. // CHECK:STDOUT: %Main.import_ref.213: type = import_ref Main//import_generic_decl, loc8_18, loaded [symbolic = @N.Self.binding.as_type.impls.J.type.require.%Self.binding.as_type (constants.%Self.binding.as_type)]
  1977. // CHECK:STDOUT: %Main.import_ref.f2a55c.2: type = import_ref Main//import_generic_decl, loc8_27, loaded [symbolic = @N.Self.binding.as_type.impls.J.type.require.%J.type (constants.%J.type.04e)]
  1978. // CHECK:STDOUT: %Main.import_ref.b3bc94.4: type = import_ref Main//import_generic_decl, loc7_14, loaded [symbolic = @N.%T (constants.%T)]
  1979. // CHECK:STDOUT: %Main.import_ref.2fc: @N.%N.type (%N.type.d682d6.1) = import_ref Main//import_generic_decl, loc7_24, loaded [symbolic = @N.%Self (constants.%Self.e1f)]
  1980. // CHECK:STDOUT: %Main.import_ref.830 = import_ref Main//import_generic_decl, loc7_24, unloaded
  1981. // CHECK:STDOUT: %Main.import_ref.105 = import_ref Main//import_generic_decl, loc8_28, unloaded
  1982. // CHECK:STDOUT: %Main.import_ref.b3bc94.5: type = import_ref Main//import_generic_decl, loc7_14, loaded [symbolic = @N.%T (constants.%T)]
  1983. // CHECK:STDOUT: }
  1984. // CHECK:STDOUT:
  1985. // CHECK:STDOUT: file {
  1986. // CHECK:STDOUT: package: <namespace> = namespace [concrete] {
  1987. // CHECK:STDOUT: .D = imports.%Main.D
  1988. // CHECK:STDOUT: .J = imports.%Main.J
  1989. // CHECK:STDOUT: .N = imports.%Main.N
  1990. // CHECK:STDOUT: }
  1991. // CHECK:STDOUT: %default.import.loc2_35.1 = import <none>
  1992. // CHECK:STDOUT: %default.import.loc2_35.2 = import <none>
  1993. // CHECK:STDOUT: impl_decl @D.as.J.impl.b25a4e.2 [concrete] {
  1994. // CHECK:STDOUT: %T.patt: %pattern_type = symbolic_binding_pattern T, 0 [concrete]
  1995. // CHECK:STDOUT: } {
  1996. // CHECK:STDOUT: %D.ref: type = name_ref D, imports.%Main.D [concrete = constants.%D]
  1997. // CHECK:STDOUT: %J.ref: %J.type.885 = name_ref J, imports.%Main.J [concrete = constants.%J.generic]
  1998. // CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc8_14.1 [symbolic = %T.loc8_14.2 (constants.%T)]
  1999. // CHECK:STDOUT: %J.type.loc8_32.1: type = facet_type <@J, @J(constants.%T)> [symbolic = %J.type.loc8_32.2 (constants.%J.type.04e)]
  2000. // CHECK:STDOUT: %.Self: %type = symbolic_binding .Self [symbolic_self = constants.%.Self]
  2001. // CHECK:STDOUT: %T.loc8_14.1: type = symbolic_binding T, 0 [symbolic = %T.loc8_14.2 (constants.%T)]
  2002. // CHECK:STDOUT: }
  2003. // CHECK:STDOUT: impl_decl @D.as.J.impl.b25a4e.3 [concrete] {
  2004. // CHECK:STDOUT: %T.patt: %pattern_type = symbolic_binding_pattern T, 0 [concrete]
  2005. // CHECK:STDOUT: } {
  2006. // CHECK:STDOUT: %D.ref: type = name_ref D, imports.%Main.D [concrete = constants.%D]
  2007. // CHECK:STDOUT: %J.ref: %J.type.885 = name_ref J, imports.%Main.J [concrete = constants.%J.generic]
  2008. // CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc14_14.1 [symbolic = %T.loc14_14.2 (constants.%T)]
  2009. // CHECK:STDOUT: %J.type.loc14_32.1: type = facet_type <@J, @J(constants.%T)> [symbolic = %J.type.loc14_32.2 (constants.%J.type.04e)]
  2010. // CHECK:STDOUT: %.Self: %type = symbolic_binding .Self [symbolic_self = constants.%.Self]
  2011. // CHECK:STDOUT: %T.loc14_14.1: type = symbolic_binding T, 0 [symbolic = %T.loc14_14.2 (constants.%T)]
  2012. // CHECK:STDOUT: }
  2013. // CHECK:STDOUT: impl_decl @D.as.J.impl.f050b9.2 [concrete] {
  2014. // CHECK:STDOUT: %T.patt: %pattern_type = symbolic_binding_pattern T, 0 [concrete]
  2015. // CHECK:STDOUT: } {
  2016. // CHECK:STDOUT: %D.ref: type = name_ref D, imports.%Main.D [concrete = constants.%D]
  2017. // CHECK:STDOUT: %J.ref: %J.type.885 = name_ref J, imports.%Main.J [concrete = constants.%J.generic]
  2018. // CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc20_14.1 [symbolic = %T.loc20_14.2 (constants.%T)]
  2019. // CHECK:STDOUT: %ptr.loc20_32.1: type = ptr_type %T.ref [symbolic = %ptr.loc20_32.2 (constants.%ptr)]
  2020. // CHECK:STDOUT: %J.type.loc20_33.1: type = facet_type <@J, @J(constants.%ptr)> [symbolic = %J.type.loc20_33.2 (constants.%J.type.80f)]
  2021. // CHECK:STDOUT: %.Self: %type = symbolic_binding .Self [symbolic_self = constants.%.Self]
  2022. // CHECK:STDOUT: %T.loc20_14.1: type = symbolic_binding T, 0 [symbolic = %T.loc20_14.2 (constants.%T)]
  2023. // CHECK:STDOUT: }
  2024. // CHECK:STDOUT: impl_decl @D.as.J.impl.f050b9.3 [concrete] {
  2025. // CHECK:STDOUT: %T.patt: %pattern_type = symbolic_binding_pattern T, 0 [concrete]
  2026. // CHECK:STDOUT: } {
  2027. // CHECK:STDOUT: %D.ref: type = name_ref D, imports.%Main.D [concrete = constants.%D]
  2028. // CHECK:STDOUT: %J.ref: %J.type.885 = name_ref J, imports.%Main.J [concrete = constants.%J.generic]
  2029. // CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc26_14.1 [symbolic = %T.loc26_14.2 (constants.%T)]
  2030. // CHECK:STDOUT: %ptr.loc26_32.1: type = ptr_type %T.ref [symbolic = %ptr.loc26_32.2 (constants.%ptr)]
  2031. // CHECK:STDOUT: %J.type.loc26_33.1: type = facet_type <@J, @J(constants.%ptr)> [symbolic = %J.type.loc26_33.2 (constants.%J.type.80f)]
  2032. // CHECK:STDOUT: %.Self: %type = symbolic_binding .Self [symbolic_self = constants.%.Self]
  2033. // CHECK:STDOUT: %T.loc26_14.1: type = symbolic_binding T, 0 [symbolic = %T.loc26_14.2 (constants.%T)]
  2034. // CHECK:STDOUT: }
  2035. // CHECK:STDOUT: impl_decl @D.as.J.impl.e28c26.1 [concrete] {
  2036. // CHECK:STDOUT: %T.patt: %pattern_type = symbolic_binding_pattern T, 0 [concrete]
  2037. // CHECK:STDOUT: } {
  2038. // CHECK:STDOUT: %D.ref: type = name_ref D, imports.%Main.D [concrete = constants.%D]
  2039. // CHECK:STDOUT: %N.ref: %N.type.b47 = name_ref N, imports.%Main.N [concrete = constants.%empty_struct]
  2040. // CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc32_14.1 [symbolic = %T.loc32_14.2 (constants.%T)]
  2041. // CHECK:STDOUT: %N.type.loc32_32.1: type = facet_type <@N, @N(constants.%T)> [symbolic = %N.type.loc32_32.2 (constants.%N.type.d682d6.1)]
  2042. // CHECK:STDOUT: %.Self: %type = symbolic_binding .Self [symbolic_self = constants.%.Self]
  2043. // CHECK:STDOUT: %T.loc32_14.1: type = symbolic_binding T, 0 [symbolic = %T.loc32_14.2 (constants.%T)]
  2044. // CHECK:STDOUT: }
  2045. // CHECK:STDOUT: impl_decl @D.as.J.impl.e28c26.2 [concrete] {
  2046. // CHECK:STDOUT: %T.patt: %pattern_type = symbolic_binding_pattern T, 0 [concrete]
  2047. // CHECK:STDOUT: } {
  2048. // CHECK:STDOUT: %D.ref: type = name_ref D, imports.%Main.D [concrete = constants.%D]
  2049. // CHECK:STDOUT: %N.ref: %N.type.b47 = name_ref N, imports.%Main.N [concrete = constants.%empty_struct]
  2050. // CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc38_14.1 [symbolic = %T.loc38_14.2 (constants.%T)]
  2051. // CHECK:STDOUT: %ptr.loc38_32.1: type = ptr_type %T.ref [symbolic = %ptr.loc38_32.2 (constants.%ptr)]
  2052. // CHECK:STDOUT: %N.type.loc38_33.1: type = facet_type <@N, @N(constants.%ptr)> [symbolic = %N.type.loc38_33.2 (constants.%N.type.d682d6.2)]
  2053. // CHECK:STDOUT: %.Self: %type = symbolic_binding .Self [symbolic_self = constants.%.Self]
  2054. // CHECK:STDOUT: %T.loc38_14.1: type = symbolic_binding T, 0 [symbolic = %T.loc38_14.2 (constants.%T)]
  2055. // CHECK:STDOUT: }
  2056. // CHECK:STDOUT: }
  2057. // CHECK:STDOUT:
  2058. // CHECK:STDOUT: generic interface @J(imports.%Main.import_ref.b3bc94.1: type) [from "fail_import_generic_decl.carbon"] {
  2059. // CHECK:STDOUT: %T: type = symbolic_binding T, 0 [symbolic = %T (constants.%T)]
  2060. // CHECK:STDOUT:
  2061. // CHECK:STDOUT: !definition:
  2062. // CHECK:STDOUT: %J.type: type = facet_type <@J, @J(%T)> [symbolic = %J.type (constants.%J.type.04e)]
  2063. // CHECK:STDOUT: %Self: @J.%J.type (%J.type.04e) = symbolic_binding Self, 1 [symbolic = %Self (constants.%Self.c25)]
  2064. // CHECK:STDOUT:
  2065. // CHECK:STDOUT: interface {
  2066. // CHECK:STDOUT: !members:
  2067. // CHECK:STDOUT: .Self = imports.%Main.import_ref.e9b
  2068. // CHECK:STDOUT: witness = ()
  2069. // CHECK:STDOUT:
  2070. // CHECK:STDOUT: !requires:
  2071. // CHECK:STDOUT: }
  2072. // CHECK:STDOUT: }
  2073. // CHECK:STDOUT:
  2074. // CHECK:STDOUT: generic constraint @N(imports.%Main.import_ref.b3bc94.5: type) [from "fail_import_generic_decl.carbon"] {
  2075. // CHECK:STDOUT: %T: type = symbolic_binding T, 0 [symbolic = %T (constants.%T)]
  2076. // CHECK:STDOUT:
  2077. // CHECK:STDOUT: !definition:
  2078. // CHECK:STDOUT: %N.type: type = facet_type <@N, @N(%T)> [symbolic = %N.type (constants.%N.type.d682d6.1)]
  2079. // CHECK:STDOUT: %Self: @N.%N.type (%N.type.d682d6.1) = symbolic_binding Self, 1 [symbolic = %Self (constants.%Self.e1f)]
  2080. // CHECK:STDOUT: %J.type: type = facet_type <@J, @J(%T)> [symbolic = %J.type (constants.%J.type.04e)]
  2081. // CHECK:STDOUT: %require_complete: <witness> = require_complete_type %J.type [symbolic = %require_complete (constants.%require_complete)]
  2082. // CHECK:STDOUT:
  2083. // CHECK:STDOUT: constraint {
  2084. // CHECK:STDOUT: !members:
  2085. // CHECK:STDOUT: .Self = imports.%Main.import_ref.830
  2086. // CHECK:STDOUT: extend imports.%Main.import_ref.105
  2087. // CHECK:STDOUT:
  2088. // CHECK:STDOUT: !requires:
  2089. // CHECK:STDOUT: @N.Self.binding.as_type.impls.J.type.require {
  2090. // CHECK:STDOUT: require imports.%Main.import_ref.213 impls imports.%Main.import_ref.f2a55c.2
  2091. // CHECK:STDOUT: }
  2092. // CHECK:STDOUT: }
  2093. // CHECK:STDOUT: }
  2094. // CHECK:STDOUT:
  2095. // CHECK:STDOUT: generic require @N.Self.binding.as_type.impls.J.type.require(imports.%Main.import_ref.b3bc94.4: type, imports.%Main.import_ref.2fc: @N.%N.type (%N.type.d682d6.1)) [from "fail_import_generic_decl.carbon"] {
  2096. // CHECK:STDOUT: %T: type = symbolic_binding T, 0 [symbolic = %T (constants.%T)]
  2097. // CHECK:STDOUT: %N.type: type = facet_type <@N, @N(%T)> [symbolic = %N.type (constants.%N.type.d682d6.1)]
  2098. // CHECK:STDOUT: %Self: @N.Self.binding.as_type.impls.J.type.require.%N.type (%N.type.d682d6.1) = symbolic_binding Self, 1 [symbolic = %Self (constants.%Self.e1f)]
  2099. // CHECK:STDOUT: %Self.binding.as_type: type = symbolic_binding_type Self, 1, %Self [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)]
  2100. // CHECK:STDOUT: %J.type: type = facet_type <@J, @J(%T)> [symbolic = %J.type (constants.%J.type.04e)]
  2101. // CHECK:STDOUT: }
  2102. // CHECK:STDOUT:
  2103. // CHECK:STDOUT: generic impl @D.as.J.impl.b25a4e.1(imports.%Main.import_ref.b3bc94.2: type) [from "fail_import_generic_decl.carbon"] {
  2104. // CHECK:STDOUT: %T: type = symbolic_binding T, 0 [symbolic = %T (constants.%T)]
  2105. // CHECK:STDOUT: %J.type: type = facet_type <@J, @J(%T)> [symbolic = %J.type (constants.%J.type.04e)]
  2106. // CHECK:STDOUT: %J.impl_witness: <witness> = impl_witness imports.%J.impl_witness_table.50b, @D.as.J.impl.b25a4e.1(%T) [symbolic = %J.impl_witness (constants.%J.impl_witness.861)]
  2107. // CHECK:STDOUT:
  2108. // CHECK:STDOUT: impl: imports.%Main.import_ref.4ae308.1 as imports.%Main.import_ref.f2a55c.1;
  2109. // CHECK:STDOUT: }
  2110. // CHECK:STDOUT:
  2111. // CHECK:STDOUT: generic impl @D.as.J.impl.f050b9.1(imports.%Main.import_ref.b3bc94.3: type) [from "fail_import_generic_decl.carbon"] {
  2112. // CHECK:STDOUT: %T: type = symbolic_binding T, 0 [symbolic = %T (constants.%T)]
  2113. // CHECK:STDOUT: %ptr: type = ptr_type %T [symbolic = %ptr (constants.%ptr)]
  2114. // CHECK:STDOUT: %J.type: type = facet_type <@J, @J(%ptr)> [symbolic = %J.type (constants.%J.type.80f)]
  2115. // CHECK:STDOUT: %J.impl_witness: <witness> = impl_witness imports.%J.impl_witness_table.a37, @D.as.J.impl.f050b9.1(%T) [symbolic = %J.impl_witness (constants.%J.impl_witness.f4f)]
  2116. // CHECK:STDOUT:
  2117. // CHECK:STDOUT: impl: imports.%Main.import_ref.4ae308.2 as imports.%Main.import_ref.739;
  2118. // CHECK:STDOUT: }
  2119. // CHECK:STDOUT:
  2120. // CHECK:STDOUT: generic impl @D.as.J.impl.b25a4e.2(%T.loc8_14.1: type) {
  2121. // CHECK:STDOUT: %T.loc8_14.2: type = symbolic_binding T, 0 [symbolic = %T.loc8_14.2 (constants.%T)]
  2122. // CHECK:STDOUT: %J.type.loc8_32.2: type = facet_type <@J, @J(%T.loc8_14.2)> [symbolic = %J.type.loc8_32.2 (constants.%J.type.04e)]
  2123. // CHECK:STDOUT:
  2124. // CHECK:STDOUT: impl: %D.ref as %J.type.loc8_32.1;
  2125. // CHECK:STDOUT: }
  2126. // CHECK:STDOUT:
  2127. // CHECK:STDOUT: generic impl @D.as.J.impl.b25a4e.3(%T.loc14_14.1: type) {
  2128. // CHECK:STDOUT: %T.loc14_14.2: type = symbolic_binding T, 0 [symbolic = %T.loc14_14.2 (constants.%T)]
  2129. // CHECK:STDOUT: %J.type.loc14_32.2: type = facet_type <@J, @J(%T.loc14_14.2)> [symbolic = %J.type.loc14_32.2 (constants.%J.type.04e)]
  2130. // CHECK:STDOUT:
  2131. // CHECK:STDOUT: !definition:
  2132. // CHECK:STDOUT:
  2133. // CHECK:STDOUT: impl: %D.ref as %J.type.loc14_32.1 {
  2134. // CHECK:STDOUT: !members:
  2135. // CHECK:STDOUT: witness = <error>
  2136. // CHECK:STDOUT: }
  2137. // CHECK:STDOUT: }
  2138. // CHECK:STDOUT:
  2139. // CHECK:STDOUT: generic impl @D.as.J.impl.f050b9.2(%T.loc20_14.1: type) {
  2140. // CHECK:STDOUT: %T.loc20_14.2: type = symbolic_binding T, 0 [symbolic = %T.loc20_14.2 (constants.%T)]
  2141. // CHECK:STDOUT: %ptr.loc20_32.2: type = ptr_type %T.loc20_14.2 [symbolic = %ptr.loc20_32.2 (constants.%ptr)]
  2142. // CHECK:STDOUT: %J.type.loc20_33.2: type = facet_type <@J, @J(%ptr.loc20_32.2)> [symbolic = %J.type.loc20_33.2 (constants.%J.type.80f)]
  2143. // CHECK:STDOUT:
  2144. // CHECK:STDOUT: impl: %D.ref as %J.type.loc20_33.1;
  2145. // CHECK:STDOUT: }
  2146. // CHECK:STDOUT:
  2147. // CHECK:STDOUT: generic impl @D.as.J.impl.f050b9.3(%T.loc26_14.1: type) {
  2148. // CHECK:STDOUT: %T.loc26_14.2: type = symbolic_binding T, 0 [symbolic = %T.loc26_14.2 (constants.%T)]
  2149. // CHECK:STDOUT: %ptr.loc26_32.2: type = ptr_type %T.loc26_14.2 [symbolic = %ptr.loc26_32.2 (constants.%ptr)]
  2150. // CHECK:STDOUT: %J.type.loc26_33.2: type = facet_type <@J, @J(%ptr.loc26_32.2)> [symbolic = %J.type.loc26_33.2 (constants.%J.type.80f)]
  2151. // CHECK:STDOUT:
  2152. // CHECK:STDOUT: !definition:
  2153. // CHECK:STDOUT:
  2154. // CHECK:STDOUT: impl: %D.ref as %J.type.loc26_33.1 {
  2155. // CHECK:STDOUT: !members:
  2156. // CHECK:STDOUT: witness = <error>
  2157. // CHECK:STDOUT: }
  2158. // CHECK:STDOUT: }
  2159. // CHECK:STDOUT:
  2160. // CHECK:STDOUT: generic impl @D.as.J.impl.e28c26.1(%T.loc32_14.1: type) {
  2161. // CHECK:STDOUT: %T.loc32_14.2: type = symbolic_binding T, 0 [symbolic = %T.loc32_14.2 (constants.%T)]
  2162. // CHECK:STDOUT: %N.type.loc32_32.2: type = facet_type <@N, @N(%T.loc32_14.2)> [symbolic = %N.type.loc32_32.2 (constants.%N.type.d682d6.1)]
  2163. // CHECK:STDOUT:
  2164. // CHECK:STDOUT: !definition:
  2165. // CHECK:STDOUT:
  2166. // CHECK:STDOUT: impl: %D.ref as %N.type.loc32_32.1 {
  2167. // CHECK:STDOUT: !members:
  2168. // CHECK:STDOUT: witness = <error>
  2169. // CHECK:STDOUT: }
  2170. // CHECK:STDOUT: }
  2171. // CHECK:STDOUT:
  2172. // CHECK:STDOUT: generic impl @D.as.J.impl.e28c26.2(%T.loc38_14.1: type) {
  2173. // CHECK:STDOUT: %T.loc38_14.2: type = symbolic_binding T, 0 [symbolic = %T.loc38_14.2 (constants.%T)]
  2174. // CHECK:STDOUT: %ptr.loc38_32.2: type = ptr_type %T.loc38_14.2 [symbolic = %ptr.loc38_32.2 (constants.%ptr)]
  2175. // CHECK:STDOUT: %N.type.loc38_33.2: type = facet_type <@N, @N(%ptr.loc38_32.2)> [symbolic = %N.type.loc38_33.2 (constants.%N.type.d682d6.2)]
  2176. // CHECK:STDOUT:
  2177. // CHECK:STDOUT: !definition:
  2178. // CHECK:STDOUT:
  2179. // CHECK:STDOUT: impl: %D.ref as %N.type.loc38_33.1 {
  2180. // CHECK:STDOUT: !members:
  2181. // CHECK:STDOUT: witness = <error>
  2182. // CHECK:STDOUT: }
  2183. // CHECK:STDOUT: }
  2184. // CHECK:STDOUT:
  2185. // CHECK:STDOUT: class @D [from "fail_import_generic_decl.carbon"] {
  2186. // CHECK:STDOUT: complete_type_witness = imports.%Main.import_ref.8f2
  2187. // CHECK:STDOUT:
  2188. // CHECK:STDOUT: !members:
  2189. // CHECK:STDOUT: .Self = imports.%Main.import_ref.1d5
  2190. // CHECK:STDOUT: }
  2191. // CHECK:STDOUT:
  2192. // CHECK:STDOUT: specific @J(constants.%T) {
  2193. // CHECK:STDOUT: %T => constants.%T
  2194. // CHECK:STDOUT:
  2195. // CHECK:STDOUT: !definition:
  2196. // CHECK:STDOUT: %J.type => constants.%J.type.04e
  2197. // CHECK:STDOUT: %Self => constants.%Self.c25
  2198. // CHECK:STDOUT: }
  2199. // CHECK:STDOUT:
  2200. // CHECK:STDOUT: specific @D.as.J.impl.b25a4e.1(constants.%T) {
  2201. // CHECK:STDOUT: %T => constants.%T
  2202. // CHECK:STDOUT: %J.type => constants.%J.type.04e
  2203. // CHECK:STDOUT: %J.impl_witness => constants.%J.impl_witness.861
  2204. // CHECK:STDOUT: }
  2205. // CHECK:STDOUT:
  2206. // CHECK:STDOUT: specific @J(constants.%ptr) {
  2207. // CHECK:STDOUT: %T => constants.%ptr
  2208. // CHECK:STDOUT: }
  2209. // CHECK:STDOUT:
  2210. // CHECK:STDOUT: specific @D.as.J.impl.f050b9.1(constants.%T) {
  2211. // CHECK:STDOUT: %T => constants.%T
  2212. // CHECK:STDOUT: %ptr => constants.%ptr
  2213. // CHECK:STDOUT: %J.type => constants.%J.type.80f
  2214. // CHECK:STDOUT: %J.impl_witness => constants.%J.impl_witness.f4f
  2215. // CHECK:STDOUT: }
  2216. // CHECK:STDOUT:
  2217. // CHECK:STDOUT: specific @D.as.J.impl.b25a4e.2(constants.%T) {
  2218. // CHECK:STDOUT: %T.loc8_14.2 => constants.%T
  2219. // CHECK:STDOUT: %J.type.loc8_32.2 => constants.%J.type.04e
  2220. // CHECK:STDOUT: }
  2221. // CHECK:STDOUT:
  2222. // CHECK:STDOUT: specific @D.as.J.impl.b25a4e.3(constants.%T) {
  2223. // CHECK:STDOUT: %T.loc14_14.2 => constants.%T
  2224. // CHECK:STDOUT: %J.type.loc14_32.2 => constants.%J.type.04e
  2225. // CHECK:STDOUT: }
  2226. // CHECK:STDOUT:
  2227. // CHECK:STDOUT: specific @D.as.J.impl.f050b9.2(constants.%T) {
  2228. // CHECK:STDOUT: %T.loc20_14.2 => constants.%T
  2229. // CHECK:STDOUT: %ptr.loc20_32.2 => constants.%ptr
  2230. // CHECK:STDOUT: %J.type.loc20_33.2 => constants.%J.type.80f
  2231. // CHECK:STDOUT: }
  2232. // CHECK:STDOUT:
  2233. // CHECK:STDOUT: specific @D.as.J.impl.f050b9.3(constants.%T) {
  2234. // CHECK:STDOUT: %T.loc26_14.2 => constants.%T
  2235. // CHECK:STDOUT: %ptr.loc26_32.2 => constants.%ptr
  2236. // CHECK:STDOUT: %J.type.loc26_33.2 => constants.%J.type.80f
  2237. // CHECK:STDOUT: }
  2238. // CHECK:STDOUT:
  2239. // CHECK:STDOUT: specific @N(constants.%T) {
  2240. // CHECK:STDOUT: %T => constants.%T
  2241. // CHECK:STDOUT: }
  2242. // CHECK:STDOUT:
  2243. // CHECK:STDOUT: specific @N.Self.binding.as_type.impls.J.type.require(constants.%T, constants.%Self.e1f) {
  2244. // CHECK:STDOUT: %T => constants.%T
  2245. // CHECK:STDOUT: %N.type => constants.%N.type.d682d6.1
  2246. // CHECK:STDOUT: %Self => constants.%Self.e1f
  2247. // CHECK:STDOUT: %Self.binding.as_type => constants.%Self.binding.as_type
  2248. // CHECK:STDOUT: %J.type => constants.%J.type.04e
  2249. // CHECK:STDOUT: }
  2250. // CHECK:STDOUT:
  2251. // CHECK:STDOUT: specific @N.Self.binding.as_type.impls.J.type.require(constants.%T, constants.%D.type.facet) {
  2252. // CHECK:STDOUT: %T => constants.%T
  2253. // CHECK:STDOUT: %N.type => constants.%N.type.d682d6.1
  2254. // CHECK:STDOUT: %Self => constants.%D.type.facet
  2255. // CHECK:STDOUT: %Self.binding.as_type => constants.%D
  2256. // CHECK:STDOUT: %J.type => constants.%J.type.04e
  2257. // CHECK:STDOUT: }
  2258. // CHECK:STDOUT:
  2259. // CHECK:STDOUT: specific @D.as.J.impl.e28c26.1(constants.%T) {
  2260. // CHECK:STDOUT: %T.loc32_14.2 => constants.%T
  2261. // CHECK:STDOUT: %N.type.loc32_32.2 => constants.%N.type.d682d6.1
  2262. // CHECK:STDOUT: }
  2263. // CHECK:STDOUT:
  2264. // CHECK:STDOUT: specific @N(constants.%ptr) {
  2265. // CHECK:STDOUT: %T => constants.%ptr
  2266. // CHECK:STDOUT: }
  2267. // CHECK:STDOUT:
  2268. // CHECK:STDOUT: specific @N.Self.binding.as_type.impls.J.type.require(constants.%ptr, constants.%D.type.facet) {
  2269. // CHECK:STDOUT: %T => constants.%ptr
  2270. // CHECK:STDOUT: %N.type => constants.%N.type.d682d6.2
  2271. // CHECK:STDOUT: %Self => constants.%D.type.facet
  2272. // CHECK:STDOUT: %Self.binding.as_type => constants.%D
  2273. // CHECK:STDOUT: %J.type => constants.%J.type.80f
  2274. // CHECK:STDOUT: }
  2275. // CHECK:STDOUT:
  2276. // CHECK:STDOUT: specific @D.as.J.impl.e28c26.2(constants.%T) {
  2277. // CHECK:STDOUT: %T.loc38_14.2 => constants.%T
  2278. // CHECK:STDOUT: %ptr.loc38_32.2 => constants.%ptr
  2279. // CHECK:STDOUT: %N.type.loc38_33.2 => constants.%N.type.d682d6.2
  2280. // CHECK:STDOUT: }
  2281. // CHECK:STDOUT: