import_generic.carbon 134 KB

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