import_generic.carbon 136 KB

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