use_assoc_entity.carbon 326 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363
  1. // Part of the Carbon Language project, under the Apache License v2.0 with LLVM
  2. // Exceptions. See /LICENSE for license information.
  3. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
  4. //
  5. // INCLUDE-FILE: toolchain/testing/testdata/min_prelude/primitives.carbon
  6. // TODO: Add ranges and switch to "--dump-sem-ir-ranges=only".
  7. // EXTRA-ARGS: --dump-sem-ir-ranges=if-present
  8. //
  9. // AUTOUPDATE
  10. // TIP: To test this file alone, run:
  11. // TIP: bazel test //toolchain/testing:file_test --test_arg=--file_tests=toolchain/check/testdata/impl/use_assoc_entity.carbon
  12. // TIP: To dump output, run:
  13. // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/check/testdata/impl/use_assoc_entity.carbon
  14. // --- associated_type_in_method_signature.carbon
  15. library "[[@TEST_NAME]]";
  16. interface J {
  17. let U:! type;
  18. fn F[self: Self](u: U) -> U;
  19. }
  20. impl () as J where .U = i32 {
  21. fn F[self: Self](u: i32) -> i32 { return -u; }
  22. }
  23. fn CallMethod(x: ()) -> i32 {
  24. return x.(J.F)(40);
  25. }
  26. class C {
  27. // This allows the type to be copyable so it can be returned.
  28. adapt {};
  29. }
  30. impl C as J where .U = C {
  31. fn F[self: Self](u: C) -> C { return self; }
  32. }
  33. // --- associated_type_in_function_signature.carbon
  34. library "[[@TEST_NAME]]";
  35. interface J {
  36. let U:! type;
  37. fn F(u: U) -> U;
  38. }
  39. class D { }
  40. impl D as J where .U = i32 {
  41. fn F(u: i32) -> i32 { return -u; }
  42. }
  43. fn CallFunction() -> i32 {
  44. return D.(J.F)(4);
  45. }
  46. // --- extend_impl_with_associated_type_in_signature.carbon
  47. library "[[@TEST_NAME]]";
  48. interface J {
  49. let U:! type;
  50. fn F(u: U) -> U;
  51. fn G[self: Self](v: U) -> U;
  52. }
  53. class E {
  54. extend impl as J where .U = i32 {
  55. fn F(u: i32) -> i32 {
  56. return -u;
  57. }
  58. fn G[self: Self](v: i32) -> i32 {
  59. return -v;
  60. }
  61. }
  62. }
  63. fn CallBoth(e: E) {
  64. let e1: i32 = e.F(2);
  65. let e2: i32 = e.G(3);
  66. let e3: i32 = E.F(4);
  67. let e4: i32 = e.(E.G)(5);
  68. let e5: i32 = e.(J.G)(6);
  69. }
  70. fn GenericCallF[T:! J](t: T, u: T.U) -> T.U {
  71. return t.F(u);
  72. }
  73. fn CallGeneric(e: E) -> i32 {
  74. return GenericCallF(e, 2);
  75. }
  76. // --- use_constraint_on_associated_type.carbon
  77. library "[[@TEST_NAME]]";
  78. interface I {
  79. fn Op[self: Self](b: Self) -> Self;
  80. }
  81. interface J {
  82. let U:! I & Core.Destroy;
  83. fn F(u: U) -> U;
  84. }
  85. fn GenericResult[T:! J](t: T, u: T.U) -> T.U {
  86. return t.F(u).(I.Op)(T.F(u));
  87. }
  88. // --- interface_qualified.carbon
  89. library "[[@TEST_NAME]]";
  90. interface J {
  91. let U:! type;
  92. fn G[self: Self](v: U) -> U;
  93. }
  94. fn GenericCallInterfaceQualified[T:! J](t: T, u: T.U) -> T.U {
  95. return t.(J.G)(u);
  96. }
  97. // --- use_where.carbon
  98. library "[[@TEST_NAME]]";
  99. interface J {
  100. let U:! type;
  101. fn F(u: U) -> U;
  102. }
  103. fn GenericCallFI32[T:! J where .U = i32](t: T) -> i32 {
  104. return t.F(2);
  105. }
  106. // --- fail_todo_use_associated_constant_in_impl.carbon
  107. library "[[@TEST_NAME]]";
  108. interface J {
  109. let U:! type;
  110. fn F(u: U) -> U;
  111. }
  112. class E {
  113. extend impl as J where .U = i32 {
  114. // TODO: U should be in scope and usable as soon as we finish the
  115. // declaration / enter the definition.
  116. //
  117. // 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]
  118. // CHECK:STDERR: fn F(u: U) -> U {
  119. // CHECK:STDERR: ^
  120. // 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]
  121. // CHECK:STDERR: fn F(u: U) -> U {
  122. // CHECK:STDERR: ^
  123. // CHECK:STDERR:
  124. // 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]
  125. // CHECK:STDERR: fn F(u: U) -> U {
  126. // CHECK:STDERR: ^
  127. // 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]
  128. // CHECK:STDERR: fn F(u: U) -> U {
  129. // CHECK:STDERR: ^
  130. // CHECK:STDERR:
  131. fn F(u: U) -> U {
  132. return u;
  133. }
  134. }
  135. }
  136. // --- fail_todo_call_extend_fn.carbon
  137. library "[[@TEST_NAME]]";
  138. interface J {
  139. fn F() {}
  140. }
  141. class E {
  142. extend impl as J {
  143. fn F() {}
  144. }
  145. // CHECK:STDERR: fail_todo_call_extend_fn.carbon:[[@LINE+4]]:12: error: value of type `<associated entity in J>` is not callable [CallToNonCallable]
  146. // CHECK:STDERR: fn G() { F(); }
  147. // CHECK:STDERR: ^~~
  148. // CHECK:STDERR:
  149. fn G() { F(); }
  150. }
  151. // --- call_extend_method.carbon
  152. library "[[@TEST_NAME]]";
  153. interface J {
  154. fn F[self: Self]() {}
  155. }
  156. class E {
  157. extend impl as J {
  158. fn F[self: Self]() {}
  159. }
  160. fn G[self: Self]() { self.F(); }
  161. }
  162. // --- fail_todo_use_extend_constant.carbon
  163. library "[[@TEST_NAME]]";
  164. interface J {
  165. let X:! type;
  166. }
  167. class E {
  168. extend impl as J where .X = () {}
  169. // TODO: `X` should be in scope and directly usable.
  170. // CHECK:STDERR: fail_todo_use_extend_constant.carbon:[[@LINE+7]]:13: error: cannot implicitly convert non-type value of type `<associated entity in J>` to `type` [ConversionFailureNonTypeToFacet]
  171. // CHECK:STDERR: fn G() -> X { return (); }
  172. // CHECK:STDERR: ^
  173. // CHECK:STDERR: fail_todo_use_extend_constant.carbon:[[@LINE+4]]:13: note: type `<associated entity in J>` does not implement interface `Core.ImplicitAs(type)` [MissingImplInMemberAccessNote]
  174. // CHECK:STDERR: fn G() -> X { return (); }
  175. // CHECK:STDERR: ^
  176. // CHECK:STDERR:
  177. fn G() -> X { return (); }
  178. }
  179. // --- fail_todo_self_period_associated_type.carbon
  180. library "[[@TEST_NAME]]";
  181. interface J2 {
  182. let U2:! type;
  183. // CHECK:STDERR: fail_todo_self_period_associated_type.carbon:[[@LINE+14]]:23: error: member access into object of incomplete type `J2` [IncompleteTypeInMemberAccess]
  184. // CHECK:STDERR: fn F[self: Self](z: Self.U2) -> Self.U2;
  185. // CHECK:STDERR: ^~~~
  186. // CHECK:STDERR: fail_todo_self_period_associated_type.carbon:[[@LINE-5]]:1: note: interface is currently being defined [InterfaceIncompleteWithinDefinition]
  187. // CHECK:STDERR: interface J2 {
  188. // CHECK:STDERR: ^~~~~~~~~~~~~~
  189. // CHECK:STDERR:
  190. // CHECK:STDERR: fail_todo_self_period_associated_type.carbon:[[@LINE+7]]:35: error: member access into object of incomplete type `J2` [IncompleteTypeInMemberAccess]
  191. // CHECK:STDERR: fn F[self: Self](z: Self.U2) -> Self.U2;
  192. // CHECK:STDERR: ^~~~
  193. // CHECK:STDERR: fail_todo_self_period_associated_type.carbon:[[@LINE-12]]:1: note: interface is currently being defined [InterfaceIncompleteWithinDefinition]
  194. // CHECK:STDERR: interface J2 {
  195. // CHECK:STDERR: ^~~~~~~~~~~~~~
  196. // CHECK:STDERR:
  197. fn F[self: Self](z: Self.U2) -> Self.U2;
  198. }
  199. impl () as J2 where .U2 = {} {
  200. fn F[self: Self](z: {}) -> {} { return z; }
  201. }
  202. class C2 {
  203. // This allows the type to be copyable so it can be returned.
  204. adapt {};
  205. }
  206. impl C2 as J2 where .U2 = C2 {
  207. fn F[self: Self](z: C2) -> C2 { return self; }
  208. }
  209. // --- fail_associated_type_in_signature_mismatch.carbon
  210. library "[[@TEST_NAME]]";
  211. interface K {
  212. let V:! type;
  213. // CHECK:STDERR: fail_associated_type_in_signature_mismatch.carbon:[[@LINE+3]]:20: error: cannot convert from struct type `{.a: ()}` to `{.x: ()}`: missing field `x` in source type [StructInitMissingFieldInConversion]
  214. // CHECK:STDERR: fn F[self: Self](v: V) -> V;
  215. // CHECK:STDERR: ^~~~
  216. fn F[self: Self](v: V) -> V;
  217. }
  218. impl () as K where .V = {.a: ()} {
  219. // CHECK:STDERR: fail_associated_type_in_signature_mismatch.carbon:[[@LINE+14]]:20: note: initializing function parameter [InCallToFunctionParam]
  220. // CHECK:STDERR: fn F[self: Self](v: {.x: ()}) -> {.x: ()} { return v; }
  221. // CHECK:STDERR: ^~~~~~~~~~~
  222. // CHECK:STDERR: fail_associated_type_in_signature_mismatch.carbon:[[@LINE-7]]:3: note: while building thunk to match the signature of this function [ThunkSignature]
  223. // CHECK:STDERR: fn F[self: Self](v: V) -> V;
  224. // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
  225. // CHECK:STDERR:
  226. // CHECK:STDERR: fail_associated_type_in_signature_mismatch.carbon:[[@LINE+7]]:3: error: cannot convert from struct type `{.x: ()}` to `{.a: ()}`: missing field `a` in source type [StructInitMissingFieldInConversion]
  227. // CHECK:STDERR: fn F[self: Self](v: {.x: ()}) -> {.x: ()} { return v; }
  228. // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  229. // CHECK:STDERR: fail_associated_type_in_signature_mismatch.carbon:[[@LINE-14]]:3: note: while building thunk to match the signature of this function [ThunkSignature]
  230. // CHECK:STDERR: fn F[self: Self](v: V) -> V;
  231. // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
  232. // CHECK:STDERR:
  233. fn F[self: Self](v: {.x: ()}) -> {.x: ()} { return v; }
  234. }
  235. // --- use_non-type_in_function.carbon
  236. library "[[@TEST_NAME]]";
  237. interface M {
  238. let Z:! {.b: {}};
  239. fn G() -> {};
  240. }
  241. impl () as M where .Z = {.b = {}} {
  242. fn G() -> {} {
  243. return (Self as M).Z.b;
  244. }
  245. }
  246. // --- self_as_uses_correct_rewrite_constraint.carbon
  247. library "[[@TEST_NAME]]";
  248. class C(T:! type) {}
  249. interface M {
  250. let Z:! {.b: type};
  251. fn G() -> type;
  252. }
  253. impl C({}) as M where .Z = {.b = {}} {
  254. fn G() -> type {
  255. return (Self as M).Z.b;
  256. }
  257. }
  258. impl C(()) as M where .Z = {.b = ()} {
  259. fn G() -> type {
  260. return (Self as M).Z.b;
  261. }
  262. }
  263. // --- associated_int_in_array.carbon
  264. library "[[@TEST_NAME]]";
  265. interface I {
  266. let N:! i32;
  267. fn F[self: Self]() -> array(bool, N);
  268. }
  269. impl () as I where .N = 2 {
  270. fn F[self: Self]() -> array(bool, 2) { return (true, false); }
  271. }
  272. // --- symbolic_associated_type_in_concrete_context.carbon
  273. interface Z {
  274. let X:! type;
  275. }
  276. class C(T:! type) {}
  277. class D {}
  278. impl forall [T:! type] T as Z where .X = C(T) {}
  279. fn F() {
  280. let a: D.(Z.X) = {} as C(D);
  281. }
  282. // CHECK:STDOUT: --- associated_type_in_method_signature.carbon
  283. // CHECK:STDOUT:
  284. // CHECK:STDOUT: constants {
  285. // CHECK:STDOUT: %J.type: type = facet_type <@J> [concrete]
  286. // CHECK:STDOUT: %Self.dc6: %J.type = symbolic_binding Self, 0 [symbolic]
  287. // CHECK:STDOUT: %J.assoc_type: type = assoc_entity_type @J [concrete]
  288. // CHECK:STDOUT: %assoc0.411: %J.assoc_type = assoc_entity element0, @J.%U [concrete]
  289. // CHECK:STDOUT: %Self.binding.as_type.1fa: type = symbolic_binding_type Self, 0, %Self.dc6 [symbolic]
  290. // CHECK:STDOUT: %pattern_type.4c4: type = pattern_type %Self.binding.as_type.1fa [symbolic]
  291. // CHECK:STDOUT: %J.lookup_impl_witness.cd2: <witness> = lookup_impl_witness %Self.dc6, @J [symbolic]
  292. // CHECK:STDOUT: %impl.elem0.fa9: type = impl_witness_access %J.lookup_impl_witness.cd2, element0 [symbolic]
  293. // CHECK:STDOUT: %pattern_type.345: type = pattern_type %impl.elem0.fa9 [symbolic]
  294. // CHECK:STDOUT: %J.F.type: type = fn_type @J.F [concrete]
  295. // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete]
  296. // CHECK:STDOUT: %J.F: %J.F.type = struct_value () [concrete]
  297. // CHECK:STDOUT: %assoc1.572: %J.assoc_type = assoc_entity element1, @J.%J.F.decl [concrete]
  298. // CHECK:STDOUT: %empty_tuple: %empty_tuple.type = tuple_value () [concrete]
  299. // CHECK:STDOUT: %.Self.c58: %J.type = symbolic_binding .Self [symbolic_self]
  300. // CHECK:STDOUT: %.Self.binding.as_type: type = symbolic_binding_type .Self, %.Self.c58 [symbolic_self]
  301. // CHECK:STDOUT: %J.lookup_impl_witness.ab8: <witness> = lookup_impl_witness %.Self.c58, @J [symbolic_self]
  302. // CHECK:STDOUT: %impl.elem0.ab2: type = impl_witness_access %J.lookup_impl_witness.ab8, element0 [symbolic_self]
  303. // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete]
  304. // CHECK:STDOUT: %Int.type: type = generic_class_type @Int [concrete]
  305. // CHECK:STDOUT: %Int.generic: %Int.type = struct_value () [concrete]
  306. // CHECK:STDOUT: %N: Core.IntLiteral = symbolic_binding N, 0 [symbolic]
  307. // CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [concrete]
  308. // CHECK:STDOUT: %J_where.type.847: type = facet_type <@J where %impl.elem0.ab2 = %i32> [concrete]
  309. // CHECK:STDOUT: %J.impl_witness.c0b: <witness> = impl_witness file.%J.impl_witness_table.loc8 [concrete]
  310. // CHECK:STDOUT: %pattern_type.cb1: type = pattern_type %empty_tuple.type [concrete]
  311. // CHECK:STDOUT: %pattern_type.7ce: type = pattern_type %i32 [concrete]
  312. // CHECK:STDOUT: %empty_tuple.type.as.J.impl.F.type: type = fn_type @empty_tuple.type.as.J.impl.F [concrete]
  313. // CHECK:STDOUT: %empty_tuple.type.as.J.impl.F: %empty_tuple.type.as.J.impl.F.type = struct_value () [concrete]
  314. // CHECK:STDOUT: %J.facet.2a7: %J.type = facet_value %empty_tuple.type, (%J.impl_witness.c0b) [concrete]
  315. // CHECK:STDOUT: %Negate.type: type = facet_type <@Negate> [concrete]
  316. // CHECK:STDOUT: %Negate.Op.type: type = fn_type @Negate.Op [concrete]
  317. // CHECK:STDOUT: %Int.as.Negate.impl.Op.type.1d3: type = fn_type @Int.as.Negate.impl.Op, @Int.as.Negate.impl(%N) [symbolic]
  318. // CHECK:STDOUT: %Int.as.Negate.impl.Op.5d2: %Int.as.Negate.impl.Op.type.1d3 = struct_value () [symbolic]
  319. // CHECK:STDOUT: %Negate.impl_witness.bc7: <witness> = impl_witness imports.%Negate.impl_witness_table, @Int.as.Negate.impl(%int_32) [concrete]
  320. // CHECK:STDOUT: %Int.as.Negate.impl.Op.type.6b1: type = fn_type @Int.as.Negate.impl.Op, @Int.as.Negate.impl(%int_32) [concrete]
  321. // CHECK:STDOUT: %Int.as.Negate.impl.Op.4f9: %Int.as.Negate.impl.Op.type.6b1 = struct_value () [concrete]
  322. // CHECK:STDOUT: %Negate.facet: %Negate.type = facet_value %i32, (%Negate.impl_witness.bc7) [concrete]
  323. // CHECK:STDOUT: %.f7e: type = fn_type_with_self_type %Negate.Op.type, %Negate.facet [concrete]
  324. // CHECK:STDOUT: %Int.as.Negate.impl.Op.specific_fn: <specific function> = specific_function %Int.as.Negate.impl.Op.4f9, @Int.as.Negate.impl.Op(%int_32) [concrete]
  325. // CHECK:STDOUT: %CallMethod.type: type = fn_type @CallMethod [concrete]
  326. // CHECK:STDOUT: %CallMethod: %CallMethod.type = struct_value () [concrete]
  327. // CHECK:STDOUT: %.813: type = fn_type_with_self_type %J.F.type, %J.facet.2a7 [concrete]
  328. // CHECK:STDOUT: %int_40.f80: Core.IntLiteral = int_value 40 [concrete]
  329. // CHECK:STDOUT: %ImplicitAs.type.cc7: type = generic_interface_type @ImplicitAs [concrete]
  330. // CHECK:STDOUT: %ImplicitAs.generic: %ImplicitAs.type.cc7 = struct_value () [concrete]
  331. // CHECK:STDOUT: %ImplicitAs.type.d14: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete]
  332. // CHECK:STDOUT: %ImplicitAs.Convert.type.1b6: type = fn_type @ImplicitAs.Convert, @ImplicitAs(%i32) [concrete]
  333. // CHECK:STDOUT: %To: Core.IntLiteral = symbolic_binding To, 0 [symbolic]
  334. // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.f51: type = fn_type @Core.IntLiteral.as.ImplicitAs.impl.Convert, @Core.IntLiteral.as.ImplicitAs.impl(%To) [symbolic]
  335. // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.2a1: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.f51 = struct_value () [symbolic]
  336. // CHECK:STDOUT: %ImplicitAs.impl_witness.bc9: <witness> = impl_witness imports.%ImplicitAs.impl_witness_table.132, @Core.IntLiteral.as.ImplicitAs.impl(%int_32) [concrete]
  337. // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.51e: type = fn_type @Core.IntLiteral.as.ImplicitAs.impl.Convert, @Core.IntLiteral.as.ImplicitAs.impl(%int_32) [concrete]
  338. // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.e9b: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.51e = struct_value () [concrete]
  339. // CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.d14 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.bc9) [concrete]
  340. // CHECK:STDOUT: %.322: type = fn_type_with_self_type %ImplicitAs.Convert.type.1b6, %ImplicitAs.facet [concrete]
  341. // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound: <bound method> = bound_method %int_40.f80, %Core.IntLiteral.as.ImplicitAs.impl.Convert.e9b [concrete]
  342. // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn: <specific function> = specific_function %Core.IntLiteral.as.ImplicitAs.impl.Convert.e9b, @Core.IntLiteral.as.ImplicitAs.impl.Convert(%int_32) [concrete]
  343. // CHECK:STDOUT: %bound_method: <bound method> = bound_method %int_40.f80, %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete]
  344. // CHECK:STDOUT: %int_40.518: %i32 = int_value 40 [concrete]
  345. // CHECK:STDOUT: %C: type = class_type @C [concrete]
  346. // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete]
  347. // CHECK:STDOUT: %empty_struct: %empty_struct_type = struct_value () [concrete]
  348. // CHECK:STDOUT: %complete_type.357: <witness> = complete_type_witness %empty_struct_type [concrete]
  349. // CHECK:STDOUT: %J_where.type.9e8: type = facet_type <@J where %impl.elem0.ab2 = %C> [concrete]
  350. // CHECK:STDOUT: %J.impl_witness.2a8: <witness> = impl_witness file.%J.impl_witness_table.loc21 [concrete]
  351. // CHECK:STDOUT: %pattern_type.c48: type = pattern_type %C [concrete]
  352. // CHECK:STDOUT: %C.as.J.impl.F.type: type = fn_type @C.as.J.impl.F [concrete]
  353. // CHECK:STDOUT: %C.as.J.impl.F: %C.as.J.impl.F.type = struct_value () [concrete]
  354. // CHECK:STDOUT: %J.facet.226: %J.type = facet_value %C, (%J.impl_witness.2a8) [concrete]
  355. // CHECK:STDOUT: %C.val: %C = struct_value () [concrete]
  356. // CHECK:STDOUT: }
  357. // CHECK:STDOUT:
  358. // CHECK:STDOUT: imports {
  359. // CHECK:STDOUT: %Core: <namespace> = namespace file.%Core.import, [concrete] {
  360. // CHECK:STDOUT: .Int = %Core.Int
  361. // CHECK:STDOUT: .Negate = %Core.Negate
  362. // CHECK:STDOUT: .ImplicitAs = %Core.ImplicitAs
  363. // CHECK:STDOUT: import Core//prelude
  364. // CHECK:STDOUT: import Core//prelude/...
  365. // CHECK:STDOUT: }
  366. // CHECK:STDOUT: %Core.Int: %Int.type = import_ref Core//prelude/parts/int, Int, loaded [concrete = constants.%Int.generic]
  367. // CHECK:STDOUT: %Core.Negate: type = import_ref Core//prelude/parts/int_literal, Negate, loaded [concrete = constants.%Negate.type]
  368. // CHECK:STDOUT: %Core.import_ref.3f0 = import_ref Core//prelude/parts/int, loc{{\d+_\d+}}, unloaded
  369. // CHECK:STDOUT: %Core.import_ref.ca8: @Int.as.Negate.impl.%Int.as.Negate.impl.Op.type (%Int.as.Negate.impl.Op.type.1d3) = import_ref Core//prelude/parts/int, loc{{\d+_\d+}}, loaded [symbolic = @Int.as.Negate.impl.%Int.as.Negate.impl.Op (constants.%Int.as.Negate.impl.Op.5d2)]
  370. // CHECK:STDOUT: %Negate.impl_witness_table = impl_witness_table (%Core.import_ref.3f0, %Core.import_ref.ca8), @Int.as.Negate.impl [concrete]
  371. // CHECK:STDOUT: %Core.ImplicitAs: %ImplicitAs.type.cc7 = import_ref Core//prelude/parts/as, ImplicitAs, loaded [concrete = constants.%ImplicitAs.generic]
  372. // CHECK:STDOUT: %Core.import_ref.e24: @Core.IntLiteral.as.ImplicitAs.impl.%Core.IntLiteral.as.ImplicitAs.impl.Convert.type (%Core.IntLiteral.as.ImplicitAs.impl.Convert.type.f51) = import_ref Core//prelude/parts/int, loc{{\d+_\d+}}, loaded [symbolic = @Core.IntLiteral.as.ImplicitAs.impl.%Core.IntLiteral.as.ImplicitAs.impl.Convert (constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.2a1)]
  373. // CHECK:STDOUT: %ImplicitAs.impl_witness_table.132 = impl_witness_table (%Core.import_ref.e24), @Core.IntLiteral.as.ImplicitAs.impl [concrete]
  374. // CHECK:STDOUT: }
  375. // CHECK:STDOUT:
  376. // CHECK:STDOUT: file {
  377. // CHECK:STDOUT: package: <namespace> = namespace [concrete] {
  378. // CHECK:STDOUT: .Core = imports.%Core
  379. // CHECK:STDOUT: .J = %J.decl
  380. // CHECK:STDOUT: .CallMethod = %CallMethod.decl
  381. // CHECK:STDOUT: .C = %C.decl
  382. // CHECK:STDOUT: }
  383. // CHECK:STDOUT: %Core.import = import Core
  384. // CHECK:STDOUT: %J.decl: type = interface_decl @J [concrete = constants.%J.type] {} {}
  385. // CHECK:STDOUT: impl_decl @empty_tuple.type.as.J.impl [concrete] {} {
  386. // CHECK:STDOUT: %.loc8_7.1: %empty_tuple.type = tuple_literal () [concrete = constants.%empty_tuple]
  387. // CHECK:STDOUT: %.loc8_7.2: type = converted %.loc8_7.1, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type]
  388. // CHECK:STDOUT: %J.ref: type = name_ref J, file.%J.decl [concrete = constants.%J.type]
  389. // CHECK:STDOUT: %.Self: %J.type = symbolic_binding .Self [symbolic_self = constants.%.Self.c58]
  390. // CHECK:STDOUT: %.Self.ref: %J.type = name_ref .Self, %.Self [symbolic_self = constants.%.Self.c58]
  391. // CHECK:STDOUT: %U.ref: %J.assoc_type = name_ref U, @U.%assoc0 [concrete = constants.%assoc0.411]
  392. // CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self.ref [symbolic_self = constants.%.Self.binding.as_type]
  393. // CHECK:STDOUT: %.loc8_20: type = converted %.Self.ref, %.Self.as_type [symbolic_self = constants.%.Self.binding.as_type]
  394. // CHECK:STDOUT: %impl.elem0: type = impl_witness_access constants.%J.lookup_impl_witness.ab8, element0 [symbolic_self = constants.%impl.elem0.ab2]
  395. // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete = constants.%int_32]
  396. // CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32]
  397. // CHECK:STDOUT: %.loc8_14: type = where_expr %.Self [concrete = constants.%J_where.type.847] {
  398. // CHECK:STDOUT: requirement_base_facet_type constants.%J.type
  399. // CHECK:STDOUT: requirement_rewrite %impl.elem0, %i32
  400. // CHECK:STDOUT: }
  401. // CHECK:STDOUT: }
  402. // CHECK:STDOUT: %J.impl_witness_table.loc8 = impl_witness_table (%impl_witness_assoc_constant.loc8, @empty_tuple.type.as.J.impl.%empty_tuple.type.as.J.impl.F.decl), @empty_tuple.type.as.J.impl [concrete]
  403. // CHECK:STDOUT: %J.impl_witness.loc8: <witness> = impl_witness %J.impl_witness_table.loc8 [concrete = constants.%J.impl_witness.c0b]
  404. // CHECK:STDOUT: %impl_witness_assoc_constant.loc8: type = impl_witness_assoc_constant constants.%i32 [concrete = constants.%i32]
  405. // CHECK:STDOUT: %CallMethod.decl: %CallMethod.type = fn_decl @CallMethod [concrete = constants.%CallMethod] {
  406. // CHECK:STDOUT: %x.patt: %pattern_type.cb1 = value_binding_pattern x [concrete]
  407. // CHECK:STDOUT: %x.param_patt: %pattern_type.cb1 = value_param_pattern %x.patt, call_param0 [concrete]
  408. // CHECK:STDOUT: %return.patt: %pattern_type.7ce = return_slot_pattern [concrete]
  409. // CHECK:STDOUT: %return.param_patt: %pattern_type.7ce = out_param_pattern %return.patt, call_param1 [concrete]
  410. // CHECK:STDOUT: } {
  411. // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete = constants.%int_32]
  412. // CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32]
  413. // CHECK:STDOUT: %x.param: %empty_tuple.type = value_param call_param0
  414. // CHECK:STDOUT: %.loc12_19.1: type = splice_block %.loc12_19.3 [concrete = constants.%empty_tuple.type] {
  415. // CHECK:STDOUT: %.loc12_19.2: %empty_tuple.type = tuple_literal () [concrete = constants.%empty_tuple]
  416. // CHECK:STDOUT: %.loc12_19.3: type = converted %.loc12_19.2, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type]
  417. // CHECK:STDOUT: }
  418. // CHECK:STDOUT: %x: %empty_tuple.type = value_binding x, %x.param
  419. // CHECK:STDOUT: %return.param: ref %i32 = out_param call_param1
  420. // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param
  421. // CHECK:STDOUT: }
  422. // CHECK:STDOUT: %C.decl: type = class_decl @C [concrete = constants.%C] {} {}
  423. // CHECK:STDOUT: impl_decl @C.as.J.impl [concrete] {} {
  424. // CHECK:STDOUT: %C.ref.loc21_6: type = name_ref C, file.%C.decl [concrete = constants.%C]
  425. // CHECK:STDOUT: %J.ref: type = name_ref J, file.%J.decl [concrete = constants.%J.type]
  426. // CHECK:STDOUT: %.Self: %J.type = symbolic_binding .Self [symbolic_self = constants.%.Self.c58]
  427. // CHECK:STDOUT: %.Self.ref: %J.type = name_ref .Self, %.Self [symbolic_self = constants.%.Self.c58]
  428. // CHECK:STDOUT: %U.ref: %J.assoc_type = name_ref U, @U.%assoc0 [concrete = constants.%assoc0.411]
  429. // CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self.ref [symbolic_self = constants.%.Self.binding.as_type]
  430. // CHECK:STDOUT: %.loc21_19: type = converted %.Self.ref, %.Self.as_type [symbolic_self = constants.%.Self.binding.as_type]
  431. // CHECK:STDOUT: %impl.elem0: type = impl_witness_access constants.%J.lookup_impl_witness.ab8, element0 [symbolic_self = constants.%impl.elem0.ab2]
  432. // CHECK:STDOUT: %C.ref.loc21_24: type = name_ref C, file.%C.decl [concrete = constants.%C]
  433. // CHECK:STDOUT: %.loc21_13: type = where_expr %.Self [concrete = constants.%J_where.type.9e8] {
  434. // CHECK:STDOUT: requirement_base_facet_type constants.%J.type
  435. // CHECK:STDOUT: requirement_rewrite %impl.elem0, %C.ref.loc21_24
  436. // CHECK:STDOUT: }
  437. // CHECK:STDOUT: }
  438. // CHECK:STDOUT: %J.impl_witness_table.loc21 = impl_witness_table (%impl_witness_assoc_constant.loc21, @C.as.J.impl.%C.as.J.impl.F.decl), @C.as.J.impl [concrete]
  439. // CHECK:STDOUT: %J.impl_witness.loc21: <witness> = impl_witness %J.impl_witness_table.loc21 [concrete = constants.%J.impl_witness.2a8]
  440. // CHECK:STDOUT: %impl_witness_assoc_constant.loc21: type = impl_witness_assoc_constant constants.%C [concrete = constants.%C]
  441. // CHECK:STDOUT: }
  442. // CHECK:STDOUT:
  443. // CHECK:STDOUT: interface @J {
  444. // CHECK:STDOUT: %Self: %J.type = symbolic_binding Self, 0 [symbolic = constants.%Self.dc6]
  445. // CHECK:STDOUT: %U: type = assoc_const_decl @U [concrete] {
  446. // CHECK:STDOUT: %assoc0: %J.assoc_type = assoc_entity element0, @J.%U [concrete = constants.%assoc0.411]
  447. // CHECK:STDOUT: }
  448. // CHECK:STDOUT: %J.F.decl: %J.F.type = fn_decl @J.F [concrete = constants.%J.F] {
  449. // CHECK:STDOUT: %self.patt: @J.F.%pattern_type.loc5_8 (%pattern_type.4c4) = value_binding_pattern self [concrete]
  450. // CHECK:STDOUT: %self.param_patt: @J.F.%pattern_type.loc5_8 (%pattern_type.4c4) = value_param_pattern %self.patt, call_param0 [concrete]
  451. // CHECK:STDOUT: %u.patt: @J.F.%pattern_type.loc5_20 (%pattern_type.345) = value_binding_pattern u [concrete]
  452. // CHECK:STDOUT: %u.param_patt: @J.F.%pattern_type.loc5_20 (%pattern_type.345) = value_param_pattern %u.patt, call_param1 [concrete]
  453. // CHECK:STDOUT: %return.patt: @J.F.%pattern_type.loc5_20 (%pattern_type.345) = return_slot_pattern [concrete]
  454. // CHECK:STDOUT: %return.param_patt: @J.F.%pattern_type.loc5_20 (%pattern_type.345) = out_param_pattern %return.patt, call_param2 [concrete]
  455. // CHECK:STDOUT: } {
  456. // CHECK:STDOUT: %impl.elem0.loc5_29: type = impl_witness_access constants.%J.lookup_impl_witness.cd2, element0 [symbolic = %impl.elem0.loc5_23.1 (constants.%impl.elem0.fa9)]
  457. // CHECK:STDOUT: %U.ref.loc5_29: type = name_ref U, %impl.elem0.loc5_29 [symbolic = %impl.elem0.loc5_23.1 (constants.%impl.elem0.fa9)]
  458. // CHECK:STDOUT: %self.param: @J.F.%Self.binding.as_type (%Self.binding.as_type.1fa) = value_param call_param0
  459. // CHECK:STDOUT: %.loc5_14.1: type = splice_block %.loc5_14.2 [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type.1fa)] {
  460. // CHECK:STDOUT: %Self.ref: %J.type = name_ref Self, @J.%Self [symbolic = %Self (constants.%Self.dc6)]
  461. // CHECK:STDOUT: %Self.as_type: type = facet_access_type %Self.ref [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type.1fa)]
  462. // CHECK:STDOUT: %.loc5_14.2: type = converted %Self.ref, %Self.as_type [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type.1fa)]
  463. // CHECK:STDOUT: }
  464. // CHECK:STDOUT: %self: @J.F.%Self.binding.as_type (%Self.binding.as_type.1fa) = value_binding self, %self.param
  465. // CHECK:STDOUT: %u.param: @J.F.%impl.elem0.loc5_23.1 (%impl.elem0.fa9) = value_param call_param1
  466. // CHECK:STDOUT: %.loc5_23: type = splice_block %U.ref.loc5_23 [symbolic = %impl.elem0.loc5_23.1 (constants.%impl.elem0.fa9)] {
  467. // CHECK:STDOUT: %impl.elem0.loc5_23.2: type = impl_witness_access constants.%J.lookup_impl_witness.cd2, element0 [symbolic = %impl.elem0.loc5_23.1 (constants.%impl.elem0.fa9)]
  468. // CHECK:STDOUT: %U.ref.loc5_23: type = name_ref U, %impl.elem0.loc5_23.2 [symbolic = %impl.elem0.loc5_23.1 (constants.%impl.elem0.fa9)]
  469. // CHECK:STDOUT: }
  470. // CHECK:STDOUT: %u: @J.F.%impl.elem0.loc5_23.1 (%impl.elem0.fa9) = value_binding u, %u.param
  471. // CHECK:STDOUT: %return.param: ref @J.F.%impl.elem0.loc5_23.1 (%impl.elem0.fa9) = out_param call_param2
  472. // CHECK:STDOUT: %return: ref @J.F.%impl.elem0.loc5_23.1 (%impl.elem0.fa9) = return_slot %return.param
  473. // CHECK:STDOUT: }
  474. // CHECK:STDOUT: %assoc1: %J.assoc_type = assoc_entity element1, %J.F.decl [concrete = constants.%assoc1.572]
  475. // CHECK:STDOUT:
  476. // CHECK:STDOUT: !members:
  477. // CHECK:STDOUT: .Self = %Self
  478. // CHECK:STDOUT: .U = @U.%assoc0
  479. // CHECK:STDOUT: .F = %assoc1
  480. // CHECK:STDOUT: witness = (%U, %J.F.decl)
  481. // CHECK:STDOUT:
  482. // CHECK:STDOUT: !requires:
  483. // CHECK:STDOUT: }
  484. // CHECK:STDOUT:
  485. // CHECK:STDOUT: generic assoc_const @U(@J.%Self: %J.type) {
  486. // CHECK:STDOUT: assoc_const U:! type;
  487. // CHECK:STDOUT: }
  488. // CHECK:STDOUT:
  489. // CHECK:STDOUT: impl @empty_tuple.type.as.J.impl: %.loc8_7.2 as %.loc8_14 {
  490. // CHECK:STDOUT: %empty_tuple.type.as.J.impl.F.decl: %empty_tuple.type.as.J.impl.F.type = fn_decl @empty_tuple.type.as.J.impl.F [concrete = constants.%empty_tuple.type.as.J.impl.F] {
  491. // CHECK:STDOUT: %self.patt: %pattern_type.cb1 = value_binding_pattern self [concrete]
  492. // CHECK:STDOUT: %self.param_patt: %pattern_type.cb1 = value_param_pattern %self.patt, call_param0 [concrete]
  493. // CHECK:STDOUT: %u.patt: %pattern_type.7ce = value_binding_pattern u [concrete]
  494. // CHECK:STDOUT: %u.param_patt: %pattern_type.7ce = value_param_pattern %u.patt, call_param1 [concrete]
  495. // CHECK:STDOUT: %return.patt: %pattern_type.7ce = return_slot_pattern [concrete]
  496. // CHECK:STDOUT: %return.param_patt: %pattern_type.7ce = out_param_pattern %return.patt, call_param2 [concrete]
  497. // CHECK:STDOUT: } {
  498. // CHECK:STDOUT: %int_32.loc9_31: Core.IntLiteral = int_value 32 [concrete = constants.%int_32]
  499. // CHECK:STDOUT: %i32.loc9_31: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32]
  500. // CHECK:STDOUT: %self.param: %empty_tuple.type = value_param call_param0
  501. // CHECK:STDOUT: %Self.ref: type = name_ref Self, @empty_tuple.type.as.J.impl.%.loc8_7.2 [concrete = constants.%empty_tuple.type]
  502. // CHECK:STDOUT: %self: %empty_tuple.type = value_binding self, %self.param
  503. // CHECK:STDOUT: %u.param: %i32 = value_param call_param1
  504. // CHECK:STDOUT: %.loc9: type = splice_block %i32.loc9_23 [concrete = constants.%i32] {
  505. // CHECK:STDOUT: %int_32.loc9_23: Core.IntLiteral = int_value 32 [concrete = constants.%int_32]
  506. // CHECK:STDOUT: %i32.loc9_23: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32]
  507. // CHECK:STDOUT: }
  508. // CHECK:STDOUT: %u: %i32 = value_binding u, %u.param
  509. // CHECK:STDOUT: %return.param: ref %i32 = out_param call_param2
  510. // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param
  511. // CHECK:STDOUT: }
  512. // CHECK:STDOUT:
  513. // CHECK:STDOUT: !members:
  514. // CHECK:STDOUT: .F = %empty_tuple.type.as.J.impl.F.decl
  515. // CHECK:STDOUT: witness = file.%J.impl_witness.loc8
  516. // CHECK:STDOUT: }
  517. // CHECK:STDOUT:
  518. // CHECK:STDOUT: impl @C.as.J.impl: %C.ref.loc21_6 as %.loc21_13 {
  519. // CHECK:STDOUT: %C.as.J.impl.F.decl: %C.as.J.impl.F.type = fn_decl @C.as.J.impl.F [concrete = constants.%C.as.J.impl.F] {
  520. // CHECK:STDOUT: %self.patt: %pattern_type.c48 = value_binding_pattern self [concrete]
  521. // CHECK:STDOUT: %self.param_patt: %pattern_type.c48 = value_param_pattern %self.patt, call_param0 [concrete]
  522. // CHECK:STDOUT: %u.patt: %pattern_type.c48 = value_binding_pattern u [concrete]
  523. // CHECK:STDOUT: %u.param_patt: %pattern_type.c48 = value_param_pattern %u.patt, call_param1 [concrete]
  524. // CHECK:STDOUT: %return.patt: %pattern_type.c48 = return_slot_pattern [concrete]
  525. // CHECK:STDOUT: %return.param_patt: %pattern_type.c48 = out_param_pattern %return.patt, call_param2 [concrete]
  526. // CHECK:STDOUT: } {
  527. // CHECK:STDOUT: %C.ref.loc22_29: type = name_ref C, file.%C.decl [concrete = constants.%C]
  528. // CHECK:STDOUT: %self.param: %C = value_param call_param0
  529. // CHECK:STDOUT: %Self.ref: type = name_ref Self, @C.as.J.impl.%C.ref.loc21_6 [concrete = constants.%C]
  530. // CHECK:STDOUT: %self: %C = value_binding self, %self.param
  531. // CHECK:STDOUT: %u.param: %C = value_param call_param1
  532. // CHECK:STDOUT: %C.ref.loc22_23: type = name_ref C, file.%C.decl [concrete = constants.%C]
  533. // CHECK:STDOUT: %u: %C = value_binding u, %u.param
  534. // CHECK:STDOUT: %return.param: ref %C = out_param call_param2
  535. // CHECK:STDOUT: %return: ref %C = return_slot %return.param
  536. // CHECK:STDOUT: }
  537. // CHECK:STDOUT:
  538. // CHECK:STDOUT: !members:
  539. // CHECK:STDOUT: .C = <poisoned>
  540. // CHECK:STDOUT: .F = %C.as.J.impl.F.decl
  541. // CHECK:STDOUT: witness = file.%J.impl_witness.loc21
  542. // CHECK:STDOUT: }
  543. // CHECK:STDOUT:
  544. // CHECK:STDOUT: class @C {
  545. // CHECK:STDOUT: %.loc18_10: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct]
  546. // CHECK:STDOUT: %.loc18_11: type = converted %.loc18_10, constants.%empty_struct_type [concrete = constants.%empty_struct_type]
  547. // CHECK:STDOUT: adapt_decl %.loc18_11 [concrete]
  548. // CHECK:STDOUT: %complete_type: <witness> = complete_type_witness constants.%empty_struct_type [concrete = constants.%complete_type.357]
  549. // CHECK:STDOUT: complete_type_witness = %complete_type
  550. // CHECK:STDOUT:
  551. // CHECK:STDOUT: !members:
  552. // CHECK:STDOUT: .Self = constants.%C
  553. // CHECK:STDOUT: }
  554. // CHECK:STDOUT:
  555. // CHECK:STDOUT: generic fn @J.F(@J.%Self: %J.type) {
  556. // CHECK:STDOUT: %Self: %J.type = symbolic_binding Self, 0 [symbolic = %Self (constants.%Self.dc6)]
  557. // CHECK:STDOUT: %Self.binding.as_type: type = symbolic_binding_type Self, 0, %Self [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type.1fa)]
  558. // CHECK:STDOUT: %pattern_type.loc5_8: type = pattern_type %Self.binding.as_type [symbolic = %pattern_type.loc5_8 (constants.%pattern_type.4c4)]
  559. // CHECK:STDOUT: %J.lookup_impl_witness: <witness> = lookup_impl_witness %Self, @J [symbolic = %J.lookup_impl_witness (constants.%J.lookup_impl_witness.cd2)]
  560. // 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.fa9)]
  561. // CHECK:STDOUT: %pattern_type.loc5_20: type = pattern_type %impl.elem0.loc5_23.1 [symbolic = %pattern_type.loc5_20 (constants.%pattern_type.345)]
  562. // CHECK:STDOUT:
  563. // CHECK:STDOUT: fn(%self.param: @J.F.%Self.binding.as_type (%Self.binding.as_type.1fa), %u.param: @J.F.%impl.elem0.loc5_23.1 (%impl.elem0.fa9)) -> @J.F.%impl.elem0.loc5_23.1 (%impl.elem0.fa9);
  564. // CHECK:STDOUT: }
  565. // CHECK:STDOUT:
  566. // CHECK:STDOUT: fn @empty_tuple.type.as.J.impl.F(%self.param: %empty_tuple.type, %u.param: %i32) -> %i32 {
  567. // CHECK:STDOUT: !entry:
  568. // CHECK:STDOUT: %u.ref: %i32 = name_ref u, %u
  569. // CHECK:STDOUT: %impl.elem1: %.f7e = impl_witness_access constants.%Negate.impl_witness.bc7, element1 [concrete = constants.%Int.as.Negate.impl.Op.4f9]
  570. // CHECK:STDOUT: %bound_method.loc9_44.1: <bound method> = bound_method %u.ref, %impl.elem1
  571. // CHECK:STDOUT: %specific_fn: <specific function> = specific_function %impl.elem1, @Int.as.Negate.impl.Op(constants.%int_32) [concrete = constants.%Int.as.Negate.impl.Op.specific_fn]
  572. // CHECK:STDOUT: %bound_method.loc9_44.2: <bound method> = bound_method %u.ref, %specific_fn
  573. // CHECK:STDOUT: %Int.as.Negate.impl.Op.call: init %i32 = call %bound_method.loc9_44.2(%u.ref)
  574. // CHECK:STDOUT: return %Int.as.Negate.impl.Op.call to %return
  575. // CHECK:STDOUT: }
  576. // CHECK:STDOUT:
  577. // CHECK:STDOUT: fn @CallMethod(%x.param: %empty_tuple.type) -> %i32 {
  578. // CHECK:STDOUT: !entry:
  579. // CHECK:STDOUT: %x.ref: %empty_tuple.type = name_ref x, %x
  580. // CHECK:STDOUT: %J.ref: type = name_ref J, file.%J.decl [concrete = constants.%J.type]
  581. // CHECK:STDOUT: %F.ref: %J.assoc_type = name_ref F, @J.%assoc1 [concrete = constants.%assoc1.572]
  582. // CHECK:STDOUT: %impl.elem1: %.813 = impl_witness_access constants.%J.impl_witness.c0b, element1 [concrete = constants.%empty_tuple.type.as.J.impl.F]
  583. // CHECK:STDOUT: %bound_method.loc13_11: <bound method> = bound_method %x.ref, %impl.elem1
  584. // CHECK:STDOUT: %int_40: Core.IntLiteral = int_value 40 [concrete = constants.%int_40.f80]
  585. // CHECK:STDOUT: %impl.elem0: %.322 = impl_witness_access constants.%ImplicitAs.impl_witness.bc9, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.e9b]
  586. // CHECK:STDOUT: %bound_method.loc13_18.1: <bound method> = bound_method %int_40, %impl.elem0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound]
  587. // CHECK:STDOUT: %specific_fn: <specific function> = specific_function %impl.elem0, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn]
  588. // CHECK:STDOUT: %bound_method.loc13_18.2: <bound method> = bound_method %int_40, %specific_fn [concrete = constants.%bound_method]
  589. // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call: init %i32 = call %bound_method.loc13_18.2(%int_40) [concrete = constants.%int_40.518]
  590. // CHECK:STDOUT: %.loc13_18.1: %i32 = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call [concrete = constants.%int_40.518]
  591. // CHECK:STDOUT: %.loc13_18.2: %i32 = converted %int_40, %.loc13_18.1 [concrete = constants.%int_40.518]
  592. // CHECK:STDOUT: %empty_tuple.type.as.J.impl.F.call: init %i32 = call %bound_method.loc13_11(%x.ref, %.loc13_18.2)
  593. // CHECK:STDOUT: return %empty_tuple.type.as.J.impl.F.call to %return
  594. // CHECK:STDOUT: }
  595. // CHECK:STDOUT:
  596. // CHECK:STDOUT: fn @C.as.J.impl.F(%self.param: %C, %u.param: %C) -> %C {
  597. // CHECK:STDOUT: !entry:
  598. // CHECK:STDOUT: %self.ref: %C = name_ref self, %self
  599. // CHECK:STDOUT: %.loc22_44.1: %empty_struct_type = as_compatible %self.ref
  600. // CHECK:STDOUT: %.loc22_44.2: ref %empty_struct_type = as_compatible %return
  601. // CHECK:STDOUT: %.loc22_44.3: init %empty_struct_type = struct_init () to %.loc22_44.2 [concrete = constants.%empty_struct]
  602. // CHECK:STDOUT: %.loc22_44.4: init %C = as_compatible %.loc22_44.3 [concrete = constants.%C.val]
  603. // CHECK:STDOUT: %.loc22_44.5: init %C = converted %self.ref, %.loc22_44.4 [concrete = constants.%C.val]
  604. // CHECK:STDOUT: return %.loc22_44.5 to %return
  605. // CHECK:STDOUT: }
  606. // CHECK:STDOUT:
  607. // CHECK:STDOUT: specific @U(constants.%Self.dc6) {}
  608. // CHECK:STDOUT:
  609. // CHECK:STDOUT: specific @J.F(constants.%Self.dc6) {
  610. // CHECK:STDOUT: %Self => constants.%Self.dc6
  611. // CHECK:STDOUT: %Self.binding.as_type => constants.%Self.binding.as_type.1fa
  612. // CHECK:STDOUT: %pattern_type.loc5_8 => constants.%pattern_type.4c4
  613. // CHECK:STDOUT: %J.lookup_impl_witness => constants.%J.lookup_impl_witness.cd2
  614. // CHECK:STDOUT: %impl.elem0.loc5_23.1 => constants.%impl.elem0.fa9
  615. // CHECK:STDOUT: %pattern_type.loc5_20 => constants.%pattern_type.345
  616. // CHECK:STDOUT: }
  617. // CHECK:STDOUT:
  618. // CHECK:STDOUT: specific @U(constants.%.Self.c58) {}
  619. // CHECK:STDOUT:
  620. // CHECK:STDOUT: specific @J.F(constants.%J.facet.2a7) {
  621. // CHECK:STDOUT: %Self => constants.%J.facet.2a7
  622. // CHECK:STDOUT: %Self.binding.as_type => constants.%empty_tuple.type
  623. // CHECK:STDOUT: %pattern_type.loc5_8 => constants.%pattern_type.cb1
  624. // CHECK:STDOUT: %J.lookup_impl_witness => constants.%J.impl_witness.c0b
  625. // CHECK:STDOUT: %impl.elem0.loc5_23.1 => constants.%i32
  626. // CHECK:STDOUT: %pattern_type.loc5_20 => constants.%pattern_type.7ce
  627. // CHECK:STDOUT: }
  628. // CHECK:STDOUT:
  629. // CHECK:STDOUT: specific @J.F(constants.%J.facet.226) {
  630. // CHECK:STDOUT: %Self => constants.%J.facet.226
  631. // CHECK:STDOUT: %Self.binding.as_type => constants.%C
  632. // CHECK:STDOUT: %pattern_type.loc5_8 => constants.%pattern_type.c48
  633. // CHECK:STDOUT: %J.lookup_impl_witness => constants.%J.impl_witness.2a8
  634. // CHECK:STDOUT: %impl.elem0.loc5_23.1 => constants.%C
  635. // CHECK:STDOUT: %pattern_type.loc5_20 => constants.%pattern_type.c48
  636. // CHECK:STDOUT: }
  637. // CHECK:STDOUT:
  638. // CHECK:STDOUT: --- associated_type_in_function_signature.carbon
  639. // CHECK:STDOUT:
  640. // CHECK:STDOUT: constants {
  641. // CHECK:STDOUT: %J.type: type = facet_type <@J> [concrete]
  642. // CHECK:STDOUT: %Self.dc6: %J.type = symbolic_binding Self, 0 [symbolic]
  643. // CHECK:STDOUT: %J.assoc_type: type = assoc_entity_type @J [concrete]
  644. // CHECK:STDOUT: %assoc0.411: %J.assoc_type = assoc_entity element0, @J.%U [concrete]
  645. // CHECK:STDOUT: %J.lookup_impl_witness.cd2: <witness> = lookup_impl_witness %Self.dc6, @J [symbolic]
  646. // CHECK:STDOUT: %impl.elem0.fa9: type = impl_witness_access %J.lookup_impl_witness.cd2, element0 [symbolic]
  647. // CHECK:STDOUT: %pattern_type.345: type = pattern_type %impl.elem0.fa9 [symbolic]
  648. // CHECK:STDOUT: %J.F.type: type = fn_type @J.F [concrete]
  649. // CHECK:STDOUT: %J.F: %J.F.type = struct_value () [concrete]
  650. // CHECK:STDOUT: %assoc1.572: %J.assoc_type = assoc_entity element1, @J.%J.F.decl [concrete]
  651. // CHECK:STDOUT: %D: type = class_type @D [concrete]
  652. // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete]
  653. // CHECK:STDOUT: %complete_type.357: <witness> = complete_type_witness %empty_struct_type [concrete]
  654. // CHECK:STDOUT: %.Self.c58: %J.type = symbolic_binding .Self [symbolic_self]
  655. // CHECK:STDOUT: %.Self.binding.as_type: type = symbolic_binding_type .Self, %.Self.c58 [symbolic_self]
  656. // CHECK:STDOUT: %J.lookup_impl_witness.ab8: <witness> = lookup_impl_witness %.Self.c58, @J [symbolic_self]
  657. // CHECK:STDOUT: %impl.elem0.ab2: type = impl_witness_access %J.lookup_impl_witness.ab8, element0 [symbolic_self]
  658. // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete]
  659. // CHECK:STDOUT: %Int.type: type = generic_class_type @Int [concrete]
  660. // CHECK:STDOUT: %Int.generic: %Int.type = struct_value () [concrete]
  661. // CHECK:STDOUT: %N: Core.IntLiteral = symbolic_binding N, 0 [symbolic]
  662. // CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [concrete]
  663. // CHECK:STDOUT: %J_where.type: type = facet_type <@J where %impl.elem0.ab2 = %i32> [concrete]
  664. // CHECK:STDOUT: %J.impl_witness: <witness> = impl_witness file.%J.impl_witness_table [concrete]
  665. // CHECK:STDOUT: %pattern_type.7ce: type = pattern_type %i32 [concrete]
  666. // CHECK:STDOUT: %D.as.J.impl.F.type: type = fn_type @D.as.J.impl.F [concrete]
  667. // CHECK:STDOUT: %D.as.J.impl.F: %D.as.J.impl.F.type = struct_value () [concrete]
  668. // CHECK:STDOUT: %J.facet: %J.type = facet_value %D, (%J.impl_witness) [concrete]
  669. // CHECK:STDOUT: %Negate.type: type = facet_type <@Negate> [concrete]
  670. // CHECK:STDOUT: %Negate.Op.type: type = fn_type @Negate.Op [concrete]
  671. // CHECK:STDOUT: %Int.as.Negate.impl.Op.type.1d3: type = fn_type @Int.as.Negate.impl.Op, @Int.as.Negate.impl(%N) [symbolic]
  672. // CHECK:STDOUT: %Int.as.Negate.impl.Op.5d2: %Int.as.Negate.impl.Op.type.1d3 = struct_value () [symbolic]
  673. // CHECK:STDOUT: %Negate.impl_witness.bc7: <witness> = impl_witness imports.%Negate.impl_witness_table, @Int.as.Negate.impl(%int_32) [concrete]
  674. // CHECK:STDOUT: %Int.as.Negate.impl.Op.type.6b1: type = fn_type @Int.as.Negate.impl.Op, @Int.as.Negate.impl(%int_32) [concrete]
  675. // CHECK:STDOUT: %Int.as.Negate.impl.Op.4f9: %Int.as.Negate.impl.Op.type.6b1 = struct_value () [concrete]
  676. // CHECK:STDOUT: %Negate.facet: %Negate.type = facet_value %i32, (%Negate.impl_witness.bc7) [concrete]
  677. // CHECK:STDOUT: %.f7e: type = fn_type_with_self_type %Negate.Op.type, %Negate.facet [concrete]
  678. // CHECK:STDOUT: %Int.as.Negate.impl.Op.specific_fn: <specific function> = specific_function %Int.as.Negate.impl.Op.4f9, @Int.as.Negate.impl.Op(%int_32) [concrete]
  679. // CHECK:STDOUT: %CallFunction.type: type = fn_type @CallFunction [concrete]
  680. // CHECK:STDOUT: %CallFunction: %CallFunction.type = struct_value () [concrete]
  681. // CHECK:STDOUT: %.7bd: type = fn_type_with_self_type %J.F.type, %J.facet [concrete]
  682. // CHECK:STDOUT: %int_4.0c1: Core.IntLiteral = int_value 4 [concrete]
  683. // CHECK:STDOUT: %ImplicitAs.type.cc7: type = generic_interface_type @ImplicitAs [concrete]
  684. // CHECK:STDOUT: %ImplicitAs.generic: %ImplicitAs.type.cc7 = struct_value () [concrete]
  685. // CHECK:STDOUT: %ImplicitAs.type.d14: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete]
  686. // CHECK:STDOUT: %ImplicitAs.Convert.type.1b6: type = fn_type @ImplicitAs.Convert, @ImplicitAs(%i32) [concrete]
  687. // CHECK:STDOUT: %To: Core.IntLiteral = symbolic_binding To, 0 [symbolic]
  688. // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.f51: type = fn_type @Core.IntLiteral.as.ImplicitAs.impl.Convert, @Core.IntLiteral.as.ImplicitAs.impl(%To) [symbolic]
  689. // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.2a1: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.f51 = struct_value () [symbolic]
  690. // CHECK:STDOUT: %ImplicitAs.impl_witness.bc9: <witness> = impl_witness imports.%ImplicitAs.impl_witness_table.132, @Core.IntLiteral.as.ImplicitAs.impl(%int_32) [concrete]
  691. // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.51e: type = fn_type @Core.IntLiteral.as.ImplicitAs.impl.Convert, @Core.IntLiteral.as.ImplicitAs.impl(%int_32) [concrete]
  692. // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.e9b: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.51e = struct_value () [concrete]
  693. // CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.d14 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.bc9) [concrete]
  694. // CHECK:STDOUT: %.322: type = fn_type_with_self_type %ImplicitAs.Convert.type.1b6, %ImplicitAs.facet [concrete]
  695. // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound: <bound method> = bound_method %int_4.0c1, %Core.IntLiteral.as.ImplicitAs.impl.Convert.e9b [concrete]
  696. // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn: <specific function> = specific_function %Core.IntLiteral.as.ImplicitAs.impl.Convert.e9b, @Core.IntLiteral.as.ImplicitAs.impl.Convert(%int_32) [concrete]
  697. // CHECK:STDOUT: %bound_method: <bound method> = bound_method %int_4.0c1, %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete]
  698. // CHECK:STDOUT: %int_4.940: %i32 = int_value 4 [concrete]
  699. // CHECK:STDOUT: }
  700. // CHECK:STDOUT:
  701. // CHECK:STDOUT: imports {
  702. // CHECK:STDOUT: %Core: <namespace> = namespace file.%Core.import, [concrete] {
  703. // CHECK:STDOUT: .Int = %Core.Int
  704. // CHECK:STDOUT: .Negate = %Core.Negate
  705. // CHECK:STDOUT: .ImplicitAs = %Core.ImplicitAs
  706. // CHECK:STDOUT: import Core//prelude
  707. // CHECK:STDOUT: import Core//prelude/...
  708. // CHECK:STDOUT: }
  709. // CHECK:STDOUT: %Core.Int: %Int.type = import_ref Core//prelude/parts/int, Int, loaded [concrete = constants.%Int.generic]
  710. // CHECK:STDOUT: %Core.Negate: type = import_ref Core//prelude/parts/int_literal, Negate, loaded [concrete = constants.%Negate.type]
  711. // CHECK:STDOUT: %Core.import_ref.3f0 = import_ref Core//prelude/parts/int, loc{{\d+_\d+}}, unloaded
  712. // CHECK:STDOUT: %Core.import_ref.ca8: @Int.as.Negate.impl.%Int.as.Negate.impl.Op.type (%Int.as.Negate.impl.Op.type.1d3) = import_ref Core//prelude/parts/int, loc{{\d+_\d+}}, loaded [symbolic = @Int.as.Negate.impl.%Int.as.Negate.impl.Op (constants.%Int.as.Negate.impl.Op.5d2)]
  713. // CHECK:STDOUT: %Negate.impl_witness_table = impl_witness_table (%Core.import_ref.3f0, %Core.import_ref.ca8), @Int.as.Negate.impl [concrete]
  714. // CHECK:STDOUT: %Core.ImplicitAs: %ImplicitAs.type.cc7 = import_ref Core//prelude/parts/as, ImplicitAs, loaded [concrete = constants.%ImplicitAs.generic]
  715. // CHECK:STDOUT: %Core.import_ref.e24: @Core.IntLiteral.as.ImplicitAs.impl.%Core.IntLiteral.as.ImplicitAs.impl.Convert.type (%Core.IntLiteral.as.ImplicitAs.impl.Convert.type.f51) = import_ref Core//prelude/parts/int, loc{{\d+_\d+}}, loaded [symbolic = @Core.IntLiteral.as.ImplicitAs.impl.%Core.IntLiteral.as.ImplicitAs.impl.Convert (constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.2a1)]
  716. // CHECK:STDOUT: %ImplicitAs.impl_witness_table.132 = impl_witness_table (%Core.import_ref.e24), @Core.IntLiteral.as.ImplicitAs.impl [concrete]
  717. // CHECK:STDOUT: }
  718. // CHECK:STDOUT:
  719. // CHECK:STDOUT: file {
  720. // CHECK:STDOUT: package: <namespace> = namespace [concrete] {
  721. // CHECK:STDOUT: .Core = imports.%Core
  722. // CHECK:STDOUT: .J = %J.decl
  723. // CHECK:STDOUT: .D = %D.decl
  724. // CHECK:STDOUT: .CallFunction = %CallFunction.decl
  725. // CHECK:STDOUT: }
  726. // CHECK:STDOUT: %Core.import = import Core
  727. // CHECK:STDOUT: %J.decl: type = interface_decl @J [concrete = constants.%J.type] {} {}
  728. // CHECK:STDOUT: %D.decl: type = class_decl @D [concrete = constants.%D] {} {}
  729. // CHECK:STDOUT: impl_decl @D.as.J.impl [concrete] {} {
  730. // CHECK:STDOUT: %D.ref: type = name_ref D, file.%D.decl [concrete = constants.%D]
  731. // CHECK:STDOUT: %J.ref: type = name_ref J, file.%J.decl [concrete = constants.%J.type]
  732. // CHECK:STDOUT: %.Self: %J.type = symbolic_binding .Self [symbolic_self = constants.%.Self.c58]
  733. // CHECK:STDOUT: %.Self.ref: %J.type = name_ref .Self, %.Self [symbolic_self = constants.%.Self.c58]
  734. // CHECK:STDOUT: %U.ref: %J.assoc_type = name_ref U, @U.%assoc0 [concrete = constants.%assoc0.411]
  735. // CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self.ref [symbolic_self = constants.%.Self.binding.as_type]
  736. // CHECK:STDOUT: %.loc10_19: type = converted %.Self.ref, %.Self.as_type [symbolic_self = constants.%.Self.binding.as_type]
  737. // CHECK:STDOUT: %impl.elem0: type = impl_witness_access constants.%J.lookup_impl_witness.ab8, element0 [symbolic_self = constants.%impl.elem0.ab2]
  738. // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete = constants.%int_32]
  739. // CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32]
  740. // CHECK:STDOUT: %.loc10_13: type = where_expr %.Self [concrete = constants.%J_where.type] {
  741. // CHECK:STDOUT: requirement_base_facet_type constants.%J.type
  742. // CHECK:STDOUT: requirement_rewrite %impl.elem0, %i32
  743. // CHECK:STDOUT: }
  744. // CHECK:STDOUT: }
  745. // CHECK:STDOUT: %J.impl_witness_table = impl_witness_table (%impl_witness_assoc_constant, @D.as.J.impl.%D.as.J.impl.F.decl), @D.as.J.impl [concrete]
  746. // CHECK:STDOUT: %J.impl_witness: <witness> = impl_witness %J.impl_witness_table [concrete = constants.%J.impl_witness]
  747. // CHECK:STDOUT: %impl_witness_assoc_constant: type = impl_witness_assoc_constant constants.%i32 [concrete = constants.%i32]
  748. // CHECK:STDOUT: %CallFunction.decl: %CallFunction.type = fn_decl @CallFunction [concrete = constants.%CallFunction] {
  749. // CHECK:STDOUT: %return.patt: %pattern_type.7ce = return_slot_pattern [concrete]
  750. // CHECK:STDOUT: %return.param_patt: %pattern_type.7ce = out_param_pattern %return.patt, call_param0 [concrete]
  751. // CHECK:STDOUT: } {
  752. // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete = constants.%int_32]
  753. // CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32]
  754. // CHECK:STDOUT: %return.param: ref %i32 = out_param call_param0
  755. // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param
  756. // CHECK:STDOUT: }
  757. // CHECK:STDOUT: }
  758. // CHECK:STDOUT:
  759. // CHECK:STDOUT: interface @J {
  760. // CHECK:STDOUT: %Self: %J.type = symbolic_binding Self, 0 [symbolic = constants.%Self.dc6]
  761. // CHECK:STDOUT: %U: type = assoc_const_decl @U [concrete] {
  762. // CHECK:STDOUT: %assoc0: %J.assoc_type = assoc_entity element0, @J.%U [concrete = constants.%assoc0.411]
  763. // CHECK:STDOUT: }
  764. // CHECK:STDOUT: %J.F.decl: %J.F.type = fn_decl @J.F [concrete = constants.%J.F] {
  765. // CHECK:STDOUT: %u.patt: @J.F.%pattern_type (%pattern_type.345) = value_binding_pattern u [concrete]
  766. // CHECK:STDOUT: %u.param_patt: @J.F.%pattern_type (%pattern_type.345) = value_param_pattern %u.patt, call_param0 [concrete]
  767. // CHECK:STDOUT: %return.patt: @J.F.%pattern_type (%pattern_type.345) = return_slot_pattern [concrete]
  768. // CHECK:STDOUT: %return.param_patt: @J.F.%pattern_type (%pattern_type.345) = out_param_pattern %return.patt, call_param1 [concrete]
  769. // CHECK:STDOUT: } {
  770. // CHECK:STDOUT: %impl.elem0.loc5_17: type = impl_witness_access constants.%J.lookup_impl_witness.cd2, element0 [symbolic = %impl.elem0.loc5_11.1 (constants.%impl.elem0.fa9)]
  771. // CHECK:STDOUT: %U.ref.loc5_17: type = name_ref U, %impl.elem0.loc5_17 [symbolic = %impl.elem0.loc5_11.1 (constants.%impl.elem0.fa9)]
  772. // CHECK:STDOUT: %u.param: @J.F.%impl.elem0.loc5_11.1 (%impl.elem0.fa9) = value_param call_param0
  773. // CHECK:STDOUT: %.loc5: type = splice_block %U.ref.loc5_11 [symbolic = %impl.elem0.loc5_11.1 (constants.%impl.elem0.fa9)] {
  774. // CHECK:STDOUT: %impl.elem0.loc5_11.2: type = impl_witness_access constants.%J.lookup_impl_witness.cd2, element0 [symbolic = %impl.elem0.loc5_11.1 (constants.%impl.elem0.fa9)]
  775. // CHECK:STDOUT: %U.ref.loc5_11: type = name_ref U, %impl.elem0.loc5_11.2 [symbolic = %impl.elem0.loc5_11.1 (constants.%impl.elem0.fa9)]
  776. // CHECK:STDOUT: }
  777. // CHECK:STDOUT: %u: @J.F.%impl.elem0.loc5_11.1 (%impl.elem0.fa9) = value_binding u, %u.param
  778. // CHECK:STDOUT: %return.param: ref @J.F.%impl.elem0.loc5_11.1 (%impl.elem0.fa9) = out_param call_param1
  779. // CHECK:STDOUT: %return: ref @J.F.%impl.elem0.loc5_11.1 (%impl.elem0.fa9) = return_slot %return.param
  780. // CHECK:STDOUT: }
  781. // CHECK:STDOUT: %assoc1: %J.assoc_type = assoc_entity element1, %J.F.decl [concrete = constants.%assoc1.572]
  782. // CHECK:STDOUT:
  783. // CHECK:STDOUT: !members:
  784. // CHECK:STDOUT: .Self = %Self
  785. // CHECK:STDOUT: .U = @U.%assoc0
  786. // CHECK:STDOUT: .F = %assoc1
  787. // CHECK:STDOUT: witness = (%U, %J.F.decl)
  788. // CHECK:STDOUT:
  789. // CHECK:STDOUT: !requires:
  790. // CHECK:STDOUT: }
  791. // CHECK:STDOUT:
  792. // CHECK:STDOUT: generic assoc_const @U(@J.%Self: %J.type) {
  793. // CHECK:STDOUT: assoc_const U:! type;
  794. // CHECK:STDOUT: }
  795. // CHECK:STDOUT:
  796. // CHECK:STDOUT: impl @D.as.J.impl: %D.ref as %.loc10_13 {
  797. // CHECK:STDOUT: %D.as.J.impl.F.decl: %D.as.J.impl.F.type = fn_decl @D.as.J.impl.F [concrete = constants.%D.as.J.impl.F] {
  798. // CHECK:STDOUT: %u.patt: %pattern_type.7ce = value_binding_pattern u [concrete]
  799. // CHECK:STDOUT: %u.param_patt: %pattern_type.7ce = value_param_pattern %u.patt, call_param0 [concrete]
  800. // CHECK:STDOUT: %return.patt: %pattern_type.7ce = return_slot_pattern [concrete]
  801. // CHECK:STDOUT: %return.param_patt: %pattern_type.7ce = out_param_pattern %return.patt, call_param1 [concrete]
  802. // CHECK:STDOUT: } {
  803. // CHECK:STDOUT: %int_32.loc11_19: Core.IntLiteral = int_value 32 [concrete = constants.%int_32]
  804. // CHECK:STDOUT: %i32.loc11_19: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32]
  805. // CHECK:STDOUT: %u.param: %i32 = value_param call_param0
  806. // CHECK:STDOUT: %.loc11: type = splice_block %i32.loc11_11 [concrete = constants.%i32] {
  807. // CHECK:STDOUT: %int_32.loc11_11: Core.IntLiteral = int_value 32 [concrete = constants.%int_32]
  808. // CHECK:STDOUT: %i32.loc11_11: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32]
  809. // CHECK:STDOUT: }
  810. // CHECK:STDOUT: %u: %i32 = value_binding u, %u.param
  811. // CHECK:STDOUT: %return.param: ref %i32 = out_param call_param1
  812. // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param
  813. // CHECK:STDOUT: }
  814. // CHECK:STDOUT:
  815. // CHECK:STDOUT: !members:
  816. // CHECK:STDOUT: .F = %D.as.J.impl.F.decl
  817. // CHECK:STDOUT: witness = file.%J.impl_witness
  818. // CHECK:STDOUT: }
  819. // CHECK:STDOUT:
  820. // CHECK:STDOUT: class @D {
  821. // CHECK:STDOUT: %complete_type: <witness> = complete_type_witness constants.%empty_struct_type [concrete = constants.%complete_type.357]
  822. // CHECK:STDOUT: complete_type_witness = %complete_type
  823. // CHECK:STDOUT:
  824. // CHECK:STDOUT: !members:
  825. // CHECK:STDOUT: .Self = constants.%D
  826. // CHECK:STDOUT: }
  827. // CHECK:STDOUT:
  828. // CHECK:STDOUT: generic fn @J.F(@J.%Self: %J.type) {
  829. // CHECK:STDOUT: %Self: %J.type = symbolic_binding Self, 0 [symbolic = %Self (constants.%Self.dc6)]
  830. // CHECK:STDOUT: %J.lookup_impl_witness: <witness> = lookup_impl_witness %Self, @J [symbolic = %J.lookup_impl_witness (constants.%J.lookup_impl_witness.cd2)]
  831. // 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.fa9)]
  832. // CHECK:STDOUT: %pattern_type: type = pattern_type %impl.elem0.loc5_11.1 [symbolic = %pattern_type (constants.%pattern_type.345)]
  833. // CHECK:STDOUT:
  834. // CHECK:STDOUT: fn(%u.param: @J.F.%impl.elem0.loc5_11.1 (%impl.elem0.fa9)) -> @J.F.%impl.elem0.loc5_11.1 (%impl.elem0.fa9);
  835. // CHECK:STDOUT: }
  836. // CHECK:STDOUT:
  837. // CHECK:STDOUT: fn @D.as.J.impl.F(%u.param: %i32) -> %i32 {
  838. // CHECK:STDOUT: !entry:
  839. // CHECK:STDOUT: %u.ref: %i32 = name_ref u, %u
  840. // CHECK:STDOUT: %impl.elem1: %.f7e = impl_witness_access constants.%Negate.impl_witness.bc7, element1 [concrete = constants.%Int.as.Negate.impl.Op.4f9]
  841. // CHECK:STDOUT: %bound_method.loc11_32.1: <bound method> = bound_method %u.ref, %impl.elem1
  842. // CHECK:STDOUT: %specific_fn: <specific function> = specific_function %impl.elem1, @Int.as.Negate.impl.Op(constants.%int_32) [concrete = constants.%Int.as.Negate.impl.Op.specific_fn]
  843. // CHECK:STDOUT: %bound_method.loc11_32.2: <bound method> = bound_method %u.ref, %specific_fn
  844. // CHECK:STDOUT: %Int.as.Negate.impl.Op.call: init %i32 = call %bound_method.loc11_32.2(%u.ref)
  845. // CHECK:STDOUT: return %Int.as.Negate.impl.Op.call to %return
  846. // CHECK:STDOUT: }
  847. // CHECK:STDOUT:
  848. // CHECK:STDOUT: fn @CallFunction() -> %i32 {
  849. // CHECK:STDOUT: !entry:
  850. // CHECK:STDOUT: %D.ref: type = name_ref D, file.%D.decl [concrete = constants.%D]
  851. // CHECK:STDOUT: %J.ref: type = name_ref J, file.%J.decl [concrete = constants.%J.type]
  852. // CHECK:STDOUT: %F.ref: %J.assoc_type = name_ref F, @J.%assoc1 [concrete = constants.%assoc1.572]
  853. // CHECK:STDOUT: %J.facet: %J.type = facet_value %D.ref, (constants.%J.impl_witness) [concrete = constants.%J.facet]
  854. // CHECK:STDOUT: %.loc15_11: %J.type = converted %D.ref, %J.facet [concrete = constants.%J.facet]
  855. // CHECK:STDOUT: %impl.elem1: %.7bd = impl_witness_access constants.%J.impl_witness, element1 [concrete = constants.%D.as.J.impl.F]
  856. // CHECK:STDOUT: %int_4: Core.IntLiteral = int_value 4 [concrete = constants.%int_4.0c1]
  857. // CHECK:STDOUT: %impl.elem0: %.322 = impl_witness_access constants.%ImplicitAs.impl_witness.bc9, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.e9b]
  858. // CHECK:STDOUT: %bound_method.loc15_18.1: <bound method> = bound_method %int_4, %impl.elem0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound]
  859. // CHECK:STDOUT: %specific_fn: <specific function> = specific_function %impl.elem0, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn]
  860. // CHECK:STDOUT: %bound_method.loc15_18.2: <bound method> = bound_method %int_4, %specific_fn [concrete = constants.%bound_method]
  861. // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call: init %i32 = call %bound_method.loc15_18.2(%int_4) [concrete = constants.%int_4.940]
  862. // CHECK:STDOUT: %.loc15_18.1: %i32 = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call [concrete = constants.%int_4.940]
  863. // CHECK:STDOUT: %.loc15_18.2: %i32 = converted %int_4, %.loc15_18.1 [concrete = constants.%int_4.940]
  864. // CHECK:STDOUT: %D.as.J.impl.F.call: init %i32 = call %impl.elem1(%.loc15_18.2)
  865. // CHECK:STDOUT: return %D.as.J.impl.F.call to %return
  866. // CHECK:STDOUT: }
  867. // CHECK:STDOUT:
  868. // CHECK:STDOUT: specific @U(constants.%Self.dc6) {}
  869. // CHECK:STDOUT:
  870. // CHECK:STDOUT: specific @J.F(constants.%Self.dc6) {
  871. // CHECK:STDOUT: %Self => constants.%Self.dc6
  872. // CHECK:STDOUT: %J.lookup_impl_witness => constants.%J.lookup_impl_witness.cd2
  873. // CHECK:STDOUT: %impl.elem0.loc5_11.1 => constants.%impl.elem0.fa9
  874. // CHECK:STDOUT: %pattern_type => constants.%pattern_type.345
  875. // CHECK:STDOUT: }
  876. // CHECK:STDOUT:
  877. // CHECK:STDOUT: specific @U(constants.%.Self.c58) {}
  878. // CHECK:STDOUT:
  879. // CHECK:STDOUT: specific @J.F(constants.%J.facet) {
  880. // CHECK:STDOUT: %Self => constants.%J.facet
  881. // CHECK:STDOUT: %J.lookup_impl_witness => constants.%J.impl_witness
  882. // CHECK:STDOUT: %impl.elem0.loc5_11.1 => constants.%i32
  883. // CHECK:STDOUT: %pattern_type => constants.%pattern_type.7ce
  884. // CHECK:STDOUT: }
  885. // CHECK:STDOUT:
  886. // CHECK:STDOUT: --- extend_impl_with_associated_type_in_signature.carbon
  887. // CHECK:STDOUT:
  888. // CHECK:STDOUT: constants {
  889. // CHECK:STDOUT: %J.type: type = facet_type <@J> [concrete]
  890. // CHECK:STDOUT: %Self.dc6: %J.type = symbolic_binding Self, 0 [symbolic]
  891. // CHECK:STDOUT: %J.assoc_type: type = assoc_entity_type @J [concrete]
  892. // CHECK:STDOUT: %assoc0.411: %J.assoc_type = assoc_entity element0, @J.%U [concrete]
  893. // CHECK:STDOUT: %Self.binding.as_type.1fa: type = symbolic_binding_type Self, 0, %Self.dc6 [symbolic]
  894. // CHECK:STDOUT: %J.lookup_impl_witness.cd2552.1: <witness> = lookup_impl_witness %Self.dc6, @J [symbolic]
  895. // CHECK:STDOUT: %impl.elem0.fa9e71.1: type = impl_witness_access %J.lookup_impl_witness.cd2552.1, element0 [symbolic]
  896. // CHECK:STDOUT: %pattern_type.345548.1: type = pattern_type %impl.elem0.fa9e71.1 [symbolic]
  897. // CHECK:STDOUT: %J.F.type: type = fn_type @J.F [concrete]
  898. // CHECK:STDOUT: %J.F: %J.F.type = struct_value () [concrete]
  899. // CHECK:STDOUT: %assoc1.572: %J.assoc_type = assoc_entity element1, @J.%J.F.decl [concrete]
  900. // CHECK:STDOUT: %pattern_type.4c421b.1: type = pattern_type %Self.binding.as_type.1fa [symbolic]
  901. // CHECK:STDOUT: %J.G.type: type = fn_type @J.G [concrete]
  902. // CHECK:STDOUT: %J.G: %J.G.type = struct_value () [concrete]
  903. // CHECK:STDOUT: %assoc2: %J.assoc_type = assoc_entity element2, @J.%J.G.decl [concrete]
  904. // CHECK:STDOUT: %E: type = class_type @E [concrete]
  905. // CHECK:STDOUT: %.Self.c58: %J.type = symbolic_binding .Self [symbolic_self]
  906. // CHECK:STDOUT: %.Self.binding.as_type: type = symbolic_binding_type .Self, %.Self.c58 [symbolic_self]
  907. // CHECK:STDOUT: %J.lookup_impl_witness.ab8: <witness> = lookup_impl_witness %.Self.c58, @J [symbolic_self]
  908. // CHECK:STDOUT: %impl.elem0.ab2: type = impl_witness_access %J.lookup_impl_witness.ab8, element0 [symbolic_self]
  909. // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete]
  910. // CHECK:STDOUT: %Int.type: type = generic_class_type @Int [concrete]
  911. // CHECK:STDOUT: %Int.generic: %Int.type = struct_value () [concrete]
  912. // CHECK:STDOUT: %N: Core.IntLiteral = symbolic_binding N, 0 [symbolic]
  913. // CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [concrete]
  914. // CHECK:STDOUT: %J_where.type: type = facet_type <@J where %impl.elem0.ab2 = %i32> [concrete]
  915. // CHECK:STDOUT: %J.impl_witness: <witness> = impl_witness @E.%J.impl_witness_table [concrete]
  916. // CHECK:STDOUT: %pattern_type.7ce: type = pattern_type %i32 [concrete]
  917. // CHECK:STDOUT: %E.as.J.impl.F.type: type = fn_type @E.as.J.impl.F [concrete]
  918. // CHECK:STDOUT: %E.as.J.impl.F: %E.as.J.impl.F.type = struct_value () [concrete]
  919. // CHECK:STDOUT: %pattern_type.a4a: type = pattern_type %E [concrete]
  920. // CHECK:STDOUT: %E.as.J.impl.G.type: type = fn_type @E.as.J.impl.G [concrete]
  921. // CHECK:STDOUT: %E.as.J.impl.G: %E.as.J.impl.G.type = struct_value () [concrete]
  922. // CHECK:STDOUT: %J.facet: %J.type = facet_value %E, (%J.impl_witness) [concrete]
  923. // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete]
  924. // CHECK:STDOUT: %complete_type.357: <witness> = complete_type_witness %empty_struct_type [concrete]
  925. // CHECK:STDOUT: %i32.builtin: type = int_type signed, %int_32 [concrete]
  926. // CHECK:STDOUT: %complete_type.f8a: <witness> = complete_type_witness %i32.builtin [concrete]
  927. // CHECK:STDOUT: %Negate.type: type = facet_type <@Negate> [concrete]
  928. // CHECK:STDOUT: %Negate.Op.type: type = fn_type @Negate.Op [concrete]
  929. // CHECK:STDOUT: %Int.as.Negate.impl.Op.type.1d3: type = fn_type @Int.as.Negate.impl.Op, @Int.as.Negate.impl(%N) [symbolic]
  930. // CHECK:STDOUT: %Int.as.Negate.impl.Op.5d2: %Int.as.Negate.impl.Op.type.1d3 = struct_value () [symbolic]
  931. // CHECK:STDOUT: %Negate.impl_witness.bc7: <witness> = impl_witness imports.%Negate.impl_witness_table, @Int.as.Negate.impl(%int_32) [concrete]
  932. // CHECK:STDOUT: %Int.as.Negate.impl.Op.type.6b1: type = fn_type @Int.as.Negate.impl.Op, @Int.as.Negate.impl(%int_32) [concrete]
  933. // CHECK:STDOUT: %Int.as.Negate.impl.Op.4f9: %Int.as.Negate.impl.Op.type.6b1 = struct_value () [concrete]
  934. // CHECK:STDOUT: %Negate.facet: %Negate.type = facet_value %i32, (%Negate.impl_witness.bc7) [concrete]
  935. // CHECK:STDOUT: %.f7e: type = fn_type_with_self_type %Negate.Op.type, %Negate.facet [concrete]
  936. // CHECK:STDOUT: %Int.as.Negate.impl.Op.specific_fn: <specific function> = specific_function %Int.as.Negate.impl.Op.4f9, @Int.as.Negate.impl.Op(%int_32) [concrete]
  937. // CHECK:STDOUT: %CallBoth.type: type = fn_type @CallBoth [concrete]
  938. // CHECK:STDOUT: %CallBoth: %CallBoth.type = struct_value () [concrete]
  939. // CHECK:STDOUT: %.ed8: type = fn_type_with_self_type %J.F.type, %J.facet [concrete]
  940. // CHECK:STDOUT: %int_2.ecc: Core.IntLiteral = int_value 2 [concrete]
  941. // CHECK:STDOUT: %ImplicitAs.type.cc7: type = generic_interface_type @ImplicitAs [concrete]
  942. // CHECK:STDOUT: %ImplicitAs.generic: %ImplicitAs.type.cc7 = struct_value () [concrete]
  943. // CHECK:STDOUT: %ImplicitAs.type.d14: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete]
  944. // CHECK:STDOUT: %ImplicitAs.Convert.type.1b6: type = fn_type @ImplicitAs.Convert, @ImplicitAs(%i32) [concrete]
  945. // CHECK:STDOUT: %To: Core.IntLiteral = symbolic_binding To, 0 [symbolic]
  946. // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.f51: type = fn_type @Core.IntLiteral.as.ImplicitAs.impl.Convert, @Core.IntLiteral.as.ImplicitAs.impl(%To) [symbolic]
  947. // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.2a1: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.f51 = struct_value () [symbolic]
  948. // CHECK:STDOUT: %ImplicitAs.impl_witness.bc9: <witness> = impl_witness imports.%ImplicitAs.impl_witness_table.132, @Core.IntLiteral.as.ImplicitAs.impl(%int_32) [concrete]
  949. // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.51e: type = fn_type @Core.IntLiteral.as.ImplicitAs.impl.Convert, @Core.IntLiteral.as.ImplicitAs.impl(%int_32) [concrete]
  950. // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.e9b: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.51e = struct_value () [concrete]
  951. // CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.d14 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.bc9) [concrete]
  952. // CHECK:STDOUT: %.322: type = fn_type_with_self_type %ImplicitAs.Convert.type.1b6, %ImplicitAs.facet [concrete]
  953. // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.393: <bound method> = bound_method %int_2.ecc, %Core.IntLiteral.as.ImplicitAs.impl.Convert.e9b [concrete]
  954. // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn: <specific function> = specific_function %Core.IntLiteral.as.ImplicitAs.impl.Convert.e9b, @Core.IntLiteral.as.ImplicitAs.impl.Convert(%int_32) [concrete]
  955. // CHECK:STDOUT: %bound_method.9f7: <bound method> = bound_method %int_2.ecc, %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete]
  956. // CHECK:STDOUT: %int_2.ef8: %i32 = int_value 2 [concrete]
  957. // CHECK:STDOUT: %.553: type = fn_type_with_self_type %J.G.type, %J.facet [concrete]
  958. // CHECK:STDOUT: %int_3.1ba: Core.IntLiteral = int_value 3 [concrete]
  959. // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.87d: <bound method> = bound_method %int_3.1ba, %Core.IntLiteral.as.ImplicitAs.impl.Convert.e9b [concrete]
  960. // CHECK:STDOUT: %bound_method.def: <bound method> = bound_method %int_3.1ba, %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete]
  961. // CHECK:STDOUT: %int_3.822: %i32 = int_value 3 [concrete]
  962. // CHECK:STDOUT: %int_4.0c1: Core.IntLiteral = int_value 4 [concrete]
  963. // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.0b5: <bound method> = bound_method %int_4.0c1, %Core.IntLiteral.as.ImplicitAs.impl.Convert.e9b [concrete]
  964. // CHECK:STDOUT: %bound_method.5dd: <bound method> = bound_method %int_4.0c1, %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete]
  965. // CHECK:STDOUT: %int_4.940: %i32 = int_value 4 [concrete]
  966. // CHECK:STDOUT: %int_5.64b: Core.IntLiteral = int_value 5 [concrete]
  967. // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.451: <bound method> = bound_method %int_5.64b, %Core.IntLiteral.as.ImplicitAs.impl.Convert.e9b [concrete]
  968. // CHECK:STDOUT: %bound_method.c57: <bound method> = bound_method %int_5.64b, %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete]
  969. // CHECK:STDOUT: %int_5.0f6: %i32 = int_value 5 [concrete]
  970. // CHECK:STDOUT: %int_6.462: Core.IntLiteral = int_value 6 [concrete]
  971. // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.a4a: <bound method> = bound_method %int_6.462, %Core.IntLiteral.as.ImplicitAs.impl.Convert.e9b [concrete]
  972. // CHECK:STDOUT: %bound_method.b96: <bound method> = bound_method %int_6.462, %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete]
  973. // CHECK:STDOUT: %int_6.e56: %i32 = int_value 6 [concrete]
  974. // CHECK:STDOUT: %type: type = facet_type <type> [concrete]
  975. // CHECK:STDOUT: %.Self.3b7: %type = symbolic_binding .Self [symbolic_self]
  976. // CHECK:STDOUT: %T: %J.type = symbolic_binding T, 0 [symbolic]
  977. // CHECK:STDOUT: %pattern_type.84b: type = pattern_type %J.type [concrete]
  978. // CHECK:STDOUT: %T.binding.as_type: type = symbolic_binding_type T, 0, %T [symbolic]
  979. // CHECK:STDOUT: %pattern_type.4c421b.2: type = pattern_type %T.binding.as_type [symbolic]
  980. // CHECK:STDOUT: %J.lookup_impl_witness.cd2552.2: <witness> = lookup_impl_witness %T, @J [symbolic]
  981. // CHECK:STDOUT: %impl.elem0.fa9e71.2: type = impl_witness_access %J.lookup_impl_witness.cd2552.2, element0 [symbolic]
  982. // CHECK:STDOUT: %pattern_type.345548.2: type = pattern_type %impl.elem0.fa9e71.2 [symbolic]
  983. // CHECK:STDOUT: %GenericCallF.type: type = fn_type @GenericCallF [concrete]
  984. // CHECK:STDOUT: %GenericCallF: %GenericCallF.type = struct_value () [concrete]
  985. // CHECK:STDOUT: %require_complete.157: <witness> = require_complete_type %impl.elem0.fa9e71.2 [symbolic]
  986. // CHECK:STDOUT: %require_complete.d01: <witness> = require_complete_type %T.binding.as_type [symbolic]
  987. // CHECK:STDOUT: %.fe6: type = fn_type_with_self_type %J.F.type, %T [symbolic]
  988. // CHECK:STDOUT: %impl.elem1: %.fe6 = impl_witness_access %J.lookup_impl_witness.cd2552.2, element1 [symbolic]
  989. // CHECK:STDOUT: %specific_impl_fn: <specific function> = specific_impl_function %impl.elem1, @J.F(%T) [symbolic]
  990. // CHECK:STDOUT: %CallGeneric.type: type = fn_type @CallGeneric [concrete]
  991. // CHECK:STDOUT: %CallGeneric: %CallGeneric.type = struct_value () [concrete]
  992. // CHECK:STDOUT: %GenericCallF.specific_fn: <specific function> = specific_function %GenericCallF, @GenericCallF(%J.facet) [concrete]
  993. // CHECK:STDOUT: }
  994. // CHECK:STDOUT:
  995. // CHECK:STDOUT: imports {
  996. // CHECK:STDOUT: %Core: <namespace> = namespace file.%Core.import, [concrete] {
  997. // CHECK:STDOUT: .Int = %Core.Int
  998. // CHECK:STDOUT: .Negate = %Core.Negate
  999. // CHECK:STDOUT: .ImplicitAs = %Core.ImplicitAs
  1000. // CHECK:STDOUT: import Core//prelude
  1001. // CHECK:STDOUT: import Core//prelude/...
  1002. // CHECK:STDOUT: }
  1003. // CHECK:STDOUT: %Core.Int: %Int.type = import_ref Core//prelude/parts/int, Int, loaded [concrete = constants.%Int.generic]
  1004. // CHECK:STDOUT: %Core.Negate: type = import_ref Core//prelude/parts/int_literal, Negate, loaded [concrete = constants.%Negate.type]
  1005. // CHECK:STDOUT: %Core.import_ref.3f0 = import_ref Core//prelude/parts/int, loc{{\d+_\d+}}, unloaded
  1006. // CHECK:STDOUT: %Core.import_ref.ca8: @Int.as.Negate.impl.%Int.as.Negate.impl.Op.type (%Int.as.Negate.impl.Op.type.1d3) = import_ref Core//prelude/parts/int, loc{{\d+_\d+}}, loaded [symbolic = @Int.as.Negate.impl.%Int.as.Negate.impl.Op (constants.%Int.as.Negate.impl.Op.5d2)]
  1007. // CHECK:STDOUT: %Negate.impl_witness_table = impl_witness_table (%Core.import_ref.3f0, %Core.import_ref.ca8), @Int.as.Negate.impl [concrete]
  1008. // CHECK:STDOUT: %Core.ImplicitAs: %ImplicitAs.type.cc7 = import_ref Core//prelude/parts/as, ImplicitAs, loaded [concrete = constants.%ImplicitAs.generic]
  1009. // CHECK:STDOUT: %Core.import_ref.e24: @Core.IntLiteral.as.ImplicitAs.impl.%Core.IntLiteral.as.ImplicitAs.impl.Convert.type (%Core.IntLiteral.as.ImplicitAs.impl.Convert.type.f51) = import_ref Core//prelude/parts/int, loc{{\d+_\d+}}, loaded [symbolic = @Core.IntLiteral.as.ImplicitAs.impl.%Core.IntLiteral.as.ImplicitAs.impl.Convert (constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.2a1)]
  1010. // CHECK:STDOUT: %ImplicitAs.impl_witness_table.132 = impl_witness_table (%Core.import_ref.e24), @Core.IntLiteral.as.ImplicitAs.impl [concrete]
  1011. // CHECK:STDOUT: }
  1012. // CHECK:STDOUT:
  1013. // CHECK:STDOUT: file {
  1014. // CHECK:STDOUT: package: <namespace> = namespace [concrete] {
  1015. // CHECK:STDOUT: .Core = imports.%Core
  1016. // CHECK:STDOUT: .J = %J.decl
  1017. // CHECK:STDOUT: .E = %E.decl
  1018. // CHECK:STDOUT: .CallBoth = %CallBoth.decl
  1019. // CHECK:STDOUT: .GenericCallF = %GenericCallF.decl
  1020. // CHECK:STDOUT: .CallGeneric = %CallGeneric.decl
  1021. // CHECK:STDOUT: }
  1022. // CHECK:STDOUT: %Core.import = import Core
  1023. // CHECK:STDOUT: %J.decl: type = interface_decl @J [concrete = constants.%J.type] {} {}
  1024. // CHECK:STDOUT: %E.decl: type = class_decl @E [concrete = constants.%E] {} {}
  1025. // CHECK:STDOUT: %CallBoth.decl: %CallBoth.type = fn_decl @CallBoth [concrete = constants.%CallBoth] {
  1026. // CHECK:STDOUT: %e.patt: %pattern_type.a4a = value_binding_pattern e [concrete]
  1027. // CHECK:STDOUT: %e.param_patt: %pattern_type.a4a = value_param_pattern %e.patt, call_param0 [concrete]
  1028. // CHECK:STDOUT: } {
  1029. // CHECK:STDOUT: %e.param: %E = value_param call_param0
  1030. // CHECK:STDOUT: %E.ref.loc20: type = name_ref E, file.%E.decl [concrete = constants.%E]
  1031. // CHECK:STDOUT: %e: %E = value_binding e, %e.param
  1032. // CHECK:STDOUT: }
  1033. // CHECK:STDOUT: %GenericCallF.decl: %GenericCallF.type = fn_decl @GenericCallF [concrete = constants.%GenericCallF] {
  1034. // CHECK:STDOUT: %T.patt: %pattern_type.84b = symbolic_binding_pattern T, 0 [concrete]
  1035. // CHECK:STDOUT: %t.patt: @GenericCallF.%pattern_type.loc28_24 (%pattern_type.4c421b.2) = value_binding_pattern t [concrete]
  1036. // CHECK:STDOUT: %t.param_patt: @GenericCallF.%pattern_type.loc28_24 (%pattern_type.4c421b.2) = value_param_pattern %t.patt, call_param0 [concrete]
  1037. // CHECK:STDOUT: %u.patt: @GenericCallF.%pattern_type.loc28_30 (%pattern_type.345548.2) = value_binding_pattern u [concrete]
  1038. // CHECK:STDOUT: %u.param_patt: @GenericCallF.%pattern_type.loc28_30 (%pattern_type.345548.2) = value_param_pattern %u.patt, call_param1 [concrete]
  1039. // CHECK:STDOUT: %return.patt: @GenericCallF.%pattern_type.loc28_30 (%pattern_type.345548.2) = return_slot_pattern [concrete]
  1040. // CHECK:STDOUT: %return.param_patt: @GenericCallF.%pattern_type.loc28_30 (%pattern_type.345548.2) = out_param_pattern %return.patt, call_param2 [concrete]
  1041. // CHECK:STDOUT: } {
  1042. // CHECK:STDOUT: %T.ref.loc28_41: %J.type = name_ref T, %T.loc28_17.2 [symbolic = %T.loc28_17.1 (constants.%T)]
  1043. // CHECK:STDOUT: %U.ref.loc28_42: %J.assoc_type = name_ref U, @U.%assoc0 [concrete = constants.%assoc0.411]
  1044. // CHECK:STDOUT: %T.as_type.loc28_42: type = facet_access_type %T.ref.loc28_41 [symbolic = %T.binding.as_type (constants.%T.binding.as_type)]
  1045. // CHECK:STDOUT: %.loc28_42: type = converted %T.ref.loc28_41, %T.as_type.loc28_42 [symbolic = %T.binding.as_type (constants.%T.binding.as_type)]
  1046. // CHECK:STDOUT: %impl.elem0.loc28_42: type = impl_witness_access constants.%J.lookup_impl_witness.cd2552.2, element0 [symbolic = %impl.elem0.loc28_34.1 (constants.%impl.elem0.fa9e71.2)]
  1047. // CHECK:STDOUT: %.loc28_21: type = splice_block %J.ref [concrete = constants.%J.type] {
  1048. // CHECK:STDOUT: %.Self: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.3b7]
  1049. // CHECK:STDOUT: %J.ref: type = name_ref J, file.%J.decl [concrete = constants.%J.type]
  1050. // CHECK:STDOUT: }
  1051. // CHECK:STDOUT: %T.loc28_17.2: %J.type = symbolic_binding T, 0 [symbolic = %T.loc28_17.1 (constants.%T)]
  1052. // CHECK:STDOUT: %t.param: @GenericCallF.%T.binding.as_type (%T.binding.as_type) = value_param call_param0
  1053. // CHECK:STDOUT: %.loc28_27.1: type = splice_block %.loc28_27.2 [symbolic = %T.binding.as_type (constants.%T.binding.as_type)] {
  1054. // CHECK:STDOUT: %T.ref.loc28_27: %J.type = name_ref T, %T.loc28_17.2 [symbolic = %T.loc28_17.1 (constants.%T)]
  1055. // CHECK:STDOUT: %T.as_type.loc28_27: type = facet_access_type %T.ref.loc28_27 [symbolic = %T.binding.as_type (constants.%T.binding.as_type)]
  1056. // CHECK:STDOUT: %.loc28_27.2: type = converted %T.ref.loc28_27, %T.as_type.loc28_27 [symbolic = %T.binding.as_type (constants.%T.binding.as_type)]
  1057. // CHECK:STDOUT: }
  1058. // CHECK:STDOUT: %t: @GenericCallF.%T.binding.as_type (%T.binding.as_type) = value_binding t, %t.param
  1059. // CHECK:STDOUT: %u.param: @GenericCallF.%impl.elem0.loc28_34.1 (%impl.elem0.fa9e71.2) = value_param call_param1
  1060. // CHECK:STDOUT: %.loc28_34.1: type = splice_block %impl.elem0.loc28_34.2 [symbolic = %impl.elem0.loc28_34.1 (constants.%impl.elem0.fa9e71.2)] {
  1061. // CHECK:STDOUT: %T.ref.loc28_33: %J.type = name_ref T, %T.loc28_17.2 [symbolic = %T.loc28_17.1 (constants.%T)]
  1062. // CHECK:STDOUT: %U.ref.loc28_34: %J.assoc_type = name_ref U, @U.%assoc0 [concrete = constants.%assoc0.411]
  1063. // CHECK:STDOUT: %T.as_type.loc28_34: type = facet_access_type %T.ref.loc28_33 [symbolic = %T.binding.as_type (constants.%T.binding.as_type)]
  1064. // CHECK:STDOUT: %.loc28_34.2: type = converted %T.ref.loc28_33, %T.as_type.loc28_34 [symbolic = %T.binding.as_type (constants.%T.binding.as_type)]
  1065. // CHECK:STDOUT: %impl.elem0.loc28_34.2: type = impl_witness_access constants.%J.lookup_impl_witness.cd2552.2, element0 [symbolic = %impl.elem0.loc28_34.1 (constants.%impl.elem0.fa9e71.2)]
  1066. // CHECK:STDOUT: }
  1067. // CHECK:STDOUT: %u: @GenericCallF.%impl.elem0.loc28_34.1 (%impl.elem0.fa9e71.2) = value_binding u, %u.param
  1068. // CHECK:STDOUT: %return.param: ref @GenericCallF.%impl.elem0.loc28_34.1 (%impl.elem0.fa9e71.2) = out_param call_param2
  1069. // CHECK:STDOUT: %return: ref @GenericCallF.%impl.elem0.loc28_34.1 (%impl.elem0.fa9e71.2) = return_slot %return.param
  1070. // CHECK:STDOUT: }
  1071. // CHECK:STDOUT: %CallGeneric.decl: %CallGeneric.type = fn_decl @CallGeneric [concrete = constants.%CallGeneric] {
  1072. // CHECK:STDOUT: %e.patt: %pattern_type.a4a = value_binding_pattern e [concrete]
  1073. // CHECK:STDOUT: %e.param_patt: %pattern_type.a4a = value_param_pattern %e.patt, call_param0 [concrete]
  1074. // CHECK:STDOUT: %return.patt: %pattern_type.7ce = return_slot_pattern [concrete]
  1075. // CHECK:STDOUT: %return.param_patt: %pattern_type.7ce = out_param_pattern %return.patt, call_param1 [concrete]
  1076. // CHECK:STDOUT: } {
  1077. // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete = constants.%int_32]
  1078. // CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32]
  1079. // CHECK:STDOUT: %e.param: %E = value_param call_param0
  1080. // CHECK:STDOUT: %E.ref: type = name_ref E, file.%E.decl [concrete = constants.%E]
  1081. // CHECK:STDOUT: %e: %E = value_binding e, %e.param
  1082. // CHECK:STDOUT: %return.param: ref %i32 = out_param call_param1
  1083. // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param
  1084. // CHECK:STDOUT: }
  1085. // CHECK:STDOUT: }
  1086. // CHECK:STDOUT:
  1087. // CHECK:STDOUT: interface @J {
  1088. // CHECK:STDOUT: %Self: %J.type = symbolic_binding Self, 0 [symbolic = constants.%Self.dc6]
  1089. // CHECK:STDOUT: %U: type = assoc_const_decl @U [concrete] {
  1090. // CHECK:STDOUT: %assoc0: %J.assoc_type = assoc_entity element0, @J.%U [concrete = constants.%assoc0.411]
  1091. // CHECK:STDOUT: }
  1092. // CHECK:STDOUT: %J.F.decl: %J.F.type = fn_decl @J.F [concrete = constants.%J.F] {
  1093. // CHECK:STDOUT: %u.patt: @J.F.%pattern_type (%pattern_type.345548.1) = value_binding_pattern u [concrete]
  1094. // CHECK:STDOUT: %u.param_patt: @J.F.%pattern_type (%pattern_type.345548.1) = value_param_pattern %u.patt, call_param0 [concrete]
  1095. // CHECK:STDOUT: %return.patt: @J.F.%pattern_type (%pattern_type.345548.1) = return_slot_pattern [concrete]
  1096. // CHECK:STDOUT: %return.param_patt: @J.F.%pattern_type (%pattern_type.345548.1) = out_param_pattern %return.patt, call_param1 [concrete]
  1097. // CHECK:STDOUT: } {
  1098. // CHECK:STDOUT: %impl.elem0.loc5_17: type = impl_witness_access constants.%J.lookup_impl_witness.cd2552.1, element0 [symbolic = %impl.elem0.loc5_11.1 (constants.%impl.elem0.fa9e71.1)]
  1099. // CHECK:STDOUT: %U.ref.loc5_17: type = name_ref U, %impl.elem0.loc5_17 [symbolic = %impl.elem0.loc5_11.1 (constants.%impl.elem0.fa9e71.1)]
  1100. // CHECK:STDOUT: %u.param: @J.F.%impl.elem0.loc5_11.1 (%impl.elem0.fa9e71.1) = value_param call_param0
  1101. // CHECK:STDOUT: %.loc5: type = splice_block %U.ref.loc5_11 [symbolic = %impl.elem0.loc5_11.1 (constants.%impl.elem0.fa9e71.1)] {
  1102. // CHECK:STDOUT: %impl.elem0.loc5_11.2: type = impl_witness_access constants.%J.lookup_impl_witness.cd2552.1, element0 [symbolic = %impl.elem0.loc5_11.1 (constants.%impl.elem0.fa9e71.1)]
  1103. // CHECK:STDOUT: %U.ref.loc5_11: type = name_ref U, %impl.elem0.loc5_11.2 [symbolic = %impl.elem0.loc5_11.1 (constants.%impl.elem0.fa9e71.1)]
  1104. // CHECK:STDOUT: }
  1105. // CHECK:STDOUT: %u: @J.F.%impl.elem0.loc5_11.1 (%impl.elem0.fa9e71.1) = value_binding u, %u.param
  1106. // CHECK:STDOUT: %return.param: ref @J.F.%impl.elem0.loc5_11.1 (%impl.elem0.fa9e71.1) = out_param call_param1
  1107. // CHECK:STDOUT: %return: ref @J.F.%impl.elem0.loc5_11.1 (%impl.elem0.fa9e71.1) = return_slot %return.param
  1108. // CHECK:STDOUT: }
  1109. // CHECK:STDOUT: %assoc1: %J.assoc_type = assoc_entity element1, %J.F.decl [concrete = constants.%assoc1.572]
  1110. // CHECK:STDOUT: %J.G.decl: %J.G.type = fn_decl @J.G [concrete = constants.%J.G] {
  1111. // CHECK:STDOUT: %self.patt: @J.G.%pattern_type.loc6_8 (%pattern_type.4c421b.1) = value_binding_pattern self [concrete]
  1112. // CHECK:STDOUT: %self.param_patt: @J.G.%pattern_type.loc6_8 (%pattern_type.4c421b.1) = value_param_pattern %self.patt, call_param0 [concrete]
  1113. // CHECK:STDOUT: %v.patt: @J.G.%pattern_type.loc6_20 (%pattern_type.345548.1) = value_binding_pattern v [concrete]
  1114. // CHECK:STDOUT: %v.param_patt: @J.G.%pattern_type.loc6_20 (%pattern_type.345548.1) = value_param_pattern %v.patt, call_param1 [concrete]
  1115. // CHECK:STDOUT: %return.patt: @J.G.%pattern_type.loc6_20 (%pattern_type.345548.1) = return_slot_pattern [concrete]
  1116. // CHECK:STDOUT: %return.param_patt: @J.G.%pattern_type.loc6_20 (%pattern_type.345548.1) = out_param_pattern %return.patt, call_param2 [concrete]
  1117. // CHECK:STDOUT: } {
  1118. // CHECK:STDOUT: %impl.elem0.loc6_29: type = impl_witness_access constants.%J.lookup_impl_witness.cd2552.1, element0 [symbolic = %impl.elem0.loc6_23.1 (constants.%impl.elem0.fa9e71.1)]
  1119. // CHECK:STDOUT: %U.ref.loc6_29: type = name_ref U, %impl.elem0.loc6_29 [symbolic = %impl.elem0.loc6_23.1 (constants.%impl.elem0.fa9e71.1)]
  1120. // CHECK:STDOUT: %self.param: @J.G.%Self.binding.as_type (%Self.binding.as_type.1fa) = value_param call_param0
  1121. // CHECK:STDOUT: %.loc6_14.1: type = splice_block %.loc6_14.2 [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type.1fa)] {
  1122. // CHECK:STDOUT: %Self.ref: %J.type = name_ref Self, @J.%Self [symbolic = %Self (constants.%Self.dc6)]
  1123. // CHECK:STDOUT: %Self.as_type: type = facet_access_type %Self.ref [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type.1fa)]
  1124. // CHECK:STDOUT: %.loc6_14.2: type = converted %Self.ref, %Self.as_type [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type.1fa)]
  1125. // CHECK:STDOUT: }
  1126. // CHECK:STDOUT: %self: @J.G.%Self.binding.as_type (%Self.binding.as_type.1fa) = value_binding self, %self.param
  1127. // CHECK:STDOUT: %v.param: @J.G.%impl.elem0.loc6_23.1 (%impl.elem0.fa9e71.1) = value_param call_param1
  1128. // CHECK:STDOUT: %.loc6_23: type = splice_block %U.ref.loc6_23 [symbolic = %impl.elem0.loc6_23.1 (constants.%impl.elem0.fa9e71.1)] {
  1129. // CHECK:STDOUT: %impl.elem0.loc6_23.2: type = impl_witness_access constants.%J.lookup_impl_witness.cd2552.1, element0 [symbolic = %impl.elem0.loc6_23.1 (constants.%impl.elem0.fa9e71.1)]
  1130. // CHECK:STDOUT: %U.ref.loc6_23: type = name_ref U, %impl.elem0.loc6_23.2 [symbolic = %impl.elem0.loc6_23.1 (constants.%impl.elem0.fa9e71.1)]
  1131. // CHECK:STDOUT: }
  1132. // CHECK:STDOUT: %v: @J.G.%impl.elem0.loc6_23.1 (%impl.elem0.fa9e71.1) = value_binding v, %v.param
  1133. // CHECK:STDOUT: %return.param: ref @J.G.%impl.elem0.loc6_23.1 (%impl.elem0.fa9e71.1) = out_param call_param2
  1134. // CHECK:STDOUT: %return: ref @J.G.%impl.elem0.loc6_23.1 (%impl.elem0.fa9e71.1) = return_slot %return.param
  1135. // CHECK:STDOUT: }
  1136. // CHECK:STDOUT: %assoc2: %J.assoc_type = assoc_entity element2, %J.G.decl [concrete = constants.%assoc2]
  1137. // CHECK:STDOUT:
  1138. // CHECK:STDOUT: !members:
  1139. // CHECK:STDOUT: .Self = %Self
  1140. // CHECK:STDOUT: .U = @U.%assoc0
  1141. // CHECK:STDOUT: .F = %assoc1
  1142. // CHECK:STDOUT: .G = %assoc2
  1143. // CHECK:STDOUT: witness = (%U, %J.F.decl, %J.G.decl)
  1144. // CHECK:STDOUT:
  1145. // CHECK:STDOUT: !requires:
  1146. // CHECK:STDOUT: }
  1147. // CHECK:STDOUT:
  1148. // CHECK:STDOUT: generic assoc_const @U(@J.%Self: %J.type) {
  1149. // CHECK:STDOUT: assoc_const U:! type;
  1150. // CHECK:STDOUT: }
  1151. // CHECK:STDOUT:
  1152. // CHECK:STDOUT: impl @E.as.J.impl: %Self.ref as %.loc10_20 {
  1153. // CHECK:STDOUT: %E.as.J.impl.F.decl: %E.as.J.impl.F.type = fn_decl @E.as.J.impl.F [concrete = constants.%E.as.J.impl.F] {
  1154. // CHECK:STDOUT: %u.patt: %pattern_type.7ce = value_binding_pattern u [concrete]
  1155. // CHECK:STDOUT: %u.param_patt: %pattern_type.7ce = value_param_pattern %u.patt, call_param0 [concrete]
  1156. // CHECK:STDOUT: %return.patt: %pattern_type.7ce = return_slot_pattern [concrete]
  1157. // CHECK:STDOUT: %return.param_patt: %pattern_type.7ce = out_param_pattern %return.patt, call_param1 [concrete]
  1158. // CHECK:STDOUT: } {
  1159. // CHECK:STDOUT: %int_32.loc11_21: Core.IntLiteral = int_value 32 [concrete = constants.%int_32]
  1160. // CHECK:STDOUT: %i32.loc11_21: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32]
  1161. // CHECK:STDOUT: %u.param: %i32 = value_param call_param0
  1162. // CHECK:STDOUT: %.loc11: type = splice_block %i32.loc11_13 [concrete = constants.%i32] {
  1163. // CHECK:STDOUT: %int_32.loc11_13: Core.IntLiteral = int_value 32 [concrete = constants.%int_32]
  1164. // CHECK:STDOUT: %i32.loc11_13: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32]
  1165. // CHECK:STDOUT: }
  1166. // CHECK:STDOUT: %u: %i32 = value_binding u, %u.param
  1167. // CHECK:STDOUT: %return.param: ref %i32 = out_param call_param1
  1168. // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param
  1169. // CHECK:STDOUT: }
  1170. // CHECK:STDOUT: %E.as.J.impl.G.decl: %E.as.J.impl.G.type = fn_decl @E.as.J.impl.G [concrete = constants.%E.as.J.impl.G] {
  1171. // CHECK:STDOUT: %self.patt: %pattern_type.a4a = value_binding_pattern self [concrete]
  1172. // CHECK:STDOUT: %self.param_patt: %pattern_type.a4a = value_param_pattern %self.patt, call_param0 [concrete]
  1173. // CHECK:STDOUT: %v.patt: %pattern_type.7ce = value_binding_pattern v [concrete]
  1174. // CHECK:STDOUT: %v.param_patt: %pattern_type.7ce = value_param_pattern %v.patt, call_param1 [concrete]
  1175. // CHECK:STDOUT: %return.patt: %pattern_type.7ce = return_slot_pattern [concrete]
  1176. // CHECK:STDOUT: %return.param_patt: %pattern_type.7ce = out_param_pattern %return.patt, call_param2 [concrete]
  1177. // CHECK:STDOUT: } {
  1178. // CHECK:STDOUT: %int_32.loc14_33: Core.IntLiteral = int_value 32 [concrete = constants.%int_32]
  1179. // CHECK:STDOUT: %i32.loc14_33: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32]
  1180. // CHECK:STDOUT: %self.param: %E = value_param call_param0
  1181. // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%E [concrete = constants.%E]
  1182. // CHECK:STDOUT: %self: %E = value_binding self, %self.param
  1183. // CHECK:STDOUT: %v.param: %i32 = value_param call_param1
  1184. // CHECK:STDOUT: %.loc14: type = splice_block %i32.loc14_25 [concrete = constants.%i32] {
  1185. // CHECK:STDOUT: %int_32.loc14_25: Core.IntLiteral = int_value 32 [concrete = constants.%int_32]
  1186. // CHECK:STDOUT: %i32.loc14_25: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32]
  1187. // CHECK:STDOUT: }
  1188. // CHECK:STDOUT: %v: %i32 = value_binding v, %v.param
  1189. // CHECK:STDOUT: %return.param: ref %i32 = out_param call_param2
  1190. // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param
  1191. // CHECK:STDOUT: }
  1192. // CHECK:STDOUT:
  1193. // CHECK:STDOUT: !members:
  1194. // CHECK:STDOUT: .F = %E.as.J.impl.F.decl
  1195. // CHECK:STDOUT: .G = %E.as.J.impl.G.decl
  1196. // CHECK:STDOUT: witness = @E.%J.impl_witness
  1197. // CHECK:STDOUT: }
  1198. // CHECK:STDOUT:
  1199. // CHECK:STDOUT: class @E {
  1200. // CHECK:STDOUT: impl_decl @E.as.J.impl [concrete] {} {
  1201. // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%E [concrete = constants.%E]
  1202. // CHECK:STDOUT: %J.ref: type = name_ref J, file.%J.decl [concrete = constants.%J.type]
  1203. // CHECK:STDOUT: %.Self: %J.type = symbolic_binding .Self [symbolic_self = constants.%.Self.c58]
  1204. // CHECK:STDOUT: %.Self.ref: %J.type = name_ref .Self, %.Self [symbolic_self = constants.%.Self.c58]
  1205. // CHECK:STDOUT: %U.ref: %J.assoc_type = name_ref U, @U.%assoc0 [concrete = constants.%assoc0.411]
  1206. // CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self.ref [symbolic_self = constants.%.Self.binding.as_type]
  1207. // CHECK:STDOUT: %.loc10_26: type = converted %.Self.ref, %.Self.as_type [symbolic_self = constants.%.Self.binding.as_type]
  1208. // CHECK:STDOUT: %impl.elem0: type = impl_witness_access constants.%J.lookup_impl_witness.ab8, element0 [symbolic_self = constants.%impl.elem0.ab2]
  1209. // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete = constants.%int_32]
  1210. // CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32]
  1211. // CHECK:STDOUT: %.loc10_20: type = where_expr %.Self [concrete = constants.%J_where.type] {
  1212. // CHECK:STDOUT: requirement_base_facet_type constants.%J.type
  1213. // CHECK:STDOUT: requirement_rewrite %impl.elem0, %i32
  1214. // CHECK:STDOUT: }
  1215. // CHECK:STDOUT: }
  1216. // CHECK:STDOUT: %J.impl_witness_table = impl_witness_table (%impl_witness_assoc_constant, @E.as.J.impl.%E.as.J.impl.F.decl, @E.as.J.impl.%E.as.J.impl.G.decl), @E.as.J.impl [concrete]
  1217. // CHECK:STDOUT: %J.impl_witness: <witness> = impl_witness %J.impl_witness_table [concrete = constants.%J.impl_witness]
  1218. // CHECK:STDOUT: %impl_witness_assoc_constant: type = impl_witness_assoc_constant constants.%i32 [concrete = constants.%i32]
  1219. // CHECK:STDOUT: %complete_type: <witness> = complete_type_witness constants.%empty_struct_type [concrete = constants.%complete_type.357]
  1220. // CHECK:STDOUT: complete_type_witness = %complete_type
  1221. // CHECK:STDOUT:
  1222. // CHECK:STDOUT: !members:
  1223. // CHECK:STDOUT: .Self = constants.%E
  1224. // CHECK:STDOUT: .J = <poisoned>
  1225. // CHECK:STDOUT: .F = <poisoned>
  1226. // CHECK:STDOUT: .G = <poisoned>
  1227. // CHECK:STDOUT: extend @E.as.J.impl.%.loc10_20
  1228. // CHECK:STDOUT: }
  1229. // CHECK:STDOUT:
  1230. // CHECK:STDOUT: generic fn @J.F(@J.%Self: %J.type) {
  1231. // CHECK:STDOUT: %Self: %J.type = symbolic_binding Self, 0 [symbolic = %Self (constants.%Self.dc6)]
  1232. // CHECK:STDOUT: %J.lookup_impl_witness: <witness> = lookup_impl_witness %Self, @J [symbolic = %J.lookup_impl_witness (constants.%J.lookup_impl_witness.cd2552.1)]
  1233. // 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.fa9e71.1)]
  1234. // CHECK:STDOUT: %pattern_type: type = pattern_type %impl.elem0.loc5_11.1 [symbolic = %pattern_type (constants.%pattern_type.345548.1)]
  1235. // CHECK:STDOUT:
  1236. // CHECK:STDOUT: fn(%u.param: @J.F.%impl.elem0.loc5_11.1 (%impl.elem0.fa9e71.1)) -> @J.F.%impl.elem0.loc5_11.1 (%impl.elem0.fa9e71.1);
  1237. // CHECK:STDOUT: }
  1238. // CHECK:STDOUT:
  1239. // CHECK:STDOUT: generic fn @J.G(@J.%Self: %J.type) {
  1240. // CHECK:STDOUT: %Self: %J.type = symbolic_binding Self, 0 [symbolic = %Self (constants.%Self.dc6)]
  1241. // CHECK:STDOUT: %Self.binding.as_type: type = symbolic_binding_type Self, 0, %Self [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type.1fa)]
  1242. // CHECK:STDOUT: %pattern_type.loc6_8: type = pattern_type %Self.binding.as_type [symbolic = %pattern_type.loc6_8 (constants.%pattern_type.4c421b.1)]
  1243. // CHECK:STDOUT: %J.lookup_impl_witness: <witness> = lookup_impl_witness %Self, @J [symbolic = %J.lookup_impl_witness (constants.%J.lookup_impl_witness.cd2552.1)]
  1244. // 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.fa9e71.1)]
  1245. // CHECK:STDOUT: %pattern_type.loc6_20: type = pattern_type %impl.elem0.loc6_23.1 [symbolic = %pattern_type.loc6_20 (constants.%pattern_type.345548.1)]
  1246. // CHECK:STDOUT:
  1247. // CHECK:STDOUT: fn(%self.param: @J.G.%Self.binding.as_type (%Self.binding.as_type.1fa), %v.param: @J.G.%impl.elem0.loc6_23.1 (%impl.elem0.fa9e71.1)) -> @J.G.%impl.elem0.loc6_23.1 (%impl.elem0.fa9e71.1);
  1248. // CHECK:STDOUT: }
  1249. // CHECK:STDOUT:
  1250. // CHECK:STDOUT: fn @E.as.J.impl.F(%u.param: %i32) -> %i32 {
  1251. // CHECK:STDOUT: !entry:
  1252. // CHECK:STDOUT: %u.ref: %i32 = name_ref u, %u
  1253. // CHECK:STDOUT: %impl.elem1: %.f7e = impl_witness_access constants.%Negate.impl_witness.bc7, element1 [concrete = constants.%Int.as.Negate.impl.Op.4f9]
  1254. // CHECK:STDOUT: %bound_method.loc12_14.1: <bound method> = bound_method %u.ref, %impl.elem1
  1255. // CHECK:STDOUT: %specific_fn: <specific function> = specific_function %impl.elem1, @Int.as.Negate.impl.Op(constants.%int_32) [concrete = constants.%Int.as.Negate.impl.Op.specific_fn]
  1256. // CHECK:STDOUT: %bound_method.loc12_14.2: <bound method> = bound_method %u.ref, %specific_fn
  1257. // CHECK:STDOUT: %Int.as.Negate.impl.Op.call: init %i32 = call %bound_method.loc12_14.2(%u.ref)
  1258. // CHECK:STDOUT: return %Int.as.Negate.impl.Op.call to %return
  1259. // CHECK:STDOUT: }
  1260. // CHECK:STDOUT:
  1261. // CHECK:STDOUT: fn @E.as.J.impl.G(%self.param: %E, %v.param: %i32) -> %i32 {
  1262. // CHECK:STDOUT: !entry:
  1263. // CHECK:STDOUT: %v.ref: %i32 = name_ref v, %v
  1264. // CHECK:STDOUT: %impl.elem1: %.f7e = impl_witness_access constants.%Negate.impl_witness.bc7, element1 [concrete = constants.%Int.as.Negate.impl.Op.4f9]
  1265. // CHECK:STDOUT: %bound_method.loc15_14.1: <bound method> = bound_method %v.ref, %impl.elem1
  1266. // CHECK:STDOUT: %specific_fn: <specific function> = specific_function %impl.elem1, @Int.as.Negate.impl.Op(constants.%int_32) [concrete = constants.%Int.as.Negate.impl.Op.specific_fn]
  1267. // CHECK:STDOUT: %bound_method.loc15_14.2: <bound method> = bound_method %v.ref, %specific_fn
  1268. // CHECK:STDOUT: %Int.as.Negate.impl.Op.call: init %i32 = call %bound_method.loc15_14.2(%v.ref)
  1269. // CHECK:STDOUT: return %Int.as.Negate.impl.Op.call to %return
  1270. // CHECK:STDOUT: }
  1271. // CHECK:STDOUT:
  1272. // CHECK:STDOUT: fn @CallBoth(%e.param: %E) {
  1273. // CHECK:STDOUT: !entry:
  1274. // CHECK:STDOUT: name_binding_decl {
  1275. // CHECK:STDOUT: %e1.patt: %pattern_type.7ce = value_binding_pattern e1 [concrete]
  1276. // CHECK:STDOUT: }
  1277. // CHECK:STDOUT: %e.ref.loc21: %E = name_ref e, %e
  1278. // CHECK:STDOUT: %F.ref.loc21: %J.assoc_type = name_ref F, @J.%assoc1 [concrete = constants.%assoc1.572]
  1279. // CHECK:STDOUT: %impl.elem1.loc21: %.ed8 = impl_witness_access constants.%J.impl_witness, element1 [concrete = constants.%E.as.J.impl.F]
  1280. // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [concrete = constants.%int_2.ecc]
  1281. // CHECK:STDOUT: %impl.elem0.loc21: %.322 = impl_witness_access constants.%ImplicitAs.impl_witness.bc9, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.e9b]
  1282. // CHECK:STDOUT: %bound_method.loc21_21.1: <bound method> = bound_method %int_2, %impl.elem0.loc21 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.393]
  1283. // CHECK:STDOUT: %specific_fn.loc21: <specific function> = specific_function %impl.elem0.loc21, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn]
  1284. // CHECK:STDOUT: %bound_method.loc21_21.2: <bound method> = bound_method %int_2, %specific_fn.loc21 [concrete = constants.%bound_method.9f7]
  1285. // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc21: init %i32 = call %bound_method.loc21_21.2(%int_2) [concrete = constants.%int_2.ef8]
  1286. // CHECK:STDOUT: %.loc21_21.1: %i32 = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc21 [concrete = constants.%int_2.ef8]
  1287. // CHECK:STDOUT: %.loc21_21.2: %i32 = converted %int_2, %.loc21_21.1 [concrete = constants.%int_2.ef8]
  1288. // CHECK:STDOUT: %E.as.J.impl.F.call.loc21: init %i32 = call %impl.elem1.loc21(%.loc21_21.2)
  1289. // CHECK:STDOUT: %.loc21_11: type = splice_block %i32.loc21 [concrete = constants.%i32] {
  1290. // CHECK:STDOUT: %int_32.loc21: Core.IntLiteral = int_value 32 [concrete = constants.%int_32]
  1291. // CHECK:STDOUT: %i32.loc21: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32]
  1292. // CHECK:STDOUT: }
  1293. // CHECK:STDOUT: %.loc21_22.1: %i32 = value_of_initializer %E.as.J.impl.F.call.loc21
  1294. // CHECK:STDOUT: %.loc21_22.2: %i32 = converted %E.as.J.impl.F.call.loc21, %.loc21_22.1
  1295. // CHECK:STDOUT: %e1: %i32 = value_binding e1, %.loc21_22.2
  1296. // CHECK:STDOUT: name_binding_decl {
  1297. // CHECK:STDOUT: %e2.patt: %pattern_type.7ce = value_binding_pattern e2 [concrete]
  1298. // CHECK:STDOUT: }
  1299. // CHECK:STDOUT: %e.ref.loc22: %E = name_ref e, %e
  1300. // CHECK:STDOUT: %G.ref.loc22: %J.assoc_type = name_ref G, @J.%assoc2 [concrete = constants.%assoc2]
  1301. // CHECK:STDOUT: %impl.elem2.loc22: %.553 = impl_witness_access constants.%J.impl_witness, element2 [concrete = constants.%E.as.J.impl.G]
  1302. // CHECK:STDOUT: %bound_method.loc22_18: <bound method> = bound_method %e.ref.loc22, %impl.elem2.loc22
  1303. // CHECK:STDOUT: %int_3: Core.IntLiteral = int_value 3 [concrete = constants.%int_3.1ba]
  1304. // CHECK:STDOUT: %impl.elem0.loc22: %.322 = impl_witness_access constants.%ImplicitAs.impl_witness.bc9, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.e9b]
  1305. // CHECK:STDOUT: %bound_method.loc22_21.1: <bound method> = bound_method %int_3, %impl.elem0.loc22 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.87d]
  1306. // CHECK:STDOUT: %specific_fn.loc22: <specific function> = specific_function %impl.elem0.loc22, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn]
  1307. // CHECK:STDOUT: %bound_method.loc22_21.2: <bound method> = bound_method %int_3, %specific_fn.loc22 [concrete = constants.%bound_method.def]
  1308. // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc22: init %i32 = call %bound_method.loc22_21.2(%int_3) [concrete = constants.%int_3.822]
  1309. // CHECK:STDOUT: %.loc22_21.1: %i32 = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc22 [concrete = constants.%int_3.822]
  1310. // CHECK:STDOUT: %.loc22_21.2: %i32 = converted %int_3, %.loc22_21.1 [concrete = constants.%int_3.822]
  1311. // CHECK:STDOUT: %E.as.J.impl.G.call.loc22: init %i32 = call %bound_method.loc22_18(%e.ref.loc22, %.loc22_21.2)
  1312. // CHECK:STDOUT: %.loc22_11: type = splice_block %i32.loc22 [concrete = constants.%i32] {
  1313. // CHECK:STDOUT: %int_32.loc22: Core.IntLiteral = int_value 32 [concrete = constants.%int_32]
  1314. // CHECK:STDOUT: %i32.loc22: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32]
  1315. // CHECK:STDOUT: }
  1316. // CHECK:STDOUT: %.loc22_22.1: %i32 = value_of_initializer %E.as.J.impl.G.call.loc22
  1317. // CHECK:STDOUT: %.loc22_22.2: %i32 = converted %E.as.J.impl.G.call.loc22, %.loc22_22.1
  1318. // CHECK:STDOUT: %e2: %i32 = value_binding e2, %.loc22_22.2
  1319. // CHECK:STDOUT: name_binding_decl {
  1320. // CHECK:STDOUT: %e3.patt: %pattern_type.7ce = value_binding_pattern e3 [concrete]
  1321. // CHECK:STDOUT: }
  1322. // CHECK:STDOUT: %E.ref.loc23: type = name_ref E, file.%E.decl [concrete = constants.%E]
  1323. // CHECK:STDOUT: %F.ref.loc23: %J.assoc_type = name_ref F, @J.%assoc1 [concrete = constants.%assoc1.572]
  1324. // CHECK:STDOUT: %impl.elem1.loc23: %.ed8 = impl_witness_access constants.%J.impl_witness, element1 [concrete = constants.%E.as.J.impl.F]
  1325. // CHECK:STDOUT: %int_4: Core.IntLiteral = int_value 4 [concrete = constants.%int_4.0c1]
  1326. // CHECK:STDOUT: %impl.elem0.loc23: %.322 = impl_witness_access constants.%ImplicitAs.impl_witness.bc9, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.e9b]
  1327. // CHECK:STDOUT: %bound_method.loc23_21.1: <bound method> = bound_method %int_4, %impl.elem0.loc23 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.0b5]
  1328. // CHECK:STDOUT: %specific_fn.loc23: <specific function> = specific_function %impl.elem0.loc23, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn]
  1329. // CHECK:STDOUT: %bound_method.loc23_21.2: <bound method> = bound_method %int_4, %specific_fn.loc23 [concrete = constants.%bound_method.5dd]
  1330. // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc23: init %i32 = call %bound_method.loc23_21.2(%int_4) [concrete = constants.%int_4.940]
  1331. // CHECK:STDOUT: %.loc23_21.1: %i32 = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc23 [concrete = constants.%int_4.940]
  1332. // CHECK:STDOUT: %.loc23_21.2: %i32 = converted %int_4, %.loc23_21.1 [concrete = constants.%int_4.940]
  1333. // CHECK:STDOUT: %E.as.J.impl.F.call.loc23: init %i32 = call %impl.elem1.loc23(%.loc23_21.2)
  1334. // CHECK:STDOUT: %.loc23_11: type = splice_block %i32.loc23 [concrete = constants.%i32] {
  1335. // CHECK:STDOUT: %int_32.loc23: Core.IntLiteral = int_value 32 [concrete = constants.%int_32]
  1336. // CHECK:STDOUT: %i32.loc23: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32]
  1337. // CHECK:STDOUT: }
  1338. // CHECK:STDOUT: %.loc23_22.1: %i32 = value_of_initializer %E.as.J.impl.F.call.loc23
  1339. // CHECK:STDOUT: %.loc23_22.2: %i32 = converted %E.as.J.impl.F.call.loc23, %.loc23_22.1
  1340. // CHECK:STDOUT: %e3: %i32 = value_binding e3, %.loc23_22.2
  1341. // CHECK:STDOUT: name_binding_decl {
  1342. // CHECK:STDOUT: %e4.patt: %pattern_type.7ce = value_binding_pattern e4 [concrete]
  1343. // CHECK:STDOUT: }
  1344. // CHECK:STDOUT: %e.ref.loc24: %E = name_ref e, %e
  1345. // CHECK:STDOUT: %E.ref.loc24: type = name_ref E, file.%E.decl [concrete = constants.%E]
  1346. // CHECK:STDOUT: %G.ref.loc24: %J.assoc_type = name_ref G, @J.%assoc2 [concrete = constants.%assoc2]
  1347. // CHECK:STDOUT: %impl.elem2.loc24: %.553 = impl_witness_access constants.%J.impl_witness, element2 [concrete = constants.%E.as.J.impl.G]
  1348. // CHECK:STDOUT: %bound_method.loc24_18: <bound method> = bound_method %e.ref.loc24, %impl.elem2.loc24
  1349. // CHECK:STDOUT: %int_5: Core.IntLiteral = int_value 5 [concrete = constants.%int_5.64b]
  1350. // CHECK:STDOUT: %impl.elem0.loc24: %.322 = impl_witness_access constants.%ImplicitAs.impl_witness.bc9, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.e9b]
  1351. // CHECK:STDOUT: %bound_method.loc24_25.1: <bound method> = bound_method %int_5, %impl.elem0.loc24 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.451]
  1352. // CHECK:STDOUT: %specific_fn.loc24: <specific function> = specific_function %impl.elem0.loc24, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn]
  1353. // CHECK:STDOUT: %bound_method.loc24_25.2: <bound method> = bound_method %int_5, %specific_fn.loc24 [concrete = constants.%bound_method.c57]
  1354. // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc24: init %i32 = call %bound_method.loc24_25.2(%int_5) [concrete = constants.%int_5.0f6]
  1355. // CHECK:STDOUT: %.loc24_25.1: %i32 = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc24 [concrete = constants.%int_5.0f6]
  1356. // CHECK:STDOUT: %.loc24_25.2: %i32 = converted %int_5, %.loc24_25.1 [concrete = constants.%int_5.0f6]
  1357. // CHECK:STDOUT: %E.as.J.impl.G.call.loc24: init %i32 = call %bound_method.loc24_18(%e.ref.loc24, %.loc24_25.2)
  1358. // CHECK:STDOUT: %.loc24_11: type = splice_block %i32.loc24 [concrete = constants.%i32] {
  1359. // CHECK:STDOUT: %int_32.loc24: Core.IntLiteral = int_value 32 [concrete = constants.%int_32]
  1360. // CHECK:STDOUT: %i32.loc24: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32]
  1361. // CHECK:STDOUT: }
  1362. // CHECK:STDOUT: %.loc24_26.1: %i32 = value_of_initializer %E.as.J.impl.G.call.loc24
  1363. // CHECK:STDOUT: %.loc24_26.2: %i32 = converted %E.as.J.impl.G.call.loc24, %.loc24_26.1
  1364. // CHECK:STDOUT: %e4: %i32 = value_binding e4, %.loc24_26.2
  1365. // CHECK:STDOUT: name_binding_decl {
  1366. // CHECK:STDOUT: %e5.patt: %pattern_type.7ce = value_binding_pattern e5 [concrete]
  1367. // CHECK:STDOUT: }
  1368. // CHECK:STDOUT: %e.ref.loc25: %E = name_ref e, %e
  1369. // CHECK:STDOUT: %J.ref: type = name_ref J, file.%J.decl [concrete = constants.%J.type]
  1370. // CHECK:STDOUT: %G.ref.loc25: %J.assoc_type = name_ref G, @J.%assoc2 [concrete = constants.%assoc2]
  1371. // CHECK:STDOUT: %impl.elem2.loc25: %.553 = impl_witness_access constants.%J.impl_witness, element2 [concrete = constants.%E.as.J.impl.G]
  1372. // CHECK:STDOUT: %bound_method.loc25_18: <bound method> = bound_method %e.ref.loc25, %impl.elem2.loc25
  1373. // CHECK:STDOUT: %int_6: Core.IntLiteral = int_value 6 [concrete = constants.%int_6.462]
  1374. // CHECK:STDOUT: %impl.elem0.loc25: %.322 = impl_witness_access constants.%ImplicitAs.impl_witness.bc9, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.e9b]
  1375. // CHECK:STDOUT: %bound_method.loc25_25.1: <bound method> = bound_method %int_6, %impl.elem0.loc25 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.a4a]
  1376. // CHECK:STDOUT: %specific_fn.loc25: <specific function> = specific_function %impl.elem0.loc25, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn]
  1377. // CHECK:STDOUT: %bound_method.loc25_25.2: <bound method> = bound_method %int_6, %specific_fn.loc25 [concrete = constants.%bound_method.b96]
  1378. // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc25: init %i32 = call %bound_method.loc25_25.2(%int_6) [concrete = constants.%int_6.e56]
  1379. // CHECK:STDOUT: %.loc25_25.1: %i32 = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc25 [concrete = constants.%int_6.e56]
  1380. // CHECK:STDOUT: %.loc25_25.2: %i32 = converted %int_6, %.loc25_25.1 [concrete = constants.%int_6.e56]
  1381. // CHECK:STDOUT: %E.as.J.impl.G.call.loc25: init %i32 = call %bound_method.loc25_18(%e.ref.loc25, %.loc25_25.2)
  1382. // CHECK:STDOUT: %.loc25_11: type = splice_block %i32.loc25 [concrete = constants.%i32] {
  1383. // CHECK:STDOUT: %int_32.loc25: Core.IntLiteral = int_value 32 [concrete = constants.%int_32]
  1384. // CHECK:STDOUT: %i32.loc25: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32]
  1385. // CHECK:STDOUT: }
  1386. // CHECK:STDOUT: %.loc25_26.1: %i32 = value_of_initializer %E.as.J.impl.G.call.loc25
  1387. // CHECK:STDOUT: %.loc25_26.2: %i32 = converted %E.as.J.impl.G.call.loc25, %.loc25_26.1
  1388. // CHECK:STDOUT: %e5: %i32 = value_binding e5, %.loc25_26.2
  1389. // CHECK:STDOUT: return
  1390. // CHECK:STDOUT: }
  1391. // CHECK:STDOUT:
  1392. // CHECK:STDOUT: generic fn @GenericCallF(%T.loc28_17.2: %J.type) {
  1393. // CHECK:STDOUT: %T.loc28_17.1: %J.type = symbolic_binding T, 0 [symbolic = %T.loc28_17.1 (constants.%T)]
  1394. // CHECK:STDOUT: %T.binding.as_type: type = symbolic_binding_type T, 0, %T.loc28_17.1 [symbolic = %T.binding.as_type (constants.%T.binding.as_type)]
  1395. // CHECK:STDOUT: %pattern_type.loc28_24: type = pattern_type %T.binding.as_type [symbolic = %pattern_type.loc28_24 (constants.%pattern_type.4c421b.2)]
  1396. // CHECK:STDOUT: %J.lookup_impl_witness: <witness> = lookup_impl_witness %T.loc28_17.1, @J [symbolic = %J.lookup_impl_witness (constants.%J.lookup_impl_witness.cd2552.2)]
  1397. // CHECK:STDOUT: %impl.elem0.loc28_34.1: type = impl_witness_access %J.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc28_34.1 (constants.%impl.elem0.fa9e71.2)]
  1398. // CHECK:STDOUT: %pattern_type.loc28_30: type = pattern_type %impl.elem0.loc28_34.1 [symbolic = %pattern_type.loc28_30 (constants.%pattern_type.345548.2)]
  1399. // CHECK:STDOUT:
  1400. // CHECK:STDOUT: !definition:
  1401. // CHECK:STDOUT: %require_complete.loc28_38: <witness> = require_complete_type %impl.elem0.loc28_34.1 [symbolic = %require_complete.loc28_38 (constants.%require_complete.157)]
  1402. // CHECK:STDOUT: %require_complete.loc28_25: <witness> = require_complete_type %T.binding.as_type [symbolic = %require_complete.loc28_25 (constants.%require_complete.d01)]
  1403. // CHECK:STDOUT: %.loc29_11: type = fn_type_with_self_type constants.%J.F.type, %T.loc28_17.1 [symbolic = %.loc29_11 (constants.%.fe6)]
  1404. // CHECK:STDOUT: %impl.elem1.loc29_11.2: @GenericCallF.%.loc29_11 (%.fe6) = impl_witness_access %J.lookup_impl_witness, element1 [symbolic = %impl.elem1.loc29_11.2 (constants.%impl.elem1)]
  1405. // CHECK:STDOUT: %specific_impl_fn.loc29_11.2: <specific function> = specific_impl_function %impl.elem1.loc29_11.2, @J.F(%T.loc28_17.1) [symbolic = %specific_impl_fn.loc29_11.2 (constants.%specific_impl_fn)]
  1406. // CHECK:STDOUT:
  1407. // CHECK:STDOUT: fn(%t.param: @GenericCallF.%T.binding.as_type (%T.binding.as_type), %u.param: @GenericCallF.%impl.elem0.loc28_34.1 (%impl.elem0.fa9e71.2)) -> %return.param: @GenericCallF.%impl.elem0.loc28_34.1 (%impl.elem0.fa9e71.2) {
  1408. // CHECK:STDOUT: !entry:
  1409. // CHECK:STDOUT: %t.ref: @GenericCallF.%T.binding.as_type (%T.binding.as_type) = name_ref t, %t
  1410. // CHECK:STDOUT: %F.ref: %J.assoc_type = name_ref F, @J.%assoc1 [concrete = constants.%assoc1.572]
  1411. // CHECK:STDOUT: %impl.elem1.loc29_11.1: @GenericCallF.%.loc29_11 (%.fe6) = impl_witness_access constants.%J.lookup_impl_witness.cd2552.2, element1 [symbolic = %impl.elem1.loc29_11.2 (constants.%impl.elem1)]
  1412. // CHECK:STDOUT: %u.ref: @GenericCallF.%impl.elem0.loc28_34.1 (%impl.elem0.fa9e71.2) = name_ref u, %u
  1413. // CHECK:STDOUT: %specific_impl_fn.loc29_11.1: <specific function> = specific_impl_function %impl.elem1.loc29_11.1, @J.F(constants.%T) [symbolic = %specific_impl_fn.loc29_11.2 (constants.%specific_impl_fn)]
  1414. // CHECK:STDOUT: %.loc28_38: ref @GenericCallF.%impl.elem0.loc28_34.1 (%impl.elem0.fa9e71.2) = splice_block %return {}
  1415. // CHECK:STDOUT: %.loc29_15: init @GenericCallF.%impl.elem0.loc28_34.1 (%impl.elem0.fa9e71.2) = call %specific_impl_fn.loc29_11.1(%u.ref) to %.loc28_38
  1416. // CHECK:STDOUT: return %.loc29_15 to %return
  1417. // CHECK:STDOUT: }
  1418. // CHECK:STDOUT: }
  1419. // CHECK:STDOUT:
  1420. // CHECK:STDOUT: fn @CallGeneric(%e.param: %E) -> %i32 {
  1421. // CHECK:STDOUT: !entry:
  1422. // CHECK:STDOUT: %GenericCallF.ref: %GenericCallF.type = name_ref GenericCallF, file.%GenericCallF.decl [concrete = constants.%GenericCallF]
  1423. // CHECK:STDOUT: %e.ref: %E = name_ref e, %e
  1424. // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [concrete = constants.%int_2.ecc]
  1425. // CHECK:STDOUT: %J.facet.loc33_27.1: %J.type = facet_value constants.%E, (constants.%J.impl_witness) [concrete = constants.%J.facet]
  1426. // CHECK:STDOUT: %.loc33_27.1: %J.type = converted constants.%E, %J.facet.loc33_27.1 [concrete = constants.%J.facet]
  1427. // CHECK:STDOUT: %J.facet.loc33_27.2: %J.type = facet_value constants.%E, (constants.%J.impl_witness) [concrete = constants.%J.facet]
  1428. // CHECK:STDOUT: %.loc33_27.2: %J.type = converted constants.%E, %J.facet.loc33_27.2 [concrete = constants.%J.facet]
  1429. // CHECK:STDOUT: %GenericCallF.specific_fn: <specific function> = specific_function %GenericCallF.ref, @GenericCallF(constants.%J.facet) [concrete = constants.%GenericCallF.specific_fn]
  1430. // CHECK:STDOUT: %impl.elem0: %.322 = impl_witness_access constants.%ImplicitAs.impl_witness.bc9, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.e9b]
  1431. // CHECK:STDOUT: %bound_method.loc33_26.1: <bound method> = bound_method %int_2, %impl.elem0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.393]
  1432. // CHECK:STDOUT: %specific_fn: <specific function> = specific_function %impl.elem0, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn]
  1433. // CHECK:STDOUT: %bound_method.loc33_26.2: <bound method> = bound_method %int_2, %specific_fn [concrete = constants.%bound_method.9f7]
  1434. // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call: init %i32 = call %bound_method.loc33_26.2(%int_2) [concrete = constants.%int_2.ef8]
  1435. // CHECK:STDOUT: %.loc33_26.1: %i32 = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call [concrete = constants.%int_2.ef8]
  1436. // CHECK:STDOUT: %.loc33_26.2: %i32 = converted %int_2, %.loc33_26.1 [concrete = constants.%int_2.ef8]
  1437. // CHECK:STDOUT: %GenericCallF.call: init %i32 = call %GenericCallF.specific_fn(%e.ref, %.loc33_26.2)
  1438. // CHECK:STDOUT: return %GenericCallF.call to %return
  1439. // CHECK:STDOUT: }
  1440. // CHECK:STDOUT:
  1441. // CHECK:STDOUT: specific @U(constants.%Self.dc6) {}
  1442. // CHECK:STDOUT:
  1443. // CHECK:STDOUT: specific @J.F(constants.%Self.dc6) {
  1444. // CHECK:STDOUT: %Self => constants.%Self.dc6
  1445. // CHECK:STDOUT: %J.lookup_impl_witness => constants.%J.lookup_impl_witness.cd2552.1
  1446. // CHECK:STDOUT: %impl.elem0.loc5_11.1 => constants.%impl.elem0.fa9e71.1
  1447. // CHECK:STDOUT: %pattern_type => constants.%pattern_type.345548.1
  1448. // CHECK:STDOUT: }
  1449. // CHECK:STDOUT:
  1450. // CHECK:STDOUT: specific @J.G(constants.%Self.dc6) {
  1451. // CHECK:STDOUT: %Self => constants.%Self.dc6
  1452. // CHECK:STDOUT: %Self.binding.as_type => constants.%Self.binding.as_type.1fa
  1453. // CHECK:STDOUT: %pattern_type.loc6_8 => constants.%pattern_type.4c421b.1
  1454. // CHECK:STDOUT: %J.lookup_impl_witness => constants.%J.lookup_impl_witness.cd2552.1
  1455. // CHECK:STDOUT: %impl.elem0.loc6_23.1 => constants.%impl.elem0.fa9e71.1
  1456. // CHECK:STDOUT: %pattern_type.loc6_20 => constants.%pattern_type.345548.1
  1457. // CHECK:STDOUT: }
  1458. // CHECK:STDOUT:
  1459. // CHECK:STDOUT: specific @U(constants.%.Self.c58) {}
  1460. // CHECK:STDOUT:
  1461. // CHECK:STDOUT: specific @J.F(constants.%J.facet) {
  1462. // CHECK:STDOUT: %Self => constants.%J.facet
  1463. // CHECK:STDOUT: %J.lookup_impl_witness => constants.%J.impl_witness
  1464. // CHECK:STDOUT: %impl.elem0.loc5_11.1 => constants.%i32
  1465. // CHECK:STDOUT: %pattern_type => constants.%pattern_type.7ce
  1466. // CHECK:STDOUT: }
  1467. // CHECK:STDOUT:
  1468. // CHECK:STDOUT: specific @J.G(constants.%J.facet) {
  1469. // CHECK:STDOUT: %Self => constants.%J.facet
  1470. // CHECK:STDOUT: %Self.binding.as_type => constants.%E
  1471. // CHECK:STDOUT: %pattern_type.loc6_8 => constants.%pattern_type.a4a
  1472. // CHECK:STDOUT: %J.lookup_impl_witness => constants.%J.impl_witness
  1473. // CHECK:STDOUT: %impl.elem0.loc6_23.1 => constants.%i32
  1474. // CHECK:STDOUT: %pattern_type.loc6_20 => constants.%pattern_type.7ce
  1475. // CHECK:STDOUT: }
  1476. // CHECK:STDOUT:
  1477. // CHECK:STDOUT: specific @U(constants.%T) {}
  1478. // CHECK:STDOUT:
  1479. // CHECK:STDOUT: specific @GenericCallF(constants.%T) {
  1480. // CHECK:STDOUT: %T.loc28_17.1 => constants.%T
  1481. // CHECK:STDOUT: %T.binding.as_type => constants.%T.binding.as_type
  1482. // CHECK:STDOUT: %pattern_type.loc28_24 => constants.%pattern_type.4c421b.2
  1483. // CHECK:STDOUT: %J.lookup_impl_witness => constants.%J.lookup_impl_witness.cd2552.2
  1484. // CHECK:STDOUT: %impl.elem0.loc28_34.1 => constants.%impl.elem0.fa9e71.2
  1485. // CHECK:STDOUT: %pattern_type.loc28_30 => constants.%pattern_type.345548.2
  1486. // CHECK:STDOUT: }
  1487. // CHECK:STDOUT:
  1488. // CHECK:STDOUT: specific @J.F(constants.%T) {
  1489. // CHECK:STDOUT: %Self => constants.%T
  1490. // CHECK:STDOUT: %J.lookup_impl_witness => constants.%J.lookup_impl_witness.cd2552.2
  1491. // CHECK:STDOUT: %impl.elem0.loc5_11.1 => constants.%impl.elem0.fa9e71.2
  1492. // CHECK:STDOUT: %pattern_type => constants.%pattern_type.345548.2
  1493. // CHECK:STDOUT: }
  1494. // CHECK:STDOUT:
  1495. // CHECK:STDOUT: specific @GenericCallF(constants.%J.facet) {
  1496. // CHECK:STDOUT: %T.loc28_17.1 => constants.%J.facet
  1497. // CHECK:STDOUT: %T.binding.as_type => constants.%E
  1498. // CHECK:STDOUT: %pattern_type.loc28_24 => constants.%pattern_type.a4a
  1499. // CHECK:STDOUT: %J.lookup_impl_witness => constants.%J.impl_witness
  1500. // CHECK:STDOUT: %impl.elem0.loc28_34.1 => constants.%i32
  1501. // CHECK:STDOUT: %pattern_type.loc28_30 => constants.%pattern_type.7ce
  1502. // CHECK:STDOUT:
  1503. // CHECK:STDOUT: !definition:
  1504. // CHECK:STDOUT: %require_complete.loc28_38 => constants.%complete_type.f8a
  1505. // CHECK:STDOUT: %require_complete.loc28_25 => constants.%complete_type.357
  1506. // CHECK:STDOUT: %.loc29_11 => constants.%.ed8
  1507. // CHECK:STDOUT: %impl.elem1.loc29_11.2 => constants.%E.as.J.impl.F
  1508. // CHECK:STDOUT: %specific_impl_fn.loc29_11.2 => constants.%E.as.J.impl.F
  1509. // CHECK:STDOUT: }
  1510. // CHECK:STDOUT:
  1511. // CHECK:STDOUT: --- use_constraint_on_associated_type.carbon
  1512. // CHECK:STDOUT:
  1513. // CHECK:STDOUT: constants {
  1514. // CHECK:STDOUT: %I.type: type = facet_type <@I> [concrete]
  1515. // CHECK:STDOUT: %Self.9f2: %I.type = symbolic_binding Self, 0 [symbolic]
  1516. // CHECK:STDOUT: %Self.binding.as_type.bcb: type = symbolic_binding_type Self, 0, %Self.9f2 [symbolic]
  1517. // CHECK:STDOUT: %pattern_type.89c: type = pattern_type %Self.binding.as_type.bcb [symbolic]
  1518. // CHECK:STDOUT: %I.Op.type: type = fn_type @I.Op [concrete]
  1519. // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete]
  1520. // CHECK:STDOUT: %I.Op: %I.Op.type = struct_value () [concrete]
  1521. // CHECK:STDOUT: %I.assoc_type: type = assoc_entity_type @I [concrete]
  1522. // CHECK:STDOUT: %assoc0.ea8: %I.assoc_type = assoc_entity element0, @I.%I.Op.decl [concrete]
  1523. // CHECK:STDOUT: %J.type: type = facet_type <@J> [concrete]
  1524. // CHECK:STDOUT: %Self.dc6: %J.type = symbolic_binding Self, 0 [symbolic]
  1525. // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete]
  1526. // CHECK:STDOUT: %BitAndWith.type.f2e: type = generic_interface_type @BitAndWith [concrete]
  1527. // CHECK:STDOUT: %BitAndWith.generic: %BitAndWith.type.f2e = struct_value () [concrete]
  1528. // CHECK:STDOUT: %facet_type: type = facet_type <@I & @Destroy> [concrete]
  1529. // CHECK:STDOUT: %J.assoc_type: type = assoc_entity_type @J [concrete]
  1530. // CHECK:STDOUT: %assoc0.d3b: %J.assoc_type = assoc_entity element0, @J.%U [concrete]
  1531. // CHECK:STDOUT: %J.lookup_impl_witness.cd2552.1: <witness> = lookup_impl_witness %Self.dc6, @J [symbolic]
  1532. // CHECK:STDOUT: %impl.elem0.63dbfc.1: %facet_type = impl_witness_access %J.lookup_impl_witness.cd2552.1, element0 [symbolic]
  1533. // CHECK:STDOUT: %as_type.9e6a88.1: type = facet_access_type %impl.elem0.63dbfc.1 [symbolic]
  1534. // CHECK:STDOUT: %pattern_type.49a6ab.1: type = pattern_type %as_type.9e6a88.1 [symbolic]
  1535. // CHECK:STDOUT: %J.F.type: type = fn_type @J.F [concrete]
  1536. // CHECK:STDOUT: %J.F: %J.F.type = struct_value () [concrete]
  1537. // CHECK:STDOUT: %assoc1: %J.assoc_type = assoc_entity element1, @J.%J.F.decl [concrete]
  1538. // CHECK:STDOUT: %type: type = facet_type <type> [concrete]
  1539. // CHECK:STDOUT: %.Self: %type = symbolic_binding .Self [symbolic_self]
  1540. // CHECK:STDOUT: %T: %J.type = symbolic_binding T, 0 [symbolic]
  1541. // CHECK:STDOUT: %pattern_type.84b: type = pattern_type %J.type [concrete]
  1542. // CHECK:STDOUT: %T.binding.as_type: type = symbolic_binding_type T, 0, %T [symbolic]
  1543. // CHECK:STDOUT: %pattern_type.4c4: type = pattern_type %T.binding.as_type [symbolic]
  1544. // CHECK:STDOUT: %J.lookup_impl_witness.cd2552.2: <witness> = lookup_impl_witness %T, @J [symbolic]
  1545. // CHECK:STDOUT: %impl.elem0.63dbfc.2: %facet_type = impl_witness_access %J.lookup_impl_witness.cd2552.2, element0 [symbolic]
  1546. // CHECK:STDOUT: %as_type.9e6a88.2: type = facet_access_type %impl.elem0.63dbfc.2 [symbolic]
  1547. // CHECK:STDOUT: %pattern_type.49a6ab.2: type = pattern_type %as_type.9e6a88.2 [symbolic]
  1548. // CHECK:STDOUT: %GenericResult.type: type = fn_type @GenericResult [concrete]
  1549. // CHECK:STDOUT: %GenericResult: %GenericResult.type = struct_value () [concrete]
  1550. // CHECK:STDOUT: %require_complete.565: <witness> = require_complete_type %as_type.9e6a88.2 [symbolic]
  1551. // CHECK:STDOUT: %require_complete.d01: <witness> = require_complete_type %T.binding.as_type [symbolic]
  1552. // CHECK:STDOUT: %.fe6: type = fn_type_with_self_type %J.F.type, %T [symbolic]
  1553. // CHECK:STDOUT: %impl.elem1: %.fe6 = impl_witness_access %J.lookup_impl_witness.cd2552.2, element1 [symbolic]
  1554. // CHECK:STDOUT: %specific_impl_fn.2a8: <specific function> = specific_impl_function %impl.elem1, @J.F(%T) [symbolic]
  1555. // CHECK:STDOUT: %I.lookup_impl_witness: <witness> = lookup_impl_witness %impl.elem0.63dbfc.2, @I [symbolic]
  1556. // CHECK:STDOUT: %I.facet: %I.type = facet_value %as_type.9e6a88.2, (%I.lookup_impl_witness) [symbolic]
  1557. // CHECK:STDOUT: %.e95: type = fn_type_with_self_type %I.Op.type, %I.facet [symbolic]
  1558. // CHECK:STDOUT: %impl.elem0.4d2: %.e95 = impl_witness_access %I.lookup_impl_witness, element0 [symbolic]
  1559. // CHECK:STDOUT: %specific_impl_fn.4cf: <specific function> = specific_impl_function %impl.elem0.4d2, @I.Op(%I.facet) [symbolic]
  1560. // CHECK:STDOUT: %Destroy.Op.type: type = fn_type @Destroy.Op [concrete]
  1561. // CHECK:STDOUT: %Destroy.lookup_impl_witness: <witness> = lookup_impl_witness %impl.elem0.63dbfc.2, @Destroy [symbolic]
  1562. // CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %as_type.9e6a88.2, (%Destroy.lookup_impl_witness) [symbolic]
  1563. // CHECK:STDOUT: %.42c: type = fn_type_with_self_type %Destroy.Op.type, %Destroy.facet [symbolic]
  1564. // CHECK:STDOUT: %impl.elem0.6c4: %.42c = impl_witness_access %Destroy.lookup_impl_witness, element0 [symbolic]
  1565. // CHECK:STDOUT: %specific_impl_fn.6c6: <specific function> = specific_impl_function %impl.elem0.6c4, @Destroy.Op(%Destroy.facet) [symbolic]
  1566. // CHECK:STDOUT: }
  1567. // CHECK:STDOUT:
  1568. // CHECK:STDOUT: imports {
  1569. // CHECK:STDOUT: %Core: <namespace> = namespace file.%Core.import, [concrete] {
  1570. // CHECK:STDOUT: .Destroy = %Core.Destroy
  1571. // CHECK:STDOUT: .BitAndWith = %Core.BitAndWith
  1572. // CHECK:STDOUT: import Core//prelude
  1573. // CHECK:STDOUT: import Core//prelude/...
  1574. // CHECK:STDOUT: }
  1575. // CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type]
  1576. // CHECK:STDOUT: %Core.BitAndWith: %BitAndWith.type.f2e = import_ref Core//prelude/parts/as, BitAndWith, loaded [concrete = constants.%BitAndWith.generic]
  1577. // CHECK:STDOUT: }
  1578. // CHECK:STDOUT:
  1579. // CHECK:STDOUT: file {
  1580. // CHECK:STDOUT: package: <namespace> = namespace [concrete] {
  1581. // CHECK:STDOUT: .Core = imports.%Core
  1582. // CHECK:STDOUT: .I = %I.decl
  1583. // CHECK:STDOUT: .J = %J.decl
  1584. // CHECK:STDOUT: .GenericResult = %GenericResult.decl
  1585. // CHECK:STDOUT: }
  1586. // CHECK:STDOUT: %Core.import = import Core
  1587. // CHECK:STDOUT: %I.decl: type = interface_decl @I [concrete = constants.%I.type] {} {}
  1588. // CHECK:STDOUT: %J.decl: type = interface_decl @J [concrete = constants.%J.type] {} {}
  1589. // CHECK:STDOUT: %GenericResult.decl: %GenericResult.type = fn_decl @GenericResult [concrete = constants.%GenericResult] {
  1590. // CHECK:STDOUT: %T.patt: %pattern_type.84b = symbolic_binding_pattern T, 0 [concrete]
  1591. // CHECK:STDOUT: %t.patt: @GenericResult.%pattern_type.loc12_25 (%pattern_type.4c4) = value_binding_pattern t [concrete]
  1592. // CHECK:STDOUT: %t.param_patt: @GenericResult.%pattern_type.loc12_25 (%pattern_type.4c4) = value_param_pattern %t.patt, call_param0 [concrete]
  1593. // CHECK:STDOUT: %u.patt: @GenericResult.%pattern_type.loc12_31 (%pattern_type.49a6ab.2) = value_binding_pattern u [concrete]
  1594. // CHECK:STDOUT: %u.param_patt: @GenericResult.%pattern_type.loc12_31 (%pattern_type.49a6ab.2) = value_param_pattern %u.patt, call_param1 [concrete]
  1595. // CHECK:STDOUT: %return.patt: @GenericResult.%pattern_type.loc12_31 (%pattern_type.49a6ab.2) = return_slot_pattern [concrete]
  1596. // CHECK:STDOUT: %return.param_patt: @GenericResult.%pattern_type.loc12_31 (%pattern_type.49a6ab.2) = out_param_pattern %return.patt, call_param2 [concrete]
  1597. // CHECK:STDOUT: } {
  1598. // CHECK:STDOUT: %T.ref.loc12_42: %J.type = name_ref T, %T.loc12_18.2 [symbolic = %T.loc12_18.1 (constants.%T)]
  1599. // CHECK:STDOUT: %U.ref.loc12_43: %J.assoc_type = name_ref U, @U.%assoc0 [concrete = constants.%assoc0.d3b]
  1600. // CHECK:STDOUT: %T.as_type.loc12_43: type = facet_access_type %T.ref.loc12_42 [symbolic = %T.binding.as_type (constants.%T.binding.as_type)]
  1601. // CHECK:STDOUT: %.loc12_43.1: type = converted %T.ref.loc12_42, %T.as_type.loc12_43 [symbolic = %T.binding.as_type (constants.%T.binding.as_type)]
  1602. // CHECK:STDOUT: %impl.elem0.loc12_43: %facet_type = impl_witness_access constants.%J.lookup_impl_witness.cd2552.2, element0 [symbolic = %impl.elem0.loc12_35.1 (constants.%impl.elem0.63dbfc.2)]
  1603. // CHECK:STDOUT: %as_type.loc12_43: type = facet_access_type %impl.elem0.loc12_43 [symbolic = %as_type.loc12_35.1 (constants.%as_type.9e6a88.2)]
  1604. // CHECK:STDOUT: %.loc12_43.2: type = converted %impl.elem0.loc12_43, %as_type.loc12_43 [symbolic = %as_type.loc12_35.1 (constants.%as_type.9e6a88.2)]
  1605. // CHECK:STDOUT: %.loc12_22: type = splice_block %J.ref [concrete = constants.%J.type] {
  1606. // CHECK:STDOUT: %.Self: %type = symbolic_binding .Self [symbolic_self = constants.%.Self]
  1607. // CHECK:STDOUT: %J.ref: type = name_ref J, file.%J.decl [concrete = constants.%J.type]
  1608. // CHECK:STDOUT: }
  1609. // CHECK:STDOUT: %T.loc12_18.2: %J.type = symbolic_binding T, 0 [symbolic = %T.loc12_18.1 (constants.%T)]
  1610. // CHECK:STDOUT: %t.param: @GenericResult.%T.binding.as_type (%T.binding.as_type) = value_param call_param0
  1611. // CHECK:STDOUT: %.loc12_28.1: type = splice_block %.loc12_28.2 [symbolic = %T.binding.as_type (constants.%T.binding.as_type)] {
  1612. // CHECK:STDOUT: %T.ref.loc12_28: %J.type = name_ref T, %T.loc12_18.2 [symbolic = %T.loc12_18.1 (constants.%T)]
  1613. // CHECK:STDOUT: %T.as_type.loc12_28: type = facet_access_type %T.ref.loc12_28 [symbolic = %T.binding.as_type (constants.%T.binding.as_type)]
  1614. // CHECK:STDOUT: %.loc12_28.2: type = converted %T.ref.loc12_28, %T.as_type.loc12_28 [symbolic = %T.binding.as_type (constants.%T.binding.as_type)]
  1615. // CHECK:STDOUT: }
  1616. // CHECK:STDOUT: %t: @GenericResult.%T.binding.as_type (%T.binding.as_type) = value_binding t, %t.param
  1617. // CHECK:STDOUT: %u.param: @GenericResult.%as_type.loc12_35.1 (%as_type.9e6a88.2) = value_param call_param1
  1618. // CHECK:STDOUT: %.loc12_35.1: type = splice_block %.loc12_35.3 [symbolic = %as_type.loc12_35.1 (constants.%as_type.9e6a88.2)] {
  1619. // CHECK:STDOUT: %T.ref.loc12_34: %J.type = name_ref T, %T.loc12_18.2 [symbolic = %T.loc12_18.1 (constants.%T)]
  1620. // CHECK:STDOUT: %U.ref.loc12_35: %J.assoc_type = name_ref U, @U.%assoc0 [concrete = constants.%assoc0.d3b]
  1621. // CHECK:STDOUT: %T.as_type.loc12_35: type = facet_access_type %T.ref.loc12_34 [symbolic = %T.binding.as_type (constants.%T.binding.as_type)]
  1622. // CHECK:STDOUT: %.loc12_35.2: type = converted %T.ref.loc12_34, %T.as_type.loc12_35 [symbolic = %T.binding.as_type (constants.%T.binding.as_type)]
  1623. // CHECK:STDOUT: %impl.elem0.loc12_35.2: %facet_type = impl_witness_access constants.%J.lookup_impl_witness.cd2552.2, element0 [symbolic = %impl.elem0.loc12_35.1 (constants.%impl.elem0.63dbfc.2)]
  1624. // CHECK:STDOUT: %as_type.loc12_35.2: type = facet_access_type %impl.elem0.loc12_35.2 [symbolic = %as_type.loc12_35.1 (constants.%as_type.9e6a88.2)]
  1625. // CHECK:STDOUT: %.loc12_35.3: type = converted %impl.elem0.loc12_35.2, %as_type.loc12_35.2 [symbolic = %as_type.loc12_35.1 (constants.%as_type.9e6a88.2)]
  1626. // CHECK:STDOUT: }
  1627. // CHECK:STDOUT: %u: @GenericResult.%as_type.loc12_35.1 (%as_type.9e6a88.2) = value_binding u, %u.param
  1628. // CHECK:STDOUT: %return.param: ref @GenericResult.%as_type.loc12_35.1 (%as_type.9e6a88.2) = out_param call_param2
  1629. // CHECK:STDOUT: %return: ref @GenericResult.%as_type.loc12_35.1 (%as_type.9e6a88.2) = return_slot %return.param
  1630. // CHECK:STDOUT: }
  1631. // CHECK:STDOUT: }
  1632. // CHECK:STDOUT:
  1633. // CHECK:STDOUT: interface @I {
  1634. // CHECK:STDOUT: %Self: %I.type = symbolic_binding Self, 0 [symbolic = constants.%Self.9f2]
  1635. // CHECK:STDOUT: %I.Op.decl: %I.Op.type = fn_decl @I.Op [concrete = constants.%I.Op] {
  1636. // CHECK:STDOUT: %self.patt: @I.Op.%pattern_type (%pattern_type.89c) = value_binding_pattern self [concrete]
  1637. // CHECK:STDOUT: %self.param_patt: @I.Op.%pattern_type (%pattern_type.89c) = value_param_pattern %self.patt, call_param0 [concrete]
  1638. // CHECK:STDOUT: %b.patt: @I.Op.%pattern_type (%pattern_type.89c) = value_binding_pattern b [concrete]
  1639. // CHECK:STDOUT: %b.param_patt: @I.Op.%pattern_type (%pattern_type.89c) = value_param_pattern %b.patt, call_param1 [concrete]
  1640. // CHECK:STDOUT: %return.patt: @I.Op.%pattern_type (%pattern_type.89c) = return_slot_pattern [concrete]
  1641. // CHECK:STDOUT: %return.param_patt: @I.Op.%pattern_type (%pattern_type.89c) = out_param_pattern %return.patt, call_param2 [concrete]
  1642. // CHECK:STDOUT: } {
  1643. // CHECK:STDOUT: %Self.ref.loc4_33: %I.type = name_ref Self, @I.%Self [symbolic = %Self (constants.%Self.9f2)]
  1644. // CHECK:STDOUT: %Self.as_type.loc4_33: type = facet_access_type %Self.ref.loc4_33 [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type.bcb)]
  1645. // CHECK:STDOUT: %.loc4_33: type = converted %Self.ref.loc4_33, %Self.as_type.loc4_33 [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type.bcb)]
  1646. // CHECK:STDOUT: %self.param: @I.Op.%Self.binding.as_type (%Self.binding.as_type.bcb) = value_param call_param0
  1647. // CHECK:STDOUT: %.loc4_15.1: type = splice_block %.loc4_15.2 [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type.bcb)] {
  1648. // CHECK:STDOUT: %Self.ref.loc4_15: %I.type = name_ref Self, @I.%Self [symbolic = %Self (constants.%Self.9f2)]
  1649. // CHECK:STDOUT: %Self.as_type.loc4_15: type = facet_access_type %Self.ref.loc4_15 [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type.bcb)]
  1650. // CHECK:STDOUT: %.loc4_15.2: type = converted %Self.ref.loc4_15, %Self.as_type.loc4_15 [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type.bcb)]
  1651. // CHECK:STDOUT: }
  1652. // CHECK:STDOUT: %self: @I.Op.%Self.binding.as_type (%Self.binding.as_type.bcb) = value_binding self, %self.param
  1653. // CHECK:STDOUT: %b.param: @I.Op.%Self.binding.as_type (%Self.binding.as_type.bcb) = value_param call_param1
  1654. // CHECK:STDOUT: %.loc4_24.1: type = splice_block %.loc4_24.2 [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type.bcb)] {
  1655. // CHECK:STDOUT: %Self.ref.loc4_24: %I.type = name_ref Self, @I.%Self [symbolic = %Self (constants.%Self.9f2)]
  1656. // CHECK:STDOUT: %Self.as_type.loc4_24: type = facet_access_type %Self.ref.loc4_24 [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type.bcb)]
  1657. // CHECK:STDOUT: %.loc4_24.2: type = converted %Self.ref.loc4_24, %Self.as_type.loc4_24 [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type.bcb)]
  1658. // CHECK:STDOUT: }
  1659. // CHECK:STDOUT: %b: @I.Op.%Self.binding.as_type (%Self.binding.as_type.bcb) = value_binding b, %b.param
  1660. // CHECK:STDOUT: %return.param: ref @I.Op.%Self.binding.as_type (%Self.binding.as_type.bcb) = out_param call_param2
  1661. // CHECK:STDOUT: %return: ref @I.Op.%Self.binding.as_type (%Self.binding.as_type.bcb) = return_slot %return.param
  1662. // CHECK:STDOUT: }
  1663. // CHECK:STDOUT: %assoc0: %I.assoc_type = assoc_entity element0, %I.Op.decl [concrete = constants.%assoc0.ea8]
  1664. // CHECK:STDOUT:
  1665. // CHECK:STDOUT: !members:
  1666. // CHECK:STDOUT: .Self = %Self
  1667. // CHECK:STDOUT: .Op = %assoc0
  1668. // CHECK:STDOUT: witness = (%I.Op.decl)
  1669. // CHECK:STDOUT:
  1670. // CHECK:STDOUT: !requires:
  1671. // CHECK:STDOUT: }
  1672. // CHECK:STDOUT:
  1673. // CHECK:STDOUT: interface @J {
  1674. // CHECK:STDOUT: %Self: %J.type = symbolic_binding Self, 0 [symbolic = constants.%Self.dc6]
  1675. // CHECK:STDOUT: %U: %facet_type = assoc_const_decl @U [concrete] {
  1676. // CHECK:STDOUT: %assoc0: %J.assoc_type = assoc_entity element0, @J.%U [concrete = constants.%assoc0.d3b]
  1677. // CHECK:STDOUT: }
  1678. // CHECK:STDOUT: %J.F.decl: %J.F.type = fn_decl @J.F [concrete = constants.%J.F] {
  1679. // CHECK:STDOUT: %u.patt: @J.F.%pattern_type (%pattern_type.49a6ab.1) = value_binding_pattern u [concrete]
  1680. // CHECK:STDOUT: %u.param_patt: @J.F.%pattern_type (%pattern_type.49a6ab.1) = value_param_pattern %u.patt, call_param0 [concrete]
  1681. // CHECK:STDOUT: %return.patt: @J.F.%pattern_type (%pattern_type.49a6ab.1) = return_slot_pattern [concrete]
  1682. // CHECK:STDOUT: %return.param_patt: @J.F.%pattern_type (%pattern_type.49a6ab.1) = out_param_pattern %return.patt, call_param1 [concrete]
  1683. // CHECK:STDOUT: } {
  1684. // CHECK:STDOUT: %impl.elem0.loc9_17: %facet_type = impl_witness_access constants.%J.lookup_impl_witness.cd2552.1, element0 [symbolic = %impl.elem0.loc9_11.1 (constants.%impl.elem0.63dbfc.1)]
  1685. // CHECK:STDOUT: %U.ref.loc9_17: %facet_type = name_ref U, %impl.elem0.loc9_17 [symbolic = %impl.elem0.loc9_11.1 (constants.%impl.elem0.63dbfc.1)]
  1686. // CHECK:STDOUT: %U.as_type.loc9_17: type = facet_access_type %U.ref.loc9_17 [symbolic = %as_type (constants.%as_type.9e6a88.1)]
  1687. // CHECK:STDOUT: %.loc9_17: type = converted %U.ref.loc9_17, %U.as_type.loc9_17 [symbolic = %as_type (constants.%as_type.9e6a88.1)]
  1688. // CHECK:STDOUT: %u.param: @J.F.%as_type (%as_type.9e6a88.1) = value_param call_param0
  1689. // CHECK:STDOUT: %.loc9_11.1: type = splice_block %.loc9_11.2 [symbolic = %as_type (constants.%as_type.9e6a88.1)] {
  1690. // CHECK:STDOUT: %impl.elem0.loc9_11.2: %facet_type = impl_witness_access constants.%J.lookup_impl_witness.cd2552.1, element0 [symbolic = %impl.elem0.loc9_11.1 (constants.%impl.elem0.63dbfc.1)]
  1691. // CHECK:STDOUT: %U.ref.loc9_11: %facet_type = name_ref U, %impl.elem0.loc9_11.2 [symbolic = %impl.elem0.loc9_11.1 (constants.%impl.elem0.63dbfc.1)]
  1692. // CHECK:STDOUT: %U.as_type.loc9_11: type = facet_access_type %U.ref.loc9_11 [symbolic = %as_type (constants.%as_type.9e6a88.1)]
  1693. // CHECK:STDOUT: %.loc9_11.2: type = converted %U.ref.loc9_11, %U.as_type.loc9_11 [symbolic = %as_type (constants.%as_type.9e6a88.1)]
  1694. // CHECK:STDOUT: }
  1695. // CHECK:STDOUT: %u: @J.F.%as_type (%as_type.9e6a88.1) = value_binding u, %u.param
  1696. // CHECK:STDOUT: %return.param: ref @J.F.%as_type (%as_type.9e6a88.1) = out_param call_param1
  1697. // CHECK:STDOUT: %return: ref @J.F.%as_type (%as_type.9e6a88.1) = return_slot %return.param
  1698. // CHECK:STDOUT: }
  1699. // CHECK:STDOUT: %assoc1: %J.assoc_type = assoc_entity element1, %J.F.decl [concrete = constants.%assoc1]
  1700. // CHECK:STDOUT:
  1701. // CHECK:STDOUT: !members:
  1702. // CHECK:STDOUT: .Self = %Self
  1703. // CHECK:STDOUT: .I = <poisoned>
  1704. // CHECK:STDOUT: .U = @U.%assoc0
  1705. // CHECK:STDOUT: .F = %assoc1
  1706. // CHECK:STDOUT: witness = (%U, %J.F.decl)
  1707. // CHECK:STDOUT:
  1708. // CHECK:STDOUT: !requires:
  1709. // CHECK:STDOUT: }
  1710. // CHECK:STDOUT:
  1711. // CHECK:STDOUT: generic assoc_const @U(@J.%Self: %J.type) {
  1712. // CHECK:STDOUT: assoc_const U:! %facet_type;
  1713. // CHECK:STDOUT: }
  1714. // CHECK:STDOUT:
  1715. // CHECK:STDOUT: generic fn @I.Op(@I.%Self: %I.type) {
  1716. // CHECK:STDOUT: %Self: %I.type = symbolic_binding Self, 0 [symbolic = %Self (constants.%Self.9f2)]
  1717. // CHECK:STDOUT: %Self.binding.as_type: type = symbolic_binding_type Self, 0, %Self [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type.bcb)]
  1718. // CHECK:STDOUT: %pattern_type: type = pattern_type %Self.binding.as_type [symbolic = %pattern_type (constants.%pattern_type.89c)]
  1719. // CHECK:STDOUT:
  1720. // CHECK:STDOUT: fn(%self.param: @I.Op.%Self.binding.as_type (%Self.binding.as_type.bcb), %b.param: @I.Op.%Self.binding.as_type (%Self.binding.as_type.bcb)) -> @I.Op.%Self.binding.as_type (%Self.binding.as_type.bcb);
  1721. // CHECK:STDOUT: }
  1722. // CHECK:STDOUT:
  1723. // CHECK:STDOUT: generic fn @J.F(@J.%Self: %J.type) {
  1724. // CHECK:STDOUT: %Self: %J.type = symbolic_binding Self, 0 [symbolic = %Self (constants.%Self.dc6)]
  1725. // CHECK:STDOUT: %J.lookup_impl_witness: <witness> = lookup_impl_witness %Self, @J [symbolic = %J.lookup_impl_witness (constants.%J.lookup_impl_witness.cd2552.1)]
  1726. // CHECK:STDOUT: %impl.elem0.loc9_11.1: %facet_type = impl_witness_access %J.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc9_11.1 (constants.%impl.elem0.63dbfc.1)]
  1727. // CHECK:STDOUT: %as_type: type = facet_access_type %impl.elem0.loc9_11.1 [symbolic = %as_type (constants.%as_type.9e6a88.1)]
  1728. // CHECK:STDOUT: %pattern_type: type = pattern_type %as_type [symbolic = %pattern_type (constants.%pattern_type.49a6ab.1)]
  1729. // CHECK:STDOUT:
  1730. // CHECK:STDOUT: fn(%u.param: @J.F.%as_type (%as_type.9e6a88.1)) -> @J.F.%as_type (%as_type.9e6a88.1);
  1731. // CHECK:STDOUT: }
  1732. // CHECK:STDOUT:
  1733. // CHECK:STDOUT: generic fn @GenericResult(%T.loc12_18.2: %J.type) {
  1734. // CHECK:STDOUT: %T.loc12_18.1: %J.type = symbolic_binding T, 0 [symbolic = %T.loc12_18.1 (constants.%T)]
  1735. // CHECK:STDOUT: %T.binding.as_type: type = symbolic_binding_type T, 0, %T.loc12_18.1 [symbolic = %T.binding.as_type (constants.%T.binding.as_type)]
  1736. // CHECK:STDOUT: %pattern_type.loc12_25: type = pattern_type %T.binding.as_type [symbolic = %pattern_type.loc12_25 (constants.%pattern_type.4c4)]
  1737. // CHECK:STDOUT: %J.lookup_impl_witness: <witness> = lookup_impl_witness %T.loc12_18.1, @J [symbolic = %J.lookup_impl_witness (constants.%J.lookup_impl_witness.cd2552.2)]
  1738. // CHECK:STDOUT: %impl.elem0.loc12_35.1: %facet_type = impl_witness_access %J.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc12_35.1 (constants.%impl.elem0.63dbfc.2)]
  1739. // CHECK:STDOUT: %as_type.loc12_35.1: type = facet_access_type %impl.elem0.loc12_35.1 [symbolic = %as_type.loc12_35.1 (constants.%as_type.9e6a88.2)]
  1740. // CHECK:STDOUT: %pattern_type.loc12_31: type = pattern_type %as_type.loc12_35.1 [symbolic = %pattern_type.loc12_31 (constants.%pattern_type.49a6ab.2)]
  1741. // CHECK:STDOUT:
  1742. // CHECK:STDOUT: !definition:
  1743. // CHECK:STDOUT: %require_complete.loc12_39: <witness> = require_complete_type %as_type.loc12_35.1 [symbolic = %require_complete.loc12_39 (constants.%require_complete.565)]
  1744. // CHECK:STDOUT: %require_complete.loc12_26: <witness> = require_complete_type %T.binding.as_type [symbolic = %require_complete.loc12_26 (constants.%require_complete.d01)]
  1745. // CHECK:STDOUT: %.loc13_11: type = fn_type_with_self_type constants.%J.F.type, %T.loc12_18.1 [symbolic = %.loc13_11 (constants.%.fe6)]
  1746. // CHECK:STDOUT: %impl.elem1.loc13_11.2: @GenericResult.%.loc13_11 (%.fe6) = impl_witness_access %J.lookup_impl_witness, element1 [symbolic = %impl.elem1.loc13_11.2 (constants.%impl.elem1)]
  1747. // CHECK:STDOUT: %specific_impl_fn.loc13_11.2: <specific function> = specific_impl_function %impl.elem1.loc13_11.2, @J.F(%T.loc12_18.1) [symbolic = %specific_impl_fn.loc13_11.2 (constants.%specific_impl_fn.2a8)]
  1748. // CHECK:STDOUT: %I.lookup_impl_witness: <witness> = lookup_impl_witness %impl.elem0.loc12_35.1, @I [symbolic = %I.lookup_impl_witness (constants.%I.lookup_impl_witness)]
  1749. // CHECK:STDOUT: %I.facet.loc13_16: %I.type = facet_value %as_type.loc12_35.1, (%I.lookup_impl_witness) [symbolic = %I.facet.loc13_16 (constants.%I.facet)]
  1750. // CHECK:STDOUT: %.loc13_16: type = fn_type_with_self_type constants.%I.Op.type, %I.facet.loc13_16 [symbolic = %.loc13_16 (constants.%.e95)]
  1751. // CHECK:STDOUT: %impl.elem0.loc13_16.2: @GenericResult.%.loc13_16 (%.e95) = impl_witness_access %I.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc13_16.2 (constants.%impl.elem0.4d2)]
  1752. // CHECK:STDOUT: %specific_impl_fn.loc13_16.2: <specific function> = specific_impl_function %impl.elem0.loc13_16.2, @I.Op(%I.facet.loc13_16) [symbolic = %specific_impl_fn.loc13_16.2 (constants.%specific_impl_fn.4cf)]
  1753. // CHECK:STDOUT: %Destroy.lookup_impl_witness: <witness> = lookup_impl_witness %impl.elem0.loc12_35.1, @Destroy [symbolic = %Destroy.lookup_impl_witness (constants.%Destroy.lookup_impl_witness)]
  1754. // CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %as_type.loc12_35.1, (%Destroy.lookup_impl_witness) [symbolic = %Destroy.facet (constants.%Destroy.facet)]
  1755. // CHECK:STDOUT: %.loc13_29.8: type = fn_type_with_self_type constants.%Destroy.Op.type, %Destroy.facet [symbolic = %.loc13_29.8 (constants.%.42c)]
  1756. // CHECK:STDOUT: %impl.elem0.loc13_29.2: @GenericResult.%.loc13_29.8 (%.42c) = impl_witness_access %Destroy.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc13_29.2 (constants.%impl.elem0.6c4)]
  1757. // CHECK:STDOUT: %specific_impl_fn.loc13_29.2: <specific function> = specific_impl_function %impl.elem0.loc13_29.2, @Destroy.Op(%Destroy.facet) [symbolic = %specific_impl_fn.loc13_29.2 (constants.%specific_impl_fn.6c6)]
  1758. // CHECK:STDOUT:
  1759. // CHECK:STDOUT: fn(%t.param: @GenericResult.%T.binding.as_type (%T.binding.as_type), %u.param: @GenericResult.%as_type.loc12_35.1 (%as_type.9e6a88.2)) -> %return.param: @GenericResult.%as_type.loc12_35.1 (%as_type.9e6a88.2) {
  1760. // CHECK:STDOUT: !entry:
  1761. // CHECK:STDOUT: %t.ref: @GenericResult.%T.binding.as_type (%T.binding.as_type) = name_ref t, %t
  1762. // CHECK:STDOUT: %F.ref.loc13_11: %J.assoc_type = name_ref F, @J.%assoc1 [concrete = constants.%assoc1]
  1763. // CHECK:STDOUT: %impl.elem1.loc13_11.1: @GenericResult.%.loc13_11 (%.fe6) = impl_witness_access constants.%J.lookup_impl_witness.cd2552.2, element1 [symbolic = %impl.elem1.loc13_11.2 (constants.%impl.elem1)]
  1764. // CHECK:STDOUT: %u.ref.loc13_14: @GenericResult.%as_type.loc12_35.1 (%as_type.9e6a88.2) = name_ref u, %u
  1765. // CHECK:STDOUT: %.loc13_15.1: %facet_type = converted constants.%as_type.9e6a88.2, constants.%impl.elem0.63dbfc.2 [symbolic = %impl.elem0.loc12_35.1 (constants.%impl.elem0.63dbfc.2)]
  1766. // CHECK:STDOUT: %.loc13_15.2: %facet_type = converted constants.%as_type.9e6a88.2, constants.%impl.elem0.63dbfc.2 [symbolic = %impl.elem0.loc12_35.1 (constants.%impl.elem0.63dbfc.2)]
  1767. // CHECK:STDOUT: %specific_impl_fn.loc13_11.1: <specific function> = specific_impl_function %impl.elem1.loc13_11.1, @J.F(constants.%T) [symbolic = %specific_impl_fn.loc13_11.2 (constants.%specific_impl_fn.2a8)]
  1768. // CHECK:STDOUT: %.loc13_15.3: ref @GenericResult.%as_type.loc12_35.1 (%as_type.9e6a88.2) = temporary_storage
  1769. // CHECK:STDOUT: %.loc13_15.4: init @GenericResult.%as_type.loc12_35.1 (%as_type.9e6a88.2) = call %specific_impl_fn.loc13_11.1(%u.ref.loc13_14) to %.loc13_15.3
  1770. // CHECK:STDOUT: %I.ref: type = name_ref I, file.%I.decl [concrete = constants.%I.type]
  1771. // CHECK:STDOUT: %Op.ref: %I.assoc_type = name_ref Op, @I.%assoc0 [concrete = constants.%assoc0.ea8]
  1772. // CHECK:STDOUT: %impl.elem0.loc13_16.1: @GenericResult.%.loc13_16 (%.e95) = impl_witness_access constants.%I.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc13_16.2 (constants.%impl.elem0.4d2)]
  1773. // CHECK:STDOUT: %bound_method.loc13_16: <bound method> = bound_method %.loc13_15.4, %impl.elem0.loc13_16.1
  1774. // CHECK:STDOUT: %T.ref.loc13: %J.type = name_ref T, %T.loc12_18.2 [symbolic = %T.loc12_18.1 (constants.%T)]
  1775. // CHECK:STDOUT: %F.ref.loc13_25: %J.assoc_type = name_ref F, @J.%assoc1 [concrete = constants.%assoc1]
  1776. // CHECK:STDOUT: %T.as_type.loc13: type = facet_access_type %T.ref.loc13 [symbolic = %T.binding.as_type (constants.%T.binding.as_type)]
  1777. // CHECK:STDOUT: %.loc13_25: type = converted %T.ref.loc13, %T.as_type.loc13 [symbolic = %T.binding.as_type (constants.%T.binding.as_type)]
  1778. // CHECK:STDOUT: %impl.elem1.loc13_25: @GenericResult.%.loc13_11 (%.fe6) = impl_witness_access constants.%J.lookup_impl_witness.cd2552.2, element1 [symbolic = %impl.elem1.loc13_11.2 (constants.%impl.elem1)]
  1779. // CHECK:STDOUT: %u.ref.loc13_28: @GenericResult.%as_type.loc12_35.1 (%as_type.9e6a88.2) = name_ref u, %u
  1780. // CHECK:STDOUT: %.loc13_29.1: %facet_type = converted constants.%as_type.9e6a88.2, constants.%impl.elem0.63dbfc.2 [symbolic = %impl.elem0.loc12_35.1 (constants.%impl.elem0.63dbfc.2)]
  1781. // CHECK:STDOUT: %.loc13_29.2: %facet_type = converted constants.%as_type.9e6a88.2, constants.%impl.elem0.63dbfc.2 [symbolic = %impl.elem0.loc12_35.1 (constants.%impl.elem0.63dbfc.2)]
  1782. // CHECK:STDOUT: %specific_impl_fn.loc13_25: <specific function> = specific_impl_function %impl.elem1.loc13_25, @J.F(constants.%T) [symbolic = %specific_impl_fn.loc13_11.2 (constants.%specific_impl_fn.2a8)]
  1783. // CHECK:STDOUT: %.loc13_29.3: ref @GenericResult.%as_type.loc12_35.1 (%as_type.9e6a88.2) = temporary_storage
  1784. // CHECK:STDOUT: %.loc13_29.4: init @GenericResult.%as_type.loc12_35.1 (%as_type.9e6a88.2) = call %specific_impl_fn.loc13_25(%u.ref.loc13_28) to %.loc13_29.3
  1785. // CHECK:STDOUT: %I.facet.loc13_30.1: %I.type = facet_value constants.%as_type.9e6a88.2, (constants.%I.lookup_impl_witness) [symbolic = %I.facet.loc13_16 (constants.%I.facet)]
  1786. // CHECK:STDOUT: %.loc13_30.1: %I.type = converted constants.%as_type.9e6a88.2, %I.facet.loc13_30.1 [symbolic = %I.facet.loc13_16 (constants.%I.facet)]
  1787. // CHECK:STDOUT: %I.facet.loc13_30.2: %I.type = facet_value constants.%as_type.9e6a88.2, (constants.%I.lookup_impl_witness) [symbolic = %I.facet.loc13_16 (constants.%I.facet)]
  1788. // CHECK:STDOUT: %.loc13_30.2: %I.type = converted constants.%as_type.9e6a88.2, %I.facet.loc13_30.2 [symbolic = %I.facet.loc13_16 (constants.%I.facet)]
  1789. // CHECK:STDOUT: %specific_impl_fn.loc13_16.1: <specific function> = specific_impl_function %impl.elem0.loc13_16.1, @I.Op(constants.%I.facet) [symbolic = %specific_impl_fn.loc13_16.2 (constants.%specific_impl_fn.4cf)]
  1790. // CHECK:STDOUT: %bound_method.loc13_30: <bound method> = bound_method %.loc13_15.4, %specific_impl_fn.loc13_16.1
  1791. // CHECK:STDOUT: %.loc12_39: ref @GenericResult.%as_type.loc12_35.1 (%as_type.9e6a88.2) = splice_block %return {}
  1792. // CHECK:STDOUT: %.loc13_15.5: ref @GenericResult.%as_type.loc12_35.1 (%as_type.9e6a88.2) = temporary %.loc13_15.3, %.loc13_15.4
  1793. // CHECK:STDOUT: %.loc13_15.6: @GenericResult.%as_type.loc12_35.1 (%as_type.9e6a88.2) = acquire_value %.loc13_15.5
  1794. // CHECK:STDOUT: %.loc13_29.5: ref @GenericResult.%as_type.loc12_35.1 (%as_type.9e6a88.2) = temporary %.loc13_29.3, %.loc13_29.4
  1795. // CHECK:STDOUT: %.loc13_29.6: @GenericResult.%as_type.loc12_35.1 (%as_type.9e6a88.2) = acquire_value %.loc13_29.5
  1796. // CHECK:STDOUT: %.loc13_30.3: init @GenericResult.%as_type.loc12_35.1 (%as_type.9e6a88.2) = call %bound_method.loc13_30(%.loc13_15.6, %.loc13_29.6) to %.loc12_39
  1797. // CHECK:STDOUT: %impl.elem0.loc13_29.1: @GenericResult.%.loc13_29.8 (%.42c) = impl_witness_access constants.%Destroy.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc13_29.2 (constants.%impl.elem0.6c4)]
  1798. // CHECK:STDOUT: %bound_method.loc13_29.1: <bound method> = bound_method %.loc13_29.5, %impl.elem0.loc13_29.1
  1799. // CHECK:STDOUT: %specific_impl_fn.loc13_29.1: <specific function> = specific_impl_function %impl.elem0.loc13_29.1, @Destroy.Op(constants.%Destroy.facet) [symbolic = %specific_impl_fn.loc13_29.2 (constants.%specific_impl_fn.6c6)]
  1800. // CHECK:STDOUT: %bound_method.loc13_29.2: <bound method> = bound_method %.loc13_29.5, %specific_impl_fn.loc13_29.1
  1801. // CHECK:STDOUT: %.loc13_29.7: init %empty_tuple.type = call %bound_method.loc13_29.2(%.loc13_29.5)
  1802. // CHECK:STDOUT: %impl.elem0.loc13_15: @GenericResult.%.loc13_29.8 (%.42c) = impl_witness_access constants.%Destroy.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc13_29.2 (constants.%impl.elem0.6c4)]
  1803. // CHECK:STDOUT: %bound_method.loc13_15.1: <bound method> = bound_method %.loc13_15.5, %impl.elem0.loc13_15
  1804. // CHECK:STDOUT: %specific_impl_fn.loc13_15: <specific function> = specific_impl_function %impl.elem0.loc13_15, @Destroy.Op(constants.%Destroy.facet) [symbolic = %specific_impl_fn.loc13_29.2 (constants.%specific_impl_fn.6c6)]
  1805. // CHECK:STDOUT: %bound_method.loc13_15.2: <bound method> = bound_method %.loc13_15.5, %specific_impl_fn.loc13_15
  1806. // CHECK:STDOUT: %.loc13_15.7: init %empty_tuple.type = call %bound_method.loc13_15.2(%.loc13_15.5)
  1807. // CHECK:STDOUT: return %.loc13_30.3 to %return
  1808. // CHECK:STDOUT: }
  1809. // CHECK:STDOUT: }
  1810. // CHECK:STDOUT:
  1811. // CHECK:STDOUT: specific @I.Op(constants.%Self.9f2) {
  1812. // CHECK:STDOUT: %Self => constants.%Self.9f2
  1813. // CHECK:STDOUT: %Self.binding.as_type => constants.%Self.binding.as_type.bcb
  1814. // CHECK:STDOUT: %pattern_type => constants.%pattern_type.89c
  1815. // CHECK:STDOUT: }
  1816. // CHECK:STDOUT:
  1817. // CHECK:STDOUT: specific @U(constants.%Self.dc6) {}
  1818. // CHECK:STDOUT:
  1819. // CHECK:STDOUT: specific @J.F(constants.%Self.dc6) {
  1820. // CHECK:STDOUT: %Self => constants.%Self.dc6
  1821. // CHECK:STDOUT: %J.lookup_impl_witness => constants.%J.lookup_impl_witness.cd2552.1
  1822. // CHECK:STDOUT: %impl.elem0.loc9_11.1 => constants.%impl.elem0.63dbfc.1
  1823. // CHECK:STDOUT: %as_type => constants.%as_type.9e6a88.1
  1824. // CHECK:STDOUT: %pattern_type => constants.%pattern_type.49a6ab.1
  1825. // CHECK:STDOUT: }
  1826. // CHECK:STDOUT:
  1827. // CHECK:STDOUT: specific @U(constants.%T) {}
  1828. // CHECK:STDOUT:
  1829. // CHECK:STDOUT: specific @GenericResult(constants.%T) {
  1830. // CHECK:STDOUT: %T.loc12_18.1 => constants.%T
  1831. // CHECK:STDOUT: %T.binding.as_type => constants.%T.binding.as_type
  1832. // CHECK:STDOUT: %pattern_type.loc12_25 => constants.%pattern_type.4c4
  1833. // CHECK:STDOUT: %J.lookup_impl_witness => constants.%J.lookup_impl_witness.cd2552.2
  1834. // CHECK:STDOUT: %impl.elem0.loc12_35.1 => constants.%impl.elem0.63dbfc.2
  1835. // CHECK:STDOUT: %as_type.loc12_35.1 => constants.%as_type.9e6a88.2
  1836. // CHECK:STDOUT: %pattern_type.loc12_31 => constants.%pattern_type.49a6ab.2
  1837. // CHECK:STDOUT: }
  1838. // CHECK:STDOUT:
  1839. // CHECK:STDOUT: specific @J.F(constants.%T) {
  1840. // CHECK:STDOUT: %Self => constants.%T
  1841. // CHECK:STDOUT: %J.lookup_impl_witness => constants.%J.lookup_impl_witness.cd2552.2
  1842. // CHECK:STDOUT: %impl.elem0.loc9_11.1 => constants.%impl.elem0.63dbfc.2
  1843. // CHECK:STDOUT: %as_type => constants.%as_type.9e6a88.2
  1844. // CHECK:STDOUT: %pattern_type => constants.%pattern_type.49a6ab.2
  1845. // CHECK:STDOUT: }
  1846. // CHECK:STDOUT:
  1847. // CHECK:STDOUT: specific @I.Op(constants.%I.facet) {
  1848. // CHECK:STDOUT: %Self => constants.%I.facet
  1849. // CHECK:STDOUT: %Self.binding.as_type => constants.%as_type.9e6a88.2
  1850. // CHECK:STDOUT: %pattern_type => constants.%pattern_type.49a6ab.2
  1851. // CHECK:STDOUT: }
  1852. // CHECK:STDOUT:
  1853. // CHECK:STDOUT: --- interface_qualified.carbon
  1854. // CHECK:STDOUT:
  1855. // CHECK:STDOUT: constants {
  1856. // CHECK:STDOUT: %J.type: type = facet_type <@J> [concrete]
  1857. // CHECK:STDOUT: %Self: %J.type = symbolic_binding Self, 0 [symbolic]
  1858. // CHECK:STDOUT: %J.assoc_type: type = assoc_entity_type @J [concrete]
  1859. // CHECK:STDOUT: %assoc0: %J.assoc_type = assoc_entity element0, @J.%U [concrete]
  1860. // CHECK:STDOUT: %Self.binding.as_type: type = symbolic_binding_type Self, 0, %Self [symbolic]
  1861. // CHECK:STDOUT: %pattern_type.4c421b.1: type = pattern_type %Self.binding.as_type [symbolic]
  1862. // CHECK:STDOUT: %J.lookup_impl_witness.cd2552.1: <witness> = lookup_impl_witness %Self, @J [symbolic]
  1863. // CHECK:STDOUT: %impl.elem0.fa9e71.1: type = impl_witness_access %J.lookup_impl_witness.cd2552.1, element0 [symbolic]
  1864. // CHECK:STDOUT: %pattern_type.345548.1: type = pattern_type %impl.elem0.fa9e71.1 [symbolic]
  1865. // CHECK:STDOUT: %J.G.type: type = fn_type @J.G [concrete]
  1866. // CHECK:STDOUT: %J.G: %J.G.type = struct_value () [concrete]
  1867. // CHECK:STDOUT: %assoc1: %J.assoc_type = assoc_entity element1, @J.%J.G.decl [concrete]
  1868. // CHECK:STDOUT: %type: type = facet_type <type> [concrete]
  1869. // CHECK:STDOUT: %.Self: %type = symbolic_binding .Self [symbolic_self]
  1870. // CHECK:STDOUT: %T: %J.type = symbolic_binding T, 0 [symbolic]
  1871. // CHECK:STDOUT: %pattern_type.84b: type = pattern_type %J.type [concrete]
  1872. // CHECK:STDOUT: %T.binding.as_type: type = symbolic_binding_type T, 0, %T [symbolic]
  1873. // CHECK:STDOUT: %pattern_type.4c421b.2: type = pattern_type %T.binding.as_type [symbolic]
  1874. // CHECK:STDOUT: %J.lookup_impl_witness.cd2552.2: <witness> = lookup_impl_witness %T, @J [symbolic]
  1875. // CHECK:STDOUT: %impl.elem0.fa9e71.2: type = impl_witness_access %J.lookup_impl_witness.cd2552.2, element0 [symbolic]
  1876. // CHECK:STDOUT: %pattern_type.345548.2: type = pattern_type %impl.elem0.fa9e71.2 [symbolic]
  1877. // CHECK:STDOUT: %GenericCallInterfaceQualified.type: type = fn_type @GenericCallInterfaceQualified [concrete]
  1878. // CHECK:STDOUT: %GenericCallInterfaceQualified: %GenericCallInterfaceQualified.type = struct_value () [concrete]
  1879. // CHECK:STDOUT: %require_complete.157: <witness> = require_complete_type %impl.elem0.fa9e71.2 [symbolic]
  1880. // CHECK:STDOUT: %require_complete.d01: <witness> = require_complete_type %T.binding.as_type [symbolic]
  1881. // CHECK:STDOUT: %.a8d: type = fn_type_with_self_type %J.G.type, %T [symbolic]
  1882. // CHECK:STDOUT: %impl.elem1: %.a8d = impl_witness_access %J.lookup_impl_witness.cd2552.2, element1 [symbolic]
  1883. // CHECK:STDOUT: %specific_impl_fn: <specific function> = specific_impl_function %impl.elem1, @J.G(%T) [symbolic]
  1884. // CHECK:STDOUT: }
  1885. // CHECK:STDOUT:
  1886. // CHECK:STDOUT: imports {
  1887. // CHECK:STDOUT: %Core: <namespace> = namespace file.%Core.import, [concrete] {
  1888. // CHECK:STDOUT: import Core//prelude
  1889. // CHECK:STDOUT: import Core//prelude/...
  1890. // CHECK:STDOUT: }
  1891. // CHECK:STDOUT: }
  1892. // CHECK:STDOUT:
  1893. // CHECK:STDOUT: file {
  1894. // CHECK:STDOUT: package: <namespace> = namespace [concrete] {
  1895. // CHECK:STDOUT: .Core = imports.%Core
  1896. // CHECK:STDOUT: .J = %J.decl
  1897. // CHECK:STDOUT: .GenericCallInterfaceQualified = %GenericCallInterfaceQualified.decl
  1898. // CHECK:STDOUT: }
  1899. // CHECK:STDOUT: %Core.import = import Core
  1900. // CHECK:STDOUT: %J.decl: type = interface_decl @J [concrete = constants.%J.type] {} {}
  1901. // CHECK:STDOUT: %GenericCallInterfaceQualified.decl: %GenericCallInterfaceQualified.type = fn_decl @GenericCallInterfaceQualified [concrete = constants.%GenericCallInterfaceQualified] {
  1902. // CHECK:STDOUT: %T.patt: %pattern_type.84b = symbolic_binding_pattern T, 0 [concrete]
  1903. // CHECK:STDOUT: %t.patt: @GenericCallInterfaceQualified.%pattern_type.loc8_41 (%pattern_type.4c421b.2) = value_binding_pattern t [concrete]
  1904. // CHECK:STDOUT: %t.param_patt: @GenericCallInterfaceQualified.%pattern_type.loc8_41 (%pattern_type.4c421b.2) = value_param_pattern %t.patt, call_param0 [concrete]
  1905. // CHECK:STDOUT: %u.patt: @GenericCallInterfaceQualified.%pattern_type.loc8_47 (%pattern_type.345548.2) = value_binding_pattern u [concrete]
  1906. // CHECK:STDOUT: %u.param_patt: @GenericCallInterfaceQualified.%pattern_type.loc8_47 (%pattern_type.345548.2) = value_param_pattern %u.patt, call_param1 [concrete]
  1907. // CHECK:STDOUT: %return.patt: @GenericCallInterfaceQualified.%pattern_type.loc8_47 (%pattern_type.345548.2) = return_slot_pattern [concrete]
  1908. // CHECK:STDOUT: %return.param_patt: @GenericCallInterfaceQualified.%pattern_type.loc8_47 (%pattern_type.345548.2) = out_param_pattern %return.patt, call_param2 [concrete]
  1909. // CHECK:STDOUT: } {
  1910. // CHECK:STDOUT: %T.ref.loc8_58: %J.type = name_ref T, %T.loc8_34.2 [symbolic = %T.loc8_34.1 (constants.%T)]
  1911. // CHECK:STDOUT: %U.ref.loc8_59: %J.assoc_type = name_ref U, @U.%assoc0 [concrete = constants.%assoc0]
  1912. // CHECK:STDOUT: %T.as_type.loc8_59: type = facet_access_type %T.ref.loc8_58 [symbolic = %T.binding.as_type (constants.%T.binding.as_type)]
  1913. // CHECK:STDOUT: %.loc8_59: type = converted %T.ref.loc8_58, %T.as_type.loc8_59 [symbolic = %T.binding.as_type (constants.%T.binding.as_type)]
  1914. // CHECK:STDOUT: %impl.elem0.loc8_59: type = impl_witness_access constants.%J.lookup_impl_witness.cd2552.2, element0 [symbolic = %impl.elem0.loc8_51.1 (constants.%impl.elem0.fa9e71.2)]
  1915. // CHECK:STDOUT: %.loc8_38: type = splice_block %J.ref.loc8 [concrete = constants.%J.type] {
  1916. // CHECK:STDOUT: %.Self: %type = symbolic_binding .Self [symbolic_self = constants.%.Self]
  1917. // CHECK:STDOUT: %J.ref.loc8: type = name_ref J, file.%J.decl [concrete = constants.%J.type]
  1918. // CHECK:STDOUT: }
  1919. // CHECK:STDOUT: %T.loc8_34.2: %J.type = symbolic_binding T, 0 [symbolic = %T.loc8_34.1 (constants.%T)]
  1920. // CHECK:STDOUT: %t.param: @GenericCallInterfaceQualified.%T.binding.as_type (%T.binding.as_type) = value_param call_param0
  1921. // CHECK:STDOUT: %.loc8_44.1: type = splice_block %.loc8_44.2 [symbolic = %T.binding.as_type (constants.%T.binding.as_type)] {
  1922. // CHECK:STDOUT: %T.ref.loc8_44: %J.type = name_ref T, %T.loc8_34.2 [symbolic = %T.loc8_34.1 (constants.%T)]
  1923. // CHECK:STDOUT: %T.as_type.loc8_44: type = facet_access_type %T.ref.loc8_44 [symbolic = %T.binding.as_type (constants.%T.binding.as_type)]
  1924. // CHECK:STDOUT: %.loc8_44.2: type = converted %T.ref.loc8_44, %T.as_type.loc8_44 [symbolic = %T.binding.as_type (constants.%T.binding.as_type)]
  1925. // CHECK:STDOUT: }
  1926. // CHECK:STDOUT: %t: @GenericCallInterfaceQualified.%T.binding.as_type (%T.binding.as_type) = value_binding t, %t.param
  1927. // CHECK:STDOUT: %u.param: @GenericCallInterfaceQualified.%impl.elem0.loc8_51.1 (%impl.elem0.fa9e71.2) = value_param call_param1
  1928. // CHECK:STDOUT: %.loc8_51.1: type = splice_block %impl.elem0.loc8_51.2 [symbolic = %impl.elem0.loc8_51.1 (constants.%impl.elem0.fa9e71.2)] {
  1929. // CHECK:STDOUT: %T.ref.loc8_50: %J.type = name_ref T, %T.loc8_34.2 [symbolic = %T.loc8_34.1 (constants.%T)]
  1930. // CHECK:STDOUT: %U.ref.loc8_51: %J.assoc_type = name_ref U, @U.%assoc0 [concrete = constants.%assoc0]
  1931. // CHECK:STDOUT: %T.as_type.loc8_51: type = facet_access_type %T.ref.loc8_50 [symbolic = %T.binding.as_type (constants.%T.binding.as_type)]
  1932. // CHECK:STDOUT: %.loc8_51.2: type = converted %T.ref.loc8_50, %T.as_type.loc8_51 [symbolic = %T.binding.as_type (constants.%T.binding.as_type)]
  1933. // CHECK:STDOUT: %impl.elem0.loc8_51.2: type = impl_witness_access constants.%J.lookup_impl_witness.cd2552.2, element0 [symbolic = %impl.elem0.loc8_51.1 (constants.%impl.elem0.fa9e71.2)]
  1934. // CHECK:STDOUT: }
  1935. // CHECK:STDOUT: %u: @GenericCallInterfaceQualified.%impl.elem0.loc8_51.1 (%impl.elem0.fa9e71.2) = value_binding u, %u.param
  1936. // CHECK:STDOUT: %return.param: ref @GenericCallInterfaceQualified.%impl.elem0.loc8_51.1 (%impl.elem0.fa9e71.2) = out_param call_param2
  1937. // CHECK:STDOUT: %return: ref @GenericCallInterfaceQualified.%impl.elem0.loc8_51.1 (%impl.elem0.fa9e71.2) = return_slot %return.param
  1938. // CHECK:STDOUT: }
  1939. // CHECK:STDOUT: }
  1940. // CHECK:STDOUT:
  1941. // CHECK:STDOUT: interface @J {
  1942. // CHECK:STDOUT: %Self: %J.type = symbolic_binding Self, 0 [symbolic = constants.%Self]
  1943. // CHECK:STDOUT: %U: type = assoc_const_decl @U [concrete] {
  1944. // CHECK:STDOUT: %assoc0: %J.assoc_type = assoc_entity element0, @J.%U [concrete = constants.%assoc0]
  1945. // CHECK:STDOUT: }
  1946. // CHECK:STDOUT: %J.G.decl: %J.G.type = fn_decl @J.G [concrete = constants.%J.G] {
  1947. // CHECK:STDOUT: %self.patt: @J.G.%pattern_type.loc5_8 (%pattern_type.4c421b.1) = value_binding_pattern self [concrete]
  1948. // CHECK:STDOUT: %self.param_patt: @J.G.%pattern_type.loc5_8 (%pattern_type.4c421b.1) = value_param_pattern %self.patt, call_param0 [concrete]
  1949. // CHECK:STDOUT: %v.patt: @J.G.%pattern_type.loc5_20 (%pattern_type.345548.1) = value_binding_pattern v [concrete]
  1950. // CHECK:STDOUT: %v.param_patt: @J.G.%pattern_type.loc5_20 (%pattern_type.345548.1) = value_param_pattern %v.patt, call_param1 [concrete]
  1951. // CHECK:STDOUT: %return.patt: @J.G.%pattern_type.loc5_20 (%pattern_type.345548.1) = return_slot_pattern [concrete]
  1952. // CHECK:STDOUT: %return.param_patt: @J.G.%pattern_type.loc5_20 (%pattern_type.345548.1) = out_param_pattern %return.patt, call_param2 [concrete]
  1953. // CHECK:STDOUT: } {
  1954. // CHECK:STDOUT: %impl.elem0.loc5_29: type = impl_witness_access constants.%J.lookup_impl_witness.cd2552.1, element0 [symbolic = %impl.elem0.loc5_23.1 (constants.%impl.elem0.fa9e71.1)]
  1955. // CHECK:STDOUT: %U.ref.loc5_29: type = name_ref U, %impl.elem0.loc5_29 [symbolic = %impl.elem0.loc5_23.1 (constants.%impl.elem0.fa9e71.1)]
  1956. // CHECK:STDOUT: %self.param: @J.G.%Self.binding.as_type (%Self.binding.as_type) = value_param call_param0
  1957. // CHECK:STDOUT: %.loc5_14.1: type = splice_block %.loc5_14.2 [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)] {
  1958. // CHECK:STDOUT: %Self.ref: %J.type = name_ref Self, @J.%Self [symbolic = %Self (constants.%Self)]
  1959. // CHECK:STDOUT: %Self.as_type: type = facet_access_type %Self.ref [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)]
  1960. // CHECK:STDOUT: %.loc5_14.2: type = converted %Self.ref, %Self.as_type [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)]
  1961. // CHECK:STDOUT: }
  1962. // CHECK:STDOUT: %self: @J.G.%Self.binding.as_type (%Self.binding.as_type) = value_binding self, %self.param
  1963. // CHECK:STDOUT: %v.param: @J.G.%impl.elem0.loc5_23.1 (%impl.elem0.fa9e71.1) = value_param call_param1
  1964. // CHECK:STDOUT: %.loc5_23: type = splice_block %U.ref.loc5_23 [symbolic = %impl.elem0.loc5_23.1 (constants.%impl.elem0.fa9e71.1)] {
  1965. // CHECK:STDOUT: %impl.elem0.loc5_23.2: type = impl_witness_access constants.%J.lookup_impl_witness.cd2552.1, element0 [symbolic = %impl.elem0.loc5_23.1 (constants.%impl.elem0.fa9e71.1)]
  1966. // CHECK:STDOUT: %U.ref.loc5_23: type = name_ref U, %impl.elem0.loc5_23.2 [symbolic = %impl.elem0.loc5_23.1 (constants.%impl.elem0.fa9e71.1)]
  1967. // CHECK:STDOUT: }
  1968. // CHECK:STDOUT: %v: @J.G.%impl.elem0.loc5_23.1 (%impl.elem0.fa9e71.1) = value_binding v, %v.param
  1969. // CHECK:STDOUT: %return.param: ref @J.G.%impl.elem0.loc5_23.1 (%impl.elem0.fa9e71.1) = out_param call_param2
  1970. // CHECK:STDOUT: %return: ref @J.G.%impl.elem0.loc5_23.1 (%impl.elem0.fa9e71.1) = return_slot %return.param
  1971. // CHECK:STDOUT: }
  1972. // CHECK:STDOUT: %assoc1: %J.assoc_type = assoc_entity element1, %J.G.decl [concrete = constants.%assoc1]
  1973. // CHECK:STDOUT:
  1974. // CHECK:STDOUT: !members:
  1975. // CHECK:STDOUT: .Self = %Self
  1976. // CHECK:STDOUT: .U = @U.%assoc0
  1977. // CHECK:STDOUT: .G = %assoc1
  1978. // CHECK:STDOUT: witness = (%U, %J.G.decl)
  1979. // CHECK:STDOUT:
  1980. // CHECK:STDOUT: !requires:
  1981. // CHECK:STDOUT: }
  1982. // CHECK:STDOUT:
  1983. // CHECK:STDOUT: generic assoc_const @U(@J.%Self: %J.type) {
  1984. // CHECK:STDOUT: assoc_const U:! type;
  1985. // CHECK:STDOUT: }
  1986. // CHECK:STDOUT:
  1987. // CHECK:STDOUT: generic fn @J.G(@J.%Self: %J.type) {
  1988. // CHECK:STDOUT: %Self: %J.type = symbolic_binding Self, 0 [symbolic = %Self (constants.%Self)]
  1989. // CHECK:STDOUT: %Self.binding.as_type: type = symbolic_binding_type Self, 0, %Self [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)]
  1990. // CHECK:STDOUT: %pattern_type.loc5_8: type = pattern_type %Self.binding.as_type [symbolic = %pattern_type.loc5_8 (constants.%pattern_type.4c421b.1)]
  1991. // CHECK:STDOUT: %J.lookup_impl_witness: <witness> = lookup_impl_witness %Self, @J [symbolic = %J.lookup_impl_witness (constants.%J.lookup_impl_witness.cd2552.1)]
  1992. // 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.fa9e71.1)]
  1993. // CHECK:STDOUT: %pattern_type.loc5_20: type = pattern_type %impl.elem0.loc5_23.1 [symbolic = %pattern_type.loc5_20 (constants.%pattern_type.345548.1)]
  1994. // CHECK:STDOUT:
  1995. // CHECK:STDOUT: fn(%self.param: @J.G.%Self.binding.as_type (%Self.binding.as_type), %v.param: @J.G.%impl.elem0.loc5_23.1 (%impl.elem0.fa9e71.1)) -> @J.G.%impl.elem0.loc5_23.1 (%impl.elem0.fa9e71.1);
  1996. // CHECK:STDOUT: }
  1997. // CHECK:STDOUT:
  1998. // CHECK:STDOUT: generic fn @GenericCallInterfaceQualified(%T.loc8_34.2: %J.type) {
  1999. // CHECK:STDOUT: %T.loc8_34.1: %J.type = symbolic_binding T, 0 [symbolic = %T.loc8_34.1 (constants.%T)]
  2000. // CHECK:STDOUT: %T.binding.as_type: type = symbolic_binding_type T, 0, %T.loc8_34.1 [symbolic = %T.binding.as_type (constants.%T.binding.as_type)]
  2001. // CHECK:STDOUT: %pattern_type.loc8_41: type = pattern_type %T.binding.as_type [symbolic = %pattern_type.loc8_41 (constants.%pattern_type.4c421b.2)]
  2002. // CHECK:STDOUT: %J.lookup_impl_witness: <witness> = lookup_impl_witness %T.loc8_34.1, @J [symbolic = %J.lookup_impl_witness (constants.%J.lookup_impl_witness.cd2552.2)]
  2003. // CHECK:STDOUT: %impl.elem0.loc8_51.1: type = impl_witness_access %J.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc8_51.1 (constants.%impl.elem0.fa9e71.2)]
  2004. // CHECK:STDOUT: %pattern_type.loc8_47: type = pattern_type %impl.elem0.loc8_51.1 [symbolic = %pattern_type.loc8_47 (constants.%pattern_type.345548.2)]
  2005. // CHECK:STDOUT:
  2006. // CHECK:STDOUT: !definition:
  2007. // CHECK:STDOUT: %require_complete.loc8_55: <witness> = require_complete_type %impl.elem0.loc8_51.1 [symbolic = %require_complete.loc8_55 (constants.%require_complete.157)]
  2008. // CHECK:STDOUT: %require_complete.loc8_42: <witness> = require_complete_type %T.binding.as_type [symbolic = %require_complete.loc8_42 (constants.%require_complete.d01)]
  2009. // CHECK:STDOUT: %.loc9_11: type = fn_type_with_self_type constants.%J.G.type, %T.loc8_34.1 [symbolic = %.loc9_11 (constants.%.a8d)]
  2010. // CHECK:STDOUT: %impl.elem1.loc9_11.2: @GenericCallInterfaceQualified.%.loc9_11 (%.a8d) = impl_witness_access %J.lookup_impl_witness, element1 [symbolic = %impl.elem1.loc9_11.2 (constants.%impl.elem1)]
  2011. // CHECK:STDOUT: %specific_impl_fn.loc9_11.2: <specific function> = specific_impl_function %impl.elem1.loc9_11.2, @J.G(%T.loc8_34.1) [symbolic = %specific_impl_fn.loc9_11.2 (constants.%specific_impl_fn)]
  2012. // CHECK:STDOUT:
  2013. // CHECK:STDOUT: fn(%t.param: @GenericCallInterfaceQualified.%T.binding.as_type (%T.binding.as_type), %u.param: @GenericCallInterfaceQualified.%impl.elem0.loc8_51.1 (%impl.elem0.fa9e71.2)) -> %return.param: @GenericCallInterfaceQualified.%impl.elem0.loc8_51.1 (%impl.elem0.fa9e71.2) {
  2014. // CHECK:STDOUT: !entry:
  2015. // CHECK:STDOUT: %t.ref: @GenericCallInterfaceQualified.%T.binding.as_type (%T.binding.as_type) = name_ref t, %t
  2016. // CHECK:STDOUT: %J.ref.loc9: type = name_ref J, file.%J.decl [concrete = constants.%J.type]
  2017. // CHECK:STDOUT: %G.ref: %J.assoc_type = name_ref G, @J.%assoc1 [concrete = constants.%assoc1]
  2018. // CHECK:STDOUT: %impl.elem1.loc9_11.1: @GenericCallInterfaceQualified.%.loc9_11 (%.a8d) = impl_witness_access constants.%J.lookup_impl_witness.cd2552.2, element1 [symbolic = %impl.elem1.loc9_11.2 (constants.%impl.elem1)]
  2019. // CHECK:STDOUT: %bound_method.loc9_11: <bound method> = bound_method %t.ref, %impl.elem1.loc9_11.1
  2020. // CHECK:STDOUT: %u.ref: @GenericCallInterfaceQualified.%impl.elem0.loc8_51.1 (%impl.elem0.fa9e71.2) = name_ref u, %u
  2021. // CHECK:STDOUT: %specific_impl_fn.loc9_11.1: <specific function> = specific_impl_function %impl.elem1.loc9_11.1, @J.G(constants.%T) [symbolic = %specific_impl_fn.loc9_11.2 (constants.%specific_impl_fn)]
  2022. // CHECK:STDOUT: %bound_method.loc9_19: <bound method> = bound_method %t.ref, %specific_impl_fn.loc9_11.1
  2023. // CHECK:STDOUT: %.loc8_55: ref @GenericCallInterfaceQualified.%impl.elem0.loc8_51.1 (%impl.elem0.fa9e71.2) = splice_block %return {}
  2024. // CHECK:STDOUT: %.loc9_19: init @GenericCallInterfaceQualified.%impl.elem0.loc8_51.1 (%impl.elem0.fa9e71.2) = call %bound_method.loc9_19(%t.ref, %u.ref) to %.loc8_55
  2025. // CHECK:STDOUT: return %.loc9_19 to %return
  2026. // CHECK:STDOUT: }
  2027. // CHECK:STDOUT: }
  2028. // CHECK:STDOUT:
  2029. // CHECK:STDOUT: specific @U(constants.%Self) {}
  2030. // CHECK:STDOUT:
  2031. // CHECK:STDOUT: specific @J.G(constants.%Self) {
  2032. // CHECK:STDOUT: %Self => constants.%Self
  2033. // CHECK:STDOUT: %Self.binding.as_type => constants.%Self.binding.as_type
  2034. // CHECK:STDOUT: %pattern_type.loc5_8 => constants.%pattern_type.4c421b.1
  2035. // CHECK:STDOUT: %J.lookup_impl_witness => constants.%J.lookup_impl_witness.cd2552.1
  2036. // CHECK:STDOUT: %impl.elem0.loc5_23.1 => constants.%impl.elem0.fa9e71.1
  2037. // CHECK:STDOUT: %pattern_type.loc5_20 => constants.%pattern_type.345548.1
  2038. // CHECK:STDOUT: }
  2039. // CHECK:STDOUT:
  2040. // CHECK:STDOUT: specific @U(constants.%T) {}
  2041. // CHECK:STDOUT:
  2042. // CHECK:STDOUT: specific @GenericCallInterfaceQualified(constants.%T) {
  2043. // CHECK:STDOUT: %T.loc8_34.1 => constants.%T
  2044. // CHECK:STDOUT: %T.binding.as_type => constants.%T.binding.as_type
  2045. // CHECK:STDOUT: %pattern_type.loc8_41 => constants.%pattern_type.4c421b.2
  2046. // CHECK:STDOUT: %J.lookup_impl_witness => constants.%J.lookup_impl_witness.cd2552.2
  2047. // CHECK:STDOUT: %impl.elem0.loc8_51.1 => constants.%impl.elem0.fa9e71.2
  2048. // CHECK:STDOUT: %pattern_type.loc8_47 => constants.%pattern_type.345548.2
  2049. // CHECK:STDOUT: }
  2050. // CHECK:STDOUT:
  2051. // CHECK:STDOUT: specific @J.G(constants.%T) {
  2052. // CHECK:STDOUT: %Self => constants.%T
  2053. // CHECK:STDOUT: %Self.binding.as_type => constants.%T.binding.as_type
  2054. // CHECK:STDOUT: %pattern_type.loc5_8 => constants.%pattern_type.4c421b.2
  2055. // CHECK:STDOUT: %J.lookup_impl_witness => constants.%J.lookup_impl_witness.cd2552.2
  2056. // CHECK:STDOUT: %impl.elem0.loc5_23.1 => constants.%impl.elem0.fa9e71.2
  2057. // CHECK:STDOUT: %pattern_type.loc5_20 => constants.%pattern_type.345548.2
  2058. // CHECK:STDOUT: }
  2059. // CHECK:STDOUT:
  2060. // CHECK:STDOUT: --- use_where.carbon
  2061. // CHECK:STDOUT:
  2062. // CHECK:STDOUT: constants {
  2063. // CHECK:STDOUT: %J.type: type = facet_type <@J> [concrete]
  2064. // CHECK:STDOUT: %Self.dc6: %J.type = symbolic_binding Self, 0 [symbolic]
  2065. // CHECK:STDOUT: %J.assoc_type: type = assoc_entity_type @J [concrete]
  2066. // CHECK:STDOUT: %assoc0.411: %J.assoc_type = assoc_entity element0, @J.%U [concrete]
  2067. // CHECK:STDOUT: %J.lookup_impl_witness.cd2: <witness> = lookup_impl_witness %Self.dc6, @J [symbolic]
  2068. // CHECK:STDOUT: %impl.elem0.fa9: type = impl_witness_access %J.lookup_impl_witness.cd2, element0 [symbolic]
  2069. // CHECK:STDOUT: %pattern_type.345: type = pattern_type %impl.elem0.fa9 [symbolic]
  2070. // CHECK:STDOUT: %J.F.type: type = fn_type @J.F [concrete]
  2071. // CHECK:STDOUT: %J.F: %J.F.type = struct_value () [concrete]
  2072. // CHECK:STDOUT: %assoc1: %J.assoc_type = assoc_entity element1, @J.%J.F.decl [concrete]
  2073. // CHECK:STDOUT: %type: type = facet_type <type> [concrete]
  2074. // CHECK:STDOUT: %.Self.3b7: %type = symbolic_binding .Self [symbolic_self]
  2075. // CHECK:STDOUT: %.Self.c58: %J.type = symbolic_binding .Self [symbolic_self]
  2076. // CHECK:STDOUT: %.Self.binding.as_type: type = symbolic_binding_type .Self, %.Self.c58 [symbolic_self]
  2077. // CHECK:STDOUT: %J.lookup_impl_witness.ab8: <witness> = lookup_impl_witness %.Self.c58, @J [symbolic_self]
  2078. // CHECK:STDOUT: %impl.elem0.ab2: type = impl_witness_access %J.lookup_impl_witness.ab8, element0 [symbolic_self]
  2079. // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete]
  2080. // CHECK:STDOUT: %Int.type: type = generic_class_type @Int [concrete]
  2081. // CHECK:STDOUT: %Int.generic: %Int.type = struct_value () [concrete]
  2082. // CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [concrete]
  2083. // CHECK:STDOUT: %J_where.type: type = facet_type <@J where %impl.elem0.ab2 = %i32> [concrete]
  2084. // CHECK:STDOUT: %T: %J_where.type = symbolic_binding T, 0 [symbolic]
  2085. // CHECK:STDOUT: %pattern_type.9f6: type = pattern_type %J_where.type [concrete]
  2086. // CHECK:STDOUT: %T.binding.as_type: type = symbolic_binding_type T, 0, %T [symbolic]
  2087. // CHECK:STDOUT: %pattern_type.2ce: type = pattern_type %T.binding.as_type [symbolic]
  2088. // CHECK:STDOUT: %pattern_type.7ce: type = pattern_type %i32 [concrete]
  2089. // CHECK:STDOUT: %GenericCallFI32.type: type = fn_type @GenericCallFI32 [concrete]
  2090. // CHECK:STDOUT: %GenericCallFI32: %GenericCallFI32.type = struct_value () [concrete]
  2091. // CHECK:STDOUT: %require_complete.440: <witness> = require_complete_type %T.binding.as_type [symbolic]
  2092. // CHECK:STDOUT: %J.lookup_impl_witness.873: <witness> = lookup_impl_witness %T, @J [symbolic]
  2093. // CHECK:STDOUT: %J.facet: %J.type = facet_value %T.binding.as_type, (%J.lookup_impl_witness.873) [symbolic]
  2094. // CHECK:STDOUT: %.e93: type = fn_type_with_self_type %J.F.type, %J.facet [symbolic]
  2095. // CHECK:STDOUT: %impl.elem1: %.e93 = impl_witness_access %J.lookup_impl_witness.873, element1 [symbolic]
  2096. // CHECK:STDOUT: %int_2.ecc: Core.IntLiteral = int_value 2 [concrete]
  2097. // CHECK:STDOUT: %specific_impl_fn: <specific function> = specific_impl_function %impl.elem1, @J.F(%J.facet) [symbolic]
  2098. // CHECK:STDOUT: %ImplicitAs.type.cc7: type = generic_interface_type @ImplicitAs [concrete]
  2099. // CHECK:STDOUT: %ImplicitAs.generic: %ImplicitAs.type.cc7 = struct_value () [concrete]
  2100. // CHECK:STDOUT: %ImplicitAs.type.d14: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete]
  2101. // CHECK:STDOUT: %ImplicitAs.Convert.type.1b6: type = fn_type @ImplicitAs.Convert, @ImplicitAs(%i32) [concrete]
  2102. // CHECK:STDOUT: %To: Core.IntLiteral = symbolic_binding To, 0 [symbolic]
  2103. // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.f51: type = fn_type @Core.IntLiteral.as.ImplicitAs.impl.Convert, @Core.IntLiteral.as.ImplicitAs.impl(%To) [symbolic]
  2104. // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.2a1: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.f51 = struct_value () [symbolic]
  2105. // CHECK:STDOUT: %ImplicitAs.impl_witness.bc9: <witness> = impl_witness imports.%ImplicitAs.impl_witness_table.132, @Core.IntLiteral.as.ImplicitAs.impl(%int_32) [concrete]
  2106. // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.51e: type = fn_type @Core.IntLiteral.as.ImplicitAs.impl.Convert, @Core.IntLiteral.as.ImplicitAs.impl(%int_32) [concrete]
  2107. // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.e9b: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.51e = struct_value () [concrete]
  2108. // CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.d14 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.bc9) [concrete]
  2109. // CHECK:STDOUT: %.322: type = fn_type_with_self_type %ImplicitAs.Convert.type.1b6, %ImplicitAs.facet [concrete]
  2110. // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound: <bound method> = bound_method %int_2.ecc, %Core.IntLiteral.as.ImplicitAs.impl.Convert.e9b [concrete]
  2111. // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn: <specific function> = specific_function %Core.IntLiteral.as.ImplicitAs.impl.Convert.e9b, @Core.IntLiteral.as.ImplicitAs.impl.Convert(%int_32) [concrete]
  2112. // CHECK:STDOUT: %bound_method: <bound method> = bound_method %int_2.ecc, %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete]
  2113. // CHECK:STDOUT: %int_2.ef8: %i32 = int_value 2 [concrete]
  2114. // CHECK:STDOUT: }
  2115. // CHECK:STDOUT:
  2116. // CHECK:STDOUT: imports {
  2117. // CHECK:STDOUT: %Core: <namespace> = namespace file.%Core.import, [concrete] {
  2118. // CHECK:STDOUT: .Int = %Core.Int
  2119. // CHECK:STDOUT: .ImplicitAs = %Core.ImplicitAs
  2120. // CHECK:STDOUT: import Core//prelude
  2121. // CHECK:STDOUT: import Core//prelude/...
  2122. // CHECK:STDOUT: }
  2123. // CHECK:STDOUT: %Core.Int: %Int.type = import_ref Core//prelude/parts/int, Int, loaded [concrete = constants.%Int.generic]
  2124. // CHECK:STDOUT: %Core.ImplicitAs: %ImplicitAs.type.cc7 = import_ref Core//prelude/parts/as, ImplicitAs, loaded [concrete = constants.%ImplicitAs.generic]
  2125. // CHECK:STDOUT: %Core.import_ref.e24: @Core.IntLiteral.as.ImplicitAs.impl.%Core.IntLiteral.as.ImplicitAs.impl.Convert.type (%Core.IntLiteral.as.ImplicitAs.impl.Convert.type.f51) = import_ref Core//prelude/parts/int, loc{{\d+_\d+}}, loaded [symbolic = @Core.IntLiteral.as.ImplicitAs.impl.%Core.IntLiteral.as.ImplicitAs.impl.Convert (constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.2a1)]
  2126. // CHECK:STDOUT: %ImplicitAs.impl_witness_table.132 = impl_witness_table (%Core.import_ref.e24), @Core.IntLiteral.as.ImplicitAs.impl [concrete]
  2127. // CHECK:STDOUT: }
  2128. // CHECK:STDOUT:
  2129. // CHECK:STDOUT: file {
  2130. // CHECK:STDOUT: package: <namespace> = namespace [concrete] {
  2131. // CHECK:STDOUT: .Core = imports.%Core
  2132. // CHECK:STDOUT: .J = %J.decl
  2133. // CHECK:STDOUT: .GenericCallFI32 = %GenericCallFI32.decl
  2134. // CHECK:STDOUT: }
  2135. // CHECK:STDOUT: %Core.import = import Core
  2136. // CHECK:STDOUT: %J.decl: type = interface_decl @J [concrete = constants.%J.type] {} {}
  2137. // CHECK:STDOUT: %GenericCallFI32.decl: %GenericCallFI32.type = fn_decl @GenericCallFI32 [concrete = constants.%GenericCallFI32] {
  2138. // CHECK:STDOUT: %T.patt: %pattern_type.9f6 = symbolic_binding_pattern T, 0 [concrete]
  2139. // CHECK:STDOUT: %t.patt: @GenericCallFI32.%pattern_type (%pattern_type.2ce) = value_binding_pattern t [concrete]
  2140. // CHECK:STDOUT: %t.param_patt: @GenericCallFI32.%pattern_type (%pattern_type.2ce) = value_param_pattern %t.patt, call_param0 [concrete]
  2141. // CHECK:STDOUT: %return.patt: %pattern_type.7ce = return_slot_pattern [concrete]
  2142. // CHECK:STDOUT: %return.param_patt: %pattern_type.7ce = out_param_pattern %return.patt, call_param1 [concrete]
  2143. // CHECK:STDOUT: } {
  2144. // CHECK:STDOUT: %int_32.loc8_51: Core.IntLiteral = int_value 32 [concrete = constants.%int_32]
  2145. // CHECK:STDOUT: %i32.loc8_51: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32]
  2146. // CHECK:STDOUT: %.loc8_26.1: type = splice_block %.loc8_26.2 [concrete = constants.%J_where.type] {
  2147. // CHECK:STDOUT: %.Self.1: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.3b7]
  2148. // CHECK:STDOUT: %J.ref: type = name_ref J, file.%J.decl [concrete = constants.%J.type]
  2149. // CHECK:STDOUT: %.Self.2: %J.type = symbolic_binding .Self [symbolic_self = constants.%.Self.c58]
  2150. // CHECK:STDOUT: %.Self.ref: %J.type = name_ref .Self, %.Self.2 [symbolic_self = constants.%.Self.c58]
  2151. // CHECK:STDOUT: %U.ref: %J.assoc_type = name_ref U, @U.%assoc0 [concrete = constants.%assoc0.411]
  2152. // CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self.ref [symbolic_self = constants.%.Self.binding.as_type]
  2153. // CHECK:STDOUT: %.loc8_32: type = converted %.Self.ref, %.Self.as_type [symbolic_self = constants.%.Self.binding.as_type]
  2154. // CHECK:STDOUT: %impl.elem0.loc8: type = impl_witness_access constants.%J.lookup_impl_witness.ab8, element0 [symbolic_self = constants.%impl.elem0.ab2]
  2155. // CHECK:STDOUT: %int_32.loc8_37: Core.IntLiteral = int_value 32 [concrete = constants.%int_32]
  2156. // CHECK:STDOUT: %i32.loc8_37: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32]
  2157. // CHECK:STDOUT: %.loc8_26.2: type = where_expr %.Self.2 [concrete = constants.%J_where.type] {
  2158. // CHECK:STDOUT: requirement_base_facet_type constants.%J.type
  2159. // CHECK:STDOUT: requirement_rewrite %impl.elem0.loc8, %i32.loc8_37
  2160. // CHECK:STDOUT: }
  2161. // CHECK:STDOUT: }
  2162. // CHECK:STDOUT: %T.loc8_20.2: %J_where.type = symbolic_binding T, 0 [symbolic = %T.loc8_20.1 (constants.%T)]
  2163. // CHECK:STDOUT: %t.param: @GenericCallFI32.%T.binding.as_type (%T.binding.as_type) = value_param call_param0
  2164. // CHECK:STDOUT: %.loc8_45.1: type = splice_block %.loc8_45.2 [symbolic = %T.binding.as_type (constants.%T.binding.as_type)] {
  2165. // CHECK:STDOUT: %T.ref: %J_where.type = name_ref T, %T.loc8_20.2 [symbolic = %T.loc8_20.1 (constants.%T)]
  2166. // CHECK:STDOUT: %T.as_type: type = facet_access_type %T.ref [symbolic = %T.binding.as_type (constants.%T.binding.as_type)]
  2167. // CHECK:STDOUT: %.loc8_45.2: type = converted %T.ref, %T.as_type [symbolic = %T.binding.as_type (constants.%T.binding.as_type)]
  2168. // CHECK:STDOUT: }
  2169. // CHECK:STDOUT: %t: @GenericCallFI32.%T.binding.as_type (%T.binding.as_type) = value_binding t, %t.param
  2170. // CHECK:STDOUT: %return.param: ref %i32 = out_param call_param1
  2171. // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param
  2172. // CHECK:STDOUT: }
  2173. // CHECK:STDOUT: }
  2174. // CHECK:STDOUT:
  2175. // CHECK:STDOUT: interface @J {
  2176. // CHECK:STDOUT: %Self: %J.type = symbolic_binding Self, 0 [symbolic = constants.%Self.dc6]
  2177. // CHECK:STDOUT: %U: type = assoc_const_decl @U [concrete] {
  2178. // CHECK:STDOUT: %assoc0: %J.assoc_type = assoc_entity element0, @J.%U [concrete = constants.%assoc0.411]
  2179. // CHECK:STDOUT: }
  2180. // CHECK:STDOUT: %J.F.decl: %J.F.type = fn_decl @J.F [concrete = constants.%J.F] {
  2181. // CHECK:STDOUT: %u.patt: @J.F.%pattern_type (%pattern_type.345) = value_binding_pattern u [concrete]
  2182. // CHECK:STDOUT: %u.param_patt: @J.F.%pattern_type (%pattern_type.345) = value_param_pattern %u.patt, call_param0 [concrete]
  2183. // CHECK:STDOUT: %return.patt: @J.F.%pattern_type (%pattern_type.345) = return_slot_pattern [concrete]
  2184. // CHECK:STDOUT: %return.param_patt: @J.F.%pattern_type (%pattern_type.345) = out_param_pattern %return.patt, call_param1 [concrete]
  2185. // CHECK:STDOUT: } {
  2186. // CHECK:STDOUT: %impl.elem0.loc5_17: type = impl_witness_access constants.%J.lookup_impl_witness.cd2, element0 [symbolic = %impl.elem0.loc5_11.1 (constants.%impl.elem0.fa9)]
  2187. // CHECK:STDOUT: %U.ref.loc5_17: type = name_ref U, %impl.elem0.loc5_17 [symbolic = %impl.elem0.loc5_11.1 (constants.%impl.elem0.fa9)]
  2188. // CHECK:STDOUT: %u.param: @J.F.%impl.elem0.loc5_11.1 (%impl.elem0.fa9) = value_param call_param0
  2189. // CHECK:STDOUT: %.loc5: type = splice_block %U.ref.loc5_11 [symbolic = %impl.elem0.loc5_11.1 (constants.%impl.elem0.fa9)] {
  2190. // CHECK:STDOUT: %impl.elem0.loc5_11.2: type = impl_witness_access constants.%J.lookup_impl_witness.cd2, element0 [symbolic = %impl.elem0.loc5_11.1 (constants.%impl.elem0.fa9)]
  2191. // CHECK:STDOUT: %U.ref.loc5_11: type = name_ref U, %impl.elem0.loc5_11.2 [symbolic = %impl.elem0.loc5_11.1 (constants.%impl.elem0.fa9)]
  2192. // CHECK:STDOUT: }
  2193. // CHECK:STDOUT: %u: @J.F.%impl.elem0.loc5_11.1 (%impl.elem0.fa9) = value_binding u, %u.param
  2194. // CHECK:STDOUT: %return.param: ref @J.F.%impl.elem0.loc5_11.1 (%impl.elem0.fa9) = out_param call_param1
  2195. // CHECK:STDOUT: %return: ref @J.F.%impl.elem0.loc5_11.1 (%impl.elem0.fa9) = return_slot %return.param
  2196. // CHECK:STDOUT: }
  2197. // CHECK:STDOUT: %assoc1: %J.assoc_type = assoc_entity element1, %J.F.decl [concrete = constants.%assoc1]
  2198. // CHECK:STDOUT:
  2199. // CHECK:STDOUT: !members:
  2200. // CHECK:STDOUT: .Self = %Self
  2201. // CHECK:STDOUT: .U = @U.%assoc0
  2202. // CHECK:STDOUT: .F = %assoc1
  2203. // CHECK:STDOUT: witness = (%U, %J.F.decl)
  2204. // CHECK:STDOUT:
  2205. // CHECK:STDOUT: !requires:
  2206. // CHECK:STDOUT: }
  2207. // CHECK:STDOUT:
  2208. // CHECK:STDOUT: generic assoc_const @U(@J.%Self: %J.type) {
  2209. // CHECK:STDOUT: assoc_const U:! type;
  2210. // CHECK:STDOUT: }
  2211. // CHECK:STDOUT:
  2212. // CHECK:STDOUT: generic fn @J.F(@J.%Self: %J.type) {
  2213. // CHECK:STDOUT: %Self: %J.type = symbolic_binding Self, 0 [symbolic = %Self (constants.%Self.dc6)]
  2214. // CHECK:STDOUT: %J.lookup_impl_witness: <witness> = lookup_impl_witness %Self, @J [symbolic = %J.lookup_impl_witness (constants.%J.lookup_impl_witness.cd2)]
  2215. // 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.fa9)]
  2216. // CHECK:STDOUT: %pattern_type: type = pattern_type %impl.elem0.loc5_11.1 [symbolic = %pattern_type (constants.%pattern_type.345)]
  2217. // CHECK:STDOUT:
  2218. // CHECK:STDOUT: fn(%u.param: @J.F.%impl.elem0.loc5_11.1 (%impl.elem0.fa9)) -> @J.F.%impl.elem0.loc5_11.1 (%impl.elem0.fa9);
  2219. // CHECK:STDOUT: }
  2220. // CHECK:STDOUT:
  2221. // CHECK:STDOUT: generic fn @GenericCallFI32(%T.loc8_20.2: %J_where.type) {
  2222. // CHECK:STDOUT: %T.loc8_20.1: %J_where.type = symbolic_binding T, 0 [symbolic = %T.loc8_20.1 (constants.%T)]
  2223. // CHECK:STDOUT: %T.binding.as_type: type = symbolic_binding_type T, 0, %T.loc8_20.1 [symbolic = %T.binding.as_type (constants.%T.binding.as_type)]
  2224. // CHECK:STDOUT: %pattern_type: type = pattern_type %T.binding.as_type [symbolic = %pattern_type (constants.%pattern_type.2ce)]
  2225. // CHECK:STDOUT:
  2226. // CHECK:STDOUT: !definition:
  2227. // CHECK:STDOUT: %require_complete: <witness> = require_complete_type %T.binding.as_type [symbolic = %require_complete (constants.%require_complete.440)]
  2228. // CHECK:STDOUT: %J.lookup_impl_witness: <witness> = lookup_impl_witness %T.loc8_20.1, @J [symbolic = %J.lookup_impl_witness (constants.%J.lookup_impl_witness.873)]
  2229. // CHECK:STDOUT: %J.facet: %J.type = facet_value %T.binding.as_type, (%J.lookup_impl_witness) [symbolic = %J.facet (constants.%J.facet)]
  2230. // CHECK:STDOUT: %.loc9_11: type = fn_type_with_self_type constants.%J.F.type, %J.facet [symbolic = %.loc9_11 (constants.%.e93)]
  2231. // CHECK:STDOUT: %impl.elem1.loc9_11.2: @GenericCallFI32.%.loc9_11 (%.e93) = impl_witness_access %J.lookup_impl_witness, element1 [symbolic = %impl.elem1.loc9_11.2 (constants.%impl.elem1)]
  2232. // CHECK:STDOUT: %specific_impl_fn.loc9_11.2: <specific function> = specific_impl_function %impl.elem1.loc9_11.2, @J.F(%J.facet) [symbolic = %specific_impl_fn.loc9_11.2 (constants.%specific_impl_fn)]
  2233. // CHECK:STDOUT:
  2234. // CHECK:STDOUT: fn(%t.param: @GenericCallFI32.%T.binding.as_type (%T.binding.as_type)) -> %i32 {
  2235. // CHECK:STDOUT: !entry:
  2236. // CHECK:STDOUT: %t.ref: @GenericCallFI32.%T.binding.as_type (%T.binding.as_type) = name_ref t, %t
  2237. // CHECK:STDOUT: %F.ref: %J.assoc_type = name_ref F, @J.%assoc1 [concrete = constants.%assoc1]
  2238. // CHECK:STDOUT: %impl.elem1.loc9_11.1: @GenericCallFI32.%.loc9_11 (%.e93) = impl_witness_access constants.%J.lookup_impl_witness.873, element1 [symbolic = %impl.elem1.loc9_11.2 (constants.%impl.elem1)]
  2239. // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [concrete = constants.%int_2.ecc]
  2240. // CHECK:STDOUT: %specific_impl_fn.loc9_11.1: <specific function> = specific_impl_function %impl.elem1.loc9_11.1, @J.F(constants.%J.facet) [symbolic = %specific_impl_fn.loc9_11.2 (constants.%specific_impl_fn)]
  2241. // CHECK:STDOUT: %impl.elem0.loc9: %.322 = impl_witness_access constants.%ImplicitAs.impl_witness.bc9, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.e9b]
  2242. // CHECK:STDOUT: %bound_method.loc9_14.1: <bound method> = bound_method %int_2, %impl.elem0.loc9 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound]
  2243. // CHECK:STDOUT: %specific_fn: <specific function> = specific_function %impl.elem0.loc9, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn]
  2244. // CHECK:STDOUT: %bound_method.loc9_14.2: <bound method> = bound_method %int_2, %specific_fn [concrete = constants.%bound_method]
  2245. // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call: init %i32 = call %bound_method.loc9_14.2(%int_2) [concrete = constants.%int_2.ef8]
  2246. // CHECK:STDOUT: %.loc9_14.1: %i32 = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call [concrete = constants.%int_2.ef8]
  2247. // CHECK:STDOUT: %.loc9_14.2: %i32 = converted %int_2, %.loc9_14.1 [concrete = constants.%int_2.ef8]
  2248. // CHECK:STDOUT: %.loc9_15: init %i32 = call %specific_impl_fn.loc9_11.1(%.loc9_14.2)
  2249. // CHECK:STDOUT: return %.loc9_15 to %return
  2250. // CHECK:STDOUT: }
  2251. // CHECK:STDOUT: }
  2252. // CHECK:STDOUT:
  2253. // CHECK:STDOUT: specific @U(constants.%Self.dc6) {}
  2254. // CHECK:STDOUT:
  2255. // CHECK:STDOUT: specific @J.F(constants.%Self.dc6) {
  2256. // CHECK:STDOUT: %Self => constants.%Self.dc6
  2257. // CHECK:STDOUT: %J.lookup_impl_witness => constants.%J.lookup_impl_witness.cd2
  2258. // CHECK:STDOUT: %impl.elem0.loc5_11.1 => constants.%impl.elem0.fa9
  2259. // CHECK:STDOUT: %pattern_type => constants.%pattern_type.345
  2260. // CHECK:STDOUT: }
  2261. // CHECK:STDOUT:
  2262. // CHECK:STDOUT: specific @U(constants.%.Self.c58) {}
  2263. // CHECK:STDOUT:
  2264. // CHECK:STDOUT: specific @GenericCallFI32(constants.%T) {
  2265. // CHECK:STDOUT: %T.loc8_20.1 => constants.%T
  2266. // CHECK:STDOUT: %T.binding.as_type => constants.%T.binding.as_type
  2267. // CHECK:STDOUT: %pattern_type => constants.%pattern_type.2ce
  2268. // CHECK:STDOUT: }
  2269. // CHECK:STDOUT:
  2270. // CHECK:STDOUT: specific @J.F(constants.%J.facet) {
  2271. // CHECK:STDOUT: %Self => constants.%J.facet
  2272. // CHECK:STDOUT: %J.lookup_impl_witness => constants.%J.lookup_impl_witness.873
  2273. // CHECK:STDOUT: %impl.elem0.loc5_11.1 => constants.%i32
  2274. // CHECK:STDOUT: %pattern_type => constants.%pattern_type.7ce
  2275. // CHECK:STDOUT: }
  2276. // CHECK:STDOUT:
  2277. // CHECK:STDOUT: --- fail_todo_use_associated_constant_in_impl.carbon
  2278. // CHECK:STDOUT:
  2279. // CHECK:STDOUT: constants {
  2280. // CHECK:STDOUT: %J.type: type = facet_type <@J> [concrete]
  2281. // CHECK:STDOUT: %Self.dc6: %J.type = symbolic_binding Self, 0 [symbolic]
  2282. // CHECK:STDOUT: %J.assoc_type: type = assoc_entity_type @J [concrete]
  2283. // CHECK:STDOUT: %assoc0.411: %J.assoc_type = assoc_entity element0, @J.%U [concrete]
  2284. // CHECK:STDOUT: %J.lookup_impl_witness.cd2: <witness> = lookup_impl_witness %Self.dc6, @J [symbolic]
  2285. // CHECK:STDOUT: %impl.elem0.fa9: type = impl_witness_access %J.lookup_impl_witness.cd2, element0 [symbolic]
  2286. // CHECK:STDOUT: %pattern_type.345: type = pattern_type %impl.elem0.fa9 [symbolic]
  2287. // CHECK:STDOUT: %J.F.type: type = fn_type @J.F [concrete]
  2288. // CHECK:STDOUT: %J.F: %J.F.type = struct_value () [concrete]
  2289. // CHECK:STDOUT: %assoc1: %J.assoc_type = assoc_entity element1, @J.%J.F.decl [concrete]
  2290. // CHECK:STDOUT: %E: type = class_type @E [concrete]
  2291. // CHECK:STDOUT: %.Self: %J.type = symbolic_binding .Self [symbolic_self]
  2292. // CHECK:STDOUT: %.Self.binding.as_type: type = symbolic_binding_type .Self, %.Self [symbolic_self]
  2293. // CHECK:STDOUT: %J.lookup_impl_witness.ab8: <witness> = lookup_impl_witness %.Self, @J [symbolic_self]
  2294. // CHECK:STDOUT: %impl.elem0.ab2: type = impl_witness_access %J.lookup_impl_witness.ab8, element0 [symbolic_self]
  2295. // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete]
  2296. // CHECK:STDOUT: %Int.type: type = generic_class_type @Int [concrete]
  2297. // CHECK:STDOUT: %Int.generic: %Int.type = struct_value () [concrete]
  2298. // CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [concrete]
  2299. // CHECK:STDOUT: %J_where.type: type = facet_type <@J where %impl.elem0.ab2 = %i32> [concrete]
  2300. // CHECK:STDOUT: %J.impl_witness: <witness> = impl_witness @E.%J.impl_witness_table [concrete]
  2301. // CHECK:STDOUT: %ImplicitAs.type.cc7: type = generic_interface_type @ImplicitAs [concrete]
  2302. // CHECK:STDOUT: %ImplicitAs.generic: %ImplicitAs.type.cc7 = struct_value () [concrete]
  2303. // CHECK:STDOUT: %E.as.J.impl.F.type.3487c0.1: type = fn_type @E.as.J.impl.F.loc27_21.1 [concrete]
  2304. // CHECK:STDOUT: %E.as.J.impl.F.1487eb.1: %E.as.J.impl.F.type.3487c0.1 = struct_value () [concrete]
  2305. // CHECK:STDOUT: %J.facet: %J.type = facet_value %E, (%J.impl_witness) [concrete]
  2306. // CHECK:STDOUT: %pattern_type.7ce: type = pattern_type %i32 [concrete]
  2307. // CHECK:STDOUT: %E.as.J.impl.F.type.3487c0.2: type = fn_type @E.as.J.impl.F.loc27_21.2 [concrete]
  2308. // CHECK:STDOUT: %E.as.J.impl.F.1487eb.2: %E.as.J.impl.F.type.3487c0.2 = struct_value () [concrete]
  2309. // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete]
  2310. // CHECK:STDOUT: %complete_type.357: <witness> = complete_type_witness %empty_struct_type [concrete]
  2311. // CHECK:STDOUT: }
  2312. // CHECK:STDOUT:
  2313. // CHECK:STDOUT: imports {
  2314. // CHECK:STDOUT: %Core: <namespace> = namespace file.%Core.import, [concrete] {
  2315. // CHECK:STDOUT: .Int = %Core.Int
  2316. // CHECK:STDOUT: .ImplicitAs = %Core.ImplicitAs
  2317. // CHECK:STDOUT: import Core//prelude
  2318. // CHECK:STDOUT: import Core//prelude/...
  2319. // CHECK:STDOUT: }
  2320. // CHECK:STDOUT: %Core.Int: %Int.type = import_ref Core//prelude/parts/int, Int, loaded [concrete = constants.%Int.generic]
  2321. // CHECK:STDOUT: %Core.ImplicitAs: %ImplicitAs.type.cc7 = import_ref Core//prelude/parts/as, ImplicitAs, loaded [concrete = constants.%ImplicitAs.generic]
  2322. // CHECK:STDOUT: }
  2323. // CHECK:STDOUT:
  2324. // CHECK:STDOUT: file {
  2325. // CHECK:STDOUT: package: <namespace> = namespace [concrete] {
  2326. // CHECK:STDOUT: .Core = imports.%Core
  2327. // CHECK:STDOUT: .J = %J.decl
  2328. // CHECK:STDOUT: .E = %E.decl
  2329. // CHECK:STDOUT: }
  2330. // CHECK:STDOUT: %Core.import = import Core
  2331. // CHECK:STDOUT: %J.decl: type = interface_decl @J [concrete = constants.%J.type] {} {}
  2332. // CHECK:STDOUT: %E.decl: type = class_decl @E [concrete = constants.%E] {} {}
  2333. // CHECK:STDOUT: }
  2334. // CHECK:STDOUT:
  2335. // CHECK:STDOUT: interface @J {
  2336. // CHECK:STDOUT: %Self: %J.type = symbolic_binding Self, 0 [symbolic = constants.%Self.dc6]
  2337. // CHECK:STDOUT: %U: type = assoc_const_decl @U [concrete] {
  2338. // CHECK:STDOUT: %assoc0: %J.assoc_type = assoc_entity element0, @J.%U [concrete = constants.%assoc0.411]
  2339. // CHECK:STDOUT: }
  2340. // CHECK:STDOUT: %J.F.decl: %J.F.type = fn_decl @J.F [concrete = constants.%J.F] {
  2341. // CHECK:STDOUT: %u.patt: @J.F.%pattern_type (%pattern_type.345) = value_binding_pattern u [concrete]
  2342. // CHECK:STDOUT: %u.param_patt: @J.F.%pattern_type (%pattern_type.345) = value_param_pattern %u.patt, call_param0 [concrete]
  2343. // CHECK:STDOUT: %return.patt: @J.F.%pattern_type (%pattern_type.345) = return_slot_pattern [concrete]
  2344. // CHECK:STDOUT: %return.param_patt: @J.F.%pattern_type (%pattern_type.345) = out_param_pattern %return.patt, call_param1 [concrete]
  2345. // CHECK:STDOUT: } {
  2346. // CHECK:STDOUT: %impl.elem0.loc5_17: type = impl_witness_access constants.%J.lookup_impl_witness.cd2, element0 [symbolic = %impl.elem0.loc5_11.1 (constants.%impl.elem0.fa9)]
  2347. // CHECK:STDOUT: %U.ref.loc5_17: type = name_ref U, %impl.elem0.loc5_17 [symbolic = %impl.elem0.loc5_11.1 (constants.%impl.elem0.fa9)]
  2348. // CHECK:STDOUT: %u.param: @J.F.%impl.elem0.loc5_11.1 (%impl.elem0.fa9) = value_param call_param0
  2349. // CHECK:STDOUT: %.loc5: type = splice_block %U.ref.loc5_11 [symbolic = %impl.elem0.loc5_11.1 (constants.%impl.elem0.fa9)] {
  2350. // CHECK:STDOUT: %impl.elem0.loc5_11.2: type = impl_witness_access constants.%J.lookup_impl_witness.cd2, element0 [symbolic = %impl.elem0.loc5_11.1 (constants.%impl.elem0.fa9)]
  2351. // CHECK:STDOUT: %U.ref.loc5_11: type = name_ref U, %impl.elem0.loc5_11.2 [symbolic = %impl.elem0.loc5_11.1 (constants.%impl.elem0.fa9)]
  2352. // CHECK:STDOUT: }
  2353. // CHECK:STDOUT: %u: @J.F.%impl.elem0.loc5_11.1 (%impl.elem0.fa9) = value_binding u, %u.param
  2354. // CHECK:STDOUT: %return.param: ref @J.F.%impl.elem0.loc5_11.1 (%impl.elem0.fa9) = out_param call_param1
  2355. // CHECK:STDOUT: %return: ref @J.F.%impl.elem0.loc5_11.1 (%impl.elem0.fa9) = return_slot %return.param
  2356. // CHECK:STDOUT: }
  2357. // CHECK:STDOUT: %assoc1: %J.assoc_type = assoc_entity element1, %J.F.decl [concrete = constants.%assoc1]
  2358. // CHECK:STDOUT:
  2359. // CHECK:STDOUT: !members:
  2360. // CHECK:STDOUT: .Self = %Self
  2361. // CHECK:STDOUT: .U = @U.%assoc0
  2362. // CHECK:STDOUT: .F = %assoc1
  2363. // CHECK:STDOUT: witness = (%U, %J.F.decl)
  2364. // CHECK:STDOUT:
  2365. // CHECK:STDOUT: !requires:
  2366. // CHECK:STDOUT: }
  2367. // CHECK:STDOUT:
  2368. // CHECK:STDOUT: generic assoc_const @U(@J.%Self: %J.type) {
  2369. // CHECK:STDOUT: assoc_const U:! type;
  2370. // CHECK:STDOUT: }
  2371. // CHECK:STDOUT:
  2372. // CHECK:STDOUT: impl @E.as.J.impl: %Self.ref as %.loc9_20 {
  2373. // CHECK:STDOUT: %E.as.J.impl.F.decl.loc27_21.1: %E.as.J.impl.F.type.3487c0.1 = fn_decl @E.as.J.impl.F.loc27_21.1 [concrete = constants.%E.as.J.impl.F.1487eb.1] {
  2374. // CHECK:STDOUT: %u.patt: <error> = value_binding_pattern u [concrete]
  2375. // CHECK:STDOUT: %u.param_patt: <error> = value_param_pattern %u.patt, call_param0 [concrete]
  2376. // CHECK:STDOUT: %return.patt: <error> = return_slot_pattern [concrete]
  2377. // CHECK:STDOUT: %return.param_patt: <error> = out_param_pattern %return.patt, call_param1 [concrete]
  2378. // CHECK:STDOUT: } {
  2379. // CHECK:STDOUT: %U.ref.loc27_19: %J.assoc_type = name_ref U, @U.%assoc0 [concrete = constants.%assoc0.411]
  2380. // CHECK:STDOUT: %.loc27_19: type = converted %U.ref.loc27_19, <error> [concrete = <error>]
  2381. // CHECK:STDOUT: %u.param: <error> = value_param call_param0
  2382. // CHECK:STDOUT: %.1: <error> = splice_block <error> [concrete = <error>] {
  2383. // CHECK:STDOUT: %U.ref.loc27_13: %J.assoc_type = name_ref U, @U.%assoc0 [concrete = constants.%assoc0.411]
  2384. // CHECK:STDOUT: %.loc27_13: type = converted %U.ref.loc27_13, <error> [concrete = <error>]
  2385. // CHECK:STDOUT: }
  2386. // CHECK:STDOUT: %u: <error> = value_binding u, %u.param
  2387. // CHECK:STDOUT: %return.param: ref <error> = out_param call_param1
  2388. // CHECK:STDOUT: %return: ref <error> = return_slot %return.param
  2389. // CHECK:STDOUT: }
  2390. // CHECK:STDOUT: %E.as.J.impl.F.decl.loc27_21.2: %E.as.J.impl.F.type.3487c0.2 = fn_decl @E.as.J.impl.F.loc27_21.2 [concrete = constants.%E.as.J.impl.F.1487eb.2] {
  2391. // CHECK:STDOUT: %u.patt: %pattern_type.7ce = value_binding_pattern u [concrete]
  2392. // CHECK:STDOUT: %u.param_patt: %pattern_type.7ce = value_param_pattern %u.patt, call_param0 [concrete]
  2393. // CHECK:STDOUT: %return.patt: %pattern_type.7ce = return_slot_pattern [concrete]
  2394. // CHECK:STDOUT: %return.param_patt: %pattern_type.7ce = out_param_pattern %return.patt, call_param1 [concrete]
  2395. // CHECK:STDOUT: } {
  2396. // CHECK:STDOUT: %u.param: %i32 = value_param call_param0
  2397. // CHECK:STDOUT: %u: %i32 = value_binding u, %u.param
  2398. // CHECK:STDOUT: %return.param: ref %i32 = out_param call_param1
  2399. // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param
  2400. // CHECK:STDOUT: }
  2401. // CHECK:STDOUT:
  2402. // CHECK:STDOUT: !members:
  2403. // CHECK:STDOUT: .U = <poisoned>
  2404. // CHECK:STDOUT: .F = %E.as.J.impl.F.decl.loc27_21.1
  2405. // CHECK:STDOUT: witness = @E.%J.impl_witness
  2406. // CHECK:STDOUT: }
  2407. // CHECK:STDOUT:
  2408. // CHECK:STDOUT: class @E {
  2409. // CHECK:STDOUT: impl_decl @E.as.J.impl [concrete] {} {
  2410. // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%E [concrete = constants.%E]
  2411. // CHECK:STDOUT: %J.ref: type = name_ref J, file.%J.decl [concrete = constants.%J.type]
  2412. // CHECK:STDOUT: %.Self: %J.type = symbolic_binding .Self [symbolic_self = constants.%.Self]
  2413. // CHECK:STDOUT: %.Self.ref: %J.type = name_ref .Self, %.Self [symbolic_self = constants.%.Self]
  2414. // CHECK:STDOUT: %U.ref: %J.assoc_type = name_ref U, @U.%assoc0 [concrete = constants.%assoc0.411]
  2415. // CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self.ref [symbolic_self = constants.%.Self.binding.as_type]
  2416. // CHECK:STDOUT: %.loc9_26: type = converted %.Self.ref, %.Self.as_type [symbolic_self = constants.%.Self.binding.as_type]
  2417. // CHECK:STDOUT: %impl.elem0: type = impl_witness_access constants.%J.lookup_impl_witness.ab8, element0 [symbolic_self = constants.%impl.elem0.ab2]
  2418. // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete = constants.%int_32]
  2419. // CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32]
  2420. // CHECK:STDOUT: %.loc9_20: type = where_expr %.Self [concrete = constants.%J_where.type] {
  2421. // CHECK:STDOUT: requirement_base_facet_type constants.%J.type
  2422. // CHECK:STDOUT: requirement_rewrite %impl.elem0, %i32
  2423. // CHECK:STDOUT: }
  2424. // CHECK:STDOUT: }
  2425. // CHECK:STDOUT: %J.impl_witness_table = impl_witness_table (%impl_witness_assoc_constant, @E.as.J.impl.%E.as.J.impl.F.decl.loc27_21.2), @E.as.J.impl [concrete]
  2426. // CHECK:STDOUT: %J.impl_witness: <witness> = impl_witness %J.impl_witness_table [concrete = constants.%J.impl_witness]
  2427. // CHECK:STDOUT: %impl_witness_assoc_constant: type = impl_witness_assoc_constant constants.%i32 [concrete = constants.%i32]
  2428. // CHECK:STDOUT: %complete_type: <witness> = complete_type_witness constants.%empty_struct_type [concrete = constants.%complete_type.357]
  2429. // CHECK:STDOUT: complete_type_witness = %complete_type
  2430. // CHECK:STDOUT:
  2431. // CHECK:STDOUT: !members:
  2432. // CHECK:STDOUT: .Self = constants.%E
  2433. // CHECK:STDOUT: .J = <poisoned>
  2434. // CHECK:STDOUT: .U = <poisoned>
  2435. // CHECK:STDOUT: extend @E.as.J.impl.%.loc9_20
  2436. // CHECK:STDOUT: }
  2437. // CHECK:STDOUT:
  2438. // CHECK:STDOUT: generic fn @J.F(@J.%Self: %J.type) {
  2439. // CHECK:STDOUT: %Self: %J.type = symbolic_binding Self, 0 [symbolic = %Self (constants.%Self.dc6)]
  2440. // CHECK:STDOUT: %J.lookup_impl_witness: <witness> = lookup_impl_witness %Self, @J [symbolic = %J.lookup_impl_witness (constants.%J.lookup_impl_witness.cd2)]
  2441. // 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.fa9)]
  2442. // CHECK:STDOUT: %pattern_type: type = pattern_type %impl.elem0.loc5_11.1 [symbolic = %pattern_type (constants.%pattern_type.345)]
  2443. // CHECK:STDOUT:
  2444. // CHECK:STDOUT: fn(%u.param: @J.F.%impl.elem0.loc5_11.1 (%impl.elem0.fa9)) -> @J.F.%impl.elem0.loc5_11.1 (%impl.elem0.fa9);
  2445. // CHECK:STDOUT: }
  2446. // CHECK:STDOUT:
  2447. // CHECK:STDOUT: fn @E.as.J.impl.F.loc27_21.1(%u.param: <error>) -> <error> {
  2448. // CHECK:STDOUT: !entry:
  2449. // CHECK:STDOUT: %u.ref: <error> = name_ref u, %u
  2450. // CHECK:STDOUT: return <error> to %return
  2451. // CHECK:STDOUT: }
  2452. // CHECK:STDOUT:
  2453. // CHECK:STDOUT: fn @E.as.J.impl.F.loc27_21.2(%u.param: %i32) -> %i32 [thunk @E.as.J.impl.%E.as.J.impl.F.decl.loc27_21.1] {
  2454. // CHECK:STDOUT: !entry:
  2455. // CHECK:STDOUT: %F.ref: %E.as.J.impl.F.type.3487c0.1 = name_ref F, @E.as.J.impl.%E.as.J.impl.F.decl.loc27_21.1 [concrete = constants.%E.as.J.impl.F.1487eb.1]
  2456. // CHECK:STDOUT: %u.ref: %i32 = name_ref u, %u.param
  2457. // CHECK:STDOUT: %return.ref: ref %i32 = name_ref <return slot>, %return.param
  2458. // CHECK:STDOUT: %E.as.J.impl.F.call: init <error> = call %F.ref(<error>)
  2459. // CHECK:STDOUT: return <error> to %return
  2460. // CHECK:STDOUT: }
  2461. // CHECK:STDOUT:
  2462. // CHECK:STDOUT: specific @U(constants.%Self.dc6) {}
  2463. // CHECK:STDOUT:
  2464. // CHECK:STDOUT: specific @J.F(constants.%Self.dc6) {
  2465. // CHECK:STDOUT: %Self => constants.%Self.dc6
  2466. // CHECK:STDOUT: %J.lookup_impl_witness => constants.%J.lookup_impl_witness.cd2
  2467. // CHECK:STDOUT: %impl.elem0.loc5_11.1 => constants.%impl.elem0.fa9
  2468. // CHECK:STDOUT: %pattern_type => constants.%pattern_type.345
  2469. // CHECK:STDOUT: }
  2470. // CHECK:STDOUT:
  2471. // CHECK:STDOUT: specific @U(constants.%.Self) {}
  2472. // CHECK:STDOUT:
  2473. // CHECK:STDOUT: specific @J.F(constants.%J.facet) {
  2474. // CHECK:STDOUT: %Self => constants.%J.facet
  2475. // CHECK:STDOUT: %J.lookup_impl_witness => constants.%J.impl_witness
  2476. // CHECK:STDOUT: %impl.elem0.loc5_11.1 => constants.%i32
  2477. // CHECK:STDOUT: %pattern_type => constants.%pattern_type.7ce
  2478. // CHECK:STDOUT: }
  2479. // CHECK:STDOUT:
  2480. // CHECK:STDOUT: --- fail_todo_call_extend_fn.carbon
  2481. // CHECK:STDOUT:
  2482. // CHECK:STDOUT: constants {
  2483. // CHECK:STDOUT: %J.type: type = facet_type <@J> [concrete]
  2484. // CHECK:STDOUT: %Self: %J.type = symbolic_binding Self, 0 [symbolic]
  2485. // CHECK:STDOUT: %J.F.type: type = fn_type @J.F [concrete]
  2486. // CHECK:STDOUT: %J.F: %J.F.type = struct_value () [concrete]
  2487. // CHECK:STDOUT: %J.assoc_type: type = assoc_entity_type @J [concrete]
  2488. // CHECK:STDOUT: %assoc0: %J.assoc_type = assoc_entity element0, @J.%J.F.decl [concrete]
  2489. // CHECK:STDOUT: %E: type = class_type @E [concrete]
  2490. // CHECK:STDOUT: %J.impl_witness: <witness> = impl_witness @E.%J.impl_witness_table [concrete]
  2491. // CHECK:STDOUT: %E.as.J.impl.F.type: type = fn_type @E.as.J.impl.F [concrete]
  2492. // CHECK:STDOUT: %E.as.J.impl.F: %E.as.J.impl.F.type = struct_value () [concrete]
  2493. // CHECK:STDOUT: %J.facet: %J.type = facet_value %E, (%J.impl_witness) [concrete]
  2494. // CHECK:STDOUT: %E.G.type: type = fn_type @E.G [concrete]
  2495. // CHECK:STDOUT: %E.G: %E.G.type = struct_value () [concrete]
  2496. // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete]
  2497. // CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %empty_struct_type [concrete]
  2498. // CHECK:STDOUT: }
  2499. // CHECK:STDOUT:
  2500. // CHECK:STDOUT: imports {
  2501. // CHECK:STDOUT: %Core: <namespace> = namespace file.%Core.import, [concrete] {
  2502. // CHECK:STDOUT: import Core//prelude
  2503. // CHECK:STDOUT: import Core//prelude/...
  2504. // CHECK:STDOUT: }
  2505. // CHECK:STDOUT: }
  2506. // CHECK:STDOUT:
  2507. // CHECK:STDOUT: file {
  2508. // CHECK:STDOUT: package: <namespace> = namespace [concrete] {
  2509. // CHECK:STDOUT: .Core = imports.%Core
  2510. // CHECK:STDOUT: .J = %J.decl
  2511. // CHECK:STDOUT: .E = %E.decl
  2512. // CHECK:STDOUT: }
  2513. // CHECK:STDOUT: %Core.import = import Core
  2514. // CHECK:STDOUT: %J.decl: type = interface_decl @J [concrete = constants.%J.type] {} {}
  2515. // CHECK:STDOUT: %E.decl: type = class_decl @E [concrete = constants.%E] {} {}
  2516. // CHECK:STDOUT: }
  2517. // CHECK:STDOUT:
  2518. // CHECK:STDOUT: interface @J {
  2519. // CHECK:STDOUT: %Self: %J.type = symbolic_binding Self, 0 [symbolic = constants.%Self]
  2520. // CHECK:STDOUT: %J.F.decl: %J.F.type = fn_decl @J.F [concrete = constants.%J.F] {} {}
  2521. // CHECK:STDOUT: %assoc0: %J.assoc_type = assoc_entity element0, %J.F.decl [concrete = constants.%assoc0]
  2522. // CHECK:STDOUT:
  2523. // CHECK:STDOUT: !members:
  2524. // CHECK:STDOUT: .Self = %Self
  2525. // CHECK:STDOUT: .F = %assoc0
  2526. // CHECK:STDOUT: witness = (%J.F.decl)
  2527. // CHECK:STDOUT:
  2528. // CHECK:STDOUT: !requires:
  2529. // CHECK:STDOUT: }
  2530. // CHECK:STDOUT:
  2531. // CHECK:STDOUT: impl @E.as.J.impl: %Self.ref as %J.ref {
  2532. // CHECK:STDOUT: %E.as.J.impl.F.decl: %E.as.J.impl.F.type = fn_decl @E.as.J.impl.F [concrete = constants.%E.as.J.impl.F] {} {}
  2533. // CHECK:STDOUT:
  2534. // CHECK:STDOUT: !members:
  2535. // CHECK:STDOUT: .F = %E.as.J.impl.F.decl
  2536. // CHECK:STDOUT: witness = @E.%J.impl_witness
  2537. // CHECK:STDOUT: }
  2538. // CHECK:STDOUT:
  2539. // CHECK:STDOUT: class @E {
  2540. // CHECK:STDOUT: impl_decl @E.as.J.impl [concrete] {} {
  2541. // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%E [concrete = constants.%E]
  2542. // CHECK:STDOUT: %J.ref: type = name_ref J, file.%J.decl [concrete = constants.%J.type]
  2543. // CHECK:STDOUT: }
  2544. // CHECK:STDOUT: %J.impl_witness_table = impl_witness_table (@E.as.J.impl.%E.as.J.impl.F.decl), @E.as.J.impl [concrete]
  2545. // CHECK:STDOUT: %J.impl_witness: <witness> = impl_witness %J.impl_witness_table [concrete = constants.%J.impl_witness]
  2546. // CHECK:STDOUT: %E.G.decl: %E.G.type = fn_decl @E.G [concrete = constants.%E.G] {} {}
  2547. // CHECK:STDOUT: %complete_type: <witness> = complete_type_witness constants.%empty_struct_type [concrete = constants.%complete_type]
  2548. // CHECK:STDOUT: complete_type_witness = %complete_type
  2549. // CHECK:STDOUT:
  2550. // CHECK:STDOUT: !members:
  2551. // CHECK:STDOUT: .Self = constants.%E
  2552. // CHECK:STDOUT: .J = <poisoned>
  2553. // CHECK:STDOUT: .G = %E.G.decl
  2554. // CHECK:STDOUT: .F = <poisoned>
  2555. // CHECK:STDOUT: extend @E.as.J.impl.%J.ref
  2556. // CHECK:STDOUT: }
  2557. // CHECK:STDOUT:
  2558. // CHECK:STDOUT: generic fn @J.F(@J.%Self: %J.type) {
  2559. // CHECK:STDOUT: !definition:
  2560. // CHECK:STDOUT:
  2561. // CHECK:STDOUT: fn() {
  2562. // CHECK:STDOUT: !entry:
  2563. // CHECK:STDOUT: return
  2564. // CHECK:STDOUT: }
  2565. // CHECK:STDOUT: }
  2566. // CHECK:STDOUT:
  2567. // CHECK:STDOUT: fn @E.as.J.impl.F() {
  2568. // CHECK:STDOUT: !entry:
  2569. // CHECK:STDOUT: return
  2570. // CHECK:STDOUT: }
  2571. // CHECK:STDOUT:
  2572. // CHECK:STDOUT: fn @E.G() {
  2573. // CHECK:STDOUT: !entry:
  2574. // CHECK:STDOUT: %F.ref: %J.assoc_type = name_ref F, @J.%assoc0 [concrete = constants.%assoc0]
  2575. // CHECK:STDOUT: return
  2576. // CHECK:STDOUT: }
  2577. // CHECK:STDOUT:
  2578. // CHECK:STDOUT: specific @J.F(constants.%Self) {}
  2579. // CHECK:STDOUT:
  2580. // CHECK:STDOUT: specific @J.F(constants.%J.facet) {}
  2581. // CHECK:STDOUT:
  2582. // CHECK:STDOUT: --- call_extend_method.carbon
  2583. // CHECK:STDOUT:
  2584. // CHECK:STDOUT: constants {
  2585. // CHECK:STDOUT: %J.type: type = facet_type <@J> [concrete]
  2586. // CHECK:STDOUT: %Self: %J.type = symbolic_binding Self, 0 [symbolic]
  2587. // CHECK:STDOUT: %Self.binding.as_type: type = symbolic_binding_type Self, 0, %Self [symbolic]
  2588. // CHECK:STDOUT: %pattern_type.4c4: type = pattern_type %Self.binding.as_type [symbolic]
  2589. // CHECK:STDOUT: %J.F.type: type = fn_type @J.F [concrete]
  2590. // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete]
  2591. // CHECK:STDOUT: %J.F: %J.F.type = struct_value () [concrete]
  2592. // CHECK:STDOUT: %J.assoc_type: type = assoc_entity_type @J [concrete]
  2593. // CHECK:STDOUT: %assoc0: %J.assoc_type = assoc_entity element0, @J.%J.F.decl [concrete]
  2594. // CHECK:STDOUT: %require_complete: <witness> = require_complete_type %Self.binding.as_type [symbolic]
  2595. // CHECK:STDOUT: %E: type = class_type @E [concrete]
  2596. // CHECK:STDOUT: %J.impl_witness: <witness> = impl_witness @E.%J.impl_witness_table [concrete]
  2597. // CHECK:STDOUT: %pattern_type.a4a: type = pattern_type %E [concrete]
  2598. // CHECK:STDOUT: %E.as.J.impl.F.type: type = fn_type @E.as.J.impl.F [concrete]
  2599. // CHECK:STDOUT: %E.as.J.impl.F: %E.as.J.impl.F.type = struct_value () [concrete]
  2600. // CHECK:STDOUT: %J.facet: %J.type = facet_value %E, (%J.impl_witness) [concrete]
  2601. // CHECK:STDOUT: %E.G.type: type = fn_type @E.G [concrete]
  2602. // CHECK:STDOUT: %E.G: %E.G.type = struct_value () [concrete]
  2603. // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete]
  2604. // CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %empty_struct_type [concrete]
  2605. // CHECK:STDOUT: %.225: type = fn_type_with_self_type %J.F.type, %J.facet [concrete]
  2606. // CHECK:STDOUT: }
  2607. // CHECK:STDOUT:
  2608. // CHECK:STDOUT: imports {
  2609. // CHECK:STDOUT: %Core: <namespace> = namespace file.%Core.import, [concrete] {
  2610. // CHECK:STDOUT: import Core//prelude
  2611. // CHECK:STDOUT: import Core//prelude/...
  2612. // CHECK:STDOUT: }
  2613. // CHECK:STDOUT: }
  2614. // CHECK:STDOUT:
  2615. // CHECK:STDOUT: file {
  2616. // CHECK:STDOUT: package: <namespace> = namespace [concrete] {
  2617. // CHECK:STDOUT: .Core = imports.%Core
  2618. // CHECK:STDOUT: .J = %J.decl
  2619. // CHECK:STDOUT: .E = %E.decl
  2620. // CHECK:STDOUT: }
  2621. // CHECK:STDOUT: %Core.import = import Core
  2622. // CHECK:STDOUT: %J.decl: type = interface_decl @J [concrete = constants.%J.type] {} {}
  2623. // CHECK:STDOUT: %E.decl: type = class_decl @E [concrete = constants.%E] {} {}
  2624. // CHECK:STDOUT: }
  2625. // CHECK:STDOUT:
  2626. // CHECK:STDOUT: interface @J {
  2627. // CHECK:STDOUT: %Self: %J.type = symbolic_binding Self, 0 [symbolic = constants.%Self]
  2628. // CHECK:STDOUT: %J.F.decl: %J.F.type = fn_decl @J.F [concrete = constants.%J.F] {
  2629. // CHECK:STDOUT: %self.patt: @J.F.%pattern_type (%pattern_type.4c4) = value_binding_pattern self [concrete]
  2630. // CHECK:STDOUT: %self.param_patt: @J.F.%pattern_type (%pattern_type.4c4) = value_param_pattern %self.patt, call_param0 [concrete]
  2631. // CHECK:STDOUT: } {
  2632. // CHECK:STDOUT: %self.param: @J.F.%Self.binding.as_type (%Self.binding.as_type) = value_param call_param0
  2633. // CHECK:STDOUT: %.loc4_14.1: type = splice_block %.loc4_14.2 [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)] {
  2634. // CHECK:STDOUT: %Self.ref: %J.type = name_ref Self, @J.%Self [symbolic = %Self (constants.%Self)]
  2635. // CHECK:STDOUT: %Self.as_type: type = facet_access_type %Self.ref [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)]
  2636. // CHECK:STDOUT: %.loc4_14.2: type = converted %Self.ref, %Self.as_type [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)]
  2637. // CHECK:STDOUT: }
  2638. // CHECK:STDOUT: %self: @J.F.%Self.binding.as_type (%Self.binding.as_type) = value_binding self, %self.param
  2639. // CHECK:STDOUT: }
  2640. // CHECK:STDOUT: %assoc0: %J.assoc_type = assoc_entity element0, %J.F.decl [concrete = constants.%assoc0]
  2641. // CHECK:STDOUT:
  2642. // CHECK:STDOUT: !members:
  2643. // CHECK:STDOUT: .Self = %Self
  2644. // CHECK:STDOUT: .F = %assoc0
  2645. // CHECK:STDOUT: witness = (%J.F.decl)
  2646. // CHECK:STDOUT:
  2647. // CHECK:STDOUT: !requires:
  2648. // CHECK:STDOUT: }
  2649. // CHECK:STDOUT:
  2650. // CHECK:STDOUT: impl @E.as.J.impl: %Self.ref as %J.ref {
  2651. // CHECK:STDOUT: %E.as.J.impl.F.decl: %E.as.J.impl.F.type = fn_decl @E.as.J.impl.F [concrete = constants.%E.as.J.impl.F] {
  2652. // CHECK:STDOUT: %self.patt: %pattern_type.a4a = value_binding_pattern self [concrete]
  2653. // CHECK:STDOUT: %self.param_patt: %pattern_type.a4a = value_param_pattern %self.patt, call_param0 [concrete]
  2654. // CHECK:STDOUT: } {
  2655. // CHECK:STDOUT: %self.param: %E = value_param call_param0
  2656. // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%E [concrete = constants.%E]
  2657. // CHECK:STDOUT: %self: %E = value_binding self, %self.param
  2658. // CHECK:STDOUT: }
  2659. // CHECK:STDOUT:
  2660. // CHECK:STDOUT: !members:
  2661. // CHECK:STDOUT: .F = %E.as.J.impl.F.decl
  2662. // CHECK:STDOUT: witness = @E.%J.impl_witness
  2663. // CHECK:STDOUT: }
  2664. // CHECK:STDOUT:
  2665. // CHECK:STDOUT: class @E {
  2666. // CHECK:STDOUT: impl_decl @E.as.J.impl [concrete] {} {
  2667. // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%E [concrete = constants.%E]
  2668. // CHECK:STDOUT: %J.ref: type = name_ref J, file.%J.decl [concrete = constants.%J.type]
  2669. // CHECK:STDOUT: }
  2670. // CHECK:STDOUT: %J.impl_witness_table = impl_witness_table (@E.as.J.impl.%E.as.J.impl.F.decl), @E.as.J.impl [concrete]
  2671. // CHECK:STDOUT: %J.impl_witness: <witness> = impl_witness %J.impl_witness_table [concrete = constants.%J.impl_witness]
  2672. // CHECK:STDOUT: %E.G.decl: %E.G.type = fn_decl @E.G [concrete = constants.%E.G] {
  2673. // CHECK:STDOUT: %self.patt: %pattern_type.a4a = value_binding_pattern self [concrete]
  2674. // CHECK:STDOUT: %self.param_patt: %pattern_type.a4a = value_param_pattern %self.patt, call_param0 [concrete]
  2675. // CHECK:STDOUT: } {
  2676. // CHECK:STDOUT: %self.param: %E = value_param call_param0
  2677. // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%E [concrete = constants.%E]
  2678. // CHECK:STDOUT: %self: %E = value_binding self, %self.param
  2679. // CHECK:STDOUT: }
  2680. // CHECK:STDOUT: %complete_type: <witness> = complete_type_witness constants.%empty_struct_type [concrete = constants.%complete_type]
  2681. // CHECK:STDOUT: complete_type_witness = %complete_type
  2682. // CHECK:STDOUT:
  2683. // CHECK:STDOUT: !members:
  2684. // CHECK:STDOUT: .Self = constants.%E
  2685. // CHECK:STDOUT: .J = <poisoned>
  2686. // CHECK:STDOUT: .G = %E.G.decl
  2687. // CHECK:STDOUT: .F = <poisoned>
  2688. // CHECK:STDOUT: extend @E.as.J.impl.%J.ref
  2689. // CHECK:STDOUT: }
  2690. // CHECK:STDOUT:
  2691. // CHECK:STDOUT: generic fn @J.F(@J.%Self: %J.type) {
  2692. // CHECK:STDOUT: %Self: %J.type = symbolic_binding Self, 0 [symbolic = %Self (constants.%Self)]
  2693. // CHECK:STDOUT: %Self.binding.as_type: type = symbolic_binding_type Self, 0, %Self [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)]
  2694. // CHECK:STDOUT: %pattern_type: type = pattern_type %Self.binding.as_type [symbolic = %pattern_type (constants.%pattern_type.4c4)]
  2695. // CHECK:STDOUT:
  2696. // CHECK:STDOUT: !definition:
  2697. // CHECK:STDOUT: %require_complete: <witness> = require_complete_type %Self.binding.as_type [symbolic = %require_complete (constants.%require_complete)]
  2698. // CHECK:STDOUT:
  2699. // CHECK:STDOUT: fn(%self.param: @J.F.%Self.binding.as_type (%Self.binding.as_type)) {
  2700. // CHECK:STDOUT: !entry:
  2701. // CHECK:STDOUT: return
  2702. // CHECK:STDOUT: }
  2703. // CHECK:STDOUT: }
  2704. // CHECK:STDOUT:
  2705. // CHECK:STDOUT: fn @E.as.J.impl.F(%self.param: %E) {
  2706. // CHECK:STDOUT: !entry:
  2707. // CHECK:STDOUT: return
  2708. // CHECK:STDOUT: }
  2709. // CHECK:STDOUT:
  2710. // CHECK:STDOUT: fn @E.G(%self.param: %E) {
  2711. // CHECK:STDOUT: !entry:
  2712. // CHECK:STDOUT: %self.ref: %E = name_ref self, %self
  2713. // CHECK:STDOUT: %F.ref: %J.assoc_type = name_ref F, @J.%assoc0 [concrete = constants.%assoc0]
  2714. // CHECK:STDOUT: %impl.elem0: %.225 = impl_witness_access constants.%J.impl_witness, element0 [concrete = constants.%E.as.J.impl.F]
  2715. // CHECK:STDOUT: %bound_method: <bound method> = bound_method %self.ref, %impl.elem0
  2716. // CHECK:STDOUT: %E.as.J.impl.F.call: init %empty_tuple.type = call %bound_method(%self.ref)
  2717. // CHECK:STDOUT: return
  2718. // CHECK:STDOUT: }
  2719. // CHECK:STDOUT:
  2720. // CHECK:STDOUT: specific @J.F(constants.%Self) {
  2721. // CHECK:STDOUT: %Self => constants.%Self
  2722. // CHECK:STDOUT: %Self.binding.as_type => constants.%Self.binding.as_type
  2723. // CHECK:STDOUT: %pattern_type => constants.%pattern_type.4c4
  2724. // CHECK:STDOUT: }
  2725. // CHECK:STDOUT:
  2726. // CHECK:STDOUT: specific @J.F(constants.%J.facet) {
  2727. // CHECK:STDOUT: %Self => constants.%J.facet
  2728. // CHECK:STDOUT: %Self.binding.as_type => constants.%E
  2729. // CHECK:STDOUT: %pattern_type => constants.%pattern_type.a4a
  2730. // CHECK:STDOUT: }
  2731. // CHECK:STDOUT:
  2732. // CHECK:STDOUT: --- fail_todo_use_extend_constant.carbon
  2733. // CHECK:STDOUT:
  2734. // CHECK:STDOUT: constants {
  2735. // CHECK:STDOUT: %J.type: type = facet_type <@J> [concrete]
  2736. // CHECK:STDOUT: %Self.dc6: %J.type = symbolic_binding Self, 0 [symbolic]
  2737. // CHECK:STDOUT: %J.assoc_type: type = assoc_entity_type @J [concrete]
  2738. // CHECK:STDOUT: %assoc0.8fd: %J.assoc_type = assoc_entity element0, @J.%X [concrete]
  2739. // CHECK:STDOUT: %E: type = class_type @E [concrete]
  2740. // CHECK:STDOUT: %.Self: %J.type = symbolic_binding .Self [symbolic_self]
  2741. // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete]
  2742. // CHECK:STDOUT: %.Self.binding.as_type: type = symbolic_binding_type .Self, %.Self [symbolic_self]
  2743. // CHECK:STDOUT: %J.lookup_impl_witness: <witness> = lookup_impl_witness %.Self, @J [symbolic_self]
  2744. // CHECK:STDOUT: %impl.elem0: type = impl_witness_access %J.lookup_impl_witness, element0 [symbolic_self]
  2745. // CHECK:STDOUT: %empty_tuple: %empty_tuple.type = tuple_value () [concrete]
  2746. // CHECK:STDOUT: %J_where.type: type = facet_type <@J where %impl.elem0 = %empty_tuple.type> [concrete]
  2747. // CHECK:STDOUT: %J.impl_witness: <witness> = impl_witness @E.%J.impl_witness_table [concrete]
  2748. // CHECK:STDOUT: %ImplicitAs.type.cc7: type = generic_interface_type @ImplicitAs [concrete]
  2749. // CHECK:STDOUT: %ImplicitAs.generic: %ImplicitAs.type.cc7 = struct_value () [concrete]
  2750. // CHECK:STDOUT: %E.G.type: type = fn_type @E.G [concrete]
  2751. // CHECK:STDOUT: %E.G: %E.G.type = struct_value () [concrete]
  2752. // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete]
  2753. // CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %empty_struct_type [concrete]
  2754. // CHECK:STDOUT: }
  2755. // CHECK:STDOUT:
  2756. // CHECK:STDOUT: imports {
  2757. // CHECK:STDOUT: %Core: <namespace> = namespace file.%Core.import, [concrete] {
  2758. // CHECK:STDOUT: .ImplicitAs = %Core.ImplicitAs
  2759. // CHECK:STDOUT: import Core//prelude
  2760. // CHECK:STDOUT: import Core//prelude/...
  2761. // CHECK:STDOUT: }
  2762. // CHECK:STDOUT: %Core.ImplicitAs: %ImplicitAs.type.cc7 = import_ref Core//prelude/parts/as, ImplicitAs, loaded [concrete = constants.%ImplicitAs.generic]
  2763. // CHECK:STDOUT: }
  2764. // CHECK:STDOUT:
  2765. // CHECK:STDOUT: file {
  2766. // CHECK:STDOUT: package: <namespace> = namespace [concrete] {
  2767. // CHECK:STDOUT: .Core = imports.%Core
  2768. // CHECK:STDOUT: .J = %J.decl
  2769. // CHECK:STDOUT: .E = %E.decl
  2770. // CHECK:STDOUT: }
  2771. // CHECK:STDOUT: %Core.import = import Core
  2772. // CHECK:STDOUT: %J.decl: type = interface_decl @J [concrete = constants.%J.type] {} {}
  2773. // CHECK:STDOUT: %E.decl: type = class_decl @E [concrete = constants.%E] {} {}
  2774. // CHECK:STDOUT: }
  2775. // CHECK:STDOUT:
  2776. // CHECK:STDOUT: interface @J {
  2777. // CHECK:STDOUT: %Self: %J.type = symbolic_binding Self, 0 [symbolic = constants.%Self.dc6]
  2778. // CHECK:STDOUT: %X: type = assoc_const_decl @X [concrete] {
  2779. // CHECK:STDOUT: %assoc0: %J.assoc_type = assoc_entity element0, @J.%X [concrete = constants.%assoc0.8fd]
  2780. // CHECK:STDOUT: }
  2781. // CHECK:STDOUT:
  2782. // CHECK:STDOUT: !members:
  2783. // CHECK:STDOUT: .Self = %Self
  2784. // CHECK:STDOUT: .X = @X.%assoc0
  2785. // CHECK:STDOUT: witness = (%X)
  2786. // CHECK:STDOUT:
  2787. // CHECK:STDOUT: !requires:
  2788. // CHECK:STDOUT: }
  2789. // CHECK:STDOUT:
  2790. // CHECK:STDOUT: generic assoc_const @X(@J.%Self: %J.type) {
  2791. // CHECK:STDOUT: assoc_const X:! type;
  2792. // CHECK:STDOUT: }
  2793. // CHECK:STDOUT:
  2794. // CHECK:STDOUT: impl @E.as.J.impl: %Self.ref as %.loc8_20 {
  2795. // CHECK:STDOUT: !members:
  2796. // CHECK:STDOUT: witness = @E.%J.impl_witness
  2797. // CHECK:STDOUT: }
  2798. // CHECK:STDOUT:
  2799. // CHECK:STDOUT: class @E {
  2800. // CHECK:STDOUT: impl_decl @E.as.J.impl [concrete] {} {
  2801. // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%E [concrete = constants.%E]
  2802. // CHECK:STDOUT: %J.ref: type = name_ref J, file.%J.decl [concrete = constants.%J.type]
  2803. // CHECK:STDOUT: %.Self: %J.type = symbolic_binding .Self [symbolic_self = constants.%.Self]
  2804. // CHECK:STDOUT: %.Self.ref: %J.type = name_ref .Self, %.Self [symbolic_self = constants.%.Self]
  2805. // CHECK:STDOUT: %X.ref: %J.assoc_type = name_ref X, @X.%assoc0 [concrete = constants.%assoc0.8fd]
  2806. // CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self.ref [symbolic_self = constants.%.Self.binding.as_type]
  2807. // CHECK:STDOUT: %.loc8_26: type = converted %.Self.ref, %.Self.as_type [symbolic_self = constants.%.Self.binding.as_type]
  2808. // CHECK:STDOUT: %impl.elem0: type = impl_witness_access constants.%J.lookup_impl_witness, element0 [symbolic_self = constants.%impl.elem0]
  2809. // CHECK:STDOUT: %.loc8_32.1: %empty_tuple.type = tuple_literal () [concrete = constants.%empty_tuple]
  2810. // CHECK:STDOUT: %.loc8_32.2: type = converted %.loc8_32.1, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type]
  2811. // CHECK:STDOUT: %.loc8_20: type = where_expr %.Self [concrete = constants.%J_where.type] {
  2812. // CHECK:STDOUT: requirement_base_facet_type constants.%J.type
  2813. // CHECK:STDOUT: requirement_rewrite %impl.elem0, %.loc8_32.2
  2814. // CHECK:STDOUT: }
  2815. // CHECK:STDOUT: }
  2816. // CHECK:STDOUT: %J.impl_witness_table = impl_witness_table (%impl_witness_assoc_constant), @E.as.J.impl [concrete]
  2817. // CHECK:STDOUT: %J.impl_witness: <witness> = impl_witness %J.impl_witness_table [concrete = constants.%J.impl_witness]
  2818. // CHECK:STDOUT: %impl_witness_assoc_constant: type = impl_witness_assoc_constant constants.%empty_tuple.type [concrete = constants.%empty_tuple.type]
  2819. // CHECK:STDOUT: %E.G.decl: %E.G.type = fn_decl @E.G [concrete = constants.%E.G] {
  2820. // CHECK:STDOUT: %return.patt: <error> = return_slot_pattern [concrete]
  2821. // CHECK:STDOUT: %return.param_patt: <error> = out_param_pattern %return.patt, call_param0 [concrete]
  2822. // CHECK:STDOUT: } {
  2823. // CHECK:STDOUT: %X.ref: %J.assoc_type = name_ref X, @X.%assoc0 [concrete = constants.%assoc0.8fd]
  2824. // CHECK:STDOUT: %.loc18_13: type = converted %X.ref, <error> [concrete = <error>]
  2825. // CHECK:STDOUT: %return.param: ref <error> = out_param call_param0
  2826. // CHECK:STDOUT: %return: ref <error> = return_slot %return.param
  2827. // CHECK:STDOUT: }
  2828. // CHECK:STDOUT: %complete_type: <witness> = complete_type_witness constants.%empty_struct_type [concrete = constants.%complete_type]
  2829. // CHECK:STDOUT: complete_type_witness = %complete_type
  2830. // CHECK:STDOUT:
  2831. // CHECK:STDOUT: !members:
  2832. // CHECK:STDOUT: .Self = constants.%E
  2833. // CHECK:STDOUT: .J = <poisoned>
  2834. // CHECK:STDOUT: .X = <poisoned>
  2835. // CHECK:STDOUT: .G = %E.G.decl
  2836. // CHECK:STDOUT: extend @E.as.J.impl.%.loc8_20
  2837. // CHECK:STDOUT: }
  2838. // CHECK:STDOUT:
  2839. // CHECK:STDOUT: fn @E.G() -> <error> {
  2840. // CHECK:STDOUT: !entry:
  2841. // CHECK:STDOUT: %.loc18_25: %empty_tuple.type = tuple_literal () [concrete = constants.%empty_tuple]
  2842. // CHECK:STDOUT: return <error> to %return
  2843. // CHECK:STDOUT: }
  2844. // CHECK:STDOUT:
  2845. // CHECK:STDOUT: specific @X(constants.%Self.dc6) {}
  2846. // CHECK:STDOUT:
  2847. // CHECK:STDOUT: specific @X(constants.%.Self) {}
  2848. // CHECK:STDOUT:
  2849. // CHECK:STDOUT: --- fail_todo_self_period_associated_type.carbon
  2850. // CHECK:STDOUT:
  2851. // CHECK:STDOUT: constants {
  2852. // CHECK:STDOUT: %J2.type: type = facet_type <@J2> [concrete]
  2853. // CHECK:STDOUT: %Self: %J2.type = symbolic_binding Self, 0 [symbolic]
  2854. // CHECK:STDOUT: %J2.assoc_type: type = assoc_entity_type @J2 [concrete]
  2855. // CHECK:STDOUT: %assoc0: %J2.assoc_type = assoc_entity element0, @J2.%U2 [concrete]
  2856. // CHECK:STDOUT: %Self.binding.as_type: type = symbolic_binding_type Self, 0, %Self [symbolic]
  2857. // CHECK:STDOUT: %pattern_type.0a6: type = pattern_type %Self.binding.as_type [symbolic]
  2858. // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete]
  2859. // CHECK:STDOUT: %J2.F.type: type = fn_type @J2.F [concrete]
  2860. // CHECK:STDOUT: %J2.F: %J2.F.type = struct_value () [concrete]
  2861. // CHECK:STDOUT: %assoc1: %J2.assoc_type = assoc_entity element1, @J2.%J2.F.decl [concrete]
  2862. // CHECK:STDOUT: %empty_tuple: %empty_tuple.type = tuple_value () [concrete]
  2863. // CHECK:STDOUT: %.Self: %J2.type = symbolic_binding .Self [symbolic_self]
  2864. // CHECK:STDOUT: %.Self.binding.as_type: type = symbolic_binding_type .Self, %.Self [symbolic_self]
  2865. // CHECK:STDOUT: %J2.lookup_impl_witness: <witness> = lookup_impl_witness %.Self, @J2 [symbolic_self]
  2866. // CHECK:STDOUT: %impl.elem0: type = impl_witness_access %J2.lookup_impl_witness, element0 [symbolic_self]
  2867. // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete]
  2868. // CHECK:STDOUT: %empty_struct: %empty_struct_type = struct_value () [concrete]
  2869. // CHECK:STDOUT: %J2_where.type.744: type = facet_type <@J2 where %impl.elem0 = %empty_struct_type> [concrete]
  2870. // CHECK:STDOUT: %J2.impl_witness.b89: <witness> = impl_witness file.%J2.impl_witness_table.loc22 [concrete]
  2871. // CHECK:STDOUT: %pattern_type.cb1: type = pattern_type %empty_tuple.type [concrete]
  2872. // CHECK:STDOUT: %pattern_type.a96: type = pattern_type %empty_struct_type [concrete]
  2873. // CHECK:STDOUT: %empty_tuple.type.as.J2.impl.F.type.d9b215.1: type = fn_type @empty_tuple.type.as.J2.impl.F.loc23_33.1 [concrete]
  2874. // CHECK:STDOUT: %empty_tuple.type.as.J2.impl.F.b047a1.1: %empty_tuple.type.as.J2.impl.F.type.d9b215.1 = struct_value () [concrete]
  2875. // CHECK:STDOUT: %J2.facet.02c: %J2.type = facet_value %empty_tuple.type, (%J2.impl_witness.b89) [concrete]
  2876. // CHECK:STDOUT: %empty_tuple.type.as.J2.impl.F.type.d9b215.2: type = fn_type @empty_tuple.type.as.J2.impl.F.loc23_33.2 [concrete]
  2877. // CHECK:STDOUT: %empty_tuple.type.as.J2.impl.F.b047a1.2: %empty_tuple.type.as.J2.impl.F.type.d9b215.2 = struct_value () [concrete]
  2878. // CHECK:STDOUT: %C2: type = class_type @C2 [concrete]
  2879. // CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %empty_struct_type [concrete]
  2880. // CHECK:STDOUT: %J2_where.type.76d: type = facet_type <@J2 where %impl.elem0 = %C2> [concrete]
  2881. // CHECK:STDOUT: %J2.impl_witness.b77: <witness> = impl_witness file.%J2.impl_witness_table.loc31 [concrete]
  2882. // CHECK:STDOUT: %pattern_type.838: type = pattern_type %C2 [concrete]
  2883. // CHECK:STDOUT: %C2.as.J2.impl.F.type.5b1c29.1: type = fn_type @C2.as.J2.impl.F.loc32_33.1 [concrete]
  2884. // CHECK:STDOUT: %C2.as.J2.impl.F.8b36c6.1: %C2.as.J2.impl.F.type.5b1c29.1 = struct_value () [concrete]
  2885. // CHECK:STDOUT: %J2.facet.73a: %J2.type = facet_value %C2, (%J2.impl_witness.b77) [concrete]
  2886. // CHECK:STDOUT: %C2.as.J2.impl.F.type.5b1c29.2: type = fn_type @C2.as.J2.impl.F.loc32_33.2 [concrete]
  2887. // CHECK:STDOUT: %C2.as.J2.impl.F.8b36c6.2: %C2.as.J2.impl.F.type.5b1c29.2 = struct_value () [concrete]
  2888. // CHECK:STDOUT: %C2.val: %C2 = struct_value () [concrete]
  2889. // CHECK:STDOUT: }
  2890. // CHECK:STDOUT:
  2891. // CHECK:STDOUT: imports {
  2892. // CHECK:STDOUT: %Core: <namespace> = namespace file.%Core.import, [concrete] {
  2893. // CHECK:STDOUT: import Core//prelude
  2894. // CHECK:STDOUT: import Core//prelude/...
  2895. // CHECK:STDOUT: }
  2896. // CHECK:STDOUT: }
  2897. // CHECK:STDOUT:
  2898. // CHECK:STDOUT: file {
  2899. // CHECK:STDOUT: package: <namespace> = namespace [concrete] {
  2900. // CHECK:STDOUT: .Core = imports.%Core
  2901. // CHECK:STDOUT: .J2 = %J2.decl
  2902. // CHECK:STDOUT: .C2 = %C2.decl
  2903. // CHECK:STDOUT: }
  2904. // CHECK:STDOUT: %Core.import = import Core
  2905. // CHECK:STDOUT: %J2.decl: type = interface_decl @J2 [concrete = constants.%J2.type] {} {}
  2906. // CHECK:STDOUT: impl_decl @empty_tuple.type.as.J2.impl [concrete] {} {
  2907. // CHECK:STDOUT: %.loc22_7.1: %empty_tuple.type = tuple_literal () [concrete = constants.%empty_tuple]
  2908. // CHECK:STDOUT: %.loc22_7.2: type = converted %.loc22_7.1, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type]
  2909. // CHECK:STDOUT: %J2.ref: type = name_ref J2, file.%J2.decl [concrete = constants.%J2.type]
  2910. // CHECK:STDOUT: %.Self: %J2.type = symbolic_binding .Self [symbolic_self = constants.%.Self]
  2911. // CHECK:STDOUT: %.Self.ref: %J2.type = name_ref .Self, %.Self [symbolic_self = constants.%.Self]
  2912. // CHECK:STDOUT: %U2.ref: %J2.assoc_type = name_ref U2, @U2.%assoc0 [concrete = constants.%assoc0]
  2913. // CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self.ref [symbolic_self = constants.%.Self.binding.as_type]
  2914. // CHECK:STDOUT: %.loc22_21: type = converted %.Self.ref, %.Self.as_type [symbolic_self = constants.%.Self.binding.as_type]
  2915. // CHECK:STDOUT: %impl.elem0: type = impl_witness_access constants.%J2.lookup_impl_witness, element0 [symbolic_self = constants.%impl.elem0]
  2916. // CHECK:STDOUT: %.loc22_28.1: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct]
  2917. // CHECK:STDOUT: %.loc22_28.2: type = converted %.loc22_28.1, constants.%empty_struct_type [concrete = constants.%empty_struct_type]
  2918. // CHECK:STDOUT: %.loc22_15: type = where_expr %.Self [concrete = constants.%J2_where.type.744] {
  2919. // CHECK:STDOUT: requirement_base_facet_type constants.%J2.type
  2920. // CHECK:STDOUT: requirement_rewrite %impl.elem0, %.loc22_28.2
  2921. // CHECK:STDOUT: }
  2922. // CHECK:STDOUT: }
  2923. // CHECK:STDOUT: %J2.impl_witness_table.loc22 = impl_witness_table (%impl_witness_assoc_constant.loc22, @empty_tuple.type.as.J2.impl.%empty_tuple.type.as.J2.impl.F.decl.loc23_33.2), @empty_tuple.type.as.J2.impl [concrete]
  2924. // CHECK:STDOUT: %J2.impl_witness.loc22: <witness> = impl_witness %J2.impl_witness_table.loc22 [concrete = constants.%J2.impl_witness.b89]
  2925. // CHECK:STDOUT: %impl_witness_assoc_constant.loc22: type = impl_witness_assoc_constant constants.%empty_struct_type [concrete = constants.%empty_struct_type]
  2926. // CHECK:STDOUT: %C2.decl: type = class_decl @C2 [concrete = constants.%C2] {} {}
  2927. // CHECK:STDOUT: impl_decl @C2.as.J2.impl [concrete] {} {
  2928. // CHECK:STDOUT: %C2.ref.loc31_6: type = name_ref C2, file.%C2.decl [concrete = constants.%C2]
  2929. // CHECK:STDOUT: %J2.ref: type = name_ref J2, file.%J2.decl [concrete = constants.%J2.type]
  2930. // CHECK:STDOUT: %.Self: %J2.type = symbolic_binding .Self [symbolic_self = constants.%.Self]
  2931. // CHECK:STDOUT: %.Self.ref: %J2.type = name_ref .Self, %.Self [symbolic_self = constants.%.Self]
  2932. // CHECK:STDOUT: %U2.ref: %J2.assoc_type = name_ref U2, @U2.%assoc0 [concrete = constants.%assoc0]
  2933. // CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self.ref [symbolic_self = constants.%.Self.binding.as_type]
  2934. // CHECK:STDOUT: %.loc31_21: type = converted %.Self.ref, %.Self.as_type [symbolic_self = constants.%.Self.binding.as_type]
  2935. // CHECK:STDOUT: %impl.elem0: type = impl_witness_access constants.%J2.lookup_impl_witness, element0 [symbolic_self = constants.%impl.elem0]
  2936. // CHECK:STDOUT: %C2.ref.loc31_27: type = name_ref C2, file.%C2.decl [concrete = constants.%C2]
  2937. // CHECK:STDOUT: %.loc31_15: type = where_expr %.Self [concrete = constants.%J2_where.type.76d] {
  2938. // CHECK:STDOUT: requirement_base_facet_type constants.%J2.type
  2939. // CHECK:STDOUT: requirement_rewrite %impl.elem0, %C2.ref.loc31_27
  2940. // CHECK:STDOUT: }
  2941. // CHECK:STDOUT: }
  2942. // CHECK:STDOUT: %J2.impl_witness_table.loc31 = impl_witness_table (%impl_witness_assoc_constant.loc31, @C2.as.J2.impl.%C2.as.J2.impl.F.decl.loc32_33.2), @C2.as.J2.impl [concrete]
  2943. // CHECK:STDOUT: %J2.impl_witness.loc31: <witness> = impl_witness %J2.impl_witness_table.loc31 [concrete = constants.%J2.impl_witness.b77]
  2944. // CHECK:STDOUT: %impl_witness_assoc_constant.loc31: type = impl_witness_assoc_constant constants.%C2 [concrete = constants.%C2]
  2945. // CHECK:STDOUT: }
  2946. // CHECK:STDOUT:
  2947. // CHECK:STDOUT: interface @J2 {
  2948. // CHECK:STDOUT: %Self: %J2.type = symbolic_binding Self, 0 [symbolic = constants.%Self]
  2949. // CHECK:STDOUT: %U2: type = assoc_const_decl @U2 [concrete] {
  2950. // CHECK:STDOUT: %assoc0: %J2.assoc_type = assoc_entity element0, @J2.%U2 [concrete = constants.%assoc0]
  2951. // CHECK:STDOUT: }
  2952. // CHECK:STDOUT: %J2.F.decl: %J2.F.type = fn_decl @J2.F [concrete = constants.%J2.F] {
  2953. // CHECK:STDOUT: %self.patt: @J2.F.%pattern_type (%pattern_type.0a6) = value_binding_pattern self [concrete]
  2954. // CHECK:STDOUT: %self.param_patt: @J2.F.%pattern_type (%pattern_type.0a6) = value_param_pattern %self.patt, call_param0 [concrete]
  2955. // CHECK:STDOUT: %z.patt: <error> = value_binding_pattern z [concrete]
  2956. // CHECK:STDOUT: %z.param_patt: <error> = value_param_pattern %z.patt, call_param1 [concrete]
  2957. // CHECK:STDOUT: %return.patt: <error> = return_slot_pattern [concrete]
  2958. // CHECK:STDOUT: %return.param_patt: <error> = out_param_pattern %return.patt, call_param2 [concrete]
  2959. // CHECK:STDOUT: } {
  2960. // CHECK:STDOUT: %Self.ref.loc19_35: %J2.type = name_ref Self, @J2.%Self [symbolic = %Self (constants.%Self)]
  2961. // CHECK:STDOUT: %self.param: @J2.F.%Self.binding.as_type (%Self.binding.as_type) = value_param call_param0
  2962. // CHECK:STDOUT: %.loc19_14.1: type = splice_block %.loc19_14.2 [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)] {
  2963. // CHECK:STDOUT: %Self.ref.loc19_14: %J2.type = name_ref Self, @J2.%Self [symbolic = %Self (constants.%Self)]
  2964. // CHECK:STDOUT: %Self.as_type: type = facet_access_type %Self.ref.loc19_14 [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)]
  2965. // CHECK:STDOUT: %.loc19_14.2: type = converted %Self.ref.loc19_14, %Self.as_type [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)]
  2966. // CHECK:STDOUT: }
  2967. // CHECK:STDOUT: %self: @J2.F.%Self.binding.as_type (%Self.binding.as_type) = value_binding self, %self.param
  2968. // CHECK:STDOUT: %z.param: <error> = value_param call_param1
  2969. // CHECK:STDOUT: %Self.ref.loc19_23: %J2.type = name_ref Self, @J2.%Self [symbolic = %Self (constants.%Self)]
  2970. // CHECK:STDOUT: %z: <error> = value_binding z, %z.param
  2971. // CHECK:STDOUT: %return.param: ref <error> = out_param call_param2
  2972. // CHECK:STDOUT: %return: ref <error> = return_slot %return.param
  2973. // CHECK:STDOUT: }
  2974. // CHECK:STDOUT: %assoc1: %J2.assoc_type = assoc_entity element1, %J2.F.decl [concrete = constants.%assoc1]
  2975. // CHECK:STDOUT:
  2976. // CHECK:STDOUT: !members:
  2977. // CHECK:STDOUT: .Self = %Self
  2978. // CHECK:STDOUT: .U2 = @U2.%assoc0
  2979. // CHECK:STDOUT: .F = %assoc1
  2980. // CHECK:STDOUT: witness = (%U2, %J2.F.decl)
  2981. // CHECK:STDOUT:
  2982. // CHECK:STDOUT: !requires:
  2983. // CHECK:STDOUT: }
  2984. // CHECK:STDOUT:
  2985. // CHECK:STDOUT: generic assoc_const @U2(@J2.%Self: %J2.type) {
  2986. // CHECK:STDOUT: assoc_const U2:! type;
  2987. // CHECK:STDOUT: }
  2988. // CHECK:STDOUT:
  2989. // CHECK:STDOUT: impl @empty_tuple.type.as.J2.impl: %.loc22_7.2 as %.loc22_15 {
  2990. // CHECK:STDOUT: %empty_tuple.type.as.J2.impl.F.decl.loc23_33.1: %empty_tuple.type.as.J2.impl.F.type.d9b215.1 = fn_decl @empty_tuple.type.as.J2.impl.F.loc23_33.1 [concrete = constants.%empty_tuple.type.as.J2.impl.F.b047a1.1] {
  2991. // CHECK:STDOUT: %self.patt: %pattern_type.cb1 = value_binding_pattern self [concrete]
  2992. // CHECK:STDOUT: %self.param_patt: %pattern_type.cb1 = value_param_pattern %self.patt, call_param0 [concrete]
  2993. // CHECK:STDOUT: %z.patt: %pattern_type.a96 = value_binding_pattern z [concrete]
  2994. // CHECK:STDOUT: %z.param_patt: %pattern_type.a96 = value_param_pattern %z.patt, call_param1 [concrete]
  2995. // CHECK:STDOUT: %return.patt: %pattern_type.a96 = return_slot_pattern [concrete]
  2996. // CHECK:STDOUT: %return.param_patt: %pattern_type.a96 = out_param_pattern %return.patt, call_param2 [concrete]
  2997. // CHECK:STDOUT: } {
  2998. // CHECK:STDOUT: %.loc23_31.1: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct]
  2999. // CHECK:STDOUT: %.loc23_31.2: type = converted %.loc23_31.1, constants.%empty_struct_type [concrete = constants.%empty_struct_type]
  3000. // CHECK:STDOUT: %self.param: %empty_tuple.type = value_param call_param0
  3001. // CHECK:STDOUT: %Self.ref: type = name_ref Self, @empty_tuple.type.as.J2.impl.%.loc22_7.2 [concrete = constants.%empty_tuple.type]
  3002. // CHECK:STDOUT: %self: %empty_tuple.type = value_binding self, %self.param
  3003. // CHECK:STDOUT: %z.param: %empty_struct_type = value_param call_param1
  3004. // CHECK:STDOUT: %.loc23_24.1: type = splice_block %.loc23_24.3 [concrete = constants.%empty_struct_type] {
  3005. // CHECK:STDOUT: %.loc23_24.2: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct]
  3006. // CHECK:STDOUT: %.loc23_24.3: type = converted %.loc23_24.2, constants.%empty_struct_type [concrete = constants.%empty_struct_type]
  3007. // CHECK:STDOUT: }
  3008. // CHECK:STDOUT: %z: %empty_struct_type = value_binding z, %z.param
  3009. // CHECK:STDOUT: %return.param: ref %empty_struct_type = out_param call_param2
  3010. // CHECK:STDOUT: %return: ref %empty_struct_type = return_slot %return.param
  3011. // CHECK:STDOUT: }
  3012. // CHECK:STDOUT: %empty_tuple.type.as.J2.impl.F.decl.loc23_33.2: %empty_tuple.type.as.J2.impl.F.type.d9b215.2 = fn_decl @empty_tuple.type.as.J2.impl.F.loc23_33.2 [concrete = constants.%empty_tuple.type.as.J2.impl.F.b047a1.2] {
  3013. // CHECK:STDOUT: %self.patt: %pattern_type.cb1 = value_binding_pattern self [concrete]
  3014. // CHECK:STDOUT: %self.param_patt: %pattern_type.cb1 = value_param_pattern %self.patt, call_param0 [concrete]
  3015. // CHECK:STDOUT: %.param_patt: <error> = value_param_pattern <error>, call_param1 [concrete]
  3016. // CHECK:STDOUT: %return.patt: <error> = return_slot_pattern [concrete]
  3017. // CHECK:STDOUT: %return.param_patt: <error> = out_param_pattern %return.patt, call_param2 [concrete]
  3018. // CHECK:STDOUT: } {
  3019. // CHECK:STDOUT: %self.param: %empty_tuple.type = value_param call_param0
  3020. // CHECK:STDOUT: %self: %empty_tuple.type = value_binding self, %self.param
  3021. // CHECK:STDOUT: %.param: <error> = value_param call_param1
  3022. // CHECK:STDOUT: %return.param: ref <error> = out_param call_param2
  3023. // CHECK:STDOUT: %return: ref <error> = return_slot %return.param
  3024. // CHECK:STDOUT: }
  3025. // CHECK:STDOUT:
  3026. // CHECK:STDOUT: !members:
  3027. // CHECK:STDOUT: .F = %empty_tuple.type.as.J2.impl.F.decl.loc23_33.1
  3028. // CHECK:STDOUT: witness = file.%J2.impl_witness.loc22
  3029. // CHECK:STDOUT: }
  3030. // CHECK:STDOUT:
  3031. // CHECK:STDOUT: impl @C2.as.J2.impl: %C2.ref.loc31_6 as %.loc31_15 {
  3032. // CHECK:STDOUT: %C2.as.J2.impl.F.decl.loc32_33.1: %C2.as.J2.impl.F.type.5b1c29.1 = fn_decl @C2.as.J2.impl.F.loc32_33.1 [concrete = constants.%C2.as.J2.impl.F.8b36c6.1] {
  3033. // CHECK:STDOUT: %self.patt: %pattern_type.838 = value_binding_pattern self [concrete]
  3034. // CHECK:STDOUT: %self.param_patt: %pattern_type.838 = value_param_pattern %self.patt, call_param0 [concrete]
  3035. // CHECK:STDOUT: %z.patt: %pattern_type.838 = value_binding_pattern z [concrete]
  3036. // CHECK:STDOUT: %z.param_patt: %pattern_type.838 = value_param_pattern %z.patt, call_param1 [concrete]
  3037. // CHECK:STDOUT: %return.patt: %pattern_type.838 = return_slot_pattern [concrete]
  3038. // CHECK:STDOUT: %return.param_patt: %pattern_type.838 = out_param_pattern %return.patt, call_param2 [concrete]
  3039. // CHECK:STDOUT: } {
  3040. // CHECK:STDOUT: %C2.ref.loc32_30: type = name_ref C2, file.%C2.decl [concrete = constants.%C2]
  3041. // CHECK:STDOUT: %self.param: %C2 = value_param call_param0
  3042. // CHECK:STDOUT: %Self.ref: type = name_ref Self, @C2.as.J2.impl.%C2.ref.loc31_6 [concrete = constants.%C2]
  3043. // CHECK:STDOUT: %self: %C2 = value_binding self, %self.param
  3044. // CHECK:STDOUT: %z.param: %C2 = value_param call_param1
  3045. // CHECK:STDOUT: %C2.ref.loc32_23: type = name_ref C2, file.%C2.decl [concrete = constants.%C2]
  3046. // CHECK:STDOUT: %z: %C2 = value_binding z, %z.param
  3047. // CHECK:STDOUT: %return.param: ref %C2 = out_param call_param2
  3048. // CHECK:STDOUT: %return: ref %C2 = return_slot %return.param
  3049. // CHECK:STDOUT: }
  3050. // CHECK:STDOUT: %C2.as.J2.impl.F.decl.loc32_33.2: %C2.as.J2.impl.F.type.5b1c29.2 = fn_decl @C2.as.J2.impl.F.loc32_33.2 [concrete = constants.%C2.as.J2.impl.F.8b36c6.2] {
  3051. // CHECK:STDOUT: %self.patt: %pattern_type.838 = value_binding_pattern self [concrete]
  3052. // CHECK:STDOUT: %self.param_patt: %pattern_type.838 = value_param_pattern %self.patt, call_param0 [concrete]
  3053. // CHECK:STDOUT: %.param_patt: <error> = value_param_pattern <error>, call_param1 [concrete]
  3054. // CHECK:STDOUT: %return.patt: <error> = return_slot_pattern [concrete]
  3055. // CHECK:STDOUT: %return.param_patt: <error> = out_param_pattern %return.patt, call_param2 [concrete]
  3056. // CHECK:STDOUT: } {
  3057. // CHECK:STDOUT: %self.param: %C2 = value_param call_param0
  3058. // CHECK:STDOUT: %self: %C2 = value_binding self, %self.param
  3059. // CHECK:STDOUT: %.param: <error> = value_param call_param1
  3060. // CHECK:STDOUT: %return.param: ref <error> = out_param call_param2
  3061. // CHECK:STDOUT: %return: ref <error> = return_slot %return.param
  3062. // CHECK:STDOUT: }
  3063. // CHECK:STDOUT:
  3064. // CHECK:STDOUT: !members:
  3065. // CHECK:STDOUT: .C2 = <poisoned>
  3066. // CHECK:STDOUT: .F = %C2.as.J2.impl.F.decl.loc32_33.1
  3067. // CHECK:STDOUT: witness = file.%J2.impl_witness.loc31
  3068. // CHECK:STDOUT: }
  3069. // CHECK:STDOUT:
  3070. // CHECK:STDOUT: class @C2 {
  3071. // CHECK:STDOUT: %.loc28_10: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct]
  3072. // CHECK:STDOUT: %.loc28_11: type = converted %.loc28_10, constants.%empty_struct_type [concrete = constants.%empty_struct_type]
  3073. // CHECK:STDOUT: adapt_decl %.loc28_11 [concrete]
  3074. // CHECK:STDOUT: %complete_type: <witness> = complete_type_witness constants.%empty_struct_type [concrete = constants.%complete_type]
  3075. // CHECK:STDOUT: complete_type_witness = %complete_type
  3076. // CHECK:STDOUT:
  3077. // CHECK:STDOUT: !members:
  3078. // CHECK:STDOUT: .Self = constants.%C2
  3079. // CHECK:STDOUT: }
  3080. // CHECK:STDOUT:
  3081. // CHECK:STDOUT: generic fn @J2.F(@J2.%Self: %J2.type) {
  3082. // CHECK:STDOUT: %Self: %J2.type = symbolic_binding Self, 0 [symbolic = %Self (constants.%Self)]
  3083. // CHECK:STDOUT: %Self.binding.as_type: type = symbolic_binding_type Self, 0, %Self [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)]
  3084. // CHECK:STDOUT: %pattern_type: type = pattern_type %Self.binding.as_type [symbolic = %pattern_type (constants.%pattern_type.0a6)]
  3085. // CHECK:STDOUT:
  3086. // CHECK:STDOUT: fn(%self.param: @J2.F.%Self.binding.as_type (%Self.binding.as_type), %z.param: <error>) -> <error>;
  3087. // CHECK:STDOUT: }
  3088. // CHECK:STDOUT:
  3089. // CHECK:STDOUT: fn @empty_tuple.type.as.J2.impl.F.loc23_33.1(%self.param: %empty_tuple.type, %z.param: %empty_struct_type) -> %empty_struct_type {
  3090. // CHECK:STDOUT: !entry:
  3091. // CHECK:STDOUT: %z.ref: %empty_struct_type = name_ref z, %z
  3092. // CHECK:STDOUT: %.loc23_42: init %empty_struct_type = struct_init () to %return [concrete = constants.%empty_struct]
  3093. // CHECK:STDOUT: %.loc23_43: init %empty_struct_type = converted %z.ref, %.loc23_42 [concrete = constants.%empty_struct]
  3094. // CHECK:STDOUT: return %.loc23_43 to %return
  3095. // CHECK:STDOUT: }
  3096. // CHECK:STDOUT:
  3097. // CHECK:STDOUT: fn @empty_tuple.type.as.J2.impl.F.loc23_33.2(%self.param: %empty_tuple.type, %.param: <error>) -> <error> [thunk @empty_tuple.type.as.J2.impl.%empty_tuple.type.as.J2.impl.F.decl.loc23_33.1] {
  3098. // CHECK:STDOUT: !entry:
  3099. // CHECK:STDOUT: %F.ref: %empty_tuple.type.as.J2.impl.F.type.d9b215.1 = name_ref F, @empty_tuple.type.as.J2.impl.%empty_tuple.type.as.J2.impl.F.decl.loc23_33.1 [concrete = constants.%empty_tuple.type.as.J2.impl.F.b047a1.1]
  3100. // CHECK:STDOUT: %self.ref: %empty_tuple.type = name_ref self, %self.param
  3101. // CHECK:STDOUT: %.ref: <error> = name_ref <none>, %.param
  3102. // CHECK:STDOUT: %return.ref: ref <error> = name_ref <return slot>, %return.param
  3103. // CHECK:STDOUT: %empty_tuple.type.as.J2.impl.F.bound: <bound method> = bound_method %self.ref, %F.ref
  3104. // CHECK:STDOUT: %empty_tuple.type.as.J2.impl.F.call: init %empty_struct_type = call %empty_tuple.type.as.J2.impl.F.bound(%self.ref, <error>)
  3105. // CHECK:STDOUT: return <error> to %return
  3106. // CHECK:STDOUT: }
  3107. // CHECK:STDOUT:
  3108. // CHECK:STDOUT: fn @C2.as.J2.impl.F.loc32_33.1(%self.param: %C2, %z.param: %C2) -> %C2 {
  3109. // CHECK:STDOUT: !entry:
  3110. // CHECK:STDOUT: %self.ref: %C2 = name_ref self, %self
  3111. // CHECK:STDOUT: %.loc32_46.1: %empty_struct_type = as_compatible %self.ref
  3112. // CHECK:STDOUT: %.loc32_46.2: ref %empty_struct_type = as_compatible %return
  3113. // CHECK:STDOUT: %.loc32_46.3: init %empty_struct_type = struct_init () to %.loc32_46.2 [concrete = constants.%empty_struct]
  3114. // CHECK:STDOUT: %.loc32_46.4: init %C2 = as_compatible %.loc32_46.3 [concrete = constants.%C2.val]
  3115. // CHECK:STDOUT: %.loc32_46.5: init %C2 = converted %self.ref, %.loc32_46.4 [concrete = constants.%C2.val]
  3116. // CHECK:STDOUT: return %.loc32_46.5 to %return
  3117. // CHECK:STDOUT: }
  3118. // CHECK:STDOUT:
  3119. // CHECK:STDOUT: fn @C2.as.J2.impl.F.loc32_33.2(%self.param: %C2, %.param: <error>) -> <error> [thunk @C2.as.J2.impl.%C2.as.J2.impl.F.decl.loc32_33.1] {
  3120. // CHECK:STDOUT: !entry:
  3121. // CHECK:STDOUT: %F.ref: %C2.as.J2.impl.F.type.5b1c29.1 = name_ref F, @C2.as.J2.impl.%C2.as.J2.impl.F.decl.loc32_33.1 [concrete = constants.%C2.as.J2.impl.F.8b36c6.1]
  3122. // CHECK:STDOUT: %self.ref: %C2 = name_ref self, %self.param
  3123. // CHECK:STDOUT: %.ref: <error> = name_ref <none>, %.param
  3124. // CHECK:STDOUT: %return.ref: ref <error> = name_ref <return slot>, %return.param
  3125. // CHECK:STDOUT: %C2.as.J2.impl.F.bound: <bound method> = bound_method %self.ref, %F.ref
  3126. // CHECK:STDOUT: %C2.as.J2.impl.F.call: init %C2 = call %C2.as.J2.impl.F.bound(%self.ref, <error>)
  3127. // CHECK:STDOUT: return <error> to %return
  3128. // CHECK:STDOUT: }
  3129. // CHECK:STDOUT:
  3130. // CHECK:STDOUT: specific @U2(constants.%Self) {}
  3131. // CHECK:STDOUT:
  3132. // CHECK:STDOUT: specific @J2.F(constants.%Self) {
  3133. // CHECK:STDOUT: %Self => constants.%Self
  3134. // CHECK:STDOUT: %Self.binding.as_type => constants.%Self.binding.as_type
  3135. // CHECK:STDOUT: %pattern_type => constants.%pattern_type.0a6
  3136. // CHECK:STDOUT: }
  3137. // CHECK:STDOUT:
  3138. // CHECK:STDOUT: specific @U2(constants.%.Self) {}
  3139. // CHECK:STDOUT:
  3140. // CHECK:STDOUT: specific @J2.F(constants.%J2.facet.02c) {
  3141. // CHECK:STDOUT: %Self => constants.%J2.facet.02c
  3142. // CHECK:STDOUT: %Self.binding.as_type => constants.%empty_tuple.type
  3143. // CHECK:STDOUT: %pattern_type => constants.%pattern_type.cb1
  3144. // CHECK:STDOUT: }
  3145. // CHECK:STDOUT:
  3146. // CHECK:STDOUT: specific @J2.F(constants.%J2.facet.73a) {
  3147. // CHECK:STDOUT: %Self => constants.%J2.facet.73a
  3148. // CHECK:STDOUT: %Self.binding.as_type => constants.%C2
  3149. // CHECK:STDOUT: %pattern_type => constants.%pattern_type.838
  3150. // CHECK:STDOUT: }
  3151. // CHECK:STDOUT:
  3152. // CHECK:STDOUT: --- fail_associated_type_in_signature_mismatch.carbon
  3153. // CHECK:STDOUT:
  3154. // CHECK:STDOUT: constants {
  3155. // CHECK:STDOUT: %K.type: type = facet_type <@K> [concrete]
  3156. // CHECK:STDOUT: %Self.999: %K.type = symbolic_binding Self, 0 [symbolic]
  3157. // CHECK:STDOUT: %K.assoc_type: type = assoc_entity_type @K [concrete]
  3158. // CHECK:STDOUT: %assoc0.29d: %K.assoc_type = assoc_entity element0, @K.%V [concrete]
  3159. // CHECK:STDOUT: %Self.binding.as_type.1c0: type = symbolic_binding_type Self, 0, %Self.999 [symbolic]
  3160. // CHECK:STDOUT: %pattern_type.dfd: type = pattern_type %Self.binding.as_type.1c0 [symbolic]
  3161. // CHECK:STDOUT: %K.lookup_impl_witness.0dc: <witness> = lookup_impl_witness %Self.999, @K [symbolic]
  3162. // CHECK:STDOUT: %impl.elem0.747: type = impl_witness_access %K.lookup_impl_witness.0dc, element0 [symbolic]
  3163. // CHECK:STDOUT: %pattern_type.d73: type = pattern_type %impl.elem0.747 [symbolic]
  3164. // CHECK:STDOUT: %K.F.type: type = fn_type @K.F [concrete]
  3165. // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete]
  3166. // CHECK:STDOUT: %K.F: %K.F.type = struct_value () [concrete]
  3167. // CHECK:STDOUT: %assoc1: %K.assoc_type = assoc_entity element1, @K.%K.F.decl [concrete]
  3168. // CHECK:STDOUT: %empty_tuple: %empty_tuple.type = tuple_value () [concrete]
  3169. // CHECK:STDOUT: %.Self: %K.type = symbolic_binding .Self [symbolic_self]
  3170. // CHECK:STDOUT: %.Self.binding.as_type: type = symbolic_binding_type .Self, %.Self [symbolic_self]
  3171. // CHECK:STDOUT: %K.lookup_impl_witness.e69: <witness> = lookup_impl_witness %.Self, @K [symbolic_self]
  3172. // CHECK:STDOUT: %impl.elem0.e40: type = impl_witness_access %K.lookup_impl_witness.e69, element0 [symbolic_self]
  3173. // CHECK:STDOUT: %struct_type.a: type = struct_type {.a: %empty_tuple.type} [concrete]
  3174. // CHECK:STDOUT: %K_where.type: type = facet_type <@K where %impl.elem0.e40 = %struct_type.a> [concrete]
  3175. // CHECK:STDOUT: %K.impl_witness: <witness> = impl_witness file.%K.impl_witness_table [concrete]
  3176. // CHECK:STDOUT: %pattern_type.cb1: type = pattern_type %empty_tuple.type [concrete]
  3177. // CHECK:STDOUT: %struct_type.x: type = struct_type {.x: %empty_tuple.type} [concrete]
  3178. // CHECK:STDOUT: %pattern_type.414: type = pattern_type %struct_type.x [concrete]
  3179. // CHECK:STDOUT: %empty_tuple.type.as.K.impl.F.type.662f2e.1: type = fn_type @empty_tuple.type.as.K.impl.F.loc26_45.1 [concrete]
  3180. // CHECK:STDOUT: %empty_tuple.type.as.K.impl.F.ec3e8a.1: %empty_tuple.type.as.K.impl.F.type.662f2e.1 = struct_value () [concrete]
  3181. // CHECK:STDOUT: %K.facet: %K.type = facet_value %empty_tuple.type, (%K.impl_witness) [concrete]
  3182. // CHECK:STDOUT: %pattern_type.e85: type = pattern_type %struct_type.a [concrete]
  3183. // CHECK:STDOUT: %empty_tuple.type.as.K.impl.F.type.662f2e.2: type = fn_type @empty_tuple.type.as.K.impl.F.loc26_45.2 [concrete]
  3184. // CHECK:STDOUT: %empty_tuple.type.as.K.impl.F.ec3e8a.2: %empty_tuple.type.as.K.impl.F.type.662f2e.2 = struct_value () [concrete]
  3185. // CHECK:STDOUT: %struct: %struct_type.x = struct_value (%empty_tuple) [concrete]
  3186. // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete]
  3187. // CHECK:STDOUT: %type_where: type = facet_type <type where .Self impls <CanDestroy>> [concrete]
  3188. // CHECK:STDOUT: %facet_value: %type_where = facet_value %struct_type.x, () [concrete]
  3189. // CHECK:STDOUT: %DestroyT.binding.as_type.as.Destroy.impl.Op.type.a2f: type = fn_type @DestroyT.binding.as_type.as.Destroy.impl.Op, @DestroyT.binding.as_type.as.Destroy.impl(%facet_value) [concrete]
  3190. // CHECK:STDOUT: %DestroyT.binding.as_type.as.Destroy.impl.Op.4e1: %DestroyT.binding.as_type.as.Destroy.impl.Op.type.a2f = struct_value () [concrete]
  3191. // CHECK:STDOUT: %DestroyT.binding.as_type.as.Destroy.impl.Op.specific_fn: <specific function> = specific_function %DestroyT.binding.as_type.as.Destroy.impl.Op.4e1, @DestroyT.binding.as_type.as.Destroy.impl.Op(%facet_value) [concrete]
  3192. // CHECK:STDOUT: }
  3193. // CHECK:STDOUT:
  3194. // CHECK:STDOUT: imports {
  3195. // CHECK:STDOUT: %Core: <namespace> = namespace file.%Core.import, [concrete] {
  3196. // CHECK:STDOUT: .Destroy = %Core.Destroy
  3197. // CHECK:STDOUT: import Core//prelude
  3198. // CHECK:STDOUT: import Core//prelude/...
  3199. // CHECK:STDOUT: }
  3200. // CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type]
  3201. // CHECK:STDOUT: }
  3202. // CHECK:STDOUT:
  3203. // CHECK:STDOUT: file {
  3204. // CHECK:STDOUT: package: <namespace> = namespace [concrete] {
  3205. // CHECK:STDOUT: .Core = imports.%Core
  3206. // CHECK:STDOUT: .K = %K.decl
  3207. // CHECK:STDOUT: }
  3208. // CHECK:STDOUT: %Core.import = import Core
  3209. // CHECK:STDOUT: %K.decl: type = interface_decl @K [concrete = constants.%K.type] {} {}
  3210. // CHECK:STDOUT: impl_decl @empty_tuple.type.as.K.impl [concrete] {} {
  3211. // CHECK:STDOUT: %.loc11_7.1: %empty_tuple.type = tuple_literal () [concrete = constants.%empty_tuple]
  3212. // CHECK:STDOUT: %.loc11_7.2: type = converted %.loc11_7.1, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type]
  3213. // CHECK:STDOUT: %K.ref: type = name_ref K, file.%K.decl [concrete = constants.%K.type]
  3214. // CHECK:STDOUT: %.Self: %K.type = symbolic_binding .Self [symbolic_self = constants.%.Self]
  3215. // CHECK:STDOUT: %.Self.ref: %K.type = name_ref .Self, %.Self [symbolic_self = constants.%.Self]
  3216. // CHECK:STDOUT: %V.ref: %K.assoc_type = name_ref V, @V.%assoc0 [concrete = constants.%assoc0.29d]
  3217. // CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self.ref [symbolic_self = constants.%.Self.binding.as_type]
  3218. // CHECK:STDOUT: %.loc11_20: type = converted %.Self.ref, %.Self.as_type [symbolic_self = constants.%.Self.binding.as_type]
  3219. // CHECK:STDOUT: %impl.elem0: type = impl_witness_access constants.%K.lookup_impl_witness.e69, element0 [symbolic_self = constants.%impl.elem0.e40]
  3220. // CHECK:STDOUT: %.loc11_31.1: %empty_tuple.type = tuple_literal () [concrete = constants.%empty_tuple]
  3221. // CHECK:STDOUT: %.loc11_31.2: type = converted %.loc11_31.1, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type]
  3222. // CHECK:STDOUT: %struct_type.a: type = struct_type {.a: %empty_tuple.type} [concrete = constants.%struct_type.a]
  3223. // CHECK:STDOUT: %.loc11_14: type = where_expr %.Self [concrete = constants.%K_where.type] {
  3224. // CHECK:STDOUT: requirement_base_facet_type constants.%K.type
  3225. // CHECK:STDOUT: requirement_rewrite %impl.elem0, %struct_type.a
  3226. // CHECK:STDOUT: }
  3227. // CHECK:STDOUT: }
  3228. // CHECK:STDOUT: %K.impl_witness_table = impl_witness_table (%impl_witness_assoc_constant, @empty_tuple.type.as.K.impl.%empty_tuple.type.as.K.impl.F.decl.loc26_45.2), @empty_tuple.type.as.K.impl [concrete]
  3229. // CHECK:STDOUT: %K.impl_witness: <witness> = impl_witness %K.impl_witness_table [concrete = constants.%K.impl_witness]
  3230. // CHECK:STDOUT: %impl_witness_assoc_constant: type = impl_witness_assoc_constant constants.%struct_type.a [concrete = constants.%struct_type.a]
  3231. // CHECK:STDOUT: }
  3232. // CHECK:STDOUT:
  3233. // CHECK:STDOUT: interface @K {
  3234. // CHECK:STDOUT: %Self: %K.type = symbolic_binding Self, 0 [symbolic = constants.%Self.999]
  3235. // CHECK:STDOUT: %V: type = assoc_const_decl @V [concrete] {
  3236. // CHECK:STDOUT: %assoc0: %K.assoc_type = assoc_entity element0, @K.%V [concrete = constants.%assoc0.29d]
  3237. // CHECK:STDOUT: }
  3238. // CHECK:STDOUT: %K.F.decl: %K.F.type = fn_decl @K.F [concrete = constants.%K.F] {
  3239. // CHECK:STDOUT: %self.patt: @K.F.%pattern_type.loc8_8 (%pattern_type.dfd) = value_binding_pattern self [concrete]
  3240. // CHECK:STDOUT: %self.param_patt: @K.F.%pattern_type.loc8_8 (%pattern_type.dfd) = value_param_pattern %self.patt, call_param0 [concrete]
  3241. // CHECK:STDOUT: %v.patt: @K.F.%pattern_type.loc8_20 (%pattern_type.d73) = value_binding_pattern v [concrete]
  3242. // CHECK:STDOUT: %v.param_patt: @K.F.%pattern_type.loc8_20 (%pattern_type.d73) = value_param_pattern %v.patt, call_param1 [concrete]
  3243. // CHECK:STDOUT: %return.patt: @K.F.%pattern_type.loc8_20 (%pattern_type.d73) = return_slot_pattern [concrete]
  3244. // CHECK:STDOUT: %return.param_patt: @K.F.%pattern_type.loc8_20 (%pattern_type.d73) = out_param_pattern %return.patt, call_param2 [concrete]
  3245. // CHECK:STDOUT: } {
  3246. // CHECK:STDOUT: %impl.elem0.loc8_29: type = impl_witness_access constants.%K.lookup_impl_witness.0dc, element0 [symbolic = %impl.elem0.loc8_23.1 (constants.%impl.elem0.747)]
  3247. // CHECK:STDOUT: %V.ref.loc8_29: type = name_ref V, %impl.elem0.loc8_29 [symbolic = %impl.elem0.loc8_23.1 (constants.%impl.elem0.747)]
  3248. // CHECK:STDOUT: %self.param: @K.F.%Self.binding.as_type (%Self.binding.as_type.1c0) = value_param call_param0
  3249. // CHECK:STDOUT: %.loc8_14.1: type = splice_block %.loc8_14.2 [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type.1c0)] {
  3250. // CHECK:STDOUT: %Self.ref: %K.type = name_ref Self, @K.%Self [symbolic = %Self (constants.%Self.999)]
  3251. // CHECK:STDOUT: %Self.as_type: type = facet_access_type %Self.ref [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type.1c0)]
  3252. // CHECK:STDOUT: %.loc8_14.2: type = converted %Self.ref, %Self.as_type [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type.1c0)]
  3253. // CHECK:STDOUT: }
  3254. // CHECK:STDOUT: %self: @K.F.%Self.binding.as_type (%Self.binding.as_type.1c0) = value_binding self, %self.param
  3255. // CHECK:STDOUT: %v.param: @K.F.%impl.elem0.loc8_23.1 (%impl.elem0.747) = value_param call_param1
  3256. // CHECK:STDOUT: %.loc8_23: type = splice_block %V.ref.loc8_23 [symbolic = %impl.elem0.loc8_23.1 (constants.%impl.elem0.747)] {
  3257. // CHECK:STDOUT: %impl.elem0.loc8_23.2: type = impl_witness_access constants.%K.lookup_impl_witness.0dc, element0 [symbolic = %impl.elem0.loc8_23.1 (constants.%impl.elem0.747)]
  3258. // CHECK:STDOUT: %V.ref.loc8_23: type = name_ref V, %impl.elem0.loc8_23.2 [symbolic = %impl.elem0.loc8_23.1 (constants.%impl.elem0.747)]
  3259. // CHECK:STDOUT: }
  3260. // CHECK:STDOUT: %v: @K.F.%impl.elem0.loc8_23.1 (%impl.elem0.747) = value_binding v, %v.param
  3261. // CHECK:STDOUT: %return.param: ref @K.F.%impl.elem0.loc8_23.1 (%impl.elem0.747) = out_param call_param2
  3262. // CHECK:STDOUT: %return: ref @K.F.%impl.elem0.loc8_23.1 (%impl.elem0.747) = return_slot %return.param
  3263. // CHECK:STDOUT: }
  3264. // CHECK:STDOUT: %assoc1: %K.assoc_type = assoc_entity element1, %K.F.decl [concrete = constants.%assoc1]
  3265. // CHECK:STDOUT:
  3266. // CHECK:STDOUT: !members:
  3267. // CHECK:STDOUT: .Self = %Self
  3268. // CHECK:STDOUT: .V = @V.%assoc0
  3269. // CHECK:STDOUT: .F = %assoc1
  3270. // CHECK:STDOUT: witness = (%V, %K.F.decl)
  3271. // CHECK:STDOUT:
  3272. // CHECK:STDOUT: !requires:
  3273. // CHECK:STDOUT: }
  3274. // CHECK:STDOUT:
  3275. // CHECK:STDOUT: generic assoc_const @V(@K.%Self: %K.type) {
  3276. // CHECK:STDOUT: assoc_const V:! type;
  3277. // CHECK:STDOUT: }
  3278. // CHECK:STDOUT:
  3279. // CHECK:STDOUT: impl @empty_tuple.type.as.K.impl: %.loc11_7.2 as %.loc11_14 {
  3280. // CHECK:STDOUT: %empty_tuple.type.as.K.impl.F.decl.loc26_45.1: %empty_tuple.type.as.K.impl.F.type.662f2e.1 = fn_decl @empty_tuple.type.as.K.impl.F.loc26_45.1 [concrete = constants.%empty_tuple.type.as.K.impl.F.ec3e8a.1] {
  3281. // CHECK:STDOUT: %self.patt: %pattern_type.cb1 = value_binding_pattern self [concrete]
  3282. // CHECK:STDOUT: %self.param_patt: %pattern_type.cb1 = value_param_pattern %self.patt, call_param0 [concrete]
  3283. // CHECK:STDOUT: %v.patt: %pattern_type.414 = value_binding_pattern v [concrete]
  3284. // CHECK:STDOUT: %v.param_patt: %pattern_type.414 = value_param_pattern %v.patt, call_param1 [concrete]
  3285. // CHECK:STDOUT: %return.patt: %pattern_type.414 = return_slot_pattern [concrete]
  3286. // CHECK:STDOUT: %return.param_patt: %pattern_type.414 = out_param_pattern %return.patt, call_param2 [concrete]
  3287. // CHECK:STDOUT: } {
  3288. // CHECK:STDOUT: %.loc26_42.1: %empty_tuple.type = tuple_literal () [concrete = constants.%empty_tuple]
  3289. // CHECK:STDOUT: %.loc26_42.2: type = converted %.loc26_42.1, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type]
  3290. // CHECK:STDOUT: %struct_type.x.loc26_43: type = struct_type {.x: %empty_tuple.type} [concrete = constants.%struct_type.x]
  3291. // CHECK:STDOUT: %self.param: %empty_tuple.type = value_param call_param0
  3292. // CHECK:STDOUT: %Self.ref: type = name_ref Self, @empty_tuple.type.as.K.impl.%.loc11_7.2 [concrete = constants.%empty_tuple.type]
  3293. // CHECK:STDOUT: %self: %empty_tuple.type = value_binding self, %self.param
  3294. // CHECK:STDOUT: %v.param: %struct_type.x = value_param call_param1
  3295. // CHECK:STDOUT: %.loc26_30: type = splice_block %struct_type.x.loc26_30 [concrete = constants.%struct_type.x] {
  3296. // CHECK:STDOUT: %.loc26_29.1: %empty_tuple.type = tuple_literal () [concrete = constants.%empty_tuple]
  3297. // CHECK:STDOUT: %.loc26_29.2: type = converted %.loc26_29.1, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type]
  3298. // CHECK:STDOUT: %struct_type.x.loc26_30: type = struct_type {.x: %empty_tuple.type} [concrete = constants.%struct_type.x]
  3299. // CHECK:STDOUT: }
  3300. // CHECK:STDOUT: %v: %struct_type.x = value_binding v, %v.param
  3301. // CHECK:STDOUT: %return.param: ref %struct_type.x = out_param call_param2
  3302. // CHECK:STDOUT: %return: ref %struct_type.x = return_slot %return.param
  3303. // CHECK:STDOUT: }
  3304. // CHECK:STDOUT: %empty_tuple.type.as.K.impl.F.decl.loc26_45.2: %empty_tuple.type.as.K.impl.F.type.662f2e.2 = fn_decl @empty_tuple.type.as.K.impl.F.loc26_45.2 [concrete = constants.%empty_tuple.type.as.K.impl.F.ec3e8a.2] {
  3305. // CHECK:STDOUT: %self.patt: %pattern_type.cb1 = value_binding_pattern self [concrete]
  3306. // CHECK:STDOUT: %self.param_patt: %pattern_type.cb1 = value_param_pattern %self.patt, call_param0 [concrete]
  3307. // CHECK:STDOUT: %v.patt: %pattern_type.e85 = value_binding_pattern v [concrete]
  3308. // CHECK:STDOUT: %v.param_patt: %pattern_type.e85 = value_param_pattern %v.patt, call_param1 [concrete]
  3309. // CHECK:STDOUT: %return.patt: %pattern_type.e85 = return_slot_pattern [concrete]
  3310. // CHECK:STDOUT: %return.param_patt: %pattern_type.e85 = out_param_pattern %return.patt, call_param2 [concrete]
  3311. // CHECK:STDOUT: } {
  3312. // CHECK:STDOUT: %self.param: %empty_tuple.type = value_param call_param0
  3313. // CHECK:STDOUT: %self: %empty_tuple.type = value_binding self, %self.param
  3314. // CHECK:STDOUT: %v.param: %struct_type.a = value_param call_param1
  3315. // CHECK:STDOUT: %v: %struct_type.a = value_binding v, %v.param
  3316. // CHECK:STDOUT: %return.param: ref %struct_type.a = out_param call_param2
  3317. // CHECK:STDOUT: %return: ref %struct_type.a = return_slot %return.param
  3318. // CHECK:STDOUT: }
  3319. // CHECK:STDOUT:
  3320. // CHECK:STDOUT: !members:
  3321. // CHECK:STDOUT: .F = %empty_tuple.type.as.K.impl.F.decl.loc26_45.1
  3322. // CHECK:STDOUT: witness = file.%K.impl_witness
  3323. // CHECK:STDOUT: }
  3324. // CHECK:STDOUT:
  3325. // CHECK:STDOUT: generic fn @K.F(@K.%Self: %K.type) {
  3326. // CHECK:STDOUT: %Self: %K.type = symbolic_binding Self, 0 [symbolic = %Self (constants.%Self.999)]
  3327. // CHECK:STDOUT: %Self.binding.as_type: type = symbolic_binding_type Self, 0, %Self [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type.1c0)]
  3328. // CHECK:STDOUT: %pattern_type.loc8_8: type = pattern_type %Self.binding.as_type [symbolic = %pattern_type.loc8_8 (constants.%pattern_type.dfd)]
  3329. // CHECK:STDOUT: %K.lookup_impl_witness: <witness> = lookup_impl_witness %Self, @K [symbolic = %K.lookup_impl_witness (constants.%K.lookup_impl_witness.0dc)]
  3330. // CHECK:STDOUT: %impl.elem0.loc8_23.1: type = impl_witness_access %K.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc8_23.1 (constants.%impl.elem0.747)]
  3331. // CHECK:STDOUT: %pattern_type.loc8_20: type = pattern_type %impl.elem0.loc8_23.1 [symbolic = %pattern_type.loc8_20 (constants.%pattern_type.d73)]
  3332. // CHECK:STDOUT:
  3333. // CHECK:STDOUT: fn(%self.param: @K.F.%Self.binding.as_type (%Self.binding.as_type.1c0), %v.param: @K.F.%impl.elem0.loc8_23.1 (%impl.elem0.747)) -> @K.F.%impl.elem0.loc8_23.1 (%impl.elem0.747);
  3334. // CHECK:STDOUT: }
  3335. // CHECK:STDOUT:
  3336. // CHECK:STDOUT: fn @empty_tuple.type.as.K.impl.F.loc26_45.1(%self.param: %empty_tuple.type, %v.param: %struct_type.x) -> %struct_type.x {
  3337. // CHECK:STDOUT: !entry:
  3338. // CHECK:STDOUT: %v.ref: %struct_type.x = name_ref v, %v
  3339. // CHECK:STDOUT: %.loc26_54.1: %empty_tuple.type = struct_access %v.ref, element0
  3340. // CHECK:STDOUT: %.loc26_54.2: ref %empty_tuple.type = struct_access %return, element0
  3341. // CHECK:STDOUT: %.loc26_54.3: init %empty_tuple.type = tuple_init () to %.loc26_54.2 [concrete = constants.%empty_tuple]
  3342. // CHECK:STDOUT: %.loc26_54.4: init %empty_tuple.type = converted %.loc26_54.1, %.loc26_54.3 [concrete = constants.%empty_tuple]
  3343. // CHECK:STDOUT: %.loc26_54.5: init %struct_type.x = struct_init (%.loc26_54.4) to %return [concrete = constants.%struct]
  3344. // CHECK:STDOUT: %.loc26_55: init %struct_type.x = converted %v.ref, %.loc26_54.5 [concrete = constants.%struct]
  3345. // CHECK:STDOUT: return %.loc26_55 to %return
  3346. // CHECK:STDOUT: }
  3347. // CHECK:STDOUT:
  3348. // CHECK:STDOUT: fn @empty_tuple.type.as.K.impl.F.loc26_45.2(%self.param: %empty_tuple.type, %v.param: %struct_type.a) -> %struct_type.a [thunk @empty_tuple.type.as.K.impl.%empty_tuple.type.as.K.impl.F.decl.loc26_45.1] {
  3349. // CHECK:STDOUT: !entry:
  3350. // CHECK:STDOUT: %F.ref: %empty_tuple.type.as.K.impl.F.type.662f2e.1 = name_ref F, @empty_tuple.type.as.K.impl.%empty_tuple.type.as.K.impl.F.decl.loc26_45.1 [concrete = constants.%empty_tuple.type.as.K.impl.F.ec3e8a.1]
  3351. // CHECK:STDOUT: %self.ref: %empty_tuple.type = name_ref self, %self.param
  3352. // CHECK:STDOUT: %v.ref: %struct_type.a = name_ref v, %v.param
  3353. // CHECK:STDOUT: %return.ref: ref %struct_type.a = name_ref <return slot>, %return.param
  3354. // CHECK:STDOUT: %empty_tuple.type.as.K.impl.F.bound: <bound method> = bound_method %self.ref, %F.ref
  3355. // CHECK:STDOUT: %empty_tuple.type.as.K.impl.F.call: init %struct_type.x = call %empty_tuple.type.as.K.impl.F.bound(%self.ref, <error>)
  3356. // CHECK:STDOUT: %.loc26_45.1: ref %struct_type.x = temporary_storage
  3357. // CHECK:STDOUT: %.loc26_45.2: ref %struct_type.x = temporary %.loc26_45.1, %empty_tuple.type.as.K.impl.F.call
  3358. // CHECK:STDOUT: %DestroyT.binding.as_type.as.Destroy.impl.Op.bound: <bound method> = bound_method %.loc26_45.2, constants.%DestroyT.binding.as_type.as.Destroy.impl.Op.4e1
  3359. // CHECK:STDOUT: %DestroyT.binding.as_type.as.Destroy.impl.Op.specific_fn: <specific function> = specific_function constants.%DestroyT.binding.as_type.as.Destroy.impl.Op.4e1, @DestroyT.binding.as_type.as.Destroy.impl.Op(constants.%facet_value) [concrete = constants.%DestroyT.binding.as_type.as.Destroy.impl.Op.specific_fn]
  3360. // CHECK:STDOUT: %bound_method: <bound method> = bound_method %.loc26_45.2, %DestroyT.binding.as_type.as.Destroy.impl.Op.specific_fn
  3361. // CHECK:STDOUT: %DestroyT.binding.as_type.as.Destroy.impl.Op.call: init %empty_tuple.type = call %bound_method(%.loc26_45.2)
  3362. // CHECK:STDOUT: return <error> to %return
  3363. // CHECK:STDOUT: }
  3364. // CHECK:STDOUT:
  3365. // CHECK:STDOUT: specific @V(constants.%Self.999) {}
  3366. // CHECK:STDOUT:
  3367. // CHECK:STDOUT: specific @K.F(constants.%Self.999) {
  3368. // CHECK:STDOUT: %Self => constants.%Self.999
  3369. // CHECK:STDOUT: %Self.binding.as_type => constants.%Self.binding.as_type.1c0
  3370. // CHECK:STDOUT: %pattern_type.loc8_8 => constants.%pattern_type.dfd
  3371. // CHECK:STDOUT: %K.lookup_impl_witness => constants.%K.lookup_impl_witness.0dc
  3372. // CHECK:STDOUT: %impl.elem0.loc8_23.1 => constants.%impl.elem0.747
  3373. // CHECK:STDOUT: %pattern_type.loc8_20 => constants.%pattern_type.d73
  3374. // CHECK:STDOUT: }
  3375. // CHECK:STDOUT:
  3376. // CHECK:STDOUT: specific @V(constants.%.Self) {}
  3377. // CHECK:STDOUT:
  3378. // CHECK:STDOUT: specific @K.F(constants.%K.facet) {
  3379. // CHECK:STDOUT: %Self => constants.%K.facet
  3380. // CHECK:STDOUT: %Self.binding.as_type => constants.%empty_tuple.type
  3381. // CHECK:STDOUT: %pattern_type.loc8_8 => constants.%pattern_type.cb1
  3382. // CHECK:STDOUT: %K.lookup_impl_witness => constants.%K.impl_witness
  3383. // CHECK:STDOUT: %impl.elem0.loc8_23.1 => constants.%struct_type.a
  3384. // CHECK:STDOUT: %pattern_type.loc8_20 => constants.%pattern_type.e85
  3385. // CHECK:STDOUT: }
  3386. // CHECK:STDOUT:
  3387. // CHECK:STDOUT: --- use_non-type_in_function.carbon
  3388. // CHECK:STDOUT:
  3389. // CHECK:STDOUT: constants {
  3390. // CHECK:STDOUT: %M.type: type = facet_type <@M> [concrete]
  3391. // CHECK:STDOUT: %Self: %M.type = symbolic_binding Self, 0 [symbolic]
  3392. // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete]
  3393. // CHECK:STDOUT: %empty_struct: %empty_struct_type = struct_value () [concrete]
  3394. // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete]
  3395. // CHECK:STDOUT: %struct_type.b.347: type = struct_type {.b: %empty_struct_type} [concrete]
  3396. // CHECK:STDOUT: %M.assoc_type: type = assoc_entity_type @M [concrete]
  3397. // CHECK:STDOUT: %assoc0: %M.assoc_type = assoc_entity element0, @M.%Z [concrete]
  3398. // CHECK:STDOUT: %pattern_type: type = pattern_type %empty_struct_type [concrete]
  3399. // CHECK:STDOUT: %M.G.type: type = fn_type @M.G [concrete]
  3400. // CHECK:STDOUT: %M.G: %M.G.type = struct_value () [concrete]
  3401. // CHECK:STDOUT: %assoc1: %M.assoc_type = assoc_entity element1, @M.%M.G.decl [concrete]
  3402. // CHECK:STDOUT: %empty_tuple: %empty_tuple.type = tuple_value () [concrete]
  3403. // CHECK:STDOUT: %.Self: %M.type = symbolic_binding .Self [symbolic_self]
  3404. // CHECK:STDOUT: %.Self.binding.as_type: type = symbolic_binding_type .Self, %.Self [symbolic_self]
  3405. // CHECK:STDOUT: %M.lookup_impl_witness: <witness> = lookup_impl_witness %.Self, @M [symbolic_self]
  3406. // CHECK:STDOUT: %impl.elem0: %struct_type.b.347 = impl_witness_access %M.lookup_impl_witness, element0 [symbolic_self]
  3407. // CHECK:STDOUT: %struct: %struct_type.b.347 = struct_value (%empty_struct) [concrete]
  3408. // CHECK:STDOUT: %M_where.type: type = facet_type <@M where %impl.elem0 = %struct> [concrete]
  3409. // CHECK:STDOUT: %M.impl_witness: <witness> = impl_witness file.%M.impl_witness_table [concrete]
  3410. // CHECK:STDOUT: %empty_tuple.type.as.M.impl.G.type: type = fn_type @empty_tuple.type.as.M.impl.G [concrete]
  3411. // CHECK:STDOUT: %empty_tuple.type.as.M.impl.G: %empty_tuple.type.as.M.impl.G.type = struct_value () [concrete]
  3412. // CHECK:STDOUT: %M.facet: %M.type = facet_value %empty_tuple.type, (%M.impl_witness) [concrete]
  3413. // CHECK:STDOUT: }
  3414. // CHECK:STDOUT:
  3415. // CHECK:STDOUT: imports {
  3416. // CHECK:STDOUT: %Core: <namespace> = namespace file.%Core.import, [concrete] {
  3417. // CHECK:STDOUT: import Core//prelude
  3418. // CHECK:STDOUT: import Core//prelude/...
  3419. // CHECK:STDOUT: }
  3420. // CHECK:STDOUT: }
  3421. // CHECK:STDOUT:
  3422. // CHECK:STDOUT: file {
  3423. // CHECK:STDOUT: package: <namespace> = namespace [concrete] {
  3424. // CHECK:STDOUT: .Core = imports.%Core
  3425. // CHECK:STDOUT: .M = %M.decl
  3426. // CHECK:STDOUT: }
  3427. // CHECK:STDOUT: %Core.import = import Core
  3428. // CHECK:STDOUT: %M.decl: type = interface_decl @M [concrete = constants.%M.type] {} {}
  3429. // CHECK:STDOUT: impl_decl @empty_tuple.type.as.M.impl [concrete] {} {
  3430. // CHECK:STDOUT: %.loc8_7.1: %empty_tuple.type = tuple_literal () [concrete = constants.%empty_tuple]
  3431. // CHECK:STDOUT: %.loc8_7.2: type = converted %.loc8_7.1, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type]
  3432. // CHECK:STDOUT: %M.ref: type = name_ref M, file.%M.decl [concrete = constants.%M.type]
  3433. // CHECK:STDOUT: %.Self: %M.type = symbolic_binding .Self [symbolic_self = constants.%.Self]
  3434. // CHECK:STDOUT: %.Self.ref: %M.type = name_ref .Self, %.Self [symbolic_self = constants.%.Self]
  3435. // CHECK:STDOUT: %Z.ref: %M.assoc_type = name_ref Z, @Z.%assoc0 [concrete = constants.%assoc0]
  3436. // CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self.ref [symbolic_self = constants.%.Self.binding.as_type]
  3437. // CHECK:STDOUT: %.loc8_20: type = converted %.Self.ref, %.Self.as_type [symbolic_self = constants.%.Self.binding.as_type]
  3438. // CHECK:STDOUT: %impl.elem0: %struct_type.b.347 = impl_witness_access constants.%M.lookup_impl_witness, element0 [symbolic_self = constants.%impl.elem0]
  3439. // CHECK:STDOUT: %.loc8_32: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct]
  3440. // CHECK:STDOUT: %.loc8_33.1: %struct_type.b.347 = struct_literal (%.loc8_32) [concrete = constants.%struct]
  3441. // CHECK:STDOUT: %empty_struct: %empty_struct_type = struct_value () [concrete = constants.%empty_struct]
  3442. // CHECK:STDOUT: %.loc8_33.2: %empty_struct_type = converted %.loc8_32, %empty_struct [concrete = constants.%empty_struct]
  3443. // CHECK:STDOUT: %struct: %struct_type.b.347 = struct_value (%.loc8_33.2) [concrete = constants.%struct]
  3444. // CHECK:STDOUT: %.loc8_33.3: %struct_type.b.347 = converted %.loc8_33.1, %struct [concrete = constants.%struct]
  3445. // CHECK:STDOUT: %.loc8_14: type = where_expr %.Self [concrete = constants.%M_where.type] {
  3446. // CHECK:STDOUT: requirement_base_facet_type constants.%M.type
  3447. // CHECK:STDOUT: requirement_rewrite %impl.elem0, %.loc8_33.3
  3448. // CHECK:STDOUT: }
  3449. // CHECK:STDOUT: }
  3450. // CHECK:STDOUT: %M.impl_witness_table = impl_witness_table (%impl_witness_assoc_constant, @empty_tuple.type.as.M.impl.%empty_tuple.type.as.M.impl.G.decl), @empty_tuple.type.as.M.impl [concrete]
  3451. // CHECK:STDOUT: %M.impl_witness: <witness> = impl_witness %M.impl_witness_table [concrete = constants.%M.impl_witness]
  3452. // CHECK:STDOUT: %impl_witness_assoc_constant: %struct_type.b.347 = impl_witness_assoc_constant constants.%struct [concrete = constants.%struct]
  3453. // CHECK:STDOUT: }
  3454. // CHECK:STDOUT:
  3455. // CHECK:STDOUT: interface @M {
  3456. // CHECK:STDOUT: %Self: %M.type = symbolic_binding Self, 0 [symbolic = constants.%Self]
  3457. // CHECK:STDOUT: %Z: %struct_type.b.347 = assoc_const_decl @Z [concrete] {
  3458. // CHECK:STDOUT: %assoc0: %M.assoc_type = assoc_entity element0, @M.%Z [concrete = constants.%assoc0]
  3459. // CHECK:STDOUT: }
  3460. // CHECK:STDOUT: %M.G.decl: %M.G.type = fn_decl @M.G [concrete = constants.%M.G] {
  3461. // CHECK:STDOUT: %return.patt: %pattern_type = return_slot_pattern [concrete]
  3462. // CHECK:STDOUT: %return.param_patt: %pattern_type = out_param_pattern %return.patt, call_param0 [concrete]
  3463. // CHECK:STDOUT: } {
  3464. // CHECK:STDOUT: %.loc5_14.1: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct]
  3465. // CHECK:STDOUT: %.loc5_14.2: type = converted %.loc5_14.1, constants.%empty_struct_type [concrete = constants.%empty_struct_type]
  3466. // CHECK:STDOUT: %return.param: ref %empty_struct_type = out_param call_param0
  3467. // CHECK:STDOUT: %return: ref %empty_struct_type = return_slot %return.param
  3468. // CHECK:STDOUT: }
  3469. // CHECK:STDOUT: %assoc1: %M.assoc_type = assoc_entity element1, %M.G.decl [concrete = constants.%assoc1]
  3470. // CHECK:STDOUT:
  3471. // CHECK:STDOUT: !members:
  3472. // CHECK:STDOUT: .Self = %Self
  3473. // CHECK:STDOUT: .Z = @Z.%assoc0
  3474. // CHECK:STDOUT: .G = %assoc1
  3475. // CHECK:STDOUT: witness = (%Z, %M.G.decl)
  3476. // CHECK:STDOUT:
  3477. // CHECK:STDOUT: !requires:
  3478. // CHECK:STDOUT: }
  3479. // CHECK:STDOUT:
  3480. // CHECK:STDOUT: generic assoc_const @Z(@M.%Self: %M.type) {
  3481. // CHECK:STDOUT: assoc_const Z:! %struct_type.b.347;
  3482. // CHECK:STDOUT: }
  3483. // CHECK:STDOUT:
  3484. // CHECK:STDOUT: impl @empty_tuple.type.as.M.impl: %.loc8_7.2 as %.loc8_14 {
  3485. // CHECK:STDOUT: %empty_tuple.type.as.M.impl.G.decl: %empty_tuple.type.as.M.impl.G.type = fn_decl @empty_tuple.type.as.M.impl.G [concrete = constants.%empty_tuple.type.as.M.impl.G] {
  3486. // CHECK:STDOUT: %return.patt: %pattern_type = return_slot_pattern [concrete]
  3487. // CHECK:STDOUT: %return.param_patt: %pattern_type = out_param_pattern %return.patt, call_param0 [concrete]
  3488. // CHECK:STDOUT: } {
  3489. // CHECK:STDOUT: %.loc9_14.1: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct]
  3490. // CHECK:STDOUT: %.loc9_14.2: type = converted %.loc9_14.1, constants.%empty_struct_type [concrete = constants.%empty_struct_type]
  3491. // CHECK:STDOUT: %return.param: ref %empty_struct_type = out_param call_param0
  3492. // CHECK:STDOUT: %return: ref %empty_struct_type = return_slot %return.param
  3493. // CHECK:STDOUT: }
  3494. // CHECK:STDOUT:
  3495. // CHECK:STDOUT: !members:
  3496. // CHECK:STDOUT: .G = %empty_tuple.type.as.M.impl.G.decl
  3497. // CHECK:STDOUT: .M = <poisoned>
  3498. // CHECK:STDOUT: witness = file.%M.impl_witness
  3499. // CHECK:STDOUT: }
  3500. // CHECK:STDOUT:
  3501. // CHECK:STDOUT: generic fn @M.G(@M.%Self: %M.type) {
  3502. // CHECK:STDOUT: fn() -> %empty_struct_type;
  3503. // CHECK:STDOUT: }
  3504. // CHECK:STDOUT:
  3505. // CHECK:STDOUT: fn @empty_tuple.type.as.M.impl.G() -> %empty_struct_type {
  3506. // CHECK:STDOUT: !entry:
  3507. // CHECK:STDOUT: %Self.ref: type = name_ref Self, @empty_tuple.type.as.M.impl.%.loc8_7.2 [concrete = constants.%empty_tuple.type]
  3508. // CHECK:STDOUT: %M.ref: type = name_ref M, file.%M.decl [concrete = constants.%M.type]
  3509. // CHECK:STDOUT: %M.facet: %M.type = facet_value %Self.ref, (constants.%M.impl_witness) [concrete = constants.%M.facet]
  3510. // CHECK:STDOUT: %.loc10_18: %M.type = converted %Self.ref, %M.facet [concrete = constants.%M.facet]
  3511. // CHECK:STDOUT: %Z.ref: %M.assoc_type = name_ref Z, @Z.%assoc0 [concrete = constants.%assoc0]
  3512. // CHECK:STDOUT: %as_type: type = facet_access_type %.loc10_18 [concrete = constants.%empty_tuple.type]
  3513. // CHECK:STDOUT: %.loc10_23: type = converted %.loc10_18, %as_type [concrete = constants.%empty_tuple.type]
  3514. // CHECK:STDOUT: %impl.elem0: %struct_type.b.347 = impl_witness_access constants.%M.impl_witness, element0 [concrete = constants.%struct]
  3515. // CHECK:STDOUT: %.loc10_25.1: %empty_struct_type = struct_access %impl.elem0, element0 [concrete = constants.%empty_struct]
  3516. // CHECK:STDOUT: %.loc10_25.2: init %empty_struct_type = struct_init () to %return [concrete = constants.%empty_struct]
  3517. // CHECK:STDOUT: %.loc10_27: init %empty_struct_type = converted %.loc10_25.1, %.loc10_25.2 [concrete = constants.%empty_struct]
  3518. // CHECK:STDOUT: return %.loc10_27 to %return
  3519. // CHECK:STDOUT: }
  3520. // CHECK:STDOUT:
  3521. // CHECK:STDOUT: specific @Z(constants.%Self) {}
  3522. // CHECK:STDOUT:
  3523. // CHECK:STDOUT: specific @M.G(constants.%Self) {}
  3524. // CHECK:STDOUT:
  3525. // CHECK:STDOUT: specific @Z(constants.%.Self) {}
  3526. // CHECK:STDOUT:
  3527. // CHECK:STDOUT: specific @M.G(constants.%M.facet) {}
  3528. // CHECK:STDOUT:
  3529. // CHECK:STDOUT: specific @Z(constants.%M.facet) {}
  3530. // CHECK:STDOUT:
  3531. // CHECK:STDOUT: --- self_as_uses_correct_rewrite_constraint.carbon
  3532. // CHECK:STDOUT:
  3533. // CHECK:STDOUT: constants {
  3534. // CHECK:STDOUT: %type: type = facet_type <type> [concrete]
  3535. // CHECK:STDOUT: %.Self.3b7: %type = symbolic_binding .Self [symbolic_self]
  3536. // CHECK:STDOUT: %T.d9f: type = symbolic_binding T, 0 [symbolic]
  3537. // CHECK:STDOUT: %pattern_type.98f: type = pattern_type type [concrete]
  3538. // CHECK:STDOUT: %C.type: type = generic_class_type @C [concrete]
  3539. // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete]
  3540. // CHECK:STDOUT: %C.generic: %C.type = struct_value () [concrete]
  3541. // CHECK:STDOUT: %C.3f0: type = class_type @C, @C(%T.d9f) [symbolic]
  3542. // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete]
  3543. // CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %empty_struct_type [concrete]
  3544. // CHECK:STDOUT: %M.type: type = facet_type <@M> [concrete]
  3545. // CHECK:STDOUT: %Self.70e: %M.type = symbolic_binding Self, 0 [symbolic]
  3546. // CHECK:STDOUT: %struct_type.b.86f: type = struct_type {.b: type} [concrete]
  3547. // CHECK:STDOUT: %M.assoc_type: type = assoc_entity_type @M [concrete]
  3548. // CHECK:STDOUT: %assoc0.105: %M.assoc_type = assoc_entity element0, @M.%Z [concrete]
  3549. // CHECK:STDOUT: %M.G.type: type = fn_type @M.G [concrete]
  3550. // CHECK:STDOUT: %M.G: %M.G.type = struct_value () [concrete]
  3551. // CHECK:STDOUT: %assoc1: %M.assoc_type = assoc_entity element1, @M.%M.G.decl [concrete]
  3552. // CHECK:STDOUT: %empty_struct: %empty_struct_type = struct_value () [concrete]
  3553. // CHECK:STDOUT: %C.7a7: type = class_type @C, @C(%empty_struct_type) [concrete]
  3554. // CHECK:STDOUT: %.Self.5f5: %M.type = symbolic_binding .Self [symbolic_self]
  3555. // CHECK:STDOUT: %.Self.binding.as_type: type = symbolic_binding_type .Self, %.Self.5f5 [symbolic_self]
  3556. // CHECK:STDOUT: %M.lookup_impl_witness: <witness> = lookup_impl_witness %.Self.5f5, @M [symbolic_self]
  3557. // CHECK:STDOUT: %impl.elem0.228: %struct_type.b.86f = impl_witness_access %M.lookup_impl_witness, element0 [symbolic_self]
  3558. // CHECK:STDOUT: %struct_type.b.347: type = struct_type {.b: %empty_struct_type} [concrete]
  3559. // CHECK:STDOUT: %struct.692: %struct_type.b.347 = struct_value (%empty_struct) [concrete]
  3560. // CHECK:STDOUT: %struct_type.b.161: type = struct_type {.b: %empty_tuple.type} [concrete]
  3561. // CHECK:STDOUT: %struct.0f3: %struct_type.b.86f = struct_value (%empty_struct_type) [concrete]
  3562. // CHECK:STDOUT: %M_where.type.a69: type = facet_type <@M where %impl.elem0.228 = %struct.0f3> [concrete]
  3563. // CHECK:STDOUT: %M.impl_witness.2c0: <witness> = impl_witness file.%M.impl_witness_table.loc10 [concrete]
  3564. // CHECK:STDOUT: %C.as.M.impl.G.type.062: type = fn_type @C.as.M.impl.G.loc11 [concrete]
  3565. // CHECK:STDOUT: %C.as.M.impl.G.2c5: %C.as.M.impl.G.type.062 = struct_value () [concrete]
  3566. // CHECK:STDOUT: %M.facet.9bf: %M.type = facet_value %C.7a7, (%M.impl_witness.2c0) [concrete]
  3567. // CHECK:STDOUT: %Copy.type: type = facet_type <@Copy> [concrete]
  3568. // CHECK:STDOUT: %Copy.Op.type: type = fn_type @Copy.Op [concrete]
  3569. // CHECK:STDOUT: %Copy.impl_witness.de9: <witness> = impl_witness imports.%Copy.impl_witness_table.40f [concrete]
  3570. // CHECK:STDOUT: %Copy.facet: %Copy.type = facet_value type, (%Copy.impl_witness.de9) [concrete]
  3571. // CHECK:STDOUT: %.98f: type = fn_type_with_self_type %Copy.Op.type, %Copy.facet [concrete]
  3572. // CHECK:STDOUT: %type.as.Copy.impl.Op.type: type = fn_type @type.as.Copy.impl.Op [concrete]
  3573. // CHECK:STDOUT: %type.as.Copy.impl.Op: %type.as.Copy.impl.Op.type = struct_value () [concrete]
  3574. // CHECK:STDOUT: %type.as.Copy.impl.Op.bound.583: <bound method> = bound_method %empty_struct_type, %type.as.Copy.impl.Op [concrete]
  3575. // CHECK:STDOUT: %empty_tuple: %empty_tuple.type = tuple_value () [concrete]
  3576. // CHECK:STDOUT: %C.3a0: type = class_type @C, @C(%empty_tuple.type) [concrete]
  3577. // CHECK:STDOUT: %struct.63c: %struct_type.b.161 = struct_value (%empty_tuple) [concrete]
  3578. // CHECK:STDOUT: %struct.c94: %struct_type.b.86f = struct_value (%empty_tuple.type) [concrete]
  3579. // CHECK:STDOUT: %M_where.type.87f: type = facet_type <@M where %impl.elem0.228 = %struct.c94> [concrete]
  3580. // CHECK:STDOUT: %M.impl_witness.1f1: <witness> = impl_witness file.%M.impl_witness_table.loc16 [concrete]
  3581. // CHECK:STDOUT: %C.as.M.impl.G.type.54d: type = fn_type @C.as.M.impl.G.loc17 [concrete]
  3582. // CHECK:STDOUT: %C.as.M.impl.G.a42: %C.as.M.impl.G.type.54d = struct_value () [concrete]
  3583. // CHECK:STDOUT: %M.facet.fbc: %M.type = facet_value %C.3a0, (%M.impl_witness.1f1) [concrete]
  3584. // CHECK:STDOUT: %type.as.Copy.impl.Op.bound.a1c: <bound method> = bound_method %empty_tuple.type, %type.as.Copy.impl.Op [concrete]
  3585. // CHECK:STDOUT: }
  3586. // CHECK:STDOUT:
  3587. // CHECK:STDOUT: imports {
  3588. // CHECK:STDOUT: %Core: <namespace> = namespace file.%Core.import, [concrete] {
  3589. // CHECK:STDOUT: .Copy = %Core.Copy
  3590. // CHECK:STDOUT: import Core//prelude
  3591. // CHECK:STDOUT: import Core//prelude/...
  3592. // CHECK:STDOUT: }
  3593. // CHECK:STDOUT: %Core.Copy: type = import_ref Core//prelude/parts/copy, Copy, loaded [concrete = constants.%Copy.type]
  3594. // CHECK:STDOUT: %Core.import_ref.f97: %type.as.Copy.impl.Op.type = import_ref Core//prelude/parts/copy, loc{{\d+_\d+}}, loaded [concrete = constants.%type.as.Copy.impl.Op]
  3595. // CHECK:STDOUT: %Copy.impl_witness_table.40f = impl_witness_table (%Core.import_ref.f97), @type.as.Copy.impl [concrete]
  3596. // CHECK:STDOUT: }
  3597. // CHECK:STDOUT:
  3598. // CHECK:STDOUT: file {
  3599. // CHECK:STDOUT: package: <namespace> = namespace [concrete] {
  3600. // CHECK:STDOUT: .Core = imports.%Core
  3601. // CHECK:STDOUT: .C = %C.decl
  3602. // CHECK:STDOUT: .M = %M.decl
  3603. // CHECK:STDOUT: }
  3604. // CHECK:STDOUT: %Core.import = import Core
  3605. // CHECK:STDOUT: %C.decl: %C.type = class_decl @C [concrete = constants.%C.generic] {
  3606. // CHECK:STDOUT: %T.patt: %pattern_type.98f = symbolic_binding_pattern T, 0 [concrete]
  3607. // CHECK:STDOUT: } {
  3608. // CHECK:STDOUT: %.Self: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.3b7]
  3609. // CHECK:STDOUT: %T.loc3_9.2: type = symbolic_binding T, 0 [symbolic = %T.loc3_9.1 (constants.%T.d9f)]
  3610. // CHECK:STDOUT: }
  3611. // CHECK:STDOUT: %M.decl: type = interface_decl @M [concrete = constants.%M.type] {} {}
  3612. // CHECK:STDOUT: impl_decl @C.as.M.impl.cd4 [concrete] {} {
  3613. // CHECK:STDOUT: %C.ref: %C.type = name_ref C, file.%C.decl [concrete = constants.%C.generic]
  3614. // CHECK:STDOUT: %.loc10_9: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct]
  3615. // CHECK:STDOUT: %.loc10_10: type = converted %.loc10_9, constants.%empty_struct_type [concrete = constants.%empty_struct_type]
  3616. // CHECK:STDOUT: %C: type = class_type @C, @C(constants.%empty_struct_type) [concrete = constants.%C.7a7]
  3617. // CHECK:STDOUT: %M.ref: type = name_ref M, file.%M.decl [concrete = constants.%M.type]
  3618. // CHECK:STDOUT: %.Self: %M.type = symbolic_binding .Self [symbolic_self = constants.%.Self.5f5]
  3619. // CHECK:STDOUT: %.Self.ref: %M.type = name_ref .Self, %.Self [symbolic_self = constants.%.Self.5f5]
  3620. // CHECK:STDOUT: %Z.ref: %M.assoc_type = name_ref Z, @Z.%assoc0 [concrete = constants.%assoc0.105]
  3621. // CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self.ref [symbolic_self = constants.%.Self.binding.as_type]
  3622. // CHECK:STDOUT: %.loc10_23: type = converted %.Self.ref, %.Self.as_type [symbolic_self = constants.%.Self.binding.as_type]
  3623. // CHECK:STDOUT: %impl.elem0: %struct_type.b.86f = impl_witness_access constants.%M.lookup_impl_witness, element0 [symbolic_self = constants.%impl.elem0.228]
  3624. // CHECK:STDOUT: %.loc10_35: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct]
  3625. // CHECK:STDOUT: %.loc10_36.1: %struct_type.b.347 = struct_literal (%.loc10_35) [concrete = constants.%struct.692]
  3626. // CHECK:STDOUT: %.loc10_36.2: type = converted %.loc10_35, constants.%empty_struct_type [concrete = constants.%empty_struct_type]
  3627. // CHECK:STDOUT: %struct: %struct_type.b.86f = struct_value (%.loc10_36.2) [concrete = constants.%struct.0f3]
  3628. // CHECK:STDOUT: %.loc10_36.3: %struct_type.b.86f = converted %.loc10_36.1, %struct [concrete = constants.%struct.0f3]
  3629. // CHECK:STDOUT: %.loc10_17: type = where_expr %.Self [concrete = constants.%M_where.type.a69] {
  3630. // CHECK:STDOUT: requirement_base_facet_type constants.%M.type
  3631. // CHECK:STDOUT: requirement_rewrite %impl.elem0, %.loc10_36.3
  3632. // CHECK:STDOUT: }
  3633. // CHECK:STDOUT: }
  3634. // CHECK:STDOUT: %M.impl_witness_table.loc10 = impl_witness_table (%impl_witness_assoc_constant.loc10, @C.as.M.impl.cd4.%C.as.M.impl.G.decl), @C.as.M.impl.cd4 [concrete]
  3635. // CHECK:STDOUT: %M.impl_witness.loc10: <witness> = impl_witness %M.impl_witness_table.loc10 [concrete = constants.%M.impl_witness.2c0]
  3636. // CHECK:STDOUT: %impl_witness_assoc_constant.loc10: %struct_type.b.86f = impl_witness_assoc_constant constants.%struct.0f3 [concrete = constants.%struct.0f3]
  3637. // CHECK:STDOUT: impl_decl @C.as.M.impl.3ca [concrete] {} {
  3638. // CHECK:STDOUT: %C.ref: %C.type = name_ref C, file.%C.decl [concrete = constants.%C.generic]
  3639. // CHECK:STDOUT: %.loc16_9: %empty_tuple.type = tuple_literal () [concrete = constants.%empty_tuple]
  3640. // CHECK:STDOUT: %.loc16_10: type = converted %.loc16_9, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type]
  3641. // CHECK:STDOUT: %C: type = class_type @C, @C(constants.%empty_tuple.type) [concrete = constants.%C.3a0]
  3642. // CHECK:STDOUT: %M.ref: type = name_ref M, file.%M.decl [concrete = constants.%M.type]
  3643. // CHECK:STDOUT: %.Self: %M.type = symbolic_binding .Self [symbolic_self = constants.%.Self.5f5]
  3644. // CHECK:STDOUT: %.Self.ref: %M.type = name_ref .Self, %.Self [symbolic_self = constants.%.Self.5f5]
  3645. // CHECK:STDOUT: %Z.ref: %M.assoc_type = name_ref Z, @Z.%assoc0 [concrete = constants.%assoc0.105]
  3646. // CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self.ref [symbolic_self = constants.%.Self.binding.as_type]
  3647. // CHECK:STDOUT: %.loc16_23: type = converted %.Self.ref, %.Self.as_type [symbolic_self = constants.%.Self.binding.as_type]
  3648. // CHECK:STDOUT: %impl.elem0: %struct_type.b.86f = impl_witness_access constants.%M.lookup_impl_witness, element0 [symbolic_self = constants.%impl.elem0.228]
  3649. // CHECK:STDOUT: %.loc16_35: %empty_tuple.type = tuple_literal () [concrete = constants.%empty_tuple]
  3650. // CHECK:STDOUT: %.loc16_36.1: %struct_type.b.161 = struct_literal (%.loc16_35) [concrete = constants.%struct.63c]
  3651. // CHECK:STDOUT: %.loc16_36.2: type = converted %.loc16_35, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type]
  3652. // CHECK:STDOUT: %struct: %struct_type.b.86f = struct_value (%.loc16_36.2) [concrete = constants.%struct.c94]
  3653. // CHECK:STDOUT: %.loc16_36.3: %struct_type.b.86f = converted %.loc16_36.1, %struct [concrete = constants.%struct.c94]
  3654. // CHECK:STDOUT: %.loc16_17: type = where_expr %.Self [concrete = constants.%M_where.type.87f] {
  3655. // CHECK:STDOUT: requirement_base_facet_type constants.%M.type
  3656. // CHECK:STDOUT: requirement_rewrite %impl.elem0, %.loc16_36.3
  3657. // CHECK:STDOUT: }
  3658. // CHECK:STDOUT: }
  3659. // CHECK:STDOUT: %M.impl_witness_table.loc16 = impl_witness_table (%impl_witness_assoc_constant.loc16, @C.as.M.impl.3ca.%C.as.M.impl.G.decl), @C.as.M.impl.3ca [concrete]
  3660. // CHECK:STDOUT: %M.impl_witness.loc16: <witness> = impl_witness %M.impl_witness_table.loc16 [concrete = constants.%M.impl_witness.1f1]
  3661. // CHECK:STDOUT: %impl_witness_assoc_constant.loc16: %struct_type.b.86f = impl_witness_assoc_constant constants.%struct.c94 [concrete = constants.%struct.c94]
  3662. // CHECK:STDOUT: }
  3663. // CHECK:STDOUT:
  3664. // CHECK:STDOUT: interface @M {
  3665. // CHECK:STDOUT: %Self: %M.type = symbolic_binding Self, 0 [symbolic = constants.%Self.70e]
  3666. // CHECK:STDOUT: %Z: %struct_type.b.86f = assoc_const_decl @Z [concrete] {
  3667. // CHECK:STDOUT: %assoc0: %M.assoc_type = assoc_entity element0, @M.%Z [concrete = constants.%assoc0.105]
  3668. // CHECK:STDOUT: }
  3669. // CHECK:STDOUT: %M.G.decl: %M.G.type = fn_decl @M.G [concrete = constants.%M.G] {
  3670. // CHECK:STDOUT: %return.patt: %pattern_type.98f = return_slot_pattern [concrete]
  3671. // CHECK:STDOUT: %return.param_patt: %pattern_type.98f = out_param_pattern %return.patt, call_param0 [concrete]
  3672. // CHECK:STDOUT: } {
  3673. // CHECK:STDOUT: %return.param: ref type = out_param call_param0
  3674. // CHECK:STDOUT: %return: ref type = return_slot %return.param
  3675. // CHECK:STDOUT: }
  3676. // CHECK:STDOUT: %assoc1: %M.assoc_type = assoc_entity element1, %M.G.decl [concrete = constants.%assoc1]
  3677. // CHECK:STDOUT:
  3678. // CHECK:STDOUT: !members:
  3679. // CHECK:STDOUT: .Self = %Self
  3680. // CHECK:STDOUT: .Z = @Z.%assoc0
  3681. // CHECK:STDOUT: .G = %assoc1
  3682. // CHECK:STDOUT: witness = (%Z, %M.G.decl)
  3683. // CHECK:STDOUT:
  3684. // CHECK:STDOUT: !requires:
  3685. // CHECK:STDOUT: }
  3686. // CHECK:STDOUT:
  3687. // CHECK:STDOUT: generic assoc_const @Z(@M.%Self: %M.type) {
  3688. // CHECK:STDOUT: assoc_const Z:! %struct_type.b.86f;
  3689. // CHECK:STDOUT: }
  3690. // CHECK:STDOUT:
  3691. // CHECK:STDOUT: impl @C.as.M.impl.cd4: %C as %.loc10_17 {
  3692. // CHECK:STDOUT: %C.as.M.impl.G.decl: %C.as.M.impl.G.type.062 = fn_decl @C.as.M.impl.G.loc11 [concrete = constants.%C.as.M.impl.G.2c5] {
  3693. // CHECK:STDOUT: %return.patt: %pattern_type.98f = return_slot_pattern [concrete]
  3694. // CHECK:STDOUT: %return.param_patt: %pattern_type.98f = out_param_pattern %return.patt, call_param0 [concrete]
  3695. // CHECK:STDOUT: } {
  3696. // CHECK:STDOUT: %return.param: ref type = out_param call_param0
  3697. // CHECK:STDOUT: %return: ref type = return_slot %return.param
  3698. // CHECK:STDOUT: }
  3699. // CHECK:STDOUT:
  3700. // CHECK:STDOUT: !members:
  3701. // CHECK:STDOUT: .G = %C.as.M.impl.G.decl
  3702. // CHECK:STDOUT: .M = <poisoned>
  3703. // CHECK:STDOUT: witness = file.%M.impl_witness.loc10
  3704. // CHECK:STDOUT: }
  3705. // CHECK:STDOUT:
  3706. // CHECK:STDOUT: impl @C.as.M.impl.3ca: %C as %.loc16_17 {
  3707. // CHECK:STDOUT: %C.as.M.impl.G.decl: %C.as.M.impl.G.type.54d = fn_decl @C.as.M.impl.G.loc17 [concrete = constants.%C.as.M.impl.G.a42] {
  3708. // CHECK:STDOUT: %return.patt: %pattern_type.98f = return_slot_pattern [concrete]
  3709. // CHECK:STDOUT: %return.param_patt: %pattern_type.98f = out_param_pattern %return.patt, call_param0 [concrete]
  3710. // CHECK:STDOUT: } {
  3711. // CHECK:STDOUT: %return.param: ref type = out_param call_param0
  3712. // CHECK:STDOUT: %return: ref type = return_slot %return.param
  3713. // CHECK:STDOUT: }
  3714. // CHECK:STDOUT:
  3715. // CHECK:STDOUT: !members:
  3716. // CHECK:STDOUT: .G = %C.as.M.impl.G.decl
  3717. // CHECK:STDOUT: .M = <poisoned>
  3718. // CHECK:STDOUT: witness = file.%M.impl_witness.loc16
  3719. // CHECK:STDOUT: }
  3720. // CHECK:STDOUT:
  3721. // CHECK:STDOUT: generic class @C(%T.loc3_9.2: type) {
  3722. // CHECK:STDOUT: %T.loc3_9.1: type = symbolic_binding T, 0 [symbolic = %T.loc3_9.1 (constants.%T.d9f)]
  3723. // CHECK:STDOUT:
  3724. // CHECK:STDOUT: !definition:
  3725. // CHECK:STDOUT:
  3726. // CHECK:STDOUT: class {
  3727. // CHECK:STDOUT: %complete_type: <witness> = complete_type_witness constants.%empty_struct_type [concrete = constants.%complete_type]
  3728. // CHECK:STDOUT: complete_type_witness = %complete_type
  3729. // CHECK:STDOUT:
  3730. // CHECK:STDOUT: !members:
  3731. // CHECK:STDOUT: .Self = constants.%C.3f0
  3732. // CHECK:STDOUT: }
  3733. // CHECK:STDOUT: }
  3734. // CHECK:STDOUT:
  3735. // CHECK:STDOUT: generic fn @M.G(@M.%Self: %M.type) {
  3736. // CHECK:STDOUT: fn() -> type;
  3737. // CHECK:STDOUT: }
  3738. // CHECK:STDOUT:
  3739. // CHECK:STDOUT: fn @C.as.M.impl.G.loc11() -> type {
  3740. // CHECK:STDOUT: !entry:
  3741. // CHECK:STDOUT: %Self.ref: type = name_ref Self, @C.as.M.impl.cd4.%C [concrete = constants.%C.7a7]
  3742. // CHECK:STDOUT: %M.ref: type = name_ref M, file.%M.decl [concrete = constants.%M.type]
  3743. // CHECK:STDOUT: %M.facet: %M.type = facet_value %Self.ref, (constants.%M.impl_witness.2c0) [concrete = constants.%M.facet.9bf]
  3744. // CHECK:STDOUT: %.loc12_18: %M.type = converted %Self.ref, %M.facet [concrete = constants.%M.facet.9bf]
  3745. // CHECK:STDOUT: %Z.ref: %M.assoc_type = name_ref Z, @Z.%assoc0 [concrete = constants.%assoc0.105]
  3746. // CHECK:STDOUT: %as_type: type = facet_access_type %.loc12_18 [concrete = constants.%C.7a7]
  3747. // CHECK:STDOUT: %.loc12_23: type = converted %.loc12_18, %as_type [concrete = constants.%C.7a7]
  3748. // CHECK:STDOUT: %impl.elem0.loc12_23: %struct_type.b.86f = impl_witness_access constants.%M.impl_witness.2c0, element0 [concrete = constants.%struct.0f3]
  3749. // CHECK:STDOUT: %.loc12_25: type = struct_access %impl.elem0.loc12_23, element0 [concrete = constants.%empty_struct_type]
  3750. // CHECK:STDOUT: %impl.elem0.loc12_25: %.98f = impl_witness_access constants.%Copy.impl_witness.de9, element0 [concrete = constants.%type.as.Copy.impl.Op]
  3751. // CHECK:STDOUT: %bound_method: <bound method> = bound_method %.loc12_25, %impl.elem0.loc12_25 [concrete = constants.%type.as.Copy.impl.Op.bound.583]
  3752. // CHECK:STDOUT: %type.as.Copy.impl.Op.call: init type = call %bound_method(%.loc12_25) [concrete = constants.%empty_struct_type]
  3753. // CHECK:STDOUT: return %type.as.Copy.impl.Op.call to %return
  3754. // CHECK:STDOUT: }
  3755. // CHECK:STDOUT:
  3756. // CHECK:STDOUT: fn @C.as.M.impl.G.loc17() -> type {
  3757. // CHECK:STDOUT: !entry:
  3758. // CHECK:STDOUT: %Self.ref: type = name_ref Self, @C.as.M.impl.3ca.%C [concrete = constants.%C.3a0]
  3759. // CHECK:STDOUT: %M.ref: type = name_ref M, file.%M.decl [concrete = constants.%M.type]
  3760. // CHECK:STDOUT: %M.facet: %M.type = facet_value %Self.ref, (constants.%M.impl_witness.1f1) [concrete = constants.%M.facet.fbc]
  3761. // CHECK:STDOUT: %.loc18_18: %M.type = converted %Self.ref, %M.facet [concrete = constants.%M.facet.fbc]
  3762. // CHECK:STDOUT: %Z.ref: %M.assoc_type = name_ref Z, @Z.%assoc0 [concrete = constants.%assoc0.105]
  3763. // CHECK:STDOUT: %as_type: type = facet_access_type %.loc18_18 [concrete = constants.%C.3a0]
  3764. // CHECK:STDOUT: %.loc18_23: type = converted %.loc18_18, %as_type [concrete = constants.%C.3a0]
  3765. // CHECK:STDOUT: %impl.elem0.loc18_23: %struct_type.b.86f = impl_witness_access constants.%M.impl_witness.1f1, element0 [concrete = constants.%struct.c94]
  3766. // CHECK:STDOUT: %.loc18_25: type = struct_access %impl.elem0.loc18_23, element0 [concrete = constants.%empty_tuple.type]
  3767. // CHECK:STDOUT: %impl.elem0.loc18_25: %.98f = impl_witness_access constants.%Copy.impl_witness.de9, element0 [concrete = constants.%type.as.Copy.impl.Op]
  3768. // CHECK:STDOUT: %bound_method: <bound method> = bound_method %.loc18_25, %impl.elem0.loc18_25 [concrete = constants.%type.as.Copy.impl.Op.bound.a1c]
  3769. // CHECK:STDOUT: %type.as.Copy.impl.Op.call: init type = call %bound_method(%.loc18_25) [concrete = constants.%empty_tuple.type]
  3770. // CHECK:STDOUT: return %type.as.Copy.impl.Op.call to %return
  3771. // CHECK:STDOUT: }
  3772. // CHECK:STDOUT:
  3773. // CHECK:STDOUT: specific @C(constants.%T.d9f) {
  3774. // CHECK:STDOUT: %T.loc3_9.1 => constants.%T.d9f
  3775. // CHECK:STDOUT: }
  3776. // CHECK:STDOUT:
  3777. // CHECK:STDOUT: specific @Z(constants.%Self.70e) {}
  3778. // CHECK:STDOUT:
  3779. // CHECK:STDOUT: specific @M.G(constants.%Self.70e) {}
  3780. // CHECK:STDOUT:
  3781. // CHECK:STDOUT: specific @C(constants.%empty_struct_type) {
  3782. // CHECK:STDOUT: %T.loc3_9.1 => constants.%empty_struct_type
  3783. // CHECK:STDOUT: }
  3784. // CHECK:STDOUT:
  3785. // CHECK:STDOUT: specific @Z(constants.%.Self.5f5) {}
  3786. // CHECK:STDOUT:
  3787. // CHECK:STDOUT: specific @M.G(constants.%M.facet.9bf) {}
  3788. // CHECK:STDOUT:
  3789. // CHECK:STDOUT: specific @Z(constants.%M.facet.9bf) {}
  3790. // CHECK:STDOUT:
  3791. // CHECK:STDOUT: specific @C(constants.%empty_tuple.type) {
  3792. // CHECK:STDOUT: %T.loc3_9.1 => constants.%empty_tuple.type
  3793. // CHECK:STDOUT: }
  3794. // CHECK:STDOUT:
  3795. // CHECK:STDOUT: specific @M.G(constants.%M.facet.fbc) {}
  3796. // CHECK:STDOUT:
  3797. // CHECK:STDOUT: specific @Z(constants.%M.facet.fbc) {}
  3798. // CHECK:STDOUT:
  3799. // CHECK:STDOUT: --- associated_int_in_array.carbon
  3800. // CHECK:STDOUT:
  3801. // CHECK:STDOUT: constants {
  3802. // CHECK:STDOUT: %I.type: type = facet_type <@I> [concrete]
  3803. // CHECK:STDOUT: %Self.9f2: %I.type = symbolic_binding Self, 0 [symbolic]
  3804. // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete]
  3805. // CHECK:STDOUT: %Int.type: type = generic_class_type @Int [concrete]
  3806. // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete]
  3807. // CHECK:STDOUT: %Int.generic: %Int.type = struct_value () [concrete]
  3808. // CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [concrete]
  3809. // CHECK:STDOUT: %I.assoc_type: type = assoc_entity_type @I [concrete]
  3810. // CHECK:STDOUT: %assoc0.995: %I.assoc_type = assoc_entity element0, @I.%N [concrete]
  3811. // CHECK:STDOUT: %Self.binding.as_type.bcb: type = symbolic_binding_type Self, 0, %Self.9f2 [symbolic]
  3812. // CHECK:STDOUT: %pattern_type.89c: type = pattern_type %Self.binding.as_type.bcb [symbolic]
  3813. // CHECK:STDOUT: %Bool.type: type = fn_type @Bool [concrete]
  3814. // CHECK:STDOUT: %Bool: %Bool.type = struct_value () [concrete]
  3815. // CHECK:STDOUT: %I.lookup_impl_witness.9b0: <witness> = lookup_impl_witness %Self.9f2, @I [symbolic]
  3816. // CHECK:STDOUT: %impl.elem0.b81: %i32 = impl_witness_access %I.lookup_impl_witness.9b0, element0 [symbolic]
  3817. // CHECK:STDOUT: %ImplicitAs.type.cc7: type = generic_interface_type @ImplicitAs [concrete]
  3818. // CHECK:STDOUT: %ImplicitAs.generic: %ImplicitAs.type.cc7 = struct_value () [concrete]
  3819. // CHECK:STDOUT: %ImplicitAs.type.7a9: type = facet_type <@ImplicitAs, @ImplicitAs(Core.IntLiteral)> [concrete]
  3820. // CHECK:STDOUT: %ImplicitAs.Convert.type.71e: type = fn_type @ImplicitAs.Convert, @ImplicitAs(Core.IntLiteral) [concrete]
  3821. // CHECK:STDOUT: %To: Core.IntLiteral = symbolic_binding To, 0 [symbolic]
  3822. // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.f51: type = fn_type @Core.IntLiteral.as.ImplicitAs.impl.Convert, @Core.IntLiteral.as.ImplicitAs.impl(%To) [symbolic]
  3823. // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.2a1: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.f51 = struct_value () [symbolic]
  3824. // CHECK:STDOUT: %From: Core.IntLiteral = symbolic_binding From, 0 [symbolic]
  3825. // CHECK:STDOUT: %Int.as.ImplicitAs.impl.Convert.type.2c2: type = fn_type @Int.as.ImplicitAs.impl.Convert, @Int.as.ImplicitAs.impl(%From) [symbolic]
  3826. // CHECK:STDOUT: %Int.as.ImplicitAs.impl.Convert.cdf: %Int.as.ImplicitAs.impl.Convert.type.2c2 = struct_value () [symbolic]
  3827. // CHECK:STDOUT: %ImplicitAs.impl_witness.972: <witness> = impl_witness imports.%ImplicitAs.impl_witness_table.783, @Int.as.ImplicitAs.impl(%int_32) [concrete]
  3828. // CHECK:STDOUT: %Int.as.ImplicitAs.impl.Convert.type.592: type = fn_type @Int.as.ImplicitAs.impl.Convert, @Int.as.ImplicitAs.impl(%int_32) [concrete]
  3829. // CHECK:STDOUT: %Int.as.ImplicitAs.impl.Convert.047: %Int.as.ImplicitAs.impl.Convert.type.592 = struct_value () [concrete]
  3830. // CHECK:STDOUT: %ImplicitAs.facet.64a: %ImplicitAs.type.7a9 = facet_value %i32, (%ImplicitAs.impl_witness.972) [concrete]
  3831. // CHECK:STDOUT: %.63b: type = fn_type_with_self_type %ImplicitAs.Convert.type.71e, %ImplicitAs.facet.64a [concrete]
  3832. // CHECK:STDOUT: %Int.as.ImplicitAs.impl.Convert.bound.fe5: <bound method> = bound_method %impl.elem0.b81, %Int.as.ImplicitAs.impl.Convert.047 [symbolic]
  3833. // CHECK:STDOUT: %Int.as.ImplicitAs.impl.Convert.specific_fn: <specific function> = specific_function %Int.as.ImplicitAs.impl.Convert.047, @Int.as.ImplicitAs.impl.Convert(%int_32) [concrete]
  3834. // CHECK:STDOUT: %bound_method.51d: <bound method> = bound_method %impl.elem0.b81, %Int.as.ImplicitAs.impl.Convert.specific_fn [symbolic]
  3835. // CHECK:STDOUT: %Int.as.ImplicitAs.impl.Convert.call: init Core.IntLiteral = call %bound_method.51d(%impl.elem0.b81) [symbolic]
  3836. // CHECK:STDOUT: %array_type.e0f: type = array_type %Int.as.ImplicitAs.impl.Convert.call, bool [symbolic]
  3837. // CHECK:STDOUT: %pattern_type.a96: type = pattern_type %array_type.e0f [symbolic]
  3838. // CHECK:STDOUT: %I.F.type: type = fn_type @I.F [concrete]
  3839. // CHECK:STDOUT: %I.F: %I.F.type = struct_value () [concrete]
  3840. // CHECK:STDOUT: %assoc1: %I.assoc_type = assoc_entity element1, @I.%I.F.decl [concrete]
  3841. // CHECK:STDOUT: %empty_tuple: %empty_tuple.type = tuple_value () [concrete]
  3842. // CHECK:STDOUT: %.Self: %I.type = symbolic_binding .Self [symbolic_self]
  3843. // CHECK:STDOUT: %.Self.binding.as_type: type = symbolic_binding_type .Self, %.Self [symbolic_self]
  3844. // CHECK:STDOUT: %I.lookup_impl_witness.fd8: <witness> = lookup_impl_witness %.Self, @I [symbolic_self]
  3845. // CHECK:STDOUT: %impl.elem0.b22: %i32 = impl_witness_access %I.lookup_impl_witness.fd8, element0 [symbolic_self]
  3846. // CHECK:STDOUT: %int_2.ecc: Core.IntLiteral = int_value 2 [concrete]
  3847. // CHECK:STDOUT: %ImplicitAs.type.d14: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete]
  3848. // CHECK:STDOUT: %ImplicitAs.Convert.type.1b6: type = fn_type @ImplicitAs.Convert, @ImplicitAs(%i32) [concrete]
  3849. // CHECK:STDOUT: %ImplicitAs.impl_witness.bc9: <witness> = impl_witness imports.%ImplicitAs.impl_witness_table.132, @Core.IntLiteral.as.ImplicitAs.impl(%int_32) [concrete]
  3850. // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.51e: type = fn_type @Core.IntLiteral.as.ImplicitAs.impl.Convert, @Core.IntLiteral.as.ImplicitAs.impl(%int_32) [concrete]
  3851. // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.e9b: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.51e = struct_value () [concrete]
  3852. // CHECK:STDOUT: %ImplicitAs.facet.3ad: %ImplicitAs.type.d14 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.bc9) [concrete]
  3853. // CHECK:STDOUT: %.322: type = fn_type_with_self_type %ImplicitAs.Convert.type.1b6, %ImplicitAs.facet.3ad [concrete]
  3854. // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound: <bound method> = bound_method %int_2.ecc, %Core.IntLiteral.as.ImplicitAs.impl.Convert.e9b [concrete]
  3855. // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn: <specific function> = specific_function %Core.IntLiteral.as.ImplicitAs.impl.Convert.e9b, @Core.IntLiteral.as.ImplicitAs.impl.Convert(%int_32) [concrete]
  3856. // CHECK:STDOUT: %bound_method.9f7: <bound method> = bound_method %int_2.ecc, %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete]
  3857. // CHECK:STDOUT: %int_2.ef8: %i32 = int_value 2 [concrete]
  3858. // CHECK:STDOUT: %I_where.type: type = facet_type <@I where %impl.elem0.b22 = %int_2.ef8> [concrete]
  3859. // CHECK:STDOUT: %I.impl_witness: <witness> = impl_witness file.%I.impl_witness_table [concrete]
  3860. // CHECK:STDOUT: %pattern_type.cb1: type = pattern_type %empty_tuple.type [concrete]
  3861. // CHECK:STDOUT: %array_type.c9b: type = array_type %int_2.ecc, bool [concrete]
  3862. // CHECK:STDOUT: %pattern_type.5d5: type = pattern_type %array_type.c9b [concrete]
  3863. // CHECK:STDOUT: %empty_tuple.type.as.I.impl.F.type: type = fn_type @empty_tuple.type.as.I.impl.F [concrete]
  3864. // CHECK:STDOUT: %empty_tuple.type.as.I.impl.F: %empty_tuple.type.as.I.impl.F.type = struct_value () [concrete]
  3865. // CHECK:STDOUT: %I.facet: %I.type = facet_value %empty_tuple.type, (%I.impl_witness) [concrete]
  3866. // CHECK:STDOUT: %Int.as.ImplicitAs.impl.Convert.bound.6fa: <bound method> = bound_method %int_2.ef8, %Int.as.ImplicitAs.impl.Convert.047 [concrete]
  3867. // CHECK:STDOUT: %bound_method.33f: <bound method> = bound_method %int_2.ef8, %Int.as.ImplicitAs.impl.Convert.specific_fn [concrete]
  3868. // CHECK:STDOUT: %true: bool = bool_literal true [concrete]
  3869. // CHECK:STDOUT: %false: bool = bool_literal false [concrete]
  3870. // CHECK:STDOUT: %tuple.type.784: type = tuple_type (bool, bool) [concrete]
  3871. // CHECK:STDOUT: %tuple.a9a: %tuple.type.784 = tuple_value (%true, %false) [concrete]
  3872. // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete]
  3873. // CHECK:STDOUT: %Copy.type: type = facet_type <@Copy> [concrete]
  3874. // CHECK:STDOUT: %Copy.Op.type: type = fn_type @Copy.Op [concrete]
  3875. // CHECK:STDOUT: %Copy.impl_witness.a56: <witness> = impl_witness imports.%Copy.impl_witness_table.189 [concrete]
  3876. // CHECK:STDOUT: %Copy.facet: %Copy.type = facet_value bool, (%Copy.impl_witness.a56) [concrete]
  3877. // CHECK:STDOUT: %.05c: type = fn_type_with_self_type %Copy.Op.type, %Copy.facet [concrete]
  3878. // CHECK:STDOUT: %bool.as.Copy.impl.Op.type: type = fn_type @bool.as.Copy.impl.Op [concrete]
  3879. // CHECK:STDOUT: %bool.as.Copy.impl.Op: %bool.as.Copy.impl.Op.type = struct_value () [concrete]
  3880. // CHECK:STDOUT: %bool.as.Copy.impl.Op.bound.5ee: <bound method> = bound_method %true, %bool.as.Copy.impl.Op [concrete]
  3881. // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete]
  3882. // CHECK:STDOUT: %bool.as.Copy.impl.Op.bound.4eb: <bound method> = bound_method %false, %bool.as.Copy.impl.Op [concrete]
  3883. // CHECK:STDOUT: %array: %array_type.c9b = tuple_value (%true, %false) [concrete]
  3884. // CHECK:STDOUT: }
  3885. // CHECK:STDOUT:
  3886. // CHECK:STDOUT: imports {
  3887. // CHECK:STDOUT: %Core: <namespace> = namespace file.%Core.import, [concrete] {
  3888. // CHECK:STDOUT: .Int = %Core.Int
  3889. // CHECK:STDOUT: .Bool = %Core.Bool
  3890. // CHECK:STDOUT: .ImplicitAs = %Core.ImplicitAs
  3891. // CHECK:STDOUT: .Copy = %Core.Copy
  3892. // CHECK:STDOUT: import Core//prelude
  3893. // CHECK:STDOUT: import Core//prelude/...
  3894. // CHECK:STDOUT: }
  3895. // CHECK:STDOUT: %Core.Int: %Int.type = import_ref Core//prelude/parts/int, Int, loaded [concrete = constants.%Int.generic]
  3896. // CHECK:STDOUT: %Core.Bool: %Bool.type = import_ref Core//prelude/parts/bool, Bool, loaded [concrete = constants.%Bool]
  3897. // CHECK:STDOUT: %Core.ImplicitAs: %ImplicitAs.type.cc7 = import_ref Core//prelude/parts/as, ImplicitAs, loaded [concrete = constants.%ImplicitAs.generic]
  3898. // CHECK:STDOUT: %Core.import_ref.e24: @Core.IntLiteral.as.ImplicitAs.impl.%Core.IntLiteral.as.ImplicitAs.impl.Convert.type (%Core.IntLiteral.as.ImplicitAs.impl.Convert.type.f51) = import_ref Core//prelude/parts/int, loc{{\d+_\d+}}, loaded [symbolic = @Core.IntLiteral.as.ImplicitAs.impl.%Core.IntLiteral.as.ImplicitAs.impl.Convert (constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.2a1)]
  3899. // CHECK:STDOUT: %ImplicitAs.impl_witness_table.132 = impl_witness_table (%Core.import_ref.e24), @Core.IntLiteral.as.ImplicitAs.impl [concrete]
  3900. // CHECK:STDOUT: %Core.import_ref.a86: @Int.as.ImplicitAs.impl.%Int.as.ImplicitAs.impl.Convert.type (%Int.as.ImplicitAs.impl.Convert.type.2c2) = import_ref Core//prelude/parts/int, loc{{\d+_\d+}}, loaded [symbolic = @Int.as.ImplicitAs.impl.%Int.as.ImplicitAs.impl.Convert (constants.%Int.as.ImplicitAs.impl.Convert.cdf)]
  3901. // CHECK:STDOUT: %ImplicitAs.impl_witness_table.783 = impl_witness_table (%Core.import_ref.a86), @Int.as.ImplicitAs.impl [concrete]
  3902. // CHECK:STDOUT: %Core.Copy: type = import_ref Core//prelude/parts/copy, Copy, loaded [concrete = constants.%Copy.type]
  3903. // CHECK:STDOUT: %Core.import_ref.cc5: %bool.as.Copy.impl.Op.type = import_ref Core//prelude/parts/copy, loc{{\d+_\d+}}, loaded [concrete = constants.%bool.as.Copy.impl.Op]
  3904. // CHECK:STDOUT: %Copy.impl_witness_table.189 = impl_witness_table (%Core.import_ref.cc5), @bool.as.Copy.impl [concrete]
  3905. // CHECK:STDOUT: }
  3906. // CHECK:STDOUT:
  3907. // CHECK:STDOUT: file {
  3908. // CHECK:STDOUT: package: <namespace> = namespace [concrete] {
  3909. // CHECK:STDOUT: .Core = imports.%Core
  3910. // CHECK:STDOUT: .I = %I.decl
  3911. // CHECK:STDOUT: }
  3912. // CHECK:STDOUT: %Core.import = import Core
  3913. // CHECK:STDOUT: %I.decl: type = interface_decl @I [concrete = constants.%I.type] {} {}
  3914. // CHECK:STDOUT: impl_decl @empty_tuple.type.as.I.impl [concrete] {} {
  3915. // CHECK:STDOUT: %.loc8_7.1: %empty_tuple.type = tuple_literal () [concrete = constants.%empty_tuple]
  3916. // CHECK:STDOUT: %.loc8_7.2: type = converted %.loc8_7.1, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type]
  3917. // CHECK:STDOUT: %I.ref: type = name_ref I, file.%I.decl [concrete = constants.%I.type]
  3918. // CHECK:STDOUT: %.Self: %I.type = symbolic_binding .Self [symbolic_self = constants.%.Self]
  3919. // CHECK:STDOUT: %.Self.ref: %I.type = name_ref .Self, %.Self [symbolic_self = constants.%.Self]
  3920. // CHECK:STDOUT: %N.ref: %I.assoc_type = name_ref N, @N.%assoc0 [concrete = constants.%assoc0.995]
  3921. // CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self.ref [symbolic_self = constants.%.Self.binding.as_type]
  3922. // CHECK:STDOUT: %.loc8_20: type = converted %.Self.ref, %.Self.as_type [symbolic_self = constants.%.Self.binding.as_type]
  3923. // CHECK:STDOUT: %impl.elem0.loc8_20: %i32 = impl_witness_access constants.%I.lookup_impl_witness.fd8, element0 [symbolic_self = constants.%impl.elem0.b22]
  3924. // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [concrete = constants.%int_2.ecc]
  3925. // CHECK:STDOUT: %impl.elem0.loc8_25: %.322 = impl_witness_access constants.%ImplicitAs.impl_witness.bc9, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.e9b]
  3926. // CHECK:STDOUT: %bound_method.loc8_25.1: <bound method> = bound_method %int_2, %impl.elem0.loc8_25 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound]
  3927. // CHECK:STDOUT: %specific_fn: <specific function> = specific_function %impl.elem0.loc8_25, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn]
  3928. // CHECK:STDOUT: %bound_method.loc8_25.2: <bound method> = bound_method %int_2, %specific_fn [concrete = constants.%bound_method.9f7]
  3929. // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call: init %i32 = call %bound_method.loc8_25.2(%int_2) [concrete = constants.%int_2.ef8]
  3930. // CHECK:STDOUT: %.loc8_25.1: %i32 = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call [concrete = constants.%int_2.ef8]
  3931. // CHECK:STDOUT: %.loc8_25.2: %i32 = converted %int_2, %.loc8_25.1 [concrete = constants.%int_2.ef8]
  3932. // CHECK:STDOUT: %.loc8_14: type = where_expr %.Self [concrete = constants.%I_where.type] {
  3933. // CHECK:STDOUT: requirement_base_facet_type constants.%I.type
  3934. // CHECK:STDOUT: requirement_rewrite %impl.elem0.loc8_20, %.loc8_25.2
  3935. // CHECK:STDOUT: }
  3936. // CHECK:STDOUT: }
  3937. // CHECK:STDOUT: %I.impl_witness_table = impl_witness_table (%impl_witness_assoc_constant, @empty_tuple.type.as.I.impl.%empty_tuple.type.as.I.impl.F.decl), @empty_tuple.type.as.I.impl [concrete]
  3938. // CHECK:STDOUT: %I.impl_witness: <witness> = impl_witness %I.impl_witness_table [concrete = constants.%I.impl_witness]
  3939. // CHECK:STDOUT: %impl_witness_assoc_constant: %i32 = impl_witness_assoc_constant constants.%int_2.ef8 [concrete = constants.%int_2.ef8]
  3940. // CHECK:STDOUT: }
  3941. // CHECK:STDOUT:
  3942. // CHECK:STDOUT: interface @I {
  3943. // CHECK:STDOUT: %Self: %I.type = symbolic_binding Self, 0 [symbolic = constants.%Self.9f2]
  3944. // CHECK:STDOUT: %N: %i32 = assoc_const_decl @N [concrete] {
  3945. // CHECK:STDOUT: %assoc0: %I.assoc_type = assoc_entity element0, @I.%N [concrete = constants.%assoc0.995]
  3946. // CHECK:STDOUT: }
  3947. // CHECK:STDOUT: %I.F.decl: %I.F.type = fn_decl @I.F [concrete = constants.%I.F] {
  3948. // CHECK:STDOUT: %self.patt: @I.F.%pattern_type.loc5_8 (%pattern_type.89c) = value_binding_pattern self [concrete]
  3949. // CHECK:STDOUT: %self.param_patt: @I.F.%pattern_type.loc5_8 (%pattern_type.89c) = value_param_pattern %self.patt, call_param0 [concrete]
  3950. // CHECK:STDOUT: %return.patt: @I.F.%pattern_type.loc5_22 (%pattern_type.a96) = return_slot_pattern [concrete]
  3951. // CHECK:STDOUT: %return.param_patt: @I.F.%pattern_type.loc5_22 (%pattern_type.a96) = out_param_pattern %return.patt, call_param1 [concrete]
  3952. // CHECK:STDOUT: } {
  3953. // CHECK:STDOUT: %Bool.call: init type = call constants.%Bool() [concrete = bool]
  3954. // CHECK:STDOUT: %impl.elem0.loc5_37.2: %i32 = impl_witness_access constants.%I.lookup_impl_witness.9b0, element0 [symbolic = %impl.elem0.loc5_37.1 (constants.%impl.elem0.b81)]
  3955. // CHECK:STDOUT: %N.ref: %i32 = name_ref N, %impl.elem0.loc5_37.2 [symbolic = %impl.elem0.loc5_37.1 (constants.%impl.elem0.b81)]
  3956. // CHECK:STDOUT: %.loc5_31.1: type = value_of_initializer %Bool.call [concrete = bool]
  3957. // CHECK:STDOUT: %.loc5_31.2: type = converted %Bool.call, %.loc5_31.1 [concrete = bool]
  3958. // CHECK:STDOUT: %impl.elem0.loc5_37.3: %.63b = impl_witness_access constants.%ImplicitAs.impl_witness.972, element0 [concrete = constants.%Int.as.ImplicitAs.impl.Convert.047]
  3959. // CHECK:STDOUT: %bound_method.loc5_37.2: <bound method> = bound_method %N.ref, %impl.elem0.loc5_37.3 [symbolic = %Int.as.ImplicitAs.impl.Convert.bound (constants.%Int.as.ImplicitAs.impl.Convert.bound.fe5)]
  3960. // CHECK:STDOUT: %specific_fn: <specific function> = specific_function %impl.elem0.loc5_37.3, @Int.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Int.as.ImplicitAs.impl.Convert.specific_fn]
  3961. // CHECK:STDOUT: %bound_method.loc5_37.3: <bound method> = bound_method %N.ref, %specific_fn [symbolic = %bound_method.loc5_37.1 (constants.%bound_method.51d)]
  3962. // CHECK:STDOUT: %Int.as.ImplicitAs.impl.Convert.call.loc5_37.2: init Core.IntLiteral = call %bound_method.loc5_37.3(%N.ref) [symbolic = %Int.as.ImplicitAs.impl.Convert.call.loc5_37.1 (constants.%Int.as.ImplicitAs.impl.Convert.call)]
  3963. // CHECK:STDOUT: %.loc5_37.1: Core.IntLiteral = value_of_initializer %Int.as.ImplicitAs.impl.Convert.call.loc5_37.2 [symbolic = %Int.as.ImplicitAs.impl.Convert.call.loc5_37.1 (constants.%Int.as.ImplicitAs.impl.Convert.call)]
  3964. // CHECK:STDOUT: %.loc5_37.2: Core.IntLiteral = converted %N.ref, %.loc5_37.1 [symbolic = %Int.as.ImplicitAs.impl.Convert.call.loc5_37.1 (constants.%Int.as.ImplicitAs.impl.Convert.call)]
  3965. // 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.e0f)]
  3966. // CHECK:STDOUT: %self.param: @I.F.%Self.binding.as_type (%Self.binding.as_type.bcb) = value_param call_param0
  3967. // CHECK:STDOUT: %.loc5_14.1: type = splice_block %.loc5_14.2 [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type.bcb)] {
  3968. // CHECK:STDOUT: %Self.ref: %I.type = name_ref Self, @I.%Self [symbolic = %Self (constants.%Self.9f2)]
  3969. // CHECK:STDOUT: %Self.as_type: type = facet_access_type %Self.ref [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type.bcb)]
  3970. // CHECK:STDOUT: %.loc5_14.2: type = converted %Self.ref, %Self.as_type [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type.bcb)]
  3971. // CHECK:STDOUT: }
  3972. // CHECK:STDOUT: %self: @I.F.%Self.binding.as_type (%Self.binding.as_type.bcb) = value_binding self, %self.param
  3973. // CHECK:STDOUT: %return.param: ref @I.F.%array_type.loc5_38.1 (%array_type.e0f) = out_param call_param1
  3974. // CHECK:STDOUT: %return: ref @I.F.%array_type.loc5_38.1 (%array_type.e0f) = return_slot %return.param
  3975. // CHECK:STDOUT: }
  3976. // CHECK:STDOUT: %assoc1: %I.assoc_type = assoc_entity element1, %I.F.decl [concrete = constants.%assoc1]
  3977. // CHECK:STDOUT:
  3978. // CHECK:STDOUT: !members:
  3979. // CHECK:STDOUT: .Self = %Self
  3980. // CHECK:STDOUT: .N = @N.%assoc0
  3981. // CHECK:STDOUT: .F = %assoc1
  3982. // CHECK:STDOUT: witness = (%N, %I.F.decl)
  3983. // CHECK:STDOUT:
  3984. // CHECK:STDOUT: !requires:
  3985. // CHECK:STDOUT: }
  3986. // CHECK:STDOUT:
  3987. // CHECK:STDOUT: generic assoc_const @N(@I.%Self: %I.type) {
  3988. // CHECK:STDOUT: assoc_const N:! %i32;
  3989. // CHECK:STDOUT: }
  3990. // CHECK:STDOUT:
  3991. // CHECK:STDOUT: impl @empty_tuple.type.as.I.impl: %.loc8_7.2 as %.loc8_14 {
  3992. // CHECK:STDOUT: %empty_tuple.type.as.I.impl.F.decl: %empty_tuple.type.as.I.impl.F.type = fn_decl @empty_tuple.type.as.I.impl.F [concrete = constants.%empty_tuple.type.as.I.impl.F] {
  3993. // CHECK:STDOUT: %self.patt: %pattern_type.cb1 = value_binding_pattern self [concrete]
  3994. // CHECK:STDOUT: %self.param_patt: %pattern_type.cb1 = value_param_pattern %self.patt, call_param0 [concrete]
  3995. // CHECK:STDOUT: %return.patt: %pattern_type.5d5 = return_slot_pattern [concrete]
  3996. // CHECK:STDOUT: %return.param_patt: %pattern_type.5d5 = out_param_pattern %return.patt, call_param1 [concrete]
  3997. // CHECK:STDOUT: } {
  3998. // CHECK:STDOUT: %Bool.call: init type = call constants.%Bool() [concrete = bool]
  3999. // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [concrete = constants.%int_2.ecc]
  4000. // CHECK:STDOUT: %.loc9_31.1: type = value_of_initializer %Bool.call [concrete = bool]
  4001. // CHECK:STDOUT: %.loc9_31.2: type = converted %Bool.call, %.loc9_31.1 [concrete = bool]
  4002. // CHECK:STDOUT: %array_type: type = array_type %int_2, %.loc9_31.2 [concrete = constants.%array_type.c9b]
  4003. // CHECK:STDOUT: %self.param: %empty_tuple.type = value_param call_param0
  4004. // CHECK:STDOUT: %Self.ref: type = name_ref Self, @empty_tuple.type.as.I.impl.%.loc8_7.2 [concrete = constants.%empty_tuple.type]
  4005. // CHECK:STDOUT: %self: %empty_tuple.type = value_binding self, %self.param
  4006. // CHECK:STDOUT: %return.param: ref %array_type.c9b = out_param call_param1
  4007. // CHECK:STDOUT: %return: ref %array_type.c9b = return_slot %return.param
  4008. // CHECK:STDOUT: }
  4009. // CHECK:STDOUT:
  4010. // CHECK:STDOUT: !members:
  4011. // CHECK:STDOUT: .F = %empty_tuple.type.as.I.impl.F.decl
  4012. // CHECK:STDOUT: witness = file.%I.impl_witness
  4013. // CHECK:STDOUT: }
  4014. // CHECK:STDOUT:
  4015. // CHECK:STDOUT: generic fn @I.F(@I.%Self: %I.type) {
  4016. // CHECK:STDOUT: %Self: %I.type = symbolic_binding Self, 0 [symbolic = %Self (constants.%Self.9f2)]
  4017. // CHECK:STDOUT: %Self.binding.as_type: type = symbolic_binding_type Self, 0, %Self [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type.bcb)]
  4018. // CHECK:STDOUT: %pattern_type.loc5_8: type = pattern_type %Self.binding.as_type [symbolic = %pattern_type.loc5_8 (constants.%pattern_type.89c)]
  4019. // CHECK:STDOUT: %I.lookup_impl_witness: <witness> = lookup_impl_witness %Self, @I [symbolic = %I.lookup_impl_witness (constants.%I.lookup_impl_witness.9b0)]
  4020. // 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.b81)]
  4021. // CHECK:STDOUT: %Int.as.ImplicitAs.impl.Convert.bound: <bound method> = bound_method %impl.elem0.loc5_37.1, constants.%Int.as.ImplicitAs.impl.Convert.047 [symbolic = %Int.as.ImplicitAs.impl.Convert.bound (constants.%Int.as.ImplicitAs.impl.Convert.bound.fe5)]
  4022. // CHECK:STDOUT: %bound_method.loc5_37.1: <bound method> = bound_method %impl.elem0.loc5_37.1, constants.%Int.as.ImplicitAs.impl.Convert.specific_fn [symbolic = %bound_method.loc5_37.1 (constants.%bound_method.51d)]
  4023. // CHECK:STDOUT: %Int.as.ImplicitAs.impl.Convert.call.loc5_37.1: init Core.IntLiteral = call %bound_method.loc5_37.1(%impl.elem0.loc5_37.1) [symbolic = %Int.as.ImplicitAs.impl.Convert.call.loc5_37.1 (constants.%Int.as.ImplicitAs.impl.Convert.call)]
  4024. // CHECK:STDOUT: %array_type.loc5_38.1: type = array_type %Int.as.ImplicitAs.impl.Convert.call.loc5_37.1, bool [symbolic = %array_type.loc5_38.1 (constants.%array_type.e0f)]
  4025. // CHECK:STDOUT: %pattern_type.loc5_22: type = pattern_type %array_type.loc5_38.1 [symbolic = %pattern_type.loc5_22 (constants.%pattern_type.a96)]
  4026. // CHECK:STDOUT:
  4027. // CHECK:STDOUT: fn(%self.param: @I.F.%Self.binding.as_type (%Self.binding.as_type.bcb)) -> @I.F.%array_type.loc5_38.1 (%array_type.e0f);
  4028. // CHECK:STDOUT: }
  4029. // CHECK:STDOUT:
  4030. // CHECK:STDOUT: fn @empty_tuple.type.as.I.impl.F(%self.param: %empty_tuple.type) -> %return.param: %array_type.c9b {
  4031. // CHECK:STDOUT: !entry:
  4032. // CHECK:STDOUT: %true: bool = bool_literal true [concrete = constants.%true]
  4033. // CHECK:STDOUT: %false: bool = bool_literal false [concrete = constants.%false]
  4034. // CHECK:STDOUT: %.loc9_61.1: %tuple.type.784 = tuple_literal (%true, %false) [concrete = constants.%tuple.a9a]
  4035. // CHECK:STDOUT: %impl.elem0.loc9_50: %.05c = impl_witness_access constants.%Copy.impl_witness.a56, element0 [concrete = constants.%bool.as.Copy.impl.Op]
  4036. // CHECK:STDOUT: %bound_method.loc9_50: <bound method> = bound_method %true, %impl.elem0.loc9_50 [concrete = constants.%bool.as.Copy.impl.Op.bound.5ee]
  4037. // CHECK:STDOUT: %bool.as.Copy.impl.Op.call.loc9_50: init bool = call %bound_method.loc9_50(%true) [concrete = constants.%true]
  4038. // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete = constants.%int_0]
  4039. // CHECK:STDOUT: %.loc9_61.2: ref bool = array_index %return, %int_0
  4040. // CHECK:STDOUT: %.loc9_61.3: init bool = initialize_from %bool.as.Copy.impl.Op.call.loc9_50 to %.loc9_61.2 [concrete = constants.%true]
  4041. // CHECK:STDOUT: %impl.elem0.loc9_56: %.05c = impl_witness_access constants.%Copy.impl_witness.a56, element0 [concrete = constants.%bool.as.Copy.impl.Op]
  4042. // CHECK:STDOUT: %bound_method.loc9_56: <bound method> = bound_method %false, %impl.elem0.loc9_56 [concrete = constants.%bool.as.Copy.impl.Op.bound.4eb]
  4043. // CHECK:STDOUT: %bool.as.Copy.impl.Op.call.loc9_56: init bool = call %bound_method.loc9_56(%false) [concrete = constants.%false]
  4044. // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1]
  4045. // CHECK:STDOUT: %.loc9_61.4: ref bool = array_index %return, %int_1
  4046. // CHECK:STDOUT: %.loc9_61.5: init bool = initialize_from %bool.as.Copy.impl.Op.call.loc9_56 to %.loc9_61.4 [concrete = constants.%false]
  4047. // CHECK:STDOUT: %.loc9_61.6: init %array_type.c9b = array_init (%.loc9_61.3, %.loc9_61.5) to %return [concrete = constants.%array]
  4048. // CHECK:STDOUT: %.loc9_62: init %array_type.c9b = converted %.loc9_61.1, %.loc9_61.6 [concrete = constants.%array]
  4049. // CHECK:STDOUT: return %.loc9_62 to %return
  4050. // CHECK:STDOUT: }
  4051. // CHECK:STDOUT:
  4052. // CHECK:STDOUT: specific @N(constants.%Self.9f2) {}
  4053. // CHECK:STDOUT:
  4054. // CHECK:STDOUT: specific @I.F(constants.%Self.9f2) {
  4055. // CHECK:STDOUT: %Self => constants.%Self.9f2
  4056. // CHECK:STDOUT: %Self.binding.as_type => constants.%Self.binding.as_type.bcb
  4057. // CHECK:STDOUT: %pattern_type.loc5_8 => constants.%pattern_type.89c
  4058. // CHECK:STDOUT: %I.lookup_impl_witness => constants.%I.lookup_impl_witness.9b0
  4059. // CHECK:STDOUT: %impl.elem0.loc5_37.1 => constants.%impl.elem0.b81
  4060. // CHECK:STDOUT: %Int.as.ImplicitAs.impl.Convert.bound => constants.%Int.as.ImplicitAs.impl.Convert.bound.fe5
  4061. // CHECK:STDOUT: %bound_method.loc5_37.1 => constants.%bound_method.51d
  4062. // CHECK:STDOUT: %Int.as.ImplicitAs.impl.Convert.call.loc5_37.1 => constants.%Int.as.ImplicitAs.impl.Convert.call
  4063. // CHECK:STDOUT: %array_type.loc5_38.1 => constants.%array_type.e0f
  4064. // CHECK:STDOUT: %pattern_type.loc5_22 => constants.%pattern_type.a96
  4065. // CHECK:STDOUT: }
  4066. // CHECK:STDOUT:
  4067. // CHECK:STDOUT: specific @N(constants.%.Self) {}
  4068. // CHECK:STDOUT:
  4069. // CHECK:STDOUT: specific @I.F(constants.%I.facet) {
  4070. // CHECK:STDOUT: %Self => constants.%I.facet
  4071. // CHECK:STDOUT: %Self.binding.as_type => constants.%empty_tuple.type
  4072. // CHECK:STDOUT: %pattern_type.loc5_8 => constants.%pattern_type.cb1
  4073. // CHECK:STDOUT: %I.lookup_impl_witness => constants.%I.impl_witness
  4074. // CHECK:STDOUT: %impl.elem0.loc5_37.1 => constants.%int_2.ef8
  4075. // CHECK:STDOUT: %Int.as.ImplicitAs.impl.Convert.bound => constants.%Int.as.ImplicitAs.impl.Convert.bound.6fa
  4076. // CHECK:STDOUT: %bound_method.loc5_37.1 => constants.%bound_method.33f
  4077. // CHECK:STDOUT: %Int.as.ImplicitAs.impl.Convert.call.loc5_37.1 => constants.%int_2.ecc
  4078. // CHECK:STDOUT: %array_type.loc5_38.1 => constants.%array_type.c9b
  4079. // CHECK:STDOUT: %pattern_type.loc5_22 => constants.%pattern_type.5d5
  4080. // CHECK:STDOUT: }
  4081. // CHECK:STDOUT:
  4082. // CHECK:STDOUT: --- symbolic_associated_type_in_concrete_context.carbon
  4083. // CHECK:STDOUT:
  4084. // CHECK:STDOUT: constants {
  4085. // CHECK:STDOUT: %Z.type: type = facet_type <@Z> [concrete]
  4086. // CHECK:STDOUT: %Self.3b3: %Z.type = symbolic_binding Self, 0 [symbolic]
  4087. // CHECK:STDOUT: %Z.assoc_type: type = assoc_entity_type @Z [concrete]
  4088. // CHECK:STDOUT: %assoc0.659: %Z.assoc_type = assoc_entity element0, @Z.%X [concrete]
  4089. // CHECK:STDOUT: %type: type = facet_type <type> [concrete]
  4090. // CHECK:STDOUT: %.Self.3b7: %type = symbolic_binding .Self [symbolic_self]
  4091. // CHECK:STDOUT: %T: type = symbolic_binding T, 0 [symbolic]
  4092. // CHECK:STDOUT: %pattern_type.98f: type = pattern_type type [concrete]
  4093. // CHECK:STDOUT: %C.type: type = generic_class_type @C [concrete]
  4094. // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete]
  4095. // CHECK:STDOUT: %C.generic: %C.type = struct_value () [concrete]
  4096. // CHECK:STDOUT: %C.3f0: type = class_type @C, @C(%T) [symbolic]
  4097. // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete]
  4098. // CHECK:STDOUT: %complete_type.357: <witness> = complete_type_witness %empty_struct_type [concrete]
  4099. // CHECK:STDOUT: %D: type = class_type @D [concrete]
  4100. // CHECK:STDOUT: %.Self.f2a: %Z.type = symbolic_binding .Self [symbolic_self]
  4101. // CHECK:STDOUT: %.Self.binding.as_type: type = symbolic_binding_type .Self, %.Self.f2a [symbolic_self]
  4102. // CHECK:STDOUT: %Z.lookup_impl_witness: <witness> = lookup_impl_witness %.Self.f2a, @Z [symbolic_self]
  4103. // CHECK:STDOUT: %impl.elem0: type = impl_witness_access %Z.lookup_impl_witness, element0 [symbolic_self]
  4104. // CHECK:STDOUT: %Z_where.type.b44: type = facet_type <@Z where %impl.elem0 = %C.3f0> [symbolic]
  4105. // CHECK:STDOUT: %require_complete.5d8: <witness> = require_complete_type %Z_where.type.b44 [symbolic]
  4106. // CHECK:STDOUT: %Z.impl_witness.269: <witness> = impl_witness file.%Z.impl_witness_table, @T.as.Z.impl(%T) [symbolic]
  4107. // CHECK:STDOUT: %F.type: type = fn_type @F [concrete]
  4108. // CHECK:STDOUT: %F: %F.type = struct_value () [concrete]
  4109. // CHECK:STDOUT: %C.131: type = class_type @C, @C(%D) [concrete]
  4110. // CHECK:STDOUT: %Z_where.type.88e: type = facet_type <@Z where %impl.elem0 = %C.131> [concrete]
  4111. // CHECK:STDOUT: %complete_type.6ef: <witness> = complete_type_witness %Z_where.type.88e [concrete]
  4112. // CHECK:STDOUT: %Z.impl_witness.490: <witness> = impl_witness file.%Z.impl_witness_table, @T.as.Z.impl(%D) [concrete]
  4113. // CHECK:STDOUT: %Z.facet: %Z.type = facet_value %D, (%Z.impl_witness.490) [concrete]
  4114. // CHECK:STDOUT: %pattern_type.7f8: type = pattern_type %C.131 [concrete]
  4115. // CHECK:STDOUT: %empty_struct: %empty_struct_type = struct_value () [concrete]
  4116. // CHECK:STDOUT: %C.val: %C.131 = struct_value () [concrete]
  4117. // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete]
  4118. // CHECK:STDOUT: %type_where: type = facet_type <type where .Self impls <CanDestroy>> [concrete]
  4119. // CHECK:STDOUT: %facet_value: %type_where = facet_value %C.131, () [concrete]
  4120. // CHECK:STDOUT: %DestroyT.binding.as_type.as.Destroy.impl.Op.type.951: type = fn_type @DestroyT.binding.as_type.as.Destroy.impl.Op, @DestroyT.binding.as_type.as.Destroy.impl(%facet_value) [concrete]
  4121. // CHECK:STDOUT: %DestroyT.binding.as_type.as.Destroy.impl.Op.372: %DestroyT.binding.as_type.as.Destroy.impl.Op.type.951 = struct_value () [concrete]
  4122. // CHECK:STDOUT: %DestroyT.binding.as_type.as.Destroy.impl.Op.specific_fn: <specific function> = specific_function %DestroyT.binding.as_type.as.Destroy.impl.Op.372, @DestroyT.binding.as_type.as.Destroy.impl.Op(%facet_value) [concrete]
  4123. // CHECK:STDOUT: }
  4124. // CHECK:STDOUT:
  4125. // CHECK:STDOUT: imports {
  4126. // CHECK:STDOUT: %Core: <namespace> = namespace file.%Core.import, [concrete] {
  4127. // CHECK:STDOUT: .Destroy = %Core.Destroy
  4128. // CHECK:STDOUT: import Core//prelude
  4129. // CHECK:STDOUT: import Core//prelude/...
  4130. // CHECK:STDOUT: }
  4131. // CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type]
  4132. // CHECK:STDOUT: }
  4133. // CHECK:STDOUT:
  4134. // CHECK:STDOUT: file {
  4135. // CHECK:STDOUT: package: <namespace> = namespace [concrete] {
  4136. // CHECK:STDOUT: .Core = imports.%Core
  4137. // CHECK:STDOUT: .Z = %Z.decl
  4138. // CHECK:STDOUT: .C = %C.decl
  4139. // CHECK:STDOUT: .D = %D.decl
  4140. // CHECK:STDOUT: .F = %F.decl
  4141. // CHECK:STDOUT: }
  4142. // CHECK:STDOUT: %Core.import = import Core
  4143. // CHECK:STDOUT: %Z.decl: type = interface_decl @Z [concrete = constants.%Z.type] {} {}
  4144. // CHECK:STDOUT: %C.decl: %C.type = class_decl @C [concrete = constants.%C.generic] {
  4145. // CHECK:STDOUT: %T.patt: %pattern_type.98f = symbolic_binding_pattern T, 0 [concrete]
  4146. // CHECK:STDOUT: } {
  4147. // CHECK:STDOUT: %.Self: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.3b7]
  4148. // CHECK:STDOUT: %T.loc6_9.2: type = symbolic_binding T, 0 [symbolic = %T.loc6_9.1 (constants.%T)]
  4149. // CHECK:STDOUT: }
  4150. // CHECK:STDOUT: %D.decl: type = class_decl @D [concrete = constants.%D] {} {}
  4151. // CHECK:STDOUT: impl_decl @T.as.Z.impl [concrete] {
  4152. // CHECK:STDOUT: %T.patt: %pattern_type.98f = symbolic_binding_pattern T, 0 [concrete]
  4153. // CHECK:STDOUT: } {
  4154. // CHECK:STDOUT: %T.ref.loc9_24: type = name_ref T, %T.loc9_14.1 [symbolic = %T.loc9_14.2 (constants.%T)]
  4155. // CHECK:STDOUT: %Z.ref: type = name_ref Z, file.%Z.decl [concrete = constants.%Z.type]
  4156. // CHECK:STDOUT: %.Self.1: %Z.type = symbolic_binding .Self [symbolic_self = constants.%.Self.f2a]
  4157. // CHECK:STDOUT: %.Self.ref: %Z.type = name_ref .Self, %.Self.1 [symbolic_self = constants.%.Self.f2a]
  4158. // CHECK:STDOUT: %X.ref: %Z.assoc_type = name_ref X, @X.%assoc0 [concrete = constants.%assoc0.659]
  4159. // CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self.ref [symbolic_self = constants.%.Self.binding.as_type]
  4160. // CHECK:STDOUT: %.loc9_37: type = converted %.Self.ref, %.Self.as_type [symbolic_self = constants.%.Self.binding.as_type]
  4161. // CHECK:STDOUT: %impl.elem0: type = impl_witness_access constants.%Z.lookup_impl_witness, element0 [symbolic_self = constants.%impl.elem0]
  4162. // CHECK:STDOUT: %C.ref: %C.type = name_ref C, file.%C.decl [concrete = constants.%C.generic]
  4163. // CHECK:STDOUT: %T.ref.loc9_44: type = name_ref T, %T.loc9_14.1 [symbolic = %T.loc9_14.2 (constants.%T)]
  4164. // CHECK:STDOUT: %C.loc9_45.1: type = class_type @C, @C(constants.%T) [symbolic = %C.loc9_45.2 (constants.%C.3f0)]
  4165. // CHECK:STDOUT: %.loc9_31: type = where_expr %.Self.1 [symbolic = %Z_where.type (constants.%Z_where.type.b44)] {
  4166. // CHECK:STDOUT: requirement_base_facet_type constants.%Z.type
  4167. // CHECK:STDOUT: requirement_rewrite %impl.elem0, %C.loc9_45.1
  4168. // CHECK:STDOUT: }
  4169. // CHECK:STDOUT: %.Self.2: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.3b7]
  4170. // CHECK:STDOUT: %T.loc9_14.1: type = symbolic_binding T, 0 [symbolic = %T.loc9_14.2 (constants.%T)]
  4171. // CHECK:STDOUT: }
  4172. // CHECK:STDOUT: %Z.impl_witness_table = impl_witness_table (%impl_witness_assoc_constant), @T.as.Z.impl [concrete]
  4173. // CHECK:STDOUT: %Z.impl_witness: <witness> = impl_witness %Z.impl_witness_table, @T.as.Z.impl(constants.%T) [symbolic = @T.as.Z.impl.%Z.impl_witness (constants.%Z.impl_witness.269)]
  4174. // CHECK:STDOUT: %impl_witness_assoc_constant: type = impl_witness_assoc_constant constants.%C.3f0 [symbolic = @T.as.Z.impl.%C.loc9_45.2 (constants.%C.3f0)]
  4175. // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [concrete = constants.%F] {} {}
  4176. // CHECK:STDOUT: }
  4177. // CHECK:STDOUT:
  4178. // CHECK:STDOUT: interface @Z {
  4179. // CHECK:STDOUT: %Self: %Z.type = symbolic_binding Self, 0 [symbolic = constants.%Self.3b3]
  4180. // CHECK:STDOUT: %X: type = assoc_const_decl @X [concrete] {
  4181. // CHECK:STDOUT: %assoc0: %Z.assoc_type = assoc_entity element0, @Z.%X [concrete = constants.%assoc0.659]
  4182. // CHECK:STDOUT: }
  4183. // CHECK:STDOUT:
  4184. // CHECK:STDOUT: !members:
  4185. // CHECK:STDOUT: .Self = %Self
  4186. // CHECK:STDOUT: .X = @X.%assoc0
  4187. // CHECK:STDOUT: witness = (%X)
  4188. // CHECK:STDOUT:
  4189. // CHECK:STDOUT: !requires:
  4190. // CHECK:STDOUT: }
  4191. // CHECK:STDOUT:
  4192. // CHECK:STDOUT: generic assoc_const @X(@Z.%Self: %Z.type) {
  4193. // CHECK:STDOUT: assoc_const X:! type;
  4194. // CHECK:STDOUT: }
  4195. // CHECK:STDOUT:
  4196. // CHECK:STDOUT: generic impl @T.as.Z.impl(%T.loc9_14.1: type) {
  4197. // CHECK:STDOUT: %T.loc9_14.2: type = symbolic_binding T, 0 [symbolic = %T.loc9_14.2 (constants.%T)]
  4198. // CHECK:STDOUT: %C.loc9_45.2: type = class_type @C, @C(%T.loc9_14.2) [symbolic = %C.loc9_45.2 (constants.%C.3f0)]
  4199. // 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.b44)]
  4200. // CHECK:STDOUT: %require_complete: <witness> = require_complete_type %Z_where.type [symbolic = %require_complete (constants.%require_complete.5d8)]
  4201. // CHECK:STDOUT: %Z.impl_witness: <witness> = impl_witness file.%Z.impl_witness_table, @T.as.Z.impl(%T.loc9_14.2) [symbolic = %Z.impl_witness (constants.%Z.impl_witness.269)]
  4202. // CHECK:STDOUT:
  4203. // CHECK:STDOUT: !definition:
  4204. // CHECK:STDOUT:
  4205. // CHECK:STDOUT: impl: %T.ref.loc9_24 as %.loc9_31 {
  4206. // CHECK:STDOUT: !members:
  4207. // CHECK:STDOUT: witness = file.%Z.impl_witness
  4208. // CHECK:STDOUT: }
  4209. // CHECK:STDOUT: }
  4210. // CHECK:STDOUT:
  4211. // CHECK:STDOUT: generic class @C(%T.loc6_9.2: type) {
  4212. // CHECK:STDOUT: %T.loc6_9.1: type = symbolic_binding T, 0 [symbolic = %T.loc6_9.1 (constants.%T)]
  4213. // CHECK:STDOUT:
  4214. // CHECK:STDOUT: !definition:
  4215. // CHECK:STDOUT:
  4216. // CHECK:STDOUT: class {
  4217. // CHECK:STDOUT: %complete_type: <witness> = complete_type_witness constants.%empty_struct_type [concrete = constants.%complete_type.357]
  4218. // CHECK:STDOUT: complete_type_witness = %complete_type
  4219. // CHECK:STDOUT:
  4220. // CHECK:STDOUT: !members:
  4221. // CHECK:STDOUT: .Self = constants.%C.3f0
  4222. // CHECK:STDOUT: }
  4223. // CHECK:STDOUT: }
  4224. // CHECK:STDOUT:
  4225. // CHECK:STDOUT: class @D {
  4226. // CHECK:STDOUT: %complete_type: <witness> = complete_type_witness constants.%empty_struct_type [concrete = constants.%complete_type.357]
  4227. // CHECK:STDOUT: complete_type_witness = %complete_type
  4228. // CHECK:STDOUT:
  4229. // CHECK:STDOUT: !members:
  4230. // CHECK:STDOUT: .Self = constants.%D
  4231. // CHECK:STDOUT: }
  4232. // CHECK:STDOUT:
  4233. // CHECK:STDOUT: fn @F() {
  4234. // CHECK:STDOUT: !entry:
  4235. // CHECK:STDOUT: name_binding_decl {
  4236. // CHECK:STDOUT: %a.patt: %pattern_type.7f8 = value_binding_pattern a [concrete]
  4237. // CHECK:STDOUT: }
  4238. // CHECK:STDOUT: %.loc12_21.1: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct]
  4239. // CHECK:STDOUT: %C.ref: %C.type = name_ref C, file.%C.decl [concrete = constants.%C.generic]
  4240. // CHECK:STDOUT: %D.ref.loc12_28: type = name_ref D, file.%D.decl [concrete = constants.%D]
  4241. // CHECK:STDOUT: %C: type = class_type @C, @C(constants.%D) [concrete = constants.%C.131]
  4242. // CHECK:STDOUT: %.loc12_21.2: ref %C.131 = temporary_storage
  4243. // CHECK:STDOUT: %.loc12_21.3: init %C.131 = class_init (), %.loc12_21.2 [concrete = constants.%C.val]
  4244. // CHECK:STDOUT: %.loc12_21.4: ref %C.131 = temporary %.loc12_21.2, %.loc12_21.3
  4245. // CHECK:STDOUT: %.loc12_23.1: ref %C.131 = converted %.loc12_21.1, %.loc12_21.4
  4246. // CHECK:STDOUT: %.loc12_11.1: type = splice_block %impl.elem0 [concrete = constants.%C.131] {
  4247. // CHECK:STDOUT: %D.ref.loc12_10: type = name_ref D, file.%D.decl [concrete = constants.%D]
  4248. // CHECK:STDOUT: %Z.ref: type = name_ref Z, file.%Z.decl [concrete = constants.%Z.type]
  4249. // CHECK:STDOUT: %X.ref: %Z.assoc_type = name_ref X, @X.%assoc0 [concrete = constants.%assoc0.659]
  4250. // CHECK:STDOUT: %Z.facet: %Z.type = facet_value %D.ref.loc12_10, (constants.%Z.impl_witness.490) [concrete = constants.%Z.facet]
  4251. // CHECK:STDOUT: %.loc12_11.2: %Z.type = converted %D.ref.loc12_10, %Z.facet [concrete = constants.%Z.facet]
  4252. // CHECK:STDOUT: %impl.elem0: type = impl_witness_access constants.%Z.impl_witness.490, element0 [concrete = constants.%C.131]
  4253. // CHECK:STDOUT: }
  4254. // CHECK:STDOUT: %.loc12_23.2: %C.131 = acquire_value %.loc12_23.1
  4255. // CHECK:STDOUT: %a: %C.131 = value_binding a, %.loc12_23.2
  4256. // CHECK:STDOUT: %DestroyT.binding.as_type.as.Destroy.impl.Op.bound: <bound method> = bound_method %.loc12_21.4, constants.%DestroyT.binding.as_type.as.Destroy.impl.Op.372
  4257. // CHECK:STDOUT: %DestroyT.binding.as_type.as.Destroy.impl.Op.specific_fn: <specific function> = specific_function constants.%DestroyT.binding.as_type.as.Destroy.impl.Op.372, @DestroyT.binding.as_type.as.Destroy.impl.Op(constants.%facet_value) [concrete = constants.%DestroyT.binding.as_type.as.Destroy.impl.Op.specific_fn]
  4258. // CHECK:STDOUT: %bound_method: <bound method> = bound_method %.loc12_21.4, %DestroyT.binding.as_type.as.Destroy.impl.Op.specific_fn
  4259. // CHECK:STDOUT: %DestroyT.binding.as_type.as.Destroy.impl.Op.call: init %empty_tuple.type = call %bound_method(%.loc12_21.4)
  4260. // CHECK:STDOUT: return
  4261. // CHECK:STDOUT: }
  4262. // CHECK:STDOUT:
  4263. // CHECK:STDOUT: specific @X(constants.%Self.3b3) {}
  4264. // CHECK:STDOUT:
  4265. // CHECK:STDOUT: specific @C(constants.%T) {
  4266. // CHECK:STDOUT: %T.loc6_9.1 => constants.%T
  4267. // CHECK:STDOUT: }
  4268. // CHECK:STDOUT:
  4269. // CHECK:STDOUT: specific @X(constants.%.Self.f2a) {}
  4270. // CHECK:STDOUT:
  4271. // CHECK:STDOUT: specific @T.as.Z.impl(constants.%T) {
  4272. // CHECK:STDOUT: %T.loc9_14.2 => constants.%T
  4273. // CHECK:STDOUT: %C.loc9_45.2 => constants.%C.3f0
  4274. // CHECK:STDOUT: %Z_where.type => constants.%Z_where.type.b44
  4275. // CHECK:STDOUT: %require_complete => constants.%require_complete.5d8
  4276. // CHECK:STDOUT: %Z.impl_witness => constants.%Z.impl_witness.269
  4277. // CHECK:STDOUT: }
  4278. // CHECK:STDOUT:
  4279. // CHECK:STDOUT: specific @T.as.Z.impl(constants.%D) {
  4280. // CHECK:STDOUT: %T.loc9_14.2 => constants.%D
  4281. // CHECK:STDOUT: %C.loc9_45.2 => constants.%C.131
  4282. // CHECK:STDOUT: %Z_where.type => constants.%Z_where.type.88e
  4283. // CHECK:STDOUT: %require_complete => constants.%complete_type.6ef
  4284. // CHECK:STDOUT: %Z.impl_witness => constants.%Z.impl_witness.490
  4285. // CHECK:STDOUT:
  4286. // CHECK:STDOUT: !definition:
  4287. // CHECK:STDOUT: }
  4288. // CHECK:STDOUT:
  4289. // CHECK:STDOUT: specific @C(constants.%D) {
  4290. // CHECK:STDOUT: %T.loc6_9.1 => constants.%D
  4291. // CHECK:STDOUT:
  4292. // CHECK:STDOUT: !definition:
  4293. // CHECK:STDOUT: }
  4294. // CHECK:STDOUT:
  4295. // CHECK:STDOUT: specific @X(constants.%Z.facet) {}
  4296. // CHECK:STDOUT: