use_assoc_const.carbon 278 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781
  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. // TODO: Add ranges and switch to "--dump-sem-ir-ranges=only".
  6. // EXTRA-ARGS: --dump-sem-ir-ranges=if-present
  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/use_assoc_const.carbon
  11. // TIP: To dump output, run:
  12. // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/check/testdata/impl/use_assoc_const.carbon
  13. // --- associated_type_in_method_signature.carbon
  14. library "[[@TEST_NAME]]";
  15. interface J {
  16. let U:! type;
  17. fn F[self: Self](u: U) -> U;
  18. }
  19. impl () as J where .U = i32 {
  20. fn F[self: Self](u: i32) -> i32 { return u + 2; }
  21. }
  22. fn CallMethod(x: ()) -> i32 {
  23. return x.(J.F)(40);
  24. }
  25. class C {
  26. // This allows the type to be copyable so it can be returned.
  27. adapt {};
  28. }
  29. impl C as J where .U = C {
  30. fn F[self: Self](u: C) -> C { return self; }
  31. }
  32. // --- associated_type_in_function_signature.carbon
  33. library "[[@TEST_NAME]]";
  34. interface J {
  35. let U:! type;
  36. fn F(u: U) -> U;
  37. }
  38. class D { }
  39. impl D as J where .U = i32 {
  40. fn F(u: i32) -> i32 { return u + 3; }
  41. }
  42. fn CallFunction() -> i32 {
  43. return D.(J.F)(4);
  44. }
  45. // --- extend_impl_with_associated_type_in_signature.carbon
  46. library "[[@TEST_NAME]]";
  47. interface J {
  48. let U:! type;
  49. fn F(u: U) -> U;
  50. fn G[self: Self](v: U) -> U;
  51. }
  52. class E {
  53. extend impl as J where .U = i32 {
  54. fn F(u: i32) -> i32 {
  55. return u + 1;
  56. }
  57. fn G[self: Self](v: i32) -> i32 {
  58. return v + 2;
  59. }
  60. }
  61. }
  62. fn CallBoth(e: E) -> i32 {
  63. return e.F(2) + e.G(3) + E.F(4) + e.(E.G)(5) + e.(J.G)(6);
  64. }
  65. fn GenericCallF[T:! J](t: T, u: T.U) -> T.U {
  66. return t.F(u);
  67. }
  68. fn CallGeneric(e: E) -> i32 {
  69. return GenericCallF(e, 2);
  70. }
  71. // --- use_constraint_on_associated_type.carbon
  72. library "[[@TEST_NAME]]";
  73. interface J {
  74. let U:! Core.Add;
  75. fn F(u: U) -> U;
  76. }
  77. fn GenericAddResult[T:! J](t: T, u: T.U) -> T.U {
  78. return t.F(u) + T.F(u);
  79. }
  80. // --- interface_qualified.carbon
  81. library "[[@TEST_NAME]]";
  82. interface J {
  83. let U:! type;
  84. fn G[self: Self](v: U) -> U;
  85. }
  86. fn GenericCallInterfaceQualified[T:! J](t: T, u: T.U) -> T.U {
  87. return t.(J.G)(u);
  88. }
  89. // --- fail_todo_use_where.carbon
  90. library "[[@TEST_NAME]]";
  91. interface J {
  92. let U:! type;
  93. fn F(u: U) -> U;
  94. }
  95. fn GenericCallFI32[T:! J where .U = i32](t: T) -> i32 {
  96. // CHECK:STDERR: fail_todo_use_where.carbon:[[@LINE+17]]:14: error: cannot implicitly convert expression of type `Core.IntLiteral` to `T.(J.U)` [ConversionFailure]
  97. // CHECK:STDERR: return t.F(2);
  98. // CHECK:STDERR: ^
  99. // CHECK:STDERR: fail_todo_use_where.carbon:[[@LINE+14]]:14: note: type `Core.IntLiteral` does not implement interface `Core.ImplicitAs(T.(J.U))` [MissingImplInMemberAccessNote]
  100. // CHECK:STDERR: return t.F(2);
  101. // CHECK:STDERR: ^
  102. // CHECK:STDERR: fail_todo_use_where.carbon:[[@LINE-10]]:8: note: initializing function parameter [InCallToFunctionParam]
  103. // CHECK:STDERR: fn F(u: U) -> U;
  104. // CHECK:STDERR: ^~~~
  105. // CHECK:STDERR:
  106. // CHECK:STDERR: fail_todo_use_where.carbon:[[@LINE+7]]:3: error: cannot implicitly convert expression of type `T.(J.U)` to `i32` [ConversionFailure]
  107. // CHECK:STDERR: return t.F(2);
  108. // CHECK:STDERR: ^~~~~~~~~~~~~~
  109. // CHECK:STDERR: fail_todo_use_where.carbon:[[@LINE+4]]:3: note: type `T.(J.U)` does not implement interface `Core.ImplicitAs(i32)` [MissingImplInMemberAccessNote]
  110. // CHECK:STDERR: return t.F(2);
  111. // CHECK:STDERR: ^~~~~~~~~~~~~~
  112. // CHECK:STDERR:
  113. return t.F(2);
  114. }
  115. // --- fail_todo_use_associated_constant_in_impl.carbon
  116. library "[[@TEST_NAME]]";
  117. interface J {
  118. let U:! type;
  119. fn F(u: U) -> U;
  120. }
  121. class E {
  122. extend impl as J where .U = i32 {
  123. // CHECK:STDERR: fail_todo_use_associated_constant_in_impl.carbon:[[@LINE+14]]:13: error: cannot implicitly convert non-type value of type `<associated entity in J>` to `type` [ConversionFailureNonTypeToFacet]
  124. // CHECK:STDERR: fn F(u: U) -> U {
  125. // CHECK:STDERR: ^
  126. // CHECK:STDERR: fail_todo_use_associated_constant_in_impl.carbon:[[@LINE+11]]:13: note: type `<associated entity in J>` does not implement interface `Core.ImplicitAs(type)` [MissingImplInMemberAccessNote]
  127. // CHECK:STDERR: fn F(u: U) -> U {
  128. // CHECK:STDERR: ^
  129. // CHECK:STDERR:
  130. // CHECK:STDERR: fail_todo_use_associated_constant_in_impl.carbon:[[@LINE+7]]:19: error: cannot implicitly convert non-type value of type `<associated entity in J>` to `type` [ConversionFailureNonTypeToFacet]
  131. // CHECK:STDERR: fn F(u: U) -> U {
  132. // CHECK:STDERR: ^
  133. // CHECK:STDERR: fail_todo_use_associated_constant_in_impl.carbon:[[@LINE+4]]:19: note: type `<associated entity in J>` does not implement interface `Core.ImplicitAs(type)` [MissingImplInMemberAccessNote]
  134. // CHECK:STDERR: fn F(u: U) -> U {
  135. // CHECK:STDERR: ^
  136. // CHECK:STDERR:
  137. fn F(u: U) -> U {
  138. return u + 1;
  139. }
  140. }
  141. }
  142. // --- fail_todo_self_period_associated_type.carbon
  143. library "[[@TEST_NAME]]";
  144. interface J2 {
  145. let U2:! type;
  146. // CHECK:STDERR: fail_todo_self_period_associated_type.carbon:[[@LINE+14]]:23: error: member access into object of incomplete type `J2` [IncompleteTypeInMemberAccess]
  147. // CHECK:STDERR: fn F[self: Self](z: Self.U2) -> Self.U2;
  148. // CHECK:STDERR: ^~~~
  149. // CHECK:STDERR: fail_todo_self_period_associated_type.carbon:[[@LINE-5]]:1: note: interface is currently being defined [InterfaceIncompleteWithinDefinition]
  150. // CHECK:STDERR: interface J2 {
  151. // CHECK:STDERR: ^~~~~~~~~~~~~~
  152. // CHECK:STDERR:
  153. // CHECK:STDERR: fail_todo_self_period_associated_type.carbon:[[@LINE+7]]:35: error: member access into object of incomplete type `J2` [IncompleteTypeInMemberAccess]
  154. // CHECK:STDERR: fn F[self: Self](z: Self.U2) -> Self.U2;
  155. // CHECK:STDERR: ^~~~
  156. // CHECK:STDERR: fail_todo_self_period_associated_type.carbon:[[@LINE-12]]:1: note: interface is currently being defined [InterfaceIncompleteWithinDefinition]
  157. // CHECK:STDERR: interface J2 {
  158. // CHECK:STDERR: ^~~~~~~~~~~~~~
  159. // CHECK:STDERR:
  160. fn F[self: Self](z: Self.U2) -> Self.U2;
  161. }
  162. impl () as J2 where .U2 = {} {
  163. // CHECK:STDERR: fail_todo_self_period_associated_type.carbon:[[@LINE+7]]:3: error: expression cannot be used as a value [UseOfNonExprAsValue]
  164. // CHECK:STDERR: fn F[self: Self](z: {}) -> {} { return z; }
  165. // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  166. // CHECK:STDERR: fail_todo_self_period_associated_type.carbon:[[@LINE-7]]:3: note: while building thunk to match the signature of this function [ThunkSignature]
  167. // CHECK:STDERR: fn F[self: Self](z: Self.U2) -> Self.U2;
  168. // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  169. // CHECK:STDERR:
  170. fn F[self: Self](z: {}) -> {} { return z; }
  171. }
  172. class C2 {
  173. // This allows the type to be copyable so it can be returned.
  174. adapt {};
  175. }
  176. impl C2 as J2 where .U2 = C2 {
  177. fn F[self: Self](z: C2) -> C2 { return self; }
  178. }
  179. // --- fail_associated_type_in_signature_mismatch.carbon
  180. library "[[@TEST_NAME]]";
  181. interface K {
  182. let V:! type;
  183. fn F[self: Self](v: V) -> V;
  184. }
  185. impl () as K where .V = {.a: ()} {
  186. // CHECK:STDERR: fail_associated_type_in_signature_mismatch.carbon:[[@LINE+7]]:3: error: expression cannot be used as a value [UseOfNonExprAsValue]
  187. // CHECK:STDERR: fn F[self: Self](v: {.x: ()}) -> {.x: ()} { return v; }
  188. // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  189. // CHECK:STDERR: fail_associated_type_in_signature_mismatch.carbon:[[@LINE-7]]:3: note: while building thunk to match the signature of this function [ThunkSignature]
  190. // CHECK:STDERR: fn F[self: Self](v: V) -> V;
  191. // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
  192. // CHECK:STDERR:
  193. fn F[self: Self](v: {.x: ()}) -> {.x: ()} { return v; }
  194. }
  195. // --- use_non-type_in_function.carbon
  196. library "[[@TEST_NAME]]";
  197. interface M {
  198. let Z:! {.b: {}};
  199. fn G() -> {};
  200. }
  201. impl () as M where .Z = {.b = {}} {
  202. fn G() -> {} {
  203. return (Self as M).Z.b;
  204. }
  205. }
  206. // --- self_as_uses_correct_rewrite_constraint.carbon
  207. library "[[@TEST_NAME]]";
  208. class C(T:! type) {}
  209. interface M {
  210. let Z:! {.b: type};
  211. fn G() -> type;
  212. }
  213. impl C({}) as M where .Z = {.b = {}} {
  214. fn G() -> type {
  215. return (Self as M).Z.b;
  216. }
  217. }
  218. impl C(()) as M where .Z = {.b = ()} {
  219. fn G() -> type {
  220. return (Self as M).Z.b;
  221. }
  222. }
  223. // --- associated_int_in_array.carbon
  224. library "[[@TEST_NAME]]";
  225. interface I {
  226. let N:! i32;
  227. fn F[self: Self]() -> array(bool, N);
  228. }
  229. impl () as I where .N = 2 {
  230. fn F[self: Self]() -> array(bool, 2) { return (true, false); }
  231. }
  232. // --- symbolic_associated_type_in_concrete_context.carbon
  233. interface Z {
  234. let X:! type;
  235. }
  236. class C(T:! type) {}
  237. class D {}
  238. impl forall [T:! type] T as Z where .X = C(T) {}
  239. fn F() {
  240. let a: D.(Z.X) = {} as C(D);
  241. }
  242. // CHECK:STDOUT: --- associated_type_in_method_signature.carbon
  243. // CHECK:STDOUT:
  244. // CHECK:STDOUT: constants {
  245. // CHECK:STDOUT: %J.type: type = facet_type <@J> [concrete]
  246. // CHECK:STDOUT: %Self.ccd: %J.type = bind_symbolic_name Self, 0 [symbolic]
  247. // CHECK:STDOUT: %J.assoc_type: type = assoc_entity_type @J [concrete]
  248. // CHECK:STDOUT: %assoc0.411: %J.assoc_type = assoc_entity element0, @J.%U [concrete]
  249. // CHECK:STDOUT: %Self.as_type.3df: type = facet_access_type %Self.ccd [symbolic]
  250. // CHECK:STDOUT: %pattern_type.4ca: type = pattern_type %Self.as_type.3df [symbolic]
  251. // CHECK:STDOUT: %J.lookup_impl_witness.646: <witness> = lookup_impl_witness %Self.ccd, @J [symbolic]
  252. // CHECK:STDOUT: %J.facet.521: %J.type = facet_value %Self.as_type.3df, (%J.lookup_impl_witness.646) [symbolic]
  253. // CHECK:STDOUT: %impl.elem0.11f: type = impl_witness_access %J.lookup_impl_witness.646, element0 [symbolic]
  254. // CHECK:STDOUT: %pattern_type.b98: type = pattern_type %impl.elem0.11f [symbolic]
  255. // CHECK:STDOUT: %F.type.c14: type = fn_type @F.1 [concrete]
  256. // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete]
  257. // CHECK:STDOUT: %F.b71: %F.type.c14 = struct_value () [concrete]
  258. // CHECK:STDOUT: %assoc1: %J.assoc_type = assoc_entity element1, @J.%F.decl [concrete]
  259. // CHECK:STDOUT: %.Self: %J.type = bind_symbolic_name .Self [symbolic_self]
  260. // CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self [symbolic_self]
  261. // CHECK:STDOUT: %J.lookup_impl_witness.25c: <witness> = lookup_impl_witness %.Self, @J [symbolic_self]
  262. // CHECK:STDOUT: %J.facet.330: %J.type = facet_value %.Self.as_type, (%J.lookup_impl_witness.25c) [symbolic_self]
  263. // CHECK:STDOUT: %impl.elem0.83f: type = impl_witness_access %J.lookup_impl_witness.25c, element0 [symbolic_self]
  264. // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete]
  265. // CHECK:STDOUT: %Int.type: type = generic_class_type @Int [concrete]
  266. // CHECK:STDOUT: %Int.generic: %Int.type = struct_value () [concrete]
  267. // CHECK:STDOUT: %N: Core.IntLiteral = bind_symbolic_name N, 0 [symbolic]
  268. // CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [concrete]
  269. // CHECK:STDOUT: %J_where.type.b64: type = facet_type <@J where %impl.elem0.83f = %i32> [concrete]
  270. // CHECK:STDOUT: %J.impl_witness.e42: <witness> = impl_witness file.%J.impl_witness_table.loc8 [concrete]
  271. // CHECK:STDOUT: %pattern_type.cb1: type = pattern_type %empty_tuple.type [concrete]
  272. // CHECK:STDOUT: %pattern_type.7ce: type = pattern_type %i32 [concrete]
  273. // CHECK:STDOUT: %F.type.7d4: type = fn_type @F.2 [concrete]
  274. // CHECK:STDOUT: %F.46e: %F.type.7d4 = struct_value () [concrete]
  275. // CHECK:STDOUT: %J.facet.ecc: %J.type = facet_value %empty_tuple.type, (%J.impl_witness.e42) [concrete]
  276. // CHECK:STDOUT: %int_2.ecc: Core.IntLiteral = int_value 2 [concrete]
  277. // CHECK:STDOUT: %Add.type: type = facet_type <@Add> [concrete]
  278. // CHECK:STDOUT: %Op.type.545: type = fn_type @Op.1 [concrete]
  279. // CHECK:STDOUT: %To.c80: Core.IntLiteral = bind_symbolic_name To, 0 [symbolic]
  280. // CHECK:STDOUT: %ImplicitAs.type.cc7: type = generic_interface_type @ImplicitAs [concrete]
  281. // CHECK:STDOUT: %ImplicitAs.generic: %ImplicitAs.type.cc7 = struct_value () [concrete]
  282. // CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.2, @impl.4f9(%To.c80) [symbolic]
  283. // CHECK:STDOUT: %Convert.f06: %Convert.type.0f9 = struct_value () [symbolic]
  284. // CHECK:STDOUT: %Op.type.52d: type = fn_type @Op.2, @impl.2c2(%N) [symbolic]
  285. // CHECK:STDOUT: %Op.12d: %Op.type.52d = struct_value () [symbolic]
  286. // CHECK:STDOUT: %Add.impl_witness.dbc: <witness> = impl_witness imports.%Add.impl_witness_table, @impl.2c2(%int_32) [concrete]
  287. // CHECK:STDOUT: %Op.type.210: type = fn_type @Op.2, @impl.2c2(%int_32) [concrete]
  288. // CHECK:STDOUT: %Op.c82: %Op.type.210 = struct_value () [concrete]
  289. // CHECK:STDOUT: %Add.facet: %Add.type = facet_value %i32, (%Add.impl_witness.dbc) [concrete]
  290. // CHECK:STDOUT: %.ac9: type = fn_type_with_self_type %Op.type.545, %Add.facet [concrete]
  291. // CHECK:STDOUT: %Op.specific_fn: <specific function> = specific_function %Op.c82, @Op.2(%int_32) [concrete]
  292. // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete]
  293. // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete]
  294. // CHECK:STDOUT: %ImplicitAs.impl_witness.c75: <witness> = impl_witness imports.%ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete]
  295. // CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.4f9(%int_32) [concrete]
  296. // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete]
  297. // CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete]
  298. // CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete]
  299. // CHECK:STDOUT: %Convert.bound.ef9: <bound method> = bound_method %int_2.ecc, %Convert.956 [concrete]
  300. // CHECK:STDOUT: %Convert.specific_fn: <specific function> = specific_function %Convert.956, @Convert.2(%int_32) [concrete]
  301. // CHECK:STDOUT: %bound_method.b92: <bound method> = bound_method %int_2.ecc, %Convert.specific_fn [concrete]
  302. // CHECK:STDOUT: %int_2.ef8: %i32 = int_value 2 [concrete]
  303. // CHECK:STDOUT: %CallMethod.type: type = fn_type @CallMethod [concrete]
  304. // CHECK:STDOUT: %CallMethod: %CallMethod.type = struct_value () [concrete]
  305. // CHECK:STDOUT: %.597: type = fn_type_with_self_type %F.type.c14, %J.facet.ecc [concrete]
  306. // CHECK:STDOUT: %int_40.f80: Core.IntLiteral = int_value 40 [concrete]
  307. // CHECK:STDOUT: %Convert.bound.e52: <bound method> = bound_method %int_40.f80, %Convert.956 [concrete]
  308. // CHECK:STDOUT: %bound_method.7b8: <bound method> = bound_method %int_40.f80, %Convert.specific_fn [concrete]
  309. // CHECK:STDOUT: %int_40.518: %i32 = int_value 40 [concrete]
  310. // CHECK:STDOUT: %C: type = class_type @C [concrete]
  311. // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete]
  312. // CHECK:STDOUT: %complete_type.357: <witness> = complete_type_witness %empty_struct_type [concrete]
  313. // CHECK:STDOUT: %J_where.type.0bc: type = facet_type <@J where %impl.elem0.83f = %C> [concrete]
  314. // CHECK:STDOUT: %J.impl_witness.12d: <witness> = impl_witness file.%J.impl_witness_table.loc21 [concrete]
  315. // CHECK:STDOUT: %pattern_type.c48: type = pattern_type %C [concrete]
  316. // CHECK:STDOUT: %F.type.2a7: type = fn_type @F.3 [concrete]
  317. // CHECK:STDOUT: %F.fb5: %F.type.2a7 = struct_value () [concrete]
  318. // CHECK:STDOUT: %J.facet.30e: %J.type = facet_value %C, (%J.impl_witness.12d) [concrete]
  319. // CHECK:STDOUT: }
  320. // CHECK:STDOUT:
  321. // CHECK:STDOUT: imports {
  322. // CHECK:STDOUT: %Core: <namespace> = namespace file.%Core.import, [concrete] {
  323. // CHECK:STDOUT: .Int = %Core.Int
  324. // CHECK:STDOUT: .Add = %Core.Add
  325. // CHECK:STDOUT: .ImplicitAs = %Core.ImplicitAs
  326. // CHECK:STDOUT: import Core//prelude
  327. // CHECK:STDOUT: import Core//prelude/...
  328. // CHECK:STDOUT: }
  329. // CHECK:STDOUT: %Core.Int: %Int.type = import_ref Core//prelude/types/int, Int, loaded [concrete = constants.%Int.generic]
  330. // CHECK:STDOUT: %Core.Add: type = import_ref Core//prelude/operators/arithmetic, Add, loaded [concrete = constants.%Add.type]
  331. // CHECK:STDOUT: %Core.import_ref.a5b: @impl.4f9.%Convert.type (%Convert.type.0f9) = import_ref Core//prelude/types/int, loc19_39, loaded [symbolic = @impl.4f9.%Convert (constants.%Convert.f06)]
  332. // CHECK:STDOUT: %ImplicitAs.impl_witness_table.a2f = impl_witness_table (%Core.import_ref.a5b), @impl.4f9 [concrete]
  333. // CHECK:STDOUT: %Core.import_ref.344: @impl.2c2.%Op.type (%Op.type.52d) = import_ref Core//prelude/types/int, loc58_42, loaded [symbolic = @impl.2c2.%Op (constants.%Op.12d)]
  334. // CHECK:STDOUT: %Add.impl_witness_table = impl_witness_table (%Core.import_ref.344), @impl.2c2 [concrete]
  335. // CHECK:STDOUT: %Core.ImplicitAs: %ImplicitAs.type.cc7 = import_ref Core//prelude/operators/as, ImplicitAs, loaded [concrete = constants.%ImplicitAs.generic]
  336. // CHECK:STDOUT: }
  337. // CHECK:STDOUT:
  338. // CHECK:STDOUT: file {
  339. // CHECK:STDOUT: package: <namespace> = namespace [concrete] {
  340. // CHECK:STDOUT: .Core = imports.%Core
  341. // CHECK:STDOUT: .J = %J.decl
  342. // CHECK:STDOUT: .CallMethod = %CallMethod.decl
  343. // CHECK:STDOUT: .C = %C.decl
  344. // CHECK:STDOUT: }
  345. // CHECK:STDOUT: %Core.import = import Core
  346. // CHECK:STDOUT: %J.decl: type = interface_decl @J [concrete = constants.%J.type] {} {}
  347. // CHECK:STDOUT: impl_decl @impl.32a [concrete] {} {
  348. // CHECK:STDOUT: %.loc8_7.1: %empty_tuple.type = tuple_literal ()
  349. // CHECK:STDOUT: %.loc8_7.2: type = converted %.loc8_7.1, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type]
  350. // CHECK:STDOUT: %J.ref: type = name_ref J, file.%J.decl [concrete = constants.%J.type]
  351. // CHECK:STDOUT: %.Self: %J.type = bind_symbolic_name .Self [symbolic_self = constants.%.Self]
  352. // CHECK:STDOUT: %.Self.ref: %J.type = name_ref .Self, %.Self [symbolic_self = constants.%.Self]
  353. // CHECK:STDOUT: %U.ref: %J.assoc_type = name_ref U, @U.%assoc0 [concrete = constants.%assoc0.411]
  354. // CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self.ref [symbolic_self = constants.%.Self.as_type]
  355. // CHECK:STDOUT: %.loc8_20: type = converted %.Self.ref, %.Self.as_type [symbolic_self = constants.%.Self.as_type]
  356. // CHECK:STDOUT: %impl.elem0: type = impl_witness_access constants.%J.lookup_impl_witness.25c, element0 [symbolic_self = constants.%impl.elem0.83f]
  357. // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete = constants.%int_32]
  358. // CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32]
  359. // CHECK:STDOUT: %.loc8_14: type = where_expr %.Self [concrete = constants.%J_where.type.b64] {
  360. // CHECK:STDOUT: requirement_rewrite %impl.elem0, %i32
  361. // CHECK:STDOUT: }
  362. // CHECK:STDOUT: }
  363. // CHECK:STDOUT: %J.impl_witness_table.loc8 = impl_witness_table (%impl_witness_assoc_constant.loc8, @impl.32a.%F.decl), @impl.32a [concrete]
  364. // CHECK:STDOUT: %J.impl_witness.loc8: <witness> = impl_witness %J.impl_witness_table.loc8 [concrete = constants.%J.impl_witness.e42]
  365. // CHECK:STDOUT: %impl_witness_assoc_constant.loc8: type = impl_witness_assoc_constant constants.%i32 [concrete = constants.%i32]
  366. // CHECK:STDOUT: %CallMethod.decl: %CallMethod.type = fn_decl @CallMethod [concrete = constants.%CallMethod] {
  367. // CHECK:STDOUT: %x.patt: %pattern_type.cb1 = binding_pattern x [concrete]
  368. // CHECK:STDOUT: %x.param_patt: %pattern_type.cb1 = value_param_pattern %x.patt, call_param0 [concrete]
  369. // CHECK:STDOUT: %return.patt: %pattern_type.7ce = return_slot_pattern [concrete]
  370. // CHECK:STDOUT: %return.param_patt: %pattern_type.7ce = out_param_pattern %return.patt, call_param1 [concrete]
  371. // CHECK:STDOUT: } {
  372. // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete = constants.%int_32]
  373. // CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32]
  374. // CHECK:STDOUT: %x.param: %empty_tuple.type = value_param call_param0
  375. // CHECK:STDOUT: %.loc12_19.1: type = splice_block %.loc12_19.3 [concrete = constants.%empty_tuple.type] {
  376. // CHECK:STDOUT: %.loc12_19.2: %empty_tuple.type = tuple_literal ()
  377. // CHECK:STDOUT: %.loc12_19.3: type = converted %.loc12_19.2, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type]
  378. // CHECK:STDOUT: }
  379. // CHECK:STDOUT: %x: %empty_tuple.type = bind_name x, %x.param
  380. // CHECK:STDOUT: %return.param: ref %i32 = out_param call_param1
  381. // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param
  382. // CHECK:STDOUT: }
  383. // CHECK:STDOUT: %C.decl: type = class_decl @C [concrete = constants.%C] {} {}
  384. // CHECK:STDOUT: impl_decl @impl.043 [concrete] {} {
  385. // CHECK:STDOUT: %C.ref.loc21_6: type = name_ref C, file.%C.decl [concrete = constants.%C]
  386. // CHECK:STDOUT: %J.ref: type = name_ref J, file.%J.decl [concrete = constants.%J.type]
  387. // CHECK:STDOUT: %.Self: %J.type = bind_symbolic_name .Self [symbolic_self = constants.%.Self]
  388. // CHECK:STDOUT: %.Self.ref: %J.type = name_ref .Self, %.Self [symbolic_self = constants.%.Self]
  389. // CHECK:STDOUT: %U.ref: %J.assoc_type = name_ref U, @U.%assoc0 [concrete = constants.%assoc0.411]
  390. // CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self.ref [symbolic_self = constants.%.Self.as_type]
  391. // CHECK:STDOUT: %.loc21_19: type = converted %.Self.ref, %.Self.as_type [symbolic_self = constants.%.Self.as_type]
  392. // CHECK:STDOUT: %impl.elem0: type = impl_witness_access constants.%J.lookup_impl_witness.25c, element0 [symbolic_self = constants.%impl.elem0.83f]
  393. // CHECK:STDOUT: %C.ref.loc21_24: type = name_ref C, file.%C.decl [concrete = constants.%C]
  394. // CHECK:STDOUT: %.loc21_13: type = where_expr %.Self [concrete = constants.%J_where.type.0bc] {
  395. // CHECK:STDOUT: requirement_rewrite %impl.elem0, %C.ref.loc21_24
  396. // CHECK:STDOUT: }
  397. // CHECK:STDOUT: }
  398. // CHECK:STDOUT: %J.impl_witness_table.loc21 = impl_witness_table (%impl_witness_assoc_constant.loc21, @impl.043.%F.decl), @impl.043 [concrete]
  399. // CHECK:STDOUT: %J.impl_witness.loc21: <witness> = impl_witness %J.impl_witness_table.loc21 [concrete = constants.%J.impl_witness.12d]
  400. // CHECK:STDOUT: %impl_witness_assoc_constant.loc21: type = impl_witness_assoc_constant constants.%C [concrete = constants.%C]
  401. // CHECK:STDOUT: }
  402. // CHECK:STDOUT:
  403. // CHECK:STDOUT: interface @J {
  404. // CHECK:STDOUT: %Self: %J.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self.ccd]
  405. // CHECK:STDOUT: %U: type = assoc_const_decl @U [concrete] {
  406. // CHECK:STDOUT: %assoc0: %J.assoc_type = assoc_entity element0, @J.%U [concrete = constants.%assoc0.411]
  407. // CHECK:STDOUT: }
  408. // CHECK:STDOUT: %F.decl: %F.type.c14 = fn_decl @F.1 [concrete = constants.%F.b71] {
  409. // CHECK:STDOUT: %self.patt: @F.1.%pattern_type.loc5_8 (%pattern_type.4ca) = binding_pattern self [concrete]
  410. // CHECK:STDOUT: %self.param_patt: @F.1.%pattern_type.loc5_8 (%pattern_type.4ca) = value_param_pattern %self.patt, call_param0 [concrete]
  411. // CHECK:STDOUT: %u.patt: @F.1.%pattern_type.loc5_20 (%pattern_type.b98) = binding_pattern u [concrete]
  412. // CHECK:STDOUT: %u.param_patt: @F.1.%pattern_type.loc5_20 (%pattern_type.b98) = value_param_pattern %u.patt, call_param1 [concrete]
  413. // CHECK:STDOUT: %return.patt: @F.1.%pattern_type.loc5_20 (%pattern_type.b98) = return_slot_pattern [concrete]
  414. // CHECK:STDOUT: %return.param_patt: @F.1.%pattern_type.loc5_20 (%pattern_type.b98) = out_param_pattern %return.patt, call_param2 [concrete]
  415. // CHECK:STDOUT: } {
  416. // CHECK:STDOUT: %impl.elem0.loc5_29: type = impl_witness_access constants.%J.lookup_impl_witness.646, element0 [symbolic = %impl.elem0.loc5_23.1 (constants.%impl.elem0.11f)]
  417. // CHECK:STDOUT: %U.ref.loc5_29: type = name_ref U, %impl.elem0.loc5_29 [symbolic = %impl.elem0.loc5_23.1 (constants.%impl.elem0.11f)]
  418. // CHECK:STDOUT: %self.param: @F.1.%Self.as_type.loc5_14.1 (%Self.as_type.3df) = value_param call_param0
  419. // CHECK:STDOUT: %.loc5_14.1: type = splice_block %.loc5_14.2 [symbolic = %Self.as_type.loc5_14.1 (constants.%Self.as_type.3df)] {
  420. // CHECK:STDOUT: %Self.ref: %J.type = name_ref Self, @J.%Self [symbolic = %Self (constants.%Self.ccd)]
  421. // CHECK:STDOUT: %Self.as_type.loc5_14.2: type = facet_access_type %Self.ref [symbolic = %Self.as_type.loc5_14.1 (constants.%Self.as_type.3df)]
  422. // CHECK:STDOUT: %.loc5_14.2: type = converted %Self.ref, %Self.as_type.loc5_14.2 [symbolic = %Self.as_type.loc5_14.1 (constants.%Self.as_type.3df)]
  423. // CHECK:STDOUT: }
  424. // CHECK:STDOUT: %self: @F.1.%Self.as_type.loc5_14.1 (%Self.as_type.3df) = bind_name self, %self.param
  425. // CHECK:STDOUT: %u.param: @F.1.%impl.elem0.loc5_23.1 (%impl.elem0.11f) = value_param call_param1
  426. // CHECK:STDOUT: %.loc5_23: type = splice_block %U.ref.loc5_23 [symbolic = %impl.elem0.loc5_23.1 (constants.%impl.elem0.11f)] {
  427. // CHECK:STDOUT: %impl.elem0.loc5_23.2: type = impl_witness_access constants.%J.lookup_impl_witness.646, element0 [symbolic = %impl.elem0.loc5_23.1 (constants.%impl.elem0.11f)]
  428. // CHECK:STDOUT: %U.ref.loc5_23: type = name_ref U, %impl.elem0.loc5_23.2 [symbolic = %impl.elem0.loc5_23.1 (constants.%impl.elem0.11f)]
  429. // CHECK:STDOUT: }
  430. // CHECK:STDOUT: %u: @F.1.%impl.elem0.loc5_23.1 (%impl.elem0.11f) = bind_name u, %u.param
  431. // CHECK:STDOUT: %return.param: ref @F.1.%impl.elem0.loc5_23.1 (%impl.elem0.11f) = out_param call_param2
  432. // CHECK:STDOUT: %return: ref @F.1.%impl.elem0.loc5_23.1 (%impl.elem0.11f) = return_slot %return.param
  433. // CHECK:STDOUT: }
  434. // CHECK:STDOUT: %assoc1: %J.assoc_type = assoc_entity element1, %F.decl [concrete = constants.%assoc1]
  435. // CHECK:STDOUT:
  436. // CHECK:STDOUT: !members:
  437. // CHECK:STDOUT: .Self = %Self
  438. // CHECK:STDOUT: .U = @U.%assoc0
  439. // CHECK:STDOUT: .F = %assoc1
  440. // CHECK:STDOUT: witness = (%U, %F.decl)
  441. // CHECK:STDOUT: }
  442. // CHECK:STDOUT:
  443. // CHECK:STDOUT: generic assoc_const @U(@J.%Self: %J.type) {
  444. // CHECK:STDOUT: assoc_const U:! type;
  445. // CHECK:STDOUT: }
  446. // CHECK:STDOUT:
  447. // CHECK:STDOUT: impl @impl.32a: %.loc8_7.2 as %.loc8_14 {
  448. // CHECK:STDOUT: %F.decl: %F.type.7d4 = fn_decl @F.2 [concrete = constants.%F.46e] {
  449. // CHECK:STDOUT: %self.patt: %pattern_type.cb1 = binding_pattern self [concrete]
  450. // CHECK:STDOUT: %self.param_patt: %pattern_type.cb1 = value_param_pattern %self.patt, call_param0 [concrete]
  451. // CHECK:STDOUT: %u.patt: %pattern_type.7ce = binding_pattern u [concrete]
  452. // CHECK:STDOUT: %u.param_patt: %pattern_type.7ce = value_param_pattern %u.patt, call_param1 [concrete]
  453. // CHECK:STDOUT: %return.patt: %pattern_type.7ce = return_slot_pattern [concrete]
  454. // CHECK:STDOUT: %return.param_patt: %pattern_type.7ce = out_param_pattern %return.patt, call_param2 [concrete]
  455. // CHECK:STDOUT: } {
  456. // CHECK:STDOUT: %int_32.loc9_31: Core.IntLiteral = int_value 32 [concrete = constants.%int_32]
  457. // CHECK:STDOUT: %i32.loc9_31: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32]
  458. // CHECK:STDOUT: %self.param: %empty_tuple.type = value_param call_param0
  459. // CHECK:STDOUT: %Self.ref: type = name_ref Self, @impl.32a.%.loc8_7.2 [concrete = constants.%empty_tuple.type]
  460. // CHECK:STDOUT: %self: %empty_tuple.type = bind_name self, %self.param
  461. // CHECK:STDOUT: %u.param: %i32 = value_param call_param1
  462. // CHECK:STDOUT: %.loc9_23: type = splice_block %i32.loc9_23 [concrete = constants.%i32] {
  463. // CHECK:STDOUT: %int_32.loc9_23: Core.IntLiteral = int_value 32 [concrete = constants.%int_32]
  464. // CHECK:STDOUT: %i32.loc9_23: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32]
  465. // CHECK:STDOUT: }
  466. // CHECK:STDOUT: %u: %i32 = bind_name u, %u.param
  467. // CHECK:STDOUT: %return.param: ref %i32 = out_param call_param2
  468. // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param
  469. // CHECK:STDOUT: }
  470. // CHECK:STDOUT:
  471. // CHECK:STDOUT: !members:
  472. // CHECK:STDOUT: .F = %F.decl
  473. // CHECK:STDOUT: witness = file.%J.impl_witness.loc8
  474. // CHECK:STDOUT: }
  475. // CHECK:STDOUT:
  476. // CHECK:STDOUT: impl @impl.043: %C.ref.loc21_6 as %.loc21_13 {
  477. // CHECK:STDOUT: %F.decl: %F.type.2a7 = fn_decl @F.3 [concrete = constants.%F.fb5] {
  478. // CHECK:STDOUT: %self.patt: %pattern_type.c48 = binding_pattern self [concrete]
  479. // CHECK:STDOUT: %self.param_patt: %pattern_type.c48 = value_param_pattern %self.patt, call_param0 [concrete]
  480. // CHECK:STDOUT: %u.patt: %pattern_type.c48 = binding_pattern u [concrete]
  481. // CHECK:STDOUT: %u.param_patt: %pattern_type.c48 = value_param_pattern %u.patt, call_param1 [concrete]
  482. // CHECK:STDOUT: %return.patt: %pattern_type.c48 = return_slot_pattern [concrete]
  483. // CHECK:STDOUT: %return.param_patt: %pattern_type.c48 = out_param_pattern %return.patt, call_param2 [concrete]
  484. // CHECK:STDOUT: } {
  485. // CHECK:STDOUT: %C.ref.loc22_29: type = name_ref C, file.%C.decl [concrete = constants.%C]
  486. // CHECK:STDOUT: %self.param: %C = value_param call_param0
  487. // CHECK:STDOUT: %Self.ref: type = name_ref Self, @impl.043.%C.ref.loc21_6 [concrete = constants.%C]
  488. // CHECK:STDOUT: %self: %C = bind_name self, %self.param
  489. // CHECK:STDOUT: %u.param: %C = value_param call_param1
  490. // CHECK:STDOUT: %C.ref.loc22_23: type = name_ref C, file.%C.decl [concrete = constants.%C]
  491. // CHECK:STDOUT: %u: %C = bind_name u, %u.param
  492. // CHECK:STDOUT: %return.param: ref %C = out_param call_param2
  493. // CHECK:STDOUT: %return: ref %C = return_slot %return.param
  494. // CHECK:STDOUT: }
  495. // CHECK:STDOUT:
  496. // CHECK:STDOUT: !members:
  497. // CHECK:STDOUT: .C = <poisoned>
  498. // CHECK:STDOUT: .F = %F.decl
  499. // CHECK:STDOUT: witness = file.%J.impl_witness.loc21
  500. // CHECK:STDOUT: }
  501. // CHECK:STDOUT:
  502. // CHECK:STDOUT: class @C {
  503. // CHECK:STDOUT: %.loc18_10: %empty_struct_type = struct_literal ()
  504. // CHECK:STDOUT: %.loc18_11: type = converted %.loc18_10, constants.%empty_struct_type [concrete = constants.%empty_struct_type]
  505. // CHECK:STDOUT: adapt_decl %.loc18_11 [concrete]
  506. // CHECK:STDOUT: %complete_type: <witness> = complete_type_witness constants.%empty_struct_type [concrete = constants.%complete_type.357]
  507. // CHECK:STDOUT: complete_type_witness = %complete_type
  508. // CHECK:STDOUT:
  509. // CHECK:STDOUT: !members:
  510. // CHECK:STDOUT: .Self = constants.%C
  511. // CHECK:STDOUT: }
  512. // CHECK:STDOUT:
  513. // CHECK:STDOUT: generic fn @F.1(@J.%Self: %J.type) {
  514. // CHECK:STDOUT: %Self: %J.type = bind_symbolic_name Self, 0 [symbolic = %Self (constants.%Self.ccd)]
  515. // CHECK:STDOUT: %Self.as_type.loc5_14.1: type = facet_access_type %Self [symbolic = %Self.as_type.loc5_14.1 (constants.%Self.as_type.3df)]
  516. // CHECK:STDOUT: %pattern_type.loc5_8: type = pattern_type %Self.as_type.loc5_14.1 [symbolic = %pattern_type.loc5_8 (constants.%pattern_type.4ca)]
  517. // CHECK:STDOUT: %J.lookup_impl_witness: <witness> = lookup_impl_witness %Self, @J [symbolic = %J.lookup_impl_witness (constants.%J.lookup_impl_witness.646)]
  518. // CHECK:STDOUT: %impl.elem0.loc5_23.1: type = impl_witness_access %J.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc5_23.1 (constants.%impl.elem0.11f)]
  519. // CHECK:STDOUT: %pattern_type.loc5_20: type = pattern_type %impl.elem0.loc5_23.1 [symbolic = %pattern_type.loc5_20 (constants.%pattern_type.b98)]
  520. // CHECK:STDOUT:
  521. // CHECK:STDOUT: fn(%self.param: @F.1.%Self.as_type.loc5_14.1 (%Self.as_type.3df), %u.param: @F.1.%impl.elem0.loc5_23.1 (%impl.elem0.11f)) -> @F.1.%impl.elem0.loc5_23.1 (%impl.elem0.11f);
  522. // CHECK:STDOUT: }
  523. // CHECK:STDOUT:
  524. // CHECK:STDOUT: fn @F.2(%self.param: %empty_tuple.type, %u.param: %i32) -> %i32 {
  525. // CHECK:STDOUT: !entry:
  526. // CHECK:STDOUT: %u.ref: %i32 = name_ref u, %u
  527. // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [concrete = constants.%int_2.ecc]
  528. // CHECK:STDOUT: %impl.elem0.loc9_46: %.ac9 = impl_witness_access constants.%Add.impl_witness.dbc, element0 [concrete = constants.%Op.c82]
  529. // CHECK:STDOUT: %bound_method.loc9_46.1: <bound method> = bound_method %u.ref, %impl.elem0.loc9_46
  530. // CHECK:STDOUT: %specific_fn.loc9_46: <specific function> = specific_function %impl.elem0.loc9_46, @Op.2(constants.%int_32) [concrete = constants.%Op.specific_fn]
  531. // CHECK:STDOUT: %bound_method.loc9_46.2: <bound method> = bound_method %u.ref, %specific_fn.loc9_46
  532. // CHECK:STDOUT: %impl.elem0.loc9_48: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956]
  533. // CHECK:STDOUT: %bound_method.loc9_48.1: <bound method> = bound_method %int_2, %impl.elem0.loc9_48 [concrete = constants.%Convert.bound.ef9]
  534. // CHECK:STDOUT: %specific_fn.loc9_48: <specific function> = specific_function %impl.elem0.loc9_48, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn]
  535. // CHECK:STDOUT: %bound_method.loc9_48.2: <bound method> = bound_method %int_2, %specific_fn.loc9_48 [concrete = constants.%bound_method.b92]
  536. // CHECK:STDOUT: %int.convert_checked: init %i32 = call %bound_method.loc9_48.2(%int_2) [concrete = constants.%int_2.ef8]
  537. // CHECK:STDOUT: %.loc9_48.1: %i32 = value_of_initializer %int.convert_checked [concrete = constants.%int_2.ef8]
  538. // CHECK:STDOUT: %.loc9_48.2: %i32 = converted %int_2, %.loc9_48.1 [concrete = constants.%int_2.ef8]
  539. // CHECK:STDOUT: %int.sadd: init %i32 = call %bound_method.loc9_46.2(%u.ref, %.loc9_48.2)
  540. // CHECK:STDOUT: %.loc9_49.1: %i32 = value_of_initializer %int.sadd
  541. // CHECK:STDOUT: %.loc9_49.2: %i32 = converted %int.sadd, %.loc9_49.1
  542. // CHECK:STDOUT: return %.loc9_49.2
  543. // CHECK:STDOUT: }
  544. // CHECK:STDOUT:
  545. // CHECK:STDOUT: fn @CallMethod(%x.param: %empty_tuple.type) -> %i32 {
  546. // CHECK:STDOUT: !entry:
  547. // CHECK:STDOUT: %x.ref: %empty_tuple.type = name_ref x, %x
  548. // CHECK:STDOUT: %J.ref: type = name_ref J, file.%J.decl [concrete = constants.%J.type]
  549. // CHECK:STDOUT: %F.ref: %J.assoc_type = name_ref F, @J.%assoc1 [concrete = constants.%assoc1]
  550. // CHECK:STDOUT: %impl.elem1: %.597 = impl_witness_access constants.%J.impl_witness.e42, element1 [concrete = constants.%F.46e]
  551. // CHECK:STDOUT: %bound_method.loc13_11: <bound method> = bound_method %x.ref, %impl.elem1
  552. // CHECK:STDOUT: %int_40: Core.IntLiteral = int_value 40 [concrete = constants.%int_40.f80]
  553. // CHECK:STDOUT: %impl.elem0: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956]
  554. // CHECK:STDOUT: %bound_method.loc13_18.1: <bound method> = bound_method %int_40, %impl.elem0 [concrete = constants.%Convert.bound.e52]
  555. // CHECK:STDOUT: %specific_fn: <specific function> = specific_function %impl.elem0, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn]
  556. // CHECK:STDOUT: %bound_method.loc13_18.2: <bound method> = bound_method %int_40, %specific_fn [concrete = constants.%bound_method.7b8]
  557. // CHECK:STDOUT: %int.convert_checked: init %i32 = call %bound_method.loc13_18.2(%int_40) [concrete = constants.%int_40.518]
  558. // CHECK:STDOUT: %.loc13_18.1: %i32 = value_of_initializer %int.convert_checked [concrete = constants.%int_40.518]
  559. // CHECK:STDOUT: %.loc13_18.2: %i32 = converted %int_40, %.loc13_18.1 [concrete = constants.%int_40.518]
  560. // CHECK:STDOUT: %F.call: init %i32 = call %bound_method.loc13_11(%x.ref, %.loc13_18.2)
  561. // CHECK:STDOUT: %.loc13_21.1: %i32 = value_of_initializer %F.call
  562. // CHECK:STDOUT: %.loc13_21.2: %i32 = converted %F.call, %.loc13_21.1
  563. // CHECK:STDOUT: return %.loc13_21.2
  564. // CHECK:STDOUT: }
  565. // CHECK:STDOUT:
  566. // CHECK:STDOUT: fn @F.3(%self.param: %C, %u.param: %C) -> %C {
  567. // CHECK:STDOUT: !entry:
  568. // CHECK:STDOUT: %self.ref: %C = name_ref self, %self
  569. // CHECK:STDOUT: return %self.ref
  570. // CHECK:STDOUT: }
  571. // CHECK:STDOUT:
  572. // CHECK:STDOUT: specific @U(constants.%Self.ccd) {}
  573. // CHECK:STDOUT:
  574. // CHECK:STDOUT: specific @U(constants.%J.facet.521) {}
  575. // CHECK:STDOUT:
  576. // CHECK:STDOUT: specific @F.1(constants.%Self.ccd) {
  577. // CHECK:STDOUT: %Self => constants.%Self.ccd
  578. // CHECK:STDOUT: %Self.as_type.loc5_14.1 => constants.%Self.as_type.3df
  579. // CHECK:STDOUT: %pattern_type.loc5_8 => constants.%pattern_type.4ca
  580. // CHECK:STDOUT: %J.lookup_impl_witness => constants.%J.lookup_impl_witness.646
  581. // CHECK:STDOUT: %impl.elem0.loc5_23.1 => constants.%impl.elem0.11f
  582. // CHECK:STDOUT: %pattern_type.loc5_20 => constants.%pattern_type.b98
  583. // CHECK:STDOUT: }
  584. // CHECK:STDOUT:
  585. // CHECK:STDOUT: specific @U(constants.%J.facet.330) {}
  586. // CHECK:STDOUT:
  587. // CHECK:STDOUT: specific @F.1(constants.%J.facet.ecc) {
  588. // CHECK:STDOUT: %Self => constants.%J.facet.ecc
  589. // CHECK:STDOUT: %Self.as_type.loc5_14.1 => constants.%empty_tuple.type
  590. // CHECK:STDOUT: %pattern_type.loc5_8 => constants.%pattern_type.cb1
  591. // CHECK:STDOUT: %J.lookup_impl_witness => constants.%J.impl_witness.e42
  592. // CHECK:STDOUT: %impl.elem0.loc5_23.1 => constants.%i32
  593. // CHECK:STDOUT: %pattern_type.loc5_20 => constants.%pattern_type.7ce
  594. // CHECK:STDOUT: }
  595. // CHECK:STDOUT:
  596. // CHECK:STDOUT: specific @F.1(constants.%J.facet.30e) {
  597. // CHECK:STDOUT: %Self => constants.%J.facet.30e
  598. // CHECK:STDOUT: %Self.as_type.loc5_14.1 => constants.%C
  599. // CHECK:STDOUT: %pattern_type.loc5_8 => constants.%pattern_type.c48
  600. // CHECK:STDOUT: %J.lookup_impl_witness => constants.%J.impl_witness.12d
  601. // CHECK:STDOUT: %impl.elem0.loc5_23.1 => constants.%C
  602. // CHECK:STDOUT: %pattern_type.loc5_20 => constants.%pattern_type.c48
  603. // CHECK:STDOUT: }
  604. // CHECK:STDOUT:
  605. // CHECK:STDOUT: --- associated_type_in_function_signature.carbon
  606. // CHECK:STDOUT:
  607. // CHECK:STDOUT: constants {
  608. // CHECK:STDOUT: %J.type: type = facet_type <@J> [concrete]
  609. // CHECK:STDOUT: %Self.ccd: %J.type = bind_symbolic_name Self, 0 [symbolic]
  610. // CHECK:STDOUT: %J.assoc_type: type = assoc_entity_type @J [concrete]
  611. // CHECK:STDOUT: %assoc0.411: %J.assoc_type = assoc_entity element0, @J.%U [concrete]
  612. // CHECK:STDOUT: %Self.as_type.3df: type = facet_access_type %Self.ccd [symbolic]
  613. // CHECK:STDOUT: %J.lookup_impl_witness.646: <witness> = lookup_impl_witness %Self.ccd, @J [symbolic]
  614. // CHECK:STDOUT: %J.facet.521: %J.type = facet_value %Self.as_type.3df, (%J.lookup_impl_witness.646) [symbolic]
  615. // CHECK:STDOUT: %impl.elem0.11f: type = impl_witness_access %J.lookup_impl_witness.646, element0 [symbolic]
  616. // CHECK:STDOUT: %pattern_type.b98: type = pattern_type %impl.elem0.11f [symbolic]
  617. // CHECK:STDOUT: %F.type.c14: type = fn_type @F.1 [concrete]
  618. // CHECK:STDOUT: %F.b71: %F.type.c14 = struct_value () [concrete]
  619. // CHECK:STDOUT: %assoc1: %J.assoc_type = assoc_entity element1, @J.%F.decl [concrete]
  620. // CHECK:STDOUT: %D: type = class_type @D [concrete]
  621. // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete]
  622. // CHECK:STDOUT: %complete_type.357: <witness> = complete_type_witness %empty_struct_type [concrete]
  623. // CHECK:STDOUT: %.Self: %J.type = bind_symbolic_name .Self [symbolic_self]
  624. // CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self [symbolic_self]
  625. // CHECK:STDOUT: %J.lookup_impl_witness.25c: <witness> = lookup_impl_witness %.Self, @J [symbolic_self]
  626. // CHECK:STDOUT: %J.facet.330: %J.type = facet_value %.Self.as_type, (%J.lookup_impl_witness.25c) [symbolic_self]
  627. // CHECK:STDOUT: %impl.elem0.83f: type = impl_witness_access %J.lookup_impl_witness.25c, element0 [symbolic_self]
  628. // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete]
  629. // CHECK:STDOUT: %Int.type: type = generic_class_type @Int [concrete]
  630. // CHECK:STDOUT: %Int.generic: %Int.type = struct_value () [concrete]
  631. // CHECK:STDOUT: %N: Core.IntLiteral = bind_symbolic_name N, 0 [symbolic]
  632. // CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [concrete]
  633. // CHECK:STDOUT: %J_where.type: type = facet_type <@J where %impl.elem0.83f = %i32> [concrete]
  634. // CHECK:STDOUT: %J.impl_witness: <witness> = impl_witness file.%J.impl_witness_table [concrete]
  635. // CHECK:STDOUT: %pattern_type.7ce: type = pattern_type %i32 [concrete]
  636. // CHECK:STDOUT: %F.type.5d3: type = fn_type @F.2 [concrete]
  637. // CHECK:STDOUT: %F.b9c: %F.type.5d3 = struct_value () [concrete]
  638. // CHECK:STDOUT: %J.facet.183: %J.type = facet_value %D, (%J.impl_witness) [concrete]
  639. // CHECK:STDOUT: %int_3.1ba: Core.IntLiteral = int_value 3 [concrete]
  640. // CHECK:STDOUT: %Add.type: type = facet_type <@Add> [concrete]
  641. // CHECK:STDOUT: %Op.type.545: type = fn_type @Op.1 [concrete]
  642. // CHECK:STDOUT: %To.c80: Core.IntLiteral = bind_symbolic_name To, 0 [symbolic]
  643. // CHECK:STDOUT: %ImplicitAs.type.cc7: type = generic_interface_type @ImplicitAs [concrete]
  644. // CHECK:STDOUT: %ImplicitAs.generic: %ImplicitAs.type.cc7 = struct_value () [concrete]
  645. // CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.2, @impl.4f9(%To.c80) [symbolic]
  646. // CHECK:STDOUT: %Convert.f06: %Convert.type.0f9 = struct_value () [symbolic]
  647. // CHECK:STDOUT: %Op.type.52d: type = fn_type @Op.2, @impl.2c2(%N) [symbolic]
  648. // CHECK:STDOUT: %Op.12d: %Op.type.52d = struct_value () [symbolic]
  649. // CHECK:STDOUT: %Add.impl_witness.dbc: <witness> = impl_witness imports.%Add.impl_witness_table, @impl.2c2(%int_32) [concrete]
  650. // CHECK:STDOUT: %Op.type.210: type = fn_type @Op.2, @impl.2c2(%int_32) [concrete]
  651. // CHECK:STDOUT: %Op.c82: %Op.type.210 = struct_value () [concrete]
  652. // CHECK:STDOUT: %Add.facet: %Add.type = facet_value %i32, (%Add.impl_witness.dbc) [concrete]
  653. // CHECK:STDOUT: %.ac9: type = fn_type_with_self_type %Op.type.545, %Add.facet [concrete]
  654. // CHECK:STDOUT: %Op.specific_fn: <specific function> = specific_function %Op.c82, @Op.2(%int_32) [concrete]
  655. // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete]
  656. // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete]
  657. // CHECK:STDOUT: %ImplicitAs.impl_witness.c75: <witness> = impl_witness imports.%ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete]
  658. // CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.4f9(%int_32) [concrete]
  659. // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete]
  660. // CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete]
  661. // CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete]
  662. // CHECK:STDOUT: %Convert.bound.b30: <bound method> = bound_method %int_3.1ba, %Convert.956 [concrete]
  663. // CHECK:STDOUT: %Convert.specific_fn: <specific function> = specific_function %Convert.956, @Convert.2(%int_32) [concrete]
  664. // CHECK:STDOUT: %bound_method.047: <bound method> = bound_method %int_3.1ba, %Convert.specific_fn [concrete]
  665. // CHECK:STDOUT: %int_3.822: %i32 = int_value 3 [concrete]
  666. // CHECK:STDOUT: %CallFunction.type: type = fn_type @CallFunction [concrete]
  667. // CHECK:STDOUT: %CallFunction: %CallFunction.type = struct_value () [concrete]
  668. // CHECK:STDOUT: %.490: type = fn_type_with_self_type %F.type.c14, %J.facet.183 [concrete]
  669. // CHECK:STDOUT: %int_4.0c1: Core.IntLiteral = int_value 4 [concrete]
  670. // CHECK:STDOUT: %Convert.bound.ac3: <bound method> = bound_method %int_4.0c1, %Convert.956 [concrete]
  671. // CHECK:STDOUT: %bound_method.1da: <bound method> = bound_method %int_4.0c1, %Convert.specific_fn [concrete]
  672. // CHECK:STDOUT: %int_4.940: %i32 = int_value 4 [concrete]
  673. // CHECK:STDOUT: }
  674. // CHECK:STDOUT:
  675. // CHECK:STDOUT: imports {
  676. // CHECK:STDOUT: %Core: <namespace> = namespace file.%Core.import, [concrete] {
  677. // CHECK:STDOUT: .Int = %Core.Int
  678. // CHECK:STDOUT: .Add = %Core.Add
  679. // CHECK:STDOUT: .ImplicitAs = %Core.ImplicitAs
  680. // CHECK:STDOUT: import Core//prelude
  681. // CHECK:STDOUT: import Core//prelude/...
  682. // CHECK:STDOUT: }
  683. // CHECK:STDOUT: %Core.Int: %Int.type = import_ref Core//prelude/types/int, Int, loaded [concrete = constants.%Int.generic]
  684. // CHECK:STDOUT: %Core.Add: type = import_ref Core//prelude/operators/arithmetic, Add, loaded [concrete = constants.%Add.type]
  685. // CHECK:STDOUT: %Core.import_ref.a5b: @impl.4f9.%Convert.type (%Convert.type.0f9) = import_ref Core//prelude/types/int, loc19_39, loaded [symbolic = @impl.4f9.%Convert (constants.%Convert.f06)]
  686. // CHECK:STDOUT: %ImplicitAs.impl_witness_table.a2f = impl_witness_table (%Core.import_ref.a5b), @impl.4f9 [concrete]
  687. // CHECK:STDOUT: %Core.import_ref.344: @impl.2c2.%Op.type (%Op.type.52d) = import_ref Core//prelude/types/int, loc58_42, loaded [symbolic = @impl.2c2.%Op (constants.%Op.12d)]
  688. // CHECK:STDOUT: %Add.impl_witness_table = impl_witness_table (%Core.import_ref.344), @impl.2c2 [concrete]
  689. // CHECK:STDOUT: %Core.ImplicitAs: %ImplicitAs.type.cc7 = import_ref Core//prelude/operators/as, ImplicitAs, loaded [concrete = constants.%ImplicitAs.generic]
  690. // CHECK:STDOUT: }
  691. // CHECK:STDOUT:
  692. // CHECK:STDOUT: file {
  693. // CHECK:STDOUT: package: <namespace> = namespace [concrete] {
  694. // CHECK:STDOUT: .Core = imports.%Core
  695. // CHECK:STDOUT: .J = %J.decl
  696. // CHECK:STDOUT: .D = %D.decl
  697. // CHECK:STDOUT: .CallFunction = %CallFunction.decl
  698. // CHECK:STDOUT: }
  699. // CHECK:STDOUT: %Core.import = import Core
  700. // CHECK:STDOUT: %J.decl: type = interface_decl @J [concrete = constants.%J.type] {} {}
  701. // CHECK:STDOUT: %D.decl: type = class_decl @D [concrete = constants.%D] {} {}
  702. // CHECK:STDOUT: impl_decl @impl.fc1 [concrete] {} {
  703. // CHECK:STDOUT: %D.ref: type = name_ref D, file.%D.decl [concrete = constants.%D]
  704. // CHECK:STDOUT: %J.ref: type = name_ref J, file.%J.decl [concrete = constants.%J.type]
  705. // CHECK:STDOUT: %.Self: %J.type = bind_symbolic_name .Self [symbolic_self = constants.%.Self]
  706. // CHECK:STDOUT: %.Self.ref: %J.type = name_ref .Self, %.Self [symbolic_self = constants.%.Self]
  707. // CHECK:STDOUT: %U.ref: %J.assoc_type = name_ref U, @U.%assoc0 [concrete = constants.%assoc0.411]
  708. // CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self.ref [symbolic_self = constants.%.Self.as_type]
  709. // CHECK:STDOUT: %.loc10_19: type = converted %.Self.ref, %.Self.as_type [symbolic_self = constants.%.Self.as_type]
  710. // CHECK:STDOUT: %impl.elem0: type = impl_witness_access constants.%J.lookup_impl_witness.25c, element0 [symbolic_self = constants.%impl.elem0.83f]
  711. // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete = constants.%int_32]
  712. // CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32]
  713. // CHECK:STDOUT: %.loc10_13: type = where_expr %.Self [concrete = constants.%J_where.type] {
  714. // CHECK:STDOUT: requirement_rewrite %impl.elem0, %i32
  715. // CHECK:STDOUT: }
  716. // CHECK:STDOUT: }
  717. // CHECK:STDOUT: %J.impl_witness_table = impl_witness_table (%impl_witness_assoc_constant, @impl.fc1.%F.decl), @impl.fc1 [concrete]
  718. // CHECK:STDOUT: %J.impl_witness: <witness> = impl_witness %J.impl_witness_table [concrete = constants.%J.impl_witness]
  719. // CHECK:STDOUT: %impl_witness_assoc_constant: type = impl_witness_assoc_constant constants.%i32 [concrete = constants.%i32]
  720. // CHECK:STDOUT: %CallFunction.decl: %CallFunction.type = fn_decl @CallFunction [concrete = constants.%CallFunction] {
  721. // CHECK:STDOUT: %return.patt: %pattern_type.7ce = return_slot_pattern [concrete]
  722. // CHECK:STDOUT: %return.param_patt: %pattern_type.7ce = out_param_pattern %return.patt, call_param0 [concrete]
  723. // CHECK:STDOUT: } {
  724. // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete = constants.%int_32]
  725. // CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32]
  726. // CHECK:STDOUT: %return.param: ref %i32 = out_param call_param0
  727. // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param
  728. // CHECK:STDOUT: }
  729. // CHECK:STDOUT: }
  730. // CHECK:STDOUT:
  731. // CHECK:STDOUT: interface @J {
  732. // CHECK:STDOUT: %Self: %J.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self.ccd]
  733. // CHECK:STDOUT: %U: type = assoc_const_decl @U [concrete] {
  734. // CHECK:STDOUT: %assoc0: %J.assoc_type = assoc_entity element0, @J.%U [concrete = constants.%assoc0.411]
  735. // CHECK:STDOUT: }
  736. // CHECK:STDOUT: %F.decl: %F.type.c14 = fn_decl @F.1 [concrete = constants.%F.b71] {
  737. // CHECK:STDOUT: %u.patt: @F.1.%pattern_type (%pattern_type.b98) = binding_pattern u [concrete]
  738. // CHECK:STDOUT: %u.param_patt: @F.1.%pattern_type (%pattern_type.b98) = value_param_pattern %u.patt, call_param0 [concrete]
  739. // CHECK:STDOUT: %return.patt: @F.1.%pattern_type (%pattern_type.b98) = return_slot_pattern [concrete]
  740. // CHECK:STDOUT: %return.param_patt: @F.1.%pattern_type (%pattern_type.b98) = out_param_pattern %return.patt, call_param1 [concrete]
  741. // CHECK:STDOUT: } {
  742. // CHECK:STDOUT: %impl.elem0.loc5_17: type = impl_witness_access constants.%J.lookup_impl_witness.646, element0 [symbolic = %impl.elem0.loc5_11.1 (constants.%impl.elem0.11f)]
  743. // CHECK:STDOUT: %U.ref.loc5_17: type = name_ref U, %impl.elem0.loc5_17 [symbolic = %impl.elem0.loc5_11.1 (constants.%impl.elem0.11f)]
  744. // CHECK:STDOUT: %u.param: @F.1.%impl.elem0.loc5_11.1 (%impl.elem0.11f) = value_param call_param0
  745. // CHECK:STDOUT: %.loc5: type = splice_block %U.ref.loc5_11 [symbolic = %impl.elem0.loc5_11.1 (constants.%impl.elem0.11f)] {
  746. // CHECK:STDOUT: %impl.elem0.loc5_11.2: type = impl_witness_access constants.%J.lookup_impl_witness.646, element0 [symbolic = %impl.elem0.loc5_11.1 (constants.%impl.elem0.11f)]
  747. // CHECK:STDOUT: %U.ref.loc5_11: type = name_ref U, %impl.elem0.loc5_11.2 [symbolic = %impl.elem0.loc5_11.1 (constants.%impl.elem0.11f)]
  748. // CHECK:STDOUT: }
  749. // CHECK:STDOUT: %u: @F.1.%impl.elem0.loc5_11.1 (%impl.elem0.11f) = bind_name u, %u.param
  750. // CHECK:STDOUT: %return.param: ref @F.1.%impl.elem0.loc5_11.1 (%impl.elem0.11f) = out_param call_param1
  751. // CHECK:STDOUT: %return: ref @F.1.%impl.elem0.loc5_11.1 (%impl.elem0.11f) = return_slot %return.param
  752. // CHECK:STDOUT: }
  753. // CHECK:STDOUT: %assoc1: %J.assoc_type = assoc_entity element1, %F.decl [concrete = constants.%assoc1]
  754. // CHECK:STDOUT:
  755. // CHECK:STDOUT: !members:
  756. // CHECK:STDOUT: .Self = %Self
  757. // CHECK:STDOUT: .U = @U.%assoc0
  758. // CHECK:STDOUT: .F = %assoc1
  759. // CHECK:STDOUT: witness = (%U, %F.decl)
  760. // CHECK:STDOUT: }
  761. // CHECK:STDOUT:
  762. // CHECK:STDOUT: generic assoc_const @U(@J.%Self: %J.type) {
  763. // CHECK:STDOUT: assoc_const U:! type;
  764. // CHECK:STDOUT: }
  765. // CHECK:STDOUT:
  766. // CHECK:STDOUT: impl @impl.fc1: %D.ref as %.loc10_13 {
  767. // CHECK:STDOUT: %F.decl: %F.type.5d3 = fn_decl @F.2 [concrete = constants.%F.b9c] {
  768. // CHECK:STDOUT: %u.patt: %pattern_type.7ce = binding_pattern u [concrete]
  769. // CHECK:STDOUT: %u.param_patt: %pattern_type.7ce = value_param_pattern %u.patt, call_param0 [concrete]
  770. // CHECK:STDOUT: %return.patt: %pattern_type.7ce = return_slot_pattern [concrete]
  771. // CHECK:STDOUT: %return.param_patt: %pattern_type.7ce = out_param_pattern %return.patt, call_param1 [concrete]
  772. // CHECK:STDOUT: } {
  773. // CHECK:STDOUT: %int_32.loc11_19: Core.IntLiteral = int_value 32 [concrete = constants.%int_32]
  774. // CHECK:STDOUT: %i32.loc11_19: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32]
  775. // CHECK:STDOUT: %u.param: %i32 = value_param call_param0
  776. // CHECK:STDOUT: %.loc11_11: type = splice_block %i32.loc11_11 [concrete = constants.%i32] {
  777. // CHECK:STDOUT: %int_32.loc11_11: Core.IntLiteral = int_value 32 [concrete = constants.%int_32]
  778. // CHECK:STDOUT: %i32.loc11_11: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32]
  779. // CHECK:STDOUT: }
  780. // CHECK:STDOUT: %u: %i32 = bind_name u, %u.param
  781. // CHECK:STDOUT: %return.param: ref %i32 = out_param call_param1
  782. // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param
  783. // CHECK:STDOUT: }
  784. // CHECK:STDOUT:
  785. // CHECK:STDOUT: !members:
  786. // CHECK:STDOUT: .F = %F.decl
  787. // CHECK:STDOUT: witness = file.%J.impl_witness
  788. // CHECK:STDOUT: }
  789. // CHECK:STDOUT:
  790. // CHECK:STDOUT: class @D {
  791. // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete = constants.%empty_struct_type]
  792. // CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %empty_struct_type [concrete = constants.%complete_type.357]
  793. // CHECK:STDOUT: complete_type_witness = %complete_type
  794. // CHECK:STDOUT:
  795. // CHECK:STDOUT: !members:
  796. // CHECK:STDOUT: .Self = constants.%D
  797. // CHECK:STDOUT: }
  798. // CHECK:STDOUT:
  799. // CHECK:STDOUT: generic fn @F.1(@J.%Self: %J.type) {
  800. // CHECK:STDOUT: %Self: %J.type = bind_symbolic_name Self, 0 [symbolic = %Self (constants.%Self.ccd)]
  801. // CHECK:STDOUT: %J.lookup_impl_witness: <witness> = lookup_impl_witness %Self, @J [symbolic = %J.lookup_impl_witness (constants.%J.lookup_impl_witness.646)]
  802. // CHECK:STDOUT: %impl.elem0.loc5_11.1: type = impl_witness_access %J.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc5_11.1 (constants.%impl.elem0.11f)]
  803. // CHECK:STDOUT: %pattern_type: type = pattern_type %impl.elem0.loc5_11.1 [symbolic = %pattern_type (constants.%pattern_type.b98)]
  804. // CHECK:STDOUT:
  805. // CHECK:STDOUT: fn(%u.param: @F.1.%impl.elem0.loc5_11.1 (%impl.elem0.11f)) -> @F.1.%impl.elem0.loc5_11.1 (%impl.elem0.11f);
  806. // CHECK:STDOUT: }
  807. // CHECK:STDOUT:
  808. // CHECK:STDOUT: fn @F.2(%u.param: %i32) -> %i32 {
  809. // CHECK:STDOUT: !entry:
  810. // CHECK:STDOUT: %u.ref: %i32 = name_ref u, %u
  811. // CHECK:STDOUT: %int_3: Core.IntLiteral = int_value 3 [concrete = constants.%int_3.1ba]
  812. // CHECK:STDOUT: %impl.elem0.loc11_34: %.ac9 = impl_witness_access constants.%Add.impl_witness.dbc, element0 [concrete = constants.%Op.c82]
  813. // CHECK:STDOUT: %bound_method.loc11_34.1: <bound method> = bound_method %u.ref, %impl.elem0.loc11_34
  814. // CHECK:STDOUT: %specific_fn.loc11_34: <specific function> = specific_function %impl.elem0.loc11_34, @Op.2(constants.%int_32) [concrete = constants.%Op.specific_fn]
  815. // CHECK:STDOUT: %bound_method.loc11_34.2: <bound method> = bound_method %u.ref, %specific_fn.loc11_34
  816. // CHECK:STDOUT: %impl.elem0.loc11_36: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956]
  817. // CHECK:STDOUT: %bound_method.loc11_36.1: <bound method> = bound_method %int_3, %impl.elem0.loc11_36 [concrete = constants.%Convert.bound.b30]
  818. // CHECK:STDOUT: %specific_fn.loc11_36: <specific function> = specific_function %impl.elem0.loc11_36, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn]
  819. // CHECK:STDOUT: %bound_method.loc11_36.2: <bound method> = bound_method %int_3, %specific_fn.loc11_36 [concrete = constants.%bound_method.047]
  820. // CHECK:STDOUT: %int.convert_checked: init %i32 = call %bound_method.loc11_36.2(%int_3) [concrete = constants.%int_3.822]
  821. // CHECK:STDOUT: %.loc11_36.1: %i32 = value_of_initializer %int.convert_checked [concrete = constants.%int_3.822]
  822. // CHECK:STDOUT: %.loc11_36.2: %i32 = converted %int_3, %.loc11_36.1 [concrete = constants.%int_3.822]
  823. // CHECK:STDOUT: %int.sadd: init %i32 = call %bound_method.loc11_34.2(%u.ref, %.loc11_36.2)
  824. // CHECK:STDOUT: %.loc11_37.1: %i32 = value_of_initializer %int.sadd
  825. // CHECK:STDOUT: %.loc11_37.2: %i32 = converted %int.sadd, %.loc11_37.1
  826. // CHECK:STDOUT: return %.loc11_37.2
  827. // CHECK:STDOUT: }
  828. // CHECK:STDOUT:
  829. // CHECK:STDOUT: fn @CallFunction() -> %i32 {
  830. // CHECK:STDOUT: !entry:
  831. // CHECK:STDOUT: %D.ref: type = name_ref D, file.%D.decl [concrete = constants.%D]
  832. // CHECK:STDOUT: %J.ref: type = name_ref J, file.%J.decl [concrete = constants.%J.type]
  833. // CHECK:STDOUT: %F.ref: %J.assoc_type = name_ref F, @J.%assoc1 [concrete = constants.%assoc1]
  834. // CHECK:STDOUT: %J.facet: %J.type = facet_value constants.%D, (constants.%J.impl_witness) [concrete = constants.%J.facet.183]
  835. // CHECK:STDOUT: %.loc15_11: %J.type = converted %D.ref, %J.facet [concrete = constants.%J.facet.183]
  836. // CHECK:STDOUT: %impl.elem1: %.490 = impl_witness_access constants.%J.impl_witness, element1 [concrete = constants.%F.b9c]
  837. // CHECK:STDOUT: %int_4: Core.IntLiteral = int_value 4 [concrete = constants.%int_4.0c1]
  838. // CHECK:STDOUT: %impl.elem0: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956]
  839. // CHECK:STDOUT: %bound_method.loc15_18.1: <bound method> = bound_method %int_4, %impl.elem0 [concrete = constants.%Convert.bound.ac3]
  840. // CHECK:STDOUT: %specific_fn: <specific function> = specific_function %impl.elem0, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn]
  841. // CHECK:STDOUT: %bound_method.loc15_18.2: <bound method> = bound_method %int_4, %specific_fn [concrete = constants.%bound_method.1da]
  842. // CHECK:STDOUT: %int.convert_checked: init %i32 = call %bound_method.loc15_18.2(%int_4) [concrete = constants.%int_4.940]
  843. // CHECK:STDOUT: %.loc15_18.1: %i32 = value_of_initializer %int.convert_checked [concrete = constants.%int_4.940]
  844. // CHECK:STDOUT: %.loc15_18.2: %i32 = converted %int_4, %.loc15_18.1 [concrete = constants.%int_4.940]
  845. // CHECK:STDOUT: %F.call: init %i32 = call %impl.elem1(%.loc15_18.2)
  846. // CHECK:STDOUT: %.loc15_20.1: %i32 = value_of_initializer %F.call
  847. // CHECK:STDOUT: %.loc15_20.2: %i32 = converted %F.call, %.loc15_20.1
  848. // CHECK:STDOUT: return %.loc15_20.2
  849. // CHECK:STDOUT: }
  850. // CHECK:STDOUT:
  851. // CHECK:STDOUT: specific @U(constants.%Self.ccd) {}
  852. // CHECK:STDOUT:
  853. // CHECK:STDOUT: specific @U(constants.%J.facet.521) {}
  854. // CHECK:STDOUT:
  855. // CHECK:STDOUT: specific @F.1(constants.%Self.ccd) {
  856. // CHECK:STDOUT: %Self => constants.%Self.ccd
  857. // CHECK:STDOUT: %J.lookup_impl_witness => constants.%J.lookup_impl_witness.646
  858. // CHECK:STDOUT: %impl.elem0.loc5_11.1 => constants.%impl.elem0.11f
  859. // CHECK:STDOUT: %pattern_type => constants.%pattern_type.b98
  860. // CHECK:STDOUT: }
  861. // CHECK:STDOUT:
  862. // CHECK:STDOUT: specific @U(constants.%J.facet.330) {}
  863. // CHECK:STDOUT:
  864. // CHECK:STDOUT: specific @F.1(constants.%J.facet.183) {
  865. // CHECK:STDOUT: %Self => constants.%J.facet.183
  866. // CHECK:STDOUT: %J.lookup_impl_witness => constants.%J.impl_witness
  867. // CHECK:STDOUT: %impl.elem0.loc5_11.1 => constants.%i32
  868. // CHECK:STDOUT: %pattern_type => constants.%pattern_type.7ce
  869. // CHECK:STDOUT: }
  870. // CHECK:STDOUT:
  871. // CHECK:STDOUT: --- extend_impl_with_associated_type_in_signature.carbon
  872. // CHECK:STDOUT:
  873. // CHECK:STDOUT: constants {
  874. // CHECK:STDOUT: %J.type: type = facet_type <@J> [concrete]
  875. // CHECK:STDOUT: %Self.ccd: %J.type = bind_symbolic_name Self, 0 [symbolic]
  876. // CHECK:STDOUT: %J.assoc_type: type = assoc_entity_type @J [concrete]
  877. // CHECK:STDOUT: %assoc0.411: %J.assoc_type = assoc_entity element0, @J.%U [concrete]
  878. // CHECK:STDOUT: %Self.as_type.3df: type = facet_access_type %Self.ccd [symbolic]
  879. // CHECK:STDOUT: %J.lookup_impl_witness.64628e.1: <witness> = lookup_impl_witness %Self.ccd, @J [symbolic]
  880. // CHECK:STDOUT: %J.facet.5210a7.1: %J.type = facet_value %Self.as_type.3df, (%J.lookup_impl_witness.64628e.1) [symbolic]
  881. // CHECK:STDOUT: %impl.elem0.11fef0.1: type = impl_witness_access %J.lookup_impl_witness.64628e.1, element0 [symbolic]
  882. // CHECK:STDOUT: %pattern_type.b984e7.1: type = pattern_type %impl.elem0.11fef0.1 [symbolic]
  883. // CHECK:STDOUT: %F.type.c14: type = fn_type @F.1 [concrete]
  884. // CHECK:STDOUT: %F.b71: %F.type.c14 = struct_value () [concrete]
  885. // CHECK:STDOUT: %assoc1: %J.assoc_type = assoc_entity element1, @J.%F.decl [concrete]
  886. // CHECK:STDOUT: %pattern_type.4ca604.1: type = pattern_type %Self.as_type.3df [symbolic]
  887. // CHECK:STDOUT: %G.type.285: type = fn_type @G.1 [concrete]
  888. // CHECK:STDOUT: %G.e4b: %G.type.285 = struct_value () [concrete]
  889. // CHECK:STDOUT: %assoc2: %J.assoc_type = assoc_entity element2, @J.%G.decl [concrete]
  890. // CHECK:STDOUT: %E: type = class_type @E [concrete]
  891. // CHECK:STDOUT: %.Self: %J.type = bind_symbolic_name .Self [symbolic_self]
  892. // CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self [symbolic_self]
  893. // CHECK:STDOUT: %J.lookup_impl_witness.25c: <witness> = lookup_impl_witness %.Self, @J [symbolic_self]
  894. // CHECK:STDOUT: %J.facet.330: %J.type = facet_value %.Self.as_type, (%J.lookup_impl_witness.25c) [symbolic_self]
  895. // CHECK:STDOUT: %impl.elem0.83f: type = impl_witness_access %J.lookup_impl_witness.25c, element0 [symbolic_self]
  896. // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete]
  897. // CHECK:STDOUT: %Int.type: type = generic_class_type @Int [concrete]
  898. // CHECK:STDOUT: %Int.generic: %Int.type = struct_value () [concrete]
  899. // CHECK:STDOUT: %N: Core.IntLiteral = bind_symbolic_name N, 0 [symbolic]
  900. // CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [concrete]
  901. // CHECK:STDOUT: %J_where.type: type = facet_type <@J where %impl.elem0.83f = %i32> [concrete]
  902. // CHECK:STDOUT: %J.impl_witness: <witness> = impl_witness @E.%J.impl_witness_table [concrete]
  903. // CHECK:STDOUT: %pattern_type.7ce: type = pattern_type %i32 [concrete]
  904. // CHECK:STDOUT: %F.type.b84: type = fn_type @F.2 [concrete]
  905. // CHECK:STDOUT: %F.b07: %F.type.b84 = struct_value () [concrete]
  906. // CHECK:STDOUT: %pattern_type.a4a: type = pattern_type %E [concrete]
  907. // CHECK:STDOUT: %G.type.4b6: type = fn_type @G.2 [concrete]
  908. // CHECK:STDOUT: %G.553: %G.type.4b6 = struct_value () [concrete]
  909. // CHECK:STDOUT: %J.facet.ee5: %J.type = facet_value %E, (%J.impl_witness) [concrete]
  910. // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete]
  911. // CHECK:STDOUT: %complete_type.357: <witness> = complete_type_witness %empty_struct_type [concrete]
  912. // CHECK:STDOUT: %i32.builtin: type = int_type signed, %int_32 [concrete]
  913. // CHECK:STDOUT: %complete_type.f8a: <witness> = complete_type_witness %i32.builtin [concrete]
  914. // CHECK:STDOUT: %int_1.5b8: Core.IntLiteral = int_value 1 [concrete]
  915. // CHECK:STDOUT: %Add.type: type = facet_type <@Add> [concrete]
  916. // CHECK:STDOUT: %Op.type.545: type = fn_type @Op.1 [concrete]
  917. // CHECK:STDOUT: %To.c80: Core.IntLiteral = bind_symbolic_name To, 0 [symbolic]
  918. // CHECK:STDOUT: %ImplicitAs.type.cc7: type = generic_interface_type @ImplicitAs [concrete]
  919. // CHECK:STDOUT: %ImplicitAs.generic: %ImplicitAs.type.cc7 = struct_value () [concrete]
  920. // CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.2, @impl.4f9(%To.c80) [symbolic]
  921. // CHECK:STDOUT: %Convert.f06: %Convert.type.0f9 = struct_value () [symbolic]
  922. // CHECK:STDOUT: %Op.type.52d: type = fn_type @Op.2, @impl.2c2(%N) [symbolic]
  923. // CHECK:STDOUT: %Op.12d: %Op.type.52d = struct_value () [symbolic]
  924. // CHECK:STDOUT: %Add.impl_witness.dbc: <witness> = impl_witness imports.%Add.impl_witness_table, @impl.2c2(%int_32) [concrete]
  925. // CHECK:STDOUT: %Op.type.210: type = fn_type @Op.2, @impl.2c2(%int_32) [concrete]
  926. // CHECK:STDOUT: %Op.c82: %Op.type.210 = struct_value () [concrete]
  927. // CHECK:STDOUT: %Add.facet: %Add.type = facet_value %i32, (%Add.impl_witness.dbc) [concrete]
  928. // CHECK:STDOUT: %.ac9: type = fn_type_with_self_type %Op.type.545, %Add.facet [concrete]
  929. // CHECK:STDOUT: %Op.specific_fn: <specific function> = specific_function %Op.c82, @Op.2(%int_32) [concrete]
  930. // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete]
  931. // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete]
  932. // CHECK:STDOUT: %ImplicitAs.impl_witness.c75: <witness> = impl_witness imports.%ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete]
  933. // CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.4f9(%int_32) [concrete]
  934. // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete]
  935. // CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete]
  936. // CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete]
  937. // CHECK:STDOUT: %Convert.bound.ab5: <bound method> = bound_method %int_1.5b8, %Convert.956 [concrete]
  938. // CHECK:STDOUT: %Convert.specific_fn: <specific function> = specific_function %Convert.956, @Convert.2(%int_32) [concrete]
  939. // CHECK:STDOUT: %bound_method.9a1: <bound method> = bound_method %int_1.5b8, %Convert.specific_fn [concrete]
  940. // CHECK:STDOUT: %int_1.5d2: %i32 = int_value 1 [concrete]
  941. // CHECK:STDOUT: %int_2.ecc: Core.IntLiteral = int_value 2 [concrete]
  942. // CHECK:STDOUT: %Convert.bound.ef9: <bound method> = bound_method %int_2.ecc, %Convert.956 [concrete]
  943. // CHECK:STDOUT: %bound_method.b92: <bound method> = bound_method %int_2.ecc, %Convert.specific_fn [concrete]
  944. // CHECK:STDOUT: %int_2.ef8: %i32 = int_value 2 [concrete]
  945. // CHECK:STDOUT: %CallBoth.type: type = fn_type @CallBoth [concrete]
  946. // CHECK:STDOUT: %CallBoth: %CallBoth.type = struct_value () [concrete]
  947. // CHECK:STDOUT: %.29b: type = fn_type_with_self_type %F.type.c14, %J.facet.ee5 [concrete]
  948. // CHECK:STDOUT: %.ff5: type = fn_type_with_self_type %G.type.285, %J.facet.ee5 [concrete]
  949. // CHECK:STDOUT: %int_3.1ba: Core.IntLiteral = int_value 3 [concrete]
  950. // CHECK:STDOUT: %Convert.bound.b30: <bound method> = bound_method %int_3.1ba, %Convert.956 [concrete]
  951. // CHECK:STDOUT: %bound_method.047: <bound method> = bound_method %int_3.1ba, %Convert.specific_fn [concrete]
  952. // CHECK:STDOUT: %int_3.822: %i32 = int_value 3 [concrete]
  953. // CHECK:STDOUT: %int_4.0c1: Core.IntLiteral = int_value 4 [concrete]
  954. // CHECK:STDOUT: %Convert.bound.ac3: <bound method> = bound_method %int_4.0c1, %Convert.956 [concrete]
  955. // CHECK:STDOUT: %bound_method.1da: <bound method> = bound_method %int_4.0c1, %Convert.specific_fn [concrete]
  956. // CHECK:STDOUT: %int_4.940: %i32 = int_value 4 [concrete]
  957. // CHECK:STDOUT: %int_5.64b: Core.IntLiteral = int_value 5 [concrete]
  958. // CHECK:STDOUT: %Convert.bound.4e6: <bound method> = bound_method %int_5.64b, %Convert.956 [concrete]
  959. // CHECK:STDOUT: %bound_method.a25: <bound method> = bound_method %int_5.64b, %Convert.specific_fn [concrete]
  960. // CHECK:STDOUT: %int_5.0f6: %i32 = int_value 5 [concrete]
  961. // CHECK:STDOUT: %int_6.462: Core.IntLiteral = int_value 6 [concrete]
  962. // CHECK:STDOUT: %Convert.bound.ce9: <bound method> = bound_method %int_6.462, %Convert.956 [concrete]
  963. // CHECK:STDOUT: %bound_method.efa: <bound method> = bound_method %int_6.462, %Convert.specific_fn [concrete]
  964. // CHECK:STDOUT: %int_6.e56: %i32 = int_value 6 [concrete]
  965. // CHECK:STDOUT: %T: %J.type = bind_symbolic_name T, 0 [symbolic]
  966. // CHECK:STDOUT: %pattern_type.28e: type = pattern_type %J.type [concrete]
  967. // CHECK:STDOUT: %T.as_type: type = facet_access_type %T [symbolic]
  968. // CHECK:STDOUT: %pattern_type.4ca604.2: type = pattern_type %T.as_type [symbolic]
  969. // CHECK:STDOUT: %J.lookup_impl_witness.64628e.2: <witness> = lookup_impl_witness %T, @J [symbolic]
  970. // CHECK:STDOUT: %J.facet.5210a7.2: %J.type = facet_value %T.as_type, (%J.lookup_impl_witness.64628e.2) [symbolic]
  971. // CHECK:STDOUT: %impl.elem0.11fef0.2: type = impl_witness_access %J.lookup_impl_witness.64628e.2, element0 [symbolic]
  972. // CHECK:STDOUT: %pattern_type.b984e7.2: type = pattern_type %impl.elem0.11fef0.2 [symbolic]
  973. // CHECK:STDOUT: %GenericCallF.type: type = fn_type @GenericCallF [concrete]
  974. // CHECK:STDOUT: %GenericCallF: %GenericCallF.type = struct_value () [concrete]
  975. // CHECK:STDOUT: %require_complete.58f: <witness> = require_complete_type %impl.elem0.11fef0.2 [symbolic]
  976. // CHECK:STDOUT: %require_complete.2a5: <witness> = require_complete_type %T.as_type [symbolic]
  977. // CHECK:STDOUT: %.d43: type = fn_type_with_self_type %F.type.c14, %J.facet.5210a7.2 [symbolic]
  978. // CHECK:STDOUT: %impl.elem1: %.d43 = impl_witness_access %J.lookup_impl_witness.64628e.2, element1 [symbolic]
  979. // CHECK:STDOUT: %specific_impl_fn: <specific function> = specific_impl_function %impl.elem1, @F.1(%J.facet.5210a7.2) [symbolic]
  980. // CHECK:STDOUT: %CallGeneric.type: type = fn_type @CallGeneric [concrete]
  981. // CHECK:STDOUT: %CallGeneric: %CallGeneric.type = struct_value () [concrete]
  982. // CHECK:STDOUT: %GenericCallF.specific_fn: <specific function> = specific_function %GenericCallF, @GenericCallF(%J.facet.ee5) [concrete]
  983. // CHECK:STDOUT: }
  984. // CHECK:STDOUT:
  985. // CHECK:STDOUT: imports {
  986. // CHECK:STDOUT: %Core: <namespace> = namespace file.%Core.import, [concrete] {
  987. // CHECK:STDOUT: .Int = %Core.Int
  988. // CHECK:STDOUT: .Add = %Core.Add
  989. // CHECK:STDOUT: .ImplicitAs = %Core.ImplicitAs
  990. // CHECK:STDOUT: import Core//prelude
  991. // CHECK:STDOUT: import Core//prelude/...
  992. // CHECK:STDOUT: }
  993. // CHECK:STDOUT: %Core.Int: %Int.type = import_ref Core//prelude/types/int, Int, loaded [concrete = constants.%Int.generic]
  994. // CHECK:STDOUT: %Core.Add: type = import_ref Core//prelude/operators/arithmetic, Add, loaded [concrete = constants.%Add.type]
  995. // CHECK:STDOUT: %Core.import_ref.a5b: @impl.4f9.%Convert.type (%Convert.type.0f9) = import_ref Core//prelude/types/int, loc19_39, loaded [symbolic = @impl.4f9.%Convert (constants.%Convert.f06)]
  996. // CHECK:STDOUT: %ImplicitAs.impl_witness_table.a2f = impl_witness_table (%Core.import_ref.a5b), @impl.4f9 [concrete]
  997. // CHECK:STDOUT: %Core.import_ref.344: @impl.2c2.%Op.type (%Op.type.52d) = import_ref Core//prelude/types/int, loc58_42, loaded [symbolic = @impl.2c2.%Op (constants.%Op.12d)]
  998. // CHECK:STDOUT: %Add.impl_witness_table = impl_witness_table (%Core.import_ref.344), @impl.2c2 [concrete]
  999. // CHECK:STDOUT: %Core.ImplicitAs: %ImplicitAs.type.cc7 = import_ref Core//prelude/operators/as, ImplicitAs, loaded [concrete = constants.%ImplicitAs.generic]
  1000. // CHECK:STDOUT: }
  1001. // CHECK:STDOUT:
  1002. // CHECK:STDOUT: file {
  1003. // CHECK:STDOUT: package: <namespace> = namespace [concrete] {
  1004. // CHECK:STDOUT: .Core = imports.%Core
  1005. // CHECK:STDOUT: .J = %J.decl
  1006. // CHECK:STDOUT: .E = %E.decl
  1007. // CHECK:STDOUT: .CallBoth = %CallBoth.decl
  1008. // CHECK:STDOUT: .GenericCallF = %GenericCallF.decl
  1009. // CHECK:STDOUT: .CallGeneric = %CallGeneric.decl
  1010. // CHECK:STDOUT: }
  1011. // CHECK:STDOUT: %Core.import = import Core
  1012. // CHECK:STDOUT: %J.decl: type = interface_decl @J [concrete = constants.%J.type] {} {}
  1013. // CHECK:STDOUT: %E.decl: type = class_decl @E [concrete = constants.%E] {} {}
  1014. // CHECK:STDOUT: %CallBoth.decl: %CallBoth.type = fn_decl @CallBoth [concrete = constants.%CallBoth] {
  1015. // CHECK:STDOUT: %e.patt: %pattern_type.a4a = binding_pattern e [concrete]
  1016. // CHECK:STDOUT: %e.param_patt: %pattern_type.a4a = value_param_pattern %e.patt, call_param0 [concrete]
  1017. // CHECK:STDOUT: %return.patt: %pattern_type.7ce = return_slot_pattern [concrete]
  1018. // CHECK:STDOUT: %return.param_patt: %pattern_type.7ce = out_param_pattern %return.patt, call_param1 [concrete]
  1019. // CHECK:STDOUT: } {
  1020. // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete = constants.%int_32]
  1021. // CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32]
  1022. // CHECK:STDOUT: %e.param: %E = value_param call_param0
  1023. // CHECK:STDOUT: %E.ref.loc20: type = name_ref E, file.%E.decl [concrete = constants.%E]
  1024. // CHECK:STDOUT: %e: %E = bind_name e, %e.param
  1025. // CHECK:STDOUT: %return.param: ref %i32 = out_param call_param1
  1026. // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param
  1027. // CHECK:STDOUT: }
  1028. // CHECK:STDOUT: %GenericCallF.decl: %GenericCallF.type = fn_decl @GenericCallF [concrete = constants.%GenericCallF] {
  1029. // CHECK:STDOUT: %T.patt: %pattern_type.28e = symbolic_binding_pattern T, 0 [concrete]
  1030. // CHECK:STDOUT: %t.patt: @GenericCallF.%pattern_type.loc24_24 (%pattern_type.4ca604.2) = binding_pattern t [concrete]
  1031. // CHECK:STDOUT: %t.param_patt: @GenericCallF.%pattern_type.loc24_24 (%pattern_type.4ca604.2) = value_param_pattern %t.patt, call_param0 [concrete]
  1032. // CHECK:STDOUT: %u.patt: @GenericCallF.%pattern_type.loc24_30 (%pattern_type.b984e7.2) = binding_pattern u [concrete]
  1033. // CHECK:STDOUT: %u.param_patt: @GenericCallF.%pattern_type.loc24_30 (%pattern_type.b984e7.2) = value_param_pattern %u.patt, call_param1 [concrete]
  1034. // CHECK:STDOUT: %return.patt: @GenericCallF.%pattern_type.loc24_30 (%pattern_type.b984e7.2) = return_slot_pattern [concrete]
  1035. // CHECK:STDOUT: %return.param_patt: @GenericCallF.%pattern_type.loc24_30 (%pattern_type.b984e7.2) = out_param_pattern %return.patt, call_param2 [concrete]
  1036. // CHECK:STDOUT: } {
  1037. // CHECK:STDOUT: %T.ref.loc24_41: %J.type = name_ref T, %T.loc24_17.1 [symbolic = %T.loc24_17.2 (constants.%T)]
  1038. // CHECK:STDOUT: %U.ref.loc24_42: %J.assoc_type = name_ref U, @U.%assoc0 [concrete = constants.%assoc0.411]
  1039. // CHECK:STDOUT: %T.as_type.loc24_42: type = facet_access_type %T.ref.loc24_41 [symbolic = %T.as_type.loc24_27.2 (constants.%T.as_type)]
  1040. // CHECK:STDOUT: %.loc24_42: type = converted %T.ref.loc24_41, %T.as_type.loc24_42 [symbolic = %T.as_type.loc24_27.2 (constants.%T.as_type)]
  1041. // CHECK:STDOUT: %impl.elem0.loc24_42: type = impl_witness_access constants.%J.lookup_impl_witness.64628e.2, element0 [symbolic = %impl.elem0.loc24_34.2 (constants.%impl.elem0.11fef0.2)]
  1042. // CHECK:STDOUT: %J.ref: type = name_ref J, file.%J.decl [concrete = constants.%J.type]
  1043. // CHECK:STDOUT: %T.loc24_17.1: %J.type = bind_symbolic_name T, 0 [symbolic = %T.loc24_17.2 (constants.%T)]
  1044. // CHECK:STDOUT: %t.param: @GenericCallF.%T.as_type.loc24_27.2 (%T.as_type) = value_param call_param0
  1045. // CHECK:STDOUT: %.loc24_27.1: type = splice_block %.loc24_27.2 [symbolic = %T.as_type.loc24_27.2 (constants.%T.as_type)] {
  1046. // CHECK:STDOUT: %T.ref.loc24_27: %J.type = name_ref T, %T.loc24_17.1 [symbolic = %T.loc24_17.2 (constants.%T)]
  1047. // CHECK:STDOUT: %T.as_type.loc24_27.1: type = facet_access_type %T.ref.loc24_27 [symbolic = %T.as_type.loc24_27.2 (constants.%T.as_type)]
  1048. // CHECK:STDOUT: %.loc24_27.2: type = converted %T.ref.loc24_27, %T.as_type.loc24_27.1 [symbolic = %T.as_type.loc24_27.2 (constants.%T.as_type)]
  1049. // CHECK:STDOUT: }
  1050. // CHECK:STDOUT: %t: @GenericCallF.%T.as_type.loc24_27.2 (%T.as_type) = bind_name t, %t.param
  1051. // CHECK:STDOUT: %u.param: @GenericCallF.%impl.elem0.loc24_34.2 (%impl.elem0.11fef0.2) = value_param call_param1
  1052. // CHECK:STDOUT: %.loc24_34.1: type = splice_block %impl.elem0.loc24_34.1 [symbolic = %impl.elem0.loc24_34.2 (constants.%impl.elem0.11fef0.2)] {
  1053. // CHECK:STDOUT: %T.ref.loc24_33: %J.type = name_ref T, %T.loc24_17.1 [symbolic = %T.loc24_17.2 (constants.%T)]
  1054. // CHECK:STDOUT: %U.ref.loc24_34: %J.assoc_type = name_ref U, @U.%assoc0 [concrete = constants.%assoc0.411]
  1055. // CHECK:STDOUT: %T.as_type.loc24_34: type = facet_access_type %T.ref.loc24_33 [symbolic = %T.as_type.loc24_27.2 (constants.%T.as_type)]
  1056. // CHECK:STDOUT: %.loc24_34.2: type = converted %T.ref.loc24_33, %T.as_type.loc24_34 [symbolic = %T.as_type.loc24_27.2 (constants.%T.as_type)]
  1057. // CHECK:STDOUT: %impl.elem0.loc24_34.1: type = impl_witness_access constants.%J.lookup_impl_witness.64628e.2, element0 [symbolic = %impl.elem0.loc24_34.2 (constants.%impl.elem0.11fef0.2)]
  1058. // CHECK:STDOUT: }
  1059. // CHECK:STDOUT: %u: @GenericCallF.%impl.elem0.loc24_34.2 (%impl.elem0.11fef0.2) = bind_name u, %u.param
  1060. // CHECK:STDOUT: %return.param: ref @GenericCallF.%impl.elem0.loc24_34.2 (%impl.elem0.11fef0.2) = out_param call_param2
  1061. // CHECK:STDOUT: %return: ref @GenericCallF.%impl.elem0.loc24_34.2 (%impl.elem0.11fef0.2) = return_slot %return.param
  1062. // CHECK:STDOUT: }
  1063. // CHECK:STDOUT: %CallGeneric.decl: %CallGeneric.type = fn_decl @CallGeneric [concrete = constants.%CallGeneric] {
  1064. // CHECK:STDOUT: %e.patt: %pattern_type.a4a = binding_pattern e [concrete]
  1065. // CHECK:STDOUT: %e.param_patt: %pattern_type.a4a = value_param_pattern %e.patt, call_param0 [concrete]
  1066. // CHECK:STDOUT: %return.patt: %pattern_type.7ce = return_slot_pattern [concrete]
  1067. // CHECK:STDOUT: %return.param_patt: %pattern_type.7ce = out_param_pattern %return.patt, call_param1 [concrete]
  1068. // CHECK:STDOUT: } {
  1069. // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete = constants.%int_32]
  1070. // CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32]
  1071. // CHECK:STDOUT: %e.param: %E = value_param call_param0
  1072. // CHECK:STDOUT: %E.ref: type = name_ref E, file.%E.decl [concrete = constants.%E]
  1073. // CHECK:STDOUT: %e: %E = bind_name e, %e.param
  1074. // CHECK:STDOUT: %return.param: ref %i32 = out_param call_param1
  1075. // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param
  1076. // CHECK:STDOUT: }
  1077. // CHECK:STDOUT: }
  1078. // CHECK:STDOUT:
  1079. // CHECK:STDOUT: interface @J {
  1080. // CHECK:STDOUT: %Self: %J.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self.ccd]
  1081. // CHECK:STDOUT: %U: type = assoc_const_decl @U [concrete] {
  1082. // CHECK:STDOUT: %assoc0: %J.assoc_type = assoc_entity element0, @J.%U [concrete = constants.%assoc0.411]
  1083. // CHECK:STDOUT: }
  1084. // CHECK:STDOUT: %F.decl: %F.type.c14 = fn_decl @F.1 [concrete = constants.%F.b71] {
  1085. // CHECK:STDOUT: %u.patt: @F.1.%pattern_type (%pattern_type.b984e7.1) = binding_pattern u [concrete]
  1086. // CHECK:STDOUT: %u.param_patt: @F.1.%pattern_type (%pattern_type.b984e7.1) = value_param_pattern %u.patt, call_param0 [concrete]
  1087. // CHECK:STDOUT: %return.patt: @F.1.%pattern_type (%pattern_type.b984e7.1) = return_slot_pattern [concrete]
  1088. // CHECK:STDOUT: %return.param_patt: @F.1.%pattern_type (%pattern_type.b984e7.1) = out_param_pattern %return.patt, call_param1 [concrete]
  1089. // CHECK:STDOUT: } {
  1090. // CHECK:STDOUT: %impl.elem0.loc5_17: type = impl_witness_access constants.%J.lookup_impl_witness.64628e.1, element0 [symbolic = %impl.elem0.loc5_11.1 (constants.%impl.elem0.11fef0.1)]
  1091. // CHECK:STDOUT: %U.ref.loc5_17: type = name_ref U, %impl.elem0.loc5_17 [symbolic = %impl.elem0.loc5_11.1 (constants.%impl.elem0.11fef0.1)]
  1092. // CHECK:STDOUT: %u.param: @F.1.%impl.elem0.loc5_11.1 (%impl.elem0.11fef0.1) = value_param call_param0
  1093. // CHECK:STDOUT: %.loc5: type = splice_block %U.ref.loc5_11 [symbolic = %impl.elem0.loc5_11.1 (constants.%impl.elem0.11fef0.1)] {
  1094. // CHECK:STDOUT: %impl.elem0.loc5_11.2: type = impl_witness_access constants.%J.lookup_impl_witness.64628e.1, element0 [symbolic = %impl.elem0.loc5_11.1 (constants.%impl.elem0.11fef0.1)]
  1095. // CHECK:STDOUT: %U.ref.loc5_11: type = name_ref U, %impl.elem0.loc5_11.2 [symbolic = %impl.elem0.loc5_11.1 (constants.%impl.elem0.11fef0.1)]
  1096. // CHECK:STDOUT: }
  1097. // CHECK:STDOUT: %u: @F.1.%impl.elem0.loc5_11.1 (%impl.elem0.11fef0.1) = bind_name u, %u.param
  1098. // CHECK:STDOUT: %return.param: ref @F.1.%impl.elem0.loc5_11.1 (%impl.elem0.11fef0.1) = out_param call_param1
  1099. // CHECK:STDOUT: %return: ref @F.1.%impl.elem0.loc5_11.1 (%impl.elem0.11fef0.1) = return_slot %return.param
  1100. // CHECK:STDOUT: }
  1101. // CHECK:STDOUT: %assoc1: %J.assoc_type = assoc_entity element1, %F.decl [concrete = constants.%assoc1]
  1102. // CHECK:STDOUT: %G.decl: %G.type.285 = fn_decl @G.1 [concrete = constants.%G.e4b] {
  1103. // CHECK:STDOUT: %self.patt: @G.1.%pattern_type.loc6_8 (%pattern_type.4ca604.1) = binding_pattern self [concrete]
  1104. // CHECK:STDOUT: %self.param_patt: @G.1.%pattern_type.loc6_8 (%pattern_type.4ca604.1) = value_param_pattern %self.patt, call_param0 [concrete]
  1105. // CHECK:STDOUT: %v.patt: @G.1.%pattern_type.loc6_20 (%pattern_type.b984e7.1) = binding_pattern v [concrete]
  1106. // CHECK:STDOUT: %v.param_patt: @G.1.%pattern_type.loc6_20 (%pattern_type.b984e7.1) = value_param_pattern %v.patt, call_param1 [concrete]
  1107. // CHECK:STDOUT: %return.patt: @G.1.%pattern_type.loc6_20 (%pattern_type.b984e7.1) = return_slot_pattern [concrete]
  1108. // CHECK:STDOUT: %return.param_patt: @G.1.%pattern_type.loc6_20 (%pattern_type.b984e7.1) = out_param_pattern %return.patt, call_param2 [concrete]
  1109. // CHECK:STDOUT: } {
  1110. // CHECK:STDOUT: %impl.elem0.loc6_29: type = impl_witness_access constants.%J.lookup_impl_witness.64628e.1, element0 [symbolic = %impl.elem0.loc6_23.1 (constants.%impl.elem0.11fef0.1)]
  1111. // CHECK:STDOUT: %U.ref.loc6_29: type = name_ref U, %impl.elem0.loc6_29 [symbolic = %impl.elem0.loc6_23.1 (constants.%impl.elem0.11fef0.1)]
  1112. // CHECK:STDOUT: %self.param: @G.1.%Self.as_type.loc6_14.1 (%Self.as_type.3df) = value_param call_param0
  1113. // CHECK:STDOUT: %.loc6_14.1: type = splice_block %.loc6_14.2 [symbolic = %Self.as_type.loc6_14.1 (constants.%Self.as_type.3df)] {
  1114. // CHECK:STDOUT: %Self.ref: %J.type = name_ref Self, @J.%Self [symbolic = %Self (constants.%Self.ccd)]
  1115. // CHECK:STDOUT: %Self.as_type.loc6_14.2: type = facet_access_type %Self.ref [symbolic = %Self.as_type.loc6_14.1 (constants.%Self.as_type.3df)]
  1116. // CHECK:STDOUT: %.loc6_14.2: type = converted %Self.ref, %Self.as_type.loc6_14.2 [symbolic = %Self.as_type.loc6_14.1 (constants.%Self.as_type.3df)]
  1117. // CHECK:STDOUT: }
  1118. // CHECK:STDOUT: %self: @G.1.%Self.as_type.loc6_14.1 (%Self.as_type.3df) = bind_name self, %self.param
  1119. // CHECK:STDOUT: %v.param: @G.1.%impl.elem0.loc6_23.1 (%impl.elem0.11fef0.1) = value_param call_param1
  1120. // CHECK:STDOUT: %.loc6_23: type = splice_block %U.ref.loc6_23 [symbolic = %impl.elem0.loc6_23.1 (constants.%impl.elem0.11fef0.1)] {
  1121. // CHECK:STDOUT: %impl.elem0.loc6_23.2: type = impl_witness_access constants.%J.lookup_impl_witness.64628e.1, element0 [symbolic = %impl.elem0.loc6_23.1 (constants.%impl.elem0.11fef0.1)]
  1122. // CHECK:STDOUT: %U.ref.loc6_23: type = name_ref U, %impl.elem0.loc6_23.2 [symbolic = %impl.elem0.loc6_23.1 (constants.%impl.elem0.11fef0.1)]
  1123. // CHECK:STDOUT: }
  1124. // CHECK:STDOUT: %v: @G.1.%impl.elem0.loc6_23.1 (%impl.elem0.11fef0.1) = bind_name v, %v.param
  1125. // CHECK:STDOUT: %return.param: ref @G.1.%impl.elem0.loc6_23.1 (%impl.elem0.11fef0.1) = out_param call_param2
  1126. // CHECK:STDOUT: %return: ref @G.1.%impl.elem0.loc6_23.1 (%impl.elem0.11fef0.1) = return_slot %return.param
  1127. // CHECK:STDOUT: }
  1128. // CHECK:STDOUT: %assoc2: %J.assoc_type = assoc_entity element2, %G.decl [concrete = constants.%assoc2]
  1129. // CHECK:STDOUT:
  1130. // CHECK:STDOUT: !members:
  1131. // CHECK:STDOUT: .Self = %Self
  1132. // CHECK:STDOUT: .U = @U.%assoc0
  1133. // CHECK:STDOUT: .F = %assoc1
  1134. // CHECK:STDOUT: .G = %assoc2
  1135. // CHECK:STDOUT: witness = (%U, %F.decl, %G.decl)
  1136. // CHECK:STDOUT: }
  1137. // CHECK:STDOUT:
  1138. // CHECK:STDOUT: generic assoc_const @U(@J.%Self: %J.type) {
  1139. // CHECK:STDOUT: assoc_const U:! type;
  1140. // CHECK:STDOUT: }
  1141. // CHECK:STDOUT:
  1142. // CHECK:STDOUT: impl @impl.939: %Self.ref as %.loc10_20 {
  1143. // CHECK:STDOUT: %F.decl: %F.type.b84 = fn_decl @F.2 [concrete = constants.%F.b07] {
  1144. // CHECK:STDOUT: %u.patt: %pattern_type.7ce = binding_pattern u [concrete]
  1145. // CHECK:STDOUT: %u.param_patt: %pattern_type.7ce = value_param_pattern %u.patt, call_param0 [concrete]
  1146. // CHECK:STDOUT: %return.patt: %pattern_type.7ce = return_slot_pattern [concrete]
  1147. // CHECK:STDOUT: %return.param_patt: %pattern_type.7ce = out_param_pattern %return.patt, call_param1 [concrete]
  1148. // CHECK:STDOUT: } {
  1149. // CHECK:STDOUT: %int_32.loc11_21: Core.IntLiteral = int_value 32 [concrete = constants.%int_32]
  1150. // CHECK:STDOUT: %i32.loc11_21: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32]
  1151. // CHECK:STDOUT: %u.param: %i32 = value_param call_param0
  1152. // CHECK:STDOUT: %.loc11: type = splice_block %i32.loc11_13 [concrete = constants.%i32] {
  1153. // CHECK:STDOUT: %int_32.loc11_13: Core.IntLiteral = int_value 32 [concrete = constants.%int_32]
  1154. // CHECK:STDOUT: %i32.loc11_13: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32]
  1155. // CHECK:STDOUT: }
  1156. // CHECK:STDOUT: %u: %i32 = bind_name u, %u.param
  1157. // CHECK:STDOUT: %return.param: ref %i32 = out_param call_param1
  1158. // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param
  1159. // CHECK:STDOUT: }
  1160. // CHECK:STDOUT: %G.decl: %G.type.4b6 = fn_decl @G.2 [concrete = constants.%G.553] {
  1161. // CHECK:STDOUT: %self.patt: %pattern_type.a4a = binding_pattern self [concrete]
  1162. // CHECK:STDOUT: %self.param_patt: %pattern_type.a4a = value_param_pattern %self.patt, call_param0 [concrete]
  1163. // CHECK:STDOUT: %v.patt: %pattern_type.7ce = binding_pattern v [concrete]
  1164. // CHECK:STDOUT: %v.param_patt: %pattern_type.7ce = value_param_pattern %v.patt, call_param1 [concrete]
  1165. // CHECK:STDOUT: %return.patt: %pattern_type.7ce = return_slot_pattern [concrete]
  1166. // CHECK:STDOUT: %return.param_patt: %pattern_type.7ce = out_param_pattern %return.patt, call_param2 [concrete]
  1167. // CHECK:STDOUT: } {
  1168. // CHECK:STDOUT: %int_32.loc14_33: Core.IntLiteral = int_value 32 [concrete = constants.%int_32]
  1169. // CHECK:STDOUT: %i32.loc14_33: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32]
  1170. // CHECK:STDOUT: %self.param: %E = value_param call_param0
  1171. // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%E [concrete = constants.%E]
  1172. // CHECK:STDOUT: %self: %E = bind_name self, %self.param
  1173. // CHECK:STDOUT: %v.param: %i32 = value_param call_param1
  1174. // CHECK:STDOUT: %.loc14: type = splice_block %i32.loc14_25 [concrete = constants.%i32] {
  1175. // CHECK:STDOUT: %int_32.loc14_25: Core.IntLiteral = int_value 32 [concrete = constants.%int_32]
  1176. // CHECK:STDOUT: %i32.loc14_25: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32]
  1177. // CHECK:STDOUT: }
  1178. // CHECK:STDOUT: %v: %i32 = bind_name v, %v.param
  1179. // CHECK:STDOUT: %return.param: ref %i32 = out_param call_param2
  1180. // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param
  1181. // CHECK:STDOUT: }
  1182. // CHECK:STDOUT:
  1183. // CHECK:STDOUT: !members:
  1184. // CHECK:STDOUT: .F = %F.decl
  1185. // CHECK:STDOUT: .G = %G.decl
  1186. // CHECK:STDOUT: witness = @E.%J.impl_witness
  1187. // CHECK:STDOUT: }
  1188. // CHECK:STDOUT:
  1189. // CHECK:STDOUT: class @E {
  1190. // CHECK:STDOUT: impl_decl @impl.939 [concrete] {} {
  1191. // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%E [concrete = constants.%E]
  1192. // CHECK:STDOUT: %J.ref: type = name_ref J, file.%J.decl [concrete = constants.%J.type]
  1193. // CHECK:STDOUT: %.Self: %J.type = bind_symbolic_name .Self [symbolic_self = constants.%.Self]
  1194. // CHECK:STDOUT: %.Self.ref: %J.type = name_ref .Self, %.Self [symbolic_self = constants.%.Self]
  1195. // CHECK:STDOUT: %U.ref: %J.assoc_type = name_ref U, @U.%assoc0 [concrete = constants.%assoc0.411]
  1196. // CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self.ref [symbolic_self = constants.%.Self.as_type]
  1197. // CHECK:STDOUT: %.loc10_26: type = converted %.Self.ref, %.Self.as_type [symbolic_self = constants.%.Self.as_type]
  1198. // CHECK:STDOUT: %impl.elem0: type = impl_witness_access constants.%J.lookup_impl_witness.25c, element0 [symbolic_self = constants.%impl.elem0.83f]
  1199. // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete = constants.%int_32]
  1200. // CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32]
  1201. // CHECK:STDOUT: %.loc10_20: type = where_expr %.Self [concrete = constants.%J_where.type] {
  1202. // CHECK:STDOUT: requirement_rewrite %impl.elem0, %i32
  1203. // CHECK:STDOUT: }
  1204. // CHECK:STDOUT: }
  1205. // CHECK:STDOUT: %J.impl_witness_table = impl_witness_table (%impl_witness_assoc_constant, @impl.939.%F.decl, @impl.939.%G.decl), @impl.939 [concrete]
  1206. // CHECK:STDOUT: %J.impl_witness: <witness> = impl_witness %J.impl_witness_table [concrete = constants.%J.impl_witness]
  1207. // CHECK:STDOUT: %impl_witness_assoc_constant: type = impl_witness_assoc_constant constants.%i32 [concrete = constants.%i32]
  1208. // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete = constants.%empty_struct_type]
  1209. // CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %empty_struct_type [concrete = constants.%complete_type.357]
  1210. // CHECK:STDOUT: complete_type_witness = %complete_type
  1211. // CHECK:STDOUT:
  1212. // CHECK:STDOUT: !members:
  1213. // CHECK:STDOUT: .Self = constants.%E
  1214. // CHECK:STDOUT: .J = <poisoned>
  1215. // CHECK:STDOUT: .F = <poisoned>
  1216. // CHECK:STDOUT: .G = <poisoned>
  1217. // CHECK:STDOUT: extend @impl.939.%.loc10_20
  1218. // CHECK:STDOUT: }
  1219. // CHECK:STDOUT:
  1220. // CHECK:STDOUT: generic fn @F.1(@J.%Self: %J.type) {
  1221. // CHECK:STDOUT: %Self: %J.type = bind_symbolic_name Self, 0 [symbolic = %Self (constants.%Self.ccd)]
  1222. // CHECK:STDOUT: %J.lookup_impl_witness: <witness> = lookup_impl_witness %Self, @J [symbolic = %J.lookup_impl_witness (constants.%J.lookup_impl_witness.64628e.1)]
  1223. // CHECK:STDOUT: %impl.elem0.loc5_11.1: type = impl_witness_access %J.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc5_11.1 (constants.%impl.elem0.11fef0.1)]
  1224. // CHECK:STDOUT: %pattern_type: type = pattern_type %impl.elem0.loc5_11.1 [symbolic = %pattern_type (constants.%pattern_type.b984e7.1)]
  1225. // CHECK:STDOUT:
  1226. // CHECK:STDOUT: fn(%u.param: @F.1.%impl.elem0.loc5_11.1 (%impl.elem0.11fef0.1)) -> @F.1.%impl.elem0.loc5_11.1 (%impl.elem0.11fef0.1);
  1227. // CHECK:STDOUT: }
  1228. // CHECK:STDOUT:
  1229. // CHECK:STDOUT: generic fn @G.1(@J.%Self: %J.type) {
  1230. // CHECK:STDOUT: %Self: %J.type = bind_symbolic_name Self, 0 [symbolic = %Self (constants.%Self.ccd)]
  1231. // CHECK:STDOUT: %Self.as_type.loc6_14.1: type = facet_access_type %Self [symbolic = %Self.as_type.loc6_14.1 (constants.%Self.as_type.3df)]
  1232. // CHECK:STDOUT: %pattern_type.loc6_8: type = pattern_type %Self.as_type.loc6_14.1 [symbolic = %pattern_type.loc6_8 (constants.%pattern_type.4ca604.1)]
  1233. // CHECK:STDOUT: %J.lookup_impl_witness: <witness> = lookup_impl_witness %Self, @J [symbolic = %J.lookup_impl_witness (constants.%J.lookup_impl_witness.64628e.1)]
  1234. // CHECK:STDOUT: %impl.elem0.loc6_23.1: type = impl_witness_access %J.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc6_23.1 (constants.%impl.elem0.11fef0.1)]
  1235. // CHECK:STDOUT: %pattern_type.loc6_20: type = pattern_type %impl.elem0.loc6_23.1 [symbolic = %pattern_type.loc6_20 (constants.%pattern_type.b984e7.1)]
  1236. // CHECK:STDOUT:
  1237. // CHECK:STDOUT: fn(%self.param: @G.1.%Self.as_type.loc6_14.1 (%Self.as_type.3df), %v.param: @G.1.%impl.elem0.loc6_23.1 (%impl.elem0.11fef0.1)) -> @G.1.%impl.elem0.loc6_23.1 (%impl.elem0.11fef0.1);
  1238. // CHECK:STDOUT: }
  1239. // CHECK:STDOUT:
  1240. // CHECK:STDOUT: fn @F.2(%u.param: %i32) -> %i32 {
  1241. // CHECK:STDOUT: !entry:
  1242. // CHECK:STDOUT: %u.ref: %i32 = name_ref u, %u
  1243. // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8]
  1244. // CHECK:STDOUT: %impl.elem0.loc12_16: %.ac9 = impl_witness_access constants.%Add.impl_witness.dbc, element0 [concrete = constants.%Op.c82]
  1245. // CHECK:STDOUT: %bound_method.loc12_16.1: <bound method> = bound_method %u.ref, %impl.elem0.loc12_16
  1246. // CHECK:STDOUT: %specific_fn.loc12_16: <specific function> = specific_function %impl.elem0.loc12_16, @Op.2(constants.%int_32) [concrete = constants.%Op.specific_fn]
  1247. // CHECK:STDOUT: %bound_method.loc12_16.2: <bound method> = bound_method %u.ref, %specific_fn.loc12_16
  1248. // CHECK:STDOUT: %impl.elem0.loc12_18: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956]
  1249. // CHECK:STDOUT: %bound_method.loc12_18.1: <bound method> = bound_method %int_1, %impl.elem0.loc12_18 [concrete = constants.%Convert.bound.ab5]
  1250. // CHECK:STDOUT: %specific_fn.loc12_18: <specific function> = specific_function %impl.elem0.loc12_18, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn]
  1251. // CHECK:STDOUT: %bound_method.loc12_18.2: <bound method> = bound_method %int_1, %specific_fn.loc12_18 [concrete = constants.%bound_method.9a1]
  1252. // CHECK:STDOUT: %int.convert_checked: init %i32 = call %bound_method.loc12_18.2(%int_1) [concrete = constants.%int_1.5d2]
  1253. // CHECK:STDOUT: %.loc12_18.1: %i32 = value_of_initializer %int.convert_checked [concrete = constants.%int_1.5d2]
  1254. // CHECK:STDOUT: %.loc12_18.2: %i32 = converted %int_1, %.loc12_18.1 [concrete = constants.%int_1.5d2]
  1255. // CHECK:STDOUT: %int.sadd: init %i32 = call %bound_method.loc12_16.2(%u.ref, %.loc12_18.2)
  1256. // CHECK:STDOUT: %.loc12_19.1: %i32 = value_of_initializer %int.sadd
  1257. // CHECK:STDOUT: %.loc12_19.2: %i32 = converted %int.sadd, %.loc12_19.1
  1258. // CHECK:STDOUT: return %.loc12_19.2
  1259. // CHECK:STDOUT: }
  1260. // CHECK:STDOUT:
  1261. // CHECK:STDOUT: fn @G.2(%self.param: %E, %v.param: %i32) -> %i32 {
  1262. // CHECK:STDOUT: !entry:
  1263. // CHECK:STDOUT: %v.ref: %i32 = name_ref v, %v
  1264. // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [concrete = constants.%int_2.ecc]
  1265. // CHECK:STDOUT: %impl.elem0.loc15_16: %.ac9 = impl_witness_access constants.%Add.impl_witness.dbc, element0 [concrete = constants.%Op.c82]
  1266. // CHECK:STDOUT: %bound_method.loc15_16.1: <bound method> = bound_method %v.ref, %impl.elem0.loc15_16
  1267. // CHECK:STDOUT: %specific_fn.loc15_16: <specific function> = specific_function %impl.elem0.loc15_16, @Op.2(constants.%int_32) [concrete = constants.%Op.specific_fn]
  1268. // CHECK:STDOUT: %bound_method.loc15_16.2: <bound method> = bound_method %v.ref, %specific_fn.loc15_16
  1269. // CHECK:STDOUT: %impl.elem0.loc15_18: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956]
  1270. // CHECK:STDOUT: %bound_method.loc15_18.1: <bound method> = bound_method %int_2, %impl.elem0.loc15_18 [concrete = constants.%Convert.bound.ef9]
  1271. // CHECK:STDOUT: %specific_fn.loc15_18: <specific function> = specific_function %impl.elem0.loc15_18, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn]
  1272. // CHECK:STDOUT: %bound_method.loc15_18.2: <bound method> = bound_method %int_2, %specific_fn.loc15_18 [concrete = constants.%bound_method.b92]
  1273. // CHECK:STDOUT: %int.convert_checked: init %i32 = call %bound_method.loc15_18.2(%int_2) [concrete = constants.%int_2.ef8]
  1274. // CHECK:STDOUT: %.loc15_18.1: %i32 = value_of_initializer %int.convert_checked [concrete = constants.%int_2.ef8]
  1275. // CHECK:STDOUT: %.loc15_18.2: %i32 = converted %int_2, %.loc15_18.1 [concrete = constants.%int_2.ef8]
  1276. // CHECK:STDOUT: %int.sadd: init %i32 = call %bound_method.loc15_16.2(%v.ref, %.loc15_18.2)
  1277. // CHECK:STDOUT: %.loc15_19.1: %i32 = value_of_initializer %int.sadd
  1278. // CHECK:STDOUT: %.loc15_19.2: %i32 = converted %int.sadd, %.loc15_19.1
  1279. // CHECK:STDOUT: return %.loc15_19.2
  1280. // CHECK:STDOUT: }
  1281. // CHECK:STDOUT:
  1282. // CHECK:STDOUT: fn @CallBoth(%e.param: %E) -> %i32 {
  1283. // CHECK:STDOUT: !entry:
  1284. // CHECK:STDOUT: %e.ref.loc21_10: %E = name_ref e, %e
  1285. // CHECK:STDOUT: %F.ref.loc21_11: %J.assoc_type = name_ref F, @J.%assoc1 [concrete = constants.%assoc1]
  1286. // CHECK:STDOUT: %impl.elem1.loc21_11: %.29b = impl_witness_access constants.%J.impl_witness, element1 [concrete = constants.%F.b07]
  1287. // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [concrete = constants.%int_2.ecc]
  1288. // CHECK:STDOUT: %impl.elem0.loc21_14: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956]
  1289. // CHECK:STDOUT: %bound_method.loc21_14.1: <bound method> = bound_method %int_2, %impl.elem0.loc21_14 [concrete = constants.%Convert.bound.ef9]
  1290. // CHECK:STDOUT: %specific_fn.loc21_14: <specific function> = specific_function %impl.elem0.loc21_14, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn]
  1291. // CHECK:STDOUT: %bound_method.loc21_14.2: <bound method> = bound_method %int_2, %specific_fn.loc21_14 [concrete = constants.%bound_method.b92]
  1292. // CHECK:STDOUT: %int.convert_checked.loc21_14: init %i32 = call %bound_method.loc21_14.2(%int_2) [concrete = constants.%int_2.ef8]
  1293. // CHECK:STDOUT: %.loc21_14.1: %i32 = value_of_initializer %int.convert_checked.loc21_14 [concrete = constants.%int_2.ef8]
  1294. // CHECK:STDOUT: %.loc21_14.2: %i32 = converted %int_2, %.loc21_14.1 [concrete = constants.%int_2.ef8]
  1295. // CHECK:STDOUT: %F.call.loc21_15: init %i32 = call %impl.elem1.loc21_11(%.loc21_14.2)
  1296. // CHECK:STDOUT: %e.ref.loc21_19: %E = name_ref e, %e
  1297. // CHECK:STDOUT: %G.ref.loc21_20: %J.assoc_type = name_ref G, @J.%assoc2 [concrete = constants.%assoc2]
  1298. // CHECK:STDOUT: %impl.elem2.loc21_20: %.ff5 = impl_witness_access constants.%J.impl_witness, element2 [concrete = constants.%G.553]
  1299. // CHECK:STDOUT: %bound_method.loc21_20: <bound method> = bound_method %e.ref.loc21_19, %impl.elem2.loc21_20
  1300. // CHECK:STDOUT: %int_3: Core.IntLiteral = int_value 3 [concrete = constants.%int_3.1ba]
  1301. // CHECK:STDOUT: %impl.elem0.loc21_23: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956]
  1302. // CHECK:STDOUT: %bound_method.loc21_23.1: <bound method> = bound_method %int_3, %impl.elem0.loc21_23 [concrete = constants.%Convert.bound.b30]
  1303. // CHECK:STDOUT: %specific_fn.loc21_23: <specific function> = specific_function %impl.elem0.loc21_23, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn]
  1304. // CHECK:STDOUT: %bound_method.loc21_23.2: <bound method> = bound_method %int_3, %specific_fn.loc21_23 [concrete = constants.%bound_method.047]
  1305. // CHECK:STDOUT: %int.convert_checked.loc21_23: init %i32 = call %bound_method.loc21_23.2(%int_3) [concrete = constants.%int_3.822]
  1306. // CHECK:STDOUT: %.loc21_23.1: %i32 = value_of_initializer %int.convert_checked.loc21_23 [concrete = constants.%int_3.822]
  1307. // CHECK:STDOUT: %.loc21_23.2: %i32 = converted %int_3, %.loc21_23.1 [concrete = constants.%int_3.822]
  1308. // CHECK:STDOUT: %G.call.loc21_24: init %i32 = call %bound_method.loc21_20(%e.ref.loc21_19, %.loc21_23.2)
  1309. // CHECK:STDOUT: %impl.elem0.loc21_17: %.ac9 = impl_witness_access constants.%Add.impl_witness.dbc, element0 [concrete = constants.%Op.c82]
  1310. // CHECK:STDOUT: %bound_method.loc21_17.1: <bound method> = bound_method %F.call.loc21_15, %impl.elem0.loc21_17
  1311. // CHECK:STDOUT: %specific_fn.loc21_17: <specific function> = specific_function %impl.elem0.loc21_17, @Op.2(constants.%int_32) [concrete = constants.%Op.specific_fn]
  1312. // CHECK:STDOUT: %bound_method.loc21_17.2: <bound method> = bound_method %F.call.loc21_15, %specific_fn.loc21_17
  1313. // CHECK:STDOUT: %.loc21_15.1: %i32 = value_of_initializer %F.call.loc21_15
  1314. // CHECK:STDOUT: %.loc21_15.2: %i32 = converted %F.call.loc21_15, %.loc21_15.1
  1315. // CHECK:STDOUT: %.loc21_24.1: %i32 = value_of_initializer %G.call.loc21_24
  1316. // CHECK:STDOUT: %.loc21_24.2: %i32 = converted %G.call.loc21_24, %.loc21_24.1
  1317. // CHECK:STDOUT: %int.sadd.loc21_17: init %i32 = call %bound_method.loc21_17.2(%.loc21_15.2, %.loc21_24.2)
  1318. // CHECK:STDOUT: %E.ref.loc21_28: type = name_ref E, file.%E.decl [concrete = constants.%E]
  1319. // CHECK:STDOUT: %F.ref.loc21_29: %J.assoc_type = name_ref F, @J.%assoc1 [concrete = constants.%assoc1]
  1320. // CHECK:STDOUT: %impl.elem1.loc21_29: %.29b = impl_witness_access constants.%J.impl_witness, element1 [concrete = constants.%F.b07]
  1321. // CHECK:STDOUT: %int_4: Core.IntLiteral = int_value 4 [concrete = constants.%int_4.0c1]
  1322. // CHECK:STDOUT: %impl.elem0.loc21_32: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956]
  1323. // CHECK:STDOUT: %bound_method.loc21_32.1: <bound method> = bound_method %int_4, %impl.elem0.loc21_32 [concrete = constants.%Convert.bound.ac3]
  1324. // CHECK:STDOUT: %specific_fn.loc21_32: <specific function> = specific_function %impl.elem0.loc21_32, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn]
  1325. // CHECK:STDOUT: %bound_method.loc21_32.2: <bound method> = bound_method %int_4, %specific_fn.loc21_32 [concrete = constants.%bound_method.1da]
  1326. // CHECK:STDOUT: %int.convert_checked.loc21_32: init %i32 = call %bound_method.loc21_32.2(%int_4) [concrete = constants.%int_4.940]
  1327. // CHECK:STDOUT: %.loc21_32.1: %i32 = value_of_initializer %int.convert_checked.loc21_32 [concrete = constants.%int_4.940]
  1328. // CHECK:STDOUT: %.loc21_32.2: %i32 = converted %int_4, %.loc21_32.1 [concrete = constants.%int_4.940]
  1329. // CHECK:STDOUT: %F.call.loc21_33: init %i32 = call %impl.elem1.loc21_29(%.loc21_32.2)
  1330. // CHECK:STDOUT: %impl.elem0.loc21_26: %.ac9 = impl_witness_access constants.%Add.impl_witness.dbc, element0 [concrete = constants.%Op.c82]
  1331. // CHECK:STDOUT: %bound_method.loc21_26.1: <bound method> = bound_method %int.sadd.loc21_17, %impl.elem0.loc21_26
  1332. // CHECK:STDOUT: %specific_fn.loc21_26: <specific function> = specific_function %impl.elem0.loc21_26, @Op.2(constants.%int_32) [concrete = constants.%Op.specific_fn]
  1333. // CHECK:STDOUT: %bound_method.loc21_26.2: <bound method> = bound_method %int.sadd.loc21_17, %specific_fn.loc21_26
  1334. // CHECK:STDOUT: %.loc21_17.1: %i32 = value_of_initializer %int.sadd.loc21_17
  1335. // CHECK:STDOUT: %.loc21_17.2: %i32 = converted %int.sadd.loc21_17, %.loc21_17.1
  1336. // CHECK:STDOUT: %.loc21_33.1: %i32 = value_of_initializer %F.call.loc21_33
  1337. // CHECK:STDOUT: %.loc21_33.2: %i32 = converted %F.call.loc21_33, %.loc21_33.1
  1338. // CHECK:STDOUT: %int.sadd.loc21_26: init %i32 = call %bound_method.loc21_26.2(%.loc21_17.2, %.loc21_33.2)
  1339. // CHECK:STDOUT: %e.ref.loc21_37: %E = name_ref e, %e
  1340. // CHECK:STDOUT: %E.ref.loc21_40: type = name_ref E, file.%E.decl [concrete = constants.%E]
  1341. // CHECK:STDOUT: %G.ref.loc21_41: %J.assoc_type = name_ref G, @J.%assoc2 [concrete = constants.%assoc2]
  1342. // CHECK:STDOUT: %impl.elem2.loc21_41: %.ff5 = impl_witness_access constants.%J.impl_witness, element2 [concrete = constants.%G.553]
  1343. // CHECK:STDOUT: %bound_method.loc21_38: <bound method> = bound_method %e.ref.loc21_37, %impl.elem2.loc21_41
  1344. // CHECK:STDOUT: %int_5: Core.IntLiteral = int_value 5 [concrete = constants.%int_5.64b]
  1345. // CHECK:STDOUT: %impl.elem0.loc21_45: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956]
  1346. // CHECK:STDOUT: %bound_method.loc21_45.1: <bound method> = bound_method %int_5, %impl.elem0.loc21_45 [concrete = constants.%Convert.bound.4e6]
  1347. // CHECK:STDOUT: %specific_fn.loc21_45: <specific function> = specific_function %impl.elem0.loc21_45, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn]
  1348. // CHECK:STDOUT: %bound_method.loc21_45.2: <bound method> = bound_method %int_5, %specific_fn.loc21_45 [concrete = constants.%bound_method.a25]
  1349. // CHECK:STDOUT: %int.convert_checked.loc21_45: init %i32 = call %bound_method.loc21_45.2(%int_5) [concrete = constants.%int_5.0f6]
  1350. // CHECK:STDOUT: %.loc21_45.1: %i32 = value_of_initializer %int.convert_checked.loc21_45 [concrete = constants.%int_5.0f6]
  1351. // CHECK:STDOUT: %.loc21_45.2: %i32 = converted %int_5, %.loc21_45.1 [concrete = constants.%int_5.0f6]
  1352. // CHECK:STDOUT: %G.call.loc21_46: init %i32 = call %bound_method.loc21_38(%e.ref.loc21_37, %.loc21_45.2)
  1353. // CHECK:STDOUT: %impl.elem0.loc21_35: %.ac9 = impl_witness_access constants.%Add.impl_witness.dbc, element0 [concrete = constants.%Op.c82]
  1354. // CHECK:STDOUT: %bound_method.loc21_35.1: <bound method> = bound_method %int.sadd.loc21_26, %impl.elem0.loc21_35
  1355. // CHECK:STDOUT: %specific_fn.loc21_35: <specific function> = specific_function %impl.elem0.loc21_35, @Op.2(constants.%int_32) [concrete = constants.%Op.specific_fn]
  1356. // CHECK:STDOUT: %bound_method.loc21_35.2: <bound method> = bound_method %int.sadd.loc21_26, %specific_fn.loc21_35
  1357. // CHECK:STDOUT: %.loc21_26.1: %i32 = value_of_initializer %int.sadd.loc21_26
  1358. // CHECK:STDOUT: %.loc21_26.2: %i32 = converted %int.sadd.loc21_26, %.loc21_26.1
  1359. // CHECK:STDOUT: %.loc21_46.1: %i32 = value_of_initializer %G.call.loc21_46
  1360. // CHECK:STDOUT: %.loc21_46.2: %i32 = converted %G.call.loc21_46, %.loc21_46.1
  1361. // CHECK:STDOUT: %int.sadd.loc21_35: init %i32 = call %bound_method.loc21_35.2(%.loc21_26.2, %.loc21_46.2)
  1362. // CHECK:STDOUT: %e.ref.loc21_50: %E = name_ref e, %e
  1363. // CHECK:STDOUT: %J.ref: type = name_ref J, file.%J.decl [concrete = constants.%J.type]
  1364. // CHECK:STDOUT: %G.ref.loc21_54: %J.assoc_type = name_ref G, @J.%assoc2 [concrete = constants.%assoc2]
  1365. // CHECK:STDOUT: %impl.elem2.loc21_51: %.ff5 = impl_witness_access constants.%J.impl_witness, element2 [concrete = constants.%G.553]
  1366. // CHECK:STDOUT: %bound_method.loc21_51: <bound method> = bound_method %e.ref.loc21_50, %impl.elem2.loc21_51
  1367. // CHECK:STDOUT: %int_6: Core.IntLiteral = int_value 6 [concrete = constants.%int_6.462]
  1368. // CHECK:STDOUT: %impl.elem0.loc21_58: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956]
  1369. // CHECK:STDOUT: %bound_method.loc21_58.1: <bound method> = bound_method %int_6, %impl.elem0.loc21_58 [concrete = constants.%Convert.bound.ce9]
  1370. // CHECK:STDOUT: %specific_fn.loc21_58: <specific function> = specific_function %impl.elem0.loc21_58, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn]
  1371. // CHECK:STDOUT: %bound_method.loc21_58.2: <bound method> = bound_method %int_6, %specific_fn.loc21_58 [concrete = constants.%bound_method.efa]
  1372. // CHECK:STDOUT: %int.convert_checked.loc21_58: init %i32 = call %bound_method.loc21_58.2(%int_6) [concrete = constants.%int_6.e56]
  1373. // CHECK:STDOUT: %.loc21_58.1: %i32 = value_of_initializer %int.convert_checked.loc21_58 [concrete = constants.%int_6.e56]
  1374. // CHECK:STDOUT: %.loc21_58.2: %i32 = converted %int_6, %.loc21_58.1 [concrete = constants.%int_6.e56]
  1375. // CHECK:STDOUT: %G.call.loc21_59: init %i32 = call %bound_method.loc21_51(%e.ref.loc21_50, %.loc21_58.2)
  1376. // CHECK:STDOUT: %impl.elem0.loc21_48: %.ac9 = impl_witness_access constants.%Add.impl_witness.dbc, element0 [concrete = constants.%Op.c82]
  1377. // CHECK:STDOUT: %bound_method.loc21_48.1: <bound method> = bound_method %int.sadd.loc21_35, %impl.elem0.loc21_48
  1378. // CHECK:STDOUT: %specific_fn.loc21_48: <specific function> = specific_function %impl.elem0.loc21_48, @Op.2(constants.%int_32) [concrete = constants.%Op.specific_fn]
  1379. // CHECK:STDOUT: %bound_method.loc21_48.2: <bound method> = bound_method %int.sadd.loc21_35, %specific_fn.loc21_48
  1380. // CHECK:STDOUT: %.loc21_35.1: %i32 = value_of_initializer %int.sadd.loc21_35
  1381. // CHECK:STDOUT: %.loc21_35.2: %i32 = converted %int.sadd.loc21_35, %.loc21_35.1
  1382. // CHECK:STDOUT: %.loc21_59.1: %i32 = value_of_initializer %G.call.loc21_59
  1383. // CHECK:STDOUT: %.loc21_59.2: %i32 = converted %G.call.loc21_59, %.loc21_59.1
  1384. // CHECK:STDOUT: %int.sadd.loc21_48: init %i32 = call %bound_method.loc21_48.2(%.loc21_35.2, %.loc21_59.2)
  1385. // CHECK:STDOUT: %.loc21_60.1: %i32 = value_of_initializer %int.sadd.loc21_48
  1386. // CHECK:STDOUT: %.loc21_60.2: %i32 = converted %int.sadd.loc21_48, %.loc21_60.1
  1387. // CHECK:STDOUT: return %.loc21_60.2
  1388. // CHECK:STDOUT: }
  1389. // CHECK:STDOUT:
  1390. // CHECK:STDOUT: generic fn @GenericCallF(%T.loc24_17.1: %J.type) {
  1391. // CHECK:STDOUT: %T.loc24_17.2: %J.type = bind_symbolic_name T, 0 [symbolic = %T.loc24_17.2 (constants.%T)]
  1392. // CHECK:STDOUT: %T.as_type.loc24_27.2: type = facet_access_type %T.loc24_17.2 [symbolic = %T.as_type.loc24_27.2 (constants.%T.as_type)]
  1393. // CHECK:STDOUT: %pattern_type.loc24_24: type = pattern_type %T.as_type.loc24_27.2 [symbolic = %pattern_type.loc24_24 (constants.%pattern_type.4ca604.2)]
  1394. // CHECK:STDOUT: %J.lookup_impl_witness: <witness> = lookup_impl_witness %T.loc24_17.2, @J [symbolic = %J.lookup_impl_witness (constants.%J.lookup_impl_witness.64628e.2)]
  1395. // CHECK:STDOUT: %impl.elem0.loc24_34.2: type = impl_witness_access %J.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc24_34.2 (constants.%impl.elem0.11fef0.2)]
  1396. // CHECK:STDOUT: %pattern_type.loc24_30: type = pattern_type %impl.elem0.loc24_34.2 [symbolic = %pattern_type.loc24_30 (constants.%pattern_type.b984e7.2)]
  1397. // CHECK:STDOUT:
  1398. // CHECK:STDOUT: !definition:
  1399. // CHECK:STDOUT: %require_complete.loc24_38: <witness> = require_complete_type %impl.elem0.loc24_34.2 [symbolic = %require_complete.loc24_38 (constants.%require_complete.58f)]
  1400. // CHECK:STDOUT: %require_complete.loc24_25: <witness> = require_complete_type %T.as_type.loc24_27.2 [symbolic = %require_complete.loc24_25 (constants.%require_complete.2a5)]
  1401. // CHECK:STDOUT: %J.facet: %J.type = facet_value %T.as_type.loc24_27.2, (%J.lookup_impl_witness) [symbolic = %J.facet (constants.%J.facet.5210a7.2)]
  1402. // CHECK:STDOUT: %.loc25_11.2: type = fn_type_with_self_type constants.%F.type.c14, %J.facet [symbolic = %.loc25_11.2 (constants.%.d43)]
  1403. // CHECK:STDOUT: %impl.elem1.loc25_11.2: @GenericCallF.%.loc25_11.2 (%.d43) = impl_witness_access %J.lookup_impl_witness, element1 [symbolic = %impl.elem1.loc25_11.2 (constants.%impl.elem1)]
  1404. // CHECK:STDOUT: %specific_impl_fn.loc25_11.2: <specific function> = specific_impl_function %impl.elem1.loc25_11.2, @F.1(%J.facet) [symbolic = %specific_impl_fn.loc25_11.2 (constants.%specific_impl_fn)]
  1405. // CHECK:STDOUT:
  1406. // CHECK:STDOUT: fn(%t.param: @GenericCallF.%T.as_type.loc24_27.2 (%T.as_type), %u.param: @GenericCallF.%impl.elem0.loc24_34.2 (%impl.elem0.11fef0.2)) -> @GenericCallF.%impl.elem0.loc24_34.2 (%impl.elem0.11fef0.2) {
  1407. // CHECK:STDOUT: !entry:
  1408. // CHECK:STDOUT: %t.ref: @GenericCallF.%T.as_type.loc24_27.2 (%T.as_type) = name_ref t, %t
  1409. // CHECK:STDOUT: %F.ref: %J.assoc_type = name_ref F, @J.%assoc1 [concrete = constants.%assoc1]
  1410. // CHECK:STDOUT: %T.as_type.loc25: type = facet_access_type constants.%T [symbolic = %T.as_type.loc24_27.2 (constants.%T.as_type)]
  1411. // CHECK:STDOUT: %.loc25_11.1: type = converted constants.%T, %T.as_type.loc25 [symbolic = %T.as_type.loc24_27.2 (constants.%T.as_type)]
  1412. // CHECK:STDOUT: %impl.elem1.loc25_11.1: @GenericCallF.%.loc25_11.2 (%.d43) = impl_witness_access constants.%J.lookup_impl_witness.64628e.2, element1 [symbolic = %impl.elem1.loc25_11.2 (constants.%impl.elem1)]
  1413. // CHECK:STDOUT: %u.ref: @GenericCallF.%impl.elem0.loc24_34.2 (%impl.elem0.11fef0.2) = name_ref u, %u
  1414. // CHECK:STDOUT: %specific_impl_fn.loc25_11.1: <specific function> = specific_impl_function %impl.elem1.loc25_11.1, @F.1(constants.%J.facet.5210a7.2) [symbolic = %specific_impl_fn.loc25_11.2 (constants.%specific_impl_fn)]
  1415. // CHECK:STDOUT: %.loc25_15: init @GenericCallF.%impl.elem0.loc24_34.2 (%impl.elem0.11fef0.2) = call %specific_impl_fn.loc25_11.1(%u.ref)
  1416. // CHECK:STDOUT: %.loc25_16.1: @GenericCallF.%impl.elem0.loc24_34.2 (%impl.elem0.11fef0.2) = value_of_initializer %.loc25_15
  1417. // CHECK:STDOUT: %.loc25_16.2: @GenericCallF.%impl.elem0.loc24_34.2 (%impl.elem0.11fef0.2) = converted %.loc25_15, %.loc25_16.1
  1418. // CHECK:STDOUT: return %.loc25_16.2
  1419. // CHECK:STDOUT: }
  1420. // CHECK:STDOUT: }
  1421. // CHECK:STDOUT:
  1422. // CHECK:STDOUT: fn @CallGeneric(%e.param: %E) -> %i32 {
  1423. // CHECK:STDOUT: !entry:
  1424. // CHECK:STDOUT: %GenericCallF.ref: %GenericCallF.type = name_ref GenericCallF, file.%GenericCallF.decl [concrete = constants.%GenericCallF]
  1425. // CHECK:STDOUT: %e.ref: %E = name_ref e, %e
  1426. // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [concrete = constants.%int_2.ecc]
  1427. // CHECK:STDOUT: %J.facet.loc29_27.1: %J.type = facet_value constants.%E, (constants.%J.impl_witness) [concrete = constants.%J.facet.ee5]
  1428. // CHECK:STDOUT: %.loc29_27.1: %J.type = converted constants.%E, %J.facet.loc29_27.1 [concrete = constants.%J.facet.ee5]
  1429. // CHECK:STDOUT: %J.facet.loc29_27.2: %J.type = facet_value constants.%E, (constants.%J.impl_witness) [concrete = constants.%J.facet.ee5]
  1430. // CHECK:STDOUT: %.loc29_27.2: %J.type = converted constants.%E, %J.facet.loc29_27.2 [concrete = constants.%J.facet.ee5]
  1431. // CHECK:STDOUT: %GenericCallF.specific_fn: <specific function> = specific_function %GenericCallF.ref, @GenericCallF(constants.%J.facet.ee5) [concrete = constants.%GenericCallF.specific_fn]
  1432. // CHECK:STDOUT: %impl.elem0: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956]
  1433. // CHECK:STDOUT: %bound_method.loc29_26.1: <bound method> = bound_method %int_2, %impl.elem0 [concrete = constants.%Convert.bound.ef9]
  1434. // CHECK:STDOUT: %specific_fn: <specific function> = specific_function %impl.elem0, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn]
  1435. // CHECK:STDOUT: %bound_method.loc29_26.2: <bound method> = bound_method %int_2, %specific_fn [concrete = constants.%bound_method.b92]
  1436. // CHECK:STDOUT: %int.convert_checked: init %i32 = call %bound_method.loc29_26.2(%int_2) [concrete = constants.%int_2.ef8]
  1437. // CHECK:STDOUT: %.loc29_26.1: %i32 = value_of_initializer %int.convert_checked [concrete = constants.%int_2.ef8]
  1438. // CHECK:STDOUT: %.loc29_26.2: %i32 = converted %int_2, %.loc29_26.1 [concrete = constants.%int_2.ef8]
  1439. // CHECK:STDOUT: %GenericCallF.call: init %i32 = call %GenericCallF.specific_fn(%e.ref, %.loc29_26.2)
  1440. // CHECK:STDOUT: %.loc29_28.1: %i32 = value_of_initializer %GenericCallF.call
  1441. // CHECK:STDOUT: %.loc29_28.2: %i32 = converted %GenericCallF.call, %.loc29_28.1
  1442. // CHECK:STDOUT: return %.loc29_28.2
  1443. // CHECK:STDOUT: }
  1444. // CHECK:STDOUT:
  1445. // CHECK:STDOUT: specific @U(constants.%Self.ccd) {}
  1446. // CHECK:STDOUT:
  1447. // CHECK:STDOUT: specific @U(constants.%J.facet.5210a7.1) {}
  1448. // CHECK:STDOUT:
  1449. // CHECK:STDOUT: specific @F.1(constants.%Self.ccd) {
  1450. // CHECK:STDOUT: %Self => constants.%Self.ccd
  1451. // CHECK:STDOUT: %J.lookup_impl_witness => constants.%J.lookup_impl_witness.64628e.1
  1452. // CHECK:STDOUT: %impl.elem0.loc5_11.1 => constants.%impl.elem0.11fef0.1
  1453. // CHECK:STDOUT: %pattern_type => constants.%pattern_type.b984e7.1
  1454. // CHECK:STDOUT: }
  1455. // CHECK:STDOUT:
  1456. // CHECK:STDOUT: specific @G.1(constants.%Self.ccd) {
  1457. // CHECK:STDOUT: %Self => constants.%Self.ccd
  1458. // CHECK:STDOUT: %Self.as_type.loc6_14.1 => constants.%Self.as_type.3df
  1459. // CHECK:STDOUT: %pattern_type.loc6_8 => constants.%pattern_type.4ca604.1
  1460. // CHECK:STDOUT: %J.lookup_impl_witness => constants.%J.lookup_impl_witness.64628e.1
  1461. // CHECK:STDOUT: %impl.elem0.loc6_23.1 => constants.%impl.elem0.11fef0.1
  1462. // CHECK:STDOUT: %pattern_type.loc6_20 => constants.%pattern_type.b984e7.1
  1463. // CHECK:STDOUT: }
  1464. // CHECK:STDOUT:
  1465. // CHECK:STDOUT: specific @U(constants.%J.facet.330) {}
  1466. // CHECK:STDOUT:
  1467. // CHECK:STDOUT: specific @F.1(constants.%J.facet.ee5) {
  1468. // CHECK:STDOUT: %Self => constants.%J.facet.ee5
  1469. // CHECK:STDOUT: %J.lookup_impl_witness => constants.%J.impl_witness
  1470. // CHECK:STDOUT: %impl.elem0.loc5_11.1 => constants.%i32
  1471. // CHECK:STDOUT: %pattern_type => constants.%pattern_type.7ce
  1472. // CHECK:STDOUT: }
  1473. // CHECK:STDOUT:
  1474. // CHECK:STDOUT: specific @G.1(constants.%J.facet.ee5) {
  1475. // CHECK:STDOUT: %Self => constants.%J.facet.ee5
  1476. // CHECK:STDOUT: %Self.as_type.loc6_14.1 => constants.%E
  1477. // CHECK:STDOUT: %pattern_type.loc6_8 => constants.%pattern_type.a4a
  1478. // CHECK:STDOUT: %J.lookup_impl_witness => constants.%J.impl_witness
  1479. // CHECK:STDOUT: %impl.elem0.loc6_23.1 => constants.%i32
  1480. // CHECK:STDOUT: %pattern_type.loc6_20 => constants.%pattern_type.7ce
  1481. // CHECK:STDOUT: }
  1482. // CHECK:STDOUT:
  1483. // CHECK:STDOUT: specific @U(constants.%J.facet.5210a7.2) {}
  1484. // CHECK:STDOUT:
  1485. // CHECK:STDOUT: specific @GenericCallF(constants.%T) {
  1486. // CHECK:STDOUT: %T.loc24_17.2 => constants.%T
  1487. // CHECK:STDOUT: %T.as_type.loc24_27.2 => constants.%T.as_type
  1488. // CHECK:STDOUT: %pattern_type.loc24_24 => constants.%pattern_type.4ca604.2
  1489. // CHECK:STDOUT: %J.lookup_impl_witness => constants.%J.lookup_impl_witness.64628e.2
  1490. // CHECK:STDOUT: %impl.elem0.loc24_34.2 => constants.%impl.elem0.11fef0.2
  1491. // CHECK:STDOUT: %pattern_type.loc24_30 => constants.%pattern_type.b984e7.2
  1492. // CHECK:STDOUT: }
  1493. // CHECK:STDOUT:
  1494. // CHECK:STDOUT: specific @F.1(constants.%J.facet.5210a7.2) {
  1495. // CHECK:STDOUT: %Self => constants.%J.facet.5210a7.2
  1496. // CHECK:STDOUT: %J.lookup_impl_witness => constants.%J.lookup_impl_witness.64628e.2
  1497. // CHECK:STDOUT: %impl.elem0.loc5_11.1 => constants.%impl.elem0.11fef0.2
  1498. // CHECK:STDOUT: %pattern_type => constants.%pattern_type.b984e7.2
  1499. // CHECK:STDOUT: }
  1500. // CHECK:STDOUT:
  1501. // CHECK:STDOUT: specific @GenericCallF(constants.%J.facet.ee5) {
  1502. // CHECK:STDOUT: %T.loc24_17.2 => constants.%J.facet.ee5
  1503. // CHECK:STDOUT: %T.as_type.loc24_27.2 => constants.%E
  1504. // CHECK:STDOUT: %pattern_type.loc24_24 => constants.%pattern_type.a4a
  1505. // CHECK:STDOUT: %J.lookup_impl_witness => constants.%J.impl_witness
  1506. // CHECK:STDOUT: %impl.elem0.loc24_34.2 => constants.%i32
  1507. // CHECK:STDOUT: %pattern_type.loc24_30 => constants.%pattern_type.7ce
  1508. // CHECK:STDOUT:
  1509. // CHECK:STDOUT: !definition:
  1510. // CHECK:STDOUT: %require_complete.loc24_38 => constants.%complete_type.f8a
  1511. // CHECK:STDOUT: %require_complete.loc24_25 => constants.%complete_type.357
  1512. // CHECK:STDOUT: %J.facet => constants.%J.facet.ee5
  1513. // CHECK:STDOUT: %.loc25_11.2 => constants.%.29b
  1514. // CHECK:STDOUT: %impl.elem1.loc25_11.2 => constants.%F.b07
  1515. // CHECK:STDOUT: %specific_impl_fn.loc25_11.2 => constants.%F.b07
  1516. // CHECK:STDOUT: }
  1517. // CHECK:STDOUT:
  1518. // CHECK:STDOUT: --- use_constraint_on_associated_type.carbon
  1519. // CHECK:STDOUT:
  1520. // CHECK:STDOUT: constants {
  1521. // CHECK:STDOUT: %J.type: type = facet_type <@J> [concrete]
  1522. // CHECK:STDOUT: %Self.ccd: %J.type = bind_symbolic_name Self, 0 [symbolic]
  1523. // CHECK:STDOUT: %Add.type: type = facet_type <@Add> [concrete]
  1524. // CHECK:STDOUT: %J.assoc_type: type = assoc_entity_type @J [concrete]
  1525. // CHECK:STDOUT: %assoc0.304: %J.assoc_type = assoc_entity element0, @J.%U [concrete]
  1526. // CHECK:STDOUT: %Self.as_type.3df: type = facet_access_type %Self.ccd [symbolic]
  1527. // CHECK:STDOUT: %J.lookup_impl_witness.64628e.1: <witness> = lookup_impl_witness %Self.ccd, @J [symbolic]
  1528. // CHECK:STDOUT: %J.facet.5210a7.1: %J.type = facet_value %Self.as_type.3df, (%J.lookup_impl_witness.64628e.1) [symbolic]
  1529. // CHECK:STDOUT: %impl.elem0.9980b1.1: %Add.type = impl_witness_access %J.lookup_impl_witness.64628e.1, element0 [symbolic]
  1530. // CHECK:STDOUT: %as_type.1a19b2.1: type = facet_access_type %impl.elem0.9980b1.1 [symbolic]
  1531. // CHECK:STDOUT: %pattern_type.aea692.1: type = pattern_type %as_type.1a19b2.1 [symbolic]
  1532. // CHECK:STDOUT: %F.type: type = fn_type @F [concrete]
  1533. // CHECK:STDOUT: %F: %F.type = struct_value () [concrete]
  1534. // CHECK:STDOUT: %assoc1: %J.assoc_type = assoc_entity element1, @J.%F.decl [concrete]
  1535. // CHECK:STDOUT: %T: %J.type = bind_symbolic_name T, 0 [symbolic]
  1536. // CHECK:STDOUT: %pattern_type.28e: type = pattern_type %J.type [concrete]
  1537. // CHECK:STDOUT: %T.as_type: type = facet_access_type %T [symbolic]
  1538. // CHECK:STDOUT: %pattern_type.4ca: type = pattern_type %T.as_type [symbolic]
  1539. // CHECK:STDOUT: %J.lookup_impl_witness.64628e.2: <witness> = lookup_impl_witness %T, @J [symbolic]
  1540. // CHECK:STDOUT: %J.facet.5210a7.2: %J.type = facet_value %T.as_type, (%J.lookup_impl_witness.64628e.2) [symbolic]
  1541. // CHECK:STDOUT: %impl.elem0.9980b1.2: %Add.type = impl_witness_access %J.lookup_impl_witness.64628e.2, element0 [symbolic]
  1542. // CHECK:STDOUT: %as_type.1a19b2.2: type = facet_access_type %impl.elem0.9980b1.2 [symbolic]
  1543. // CHECK:STDOUT: %pattern_type.aea692.2: type = pattern_type %as_type.1a19b2.2 [symbolic]
  1544. // CHECK:STDOUT: %GenericAddResult.type: type = fn_type @GenericAddResult [concrete]
  1545. // CHECK:STDOUT: %GenericAddResult: %GenericAddResult.type = struct_value () [concrete]
  1546. // CHECK:STDOUT: %require_complete.9b6: <witness> = require_complete_type %as_type.1a19b2.2 [symbolic]
  1547. // CHECK:STDOUT: %require_complete.2a5: <witness> = require_complete_type %T.as_type [symbolic]
  1548. // CHECK:STDOUT: %.d43: type = fn_type_with_self_type %F.type, %J.facet.5210a7.2 [symbolic]
  1549. // CHECK:STDOUT: %impl.elem1: %.d43 = impl_witness_access %J.lookup_impl_witness.64628e.2, element1 [symbolic]
  1550. // CHECK:STDOUT: %specific_impl_fn.fe8: <specific function> = specific_impl_function %impl.elem1, @F(%J.facet.5210a7.2) [symbolic]
  1551. // CHECK:STDOUT: %Op.type: type = fn_type @Op [concrete]
  1552. // CHECK:STDOUT: %Add.lookup_impl_witness: <witness> = lookup_impl_witness %impl.elem0.9980b1.2, @Add [symbolic]
  1553. // CHECK:STDOUT: %Add.facet: %Add.type = facet_value %as_type.1a19b2.2, (%Add.lookup_impl_witness) [symbolic]
  1554. // CHECK:STDOUT: %.59f: type = fn_type_with_self_type %Op.type, %Add.facet [symbolic]
  1555. // CHECK:STDOUT: %impl.elem0.5fb: %.59f = impl_witness_access %Add.lookup_impl_witness, element0 [symbolic]
  1556. // CHECK:STDOUT: %specific_impl_fn.015: <specific function> = specific_impl_function %impl.elem0.5fb, @Op(%Add.facet) [symbolic]
  1557. // CHECK:STDOUT: }
  1558. // CHECK:STDOUT:
  1559. // CHECK:STDOUT: imports {
  1560. // CHECK:STDOUT: %Core: <namespace> = namespace file.%Core.import, [concrete] {
  1561. // CHECK:STDOUT: .Add = %Core.Add
  1562. // CHECK:STDOUT: import Core//prelude
  1563. // CHECK:STDOUT: import Core//prelude/...
  1564. // CHECK:STDOUT: }
  1565. // CHECK:STDOUT: %Core.Add: type = import_ref Core//prelude/operators/arithmetic, Add, loaded [concrete = constants.%Add.type]
  1566. // CHECK:STDOUT: }
  1567. // CHECK:STDOUT:
  1568. // CHECK:STDOUT: file {
  1569. // CHECK:STDOUT: package: <namespace> = namespace [concrete] {
  1570. // CHECK:STDOUT: .Core = imports.%Core
  1571. // CHECK:STDOUT: .J = %J.decl
  1572. // CHECK:STDOUT: .GenericAddResult = %GenericAddResult.decl
  1573. // CHECK:STDOUT: }
  1574. // CHECK:STDOUT: %Core.import = import Core
  1575. // CHECK:STDOUT: %J.decl: type = interface_decl @J [concrete = constants.%J.type] {} {}
  1576. // CHECK:STDOUT: %GenericAddResult.decl: %GenericAddResult.type = fn_decl @GenericAddResult [concrete = constants.%GenericAddResult] {
  1577. // CHECK:STDOUT: %T.patt: %pattern_type.28e = symbolic_binding_pattern T, 0 [concrete]
  1578. // CHECK:STDOUT: %t.patt: @GenericAddResult.%pattern_type.loc8_28 (%pattern_type.4ca) = binding_pattern t [concrete]
  1579. // CHECK:STDOUT: %t.param_patt: @GenericAddResult.%pattern_type.loc8_28 (%pattern_type.4ca) = value_param_pattern %t.patt, call_param0 [concrete]
  1580. // CHECK:STDOUT: %u.patt: @GenericAddResult.%pattern_type.loc8_34 (%pattern_type.aea692.2) = binding_pattern u [concrete]
  1581. // CHECK:STDOUT: %u.param_patt: @GenericAddResult.%pattern_type.loc8_34 (%pattern_type.aea692.2) = value_param_pattern %u.patt, call_param1 [concrete]
  1582. // CHECK:STDOUT: %return.patt: @GenericAddResult.%pattern_type.loc8_34 (%pattern_type.aea692.2) = return_slot_pattern [concrete]
  1583. // CHECK:STDOUT: %return.param_patt: @GenericAddResult.%pattern_type.loc8_34 (%pattern_type.aea692.2) = out_param_pattern %return.patt, call_param2 [concrete]
  1584. // CHECK:STDOUT: } {
  1585. // CHECK:STDOUT: %T.ref.loc8_45: %J.type = name_ref T, %T.loc8_21.1 [symbolic = %T.loc8_21.2 (constants.%T)]
  1586. // CHECK:STDOUT: %U.ref.loc8_46: %J.assoc_type = name_ref U, @U.%assoc0 [concrete = constants.%assoc0.304]
  1587. // CHECK:STDOUT: %T.as_type.loc8_46: type = facet_access_type %T.ref.loc8_45 [symbolic = %T.as_type.loc8_31.2 (constants.%T.as_type)]
  1588. // CHECK:STDOUT: %.loc8_46.1: type = converted %T.ref.loc8_45, %T.as_type.loc8_46 [symbolic = %T.as_type.loc8_31.2 (constants.%T.as_type)]
  1589. // CHECK:STDOUT: %impl.elem0.loc8_46: %Add.type = impl_witness_access constants.%J.lookup_impl_witness.64628e.2, element0 [symbolic = %impl.elem0.loc8_38.2 (constants.%impl.elem0.9980b1.2)]
  1590. // CHECK:STDOUT: %as_type.loc8_46: type = facet_access_type %impl.elem0.loc8_46 [symbolic = %as_type.loc8_38.2 (constants.%as_type.1a19b2.2)]
  1591. // CHECK:STDOUT: %.loc8_46.2: type = converted %impl.elem0.loc8_46, %as_type.loc8_46 [symbolic = %as_type.loc8_38.2 (constants.%as_type.1a19b2.2)]
  1592. // CHECK:STDOUT: %J.ref: type = name_ref J, file.%J.decl [concrete = constants.%J.type]
  1593. // CHECK:STDOUT: %T.loc8_21.1: %J.type = bind_symbolic_name T, 0 [symbolic = %T.loc8_21.2 (constants.%T)]
  1594. // CHECK:STDOUT: %t.param: @GenericAddResult.%T.as_type.loc8_31.2 (%T.as_type) = value_param call_param0
  1595. // CHECK:STDOUT: %.loc8_31.1: type = splice_block %.loc8_31.2 [symbolic = %T.as_type.loc8_31.2 (constants.%T.as_type)] {
  1596. // CHECK:STDOUT: %T.ref.loc8_31: %J.type = name_ref T, %T.loc8_21.1 [symbolic = %T.loc8_21.2 (constants.%T)]
  1597. // CHECK:STDOUT: %T.as_type.loc8_31.1: type = facet_access_type %T.ref.loc8_31 [symbolic = %T.as_type.loc8_31.2 (constants.%T.as_type)]
  1598. // CHECK:STDOUT: %.loc8_31.2: type = converted %T.ref.loc8_31, %T.as_type.loc8_31.1 [symbolic = %T.as_type.loc8_31.2 (constants.%T.as_type)]
  1599. // CHECK:STDOUT: }
  1600. // CHECK:STDOUT: %t: @GenericAddResult.%T.as_type.loc8_31.2 (%T.as_type) = bind_name t, %t.param
  1601. // CHECK:STDOUT: %u.param: @GenericAddResult.%as_type.loc8_38.2 (%as_type.1a19b2.2) = value_param call_param1
  1602. // CHECK:STDOUT: %.loc8_38.1: type = splice_block %.loc8_38.3 [symbolic = %as_type.loc8_38.2 (constants.%as_type.1a19b2.2)] {
  1603. // CHECK:STDOUT: %T.ref.loc8_37: %J.type = name_ref T, %T.loc8_21.1 [symbolic = %T.loc8_21.2 (constants.%T)]
  1604. // CHECK:STDOUT: %U.ref.loc8_38: %J.assoc_type = name_ref U, @U.%assoc0 [concrete = constants.%assoc0.304]
  1605. // CHECK:STDOUT: %T.as_type.loc8_38: type = facet_access_type %T.ref.loc8_37 [symbolic = %T.as_type.loc8_31.2 (constants.%T.as_type)]
  1606. // CHECK:STDOUT: %.loc8_38.2: type = converted %T.ref.loc8_37, %T.as_type.loc8_38 [symbolic = %T.as_type.loc8_31.2 (constants.%T.as_type)]
  1607. // CHECK:STDOUT: %impl.elem0.loc8_38.1: %Add.type = impl_witness_access constants.%J.lookup_impl_witness.64628e.2, element0 [symbolic = %impl.elem0.loc8_38.2 (constants.%impl.elem0.9980b1.2)]
  1608. // CHECK:STDOUT: %as_type.loc8_38.1: type = facet_access_type %impl.elem0.loc8_38.1 [symbolic = %as_type.loc8_38.2 (constants.%as_type.1a19b2.2)]
  1609. // CHECK:STDOUT: %.loc8_38.3: type = converted %impl.elem0.loc8_38.1, %as_type.loc8_38.1 [symbolic = %as_type.loc8_38.2 (constants.%as_type.1a19b2.2)]
  1610. // CHECK:STDOUT: }
  1611. // CHECK:STDOUT: %u: @GenericAddResult.%as_type.loc8_38.2 (%as_type.1a19b2.2) = bind_name u, %u.param
  1612. // CHECK:STDOUT: %return.param: ref @GenericAddResult.%as_type.loc8_38.2 (%as_type.1a19b2.2) = out_param call_param2
  1613. // CHECK:STDOUT: %return: ref @GenericAddResult.%as_type.loc8_38.2 (%as_type.1a19b2.2) = return_slot %return.param
  1614. // CHECK:STDOUT: }
  1615. // CHECK:STDOUT: }
  1616. // CHECK:STDOUT:
  1617. // CHECK:STDOUT: interface @J {
  1618. // CHECK:STDOUT: %Self: %J.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self.ccd]
  1619. // CHECK:STDOUT: %U: %Add.type = assoc_const_decl @U [concrete] {
  1620. // CHECK:STDOUT: %assoc0: %J.assoc_type = assoc_entity element0, @J.%U [concrete = constants.%assoc0.304]
  1621. // CHECK:STDOUT: }
  1622. // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [concrete = constants.%F] {
  1623. // CHECK:STDOUT: %u.patt: @F.%pattern_type (%pattern_type.aea692.1) = binding_pattern u [concrete]
  1624. // CHECK:STDOUT: %u.param_patt: @F.%pattern_type (%pattern_type.aea692.1) = value_param_pattern %u.patt, call_param0 [concrete]
  1625. // CHECK:STDOUT: %return.patt: @F.%pattern_type (%pattern_type.aea692.1) = return_slot_pattern [concrete]
  1626. // CHECK:STDOUT: %return.param_patt: @F.%pattern_type (%pattern_type.aea692.1) = out_param_pattern %return.patt, call_param1 [concrete]
  1627. // CHECK:STDOUT: } {
  1628. // CHECK:STDOUT: %impl.elem0.loc5_17: %Add.type = impl_witness_access constants.%J.lookup_impl_witness.64628e.1, element0 [symbolic = %impl.elem0.loc5_11.1 (constants.%impl.elem0.9980b1.1)]
  1629. // CHECK:STDOUT: %U.ref.loc5_17: %Add.type = name_ref U, %impl.elem0.loc5_17 [symbolic = %impl.elem0.loc5_11.1 (constants.%impl.elem0.9980b1.1)]
  1630. // CHECK:STDOUT: %U.as_type.loc5_17: type = facet_access_type %U.ref.loc5_17 [symbolic = %as_type (constants.%as_type.1a19b2.1)]
  1631. // CHECK:STDOUT: %.loc5_17: type = converted %U.ref.loc5_17, %U.as_type.loc5_17 [symbolic = %as_type (constants.%as_type.1a19b2.1)]
  1632. // CHECK:STDOUT: %u.param: @F.%as_type (%as_type.1a19b2.1) = value_param call_param0
  1633. // CHECK:STDOUT: %.loc5_11.1: type = splice_block %.loc5_11.2 [symbolic = %as_type (constants.%as_type.1a19b2.1)] {
  1634. // CHECK:STDOUT: %impl.elem0.loc5_11.2: %Add.type = impl_witness_access constants.%J.lookup_impl_witness.64628e.1, element0 [symbolic = %impl.elem0.loc5_11.1 (constants.%impl.elem0.9980b1.1)]
  1635. // CHECK:STDOUT: %U.ref.loc5_11: %Add.type = name_ref U, %impl.elem0.loc5_11.2 [symbolic = %impl.elem0.loc5_11.1 (constants.%impl.elem0.9980b1.1)]
  1636. // CHECK:STDOUT: %U.as_type.loc5_11: type = facet_access_type %U.ref.loc5_11 [symbolic = %as_type (constants.%as_type.1a19b2.1)]
  1637. // CHECK:STDOUT: %.loc5_11.2: type = converted %U.ref.loc5_11, %U.as_type.loc5_11 [symbolic = %as_type (constants.%as_type.1a19b2.1)]
  1638. // CHECK:STDOUT: }
  1639. // CHECK:STDOUT: %u: @F.%as_type (%as_type.1a19b2.1) = bind_name u, %u.param
  1640. // CHECK:STDOUT: %return.param: ref @F.%as_type (%as_type.1a19b2.1) = out_param call_param1
  1641. // CHECK:STDOUT: %return: ref @F.%as_type (%as_type.1a19b2.1) = return_slot %return.param
  1642. // CHECK:STDOUT: }
  1643. // CHECK:STDOUT: %assoc1: %J.assoc_type = assoc_entity element1, %F.decl [concrete = constants.%assoc1]
  1644. // CHECK:STDOUT:
  1645. // CHECK:STDOUT: !members:
  1646. // CHECK:STDOUT: .Self = %Self
  1647. // CHECK:STDOUT: .U = @U.%assoc0
  1648. // CHECK:STDOUT: .F = %assoc1
  1649. // CHECK:STDOUT: witness = (%U, %F.decl)
  1650. // CHECK:STDOUT: }
  1651. // CHECK:STDOUT:
  1652. // CHECK:STDOUT: generic assoc_const @U(@J.%Self: %J.type) {
  1653. // CHECK:STDOUT: assoc_const U:! %Add.type;
  1654. // CHECK:STDOUT: }
  1655. // CHECK:STDOUT:
  1656. // CHECK:STDOUT: generic fn @F(@J.%Self: %J.type) {
  1657. // CHECK:STDOUT: %Self: %J.type = bind_symbolic_name Self, 0 [symbolic = %Self (constants.%Self.ccd)]
  1658. // CHECK:STDOUT: %J.lookup_impl_witness: <witness> = lookup_impl_witness %Self, @J [symbolic = %J.lookup_impl_witness (constants.%J.lookup_impl_witness.64628e.1)]
  1659. // CHECK:STDOUT: %impl.elem0.loc5_11.1: %Add.type = impl_witness_access %J.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc5_11.1 (constants.%impl.elem0.9980b1.1)]
  1660. // CHECK:STDOUT: %as_type: type = facet_access_type %impl.elem0.loc5_11.1 [symbolic = %as_type (constants.%as_type.1a19b2.1)]
  1661. // CHECK:STDOUT: %pattern_type: type = pattern_type %as_type [symbolic = %pattern_type (constants.%pattern_type.aea692.1)]
  1662. // CHECK:STDOUT:
  1663. // CHECK:STDOUT: fn(%u.param: @F.%as_type (%as_type.1a19b2.1)) -> @F.%as_type (%as_type.1a19b2.1);
  1664. // CHECK:STDOUT: }
  1665. // CHECK:STDOUT:
  1666. // CHECK:STDOUT: generic fn @GenericAddResult(%T.loc8_21.1: %J.type) {
  1667. // CHECK:STDOUT: %T.loc8_21.2: %J.type = bind_symbolic_name T, 0 [symbolic = %T.loc8_21.2 (constants.%T)]
  1668. // CHECK:STDOUT: %T.as_type.loc8_31.2: type = facet_access_type %T.loc8_21.2 [symbolic = %T.as_type.loc8_31.2 (constants.%T.as_type)]
  1669. // CHECK:STDOUT: %pattern_type.loc8_28: type = pattern_type %T.as_type.loc8_31.2 [symbolic = %pattern_type.loc8_28 (constants.%pattern_type.4ca)]
  1670. // CHECK:STDOUT: %J.lookup_impl_witness: <witness> = lookup_impl_witness %T.loc8_21.2, @J [symbolic = %J.lookup_impl_witness (constants.%J.lookup_impl_witness.64628e.2)]
  1671. // CHECK:STDOUT: %impl.elem0.loc8_38.2: %Add.type = impl_witness_access %J.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc8_38.2 (constants.%impl.elem0.9980b1.2)]
  1672. // CHECK:STDOUT: %as_type.loc8_38.2: type = facet_access_type %impl.elem0.loc8_38.2 [symbolic = %as_type.loc8_38.2 (constants.%as_type.1a19b2.2)]
  1673. // CHECK:STDOUT: %pattern_type.loc8_34: type = pattern_type %as_type.loc8_38.2 [symbolic = %pattern_type.loc8_34 (constants.%pattern_type.aea692.2)]
  1674. // CHECK:STDOUT:
  1675. // CHECK:STDOUT: !definition:
  1676. // CHECK:STDOUT: %require_complete.loc8_42: <witness> = require_complete_type %as_type.loc8_38.2 [symbolic = %require_complete.loc8_42 (constants.%require_complete.9b6)]
  1677. // CHECK:STDOUT: %require_complete.loc8_29: <witness> = require_complete_type %T.as_type.loc8_31.2 [symbolic = %require_complete.loc8_29 (constants.%require_complete.2a5)]
  1678. // CHECK:STDOUT: %J.facet: %J.type = facet_value %T.as_type.loc8_31.2, (%J.lookup_impl_witness) [symbolic = %J.facet (constants.%J.facet.5210a7.2)]
  1679. // CHECK:STDOUT: %.loc9_11.2: type = fn_type_with_self_type constants.%F.type, %J.facet [symbolic = %.loc9_11.2 (constants.%.d43)]
  1680. // CHECK:STDOUT: %impl.elem1.loc9_11.2: @GenericAddResult.%.loc9_11.2 (%.d43) = impl_witness_access %J.lookup_impl_witness, element1 [symbolic = %impl.elem1.loc9_11.2 (constants.%impl.elem1)]
  1681. // CHECK:STDOUT: %specific_impl_fn.loc9_11.2: <specific function> = specific_impl_function %impl.elem1.loc9_11.2, @F(%J.facet) [symbolic = %specific_impl_fn.loc9_11.2 (constants.%specific_impl_fn.fe8)]
  1682. // CHECK:STDOUT: %Add.lookup_impl_witness: <witness> = lookup_impl_witness %impl.elem0.loc8_38.2, @Add [symbolic = %Add.lookup_impl_witness (constants.%Add.lookup_impl_witness)]
  1683. // CHECK:STDOUT: %Add.facet: %Add.type = facet_value %as_type.loc8_38.2, (%Add.lookup_impl_witness) [symbolic = %Add.facet (constants.%Add.facet)]
  1684. // CHECK:STDOUT: %.loc9_17.4: type = fn_type_with_self_type constants.%Op.type, %Add.facet [symbolic = %.loc9_17.4 (constants.%.59f)]
  1685. // CHECK:STDOUT: %impl.elem0.loc9_17.2: @GenericAddResult.%.loc9_17.4 (%.59f) = impl_witness_access %Add.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc9_17.2 (constants.%impl.elem0.5fb)]
  1686. // CHECK:STDOUT: %specific_impl_fn.loc9_17.2: <specific function> = specific_impl_function %impl.elem0.loc9_17.2, @Op(%Add.facet) [symbolic = %specific_impl_fn.loc9_17.2 (constants.%specific_impl_fn.015)]
  1687. // CHECK:STDOUT:
  1688. // CHECK:STDOUT: fn(%t.param: @GenericAddResult.%T.as_type.loc8_31.2 (%T.as_type), %u.param: @GenericAddResult.%as_type.loc8_38.2 (%as_type.1a19b2.2)) -> @GenericAddResult.%as_type.loc8_38.2 (%as_type.1a19b2.2) {
  1689. // CHECK:STDOUT: !entry:
  1690. // CHECK:STDOUT: %t.ref: @GenericAddResult.%T.as_type.loc8_31.2 (%T.as_type) = name_ref t, %t
  1691. // CHECK:STDOUT: %F.ref.loc9_11: %J.assoc_type = name_ref F, @J.%assoc1 [concrete = constants.%assoc1]
  1692. // CHECK:STDOUT: %T.as_type.loc9_11: type = facet_access_type constants.%T [symbolic = %T.as_type.loc8_31.2 (constants.%T.as_type)]
  1693. // CHECK:STDOUT: %.loc9_11.1: type = converted constants.%T, %T.as_type.loc9_11 [symbolic = %T.as_type.loc8_31.2 (constants.%T.as_type)]
  1694. // CHECK:STDOUT: %impl.elem1.loc9_11.1: @GenericAddResult.%.loc9_11.2 (%.d43) = impl_witness_access constants.%J.lookup_impl_witness.64628e.2, element1 [symbolic = %impl.elem1.loc9_11.2 (constants.%impl.elem1)]
  1695. // CHECK:STDOUT: %u.ref.loc9_14: @GenericAddResult.%as_type.loc8_38.2 (%as_type.1a19b2.2) = name_ref u, %u
  1696. // CHECK:STDOUT: %.loc9_15.1: %Add.type = converted constants.%as_type.1a19b2.2, constants.%impl.elem0.9980b1.2 [symbolic = %impl.elem0.loc8_38.2 (constants.%impl.elem0.9980b1.2)]
  1697. // CHECK:STDOUT: %.loc9_15.2: %Add.type = converted constants.%as_type.1a19b2.2, constants.%impl.elem0.9980b1.2 [symbolic = %impl.elem0.loc8_38.2 (constants.%impl.elem0.9980b1.2)]
  1698. // CHECK:STDOUT: %specific_impl_fn.loc9_11.1: <specific function> = specific_impl_function %impl.elem1.loc9_11.1, @F(constants.%J.facet.5210a7.2) [symbolic = %specific_impl_fn.loc9_11.2 (constants.%specific_impl_fn.fe8)]
  1699. // CHECK:STDOUT: %.loc9_15.3: init @GenericAddResult.%as_type.loc8_38.2 (%as_type.1a19b2.2) = call %specific_impl_fn.loc9_11.1(%u.ref.loc9_14)
  1700. // CHECK:STDOUT: %T.ref.loc9: %J.type = name_ref T, %T.loc8_21.1 [symbolic = %T.loc8_21.2 (constants.%T)]
  1701. // CHECK:STDOUT: %F.ref.loc9_20: %J.assoc_type = name_ref F, @J.%assoc1 [concrete = constants.%assoc1]
  1702. // CHECK:STDOUT: %T.as_type.loc9_20: type = facet_access_type %T.ref.loc9 [symbolic = %T.as_type.loc8_31.2 (constants.%T.as_type)]
  1703. // CHECK:STDOUT: %.loc9_20: type = converted %T.ref.loc9, %T.as_type.loc9_20 [symbolic = %T.as_type.loc8_31.2 (constants.%T.as_type)]
  1704. // CHECK:STDOUT: %impl.elem1.loc9_20: @GenericAddResult.%.loc9_11.2 (%.d43) = impl_witness_access constants.%J.lookup_impl_witness.64628e.2, element1 [symbolic = %impl.elem1.loc9_11.2 (constants.%impl.elem1)]
  1705. // CHECK:STDOUT: %u.ref.loc9_23: @GenericAddResult.%as_type.loc8_38.2 (%as_type.1a19b2.2) = name_ref u, %u
  1706. // CHECK:STDOUT: %.loc9_24.1: %Add.type = converted constants.%as_type.1a19b2.2, constants.%impl.elem0.9980b1.2 [symbolic = %impl.elem0.loc8_38.2 (constants.%impl.elem0.9980b1.2)]
  1707. // CHECK:STDOUT: %.loc9_24.2: %Add.type = converted constants.%as_type.1a19b2.2, constants.%impl.elem0.9980b1.2 [symbolic = %impl.elem0.loc8_38.2 (constants.%impl.elem0.9980b1.2)]
  1708. // CHECK:STDOUT: %specific_impl_fn.loc9_20: <specific function> = specific_impl_function %impl.elem1.loc9_20, @F(constants.%J.facet.5210a7.2) [symbolic = %specific_impl_fn.loc9_11.2 (constants.%specific_impl_fn.fe8)]
  1709. // CHECK:STDOUT: %.loc9_24.3: init @GenericAddResult.%as_type.loc8_38.2 (%as_type.1a19b2.2) = call %specific_impl_fn.loc9_20(%u.ref.loc9_23)
  1710. // CHECK:STDOUT: %impl.elem0.loc9_17.1: @GenericAddResult.%.loc9_17.4 (%.59f) = impl_witness_access constants.%Add.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc9_17.2 (constants.%impl.elem0.5fb)]
  1711. // CHECK:STDOUT: %bound_method.loc9_17.1: <bound method> = bound_method %.loc9_15.3, %impl.elem0.loc9_17.1
  1712. // CHECK:STDOUT: %.loc9_17.1: %Add.type = converted constants.%as_type.1a19b2.2, constants.%impl.elem0.9980b1.2 [symbolic = %impl.elem0.loc8_38.2 (constants.%impl.elem0.9980b1.2)]
  1713. // CHECK:STDOUT: %.loc9_17.2: %Add.type = converted constants.%as_type.1a19b2.2, constants.%impl.elem0.9980b1.2 [symbolic = %impl.elem0.loc8_38.2 (constants.%impl.elem0.9980b1.2)]
  1714. // CHECK:STDOUT: %specific_impl_fn.loc9_17.1: <specific function> = specific_impl_function %impl.elem0.loc9_17.1, @Op(constants.%Add.facet) [symbolic = %specific_impl_fn.loc9_17.2 (constants.%specific_impl_fn.015)]
  1715. // CHECK:STDOUT: %bound_method.loc9_17.2: <bound method> = bound_method %.loc9_15.3, %specific_impl_fn.loc9_17.1
  1716. // CHECK:STDOUT: %.loc9_15.4: @GenericAddResult.%as_type.loc8_38.2 (%as_type.1a19b2.2) = value_of_initializer %.loc9_15.3
  1717. // CHECK:STDOUT: %.loc9_15.5: @GenericAddResult.%as_type.loc8_38.2 (%as_type.1a19b2.2) = converted %.loc9_15.3, %.loc9_15.4
  1718. // CHECK:STDOUT: %.loc9_24.4: @GenericAddResult.%as_type.loc8_38.2 (%as_type.1a19b2.2) = value_of_initializer %.loc9_24.3
  1719. // CHECK:STDOUT: %.loc9_24.5: @GenericAddResult.%as_type.loc8_38.2 (%as_type.1a19b2.2) = converted %.loc9_24.3, %.loc9_24.4
  1720. // CHECK:STDOUT: %.loc9_17.3: init @GenericAddResult.%as_type.loc8_38.2 (%as_type.1a19b2.2) = call %bound_method.loc9_17.2(%.loc9_15.5, %.loc9_24.5)
  1721. // CHECK:STDOUT: %.loc9_25.1: @GenericAddResult.%as_type.loc8_38.2 (%as_type.1a19b2.2) = value_of_initializer %.loc9_17.3
  1722. // CHECK:STDOUT: %.loc9_25.2: @GenericAddResult.%as_type.loc8_38.2 (%as_type.1a19b2.2) = converted %.loc9_17.3, %.loc9_25.1
  1723. // CHECK:STDOUT: return %.loc9_25.2
  1724. // CHECK:STDOUT: }
  1725. // CHECK:STDOUT: }
  1726. // CHECK:STDOUT:
  1727. // CHECK:STDOUT: specific @U(constants.%Self.ccd) {}
  1728. // CHECK:STDOUT:
  1729. // CHECK:STDOUT: specific @U(constants.%J.facet.5210a7.1) {}
  1730. // CHECK:STDOUT:
  1731. // CHECK:STDOUT: specific @F(constants.%Self.ccd) {
  1732. // CHECK:STDOUT: %Self => constants.%Self.ccd
  1733. // CHECK:STDOUT: %J.lookup_impl_witness => constants.%J.lookup_impl_witness.64628e.1
  1734. // CHECK:STDOUT: %impl.elem0.loc5_11.1 => constants.%impl.elem0.9980b1.1
  1735. // CHECK:STDOUT: %as_type => constants.%as_type.1a19b2.1
  1736. // CHECK:STDOUT: %pattern_type => constants.%pattern_type.aea692.1
  1737. // CHECK:STDOUT: }
  1738. // CHECK:STDOUT:
  1739. // CHECK:STDOUT: specific @U(constants.%J.facet.5210a7.2) {}
  1740. // CHECK:STDOUT:
  1741. // CHECK:STDOUT: specific @GenericAddResult(constants.%T) {
  1742. // CHECK:STDOUT: %T.loc8_21.2 => constants.%T
  1743. // CHECK:STDOUT: %T.as_type.loc8_31.2 => constants.%T.as_type
  1744. // CHECK:STDOUT: %pattern_type.loc8_28 => constants.%pattern_type.4ca
  1745. // CHECK:STDOUT: %J.lookup_impl_witness => constants.%J.lookup_impl_witness.64628e.2
  1746. // CHECK:STDOUT: %impl.elem0.loc8_38.2 => constants.%impl.elem0.9980b1.2
  1747. // CHECK:STDOUT: %as_type.loc8_38.2 => constants.%as_type.1a19b2.2
  1748. // CHECK:STDOUT: %pattern_type.loc8_34 => constants.%pattern_type.aea692.2
  1749. // CHECK:STDOUT: }
  1750. // CHECK:STDOUT:
  1751. // CHECK:STDOUT: specific @F(constants.%J.facet.5210a7.2) {
  1752. // CHECK:STDOUT: %Self => constants.%J.facet.5210a7.2
  1753. // CHECK:STDOUT: %J.lookup_impl_witness => constants.%J.lookup_impl_witness.64628e.2
  1754. // CHECK:STDOUT: %impl.elem0.loc5_11.1 => constants.%impl.elem0.9980b1.2
  1755. // CHECK:STDOUT: %as_type => constants.%as_type.1a19b2.2
  1756. // CHECK:STDOUT: %pattern_type => constants.%pattern_type.aea692.2
  1757. // CHECK:STDOUT: }
  1758. // CHECK:STDOUT:
  1759. // CHECK:STDOUT: --- interface_qualified.carbon
  1760. // CHECK:STDOUT:
  1761. // CHECK:STDOUT: constants {
  1762. // CHECK:STDOUT: %J.type: type = facet_type <@J> [concrete]
  1763. // CHECK:STDOUT: %Self: %J.type = bind_symbolic_name Self, 0 [symbolic]
  1764. // CHECK:STDOUT: %J.assoc_type: type = assoc_entity_type @J [concrete]
  1765. // CHECK:STDOUT: %assoc0: %J.assoc_type = assoc_entity element0, @J.%U [concrete]
  1766. // CHECK:STDOUT: %Self.as_type: type = facet_access_type %Self [symbolic]
  1767. // CHECK:STDOUT: %pattern_type.4ca604.1: type = pattern_type %Self.as_type [symbolic]
  1768. // CHECK:STDOUT: %J.lookup_impl_witness.64628e.1: <witness> = lookup_impl_witness %Self, @J [symbolic]
  1769. // CHECK:STDOUT: %J.facet.5210a7.1: %J.type = facet_value %Self.as_type, (%J.lookup_impl_witness.64628e.1) [symbolic]
  1770. // CHECK:STDOUT: %impl.elem0.11fef0.1: type = impl_witness_access %J.lookup_impl_witness.64628e.1, element0 [symbolic]
  1771. // CHECK:STDOUT: %pattern_type.b984e7.1: type = pattern_type %impl.elem0.11fef0.1 [symbolic]
  1772. // CHECK:STDOUT: %G.type: type = fn_type @G [concrete]
  1773. // CHECK:STDOUT: %G: %G.type = struct_value () [concrete]
  1774. // CHECK:STDOUT: %assoc1: %J.assoc_type = assoc_entity element1, @J.%G.decl [concrete]
  1775. // CHECK:STDOUT: %T: %J.type = bind_symbolic_name T, 0 [symbolic]
  1776. // CHECK:STDOUT: %pattern_type.28e: type = pattern_type %J.type [concrete]
  1777. // CHECK:STDOUT: %T.as_type: type = facet_access_type %T [symbolic]
  1778. // CHECK:STDOUT: %pattern_type.4ca604.2: type = pattern_type %T.as_type [symbolic]
  1779. // CHECK:STDOUT: %J.lookup_impl_witness.64628e.2: <witness> = lookup_impl_witness %T, @J [symbolic]
  1780. // CHECK:STDOUT: %J.facet.5210a7.2: %J.type = facet_value %T.as_type, (%J.lookup_impl_witness.64628e.2) [symbolic]
  1781. // CHECK:STDOUT: %impl.elem0.11fef0.2: type = impl_witness_access %J.lookup_impl_witness.64628e.2, element0 [symbolic]
  1782. // CHECK:STDOUT: %pattern_type.b984e7.2: type = pattern_type %impl.elem0.11fef0.2 [symbolic]
  1783. // CHECK:STDOUT: %GenericCallInterfaceQualified.type: type = fn_type @GenericCallInterfaceQualified [concrete]
  1784. // CHECK:STDOUT: %GenericCallInterfaceQualified: %GenericCallInterfaceQualified.type = struct_value () [concrete]
  1785. // CHECK:STDOUT: %require_complete.58f: <witness> = require_complete_type %impl.elem0.11fef0.2 [symbolic]
  1786. // CHECK:STDOUT: %require_complete.2a5: <witness> = require_complete_type %T.as_type [symbolic]
  1787. // CHECK:STDOUT: %.442: type = fn_type_with_self_type %G.type, %J.facet.5210a7.2 [symbolic]
  1788. // CHECK:STDOUT: %impl.elem1: %.442 = impl_witness_access %J.lookup_impl_witness.64628e.2, element1 [symbolic]
  1789. // CHECK:STDOUT: %specific_impl_fn: <specific function> = specific_impl_function %impl.elem1, @G(%J.facet.5210a7.2) [symbolic]
  1790. // CHECK:STDOUT: }
  1791. // CHECK:STDOUT:
  1792. // CHECK:STDOUT: imports {
  1793. // CHECK:STDOUT: %Core: <namespace> = namespace file.%Core.import, [concrete] {
  1794. // CHECK:STDOUT: import Core//prelude
  1795. // CHECK:STDOUT: import Core//prelude/...
  1796. // CHECK:STDOUT: }
  1797. // CHECK:STDOUT: }
  1798. // CHECK:STDOUT:
  1799. // CHECK:STDOUT: file {
  1800. // CHECK:STDOUT: package: <namespace> = namespace [concrete] {
  1801. // CHECK:STDOUT: .Core = imports.%Core
  1802. // CHECK:STDOUT: .J = %J.decl
  1803. // CHECK:STDOUT: .GenericCallInterfaceQualified = %GenericCallInterfaceQualified.decl
  1804. // CHECK:STDOUT: }
  1805. // CHECK:STDOUT: %Core.import = import Core
  1806. // CHECK:STDOUT: %J.decl: type = interface_decl @J [concrete = constants.%J.type] {} {}
  1807. // CHECK:STDOUT: %GenericCallInterfaceQualified.decl: %GenericCallInterfaceQualified.type = fn_decl @GenericCallInterfaceQualified [concrete = constants.%GenericCallInterfaceQualified] {
  1808. // CHECK:STDOUT: %T.patt: %pattern_type.28e = symbolic_binding_pattern T, 0 [concrete]
  1809. // CHECK:STDOUT: %t.patt: @GenericCallInterfaceQualified.%pattern_type.loc8_41 (%pattern_type.4ca604.2) = binding_pattern t [concrete]
  1810. // CHECK:STDOUT: %t.param_patt: @GenericCallInterfaceQualified.%pattern_type.loc8_41 (%pattern_type.4ca604.2) = value_param_pattern %t.patt, call_param0 [concrete]
  1811. // CHECK:STDOUT: %u.patt: @GenericCallInterfaceQualified.%pattern_type.loc8_47 (%pattern_type.b984e7.2) = binding_pattern u [concrete]
  1812. // CHECK:STDOUT: %u.param_patt: @GenericCallInterfaceQualified.%pattern_type.loc8_47 (%pattern_type.b984e7.2) = value_param_pattern %u.patt, call_param1 [concrete]
  1813. // CHECK:STDOUT: %return.patt: @GenericCallInterfaceQualified.%pattern_type.loc8_47 (%pattern_type.b984e7.2) = return_slot_pattern [concrete]
  1814. // CHECK:STDOUT: %return.param_patt: @GenericCallInterfaceQualified.%pattern_type.loc8_47 (%pattern_type.b984e7.2) = out_param_pattern %return.patt, call_param2 [concrete]
  1815. // CHECK:STDOUT: } {
  1816. // CHECK:STDOUT: %T.ref.loc8_58: %J.type = name_ref T, %T.loc8_34.1 [symbolic = %T.loc8_34.2 (constants.%T)]
  1817. // CHECK:STDOUT: %U.ref.loc8_59: %J.assoc_type = name_ref U, @U.%assoc0 [concrete = constants.%assoc0]
  1818. // CHECK:STDOUT: %T.as_type.loc8_59: type = facet_access_type %T.ref.loc8_58 [symbolic = %T.as_type.loc8_44.2 (constants.%T.as_type)]
  1819. // CHECK:STDOUT: %.loc8_59: type = converted %T.ref.loc8_58, %T.as_type.loc8_59 [symbolic = %T.as_type.loc8_44.2 (constants.%T.as_type)]
  1820. // CHECK:STDOUT: %impl.elem0.loc8_59: type = impl_witness_access constants.%J.lookup_impl_witness.64628e.2, element0 [symbolic = %impl.elem0.loc8_51.2 (constants.%impl.elem0.11fef0.2)]
  1821. // CHECK:STDOUT: %J.ref.loc8: type = name_ref J, file.%J.decl [concrete = constants.%J.type]
  1822. // CHECK:STDOUT: %T.loc8_34.1: %J.type = bind_symbolic_name T, 0 [symbolic = %T.loc8_34.2 (constants.%T)]
  1823. // CHECK:STDOUT: %t.param: @GenericCallInterfaceQualified.%T.as_type.loc8_44.2 (%T.as_type) = value_param call_param0
  1824. // CHECK:STDOUT: %.loc8_44.1: type = splice_block %.loc8_44.2 [symbolic = %T.as_type.loc8_44.2 (constants.%T.as_type)] {
  1825. // CHECK:STDOUT: %T.ref.loc8_44: %J.type = name_ref T, %T.loc8_34.1 [symbolic = %T.loc8_34.2 (constants.%T)]
  1826. // CHECK:STDOUT: %T.as_type.loc8_44.1: type = facet_access_type %T.ref.loc8_44 [symbolic = %T.as_type.loc8_44.2 (constants.%T.as_type)]
  1827. // CHECK:STDOUT: %.loc8_44.2: type = converted %T.ref.loc8_44, %T.as_type.loc8_44.1 [symbolic = %T.as_type.loc8_44.2 (constants.%T.as_type)]
  1828. // CHECK:STDOUT: }
  1829. // CHECK:STDOUT: %t: @GenericCallInterfaceQualified.%T.as_type.loc8_44.2 (%T.as_type) = bind_name t, %t.param
  1830. // CHECK:STDOUT: %u.param: @GenericCallInterfaceQualified.%impl.elem0.loc8_51.2 (%impl.elem0.11fef0.2) = value_param call_param1
  1831. // CHECK:STDOUT: %.loc8_51.1: type = splice_block %impl.elem0.loc8_51.1 [symbolic = %impl.elem0.loc8_51.2 (constants.%impl.elem0.11fef0.2)] {
  1832. // CHECK:STDOUT: %T.ref.loc8_50: %J.type = name_ref T, %T.loc8_34.1 [symbolic = %T.loc8_34.2 (constants.%T)]
  1833. // CHECK:STDOUT: %U.ref.loc8_51: %J.assoc_type = name_ref U, @U.%assoc0 [concrete = constants.%assoc0]
  1834. // CHECK:STDOUT: %T.as_type.loc8_51: type = facet_access_type %T.ref.loc8_50 [symbolic = %T.as_type.loc8_44.2 (constants.%T.as_type)]
  1835. // CHECK:STDOUT: %.loc8_51.2: type = converted %T.ref.loc8_50, %T.as_type.loc8_51 [symbolic = %T.as_type.loc8_44.2 (constants.%T.as_type)]
  1836. // CHECK:STDOUT: %impl.elem0.loc8_51.1: type = impl_witness_access constants.%J.lookup_impl_witness.64628e.2, element0 [symbolic = %impl.elem0.loc8_51.2 (constants.%impl.elem0.11fef0.2)]
  1837. // CHECK:STDOUT: }
  1838. // CHECK:STDOUT: %u: @GenericCallInterfaceQualified.%impl.elem0.loc8_51.2 (%impl.elem0.11fef0.2) = bind_name u, %u.param
  1839. // CHECK:STDOUT: %return.param: ref @GenericCallInterfaceQualified.%impl.elem0.loc8_51.2 (%impl.elem0.11fef0.2) = out_param call_param2
  1840. // CHECK:STDOUT: %return: ref @GenericCallInterfaceQualified.%impl.elem0.loc8_51.2 (%impl.elem0.11fef0.2) = return_slot %return.param
  1841. // CHECK:STDOUT: }
  1842. // CHECK:STDOUT: }
  1843. // CHECK:STDOUT:
  1844. // CHECK:STDOUT: interface @J {
  1845. // CHECK:STDOUT: %Self: %J.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self]
  1846. // CHECK:STDOUT: %U: type = assoc_const_decl @U [concrete] {
  1847. // CHECK:STDOUT: %assoc0: %J.assoc_type = assoc_entity element0, @J.%U [concrete = constants.%assoc0]
  1848. // CHECK:STDOUT: }
  1849. // CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [concrete = constants.%G] {
  1850. // CHECK:STDOUT: %self.patt: @G.%pattern_type.loc5_8 (%pattern_type.4ca604.1) = binding_pattern self [concrete]
  1851. // CHECK:STDOUT: %self.param_patt: @G.%pattern_type.loc5_8 (%pattern_type.4ca604.1) = value_param_pattern %self.patt, call_param0 [concrete]
  1852. // CHECK:STDOUT: %v.patt: @G.%pattern_type.loc5_20 (%pattern_type.b984e7.1) = binding_pattern v [concrete]
  1853. // CHECK:STDOUT: %v.param_patt: @G.%pattern_type.loc5_20 (%pattern_type.b984e7.1) = value_param_pattern %v.patt, call_param1 [concrete]
  1854. // CHECK:STDOUT: %return.patt: @G.%pattern_type.loc5_20 (%pattern_type.b984e7.1) = return_slot_pattern [concrete]
  1855. // CHECK:STDOUT: %return.param_patt: @G.%pattern_type.loc5_20 (%pattern_type.b984e7.1) = out_param_pattern %return.patt, call_param2 [concrete]
  1856. // CHECK:STDOUT: } {
  1857. // CHECK:STDOUT: %impl.elem0.loc5_29: type = impl_witness_access constants.%J.lookup_impl_witness.64628e.1, element0 [symbolic = %impl.elem0.loc5_23.1 (constants.%impl.elem0.11fef0.1)]
  1858. // CHECK:STDOUT: %U.ref.loc5_29: type = name_ref U, %impl.elem0.loc5_29 [symbolic = %impl.elem0.loc5_23.1 (constants.%impl.elem0.11fef0.1)]
  1859. // CHECK:STDOUT: %self.param: @G.%Self.as_type.loc5_14.1 (%Self.as_type) = value_param call_param0
  1860. // CHECK:STDOUT: %.loc5_14.1: type = splice_block %.loc5_14.2 [symbolic = %Self.as_type.loc5_14.1 (constants.%Self.as_type)] {
  1861. // CHECK:STDOUT: %Self.ref: %J.type = name_ref Self, @J.%Self [symbolic = %Self (constants.%Self)]
  1862. // CHECK:STDOUT: %Self.as_type.loc5_14.2: type = facet_access_type %Self.ref [symbolic = %Self.as_type.loc5_14.1 (constants.%Self.as_type)]
  1863. // CHECK:STDOUT: %.loc5_14.2: type = converted %Self.ref, %Self.as_type.loc5_14.2 [symbolic = %Self.as_type.loc5_14.1 (constants.%Self.as_type)]
  1864. // CHECK:STDOUT: }
  1865. // CHECK:STDOUT: %self: @G.%Self.as_type.loc5_14.1 (%Self.as_type) = bind_name self, %self.param
  1866. // CHECK:STDOUT: %v.param: @G.%impl.elem0.loc5_23.1 (%impl.elem0.11fef0.1) = value_param call_param1
  1867. // CHECK:STDOUT: %.loc5_23: type = splice_block %U.ref.loc5_23 [symbolic = %impl.elem0.loc5_23.1 (constants.%impl.elem0.11fef0.1)] {
  1868. // CHECK:STDOUT: %impl.elem0.loc5_23.2: type = impl_witness_access constants.%J.lookup_impl_witness.64628e.1, element0 [symbolic = %impl.elem0.loc5_23.1 (constants.%impl.elem0.11fef0.1)]
  1869. // CHECK:STDOUT: %U.ref.loc5_23: type = name_ref U, %impl.elem0.loc5_23.2 [symbolic = %impl.elem0.loc5_23.1 (constants.%impl.elem0.11fef0.1)]
  1870. // CHECK:STDOUT: }
  1871. // CHECK:STDOUT: %v: @G.%impl.elem0.loc5_23.1 (%impl.elem0.11fef0.1) = bind_name v, %v.param
  1872. // CHECK:STDOUT: %return.param: ref @G.%impl.elem0.loc5_23.1 (%impl.elem0.11fef0.1) = out_param call_param2
  1873. // CHECK:STDOUT: %return: ref @G.%impl.elem0.loc5_23.1 (%impl.elem0.11fef0.1) = return_slot %return.param
  1874. // CHECK:STDOUT: }
  1875. // CHECK:STDOUT: %assoc1: %J.assoc_type = assoc_entity element1, %G.decl [concrete = constants.%assoc1]
  1876. // CHECK:STDOUT:
  1877. // CHECK:STDOUT: !members:
  1878. // CHECK:STDOUT: .Self = %Self
  1879. // CHECK:STDOUT: .U = @U.%assoc0
  1880. // CHECK:STDOUT: .G = %assoc1
  1881. // CHECK:STDOUT: witness = (%U, %G.decl)
  1882. // CHECK:STDOUT: }
  1883. // CHECK:STDOUT:
  1884. // CHECK:STDOUT: generic assoc_const @U(@J.%Self: %J.type) {
  1885. // CHECK:STDOUT: assoc_const U:! type;
  1886. // CHECK:STDOUT: }
  1887. // CHECK:STDOUT:
  1888. // CHECK:STDOUT: generic fn @G(@J.%Self: %J.type) {
  1889. // CHECK:STDOUT: %Self: %J.type = bind_symbolic_name Self, 0 [symbolic = %Self (constants.%Self)]
  1890. // CHECK:STDOUT: %Self.as_type.loc5_14.1: type = facet_access_type %Self [symbolic = %Self.as_type.loc5_14.1 (constants.%Self.as_type)]
  1891. // CHECK:STDOUT: %pattern_type.loc5_8: type = pattern_type %Self.as_type.loc5_14.1 [symbolic = %pattern_type.loc5_8 (constants.%pattern_type.4ca604.1)]
  1892. // CHECK:STDOUT: %J.lookup_impl_witness: <witness> = lookup_impl_witness %Self, @J [symbolic = %J.lookup_impl_witness (constants.%J.lookup_impl_witness.64628e.1)]
  1893. // CHECK:STDOUT: %impl.elem0.loc5_23.1: type = impl_witness_access %J.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc5_23.1 (constants.%impl.elem0.11fef0.1)]
  1894. // CHECK:STDOUT: %pattern_type.loc5_20: type = pattern_type %impl.elem0.loc5_23.1 [symbolic = %pattern_type.loc5_20 (constants.%pattern_type.b984e7.1)]
  1895. // CHECK:STDOUT:
  1896. // CHECK:STDOUT: fn(%self.param: @G.%Self.as_type.loc5_14.1 (%Self.as_type), %v.param: @G.%impl.elem0.loc5_23.1 (%impl.elem0.11fef0.1)) -> @G.%impl.elem0.loc5_23.1 (%impl.elem0.11fef0.1);
  1897. // CHECK:STDOUT: }
  1898. // CHECK:STDOUT:
  1899. // CHECK:STDOUT: generic fn @GenericCallInterfaceQualified(%T.loc8_34.1: %J.type) {
  1900. // CHECK:STDOUT: %T.loc8_34.2: %J.type = bind_symbolic_name T, 0 [symbolic = %T.loc8_34.2 (constants.%T)]
  1901. // CHECK:STDOUT: %T.as_type.loc8_44.2: type = facet_access_type %T.loc8_34.2 [symbolic = %T.as_type.loc8_44.2 (constants.%T.as_type)]
  1902. // CHECK:STDOUT: %pattern_type.loc8_41: type = pattern_type %T.as_type.loc8_44.2 [symbolic = %pattern_type.loc8_41 (constants.%pattern_type.4ca604.2)]
  1903. // CHECK:STDOUT: %J.lookup_impl_witness: <witness> = lookup_impl_witness %T.loc8_34.2, @J [symbolic = %J.lookup_impl_witness (constants.%J.lookup_impl_witness.64628e.2)]
  1904. // CHECK:STDOUT: %impl.elem0.loc8_51.2: type = impl_witness_access %J.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc8_51.2 (constants.%impl.elem0.11fef0.2)]
  1905. // CHECK:STDOUT: %pattern_type.loc8_47: type = pattern_type %impl.elem0.loc8_51.2 [symbolic = %pattern_type.loc8_47 (constants.%pattern_type.b984e7.2)]
  1906. // CHECK:STDOUT:
  1907. // CHECK:STDOUT: !definition:
  1908. // CHECK:STDOUT: %require_complete.loc8_55: <witness> = require_complete_type %impl.elem0.loc8_51.2 [symbolic = %require_complete.loc8_55 (constants.%require_complete.58f)]
  1909. // CHECK:STDOUT: %require_complete.loc8_42: <witness> = require_complete_type %T.as_type.loc8_44.2 [symbolic = %require_complete.loc8_42 (constants.%require_complete.2a5)]
  1910. // CHECK:STDOUT: %J.facet: %J.type = facet_value %T.as_type.loc8_44.2, (%J.lookup_impl_witness) [symbolic = %J.facet (constants.%J.facet.5210a7.2)]
  1911. // CHECK:STDOUT: %.loc9_11: type = fn_type_with_self_type constants.%G.type, %J.facet [symbolic = %.loc9_11 (constants.%.442)]
  1912. // CHECK:STDOUT: %impl.elem1.loc9_11.2: @GenericCallInterfaceQualified.%.loc9_11 (%.442) = impl_witness_access %J.lookup_impl_witness, element1 [symbolic = %impl.elem1.loc9_11.2 (constants.%impl.elem1)]
  1913. // CHECK:STDOUT: %specific_impl_fn.loc9_11.2: <specific function> = specific_impl_function %impl.elem1.loc9_11.2, @G(%J.facet) [symbolic = %specific_impl_fn.loc9_11.2 (constants.%specific_impl_fn)]
  1914. // CHECK:STDOUT:
  1915. // CHECK:STDOUT: fn(%t.param: @GenericCallInterfaceQualified.%T.as_type.loc8_44.2 (%T.as_type), %u.param: @GenericCallInterfaceQualified.%impl.elem0.loc8_51.2 (%impl.elem0.11fef0.2)) -> @GenericCallInterfaceQualified.%impl.elem0.loc8_51.2 (%impl.elem0.11fef0.2) {
  1916. // CHECK:STDOUT: !entry:
  1917. // CHECK:STDOUT: %t.ref: @GenericCallInterfaceQualified.%T.as_type.loc8_44.2 (%T.as_type) = name_ref t, %t
  1918. // CHECK:STDOUT: %J.ref.loc9: type = name_ref J, file.%J.decl [concrete = constants.%J.type]
  1919. // CHECK:STDOUT: %G.ref: %J.assoc_type = name_ref G, @J.%assoc1 [concrete = constants.%assoc1]
  1920. // CHECK:STDOUT: %impl.elem1.loc9_11.1: @GenericCallInterfaceQualified.%.loc9_11 (%.442) = impl_witness_access constants.%J.lookup_impl_witness.64628e.2, element1 [symbolic = %impl.elem1.loc9_11.2 (constants.%impl.elem1)]
  1921. // CHECK:STDOUT: %bound_method.loc9_11: <bound method> = bound_method %t.ref, %impl.elem1.loc9_11.1
  1922. // CHECK:STDOUT: %u.ref: @GenericCallInterfaceQualified.%impl.elem0.loc8_51.2 (%impl.elem0.11fef0.2) = name_ref u, %u
  1923. // CHECK:STDOUT: %specific_impl_fn.loc9_11.1: <specific function> = specific_impl_function %impl.elem1.loc9_11.1, @G(constants.%J.facet.5210a7.2) [symbolic = %specific_impl_fn.loc9_11.2 (constants.%specific_impl_fn)]
  1924. // CHECK:STDOUT: %bound_method.loc9_19: <bound method> = bound_method %t.ref, %specific_impl_fn.loc9_11.1
  1925. // CHECK:STDOUT: %.loc9_19: init @GenericCallInterfaceQualified.%impl.elem0.loc8_51.2 (%impl.elem0.11fef0.2) = call %bound_method.loc9_19(%t.ref, %u.ref)
  1926. // CHECK:STDOUT: %.loc9_20.1: @GenericCallInterfaceQualified.%impl.elem0.loc8_51.2 (%impl.elem0.11fef0.2) = value_of_initializer %.loc9_19
  1927. // CHECK:STDOUT: %.loc9_20.2: @GenericCallInterfaceQualified.%impl.elem0.loc8_51.2 (%impl.elem0.11fef0.2) = converted %.loc9_19, %.loc9_20.1
  1928. // CHECK:STDOUT: return %.loc9_20.2
  1929. // CHECK:STDOUT: }
  1930. // CHECK:STDOUT: }
  1931. // CHECK:STDOUT:
  1932. // CHECK:STDOUT: specific @U(constants.%Self) {}
  1933. // CHECK:STDOUT:
  1934. // CHECK:STDOUT: specific @U(constants.%J.facet.5210a7.1) {}
  1935. // CHECK:STDOUT:
  1936. // CHECK:STDOUT: specific @G(constants.%Self) {
  1937. // CHECK:STDOUT: %Self => constants.%Self
  1938. // CHECK:STDOUT: %Self.as_type.loc5_14.1 => constants.%Self.as_type
  1939. // CHECK:STDOUT: %pattern_type.loc5_8 => constants.%pattern_type.4ca604.1
  1940. // CHECK:STDOUT: %J.lookup_impl_witness => constants.%J.lookup_impl_witness.64628e.1
  1941. // CHECK:STDOUT: %impl.elem0.loc5_23.1 => constants.%impl.elem0.11fef0.1
  1942. // CHECK:STDOUT: %pattern_type.loc5_20 => constants.%pattern_type.b984e7.1
  1943. // CHECK:STDOUT: }
  1944. // CHECK:STDOUT:
  1945. // CHECK:STDOUT: specific @U(constants.%J.facet.5210a7.2) {}
  1946. // CHECK:STDOUT:
  1947. // CHECK:STDOUT: specific @GenericCallInterfaceQualified(constants.%T) {
  1948. // CHECK:STDOUT: %T.loc8_34.2 => constants.%T
  1949. // CHECK:STDOUT: %T.as_type.loc8_44.2 => constants.%T.as_type
  1950. // CHECK:STDOUT: %pattern_type.loc8_41 => constants.%pattern_type.4ca604.2
  1951. // CHECK:STDOUT: %J.lookup_impl_witness => constants.%J.lookup_impl_witness.64628e.2
  1952. // CHECK:STDOUT: %impl.elem0.loc8_51.2 => constants.%impl.elem0.11fef0.2
  1953. // CHECK:STDOUT: %pattern_type.loc8_47 => constants.%pattern_type.b984e7.2
  1954. // CHECK:STDOUT: }
  1955. // CHECK:STDOUT:
  1956. // CHECK:STDOUT: specific @G(constants.%J.facet.5210a7.2) {
  1957. // CHECK:STDOUT: %Self => constants.%J.facet.5210a7.2
  1958. // CHECK:STDOUT: %Self.as_type.loc5_14.1 => constants.%T.as_type
  1959. // CHECK:STDOUT: %pattern_type.loc5_8 => constants.%pattern_type.4ca604.2
  1960. // CHECK:STDOUT: %J.lookup_impl_witness => constants.%J.lookup_impl_witness.64628e.2
  1961. // CHECK:STDOUT: %impl.elem0.loc5_23.1 => constants.%impl.elem0.11fef0.2
  1962. // CHECK:STDOUT: %pattern_type.loc5_20 => constants.%pattern_type.b984e7.2
  1963. // CHECK:STDOUT: }
  1964. // CHECK:STDOUT:
  1965. // CHECK:STDOUT: --- fail_todo_use_where.carbon
  1966. // CHECK:STDOUT:
  1967. // CHECK:STDOUT: constants {
  1968. // CHECK:STDOUT: %J.type: type = facet_type <@J> [concrete]
  1969. // CHECK:STDOUT: %Self.ccd: %J.type = bind_symbolic_name Self, 0 [symbolic]
  1970. // CHECK:STDOUT: %J.assoc_type: type = assoc_entity_type @J [concrete]
  1971. // CHECK:STDOUT: %assoc0.411: %J.assoc_type = assoc_entity element0, @J.%U [concrete]
  1972. // CHECK:STDOUT: %Self.as_type.3df: type = facet_access_type %Self.ccd [symbolic]
  1973. // CHECK:STDOUT: %J.lookup_impl_witness.646: <witness> = lookup_impl_witness %Self.ccd, @J [symbolic]
  1974. // CHECK:STDOUT: %J.facet.521: %J.type = facet_value %Self.as_type.3df, (%J.lookup_impl_witness.646) [symbolic]
  1975. // CHECK:STDOUT: %impl.elem0.11f: type = impl_witness_access %J.lookup_impl_witness.646, element0 [symbolic]
  1976. // CHECK:STDOUT: %pattern_type.b98: type = pattern_type %impl.elem0.11f [symbolic]
  1977. // CHECK:STDOUT: %F.type: type = fn_type @F [concrete]
  1978. // CHECK:STDOUT: %F: %F.type = struct_value () [concrete]
  1979. // CHECK:STDOUT: %assoc1: %J.assoc_type = assoc_entity element1, @J.%F.decl [concrete]
  1980. // CHECK:STDOUT: %.Self: %J.type = bind_symbolic_name .Self [symbolic_self]
  1981. // CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self [symbolic_self]
  1982. // CHECK:STDOUT: %J.lookup_impl_witness.25c: <witness> = lookup_impl_witness %.Self, @J [symbolic_self]
  1983. // CHECK:STDOUT: %J.facet.330: %J.type = facet_value %.Self.as_type, (%J.lookup_impl_witness.25c) [symbolic_self]
  1984. // CHECK:STDOUT: %impl.elem0.83f: type = impl_witness_access %J.lookup_impl_witness.25c, element0 [symbolic_self]
  1985. // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete]
  1986. // CHECK:STDOUT: %Int.type: type = generic_class_type @Int [concrete]
  1987. // CHECK:STDOUT: %Int.generic: %Int.type = struct_value () [concrete]
  1988. // CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [concrete]
  1989. // CHECK:STDOUT: %J_where.type: type = facet_type <@J where %impl.elem0.83f = %i32> [concrete]
  1990. // CHECK:STDOUT: %T: %J_where.type = bind_symbolic_name T, 0 [symbolic]
  1991. // CHECK:STDOUT: %pattern_type.a22: type = pattern_type %J_where.type [concrete]
  1992. // CHECK:STDOUT: %T.as_type: type = facet_access_type %T [symbolic]
  1993. // CHECK:STDOUT: %pattern_type.b32: type = pattern_type %T.as_type [symbolic]
  1994. // CHECK:STDOUT: %pattern_type.7ce: type = pattern_type %i32 [concrete]
  1995. // CHECK:STDOUT: %GenericCallFI32.type: type = fn_type @GenericCallFI32 [concrete]
  1996. // CHECK:STDOUT: %GenericCallFI32: %GenericCallFI32.type = struct_value () [concrete]
  1997. // CHECK:STDOUT: %require_complete.5de: <witness> = require_complete_type %T.as_type [symbolic]
  1998. // CHECK:STDOUT: %J.lookup_impl_witness.bee: <witness> = lookup_impl_witness %T, @J [symbolic]
  1999. // CHECK:STDOUT: %J.facet.487: %J.type = facet_value %T.as_type, (%J.lookup_impl_witness.bee) [symbolic]
  2000. // CHECK:STDOUT: %.9b0: type = fn_type_with_self_type %F.type, %J.facet.487 [symbolic]
  2001. // CHECK:STDOUT: %impl.elem1: %.9b0 = impl_witness_access %J.lookup_impl_witness.bee, element1 [symbolic]
  2002. // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [concrete]
  2003. // CHECK:STDOUT: %impl.elem0.db9: type = impl_witness_access %J.lookup_impl_witness.bee, element0 [symbolic]
  2004. // CHECK:STDOUT: %pattern_type.c1e: type = pattern_type %impl.elem0.db9 [symbolic]
  2005. // CHECK:STDOUT: %specific_impl_fn: <specific function> = specific_impl_function %impl.elem1, @F(%J.facet.487) [symbolic]
  2006. // CHECK:STDOUT: %require_complete.cfd: <witness> = require_complete_type %impl.elem0.db9 [symbolic]
  2007. // CHECK:STDOUT: %ImplicitAs.type.cc7: type = generic_interface_type @ImplicitAs [concrete]
  2008. // CHECK:STDOUT: %ImplicitAs.generic: %ImplicitAs.type.cc7 = struct_value () [concrete]
  2009. // CHECK:STDOUT: %Dest: type = bind_symbolic_name Dest, 0 [symbolic]
  2010. // CHECK:STDOUT: %Convert.type.275: type = fn_type @Convert.1, @ImplicitAs(%Dest) [symbolic]
  2011. // CHECK:STDOUT: %Convert.42e: %Convert.type.275 = struct_value () [symbolic]
  2012. // CHECK:STDOUT: %ImplicitAs.assoc_type.ca0: type = assoc_entity_type @ImplicitAs, @ImplicitAs(%Dest) [symbolic]
  2013. // CHECK:STDOUT: %ImplicitAs.type.7df: type = facet_type <@ImplicitAs, @ImplicitAs(%impl.elem0.db9)> [symbolic]
  2014. // CHECK:STDOUT: %ImplicitAs.assoc_type.c64: type = assoc_entity_type @ImplicitAs, @ImplicitAs(%impl.elem0.db9) [symbolic]
  2015. // CHECK:STDOUT: %assoc0.965: %ImplicitAs.assoc_type.c64 = assoc_entity element0, imports.%Core.import_ref.1c7 [symbolic]
  2016. // CHECK:STDOUT: %require_complete.402: <witness> = require_complete_type %ImplicitAs.type.7df [symbolic]
  2017. // CHECK:STDOUT: %assoc0.dc0: %ImplicitAs.assoc_type.ca0 = assoc_entity element0, imports.%Core.import_ref.207 [symbolic]
  2018. // CHECK:STDOUT: }
  2019. // CHECK:STDOUT:
  2020. // CHECK:STDOUT: imports {
  2021. // CHECK:STDOUT: %Core: <namespace> = namespace file.%Core.import, [concrete] {
  2022. // CHECK:STDOUT: .Int = %Core.Int
  2023. // CHECK:STDOUT: .ImplicitAs = %Core.ImplicitAs
  2024. // CHECK:STDOUT: import Core//prelude
  2025. // CHECK:STDOUT: import Core//prelude/...
  2026. // CHECK:STDOUT: }
  2027. // CHECK:STDOUT: %Core.Int: %Int.type = import_ref Core//prelude/types/int, Int, loaded [concrete = constants.%Int.generic]
  2028. // CHECK:STDOUT: %Core.ImplicitAs: %ImplicitAs.type.cc7 = import_ref Core//prelude/operators/as, ImplicitAs, loaded [concrete = constants.%ImplicitAs.generic]
  2029. // CHECK:STDOUT: %Core.import_ref.492: @ImplicitAs.%ImplicitAs.assoc_type (%ImplicitAs.assoc_type.ca0) = import_ref Core//prelude/operators/as, loc13_35, loaded [symbolic = @ImplicitAs.%assoc0 (constants.%assoc0.dc0)]
  2030. // CHECK:STDOUT: %Core.import_ref.1c7: @ImplicitAs.%Convert.type (%Convert.type.275) = import_ref Core//prelude/operators/as, loc13_35, loaded [symbolic = @ImplicitAs.%Convert (constants.%Convert.42e)]
  2031. // CHECK:STDOUT: %Core.import_ref.207 = import_ref Core//prelude/operators/as, loc13_35, unloaded
  2032. // CHECK:STDOUT: }
  2033. // CHECK:STDOUT:
  2034. // CHECK:STDOUT: file {
  2035. // CHECK:STDOUT: package: <namespace> = namespace [concrete] {
  2036. // CHECK:STDOUT: .Core = imports.%Core
  2037. // CHECK:STDOUT: .J = %J.decl
  2038. // CHECK:STDOUT: .GenericCallFI32 = %GenericCallFI32.decl
  2039. // CHECK:STDOUT: }
  2040. // CHECK:STDOUT: %Core.import = import Core
  2041. // CHECK:STDOUT: %J.decl: type = interface_decl @J [concrete = constants.%J.type] {} {}
  2042. // CHECK:STDOUT: %GenericCallFI32.decl: %GenericCallFI32.type = fn_decl @GenericCallFI32 [concrete = constants.%GenericCallFI32] {
  2043. // CHECK:STDOUT: %T.patt: %pattern_type.a22 = symbolic_binding_pattern T, 0 [concrete]
  2044. // CHECK:STDOUT: %t.patt: @GenericCallFI32.%pattern_type (%pattern_type.b32) = binding_pattern t [concrete]
  2045. // CHECK:STDOUT: %t.param_patt: @GenericCallFI32.%pattern_type (%pattern_type.b32) = value_param_pattern %t.patt, call_param0 [concrete]
  2046. // CHECK:STDOUT: %return.patt: %pattern_type.7ce = return_slot_pattern [concrete]
  2047. // CHECK:STDOUT: %return.param_patt: %pattern_type.7ce = out_param_pattern %return.patt, call_param1 [concrete]
  2048. // CHECK:STDOUT: } {
  2049. // CHECK:STDOUT: %int_32.loc8_51: Core.IntLiteral = int_value 32 [concrete = constants.%int_32]
  2050. // CHECK:STDOUT: %i32.loc8_51: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32]
  2051. // CHECK:STDOUT: %.loc8_26.1: type = splice_block %.loc8_26.2 [concrete = constants.%J_where.type] {
  2052. // CHECK:STDOUT: %J.ref: type = name_ref J, file.%J.decl [concrete = constants.%J.type]
  2053. // CHECK:STDOUT: %.Self: %J.type = bind_symbolic_name .Self [symbolic_self = constants.%.Self]
  2054. // CHECK:STDOUT: %.Self.ref: %J.type = name_ref .Self, %.Self [symbolic_self = constants.%.Self]
  2055. // CHECK:STDOUT: %U.ref: %J.assoc_type = name_ref U, @U.%assoc0 [concrete = constants.%assoc0.411]
  2056. // CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self.ref [symbolic_self = constants.%.Self.as_type]
  2057. // CHECK:STDOUT: %.loc8_32: type = converted %.Self.ref, %.Self.as_type [symbolic_self = constants.%.Self.as_type]
  2058. // CHECK:STDOUT: %impl.elem0.loc8: type = impl_witness_access constants.%J.lookup_impl_witness.25c, element0 [symbolic_self = constants.%impl.elem0.83f]
  2059. // CHECK:STDOUT: %int_32.loc8_37: Core.IntLiteral = int_value 32 [concrete = constants.%int_32]
  2060. // CHECK:STDOUT: %i32.loc8_37: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32]
  2061. // CHECK:STDOUT: %.loc8_26.2: type = where_expr %.Self [concrete = constants.%J_where.type] {
  2062. // CHECK:STDOUT: requirement_rewrite %impl.elem0.loc8, %i32.loc8_37
  2063. // CHECK:STDOUT: }
  2064. // CHECK:STDOUT: }
  2065. // CHECK:STDOUT: %T.loc8_20.1: %J_where.type = bind_symbolic_name T, 0 [symbolic = %T.loc8_20.2 (constants.%T)]
  2066. // CHECK:STDOUT: %t.param: @GenericCallFI32.%T.as_type.loc8_45.2 (%T.as_type) = value_param call_param0
  2067. // CHECK:STDOUT: %.loc8_45.1: type = splice_block %.loc8_45.2 [symbolic = %T.as_type.loc8_45.2 (constants.%T.as_type)] {
  2068. // CHECK:STDOUT: %T.ref: %J_where.type = name_ref T, %T.loc8_20.1 [symbolic = %T.loc8_20.2 (constants.%T)]
  2069. // CHECK:STDOUT: %T.as_type.loc8_45.1: type = facet_access_type %T.ref [symbolic = %T.as_type.loc8_45.2 (constants.%T.as_type)]
  2070. // CHECK:STDOUT: %.loc8_45.2: type = converted %T.ref, %T.as_type.loc8_45.1 [symbolic = %T.as_type.loc8_45.2 (constants.%T.as_type)]
  2071. // CHECK:STDOUT: }
  2072. // CHECK:STDOUT: %t: @GenericCallFI32.%T.as_type.loc8_45.2 (%T.as_type) = bind_name t, %t.param
  2073. // CHECK:STDOUT: %return.param: ref %i32 = out_param call_param1
  2074. // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param
  2075. // CHECK:STDOUT: }
  2076. // CHECK:STDOUT: }
  2077. // CHECK:STDOUT:
  2078. // CHECK:STDOUT: interface @J {
  2079. // CHECK:STDOUT: %Self: %J.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self.ccd]
  2080. // CHECK:STDOUT: %U: type = assoc_const_decl @U [concrete] {
  2081. // CHECK:STDOUT: %assoc0: %J.assoc_type = assoc_entity element0, @J.%U [concrete = constants.%assoc0.411]
  2082. // CHECK:STDOUT: }
  2083. // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [concrete = constants.%F] {
  2084. // CHECK:STDOUT: %u.patt: @F.%pattern_type (%pattern_type.b98) = binding_pattern u [concrete]
  2085. // CHECK:STDOUT: %u.param_patt: @F.%pattern_type (%pattern_type.b98) = value_param_pattern %u.patt, call_param0 [concrete]
  2086. // CHECK:STDOUT: %return.patt: @F.%pattern_type (%pattern_type.b98) = return_slot_pattern [concrete]
  2087. // CHECK:STDOUT: %return.param_patt: @F.%pattern_type (%pattern_type.b98) = out_param_pattern %return.patt, call_param1 [concrete]
  2088. // CHECK:STDOUT: } {
  2089. // CHECK:STDOUT: %impl.elem0.loc5_17: type = impl_witness_access constants.%J.lookup_impl_witness.646, element0 [symbolic = %impl.elem0.loc5_11.1 (constants.%impl.elem0.11f)]
  2090. // CHECK:STDOUT: %U.ref.loc5_17: type = name_ref U, %impl.elem0.loc5_17 [symbolic = %impl.elem0.loc5_11.1 (constants.%impl.elem0.11f)]
  2091. // CHECK:STDOUT: %u.param: @F.%impl.elem0.loc5_11.1 (%impl.elem0.11f) = value_param call_param0
  2092. // CHECK:STDOUT: %.loc5: type = splice_block %U.ref.loc5_11 [symbolic = %impl.elem0.loc5_11.1 (constants.%impl.elem0.11f)] {
  2093. // CHECK:STDOUT: %impl.elem0.loc5_11.2: type = impl_witness_access constants.%J.lookup_impl_witness.646, element0 [symbolic = %impl.elem0.loc5_11.1 (constants.%impl.elem0.11f)]
  2094. // CHECK:STDOUT: %U.ref.loc5_11: type = name_ref U, %impl.elem0.loc5_11.2 [symbolic = %impl.elem0.loc5_11.1 (constants.%impl.elem0.11f)]
  2095. // CHECK:STDOUT: }
  2096. // CHECK:STDOUT: %u: @F.%impl.elem0.loc5_11.1 (%impl.elem0.11f) = bind_name u, %u.param
  2097. // CHECK:STDOUT: %return.param: ref @F.%impl.elem0.loc5_11.1 (%impl.elem0.11f) = out_param call_param1
  2098. // CHECK:STDOUT: %return: ref @F.%impl.elem0.loc5_11.1 (%impl.elem0.11f) = return_slot %return.param
  2099. // CHECK:STDOUT: }
  2100. // CHECK:STDOUT: %assoc1: %J.assoc_type = assoc_entity element1, %F.decl [concrete = constants.%assoc1]
  2101. // CHECK:STDOUT:
  2102. // CHECK:STDOUT: !members:
  2103. // CHECK:STDOUT: .Self = %Self
  2104. // CHECK:STDOUT: .U = @U.%assoc0
  2105. // CHECK:STDOUT: .F = %assoc1
  2106. // CHECK:STDOUT: witness = (%U, %F.decl)
  2107. // CHECK:STDOUT: }
  2108. // CHECK:STDOUT:
  2109. // CHECK:STDOUT: generic assoc_const @U(@J.%Self: %J.type) {
  2110. // CHECK:STDOUT: assoc_const U:! type;
  2111. // CHECK:STDOUT: }
  2112. // CHECK:STDOUT:
  2113. // CHECK:STDOUT: generic fn @F(@J.%Self: %J.type) {
  2114. // CHECK:STDOUT: %Self: %J.type = bind_symbolic_name Self, 0 [symbolic = %Self (constants.%Self.ccd)]
  2115. // CHECK:STDOUT: %J.lookup_impl_witness: <witness> = lookup_impl_witness %Self, @J [symbolic = %J.lookup_impl_witness (constants.%J.lookup_impl_witness.646)]
  2116. // CHECK:STDOUT: %impl.elem0.loc5_11.1: type = impl_witness_access %J.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc5_11.1 (constants.%impl.elem0.11f)]
  2117. // CHECK:STDOUT: %pattern_type: type = pattern_type %impl.elem0.loc5_11.1 [symbolic = %pattern_type (constants.%pattern_type.b98)]
  2118. // CHECK:STDOUT:
  2119. // CHECK:STDOUT: fn(%u.param: @F.%impl.elem0.loc5_11.1 (%impl.elem0.11f)) -> @F.%impl.elem0.loc5_11.1 (%impl.elem0.11f);
  2120. // CHECK:STDOUT: }
  2121. // CHECK:STDOUT:
  2122. // CHECK:STDOUT: generic fn @GenericCallFI32(%T.loc8_20.1: %J_where.type) {
  2123. // CHECK:STDOUT: %T.loc8_20.2: %J_where.type = bind_symbolic_name T, 0 [symbolic = %T.loc8_20.2 (constants.%T)]
  2124. // CHECK:STDOUT: %T.as_type.loc8_45.2: type = facet_access_type %T.loc8_20.2 [symbolic = %T.as_type.loc8_45.2 (constants.%T.as_type)]
  2125. // CHECK:STDOUT: %pattern_type: type = pattern_type %T.as_type.loc8_45.2 [symbolic = %pattern_type (constants.%pattern_type.b32)]
  2126. // CHECK:STDOUT:
  2127. // CHECK:STDOUT: !definition:
  2128. // CHECK:STDOUT: %require_complete.loc8: <witness> = require_complete_type %T.as_type.loc8_45.2 [symbolic = %require_complete.loc8 (constants.%require_complete.5de)]
  2129. // CHECK:STDOUT: %J.lookup_impl_witness: <witness> = lookup_impl_witness %T.loc8_20.2, @J [symbolic = %J.lookup_impl_witness (constants.%J.lookup_impl_witness.bee)]
  2130. // CHECK:STDOUT: %J.facet: %J.type = facet_value %T.as_type.loc8_45.2, (%J.lookup_impl_witness) [symbolic = %J.facet (constants.%J.facet.487)]
  2131. // CHECK:STDOUT: %.loc26_11.2: type = fn_type_with_self_type constants.%F.type, %J.facet [symbolic = %.loc26_11.2 (constants.%.9b0)]
  2132. // CHECK:STDOUT: %impl.elem1.loc26_11.2: @GenericCallFI32.%.loc26_11.2 (%.9b0) = impl_witness_access %J.lookup_impl_witness, element1 [symbolic = %impl.elem1.loc26_11.2 (constants.%impl.elem1)]
  2133. // CHECK:STDOUT: %specific_impl_fn.loc26_11.2: <specific function> = specific_impl_function %impl.elem1.loc26_11.2, @F(%J.facet) [symbolic = %specific_impl_fn.loc26_11.2 (constants.%specific_impl_fn)]
  2134. // CHECK:STDOUT: %impl.elem0.loc26: type = impl_witness_access %J.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc26 (constants.%impl.elem0.db9)]
  2135. // CHECK:STDOUT: %require_complete.loc26_15: <witness> = require_complete_type %impl.elem0.loc26 [symbolic = %require_complete.loc26_15 (constants.%require_complete.cfd)]
  2136. // CHECK:STDOUT: %ImplicitAs.type.loc26_14.2: type = facet_type <@ImplicitAs, @ImplicitAs(%impl.elem0.loc26)> [symbolic = %ImplicitAs.type.loc26_14.2 (constants.%ImplicitAs.type.7df)]
  2137. // CHECK:STDOUT: %require_complete.loc26_14: <witness> = require_complete_type %ImplicitAs.type.loc26_14.2 [symbolic = %require_complete.loc26_14 (constants.%require_complete.402)]
  2138. // CHECK:STDOUT: %ImplicitAs.assoc_type: type = assoc_entity_type @ImplicitAs, @ImplicitAs(%impl.elem0.loc26) [symbolic = %ImplicitAs.assoc_type (constants.%ImplicitAs.assoc_type.c64)]
  2139. // CHECK:STDOUT: %assoc0: @GenericCallFI32.%ImplicitAs.assoc_type (%ImplicitAs.assoc_type.c64) = assoc_entity element0, imports.%Core.import_ref.1c7 [symbolic = %assoc0 (constants.%assoc0.965)]
  2140. // CHECK:STDOUT:
  2141. // CHECK:STDOUT: fn(%t.param: @GenericCallFI32.%T.as_type.loc8_45.2 (%T.as_type)) -> %i32 {
  2142. // CHECK:STDOUT: !entry:
  2143. // CHECK:STDOUT: %t.ref: @GenericCallFI32.%T.as_type.loc8_45.2 (%T.as_type) = name_ref t, %t
  2144. // CHECK:STDOUT: %F.ref: %J.assoc_type = name_ref F, @J.%assoc1 [concrete = constants.%assoc1]
  2145. // CHECK:STDOUT: %T.as_type.loc26: type = facet_access_type constants.%T [symbolic = %T.as_type.loc8_45.2 (constants.%T.as_type)]
  2146. // CHECK:STDOUT: %.loc26_11.1: type = converted constants.%T, %T.as_type.loc26 [symbolic = %T.as_type.loc8_45.2 (constants.%T.as_type)]
  2147. // CHECK:STDOUT: %impl.elem1.loc26_11.1: @GenericCallFI32.%.loc26_11.2 (%.9b0) = impl_witness_access constants.%J.lookup_impl_witness.bee, element1 [symbolic = %impl.elem1.loc26_11.2 (constants.%impl.elem1)]
  2148. // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [concrete = constants.%int_2]
  2149. // CHECK:STDOUT: %specific_impl_fn.loc26_11.1: <specific function> = specific_impl_function %impl.elem1.loc26_11.1, @F(constants.%J.facet.487) [symbolic = %specific_impl_fn.loc26_11.2 (constants.%specific_impl_fn)]
  2150. // CHECK:STDOUT: %ImplicitAs.type.loc26_14.1: type = facet_type <@ImplicitAs, @ImplicitAs(constants.%impl.elem0.db9)> [symbolic = %ImplicitAs.type.loc26_14.2 (constants.%ImplicitAs.type.7df)]
  2151. // CHECK:STDOUT: %.loc26_14.1: @GenericCallFI32.%ImplicitAs.assoc_type (%ImplicitAs.assoc_type.c64) = specific_constant imports.%Core.import_ref.492, @ImplicitAs(constants.%impl.elem0.db9) [symbolic = %assoc0 (constants.%assoc0.965)]
  2152. // CHECK:STDOUT: %Convert.ref: @GenericCallFI32.%ImplicitAs.assoc_type (%ImplicitAs.assoc_type.c64) = name_ref Convert, %.loc26_14.1 [symbolic = %assoc0 (constants.%assoc0.965)]
  2153. // CHECK:STDOUT: %.loc26_14.2: @GenericCallFI32.%impl.elem0.loc26 (%impl.elem0.db9) = converted %int_2, <error> [concrete = <error>]
  2154. // CHECK:STDOUT: %.loc26_15: init @GenericCallFI32.%impl.elem0.loc26 (%impl.elem0.db9) = call %specific_impl_fn.loc26_11.1(<error>) [concrete = <error>]
  2155. // CHECK:STDOUT: %.loc26_16: %i32 = converted %.loc26_15, <error> [concrete = <error>]
  2156. // CHECK:STDOUT: return <error>
  2157. // CHECK:STDOUT: }
  2158. // CHECK:STDOUT: }
  2159. // CHECK:STDOUT:
  2160. // CHECK:STDOUT: specific @U(constants.%Self.ccd) {}
  2161. // CHECK:STDOUT:
  2162. // CHECK:STDOUT: specific @U(constants.%J.facet.521) {}
  2163. // CHECK:STDOUT:
  2164. // CHECK:STDOUT: specific @F(constants.%Self.ccd) {
  2165. // CHECK:STDOUT: %Self => constants.%Self.ccd
  2166. // CHECK:STDOUT: %J.lookup_impl_witness => constants.%J.lookup_impl_witness.646
  2167. // CHECK:STDOUT: %impl.elem0.loc5_11.1 => constants.%impl.elem0.11f
  2168. // CHECK:STDOUT: %pattern_type => constants.%pattern_type.b98
  2169. // CHECK:STDOUT: }
  2170. // CHECK:STDOUT:
  2171. // CHECK:STDOUT: specific @U(constants.%J.facet.330) {}
  2172. // CHECK:STDOUT:
  2173. // CHECK:STDOUT: specific @GenericCallFI32(constants.%T) {
  2174. // CHECK:STDOUT: %T.loc8_20.2 => constants.%T
  2175. // CHECK:STDOUT: %T.as_type.loc8_45.2 => constants.%T.as_type
  2176. // CHECK:STDOUT: %pattern_type => constants.%pattern_type.b32
  2177. // CHECK:STDOUT: }
  2178. // CHECK:STDOUT:
  2179. // CHECK:STDOUT: specific @F(constants.%J.facet.487) {
  2180. // CHECK:STDOUT: %Self => constants.%J.facet.487
  2181. // CHECK:STDOUT: %J.lookup_impl_witness => constants.%J.lookup_impl_witness.bee
  2182. // CHECK:STDOUT: %impl.elem0.loc5_11.1 => constants.%impl.elem0.db9
  2183. // CHECK:STDOUT: %pattern_type => constants.%pattern_type.c1e
  2184. // CHECK:STDOUT: }
  2185. // CHECK:STDOUT:
  2186. // CHECK:STDOUT: --- fail_todo_use_associated_constant_in_impl.carbon
  2187. // CHECK:STDOUT:
  2188. // CHECK:STDOUT: constants {
  2189. // CHECK:STDOUT: %J.type: type = facet_type <@J> [concrete]
  2190. // CHECK:STDOUT: %Self.ccd: %J.type = bind_symbolic_name Self, 0 [symbolic]
  2191. // CHECK:STDOUT: %J.assoc_type: type = assoc_entity_type @J [concrete]
  2192. // CHECK:STDOUT: %assoc0.411: %J.assoc_type = assoc_entity element0, @J.%U [concrete]
  2193. // CHECK:STDOUT: %Self.as_type.3df: type = facet_access_type %Self.ccd [symbolic]
  2194. // CHECK:STDOUT: %J.lookup_impl_witness.646: <witness> = lookup_impl_witness %Self.ccd, @J [symbolic]
  2195. // CHECK:STDOUT: %J.facet.521: %J.type = facet_value %Self.as_type.3df, (%J.lookup_impl_witness.646) [symbolic]
  2196. // CHECK:STDOUT: %impl.elem0.11f: type = impl_witness_access %J.lookup_impl_witness.646, element0 [symbolic]
  2197. // CHECK:STDOUT: %pattern_type.b98: type = pattern_type %impl.elem0.11f [symbolic]
  2198. // CHECK:STDOUT: %F.type.c14: type = fn_type @F.1 [concrete]
  2199. // CHECK:STDOUT: %F.b71: %F.type.c14 = struct_value () [concrete]
  2200. // CHECK:STDOUT: %assoc1: %J.assoc_type = assoc_entity element1, @J.%F.decl [concrete]
  2201. // CHECK:STDOUT: %E: type = class_type @E [concrete]
  2202. // CHECK:STDOUT: %.Self: %J.type = bind_symbolic_name .Self [symbolic_self]
  2203. // CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self [symbolic_self]
  2204. // CHECK:STDOUT: %J.lookup_impl_witness.25c: <witness> = lookup_impl_witness %.Self, @J [symbolic_self]
  2205. // CHECK:STDOUT: %J.facet.330: %J.type = facet_value %.Self.as_type, (%J.lookup_impl_witness.25c) [symbolic_self]
  2206. // CHECK:STDOUT: %impl.elem0.83f: type = impl_witness_access %J.lookup_impl_witness.25c, element0 [symbolic_self]
  2207. // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete]
  2208. // CHECK:STDOUT: %Int.type: type = generic_class_type @Int [concrete]
  2209. // CHECK:STDOUT: %Int.generic: %Int.type = struct_value () [concrete]
  2210. // CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [concrete]
  2211. // CHECK:STDOUT: %J_where.type: type = facet_type <@J where %impl.elem0.83f = %i32> [concrete]
  2212. // CHECK:STDOUT: %J.impl_witness: <witness> = impl_witness @E.%J.impl_witness_table [concrete]
  2213. // CHECK:STDOUT: %ImplicitAs.type.cc7: type = generic_interface_type @ImplicitAs [concrete]
  2214. // CHECK:STDOUT: %ImplicitAs.generic: %ImplicitAs.type.cc7 = struct_value () [concrete]
  2215. // CHECK:STDOUT: %F.type.b842fd.1: type = fn_type @F.2 [concrete]
  2216. // CHECK:STDOUT: %F.b07d12.1: %F.type.b842fd.1 = struct_value () [concrete]
  2217. // CHECK:STDOUT: %J.facet.f43: %J.type = facet_value %E, (%J.impl_witness) [concrete]
  2218. // CHECK:STDOUT: %pattern_type.7ce: type = pattern_type %i32 [concrete]
  2219. // CHECK:STDOUT: %F.type.b842fd.2: type = fn_type @F.3 [concrete]
  2220. // CHECK:STDOUT: %F.b07d12.2: %F.type.b842fd.2 = struct_value () [concrete]
  2221. // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete]
  2222. // CHECK:STDOUT: %complete_type.357: <witness> = complete_type_witness %empty_struct_type [concrete]
  2223. // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete]
  2224. // CHECK:STDOUT: %Add.type: type = facet_type <@Add> [concrete]
  2225. // CHECK:STDOUT: }
  2226. // CHECK:STDOUT:
  2227. // CHECK:STDOUT: imports {
  2228. // CHECK:STDOUT: %Core: <namespace> = namespace file.%Core.import, [concrete] {
  2229. // CHECK:STDOUT: .Int = %Core.Int
  2230. // CHECK:STDOUT: .ImplicitAs = %Core.ImplicitAs
  2231. // CHECK:STDOUT: .Add = %Core.Add
  2232. // CHECK:STDOUT: import Core//prelude
  2233. // CHECK:STDOUT: import Core//prelude/...
  2234. // CHECK:STDOUT: }
  2235. // CHECK:STDOUT: %Core.Int: %Int.type = import_ref Core//prelude/types/int, Int, loaded [concrete = constants.%Int.generic]
  2236. // CHECK:STDOUT: %Core.ImplicitAs: %ImplicitAs.type.cc7 = import_ref Core//prelude/operators/as, ImplicitAs, loaded [concrete = constants.%ImplicitAs.generic]
  2237. // CHECK:STDOUT: %Core.Add: type = import_ref Core//prelude/operators/arithmetic, Add, loaded [concrete = constants.%Add.type]
  2238. // CHECK:STDOUT: }
  2239. // CHECK:STDOUT:
  2240. // CHECK:STDOUT: file {
  2241. // CHECK:STDOUT: package: <namespace> = namespace [concrete] {
  2242. // CHECK:STDOUT: .Core = imports.%Core
  2243. // CHECK:STDOUT: .J = %J.decl
  2244. // CHECK:STDOUT: .E = %E.decl
  2245. // CHECK:STDOUT: }
  2246. // CHECK:STDOUT: %Core.import = import Core
  2247. // CHECK:STDOUT: %J.decl: type = interface_decl @J [concrete = constants.%J.type] {} {}
  2248. // CHECK:STDOUT: %E.decl: type = class_decl @E [concrete = constants.%E] {} {}
  2249. // CHECK:STDOUT: }
  2250. // CHECK:STDOUT:
  2251. // CHECK:STDOUT: interface @J {
  2252. // CHECK:STDOUT: %Self: %J.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self.ccd]
  2253. // CHECK:STDOUT: %U: type = assoc_const_decl @U [concrete] {
  2254. // CHECK:STDOUT: %assoc0: %J.assoc_type = assoc_entity element0, @J.%U [concrete = constants.%assoc0.411]
  2255. // CHECK:STDOUT: }
  2256. // CHECK:STDOUT: %F.decl: %F.type.c14 = fn_decl @F.1 [concrete = constants.%F.b71] {
  2257. // CHECK:STDOUT: %u.patt: @F.1.%pattern_type (%pattern_type.b98) = binding_pattern u [concrete]
  2258. // CHECK:STDOUT: %u.param_patt: @F.1.%pattern_type (%pattern_type.b98) = value_param_pattern %u.patt, call_param0 [concrete]
  2259. // CHECK:STDOUT: %return.patt: @F.1.%pattern_type (%pattern_type.b98) = return_slot_pattern [concrete]
  2260. // CHECK:STDOUT: %return.param_patt: @F.1.%pattern_type (%pattern_type.b98) = out_param_pattern %return.patt, call_param1 [concrete]
  2261. // CHECK:STDOUT: } {
  2262. // CHECK:STDOUT: %impl.elem0.loc5_17: type = impl_witness_access constants.%J.lookup_impl_witness.646, element0 [symbolic = %impl.elem0.loc5_11.1 (constants.%impl.elem0.11f)]
  2263. // CHECK:STDOUT: %U.ref.loc5_17: type = name_ref U, %impl.elem0.loc5_17 [symbolic = %impl.elem0.loc5_11.1 (constants.%impl.elem0.11f)]
  2264. // CHECK:STDOUT: %u.param: @F.1.%impl.elem0.loc5_11.1 (%impl.elem0.11f) = value_param call_param0
  2265. // CHECK:STDOUT: %.loc5: type = splice_block %U.ref.loc5_11 [symbolic = %impl.elem0.loc5_11.1 (constants.%impl.elem0.11f)] {
  2266. // CHECK:STDOUT: %impl.elem0.loc5_11.2: type = impl_witness_access constants.%J.lookup_impl_witness.646, element0 [symbolic = %impl.elem0.loc5_11.1 (constants.%impl.elem0.11f)]
  2267. // CHECK:STDOUT: %U.ref.loc5_11: type = name_ref U, %impl.elem0.loc5_11.2 [symbolic = %impl.elem0.loc5_11.1 (constants.%impl.elem0.11f)]
  2268. // CHECK:STDOUT: }
  2269. // CHECK:STDOUT: %u: @F.1.%impl.elem0.loc5_11.1 (%impl.elem0.11f) = bind_name u, %u.param
  2270. // CHECK:STDOUT: %return.param: ref @F.1.%impl.elem0.loc5_11.1 (%impl.elem0.11f) = out_param call_param1
  2271. // CHECK:STDOUT: %return: ref @F.1.%impl.elem0.loc5_11.1 (%impl.elem0.11f) = return_slot %return.param
  2272. // CHECK:STDOUT: }
  2273. // CHECK:STDOUT: %assoc1: %J.assoc_type = assoc_entity element1, %F.decl [concrete = constants.%assoc1]
  2274. // CHECK:STDOUT:
  2275. // CHECK:STDOUT: !members:
  2276. // CHECK:STDOUT: .Self = %Self
  2277. // CHECK:STDOUT: .U = @U.%assoc0
  2278. // CHECK:STDOUT: .F = %assoc1
  2279. // CHECK:STDOUT: witness = (%U, %F.decl)
  2280. // CHECK:STDOUT: }
  2281. // CHECK:STDOUT:
  2282. // CHECK:STDOUT: generic assoc_const @U(@J.%Self: %J.type) {
  2283. // CHECK:STDOUT: assoc_const U:! type;
  2284. // CHECK:STDOUT: }
  2285. // CHECK:STDOUT:
  2286. // CHECK:STDOUT: impl @impl: %Self.ref as %.loc9_20 {
  2287. // CHECK:STDOUT: %F.decl.loc24_21.1: %F.type.b842fd.1 = fn_decl @F.2 [concrete = constants.%F.b07d12.1] {
  2288. // CHECK:STDOUT: %u.patt: <error> = binding_pattern u [concrete]
  2289. // CHECK:STDOUT: %u.param_patt: <error> = value_param_pattern %u.patt, call_param0 [concrete]
  2290. // CHECK:STDOUT: %return.patt: <error> = return_slot_pattern [concrete]
  2291. // CHECK:STDOUT: %return.param_patt: <error> = out_param_pattern %return.patt, call_param1 [concrete]
  2292. // CHECK:STDOUT: } {
  2293. // CHECK:STDOUT: %U.ref.loc24_19: %J.assoc_type = name_ref U, @U.%assoc0 [concrete = constants.%assoc0.411]
  2294. // CHECK:STDOUT: %.loc24_19: type = converted %U.ref.loc24_19, <error> [concrete = <error>]
  2295. // CHECK:STDOUT: %u.param: <error> = value_param call_param0
  2296. // CHECK:STDOUT: %.1: <error> = splice_block <error> [concrete = <error>] {
  2297. // CHECK:STDOUT: %U.ref.loc24_13: %J.assoc_type = name_ref U, @U.%assoc0 [concrete = constants.%assoc0.411]
  2298. // CHECK:STDOUT: %.loc24_13: type = converted %U.ref.loc24_13, <error> [concrete = <error>]
  2299. // CHECK:STDOUT: }
  2300. // CHECK:STDOUT: %u: <error> = bind_name u, %u.param
  2301. // CHECK:STDOUT: %return.param: ref <error> = out_param call_param1
  2302. // CHECK:STDOUT: %return: ref <error> = return_slot %return.param
  2303. // CHECK:STDOUT: }
  2304. // CHECK:STDOUT: %F.decl.loc24_21.2: %F.type.b842fd.2 = fn_decl @F.3 [concrete = constants.%F.b07d12.2] {
  2305. // CHECK:STDOUT: %u.patt: %pattern_type.7ce = binding_pattern u [concrete]
  2306. // CHECK:STDOUT: %u.param_patt: %pattern_type.7ce = value_param_pattern %u.patt, call_param0 [concrete]
  2307. // CHECK:STDOUT: %return.patt: %pattern_type.7ce = return_slot_pattern [concrete]
  2308. // CHECK:STDOUT: %return.param_patt: %pattern_type.7ce = out_param_pattern %return.patt, call_param1 [concrete]
  2309. // CHECK:STDOUT: } {
  2310. // CHECK:STDOUT: %u.param: %i32 = value_param call_param0
  2311. // CHECK:STDOUT: %u: %i32 = bind_name u, %u.param
  2312. // CHECK:STDOUT: %return.param: ref %i32 = out_param call_param1
  2313. // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param
  2314. // CHECK:STDOUT: }
  2315. // CHECK:STDOUT:
  2316. // CHECK:STDOUT: !members:
  2317. // CHECK:STDOUT: .U = <poisoned>
  2318. // CHECK:STDOUT: .F = %F.decl.loc24_21.1
  2319. // CHECK:STDOUT: witness = @E.%J.impl_witness
  2320. // CHECK:STDOUT: }
  2321. // CHECK:STDOUT:
  2322. // CHECK:STDOUT: class @E {
  2323. // CHECK:STDOUT: impl_decl @impl [concrete] {} {
  2324. // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%E [concrete = constants.%E]
  2325. // CHECK:STDOUT: %J.ref: type = name_ref J, file.%J.decl [concrete = constants.%J.type]
  2326. // CHECK:STDOUT: %.Self: %J.type = bind_symbolic_name .Self [symbolic_self = constants.%.Self]
  2327. // CHECK:STDOUT: %.Self.ref: %J.type = name_ref .Self, %.Self [symbolic_self = constants.%.Self]
  2328. // CHECK:STDOUT: %U.ref: %J.assoc_type = name_ref U, @U.%assoc0 [concrete = constants.%assoc0.411]
  2329. // CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self.ref [symbolic_self = constants.%.Self.as_type]
  2330. // CHECK:STDOUT: %.loc9_26: type = converted %.Self.ref, %.Self.as_type [symbolic_self = constants.%.Self.as_type]
  2331. // CHECK:STDOUT: %impl.elem0: type = impl_witness_access constants.%J.lookup_impl_witness.25c, element0 [symbolic_self = constants.%impl.elem0.83f]
  2332. // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete = constants.%int_32]
  2333. // CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32]
  2334. // CHECK:STDOUT: %.loc9_20: type = where_expr %.Self [concrete = constants.%J_where.type] {
  2335. // CHECK:STDOUT: requirement_rewrite %impl.elem0, %i32
  2336. // CHECK:STDOUT: }
  2337. // CHECK:STDOUT: }
  2338. // CHECK:STDOUT: %J.impl_witness_table = impl_witness_table (%impl_witness_assoc_constant, @impl.%F.decl.loc24_21.2), @impl [concrete]
  2339. // CHECK:STDOUT: %J.impl_witness: <witness> = impl_witness %J.impl_witness_table [concrete = constants.%J.impl_witness]
  2340. // CHECK:STDOUT: %impl_witness_assoc_constant: type = impl_witness_assoc_constant constants.%i32 [concrete = constants.%i32]
  2341. // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete = constants.%empty_struct_type]
  2342. // CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %empty_struct_type [concrete = constants.%complete_type.357]
  2343. // CHECK:STDOUT: complete_type_witness = %complete_type
  2344. // CHECK:STDOUT:
  2345. // CHECK:STDOUT: !members:
  2346. // CHECK:STDOUT: .Self = constants.%E
  2347. // CHECK:STDOUT: .J = <poisoned>
  2348. // CHECK:STDOUT: .U = <poisoned>
  2349. // CHECK:STDOUT: extend @impl.%.loc9_20
  2350. // CHECK:STDOUT: }
  2351. // CHECK:STDOUT:
  2352. // CHECK:STDOUT: generic fn @F.1(@J.%Self: %J.type) {
  2353. // CHECK:STDOUT: %Self: %J.type = bind_symbolic_name Self, 0 [symbolic = %Self (constants.%Self.ccd)]
  2354. // CHECK:STDOUT: %J.lookup_impl_witness: <witness> = lookup_impl_witness %Self, @J [symbolic = %J.lookup_impl_witness (constants.%J.lookup_impl_witness.646)]
  2355. // CHECK:STDOUT: %impl.elem0.loc5_11.1: type = impl_witness_access %J.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc5_11.1 (constants.%impl.elem0.11f)]
  2356. // CHECK:STDOUT: %pattern_type: type = pattern_type %impl.elem0.loc5_11.1 [symbolic = %pattern_type (constants.%pattern_type.b98)]
  2357. // CHECK:STDOUT:
  2358. // CHECK:STDOUT: fn(%u.param: @F.1.%impl.elem0.loc5_11.1 (%impl.elem0.11f)) -> @F.1.%impl.elem0.loc5_11.1 (%impl.elem0.11f);
  2359. // CHECK:STDOUT: }
  2360. // CHECK:STDOUT:
  2361. // CHECK:STDOUT: fn @F.2(%u.param: <error>) -> <error> {
  2362. // CHECK:STDOUT: !entry:
  2363. // CHECK:STDOUT: %u.ref: <error> = name_ref u, %u [concrete = <error>]
  2364. // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1]
  2365. // CHECK:STDOUT: %impl.elem0: <error> = impl_witness_access <error>, element0 [concrete = <error>]
  2366. // CHECK:STDOUT: return <error>
  2367. // CHECK:STDOUT: }
  2368. // CHECK:STDOUT:
  2369. // CHECK:STDOUT: fn @F.3(%u.param: %i32) -> %i32 {
  2370. // CHECK:STDOUT: !entry:
  2371. // CHECK:STDOUT: %u.ref: %i32 = name_ref u, %u.param
  2372. // CHECK:STDOUT: %F.call: init <error> = call @impl.%F.decl.loc24_21.1(<error>)
  2373. // CHECK:STDOUT: return <error>
  2374. // CHECK:STDOUT: }
  2375. // CHECK:STDOUT:
  2376. // CHECK:STDOUT: specific @U(constants.%Self.ccd) {}
  2377. // CHECK:STDOUT:
  2378. // CHECK:STDOUT: specific @U(constants.%J.facet.521) {}
  2379. // CHECK:STDOUT:
  2380. // CHECK:STDOUT: specific @F.1(constants.%Self.ccd) {
  2381. // CHECK:STDOUT: %Self => constants.%Self.ccd
  2382. // CHECK:STDOUT: %J.lookup_impl_witness => constants.%J.lookup_impl_witness.646
  2383. // CHECK:STDOUT: %impl.elem0.loc5_11.1 => constants.%impl.elem0.11f
  2384. // CHECK:STDOUT: %pattern_type => constants.%pattern_type.b98
  2385. // CHECK:STDOUT: }
  2386. // CHECK:STDOUT:
  2387. // CHECK:STDOUT: specific @U(constants.%J.facet.330) {}
  2388. // CHECK:STDOUT:
  2389. // CHECK:STDOUT: specific @F.1(constants.%J.facet.f43) {
  2390. // CHECK:STDOUT: %Self => constants.%J.facet.f43
  2391. // CHECK:STDOUT: %J.lookup_impl_witness => constants.%J.impl_witness
  2392. // CHECK:STDOUT: %impl.elem0.loc5_11.1 => constants.%i32
  2393. // CHECK:STDOUT: %pattern_type => constants.%pattern_type.7ce
  2394. // CHECK:STDOUT: }
  2395. // CHECK:STDOUT:
  2396. // CHECK:STDOUT: --- fail_todo_self_period_associated_type.carbon
  2397. // CHECK:STDOUT:
  2398. // CHECK:STDOUT: constants {
  2399. // CHECK:STDOUT: %J2.type: type = facet_type <@J2> [concrete]
  2400. // CHECK:STDOUT: %Self: %J2.type = bind_symbolic_name Self, 0 [symbolic]
  2401. // CHECK:STDOUT: %J2.assoc_type: type = assoc_entity_type @J2 [concrete]
  2402. // CHECK:STDOUT: %assoc0: %J2.assoc_type = assoc_entity element0, @J2.%U2 [concrete]
  2403. // CHECK:STDOUT: %Self.as_type: type = facet_access_type %Self [symbolic]
  2404. // CHECK:STDOUT: %pattern_type.969: type = pattern_type %Self.as_type [symbolic]
  2405. // CHECK:STDOUT: %F.type.c41: type = fn_type @F.1 [concrete]
  2406. // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete]
  2407. // CHECK:STDOUT: %F.932: %F.type.c41 = struct_value () [concrete]
  2408. // CHECK:STDOUT: %assoc1: %J2.assoc_type = assoc_entity element1, @J2.%F.decl [concrete]
  2409. // CHECK:STDOUT: %.Self: %J2.type = bind_symbolic_name .Self [symbolic_self]
  2410. // CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self [symbolic_self]
  2411. // CHECK:STDOUT: %J2.lookup_impl_witness: <witness> = lookup_impl_witness %.Self, @J2 [symbolic_self]
  2412. // CHECK:STDOUT: %J2.facet.e30: %J2.type = facet_value %.Self.as_type, (%J2.lookup_impl_witness) [symbolic_self]
  2413. // CHECK:STDOUT: %impl.elem0: type = impl_witness_access %J2.lookup_impl_witness, element0 [symbolic_self]
  2414. // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete]
  2415. // CHECK:STDOUT: %J2_where.type.9e1: type = facet_type <@J2 where %impl.elem0 = %empty_struct_type> [concrete]
  2416. // CHECK:STDOUT: %J2.impl_witness.6a9: <witness> = impl_witness file.%J2.impl_witness_table.loc22 [concrete]
  2417. // CHECK:STDOUT: %pattern_type.cb1: type = pattern_type %empty_tuple.type [concrete]
  2418. // CHECK:STDOUT: %pattern_type.a96: type = pattern_type %empty_struct_type [concrete]
  2419. // CHECK:STDOUT: %F.type.f405c5.1: type = fn_type @F.2 [concrete]
  2420. // CHECK:STDOUT: %F.214a71.1: %F.type.f405c5.1 = struct_value () [concrete]
  2421. // CHECK:STDOUT: %J2.facet.86f: %J2.type = facet_value %empty_tuple.type, (%J2.impl_witness.6a9) [concrete]
  2422. // CHECK:STDOUT: %F.type.f405c5.2: type = fn_type @F.3 [concrete]
  2423. // CHECK:STDOUT: %F.214a71.2: %F.type.f405c5.2 = struct_value () [concrete]
  2424. // CHECK:STDOUT: %C2: type = class_type @C2 [concrete]
  2425. // CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %empty_struct_type [concrete]
  2426. // CHECK:STDOUT: %J2_where.type.df9: type = facet_type <@J2 where %impl.elem0 = %C2> [concrete]
  2427. // CHECK:STDOUT: %J2.impl_witness.267: <witness> = impl_witness file.%J2.impl_witness_table.loc38 [concrete]
  2428. // CHECK:STDOUT: %pattern_type.838: type = pattern_type %C2 [concrete]
  2429. // CHECK:STDOUT: %F.type.05d6a0.1: type = fn_type @F.4 [concrete]
  2430. // CHECK:STDOUT: %F.bfa759.1: %F.type.05d6a0.1 = struct_value () [concrete]
  2431. // CHECK:STDOUT: %J2.facet.c3f: %J2.type = facet_value %C2, (%J2.impl_witness.267) [concrete]
  2432. // CHECK:STDOUT: %F.type.05d6a0.2: type = fn_type @F.5 [concrete]
  2433. // CHECK:STDOUT: %F.bfa759.2: %F.type.05d6a0.2 = struct_value () [concrete]
  2434. // CHECK:STDOUT: }
  2435. // CHECK:STDOUT:
  2436. // CHECK:STDOUT: imports {
  2437. // CHECK:STDOUT: %Core: <namespace> = namespace file.%Core.import, [concrete] {
  2438. // CHECK:STDOUT: import Core//prelude
  2439. // CHECK:STDOUT: import Core//prelude/...
  2440. // CHECK:STDOUT: }
  2441. // CHECK:STDOUT: }
  2442. // CHECK:STDOUT:
  2443. // CHECK:STDOUT: file {
  2444. // CHECK:STDOUT: package: <namespace> = namespace [concrete] {
  2445. // CHECK:STDOUT: .Core = imports.%Core
  2446. // CHECK:STDOUT: .J2 = %J2.decl
  2447. // CHECK:STDOUT: .C2 = %C2.decl
  2448. // CHECK:STDOUT: }
  2449. // CHECK:STDOUT: %Core.import = import Core
  2450. // CHECK:STDOUT: %J2.decl: type = interface_decl @J2 [concrete = constants.%J2.type] {} {}
  2451. // CHECK:STDOUT: impl_decl @impl.4e9 [concrete] {} {
  2452. // CHECK:STDOUT: %.loc22_7.1: %empty_tuple.type = tuple_literal ()
  2453. // CHECK:STDOUT: %.loc22_7.2: type = converted %.loc22_7.1, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type]
  2454. // CHECK:STDOUT: %J2.ref: type = name_ref J2, file.%J2.decl [concrete = constants.%J2.type]
  2455. // CHECK:STDOUT: %.Self: %J2.type = bind_symbolic_name .Self [symbolic_self = constants.%.Self]
  2456. // CHECK:STDOUT: %.Self.ref: %J2.type = name_ref .Self, %.Self [symbolic_self = constants.%.Self]
  2457. // CHECK:STDOUT: %U2.ref: %J2.assoc_type = name_ref U2, @U2.%assoc0 [concrete = constants.%assoc0]
  2458. // CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self.ref [symbolic_self = constants.%.Self.as_type]
  2459. // CHECK:STDOUT: %.loc22_21: type = converted %.Self.ref, %.Self.as_type [symbolic_self = constants.%.Self.as_type]
  2460. // CHECK:STDOUT: %impl.elem0: type = impl_witness_access constants.%J2.lookup_impl_witness, element0 [symbolic_self = constants.%impl.elem0]
  2461. // CHECK:STDOUT: %.loc22_28.1: %empty_struct_type = struct_literal ()
  2462. // CHECK:STDOUT: %.loc22_28.2: type = converted %.loc22_28.1, constants.%empty_struct_type [concrete = constants.%empty_struct_type]
  2463. // CHECK:STDOUT: %.loc22_15: type = where_expr %.Self [concrete = constants.%J2_where.type.9e1] {
  2464. // CHECK:STDOUT: requirement_rewrite %impl.elem0, %.loc22_28.2
  2465. // CHECK:STDOUT: }
  2466. // CHECK:STDOUT: }
  2467. // CHECK:STDOUT: %J2.impl_witness_table.loc22 = impl_witness_table (%impl_witness_assoc_constant.loc22, @impl.4e9.%F.decl.loc30_33.2), @impl.4e9 [concrete]
  2468. // CHECK:STDOUT: %J2.impl_witness.loc22: <witness> = impl_witness %J2.impl_witness_table.loc22 [concrete = constants.%J2.impl_witness.6a9]
  2469. // CHECK:STDOUT: %impl_witness_assoc_constant.loc22: type = impl_witness_assoc_constant constants.%empty_struct_type [concrete = constants.%empty_struct_type]
  2470. // CHECK:STDOUT: %C2.decl: type = class_decl @C2 [concrete = constants.%C2] {} {}
  2471. // CHECK:STDOUT: impl_decl @impl.8b3 [concrete] {} {
  2472. // CHECK:STDOUT: %C2.ref.loc38_6: type = name_ref C2, file.%C2.decl [concrete = constants.%C2]
  2473. // CHECK:STDOUT: %J2.ref: type = name_ref J2, file.%J2.decl [concrete = constants.%J2.type]
  2474. // CHECK:STDOUT: %.Self: %J2.type = bind_symbolic_name .Self [symbolic_self = constants.%.Self]
  2475. // CHECK:STDOUT: %.Self.ref: %J2.type = name_ref .Self, %.Self [symbolic_self = constants.%.Self]
  2476. // CHECK:STDOUT: %U2.ref: %J2.assoc_type = name_ref U2, @U2.%assoc0 [concrete = constants.%assoc0]
  2477. // CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self.ref [symbolic_self = constants.%.Self.as_type]
  2478. // CHECK:STDOUT: %.loc38_21: type = converted %.Self.ref, %.Self.as_type [symbolic_self = constants.%.Self.as_type]
  2479. // CHECK:STDOUT: %impl.elem0: type = impl_witness_access constants.%J2.lookup_impl_witness, element0 [symbolic_self = constants.%impl.elem0]
  2480. // CHECK:STDOUT: %C2.ref.loc38_27: type = name_ref C2, file.%C2.decl [concrete = constants.%C2]
  2481. // CHECK:STDOUT: %.loc38_15: type = where_expr %.Self [concrete = constants.%J2_where.type.df9] {
  2482. // CHECK:STDOUT: requirement_rewrite %impl.elem0, %C2.ref.loc38_27
  2483. // CHECK:STDOUT: }
  2484. // CHECK:STDOUT: }
  2485. // CHECK:STDOUT: %J2.impl_witness_table.loc38 = impl_witness_table (%impl_witness_assoc_constant.loc38, @impl.8b3.%F.decl.loc39_33.2), @impl.8b3 [concrete]
  2486. // CHECK:STDOUT: %J2.impl_witness.loc38: <witness> = impl_witness %J2.impl_witness_table.loc38 [concrete = constants.%J2.impl_witness.267]
  2487. // CHECK:STDOUT: %impl_witness_assoc_constant.loc38: type = impl_witness_assoc_constant constants.%C2 [concrete = constants.%C2]
  2488. // CHECK:STDOUT: }
  2489. // CHECK:STDOUT:
  2490. // CHECK:STDOUT: interface @J2 {
  2491. // CHECK:STDOUT: %Self: %J2.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self]
  2492. // CHECK:STDOUT: %U2: type = assoc_const_decl @U2 [concrete] {
  2493. // CHECK:STDOUT: %assoc0: %J2.assoc_type = assoc_entity element0, @J2.%U2 [concrete = constants.%assoc0]
  2494. // CHECK:STDOUT: }
  2495. // CHECK:STDOUT: %F.decl: %F.type.c41 = fn_decl @F.1 [concrete = constants.%F.932] {
  2496. // CHECK:STDOUT: %self.patt: @F.1.%pattern_type (%pattern_type.969) = binding_pattern self [concrete]
  2497. // CHECK:STDOUT: %self.param_patt: @F.1.%pattern_type (%pattern_type.969) = value_param_pattern %self.patt, call_param0 [concrete]
  2498. // CHECK:STDOUT: %z.patt: <error> = binding_pattern z [concrete]
  2499. // CHECK:STDOUT: %z.param_patt: <error> = value_param_pattern %z.patt, call_param1 [concrete]
  2500. // CHECK:STDOUT: %return.patt: <error> = return_slot_pattern [concrete]
  2501. // CHECK:STDOUT: %return.param_patt: <error> = out_param_pattern %return.patt, call_param2 [concrete]
  2502. // CHECK:STDOUT: } {
  2503. // CHECK:STDOUT: %Self.ref.loc19_35: %J2.type = name_ref Self, @J2.%Self [symbolic = %Self (constants.%Self)]
  2504. // CHECK:STDOUT: %self.param: @F.1.%Self.as_type.loc19_14.1 (%Self.as_type) = value_param call_param0
  2505. // CHECK:STDOUT: %.loc19_14.1: type = splice_block %.loc19_14.2 [symbolic = %Self.as_type.loc19_14.1 (constants.%Self.as_type)] {
  2506. // CHECK:STDOUT: %Self.ref.loc19_14: %J2.type = name_ref Self, @J2.%Self [symbolic = %Self (constants.%Self)]
  2507. // CHECK:STDOUT: %Self.as_type.loc19_14.2: type = facet_access_type %Self.ref.loc19_14 [symbolic = %Self.as_type.loc19_14.1 (constants.%Self.as_type)]
  2508. // CHECK:STDOUT: %.loc19_14.2: type = converted %Self.ref.loc19_14, %Self.as_type.loc19_14.2 [symbolic = %Self.as_type.loc19_14.1 (constants.%Self.as_type)]
  2509. // CHECK:STDOUT: }
  2510. // CHECK:STDOUT: %self: @F.1.%Self.as_type.loc19_14.1 (%Self.as_type) = bind_name self, %self.param
  2511. // CHECK:STDOUT: %z.param: <error> = value_param call_param1
  2512. // CHECK:STDOUT: %Self.ref.loc19_23: %J2.type = name_ref Self, @J2.%Self [symbolic = %Self (constants.%Self)]
  2513. // CHECK:STDOUT: %z: <error> = bind_name z, %z.param
  2514. // CHECK:STDOUT: %return.param: ref <error> = out_param call_param2
  2515. // CHECK:STDOUT: %return: ref <error> = return_slot %return.param
  2516. // CHECK:STDOUT: }
  2517. // CHECK:STDOUT: %assoc1: %J2.assoc_type = assoc_entity element1, %F.decl [concrete = constants.%assoc1]
  2518. // CHECK:STDOUT:
  2519. // CHECK:STDOUT: !members:
  2520. // CHECK:STDOUT: .Self = %Self
  2521. // CHECK:STDOUT: .U2 = @U2.%assoc0
  2522. // CHECK:STDOUT: .F = %assoc1
  2523. // CHECK:STDOUT: witness = (%U2, %F.decl)
  2524. // CHECK:STDOUT: }
  2525. // CHECK:STDOUT:
  2526. // CHECK:STDOUT: generic assoc_const @U2(@J2.%Self: %J2.type) {
  2527. // CHECK:STDOUT: assoc_const U2:! type;
  2528. // CHECK:STDOUT: }
  2529. // CHECK:STDOUT:
  2530. // CHECK:STDOUT: impl @impl.4e9: %.loc22_7.2 as %.loc22_15 {
  2531. // CHECK:STDOUT: %F.decl.loc30_33.1: %F.type.f405c5.1 = fn_decl @F.2 [concrete = constants.%F.214a71.1] {
  2532. // CHECK:STDOUT: %self.patt: %pattern_type.cb1 = binding_pattern self [concrete]
  2533. // CHECK:STDOUT: %self.param_patt: %pattern_type.cb1 = value_param_pattern %self.patt, call_param0 [concrete]
  2534. // CHECK:STDOUT: %z.patt: %pattern_type.a96 = binding_pattern z [concrete]
  2535. // CHECK:STDOUT: %z.param_patt: %pattern_type.a96 = value_param_pattern %z.patt, call_param1 [concrete]
  2536. // CHECK:STDOUT: %return.patt: %pattern_type.a96 = return_slot_pattern [concrete]
  2537. // CHECK:STDOUT: %return.param_patt: %pattern_type.a96 = out_param_pattern %return.patt, call_param2 [concrete]
  2538. // CHECK:STDOUT: } {
  2539. // CHECK:STDOUT: %.loc30_31.1: %empty_struct_type = struct_literal ()
  2540. // CHECK:STDOUT: %.loc30_31.2: type = converted %.loc30_31.1, constants.%empty_struct_type [concrete = constants.%empty_struct_type]
  2541. // CHECK:STDOUT: %self.param: %empty_tuple.type = value_param call_param0
  2542. // CHECK:STDOUT: %Self.ref: type = name_ref Self, @impl.4e9.%.loc22_7.2 [concrete = constants.%empty_tuple.type]
  2543. // CHECK:STDOUT: %self: %empty_tuple.type = bind_name self, %self.param
  2544. // CHECK:STDOUT: %z.param: %empty_struct_type = value_param call_param1
  2545. // CHECK:STDOUT: %.loc30_24.1: type = splice_block %.loc30_24.3 [concrete = constants.%empty_struct_type] {
  2546. // CHECK:STDOUT: %.loc30_24.2: %empty_struct_type = struct_literal ()
  2547. // CHECK:STDOUT: %.loc30_24.3: type = converted %.loc30_24.2, constants.%empty_struct_type [concrete = constants.%empty_struct_type]
  2548. // CHECK:STDOUT: }
  2549. // CHECK:STDOUT: %z: %empty_struct_type = bind_name z, %z.param
  2550. // CHECK:STDOUT: %return.param: ref %empty_struct_type = out_param call_param2
  2551. // CHECK:STDOUT: %return: ref %empty_struct_type = return_slot %return.param
  2552. // CHECK:STDOUT: }
  2553. // CHECK:STDOUT: %F.decl.loc30_33.2: %F.type.f405c5.2 = fn_decl @F.3 [concrete = constants.%F.214a71.2] {
  2554. // CHECK:STDOUT: %self.patt: %pattern_type.cb1 = binding_pattern self [concrete]
  2555. // CHECK:STDOUT: %self.param_patt: %pattern_type.cb1 = value_param_pattern %self.patt, call_param0 [concrete]
  2556. // CHECK:STDOUT: %.param_patt: <error> = value_param_pattern <error>, call_param1 [concrete]
  2557. // CHECK:STDOUT: %return.patt: <error> = return_slot_pattern [concrete]
  2558. // CHECK:STDOUT: %return.param_patt: <error> = out_param_pattern %return.patt, call_param2 [concrete]
  2559. // CHECK:STDOUT: } {
  2560. // CHECK:STDOUT: %self.param: %empty_tuple.type = value_param call_param0
  2561. // CHECK:STDOUT: %self: %empty_tuple.type = bind_name self, %self.param
  2562. // CHECK:STDOUT: %.param: <error> = value_param call_param1
  2563. // CHECK:STDOUT: %return.param: ref <error> = out_param call_param2
  2564. // CHECK:STDOUT: %return: ref <error> = return_slot %return.param
  2565. // CHECK:STDOUT: }
  2566. // CHECK:STDOUT:
  2567. // CHECK:STDOUT: !members:
  2568. // CHECK:STDOUT: .F = %F.decl.loc30_33.1
  2569. // CHECK:STDOUT: witness = file.%J2.impl_witness.loc22
  2570. // CHECK:STDOUT: }
  2571. // CHECK:STDOUT:
  2572. // CHECK:STDOUT: impl @impl.8b3: %C2.ref.loc38_6 as %.loc38_15 {
  2573. // CHECK:STDOUT: %F.decl.loc39_33.1: %F.type.05d6a0.1 = fn_decl @F.4 [concrete = constants.%F.bfa759.1] {
  2574. // CHECK:STDOUT: %self.patt: %pattern_type.838 = binding_pattern self [concrete]
  2575. // CHECK:STDOUT: %self.param_patt: %pattern_type.838 = value_param_pattern %self.patt, call_param0 [concrete]
  2576. // CHECK:STDOUT: %z.patt: %pattern_type.838 = binding_pattern z [concrete]
  2577. // CHECK:STDOUT: %z.param_patt: %pattern_type.838 = value_param_pattern %z.patt, call_param1 [concrete]
  2578. // CHECK:STDOUT: %return.patt: %pattern_type.838 = return_slot_pattern [concrete]
  2579. // CHECK:STDOUT: %return.param_patt: %pattern_type.838 = out_param_pattern %return.patt, call_param2 [concrete]
  2580. // CHECK:STDOUT: } {
  2581. // CHECK:STDOUT: %C2.ref.loc39_30: type = name_ref C2, file.%C2.decl [concrete = constants.%C2]
  2582. // CHECK:STDOUT: %self.param: %C2 = value_param call_param0
  2583. // CHECK:STDOUT: %Self.ref: type = name_ref Self, @impl.8b3.%C2.ref.loc38_6 [concrete = constants.%C2]
  2584. // CHECK:STDOUT: %self: %C2 = bind_name self, %self.param
  2585. // CHECK:STDOUT: %z.param: %C2 = value_param call_param1
  2586. // CHECK:STDOUT: %C2.ref.loc39_23: type = name_ref C2, file.%C2.decl [concrete = constants.%C2]
  2587. // CHECK:STDOUT: %z: %C2 = bind_name z, %z.param
  2588. // CHECK:STDOUT: %return.param: ref %C2 = out_param call_param2
  2589. // CHECK:STDOUT: %return: ref %C2 = return_slot %return.param
  2590. // CHECK:STDOUT: }
  2591. // CHECK:STDOUT: %F.decl.loc39_33.2: %F.type.05d6a0.2 = fn_decl @F.5 [concrete = constants.%F.bfa759.2] {
  2592. // CHECK:STDOUT: %self.patt: %pattern_type.838 = binding_pattern self [concrete]
  2593. // CHECK:STDOUT: %self.param_patt: %pattern_type.838 = value_param_pattern %self.patt, call_param0 [concrete]
  2594. // CHECK:STDOUT: %.param_patt: <error> = value_param_pattern <error>, call_param1 [concrete]
  2595. // CHECK:STDOUT: %return.patt: <error> = return_slot_pattern [concrete]
  2596. // CHECK:STDOUT: %return.param_patt: <error> = out_param_pattern %return.patt, call_param2 [concrete]
  2597. // CHECK:STDOUT: } {
  2598. // CHECK:STDOUT: %self.param: %C2 = value_param call_param0
  2599. // CHECK:STDOUT: %self: %C2 = bind_name self, %self.param
  2600. // CHECK:STDOUT: %.param: <error> = value_param call_param1
  2601. // CHECK:STDOUT: %return.param: ref <error> = out_param call_param2
  2602. // CHECK:STDOUT: %return: ref <error> = return_slot %return.param
  2603. // CHECK:STDOUT: }
  2604. // CHECK:STDOUT:
  2605. // CHECK:STDOUT: !members:
  2606. // CHECK:STDOUT: .C2 = <poisoned>
  2607. // CHECK:STDOUT: .F = %F.decl.loc39_33.1
  2608. // CHECK:STDOUT: witness = file.%J2.impl_witness.loc38
  2609. // CHECK:STDOUT: }
  2610. // CHECK:STDOUT:
  2611. // CHECK:STDOUT: class @C2 {
  2612. // CHECK:STDOUT: %.loc35_10: %empty_struct_type = struct_literal ()
  2613. // CHECK:STDOUT: %.loc35_11: type = converted %.loc35_10, constants.%empty_struct_type [concrete = constants.%empty_struct_type]
  2614. // CHECK:STDOUT: adapt_decl %.loc35_11 [concrete]
  2615. // CHECK:STDOUT: %complete_type: <witness> = complete_type_witness constants.%empty_struct_type [concrete = constants.%complete_type]
  2616. // CHECK:STDOUT: complete_type_witness = %complete_type
  2617. // CHECK:STDOUT:
  2618. // CHECK:STDOUT: !members:
  2619. // CHECK:STDOUT: .Self = constants.%C2
  2620. // CHECK:STDOUT: }
  2621. // CHECK:STDOUT:
  2622. // CHECK:STDOUT: generic fn @F.1(@J2.%Self: %J2.type) {
  2623. // CHECK:STDOUT: %Self: %J2.type = bind_symbolic_name Self, 0 [symbolic = %Self (constants.%Self)]
  2624. // CHECK:STDOUT: %Self.as_type.loc19_14.1: type = facet_access_type %Self [symbolic = %Self.as_type.loc19_14.1 (constants.%Self.as_type)]
  2625. // CHECK:STDOUT: %pattern_type: type = pattern_type %Self.as_type.loc19_14.1 [symbolic = %pattern_type (constants.%pattern_type.969)]
  2626. // CHECK:STDOUT:
  2627. // CHECK:STDOUT: fn(%self.param: @F.1.%Self.as_type.loc19_14.1 (%Self.as_type), %z.param: <error>) -> <error>;
  2628. // CHECK:STDOUT: }
  2629. // CHECK:STDOUT:
  2630. // CHECK:STDOUT: fn @F.2(%self.param: %empty_tuple.type, %z.param: %empty_struct_type) -> %empty_struct_type {
  2631. // CHECK:STDOUT: !entry:
  2632. // CHECK:STDOUT: %z.ref: %empty_struct_type = name_ref z, %z
  2633. // CHECK:STDOUT: return %z.ref
  2634. // CHECK:STDOUT: }
  2635. // CHECK:STDOUT:
  2636. // CHECK:STDOUT: fn @F.3(%self.param: %empty_tuple.type, %.param: <error>) -> <error> {
  2637. // CHECK:STDOUT: !entry:
  2638. // CHECK:STDOUT: %self.ref: %empty_tuple.type = name_ref self, %self.param
  2639. // CHECK:STDOUT: %.ref: <error> = name_ref <none>, %.param [concrete = <error>]
  2640. // CHECK:STDOUT: return <error>
  2641. // CHECK:STDOUT: }
  2642. // CHECK:STDOUT:
  2643. // CHECK:STDOUT: fn @F.4(%self.param: %C2, %z.param: %C2) -> %C2 {
  2644. // CHECK:STDOUT: !entry:
  2645. // CHECK:STDOUT: %self.ref: %C2 = name_ref self, %self
  2646. // CHECK:STDOUT: return %self.ref
  2647. // CHECK:STDOUT: }
  2648. // CHECK:STDOUT:
  2649. // CHECK:STDOUT: fn @F.5(%self.param: %C2, %.param: <error>) -> <error> {
  2650. // CHECK:STDOUT: !entry:
  2651. // CHECK:STDOUT: %self.ref: %C2 = name_ref self, %self.param
  2652. // CHECK:STDOUT: %F.bound: <bound method> = bound_method %self.ref, @impl.8b3.%F.decl.loc39_33.1
  2653. // CHECK:STDOUT: %.ref: <error> = name_ref <none>, %.param [concrete = <error>]
  2654. // CHECK:STDOUT: %F.call: init %C2 = call %F.bound(%self.ref, <error>)
  2655. // CHECK:STDOUT: return <error>
  2656. // CHECK:STDOUT: }
  2657. // CHECK:STDOUT:
  2658. // CHECK:STDOUT: specific @U2(constants.%Self) {}
  2659. // CHECK:STDOUT:
  2660. // CHECK:STDOUT: specific @F.1(constants.%Self) {
  2661. // CHECK:STDOUT: %Self => constants.%Self
  2662. // CHECK:STDOUT: %Self.as_type.loc19_14.1 => constants.%Self.as_type
  2663. // CHECK:STDOUT: %pattern_type => constants.%pattern_type.969
  2664. // CHECK:STDOUT: }
  2665. // CHECK:STDOUT:
  2666. // CHECK:STDOUT: specific @U2(constants.%J2.facet.e30) {}
  2667. // CHECK:STDOUT:
  2668. // CHECK:STDOUT: specific @F.1(constants.%J2.facet.86f) {
  2669. // CHECK:STDOUT: %Self => constants.%J2.facet.86f
  2670. // CHECK:STDOUT: %Self.as_type.loc19_14.1 => constants.%empty_tuple.type
  2671. // CHECK:STDOUT: %pattern_type => constants.%pattern_type.cb1
  2672. // CHECK:STDOUT: }
  2673. // CHECK:STDOUT:
  2674. // CHECK:STDOUT: specific @F.1(constants.%J2.facet.c3f) {
  2675. // CHECK:STDOUT: %Self => constants.%J2.facet.c3f
  2676. // CHECK:STDOUT: %Self.as_type.loc19_14.1 => constants.%C2
  2677. // CHECK:STDOUT: %pattern_type => constants.%pattern_type.838
  2678. // CHECK:STDOUT: }
  2679. // CHECK:STDOUT:
  2680. // CHECK:STDOUT: --- fail_associated_type_in_signature_mismatch.carbon
  2681. // CHECK:STDOUT:
  2682. // CHECK:STDOUT: constants {
  2683. // CHECK:STDOUT: %K.type: type = facet_type <@K> [concrete]
  2684. // CHECK:STDOUT: %Self: %K.type = bind_symbolic_name Self, 0 [symbolic]
  2685. // CHECK:STDOUT: %K.assoc_type: type = assoc_entity_type @K [concrete]
  2686. // CHECK:STDOUT: %assoc0: %K.assoc_type = assoc_entity element0, @K.%V [concrete]
  2687. // CHECK:STDOUT: %Self.as_type: type = facet_access_type %Self [symbolic]
  2688. // CHECK:STDOUT: %pattern_type.ca1: type = pattern_type %Self.as_type [symbolic]
  2689. // CHECK:STDOUT: %K.lookup_impl_witness.da8: <witness> = lookup_impl_witness %Self, @K [symbolic]
  2690. // CHECK:STDOUT: %K.facet.589: %K.type = facet_value %Self.as_type, (%K.lookup_impl_witness.da8) [symbolic]
  2691. // CHECK:STDOUT: %impl.elem0.75d: type = impl_witness_access %K.lookup_impl_witness.da8, element0 [symbolic]
  2692. // CHECK:STDOUT: %pattern_type.6c7: type = pattern_type %impl.elem0.75d [symbolic]
  2693. // CHECK:STDOUT: %F.type.cf5: type = fn_type @F.1 [concrete]
  2694. // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete]
  2695. // CHECK:STDOUT: %F.06b: %F.type.cf5 = struct_value () [concrete]
  2696. // CHECK:STDOUT: %assoc1: %K.assoc_type = assoc_entity element1, @K.%F.decl [concrete]
  2697. // CHECK:STDOUT: %.Self: %K.type = bind_symbolic_name .Self [symbolic_self]
  2698. // CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self [symbolic_self]
  2699. // CHECK:STDOUT: %K.lookup_impl_witness.eb2: <witness> = lookup_impl_witness %.Self, @K [symbolic_self]
  2700. // CHECK:STDOUT: %K.facet.b09: %K.type = facet_value %.Self.as_type, (%K.lookup_impl_witness.eb2) [symbolic_self]
  2701. // CHECK:STDOUT: %impl.elem0.52c: type = impl_witness_access %K.lookup_impl_witness.eb2, element0 [symbolic_self]
  2702. // CHECK:STDOUT: %struct_type.a: type = struct_type {.a: %empty_tuple.type} [concrete]
  2703. // CHECK:STDOUT: %K_where.type: type = facet_type <@K where %impl.elem0.52c = %struct_type.a> [concrete]
  2704. // CHECK:STDOUT: %K.impl_witness: <witness> = impl_witness file.%K.impl_witness_table [concrete]
  2705. // CHECK:STDOUT: %pattern_type.cb1: type = pattern_type %empty_tuple.type [concrete]
  2706. // CHECK:STDOUT: %struct_type.x: type = struct_type {.x: %empty_tuple.type} [concrete]
  2707. // CHECK:STDOUT: %pattern_type.414: type = pattern_type %struct_type.x [concrete]
  2708. // CHECK:STDOUT: %F.type.c5249c.1: type = fn_type @F.2 [concrete]
  2709. // CHECK:STDOUT: %F.5eb4dd.1: %F.type.c5249c.1 = struct_value () [concrete]
  2710. // CHECK:STDOUT: %K.facet.e32: %K.type = facet_value %empty_tuple.type, (%K.impl_witness) [concrete]
  2711. // CHECK:STDOUT: %pattern_type.e85: type = pattern_type %struct_type.a [concrete]
  2712. // CHECK:STDOUT: %F.type.c5249c.2: type = fn_type @F.3 [concrete]
  2713. // CHECK:STDOUT: %F.5eb4dd.2: %F.type.c5249c.2 = struct_value () [concrete]
  2714. // CHECK:STDOUT: }
  2715. // CHECK:STDOUT:
  2716. // CHECK:STDOUT: imports {
  2717. // CHECK:STDOUT: %Core: <namespace> = namespace file.%Core.import, [concrete] {
  2718. // CHECK:STDOUT: import Core//prelude
  2719. // CHECK:STDOUT: import Core//prelude/...
  2720. // CHECK:STDOUT: }
  2721. // CHECK:STDOUT: }
  2722. // CHECK:STDOUT:
  2723. // CHECK:STDOUT: file {
  2724. // CHECK:STDOUT: package: <namespace> = namespace [concrete] {
  2725. // CHECK:STDOUT: .Core = imports.%Core
  2726. // CHECK:STDOUT: .K = %K.decl
  2727. // CHECK:STDOUT: }
  2728. // CHECK:STDOUT: %Core.import = import Core
  2729. // CHECK:STDOUT: %K.decl: type = interface_decl @K [concrete = constants.%K.type] {} {}
  2730. // CHECK:STDOUT: impl_decl @impl [concrete] {} {
  2731. // CHECK:STDOUT: %.loc8_7.1: %empty_tuple.type = tuple_literal ()
  2732. // CHECK:STDOUT: %.loc8_7.2: type = converted %.loc8_7.1, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type]
  2733. // CHECK:STDOUT: %K.ref: type = name_ref K, file.%K.decl [concrete = constants.%K.type]
  2734. // CHECK:STDOUT: %.Self: %K.type = bind_symbolic_name .Self [symbolic_self = constants.%.Self]
  2735. // CHECK:STDOUT: %.Self.ref: %K.type = name_ref .Self, %.Self [symbolic_self = constants.%.Self]
  2736. // CHECK:STDOUT: %V.ref: %K.assoc_type = name_ref V, @V.%assoc0 [concrete = constants.%assoc0]
  2737. // CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self.ref [symbolic_self = constants.%.Self.as_type]
  2738. // CHECK:STDOUT: %.loc8_20: type = converted %.Self.ref, %.Self.as_type [symbolic_self = constants.%.Self.as_type]
  2739. // CHECK:STDOUT: %impl.elem0: type = impl_witness_access constants.%K.lookup_impl_witness.eb2, element0 [symbolic_self = constants.%impl.elem0.52c]
  2740. // CHECK:STDOUT: %.loc8_31.1: %empty_tuple.type = tuple_literal ()
  2741. // CHECK:STDOUT: %.loc8_31.2: type = converted %.loc8_31.1, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type]
  2742. // CHECK:STDOUT: %struct_type.a: type = struct_type {.a: %empty_tuple.type} [concrete = constants.%struct_type.a]
  2743. // CHECK:STDOUT: %.loc8_14: type = where_expr %.Self [concrete = constants.%K_where.type] {
  2744. // CHECK:STDOUT: requirement_rewrite %impl.elem0, %struct_type.a
  2745. // CHECK:STDOUT: }
  2746. // CHECK:STDOUT: }
  2747. // CHECK:STDOUT: %K.impl_witness_table = impl_witness_table (%impl_witness_assoc_constant, @impl.%F.decl.loc16_45.2), @impl [concrete]
  2748. // CHECK:STDOUT: %K.impl_witness: <witness> = impl_witness %K.impl_witness_table [concrete = constants.%K.impl_witness]
  2749. // CHECK:STDOUT: %impl_witness_assoc_constant: type = impl_witness_assoc_constant constants.%struct_type.a [concrete = constants.%struct_type.a]
  2750. // CHECK:STDOUT: }
  2751. // CHECK:STDOUT:
  2752. // CHECK:STDOUT: interface @K {
  2753. // CHECK:STDOUT: %Self: %K.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self]
  2754. // CHECK:STDOUT: %V: type = assoc_const_decl @V [concrete] {
  2755. // CHECK:STDOUT: %assoc0: %K.assoc_type = assoc_entity element0, @K.%V [concrete = constants.%assoc0]
  2756. // CHECK:STDOUT: }
  2757. // CHECK:STDOUT: %F.decl: %F.type.cf5 = fn_decl @F.1 [concrete = constants.%F.06b] {
  2758. // CHECK:STDOUT: %self.patt: @F.1.%pattern_type.loc5_8 (%pattern_type.ca1) = binding_pattern self [concrete]
  2759. // CHECK:STDOUT: %self.param_patt: @F.1.%pattern_type.loc5_8 (%pattern_type.ca1) = value_param_pattern %self.patt, call_param0 [concrete]
  2760. // CHECK:STDOUT: %v.patt: @F.1.%pattern_type.loc5_20 (%pattern_type.6c7) = binding_pattern v [concrete]
  2761. // CHECK:STDOUT: %v.param_patt: @F.1.%pattern_type.loc5_20 (%pattern_type.6c7) = value_param_pattern %v.patt, call_param1 [concrete]
  2762. // CHECK:STDOUT: %return.patt: @F.1.%pattern_type.loc5_20 (%pattern_type.6c7) = return_slot_pattern [concrete]
  2763. // CHECK:STDOUT: %return.param_patt: @F.1.%pattern_type.loc5_20 (%pattern_type.6c7) = out_param_pattern %return.patt, call_param2 [concrete]
  2764. // CHECK:STDOUT: } {
  2765. // CHECK:STDOUT: %impl.elem0.loc5_29: type = impl_witness_access constants.%K.lookup_impl_witness.da8, element0 [symbolic = %impl.elem0.loc5_23.1 (constants.%impl.elem0.75d)]
  2766. // CHECK:STDOUT: %V.ref.loc5_29: type = name_ref V, %impl.elem0.loc5_29 [symbolic = %impl.elem0.loc5_23.1 (constants.%impl.elem0.75d)]
  2767. // CHECK:STDOUT: %self.param: @F.1.%Self.as_type.loc5_14.1 (%Self.as_type) = value_param call_param0
  2768. // CHECK:STDOUT: %.loc5_14.1: type = splice_block %.loc5_14.2 [symbolic = %Self.as_type.loc5_14.1 (constants.%Self.as_type)] {
  2769. // CHECK:STDOUT: %Self.ref: %K.type = name_ref Self, @K.%Self [symbolic = %Self (constants.%Self)]
  2770. // CHECK:STDOUT: %Self.as_type.loc5_14.2: type = facet_access_type %Self.ref [symbolic = %Self.as_type.loc5_14.1 (constants.%Self.as_type)]
  2771. // CHECK:STDOUT: %.loc5_14.2: type = converted %Self.ref, %Self.as_type.loc5_14.2 [symbolic = %Self.as_type.loc5_14.1 (constants.%Self.as_type)]
  2772. // CHECK:STDOUT: }
  2773. // CHECK:STDOUT: %self: @F.1.%Self.as_type.loc5_14.1 (%Self.as_type) = bind_name self, %self.param
  2774. // CHECK:STDOUT: %v.param: @F.1.%impl.elem0.loc5_23.1 (%impl.elem0.75d) = value_param call_param1
  2775. // CHECK:STDOUT: %.loc5_23: type = splice_block %V.ref.loc5_23 [symbolic = %impl.elem0.loc5_23.1 (constants.%impl.elem0.75d)] {
  2776. // CHECK:STDOUT: %impl.elem0.loc5_23.2: type = impl_witness_access constants.%K.lookup_impl_witness.da8, element0 [symbolic = %impl.elem0.loc5_23.1 (constants.%impl.elem0.75d)]
  2777. // CHECK:STDOUT: %V.ref.loc5_23: type = name_ref V, %impl.elem0.loc5_23.2 [symbolic = %impl.elem0.loc5_23.1 (constants.%impl.elem0.75d)]
  2778. // CHECK:STDOUT: }
  2779. // CHECK:STDOUT: %v: @F.1.%impl.elem0.loc5_23.1 (%impl.elem0.75d) = bind_name v, %v.param
  2780. // CHECK:STDOUT: %return.param: ref @F.1.%impl.elem0.loc5_23.1 (%impl.elem0.75d) = out_param call_param2
  2781. // CHECK:STDOUT: %return: ref @F.1.%impl.elem0.loc5_23.1 (%impl.elem0.75d) = return_slot %return.param
  2782. // CHECK:STDOUT: }
  2783. // CHECK:STDOUT: %assoc1: %K.assoc_type = assoc_entity element1, %F.decl [concrete = constants.%assoc1]
  2784. // CHECK:STDOUT:
  2785. // CHECK:STDOUT: !members:
  2786. // CHECK:STDOUT: .Self = %Self
  2787. // CHECK:STDOUT: .V = @V.%assoc0
  2788. // CHECK:STDOUT: .F = %assoc1
  2789. // CHECK:STDOUT: witness = (%V, %F.decl)
  2790. // CHECK:STDOUT: }
  2791. // CHECK:STDOUT:
  2792. // CHECK:STDOUT: generic assoc_const @V(@K.%Self: %K.type) {
  2793. // CHECK:STDOUT: assoc_const V:! type;
  2794. // CHECK:STDOUT: }
  2795. // CHECK:STDOUT:
  2796. // CHECK:STDOUT: impl @impl: %.loc8_7.2 as %.loc8_14 {
  2797. // CHECK:STDOUT: %F.decl.loc16_45.1: %F.type.c5249c.1 = fn_decl @F.2 [concrete = constants.%F.5eb4dd.1] {
  2798. // CHECK:STDOUT: %self.patt: %pattern_type.cb1 = binding_pattern self [concrete]
  2799. // CHECK:STDOUT: %self.param_patt: %pattern_type.cb1 = value_param_pattern %self.patt, call_param0 [concrete]
  2800. // CHECK:STDOUT: %v.patt: %pattern_type.414 = binding_pattern v [concrete]
  2801. // CHECK:STDOUT: %v.param_patt: %pattern_type.414 = value_param_pattern %v.patt, call_param1 [concrete]
  2802. // CHECK:STDOUT: %return.patt: %pattern_type.414 = return_slot_pattern [concrete]
  2803. // CHECK:STDOUT: %return.param_patt: %pattern_type.414 = out_param_pattern %return.patt, call_param2 [concrete]
  2804. // CHECK:STDOUT: } {
  2805. // CHECK:STDOUT: %.loc16_42.1: %empty_tuple.type = tuple_literal ()
  2806. // CHECK:STDOUT: %.loc16_42.2: type = converted %.loc16_42.1, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type]
  2807. // CHECK:STDOUT: %struct_type.x.loc16_43: type = struct_type {.x: %empty_tuple.type} [concrete = constants.%struct_type.x]
  2808. // CHECK:STDOUT: %self.param: %empty_tuple.type = value_param call_param0
  2809. // CHECK:STDOUT: %Self.ref: type = name_ref Self, @impl.%.loc8_7.2 [concrete = constants.%empty_tuple.type]
  2810. // CHECK:STDOUT: %self: %empty_tuple.type = bind_name self, %self.param
  2811. // CHECK:STDOUT: %v.param: %struct_type.x = value_param call_param1
  2812. // CHECK:STDOUT: %.loc16_30: type = splice_block %struct_type.x.loc16_30 [concrete = constants.%struct_type.x] {
  2813. // CHECK:STDOUT: %.loc16_29.1: %empty_tuple.type = tuple_literal ()
  2814. // CHECK:STDOUT: %.loc16_29.2: type = converted %.loc16_29.1, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type]
  2815. // CHECK:STDOUT: %struct_type.x.loc16_30: type = struct_type {.x: %empty_tuple.type} [concrete = constants.%struct_type.x]
  2816. // CHECK:STDOUT: }
  2817. // CHECK:STDOUT: %v: %struct_type.x = bind_name v, %v.param
  2818. // CHECK:STDOUT: %return.param: ref %struct_type.x = out_param call_param2
  2819. // CHECK:STDOUT: %return: ref %struct_type.x = return_slot %return.param
  2820. // CHECK:STDOUT: }
  2821. // CHECK:STDOUT: %F.decl.loc16_45.2: %F.type.c5249c.2 = fn_decl @F.3 [concrete = constants.%F.5eb4dd.2] {
  2822. // CHECK:STDOUT: %self.patt: %pattern_type.cb1 = binding_pattern self [concrete]
  2823. // CHECK:STDOUT: %self.param_patt: %pattern_type.cb1 = value_param_pattern %self.patt, call_param0 [concrete]
  2824. // CHECK:STDOUT: %v.patt: %pattern_type.e85 = binding_pattern v [concrete]
  2825. // CHECK:STDOUT: %v.param_patt: %pattern_type.e85 = value_param_pattern %v.patt, call_param1 [concrete]
  2826. // CHECK:STDOUT: %return.patt: %pattern_type.e85 = return_slot_pattern [concrete]
  2827. // CHECK:STDOUT: %return.param_patt: %pattern_type.e85 = out_param_pattern %return.patt, call_param2 [concrete]
  2828. // CHECK:STDOUT: } {
  2829. // CHECK:STDOUT: %self.param: %empty_tuple.type = value_param call_param0
  2830. // CHECK:STDOUT: %self: %empty_tuple.type = bind_name self, %self.param
  2831. // CHECK:STDOUT: %v.param: %struct_type.a = value_param call_param1
  2832. // CHECK:STDOUT: %v: %struct_type.a = bind_name v, %v.param
  2833. // CHECK:STDOUT: %return.param: ref %struct_type.a = out_param call_param2
  2834. // CHECK:STDOUT: %return: ref %struct_type.a = return_slot %return.param
  2835. // CHECK:STDOUT: }
  2836. // CHECK:STDOUT:
  2837. // CHECK:STDOUT: !members:
  2838. // CHECK:STDOUT: .F = %F.decl.loc16_45.1
  2839. // CHECK:STDOUT: witness = file.%K.impl_witness
  2840. // CHECK:STDOUT: }
  2841. // CHECK:STDOUT:
  2842. // CHECK:STDOUT: generic fn @F.1(@K.%Self: %K.type) {
  2843. // CHECK:STDOUT: %Self: %K.type = bind_symbolic_name Self, 0 [symbolic = %Self (constants.%Self)]
  2844. // CHECK:STDOUT: %Self.as_type.loc5_14.1: type = facet_access_type %Self [symbolic = %Self.as_type.loc5_14.1 (constants.%Self.as_type)]
  2845. // CHECK:STDOUT: %pattern_type.loc5_8: type = pattern_type %Self.as_type.loc5_14.1 [symbolic = %pattern_type.loc5_8 (constants.%pattern_type.ca1)]
  2846. // CHECK:STDOUT: %K.lookup_impl_witness: <witness> = lookup_impl_witness %Self, @K [symbolic = %K.lookup_impl_witness (constants.%K.lookup_impl_witness.da8)]
  2847. // CHECK:STDOUT: %impl.elem0.loc5_23.1: type = impl_witness_access %K.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc5_23.1 (constants.%impl.elem0.75d)]
  2848. // CHECK:STDOUT: %pattern_type.loc5_20: type = pattern_type %impl.elem0.loc5_23.1 [symbolic = %pattern_type.loc5_20 (constants.%pattern_type.6c7)]
  2849. // CHECK:STDOUT:
  2850. // CHECK:STDOUT: fn(%self.param: @F.1.%Self.as_type.loc5_14.1 (%Self.as_type), %v.param: @F.1.%impl.elem0.loc5_23.1 (%impl.elem0.75d)) -> @F.1.%impl.elem0.loc5_23.1 (%impl.elem0.75d);
  2851. // CHECK:STDOUT: }
  2852. // CHECK:STDOUT:
  2853. // CHECK:STDOUT: fn @F.2(%self.param: %empty_tuple.type, %v.param: %struct_type.x) -> %struct_type.x {
  2854. // CHECK:STDOUT: !entry:
  2855. // CHECK:STDOUT: %v.ref: %struct_type.x = name_ref v, %v
  2856. // CHECK:STDOUT: return %v.ref
  2857. // CHECK:STDOUT: }
  2858. // CHECK:STDOUT:
  2859. // CHECK:STDOUT: fn @F.3(%self.param: %empty_tuple.type, %v.param: %struct_type.a) -> %struct_type.a {
  2860. // CHECK:STDOUT: !entry:
  2861. // CHECK:STDOUT: %self.ref: %empty_tuple.type = name_ref self, %self.param
  2862. // CHECK:STDOUT: %v.ref: %struct_type.a = name_ref v, %v.param
  2863. // CHECK:STDOUT: return <error>
  2864. // CHECK:STDOUT: }
  2865. // CHECK:STDOUT:
  2866. // CHECK:STDOUT: specific @V(constants.%Self) {}
  2867. // CHECK:STDOUT:
  2868. // CHECK:STDOUT: specific @V(constants.%K.facet.589) {}
  2869. // CHECK:STDOUT:
  2870. // CHECK:STDOUT: specific @F.1(constants.%Self) {
  2871. // CHECK:STDOUT: %Self => constants.%Self
  2872. // CHECK:STDOUT: %Self.as_type.loc5_14.1 => constants.%Self.as_type
  2873. // CHECK:STDOUT: %pattern_type.loc5_8 => constants.%pattern_type.ca1
  2874. // CHECK:STDOUT: %K.lookup_impl_witness => constants.%K.lookup_impl_witness.da8
  2875. // CHECK:STDOUT: %impl.elem0.loc5_23.1 => constants.%impl.elem0.75d
  2876. // CHECK:STDOUT: %pattern_type.loc5_20 => constants.%pattern_type.6c7
  2877. // CHECK:STDOUT: }
  2878. // CHECK:STDOUT:
  2879. // CHECK:STDOUT: specific @V(constants.%K.facet.b09) {}
  2880. // CHECK:STDOUT:
  2881. // CHECK:STDOUT: specific @F.1(constants.%K.facet.e32) {
  2882. // CHECK:STDOUT: %Self => constants.%K.facet.e32
  2883. // CHECK:STDOUT: %Self.as_type.loc5_14.1 => constants.%empty_tuple.type
  2884. // CHECK:STDOUT: %pattern_type.loc5_8 => constants.%pattern_type.cb1
  2885. // CHECK:STDOUT: %K.lookup_impl_witness => constants.%K.impl_witness
  2886. // CHECK:STDOUT: %impl.elem0.loc5_23.1 => constants.%struct_type.a
  2887. // CHECK:STDOUT: %pattern_type.loc5_20 => constants.%pattern_type.e85
  2888. // CHECK:STDOUT: }
  2889. // CHECK:STDOUT:
  2890. // CHECK:STDOUT: --- use_non-type_in_function.carbon
  2891. // CHECK:STDOUT:
  2892. // CHECK:STDOUT: constants {
  2893. // CHECK:STDOUT: %M.type: type = facet_type <@M> [concrete]
  2894. // CHECK:STDOUT: %Self: %M.type = bind_symbolic_name Self, 0 [symbolic]
  2895. // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete]
  2896. // CHECK:STDOUT: %struct_type.b.347: type = struct_type {.b: %empty_struct_type} [concrete]
  2897. // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete]
  2898. // CHECK:STDOUT: %M.assoc_type: type = assoc_entity_type @M [concrete]
  2899. // CHECK:STDOUT: %assoc0: %M.assoc_type = assoc_entity element0, @M.%Z [concrete]
  2900. // CHECK:STDOUT: %pattern_type: type = pattern_type %empty_struct_type [concrete]
  2901. // CHECK:STDOUT: %G.type.020: type = fn_type @G.1 [concrete]
  2902. // CHECK:STDOUT: %G.91c: %G.type.020 = struct_value () [concrete]
  2903. // CHECK:STDOUT: %assoc1: %M.assoc_type = assoc_entity element1, @M.%G.decl [concrete]
  2904. // CHECK:STDOUT: %.Self: %M.type = bind_symbolic_name .Self [symbolic_self]
  2905. // CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self [symbolic_self]
  2906. // CHECK:STDOUT: %M.lookup_impl_witness: <witness> = lookup_impl_witness %.Self, @M [symbolic_self]
  2907. // CHECK:STDOUT: %M.facet.caa: %M.type = facet_value %.Self.as_type, (%M.lookup_impl_witness) [symbolic_self]
  2908. // CHECK:STDOUT: %impl.elem0: %struct_type.b.347 = impl_witness_access %M.lookup_impl_witness, element0 [symbolic_self]
  2909. // CHECK:STDOUT: %empty_struct: %empty_struct_type = struct_value () [concrete]
  2910. // CHECK:STDOUT: %struct: %struct_type.b.347 = struct_value (%empty_struct) [concrete]
  2911. // CHECK:STDOUT: %M_where.type: type = facet_type <@M where %impl.elem0 = %struct> [concrete]
  2912. // CHECK:STDOUT: %M.impl_witness: <witness> = impl_witness file.%M.impl_witness_table [concrete]
  2913. // CHECK:STDOUT: %G.type.8d1: type = fn_type @G.2 [concrete]
  2914. // CHECK:STDOUT: %G.bb3: %G.type.8d1 = struct_value () [concrete]
  2915. // CHECK:STDOUT: %M.facet.56b: %M.type = facet_value %empty_tuple.type, (%M.impl_witness) [concrete]
  2916. // CHECK:STDOUT: }
  2917. // CHECK:STDOUT:
  2918. // CHECK:STDOUT: imports {
  2919. // CHECK:STDOUT: %Core: <namespace> = namespace file.%Core.import, [concrete] {
  2920. // CHECK:STDOUT: import Core//prelude
  2921. // CHECK:STDOUT: import Core//prelude/...
  2922. // CHECK:STDOUT: }
  2923. // CHECK:STDOUT: }
  2924. // CHECK:STDOUT:
  2925. // CHECK:STDOUT: file {
  2926. // CHECK:STDOUT: package: <namespace> = namespace [concrete] {
  2927. // CHECK:STDOUT: .Core = imports.%Core
  2928. // CHECK:STDOUT: .M = %M.decl
  2929. // CHECK:STDOUT: }
  2930. // CHECK:STDOUT: %Core.import = import Core
  2931. // CHECK:STDOUT: %M.decl: type = interface_decl @M [concrete = constants.%M.type] {} {}
  2932. // CHECK:STDOUT: impl_decl @impl [concrete] {} {
  2933. // CHECK:STDOUT: %.loc8_7.1: %empty_tuple.type = tuple_literal ()
  2934. // CHECK:STDOUT: %.loc8_7.2: type = converted %.loc8_7.1, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type]
  2935. // CHECK:STDOUT: %M.ref: type = name_ref M, file.%M.decl [concrete = constants.%M.type]
  2936. // CHECK:STDOUT: %.Self: %M.type = bind_symbolic_name .Self [symbolic_self = constants.%.Self]
  2937. // CHECK:STDOUT: %.Self.ref: %M.type = name_ref .Self, %.Self [symbolic_self = constants.%.Self]
  2938. // CHECK:STDOUT: %Z.ref: %M.assoc_type = name_ref Z, @Z.%assoc0 [concrete = constants.%assoc0]
  2939. // CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self.ref [symbolic_self = constants.%.Self.as_type]
  2940. // CHECK:STDOUT: %.loc8_20: type = converted %.Self.ref, %.Self.as_type [symbolic_self = constants.%.Self.as_type]
  2941. // CHECK:STDOUT: %impl.elem0: %struct_type.b.347 = impl_witness_access constants.%M.lookup_impl_witness, element0 [symbolic_self = constants.%impl.elem0]
  2942. // CHECK:STDOUT: %.loc8_32: %empty_struct_type = struct_literal ()
  2943. // CHECK:STDOUT: %.loc8_33.1: %struct_type.b.347 = struct_literal (%.loc8_32)
  2944. // CHECK:STDOUT: %empty_struct: %empty_struct_type = struct_value () [concrete = constants.%empty_struct]
  2945. // CHECK:STDOUT: %.loc8_33.2: %empty_struct_type = converted %.loc8_32, %empty_struct [concrete = constants.%empty_struct]
  2946. // CHECK:STDOUT: %struct: %struct_type.b.347 = struct_value (%.loc8_33.2) [concrete = constants.%struct]
  2947. // CHECK:STDOUT: %.loc8_33.3: %struct_type.b.347 = converted %.loc8_33.1, %struct [concrete = constants.%struct]
  2948. // CHECK:STDOUT: %.loc8_14: type = where_expr %.Self [concrete = constants.%M_where.type] {
  2949. // CHECK:STDOUT: requirement_rewrite %impl.elem0, %.loc8_33.3
  2950. // CHECK:STDOUT: }
  2951. // CHECK:STDOUT: }
  2952. // CHECK:STDOUT: %M.impl_witness_table = impl_witness_table (%impl_witness_assoc_constant, @impl.%G.decl), @impl [concrete]
  2953. // CHECK:STDOUT: %M.impl_witness: <witness> = impl_witness %M.impl_witness_table [concrete = constants.%M.impl_witness]
  2954. // CHECK:STDOUT: %impl_witness_assoc_constant: %struct_type.b.347 = impl_witness_assoc_constant constants.%struct [concrete = constants.%struct]
  2955. // CHECK:STDOUT: }
  2956. // CHECK:STDOUT:
  2957. // CHECK:STDOUT: interface @M {
  2958. // CHECK:STDOUT: %Self: %M.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self]
  2959. // CHECK:STDOUT: %Z: %struct_type.b.347 = assoc_const_decl @Z [concrete] {
  2960. // CHECK:STDOUT: %assoc0: %M.assoc_type = assoc_entity element0, @M.%Z [concrete = constants.%assoc0]
  2961. // CHECK:STDOUT: }
  2962. // CHECK:STDOUT: %G.decl: %G.type.020 = fn_decl @G.1 [concrete = constants.%G.91c] {
  2963. // CHECK:STDOUT: %return.patt: %pattern_type = return_slot_pattern [concrete]
  2964. // CHECK:STDOUT: %return.param_patt: %pattern_type = out_param_pattern %return.patt, call_param0 [concrete]
  2965. // CHECK:STDOUT: } {
  2966. // CHECK:STDOUT: %.loc5_14.1: %empty_struct_type = struct_literal ()
  2967. // CHECK:STDOUT: %.loc5_14.2: type = converted %.loc5_14.1, constants.%empty_struct_type [concrete = constants.%empty_struct_type]
  2968. // CHECK:STDOUT: %return.param: ref %empty_struct_type = out_param call_param0
  2969. // CHECK:STDOUT: %return: ref %empty_struct_type = return_slot %return.param
  2970. // CHECK:STDOUT: }
  2971. // CHECK:STDOUT: %assoc1: %M.assoc_type = assoc_entity element1, %G.decl [concrete = constants.%assoc1]
  2972. // CHECK:STDOUT:
  2973. // CHECK:STDOUT: !members:
  2974. // CHECK:STDOUT: .Self = %Self
  2975. // CHECK:STDOUT: .Z = @Z.%assoc0
  2976. // CHECK:STDOUT: .G = %assoc1
  2977. // CHECK:STDOUT: witness = (%Z, %G.decl)
  2978. // CHECK:STDOUT: }
  2979. // CHECK:STDOUT:
  2980. // CHECK:STDOUT: generic assoc_const @Z(@M.%Self: %M.type) {
  2981. // CHECK:STDOUT: assoc_const Z:! %struct_type.b.347;
  2982. // CHECK:STDOUT: }
  2983. // CHECK:STDOUT:
  2984. // CHECK:STDOUT: impl @impl: %.loc8_7.2 as %.loc8_14 {
  2985. // CHECK:STDOUT: %G.decl: %G.type.8d1 = fn_decl @G.2 [concrete = constants.%G.bb3] {
  2986. // CHECK:STDOUT: %return.patt: %pattern_type = return_slot_pattern [concrete]
  2987. // CHECK:STDOUT: %return.param_patt: %pattern_type = out_param_pattern %return.patt, call_param0 [concrete]
  2988. // CHECK:STDOUT: } {
  2989. // CHECK:STDOUT: %.loc9_14.1: %empty_struct_type = struct_literal ()
  2990. // CHECK:STDOUT: %.loc9_14.2: type = converted %.loc9_14.1, constants.%empty_struct_type [concrete = constants.%empty_struct_type]
  2991. // CHECK:STDOUT: %return.param: ref %empty_struct_type = out_param call_param0
  2992. // CHECK:STDOUT: %return: ref %empty_struct_type = return_slot %return.param
  2993. // CHECK:STDOUT: }
  2994. // CHECK:STDOUT:
  2995. // CHECK:STDOUT: !members:
  2996. // CHECK:STDOUT: .G = %G.decl
  2997. // CHECK:STDOUT: .M = <poisoned>
  2998. // CHECK:STDOUT: witness = file.%M.impl_witness
  2999. // CHECK:STDOUT: }
  3000. // CHECK:STDOUT:
  3001. // CHECK:STDOUT: generic fn @G.1(@M.%Self: %M.type) {
  3002. // CHECK:STDOUT: fn() -> %empty_struct_type;
  3003. // CHECK:STDOUT: }
  3004. // CHECK:STDOUT:
  3005. // CHECK:STDOUT: fn @G.2() -> %empty_struct_type {
  3006. // CHECK:STDOUT: !entry:
  3007. // CHECK:STDOUT: %Self.ref: type = name_ref Self, @impl.%.loc8_7.2 [concrete = constants.%empty_tuple.type]
  3008. // CHECK:STDOUT: %M.ref: type = name_ref M, file.%M.decl [concrete = constants.%M.type]
  3009. // CHECK:STDOUT: %M.facet: %M.type = facet_value constants.%empty_tuple.type, (constants.%M.impl_witness) [concrete = constants.%M.facet.56b]
  3010. // CHECK:STDOUT: %.loc10_18: %M.type = converted %Self.ref, %M.facet [concrete = constants.%M.facet.56b]
  3011. // CHECK:STDOUT: %Z.ref: %M.assoc_type = name_ref Z, @Z.%assoc0 [concrete = constants.%assoc0]
  3012. // CHECK:STDOUT: %as_type: type = facet_access_type %.loc10_18 [concrete = constants.%empty_tuple.type]
  3013. // CHECK:STDOUT: %.loc10_23: type = converted %.loc10_18, %as_type [concrete = constants.%empty_tuple.type]
  3014. // CHECK:STDOUT: %impl.elem0: %struct_type.b.347 = impl_witness_access constants.%M.impl_witness, element0 [concrete = constants.%struct]
  3015. // CHECK:STDOUT: %.loc10_25: %empty_struct_type = struct_access %impl.elem0, element0 [concrete = constants.%empty_struct]
  3016. // CHECK:STDOUT: return %.loc10_25
  3017. // CHECK:STDOUT: }
  3018. // CHECK:STDOUT:
  3019. // CHECK:STDOUT: specific @Z(constants.%Self) {}
  3020. // CHECK:STDOUT:
  3021. // CHECK:STDOUT: specific @G.1(constants.%Self) {}
  3022. // CHECK:STDOUT:
  3023. // CHECK:STDOUT: specific @Z(constants.%M.facet.caa) {}
  3024. // CHECK:STDOUT:
  3025. // CHECK:STDOUT: specific @G.1(constants.%M.facet.56b) {}
  3026. // CHECK:STDOUT:
  3027. // CHECK:STDOUT: specific @Z(constants.%M.facet.56b) {}
  3028. // CHECK:STDOUT:
  3029. // CHECK:STDOUT: --- self_as_uses_correct_rewrite_constraint.carbon
  3030. // CHECK:STDOUT:
  3031. // CHECK:STDOUT: constants {
  3032. // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic]
  3033. // CHECK:STDOUT: %pattern_type: type = pattern_type type [concrete]
  3034. // CHECK:STDOUT: %C.type: type = generic_class_type @C [concrete]
  3035. // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete]
  3036. // CHECK:STDOUT: %C.generic: %C.type = struct_value () [concrete]
  3037. // CHECK:STDOUT: %C.f2e: type = class_type @C, @C(%T) [symbolic]
  3038. // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete]
  3039. // CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %empty_struct_type [concrete]
  3040. // CHECK:STDOUT: %M.type: type = facet_type <@M> [concrete]
  3041. // CHECK:STDOUT: %Self: %M.type = bind_symbolic_name Self, 0 [symbolic]
  3042. // CHECK:STDOUT: %struct_type.b.86f: type = struct_type {.b: type} [concrete]
  3043. // CHECK:STDOUT: %M.assoc_type: type = assoc_entity_type @M [concrete]
  3044. // CHECK:STDOUT: %assoc0: %M.assoc_type = assoc_entity element0, @M.%Z [concrete]
  3045. // CHECK:STDOUT: %G.type.020: type = fn_type @G.1 [concrete]
  3046. // CHECK:STDOUT: %G.91c: %G.type.020 = struct_value () [concrete]
  3047. // CHECK:STDOUT: %assoc1: %M.assoc_type = assoc_entity element1, @M.%G.decl [concrete]
  3048. // CHECK:STDOUT: %C.7a7: type = class_type @C, @C(%empty_struct_type) [concrete]
  3049. // CHECK:STDOUT: %.Self: %M.type = bind_symbolic_name .Self [symbolic_self]
  3050. // CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self [symbolic_self]
  3051. // CHECK:STDOUT: %M.lookup_impl_witness: <witness> = lookup_impl_witness %.Self, @M [symbolic_self]
  3052. // CHECK:STDOUT: %M.facet.caa: %M.type = facet_value %.Self.as_type, (%M.lookup_impl_witness) [symbolic_self]
  3053. // CHECK:STDOUT: %impl.elem0: %struct_type.b.86f = impl_witness_access %M.lookup_impl_witness, element0 [symbolic_self]
  3054. // CHECK:STDOUT: %struct_type.b.347: type = struct_type {.b: %empty_struct_type} [concrete]
  3055. // CHECK:STDOUT: %struct.0f3: %struct_type.b.86f = struct_value (%empty_struct_type) [concrete]
  3056. // CHECK:STDOUT: %M_where.type.d04: type = facet_type <@M where %impl.elem0 = %struct.0f3> [concrete]
  3057. // CHECK:STDOUT: %M.impl_witness.baa: <witness> = impl_witness file.%M.impl_witness_table.loc10 [concrete]
  3058. // CHECK:STDOUT: %G.type.d92: type = fn_type @G.2 [concrete]
  3059. // CHECK:STDOUT: %G.eac: %G.type.d92 = struct_value () [concrete]
  3060. // CHECK:STDOUT: %M.facet.1dc: %M.type = facet_value %C.7a7, (%M.impl_witness.baa) [concrete]
  3061. // CHECK:STDOUT: %C.3a0: type = class_type @C, @C(%empty_tuple.type) [concrete]
  3062. // CHECK:STDOUT: %struct_type.b.161: type = struct_type {.b: %empty_tuple.type} [concrete]
  3063. // CHECK:STDOUT: %struct.c94: %struct_type.b.86f = struct_value (%empty_tuple.type) [concrete]
  3064. // CHECK:STDOUT: %M_where.type.eda: type = facet_type <@M where %impl.elem0 = %struct.c94> [concrete]
  3065. // CHECK:STDOUT: %M.impl_witness.feb: <witness> = impl_witness file.%M.impl_witness_table.loc16 [concrete]
  3066. // CHECK:STDOUT: %G.type.b29: type = fn_type @G.3 [concrete]
  3067. // CHECK:STDOUT: %G.f3b: %G.type.b29 = struct_value () [concrete]
  3068. // CHECK:STDOUT: %M.facet.80d: %M.type = facet_value %C.3a0, (%M.impl_witness.feb) [concrete]
  3069. // CHECK:STDOUT: }
  3070. // CHECK:STDOUT:
  3071. // CHECK:STDOUT: imports {
  3072. // CHECK:STDOUT: %Core: <namespace> = namespace file.%Core.import, [concrete] {
  3073. // CHECK:STDOUT: import Core//prelude
  3074. // CHECK:STDOUT: import Core//prelude/...
  3075. // CHECK:STDOUT: }
  3076. // CHECK:STDOUT: }
  3077. // CHECK:STDOUT:
  3078. // CHECK:STDOUT: file {
  3079. // CHECK:STDOUT: package: <namespace> = namespace [concrete] {
  3080. // CHECK:STDOUT: .Core = imports.%Core
  3081. // CHECK:STDOUT: .C = %C.decl
  3082. // CHECK:STDOUT: .M = %M.decl
  3083. // CHECK:STDOUT: }
  3084. // CHECK:STDOUT: %Core.import = import Core
  3085. // CHECK:STDOUT: %C.decl: %C.type = class_decl @C [concrete = constants.%C.generic] {
  3086. // CHECK:STDOUT: %T.patt: %pattern_type = symbolic_binding_pattern T, 0 [concrete]
  3087. // CHECK:STDOUT: } {
  3088. // CHECK:STDOUT: %T.loc3_9.1: type = bind_symbolic_name T, 0 [symbolic = %T.loc3_9.2 (constants.%T)]
  3089. // CHECK:STDOUT: }
  3090. // CHECK:STDOUT: %M.decl: type = interface_decl @M [concrete = constants.%M.type] {} {}
  3091. // CHECK:STDOUT: impl_decl @impl.8b4 [concrete] {} {
  3092. // CHECK:STDOUT: %C.ref: %C.type = name_ref C, file.%C.decl [concrete = constants.%C.generic]
  3093. // CHECK:STDOUT: %.loc10_9: %empty_struct_type = struct_literal ()
  3094. // CHECK:STDOUT: %.loc10_10: type = converted %.loc10_9, constants.%empty_struct_type [concrete = constants.%empty_struct_type]
  3095. // CHECK:STDOUT: %C: type = class_type @C, @C(constants.%empty_struct_type) [concrete = constants.%C.7a7]
  3096. // CHECK:STDOUT: %M.ref: type = name_ref M, file.%M.decl [concrete = constants.%M.type]
  3097. // CHECK:STDOUT: %.Self: %M.type = bind_symbolic_name .Self [symbolic_self = constants.%.Self]
  3098. // CHECK:STDOUT: %.Self.ref: %M.type = name_ref .Self, %.Self [symbolic_self = constants.%.Self]
  3099. // CHECK:STDOUT: %Z.ref: %M.assoc_type = name_ref Z, @Z.%assoc0 [concrete = constants.%assoc0]
  3100. // CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self.ref [symbolic_self = constants.%.Self.as_type]
  3101. // CHECK:STDOUT: %.loc10_23: type = converted %.Self.ref, %.Self.as_type [symbolic_self = constants.%.Self.as_type]
  3102. // CHECK:STDOUT: %impl.elem0: %struct_type.b.86f = impl_witness_access constants.%M.lookup_impl_witness, element0 [symbolic_self = constants.%impl.elem0]
  3103. // CHECK:STDOUT: %.loc10_35: %empty_struct_type = struct_literal ()
  3104. // CHECK:STDOUT: %.loc10_36.1: %struct_type.b.347 = struct_literal (%.loc10_35)
  3105. // CHECK:STDOUT: %.loc10_36.2: type = converted %.loc10_35, constants.%empty_struct_type [concrete = constants.%empty_struct_type]
  3106. // CHECK:STDOUT: %struct: %struct_type.b.86f = struct_value (%.loc10_36.2) [concrete = constants.%struct.0f3]
  3107. // CHECK:STDOUT: %.loc10_36.3: %struct_type.b.86f = converted %.loc10_36.1, %struct [concrete = constants.%struct.0f3]
  3108. // CHECK:STDOUT: %.loc10_17: type = where_expr %.Self [concrete = constants.%M_where.type.d04] {
  3109. // CHECK:STDOUT: requirement_rewrite %impl.elem0, %.loc10_36.3
  3110. // CHECK:STDOUT: }
  3111. // CHECK:STDOUT: }
  3112. // CHECK:STDOUT: %M.impl_witness_table.loc10 = impl_witness_table (%impl_witness_assoc_constant.loc10, @impl.8b4.%G.decl), @impl.8b4 [concrete]
  3113. // CHECK:STDOUT: %M.impl_witness.loc10: <witness> = impl_witness %M.impl_witness_table.loc10 [concrete = constants.%M.impl_witness.baa]
  3114. // CHECK:STDOUT: %impl_witness_assoc_constant.loc10: %struct_type.b.86f = impl_witness_assoc_constant constants.%struct.0f3 [concrete = constants.%struct.0f3]
  3115. // CHECK:STDOUT: impl_decl @impl.d97 [concrete] {} {
  3116. // CHECK:STDOUT: %C.ref: %C.type = name_ref C, file.%C.decl [concrete = constants.%C.generic]
  3117. // CHECK:STDOUT: %.loc16_9: %empty_tuple.type = tuple_literal ()
  3118. // CHECK:STDOUT: %.loc16_10: type = converted %.loc16_9, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type]
  3119. // CHECK:STDOUT: %C: type = class_type @C, @C(constants.%empty_tuple.type) [concrete = constants.%C.3a0]
  3120. // CHECK:STDOUT: %M.ref: type = name_ref M, file.%M.decl [concrete = constants.%M.type]
  3121. // CHECK:STDOUT: %.Self: %M.type = bind_symbolic_name .Self [symbolic_self = constants.%.Self]
  3122. // CHECK:STDOUT: %.Self.ref: %M.type = name_ref .Self, %.Self [symbolic_self = constants.%.Self]
  3123. // CHECK:STDOUT: %Z.ref: %M.assoc_type = name_ref Z, @Z.%assoc0 [concrete = constants.%assoc0]
  3124. // CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self.ref [symbolic_self = constants.%.Self.as_type]
  3125. // CHECK:STDOUT: %.loc16_23: type = converted %.Self.ref, %.Self.as_type [symbolic_self = constants.%.Self.as_type]
  3126. // CHECK:STDOUT: %impl.elem0: %struct_type.b.86f = impl_witness_access constants.%M.lookup_impl_witness, element0 [symbolic_self = constants.%impl.elem0]
  3127. // CHECK:STDOUT: %.loc16_35: %empty_tuple.type = tuple_literal ()
  3128. // CHECK:STDOUT: %.loc16_36.1: %struct_type.b.161 = struct_literal (%.loc16_35)
  3129. // CHECK:STDOUT: %.loc16_36.2: type = converted %.loc16_35, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type]
  3130. // CHECK:STDOUT: %struct: %struct_type.b.86f = struct_value (%.loc16_36.2) [concrete = constants.%struct.c94]
  3131. // CHECK:STDOUT: %.loc16_36.3: %struct_type.b.86f = converted %.loc16_36.1, %struct [concrete = constants.%struct.c94]
  3132. // CHECK:STDOUT: %.loc16_17: type = where_expr %.Self [concrete = constants.%M_where.type.eda] {
  3133. // CHECK:STDOUT: requirement_rewrite %impl.elem0, %.loc16_36.3
  3134. // CHECK:STDOUT: }
  3135. // CHECK:STDOUT: }
  3136. // CHECK:STDOUT: %M.impl_witness_table.loc16 = impl_witness_table (%impl_witness_assoc_constant.loc16, @impl.d97.%G.decl), @impl.d97 [concrete]
  3137. // CHECK:STDOUT: %M.impl_witness.loc16: <witness> = impl_witness %M.impl_witness_table.loc16 [concrete = constants.%M.impl_witness.feb]
  3138. // CHECK:STDOUT: %impl_witness_assoc_constant.loc16: %struct_type.b.86f = impl_witness_assoc_constant constants.%struct.c94 [concrete = constants.%struct.c94]
  3139. // CHECK:STDOUT: }
  3140. // CHECK:STDOUT:
  3141. // CHECK:STDOUT: interface @M {
  3142. // CHECK:STDOUT: %Self: %M.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self]
  3143. // CHECK:STDOUT: %Z: %struct_type.b.86f = assoc_const_decl @Z [concrete] {
  3144. // CHECK:STDOUT: %assoc0: %M.assoc_type = assoc_entity element0, @M.%Z [concrete = constants.%assoc0]
  3145. // CHECK:STDOUT: }
  3146. // CHECK:STDOUT: %G.decl: %G.type.020 = fn_decl @G.1 [concrete = constants.%G.91c] {
  3147. // CHECK:STDOUT: %return.patt: %pattern_type = return_slot_pattern [concrete]
  3148. // CHECK:STDOUT: %return.param_patt: %pattern_type = out_param_pattern %return.patt, call_param0 [concrete]
  3149. // CHECK:STDOUT: } {
  3150. // CHECK:STDOUT: %return.param: ref type = out_param call_param0
  3151. // CHECK:STDOUT: %return: ref type = return_slot %return.param
  3152. // CHECK:STDOUT: }
  3153. // CHECK:STDOUT: %assoc1: %M.assoc_type = assoc_entity element1, %G.decl [concrete = constants.%assoc1]
  3154. // CHECK:STDOUT:
  3155. // CHECK:STDOUT: !members:
  3156. // CHECK:STDOUT: .Self = %Self
  3157. // CHECK:STDOUT: .Z = @Z.%assoc0
  3158. // CHECK:STDOUT: .G = %assoc1
  3159. // CHECK:STDOUT: witness = (%Z, %G.decl)
  3160. // CHECK:STDOUT: }
  3161. // CHECK:STDOUT:
  3162. // CHECK:STDOUT: generic assoc_const @Z(@M.%Self: %M.type) {
  3163. // CHECK:STDOUT: assoc_const Z:! %struct_type.b.86f;
  3164. // CHECK:STDOUT: }
  3165. // CHECK:STDOUT:
  3166. // CHECK:STDOUT: impl @impl.8b4: %C as %.loc10_17 {
  3167. // CHECK:STDOUT: %G.decl: %G.type.d92 = fn_decl @G.2 [concrete = constants.%G.eac] {
  3168. // CHECK:STDOUT: %return.patt: %pattern_type = return_slot_pattern [concrete]
  3169. // CHECK:STDOUT: %return.param_patt: %pattern_type = out_param_pattern %return.patt, call_param0 [concrete]
  3170. // CHECK:STDOUT: } {
  3171. // CHECK:STDOUT: %return.param: ref type = out_param call_param0
  3172. // CHECK:STDOUT: %return: ref type = return_slot %return.param
  3173. // CHECK:STDOUT: }
  3174. // CHECK:STDOUT:
  3175. // CHECK:STDOUT: !members:
  3176. // CHECK:STDOUT: .G = %G.decl
  3177. // CHECK:STDOUT: .M = <poisoned>
  3178. // CHECK:STDOUT: witness = file.%M.impl_witness.loc10
  3179. // CHECK:STDOUT: }
  3180. // CHECK:STDOUT:
  3181. // CHECK:STDOUT: impl @impl.d97: %C as %.loc16_17 {
  3182. // CHECK:STDOUT: %G.decl: %G.type.b29 = fn_decl @G.3 [concrete = constants.%G.f3b] {
  3183. // CHECK:STDOUT: %return.patt: %pattern_type = return_slot_pattern [concrete]
  3184. // CHECK:STDOUT: %return.param_patt: %pattern_type = out_param_pattern %return.patt, call_param0 [concrete]
  3185. // CHECK:STDOUT: } {
  3186. // CHECK:STDOUT: %return.param: ref type = out_param call_param0
  3187. // CHECK:STDOUT: %return: ref type = return_slot %return.param
  3188. // CHECK:STDOUT: }
  3189. // CHECK:STDOUT:
  3190. // CHECK:STDOUT: !members:
  3191. // CHECK:STDOUT: .G = %G.decl
  3192. // CHECK:STDOUT: .M = <poisoned>
  3193. // CHECK:STDOUT: witness = file.%M.impl_witness.loc16
  3194. // CHECK:STDOUT: }
  3195. // CHECK:STDOUT:
  3196. // CHECK:STDOUT: generic class @C(%T.loc3_9.1: type) {
  3197. // CHECK:STDOUT: %T.loc3_9.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc3_9.2 (constants.%T)]
  3198. // CHECK:STDOUT:
  3199. // CHECK:STDOUT: !definition:
  3200. // CHECK:STDOUT:
  3201. // CHECK:STDOUT: class {
  3202. // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete = constants.%empty_struct_type]
  3203. // CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %empty_struct_type [concrete = constants.%complete_type]
  3204. // CHECK:STDOUT: complete_type_witness = %complete_type
  3205. // CHECK:STDOUT:
  3206. // CHECK:STDOUT: !members:
  3207. // CHECK:STDOUT: .Self = constants.%C.f2e
  3208. // CHECK:STDOUT: }
  3209. // CHECK:STDOUT: }
  3210. // CHECK:STDOUT:
  3211. // CHECK:STDOUT: generic fn @G.1(@M.%Self: %M.type) {
  3212. // CHECK:STDOUT: fn() -> type;
  3213. // CHECK:STDOUT: }
  3214. // CHECK:STDOUT:
  3215. // CHECK:STDOUT: fn @G.2() -> type {
  3216. // CHECK:STDOUT: !entry:
  3217. // CHECK:STDOUT: %Self.ref: type = name_ref Self, @impl.8b4.%C [concrete = constants.%C.7a7]
  3218. // CHECK:STDOUT: %M.ref: type = name_ref M, file.%M.decl [concrete = constants.%M.type]
  3219. // CHECK:STDOUT: %M.facet: %M.type = facet_value constants.%C.7a7, (constants.%M.impl_witness.baa) [concrete = constants.%M.facet.1dc]
  3220. // CHECK:STDOUT: %.loc12_18: %M.type = converted %Self.ref, %M.facet [concrete = constants.%M.facet.1dc]
  3221. // CHECK:STDOUT: %Z.ref: %M.assoc_type = name_ref Z, @Z.%assoc0 [concrete = constants.%assoc0]
  3222. // CHECK:STDOUT: %as_type: type = facet_access_type %.loc12_18 [concrete = constants.%C.7a7]
  3223. // CHECK:STDOUT: %.loc12_23: type = converted %.loc12_18, %as_type [concrete = constants.%C.7a7]
  3224. // CHECK:STDOUT: %impl.elem0: %struct_type.b.86f = impl_witness_access constants.%M.impl_witness.baa, element0 [concrete = constants.%struct.0f3]
  3225. // CHECK:STDOUT: %.loc12_25: type = struct_access %impl.elem0, element0 [concrete = constants.%empty_struct_type]
  3226. // CHECK:STDOUT: return %.loc12_25
  3227. // CHECK:STDOUT: }
  3228. // CHECK:STDOUT:
  3229. // CHECK:STDOUT: fn @G.3() -> type {
  3230. // CHECK:STDOUT: !entry:
  3231. // CHECK:STDOUT: %Self.ref: type = name_ref Self, @impl.d97.%C [concrete = constants.%C.3a0]
  3232. // CHECK:STDOUT: %M.ref: type = name_ref M, file.%M.decl [concrete = constants.%M.type]
  3233. // CHECK:STDOUT: %M.facet: %M.type = facet_value constants.%C.3a0, (constants.%M.impl_witness.feb) [concrete = constants.%M.facet.80d]
  3234. // CHECK:STDOUT: %.loc18_18: %M.type = converted %Self.ref, %M.facet [concrete = constants.%M.facet.80d]
  3235. // CHECK:STDOUT: %Z.ref: %M.assoc_type = name_ref Z, @Z.%assoc0 [concrete = constants.%assoc0]
  3236. // CHECK:STDOUT: %as_type: type = facet_access_type %.loc18_18 [concrete = constants.%C.3a0]
  3237. // CHECK:STDOUT: %.loc18_23: type = converted %.loc18_18, %as_type [concrete = constants.%C.3a0]
  3238. // CHECK:STDOUT: %impl.elem0: %struct_type.b.86f = impl_witness_access constants.%M.impl_witness.feb, element0 [concrete = constants.%struct.c94]
  3239. // CHECK:STDOUT: %.loc18_25: type = struct_access %impl.elem0, element0 [concrete = constants.%empty_tuple.type]
  3240. // CHECK:STDOUT: return %.loc18_25
  3241. // CHECK:STDOUT: }
  3242. // CHECK:STDOUT:
  3243. // CHECK:STDOUT: specific @C(constants.%T) {
  3244. // CHECK:STDOUT: %T.loc3_9.2 => constants.%T
  3245. // CHECK:STDOUT: }
  3246. // CHECK:STDOUT:
  3247. // CHECK:STDOUT: specific @Z(constants.%Self) {}
  3248. // CHECK:STDOUT:
  3249. // CHECK:STDOUT: specific @G.1(constants.%Self) {}
  3250. // CHECK:STDOUT:
  3251. // CHECK:STDOUT: specific @C(constants.%empty_struct_type) {
  3252. // CHECK:STDOUT: %T.loc3_9.2 => constants.%empty_struct_type
  3253. // CHECK:STDOUT: }
  3254. // CHECK:STDOUT:
  3255. // CHECK:STDOUT: specific @Z(constants.%M.facet.caa) {}
  3256. // CHECK:STDOUT:
  3257. // CHECK:STDOUT: specific @G.1(constants.%M.facet.1dc) {}
  3258. // CHECK:STDOUT:
  3259. // CHECK:STDOUT: specific @Z(constants.%M.facet.1dc) {}
  3260. // CHECK:STDOUT:
  3261. // CHECK:STDOUT: specific @C(constants.%empty_tuple.type) {
  3262. // CHECK:STDOUT: %T.loc3_9.2 => constants.%empty_tuple.type
  3263. // CHECK:STDOUT: }
  3264. // CHECK:STDOUT:
  3265. // CHECK:STDOUT: specific @G.1(constants.%M.facet.80d) {}
  3266. // CHECK:STDOUT:
  3267. // CHECK:STDOUT: specific @Z(constants.%M.facet.80d) {}
  3268. // CHECK:STDOUT:
  3269. // CHECK:STDOUT: --- associated_int_in_array.carbon
  3270. // CHECK:STDOUT:
  3271. // CHECK:STDOUT: constants {
  3272. // CHECK:STDOUT: %I.type: type = facet_type <@I> [concrete]
  3273. // CHECK:STDOUT: %Self.826: %I.type = bind_symbolic_name Self, 0 [symbolic]
  3274. // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete]
  3275. // CHECK:STDOUT: %Int.type: type = generic_class_type @Int [concrete]
  3276. // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete]
  3277. // CHECK:STDOUT: %Int.generic: %Int.type = struct_value () [concrete]
  3278. // CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [concrete]
  3279. // CHECK:STDOUT: %I.assoc_type: type = assoc_entity_type @I [concrete]
  3280. // CHECK:STDOUT: %assoc0.995: %I.assoc_type = assoc_entity element0, @I.%N [concrete]
  3281. // CHECK:STDOUT: %Self.as_type.b70: type = facet_access_type %Self.826 [symbolic]
  3282. // CHECK:STDOUT: %pattern_type.6de: type = pattern_type %Self.as_type.b70 [symbolic]
  3283. // CHECK:STDOUT: %Bool.type: type = fn_type @Bool [concrete]
  3284. // CHECK:STDOUT: %Bool: %Bool.type = struct_value () [concrete]
  3285. // CHECK:STDOUT: %I.lookup_impl_witness.5d6: <witness> = lookup_impl_witness %Self.826, @I [symbolic]
  3286. // CHECK:STDOUT: %I.facet.93d: %I.type = facet_value %Self.as_type.b70, (%I.lookup_impl_witness.5d6) [symbolic]
  3287. // CHECK:STDOUT: %impl.elem0.fab: %i32 = impl_witness_access %I.lookup_impl_witness.5d6, element0 [symbolic]
  3288. // CHECK:STDOUT: %ImplicitAs.type.cc7: type = generic_interface_type @ImplicitAs [concrete]
  3289. // CHECK:STDOUT: %ImplicitAs.generic: %ImplicitAs.type.cc7 = struct_value () [concrete]
  3290. // CHECK:STDOUT: %ImplicitAs.type.2fd: type = facet_type <@ImplicitAs, @ImplicitAs(Core.IntLiteral)> [concrete]
  3291. // CHECK:STDOUT: %Convert.type.71e: type = fn_type @Convert.1, @ImplicitAs(Core.IntLiteral) [concrete]
  3292. // CHECK:STDOUT: %To.c80: Core.IntLiteral = bind_symbolic_name To, 0 [symbolic]
  3293. // CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.2, @impl.4f9(%To.c80) [symbolic]
  3294. // CHECK:STDOUT: %Convert.f06: %Convert.type.0f9 = struct_value () [symbolic]
  3295. // CHECK:STDOUT: %From: Core.IntLiteral = bind_symbolic_name From, 0 [symbolic]
  3296. // CHECK:STDOUT: %Convert.type.708: type = fn_type @Convert.3, @impl.971(%From) [symbolic]
  3297. // CHECK:STDOUT: %Convert.c68: %Convert.type.708 = struct_value () [symbolic]
  3298. // CHECK:STDOUT: %ImplicitAs.impl_witness.a11: <witness> = impl_witness imports.%ImplicitAs.impl_witness_table.1d9, @impl.971(%int_32) [concrete]
  3299. // CHECK:STDOUT: %Convert.type.4ad: type = fn_type @Convert.3, @impl.971(%int_32) [concrete]
  3300. // CHECK:STDOUT: %Convert.960: %Convert.type.4ad = struct_value () [concrete]
  3301. // CHECK:STDOUT: %ImplicitAs.facet.f49: %ImplicitAs.type.2fd = facet_value %i32, (%ImplicitAs.impl_witness.a11) [concrete]
  3302. // CHECK:STDOUT: %.0ea: type = fn_type_with_self_type %Convert.type.71e, %ImplicitAs.facet.f49 [concrete]
  3303. // CHECK:STDOUT: %Convert.bound.44d: <bound method> = bound_method %impl.elem0.fab, %Convert.960 [symbolic]
  3304. // CHECK:STDOUT: %Convert.specific_fn.8a8: <specific function> = specific_function %Convert.960, @Convert.3(%int_32) [concrete]
  3305. // CHECK:STDOUT: %bound_method.81c: <bound method> = bound_method %impl.elem0.fab, %Convert.specific_fn.8a8 [symbolic]
  3306. // CHECK:STDOUT: %int.convert_checked: init Core.IntLiteral = call %bound_method.81c(%impl.elem0.fab) [symbolic]
  3307. // CHECK:STDOUT: %array_type.377: type = array_type %int.convert_checked, bool [symbolic]
  3308. // CHECK:STDOUT: %pattern_type.bc6: type = pattern_type %array_type.377 [symbolic]
  3309. // CHECK:STDOUT: %F.type.cf0: type = fn_type @F.1 [concrete]
  3310. // CHECK:STDOUT: %F.bc6: %F.type.cf0 = struct_value () [concrete]
  3311. // CHECK:STDOUT: %assoc1: %I.assoc_type = assoc_entity element1, @I.%F.decl [concrete]
  3312. // CHECK:STDOUT: %.Self: %I.type = bind_symbolic_name .Self [symbolic_self]
  3313. // CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self [symbolic_self]
  3314. // CHECK:STDOUT: %I.lookup_impl_witness.5f5: <witness> = lookup_impl_witness %.Self, @I [symbolic_self]
  3315. // CHECK:STDOUT: %I.facet.74c: %I.type = facet_value %.Self.as_type, (%I.lookup_impl_witness.5f5) [symbolic_self]
  3316. // CHECK:STDOUT: %impl.elem0.d4d: %i32 = impl_witness_access %I.lookup_impl_witness.5f5, element0 [symbolic_self]
  3317. // CHECK:STDOUT: %int_2.ecc: Core.IntLiteral = int_value 2 [concrete]
  3318. // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete]
  3319. // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete]
  3320. // CHECK:STDOUT: %ImplicitAs.impl_witness.c75: <witness> = impl_witness imports.%ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete]
  3321. // CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.4f9(%int_32) [concrete]
  3322. // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete]
  3323. // CHECK:STDOUT: %ImplicitAs.facet.921: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete]
  3324. // CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet.921 [concrete]
  3325. // CHECK:STDOUT: %Convert.bound.ef9: <bound method> = bound_method %int_2.ecc, %Convert.956 [concrete]
  3326. // CHECK:STDOUT: %Convert.specific_fn.b6f: <specific function> = specific_function %Convert.956, @Convert.2(%int_32) [concrete]
  3327. // CHECK:STDOUT: %bound_method.b92: <bound method> = bound_method %int_2.ecc, %Convert.specific_fn.b6f [concrete]
  3328. // CHECK:STDOUT: %int_2.ef8: %i32 = int_value 2 [concrete]
  3329. // CHECK:STDOUT: %I_where.type: type = facet_type <@I where %impl.elem0.d4d = %int_2.ef8> [concrete]
  3330. // CHECK:STDOUT: %I.impl_witness: <witness> = impl_witness file.%I.impl_witness_table [concrete]
  3331. // CHECK:STDOUT: %pattern_type.cb1: type = pattern_type %empty_tuple.type [concrete]
  3332. // CHECK:STDOUT: %array_type.c9b: type = array_type %int_2.ecc, bool [concrete]
  3333. // CHECK:STDOUT: %pattern_type.5d5: type = pattern_type %array_type.c9b [concrete]
  3334. // CHECK:STDOUT: %F.type.2c7: type = fn_type @F.2 [concrete]
  3335. // CHECK:STDOUT: %F.0b4: %F.type.2c7 = struct_value () [concrete]
  3336. // CHECK:STDOUT: %I.facet.85d: %I.type = facet_value %empty_tuple.type, (%I.impl_witness) [concrete]
  3337. // CHECK:STDOUT: %Convert.bound.fbf: <bound method> = bound_method %int_2.ef8, %Convert.960 [concrete]
  3338. // CHECK:STDOUT: %bound_method.992: <bound method> = bound_method %int_2.ef8, %Convert.specific_fn.8a8 [concrete]
  3339. // CHECK:STDOUT: %true: bool = bool_literal true [concrete]
  3340. // CHECK:STDOUT: %false: bool = bool_literal false [concrete]
  3341. // CHECK:STDOUT: %tuple.type: type = tuple_type (bool, bool) [concrete]
  3342. // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete]
  3343. // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete]
  3344. // CHECK:STDOUT: %array: %array_type.c9b = tuple_value (%true, %false) [concrete]
  3345. // CHECK:STDOUT: }
  3346. // CHECK:STDOUT:
  3347. // CHECK:STDOUT: imports {
  3348. // CHECK:STDOUT: %Core: <namespace> = namespace file.%Core.import, [concrete] {
  3349. // CHECK:STDOUT: .Int = %Core.Int
  3350. // CHECK:STDOUT: .Bool = %Core.Bool
  3351. // CHECK:STDOUT: .ImplicitAs = %Core.ImplicitAs
  3352. // CHECK:STDOUT: import Core//prelude
  3353. // CHECK:STDOUT: import Core//prelude/...
  3354. // CHECK:STDOUT: }
  3355. // CHECK:STDOUT: %Core.Int: %Int.type = import_ref Core//prelude/types/int, Int, loaded [concrete = constants.%Int.generic]
  3356. // CHECK:STDOUT: %Core.Bool: %Bool.type = import_ref Core//prelude/types/bool, Bool, loaded [concrete = constants.%Bool]
  3357. // CHECK:STDOUT: %Core.ImplicitAs: %ImplicitAs.type.cc7 = import_ref Core//prelude/operators/as, ImplicitAs, loaded [concrete = constants.%ImplicitAs.generic]
  3358. // CHECK:STDOUT: %Core.import_ref.a5b: @impl.4f9.%Convert.type (%Convert.type.0f9) = import_ref Core//prelude/types/int, loc19_39, loaded [symbolic = @impl.4f9.%Convert (constants.%Convert.f06)]
  3359. // CHECK:STDOUT: %ImplicitAs.impl_witness_table.a2f = impl_witness_table (%Core.import_ref.a5b), @impl.4f9 [concrete]
  3360. // CHECK:STDOUT: %Core.import_ref.85c: @impl.971.%Convert.type (%Convert.type.708) = import_ref Core//prelude/types/int, loc23_44, loaded [symbolic = @impl.971.%Convert (constants.%Convert.c68)]
  3361. // CHECK:STDOUT: %ImplicitAs.impl_witness_table.1d9 = impl_witness_table (%Core.import_ref.85c), @impl.971 [concrete]
  3362. // CHECK:STDOUT: }
  3363. // CHECK:STDOUT:
  3364. // CHECK:STDOUT: file {
  3365. // CHECK:STDOUT: package: <namespace> = namespace [concrete] {
  3366. // CHECK:STDOUT: .Core = imports.%Core
  3367. // CHECK:STDOUT: .I = %I.decl
  3368. // CHECK:STDOUT: }
  3369. // CHECK:STDOUT: %Core.import = import Core
  3370. // CHECK:STDOUT: %I.decl: type = interface_decl @I [concrete = constants.%I.type] {} {}
  3371. // CHECK:STDOUT: impl_decl @impl.9a6 [concrete] {} {
  3372. // CHECK:STDOUT: %.loc8_7.1: %empty_tuple.type = tuple_literal ()
  3373. // CHECK:STDOUT: %.loc8_7.2: type = converted %.loc8_7.1, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type]
  3374. // CHECK:STDOUT: %I.ref: type = name_ref I, file.%I.decl [concrete = constants.%I.type]
  3375. // CHECK:STDOUT: %.Self: %I.type = bind_symbolic_name .Self [symbolic_self = constants.%.Self]
  3376. // CHECK:STDOUT: %.Self.ref: %I.type = name_ref .Self, %.Self [symbolic_self = constants.%.Self]
  3377. // CHECK:STDOUT: %N.ref: %I.assoc_type = name_ref N, @N.%assoc0 [concrete = constants.%assoc0.995]
  3378. // CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self.ref [symbolic_self = constants.%.Self.as_type]
  3379. // CHECK:STDOUT: %.loc8_20: type = converted %.Self.ref, %.Self.as_type [symbolic_self = constants.%.Self.as_type]
  3380. // CHECK:STDOUT: %impl.elem0.loc8_20: %i32 = impl_witness_access constants.%I.lookup_impl_witness.5f5, element0 [symbolic_self = constants.%impl.elem0.d4d]
  3381. // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [concrete = constants.%int_2.ecc]
  3382. // CHECK:STDOUT: %impl.elem0.loc8_25: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956]
  3383. // CHECK:STDOUT: %bound_method.loc8_25.1: <bound method> = bound_method %int_2, %impl.elem0.loc8_25 [concrete = constants.%Convert.bound.ef9]
  3384. // CHECK:STDOUT: %specific_fn: <specific function> = specific_function %impl.elem0.loc8_25, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn.b6f]
  3385. // CHECK:STDOUT: %bound_method.loc8_25.2: <bound method> = bound_method %int_2, %specific_fn [concrete = constants.%bound_method.b92]
  3386. // CHECK:STDOUT: %int.convert_checked: init %i32 = call %bound_method.loc8_25.2(%int_2) [concrete = constants.%int_2.ef8]
  3387. // CHECK:STDOUT: %.loc8_25.1: %i32 = value_of_initializer %int.convert_checked [concrete = constants.%int_2.ef8]
  3388. // CHECK:STDOUT: %.loc8_25.2: %i32 = converted %int_2, %.loc8_25.1 [concrete = constants.%int_2.ef8]
  3389. // CHECK:STDOUT: %.loc8_14: type = where_expr %.Self [concrete = constants.%I_where.type] {
  3390. // CHECK:STDOUT: requirement_rewrite %impl.elem0.loc8_20, %.loc8_25.2
  3391. // CHECK:STDOUT: }
  3392. // CHECK:STDOUT: }
  3393. // CHECK:STDOUT: %I.impl_witness_table = impl_witness_table (%impl_witness_assoc_constant, @impl.9a6.%F.decl), @impl.9a6 [concrete]
  3394. // CHECK:STDOUT: %I.impl_witness: <witness> = impl_witness %I.impl_witness_table [concrete = constants.%I.impl_witness]
  3395. // CHECK:STDOUT: %impl_witness_assoc_constant: %i32 = impl_witness_assoc_constant constants.%int_2.ef8 [concrete = constants.%int_2.ef8]
  3396. // CHECK:STDOUT: }
  3397. // CHECK:STDOUT:
  3398. // CHECK:STDOUT: interface @I {
  3399. // CHECK:STDOUT: %Self: %I.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self.826]
  3400. // CHECK:STDOUT: %N: %i32 = assoc_const_decl @N [concrete] {
  3401. // CHECK:STDOUT: %assoc0: %I.assoc_type = assoc_entity element0, @I.%N [concrete = constants.%assoc0.995]
  3402. // CHECK:STDOUT: }
  3403. // CHECK:STDOUT: %F.decl: %F.type.cf0 = fn_decl @F.1 [concrete = constants.%F.bc6] {
  3404. // CHECK:STDOUT: %self.patt: @F.1.%pattern_type.loc5_8 (%pattern_type.6de) = binding_pattern self [concrete]
  3405. // CHECK:STDOUT: %self.param_patt: @F.1.%pattern_type.loc5_8 (%pattern_type.6de) = value_param_pattern %self.patt, call_param0 [concrete]
  3406. // CHECK:STDOUT: %return.patt: @F.1.%pattern_type.loc5_22 (%pattern_type.bc6) = return_slot_pattern [concrete]
  3407. // CHECK:STDOUT: %return.param_patt: @F.1.%pattern_type.loc5_22 (%pattern_type.bc6) = out_param_pattern %return.patt, call_param1 [concrete]
  3408. // CHECK:STDOUT: } {
  3409. // CHECK:STDOUT: %bool.make_type: init type = call constants.%Bool() [concrete = bool]
  3410. // CHECK:STDOUT: %impl.elem0.loc5_37.2: %i32 = impl_witness_access constants.%I.lookup_impl_witness.5d6, element0 [symbolic = %impl.elem0.loc5_37.1 (constants.%impl.elem0.fab)]
  3411. // CHECK:STDOUT: %N.ref: %i32 = name_ref N, %impl.elem0.loc5_37.2 [symbolic = %impl.elem0.loc5_37.1 (constants.%impl.elem0.fab)]
  3412. // CHECK:STDOUT: %.loc5_31.1: type = value_of_initializer %bool.make_type [concrete = bool]
  3413. // CHECK:STDOUT: %.loc5_31.2: type = converted %bool.make_type, %.loc5_31.1 [concrete = bool]
  3414. // CHECK:STDOUT: %impl.elem0.loc5_37.3: %.0ea = impl_witness_access constants.%ImplicitAs.impl_witness.a11, element0 [concrete = constants.%Convert.960]
  3415. // CHECK:STDOUT: %bound_method.loc5_37.2: <bound method> = bound_method %N.ref, %impl.elem0.loc5_37.3 [symbolic = %Convert.bound (constants.%Convert.bound.44d)]
  3416. // CHECK:STDOUT: %specific_fn: <specific function> = specific_function %impl.elem0.loc5_37.3, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn.8a8]
  3417. // CHECK:STDOUT: %bound_method.loc5_37.3: <bound method> = bound_method %N.ref, %specific_fn [symbolic = %bound_method.loc5_37.1 (constants.%bound_method.81c)]
  3418. // CHECK:STDOUT: %int.convert_checked.loc5_37.2: init Core.IntLiteral = call %bound_method.loc5_37.3(%N.ref) [symbolic = %int.convert_checked.loc5_37.1 (constants.%int.convert_checked)]
  3419. // CHECK:STDOUT: %.loc5_37.1: Core.IntLiteral = value_of_initializer %int.convert_checked.loc5_37.2 [symbolic = %int.convert_checked.loc5_37.1 (constants.%int.convert_checked)]
  3420. // CHECK:STDOUT: %.loc5_37.2: Core.IntLiteral = converted %N.ref, %.loc5_37.1 [symbolic = %int.convert_checked.loc5_37.1 (constants.%int.convert_checked)]
  3421. // CHECK:STDOUT: %array_type.loc5_38.2: type = array_type %.loc5_37.2, %.loc5_31.2 [symbolic = %array_type.loc5_38.1 (constants.%array_type.377)]
  3422. // CHECK:STDOUT: %self.param: @F.1.%Self.as_type.loc5_14.1 (%Self.as_type.b70) = value_param call_param0
  3423. // CHECK:STDOUT: %.loc5_14.1: type = splice_block %.loc5_14.2 [symbolic = %Self.as_type.loc5_14.1 (constants.%Self.as_type.b70)] {
  3424. // CHECK:STDOUT: %Self.ref: %I.type = name_ref Self, @I.%Self [symbolic = %Self (constants.%Self.826)]
  3425. // CHECK:STDOUT: %Self.as_type.loc5_14.2: type = facet_access_type %Self.ref [symbolic = %Self.as_type.loc5_14.1 (constants.%Self.as_type.b70)]
  3426. // CHECK:STDOUT: %.loc5_14.2: type = converted %Self.ref, %Self.as_type.loc5_14.2 [symbolic = %Self.as_type.loc5_14.1 (constants.%Self.as_type.b70)]
  3427. // CHECK:STDOUT: }
  3428. // CHECK:STDOUT: %self: @F.1.%Self.as_type.loc5_14.1 (%Self.as_type.b70) = bind_name self, %self.param
  3429. // CHECK:STDOUT: %return.param: ref @F.1.%array_type.loc5_38.1 (%array_type.377) = out_param call_param1
  3430. // CHECK:STDOUT: %return: ref @F.1.%array_type.loc5_38.1 (%array_type.377) = return_slot %return.param
  3431. // CHECK:STDOUT: }
  3432. // CHECK:STDOUT: %assoc1: %I.assoc_type = assoc_entity element1, %F.decl [concrete = constants.%assoc1]
  3433. // CHECK:STDOUT:
  3434. // CHECK:STDOUT: !members:
  3435. // CHECK:STDOUT: .Self = %Self
  3436. // CHECK:STDOUT: .N = @N.%assoc0
  3437. // CHECK:STDOUT: .F = %assoc1
  3438. // CHECK:STDOUT: witness = (%N, %F.decl)
  3439. // CHECK:STDOUT: }
  3440. // CHECK:STDOUT:
  3441. // CHECK:STDOUT: generic assoc_const @N(@I.%Self: %I.type) {
  3442. // CHECK:STDOUT: assoc_const N:! %i32;
  3443. // CHECK:STDOUT: }
  3444. // CHECK:STDOUT:
  3445. // CHECK:STDOUT: impl @impl.9a6: %.loc8_7.2 as %.loc8_14 {
  3446. // CHECK:STDOUT: %F.decl: %F.type.2c7 = fn_decl @F.2 [concrete = constants.%F.0b4] {
  3447. // CHECK:STDOUT: %self.patt: %pattern_type.cb1 = binding_pattern self [concrete]
  3448. // CHECK:STDOUT: %self.param_patt: %pattern_type.cb1 = value_param_pattern %self.patt, call_param0 [concrete]
  3449. // CHECK:STDOUT: %return.patt: %pattern_type.5d5 = return_slot_pattern [concrete]
  3450. // CHECK:STDOUT: %return.param_patt: %pattern_type.5d5 = out_param_pattern %return.patt, call_param1 [concrete]
  3451. // CHECK:STDOUT: } {
  3452. // CHECK:STDOUT: %bool.make_type: init type = call constants.%Bool() [concrete = bool]
  3453. // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [concrete = constants.%int_2.ecc]
  3454. // CHECK:STDOUT: %.loc9_31.1: type = value_of_initializer %bool.make_type [concrete = bool]
  3455. // CHECK:STDOUT: %.loc9_31.2: type = converted %bool.make_type, %.loc9_31.1 [concrete = bool]
  3456. // CHECK:STDOUT: %array_type: type = array_type %int_2, %.loc9_31.2 [concrete = constants.%array_type.c9b]
  3457. // CHECK:STDOUT: %self.param: %empty_tuple.type = value_param call_param0
  3458. // CHECK:STDOUT: %Self.ref: type = name_ref Self, @impl.9a6.%.loc8_7.2 [concrete = constants.%empty_tuple.type]
  3459. // CHECK:STDOUT: %self: %empty_tuple.type = bind_name self, %self.param
  3460. // CHECK:STDOUT: %return.param: ref %array_type.c9b = out_param call_param1
  3461. // CHECK:STDOUT: %return: ref %array_type.c9b = return_slot %return.param
  3462. // CHECK:STDOUT: }
  3463. // CHECK:STDOUT:
  3464. // CHECK:STDOUT: !members:
  3465. // CHECK:STDOUT: .F = %F.decl
  3466. // CHECK:STDOUT: witness = file.%I.impl_witness
  3467. // CHECK:STDOUT: }
  3468. // CHECK:STDOUT:
  3469. // CHECK:STDOUT: generic fn @F.1(@I.%Self: %I.type) {
  3470. // CHECK:STDOUT: %Self: %I.type = bind_symbolic_name Self, 0 [symbolic = %Self (constants.%Self.826)]
  3471. // CHECK:STDOUT: %Self.as_type.loc5_14.1: type = facet_access_type %Self [symbolic = %Self.as_type.loc5_14.1 (constants.%Self.as_type.b70)]
  3472. // CHECK:STDOUT: %pattern_type.loc5_8: type = pattern_type %Self.as_type.loc5_14.1 [symbolic = %pattern_type.loc5_8 (constants.%pattern_type.6de)]
  3473. // CHECK:STDOUT: %I.lookup_impl_witness: <witness> = lookup_impl_witness %Self, @I [symbolic = %I.lookup_impl_witness (constants.%I.lookup_impl_witness.5d6)]
  3474. // CHECK:STDOUT: %impl.elem0.loc5_37.1: %i32 = impl_witness_access %I.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc5_37.1 (constants.%impl.elem0.fab)]
  3475. // CHECK:STDOUT: %Convert.bound: <bound method> = bound_method %impl.elem0.loc5_37.1, constants.%Convert.960 [symbolic = %Convert.bound (constants.%Convert.bound.44d)]
  3476. // CHECK:STDOUT: %bound_method.loc5_37.1: <bound method> = bound_method %impl.elem0.loc5_37.1, constants.%Convert.specific_fn.8a8 [symbolic = %bound_method.loc5_37.1 (constants.%bound_method.81c)]
  3477. // CHECK:STDOUT: %int.convert_checked.loc5_37.1: init Core.IntLiteral = call %bound_method.loc5_37.1(%impl.elem0.loc5_37.1) [symbolic = %int.convert_checked.loc5_37.1 (constants.%int.convert_checked)]
  3478. // CHECK:STDOUT: %array_type.loc5_38.1: type = array_type %int.convert_checked.loc5_37.1, bool [symbolic = %array_type.loc5_38.1 (constants.%array_type.377)]
  3479. // CHECK:STDOUT: %pattern_type.loc5_22: type = pattern_type %array_type.loc5_38.1 [symbolic = %pattern_type.loc5_22 (constants.%pattern_type.bc6)]
  3480. // CHECK:STDOUT:
  3481. // CHECK:STDOUT: fn(%self.param: @F.1.%Self.as_type.loc5_14.1 (%Self.as_type.b70)) -> @F.1.%array_type.loc5_38.1 (%array_type.377);
  3482. // CHECK:STDOUT: }
  3483. // CHECK:STDOUT:
  3484. // CHECK:STDOUT: fn @F.2(%self.param: %empty_tuple.type) -> %return.param: %array_type.c9b {
  3485. // CHECK:STDOUT: !entry:
  3486. // CHECK:STDOUT: %true: bool = bool_literal true [concrete = constants.%true]
  3487. // CHECK:STDOUT: %false: bool = bool_literal false [concrete = constants.%false]
  3488. // CHECK:STDOUT: %.loc9_61.1: %tuple.type = tuple_literal (%true, %false)
  3489. // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete = constants.%int_0]
  3490. // CHECK:STDOUT: %.loc9_61.2: ref bool = array_index %return, %int_0
  3491. // CHECK:STDOUT: %.loc9_61.3: init bool = initialize_from %true to %.loc9_61.2 [concrete = constants.%true]
  3492. // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1]
  3493. // CHECK:STDOUT: %.loc9_61.4: ref bool = array_index %return, %int_1
  3494. // CHECK:STDOUT: %.loc9_61.5: init bool = initialize_from %false to %.loc9_61.4 [concrete = constants.%false]
  3495. // CHECK:STDOUT: %.loc9_61.6: init %array_type.c9b = array_init (%.loc9_61.3, %.loc9_61.5) to %return [concrete = constants.%array]
  3496. // CHECK:STDOUT: %.loc9_62: init %array_type.c9b = converted %.loc9_61.1, %.loc9_61.6 [concrete = constants.%array]
  3497. // CHECK:STDOUT: return %.loc9_62 to %return
  3498. // CHECK:STDOUT: }
  3499. // CHECK:STDOUT:
  3500. // CHECK:STDOUT: specific @N(constants.%Self.826) {}
  3501. // CHECK:STDOUT:
  3502. // CHECK:STDOUT: specific @N(constants.%I.facet.93d) {}
  3503. // CHECK:STDOUT:
  3504. // CHECK:STDOUT: specific @F.1(constants.%Self.826) {
  3505. // CHECK:STDOUT: %Self => constants.%Self.826
  3506. // CHECK:STDOUT: %Self.as_type.loc5_14.1 => constants.%Self.as_type.b70
  3507. // CHECK:STDOUT: %pattern_type.loc5_8 => constants.%pattern_type.6de
  3508. // CHECK:STDOUT: %I.lookup_impl_witness => constants.%I.lookup_impl_witness.5d6
  3509. // CHECK:STDOUT: %impl.elem0.loc5_37.1 => constants.%impl.elem0.fab
  3510. // CHECK:STDOUT: %Convert.bound => constants.%Convert.bound.44d
  3511. // CHECK:STDOUT: %bound_method.loc5_37.1 => constants.%bound_method.81c
  3512. // CHECK:STDOUT: %int.convert_checked.loc5_37.1 => constants.%int.convert_checked
  3513. // CHECK:STDOUT: %array_type.loc5_38.1 => constants.%array_type.377
  3514. // CHECK:STDOUT: %pattern_type.loc5_22 => constants.%pattern_type.bc6
  3515. // CHECK:STDOUT: }
  3516. // CHECK:STDOUT:
  3517. // CHECK:STDOUT: specific @N(constants.%I.facet.74c) {}
  3518. // CHECK:STDOUT:
  3519. // CHECK:STDOUT: specific @F.1(constants.%I.facet.85d) {
  3520. // CHECK:STDOUT: %Self => constants.%I.facet.85d
  3521. // CHECK:STDOUT: %Self.as_type.loc5_14.1 => constants.%empty_tuple.type
  3522. // CHECK:STDOUT: %pattern_type.loc5_8 => constants.%pattern_type.cb1
  3523. // CHECK:STDOUT: %I.lookup_impl_witness => constants.%I.impl_witness
  3524. // CHECK:STDOUT: %impl.elem0.loc5_37.1 => constants.%int_2.ef8
  3525. // CHECK:STDOUT: %Convert.bound => constants.%Convert.bound.fbf
  3526. // CHECK:STDOUT: %bound_method.loc5_37.1 => constants.%bound_method.992
  3527. // CHECK:STDOUT: %int.convert_checked.loc5_37.1 => constants.%int_2.ecc
  3528. // CHECK:STDOUT: %array_type.loc5_38.1 => constants.%array_type.c9b
  3529. // CHECK:STDOUT: %pattern_type.loc5_22 => constants.%pattern_type.5d5
  3530. // CHECK:STDOUT: }
  3531. // CHECK:STDOUT:
  3532. // CHECK:STDOUT: --- symbolic_associated_type_in_concrete_context.carbon
  3533. // CHECK:STDOUT:
  3534. // CHECK:STDOUT: constants {
  3535. // CHECK:STDOUT: %Z.type: type = facet_type <@Z> [concrete]
  3536. // CHECK:STDOUT: %Self: %Z.type = bind_symbolic_name Self, 0 [symbolic]
  3537. // CHECK:STDOUT: %Z.assoc_type: type = assoc_entity_type @Z [concrete]
  3538. // CHECK:STDOUT: %assoc0: %Z.assoc_type = assoc_entity element0, @Z.%X [concrete]
  3539. // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic]
  3540. // CHECK:STDOUT: %pattern_type.98f: type = pattern_type type [concrete]
  3541. // CHECK:STDOUT: %C.type: type = generic_class_type @C [concrete]
  3542. // CHECK:STDOUT: %C.generic: %C.type = struct_value () [concrete]
  3543. // CHECK:STDOUT: %C.f2e: type = class_type @C, @C(%T) [symbolic]
  3544. // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete]
  3545. // CHECK:STDOUT: %complete_type.357: <witness> = complete_type_witness %empty_struct_type [concrete]
  3546. // CHECK:STDOUT: %D: type = class_type @D [concrete]
  3547. // CHECK:STDOUT: %.Self: %Z.type = bind_symbolic_name .Self [symbolic_self]
  3548. // CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self [symbolic_self]
  3549. // CHECK:STDOUT: %Z.lookup_impl_witness: <witness> = lookup_impl_witness %.Self, @Z [symbolic_self]
  3550. // CHECK:STDOUT: %Z.facet.2a2: %Z.type = facet_value %.Self.as_type, (%Z.lookup_impl_witness) [symbolic_self]
  3551. // CHECK:STDOUT: %impl.elem0: type = impl_witness_access %Z.lookup_impl_witness, element0 [symbolic_self]
  3552. // CHECK:STDOUT: %Z_where.type.585: type = facet_type <@Z where %impl.elem0 = %C.f2e> [symbolic]
  3553. // CHECK:STDOUT: %require_complete: <witness> = require_complete_type %Z_where.type.585 [symbolic]
  3554. // CHECK:STDOUT: %Z.impl_witness.8bc: <witness> = impl_witness file.%Z.impl_witness_table, @impl(%T) [symbolic]
  3555. // CHECK:STDOUT: %F.type: type = fn_type @F [concrete]
  3556. // CHECK:STDOUT: %F: %F.type = struct_value () [concrete]
  3557. // CHECK:STDOUT: %C.131: type = class_type @C, @C(%D) [concrete]
  3558. // CHECK:STDOUT: %Z_where.type.1a6: type = facet_type <@Z where %impl.elem0 = %C.131> [concrete]
  3559. // CHECK:STDOUT: %complete_type.00b: <witness> = complete_type_witness %Z_where.type.1a6 [concrete]
  3560. // CHECK:STDOUT: %Z.impl_witness.19e: <witness> = impl_witness file.%Z.impl_witness_table, @impl(%D) [concrete]
  3561. // CHECK:STDOUT: %Z.facet.f2a: %Z.type = facet_value %D, (%Z.impl_witness.19e) [concrete]
  3562. // CHECK:STDOUT: %pattern_type.7f8: type = pattern_type %C.131 [concrete]
  3563. // CHECK:STDOUT: %C.val: %C.131 = struct_value () [concrete]
  3564. // CHECK:STDOUT: }
  3565. // CHECK:STDOUT:
  3566. // CHECK:STDOUT: imports {
  3567. // CHECK:STDOUT: %Core: <namespace> = namespace file.%Core.import, [concrete] {
  3568. // CHECK:STDOUT: import Core//prelude
  3569. // CHECK:STDOUT: import Core//prelude/...
  3570. // CHECK:STDOUT: }
  3571. // CHECK:STDOUT: }
  3572. // CHECK:STDOUT:
  3573. // CHECK:STDOUT: file {
  3574. // CHECK:STDOUT: package: <namespace> = namespace [concrete] {
  3575. // CHECK:STDOUT: .Core = imports.%Core
  3576. // CHECK:STDOUT: .Z = %Z.decl
  3577. // CHECK:STDOUT: .C = %C.decl
  3578. // CHECK:STDOUT: .D = %D.decl
  3579. // CHECK:STDOUT: .F = %F.decl
  3580. // CHECK:STDOUT: }
  3581. // CHECK:STDOUT: %Core.import = import Core
  3582. // CHECK:STDOUT: %Z.decl: type = interface_decl @Z [concrete = constants.%Z.type] {} {}
  3583. // CHECK:STDOUT: %C.decl: %C.type = class_decl @C [concrete = constants.%C.generic] {
  3584. // CHECK:STDOUT: %T.patt: %pattern_type.98f = symbolic_binding_pattern T, 0 [concrete]
  3585. // CHECK:STDOUT: } {
  3586. // CHECK:STDOUT: %T.loc6_9.1: type = bind_symbolic_name T, 0 [symbolic = %T.loc6_9.2 (constants.%T)]
  3587. // CHECK:STDOUT: }
  3588. // CHECK:STDOUT: %D.decl: type = class_decl @D [concrete = constants.%D] {} {}
  3589. // CHECK:STDOUT: impl_decl @impl [concrete] {
  3590. // CHECK:STDOUT: %T.patt: %pattern_type.98f = symbolic_binding_pattern T, 0 [concrete]
  3591. // CHECK:STDOUT: } {
  3592. // CHECK:STDOUT: %T.ref.loc9_24: type = name_ref T, %T.loc9_14.1 [symbolic = %T.loc9_14.2 (constants.%T)]
  3593. // CHECK:STDOUT: %Z.ref: type = name_ref Z, file.%Z.decl [concrete = constants.%Z.type]
  3594. // CHECK:STDOUT: %.Self: %Z.type = bind_symbolic_name .Self [symbolic_self = constants.%.Self]
  3595. // CHECK:STDOUT: %.Self.ref: %Z.type = name_ref .Self, %.Self [symbolic_self = constants.%.Self]
  3596. // CHECK:STDOUT: %X.ref: %Z.assoc_type = name_ref X, @X.%assoc0 [concrete = constants.%assoc0]
  3597. // CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self.ref [symbolic_self = constants.%.Self.as_type]
  3598. // CHECK:STDOUT: %.loc9_37: type = converted %.Self.ref, %.Self.as_type [symbolic_self = constants.%.Self.as_type]
  3599. // CHECK:STDOUT: %impl.elem0: type = impl_witness_access constants.%Z.lookup_impl_witness, element0 [symbolic_self = constants.%impl.elem0]
  3600. // CHECK:STDOUT: %C.ref: %C.type = name_ref C, file.%C.decl [concrete = constants.%C.generic]
  3601. // CHECK:STDOUT: %T.ref.loc9_44: type = name_ref T, %T.loc9_14.1 [symbolic = %T.loc9_14.2 (constants.%T)]
  3602. // CHECK:STDOUT: %C.loc9_45.1: type = class_type @C, @C(constants.%T) [symbolic = %C.loc9_45.2 (constants.%C.f2e)]
  3603. // CHECK:STDOUT: %.loc9_31: type = where_expr %.Self [symbolic = %Z_where.type (constants.%Z_where.type.585)] {
  3604. // CHECK:STDOUT: requirement_rewrite %impl.elem0, %C.loc9_45.1
  3605. // CHECK:STDOUT: }
  3606. // CHECK:STDOUT: %T.loc9_14.1: type = bind_symbolic_name T, 0 [symbolic = %T.loc9_14.2 (constants.%T)]
  3607. // CHECK:STDOUT: }
  3608. // CHECK:STDOUT: %Z.impl_witness_table = impl_witness_table (%impl_witness_assoc_constant), @impl [concrete]
  3609. // CHECK:STDOUT: %Z.impl_witness: <witness> = impl_witness %Z.impl_witness_table, @impl(constants.%T) [symbolic = @impl.%Z.impl_witness (constants.%Z.impl_witness.8bc)]
  3610. // CHECK:STDOUT: %impl_witness_assoc_constant: type = impl_witness_assoc_constant constants.%C.f2e [symbolic = @impl.%C.loc9_45.2 (constants.%C.f2e)]
  3611. // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [concrete = constants.%F] {} {}
  3612. // CHECK:STDOUT: }
  3613. // CHECK:STDOUT:
  3614. // CHECK:STDOUT: interface @Z {
  3615. // CHECK:STDOUT: %Self: %Z.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self]
  3616. // CHECK:STDOUT: %X: type = assoc_const_decl @X [concrete] {
  3617. // CHECK:STDOUT: %assoc0: %Z.assoc_type = assoc_entity element0, @Z.%X [concrete = constants.%assoc0]
  3618. // CHECK:STDOUT: }
  3619. // CHECK:STDOUT:
  3620. // CHECK:STDOUT: !members:
  3621. // CHECK:STDOUT: .Self = %Self
  3622. // CHECK:STDOUT: .X = @X.%assoc0
  3623. // CHECK:STDOUT: witness = (%X)
  3624. // CHECK:STDOUT: }
  3625. // CHECK:STDOUT:
  3626. // CHECK:STDOUT: generic assoc_const @X(@Z.%Self: %Z.type) {
  3627. // CHECK:STDOUT: assoc_const X:! type;
  3628. // CHECK:STDOUT: }
  3629. // CHECK:STDOUT:
  3630. // CHECK:STDOUT: generic impl @impl(%T.loc9_14.1: type) {
  3631. // CHECK:STDOUT: %T.loc9_14.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc9_14.2 (constants.%T)]
  3632. // CHECK:STDOUT: %C.loc9_45.2: type = class_type @C, @C(%T.loc9_14.2) [symbolic = %C.loc9_45.2 (constants.%C.f2e)]
  3633. // CHECK:STDOUT: %Z_where.type: type = facet_type <@Z where constants.%impl.elem0 = %C.loc9_45.2> [symbolic = %Z_where.type (constants.%Z_where.type.585)]
  3634. // CHECK:STDOUT: %require_complete: <witness> = require_complete_type %Z_where.type [symbolic = %require_complete (constants.%require_complete)]
  3635. // CHECK:STDOUT: %Z.impl_witness: <witness> = impl_witness file.%Z.impl_witness_table, @impl(%T.loc9_14.2) [symbolic = %Z.impl_witness (constants.%Z.impl_witness.8bc)]
  3636. // CHECK:STDOUT:
  3637. // CHECK:STDOUT: !definition:
  3638. // CHECK:STDOUT:
  3639. // CHECK:STDOUT: impl: %T.ref.loc9_24 as %.loc9_31 {
  3640. // CHECK:STDOUT: !members:
  3641. // CHECK:STDOUT: witness = file.%Z.impl_witness
  3642. // CHECK:STDOUT: }
  3643. // CHECK:STDOUT: }
  3644. // CHECK:STDOUT:
  3645. // CHECK:STDOUT: generic class @C(%T.loc6_9.1: type) {
  3646. // CHECK:STDOUT: %T.loc6_9.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc6_9.2 (constants.%T)]
  3647. // CHECK:STDOUT:
  3648. // CHECK:STDOUT: !definition:
  3649. // CHECK:STDOUT:
  3650. // CHECK:STDOUT: class {
  3651. // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete = constants.%empty_struct_type]
  3652. // CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %empty_struct_type [concrete = constants.%complete_type.357]
  3653. // CHECK:STDOUT: complete_type_witness = %complete_type
  3654. // CHECK:STDOUT:
  3655. // CHECK:STDOUT: !members:
  3656. // CHECK:STDOUT: .Self = constants.%C.f2e
  3657. // CHECK:STDOUT: }
  3658. // CHECK:STDOUT: }
  3659. // CHECK:STDOUT:
  3660. // CHECK:STDOUT: class @D {
  3661. // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete = constants.%empty_struct_type]
  3662. // CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %empty_struct_type [concrete = constants.%complete_type.357]
  3663. // CHECK:STDOUT: complete_type_witness = %complete_type
  3664. // CHECK:STDOUT:
  3665. // CHECK:STDOUT: !members:
  3666. // CHECK:STDOUT: .Self = constants.%D
  3667. // CHECK:STDOUT: }
  3668. // CHECK:STDOUT:
  3669. // CHECK:STDOUT: fn @F() {
  3670. // CHECK:STDOUT: !entry:
  3671. // CHECK:STDOUT: name_binding_decl {
  3672. // CHECK:STDOUT: %a.patt: %pattern_type.7f8 = binding_pattern a [concrete]
  3673. // CHECK:STDOUT: }
  3674. // CHECK:STDOUT: %.loc12_21.1: %empty_struct_type = struct_literal ()
  3675. // CHECK:STDOUT: %C.ref: %C.type = name_ref C, file.%C.decl [concrete = constants.%C.generic]
  3676. // CHECK:STDOUT: %D.ref.loc12_28: type = name_ref D, file.%D.decl [concrete = constants.%D]
  3677. // CHECK:STDOUT: %C: type = class_type @C, @C(constants.%D) [concrete = constants.%C.131]
  3678. // CHECK:STDOUT: %.loc12_21.2: ref %C.131 = temporary_storage
  3679. // CHECK:STDOUT: %.loc12_21.3: init %C.131 = class_init (), %.loc12_21.2 [concrete = constants.%C.val]
  3680. // CHECK:STDOUT: %.loc12_21.4: ref %C.131 = temporary %.loc12_21.2, %.loc12_21.3
  3681. // CHECK:STDOUT: %.loc12_23: ref %C.131 = converted %.loc12_21.1, %.loc12_21.4
  3682. // CHECK:STDOUT: %.loc12_11.1: type = splice_block %impl.elem0 [concrete = constants.%C.131] {
  3683. // CHECK:STDOUT: %D.ref.loc12_10: type = name_ref D, file.%D.decl [concrete = constants.%D]
  3684. // CHECK:STDOUT: %Z.ref: type = name_ref Z, file.%Z.decl [concrete = constants.%Z.type]
  3685. // CHECK:STDOUT: %X.ref: %Z.assoc_type = name_ref X, @X.%assoc0 [concrete = constants.%assoc0]
  3686. // CHECK:STDOUT: %Z.facet: %Z.type = facet_value constants.%D, (constants.%Z.impl_witness.19e) [concrete = constants.%Z.facet.f2a]
  3687. // CHECK:STDOUT: %.loc12_11.2: %Z.type = converted %D.ref.loc12_10, %Z.facet [concrete = constants.%Z.facet.f2a]
  3688. // CHECK:STDOUT: %impl.elem0: type = impl_witness_access constants.%Z.impl_witness.19e, element0 [concrete = constants.%C.131]
  3689. // CHECK:STDOUT: }
  3690. // CHECK:STDOUT: %a: ref %C.131 = bind_name a, %.loc12_23
  3691. // CHECK:STDOUT: return
  3692. // CHECK:STDOUT: }
  3693. // CHECK:STDOUT:
  3694. // CHECK:STDOUT: specific @X(constants.%Self) {}
  3695. // CHECK:STDOUT:
  3696. // CHECK:STDOUT: specific @C(constants.%T) {
  3697. // CHECK:STDOUT: %T.loc6_9.2 => constants.%T
  3698. // CHECK:STDOUT: }
  3699. // CHECK:STDOUT:
  3700. // CHECK:STDOUT: specific @X(constants.%Z.facet.2a2) {}
  3701. // CHECK:STDOUT:
  3702. // CHECK:STDOUT: specific @impl(constants.%T) {
  3703. // CHECK:STDOUT: %T.loc9_14.2 => constants.%T
  3704. // CHECK:STDOUT: %C.loc9_45.2 => constants.%C.f2e
  3705. // CHECK:STDOUT: %Z_where.type => constants.%Z_where.type.585
  3706. // CHECK:STDOUT: %require_complete => constants.%require_complete
  3707. // CHECK:STDOUT: %Z.impl_witness => constants.%Z.impl_witness.8bc
  3708. // CHECK:STDOUT: }
  3709. // CHECK:STDOUT:
  3710. // CHECK:STDOUT: specific @impl(constants.%D) {
  3711. // CHECK:STDOUT: %T.loc9_14.2 => constants.%D
  3712. // CHECK:STDOUT: %C.loc9_45.2 => constants.%C.131
  3713. // CHECK:STDOUT: %Z_where.type => constants.%Z_where.type.1a6
  3714. // CHECK:STDOUT: %require_complete => constants.%complete_type.00b
  3715. // CHECK:STDOUT: %Z.impl_witness => constants.%Z.impl_witness.19e
  3716. // CHECK:STDOUT:
  3717. // CHECK:STDOUT: !definition:
  3718. // CHECK:STDOUT: }
  3719. // CHECK:STDOUT:
  3720. // CHECK:STDOUT: specific @C(constants.%D) {
  3721. // CHECK:STDOUT: %T.loc6_9.2 => constants.%D
  3722. // CHECK:STDOUT:
  3723. // CHECK:STDOUT: !definition:
  3724. // CHECK:STDOUT: }
  3725. // CHECK:STDOUT:
  3726. // CHECK:STDOUT: specific @X(constants.%Z.facet.f2a) {}
  3727. // CHECK:STDOUT: