forward_decls.carbon 143 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499
  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/min_prelude/facet_types.carbon
  6. // EXTRA-ARGS: --custom-core
  7. //
  8. // AUTOUPDATE
  9. // TIP: To test this file alone, run:
  10. // TIP: bazel test //toolchain/testing:file_test --test_arg=--file_tests=toolchain/check/testdata/impl/min_prelude/forward_decls.carbon
  11. // TIP: To dump output, run:
  12. // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/check/testdata/impl/min_prelude/forward_decls.carbon
  13. // --- empty.carbon
  14. library "[[@TEST_NAME]]";
  15. interface I;
  16. impl {} as I;
  17. interface I {}
  18. impl {} as I {}
  19. // --- method.carbon
  20. library "[[@TEST_NAME]]";
  21. interface I;
  22. impl {} as I;
  23. interface I {
  24. fn G();
  25. }
  26. impl {} as I {
  27. fn G() {}
  28. }
  29. // --- combine.carbon
  30. library "[[@TEST_NAME]]";
  31. interface I;
  32. impl {} as I & I;
  33. interface I {}
  34. impl {} as I & I {}
  35. // --- associated_const.carbon
  36. library "[[@TEST_NAME]]";
  37. interface I {
  38. let T:! type;
  39. }
  40. impl {} as I where .T = ();
  41. impl {} as I where .T = () {}
  42. // --- associated_const_compound_member_access.carbon
  43. library "[[@TEST_NAME]]";
  44. interface I {
  45. let T:! type;
  46. }
  47. class C {}
  48. impl C as I where .T = ();
  49. let x: C.(I.T) = ();
  50. impl C as I where .T = () {}
  51. // --- associated_const_of_facet.carbon
  52. library "[[@TEST_NAME]]";
  53. interface I {
  54. let T:! type;
  55. }
  56. class C {}
  57. impl C as I where .T = ();
  58. let x: (C as I).T = ();
  59. impl C as I where .T = () {}
  60. // --- fail_unset_associated_const.carbon
  61. library "[[@TEST_NAME]]";
  62. interface I {
  63. let T:! type;
  64. }
  65. class C {}
  66. impl C as I;
  67. // CHECK:STDERR: fail_unset_associated_const.carbon:[[@LINE+4]]:8: error: accessing member from impl before it has a defined value [ImplAccessMemberBeforeSet]
  68. // CHECK:STDERR: let x: (C as I).T = ();
  69. // CHECK:STDERR: ^~~~~~~~~~
  70. // CHECK:STDERR:
  71. let x: (C as I).T = ();
  72. // CHECK:STDERR: fail_unset_associated_const.carbon:[[@LINE+7]]:1: error: associated constant T not given a value in impl of interface I [ImplAssociatedConstantNeedsValue]
  73. // CHECK:STDERR: impl C as I {}
  74. // CHECK:STDERR: ^~~~~~~~~~~~~
  75. // CHECK:STDERR: fail_unset_associated_const.carbon:[[@LINE-14]]:7: note: associated constant declared here [AssociatedConstantHere]
  76. // CHECK:STDERR: let T:! type;
  77. // CHECK:STDERR: ^~~~~~~~
  78. // CHECK:STDERR:
  79. impl C as I {}
  80. // --- fail_associated_const_before_interface_definition.carbon
  81. library "[[@TEST_NAME]]";
  82. interface I;
  83. class C;
  84. class D {}
  85. // CHECK:STDERR: fail_associated_const_before_interface_definition.carbon:[[@LINE+7]]:19: error: member access into object of incomplete type `I` [IncompleteTypeInMemberAccess]
  86. // CHECK:STDERR: impl D as I where .T = C;
  87. // CHECK:STDERR: ^~
  88. // CHECK:STDERR: fail_associated_const_before_interface_definition.carbon:[[@LINE-6]]:1: note: interface was forward declared here [InterfaceForwardDeclaredHere]
  89. // CHECK:STDERR: interface I;
  90. // CHECK:STDERR: ^~~~~~~~~~~~
  91. // CHECK:STDERR:
  92. impl D as I where .T = C;
  93. interface I {}
  94. class C {}
  95. // CHECK:STDERR: fail_associated_const_before_interface_definition.carbon:[[@LINE+4]]:19: error: member name `T` not found in `I` [MemberNameNotFoundInInstScope]
  96. // CHECK:STDERR: impl D as I where .T = C {}
  97. // CHECK:STDERR: ^~
  98. // CHECK:STDERR:
  99. impl D as I where .T = C {}
  100. // --- associated_const_of_parameterized.carbon
  101. library "[[@TEST_NAME]]";
  102. interface I(U:! type) {
  103. let T:! type;
  104. }
  105. class C;
  106. class D {}
  107. impl D as I(C) where .T = C;
  108. class C {}
  109. impl D as I(C) where .T = C {}
  110. // --- find_incomplete_impl.carbon
  111. library "[[@TEST_NAME]]";
  112. interface I;
  113. class D {}
  114. impl D as I;
  115. class C(T:! I);
  116. fn F(x: C(D));
  117. interface I {}
  118. impl D as I {}
  119. class C(T:! I) {}
  120. fn F(x: C(D)) {}
  121. // --- fail_todo_two_interfaces.carbon
  122. library "[[@TEST_NAME]]";
  123. interface I;
  124. interface J;
  125. // CHECK:STDERR: fail_todo_two_interfaces.carbon:[[@LINE+4]]:1: error: impl as 2 interfaces, expected 1 [ImplOfNotOneInterface]
  126. // CHECK:STDERR: impl {} as I & J;
  127. // CHECK:STDERR: ^~~~~~~~~~~~~~~~~
  128. // CHECK:STDERR:
  129. impl {} as I & J;
  130. interface I {}
  131. interface J {}
  132. // --- fail_never_assigned_associated_const.carbon
  133. library "[[@TEST_NAME]]";
  134. interface I {
  135. let T:! type;
  136. let U:! type;
  137. }
  138. class C {}
  139. impl C as I where .T = ();
  140. // CHECK:STDERR: fail_never_assigned_associated_const.carbon:[[@LINE+7]]:1: error: associated constant U not given a value in impl of interface I [ImplAssociatedConstantNeedsValue]
  141. // CHECK:STDERR: impl C as I where .T = () {}
  142. // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~
  143. // CHECK:STDERR: fail_never_assigned_associated_const.carbon:[[@LINE-9]]:7: note: associated constant declared here [AssociatedConstantHere]
  144. // CHECK:STDERR: let U:! type;
  145. // CHECK:STDERR: ^~~~~~~~
  146. // CHECK:STDERR:
  147. impl C as I where .T = () {}
  148. // --- example_from_proposal_5168.carbon
  149. library "[[@TEST_NAME]]";
  150. interface X;
  151. // Allowed to use incomplete interfaces in function declarations.
  152. fn F(U:! X);
  153. fn G[U:! X](u: U);
  154. class C;
  155. // Allowed to use incomplete types and interfaces in impl declarations.
  156. impl C as X;
  157. interface Y;
  158. interface X {
  159. // TODO: Should be allowed to use an incomplete interface here,
  160. // but `require Self impls` is not supported yet.
  161. // require Self impls Y;
  162. }
  163. // Classes must be defined before being used in a function definition.
  164. class C {}
  165. fn H(c: C) {
  166. // Allowed since C is complete and we have a declaration `impl C as X;`
  167. F(C);
  168. G(c);
  169. }
  170. // The above declarations require that `interface Y`, `fn F` (since it is
  171. // generic), and `impl C as X` are defined in the same file.
  172. interface Y {}
  173. fn F(U:! X) {}
  174. fn G[U:! X](u: U) {}
  175. impl C as Y;
  176. impl C as X {}
  177. impl C as Y {}
  178. // --- fail_todo_impl_in_interface_definition.carbon
  179. library "[[@TEST_NAME]]";
  180. // This test uses many unsupported features, and is expected to change.
  181. interface I {
  182. // CHECK:STDERR: fail_todo_impl_in_interface_definition.carbon:[[@LINE+4]]:3: error: semantics TODO: `interface modifier` [SemanticsTodo]
  183. // CHECK:STDERR: default fn F() {
  184. // CHECK:STDERR: ^~~~~~~
  185. // CHECK:STDERR:
  186. default fn F() {
  187. class C {}
  188. impl C as I;
  189. // CHECK:STDERR: fail_todo_impl_in_interface_definition.carbon:[[@LINE+7]]:5: error: missing implementation of F in impl of interface I [ImplMissingFunction]
  190. // CHECK:STDERR: impl C as I {}
  191. // CHECK:STDERR: ^~~~~~~~~~~~~
  192. // CHECK:STDERR: fail_todo_impl_in_interface_definition.carbon:[[@LINE-7]]:3: note: associated function F declared here [AssociatedFunctionHere]
  193. // CHECK:STDERR: default fn F() {
  194. // CHECK:STDERR: ^~~~~~~~~~~~~~~~
  195. // CHECK:STDERR:
  196. impl C as I {}
  197. }
  198. }
  199. // --- fail_todo_impl_in_interface_definition_with_associated.carbon
  200. library "[[@TEST_NAME]]";
  201. // This test uses many unsupported features, and is expected to change.
  202. interface I {
  203. let U:! type;
  204. // CHECK:STDERR: fail_todo_impl_in_interface_definition_with_associated.carbon:[[@LINE+4]]:3: error: semantics TODO: `interface modifier` [SemanticsTodo]
  205. // CHECK:STDERR: default fn F() {
  206. // CHECK:STDERR: ^~~~~~~
  207. // CHECK:STDERR:
  208. default fn F() {
  209. class C {}
  210. impl C as I where .U = C;
  211. // CHECK:STDERR: fail_todo_impl_in_interface_definition_with_associated.carbon:[[@LINE+7]]:5: error: missing implementation of F in impl of interface I [ImplMissingFunction]
  212. // CHECK:STDERR: impl C as I where .U = C {}
  213. // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~
  214. // CHECK:STDERR: fail_todo_impl_in_interface_definition_with_associated.carbon:[[@LINE-7]]:3: note: associated function F declared here [AssociatedFunctionHere]
  215. // CHECK:STDERR: default fn F() {
  216. // CHECK:STDERR: ^~~~~~~~~~~~~~~~
  217. // CHECK:STDERR:
  218. impl C as I where .U = C {}
  219. }
  220. }
  221. // CHECK:STDOUT: --- empty.carbon
  222. // CHECK:STDOUT:
  223. // CHECK:STDOUT: constants {
  224. // CHECK:STDOUT: %I.type: type = facet_type <@I> [concrete]
  225. // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete]
  226. // CHECK:STDOUT: %I.impl_witness: <witness> = impl_witness file.%I.impl_witness_table [concrete]
  227. // CHECK:STDOUT: %Self: %I.type = bind_symbolic_name Self, 0 [symbolic]
  228. // CHECK:STDOUT: }
  229. // CHECK:STDOUT:
  230. // CHECK:STDOUT: imports {
  231. // CHECK:STDOUT: %Core: <namespace> = namespace file.%Core.import, [concrete] {
  232. // CHECK:STDOUT: import Core//prelude
  233. // CHECK:STDOUT: }
  234. // CHECK:STDOUT: }
  235. // CHECK:STDOUT:
  236. // CHECK:STDOUT: file {
  237. // CHECK:STDOUT: package: <namespace> = namespace [concrete] {
  238. // CHECK:STDOUT: .Core = imports.%Core
  239. // CHECK:STDOUT: .I = %I.decl.loc3
  240. // CHECK:STDOUT: }
  241. // CHECK:STDOUT: %Core.import = import Core
  242. // CHECK:STDOUT: %I.decl.loc3: type = interface_decl @I [concrete = constants.%I.type] {} {}
  243. // CHECK:STDOUT: impl_decl @impl [concrete] {} {
  244. // CHECK:STDOUT: %.loc4_7.1: %empty_struct_type = struct_literal ()
  245. // CHECK:STDOUT: %.loc4_7.2: type = converted %.loc4_7.1, constants.%empty_struct_type [concrete = constants.%empty_struct_type]
  246. // CHECK:STDOUT: %I.ref.loc4: type = name_ref I, file.%I.decl.loc3 [concrete = constants.%I.type]
  247. // CHECK:STDOUT: }
  248. // CHECK:STDOUT: %I.impl_witness_table = impl_witness_table (), @impl [concrete]
  249. // CHECK:STDOUT: %I.impl_witness: <witness> = impl_witness %I.impl_witness_table [concrete = constants.%I.impl_witness]
  250. // CHECK:STDOUT: %I.decl.loc6: type = interface_decl @I [concrete = constants.%I.type] {} {}
  251. // CHECK:STDOUT: impl_decl @impl [concrete] {} {
  252. // CHECK:STDOUT: %.loc7_7.1: %empty_struct_type = struct_literal ()
  253. // CHECK:STDOUT: %.loc7_7.2: type = converted %.loc7_7.1, constants.%empty_struct_type [concrete = constants.%empty_struct_type]
  254. // CHECK:STDOUT: %I.ref.loc7: type = name_ref I, file.%I.decl.loc3 [concrete = constants.%I.type]
  255. // CHECK:STDOUT: }
  256. // CHECK:STDOUT: }
  257. // CHECK:STDOUT:
  258. // CHECK:STDOUT: interface @I {
  259. // CHECK:STDOUT: %Self: %I.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self]
  260. // CHECK:STDOUT:
  261. // CHECK:STDOUT: !members:
  262. // CHECK:STDOUT: .Self = %Self
  263. // CHECK:STDOUT: witness = ()
  264. // CHECK:STDOUT: }
  265. // CHECK:STDOUT:
  266. // CHECK:STDOUT: impl @impl: %.loc4_7.2 as %I.ref.loc4 {
  267. // CHECK:STDOUT: !members:
  268. // CHECK:STDOUT: witness = file.%I.impl_witness
  269. // CHECK:STDOUT: }
  270. // CHECK:STDOUT:
  271. // CHECK:STDOUT: --- method.carbon
  272. // CHECK:STDOUT:
  273. // CHECK:STDOUT: constants {
  274. // CHECK:STDOUT: %I.type: type = facet_type <@I> [concrete]
  275. // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete]
  276. // CHECK:STDOUT: %I.impl_witness: <witness> = impl_witness file.%I.impl_witness_table [concrete]
  277. // CHECK:STDOUT: %Self: %I.type = bind_symbolic_name Self, 0 [symbolic]
  278. // CHECK:STDOUT: %G.type.ccd: type = fn_type @G.1 [concrete]
  279. // CHECK:STDOUT: %G.600: %G.type.ccd = struct_value () [concrete]
  280. // CHECK:STDOUT: %I.assoc_type: type = assoc_entity_type @I [concrete]
  281. // CHECK:STDOUT: %assoc0: %I.assoc_type = assoc_entity element0, @I.%G.decl [concrete]
  282. // CHECK:STDOUT: %G.type.d6f: type = fn_type @G.2 [concrete]
  283. // CHECK:STDOUT: %G.d07: %G.type.d6f = struct_value () [concrete]
  284. // CHECK:STDOUT: %I.facet: %I.type = facet_value %empty_struct_type, (%I.impl_witness) [concrete]
  285. // CHECK:STDOUT: }
  286. // CHECK:STDOUT:
  287. // CHECK:STDOUT: imports {
  288. // CHECK:STDOUT: %Core: <namespace> = namespace file.%Core.import, [concrete] {
  289. // CHECK:STDOUT: import Core//prelude
  290. // CHECK:STDOUT: }
  291. // CHECK:STDOUT: }
  292. // CHECK:STDOUT:
  293. // CHECK:STDOUT: file {
  294. // CHECK:STDOUT: package: <namespace> = namespace [concrete] {
  295. // CHECK:STDOUT: .Core = imports.%Core
  296. // CHECK:STDOUT: .I = %I.decl.loc3
  297. // CHECK:STDOUT: }
  298. // CHECK:STDOUT: %Core.import = import Core
  299. // CHECK:STDOUT: %I.decl.loc3: type = interface_decl @I [concrete = constants.%I.type] {} {}
  300. // CHECK:STDOUT: impl_decl @impl [concrete] {} {
  301. // CHECK:STDOUT: %.loc4_7.1: %empty_struct_type = struct_literal ()
  302. // CHECK:STDOUT: %.loc4_7.2: type = converted %.loc4_7.1, constants.%empty_struct_type [concrete = constants.%empty_struct_type]
  303. // CHECK:STDOUT: %I.ref.loc4: type = name_ref I, file.%I.decl.loc3 [concrete = constants.%I.type]
  304. // CHECK:STDOUT: }
  305. // CHECK:STDOUT: %I.impl_witness_table = impl_witness_table (@impl.%G.decl), @impl [concrete]
  306. // CHECK:STDOUT: %I.impl_witness: <witness> = impl_witness %I.impl_witness_table [concrete = constants.%I.impl_witness]
  307. // CHECK:STDOUT: %I.decl.loc6: type = interface_decl @I [concrete = constants.%I.type] {} {}
  308. // CHECK:STDOUT: impl_decl @impl [concrete] {} {
  309. // CHECK:STDOUT: %.loc9_7.1: %empty_struct_type = struct_literal ()
  310. // CHECK:STDOUT: %.loc9_7.2: type = converted %.loc9_7.1, constants.%empty_struct_type [concrete = constants.%empty_struct_type]
  311. // CHECK:STDOUT: %I.ref.loc9: type = name_ref I, file.%I.decl.loc3 [concrete = constants.%I.type]
  312. // CHECK:STDOUT: }
  313. // CHECK:STDOUT: }
  314. // CHECK:STDOUT:
  315. // CHECK:STDOUT: interface @I {
  316. // CHECK:STDOUT: %Self: %I.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self]
  317. // CHECK:STDOUT: %G.decl: %G.type.ccd = fn_decl @G.1 [concrete = constants.%G.600] {} {}
  318. // CHECK:STDOUT: %assoc0: %I.assoc_type = assoc_entity element0, %G.decl [concrete = constants.%assoc0]
  319. // CHECK:STDOUT:
  320. // CHECK:STDOUT: !members:
  321. // CHECK:STDOUT: .Self = %Self
  322. // CHECK:STDOUT: .G = %assoc0
  323. // CHECK:STDOUT: witness = (%G.decl)
  324. // CHECK:STDOUT: }
  325. // CHECK:STDOUT:
  326. // CHECK:STDOUT: impl @impl: %.loc4_7.2 as %I.ref.loc4 {
  327. // CHECK:STDOUT: %G.decl: %G.type.d6f = fn_decl @G.2 [concrete = constants.%G.d07] {} {}
  328. // CHECK:STDOUT:
  329. // CHECK:STDOUT: !members:
  330. // CHECK:STDOUT: .G = %G.decl
  331. // CHECK:STDOUT: witness = file.%I.impl_witness
  332. // CHECK:STDOUT: }
  333. // CHECK:STDOUT:
  334. // CHECK:STDOUT: generic fn @G.1(@I.%Self: %I.type) {
  335. // CHECK:STDOUT: fn();
  336. // CHECK:STDOUT: }
  337. // CHECK:STDOUT:
  338. // CHECK:STDOUT: fn @G.2() {
  339. // CHECK:STDOUT: !entry:
  340. // CHECK:STDOUT: return
  341. // CHECK:STDOUT: }
  342. // CHECK:STDOUT:
  343. // CHECK:STDOUT: specific @G.1(constants.%Self) {}
  344. // CHECK:STDOUT:
  345. // CHECK:STDOUT: specific @G.1(constants.%I.facet) {}
  346. // CHECK:STDOUT:
  347. // CHECK:STDOUT: --- combine.carbon
  348. // CHECK:STDOUT:
  349. // CHECK:STDOUT: constants {
  350. // CHECK:STDOUT: %I.type: type = facet_type <@I> [concrete]
  351. // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete]
  352. // CHECK:STDOUT: %BitAnd.type: type = facet_type <@BitAnd> [concrete]
  353. // CHECK:STDOUT: %Self.25f: %BitAnd.type = bind_symbolic_name Self, 0 [symbolic]
  354. // CHECK:STDOUT: %BitAnd.assoc_type: type = assoc_entity_type @BitAnd [concrete]
  355. // CHECK:STDOUT: %assoc0: %BitAnd.assoc_type = assoc_entity element0, imports.%Core.import_ref.a93 [concrete]
  356. // CHECK:STDOUT: %Op.type.27a: type = fn_type @Op.1 [concrete]
  357. // CHECK:STDOUT: %Self.as_type: type = facet_access_type %Self.25f [symbolic]
  358. // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic]
  359. // CHECK:STDOUT: %T.patt: type = symbolic_binding_pattern T, 0 [symbolic]
  360. // CHECK:STDOUT: %BitAnd.impl_witness_table = impl_witness_table (imports.%Core.import_ref.1e6), @impl.f92 [concrete]
  361. // CHECK:STDOUT: %BitAnd.impl_witness.b7b: <witness> = impl_witness %BitAnd.impl_witness_table, @impl.f92(%T) [symbolic]
  362. // CHECK:STDOUT: %Op.type.f99: type = fn_type @Op.2, @impl.f92(%T) [symbolic]
  363. // CHECK:STDOUT: %Op.05a: %Op.type.f99 = struct_value () [symbolic]
  364. // CHECK:STDOUT: %require_complete: <witness> = require_complete_type %T [symbolic]
  365. // CHECK:STDOUT: %BitAnd.impl_witness.0e5: <witness> = impl_witness %BitAnd.impl_witness_table, @impl.f92(type) [concrete]
  366. // CHECK:STDOUT: %Op.type.eb8: type = fn_type @Op.2, @impl.f92(type) [concrete]
  367. // CHECK:STDOUT: %Op.444: %Op.type.eb8 = struct_value () [concrete]
  368. // CHECK:STDOUT: %complete_type: <witness> = complete_type_witness type [concrete]
  369. // CHECK:STDOUT: %BitAnd.facet: %BitAnd.type = facet_value type, (%BitAnd.impl_witness.0e5) [concrete]
  370. // CHECK:STDOUT: %.518: type = fn_type_with_self_type %Op.type.27a, %BitAnd.facet [concrete]
  371. // CHECK:STDOUT: %Op.bound: <bound method> = bound_method %I.type, %Op.444 [concrete]
  372. // CHECK:STDOUT: %Op.specific_fn: <specific function> = specific_function %Op.444, @Op.2(type) [concrete]
  373. // CHECK:STDOUT: %bound_method: <bound method> = bound_method %I.type, %Op.specific_fn [concrete]
  374. // CHECK:STDOUT: %I.impl_witness: <witness> = impl_witness file.%I.impl_witness_table [concrete]
  375. // CHECK:STDOUT: %Self.826: %I.type = bind_symbolic_name Self, 0 [symbolic]
  376. // CHECK:STDOUT: }
  377. // CHECK:STDOUT:
  378. // CHECK:STDOUT: imports {
  379. // CHECK:STDOUT: %Core: <namespace> = namespace file.%Core.import, [concrete] {
  380. // CHECK:STDOUT: .BitAnd = %Core.BitAnd
  381. // CHECK:STDOUT: import Core//prelude
  382. // CHECK:STDOUT: }
  383. // CHECK:STDOUT: %Core.import_ref.ad0 = import_ref Core//prelude, inst102 [no loc], unloaded
  384. // CHECK:STDOUT: %Core.import_ref.a46: %BitAnd.assoc_type = import_ref Core//prelude, loc18_41, loaded [concrete = constants.%assoc0]
  385. // CHECK:STDOUT: %Core.Op = import_ref Core//prelude, Op, unloaded
  386. // CHECK:STDOUT: %Core.import_ref.040: %BitAnd.type = import_ref Core//prelude, inst102 [no loc], loaded [symbolic = constants.%Self.25f]
  387. // CHECK:STDOUT: %Core.import_ref.140: <witness> = import_ref Core//prelude, loc21_36, loaded [symbolic = @impl.f92.%BitAnd.impl_witness (constants.%BitAnd.impl_witness.b7b)]
  388. // CHECK:STDOUT: %Core.import_ref.5ab3ec.1: type = import_ref Core//prelude, loc21_14, loaded [symbolic = @impl.f92.%T (constants.%T)]
  389. // CHECK:STDOUT: %Core.import_ref.583: type = import_ref Core//prelude, loc21_24, loaded [symbolic = @impl.f92.%T (constants.%T)]
  390. // CHECK:STDOUT: %Core.import_ref.9c1: type = import_ref Core//prelude, loc21_29, loaded [concrete = constants.%BitAnd.type]
  391. // CHECK:STDOUT: %Core.import_ref.5ab3ec.2: type = import_ref Core//prelude, loc21_14, loaded [symbolic = @impl.f92.%T (constants.%T)]
  392. // CHECK:STDOUT: }
  393. // CHECK:STDOUT:
  394. // CHECK:STDOUT: file {
  395. // CHECK:STDOUT: package: <namespace> = namespace [concrete] {
  396. // CHECK:STDOUT: .Core = imports.%Core
  397. // CHECK:STDOUT: .I = %I.decl.loc3
  398. // CHECK:STDOUT: }
  399. // CHECK:STDOUT: %Core.import = import Core
  400. // CHECK:STDOUT: %I.decl.loc3: type = interface_decl @I [concrete = constants.%I.type] {} {}
  401. // CHECK:STDOUT: %.loc4_14.1: type = value_of_initializer @impl.8dc.%type.and.loc4 [concrete = constants.%I.type]
  402. // CHECK:STDOUT: %.loc4_14.2: type = converted @impl.8dc.%type.and.loc4, %.loc4_14.1 [concrete = constants.%I.type]
  403. // CHECK:STDOUT: impl_decl @impl.8dc [concrete] {} {
  404. // CHECK:STDOUT: %.loc4_7.1: %empty_struct_type = struct_literal ()
  405. // CHECK:STDOUT: %.loc4_7.2: type = converted %.loc4_7.1, constants.%empty_struct_type [concrete = constants.%empty_struct_type]
  406. // CHECK:STDOUT: %I.ref.loc4_12: type = name_ref I, file.%I.decl.loc3 [concrete = constants.%I.type]
  407. // CHECK:STDOUT: %I.ref.loc4_16: type = name_ref I, file.%I.decl.loc3 [concrete = constants.%I.type]
  408. // CHECK:STDOUT: %impl.elem0.loc4: %.518 = impl_witness_access constants.%BitAnd.impl_witness.0e5, element0 [concrete = constants.%Op.444]
  409. // CHECK:STDOUT: %bound_method.loc4_14.1: <bound method> = bound_method %I.ref.loc4_12, %impl.elem0.loc4 [concrete = constants.%Op.bound]
  410. // CHECK:STDOUT: %specific_fn.loc4: <specific function> = specific_function %impl.elem0.loc4, @Op.2(type) [concrete = constants.%Op.specific_fn]
  411. // CHECK:STDOUT: %bound_method.loc4_14.2: <bound method> = bound_method %I.ref.loc4_12, %specific_fn.loc4 [concrete = constants.%bound_method]
  412. // CHECK:STDOUT: %type.and.loc4: init type = call %bound_method.loc4_14.2(%I.ref.loc4_12, %I.ref.loc4_16) [concrete = constants.%I.type]
  413. // CHECK:STDOUT: }
  414. // CHECK:STDOUT: %I.impl_witness_table = impl_witness_table (), @impl.8dc [concrete]
  415. // CHECK:STDOUT: %I.impl_witness: <witness> = impl_witness %I.impl_witness_table [concrete = constants.%I.impl_witness]
  416. // CHECK:STDOUT: %I.decl.loc6: type = interface_decl @I [concrete = constants.%I.type] {} {}
  417. // CHECK:STDOUT: %.loc7_14.1: type = value_of_initializer @impl.8dc.%type.and.loc7 [concrete = constants.%I.type]
  418. // CHECK:STDOUT: %.loc7_14.2: type = converted @impl.8dc.%type.and.loc7, %.loc7_14.1 [concrete = constants.%I.type]
  419. // CHECK:STDOUT: impl_decl @impl.8dc [concrete] {} {
  420. // CHECK:STDOUT: %.loc7_7.1: %empty_struct_type = struct_literal ()
  421. // CHECK:STDOUT: %.loc7_7.2: type = converted %.loc7_7.1, constants.%empty_struct_type [concrete = constants.%empty_struct_type]
  422. // CHECK:STDOUT: %I.ref.loc7_12: type = name_ref I, file.%I.decl.loc3 [concrete = constants.%I.type]
  423. // CHECK:STDOUT: %I.ref.loc7_16: type = name_ref I, file.%I.decl.loc3 [concrete = constants.%I.type]
  424. // CHECK:STDOUT: %impl.elem0.loc7: %.518 = impl_witness_access constants.%BitAnd.impl_witness.0e5, element0 [concrete = constants.%Op.444]
  425. // CHECK:STDOUT: %bound_method.loc7_14.1: <bound method> = bound_method %I.ref.loc7_12, %impl.elem0.loc7 [concrete = constants.%Op.bound]
  426. // CHECK:STDOUT: %specific_fn.loc7: <specific function> = specific_function %impl.elem0.loc7, @Op.2(type) [concrete = constants.%Op.specific_fn]
  427. // CHECK:STDOUT: %bound_method.loc7_14.2: <bound method> = bound_method %I.ref.loc7_12, %specific_fn.loc7 [concrete = constants.%bound_method]
  428. // CHECK:STDOUT: %type.and.loc7: init type = call %bound_method.loc7_14.2(%I.ref.loc7_12, %I.ref.loc7_16) [concrete = constants.%I.type]
  429. // CHECK:STDOUT: }
  430. // CHECK:STDOUT: }
  431. // CHECK:STDOUT:
  432. // CHECK:STDOUT: interface @I {
  433. // CHECK:STDOUT: %Self: %I.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self.826]
  434. // CHECK:STDOUT:
  435. // CHECK:STDOUT: !members:
  436. // CHECK:STDOUT: .Self = %Self
  437. // CHECK:STDOUT: witness = ()
  438. // CHECK:STDOUT: }
  439. // CHECK:STDOUT:
  440. // CHECK:STDOUT: interface @BitAnd [from "include_files/facet_types.carbon"] {
  441. // CHECK:STDOUT: !members:
  442. // CHECK:STDOUT: .Self = imports.%Core.import_ref.ad0
  443. // CHECK:STDOUT: .Op = imports.%Core.import_ref.a46
  444. // CHECK:STDOUT: witness = (imports.%Core.Op)
  445. // CHECK:STDOUT: }
  446. // CHECK:STDOUT:
  447. // CHECK:STDOUT: generic impl @impl.f92(imports.%Core.import_ref.5ab3ec.1: type) [from "include_files/facet_types.carbon"] {
  448. // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic = %T (constants.%T)]
  449. // CHECK:STDOUT: %T.patt: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt (constants.%T.patt)]
  450. // CHECK:STDOUT: %BitAnd.impl_witness: <witness> = impl_witness constants.%BitAnd.impl_witness_table, @impl.f92(%T) [symbolic = %BitAnd.impl_witness (constants.%BitAnd.impl_witness.b7b)]
  451. // CHECK:STDOUT:
  452. // CHECK:STDOUT: !definition:
  453. // CHECK:STDOUT: %Op.type: type = fn_type @Op.2, @impl.f92(%T) [symbolic = %Op.type (constants.%Op.type.f99)]
  454. // CHECK:STDOUT: %Op: @impl.f92.%Op.type (%Op.type.f99) = struct_value () [symbolic = %Op (constants.%Op.05a)]
  455. // CHECK:STDOUT: %require_complete: <witness> = require_complete_type %T [symbolic = %require_complete (constants.%require_complete)]
  456. // CHECK:STDOUT:
  457. // CHECK:STDOUT: impl: imports.%Core.import_ref.583 as imports.%Core.import_ref.9c1 {
  458. // CHECK:STDOUT: !members:
  459. // CHECK:STDOUT: witness = imports.%Core.import_ref.140
  460. // CHECK:STDOUT: }
  461. // CHECK:STDOUT: }
  462. // CHECK:STDOUT:
  463. // CHECK:STDOUT: impl @impl.8dc: %.loc4_7.2 as file.%.loc4_14.2 {
  464. // CHECK:STDOUT: !members:
  465. // CHECK:STDOUT: witness = file.%I.impl_witness
  466. // CHECK:STDOUT: }
  467. // CHECK:STDOUT:
  468. // CHECK:STDOUT: generic fn @Op.1(imports.%Core.import_ref.040: %BitAnd.type) [from "include_files/facet_types.carbon"] {
  469. // CHECK:STDOUT: %Self: %BitAnd.type = bind_symbolic_name Self, 0 [symbolic = %Self (constants.%Self.25f)]
  470. // CHECK:STDOUT: %Self.as_type: type = facet_access_type %Self [symbolic = %Self.as_type (constants.%Self.as_type)]
  471. // CHECK:STDOUT:
  472. // CHECK:STDOUT: fn;
  473. // CHECK:STDOUT: }
  474. // CHECK:STDOUT:
  475. // CHECK:STDOUT: generic fn @Op.2(imports.%Core.import_ref.5ab3ec.2: type) [from "include_files/facet_types.carbon"] {
  476. // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic = %T (constants.%T)]
  477. // CHECK:STDOUT:
  478. // CHECK:STDOUT: !definition:
  479. // CHECK:STDOUT:
  480. // CHECK:STDOUT: fn = "type.and";
  481. // CHECK:STDOUT: }
  482. // CHECK:STDOUT:
  483. // CHECK:STDOUT: specific @Op.1(constants.%Self.25f) {
  484. // CHECK:STDOUT: %Self => constants.%Self.25f
  485. // CHECK:STDOUT: %Self.as_type => constants.%Self.as_type
  486. // CHECK:STDOUT: }
  487. // CHECK:STDOUT:
  488. // CHECK:STDOUT: specific @impl.f92(constants.%T) {
  489. // CHECK:STDOUT: %T => constants.%T
  490. // CHECK:STDOUT: %T.patt => constants.%T.patt
  491. // CHECK:STDOUT: %BitAnd.impl_witness => constants.%BitAnd.impl_witness.b7b
  492. // CHECK:STDOUT: }
  493. // CHECK:STDOUT:
  494. // CHECK:STDOUT: specific @impl.f92(%T) {}
  495. // CHECK:STDOUT:
  496. // CHECK:STDOUT: specific @Op.2(constants.%T) {
  497. // CHECK:STDOUT: %T => constants.%T
  498. // CHECK:STDOUT: }
  499. // CHECK:STDOUT:
  500. // CHECK:STDOUT: specific @impl.f92(type) {
  501. // CHECK:STDOUT: %T => type
  502. // CHECK:STDOUT: %T.patt => constants.%T.patt
  503. // CHECK:STDOUT: %BitAnd.impl_witness => constants.%BitAnd.impl_witness.0e5
  504. // CHECK:STDOUT:
  505. // CHECK:STDOUT: !definition:
  506. // CHECK:STDOUT: %Op.type => constants.%Op.type.eb8
  507. // CHECK:STDOUT: %Op => constants.%Op.444
  508. // CHECK:STDOUT: %require_complete => constants.%complete_type
  509. // CHECK:STDOUT: }
  510. // CHECK:STDOUT:
  511. // CHECK:STDOUT: specific @Op.2(type) {
  512. // CHECK:STDOUT: %T => type
  513. // CHECK:STDOUT:
  514. // CHECK:STDOUT: !definition:
  515. // CHECK:STDOUT: }
  516. // CHECK:STDOUT:
  517. // CHECK:STDOUT: --- associated_const.carbon
  518. // CHECK:STDOUT:
  519. // CHECK:STDOUT: constants {
  520. // CHECK:STDOUT: %I.type: type = facet_type <@I> [concrete]
  521. // CHECK:STDOUT: %Self: %I.type = bind_symbolic_name Self, 0 [symbolic]
  522. // CHECK:STDOUT: %I.assoc_type: type = assoc_entity_type @I [concrete]
  523. // CHECK:STDOUT: %assoc0: %I.assoc_type = assoc_entity element0, @I.%T [concrete]
  524. // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete]
  525. // CHECK:STDOUT: %.Self: %I.type = bind_symbolic_name .Self [symbolic_self]
  526. // CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self [symbolic_self]
  527. // CHECK:STDOUT: %I.lookup_impl_witness: <witness> = lookup_impl_witness %.Self, @I [symbolic_self]
  528. // CHECK:STDOUT: %I.facet: %I.type = facet_value %.Self.as_type, (%I.lookup_impl_witness) [symbolic_self]
  529. // CHECK:STDOUT: %impl.elem0: type = impl_witness_access %I.lookup_impl_witness, element0 [symbolic_self]
  530. // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete]
  531. // CHECK:STDOUT: %I_where.type: type = facet_type <@I where %impl.elem0 = %empty_tuple.type> [concrete]
  532. // CHECK:STDOUT: %I.impl_witness: <witness> = impl_witness file.%I.impl_witness_table [concrete]
  533. // CHECK:STDOUT: }
  534. // CHECK:STDOUT:
  535. // CHECK:STDOUT: imports {
  536. // CHECK:STDOUT: %Core: <namespace> = namespace file.%Core.import, [concrete] {
  537. // CHECK:STDOUT: import Core//prelude
  538. // CHECK:STDOUT: }
  539. // CHECK:STDOUT: }
  540. // CHECK:STDOUT:
  541. // CHECK:STDOUT: file {
  542. // CHECK:STDOUT: package: <namespace> = namespace [concrete] {
  543. // CHECK:STDOUT: .Core = imports.%Core
  544. // CHECK:STDOUT: .I = %I.decl
  545. // CHECK:STDOUT: }
  546. // CHECK:STDOUT: %Core.import = import Core
  547. // CHECK:STDOUT: %I.decl: type = interface_decl @I [concrete = constants.%I.type] {} {}
  548. // CHECK:STDOUT: impl_decl @impl [concrete] {} {
  549. // CHECK:STDOUT: %.loc6_7.1: %empty_struct_type = struct_literal ()
  550. // CHECK:STDOUT: %.loc6_7.2: type = converted %.loc6_7.1, constants.%empty_struct_type [concrete = constants.%empty_struct_type]
  551. // CHECK:STDOUT: %I.ref.loc6: type = name_ref I, file.%I.decl [concrete = constants.%I.type]
  552. // CHECK:STDOUT: %.Self.1: %I.type = bind_symbolic_name .Self [symbolic_self = constants.%.Self]
  553. // CHECK:STDOUT: %.Self.ref.loc6: %I.type = name_ref .Self, %.Self.1 [symbolic_self = constants.%.Self]
  554. // CHECK:STDOUT: %T.ref.loc6: %I.assoc_type = name_ref T, @T.%assoc0 [concrete = constants.%assoc0]
  555. // CHECK:STDOUT: %.Self.as_type.loc6: type = facet_access_type %.Self.ref.loc6 [symbolic_self = constants.%.Self.as_type]
  556. // CHECK:STDOUT: %.loc6_20: type = converted %.Self.ref.loc6, %.Self.as_type.loc6 [symbolic_self = constants.%.Self.as_type]
  557. // CHECK:STDOUT: %impl.elem0.loc6: type = impl_witness_access constants.%I.lookup_impl_witness, element0 [symbolic_self = constants.%impl.elem0]
  558. // CHECK:STDOUT: %.loc6_26.1: %empty_tuple.type = tuple_literal ()
  559. // CHECK:STDOUT: %.loc6_26.2: type = converted %.loc6_26.1, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type]
  560. // CHECK:STDOUT: %.loc6_14: type = where_expr %.Self.1 [concrete = constants.%I_where.type] {
  561. // CHECK:STDOUT: requirement_rewrite %impl.elem0.loc6, %.loc6_26.2
  562. // CHECK:STDOUT: }
  563. // CHECK:STDOUT: }
  564. // CHECK:STDOUT: %I.impl_witness_table = impl_witness_table (%impl_witness_assoc_constant), @impl [concrete]
  565. // CHECK:STDOUT: %I.impl_witness: <witness> = impl_witness %I.impl_witness_table [concrete = constants.%I.impl_witness]
  566. // CHECK:STDOUT: %impl_witness_assoc_constant: type = impl_witness_assoc_constant constants.%empty_tuple.type [concrete = constants.%empty_tuple.type]
  567. // CHECK:STDOUT: impl_decl @impl [concrete] {} {
  568. // CHECK:STDOUT: %.loc8_7.1: %empty_struct_type = struct_literal ()
  569. // CHECK:STDOUT: %.loc8_7.2: type = converted %.loc8_7.1, constants.%empty_struct_type [concrete = constants.%empty_struct_type]
  570. // CHECK:STDOUT: %I.ref.loc8: type = name_ref I, file.%I.decl [concrete = constants.%I.type]
  571. // CHECK:STDOUT: %.Self.2: %I.type = bind_symbolic_name .Self [symbolic_self = constants.%.Self]
  572. // CHECK:STDOUT: %.Self.ref.loc8: %I.type = name_ref .Self, %.Self.2 [symbolic_self = constants.%.Self]
  573. // CHECK:STDOUT: %T.ref.loc8: %I.assoc_type = name_ref T, @T.%assoc0 [concrete = constants.%assoc0]
  574. // CHECK:STDOUT: %.Self.as_type.loc8: type = facet_access_type %.Self.ref.loc8 [symbolic_self = constants.%.Self.as_type]
  575. // CHECK:STDOUT: %.loc8_20: type = converted %.Self.ref.loc8, %.Self.as_type.loc8 [symbolic_self = constants.%.Self.as_type]
  576. // CHECK:STDOUT: %impl.elem0.loc8: type = impl_witness_access constants.%I.lookup_impl_witness, element0 [symbolic_self = constants.%impl.elem0]
  577. // CHECK:STDOUT: %.loc8_26.1: %empty_tuple.type = tuple_literal ()
  578. // CHECK:STDOUT: %.loc8_26.2: type = converted %.loc8_26.1, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type]
  579. // CHECK:STDOUT: %.loc8_14: type = where_expr %.Self.2 [concrete = constants.%I_where.type] {
  580. // CHECK:STDOUT: requirement_rewrite %impl.elem0.loc8, %.loc8_26.2
  581. // CHECK:STDOUT: }
  582. // CHECK:STDOUT: }
  583. // CHECK:STDOUT: }
  584. // CHECK:STDOUT:
  585. // CHECK:STDOUT: interface @I {
  586. // CHECK:STDOUT: %Self: %I.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self]
  587. // CHECK:STDOUT: %T: type = assoc_const_decl @T [concrete] {
  588. // CHECK:STDOUT: %assoc0: %I.assoc_type = assoc_entity element0, @I.%T [concrete = constants.%assoc0]
  589. // CHECK:STDOUT: }
  590. // CHECK:STDOUT:
  591. // CHECK:STDOUT: !members:
  592. // CHECK:STDOUT: .Self = %Self
  593. // CHECK:STDOUT: .T = @T.%assoc0
  594. // CHECK:STDOUT: witness = (%T)
  595. // CHECK:STDOUT: }
  596. // CHECK:STDOUT:
  597. // CHECK:STDOUT: generic assoc_const @T(@I.%Self: %I.type) {
  598. // CHECK:STDOUT: assoc_const T:! type;
  599. // CHECK:STDOUT: }
  600. // CHECK:STDOUT:
  601. // CHECK:STDOUT: impl @impl: %.loc6_7.2 as %.loc6_14 {
  602. // CHECK:STDOUT: !members:
  603. // CHECK:STDOUT: witness = file.%I.impl_witness
  604. // CHECK:STDOUT: }
  605. // CHECK:STDOUT:
  606. // CHECK:STDOUT: specific @T(constants.%Self) {}
  607. // CHECK:STDOUT:
  608. // CHECK:STDOUT: specific @T(constants.%I.facet) {}
  609. // CHECK:STDOUT:
  610. // CHECK:STDOUT: --- associated_const_compound_member_access.carbon
  611. // CHECK:STDOUT:
  612. // CHECK:STDOUT: constants {
  613. // CHECK:STDOUT: %I.type: type = facet_type <@I> [concrete]
  614. // CHECK:STDOUT: %Self: %I.type = bind_symbolic_name Self, 0 [symbolic]
  615. // CHECK:STDOUT: %I.assoc_type: type = assoc_entity_type @I [concrete]
  616. // CHECK:STDOUT: %assoc0: %I.assoc_type = assoc_entity element0, @I.%T [concrete]
  617. // CHECK:STDOUT: %C: type = class_type @C [concrete]
  618. // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete]
  619. // CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %empty_struct_type [concrete]
  620. // CHECK:STDOUT: %.Self: %I.type = bind_symbolic_name .Self [symbolic_self]
  621. // CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self [symbolic_self]
  622. // CHECK:STDOUT: %I.lookup_impl_witness: <witness> = lookup_impl_witness %.Self, @I [symbolic_self]
  623. // CHECK:STDOUT: %I.facet.74c: %I.type = facet_value %.Self.as_type, (%I.lookup_impl_witness) [symbolic_self]
  624. // CHECK:STDOUT: %impl.elem0: type = impl_witness_access %I.lookup_impl_witness, element0 [symbolic_self]
  625. // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete]
  626. // CHECK:STDOUT: %I_where.type: type = facet_type <@I where %impl.elem0 = %empty_tuple.type> [concrete]
  627. // CHECK:STDOUT: %I.impl_witness: <witness> = impl_witness file.%I.impl_witness_table [concrete]
  628. // CHECK:STDOUT: %I.facet.880: %I.type = facet_value %C, (%I.impl_witness) [concrete]
  629. // CHECK:STDOUT: %empty_tuple: %empty_tuple.type = tuple_value () [concrete]
  630. // CHECK:STDOUT: }
  631. // CHECK:STDOUT:
  632. // CHECK:STDOUT: imports {
  633. // CHECK:STDOUT: %Core: <namespace> = namespace file.%Core.import, [concrete] {
  634. // CHECK:STDOUT: import Core//prelude
  635. // CHECK:STDOUT: }
  636. // CHECK:STDOUT: }
  637. // CHECK:STDOUT:
  638. // CHECK:STDOUT: file {
  639. // CHECK:STDOUT: package: <namespace> = namespace [concrete] {
  640. // CHECK:STDOUT: .Core = imports.%Core
  641. // CHECK:STDOUT: .I = %I.decl
  642. // CHECK:STDOUT: .C = %C.decl
  643. // CHECK:STDOUT: .x = %x
  644. // CHECK:STDOUT: }
  645. // CHECK:STDOUT: %Core.import = import Core
  646. // CHECK:STDOUT: %I.decl: type = interface_decl @I [concrete = constants.%I.type] {} {}
  647. // CHECK:STDOUT: %C.decl: type = class_decl @C [concrete = constants.%C] {} {}
  648. // CHECK:STDOUT: impl_decl @impl [concrete] {} {
  649. // CHECK:STDOUT: %C.ref.loc7: type = name_ref C, file.%C.decl [concrete = constants.%C]
  650. // CHECK:STDOUT: %I.ref.loc7: type = name_ref I, file.%I.decl [concrete = constants.%I.type]
  651. // CHECK:STDOUT: %.Self.1: %I.type = bind_symbolic_name .Self [symbolic_self = constants.%.Self]
  652. // CHECK:STDOUT: %.Self.ref.loc7: %I.type = name_ref .Self, %.Self.1 [symbolic_self = constants.%.Self]
  653. // CHECK:STDOUT: %T.ref.loc7: %I.assoc_type = name_ref T, @T.%assoc0 [concrete = constants.%assoc0]
  654. // CHECK:STDOUT: %.Self.as_type.loc7: type = facet_access_type %.Self.ref.loc7 [symbolic_self = constants.%.Self.as_type]
  655. // CHECK:STDOUT: %.loc7_19: type = converted %.Self.ref.loc7, %.Self.as_type.loc7 [symbolic_self = constants.%.Self.as_type]
  656. // CHECK:STDOUT: %impl.elem0.loc7: type = impl_witness_access constants.%I.lookup_impl_witness, element0 [symbolic_self = constants.%impl.elem0]
  657. // CHECK:STDOUT: %.loc7_25.1: %empty_tuple.type = tuple_literal ()
  658. // CHECK:STDOUT: %.loc7_25.2: type = converted %.loc7_25.1, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type]
  659. // CHECK:STDOUT: %.loc7_13: type = where_expr %.Self.1 [concrete = constants.%I_where.type] {
  660. // CHECK:STDOUT: requirement_rewrite %impl.elem0.loc7, %.loc7_25.2
  661. // CHECK:STDOUT: }
  662. // CHECK:STDOUT: }
  663. // CHECK:STDOUT: %I.impl_witness_table = impl_witness_table (%impl_witness_assoc_constant), @impl [concrete]
  664. // CHECK:STDOUT: %I.impl_witness: <witness> = impl_witness %I.impl_witness_table [concrete = constants.%I.impl_witness]
  665. // CHECK:STDOUT: %impl_witness_assoc_constant: type = impl_witness_assoc_constant constants.%empty_tuple.type [concrete = constants.%empty_tuple.type]
  666. // CHECK:STDOUT: name_binding_decl {
  667. // CHECK:STDOUT: %x.patt: %empty_tuple.type = binding_pattern x
  668. // CHECK:STDOUT: }
  669. // CHECK:STDOUT: %.loc9_9.1: type = splice_block %impl.elem0 [concrete = constants.%empty_tuple.type] {
  670. // CHECK:STDOUT: %C.ref: type = name_ref C, %C.decl [concrete = constants.%C]
  671. // CHECK:STDOUT: %I.ref: type = name_ref I, %I.decl [concrete = constants.%I.type]
  672. // CHECK:STDOUT: %T.ref: %I.assoc_type = name_ref T, @T.%assoc0 [concrete = constants.%assoc0]
  673. // CHECK:STDOUT: %I.facet: %I.type = facet_value constants.%C, (constants.%I.impl_witness) [concrete = constants.%I.facet.880]
  674. // CHECK:STDOUT: %.loc9_9.2: %I.type = converted %C.ref, %I.facet [concrete = constants.%I.facet.880]
  675. // CHECK:STDOUT: %impl.elem0: type = impl_witness_access constants.%I.impl_witness, element0 [concrete = constants.%empty_tuple.type]
  676. // CHECK:STDOUT: }
  677. // CHECK:STDOUT: %empty_tuple: %empty_tuple.type = tuple_value () [concrete = constants.%empty_tuple]
  678. // CHECK:STDOUT: %.loc9_19: %empty_tuple.type = converted @__global_init.%.loc9, %empty_tuple [concrete = constants.%empty_tuple]
  679. // CHECK:STDOUT: %x: %empty_tuple.type = bind_name x, %.loc9_19
  680. // CHECK:STDOUT: impl_decl @impl [concrete] {} {
  681. // CHECK:STDOUT: %C.ref.loc11: type = name_ref C, file.%C.decl [concrete = constants.%C]
  682. // CHECK:STDOUT: %I.ref.loc11: type = name_ref I, file.%I.decl [concrete = constants.%I.type]
  683. // CHECK:STDOUT: %.Self.2: %I.type = bind_symbolic_name .Self [symbolic_self = constants.%.Self]
  684. // CHECK:STDOUT: %.Self.ref.loc11: %I.type = name_ref .Self, %.Self.2 [symbolic_self = constants.%.Self]
  685. // CHECK:STDOUT: %T.ref.loc11: %I.assoc_type = name_ref T, @T.%assoc0 [concrete = constants.%assoc0]
  686. // CHECK:STDOUT: %.Self.as_type.loc11: type = facet_access_type %.Self.ref.loc11 [symbolic_self = constants.%.Self.as_type]
  687. // CHECK:STDOUT: %.loc11_19: type = converted %.Self.ref.loc11, %.Self.as_type.loc11 [symbolic_self = constants.%.Self.as_type]
  688. // CHECK:STDOUT: %impl.elem0.loc11: type = impl_witness_access constants.%I.lookup_impl_witness, element0 [symbolic_self = constants.%impl.elem0]
  689. // CHECK:STDOUT: %.loc11_25.1: %empty_tuple.type = tuple_literal ()
  690. // CHECK:STDOUT: %.loc11_25.2: type = converted %.loc11_25.1, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type]
  691. // CHECK:STDOUT: %.loc11_13: type = where_expr %.Self.2 [concrete = constants.%I_where.type] {
  692. // CHECK:STDOUT: requirement_rewrite %impl.elem0.loc11, %.loc11_25.2
  693. // CHECK:STDOUT: }
  694. // CHECK:STDOUT: }
  695. // CHECK:STDOUT: }
  696. // CHECK:STDOUT:
  697. // CHECK:STDOUT: interface @I {
  698. // CHECK:STDOUT: %Self: %I.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self]
  699. // CHECK:STDOUT: %T: type = assoc_const_decl @T [concrete] {
  700. // CHECK:STDOUT: %assoc0: %I.assoc_type = assoc_entity element0, @I.%T [concrete = constants.%assoc0]
  701. // CHECK:STDOUT: }
  702. // CHECK:STDOUT:
  703. // CHECK:STDOUT: !members:
  704. // CHECK:STDOUT: .Self = %Self
  705. // CHECK:STDOUT: .T = @T.%assoc0
  706. // CHECK:STDOUT: witness = (%T)
  707. // CHECK:STDOUT: }
  708. // CHECK:STDOUT:
  709. // CHECK:STDOUT: generic assoc_const @T(@I.%Self: %I.type) {
  710. // CHECK:STDOUT: assoc_const T:! type;
  711. // CHECK:STDOUT: }
  712. // CHECK:STDOUT:
  713. // CHECK:STDOUT: impl @impl: %C.ref.loc7 as %.loc7_13 {
  714. // CHECK:STDOUT: !members:
  715. // CHECK:STDOUT: witness = file.%I.impl_witness
  716. // CHECK:STDOUT: }
  717. // CHECK:STDOUT:
  718. // CHECK:STDOUT: class @C {
  719. // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete = constants.%empty_struct_type]
  720. // CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %empty_struct_type [concrete = constants.%complete_type]
  721. // CHECK:STDOUT: complete_type_witness = %complete_type
  722. // CHECK:STDOUT:
  723. // CHECK:STDOUT: !members:
  724. // CHECK:STDOUT: .Self = constants.%C
  725. // CHECK:STDOUT: }
  726. // CHECK:STDOUT:
  727. // CHECK:STDOUT: fn @__global_init() {
  728. // CHECK:STDOUT: !entry:
  729. // CHECK:STDOUT: %.loc9: %empty_tuple.type = tuple_literal ()
  730. // CHECK:STDOUT: return
  731. // CHECK:STDOUT: }
  732. // CHECK:STDOUT:
  733. // CHECK:STDOUT: specific @T(constants.%Self) {}
  734. // CHECK:STDOUT:
  735. // CHECK:STDOUT: specific @T(constants.%I.facet.74c) {}
  736. // CHECK:STDOUT:
  737. // CHECK:STDOUT: specific @T(constants.%I.facet.880) {}
  738. // CHECK:STDOUT:
  739. // CHECK:STDOUT: --- associated_const_of_facet.carbon
  740. // CHECK:STDOUT:
  741. // CHECK:STDOUT: constants {
  742. // CHECK:STDOUT: %I.type: type = facet_type <@I> [concrete]
  743. // CHECK:STDOUT: %Self: %I.type = bind_symbolic_name Self, 0 [symbolic]
  744. // CHECK:STDOUT: %I.assoc_type: type = assoc_entity_type @I [concrete]
  745. // CHECK:STDOUT: %assoc0: %I.assoc_type = assoc_entity element0, @I.%T [concrete]
  746. // CHECK:STDOUT: %C: type = class_type @C [concrete]
  747. // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete]
  748. // CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %empty_struct_type [concrete]
  749. // CHECK:STDOUT: %.Self: %I.type = bind_symbolic_name .Self [symbolic_self]
  750. // CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self [symbolic_self]
  751. // CHECK:STDOUT: %I.lookup_impl_witness: <witness> = lookup_impl_witness %.Self, @I [symbolic_self]
  752. // CHECK:STDOUT: %I.facet.74c: %I.type = facet_value %.Self.as_type, (%I.lookup_impl_witness) [symbolic_self]
  753. // CHECK:STDOUT: %impl.elem0: type = impl_witness_access %I.lookup_impl_witness, element0 [symbolic_self]
  754. // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete]
  755. // CHECK:STDOUT: %I_where.type: type = facet_type <@I where %impl.elem0 = %empty_tuple.type> [concrete]
  756. // CHECK:STDOUT: %I.impl_witness: <witness> = impl_witness file.%I.impl_witness_table [concrete]
  757. // CHECK:STDOUT: %I.facet.880: %I.type = facet_value %C, (%I.impl_witness) [concrete]
  758. // CHECK:STDOUT: %empty_tuple: %empty_tuple.type = tuple_value () [concrete]
  759. // CHECK:STDOUT: }
  760. // CHECK:STDOUT:
  761. // CHECK:STDOUT: imports {
  762. // CHECK:STDOUT: %Core: <namespace> = namespace file.%Core.import, [concrete] {
  763. // CHECK:STDOUT: import Core//prelude
  764. // CHECK:STDOUT: }
  765. // CHECK:STDOUT: }
  766. // CHECK:STDOUT:
  767. // CHECK:STDOUT: file {
  768. // CHECK:STDOUT: package: <namespace> = namespace [concrete] {
  769. // CHECK:STDOUT: .Core = imports.%Core
  770. // CHECK:STDOUT: .I = %I.decl
  771. // CHECK:STDOUT: .C = %C.decl
  772. // CHECK:STDOUT: .x = %x
  773. // CHECK:STDOUT: }
  774. // CHECK:STDOUT: %Core.import = import Core
  775. // CHECK:STDOUT: %I.decl: type = interface_decl @I [concrete = constants.%I.type] {} {}
  776. // CHECK:STDOUT: %C.decl: type = class_decl @C [concrete = constants.%C] {} {}
  777. // CHECK:STDOUT: impl_decl @impl [concrete] {} {
  778. // CHECK:STDOUT: %C.ref.loc7: type = name_ref C, file.%C.decl [concrete = constants.%C]
  779. // CHECK:STDOUT: %I.ref.loc7: type = name_ref I, file.%I.decl [concrete = constants.%I.type]
  780. // CHECK:STDOUT: %.Self.1: %I.type = bind_symbolic_name .Self [symbolic_self = constants.%.Self]
  781. // CHECK:STDOUT: %.Self.ref.loc7: %I.type = name_ref .Self, %.Self.1 [symbolic_self = constants.%.Self]
  782. // CHECK:STDOUT: %T.ref.loc7: %I.assoc_type = name_ref T, @T.%assoc0 [concrete = constants.%assoc0]
  783. // CHECK:STDOUT: %.Self.as_type.loc7: type = facet_access_type %.Self.ref.loc7 [symbolic_self = constants.%.Self.as_type]
  784. // CHECK:STDOUT: %.loc7_19: type = converted %.Self.ref.loc7, %.Self.as_type.loc7 [symbolic_self = constants.%.Self.as_type]
  785. // CHECK:STDOUT: %impl.elem0.loc7: type = impl_witness_access constants.%I.lookup_impl_witness, element0 [symbolic_self = constants.%impl.elem0]
  786. // CHECK:STDOUT: %.loc7_25.1: %empty_tuple.type = tuple_literal ()
  787. // CHECK:STDOUT: %.loc7_25.2: type = converted %.loc7_25.1, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type]
  788. // CHECK:STDOUT: %.loc7_13: type = where_expr %.Self.1 [concrete = constants.%I_where.type] {
  789. // CHECK:STDOUT: requirement_rewrite %impl.elem0.loc7, %.loc7_25.2
  790. // CHECK:STDOUT: }
  791. // CHECK:STDOUT: }
  792. // CHECK:STDOUT: %I.impl_witness_table = impl_witness_table (%impl_witness_assoc_constant), @impl [concrete]
  793. // CHECK:STDOUT: %I.impl_witness: <witness> = impl_witness %I.impl_witness_table [concrete = constants.%I.impl_witness]
  794. // CHECK:STDOUT: %impl_witness_assoc_constant: type = impl_witness_assoc_constant constants.%empty_tuple.type [concrete = constants.%empty_tuple.type]
  795. // CHECK:STDOUT: name_binding_decl {
  796. // CHECK:STDOUT: %x.patt: %empty_tuple.type = binding_pattern x
  797. // CHECK:STDOUT: }
  798. // CHECK:STDOUT: %.loc9_16.1: type = splice_block %impl.elem0 [concrete = constants.%empty_tuple.type] {
  799. // CHECK:STDOUT: %C.ref: type = name_ref C, %C.decl [concrete = constants.%C]
  800. // CHECK:STDOUT: %I.ref: type = name_ref I, %I.decl [concrete = constants.%I.type]
  801. // CHECK:STDOUT: %I.facet: %I.type = facet_value constants.%C, (constants.%I.impl_witness) [concrete = constants.%I.facet.880]
  802. // CHECK:STDOUT: %.loc9_11: %I.type = converted %C.ref, %I.facet [concrete = constants.%I.facet.880]
  803. // CHECK:STDOUT: %T.ref: %I.assoc_type = name_ref T, @T.%assoc0 [concrete = constants.%assoc0]
  804. // CHECK:STDOUT: %as_type: type = facet_access_type %.loc9_11 [concrete = constants.%C]
  805. // CHECK:STDOUT: %.loc9_16.2: type = converted %.loc9_11, %as_type [concrete = constants.%C]
  806. // CHECK:STDOUT: %impl.elem0: type = impl_witness_access constants.%I.impl_witness, element0 [concrete = constants.%empty_tuple.type]
  807. // CHECK:STDOUT: }
  808. // CHECK:STDOUT: %empty_tuple: %empty_tuple.type = tuple_value () [concrete = constants.%empty_tuple]
  809. // CHECK:STDOUT: %.loc9_22: %empty_tuple.type = converted @__global_init.%.loc9, %empty_tuple [concrete = constants.%empty_tuple]
  810. // CHECK:STDOUT: %x: %empty_tuple.type = bind_name x, %.loc9_22
  811. // CHECK:STDOUT: impl_decl @impl [concrete] {} {
  812. // CHECK:STDOUT: %C.ref.loc11: type = name_ref C, file.%C.decl [concrete = constants.%C]
  813. // CHECK:STDOUT: %I.ref.loc11: type = name_ref I, file.%I.decl [concrete = constants.%I.type]
  814. // CHECK:STDOUT: %.Self.2: %I.type = bind_symbolic_name .Self [symbolic_self = constants.%.Self]
  815. // CHECK:STDOUT: %.Self.ref.loc11: %I.type = name_ref .Self, %.Self.2 [symbolic_self = constants.%.Self]
  816. // CHECK:STDOUT: %T.ref.loc11: %I.assoc_type = name_ref T, @T.%assoc0 [concrete = constants.%assoc0]
  817. // CHECK:STDOUT: %.Self.as_type.loc11: type = facet_access_type %.Self.ref.loc11 [symbolic_self = constants.%.Self.as_type]
  818. // CHECK:STDOUT: %.loc11_19: type = converted %.Self.ref.loc11, %.Self.as_type.loc11 [symbolic_self = constants.%.Self.as_type]
  819. // CHECK:STDOUT: %impl.elem0.loc11: type = impl_witness_access constants.%I.lookup_impl_witness, element0 [symbolic_self = constants.%impl.elem0]
  820. // CHECK:STDOUT: %.loc11_25.1: %empty_tuple.type = tuple_literal ()
  821. // CHECK:STDOUT: %.loc11_25.2: type = converted %.loc11_25.1, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type]
  822. // CHECK:STDOUT: %.loc11_13: type = where_expr %.Self.2 [concrete = constants.%I_where.type] {
  823. // CHECK:STDOUT: requirement_rewrite %impl.elem0.loc11, %.loc11_25.2
  824. // CHECK:STDOUT: }
  825. // CHECK:STDOUT: }
  826. // CHECK:STDOUT: }
  827. // CHECK:STDOUT:
  828. // CHECK:STDOUT: interface @I {
  829. // CHECK:STDOUT: %Self: %I.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self]
  830. // CHECK:STDOUT: %T: type = assoc_const_decl @T [concrete] {
  831. // CHECK:STDOUT: %assoc0: %I.assoc_type = assoc_entity element0, @I.%T [concrete = constants.%assoc0]
  832. // CHECK:STDOUT: }
  833. // CHECK:STDOUT:
  834. // CHECK:STDOUT: !members:
  835. // CHECK:STDOUT: .Self = %Self
  836. // CHECK:STDOUT: .T = @T.%assoc0
  837. // CHECK:STDOUT: witness = (%T)
  838. // CHECK:STDOUT: }
  839. // CHECK:STDOUT:
  840. // CHECK:STDOUT: generic assoc_const @T(@I.%Self: %I.type) {
  841. // CHECK:STDOUT: assoc_const T:! type;
  842. // CHECK:STDOUT: }
  843. // CHECK:STDOUT:
  844. // CHECK:STDOUT: impl @impl: %C.ref.loc7 as %.loc7_13 {
  845. // CHECK:STDOUT: !members:
  846. // CHECK:STDOUT: witness = file.%I.impl_witness
  847. // CHECK:STDOUT: }
  848. // CHECK:STDOUT:
  849. // CHECK:STDOUT: class @C {
  850. // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete = constants.%empty_struct_type]
  851. // CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %empty_struct_type [concrete = constants.%complete_type]
  852. // CHECK:STDOUT: complete_type_witness = %complete_type
  853. // CHECK:STDOUT:
  854. // CHECK:STDOUT: !members:
  855. // CHECK:STDOUT: .Self = constants.%C
  856. // CHECK:STDOUT: }
  857. // CHECK:STDOUT:
  858. // CHECK:STDOUT: fn @__global_init() {
  859. // CHECK:STDOUT: !entry:
  860. // CHECK:STDOUT: %.loc9: %empty_tuple.type = tuple_literal ()
  861. // CHECK:STDOUT: return
  862. // CHECK:STDOUT: }
  863. // CHECK:STDOUT:
  864. // CHECK:STDOUT: specific @T(constants.%Self) {}
  865. // CHECK:STDOUT:
  866. // CHECK:STDOUT: specific @T(constants.%I.facet.74c) {}
  867. // CHECK:STDOUT:
  868. // CHECK:STDOUT: specific @T(constants.%I.facet.880) {}
  869. // CHECK:STDOUT:
  870. // CHECK:STDOUT: --- fail_unset_associated_const.carbon
  871. // CHECK:STDOUT:
  872. // CHECK:STDOUT: constants {
  873. // CHECK:STDOUT: %I.type: type = facet_type <@I> [concrete]
  874. // CHECK:STDOUT: %Self: %I.type = bind_symbolic_name Self, 0 [symbolic]
  875. // CHECK:STDOUT: %I.assoc_type: type = assoc_entity_type @I [concrete]
  876. // CHECK:STDOUT: %assoc0: %I.assoc_type = assoc_entity element0, @I.%T [concrete]
  877. // CHECK:STDOUT: %C: type = class_type @C [concrete]
  878. // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete]
  879. // CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %empty_struct_type [concrete]
  880. // CHECK:STDOUT: %I.impl_witness: <witness> = impl_witness file.%I.impl_witness_table [concrete]
  881. // CHECK:STDOUT: %I.facet: %I.type = facet_value %C, (%I.impl_witness) [concrete]
  882. // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete]
  883. // CHECK:STDOUT: }
  884. // CHECK:STDOUT:
  885. // CHECK:STDOUT: imports {
  886. // CHECK:STDOUT: %Core: <namespace> = namespace file.%Core.import, [concrete] {
  887. // CHECK:STDOUT: import Core//prelude
  888. // CHECK:STDOUT: }
  889. // CHECK:STDOUT: }
  890. // CHECK:STDOUT:
  891. // CHECK:STDOUT: file {
  892. // CHECK:STDOUT: package: <namespace> = namespace [concrete] {
  893. // CHECK:STDOUT: .Core = imports.%Core
  894. // CHECK:STDOUT: .I = %I.decl
  895. // CHECK:STDOUT: .C = %C.decl
  896. // CHECK:STDOUT: .x = %x
  897. // CHECK:STDOUT: }
  898. // CHECK:STDOUT: %Core.import = import Core
  899. // CHECK:STDOUT: %I.decl: type = interface_decl @I [concrete = constants.%I.type] {} {}
  900. // CHECK:STDOUT: %C.decl: type = class_decl @C [concrete = constants.%C] {} {}
  901. // CHECK:STDOUT: impl_decl @impl [concrete] {} {
  902. // CHECK:STDOUT: %C.ref.loc7: type = name_ref C, file.%C.decl [concrete = constants.%C]
  903. // CHECK:STDOUT: %I.ref.loc7: type = name_ref I, file.%I.decl [concrete = constants.%I.type]
  904. // CHECK:STDOUT: }
  905. // CHECK:STDOUT: %I.impl_witness_table = impl_witness_table (<error>), @impl [concrete]
  906. // CHECK:STDOUT: %I.impl_witness: <witness> = impl_witness %I.impl_witness_table [concrete = constants.%I.impl_witness]
  907. // CHECK:STDOUT: name_binding_decl {
  908. // CHECK:STDOUT: %x.patt: <error> = binding_pattern x
  909. // CHECK:STDOUT: }
  910. // CHECK:STDOUT: %.loc13_16.1: type = splice_block %impl.elem0 [concrete = <error>] {
  911. // CHECK:STDOUT: %C.ref: type = name_ref C, %C.decl [concrete = constants.%C]
  912. // CHECK:STDOUT: %I.ref: type = name_ref I, %I.decl [concrete = constants.%I.type]
  913. // CHECK:STDOUT: %I.facet: %I.type = facet_value constants.%C, (constants.%I.impl_witness) [concrete = constants.%I.facet]
  914. // CHECK:STDOUT: %.loc13_11: %I.type = converted %C.ref, %I.facet [concrete = constants.%I.facet]
  915. // CHECK:STDOUT: %T.ref: %I.assoc_type = name_ref T, @T.%assoc0 [concrete = constants.%assoc0]
  916. // CHECK:STDOUT: %as_type: type = facet_access_type %.loc13_11 [concrete = constants.%C]
  917. // CHECK:STDOUT: %.loc13_16.2: type = converted %.loc13_11, %as_type [concrete = constants.%C]
  918. // CHECK:STDOUT: %impl.elem0: type = impl_witness_access constants.%I.impl_witness, element0 [concrete = <error>]
  919. // CHECK:STDOUT: }
  920. // CHECK:STDOUT: %x: <error> = bind_name x, <error>
  921. // CHECK:STDOUT: impl_decl @impl [concrete] {} {
  922. // CHECK:STDOUT: %C.ref.loc22: type = name_ref C, file.%C.decl [concrete = constants.%C]
  923. // CHECK:STDOUT: %I.ref.loc22: type = name_ref I, file.%I.decl [concrete = constants.%I.type]
  924. // CHECK:STDOUT: }
  925. // CHECK:STDOUT: }
  926. // CHECK:STDOUT:
  927. // CHECK:STDOUT: interface @I {
  928. // CHECK:STDOUT: %Self: %I.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self]
  929. // CHECK:STDOUT: %T: type = assoc_const_decl @T [concrete] {
  930. // CHECK:STDOUT: %assoc0: %I.assoc_type = assoc_entity element0, @I.%T [concrete = constants.%assoc0]
  931. // CHECK:STDOUT: }
  932. // CHECK:STDOUT:
  933. // CHECK:STDOUT: !members:
  934. // CHECK:STDOUT: .Self = %Self
  935. // CHECK:STDOUT: .T = @T.%assoc0
  936. // CHECK:STDOUT: witness = (%T)
  937. // CHECK:STDOUT: }
  938. // CHECK:STDOUT:
  939. // CHECK:STDOUT: generic assoc_const @T(@I.%Self: %I.type) {
  940. // CHECK:STDOUT: assoc_const T:! type;
  941. // CHECK:STDOUT: }
  942. // CHECK:STDOUT:
  943. // CHECK:STDOUT: impl @impl: %C.ref.loc7 as %I.ref.loc7 {
  944. // CHECK:STDOUT: !members:
  945. // CHECK:STDOUT: witness = file.%I.impl_witness
  946. // CHECK:STDOUT: }
  947. // CHECK:STDOUT:
  948. // CHECK:STDOUT: class @C {
  949. // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete = constants.%empty_struct_type]
  950. // CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %empty_struct_type [concrete = constants.%complete_type]
  951. // CHECK:STDOUT: complete_type_witness = %complete_type
  952. // CHECK:STDOUT:
  953. // CHECK:STDOUT: !members:
  954. // CHECK:STDOUT: .Self = constants.%C
  955. // CHECK:STDOUT: }
  956. // CHECK:STDOUT:
  957. // CHECK:STDOUT: fn @__global_init() {
  958. // CHECK:STDOUT: !entry:
  959. // CHECK:STDOUT: %.loc13: %empty_tuple.type = tuple_literal ()
  960. // CHECK:STDOUT: return
  961. // CHECK:STDOUT: }
  962. // CHECK:STDOUT:
  963. // CHECK:STDOUT: specific @T(constants.%Self) {}
  964. // CHECK:STDOUT:
  965. // CHECK:STDOUT: specific @T(constants.%I.facet) {}
  966. // CHECK:STDOUT:
  967. // CHECK:STDOUT: --- fail_associated_const_before_interface_definition.carbon
  968. // CHECK:STDOUT:
  969. // CHECK:STDOUT: constants {
  970. // CHECK:STDOUT: %I.type: type = facet_type <@I> [concrete]
  971. // CHECK:STDOUT: %C: type = class_type @C [concrete]
  972. // CHECK:STDOUT: %D: type = class_type @D [concrete]
  973. // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete]
  974. // CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %empty_struct_type [concrete]
  975. // CHECK:STDOUT: %.Self: %I.type = bind_symbolic_name .Self [symbolic_self]
  976. // CHECK:STDOUT: %Self: %I.type = bind_symbolic_name Self, 0 [symbolic]
  977. // CHECK:STDOUT: }
  978. // CHECK:STDOUT:
  979. // CHECK:STDOUT: imports {
  980. // CHECK:STDOUT: %Core: <namespace> = namespace file.%Core.import, [concrete] {
  981. // CHECK:STDOUT: import Core//prelude
  982. // CHECK:STDOUT: }
  983. // CHECK:STDOUT: }
  984. // CHECK:STDOUT:
  985. // CHECK:STDOUT: file {
  986. // CHECK:STDOUT: package: <namespace> = namespace [concrete] {
  987. // CHECK:STDOUT: .Core = imports.%Core
  988. // CHECK:STDOUT: .I = %I.decl.loc3
  989. // CHECK:STDOUT: .C = %C.decl.loc4
  990. // CHECK:STDOUT: .D = %D.decl
  991. // CHECK:STDOUT: }
  992. // CHECK:STDOUT: %Core.import = import Core
  993. // CHECK:STDOUT: %I.decl.loc3: type = interface_decl @I [concrete = constants.%I.type] {} {}
  994. // CHECK:STDOUT: %C.decl.loc4: type = class_decl @C [concrete = constants.%C] {} {}
  995. // CHECK:STDOUT: %D.decl: type = class_decl @D [concrete = constants.%D] {} {}
  996. // CHECK:STDOUT: impl_decl @impl [concrete] {} {
  997. // CHECK:STDOUT: %D.ref.loc13: type = name_ref D, file.%D.decl [concrete = constants.%D]
  998. // CHECK:STDOUT: %I.ref.loc13: type = name_ref I, file.%I.decl.loc3 [concrete = constants.%I.type]
  999. // CHECK:STDOUT: %.Self.1: %I.type = bind_symbolic_name .Self [symbolic_self = constants.%.Self]
  1000. // CHECK:STDOUT: %.Self.ref.loc13: %I.type = name_ref .Self, %.Self.1 [symbolic_self = constants.%.Self]
  1001. // CHECK:STDOUT: %C.ref.loc13: type = name_ref C, file.%C.decl.loc4 [concrete = constants.%C]
  1002. // CHECK:STDOUT: %.loc13: type = where_expr %.Self.1 [concrete = <error>] {
  1003. // CHECK:STDOUT: requirement_rewrite <error>, <error>
  1004. // CHECK:STDOUT: }
  1005. // CHECK:STDOUT: }
  1006. // CHECK:STDOUT: %I.decl.loc15: type = interface_decl @I [concrete = constants.%I.type] {} {}
  1007. // CHECK:STDOUT: %C.decl.loc16: type = class_decl @C [concrete = constants.%C] {} {}
  1008. // CHECK:STDOUT: impl_decl @impl [concrete] {} {
  1009. // CHECK:STDOUT: %D.ref.loc21: type = name_ref D, file.%D.decl [concrete = constants.%D]
  1010. // CHECK:STDOUT: %I.ref.loc21: type = name_ref I, file.%I.decl.loc3 [concrete = constants.%I.type]
  1011. // CHECK:STDOUT: %.Self.2: %I.type = bind_symbolic_name .Self [symbolic_self = constants.%.Self]
  1012. // CHECK:STDOUT: %.Self.ref.loc21: %I.type = name_ref .Self, %.Self.2 [symbolic_self = constants.%.Self]
  1013. // CHECK:STDOUT: %T.ref: <error> = name_ref T, <error> [concrete = <error>]
  1014. // CHECK:STDOUT: %C.ref.loc21: type = name_ref C, file.%C.decl.loc4 [concrete = constants.%C]
  1015. // CHECK:STDOUT: %.loc21: type = where_expr %.Self.2 [concrete = <error>] {
  1016. // CHECK:STDOUT: requirement_rewrite %T.ref, <error>
  1017. // CHECK:STDOUT: }
  1018. // CHECK:STDOUT: }
  1019. // CHECK:STDOUT: }
  1020. // CHECK:STDOUT:
  1021. // CHECK:STDOUT: interface @I {
  1022. // CHECK:STDOUT: %Self: %I.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self]
  1023. // CHECK:STDOUT:
  1024. // CHECK:STDOUT: !members:
  1025. // CHECK:STDOUT: .Self = %Self
  1026. // CHECK:STDOUT: .T = <poisoned>
  1027. // CHECK:STDOUT: witness = ()
  1028. // CHECK:STDOUT: }
  1029. // CHECK:STDOUT:
  1030. // CHECK:STDOUT: impl @impl: %D.ref.loc13 as %.loc13 {
  1031. // CHECK:STDOUT: !members:
  1032. // CHECK:STDOUT: witness = <error>
  1033. // CHECK:STDOUT: }
  1034. // CHECK:STDOUT:
  1035. // CHECK:STDOUT: class @C {
  1036. // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete = constants.%empty_struct_type]
  1037. // CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %empty_struct_type [concrete = constants.%complete_type]
  1038. // CHECK:STDOUT: complete_type_witness = %complete_type
  1039. // CHECK:STDOUT:
  1040. // CHECK:STDOUT: !members:
  1041. // CHECK:STDOUT: .Self = constants.%C
  1042. // CHECK:STDOUT: }
  1043. // CHECK:STDOUT:
  1044. // CHECK:STDOUT: class @D {
  1045. // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete = constants.%empty_struct_type]
  1046. // CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %empty_struct_type [concrete = constants.%complete_type]
  1047. // CHECK:STDOUT: complete_type_witness = %complete_type
  1048. // CHECK:STDOUT:
  1049. // CHECK:STDOUT: !members:
  1050. // CHECK:STDOUT: .Self = constants.%D
  1051. // CHECK:STDOUT: }
  1052. // CHECK:STDOUT:
  1053. // CHECK:STDOUT: --- associated_const_of_parameterized.carbon
  1054. // CHECK:STDOUT:
  1055. // CHECK:STDOUT: constants {
  1056. // CHECK:STDOUT: %U: type = bind_symbolic_name U, 0 [symbolic]
  1057. // CHECK:STDOUT: %U.patt: type = symbolic_binding_pattern U, 0 [symbolic]
  1058. // CHECK:STDOUT: %I.type.dac: type = generic_interface_type @I [concrete]
  1059. // CHECK:STDOUT: %I.generic: %I.type.dac = struct_value () [concrete]
  1060. // CHECK:STDOUT: %I.type.325: type = facet_type <@I, @I(%U)> [symbolic]
  1061. // CHECK:STDOUT: %Self.209: %I.type.325 = bind_symbolic_name Self, 1 [symbolic]
  1062. // CHECK:STDOUT: %I.assoc_type.1e5: type = assoc_entity_type @I, @I(%U) [symbolic]
  1063. // CHECK:STDOUT: %assoc0.7f3: %I.assoc_type.1e5 = assoc_entity element0, @I.%T [symbolic]
  1064. // CHECK:STDOUT: %C: type = class_type @C [concrete]
  1065. // CHECK:STDOUT: %D: type = class_type @D [concrete]
  1066. // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete]
  1067. // CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %empty_struct_type [concrete]
  1068. // CHECK:STDOUT: %I.type.e7a: type = facet_type <@I, @I(%C)> [concrete]
  1069. // CHECK:STDOUT: %.Self: %I.type.e7a = bind_symbolic_name .Self [symbolic_self]
  1070. // CHECK:STDOUT: %Self.b1d: %I.type.e7a = bind_symbolic_name Self, 1 [symbolic]
  1071. // CHECK:STDOUT: %I.assoc_type.b3c: type = assoc_entity_type @I, @I(%C) [concrete]
  1072. // CHECK:STDOUT: %assoc0.3e4: %I.assoc_type.b3c = assoc_entity element0, @I.%T [concrete]
  1073. // CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self [symbolic_self]
  1074. // CHECK:STDOUT: %I.lookup_impl_witness: <witness> = lookup_impl_witness %.Self, @I, @I(%C) [symbolic_self]
  1075. // CHECK:STDOUT: %I.facet: %I.type.e7a = facet_value %.Self.as_type, (%I.lookup_impl_witness) [symbolic_self]
  1076. // CHECK:STDOUT: %impl.elem0: type = impl_witness_access %I.lookup_impl_witness, element0 [symbolic_self]
  1077. // CHECK:STDOUT: %I_where.type: type = facet_type <@I, @I(%C) where %impl.elem0 = %C> [concrete]
  1078. // CHECK:STDOUT: %I.impl_witness: <witness> = impl_witness file.%I.impl_witness_table [concrete]
  1079. // CHECK:STDOUT: }
  1080. // CHECK:STDOUT:
  1081. // CHECK:STDOUT: imports {
  1082. // CHECK:STDOUT: %Core: <namespace> = namespace file.%Core.import, [concrete] {
  1083. // CHECK:STDOUT: import Core//prelude
  1084. // CHECK:STDOUT: }
  1085. // CHECK:STDOUT: }
  1086. // CHECK:STDOUT:
  1087. // CHECK:STDOUT: file {
  1088. // CHECK:STDOUT: package: <namespace> = namespace [concrete] {
  1089. // CHECK:STDOUT: .Core = imports.%Core
  1090. // CHECK:STDOUT: .I = %I.decl
  1091. // CHECK:STDOUT: .C = %C.decl.loc6
  1092. // CHECK:STDOUT: .D = %D.decl
  1093. // CHECK:STDOUT: }
  1094. // CHECK:STDOUT: %Core.import = import Core
  1095. // CHECK:STDOUT: %I.decl: %I.type.dac = interface_decl @I [concrete = constants.%I.generic] {
  1096. // CHECK:STDOUT: %U.patt.loc3_13.1: type = symbolic_binding_pattern U, 0 [symbolic = %U.patt.loc3_13.2 (constants.%U.patt)]
  1097. // CHECK:STDOUT: } {
  1098. // CHECK:STDOUT: %U.loc3_13.1: type = bind_symbolic_name U, 0 [symbolic = %U.loc3_13.2 (constants.%U)]
  1099. // CHECK:STDOUT: }
  1100. // CHECK:STDOUT: %C.decl.loc6: type = class_decl @C [concrete = constants.%C] {} {}
  1101. // CHECK:STDOUT: %D.decl: type = class_decl @D [concrete = constants.%D] {} {}
  1102. // CHECK:STDOUT: impl_decl @impl [concrete] {} {
  1103. // CHECK:STDOUT: %D.ref.loc8: type = name_ref D, file.%D.decl [concrete = constants.%D]
  1104. // CHECK:STDOUT: %I.ref.loc8: %I.type.dac = name_ref I, file.%I.decl [concrete = constants.%I.generic]
  1105. // CHECK:STDOUT: %C.ref.loc8_13: type = name_ref C, file.%C.decl.loc6 [concrete = constants.%C]
  1106. // CHECK:STDOUT: %I.type.loc8: type = facet_type <@I, @I(constants.%C)> [concrete = constants.%I.type.e7a]
  1107. // CHECK:STDOUT: %.Self.1: %I.type.e7a = bind_symbolic_name .Self [symbolic_self = constants.%.Self]
  1108. // CHECK:STDOUT: %.Self.ref.loc8: %I.type.e7a = name_ref .Self, %.Self.1 [symbolic_self = constants.%.Self]
  1109. // CHECK:STDOUT: %.loc8_22.1: %I.assoc_type.b3c = specific_constant @T.%assoc0, @I(constants.%C) [concrete = constants.%assoc0.3e4]
  1110. // CHECK:STDOUT: %T.ref.loc8: %I.assoc_type.b3c = name_ref T, %.loc8_22.1 [concrete = constants.%assoc0.3e4]
  1111. // CHECK:STDOUT: %.Self.as_type.loc8: type = facet_access_type %.Self.ref.loc8 [symbolic_self = constants.%.Self.as_type]
  1112. // CHECK:STDOUT: %.loc8_22.2: type = converted %.Self.ref.loc8, %.Self.as_type.loc8 [symbolic_self = constants.%.Self.as_type]
  1113. // CHECK:STDOUT: %impl.elem0.loc8: type = impl_witness_access constants.%I.lookup_impl_witness, element0 [symbolic_self = constants.%impl.elem0]
  1114. // CHECK:STDOUT: %C.ref.loc8_27: type = name_ref C, file.%C.decl.loc6 [concrete = constants.%C]
  1115. // CHECK:STDOUT: %.loc8_16: type = where_expr %.Self.1 [concrete = constants.%I_where.type] {
  1116. // CHECK:STDOUT: requirement_rewrite %impl.elem0.loc8, %C.ref.loc8_27
  1117. // CHECK:STDOUT: }
  1118. // CHECK:STDOUT: }
  1119. // CHECK:STDOUT: %I.impl_witness_table = impl_witness_table (%impl_witness_assoc_constant), @impl [concrete]
  1120. // CHECK:STDOUT: %I.impl_witness: <witness> = impl_witness %I.impl_witness_table [concrete = constants.%I.impl_witness]
  1121. // CHECK:STDOUT: %impl_witness_assoc_constant: type = impl_witness_assoc_constant constants.%C [concrete = constants.%C]
  1122. // CHECK:STDOUT: %C.decl.loc10: type = class_decl @C [concrete = constants.%C] {} {}
  1123. // CHECK:STDOUT: impl_decl @impl [concrete] {} {
  1124. // CHECK:STDOUT: %D.ref.loc11: type = name_ref D, file.%D.decl [concrete = constants.%D]
  1125. // CHECK:STDOUT: %I.ref.loc11: %I.type.dac = name_ref I, file.%I.decl [concrete = constants.%I.generic]
  1126. // CHECK:STDOUT: %C.ref.loc11_13: type = name_ref C, file.%C.decl.loc6 [concrete = constants.%C]
  1127. // CHECK:STDOUT: %I.type.loc11: type = facet_type <@I, @I(constants.%C)> [concrete = constants.%I.type.e7a]
  1128. // CHECK:STDOUT: %.Self.2: %I.type.e7a = bind_symbolic_name .Self [symbolic_self = constants.%.Self]
  1129. // CHECK:STDOUT: %.Self.ref.loc11: %I.type.e7a = name_ref .Self, %.Self.2 [symbolic_self = constants.%.Self]
  1130. // CHECK:STDOUT: %.loc11_22.1: %I.assoc_type.b3c = specific_constant @T.%assoc0, @I(constants.%C) [concrete = constants.%assoc0.3e4]
  1131. // CHECK:STDOUT: %T.ref.loc11: %I.assoc_type.b3c = name_ref T, %.loc11_22.1 [concrete = constants.%assoc0.3e4]
  1132. // CHECK:STDOUT: %.Self.as_type.loc11: type = facet_access_type %.Self.ref.loc11 [symbolic_self = constants.%.Self.as_type]
  1133. // CHECK:STDOUT: %.loc11_22.2: type = converted %.Self.ref.loc11, %.Self.as_type.loc11 [symbolic_self = constants.%.Self.as_type]
  1134. // CHECK:STDOUT: %impl.elem0.loc11: type = impl_witness_access constants.%I.lookup_impl_witness, element0 [symbolic_self = constants.%impl.elem0]
  1135. // CHECK:STDOUT: %C.ref.loc11_27: type = name_ref C, file.%C.decl.loc6 [concrete = constants.%C]
  1136. // CHECK:STDOUT: %.loc11_16: type = where_expr %.Self.2 [concrete = constants.%I_where.type] {
  1137. // CHECK:STDOUT: requirement_rewrite %impl.elem0.loc11, %C.ref.loc11_27
  1138. // CHECK:STDOUT: }
  1139. // CHECK:STDOUT: }
  1140. // CHECK:STDOUT: }
  1141. // CHECK:STDOUT:
  1142. // CHECK:STDOUT: generic interface @I(%U.loc3_13.1: type) {
  1143. // CHECK:STDOUT: %U.loc3_13.2: type = bind_symbolic_name U, 0 [symbolic = %U.loc3_13.2 (constants.%U)]
  1144. // CHECK:STDOUT: %U.patt.loc3_13.2: type = symbolic_binding_pattern U, 0 [symbolic = %U.patt.loc3_13.2 (constants.%U.patt)]
  1145. // CHECK:STDOUT:
  1146. // CHECK:STDOUT: !definition:
  1147. // CHECK:STDOUT: %I.type: type = facet_type <@I, @I(%U.loc3_13.2)> [symbolic = %I.type (constants.%I.type.325)]
  1148. // CHECK:STDOUT: %Self.2: @I.%I.type (%I.type.325) = bind_symbolic_name Self, 1 [symbolic = %Self.2 (constants.%Self.209)]
  1149. // CHECK:STDOUT: %I.assoc_type: type = assoc_entity_type @I, @I(%U.loc3_13.2) [symbolic = %I.assoc_type (constants.%I.assoc_type.1e5)]
  1150. // CHECK:STDOUT: %assoc0: @I.%I.assoc_type (%I.assoc_type.1e5) = assoc_entity element0, %T [symbolic = %assoc0 (constants.%assoc0.7f3)]
  1151. // CHECK:STDOUT:
  1152. // CHECK:STDOUT: interface {
  1153. // CHECK:STDOUT: %Self.1: @I.%I.type (%I.type.325) = bind_symbolic_name Self, 1 [symbolic = %Self.2 (constants.%Self.209)]
  1154. // CHECK:STDOUT: %T: type = assoc_const_decl @T [concrete] {
  1155. // CHECK:STDOUT: %assoc0: @I.%I.assoc_type (%I.assoc_type.1e5) = assoc_entity element0, @I.%T [symbolic = @I.%assoc0 (constants.%assoc0.7f3)]
  1156. // CHECK:STDOUT: }
  1157. // CHECK:STDOUT:
  1158. // CHECK:STDOUT: !members:
  1159. // CHECK:STDOUT: .Self = %Self.1
  1160. // CHECK:STDOUT: .T = @T.%assoc0
  1161. // CHECK:STDOUT: witness = (%T)
  1162. // CHECK:STDOUT: }
  1163. // CHECK:STDOUT: }
  1164. // CHECK:STDOUT:
  1165. // CHECK:STDOUT: generic assoc_const @T(@I.%U.loc3_13.1: type, @I.%Self.1: @I.%I.type (%I.type.325)) {
  1166. // CHECK:STDOUT: assoc_const T:! type;
  1167. // CHECK:STDOUT: }
  1168. // CHECK:STDOUT:
  1169. // CHECK:STDOUT: impl @impl: %D.ref.loc8 as %.loc8_16 {
  1170. // CHECK:STDOUT: !members:
  1171. // CHECK:STDOUT: witness = file.%I.impl_witness
  1172. // CHECK:STDOUT: }
  1173. // CHECK:STDOUT:
  1174. // CHECK:STDOUT: class @C {
  1175. // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete = constants.%empty_struct_type]
  1176. // CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %empty_struct_type [concrete = constants.%complete_type]
  1177. // CHECK:STDOUT: complete_type_witness = %complete_type
  1178. // CHECK:STDOUT:
  1179. // CHECK:STDOUT: !members:
  1180. // CHECK:STDOUT: .Self = constants.%C
  1181. // CHECK:STDOUT: }
  1182. // CHECK:STDOUT:
  1183. // CHECK:STDOUT: class @D {
  1184. // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete = constants.%empty_struct_type]
  1185. // CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %empty_struct_type [concrete = constants.%complete_type]
  1186. // CHECK:STDOUT: complete_type_witness = %complete_type
  1187. // CHECK:STDOUT:
  1188. // CHECK:STDOUT: !members:
  1189. // CHECK:STDOUT: .Self = constants.%D
  1190. // CHECK:STDOUT: }
  1191. // CHECK:STDOUT:
  1192. // CHECK:STDOUT: specific @I(constants.%U) {
  1193. // CHECK:STDOUT: %U.loc3_13.2 => constants.%U
  1194. // CHECK:STDOUT: %U.patt.loc3_13.2 => constants.%U.patt
  1195. // CHECK:STDOUT: }
  1196. // CHECK:STDOUT:
  1197. // CHECK:STDOUT: specific @T(constants.%U, constants.%Self.209) {}
  1198. // CHECK:STDOUT:
  1199. // CHECK:STDOUT: specific @I(%U.loc3_13.2) {}
  1200. // CHECK:STDOUT:
  1201. // CHECK:STDOUT: specific @I(constants.%C) {
  1202. // CHECK:STDOUT: %U.loc3_13.2 => constants.%C
  1203. // CHECK:STDOUT: %U.patt.loc3_13.2 => constants.%U.patt
  1204. // CHECK:STDOUT:
  1205. // CHECK:STDOUT: !definition:
  1206. // CHECK:STDOUT: %I.type => constants.%I.type.e7a
  1207. // CHECK:STDOUT: %Self.2 => constants.%Self.b1d
  1208. // CHECK:STDOUT: %I.assoc_type => constants.%I.assoc_type.b3c
  1209. // CHECK:STDOUT: %assoc0 => constants.%assoc0.3e4
  1210. // CHECK:STDOUT: }
  1211. // CHECK:STDOUT:
  1212. // CHECK:STDOUT: specific @T(constants.%C, constants.%I.facet) {}
  1213. // CHECK:STDOUT:
  1214. // CHECK:STDOUT: --- find_incomplete_impl.carbon
  1215. // CHECK:STDOUT:
  1216. // CHECK:STDOUT: constants {
  1217. // CHECK:STDOUT: %I.type: type = facet_type <@I> [concrete]
  1218. // CHECK:STDOUT: %D: type = class_type @D [concrete]
  1219. // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete]
  1220. // CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %empty_struct_type [concrete]
  1221. // CHECK:STDOUT: %I.impl_witness: <witness> = impl_witness file.%I.impl_witness_table [concrete]
  1222. // CHECK:STDOUT: %T: %I.type = bind_symbolic_name T, 0 [symbolic]
  1223. // CHECK:STDOUT: %T.patt: %I.type = symbolic_binding_pattern T, 0 [symbolic]
  1224. // CHECK:STDOUT: %C.type: type = generic_class_type @C [concrete]
  1225. // CHECK:STDOUT: %C.generic: %C.type = struct_value () [concrete]
  1226. // CHECK:STDOUT: %C.54e: type = class_type @C, @C(%T) [symbolic]
  1227. // CHECK:STDOUT: %I.facet: %I.type = facet_value %D, (%I.impl_witness) [concrete]
  1228. // CHECK:STDOUT: %C.8b1: type = class_type @C, @C(%I.facet) [concrete]
  1229. // CHECK:STDOUT: %F.type: type = fn_type @F [concrete]
  1230. // CHECK:STDOUT: %F: %F.type = struct_value () [concrete]
  1231. // CHECK:STDOUT: %Self: %I.type = bind_symbolic_name Self, 0 [symbolic]
  1232. // CHECK:STDOUT: }
  1233. // CHECK:STDOUT:
  1234. // CHECK:STDOUT: imports {
  1235. // CHECK:STDOUT: %Core: <namespace> = namespace file.%Core.import, [concrete] {
  1236. // CHECK:STDOUT: import Core//prelude
  1237. // CHECK:STDOUT: }
  1238. // CHECK:STDOUT: }
  1239. // CHECK:STDOUT:
  1240. // CHECK:STDOUT: file {
  1241. // CHECK:STDOUT: package: <namespace> = namespace [concrete] {
  1242. // CHECK:STDOUT: .Core = imports.%Core
  1243. // CHECK:STDOUT: .I = %I.decl.loc3
  1244. // CHECK:STDOUT: .D = %D.decl
  1245. // CHECK:STDOUT: .C = %C.decl.loc6
  1246. // CHECK:STDOUT: .F = %F.decl.loc8
  1247. // CHECK:STDOUT: }
  1248. // CHECK:STDOUT: %Core.import = import Core
  1249. // CHECK:STDOUT: %I.decl.loc3: type = interface_decl @I [concrete = constants.%I.type] {} {}
  1250. // CHECK:STDOUT: %D.decl: type = class_decl @D [concrete = constants.%D] {} {}
  1251. // CHECK:STDOUT: impl_decl @impl [concrete] {} {
  1252. // CHECK:STDOUT: %D.ref.loc5: type = name_ref D, file.%D.decl [concrete = constants.%D]
  1253. // CHECK:STDOUT: %I.ref.loc5: type = name_ref I, file.%I.decl.loc3 [concrete = constants.%I.type]
  1254. // CHECK:STDOUT: }
  1255. // CHECK:STDOUT: %I.impl_witness_table = impl_witness_table (), @impl [concrete]
  1256. // CHECK:STDOUT: %I.impl_witness: <witness> = impl_witness %I.impl_witness_table [concrete = constants.%I.impl_witness]
  1257. // CHECK:STDOUT: %C.decl.loc6: %C.type = class_decl @C [concrete = constants.%C.generic] {
  1258. // CHECK:STDOUT: %T.patt.loc12: %I.type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc6 (constants.%T.patt)]
  1259. // CHECK:STDOUT: } {
  1260. // CHECK:STDOUT: %I.ref.loc6: type = name_ref I, file.%I.decl.loc3 [concrete = constants.%I.type]
  1261. // CHECK:STDOUT: %T.loc6_9.1: %I.type = bind_symbolic_name T, 0 [symbolic = %T.loc6_9.2 (constants.%T)]
  1262. // CHECK:STDOUT: }
  1263. // CHECK:STDOUT: %F.decl.loc8: %F.type = fn_decl @F [concrete = constants.%F] {
  1264. // CHECK:STDOUT: %x.patt: %C.8b1 = binding_pattern x
  1265. // CHECK:STDOUT: %x.param_patt: %C.8b1 = value_param_pattern %x.patt, call_param0
  1266. // CHECK:STDOUT: } {
  1267. // CHECK:STDOUT: %x.param.loc8: %C.8b1 = value_param call_param0
  1268. // CHECK:STDOUT: %.loc8_12.1: type = splice_block %C.loc8 [concrete = constants.%C.8b1] {
  1269. // CHECK:STDOUT: %C.ref.loc8: %C.type = name_ref C, file.%C.decl.loc6 [concrete = constants.%C.generic]
  1270. // CHECK:STDOUT: %D.ref.loc8: type = name_ref D, file.%D.decl [concrete = constants.%D]
  1271. // CHECK:STDOUT: %I.facet.loc8: %I.type = facet_value constants.%D, (constants.%I.impl_witness) [concrete = constants.%I.facet]
  1272. // CHECK:STDOUT: %.loc8_12.2: %I.type = converted %D.ref.loc8, %I.facet.loc8 [concrete = constants.%I.facet]
  1273. // CHECK:STDOUT: %C.loc8: type = class_type @C, @C(constants.%I.facet) [concrete = constants.%C.8b1]
  1274. // CHECK:STDOUT: }
  1275. // CHECK:STDOUT: %x.loc8: %C.8b1 = bind_name x, %x.param.loc8
  1276. // CHECK:STDOUT: }
  1277. // CHECK:STDOUT: %I.decl.loc10: type = interface_decl @I [concrete = constants.%I.type] {} {}
  1278. // CHECK:STDOUT: impl_decl @impl [concrete] {} {
  1279. // CHECK:STDOUT: %D.ref.loc11: type = name_ref D, file.%D.decl [concrete = constants.%D]
  1280. // CHECK:STDOUT: %I.ref.loc11: type = name_ref I, file.%I.decl.loc3 [concrete = constants.%I.type]
  1281. // CHECK:STDOUT: }
  1282. // CHECK:STDOUT: %C.decl.loc12: %C.type = class_decl @C [concrete = constants.%C.generic] {
  1283. // CHECK:STDOUT: %T.patt.loc12: %I.type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc6 (constants.%T.patt)]
  1284. // CHECK:STDOUT: } {
  1285. // CHECK:STDOUT: %I.ref.loc12: type = name_ref I, file.%I.decl.loc3 [concrete = constants.%I.type]
  1286. // CHECK:STDOUT: %T.loc12: %I.type = bind_symbolic_name T, 0 [symbolic = %T.loc6_9.2 (constants.%T)]
  1287. // CHECK:STDOUT: }
  1288. // CHECK:STDOUT: %F.decl.loc14: %F.type = fn_decl @F [concrete = constants.%F] {
  1289. // CHECK:STDOUT: %x.patt: %C.8b1 = binding_pattern x
  1290. // CHECK:STDOUT: %x.param_patt: %C.8b1 = value_param_pattern %x.patt, call_param0
  1291. // CHECK:STDOUT: } {
  1292. // CHECK:STDOUT: %x.param.loc14: %C.8b1 = value_param call_param0
  1293. // CHECK:STDOUT: %.loc14_12.1: type = splice_block %C.loc14 [concrete = constants.%C.8b1] {
  1294. // CHECK:STDOUT: %C.ref.loc14: %C.type = name_ref C, file.%C.decl.loc6 [concrete = constants.%C.generic]
  1295. // CHECK:STDOUT: %D.ref.loc14: type = name_ref D, file.%D.decl [concrete = constants.%D]
  1296. // CHECK:STDOUT: %I.facet.loc14: %I.type = facet_value constants.%D, (constants.%I.impl_witness) [concrete = constants.%I.facet]
  1297. // CHECK:STDOUT: %.loc14_12.2: %I.type = converted %D.ref.loc14, %I.facet.loc14 [concrete = constants.%I.facet]
  1298. // CHECK:STDOUT: %C.loc14: type = class_type @C, @C(constants.%I.facet) [concrete = constants.%C.8b1]
  1299. // CHECK:STDOUT: }
  1300. // CHECK:STDOUT: %x.loc14: %C.8b1 = bind_name x, %x.param.loc14
  1301. // CHECK:STDOUT: }
  1302. // CHECK:STDOUT: }
  1303. // CHECK:STDOUT:
  1304. // CHECK:STDOUT: interface @I {
  1305. // CHECK:STDOUT: %Self: %I.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self]
  1306. // CHECK:STDOUT:
  1307. // CHECK:STDOUT: !members:
  1308. // CHECK:STDOUT: .Self = %Self
  1309. // CHECK:STDOUT: witness = ()
  1310. // CHECK:STDOUT: }
  1311. // CHECK:STDOUT:
  1312. // CHECK:STDOUT: impl @impl: %D.ref.loc5 as %I.ref.loc5 {
  1313. // CHECK:STDOUT: !members:
  1314. // CHECK:STDOUT: witness = file.%I.impl_witness
  1315. // CHECK:STDOUT: }
  1316. // CHECK:STDOUT:
  1317. // CHECK:STDOUT: class @D {
  1318. // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete = constants.%empty_struct_type]
  1319. // CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %empty_struct_type [concrete = constants.%complete_type]
  1320. // CHECK:STDOUT: complete_type_witness = %complete_type
  1321. // CHECK:STDOUT:
  1322. // CHECK:STDOUT: !members:
  1323. // CHECK:STDOUT: .Self = constants.%D
  1324. // CHECK:STDOUT: }
  1325. // CHECK:STDOUT:
  1326. // CHECK:STDOUT: generic class @C(%T.loc6_9.1: %I.type) {
  1327. // CHECK:STDOUT: %T.loc6_9.2: %I.type = bind_symbolic_name T, 0 [symbolic = %T.loc6_9.2 (constants.%T)]
  1328. // CHECK:STDOUT: %T.patt.loc6: %I.type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc6 (constants.%T.patt)]
  1329. // CHECK:STDOUT:
  1330. // CHECK:STDOUT: !definition:
  1331. // CHECK:STDOUT:
  1332. // CHECK:STDOUT: class {
  1333. // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete = constants.%empty_struct_type]
  1334. // CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %empty_struct_type [concrete = constants.%complete_type]
  1335. // CHECK:STDOUT: complete_type_witness = %complete_type
  1336. // CHECK:STDOUT:
  1337. // CHECK:STDOUT: !members:
  1338. // CHECK:STDOUT: .Self = constants.%C.54e
  1339. // CHECK:STDOUT: }
  1340. // CHECK:STDOUT: }
  1341. // CHECK:STDOUT:
  1342. // CHECK:STDOUT: fn @F(%x.param.loc14: %C.8b1) {
  1343. // CHECK:STDOUT: !entry:
  1344. // CHECK:STDOUT: return
  1345. // CHECK:STDOUT: }
  1346. // CHECK:STDOUT:
  1347. // CHECK:STDOUT: specific @C(constants.%T) {
  1348. // CHECK:STDOUT: %T.loc6_9.2 => constants.%T
  1349. // CHECK:STDOUT: %T.patt.loc6 => constants.%T.patt
  1350. // CHECK:STDOUT: }
  1351. // CHECK:STDOUT:
  1352. // CHECK:STDOUT: specific @C(constants.%I.facet) {
  1353. // CHECK:STDOUT: %T.loc6_9.2 => constants.%I.facet
  1354. // CHECK:STDOUT: %T.patt.loc6 => constants.%T.patt
  1355. // CHECK:STDOUT:
  1356. // CHECK:STDOUT: !definition:
  1357. // CHECK:STDOUT: }
  1358. // CHECK:STDOUT:
  1359. // CHECK:STDOUT: --- fail_todo_two_interfaces.carbon
  1360. // CHECK:STDOUT:
  1361. // CHECK:STDOUT: constants {
  1362. // CHECK:STDOUT: %I.type: type = facet_type <@I> [concrete]
  1363. // CHECK:STDOUT: %J.type: type = facet_type <@J> [concrete]
  1364. // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete]
  1365. // CHECK:STDOUT: %BitAnd.type: type = facet_type <@BitAnd> [concrete]
  1366. // CHECK:STDOUT: %Self.25f: %BitAnd.type = bind_symbolic_name Self, 0 [symbolic]
  1367. // CHECK:STDOUT: %BitAnd.assoc_type: type = assoc_entity_type @BitAnd [concrete]
  1368. // CHECK:STDOUT: %assoc0: %BitAnd.assoc_type = assoc_entity element0, imports.%Core.import_ref.a93 [concrete]
  1369. // CHECK:STDOUT: %Op.type.27a: type = fn_type @Op.1 [concrete]
  1370. // CHECK:STDOUT: %Self.as_type: type = facet_access_type %Self.25f [symbolic]
  1371. // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic]
  1372. // CHECK:STDOUT: %T.patt: type = symbolic_binding_pattern T, 0 [symbolic]
  1373. // CHECK:STDOUT: %BitAnd.impl_witness_table = impl_witness_table (imports.%Core.import_ref.1e6), @impl.f92 [concrete]
  1374. // CHECK:STDOUT: %BitAnd.impl_witness.b7b: <witness> = impl_witness %BitAnd.impl_witness_table, @impl.f92(%T) [symbolic]
  1375. // CHECK:STDOUT: %Op.type.f99: type = fn_type @Op.2, @impl.f92(%T) [symbolic]
  1376. // CHECK:STDOUT: %Op.05a: %Op.type.f99 = struct_value () [symbolic]
  1377. // CHECK:STDOUT: %require_complete: <witness> = require_complete_type %T [symbolic]
  1378. // CHECK:STDOUT: %BitAnd.impl_witness.0e5: <witness> = impl_witness %BitAnd.impl_witness_table, @impl.f92(type) [concrete]
  1379. // CHECK:STDOUT: %Op.type.eb8: type = fn_type @Op.2, @impl.f92(type) [concrete]
  1380. // CHECK:STDOUT: %Op.444: %Op.type.eb8 = struct_value () [concrete]
  1381. // CHECK:STDOUT: %complete_type: <witness> = complete_type_witness type [concrete]
  1382. // CHECK:STDOUT: %BitAnd.facet: %BitAnd.type = facet_value type, (%BitAnd.impl_witness.0e5) [concrete]
  1383. // CHECK:STDOUT: %.518: type = fn_type_with_self_type %Op.type.27a, %BitAnd.facet [concrete]
  1384. // CHECK:STDOUT: %Op.bound: <bound method> = bound_method %I.type, %Op.444 [concrete]
  1385. // CHECK:STDOUT: %Op.specific_fn: <specific function> = specific_function %Op.444, @Op.2(type) [concrete]
  1386. // CHECK:STDOUT: %bound_method: <bound method> = bound_method %I.type, %Op.specific_fn [concrete]
  1387. // CHECK:STDOUT: %facet_type: type = facet_type <@I & @J> [concrete]
  1388. // CHECK:STDOUT: %Self.826: %I.type = bind_symbolic_name Self, 0 [symbolic]
  1389. // CHECK:STDOUT: %Self.ccd: %J.type = bind_symbolic_name Self, 0 [symbolic]
  1390. // CHECK:STDOUT: }
  1391. // CHECK:STDOUT:
  1392. // CHECK:STDOUT: imports {
  1393. // CHECK:STDOUT: %Core: <namespace> = namespace file.%Core.import, [concrete] {
  1394. // CHECK:STDOUT: .BitAnd = %Core.BitAnd
  1395. // CHECK:STDOUT: import Core//prelude
  1396. // CHECK:STDOUT: }
  1397. // CHECK:STDOUT: %Core.import_ref.ad0 = import_ref Core//prelude, inst102 [no loc], unloaded
  1398. // CHECK:STDOUT: %Core.import_ref.a46: %BitAnd.assoc_type = import_ref Core//prelude, loc18_41, loaded [concrete = constants.%assoc0]
  1399. // CHECK:STDOUT: %Core.Op = import_ref Core//prelude, Op, unloaded
  1400. // CHECK:STDOUT: %Core.import_ref.040: %BitAnd.type = import_ref Core//prelude, inst102 [no loc], loaded [symbolic = constants.%Self.25f]
  1401. // CHECK:STDOUT: %Core.import_ref.140: <witness> = import_ref Core//prelude, loc21_36, loaded [symbolic = @impl.f92.%BitAnd.impl_witness (constants.%BitAnd.impl_witness.b7b)]
  1402. // CHECK:STDOUT: %Core.import_ref.5ab3ec.1: type = import_ref Core//prelude, loc21_14, loaded [symbolic = @impl.f92.%T (constants.%T)]
  1403. // CHECK:STDOUT: %Core.import_ref.583: type = import_ref Core//prelude, loc21_24, loaded [symbolic = @impl.f92.%T (constants.%T)]
  1404. // CHECK:STDOUT: %Core.import_ref.9c1: type = import_ref Core//prelude, loc21_29, loaded [concrete = constants.%BitAnd.type]
  1405. // CHECK:STDOUT: %Core.import_ref.5ab3ec.2: type = import_ref Core//prelude, loc21_14, loaded [symbolic = @impl.f92.%T (constants.%T)]
  1406. // CHECK:STDOUT: }
  1407. // CHECK:STDOUT:
  1408. // CHECK:STDOUT: file {
  1409. // CHECK:STDOUT: package: <namespace> = namespace [concrete] {
  1410. // CHECK:STDOUT: .Core = imports.%Core
  1411. // CHECK:STDOUT: .I = %I.decl.loc3
  1412. // CHECK:STDOUT: .J = %J.decl.loc4
  1413. // CHECK:STDOUT: }
  1414. // CHECK:STDOUT: %Core.import = import Core
  1415. // CHECK:STDOUT: %I.decl.loc3: type = interface_decl @I [concrete = constants.%I.type] {} {}
  1416. // CHECK:STDOUT: %J.decl.loc4: type = interface_decl @J [concrete = constants.%J.type] {} {}
  1417. // CHECK:STDOUT: %.loc10_14.1: type = value_of_initializer @impl.be3.%type.and [concrete = constants.%facet_type]
  1418. // CHECK:STDOUT: %.loc10_14.2: type = converted @impl.be3.%type.and, %.loc10_14.1 [concrete = constants.%facet_type]
  1419. // CHECK:STDOUT: impl_decl @impl.be3 [concrete] {} {
  1420. // CHECK:STDOUT: %.loc10_7.1: %empty_struct_type = struct_literal ()
  1421. // CHECK:STDOUT: %.loc10_7.2: type = converted %.loc10_7.1, constants.%empty_struct_type [concrete = constants.%empty_struct_type]
  1422. // CHECK:STDOUT: %I.ref: type = name_ref I, file.%I.decl.loc3 [concrete = constants.%I.type]
  1423. // CHECK:STDOUT: %J.ref: type = name_ref J, file.%J.decl.loc4 [concrete = constants.%J.type]
  1424. // CHECK:STDOUT: %impl.elem0: %.518 = impl_witness_access constants.%BitAnd.impl_witness.0e5, element0 [concrete = constants.%Op.444]
  1425. // CHECK:STDOUT: %bound_method.loc10_14.1: <bound method> = bound_method %I.ref, %impl.elem0 [concrete = constants.%Op.bound]
  1426. // CHECK:STDOUT: %specific_fn: <specific function> = specific_function %impl.elem0, @Op.2(type) [concrete = constants.%Op.specific_fn]
  1427. // CHECK:STDOUT: %bound_method.loc10_14.2: <bound method> = bound_method %I.ref, %specific_fn [concrete = constants.%bound_method]
  1428. // CHECK:STDOUT: %type.and: init type = call %bound_method.loc10_14.2(%I.ref, %J.ref) [concrete = constants.%facet_type]
  1429. // CHECK:STDOUT: }
  1430. // CHECK:STDOUT: %I.decl.loc12: type = interface_decl @I [concrete = constants.%I.type] {} {}
  1431. // CHECK:STDOUT: %J.decl.loc13: type = interface_decl @J [concrete = constants.%J.type] {} {}
  1432. // CHECK:STDOUT: }
  1433. // CHECK:STDOUT:
  1434. // CHECK:STDOUT: interface @I {
  1435. // CHECK:STDOUT: %Self: %I.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self.826]
  1436. // CHECK:STDOUT:
  1437. // CHECK:STDOUT: !members:
  1438. // CHECK:STDOUT: .Self = %Self
  1439. // CHECK:STDOUT: witness = ()
  1440. // CHECK:STDOUT: }
  1441. // CHECK:STDOUT:
  1442. // CHECK:STDOUT: interface @J {
  1443. // CHECK:STDOUT: %Self: %J.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self.ccd]
  1444. // CHECK:STDOUT:
  1445. // CHECK:STDOUT: !members:
  1446. // CHECK:STDOUT: .Self = %Self
  1447. // CHECK:STDOUT: witness = ()
  1448. // CHECK:STDOUT: }
  1449. // CHECK:STDOUT:
  1450. // CHECK:STDOUT: interface @BitAnd [from "include_files/facet_types.carbon"] {
  1451. // CHECK:STDOUT: !members:
  1452. // CHECK:STDOUT: .Self = imports.%Core.import_ref.ad0
  1453. // CHECK:STDOUT: .Op = imports.%Core.import_ref.a46
  1454. // CHECK:STDOUT: witness = (imports.%Core.Op)
  1455. // CHECK:STDOUT: }
  1456. // CHECK:STDOUT:
  1457. // CHECK:STDOUT: generic impl @impl.f92(imports.%Core.import_ref.5ab3ec.1: type) [from "include_files/facet_types.carbon"] {
  1458. // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic = %T (constants.%T)]
  1459. // CHECK:STDOUT: %T.patt: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt (constants.%T.patt)]
  1460. // CHECK:STDOUT: %BitAnd.impl_witness: <witness> = impl_witness constants.%BitAnd.impl_witness_table, @impl.f92(%T) [symbolic = %BitAnd.impl_witness (constants.%BitAnd.impl_witness.b7b)]
  1461. // CHECK:STDOUT:
  1462. // CHECK:STDOUT: !definition:
  1463. // CHECK:STDOUT: %Op.type: type = fn_type @Op.2, @impl.f92(%T) [symbolic = %Op.type (constants.%Op.type.f99)]
  1464. // CHECK:STDOUT: %Op: @impl.f92.%Op.type (%Op.type.f99) = struct_value () [symbolic = %Op (constants.%Op.05a)]
  1465. // CHECK:STDOUT: %require_complete: <witness> = require_complete_type %T [symbolic = %require_complete (constants.%require_complete)]
  1466. // CHECK:STDOUT:
  1467. // CHECK:STDOUT: impl: imports.%Core.import_ref.583 as imports.%Core.import_ref.9c1 {
  1468. // CHECK:STDOUT: !members:
  1469. // CHECK:STDOUT: witness = imports.%Core.import_ref.140
  1470. // CHECK:STDOUT: }
  1471. // CHECK:STDOUT: }
  1472. // CHECK:STDOUT:
  1473. // CHECK:STDOUT: impl @impl.be3: %.loc10_7.2 as file.%.loc10_14.2;
  1474. // CHECK:STDOUT:
  1475. // CHECK:STDOUT: generic fn @Op.1(imports.%Core.import_ref.040: %BitAnd.type) [from "include_files/facet_types.carbon"] {
  1476. // CHECK:STDOUT: %Self: %BitAnd.type = bind_symbolic_name Self, 0 [symbolic = %Self (constants.%Self.25f)]
  1477. // CHECK:STDOUT: %Self.as_type: type = facet_access_type %Self [symbolic = %Self.as_type (constants.%Self.as_type)]
  1478. // CHECK:STDOUT:
  1479. // CHECK:STDOUT: fn;
  1480. // CHECK:STDOUT: }
  1481. // CHECK:STDOUT:
  1482. // CHECK:STDOUT: generic fn @Op.2(imports.%Core.import_ref.5ab3ec.2: type) [from "include_files/facet_types.carbon"] {
  1483. // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic = %T (constants.%T)]
  1484. // CHECK:STDOUT:
  1485. // CHECK:STDOUT: !definition:
  1486. // CHECK:STDOUT:
  1487. // CHECK:STDOUT: fn = "type.and";
  1488. // CHECK:STDOUT: }
  1489. // CHECK:STDOUT:
  1490. // CHECK:STDOUT: specific @Op.1(constants.%Self.25f) {
  1491. // CHECK:STDOUT: %Self => constants.%Self.25f
  1492. // CHECK:STDOUT: %Self.as_type => constants.%Self.as_type
  1493. // CHECK:STDOUT: }
  1494. // CHECK:STDOUT:
  1495. // CHECK:STDOUT: specific @impl.f92(constants.%T) {
  1496. // CHECK:STDOUT: %T => constants.%T
  1497. // CHECK:STDOUT: %T.patt => constants.%T.patt
  1498. // CHECK:STDOUT: %BitAnd.impl_witness => constants.%BitAnd.impl_witness.b7b
  1499. // CHECK:STDOUT: }
  1500. // CHECK:STDOUT:
  1501. // CHECK:STDOUT: specific @impl.f92(%T) {}
  1502. // CHECK:STDOUT:
  1503. // CHECK:STDOUT: specific @Op.2(constants.%T) {
  1504. // CHECK:STDOUT: %T => constants.%T
  1505. // CHECK:STDOUT: }
  1506. // CHECK:STDOUT:
  1507. // CHECK:STDOUT: specific @impl.f92(type) {
  1508. // CHECK:STDOUT: %T => type
  1509. // CHECK:STDOUT: %T.patt => constants.%T.patt
  1510. // CHECK:STDOUT: %BitAnd.impl_witness => constants.%BitAnd.impl_witness.0e5
  1511. // CHECK:STDOUT:
  1512. // CHECK:STDOUT: !definition:
  1513. // CHECK:STDOUT: %Op.type => constants.%Op.type.eb8
  1514. // CHECK:STDOUT: %Op => constants.%Op.444
  1515. // CHECK:STDOUT: %require_complete => constants.%complete_type
  1516. // CHECK:STDOUT: }
  1517. // CHECK:STDOUT:
  1518. // CHECK:STDOUT: specific @Op.2(type) {
  1519. // CHECK:STDOUT: %T => type
  1520. // CHECK:STDOUT:
  1521. // CHECK:STDOUT: !definition:
  1522. // CHECK:STDOUT: }
  1523. // CHECK:STDOUT:
  1524. // CHECK:STDOUT: --- fail_never_assigned_associated_const.carbon
  1525. // CHECK:STDOUT:
  1526. // CHECK:STDOUT: constants {
  1527. // CHECK:STDOUT: %I.type: type = facet_type <@I> [concrete]
  1528. // CHECK:STDOUT: %Self: %I.type = bind_symbolic_name Self, 0 [symbolic]
  1529. // CHECK:STDOUT: %I.assoc_type: type = assoc_entity_type @I [concrete]
  1530. // CHECK:STDOUT: %assoc0: %I.assoc_type = assoc_entity element0, @I.%T [concrete]
  1531. // CHECK:STDOUT: %assoc1: %I.assoc_type = assoc_entity element1, @I.%U [concrete]
  1532. // CHECK:STDOUT: %C: type = class_type @C [concrete]
  1533. // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete]
  1534. // CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %empty_struct_type [concrete]
  1535. // CHECK:STDOUT: %.Self: %I.type = bind_symbolic_name .Self [symbolic_self]
  1536. // CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self [symbolic_self]
  1537. // CHECK:STDOUT: %I.lookup_impl_witness: <witness> = lookup_impl_witness %.Self, @I [symbolic_self]
  1538. // CHECK:STDOUT: %I.facet: %I.type = facet_value %.Self.as_type, (%I.lookup_impl_witness) [symbolic_self]
  1539. // CHECK:STDOUT: %impl.elem0: type = impl_witness_access %I.lookup_impl_witness, element0 [symbolic_self]
  1540. // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete]
  1541. // CHECK:STDOUT: %I_where.type: type = facet_type <@I where %impl.elem0 = %empty_tuple.type> [concrete]
  1542. // CHECK:STDOUT: %I.impl_witness: <witness> = impl_witness file.%I.impl_witness_table [concrete]
  1543. // CHECK:STDOUT: }
  1544. // CHECK:STDOUT:
  1545. // CHECK:STDOUT: imports {
  1546. // CHECK:STDOUT: %Core: <namespace> = namespace file.%Core.import, [concrete] {
  1547. // CHECK:STDOUT: import Core//prelude
  1548. // CHECK:STDOUT: }
  1549. // CHECK:STDOUT: }
  1550. // CHECK:STDOUT:
  1551. // CHECK:STDOUT: file {
  1552. // CHECK:STDOUT: package: <namespace> = namespace [concrete] {
  1553. // CHECK:STDOUT: .Core = imports.%Core
  1554. // CHECK:STDOUT: .I = %I.decl
  1555. // CHECK:STDOUT: .C = %C.decl
  1556. // CHECK:STDOUT: }
  1557. // CHECK:STDOUT: %Core.import = import Core
  1558. // CHECK:STDOUT: %I.decl: type = interface_decl @I [concrete = constants.%I.type] {} {}
  1559. // CHECK:STDOUT: %C.decl: type = class_decl @C [concrete = constants.%C] {} {}
  1560. // CHECK:STDOUT: impl_decl @impl [concrete] {} {
  1561. // CHECK:STDOUT: %C.ref.loc9: type = name_ref C, file.%C.decl [concrete = constants.%C]
  1562. // CHECK:STDOUT: %I.ref.loc9: type = name_ref I, file.%I.decl [concrete = constants.%I.type]
  1563. // CHECK:STDOUT: %.Self.1: %I.type = bind_symbolic_name .Self [symbolic_self = constants.%.Self]
  1564. // CHECK:STDOUT: %.Self.ref.loc9: %I.type = name_ref .Self, %.Self.1 [symbolic_self = constants.%.Self]
  1565. // CHECK:STDOUT: %T.ref.loc9: %I.assoc_type = name_ref T, @T.%assoc0 [concrete = constants.%assoc0]
  1566. // CHECK:STDOUT: %.Self.as_type.loc9: type = facet_access_type %.Self.ref.loc9 [symbolic_self = constants.%.Self.as_type]
  1567. // CHECK:STDOUT: %.loc9_19: type = converted %.Self.ref.loc9, %.Self.as_type.loc9 [symbolic_self = constants.%.Self.as_type]
  1568. // CHECK:STDOUT: %impl.elem0.loc9: type = impl_witness_access constants.%I.lookup_impl_witness, element0 [symbolic_self = constants.%impl.elem0]
  1569. // CHECK:STDOUT: %.loc9_25.1: %empty_tuple.type = tuple_literal ()
  1570. // CHECK:STDOUT: %.loc9_25.2: type = converted %.loc9_25.1, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type]
  1571. // CHECK:STDOUT: %.loc9_13: type = where_expr %.Self.1 [concrete = constants.%I_where.type] {
  1572. // CHECK:STDOUT: requirement_rewrite %impl.elem0.loc9, %.loc9_25.2
  1573. // CHECK:STDOUT: }
  1574. // CHECK:STDOUT: }
  1575. // CHECK:STDOUT: %I.impl_witness_table = impl_witness_table (%impl_witness_assoc_constant, <error>), @impl [concrete]
  1576. // CHECK:STDOUT: %I.impl_witness: <witness> = impl_witness %I.impl_witness_table [concrete = constants.%I.impl_witness]
  1577. // CHECK:STDOUT: %impl_witness_assoc_constant: type = impl_witness_assoc_constant constants.%empty_tuple.type [concrete = constants.%empty_tuple.type]
  1578. // CHECK:STDOUT: impl_decl @impl [concrete] {} {
  1579. // CHECK:STDOUT: %C.ref.loc18: type = name_ref C, file.%C.decl [concrete = constants.%C]
  1580. // CHECK:STDOUT: %I.ref.loc18: type = name_ref I, file.%I.decl [concrete = constants.%I.type]
  1581. // CHECK:STDOUT: %.Self.2: %I.type = bind_symbolic_name .Self [symbolic_self = constants.%.Self]
  1582. // CHECK:STDOUT: %.Self.ref.loc18: %I.type = name_ref .Self, %.Self.2 [symbolic_self = constants.%.Self]
  1583. // CHECK:STDOUT: %T.ref.loc18: %I.assoc_type = name_ref T, @T.%assoc0 [concrete = constants.%assoc0]
  1584. // CHECK:STDOUT: %.Self.as_type.loc18: type = facet_access_type %.Self.ref.loc18 [symbolic_self = constants.%.Self.as_type]
  1585. // CHECK:STDOUT: %.loc18_19: type = converted %.Self.ref.loc18, %.Self.as_type.loc18 [symbolic_self = constants.%.Self.as_type]
  1586. // CHECK:STDOUT: %impl.elem0.loc18: type = impl_witness_access constants.%I.lookup_impl_witness, element0 [symbolic_self = constants.%impl.elem0]
  1587. // CHECK:STDOUT: %.loc18_25.1: %empty_tuple.type = tuple_literal ()
  1588. // CHECK:STDOUT: %.loc18_25.2: type = converted %.loc18_25.1, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type]
  1589. // CHECK:STDOUT: %.loc18_13: type = where_expr %.Self.2 [concrete = constants.%I_where.type] {
  1590. // CHECK:STDOUT: requirement_rewrite %impl.elem0.loc18, %.loc18_25.2
  1591. // CHECK:STDOUT: }
  1592. // CHECK:STDOUT: }
  1593. // CHECK:STDOUT: }
  1594. // CHECK:STDOUT:
  1595. // CHECK:STDOUT: interface @I {
  1596. // CHECK:STDOUT: %Self: %I.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self]
  1597. // CHECK:STDOUT: %T: type = assoc_const_decl @T [concrete] {
  1598. // CHECK:STDOUT: %assoc0: %I.assoc_type = assoc_entity element0, @I.%T [concrete = constants.%assoc0]
  1599. // CHECK:STDOUT: }
  1600. // CHECK:STDOUT: %U: type = assoc_const_decl @U [concrete] {
  1601. // CHECK:STDOUT: %assoc1: %I.assoc_type = assoc_entity element1, @I.%U [concrete = constants.%assoc1]
  1602. // CHECK:STDOUT: }
  1603. // CHECK:STDOUT:
  1604. // CHECK:STDOUT: !members:
  1605. // CHECK:STDOUT: .Self = %Self
  1606. // CHECK:STDOUT: .T = @T.%assoc0
  1607. // CHECK:STDOUT: .U = @U.%assoc1
  1608. // CHECK:STDOUT: witness = (%T, %U)
  1609. // CHECK:STDOUT: }
  1610. // CHECK:STDOUT:
  1611. // CHECK:STDOUT: generic assoc_const @T(@I.%Self: %I.type) {
  1612. // CHECK:STDOUT: assoc_const T:! type;
  1613. // CHECK:STDOUT: }
  1614. // CHECK:STDOUT:
  1615. // CHECK:STDOUT: generic assoc_const @U(@I.%Self: %I.type) {
  1616. // CHECK:STDOUT: assoc_const U:! type;
  1617. // CHECK:STDOUT: }
  1618. // CHECK:STDOUT:
  1619. // CHECK:STDOUT: impl @impl: %C.ref.loc9 as %.loc9_13 {
  1620. // CHECK:STDOUT: !members:
  1621. // CHECK:STDOUT: witness = file.%I.impl_witness
  1622. // CHECK:STDOUT: }
  1623. // CHECK:STDOUT:
  1624. // CHECK:STDOUT: class @C {
  1625. // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete = constants.%empty_struct_type]
  1626. // CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %empty_struct_type [concrete = constants.%complete_type]
  1627. // CHECK:STDOUT: complete_type_witness = %complete_type
  1628. // CHECK:STDOUT:
  1629. // CHECK:STDOUT: !members:
  1630. // CHECK:STDOUT: .Self = constants.%C
  1631. // CHECK:STDOUT: }
  1632. // CHECK:STDOUT:
  1633. // CHECK:STDOUT: specific @T(constants.%Self) {}
  1634. // CHECK:STDOUT:
  1635. // CHECK:STDOUT: specific @U(constants.%Self) {}
  1636. // CHECK:STDOUT:
  1637. // CHECK:STDOUT: specific @T(constants.%I.facet) {}
  1638. // CHECK:STDOUT:
  1639. // CHECK:STDOUT: --- example_from_proposal_5168.carbon
  1640. // CHECK:STDOUT:
  1641. // CHECK:STDOUT: constants {
  1642. // CHECK:STDOUT: %X.type: type = facet_type <@X> [concrete]
  1643. // CHECK:STDOUT: %U: %X.type = bind_symbolic_name U, 0 [symbolic]
  1644. // CHECK:STDOUT: %U.patt: %X.type = symbolic_binding_pattern U, 0 [symbolic]
  1645. // CHECK:STDOUT: %F.type: type = fn_type @F [concrete]
  1646. // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete]
  1647. // CHECK:STDOUT: %F: %F.type = struct_value () [concrete]
  1648. // CHECK:STDOUT: %U.as_type: type = facet_access_type %U [symbolic]
  1649. // CHECK:STDOUT: %G.type: type = fn_type @G [concrete]
  1650. // CHECK:STDOUT: %G: %G.type = struct_value () [concrete]
  1651. // CHECK:STDOUT: %C: type = class_type @C [concrete]
  1652. // CHECK:STDOUT: %X.impl_witness: <witness> = impl_witness file.%X.impl_witness_table [concrete]
  1653. // CHECK:STDOUT: %Y.type: type = facet_type <@Y> [concrete]
  1654. // CHECK:STDOUT: %Self.e5e: %X.type = bind_symbolic_name Self, 0 [symbolic]
  1655. // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete]
  1656. // CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %empty_struct_type [concrete]
  1657. // CHECK:STDOUT: %H.type: type = fn_type @H [concrete]
  1658. // CHECK:STDOUT: %H: %H.type = struct_value () [concrete]
  1659. // CHECK:STDOUT: %X.facet: %X.type = facet_value %C, (%X.impl_witness) [concrete]
  1660. // CHECK:STDOUT: %F.specific_fn: <specific function> = specific_function %F, @F(%X.facet) [concrete]
  1661. // CHECK:STDOUT: %G.specific_fn: <specific function> = specific_function %G, @G(%X.facet) [concrete]
  1662. // CHECK:STDOUT: %Self.b29: %Y.type = bind_symbolic_name Self, 0 [symbolic]
  1663. // CHECK:STDOUT: %require_complete: <witness> = require_complete_type %U.as_type [symbolic]
  1664. // CHECK:STDOUT: %Y.impl_witness: <witness> = impl_witness file.%Y.impl_witness_table [concrete]
  1665. // CHECK:STDOUT: }
  1666. // CHECK:STDOUT:
  1667. // CHECK:STDOUT: imports {
  1668. // CHECK:STDOUT: %Core: <namespace> = namespace file.%Core.import, [concrete] {
  1669. // CHECK:STDOUT: import Core//prelude
  1670. // CHECK:STDOUT: }
  1671. // CHECK:STDOUT: }
  1672. // CHECK:STDOUT:
  1673. // CHECK:STDOUT: file {
  1674. // CHECK:STDOUT: package: <namespace> = namespace [concrete] {
  1675. // CHECK:STDOUT: .Core = imports.%Core
  1676. // CHECK:STDOUT: .X = %X.decl.loc3
  1677. // CHECK:STDOUT: .F = %F.decl.loc6
  1678. // CHECK:STDOUT: .G = %G.decl.loc7
  1679. // CHECK:STDOUT: .C = %C.decl.loc9
  1680. // CHECK:STDOUT: .Y = %Y.decl.loc14
  1681. // CHECK:STDOUT: .H = %H.decl
  1682. // CHECK:STDOUT: }
  1683. // CHECK:STDOUT: %Core.import = import Core
  1684. // CHECK:STDOUT: %X.decl.loc3: type = interface_decl @X [concrete = constants.%X.type] {} {}
  1685. // CHECK:STDOUT: %F.decl.loc6: %F.type = fn_decl @F [concrete = constants.%F] {
  1686. // CHECK:STDOUT: %U.patt.loc34: %X.type = symbolic_binding_pattern U, 0 [symbolic = %U.patt.loc6 (constants.%U.patt)]
  1687. // CHECK:STDOUT: } {
  1688. // CHECK:STDOUT: %X.ref.loc6: type = name_ref X, file.%X.decl.loc3 [concrete = constants.%X.type]
  1689. // CHECK:STDOUT: %U.loc6_6.1: %X.type = bind_symbolic_name U, 0 [symbolic = %U.loc6_6.2 (constants.%U)]
  1690. // CHECK:STDOUT: }
  1691. // CHECK:STDOUT: %G.decl.loc7: %G.type = fn_decl @G [concrete = constants.%G] {
  1692. // CHECK:STDOUT: %U.patt.loc35: %X.type = symbolic_binding_pattern U, 0 [symbolic = %U.patt.loc7 (constants.%U.patt)]
  1693. // CHECK:STDOUT: %u.patt: @G.%U.as_type.loc7_16.2 (%U.as_type) = binding_pattern u
  1694. // CHECK:STDOUT: %u.param_patt: @G.%U.as_type.loc7_16.2 (%U.as_type) = value_param_pattern %u.patt, call_param0
  1695. // CHECK:STDOUT: } {
  1696. // CHECK:STDOUT: %X.ref.loc7: type = name_ref X, file.%X.decl.loc3 [concrete = constants.%X.type]
  1697. // CHECK:STDOUT: %U.loc7_6.1: %X.type = bind_symbolic_name U, 0 [symbolic = %U.loc7_6.2 (constants.%U)]
  1698. // CHECK:STDOUT: %u.param.loc7: @G.%U.as_type.loc7_16.2 (%U.as_type) = value_param call_param0
  1699. // CHECK:STDOUT: %.loc7_16.1: type = splice_block %.loc7_16.2 [symbolic = %U.as_type.loc7_16.2 (constants.%U.as_type)] {
  1700. // CHECK:STDOUT: %U.ref.loc7: %X.type = name_ref U, %U.loc7_6.1 [symbolic = %U.loc7_6.2 (constants.%U)]
  1701. // CHECK:STDOUT: %U.as_type.loc7_16.1: type = facet_access_type %U.ref.loc7 [symbolic = %U.as_type.loc7_16.2 (constants.%U.as_type)]
  1702. // CHECK:STDOUT: %.loc7_16.2: type = converted %U.ref.loc7, %U.as_type.loc7_16.1 [symbolic = %U.as_type.loc7_16.2 (constants.%U.as_type)]
  1703. // CHECK:STDOUT: }
  1704. // CHECK:STDOUT: %u.loc7: @G.%U.as_type.loc7_16.2 (%U.as_type) = bind_name u, %u.param.loc7
  1705. // CHECK:STDOUT: }
  1706. // CHECK:STDOUT: %C.decl.loc9: type = class_decl @C [concrete = constants.%C] {} {}
  1707. // CHECK:STDOUT: impl_decl @impl.10e [concrete] {} {
  1708. // CHECK:STDOUT: %C.ref.loc12: type = name_ref C, file.%C.decl.loc9 [concrete = constants.%C]
  1709. // CHECK:STDOUT: %X.ref.loc12: type = name_ref X, file.%X.decl.loc3 [concrete = constants.%X.type]
  1710. // CHECK:STDOUT: }
  1711. // CHECK:STDOUT: %X.impl_witness_table = impl_witness_table (), @impl.10e [concrete]
  1712. // CHECK:STDOUT: %X.impl_witness: <witness> = impl_witness %X.impl_witness_table [concrete = constants.%X.impl_witness]
  1713. // CHECK:STDOUT: %Y.decl.loc14: type = interface_decl @Y [concrete = constants.%Y.type] {} {}
  1714. // CHECK:STDOUT: %X.decl.loc16: type = interface_decl @X [concrete = constants.%X.type] {} {}
  1715. // CHECK:STDOUT: %C.decl.loc23: type = class_decl @C [concrete = constants.%C] {} {}
  1716. // CHECK:STDOUT: %H.decl: %H.type = fn_decl @H [concrete = constants.%H] {
  1717. // CHECK:STDOUT: %c.patt: %C = binding_pattern c
  1718. // CHECK:STDOUT: %c.param_patt: %C = value_param_pattern %c.patt, call_param0
  1719. // CHECK:STDOUT: } {
  1720. // CHECK:STDOUT: %c.param: %C = value_param call_param0
  1721. // CHECK:STDOUT: %C.ref.loc25: type = name_ref C, file.%C.decl.loc9 [concrete = constants.%C]
  1722. // CHECK:STDOUT: %c: %C = bind_name c, %c.param
  1723. // CHECK:STDOUT: }
  1724. // CHECK:STDOUT: %Y.decl.loc33: type = interface_decl @Y [concrete = constants.%Y.type] {} {}
  1725. // CHECK:STDOUT: %F.decl.loc34: %F.type = fn_decl @F [concrete = constants.%F] {
  1726. // CHECK:STDOUT: %U.patt.loc34: %X.type = symbolic_binding_pattern U, 0 [symbolic = %U.patt.loc6 (constants.%U.patt)]
  1727. // CHECK:STDOUT: } {
  1728. // CHECK:STDOUT: %X.ref.loc34: type = name_ref X, file.%X.decl.loc3 [concrete = constants.%X.type]
  1729. // CHECK:STDOUT: %U.loc34: %X.type = bind_symbolic_name U, 0 [symbolic = %U.loc6_6.2 (constants.%U)]
  1730. // CHECK:STDOUT: }
  1731. // CHECK:STDOUT: %G.decl.loc35: %G.type = fn_decl @G [concrete = constants.%G] {
  1732. // CHECK:STDOUT: %U.patt.loc35: %X.type = symbolic_binding_pattern U, 0 [symbolic = %U.patt.loc7 (constants.%U.patt)]
  1733. // CHECK:STDOUT: %u.patt: @G.%U.as_type.loc7_16.2 (%U.as_type) = binding_pattern u
  1734. // CHECK:STDOUT: %u.param_patt: @G.%U.as_type.loc7_16.2 (%U.as_type) = value_param_pattern %u.patt, call_param0
  1735. // CHECK:STDOUT: } {
  1736. // CHECK:STDOUT: %X.ref.loc35: type = name_ref X, file.%X.decl.loc3 [concrete = constants.%X.type]
  1737. // CHECK:STDOUT: %U.loc35: %X.type = bind_symbolic_name U, 0 [symbolic = %U.loc7_6.2 (constants.%U)]
  1738. // CHECK:STDOUT: %u.param.loc35: @G.%U.as_type.loc7_16.2 (%U.as_type) = value_param call_param0
  1739. // CHECK:STDOUT: %.loc35_16.1: type = splice_block %.loc35_16.2 [symbolic = %U.as_type.loc7_16.2 (constants.%U.as_type)] {
  1740. // CHECK:STDOUT: %U.ref.loc35: %X.type = name_ref U, %U.loc35 [symbolic = %U.loc7_6.2 (constants.%U)]
  1741. // CHECK:STDOUT: %U.as_type.loc35: type = facet_access_type %U.ref.loc35 [symbolic = %U.as_type.loc7_16.2 (constants.%U.as_type)]
  1742. // CHECK:STDOUT: %.loc35_16.2: type = converted %U.ref.loc35, %U.as_type.loc35 [symbolic = %U.as_type.loc7_16.2 (constants.%U.as_type)]
  1743. // CHECK:STDOUT: }
  1744. // CHECK:STDOUT: %u.loc35: @G.%U.as_type.loc7_16.2 (%U.as_type) = bind_name u, %u.param.loc35
  1745. // CHECK:STDOUT: }
  1746. // CHECK:STDOUT: impl_decl @impl.a85 [concrete] {} {
  1747. // CHECK:STDOUT: %C.ref.loc36: type = name_ref C, file.%C.decl.loc9 [concrete = constants.%C]
  1748. // CHECK:STDOUT: %Y.ref.loc36: type = name_ref Y, file.%Y.decl.loc14 [concrete = constants.%Y.type]
  1749. // CHECK:STDOUT: }
  1750. // CHECK:STDOUT: %Y.impl_witness_table = impl_witness_table (), @impl.a85 [concrete]
  1751. // CHECK:STDOUT: %Y.impl_witness: <witness> = impl_witness %Y.impl_witness_table [concrete = constants.%Y.impl_witness]
  1752. // CHECK:STDOUT: impl_decl @impl.10e [concrete] {} {
  1753. // CHECK:STDOUT: %C.ref.loc37: type = name_ref C, file.%C.decl.loc9 [concrete = constants.%C]
  1754. // CHECK:STDOUT: %X.ref.loc37: type = name_ref X, file.%X.decl.loc3 [concrete = constants.%X.type]
  1755. // CHECK:STDOUT: }
  1756. // CHECK:STDOUT: impl_decl @impl.a85 [concrete] {} {
  1757. // CHECK:STDOUT: %C.ref.loc38: type = name_ref C, file.%C.decl.loc9 [concrete = constants.%C]
  1758. // CHECK:STDOUT: %Y.ref.loc38: type = name_ref Y, file.%Y.decl.loc14 [concrete = constants.%Y.type]
  1759. // CHECK:STDOUT: }
  1760. // CHECK:STDOUT: }
  1761. // CHECK:STDOUT:
  1762. // CHECK:STDOUT: interface @X {
  1763. // CHECK:STDOUT: %Self: %X.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self.e5e]
  1764. // CHECK:STDOUT:
  1765. // CHECK:STDOUT: !members:
  1766. // CHECK:STDOUT: .Self = %Self
  1767. // CHECK:STDOUT: witness = ()
  1768. // CHECK:STDOUT: }
  1769. // CHECK:STDOUT:
  1770. // CHECK:STDOUT: interface @Y {
  1771. // CHECK:STDOUT: %Self: %Y.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self.b29]
  1772. // CHECK:STDOUT:
  1773. // CHECK:STDOUT: !members:
  1774. // CHECK:STDOUT: .Self = %Self
  1775. // CHECK:STDOUT: witness = ()
  1776. // CHECK:STDOUT: }
  1777. // CHECK:STDOUT:
  1778. // CHECK:STDOUT: impl @impl.10e: %C.ref.loc12 as %X.ref.loc12 {
  1779. // CHECK:STDOUT: !members:
  1780. // CHECK:STDOUT: witness = file.%X.impl_witness
  1781. // CHECK:STDOUT: }
  1782. // CHECK:STDOUT:
  1783. // CHECK:STDOUT: impl @impl.a85: %C.ref.loc36 as %Y.ref.loc36 {
  1784. // CHECK:STDOUT: !members:
  1785. // CHECK:STDOUT: witness = file.%Y.impl_witness
  1786. // CHECK:STDOUT: }
  1787. // CHECK:STDOUT:
  1788. // CHECK:STDOUT: class @C {
  1789. // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete = constants.%empty_struct_type]
  1790. // CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %empty_struct_type [concrete = constants.%complete_type]
  1791. // CHECK:STDOUT: complete_type_witness = %complete_type
  1792. // CHECK:STDOUT:
  1793. // CHECK:STDOUT: !members:
  1794. // CHECK:STDOUT: .Self = constants.%C
  1795. // CHECK:STDOUT: }
  1796. // CHECK:STDOUT:
  1797. // CHECK:STDOUT: generic fn @F(%U.loc6_6.1: %X.type) {
  1798. // CHECK:STDOUT: %U.loc6_6.2: %X.type = bind_symbolic_name U, 0 [symbolic = %U.loc6_6.2 (constants.%U)]
  1799. // CHECK:STDOUT: %U.patt.loc6: %X.type = symbolic_binding_pattern U, 0 [symbolic = %U.patt.loc6 (constants.%U.patt)]
  1800. // CHECK:STDOUT:
  1801. // CHECK:STDOUT: !definition:
  1802. // CHECK:STDOUT:
  1803. // CHECK:STDOUT: fn() {
  1804. // CHECK:STDOUT: !entry:
  1805. // CHECK:STDOUT: return
  1806. // CHECK:STDOUT: }
  1807. // CHECK:STDOUT: }
  1808. // CHECK:STDOUT:
  1809. // CHECK:STDOUT: generic fn @G(%U.loc7_6.1: %X.type) {
  1810. // CHECK:STDOUT: %U.loc7_6.2: %X.type = bind_symbolic_name U, 0 [symbolic = %U.loc7_6.2 (constants.%U)]
  1811. // CHECK:STDOUT: %U.patt.loc7: %X.type = symbolic_binding_pattern U, 0 [symbolic = %U.patt.loc7 (constants.%U.patt)]
  1812. // CHECK:STDOUT: %U.as_type.loc7_16.2: type = facet_access_type %U.loc7_6.2 [symbolic = %U.as_type.loc7_16.2 (constants.%U.as_type)]
  1813. // CHECK:STDOUT:
  1814. // CHECK:STDOUT: !definition:
  1815. // CHECK:STDOUT: %require_complete: <witness> = require_complete_type %U.as_type.loc7_16.2 [symbolic = %require_complete (constants.%require_complete)]
  1816. // CHECK:STDOUT:
  1817. // CHECK:STDOUT: fn(%u.param.loc35: @G.%U.as_type.loc7_16.2 (%U.as_type)) {
  1818. // CHECK:STDOUT: !entry:
  1819. // CHECK:STDOUT: return
  1820. // CHECK:STDOUT: }
  1821. // CHECK:STDOUT: }
  1822. // CHECK:STDOUT:
  1823. // CHECK:STDOUT: fn @H(%c.param: %C) {
  1824. // CHECK:STDOUT: !entry:
  1825. // CHECK:STDOUT: %F.ref: %F.type = name_ref F, file.%F.decl.loc6 [concrete = constants.%F]
  1826. // CHECK:STDOUT: %C.ref.loc27: type = name_ref C, file.%C.decl.loc9 [concrete = constants.%C]
  1827. // CHECK:STDOUT: %X.facet.loc27: %X.type = facet_value constants.%C, (constants.%X.impl_witness) [concrete = constants.%X.facet]
  1828. // CHECK:STDOUT: %.loc27: %X.type = converted %C.ref.loc27, %X.facet.loc27 [concrete = constants.%X.facet]
  1829. // CHECK:STDOUT: %F.specific_fn: <specific function> = specific_function %F.ref, @F(constants.%X.facet) [concrete = constants.%F.specific_fn]
  1830. // CHECK:STDOUT: %F.call: init %empty_tuple.type = call %F.specific_fn()
  1831. // CHECK:STDOUT: %G.ref: %G.type = name_ref G, file.%G.decl.loc7 [concrete = constants.%G]
  1832. // CHECK:STDOUT: %c.ref: %C = name_ref c, %c
  1833. // CHECK:STDOUT: %X.facet.loc28_6.1: %X.type = facet_value constants.%C, (constants.%X.impl_witness) [concrete = constants.%X.facet]
  1834. // CHECK:STDOUT: %.loc28_6.1: %X.type = converted constants.%C, %X.facet.loc28_6.1 [concrete = constants.%X.facet]
  1835. // CHECK:STDOUT: %X.facet.loc28_6.2: %X.type = facet_value constants.%C, (constants.%X.impl_witness) [concrete = constants.%X.facet]
  1836. // CHECK:STDOUT: %.loc28_6.2: %X.type = converted constants.%C, %X.facet.loc28_6.2 [concrete = constants.%X.facet]
  1837. // CHECK:STDOUT: %G.specific_fn: <specific function> = specific_function %G.ref, @G(constants.%X.facet) [concrete = constants.%G.specific_fn]
  1838. // CHECK:STDOUT: %G.call: init %empty_tuple.type = call %G.specific_fn(%c.ref)
  1839. // CHECK:STDOUT: return
  1840. // CHECK:STDOUT: }
  1841. // CHECK:STDOUT:
  1842. // CHECK:STDOUT: specific @F(constants.%U) {
  1843. // CHECK:STDOUT: %U.loc6_6.2 => constants.%U
  1844. // CHECK:STDOUT: %U.patt.loc6 => constants.%U.patt
  1845. // CHECK:STDOUT: }
  1846. // CHECK:STDOUT:
  1847. // CHECK:STDOUT: specific @G(constants.%U) {
  1848. // CHECK:STDOUT: %U.loc7_6.2 => constants.%U
  1849. // CHECK:STDOUT: %U.patt.loc7 => constants.%U.patt
  1850. // CHECK:STDOUT: %U.as_type.loc7_16.2 => constants.%U.as_type
  1851. // CHECK:STDOUT: }
  1852. // CHECK:STDOUT:
  1853. // CHECK:STDOUT: specific @F(constants.%X.facet) {
  1854. // CHECK:STDOUT: %U.loc6_6.2 => constants.%X.facet
  1855. // CHECK:STDOUT: %U.patt.loc6 => constants.%U.patt
  1856. // CHECK:STDOUT:
  1857. // CHECK:STDOUT: !definition:
  1858. // CHECK:STDOUT: }
  1859. // CHECK:STDOUT:
  1860. // CHECK:STDOUT: specific @G(constants.%X.facet) {
  1861. // CHECK:STDOUT: %U.loc7_6.2 => constants.%X.facet
  1862. // CHECK:STDOUT: %U.patt.loc7 => constants.%U.patt
  1863. // CHECK:STDOUT: %U.as_type.loc7_16.2 => constants.%C
  1864. // CHECK:STDOUT:
  1865. // CHECK:STDOUT: !definition:
  1866. // CHECK:STDOUT: %require_complete => constants.%complete_type
  1867. // CHECK:STDOUT: }
  1868. // CHECK:STDOUT:
  1869. // CHECK:STDOUT: --- fail_todo_impl_in_interface_definition.carbon
  1870. // CHECK:STDOUT:
  1871. // CHECK:STDOUT: constants {
  1872. // CHECK:STDOUT: %I.type: type = facet_type <@I> [concrete]
  1873. // CHECK:STDOUT: %Self: %I.type = bind_symbolic_name Self, 0 [symbolic]
  1874. // CHECK:STDOUT: %F.type: type = fn_type @F [concrete]
  1875. // CHECK:STDOUT: %F: %F.type = struct_value () [concrete]
  1876. // CHECK:STDOUT: %I.assoc_type: type = assoc_entity_type @I [concrete]
  1877. // CHECK:STDOUT: %assoc0: %I.assoc_type = assoc_entity element0, @I.%F.decl [concrete]
  1878. // CHECK:STDOUT: %C: type = class_type @C, @C(%Self) [symbolic]
  1879. // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete]
  1880. // CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %empty_struct_type [concrete]
  1881. // CHECK:STDOUT: %I.impl_witness: <witness> = impl_witness @F.%I.impl_witness_table, @impl(%Self) [symbolic]
  1882. // CHECK:STDOUT: }
  1883. // CHECK:STDOUT:
  1884. // CHECK:STDOUT: imports {
  1885. // CHECK:STDOUT: %Core: <namespace> = namespace file.%Core.import, [concrete] {
  1886. // CHECK:STDOUT: import Core//prelude
  1887. // CHECK:STDOUT: }
  1888. // CHECK:STDOUT: }
  1889. // CHECK:STDOUT:
  1890. // CHECK:STDOUT: file {
  1891. // CHECK:STDOUT: package: <namespace> = namespace [concrete] {
  1892. // CHECK:STDOUT: .Core = imports.%Core
  1893. // CHECK:STDOUT: .I = %I.decl
  1894. // CHECK:STDOUT: }
  1895. // CHECK:STDOUT: %Core.import = import Core
  1896. // CHECK:STDOUT: %I.decl: type = interface_decl @I [concrete = constants.%I.type] {} {}
  1897. // CHECK:STDOUT: }
  1898. // CHECK:STDOUT:
  1899. // CHECK:STDOUT: interface @I {
  1900. // CHECK:STDOUT: %Self: %I.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self]
  1901. // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [concrete = constants.%F] {} {}
  1902. // CHECK:STDOUT: %assoc0: %I.assoc_type = assoc_entity element0, %F.decl [concrete = constants.%assoc0]
  1903. // CHECK:STDOUT:
  1904. // CHECK:STDOUT: !members:
  1905. // CHECK:STDOUT: .Self = %Self
  1906. // CHECK:STDOUT: .F = %assoc0
  1907. // CHECK:STDOUT: .I = <poisoned>
  1908. // CHECK:STDOUT: witness = (%F.decl)
  1909. // CHECK:STDOUT: }
  1910. // CHECK:STDOUT:
  1911. // CHECK:STDOUT: generic impl @impl(@I.%Self: %I.type) {
  1912. // CHECK:STDOUT: %Self: %I.type = bind_symbolic_name Self, 0 [symbolic = %Self (constants.%Self)]
  1913. // CHECK:STDOUT: %C: type = class_type @C, @C(%Self) [symbolic = %C (constants.%C)]
  1914. // CHECK:STDOUT: %I.impl_witness: <witness> = impl_witness @F.%I.impl_witness_table, @impl(%Self) [symbolic = %I.impl_witness (constants.%I.impl_witness)]
  1915. // CHECK:STDOUT:
  1916. // CHECK:STDOUT: !definition:
  1917. // CHECK:STDOUT:
  1918. // CHECK:STDOUT: impl: %C.ref.loc11 as %I.ref.loc11 {
  1919. // CHECK:STDOUT: !members:
  1920. // CHECK:STDOUT: .F = <poisoned>
  1921. // CHECK:STDOUT: witness = @F.%I.impl_witness
  1922. // CHECK:STDOUT: }
  1923. // CHECK:STDOUT: }
  1924. // CHECK:STDOUT:
  1925. // CHECK:STDOUT: generic class @C(@I.%Self: %I.type) {
  1926. // CHECK:STDOUT: !definition:
  1927. // CHECK:STDOUT:
  1928. // CHECK:STDOUT: class {
  1929. // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete = constants.%empty_struct_type]
  1930. // CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %empty_struct_type [concrete = constants.%complete_type]
  1931. // CHECK:STDOUT: complete_type_witness = %complete_type
  1932. // CHECK:STDOUT:
  1933. // CHECK:STDOUT: !members:
  1934. // CHECK:STDOUT: .Self = constants.%C
  1935. // CHECK:STDOUT: }
  1936. // CHECK:STDOUT: }
  1937. // CHECK:STDOUT:
  1938. // CHECK:STDOUT: generic fn @F(@I.%Self: %I.type) {
  1939. // CHECK:STDOUT: !definition:
  1940. // CHECK:STDOUT: %Self: %I.type = bind_symbolic_name Self, 0 [symbolic = %Self (constants.%Self)]
  1941. // CHECK:STDOUT: %C: type = class_type @C, @C(%Self) [symbolic = %C (constants.%C)]
  1942. // CHECK:STDOUT:
  1943. // CHECK:STDOUT: fn() {
  1944. // CHECK:STDOUT: !entry:
  1945. // CHECK:STDOUT: %C.decl: type = class_decl @C [symbolic = @F.%C (constants.%C)] {} {}
  1946. // CHECK:STDOUT: impl_decl @impl [concrete] {} {
  1947. // CHECK:STDOUT: %C.ref.loc11: type = name_ref C, @F.%C.decl [symbolic = %C (constants.%C)]
  1948. // CHECK:STDOUT: %I.ref.loc11: type = name_ref I, file.%I.decl [concrete = constants.%I.type]
  1949. // CHECK:STDOUT: }
  1950. // CHECK:STDOUT: %I.impl_witness_table = impl_witness_table (<error>), @impl [concrete]
  1951. // CHECK:STDOUT: %I.impl_witness: <witness> = impl_witness %I.impl_witness_table, @impl(constants.%Self) [symbolic = @impl.%I.impl_witness (constants.%I.impl_witness)]
  1952. // CHECK:STDOUT: impl_decl @impl [concrete] {} {
  1953. // CHECK:STDOUT: %C.ref.loc20: type = name_ref C, @F.%C.decl [symbolic = %C (constants.%C)]
  1954. // CHECK:STDOUT: %I.ref.loc20: type = name_ref I, file.%I.decl [concrete = constants.%I.type]
  1955. // CHECK:STDOUT: }
  1956. // CHECK:STDOUT: return
  1957. // CHECK:STDOUT: }
  1958. // CHECK:STDOUT: }
  1959. // CHECK:STDOUT:
  1960. // CHECK:STDOUT: specific @F(constants.%Self) {}
  1961. // CHECK:STDOUT:
  1962. // CHECK:STDOUT: specific @C(constants.%Self) {}
  1963. // CHECK:STDOUT:
  1964. // CHECK:STDOUT: specific @impl(constants.%Self) {
  1965. // CHECK:STDOUT: %Self => constants.%Self
  1966. // CHECK:STDOUT: %C => constants.%C
  1967. // CHECK:STDOUT: %I.impl_witness => constants.%I.impl_witness
  1968. // CHECK:STDOUT: }
  1969. // CHECK:STDOUT:
  1970. // CHECK:STDOUT: specific @C(@impl.%Self) {}
  1971. // CHECK:STDOUT:
  1972. // CHECK:STDOUT: specific @impl(%Self) {}
  1973. // CHECK:STDOUT:
  1974. // CHECK:STDOUT: specific @C(@F.%Self) {}
  1975. // CHECK:STDOUT:
  1976. // CHECK:STDOUT: --- fail_todo_impl_in_interface_definition_with_associated.carbon
  1977. // CHECK:STDOUT:
  1978. // CHECK:STDOUT: constants {
  1979. // CHECK:STDOUT: %I.type: type = facet_type <@I> [concrete]
  1980. // CHECK:STDOUT: %Self: %I.type = bind_symbolic_name Self, 0 [symbolic]
  1981. // CHECK:STDOUT: %I.assoc_type: type = assoc_entity_type @I [concrete]
  1982. // CHECK:STDOUT: %assoc0: %I.assoc_type = assoc_entity element0, @I.%U [concrete]
  1983. // CHECK:STDOUT: %F.type: type = fn_type @F [concrete]
  1984. // CHECK:STDOUT: %F: %F.type = struct_value () [concrete]
  1985. // CHECK:STDOUT: %assoc1: %I.assoc_type = assoc_entity element1, @I.%F.decl [concrete]
  1986. // CHECK:STDOUT: %C: type = class_type @C, @C(%Self) [symbolic]
  1987. // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete]
  1988. // CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %empty_struct_type [concrete]
  1989. // CHECK:STDOUT: %.Self: %I.type = bind_symbolic_name .Self [symbolic_self]
  1990. // CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self [symbolic_self]
  1991. // CHECK:STDOUT: %I.lookup_impl_witness: <witness> = lookup_impl_witness %.Self, @I [symbolic_self]
  1992. // CHECK:STDOUT: %I.facet: %I.type = facet_value %.Self.as_type, (%I.lookup_impl_witness) [symbolic_self]
  1993. // CHECK:STDOUT: %impl.elem0: type = impl_witness_access %I.lookup_impl_witness, element0 [symbolic_self]
  1994. // CHECK:STDOUT: %I_where.type: type = facet_type <@I where %impl.elem0 = %C> [symbolic]
  1995. // CHECK:STDOUT: %require_complete: <witness> = require_complete_type %I_where.type [symbolic]
  1996. // CHECK:STDOUT: %I.impl_witness: <witness> = impl_witness @F.%I.impl_witness_table, @impl(%Self) [symbolic]
  1997. // CHECK:STDOUT: }
  1998. // CHECK:STDOUT:
  1999. // CHECK:STDOUT: imports {
  2000. // CHECK:STDOUT: %Core: <namespace> = namespace file.%Core.import, [concrete] {
  2001. // CHECK:STDOUT: import Core//prelude
  2002. // CHECK:STDOUT: }
  2003. // CHECK:STDOUT: }
  2004. // CHECK:STDOUT:
  2005. // CHECK:STDOUT: file {
  2006. // CHECK:STDOUT: package: <namespace> = namespace [concrete] {
  2007. // CHECK:STDOUT: .Core = imports.%Core
  2008. // CHECK:STDOUT: .I = %I.decl
  2009. // CHECK:STDOUT: }
  2010. // CHECK:STDOUT: %Core.import = import Core
  2011. // CHECK:STDOUT: %I.decl: type = interface_decl @I [concrete = constants.%I.type] {} {}
  2012. // CHECK:STDOUT: }
  2013. // CHECK:STDOUT:
  2014. // CHECK:STDOUT: interface @I {
  2015. // CHECK:STDOUT: %Self: %I.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self]
  2016. // CHECK:STDOUT: %U: type = assoc_const_decl @U [concrete] {
  2017. // CHECK:STDOUT: %assoc0: %I.assoc_type = assoc_entity element0, @I.%U [concrete = constants.%assoc0]
  2018. // CHECK:STDOUT: }
  2019. // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [concrete = constants.%F] {} {}
  2020. // CHECK:STDOUT: %assoc1: %I.assoc_type = assoc_entity element1, %F.decl [concrete = constants.%assoc1]
  2021. // CHECK:STDOUT:
  2022. // CHECK:STDOUT: !members:
  2023. // CHECK:STDOUT: .Self = %Self
  2024. // CHECK:STDOUT: .U = @U.%assoc0
  2025. // CHECK:STDOUT: .F = %assoc1
  2026. // CHECK:STDOUT: .I = <poisoned>
  2027. // CHECK:STDOUT: witness = (%U, %F.decl)
  2028. // CHECK:STDOUT: }
  2029. // CHECK:STDOUT:
  2030. // CHECK:STDOUT: generic assoc_const @U(@I.%Self: %I.type) {
  2031. // CHECK:STDOUT: assoc_const U:! type;
  2032. // CHECK:STDOUT: }
  2033. // CHECK:STDOUT:
  2034. // CHECK:STDOUT: generic impl @impl(@I.%Self: %I.type) {
  2035. // CHECK:STDOUT: %Self: %I.type = bind_symbolic_name Self, 0 [symbolic = %Self (constants.%Self)]
  2036. // CHECK:STDOUT: %C: type = class_type @C, @C(%Self) [symbolic = %C (constants.%C)]
  2037. // CHECK:STDOUT: %I_where.type: type = facet_type <@I where constants.%impl.elem0 = %C> [symbolic = %I_where.type (constants.%I_where.type)]
  2038. // CHECK:STDOUT: %require_complete: <witness> = require_complete_type %I_where.type [symbolic = %require_complete (constants.%require_complete)]
  2039. // CHECK:STDOUT: %I.impl_witness: <witness> = impl_witness @F.%I.impl_witness_table, @impl(%Self) [symbolic = %I.impl_witness (constants.%I.impl_witness)]
  2040. // CHECK:STDOUT:
  2041. // CHECK:STDOUT: !definition:
  2042. // CHECK:STDOUT:
  2043. // CHECK:STDOUT: impl: %C.ref.loc12_10 as %.loc12_17 {
  2044. // CHECK:STDOUT: !members:
  2045. // CHECK:STDOUT: .F = <poisoned>
  2046. // CHECK:STDOUT: witness = @F.%I.impl_witness
  2047. // CHECK:STDOUT: }
  2048. // CHECK:STDOUT: }
  2049. // CHECK:STDOUT:
  2050. // CHECK:STDOUT: generic class @C(@I.%Self: %I.type) {
  2051. // CHECK:STDOUT: !definition:
  2052. // CHECK:STDOUT:
  2053. // CHECK:STDOUT: class {
  2054. // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete = constants.%empty_struct_type]
  2055. // CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %empty_struct_type [concrete = constants.%complete_type]
  2056. // CHECK:STDOUT: complete_type_witness = %complete_type
  2057. // CHECK:STDOUT:
  2058. // CHECK:STDOUT: !members:
  2059. // CHECK:STDOUT: .Self = constants.%C
  2060. // CHECK:STDOUT: }
  2061. // CHECK:STDOUT: }
  2062. // CHECK:STDOUT:
  2063. // CHECK:STDOUT: generic fn @F(@I.%Self: %I.type) {
  2064. // CHECK:STDOUT: !definition:
  2065. // CHECK:STDOUT: %Self: %I.type = bind_symbolic_name Self, 0 [symbolic = %Self (constants.%Self)]
  2066. // CHECK:STDOUT: %C: type = class_type @C, @C(%Self) [symbolic = %C (constants.%C)]
  2067. // CHECK:STDOUT:
  2068. // CHECK:STDOUT: fn() {
  2069. // CHECK:STDOUT: !entry:
  2070. // CHECK:STDOUT: %C.decl: type = class_decl @C [symbolic = @F.%C (constants.%C)] {} {}
  2071. // CHECK:STDOUT: impl_decl @impl [concrete] {} {
  2072. // CHECK:STDOUT: %C.ref.loc12_10: type = name_ref C, @F.%C.decl [symbolic = %C (constants.%C)]
  2073. // CHECK:STDOUT: %I.ref.loc12: type = name_ref I, file.%I.decl [concrete = constants.%I.type]
  2074. // CHECK:STDOUT: %.Self.1: %I.type = bind_symbolic_name .Self [symbolic_self = constants.%.Self]
  2075. // CHECK:STDOUT: %.Self.ref.loc12: %I.type = name_ref .Self, %.Self.1 [symbolic_self = constants.%.Self]
  2076. // CHECK:STDOUT: %U.ref.loc12: %I.assoc_type = name_ref U, @U.%assoc0 [concrete = constants.%assoc0]
  2077. // CHECK:STDOUT: %.Self.as_type.loc12: type = facet_access_type %.Self.ref.loc12 [symbolic_self = constants.%.Self.as_type]
  2078. // CHECK:STDOUT: %.loc12_23: type = converted %.Self.ref.loc12, %.Self.as_type.loc12 [symbolic_self = constants.%.Self.as_type]
  2079. // CHECK:STDOUT: %impl.elem0.loc12: type = impl_witness_access constants.%I.lookup_impl_witness, element0 [symbolic_self = constants.%impl.elem0]
  2080. // CHECK:STDOUT: %C.ref.loc12_28: type = name_ref C, @F.%C.decl [symbolic = %C (constants.%C)]
  2081. // CHECK:STDOUT: %.loc12_17: type = where_expr %.Self.1 [symbolic = %I_where.type (constants.%I_where.type)] {
  2082. // CHECK:STDOUT: requirement_rewrite %impl.elem0.loc12, %C.ref.loc12_28
  2083. // CHECK:STDOUT: }
  2084. // CHECK:STDOUT: }
  2085. // CHECK:STDOUT: %I.impl_witness_table = impl_witness_table (%impl_witness_assoc_constant, <error>), @impl [concrete]
  2086. // CHECK:STDOUT: %I.impl_witness: <witness> = impl_witness %I.impl_witness_table, @impl(constants.%Self) [symbolic = @impl.%I.impl_witness (constants.%I.impl_witness)]
  2087. // CHECK:STDOUT: %impl_witness_assoc_constant: type = impl_witness_assoc_constant constants.%C [symbolic = @impl.%C (constants.%C)]
  2088. // CHECK:STDOUT: impl_decl @impl [concrete] {} {
  2089. // CHECK:STDOUT: %C.ref.loc21_10: type = name_ref C, @F.%C.decl [symbolic = %C (constants.%C)]
  2090. // CHECK:STDOUT: %I.ref.loc21: type = name_ref I, file.%I.decl [concrete = constants.%I.type]
  2091. // CHECK:STDOUT: %.Self.2: %I.type = bind_symbolic_name .Self [symbolic_self = constants.%.Self]
  2092. // CHECK:STDOUT: %.Self.ref.loc21: %I.type = name_ref .Self, %.Self.2 [symbolic_self = constants.%.Self]
  2093. // CHECK:STDOUT: %U.ref.loc21: %I.assoc_type = name_ref U, @U.%assoc0 [concrete = constants.%assoc0]
  2094. // CHECK:STDOUT: %.Self.as_type.loc21: type = facet_access_type %.Self.ref.loc21 [symbolic_self = constants.%.Self.as_type]
  2095. // CHECK:STDOUT: %.loc21_23: type = converted %.Self.ref.loc21, %.Self.as_type.loc21 [symbolic_self = constants.%.Self.as_type]
  2096. // CHECK:STDOUT: %impl.elem0.loc21: type = impl_witness_access constants.%I.lookup_impl_witness, element0 [symbolic_self = constants.%impl.elem0]
  2097. // CHECK:STDOUT: %C.ref.loc21_28: type = name_ref C, @F.%C.decl [symbolic = %C (constants.%C)]
  2098. // CHECK:STDOUT: %.loc21_17: type = where_expr %.Self.2 [symbolic = %I_where.type (constants.%I_where.type)] {
  2099. // CHECK:STDOUT: requirement_rewrite %impl.elem0.loc21, %C.ref.loc21_28
  2100. // CHECK:STDOUT: }
  2101. // CHECK:STDOUT: }
  2102. // CHECK:STDOUT: return
  2103. // CHECK:STDOUT: }
  2104. // CHECK:STDOUT: }
  2105. // CHECK:STDOUT:
  2106. // CHECK:STDOUT: specific @U(constants.%Self) {}
  2107. // CHECK:STDOUT:
  2108. // CHECK:STDOUT: specific @F(constants.%Self) {}
  2109. // CHECK:STDOUT:
  2110. // CHECK:STDOUT: specific @C(constants.%Self) {}
  2111. // CHECK:STDOUT:
  2112. // CHECK:STDOUT: specific @U(constants.%I.facet) {}
  2113. // CHECK:STDOUT:
  2114. // CHECK:STDOUT: specific @impl(constants.%Self) {
  2115. // CHECK:STDOUT: %Self => constants.%Self
  2116. // CHECK:STDOUT: %C => constants.%C
  2117. // CHECK:STDOUT: %I_where.type => constants.%I_where.type
  2118. // CHECK:STDOUT: %require_complete => constants.%require_complete
  2119. // CHECK:STDOUT: %I.impl_witness => constants.%I.impl_witness
  2120. // CHECK:STDOUT: }
  2121. // CHECK:STDOUT:
  2122. // CHECK:STDOUT: specific @C(@impl.%Self) {}
  2123. // CHECK:STDOUT:
  2124. // CHECK:STDOUT: specific @impl(%Self) {}
  2125. // CHECK:STDOUT:
  2126. // CHECK:STDOUT: specific @C(@F.%Self) {}
  2127. // CHECK:STDOUT:
  2128. // CHECK:STDOUT: --- include_files/facet_types.carbon
  2129. // CHECK:STDOUT:
  2130. // CHECK:STDOUT: constants {
  2131. // CHECK:STDOUT: %Dest: type = bind_symbolic_name Dest, 0 [symbolic]
  2132. // CHECK:STDOUT: %Dest.patt: type = symbolic_binding_pattern Dest, 0 [symbolic]
  2133. // CHECK:STDOUT: %As.type.b51: type = generic_interface_type @As [concrete]
  2134. // CHECK:STDOUT: %As.generic: %As.type.b51 = struct_value () [concrete]
  2135. // CHECK:STDOUT: %As.type.8ba: type = facet_type <@As, @As(%Dest)> [symbolic]
  2136. // CHECK:STDOUT: %Self.b4e: %As.type.8ba = bind_symbolic_name Self, 1 [symbolic]
  2137. // CHECK:STDOUT: %Self.as_type.7f0: type = facet_access_type %Self.b4e [symbolic]
  2138. // CHECK:STDOUT: %Convert.type.ad1: type = fn_type @Convert.1, @As(%Dest) [symbolic]
  2139. // CHECK:STDOUT: %Convert.0ed: %Convert.type.ad1 = struct_value () [symbolic]
  2140. // CHECK:STDOUT: %As.assoc_type: type = assoc_entity_type @As, @As(%Dest) [symbolic]
  2141. // CHECK:STDOUT: %assoc0.1d5: %As.assoc_type = assoc_entity element0, @As.%Convert.decl [symbolic]
  2142. // CHECK:STDOUT: %ImplicitAs.type.96f: type = generic_interface_type @ImplicitAs [concrete]
  2143. // CHECK:STDOUT: %ImplicitAs.generic: %ImplicitAs.type.96f = struct_value () [concrete]
  2144. // CHECK:STDOUT: %ImplicitAs.type.07f: type = facet_type <@ImplicitAs, @ImplicitAs(%Dest)> [symbolic]
  2145. // CHECK:STDOUT: %Self.0f3: %ImplicitAs.type.07f = bind_symbolic_name Self, 1 [symbolic]
  2146. // CHECK:STDOUT: %Self.as_type.419: type = facet_access_type %Self.0f3 [symbolic]
  2147. // CHECK:STDOUT: %Convert.type.4cf: type = fn_type @Convert.2, @ImplicitAs(%Dest) [symbolic]
  2148. // CHECK:STDOUT: %Convert.147: %Convert.type.4cf = struct_value () [symbolic]
  2149. // CHECK:STDOUT: %ImplicitAs.assoc_type: type = assoc_entity_type @ImplicitAs, @ImplicitAs(%Dest) [symbolic]
  2150. // CHECK:STDOUT: %assoc0.8f8: %ImplicitAs.assoc_type = assoc_entity element0, @ImplicitAs.%Convert.decl [symbolic]
  2151. // CHECK:STDOUT: %BitAnd.type: type = facet_type <@BitAnd> [concrete]
  2152. // CHECK:STDOUT: %Self.e44: %BitAnd.type = bind_symbolic_name Self, 0 [symbolic]
  2153. // CHECK:STDOUT: %Self.as_type.560: type = facet_access_type %Self.e44 [symbolic]
  2154. // CHECK:STDOUT: %Op.type.613: type = fn_type @Op.1 [concrete]
  2155. // CHECK:STDOUT: %Op.d98: %Op.type.613 = struct_value () [concrete]
  2156. // CHECK:STDOUT: %BitAnd.assoc_type: type = assoc_entity_type @BitAnd [concrete]
  2157. // CHECK:STDOUT: %assoc0.220: %BitAnd.assoc_type = assoc_entity element0, @BitAnd.%Op.decl [concrete]
  2158. // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic]
  2159. // CHECK:STDOUT: %T.patt: type = symbolic_binding_pattern T, 0 [symbolic]
  2160. // CHECK:STDOUT: %BitAnd.impl_witness: <witness> = impl_witness file.%BitAnd.impl_witness_table, @impl(%T) [symbolic]
  2161. // CHECK:STDOUT: %Op.type.28d: type = fn_type @Op.2, @impl(%T) [symbolic]
  2162. // CHECK:STDOUT: %Op.902: %Op.type.28d = struct_value () [symbolic]
  2163. // CHECK:STDOUT: %require_complete: <witness> = require_complete_type %T [symbolic]
  2164. // CHECK:STDOUT: %BitAnd.facet: %BitAnd.type = facet_value %T, (%BitAnd.impl_witness) [symbolic]
  2165. // CHECK:STDOUT: }
  2166. // CHECK:STDOUT:
  2167. // CHECK:STDOUT: file {
  2168. // CHECK:STDOUT: package: <namespace> = namespace [concrete] {
  2169. // CHECK:STDOUT: .As = %As.decl
  2170. // CHECK:STDOUT: .ImplicitAs = %ImplicitAs.decl
  2171. // CHECK:STDOUT: .BitAnd = %BitAnd.decl
  2172. // CHECK:STDOUT: }
  2173. // CHECK:STDOUT: %As.decl: %As.type.b51 = interface_decl @As [concrete = constants.%As.generic] {
  2174. // CHECK:STDOUT: %Dest.patt.loc9_14.1: type = symbolic_binding_pattern Dest, 0 [symbolic = %Dest.patt.loc9_14.2 (constants.%Dest.patt)]
  2175. // CHECK:STDOUT: } {
  2176. // CHECK:STDOUT: %Dest.loc9_14.1: type = bind_symbolic_name Dest, 0 [symbolic = %Dest.loc9_14.2 (constants.%Dest)]
  2177. // CHECK:STDOUT: }
  2178. // CHECK:STDOUT: %ImplicitAs.decl: %ImplicitAs.type.96f = interface_decl @ImplicitAs [concrete = constants.%ImplicitAs.generic] {
  2179. // CHECK:STDOUT: %Dest.patt.loc13_22.1: type = symbolic_binding_pattern Dest, 0 [symbolic = %Dest.patt.loc13_22.2 (constants.%Dest.patt)]
  2180. // CHECK:STDOUT: } {
  2181. // CHECK:STDOUT: %Dest.loc13_22.1: type = bind_symbolic_name Dest, 0 [symbolic = %Dest.loc13_22.2 (constants.%Dest)]
  2182. // CHECK:STDOUT: }
  2183. // CHECK:STDOUT: %BitAnd.decl: type = interface_decl @BitAnd [concrete = constants.%BitAnd.type] {} {}
  2184. // CHECK:STDOUT: impl_decl @impl [concrete] {
  2185. // CHECK:STDOUT: %T.patt.loc21_14.1: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc21_14.2 (constants.%T.patt)]
  2186. // CHECK:STDOUT: } {
  2187. // CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc21_14.1 [symbolic = %T.loc21_14.2 (constants.%T)]
  2188. // CHECK:STDOUT: %BitAnd.ref: type = name_ref BitAnd, file.%BitAnd.decl [concrete = constants.%BitAnd.type]
  2189. // CHECK:STDOUT: %T.loc21_14.1: type = bind_symbolic_name T, 0 [symbolic = %T.loc21_14.2 (constants.%T)]
  2190. // CHECK:STDOUT: }
  2191. // CHECK:STDOUT: %BitAnd.impl_witness_table = impl_witness_table (@impl.%Op.decl), @impl [concrete]
  2192. // CHECK:STDOUT: %BitAnd.impl_witness: <witness> = impl_witness %BitAnd.impl_witness_table, @impl(constants.%T) [symbolic = @impl.%BitAnd.impl_witness (constants.%BitAnd.impl_witness)]
  2193. // CHECK:STDOUT: }
  2194. // CHECK:STDOUT:
  2195. // CHECK:STDOUT: generic interface @As(%Dest.loc9_14.1: type) {
  2196. // CHECK:STDOUT: %Dest.loc9_14.2: type = bind_symbolic_name Dest, 0 [symbolic = %Dest.loc9_14.2 (constants.%Dest)]
  2197. // CHECK:STDOUT: %Dest.patt.loc9_14.2: type = symbolic_binding_pattern Dest, 0 [symbolic = %Dest.patt.loc9_14.2 (constants.%Dest.patt)]
  2198. // CHECK:STDOUT:
  2199. // CHECK:STDOUT: !definition:
  2200. // CHECK:STDOUT: %As.type: type = facet_type <@As, @As(%Dest.loc9_14.2)> [symbolic = %As.type (constants.%As.type.8ba)]
  2201. // CHECK:STDOUT: %Self.2: @As.%As.type (%As.type.8ba) = bind_symbolic_name Self, 1 [symbolic = %Self.2 (constants.%Self.b4e)]
  2202. // CHECK:STDOUT: %Convert.type: type = fn_type @Convert.1, @As(%Dest.loc9_14.2) [symbolic = %Convert.type (constants.%Convert.type.ad1)]
  2203. // CHECK:STDOUT: %Convert: @As.%Convert.type (%Convert.type.ad1) = struct_value () [symbolic = %Convert (constants.%Convert.0ed)]
  2204. // CHECK:STDOUT: %As.assoc_type: type = assoc_entity_type @As, @As(%Dest.loc9_14.2) [symbolic = %As.assoc_type (constants.%As.assoc_type)]
  2205. // CHECK:STDOUT: %assoc0.loc10_35.2: @As.%As.assoc_type (%As.assoc_type) = assoc_entity element0, %Convert.decl [symbolic = %assoc0.loc10_35.2 (constants.%assoc0.1d5)]
  2206. // CHECK:STDOUT:
  2207. // CHECK:STDOUT: interface {
  2208. // CHECK:STDOUT: %Self.1: @As.%As.type (%As.type.8ba) = bind_symbolic_name Self, 1 [symbolic = %Self.2 (constants.%Self.b4e)]
  2209. // CHECK:STDOUT: %Convert.decl: @As.%Convert.type (%Convert.type.ad1) = fn_decl @Convert.1 [symbolic = @As.%Convert (constants.%Convert.0ed)] {
  2210. // CHECK:STDOUT: %self.patt: @Convert.1.%Self.as_type.loc10_20.1 (%Self.as_type.7f0) = binding_pattern self
  2211. // CHECK:STDOUT: %self.param_patt: @Convert.1.%Self.as_type.loc10_20.1 (%Self.as_type.7f0) = value_param_pattern %self.patt, call_param0
  2212. // CHECK:STDOUT: %return.patt: @Convert.1.%Dest (%Dest) = return_slot_pattern
  2213. // CHECK:STDOUT: %return.param_patt: @Convert.1.%Dest (%Dest) = out_param_pattern %return.patt, call_param1
  2214. // CHECK:STDOUT: } {
  2215. // CHECK:STDOUT: %Dest.ref: type = name_ref Dest, @As.%Dest.loc9_14.1 [symbolic = %Dest (constants.%Dest)]
  2216. // CHECK:STDOUT: %self.param: @Convert.1.%Self.as_type.loc10_20.1 (%Self.as_type.7f0) = value_param call_param0
  2217. // CHECK:STDOUT: %.loc10_20.1: type = splice_block %.loc10_20.3 [symbolic = %Self.as_type.loc10_20.1 (constants.%Self.as_type.7f0)] {
  2218. // CHECK:STDOUT: %.loc10_20.2: @Convert.1.%As.type (%As.type.8ba) = specific_constant @As.%Self.1, @As(constants.%Dest) [symbolic = %Self (constants.%Self.b4e)]
  2219. // CHECK:STDOUT: %Self.ref: @Convert.1.%As.type (%As.type.8ba) = name_ref Self, %.loc10_20.2 [symbolic = %Self (constants.%Self.b4e)]
  2220. // CHECK:STDOUT: %Self.as_type.loc10_20.2: type = facet_access_type %Self.ref [symbolic = %Self.as_type.loc10_20.1 (constants.%Self.as_type.7f0)]
  2221. // CHECK:STDOUT: %.loc10_20.3: type = converted %Self.ref, %Self.as_type.loc10_20.2 [symbolic = %Self.as_type.loc10_20.1 (constants.%Self.as_type.7f0)]
  2222. // CHECK:STDOUT: }
  2223. // CHECK:STDOUT: %self: @Convert.1.%Self.as_type.loc10_20.1 (%Self.as_type.7f0) = bind_name self, %self.param
  2224. // CHECK:STDOUT: %return.param: ref @Convert.1.%Dest (%Dest) = out_param call_param1
  2225. // CHECK:STDOUT: %return: ref @Convert.1.%Dest (%Dest) = return_slot %return.param
  2226. // CHECK:STDOUT: }
  2227. // CHECK:STDOUT: %assoc0.loc10_35.1: @As.%As.assoc_type (%As.assoc_type) = assoc_entity element0, %Convert.decl [symbolic = %assoc0.loc10_35.2 (constants.%assoc0.1d5)]
  2228. // CHECK:STDOUT:
  2229. // CHECK:STDOUT: !members:
  2230. // CHECK:STDOUT: .Self = %Self.1
  2231. // CHECK:STDOUT: .Dest = <poisoned>
  2232. // CHECK:STDOUT: .Convert = %assoc0.loc10_35.1
  2233. // CHECK:STDOUT: witness = (%Convert.decl)
  2234. // CHECK:STDOUT: }
  2235. // CHECK:STDOUT: }
  2236. // CHECK:STDOUT:
  2237. // CHECK:STDOUT: generic interface @ImplicitAs(%Dest.loc13_22.1: type) {
  2238. // CHECK:STDOUT: %Dest.loc13_22.2: type = bind_symbolic_name Dest, 0 [symbolic = %Dest.loc13_22.2 (constants.%Dest)]
  2239. // CHECK:STDOUT: %Dest.patt.loc13_22.2: type = symbolic_binding_pattern Dest, 0 [symbolic = %Dest.patt.loc13_22.2 (constants.%Dest.patt)]
  2240. // CHECK:STDOUT:
  2241. // CHECK:STDOUT: !definition:
  2242. // CHECK:STDOUT: %ImplicitAs.type: type = facet_type <@ImplicitAs, @ImplicitAs(%Dest.loc13_22.2)> [symbolic = %ImplicitAs.type (constants.%ImplicitAs.type.07f)]
  2243. // CHECK:STDOUT: %Self.2: @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.07f) = bind_symbolic_name Self, 1 [symbolic = %Self.2 (constants.%Self.0f3)]
  2244. // CHECK:STDOUT: %Convert.type: type = fn_type @Convert.2, @ImplicitAs(%Dest.loc13_22.2) [symbolic = %Convert.type (constants.%Convert.type.4cf)]
  2245. // CHECK:STDOUT: %Convert: @ImplicitAs.%Convert.type (%Convert.type.4cf) = struct_value () [symbolic = %Convert (constants.%Convert.147)]
  2246. // CHECK:STDOUT: %ImplicitAs.assoc_type: type = assoc_entity_type @ImplicitAs, @ImplicitAs(%Dest.loc13_22.2) [symbolic = %ImplicitAs.assoc_type (constants.%ImplicitAs.assoc_type)]
  2247. // CHECK:STDOUT: %assoc0.loc14_35.2: @ImplicitAs.%ImplicitAs.assoc_type (%ImplicitAs.assoc_type) = assoc_entity element0, %Convert.decl [symbolic = %assoc0.loc14_35.2 (constants.%assoc0.8f8)]
  2248. // CHECK:STDOUT:
  2249. // CHECK:STDOUT: interface {
  2250. // CHECK:STDOUT: %Self.1: @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.07f) = bind_symbolic_name Self, 1 [symbolic = %Self.2 (constants.%Self.0f3)]
  2251. // CHECK:STDOUT: %Convert.decl: @ImplicitAs.%Convert.type (%Convert.type.4cf) = fn_decl @Convert.2 [symbolic = @ImplicitAs.%Convert (constants.%Convert.147)] {
  2252. // CHECK:STDOUT: %self.patt: @Convert.2.%Self.as_type.loc14_20.1 (%Self.as_type.419) = binding_pattern self
  2253. // CHECK:STDOUT: %self.param_patt: @Convert.2.%Self.as_type.loc14_20.1 (%Self.as_type.419) = value_param_pattern %self.patt, call_param0
  2254. // CHECK:STDOUT: %return.patt: @Convert.2.%Dest (%Dest) = return_slot_pattern
  2255. // CHECK:STDOUT: %return.param_patt: @Convert.2.%Dest (%Dest) = out_param_pattern %return.patt, call_param1
  2256. // CHECK:STDOUT: } {
  2257. // CHECK:STDOUT: %Dest.ref: type = name_ref Dest, @ImplicitAs.%Dest.loc13_22.1 [symbolic = %Dest (constants.%Dest)]
  2258. // CHECK:STDOUT: %self.param: @Convert.2.%Self.as_type.loc14_20.1 (%Self.as_type.419) = value_param call_param0
  2259. // CHECK:STDOUT: %.loc14_20.1: type = splice_block %.loc14_20.3 [symbolic = %Self.as_type.loc14_20.1 (constants.%Self.as_type.419)] {
  2260. // CHECK:STDOUT: %.loc14_20.2: @Convert.2.%ImplicitAs.type (%ImplicitAs.type.07f) = specific_constant @ImplicitAs.%Self.1, @ImplicitAs(constants.%Dest) [symbolic = %Self (constants.%Self.0f3)]
  2261. // CHECK:STDOUT: %Self.ref: @Convert.2.%ImplicitAs.type (%ImplicitAs.type.07f) = name_ref Self, %.loc14_20.2 [symbolic = %Self (constants.%Self.0f3)]
  2262. // CHECK:STDOUT: %Self.as_type.loc14_20.2: type = facet_access_type %Self.ref [symbolic = %Self.as_type.loc14_20.1 (constants.%Self.as_type.419)]
  2263. // CHECK:STDOUT: %.loc14_20.3: type = converted %Self.ref, %Self.as_type.loc14_20.2 [symbolic = %Self.as_type.loc14_20.1 (constants.%Self.as_type.419)]
  2264. // CHECK:STDOUT: }
  2265. // CHECK:STDOUT: %self: @Convert.2.%Self.as_type.loc14_20.1 (%Self.as_type.419) = bind_name self, %self.param
  2266. // CHECK:STDOUT: %return.param: ref @Convert.2.%Dest (%Dest) = out_param call_param1
  2267. // CHECK:STDOUT: %return: ref @Convert.2.%Dest (%Dest) = return_slot %return.param
  2268. // CHECK:STDOUT: }
  2269. // CHECK:STDOUT: %assoc0.loc14_35.1: @ImplicitAs.%ImplicitAs.assoc_type (%ImplicitAs.assoc_type) = assoc_entity element0, %Convert.decl [symbolic = %assoc0.loc14_35.2 (constants.%assoc0.8f8)]
  2270. // CHECK:STDOUT:
  2271. // CHECK:STDOUT: !members:
  2272. // CHECK:STDOUT: .Self = %Self.1
  2273. // CHECK:STDOUT: .Dest = <poisoned>
  2274. // CHECK:STDOUT: .Convert = %assoc0.loc14_35.1
  2275. // CHECK:STDOUT: witness = (%Convert.decl)
  2276. // CHECK:STDOUT: }
  2277. // CHECK:STDOUT: }
  2278. // CHECK:STDOUT:
  2279. // CHECK:STDOUT: interface @BitAnd {
  2280. // CHECK:STDOUT: %Self: %BitAnd.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self.e44]
  2281. // CHECK:STDOUT: %Op.decl: %Op.type.613 = fn_decl @Op.1 [concrete = constants.%Op.d98] {
  2282. // CHECK:STDOUT: %self.patt: @Op.1.%Self.as_type.loc18_15.1 (%Self.as_type.560) = binding_pattern self
  2283. // CHECK:STDOUT: %self.param_patt: @Op.1.%Self.as_type.loc18_15.1 (%Self.as_type.560) = value_param_pattern %self.patt, call_param0
  2284. // CHECK:STDOUT: %other.patt: @Op.1.%Self.as_type.loc18_15.1 (%Self.as_type.560) = binding_pattern other
  2285. // CHECK:STDOUT: %other.param_patt: @Op.1.%Self.as_type.loc18_15.1 (%Self.as_type.560) = value_param_pattern %other.patt, call_param1
  2286. // CHECK:STDOUT: %return.patt: @Op.1.%Self.as_type.loc18_15.1 (%Self.as_type.560) = return_slot_pattern
  2287. // CHECK:STDOUT: %return.param_patt: @Op.1.%Self.as_type.loc18_15.1 (%Self.as_type.560) = out_param_pattern %return.patt, call_param2
  2288. // CHECK:STDOUT: } {
  2289. // CHECK:STDOUT: %Self.ref.loc18_37: %BitAnd.type = name_ref Self, @BitAnd.%Self [symbolic = %Self (constants.%Self.e44)]
  2290. // CHECK:STDOUT: %Self.as_type.loc18_37: type = facet_access_type %Self.ref.loc18_37 [symbolic = %Self.as_type.loc18_15.1 (constants.%Self.as_type.560)]
  2291. // CHECK:STDOUT: %.loc18_37: type = converted %Self.ref.loc18_37, %Self.as_type.loc18_37 [symbolic = %Self.as_type.loc18_15.1 (constants.%Self.as_type.560)]
  2292. // CHECK:STDOUT: %self.param: @Op.1.%Self.as_type.loc18_15.1 (%Self.as_type.560) = value_param call_param0
  2293. // CHECK:STDOUT: %.loc18_15.1: type = splice_block %.loc18_15.2 [symbolic = %Self.as_type.loc18_15.1 (constants.%Self.as_type.560)] {
  2294. // CHECK:STDOUT: %Self.ref.loc18_15: %BitAnd.type = name_ref Self, @BitAnd.%Self [symbolic = %Self (constants.%Self.e44)]
  2295. // CHECK:STDOUT: %Self.as_type.loc18_15.2: type = facet_access_type %Self.ref.loc18_15 [symbolic = %Self.as_type.loc18_15.1 (constants.%Self.as_type.560)]
  2296. // CHECK:STDOUT: %.loc18_15.2: type = converted %Self.ref.loc18_15, %Self.as_type.loc18_15.2 [symbolic = %Self.as_type.loc18_15.1 (constants.%Self.as_type.560)]
  2297. // CHECK:STDOUT: }
  2298. // CHECK:STDOUT: %self: @Op.1.%Self.as_type.loc18_15.1 (%Self.as_type.560) = bind_name self, %self.param
  2299. // CHECK:STDOUT: %other.param: @Op.1.%Self.as_type.loc18_15.1 (%Self.as_type.560) = value_param call_param1
  2300. // CHECK:STDOUT: %.loc18_28.1: type = splice_block %.loc18_28.2 [symbolic = %Self.as_type.loc18_15.1 (constants.%Self.as_type.560)] {
  2301. // CHECK:STDOUT: %Self.ref.loc18_28: %BitAnd.type = name_ref Self, @BitAnd.%Self [symbolic = %Self (constants.%Self.e44)]
  2302. // CHECK:STDOUT: %Self.as_type.loc18_28: type = facet_access_type %Self.ref.loc18_28 [symbolic = %Self.as_type.loc18_15.1 (constants.%Self.as_type.560)]
  2303. // CHECK:STDOUT: %.loc18_28.2: type = converted %Self.ref.loc18_28, %Self.as_type.loc18_28 [symbolic = %Self.as_type.loc18_15.1 (constants.%Self.as_type.560)]
  2304. // CHECK:STDOUT: }
  2305. // CHECK:STDOUT: %other: @Op.1.%Self.as_type.loc18_15.1 (%Self.as_type.560) = bind_name other, %other.param
  2306. // CHECK:STDOUT: %return.param: ref @Op.1.%Self.as_type.loc18_15.1 (%Self.as_type.560) = out_param call_param2
  2307. // CHECK:STDOUT: %return: ref @Op.1.%Self.as_type.loc18_15.1 (%Self.as_type.560) = return_slot %return.param
  2308. // CHECK:STDOUT: }
  2309. // CHECK:STDOUT: %assoc0: %BitAnd.assoc_type = assoc_entity element0, %Op.decl [concrete = constants.%assoc0.220]
  2310. // CHECK:STDOUT:
  2311. // CHECK:STDOUT: !members:
  2312. // CHECK:STDOUT: .Self = %Self
  2313. // CHECK:STDOUT: .Op = %assoc0
  2314. // CHECK:STDOUT: witness = (%Op.decl)
  2315. // CHECK:STDOUT: }
  2316. // CHECK:STDOUT:
  2317. // CHECK:STDOUT: generic impl @impl(%T.loc21_14.1: type) {
  2318. // CHECK:STDOUT: %T.loc21_14.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc21_14.2 (constants.%T)]
  2319. // CHECK:STDOUT: %T.patt.loc21_14.2: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc21_14.2 (constants.%T.patt)]
  2320. // CHECK:STDOUT: %BitAnd.impl_witness: <witness> = impl_witness file.%BitAnd.impl_witness_table, @impl(%T.loc21_14.2) [symbolic = %BitAnd.impl_witness (constants.%BitAnd.impl_witness)]
  2321. // CHECK:STDOUT:
  2322. // CHECK:STDOUT: !definition:
  2323. // CHECK:STDOUT: %Op.type: type = fn_type @Op.2, @impl(%T.loc21_14.2) [symbolic = %Op.type (constants.%Op.type.28d)]
  2324. // CHECK:STDOUT: %Op: @impl.%Op.type (%Op.type.28d) = struct_value () [symbolic = %Op (constants.%Op.902)]
  2325. // CHECK:STDOUT: %require_complete: <witness> = require_complete_type %T.loc21_14.2 [symbolic = %require_complete (constants.%require_complete)]
  2326. // CHECK:STDOUT:
  2327. // CHECK:STDOUT: impl: %T.ref as %BitAnd.ref {
  2328. // CHECK:STDOUT: %Op.decl: @impl.%Op.type (%Op.type.28d) = fn_decl @Op.2 [symbolic = @impl.%Op (constants.%Op.902)] {
  2329. // CHECK:STDOUT: %self.patt: @Op.2.%T (%T) = binding_pattern self
  2330. // CHECK:STDOUT: %self.param_patt: @Op.2.%T (%T) = value_param_pattern %self.patt, call_param0
  2331. // CHECK:STDOUT: %other.patt: @Op.2.%T (%T) = binding_pattern other
  2332. // CHECK:STDOUT: %other.param_patt: @Op.2.%T (%T) = value_param_pattern %other.patt, call_param1
  2333. // CHECK:STDOUT: %return.patt: @Op.2.%T (%T) = return_slot_pattern
  2334. // CHECK:STDOUT: %return.param_patt: @Op.2.%T (%T) = out_param_pattern %return.patt, call_param2
  2335. // CHECK:STDOUT: } {
  2336. // CHECK:STDOUT: %Self.ref.loc22_37: type = name_ref Self, @impl.%T.ref [symbolic = %T (constants.%T)]
  2337. // CHECK:STDOUT: %self.param: @Op.2.%T (%T) = value_param call_param0
  2338. // CHECK:STDOUT: %Self.ref.loc22_15: type = name_ref Self, @impl.%T.ref [symbolic = %T (constants.%T)]
  2339. // CHECK:STDOUT: %self: @Op.2.%T (%T) = bind_name self, %self.param
  2340. // CHECK:STDOUT: %other.param: @Op.2.%T (%T) = value_param call_param1
  2341. // CHECK:STDOUT: %Self.ref.loc22_28: type = name_ref Self, @impl.%T.ref [symbolic = %T (constants.%T)]
  2342. // CHECK:STDOUT: %other: @Op.2.%T (%T) = bind_name other, %other.param
  2343. // CHECK:STDOUT: %return.param: ref @Op.2.%T (%T) = out_param call_param2
  2344. // CHECK:STDOUT: %return: ref @Op.2.%T (%T) = return_slot %return.param
  2345. // CHECK:STDOUT: }
  2346. // CHECK:STDOUT:
  2347. // CHECK:STDOUT: !members:
  2348. // CHECK:STDOUT: .Op = %Op.decl
  2349. // CHECK:STDOUT: witness = file.%BitAnd.impl_witness
  2350. // CHECK:STDOUT: }
  2351. // CHECK:STDOUT: }
  2352. // CHECK:STDOUT:
  2353. // CHECK:STDOUT: generic fn @Convert.1(@As.%Dest.loc9_14.1: type, @As.%Self.1: @As.%As.type (%As.type.8ba)) {
  2354. // CHECK:STDOUT: %Dest: type = bind_symbolic_name Dest, 0 [symbolic = %Dest (constants.%Dest)]
  2355. // CHECK:STDOUT: %As.type: type = facet_type <@As, @As(%Dest)> [symbolic = %As.type (constants.%As.type.8ba)]
  2356. // CHECK:STDOUT: %Self: @Convert.1.%As.type (%As.type.8ba) = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.b4e)]
  2357. // CHECK:STDOUT: %Self.as_type.loc10_20.1: type = facet_access_type %Self [symbolic = %Self.as_type.loc10_20.1 (constants.%Self.as_type.7f0)]
  2358. // CHECK:STDOUT:
  2359. // CHECK:STDOUT: fn(%self.param: @Convert.1.%Self.as_type.loc10_20.1 (%Self.as_type.7f0)) -> @Convert.1.%Dest (%Dest);
  2360. // CHECK:STDOUT: }
  2361. // CHECK:STDOUT:
  2362. // CHECK:STDOUT: generic fn @Convert.2(@ImplicitAs.%Dest.loc13_22.1: type, @ImplicitAs.%Self.1: @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.07f)) {
  2363. // CHECK:STDOUT: %Dest: type = bind_symbolic_name Dest, 0 [symbolic = %Dest (constants.%Dest)]
  2364. // CHECK:STDOUT: %ImplicitAs.type: type = facet_type <@ImplicitAs, @ImplicitAs(%Dest)> [symbolic = %ImplicitAs.type (constants.%ImplicitAs.type.07f)]
  2365. // CHECK:STDOUT: %Self: @Convert.2.%ImplicitAs.type (%ImplicitAs.type.07f) = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.0f3)]
  2366. // CHECK:STDOUT: %Self.as_type.loc14_20.1: type = facet_access_type %Self [symbolic = %Self.as_type.loc14_20.1 (constants.%Self.as_type.419)]
  2367. // CHECK:STDOUT:
  2368. // CHECK:STDOUT: fn(%self.param: @Convert.2.%Self.as_type.loc14_20.1 (%Self.as_type.419)) -> @Convert.2.%Dest (%Dest);
  2369. // CHECK:STDOUT: }
  2370. // CHECK:STDOUT:
  2371. // CHECK:STDOUT: generic fn @Op.1(@BitAnd.%Self: %BitAnd.type) {
  2372. // CHECK:STDOUT: %Self: %BitAnd.type = bind_symbolic_name Self, 0 [symbolic = %Self (constants.%Self.e44)]
  2373. // CHECK:STDOUT: %Self.as_type.loc18_15.1: type = facet_access_type %Self [symbolic = %Self.as_type.loc18_15.1 (constants.%Self.as_type.560)]
  2374. // CHECK:STDOUT:
  2375. // CHECK:STDOUT: fn(%self.param: @Op.1.%Self.as_type.loc18_15.1 (%Self.as_type.560), %other.param: @Op.1.%Self.as_type.loc18_15.1 (%Self.as_type.560)) -> @Op.1.%Self.as_type.loc18_15.1 (%Self.as_type.560);
  2376. // CHECK:STDOUT: }
  2377. // CHECK:STDOUT:
  2378. // CHECK:STDOUT: generic fn @Op.2(@impl.%T.loc21_14.1: type) {
  2379. // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic = %T (constants.%T)]
  2380. // CHECK:STDOUT:
  2381. // CHECK:STDOUT: !definition:
  2382. // CHECK:STDOUT:
  2383. // CHECK:STDOUT: fn(%self.param: @Op.2.%T (%T), %other.param: @Op.2.%T (%T)) -> @Op.2.%T (%T) = "type.and";
  2384. // CHECK:STDOUT: }
  2385. // CHECK:STDOUT:
  2386. // CHECK:STDOUT: specific @As(constants.%Dest) {
  2387. // CHECK:STDOUT: %Dest.loc9_14.2 => constants.%Dest
  2388. // CHECK:STDOUT: %Dest.patt.loc9_14.2 => constants.%Dest.patt
  2389. // CHECK:STDOUT: }
  2390. // CHECK:STDOUT:
  2391. // CHECK:STDOUT: specific @Convert.1(constants.%Dest, constants.%Self.b4e) {
  2392. // CHECK:STDOUT: %Dest => constants.%Dest
  2393. // CHECK:STDOUT: %As.type => constants.%As.type.8ba
  2394. // CHECK:STDOUT: %Self => constants.%Self.b4e
  2395. // CHECK:STDOUT: %Self.as_type.loc10_20.1 => constants.%Self.as_type.7f0
  2396. // CHECK:STDOUT: }
  2397. // CHECK:STDOUT:
  2398. // CHECK:STDOUT: specific @As(@Convert.1.%Dest) {}
  2399. // CHECK:STDOUT:
  2400. // CHECK:STDOUT: specific @As(%Dest.loc9_14.2) {}
  2401. // CHECK:STDOUT:
  2402. // CHECK:STDOUT: specific @ImplicitAs(constants.%Dest) {
  2403. // CHECK:STDOUT: %Dest.loc13_22.2 => constants.%Dest
  2404. // CHECK:STDOUT: %Dest.patt.loc13_22.2 => constants.%Dest.patt
  2405. // CHECK:STDOUT: }
  2406. // CHECK:STDOUT:
  2407. // CHECK:STDOUT: specific @Convert.2(constants.%Dest, constants.%Self.0f3) {
  2408. // CHECK:STDOUT: %Dest => constants.%Dest
  2409. // CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.07f
  2410. // CHECK:STDOUT: %Self => constants.%Self.0f3
  2411. // CHECK:STDOUT: %Self.as_type.loc14_20.1 => constants.%Self.as_type.419
  2412. // CHECK:STDOUT: }
  2413. // CHECK:STDOUT:
  2414. // CHECK:STDOUT: specific @ImplicitAs(@Convert.2.%Dest) {}
  2415. // CHECK:STDOUT:
  2416. // CHECK:STDOUT: specific @ImplicitAs(%Dest.loc13_22.2) {}
  2417. // CHECK:STDOUT:
  2418. // CHECK:STDOUT: specific @Op.1(constants.%Self.e44) {
  2419. // CHECK:STDOUT: %Self => constants.%Self.e44
  2420. // CHECK:STDOUT: %Self.as_type.loc18_15.1 => constants.%Self.as_type.560
  2421. // CHECK:STDOUT: }
  2422. // CHECK:STDOUT:
  2423. // CHECK:STDOUT: specific @impl(constants.%T) {
  2424. // CHECK:STDOUT: %T.loc21_14.2 => constants.%T
  2425. // CHECK:STDOUT: %T.patt.loc21_14.2 => constants.%T.patt
  2426. // CHECK:STDOUT: %BitAnd.impl_witness => constants.%BitAnd.impl_witness
  2427. // CHECK:STDOUT: }
  2428. // CHECK:STDOUT:
  2429. // CHECK:STDOUT: specific @impl(%T.loc21_14.2) {}
  2430. // CHECK:STDOUT:
  2431. // CHECK:STDOUT: specific @Op.2(constants.%T) {
  2432. // CHECK:STDOUT: %T => constants.%T
  2433. // CHECK:STDOUT: }
  2434. // CHECK:STDOUT:
  2435. // CHECK:STDOUT: specific @Op.1(constants.%BitAnd.facet) {
  2436. // CHECK:STDOUT: %Self => constants.%BitAnd.facet
  2437. // CHECK:STDOUT: %Self.as_type.loc18_15.1 => constants.%T
  2438. // CHECK:STDOUT: }
  2439. // CHECK:STDOUT: