import_generic.carbon 139 KB

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