| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856 |
- // Part of the Carbon Language project, under the Apache License v2.0 with LLVM
- // Exceptions. See /LICENSE for license information.
- // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
- //
- // INCLUDE-FILE: toolchain/testing/testdata/min_prelude/destroy.carbon
- // TODO: Add ranges and switch to "--dump-sem-ir-ranges=only".
- // EXTRA-ARGS: --dump-sem-ir-ranges=if-present
- //
- // AUTOUPDATE
- // TIP: To test this file alone, run:
- // TIP: bazel test //toolchain/testing:file_test --test_arg=--file_tests=toolchain/check/testdata/impl/lookup/import.carbon
- // TIP: To dump output, run:
- // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/check/testdata/impl/lookup/import.carbon
- // --- package_a.carbon
- package PackageA;
- interface HasF {
- fn F[self: Self]();
- }
- class C {}
- // Same library as the class and interface.
- impl C as HasF {
- fn F[self: Self]() {}
- }
- // --- package_b.carbon
- package PackageB;
- import PackageA;
- interface HasG {
- fn G[self: Self]();
- }
- class D {}
- // Same library as the interface.
- impl PackageA.C as HasG {
- fn G[self: Self]() {}
- }
- // Same library as the class.
- impl D as PackageA.HasF {
- fn F[self: Self]() {}
- }
- // Same library as the class and interface.
- impl D as HasG {
- fn G[self: Self]() {}
- }
- // --- use_cf.carbon
- library "[[@TEST_NAME]]";
- import PackageA;
- fn TestCF(c: PackageA.C) {
- c.(PackageA.HasF.F)();
- }
- // --- use_df.carbon
- library "[[@TEST_NAME]]";
- import PackageA;
- import PackageB;
- fn TestDF(d: PackageB.D) {
- d.(PackageA.HasF.F)();
- }
- // --- use_cg.carbon
- library "[[@TEST_NAME]]";
- import PackageA;
- import PackageB;
- fn TestCG(c: PackageA.C) {
- c.(PackageB.HasG.G)();
- }
- // --- use_dg.carbon
- library "[[@TEST_NAME]]";
- import PackageB;
- fn TestDG(d: PackageB.D) {
- d.(PackageB.HasG.G)();
- }
- // --- associated_interface.carbon
- package PackageAssociatedInterface;
- interface Z {
- fn H[self: Self]();
- }
- impl () as Z {
- fn H[self: Self]() {}
- }
- // --- import_associated_interface.carbon
- package PackageImportAssociatedInterface;
- import PackageAssociatedInterface;
- fn J() {
- ().(PackageAssociatedInterface.Z.H)();
- }
- // --- has_param.carbon
- package PackageHasParam;
- class AnyParam[T:! type](X:! T) {}
- interface Y {
- fn K[self: Self]() {}
- }
- // --- has_generic_interface.carbon
- package PackageGenericInterface;
- import PackageHasParam;
- interface GenericInterface(U:! type) {}
- impl PackageHasParam.AnyParam(GenericInterface) as PackageHasParam.Y {
- fn K[self: Self]() {}
- }
- fn L() {
- var obj: PackageHasParam.AnyParam(GenericInterface) = {};
- obj.(PackageHasParam.Y.K)();
- }
- // --- use_generic_interface_as_param.carbon
- library "[[@TEST_NAME]]";
- import PackageHasParam;
- import PackageGenericInterface;
- fn M() {
- var obj: PackageHasParam.AnyParam(
- PackageGenericInterface.GenericInterface) = {};
- obj.(PackageHasParam.Y.K)();
- }
- // --- has_generic_class.carbon
- package PackageGenericClass;
- import PackageHasParam;
- class GenericClass(U:! type) {}
- impl PackageHasParam.AnyParam(GenericClass) as PackageHasParam.Y {
- fn K[self: Self]() {}
- }
- fn L() {
- var obj: PackageHasParam.AnyParam(GenericClass) = {};
- obj.(PackageHasParam.Y.K)();
- }
- // --- use_generic_class_as_param.carbon
- library "[[@TEST_NAME]]";
- import PackageHasParam;
- import PackageGenericClass;
- fn M() {
- var obj: PackageHasParam.AnyParam(PackageGenericClass.GenericClass) = {};
- obj.(PackageHasParam.Y.K)();
- }
- // --- has_extra_interfaces.carbon
- package HasExtraInterfaces;
- interface Extra1 {}
- interface Extra2 {}
- interface Extra3 {}
- interface Extra4 {}
- interface Extra5 {}
- interface Extra6 {}
- interface Extra7 {}
- interface Extra8 {}
- class C(T:! type) {}
- interface I { fn F[self: Self](); }
- impl C((Extra1, Extra2, Extra3, Extra4, Extra5, Extra6, Extra7, Extra8)) as I {
- fn F[self: Self]() {}
- }
- // --- fail_use_has_extra_interfaces.carbon
- package UseHasExtraInterfaces;
- import HasExtraInterfaces;
- fn Test(c: HasExtraInterfaces.C(type)) {
- // This triggers the import of a bunch more interfaces, which reallocates the
- // interface ValueStore. Ensure that doesn't result in a use-after-free crash.
- // CHECK:STDERR: fail_use_has_extra_interfaces.carbon:[[@LINE+4]]:3: error: cannot access member of interface `HasExtraInterfaces.I` in type `HasExtraInterfaces.C(type)` that does not implement that interface [MissingImplInMemberAccess]
- // CHECK:STDERR: c.(HasExtraInterfaces.I.F)();
- // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~
- // CHECK:STDERR:
- c.(HasExtraInterfaces.I.F)();
- }
- // CHECK:STDOUT: --- package_a.carbon
- // CHECK:STDOUT:
- // CHECK:STDOUT: constants {
- // CHECK:STDOUT: %HasF.type: type = facet_type <@HasF> [concrete]
- // CHECK:STDOUT: %Self: %HasF.type = bind_symbolic_name Self, 0 [symbolic]
- // CHECK:STDOUT: %Self.as_type: type = facet_access_type %Self [symbolic]
- // CHECK:STDOUT: %pattern_type.28f: type = pattern_type %Self.as_type [symbolic]
- // CHECK:STDOUT: %F.type.b7b: type = fn_type @F.1 [concrete]
- // CHECK:STDOUT: %F.f50: %F.type.b7b = struct_value () [concrete]
- // CHECK:STDOUT: %HasF.assoc_type: type = assoc_entity_type @HasF [concrete]
- // CHECK:STDOUT: %assoc0: %HasF.assoc_type = assoc_entity element0, @HasF.%F.decl [concrete]
- // CHECK:STDOUT: %C: type = class_type @C [concrete]
- // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete]
- // CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %empty_struct_type [concrete]
- // CHECK:STDOUT: %HasF.impl_witness: <witness> = impl_witness file.%HasF.impl_witness_table [concrete]
- // CHECK:STDOUT: %pattern_type.c48: type = pattern_type %C [concrete]
- // CHECK:STDOUT: %F.type.a02: type = fn_type @F.2 [concrete]
- // CHECK:STDOUT: %F.dc7: %F.type.a02 = struct_value () [concrete]
- // CHECK:STDOUT: %HasF.facet: %HasF.type = facet_value %C, (%HasF.impl_witness) [concrete]
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: imports {
- // CHECK:STDOUT: %Core: <namespace> = namespace file.%Core.import, [concrete] {
- // CHECK:STDOUT: import Core//prelude
- // CHECK:STDOUT: import Core//prelude/...
- // CHECK:STDOUT: }
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: file {
- // CHECK:STDOUT: package: <namespace> = namespace [concrete] {
- // CHECK:STDOUT: .Core = imports.%Core
- // CHECK:STDOUT: .HasF = %HasF.decl
- // CHECK:STDOUT: .C = %C.decl
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %Core.import = import Core
- // CHECK:STDOUT: %HasF.decl: type = interface_decl @HasF [concrete = constants.%HasF.type] {} {}
- // CHECK:STDOUT: %C.decl: type = class_decl @C [concrete = constants.%C] {} {}
- // CHECK:STDOUT: impl_decl @impl [concrete] {} {
- // CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [concrete = constants.%C]
- // CHECK:STDOUT: %HasF.ref: type = name_ref HasF, file.%HasF.decl [concrete = constants.%HasF.type]
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %HasF.impl_witness_table = impl_witness_table (@impl.%F.decl), @impl [concrete]
- // CHECK:STDOUT: %HasF.impl_witness: <witness> = impl_witness %HasF.impl_witness_table [concrete = constants.%HasF.impl_witness]
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: interface @HasF {
- // CHECK:STDOUT: %Self: %HasF.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self]
- // CHECK:STDOUT: %F.decl: %F.type.b7b = fn_decl @F.1 [concrete = constants.%F.f50] {
- // CHECK:STDOUT: %self.patt: @F.1.%pattern_type (%pattern_type.28f) = binding_pattern self [concrete]
- // CHECK:STDOUT: %self.param_patt: @F.1.%pattern_type (%pattern_type.28f) = value_param_pattern %self.patt, call_param0 [concrete]
- // CHECK:STDOUT: } {
- // CHECK:STDOUT: %self.param: @F.1.%Self.as_type.loc5_14.1 (%Self.as_type) = value_param call_param0
- // CHECK:STDOUT: %.loc5_14.1: type = splice_block %.loc5_14.2 [symbolic = %Self.as_type.loc5_14.1 (constants.%Self.as_type)] {
- // CHECK:STDOUT: %Self.ref: %HasF.type = name_ref Self, @HasF.%Self [symbolic = %Self (constants.%Self)]
- // CHECK:STDOUT: %Self.as_type.loc5_14.2: type = facet_access_type %Self.ref [symbolic = %Self.as_type.loc5_14.1 (constants.%Self.as_type)]
- // CHECK:STDOUT: %.loc5_14.2: type = converted %Self.ref, %Self.as_type.loc5_14.2 [symbolic = %Self.as_type.loc5_14.1 (constants.%Self.as_type)]
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %self: @F.1.%Self.as_type.loc5_14.1 (%Self.as_type) = bind_name self, %self.param
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %assoc0: %HasF.assoc_type = assoc_entity element0, %F.decl [concrete = constants.%assoc0]
- // CHECK:STDOUT:
- // CHECK:STDOUT: !members:
- // CHECK:STDOUT: .Self = %Self
- // CHECK:STDOUT: .F = %assoc0
- // CHECK:STDOUT: witness = (%F.decl)
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: impl @impl: %C.ref as %HasF.ref {
- // CHECK:STDOUT: %F.decl: %F.type.a02 = fn_decl @F.2 [concrete = constants.%F.dc7] {
- // CHECK:STDOUT: %self.patt: %pattern_type.c48 = binding_pattern self [concrete]
- // CHECK:STDOUT: %self.param_patt: %pattern_type.c48 = value_param_pattern %self.patt, call_param0 [concrete]
- // CHECK:STDOUT: } {
- // CHECK:STDOUT: %self.param: %C = value_param call_param0
- // CHECK:STDOUT: %Self.ref: type = name_ref Self, @impl.%C.ref [concrete = constants.%C]
- // CHECK:STDOUT: %self: %C = bind_name self, %self.param
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: !members:
- // CHECK:STDOUT: .F = %F.decl
- // CHECK:STDOUT: witness = file.%HasF.impl_witness
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: class @C {
- // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete = constants.%empty_struct_type]
- // CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %empty_struct_type [concrete = constants.%complete_type]
- // CHECK:STDOUT: complete_type_witness = %complete_type
- // CHECK:STDOUT:
- // CHECK:STDOUT: !members:
- // CHECK:STDOUT: .Self = constants.%C
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: generic fn @F.1(@HasF.%Self: %HasF.type) {
- // CHECK:STDOUT: %Self: %HasF.type = bind_symbolic_name Self, 0 [symbolic = %Self (constants.%Self)]
- // CHECK:STDOUT: %Self.as_type.loc5_14.1: type = facet_access_type %Self [symbolic = %Self.as_type.loc5_14.1 (constants.%Self.as_type)]
- // CHECK:STDOUT: %pattern_type: type = pattern_type %Self.as_type.loc5_14.1 [symbolic = %pattern_type (constants.%pattern_type.28f)]
- // CHECK:STDOUT:
- // CHECK:STDOUT: fn(%self.param: @F.1.%Self.as_type.loc5_14.1 (%Self.as_type));
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: fn @F.2(%self.param: %C) {
- // CHECK:STDOUT: !entry:
- // CHECK:STDOUT: return
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: specific @F.1(constants.%Self) {
- // CHECK:STDOUT: %Self => constants.%Self
- // CHECK:STDOUT: %Self.as_type.loc5_14.1 => constants.%Self.as_type
- // CHECK:STDOUT: %pattern_type => constants.%pattern_type.28f
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: specific @F.1(constants.%HasF.facet) {
- // CHECK:STDOUT: %Self => constants.%HasF.facet
- // CHECK:STDOUT: %Self.as_type.loc5_14.1 => constants.%C
- // CHECK:STDOUT: %pattern_type => constants.%pattern_type.c48
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: --- package_b.carbon
- // CHECK:STDOUT:
- // CHECK:STDOUT: constants {
- // CHECK:STDOUT: %HasG.type: type = facet_type <@HasG> [concrete]
- // CHECK:STDOUT: %Self.d42: %HasG.type = bind_symbolic_name Self, 0 [symbolic]
- // CHECK:STDOUT: %Self.as_type.133: type = facet_access_type %Self.d42 [symbolic]
- // CHECK:STDOUT: %pattern_type.293: type = pattern_type %Self.as_type.133 [symbolic]
- // CHECK:STDOUT: %G.type.d27: type = fn_type @G.1 [concrete]
- // CHECK:STDOUT: %G.688: %G.type.d27 = struct_value () [concrete]
- // CHECK:STDOUT: %HasG.assoc_type: type = assoc_entity_type @HasG [concrete]
- // CHECK:STDOUT: %assoc0: %HasG.assoc_type = assoc_entity element0, @HasG.%G.decl [concrete]
- // CHECK:STDOUT: %D: type = class_type @D [concrete]
- // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete]
- // CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %empty_struct_type [concrete]
- // CHECK:STDOUT: %C: type = class_type @C [concrete]
- // CHECK:STDOUT: %HasG.impl_witness.69b: <witness> = impl_witness file.%HasG.impl_witness_table.loc13 [concrete]
- // CHECK:STDOUT: %pattern_type.8e5: type = pattern_type %C [concrete]
- // CHECK:STDOUT: %G.type.05c: type = fn_type @G.2 [concrete]
- // CHECK:STDOUT: %G.486: %G.type.05c = struct_value () [concrete]
- // CHECK:STDOUT: %HasG.facet.704: %HasG.type = facet_value %C, (%HasG.impl_witness.69b) [concrete]
- // CHECK:STDOUT: %HasF.type: type = facet_type <@HasF> [concrete]
- // CHECK:STDOUT: %Self.cf3: %HasF.type = bind_symbolic_name Self, 0 [symbolic]
- // CHECK:STDOUT: %F.type.dbc: type = fn_type @F.1 [concrete]
- // CHECK:STDOUT: %F.a2b: %F.type.dbc = struct_value () [concrete]
- // CHECK:STDOUT: %Self.as_type.7cf: type = facet_access_type %Self.cf3 [symbolic]
- // CHECK:STDOUT: %pattern_type.dc3: type = pattern_type %Self.as_type.7cf [symbolic]
- // CHECK:STDOUT: %HasF.impl_witness: <witness> = impl_witness file.%HasF.impl_witness_table [concrete]
- // CHECK:STDOUT: %pattern_type.510: type = pattern_type %D [concrete]
- // CHECK:STDOUT: %F.type.bab: type = fn_type @F.2 [concrete]
- // CHECK:STDOUT: %F.46f: %F.type.bab = struct_value () [concrete]
- // CHECK:STDOUT: %HasF.facet: %HasF.type = facet_value %D, (%HasF.impl_witness) [concrete]
- // CHECK:STDOUT: %HasG.impl_witness.b2b: <witness> = impl_witness file.%HasG.impl_witness_table.loc23 [concrete]
- // CHECK:STDOUT: %G.type.c1d: type = fn_type @G.3 [concrete]
- // CHECK:STDOUT: %G.294: %G.type.c1d = struct_value () [concrete]
- // CHECK:STDOUT: %HasG.facet.9c8: %HasG.type = facet_value %D, (%HasG.impl_witness.b2b) [concrete]
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: imports {
- // CHECK:STDOUT: %Core: <namespace> = namespace file.%Core.import, [concrete] {
- // CHECK:STDOUT: import Core//prelude
- // CHECK:STDOUT: import Core//prelude/...
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %PackageA: <namespace> = namespace file.%PackageA.import, [concrete] {
- // CHECK:STDOUT: .C = %PackageA.C
- // CHECK:STDOUT: .HasF = %PackageA.HasF
- // CHECK:STDOUT: import PackageA//default
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %PackageA.C: type = import_ref PackageA//default, C, loaded [concrete = constants.%C]
- // CHECK:STDOUT: %PackageA.import_ref.8f2: <witness> = import_ref PackageA//default, loc8_10, loaded [concrete = constants.%complete_type]
- // CHECK:STDOUT: %PackageA.import_ref.2c4 = import_ref PackageA//default, inst43 [no loc], unloaded
- // CHECK:STDOUT: %PackageA.HasF: type = import_ref PackageA//default, HasF, loaded [concrete = constants.%HasF.type]
- // CHECK:STDOUT: %PackageA.import_ref.28c = import_ref PackageA//default, inst19 [no loc], unloaded
- // CHECK:STDOUT: %PackageA.import_ref.c63 = import_ref PackageA//default, loc5_21, unloaded
- // CHECK:STDOUT: %PackageA.F: %F.type.dbc = import_ref PackageA//default, F, loaded [concrete = constants.%F.a2b]
- // CHECK:STDOUT: %PackageA.import_ref.e73: %HasF.type = import_ref PackageA//default, inst19 [no loc], loaded [symbolic = constants.%Self.cf3]
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: file {
- // CHECK:STDOUT: package: <namespace> = namespace [concrete] {
- // CHECK:STDOUT: .Core = imports.%Core
- // CHECK:STDOUT: .PackageA = imports.%PackageA
- // CHECK:STDOUT: .HasG = %HasG.decl
- // CHECK:STDOUT: .D = %D.decl
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %Core.import = import Core
- // CHECK:STDOUT: %PackageA.import = import PackageA
- // CHECK:STDOUT: %HasG.decl: type = interface_decl @HasG [concrete = constants.%HasG.type] {} {}
- // CHECK:STDOUT: %D.decl: type = class_decl @D [concrete = constants.%D] {} {}
- // CHECK:STDOUT: impl_decl @impl.e95 [concrete] {} {
- // CHECK:STDOUT: %PackageA.ref: <namespace> = name_ref PackageA, imports.%PackageA [concrete = imports.%PackageA]
- // CHECK:STDOUT: %C.ref: type = name_ref C, imports.%PackageA.C [concrete = constants.%C]
- // CHECK:STDOUT: %HasG.ref: type = name_ref HasG, file.%HasG.decl [concrete = constants.%HasG.type]
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %HasG.impl_witness_table.loc13 = impl_witness_table (@impl.e95.%G.decl), @impl.e95 [concrete]
- // CHECK:STDOUT: %HasG.impl_witness.loc13: <witness> = impl_witness %HasG.impl_witness_table.loc13 [concrete = constants.%HasG.impl_witness.69b]
- // CHECK:STDOUT: impl_decl @impl.8af [concrete] {} {
- // CHECK:STDOUT: %D.ref: type = name_ref D, file.%D.decl [concrete = constants.%D]
- // CHECK:STDOUT: %PackageA.ref: <namespace> = name_ref PackageA, imports.%PackageA [concrete = imports.%PackageA]
- // CHECK:STDOUT: %HasF.ref: type = name_ref HasF, imports.%PackageA.HasF [concrete = constants.%HasF.type]
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %HasF.impl_witness_table = impl_witness_table (@impl.8af.%F.decl), @impl.8af [concrete]
- // CHECK:STDOUT: %HasF.impl_witness: <witness> = impl_witness %HasF.impl_witness_table [concrete = constants.%HasF.impl_witness]
- // CHECK:STDOUT: impl_decl @impl.da9 [concrete] {} {
- // CHECK:STDOUT: %D.ref: type = name_ref D, file.%D.decl [concrete = constants.%D]
- // CHECK:STDOUT: %HasG.ref: type = name_ref HasG, file.%HasG.decl [concrete = constants.%HasG.type]
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %HasG.impl_witness_table.loc23 = impl_witness_table (@impl.da9.%G.decl), @impl.da9 [concrete]
- // CHECK:STDOUT: %HasG.impl_witness.loc23: <witness> = impl_witness %HasG.impl_witness_table.loc23 [concrete = constants.%HasG.impl_witness.b2b]
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: interface @HasG {
- // CHECK:STDOUT: %Self: %HasG.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self.d42]
- // CHECK:STDOUT: %G.decl: %G.type.d27 = fn_decl @G.1 [concrete = constants.%G.688] {
- // CHECK:STDOUT: %self.patt: @G.1.%pattern_type (%pattern_type.293) = binding_pattern self [concrete]
- // CHECK:STDOUT: %self.param_patt: @G.1.%pattern_type (%pattern_type.293) = value_param_pattern %self.patt, call_param0 [concrete]
- // CHECK:STDOUT: } {
- // CHECK:STDOUT: %self.param: @G.1.%Self.as_type.loc7_14.1 (%Self.as_type.133) = value_param call_param0
- // CHECK:STDOUT: %.loc7_14.1: type = splice_block %.loc7_14.2 [symbolic = %Self.as_type.loc7_14.1 (constants.%Self.as_type.133)] {
- // CHECK:STDOUT: %Self.ref: %HasG.type = name_ref Self, @HasG.%Self [symbolic = %Self (constants.%Self.d42)]
- // CHECK:STDOUT: %Self.as_type.loc7_14.2: type = facet_access_type %Self.ref [symbolic = %Self.as_type.loc7_14.1 (constants.%Self.as_type.133)]
- // CHECK:STDOUT: %.loc7_14.2: type = converted %Self.ref, %Self.as_type.loc7_14.2 [symbolic = %Self.as_type.loc7_14.1 (constants.%Self.as_type.133)]
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %self: @G.1.%Self.as_type.loc7_14.1 (%Self.as_type.133) = bind_name self, %self.param
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %assoc0: %HasG.assoc_type = assoc_entity element0, %G.decl [concrete = constants.%assoc0]
- // CHECK:STDOUT:
- // CHECK:STDOUT: !members:
- // CHECK:STDOUT: .Self = %Self
- // CHECK:STDOUT: .G = %assoc0
- // CHECK:STDOUT: witness = (%G.decl)
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: interface @HasF [from "package_a.carbon"] {
- // CHECK:STDOUT: !members:
- // CHECK:STDOUT: .Self = imports.%PackageA.import_ref.28c
- // CHECK:STDOUT: .F = imports.%PackageA.import_ref.c63
- // CHECK:STDOUT: witness = (imports.%PackageA.F)
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: impl @impl.e95: %C.ref as %HasG.ref {
- // CHECK:STDOUT: %G.decl: %G.type.05c = fn_decl @G.2 [concrete = constants.%G.486] {
- // CHECK:STDOUT: %self.patt: %pattern_type.8e5 = binding_pattern self [concrete]
- // CHECK:STDOUT: %self.param_patt: %pattern_type.8e5 = value_param_pattern %self.patt, call_param0 [concrete]
- // CHECK:STDOUT: } {
- // CHECK:STDOUT: %self.param: %C = value_param call_param0
- // CHECK:STDOUT: %Self.ref: type = name_ref Self, @impl.e95.%C.ref [concrete = constants.%C]
- // CHECK:STDOUT: %self: %C = bind_name self, %self.param
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: !members:
- // CHECK:STDOUT: .G = %G.decl
- // CHECK:STDOUT: witness = file.%HasG.impl_witness.loc13
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: impl @impl.8af: %D.ref as %HasF.ref {
- // CHECK:STDOUT: %F.decl: %F.type.bab = fn_decl @F.2 [concrete = constants.%F.46f] {
- // CHECK:STDOUT: %self.patt: %pattern_type.510 = binding_pattern self [concrete]
- // CHECK:STDOUT: %self.param_patt: %pattern_type.510 = value_param_pattern %self.patt, call_param0 [concrete]
- // CHECK:STDOUT: } {
- // CHECK:STDOUT: %self.param: %D = value_param call_param0
- // CHECK:STDOUT: %Self.ref: type = name_ref Self, @impl.8af.%D.ref [concrete = constants.%D]
- // CHECK:STDOUT: %self: %D = bind_name self, %self.param
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: !members:
- // CHECK:STDOUT: .F = %F.decl
- // CHECK:STDOUT: witness = file.%HasF.impl_witness
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: impl @impl.da9: %D.ref as %HasG.ref {
- // CHECK:STDOUT: %G.decl: %G.type.c1d = fn_decl @G.3 [concrete = constants.%G.294] {
- // CHECK:STDOUT: %self.patt: %pattern_type.510 = binding_pattern self [concrete]
- // CHECK:STDOUT: %self.param_patt: %pattern_type.510 = value_param_pattern %self.patt, call_param0 [concrete]
- // CHECK:STDOUT: } {
- // CHECK:STDOUT: %self.param: %D = value_param call_param0
- // CHECK:STDOUT: %Self.ref: type = name_ref Self, @impl.da9.%D.ref [concrete = constants.%D]
- // CHECK:STDOUT: %self: %D = bind_name self, %self.param
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: !members:
- // CHECK:STDOUT: .G = %G.decl
- // CHECK:STDOUT: witness = file.%HasG.impl_witness.loc23
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: class @D {
- // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete = constants.%empty_struct_type]
- // CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %empty_struct_type [concrete = constants.%complete_type]
- // CHECK:STDOUT: complete_type_witness = %complete_type
- // CHECK:STDOUT:
- // CHECK:STDOUT: !members:
- // CHECK:STDOUT: .Self = constants.%D
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: class @C [from "package_a.carbon"] {
- // CHECK:STDOUT: complete_type_witness = imports.%PackageA.import_ref.8f2
- // CHECK:STDOUT:
- // CHECK:STDOUT: !members:
- // CHECK:STDOUT: .Self = imports.%PackageA.import_ref.2c4
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: generic fn @G.1(@HasG.%Self: %HasG.type) {
- // CHECK:STDOUT: %Self: %HasG.type = bind_symbolic_name Self, 0 [symbolic = %Self (constants.%Self.d42)]
- // CHECK:STDOUT: %Self.as_type.loc7_14.1: type = facet_access_type %Self [symbolic = %Self.as_type.loc7_14.1 (constants.%Self.as_type.133)]
- // CHECK:STDOUT: %pattern_type: type = pattern_type %Self.as_type.loc7_14.1 [symbolic = %pattern_type (constants.%pattern_type.293)]
- // CHECK:STDOUT:
- // CHECK:STDOUT: fn(%self.param: @G.1.%Self.as_type.loc7_14.1 (%Self.as_type.133));
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: fn @G.2(%self.param: %C) {
- // CHECK:STDOUT: !entry:
- // CHECK:STDOUT: return
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: generic fn @F.1(imports.%PackageA.import_ref.e73: %HasF.type) [from "package_a.carbon"] {
- // CHECK:STDOUT: %Self: %HasF.type = bind_symbolic_name Self, 0 [symbolic = %Self (constants.%Self.cf3)]
- // CHECK:STDOUT: %Self.as_type: type = facet_access_type %Self [symbolic = %Self.as_type (constants.%Self.as_type.7cf)]
- // CHECK:STDOUT: %pattern_type: type = pattern_type %Self.as_type [symbolic = %pattern_type (constants.%pattern_type.dc3)]
- // CHECK:STDOUT:
- // CHECK:STDOUT: fn;
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: fn @F.2(%self.param: %D) {
- // CHECK:STDOUT: !entry:
- // CHECK:STDOUT: return
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: fn @G.3(%self.param: %D) {
- // CHECK:STDOUT: !entry:
- // CHECK:STDOUT: return
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: specific @G.1(constants.%Self.d42) {
- // CHECK:STDOUT: %Self => constants.%Self.d42
- // CHECK:STDOUT: %Self.as_type.loc7_14.1 => constants.%Self.as_type.133
- // CHECK:STDOUT: %pattern_type => constants.%pattern_type.293
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: specific @G.1(constants.%HasG.facet.704) {
- // CHECK:STDOUT: %Self => constants.%HasG.facet.704
- // CHECK:STDOUT: %Self.as_type.loc7_14.1 => constants.%C
- // CHECK:STDOUT: %pattern_type => constants.%pattern_type.8e5
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: specific @F.1(constants.%Self.cf3) {
- // CHECK:STDOUT: %Self => constants.%Self.cf3
- // CHECK:STDOUT: %Self.as_type => constants.%Self.as_type.7cf
- // CHECK:STDOUT: %pattern_type => constants.%pattern_type.dc3
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: specific @F.1(constants.%HasF.facet) {
- // CHECK:STDOUT: %Self => constants.%HasF.facet
- // CHECK:STDOUT: %Self.as_type => constants.%D
- // CHECK:STDOUT: %pattern_type => constants.%pattern_type.510
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: specific @G.1(constants.%HasG.facet.9c8) {
- // CHECK:STDOUT: %Self => constants.%HasG.facet.9c8
- // CHECK:STDOUT: %Self.as_type.loc7_14.1 => constants.%D
- // CHECK:STDOUT: %pattern_type => constants.%pattern_type.510
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: --- use_cf.carbon
- // CHECK:STDOUT:
- // CHECK:STDOUT: constants {
- // CHECK:STDOUT: %C: type = class_type @C [concrete]
- // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete]
- // CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %empty_struct_type [concrete]
- // CHECK:STDOUT: %pattern_type.8e5: type = pattern_type %C [concrete]
- // CHECK:STDOUT: %TestCF.type: type = fn_type @TestCF [concrete]
- // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete]
- // CHECK:STDOUT: %TestCF: %TestCF.type = struct_value () [concrete]
- // CHECK:STDOUT: %HasF.type: type = facet_type <@HasF> [concrete]
- // CHECK:STDOUT: %Self: %HasF.type = bind_symbolic_name Self, 0 [symbolic]
- // CHECK:STDOUT: %HasF.assoc_type: type = assoc_entity_type @HasF [concrete]
- // CHECK:STDOUT: %assoc0: %HasF.assoc_type = assoc_entity element0, imports.%PackageA.import_ref.ab2 [concrete]
- // CHECK:STDOUT: %F.type.dbc: type = fn_type @F.1 [concrete]
- // CHECK:STDOUT: %F.a2b: %F.type.dbc = struct_value () [concrete]
- // CHECK:STDOUT: %Self.as_type: type = facet_access_type %Self [symbolic]
- // CHECK:STDOUT: %pattern_type.dc3: type = pattern_type %Self.as_type [symbolic]
- // CHECK:STDOUT: %HasF.impl_witness: <witness> = impl_witness imports.%HasF.impl_witness_table [concrete]
- // CHECK:STDOUT: %HasF.facet: %HasF.type = facet_value %C, (%HasF.impl_witness) [concrete]
- // CHECK:STDOUT: %.d3f: type = fn_type_with_self_type %F.type.dbc, %HasF.facet [concrete]
- // CHECK:STDOUT: %F.type.4e3: type = fn_type @F.2 [concrete]
- // CHECK:STDOUT: %F.857: %F.type.4e3 = struct_value () [concrete]
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: imports {
- // CHECK:STDOUT: %Core: <namespace> = namespace file.%Core.import, [concrete] {
- // CHECK:STDOUT: import Core//prelude
- // CHECK:STDOUT: import Core//prelude/...
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %PackageA: <namespace> = namespace file.%PackageA.import, [concrete] {
- // CHECK:STDOUT: .C = %PackageA.C
- // CHECK:STDOUT: .HasF = %PackageA.HasF
- // CHECK:STDOUT: import PackageA//default
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %PackageA.C: type = import_ref PackageA//default, C, loaded [concrete = constants.%C]
- // CHECK:STDOUT: %PackageA.import_ref.8f2: <witness> = import_ref PackageA//default, loc8_10, loaded [concrete = constants.%complete_type]
- // CHECK:STDOUT: %PackageA.import_ref.2c4 = import_ref PackageA//default, inst43 [no loc], unloaded
- // CHECK:STDOUT: %PackageA.HasF: type = import_ref PackageA//default, HasF, loaded [concrete = constants.%HasF.type]
- // CHECK:STDOUT: %PackageA.import_ref.28c = import_ref PackageA//default, inst19 [no loc], unloaded
- // CHECK:STDOUT: %PackageA.import_ref.b36: %HasF.assoc_type = import_ref PackageA//default, loc5_21, loaded [concrete = constants.%assoc0]
- // CHECK:STDOUT: %PackageA.F = import_ref PackageA//default, F, unloaded
- // CHECK:STDOUT: %PackageA.import_ref.ab2: %F.type.dbc = import_ref PackageA//default, loc5_21, loaded [concrete = constants.%F.a2b]
- // CHECK:STDOUT: %PackageA.import_ref.e73: %HasF.type = import_ref PackageA//default, inst19 [no loc], loaded [symbolic = constants.%Self]
- // CHECK:STDOUT: %PackageA.import_ref.c12: <witness> = import_ref PackageA//default, loc11_16, loaded [concrete = constants.%HasF.impl_witness]
- // CHECK:STDOUT: %PackageA.import_ref.29a: type = import_ref PackageA//default, loc11_6, loaded [concrete = constants.%C]
- // CHECK:STDOUT: %PackageA.import_ref.e8c: type = import_ref PackageA//default, loc11_11, loaded [concrete = constants.%HasF.type]
- // CHECK:STDOUT: %PackageA.import_ref.148: %F.type.4e3 = import_ref PackageA//default, loc12_22, loaded [concrete = constants.%F.857]
- // CHECK:STDOUT: %HasF.impl_witness_table = impl_witness_table (%PackageA.import_ref.148), @impl [concrete]
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: file {
- // CHECK:STDOUT: package: <namespace> = namespace [concrete] {
- // CHECK:STDOUT: .Core = imports.%Core
- // CHECK:STDOUT: .PackageA = imports.%PackageA
- // CHECK:STDOUT: .TestCF = %TestCF.decl
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %Core.import = import Core
- // CHECK:STDOUT: %PackageA.import = import PackageA
- // CHECK:STDOUT: %TestCF.decl: %TestCF.type = fn_decl @TestCF [concrete = constants.%TestCF] {
- // CHECK:STDOUT: %c.patt: %pattern_type.8e5 = binding_pattern c [concrete]
- // CHECK:STDOUT: %c.param_patt: %pattern_type.8e5 = value_param_pattern %c.patt, call_param0 [concrete]
- // CHECK:STDOUT: } {
- // CHECK:STDOUT: %c.param: %C = value_param call_param0
- // CHECK:STDOUT: %.loc6: type = splice_block %C.ref [concrete = constants.%C] {
- // CHECK:STDOUT: %PackageA.ref.loc6: <namespace> = name_ref PackageA, imports.%PackageA [concrete = imports.%PackageA]
- // CHECK:STDOUT: %C.ref: type = name_ref C, imports.%PackageA.C [concrete = constants.%C]
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %c: %C = bind_name c, %c.param
- // CHECK:STDOUT: }
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: interface @HasF [from "package_a.carbon"] {
- // CHECK:STDOUT: !members:
- // CHECK:STDOUT: .Self = imports.%PackageA.import_ref.28c
- // CHECK:STDOUT: .F = imports.%PackageA.import_ref.b36
- // CHECK:STDOUT: witness = (imports.%PackageA.F)
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: impl @impl: imports.%PackageA.import_ref.29a as imports.%PackageA.import_ref.e8c [from "package_a.carbon"] {
- // CHECK:STDOUT: !members:
- // CHECK:STDOUT: witness = imports.%PackageA.import_ref.c12
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: class @C [from "package_a.carbon"] {
- // CHECK:STDOUT: complete_type_witness = imports.%PackageA.import_ref.8f2
- // CHECK:STDOUT:
- // CHECK:STDOUT: !members:
- // CHECK:STDOUT: .Self = imports.%PackageA.import_ref.2c4
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: fn @TestCF(%c.param: %C) {
- // CHECK:STDOUT: !entry:
- // CHECK:STDOUT: %c.ref: %C = name_ref c, %c
- // CHECK:STDOUT: %PackageA.ref.loc7: <namespace> = name_ref PackageA, imports.%PackageA [concrete = imports.%PackageA]
- // CHECK:STDOUT: %HasF.ref: type = name_ref HasF, imports.%PackageA.HasF [concrete = constants.%HasF.type]
- // CHECK:STDOUT: %F.ref: %HasF.assoc_type = name_ref F, imports.%PackageA.import_ref.b36 [concrete = constants.%assoc0]
- // CHECK:STDOUT: %impl.elem0: %.d3f = impl_witness_access constants.%HasF.impl_witness, element0 [concrete = constants.%F.857]
- // CHECK:STDOUT: %bound_method: <bound method> = bound_method %c.ref, %impl.elem0
- // CHECK:STDOUT: %F.call: init %empty_tuple.type = call %bound_method(%c.ref)
- // CHECK:STDOUT: return
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: generic fn @F.1(imports.%PackageA.import_ref.e73: %HasF.type) [from "package_a.carbon"] {
- // CHECK:STDOUT: %Self: %HasF.type = bind_symbolic_name Self, 0 [symbolic = %Self (constants.%Self)]
- // CHECK:STDOUT: %Self.as_type: type = facet_access_type %Self [symbolic = %Self.as_type (constants.%Self.as_type)]
- // CHECK:STDOUT: %pattern_type: type = pattern_type %Self.as_type [symbolic = %pattern_type (constants.%pattern_type.dc3)]
- // CHECK:STDOUT:
- // CHECK:STDOUT: fn;
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: fn @F.2 [from "package_a.carbon"];
- // CHECK:STDOUT:
- // CHECK:STDOUT: specific @F.1(constants.%Self) {
- // CHECK:STDOUT: %Self => constants.%Self
- // CHECK:STDOUT: %Self.as_type => constants.%Self.as_type
- // CHECK:STDOUT: %pattern_type => constants.%pattern_type.dc3
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: --- use_df.carbon
- // CHECK:STDOUT:
- // CHECK:STDOUT: constants {
- // CHECK:STDOUT: %D: type = class_type @D [concrete]
- // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete]
- // CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %empty_struct_type [concrete]
- // CHECK:STDOUT: %pattern_type.f09: type = pattern_type %D [concrete]
- // CHECK:STDOUT: %TestDF.type: type = fn_type @TestDF [concrete]
- // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete]
- // CHECK:STDOUT: %TestDF: %TestDF.type = struct_value () [concrete]
- // CHECK:STDOUT: %HasF.type: type = facet_type <@HasF> [concrete]
- // CHECK:STDOUT: %Self.cf3: %HasF.type = bind_symbolic_name Self, 0 [symbolic]
- // CHECK:STDOUT: %HasF.assoc_type: type = assoc_entity_type @HasF [concrete]
- // CHECK:STDOUT: %assoc0: %HasF.assoc_type = assoc_entity element0, imports.%PackageA.import_ref.ab2 [concrete]
- // CHECK:STDOUT: %F.type.dbc: type = fn_type @F.1 [concrete]
- // CHECK:STDOUT: %F.a2b: %F.type.dbc = struct_value () [concrete]
- // CHECK:STDOUT: %Self.as_type: type = facet_access_type %Self.cf3 [symbolic]
- // CHECK:STDOUT: %pattern_type.dc3: type = pattern_type %Self.as_type [symbolic]
- // CHECK:STDOUT: %C: type = class_type @C [concrete]
- // CHECK:STDOUT: %HasG.type: type = facet_type <@HasG> [concrete]
- // CHECK:STDOUT: %HasF.impl_witness: <witness> = impl_witness imports.%HasF.impl_witness_table [concrete]
- // CHECK:STDOUT: %HasF.facet: %HasF.type = facet_value %D, (%HasF.impl_witness) [concrete]
- // CHECK:STDOUT: %.bc0: type = fn_type_with_self_type %F.type.dbc, %HasF.facet [concrete]
- // CHECK:STDOUT: %F.type.394: type = fn_type @F.2 [concrete]
- // CHECK:STDOUT: %F.1fc: %F.type.394 = struct_value () [concrete]
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: imports {
- // CHECK:STDOUT: %Core: <namespace> = namespace file.%Core.import, [concrete] {
- // CHECK:STDOUT: import Core//prelude
- // CHECK:STDOUT: import Core//prelude/...
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %PackageA: <namespace> = namespace file.%PackageA.import, [concrete] {
- // CHECK:STDOUT: .HasF = %PackageA.HasF
- // CHECK:STDOUT: import PackageA//default
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %PackageB: <namespace> = namespace file.%PackageB.import, [concrete] {
- // CHECK:STDOUT: .D = %PackageB.D
- // CHECK:STDOUT: import PackageB//default
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %PackageB.D: type = import_ref PackageB//default, D, loaded [concrete = constants.%D]
- // CHECK:STDOUT: %PackageB.import_ref.8f2: <witness> = import_ref PackageB//default, loc10_10, loaded [concrete = constants.%complete_type]
- // CHECK:STDOUT: %PackageB.import_ref.cab = import_ref PackageB//default, inst45 [no loc], unloaded
- // CHECK:STDOUT: %PackageA.HasF: type = import_ref PackageA//default, HasF, loaded [concrete = constants.%HasF.type]
- // CHECK:STDOUT: %PackageA.import_ref.28c = import_ref PackageA//default, inst19 [no loc], unloaded
- // CHECK:STDOUT: %PackageA.import_ref.b36: %HasF.assoc_type = import_ref PackageA//default, loc5_21, loaded [concrete = constants.%assoc0]
- // CHECK:STDOUT: %PackageA.F = import_ref PackageA//default, F, unloaded
- // CHECK:STDOUT: %PackageA.import_ref.ab2: %F.type.dbc = import_ref PackageA//default, loc5_21, loaded [concrete = constants.%F.a2b]
- // CHECK:STDOUT: %PackageA.import_ref.e73: %HasF.type = import_ref PackageA//default, inst19 [no loc], loaded [symbolic = constants.%Self.cf3]
- // CHECK:STDOUT: %PackageA.import_ref.5cd = import_ref PackageA//default, loc11_16, unloaded
- // CHECK:STDOUT: %PackageA.import_ref.8f2: <witness> = import_ref PackageA//default, loc8_10, loaded [concrete = constants.%complete_type]
- // CHECK:STDOUT: %PackageA.import_ref.2c4 = import_ref PackageA//default, inst43 [no loc], unloaded
- // CHECK:STDOUT: %PackageA.import_ref.29a: type = import_ref PackageA//default, loc11_6, loaded [concrete = constants.%C]
- // CHECK:STDOUT: %PackageA.import_ref.e8c: type = import_ref PackageA//default, loc11_11, loaded [concrete = constants.%HasF.type]
- // CHECK:STDOUT: %PackageB.import_ref.5d8 = import_ref PackageB//default, inst21 [no loc], unloaded
- // CHECK:STDOUT: %PackageB.import_ref.910 = import_ref PackageB//default, loc7_21, unloaded
- // CHECK:STDOUT: %PackageB.G = import_ref PackageB//default, G, unloaded
- // CHECK:STDOUT: %PackageB.import_ref.ea7 = import_ref PackageB//default, loc13_25, unloaded
- // CHECK:STDOUT: %PackageB.import_ref.dfb: type = import_ref PackageB//default, loc13_14, loaded [concrete = constants.%C]
- // CHECK:STDOUT: %PackageB.import_ref.cee586.1: type = import_ref PackageB//default, loc13_20, loaded [concrete = constants.%HasG.type]
- // CHECK:STDOUT: %PackageB.import_ref.ce6: <witness> = import_ref PackageB//default, loc18_25, loaded [concrete = constants.%HasF.impl_witness]
- // CHECK:STDOUT: %PackageB.import_ref.aa9f8a.1: type = import_ref PackageB//default, loc18_6, loaded [concrete = constants.%D]
- // CHECK:STDOUT: %PackageB.import_ref.831: type = import_ref PackageB//default, loc18_19, loaded [concrete = constants.%HasF.type]
- // CHECK:STDOUT: %PackageB.import_ref.569 = import_ref PackageB//default, loc23_16, unloaded
- // CHECK:STDOUT: %PackageB.import_ref.aa9f8a.2: type = import_ref PackageB//default, loc23_6, loaded [concrete = constants.%D]
- // CHECK:STDOUT: %PackageB.import_ref.cee586.2: type = import_ref PackageB//default, loc23_11, loaded [concrete = constants.%HasG.type]
- // CHECK:STDOUT: %PackageB.import_ref.0cd: %F.type.394 = import_ref PackageB//default, loc19_22, loaded [concrete = constants.%F.1fc]
- // CHECK:STDOUT: %HasF.impl_witness_table = impl_witness_table (%PackageB.import_ref.0cd), @impl.52b [concrete]
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: file {
- // CHECK:STDOUT: package: <namespace> = namespace [concrete] {
- // CHECK:STDOUT: .Core = imports.%Core
- // CHECK:STDOUT: .PackageA = imports.%PackageA
- // CHECK:STDOUT: .PackageB = imports.%PackageB
- // CHECK:STDOUT: .TestDF = %TestDF.decl
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %Core.import = import Core
- // CHECK:STDOUT: %PackageA.import = import PackageA
- // CHECK:STDOUT: %PackageB.import = import PackageB
- // CHECK:STDOUT: %TestDF.decl: %TestDF.type = fn_decl @TestDF [concrete = constants.%TestDF] {
- // CHECK:STDOUT: %d.patt: %pattern_type.f09 = binding_pattern d [concrete]
- // CHECK:STDOUT: %d.param_patt: %pattern_type.f09 = value_param_pattern %d.patt, call_param0 [concrete]
- // CHECK:STDOUT: } {
- // CHECK:STDOUT: %d.param: %D = value_param call_param0
- // CHECK:STDOUT: %.loc7: type = splice_block %D.ref [concrete = constants.%D] {
- // CHECK:STDOUT: %PackageB.ref: <namespace> = name_ref PackageB, imports.%PackageB [concrete = imports.%PackageB]
- // CHECK:STDOUT: %D.ref: type = name_ref D, imports.%PackageB.D [concrete = constants.%D]
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %d: %D = bind_name d, %d.param
- // CHECK:STDOUT: }
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: interface @HasF [from "package_a.carbon"] {
- // CHECK:STDOUT: !members:
- // CHECK:STDOUT: .Self = imports.%PackageA.import_ref.28c
- // CHECK:STDOUT: .F = imports.%PackageA.import_ref.b36
- // CHECK:STDOUT: witness = (imports.%PackageA.F)
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: interface @HasG [from "package_b.carbon"] {
- // CHECK:STDOUT: !members:
- // CHECK:STDOUT: .Self = imports.%PackageB.import_ref.5d8
- // CHECK:STDOUT: .G = imports.%PackageB.import_ref.910
- // CHECK:STDOUT: witness = (imports.%PackageB.G)
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: impl @impl.4b2: imports.%PackageA.import_ref.29a as imports.%PackageA.import_ref.e8c [from "package_a.carbon"] {
- // CHECK:STDOUT: !members:
- // CHECK:STDOUT: witness = imports.%PackageA.import_ref.5cd
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: impl @impl.922: imports.%PackageB.import_ref.dfb as imports.%PackageB.import_ref.cee586.1 [from "package_b.carbon"] {
- // CHECK:STDOUT: !members:
- // CHECK:STDOUT: witness = imports.%PackageB.import_ref.ea7
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: impl @impl.52b: imports.%PackageB.import_ref.aa9f8a.1 as imports.%PackageB.import_ref.831 [from "package_b.carbon"] {
- // CHECK:STDOUT: !members:
- // CHECK:STDOUT: witness = imports.%PackageB.import_ref.ce6
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: impl @impl.47e: imports.%PackageB.import_ref.aa9f8a.2 as imports.%PackageB.import_ref.cee586.2 [from "package_b.carbon"] {
- // CHECK:STDOUT: !members:
- // CHECK:STDOUT: witness = imports.%PackageB.import_ref.569
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: class @D [from "package_b.carbon"] {
- // CHECK:STDOUT: complete_type_witness = imports.%PackageB.import_ref.8f2
- // CHECK:STDOUT:
- // CHECK:STDOUT: !members:
- // CHECK:STDOUT: .Self = imports.%PackageB.import_ref.cab
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: class @C [from "package_a.carbon"] {
- // CHECK:STDOUT: complete_type_witness = imports.%PackageA.import_ref.8f2
- // CHECK:STDOUT:
- // CHECK:STDOUT: !members:
- // CHECK:STDOUT: .Self = imports.%PackageA.import_ref.2c4
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: fn @TestDF(%d.param: %D) {
- // CHECK:STDOUT: !entry:
- // CHECK:STDOUT: %d.ref: %D = name_ref d, %d
- // CHECK:STDOUT: %PackageA.ref: <namespace> = name_ref PackageA, imports.%PackageA [concrete = imports.%PackageA]
- // CHECK:STDOUT: %HasF.ref: type = name_ref HasF, imports.%PackageA.HasF [concrete = constants.%HasF.type]
- // CHECK:STDOUT: %F.ref: %HasF.assoc_type = name_ref F, imports.%PackageA.import_ref.b36 [concrete = constants.%assoc0]
- // CHECK:STDOUT: %impl.elem0: %.bc0 = impl_witness_access constants.%HasF.impl_witness, element0 [concrete = constants.%F.1fc]
- // CHECK:STDOUT: %bound_method: <bound method> = bound_method %d.ref, %impl.elem0
- // CHECK:STDOUT: %F.call: init %empty_tuple.type = call %bound_method(%d.ref)
- // CHECK:STDOUT: return
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: generic fn @F.1(imports.%PackageA.import_ref.e73: %HasF.type) [from "package_a.carbon"] {
- // CHECK:STDOUT: %Self: %HasF.type = bind_symbolic_name Self, 0 [symbolic = %Self (constants.%Self.cf3)]
- // CHECK:STDOUT: %Self.as_type: type = facet_access_type %Self [symbolic = %Self.as_type (constants.%Self.as_type)]
- // CHECK:STDOUT: %pattern_type: type = pattern_type %Self.as_type [symbolic = %pattern_type (constants.%pattern_type.dc3)]
- // CHECK:STDOUT:
- // CHECK:STDOUT: fn;
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: fn @F.2 [from "package_b.carbon"];
- // CHECK:STDOUT:
- // CHECK:STDOUT: specific @F.1(constants.%Self.cf3) {
- // CHECK:STDOUT: %Self => constants.%Self.cf3
- // CHECK:STDOUT: %Self.as_type => constants.%Self.as_type
- // CHECK:STDOUT: %pattern_type => constants.%pattern_type.dc3
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: --- use_cg.carbon
- // CHECK:STDOUT:
- // CHECK:STDOUT: constants {
- // CHECK:STDOUT: %C: type = class_type @C [concrete]
- // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete]
- // CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %empty_struct_type [concrete]
- // CHECK:STDOUT: %pattern_type.8e5: type = pattern_type %C [concrete]
- // CHECK:STDOUT: %TestCG.type: type = fn_type @TestCG [concrete]
- // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete]
- // CHECK:STDOUT: %TestCG: %TestCG.type = struct_value () [concrete]
- // CHECK:STDOUT: %HasG.type: type = facet_type <@HasG> [concrete]
- // CHECK:STDOUT: %Self.fcb: %HasG.type = bind_symbolic_name Self, 0 [symbolic]
- // CHECK:STDOUT: %HasG.assoc_type: type = assoc_entity_type @HasG [concrete]
- // CHECK:STDOUT: %assoc0: %HasG.assoc_type = assoc_entity element0, imports.%PackageB.import_ref.70a [concrete]
- // CHECK:STDOUT: %G.type.d9e: type = fn_type @G.1 [concrete]
- // CHECK:STDOUT: %G.cd6: %G.type.d9e = struct_value () [concrete]
- // CHECK:STDOUT: %Self.as_type: type = facet_access_type %Self.fcb [symbolic]
- // CHECK:STDOUT: %pattern_type.76a: type = pattern_type %Self.as_type [symbolic]
- // CHECK:STDOUT: %HasF.type: type = facet_type <@HasF> [concrete]
- // CHECK:STDOUT: %D: type = class_type @D [concrete]
- // CHECK:STDOUT: %HasG.impl_witness: <witness> = impl_witness imports.%HasG.impl_witness_table [concrete]
- // CHECK:STDOUT: %HasG.facet: %HasG.type = facet_value %C, (%HasG.impl_witness) [concrete]
- // CHECK:STDOUT: %.a26: type = fn_type_with_self_type %G.type.d9e, %HasG.facet [concrete]
- // CHECK:STDOUT: %G.type.18e: type = fn_type @G.2 [concrete]
- // CHECK:STDOUT: %G.dbb: %G.type.18e = struct_value () [concrete]
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: imports {
- // CHECK:STDOUT: %Core: <namespace> = namespace file.%Core.import, [concrete] {
- // CHECK:STDOUT: import Core//prelude
- // CHECK:STDOUT: import Core//prelude/...
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %PackageA: <namespace> = namespace file.%PackageA.import, [concrete] {
- // CHECK:STDOUT: .C = %PackageA.C
- // CHECK:STDOUT: import PackageA//default
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %PackageB: <namespace> = namespace file.%PackageB.import, [concrete] {
- // CHECK:STDOUT: .HasG = %PackageB.HasG
- // CHECK:STDOUT: import PackageB//default
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %PackageA.C: type = import_ref PackageA//default, C, loaded [concrete = constants.%C]
- // CHECK:STDOUT: %PackageA.import_ref.8f2: <witness> = import_ref PackageA//default, loc8_10, loaded [concrete = constants.%complete_type]
- // CHECK:STDOUT: %PackageA.import_ref.2c4 = import_ref PackageA//default, inst43 [no loc], unloaded
- // CHECK:STDOUT: %PackageB.HasG: type = import_ref PackageB//default, HasG, loaded [concrete = constants.%HasG.type]
- // CHECK:STDOUT: %PackageB.import_ref.5d8 = import_ref PackageB//default, inst21 [no loc], unloaded
- // CHECK:STDOUT: %PackageB.import_ref.6c2: %HasG.assoc_type = import_ref PackageB//default, loc7_21, loaded [concrete = constants.%assoc0]
- // CHECK:STDOUT: %PackageB.G = import_ref PackageB//default, G, unloaded
- // CHECK:STDOUT: %PackageB.import_ref.70a: %G.type.d9e = import_ref PackageB//default, loc7_21, loaded [concrete = constants.%G.cd6]
- // CHECK:STDOUT: %PackageB.import_ref.ef5: %HasG.type = import_ref PackageB//default, inst21 [no loc], loaded [symbolic = constants.%Self.fcb]
- // CHECK:STDOUT: %PackageA.import_ref.28c = import_ref PackageA//default, inst19 [no loc], unloaded
- // CHECK:STDOUT: %PackageA.import_ref.c63 = import_ref PackageA//default, loc5_21, unloaded
- // CHECK:STDOUT: %PackageA.F = import_ref PackageA//default, F, unloaded
- // CHECK:STDOUT: %PackageA.import_ref.5cd = import_ref PackageA//default, loc11_16, unloaded
- // CHECK:STDOUT: %PackageA.import_ref.29a: type = import_ref PackageA//default, loc11_6, loaded [concrete = constants.%C]
- // CHECK:STDOUT: %PackageA.import_ref.e8c: type = import_ref PackageA//default, loc11_11, loaded [concrete = constants.%HasF.type]
- // CHECK:STDOUT: %PackageB.import_ref.1f6: <witness> = import_ref PackageB//default, loc13_25, loaded [concrete = constants.%HasG.impl_witness]
- // CHECK:STDOUT: %PackageB.import_ref.dfb: type = import_ref PackageB//default, loc13_14, loaded [concrete = constants.%C]
- // CHECK:STDOUT: %PackageB.import_ref.cee586.1: type = import_ref PackageB//default, loc13_20, loaded [concrete = constants.%HasG.type]
- // CHECK:STDOUT: %PackageB.import_ref.5ba = import_ref PackageB//default, loc18_25, unloaded
- // CHECK:STDOUT: %PackageB.import_ref.8f2: <witness> = import_ref PackageB//default, loc10_10, loaded [concrete = constants.%complete_type]
- // CHECK:STDOUT: %PackageB.import_ref.cab = import_ref PackageB//default, inst45 [no loc], unloaded
- // CHECK:STDOUT: %PackageB.import_ref.aa9f8a.1: type = import_ref PackageB//default, loc18_6, loaded [concrete = constants.%D]
- // CHECK:STDOUT: %PackageB.import_ref.831: type = import_ref PackageB//default, loc18_19, loaded [concrete = constants.%HasF.type]
- // CHECK:STDOUT: %PackageB.import_ref.569 = import_ref PackageB//default, loc23_16, unloaded
- // CHECK:STDOUT: %PackageB.import_ref.aa9f8a.2: type = import_ref PackageB//default, loc23_6, loaded [concrete = constants.%D]
- // CHECK:STDOUT: %PackageB.import_ref.cee586.2: type = import_ref PackageB//default, loc23_11, loaded [concrete = constants.%HasG.type]
- // CHECK:STDOUT: %PackageB.import_ref.9ec: %G.type.18e = import_ref PackageB//default, loc14_22, loaded [concrete = constants.%G.dbb]
- // CHECK:STDOUT: %HasG.impl_witness_table = impl_witness_table (%PackageB.import_ref.9ec), @impl.922 [concrete]
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: file {
- // CHECK:STDOUT: package: <namespace> = namespace [concrete] {
- // CHECK:STDOUT: .Core = imports.%Core
- // CHECK:STDOUT: .PackageA = imports.%PackageA
- // CHECK:STDOUT: .PackageB = imports.%PackageB
- // CHECK:STDOUT: .TestCG = %TestCG.decl
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %Core.import = import Core
- // CHECK:STDOUT: %PackageA.import = import PackageA
- // CHECK:STDOUT: %PackageB.import = import PackageB
- // CHECK:STDOUT: %TestCG.decl: %TestCG.type = fn_decl @TestCG [concrete = constants.%TestCG] {
- // CHECK:STDOUT: %c.patt: %pattern_type.8e5 = binding_pattern c [concrete]
- // CHECK:STDOUT: %c.param_patt: %pattern_type.8e5 = value_param_pattern %c.patt, call_param0 [concrete]
- // CHECK:STDOUT: } {
- // CHECK:STDOUT: %c.param: %C = value_param call_param0
- // CHECK:STDOUT: %.loc7: type = splice_block %C.ref [concrete = constants.%C] {
- // CHECK:STDOUT: %PackageA.ref: <namespace> = name_ref PackageA, imports.%PackageA [concrete = imports.%PackageA]
- // CHECK:STDOUT: %C.ref: type = name_ref C, imports.%PackageA.C [concrete = constants.%C]
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %c: %C = bind_name c, %c.param
- // CHECK:STDOUT: }
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: interface @HasG [from "package_b.carbon"] {
- // CHECK:STDOUT: !members:
- // CHECK:STDOUT: .Self = imports.%PackageB.import_ref.5d8
- // CHECK:STDOUT: .G = imports.%PackageB.import_ref.6c2
- // CHECK:STDOUT: witness = (imports.%PackageB.G)
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: interface @HasF [from "package_a.carbon"] {
- // CHECK:STDOUT: !members:
- // CHECK:STDOUT: .Self = imports.%PackageA.import_ref.28c
- // CHECK:STDOUT: .F = imports.%PackageA.import_ref.c63
- // CHECK:STDOUT: witness = (imports.%PackageA.F)
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: impl @impl.4b2: imports.%PackageA.import_ref.29a as imports.%PackageA.import_ref.e8c [from "package_a.carbon"] {
- // CHECK:STDOUT: !members:
- // CHECK:STDOUT: witness = imports.%PackageA.import_ref.5cd
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: impl @impl.922: imports.%PackageB.import_ref.dfb as imports.%PackageB.import_ref.cee586.1 [from "package_b.carbon"] {
- // CHECK:STDOUT: !members:
- // CHECK:STDOUT: witness = imports.%PackageB.import_ref.1f6
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: impl @impl.52b: imports.%PackageB.import_ref.aa9f8a.1 as imports.%PackageB.import_ref.831 [from "package_b.carbon"] {
- // CHECK:STDOUT: !members:
- // CHECK:STDOUT: witness = imports.%PackageB.import_ref.5ba
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: impl @impl.47e: imports.%PackageB.import_ref.aa9f8a.2 as imports.%PackageB.import_ref.cee586.2 [from "package_b.carbon"] {
- // CHECK:STDOUT: !members:
- // CHECK:STDOUT: witness = imports.%PackageB.import_ref.569
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: class @C [from "package_a.carbon"] {
- // CHECK:STDOUT: complete_type_witness = imports.%PackageA.import_ref.8f2
- // CHECK:STDOUT:
- // CHECK:STDOUT: !members:
- // CHECK:STDOUT: .Self = imports.%PackageA.import_ref.2c4
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: class @D [from "package_b.carbon"] {
- // CHECK:STDOUT: complete_type_witness = imports.%PackageB.import_ref.8f2
- // CHECK:STDOUT:
- // CHECK:STDOUT: !members:
- // CHECK:STDOUT: .Self = imports.%PackageB.import_ref.cab
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: fn @TestCG(%c.param: %C) {
- // CHECK:STDOUT: !entry:
- // CHECK:STDOUT: %c.ref: %C = name_ref c, %c
- // CHECK:STDOUT: %PackageB.ref: <namespace> = name_ref PackageB, imports.%PackageB [concrete = imports.%PackageB]
- // CHECK:STDOUT: %HasG.ref: type = name_ref HasG, imports.%PackageB.HasG [concrete = constants.%HasG.type]
- // CHECK:STDOUT: %G.ref: %HasG.assoc_type = name_ref G, imports.%PackageB.import_ref.6c2 [concrete = constants.%assoc0]
- // CHECK:STDOUT: %impl.elem0: %.a26 = impl_witness_access constants.%HasG.impl_witness, element0 [concrete = constants.%G.dbb]
- // CHECK:STDOUT: %bound_method: <bound method> = bound_method %c.ref, %impl.elem0
- // CHECK:STDOUT: %G.call: init %empty_tuple.type = call %bound_method(%c.ref)
- // CHECK:STDOUT: return
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: generic fn @G.1(imports.%PackageB.import_ref.ef5: %HasG.type) [from "package_b.carbon"] {
- // CHECK:STDOUT: %Self: %HasG.type = bind_symbolic_name Self, 0 [symbolic = %Self (constants.%Self.fcb)]
- // CHECK:STDOUT: %Self.as_type: type = facet_access_type %Self [symbolic = %Self.as_type (constants.%Self.as_type)]
- // CHECK:STDOUT: %pattern_type: type = pattern_type %Self.as_type [symbolic = %pattern_type (constants.%pattern_type.76a)]
- // CHECK:STDOUT:
- // CHECK:STDOUT: fn;
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: fn @G.2 [from "package_b.carbon"];
- // CHECK:STDOUT:
- // CHECK:STDOUT: specific @G.1(constants.%Self.fcb) {
- // CHECK:STDOUT: %Self => constants.%Self.fcb
- // CHECK:STDOUT: %Self.as_type => constants.%Self.as_type
- // CHECK:STDOUT: %pattern_type => constants.%pattern_type.76a
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: --- use_dg.carbon
- // CHECK:STDOUT:
- // CHECK:STDOUT: constants {
- // CHECK:STDOUT: %D: type = class_type @D [concrete]
- // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete]
- // CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %empty_struct_type [concrete]
- // CHECK:STDOUT: %pattern_type.f09: type = pattern_type %D [concrete]
- // CHECK:STDOUT: %TestDG.type: type = fn_type @TestDG [concrete]
- // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete]
- // CHECK:STDOUT: %TestDG: %TestDG.type = struct_value () [concrete]
- // CHECK:STDOUT: %HasG.type: type = facet_type <@HasG> [concrete]
- // CHECK:STDOUT: %Self.fcb: %HasG.type = bind_symbolic_name Self, 0 [symbolic]
- // CHECK:STDOUT: %HasG.assoc_type: type = assoc_entity_type @HasG [concrete]
- // CHECK:STDOUT: %assoc0: %HasG.assoc_type = assoc_entity element0, imports.%PackageB.import_ref.70a [concrete]
- // CHECK:STDOUT: %G.type.d9e: type = fn_type @G.1 [concrete]
- // CHECK:STDOUT: %G.cd6: %G.type.d9e = struct_value () [concrete]
- // CHECK:STDOUT: %Self.as_type: type = facet_access_type %Self.fcb [symbolic]
- // CHECK:STDOUT: %pattern_type.76a: type = pattern_type %Self.as_type [symbolic]
- // CHECK:STDOUT: %C: type = class_type @C [concrete]
- // CHECK:STDOUT: %HasF.type: type = facet_type <@HasF> [concrete]
- // CHECK:STDOUT: %HasG.impl_witness: <witness> = impl_witness imports.%HasG.impl_witness_table [concrete]
- // CHECK:STDOUT: %HasG.facet: %HasG.type = facet_value %D, (%HasG.impl_witness) [concrete]
- // CHECK:STDOUT: %.132: type = fn_type_with_self_type %G.type.d9e, %HasG.facet [concrete]
- // CHECK:STDOUT: %G.type.405: type = fn_type @G.2 [concrete]
- // CHECK:STDOUT: %G.703: %G.type.405 = struct_value () [concrete]
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: imports {
- // CHECK:STDOUT: %Core: <namespace> = namespace file.%Core.import, [concrete] {
- // CHECK:STDOUT: import Core//prelude
- // CHECK:STDOUT: import Core//prelude/...
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %PackageB: <namespace> = namespace file.%PackageB.import, [concrete] {
- // CHECK:STDOUT: .D = %PackageB.D
- // CHECK:STDOUT: .HasG = %PackageB.HasG
- // CHECK:STDOUT: import PackageB//default
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %PackageB.D: type = import_ref PackageB//default, D, loaded [concrete = constants.%D]
- // CHECK:STDOUT: %PackageB.import_ref.8f2: <witness> = import_ref PackageB//default, loc10_10, loaded [concrete = constants.%complete_type]
- // CHECK:STDOUT: %PackageB.import_ref.cab = import_ref PackageB//default, inst45 [no loc], unloaded
- // CHECK:STDOUT: %PackageB.HasG: type = import_ref PackageB//default, HasG, loaded [concrete = constants.%HasG.type]
- // CHECK:STDOUT: %PackageB.import_ref.5d8 = import_ref PackageB//default, inst21 [no loc], unloaded
- // CHECK:STDOUT: %PackageB.import_ref.6c2: %HasG.assoc_type = import_ref PackageB//default, loc7_21, loaded [concrete = constants.%assoc0]
- // CHECK:STDOUT: %PackageB.G = import_ref PackageB//default, G, unloaded
- // CHECK:STDOUT: %PackageB.import_ref.70a: %G.type.d9e = import_ref PackageB//default, loc7_21, loaded [concrete = constants.%G.cd6]
- // CHECK:STDOUT: %PackageB.import_ref.ef5: %HasG.type = import_ref PackageB//default, inst21 [no loc], loaded [symbolic = constants.%Self.fcb]
- // CHECK:STDOUT: %PackageB.import_ref.ea7 = import_ref PackageB//default, loc13_25, unloaded
- // CHECK:STDOUT: %PackageB.import_ref.8db: <witness> = import_ref PackageB//default, inst54 [indirect], loaded [concrete = constants.%complete_type]
- // CHECK:STDOUT: %PackageB.import_ref.6a9 = import_ref PackageB//default, inst55 [indirect], unloaded
- // CHECK:STDOUT: %PackageB.import_ref.dfb: type = import_ref PackageB//default, loc13_14, loaded [concrete = constants.%C]
- // CHECK:STDOUT: %PackageB.import_ref.cee586.1: type = import_ref PackageB//default, loc13_20, loaded [concrete = constants.%HasG.type]
- // CHECK:STDOUT: %PackageB.import_ref.96f = import_ref PackageB//default, inst80 [indirect], unloaded
- // CHECK:STDOUT: %PackageB.import_ref.a0b = import_ref PackageB//default, inst81 [indirect], unloaded
- // CHECK:STDOUT: %PackageB.F = import_ref PackageB//default, F, unloaded
- // CHECK:STDOUT: %PackageB.import_ref.5ba = import_ref PackageB//default, loc18_25, unloaded
- // CHECK:STDOUT: %PackageB.import_ref.aa9f8a.1: type = import_ref PackageB//default, loc18_6, loaded [concrete = constants.%D]
- // CHECK:STDOUT: %PackageB.import_ref.831: type = import_ref PackageB//default, loc18_19, loaded [concrete = constants.%HasF.type]
- // CHECK:STDOUT: %PackageB.import_ref.bb9: <witness> = import_ref PackageB//default, loc23_16, loaded [concrete = constants.%HasG.impl_witness]
- // CHECK:STDOUT: %PackageB.import_ref.aa9f8a.2: type = import_ref PackageB//default, loc23_6, loaded [concrete = constants.%D]
- // CHECK:STDOUT: %PackageB.import_ref.cee586.2: type = import_ref PackageB//default, loc23_11, loaded [concrete = constants.%HasG.type]
- // CHECK:STDOUT: %PackageB.import_ref.b0a: %G.type.405 = import_ref PackageB//default, loc24_22, loaded [concrete = constants.%G.703]
- // CHECK:STDOUT: %HasG.impl_witness_table = impl_witness_table (%PackageB.import_ref.b0a), @impl.47e [concrete]
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: file {
- // CHECK:STDOUT: package: <namespace> = namespace [concrete] {
- // CHECK:STDOUT: .Core = imports.%Core
- // CHECK:STDOUT: .PackageB = imports.%PackageB
- // CHECK:STDOUT: .TestDG = %TestDG.decl
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %Core.import = import Core
- // CHECK:STDOUT: %PackageB.import = import PackageB
- // CHECK:STDOUT: %TestDG.decl: %TestDG.type = fn_decl @TestDG [concrete = constants.%TestDG] {
- // CHECK:STDOUT: %d.patt: %pattern_type.f09 = binding_pattern d [concrete]
- // CHECK:STDOUT: %d.param_patt: %pattern_type.f09 = value_param_pattern %d.patt, call_param0 [concrete]
- // CHECK:STDOUT: } {
- // CHECK:STDOUT: %d.param: %D = value_param call_param0
- // CHECK:STDOUT: %.loc6: type = splice_block %D.ref [concrete = constants.%D] {
- // CHECK:STDOUT: %PackageB.ref.loc6: <namespace> = name_ref PackageB, imports.%PackageB [concrete = imports.%PackageB]
- // CHECK:STDOUT: %D.ref: type = name_ref D, imports.%PackageB.D [concrete = constants.%D]
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %d: %D = bind_name d, %d.param
- // CHECK:STDOUT: }
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: interface @HasG [from "package_b.carbon"] {
- // CHECK:STDOUT: !members:
- // CHECK:STDOUT: .Self = imports.%PackageB.import_ref.5d8
- // CHECK:STDOUT: .G = imports.%PackageB.import_ref.6c2
- // CHECK:STDOUT: witness = (imports.%PackageB.G)
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: interface @HasF [from "package_b.carbon"] {
- // CHECK:STDOUT: !members:
- // CHECK:STDOUT: .Self = imports.%PackageB.import_ref.96f
- // CHECK:STDOUT: .F = imports.%PackageB.import_ref.a0b
- // CHECK:STDOUT: witness = (imports.%PackageB.F)
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: impl @impl.162: imports.%PackageB.import_ref.dfb as imports.%PackageB.import_ref.cee586.1 [from "package_b.carbon"] {
- // CHECK:STDOUT: !members:
- // CHECK:STDOUT: witness = imports.%PackageB.import_ref.ea7
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: impl @impl.5f1: imports.%PackageB.import_ref.aa9f8a.1 as imports.%PackageB.import_ref.831 [from "package_b.carbon"] {
- // CHECK:STDOUT: !members:
- // CHECK:STDOUT: witness = imports.%PackageB.import_ref.5ba
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: impl @impl.47e: imports.%PackageB.import_ref.aa9f8a.2 as imports.%PackageB.import_ref.cee586.2 [from "package_b.carbon"] {
- // CHECK:STDOUT: !members:
- // CHECK:STDOUT: witness = imports.%PackageB.import_ref.bb9
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: class @D [from "package_b.carbon"] {
- // CHECK:STDOUT: complete_type_witness = imports.%PackageB.import_ref.8f2
- // CHECK:STDOUT:
- // CHECK:STDOUT: !members:
- // CHECK:STDOUT: .Self = imports.%PackageB.import_ref.cab
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: class @C [from "package_b.carbon"] {
- // CHECK:STDOUT: complete_type_witness = imports.%PackageB.import_ref.8db
- // CHECK:STDOUT:
- // CHECK:STDOUT: !members:
- // CHECK:STDOUT: .Self = imports.%PackageB.import_ref.6a9
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: fn @TestDG(%d.param: %D) {
- // CHECK:STDOUT: !entry:
- // CHECK:STDOUT: %d.ref: %D = name_ref d, %d
- // CHECK:STDOUT: %PackageB.ref.loc7: <namespace> = name_ref PackageB, imports.%PackageB [concrete = imports.%PackageB]
- // CHECK:STDOUT: %HasG.ref: type = name_ref HasG, imports.%PackageB.HasG [concrete = constants.%HasG.type]
- // CHECK:STDOUT: %G.ref: %HasG.assoc_type = name_ref G, imports.%PackageB.import_ref.6c2 [concrete = constants.%assoc0]
- // CHECK:STDOUT: %impl.elem0: %.132 = impl_witness_access constants.%HasG.impl_witness, element0 [concrete = constants.%G.703]
- // CHECK:STDOUT: %bound_method: <bound method> = bound_method %d.ref, %impl.elem0
- // CHECK:STDOUT: %G.call: init %empty_tuple.type = call %bound_method(%d.ref)
- // CHECK:STDOUT: return
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: generic fn @G.1(imports.%PackageB.import_ref.ef5: %HasG.type) [from "package_b.carbon"] {
- // CHECK:STDOUT: %Self: %HasG.type = bind_symbolic_name Self, 0 [symbolic = %Self (constants.%Self.fcb)]
- // CHECK:STDOUT: %Self.as_type: type = facet_access_type %Self [symbolic = %Self.as_type (constants.%Self.as_type)]
- // CHECK:STDOUT: %pattern_type: type = pattern_type %Self.as_type [symbolic = %pattern_type (constants.%pattern_type.76a)]
- // CHECK:STDOUT:
- // CHECK:STDOUT: fn;
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: fn @G.2 [from "package_b.carbon"];
- // CHECK:STDOUT:
- // CHECK:STDOUT: specific @G.1(constants.%Self.fcb) {
- // CHECK:STDOUT: %Self => constants.%Self.fcb
- // CHECK:STDOUT: %Self.as_type => constants.%Self.as_type
- // CHECK:STDOUT: %pattern_type => constants.%pattern_type.76a
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: --- associated_interface.carbon
- // CHECK:STDOUT:
- // CHECK:STDOUT: constants {
- // CHECK:STDOUT: %Z.type: type = facet_type <@Z> [concrete]
- // CHECK:STDOUT: %Self: %Z.type = bind_symbolic_name Self, 0 [symbolic]
- // CHECK:STDOUT: %Self.as_type: type = facet_access_type %Self [symbolic]
- // CHECK:STDOUT: %pattern_type.a40: type = pattern_type %Self.as_type [symbolic]
- // CHECK:STDOUT: %H.type.474: type = fn_type @H.1 [concrete]
- // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete]
- // CHECK:STDOUT: %H.c1d: %H.type.474 = struct_value () [concrete]
- // CHECK:STDOUT: %Z.assoc_type: type = assoc_entity_type @Z [concrete]
- // CHECK:STDOUT: %assoc0: %Z.assoc_type = assoc_entity element0, @Z.%H.decl [concrete]
- // CHECK:STDOUT: %Z.impl_witness: <witness> = impl_witness file.%Z.impl_witness_table [concrete]
- // CHECK:STDOUT: %pattern_type.cb1: type = pattern_type %empty_tuple.type [concrete]
- // CHECK:STDOUT: %H.type.707: type = fn_type @H.2 [concrete]
- // CHECK:STDOUT: %H.8d7: %H.type.707 = struct_value () [concrete]
- // CHECK:STDOUT: %Z.facet: %Z.type = facet_value %empty_tuple.type, (%Z.impl_witness) [concrete]
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: imports {
- // CHECK:STDOUT: %Core: <namespace> = namespace file.%Core.import, [concrete] {
- // CHECK:STDOUT: import Core//prelude
- // CHECK:STDOUT: import Core//prelude/...
- // CHECK:STDOUT: }
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: file {
- // CHECK:STDOUT: package: <namespace> = namespace [concrete] {
- // CHECK:STDOUT: .Core = imports.%Core
- // CHECK:STDOUT: .Z = %Z.decl
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %Core.import = import Core
- // CHECK:STDOUT: %Z.decl: type = interface_decl @Z [concrete = constants.%Z.type] {} {}
- // CHECK:STDOUT: impl_decl @impl [concrete] {} {
- // CHECK:STDOUT: %.loc8_7.1: %empty_tuple.type = tuple_literal ()
- // CHECK:STDOUT: %.loc8_7.2: type = converted %.loc8_7.1, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type]
- // CHECK:STDOUT: %Z.ref: type = name_ref Z, file.%Z.decl [concrete = constants.%Z.type]
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %Z.impl_witness_table = impl_witness_table (@impl.%H.decl), @impl [concrete]
- // CHECK:STDOUT: %Z.impl_witness: <witness> = impl_witness %Z.impl_witness_table [concrete = constants.%Z.impl_witness]
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: interface @Z {
- // CHECK:STDOUT: %Self: %Z.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self]
- // CHECK:STDOUT: %H.decl: %H.type.474 = fn_decl @H.1 [concrete = constants.%H.c1d] {
- // CHECK:STDOUT: %self.patt: @H.1.%pattern_type (%pattern_type.a40) = binding_pattern self [concrete]
- // CHECK:STDOUT: %self.param_patt: @H.1.%pattern_type (%pattern_type.a40) = value_param_pattern %self.patt, call_param0 [concrete]
- // CHECK:STDOUT: } {
- // CHECK:STDOUT: %self.param: @H.1.%Self.as_type.loc5_14.1 (%Self.as_type) = value_param call_param0
- // CHECK:STDOUT: %.loc5_14.1: type = splice_block %.loc5_14.2 [symbolic = %Self.as_type.loc5_14.1 (constants.%Self.as_type)] {
- // CHECK:STDOUT: %Self.ref: %Z.type = name_ref Self, @Z.%Self [symbolic = %Self (constants.%Self)]
- // CHECK:STDOUT: %Self.as_type.loc5_14.2: type = facet_access_type %Self.ref [symbolic = %Self.as_type.loc5_14.1 (constants.%Self.as_type)]
- // CHECK:STDOUT: %.loc5_14.2: type = converted %Self.ref, %Self.as_type.loc5_14.2 [symbolic = %Self.as_type.loc5_14.1 (constants.%Self.as_type)]
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %self: @H.1.%Self.as_type.loc5_14.1 (%Self.as_type) = bind_name self, %self.param
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %assoc0: %Z.assoc_type = assoc_entity element0, %H.decl [concrete = constants.%assoc0]
- // CHECK:STDOUT:
- // CHECK:STDOUT: !members:
- // CHECK:STDOUT: .Self = %Self
- // CHECK:STDOUT: .H = %assoc0
- // CHECK:STDOUT: witness = (%H.decl)
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: impl @impl: %.loc8_7.2 as %Z.ref {
- // CHECK:STDOUT: %H.decl: %H.type.707 = fn_decl @H.2 [concrete = constants.%H.8d7] {
- // CHECK:STDOUT: %self.patt: %pattern_type.cb1 = binding_pattern self [concrete]
- // CHECK:STDOUT: %self.param_patt: %pattern_type.cb1 = value_param_pattern %self.patt, call_param0 [concrete]
- // CHECK:STDOUT: } {
- // CHECK:STDOUT: %self.param: %empty_tuple.type = value_param call_param0
- // CHECK:STDOUT: %Self.ref: type = name_ref Self, @impl.%.loc8_7.2 [concrete = constants.%empty_tuple.type]
- // CHECK:STDOUT: %self: %empty_tuple.type = bind_name self, %self.param
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: !members:
- // CHECK:STDOUT: .H = %H.decl
- // CHECK:STDOUT: witness = file.%Z.impl_witness
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: generic fn @H.1(@Z.%Self: %Z.type) {
- // CHECK:STDOUT: %Self: %Z.type = bind_symbolic_name Self, 0 [symbolic = %Self (constants.%Self)]
- // CHECK:STDOUT: %Self.as_type.loc5_14.1: type = facet_access_type %Self [symbolic = %Self.as_type.loc5_14.1 (constants.%Self.as_type)]
- // CHECK:STDOUT: %pattern_type: type = pattern_type %Self.as_type.loc5_14.1 [symbolic = %pattern_type (constants.%pattern_type.a40)]
- // CHECK:STDOUT:
- // CHECK:STDOUT: fn(%self.param: @H.1.%Self.as_type.loc5_14.1 (%Self.as_type));
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: fn @H.2(%self.param: %empty_tuple.type) {
- // CHECK:STDOUT: !entry:
- // CHECK:STDOUT: return
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: specific @H.1(constants.%Self) {
- // CHECK:STDOUT: %Self => constants.%Self
- // CHECK:STDOUT: %Self.as_type.loc5_14.1 => constants.%Self.as_type
- // CHECK:STDOUT: %pattern_type => constants.%pattern_type.a40
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: specific @H.1(constants.%Z.facet) {
- // CHECK:STDOUT: %Self => constants.%Z.facet
- // CHECK:STDOUT: %Self.as_type.loc5_14.1 => constants.%empty_tuple.type
- // CHECK:STDOUT: %pattern_type => constants.%pattern_type.cb1
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: --- import_associated_interface.carbon
- // CHECK:STDOUT:
- // CHECK:STDOUT: constants {
- // CHECK:STDOUT: %J.type: type = fn_type @J [concrete]
- // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete]
- // CHECK:STDOUT: %J: %J.type = struct_value () [concrete]
- // CHECK:STDOUT: %Z.type: type = facet_type <@Z> [concrete]
- // CHECK:STDOUT: %Self: %Z.type = bind_symbolic_name Self, 0 [symbolic]
- // CHECK:STDOUT: %Z.assoc_type: type = assoc_entity_type @Z [concrete]
- // CHECK:STDOUT: %assoc0: %Z.assoc_type = assoc_entity element0, imports.%PackageAssociatedInterface.import_ref.250 [concrete]
- // CHECK:STDOUT: %H.type.386: type = fn_type @H.1 [concrete]
- // CHECK:STDOUT: %H.246: %H.type.386 = struct_value () [concrete]
- // CHECK:STDOUT: %Self.as_type: type = facet_access_type %Self [symbolic]
- // CHECK:STDOUT: %pattern_type.75f: type = pattern_type %Self.as_type [symbolic]
- // CHECK:STDOUT: %Z.impl_witness: <witness> = impl_witness imports.%Z.impl_witness_table [concrete]
- // CHECK:STDOUT: %Z.facet: %Z.type = facet_value %empty_tuple.type, (%Z.impl_witness) [concrete]
- // CHECK:STDOUT: %.7f5: type = fn_type_with_self_type %H.type.386, %Z.facet [concrete]
- // CHECK:STDOUT: %H.type.ab3: type = fn_type @H.2 [concrete]
- // CHECK:STDOUT: %H.c25: %H.type.ab3 = struct_value () [concrete]
- // CHECK:STDOUT: %empty_tuple: %empty_tuple.type = tuple_value () [concrete]
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: imports {
- // CHECK:STDOUT: %Core: <namespace> = namespace file.%Core.import, [concrete] {
- // CHECK:STDOUT: import Core//prelude
- // CHECK:STDOUT: import Core//prelude/...
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %PackageAssociatedInterface: <namespace> = namespace file.%PackageAssociatedInterface.import, [concrete] {
- // CHECK:STDOUT: .Z = %PackageAssociatedInterface.Z
- // CHECK:STDOUT: import PackageAssociatedInterface//default
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %PackageAssociatedInterface.Z: type = import_ref PackageAssociatedInterface//default, Z, loaded [concrete = constants.%Z.type]
- // CHECK:STDOUT: %PackageAssociatedInterface.import_ref.f88 = import_ref PackageAssociatedInterface//default, inst19 [no loc], unloaded
- // CHECK:STDOUT: %PackageAssociatedInterface.import_ref.609: %Z.assoc_type = import_ref PackageAssociatedInterface//default, loc5_21, loaded [concrete = constants.%assoc0]
- // CHECK:STDOUT: %PackageAssociatedInterface.H = import_ref PackageAssociatedInterface//default, H, unloaded
- // CHECK:STDOUT: %PackageAssociatedInterface.import_ref.250: %H.type.386 = import_ref PackageAssociatedInterface//default, loc5_21, loaded [concrete = constants.%H.246]
- // CHECK:STDOUT: %PackageAssociatedInterface.import_ref.d26: %Z.type = import_ref PackageAssociatedInterface//default, inst19 [no loc], loaded [symbolic = constants.%Self]
- // CHECK:STDOUT: %PackageAssociatedInterface.import_ref.d8c: <witness> = import_ref PackageAssociatedInterface//default, loc8_14, loaded [concrete = constants.%Z.impl_witness]
- // CHECK:STDOUT: %PackageAssociatedInterface.import_ref.e5c: type = import_ref PackageAssociatedInterface//default, loc8_7, loaded [concrete = constants.%empty_tuple.type]
- // CHECK:STDOUT: %PackageAssociatedInterface.import_ref.df1: type = import_ref PackageAssociatedInterface//default, loc8_12, loaded [concrete = constants.%Z.type]
- // CHECK:STDOUT: %PackageAssociatedInterface.import_ref.6d7: %H.type.ab3 = import_ref PackageAssociatedInterface//default, loc9_22, loaded [concrete = constants.%H.c25]
- // CHECK:STDOUT: %Z.impl_witness_table = impl_witness_table (%PackageAssociatedInterface.import_ref.6d7), @impl [concrete]
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: file {
- // CHECK:STDOUT: package: <namespace> = namespace [concrete] {
- // CHECK:STDOUT: .Core = imports.%Core
- // CHECK:STDOUT: .PackageAssociatedInterface = imports.%PackageAssociatedInterface
- // CHECK:STDOUT: .J = %J.decl
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %Core.import = import Core
- // CHECK:STDOUT: %PackageAssociatedInterface.import = import PackageAssociatedInterface
- // CHECK:STDOUT: %J.decl: %J.type = fn_decl @J [concrete = constants.%J] {} {}
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: interface @Z [from "associated_interface.carbon"] {
- // CHECK:STDOUT: !members:
- // CHECK:STDOUT: .Self = imports.%PackageAssociatedInterface.import_ref.f88
- // CHECK:STDOUT: .H = imports.%PackageAssociatedInterface.import_ref.609
- // CHECK:STDOUT: witness = (imports.%PackageAssociatedInterface.H)
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: impl @impl: imports.%PackageAssociatedInterface.import_ref.e5c as imports.%PackageAssociatedInterface.import_ref.df1 [from "associated_interface.carbon"] {
- // CHECK:STDOUT: !members:
- // CHECK:STDOUT: witness = imports.%PackageAssociatedInterface.import_ref.d8c
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: fn @J() {
- // CHECK:STDOUT: !entry:
- // CHECK:STDOUT: %.loc7_4.1: %empty_tuple.type = tuple_literal ()
- // CHECK:STDOUT: %PackageAssociatedInterface.ref: <namespace> = name_ref PackageAssociatedInterface, imports.%PackageAssociatedInterface [concrete = imports.%PackageAssociatedInterface]
- // CHECK:STDOUT: %Z.ref: type = name_ref Z, imports.%PackageAssociatedInterface.Z [concrete = constants.%Z.type]
- // CHECK:STDOUT: %H.ref: %Z.assoc_type = name_ref H, imports.%PackageAssociatedInterface.import_ref.609 [concrete = constants.%assoc0]
- // CHECK:STDOUT: %impl.elem0: %.7f5 = impl_witness_access constants.%Z.impl_witness, element0 [concrete = constants.%H.c25]
- // CHECK:STDOUT: %bound_method: <bound method> = bound_method %.loc7_4.1, %impl.elem0
- // CHECK:STDOUT: %empty_tuple: %empty_tuple.type = tuple_value () [concrete = constants.%empty_tuple]
- // CHECK:STDOUT: %.loc7_4.2: %empty_tuple.type = converted %.loc7_4.1, %empty_tuple [concrete = constants.%empty_tuple]
- // CHECK:STDOUT: %H.call: init %empty_tuple.type = call %bound_method(%.loc7_4.2)
- // CHECK:STDOUT: return
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: generic fn @H.1(imports.%PackageAssociatedInterface.import_ref.d26: %Z.type) [from "associated_interface.carbon"] {
- // CHECK:STDOUT: %Self: %Z.type = bind_symbolic_name Self, 0 [symbolic = %Self (constants.%Self)]
- // CHECK:STDOUT: %Self.as_type: type = facet_access_type %Self [symbolic = %Self.as_type (constants.%Self.as_type)]
- // CHECK:STDOUT: %pattern_type: type = pattern_type %Self.as_type [symbolic = %pattern_type (constants.%pattern_type.75f)]
- // CHECK:STDOUT:
- // CHECK:STDOUT: fn;
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: fn @H.2 [from "associated_interface.carbon"];
- // CHECK:STDOUT:
- // CHECK:STDOUT: specific @H.1(constants.%Self) {
- // CHECK:STDOUT: %Self => constants.%Self
- // CHECK:STDOUT: %Self.as_type => constants.%Self.as_type
- // CHECK:STDOUT: %pattern_type => constants.%pattern_type.75f
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: --- has_param.carbon
- // CHECK:STDOUT:
- // CHECK:STDOUT: constants {
- // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic]
- // CHECK:STDOUT: %pattern_type.98f: type = pattern_type type [concrete]
- // CHECK:STDOUT: %X: %T = bind_symbolic_name X, 1 [symbolic]
- // CHECK:STDOUT: %pattern_type.7dc: type = pattern_type %T [symbolic]
- // CHECK:STDOUT: %AnyParam.type: type = generic_class_type @AnyParam [concrete]
- // CHECK:STDOUT: %AnyParam.generic: %AnyParam.type = struct_value () [concrete]
- // CHECK:STDOUT: %AnyParam: type = class_type @AnyParam, @AnyParam(%T, %X) [symbolic]
- // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete]
- // CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %empty_struct_type [concrete]
- // CHECK:STDOUT: %Y.type: type = facet_type <@Y> [concrete]
- // CHECK:STDOUT: %Self: %Y.type = bind_symbolic_name Self, 0 [symbolic]
- // CHECK:STDOUT: %Self.as_type: type = facet_access_type %Self [symbolic]
- // CHECK:STDOUT: %pattern_type.f04: type = pattern_type %Self.as_type [symbolic]
- // CHECK:STDOUT: %K.type: type = fn_type @K [concrete]
- // CHECK:STDOUT: %K: %K.type = struct_value () [concrete]
- // CHECK:STDOUT: %Y.assoc_type: type = assoc_entity_type @Y [concrete]
- // CHECK:STDOUT: %assoc0: %Y.assoc_type = assoc_entity element0, @Y.%K.decl [concrete]
- // CHECK:STDOUT: %require_complete: <witness> = require_complete_type %Self.as_type [symbolic]
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: imports {
- // CHECK:STDOUT: %Core: <namespace> = namespace file.%Core.import, [concrete] {
- // CHECK:STDOUT: import Core//prelude
- // CHECK:STDOUT: import Core//prelude/...
- // CHECK:STDOUT: }
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: file {
- // CHECK:STDOUT: package: <namespace> = namespace [concrete] {
- // CHECK:STDOUT: .Core = imports.%Core
- // CHECK:STDOUT: .AnyParam = %AnyParam.decl
- // CHECK:STDOUT: .Y = %Y.decl
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %Core.import = import Core
- // CHECK:STDOUT: %AnyParam.decl: %AnyParam.type = class_decl @AnyParam [concrete = constants.%AnyParam.generic] {
- // CHECK:STDOUT: %T.patt: %pattern_type.98f = symbolic_binding_pattern T, 0 [concrete]
- // CHECK:STDOUT: %X.patt: @AnyParam.%pattern_type (%pattern_type.7dc) = symbolic_binding_pattern X, 1 [concrete]
- // CHECK:STDOUT: } {
- // CHECK:STDOUT: %T.loc4_16.1: type = bind_symbolic_name T, 0 [symbolic = %T.loc4_16.2 (constants.%T)]
- // CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc4_16.1 [symbolic = %T.loc4_16.2 (constants.%T)]
- // CHECK:STDOUT: %X.loc4_26.1: @AnyParam.%T.loc4_16.2 (%T) = bind_symbolic_name X, 1 [symbolic = %X.loc4_26.2 (constants.%X)]
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %Y.decl: type = interface_decl @Y [concrete = constants.%Y.type] {} {}
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: interface @Y {
- // CHECK:STDOUT: %Self: %Y.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self]
- // CHECK:STDOUT: %K.decl: %K.type = fn_decl @K [concrete = constants.%K] {
- // CHECK:STDOUT: %self.patt: @K.%pattern_type (%pattern_type.f04) = binding_pattern self [concrete]
- // CHECK:STDOUT: %self.param_patt: @K.%pattern_type (%pattern_type.f04) = value_param_pattern %self.patt, call_param0 [concrete]
- // CHECK:STDOUT: } {
- // CHECK:STDOUT: %self.param: @K.%Self.as_type.loc7_14.1 (%Self.as_type) = value_param call_param0
- // CHECK:STDOUT: %.loc7_14.1: type = splice_block %.loc7_14.2 [symbolic = %Self.as_type.loc7_14.1 (constants.%Self.as_type)] {
- // CHECK:STDOUT: %Self.ref: %Y.type = name_ref Self, @Y.%Self [symbolic = %Self (constants.%Self)]
- // CHECK:STDOUT: %Self.as_type.loc7_14.2: type = facet_access_type %Self.ref [symbolic = %Self.as_type.loc7_14.1 (constants.%Self.as_type)]
- // CHECK:STDOUT: %.loc7_14.2: type = converted %Self.ref, %Self.as_type.loc7_14.2 [symbolic = %Self.as_type.loc7_14.1 (constants.%Self.as_type)]
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %self: @K.%Self.as_type.loc7_14.1 (%Self.as_type) = bind_name self, %self.param
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %assoc0: %Y.assoc_type = assoc_entity element0, %K.decl [concrete = constants.%assoc0]
- // CHECK:STDOUT:
- // CHECK:STDOUT: !members:
- // CHECK:STDOUT: .Self = %Self
- // CHECK:STDOUT: .K = %assoc0
- // CHECK:STDOUT: witness = (%K.decl)
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: generic class @AnyParam(%T.loc4_16.1: type, %X.loc4_26.1: @AnyParam.%T.loc4_16.2 (%T)) {
- // CHECK:STDOUT: %T.loc4_16.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc4_16.2 (constants.%T)]
- // CHECK:STDOUT: %X.loc4_26.2: @AnyParam.%T.loc4_16.2 (%T) = bind_symbolic_name X, 1 [symbolic = %X.loc4_26.2 (constants.%X)]
- // CHECK:STDOUT: %pattern_type: type = pattern_type %T.loc4_16.2 [symbolic = %pattern_type (constants.%pattern_type.7dc)]
- // CHECK:STDOUT:
- // CHECK:STDOUT: !definition:
- // CHECK:STDOUT:
- // CHECK:STDOUT: class {
- // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete = constants.%empty_struct_type]
- // CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %empty_struct_type [concrete = constants.%complete_type]
- // CHECK:STDOUT: complete_type_witness = %complete_type
- // CHECK:STDOUT:
- // CHECK:STDOUT: !members:
- // CHECK:STDOUT: .Self = constants.%AnyParam
- // CHECK:STDOUT: }
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: generic fn @K(@Y.%Self: %Y.type) {
- // CHECK:STDOUT: %Self: %Y.type = bind_symbolic_name Self, 0 [symbolic = %Self (constants.%Self)]
- // CHECK:STDOUT: %Self.as_type.loc7_14.1: type = facet_access_type %Self [symbolic = %Self.as_type.loc7_14.1 (constants.%Self.as_type)]
- // CHECK:STDOUT: %pattern_type: type = pattern_type %Self.as_type.loc7_14.1 [symbolic = %pattern_type (constants.%pattern_type.f04)]
- // CHECK:STDOUT:
- // CHECK:STDOUT: !definition:
- // CHECK:STDOUT: %require_complete: <witness> = require_complete_type %Self.as_type.loc7_14.1 [symbolic = %require_complete (constants.%require_complete)]
- // CHECK:STDOUT:
- // CHECK:STDOUT: fn(%self.param: @K.%Self.as_type.loc7_14.1 (%Self.as_type)) {
- // CHECK:STDOUT: !entry:
- // CHECK:STDOUT: return
- // CHECK:STDOUT: }
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: specific @AnyParam(constants.%T, constants.%X) {
- // CHECK:STDOUT: %T.loc4_16.2 => constants.%T
- // CHECK:STDOUT: %X.loc4_26.2 => constants.%X
- // CHECK:STDOUT: %pattern_type => constants.%pattern_type.7dc
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: specific @K(constants.%Self) {
- // CHECK:STDOUT: %Self => constants.%Self
- // CHECK:STDOUT: %Self.as_type.loc7_14.1 => constants.%Self.as_type
- // CHECK:STDOUT: %pattern_type => constants.%pattern_type.f04
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: --- has_generic_interface.carbon
- // CHECK:STDOUT:
- // CHECK:STDOUT: constants {
- // CHECK:STDOUT: %U: type = bind_symbolic_name U, 0 [symbolic]
- // CHECK:STDOUT: %pattern_type.98f: type = pattern_type type [concrete]
- // CHECK:STDOUT: %GenericInterface.type.c92: type = generic_interface_type @GenericInterface [concrete]
- // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete]
- // CHECK:STDOUT: %GenericInterface.generic: %GenericInterface.type.c92 = struct_value () [concrete]
- // CHECK:STDOUT: %GenericInterface.type.3fe: type = facet_type <@GenericInterface, @GenericInterface(%U)> [symbolic]
- // CHECK:STDOUT: %Self.a1c: %GenericInterface.type.3fe = bind_symbolic_name Self, 1 [symbolic]
- // CHECK:STDOUT: %AnyParam.type: type = generic_class_type @AnyParam [concrete]
- // CHECK:STDOUT: %AnyParam.generic: %AnyParam.type = struct_value () [concrete]
- // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete]
- // CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %empty_struct_type [concrete]
- // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic]
- // CHECK:STDOUT: %X: %T = bind_symbolic_name X, 1 [symbolic]
- // CHECK:STDOUT: %pattern_type.7dc: type = pattern_type %T [symbolic]
- // CHECK:STDOUT: %pattern_type.438: type = pattern_type %GenericInterface.type.c92 [concrete]
- // CHECK:STDOUT: %AnyParam.241: type = class_type @AnyParam, @AnyParam(%GenericInterface.type.c92, %GenericInterface.generic) [concrete]
- // CHECK:STDOUT: %Y.type: type = facet_type <@Y> [concrete]
- // CHECK:STDOUT: %Self.f64: %Y.type = bind_symbolic_name Self, 0 [symbolic]
- // CHECK:STDOUT: %K.type.311: type = fn_type @K.1 [concrete]
- // CHECK:STDOUT: %K.7a1: %K.type.311 = struct_value () [concrete]
- // CHECK:STDOUT: %Self.as_type.61d: type = facet_access_type %Self.f64 [symbolic]
- // CHECK:STDOUT: %pattern_type.cb4: type = pattern_type %Self.as_type.61d [symbolic]
- // CHECK:STDOUT: %require_complete.b14: <witness> = require_complete_type %Self.as_type.61d [symbolic]
- // CHECK:STDOUT: %Y.impl_witness: <witness> = impl_witness file.%Y.impl_witness_table [concrete]
- // CHECK:STDOUT: %pattern_type.004: type = pattern_type %AnyParam.241 [concrete]
- // CHECK:STDOUT: %K.type.dcd: type = fn_type @K.2 [concrete]
- // CHECK:STDOUT: %K.2e9: %K.type.dcd = struct_value () [concrete]
- // CHECK:STDOUT: %Y.facet: %Y.type = facet_value %AnyParam.241, (%Y.impl_witness) [concrete]
- // CHECK:STDOUT: %L.type: type = fn_type @L [concrete]
- // CHECK:STDOUT: %L: %L.type = struct_value () [concrete]
- // CHECK:STDOUT: %AnyParam.val: %AnyParam.241 = struct_value () [concrete]
- // CHECK:STDOUT: %Y.assoc_type: type = assoc_entity_type @Y [concrete]
- // CHECK:STDOUT: %assoc0.494: %Y.assoc_type = assoc_entity element0, imports.%PackageHasParam.import_ref.ce2 [concrete]
- // CHECK:STDOUT: %.0fb: type = fn_type_with_self_type %K.type.311, %Y.facet [concrete]
- // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete]
- // CHECK:STDOUT: %Op.type.bae: type = fn_type @Op.1 [concrete]
- // CHECK:STDOUT: %Op.type.bc9: type = fn_type @Op.2, @impl.49c(%T) [symbolic]
- // CHECK:STDOUT: %Op.46f: %Op.type.bc9 = struct_value () [symbolic]
- // CHECK:STDOUT: %Destroy.impl_witness.98b: <witness> = impl_witness imports.%Destroy.impl_witness_table, @impl.49c(%AnyParam.241) [concrete]
- // CHECK:STDOUT: %Op.type.5fc: type = fn_type @Op.2, @impl.49c(%AnyParam.241) [concrete]
- // CHECK:STDOUT: %Op.6f3: %Op.type.5fc = struct_value () [concrete]
- // CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %AnyParam.241, (%Destroy.impl_witness.98b) [concrete]
- // CHECK:STDOUT: %.644: type = fn_type_with_self_type %Op.type.bae, %Destroy.facet [concrete]
- // CHECK:STDOUT: %Op.specific_fn: <specific function> = specific_function %Op.6f3, @Op.2(%AnyParam.241) [concrete]
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: imports {
- // CHECK:STDOUT: %Core: <namespace> = namespace file.%Core.import, [concrete] {
- // CHECK:STDOUT: .Destroy = %Core.Destroy
- // CHECK:STDOUT: import Core//prelude
- // CHECK:STDOUT: import Core//prelude/...
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %PackageHasParam: <namespace> = namespace file.%PackageHasParam.import, [concrete] {
- // CHECK:STDOUT: .AnyParam = %PackageHasParam.AnyParam
- // CHECK:STDOUT: .Y = %PackageHasParam.Y
- // CHECK:STDOUT: import PackageHasParam//default
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %PackageHasParam.AnyParam: %AnyParam.type = import_ref PackageHasParam//default, AnyParam, loaded [concrete = constants.%AnyParam.generic]
- // CHECK:STDOUT: %PackageHasParam.import_ref.5ab: type = import_ref PackageHasParam//default, loc4_16, loaded [symbolic = @AnyParam.%T (constants.%T)]
- // CHECK:STDOUT: %PackageHasParam.import_ref.34c: @AnyParam.%T (%T) = import_ref PackageHasParam//default, loc4_26, loaded [symbolic = @AnyParam.%X (constants.%X)]
- // CHECK:STDOUT: %PackageHasParam.import_ref.8f2: <witness> = import_ref PackageHasParam//default, loc4_34, loaded [concrete = constants.%complete_type]
- // CHECK:STDOUT: %PackageHasParam.import_ref.601 = import_ref PackageHasParam//default, inst33 [no loc], unloaded
- // CHECK:STDOUT: %PackageHasParam.Y: type = import_ref PackageHasParam//default, Y, loaded [concrete = constants.%Y.type]
- // CHECK:STDOUT: %PackageHasParam.import_ref.dc1 = import_ref PackageHasParam//default, inst40 [no loc], unloaded
- // CHECK:STDOUT: %PackageHasParam.import_ref.f69: %Y.assoc_type = import_ref PackageHasParam//default, loc7_22, loaded [concrete = constants.%assoc0.494]
- // CHECK:STDOUT: %PackageHasParam.K: %K.type.311 = import_ref PackageHasParam//default, K, loaded [concrete = constants.%K.7a1]
- // CHECK:STDOUT: %PackageHasParam.import_ref.292: %Y.type = import_ref PackageHasParam//default, inst40 [no loc], loaded [symbolic = constants.%Self.f64]
- // CHECK:STDOUT: %PackageHasParam.import_ref.ce2: %K.type.311 = import_ref PackageHasParam//default, loc7_22, loaded [concrete = constants.%K.7a1]
- // CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type]
- // CHECK:STDOUT: %Core.import_ref.0b9: @impl.49c.%Op.type (%Op.type.bc9) = import_ref Core//prelude/parts/destroy, loc8_23, loaded [symbolic = @impl.49c.%Op (constants.%Op.46f)]
- // CHECK:STDOUT: %Destroy.impl_witness_table = impl_witness_table (%Core.import_ref.0b9), @impl.49c [concrete]
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: file {
- // CHECK:STDOUT: package: <namespace> = namespace [concrete] {
- // CHECK:STDOUT: .Core = imports.%Core
- // CHECK:STDOUT: .PackageHasParam = imports.%PackageHasParam
- // CHECK:STDOUT: .GenericInterface = %GenericInterface.decl
- // CHECK:STDOUT: .L = %L.decl
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %Core.import = import Core
- // CHECK:STDOUT: %PackageHasParam.import = import PackageHasParam
- // CHECK:STDOUT: %GenericInterface.decl: %GenericInterface.type.c92 = interface_decl @GenericInterface [concrete = constants.%GenericInterface.generic] {
- // CHECK:STDOUT: %U.patt: %pattern_type.98f = symbolic_binding_pattern U, 0 [concrete]
- // CHECK:STDOUT: } {
- // CHECK:STDOUT: %U.loc6_28.1: type = bind_symbolic_name U, 0 [symbolic = %U.loc6_28.2 (constants.%U)]
- // CHECK:STDOUT: }
- // CHECK:STDOUT: impl_decl @impl.dbd [concrete] {} {
- // CHECK:STDOUT: %PackageHasParam.ref.loc8_6: <namespace> = name_ref PackageHasParam, imports.%PackageHasParam [concrete = imports.%PackageHasParam]
- // CHECK:STDOUT: %AnyParam.ref: %AnyParam.type = name_ref AnyParam, imports.%PackageHasParam.AnyParam [concrete = constants.%AnyParam.generic]
- // CHECK:STDOUT: %GenericInterface.ref: %GenericInterface.type.c92 = name_ref GenericInterface, file.%GenericInterface.decl [concrete = constants.%GenericInterface.generic]
- // CHECK:STDOUT: %AnyParam: type = class_type @AnyParam, @AnyParam(constants.%GenericInterface.type.c92, constants.%GenericInterface.generic) [concrete = constants.%AnyParam.241]
- // CHECK:STDOUT: %PackageHasParam.ref.loc8_52: <namespace> = name_ref PackageHasParam, imports.%PackageHasParam [concrete = imports.%PackageHasParam]
- // CHECK:STDOUT: %Y.ref: type = name_ref Y, imports.%PackageHasParam.Y [concrete = constants.%Y.type]
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %Y.impl_witness_table = impl_witness_table (@impl.dbd.%K.decl), @impl.dbd [concrete]
- // CHECK:STDOUT: %Y.impl_witness: <witness> = impl_witness %Y.impl_witness_table [concrete = constants.%Y.impl_witness]
- // CHECK:STDOUT: %L.decl: %L.type = fn_decl @L [concrete = constants.%L] {} {}
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: generic interface @GenericInterface(%U.loc6_28.1: type) {
- // CHECK:STDOUT: %U.loc6_28.2: type = bind_symbolic_name U, 0 [symbolic = %U.loc6_28.2 (constants.%U)]
- // CHECK:STDOUT:
- // CHECK:STDOUT: !definition:
- // CHECK:STDOUT: %GenericInterface.type: type = facet_type <@GenericInterface, @GenericInterface(%U.loc6_28.2)> [symbolic = %GenericInterface.type (constants.%GenericInterface.type.3fe)]
- // CHECK:STDOUT: %Self.2: @GenericInterface.%GenericInterface.type (%GenericInterface.type.3fe) = bind_symbolic_name Self, 1 [symbolic = %Self.2 (constants.%Self.a1c)]
- // CHECK:STDOUT:
- // CHECK:STDOUT: interface {
- // CHECK:STDOUT: %Self.1: @GenericInterface.%GenericInterface.type (%GenericInterface.type.3fe) = bind_symbolic_name Self, 1 [symbolic = %Self.2 (constants.%Self.a1c)]
- // CHECK:STDOUT:
- // CHECK:STDOUT: !members:
- // CHECK:STDOUT: .Self = %Self.1
- // CHECK:STDOUT: witness = ()
- // CHECK:STDOUT: }
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: interface @Y [from "has_param.carbon"] {
- // CHECK:STDOUT: !members:
- // CHECK:STDOUT: .Self = imports.%PackageHasParam.import_ref.dc1
- // CHECK:STDOUT: .K = imports.%PackageHasParam.import_ref.f69
- // CHECK:STDOUT: witness = (imports.%PackageHasParam.K)
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: impl @impl.dbd: %AnyParam as %Y.ref {
- // CHECK:STDOUT: %K.decl: %K.type.dcd = fn_decl @K.2 [concrete = constants.%K.2e9] {
- // CHECK:STDOUT: %self.patt: %pattern_type.004 = binding_pattern self [concrete]
- // CHECK:STDOUT: %self.param_patt: %pattern_type.004 = value_param_pattern %self.patt, call_param0 [concrete]
- // CHECK:STDOUT: } {
- // CHECK:STDOUT: %self.param: %AnyParam.241 = value_param call_param0
- // CHECK:STDOUT: %Self.ref: type = name_ref Self, @impl.dbd.%AnyParam [concrete = constants.%AnyParam.241]
- // CHECK:STDOUT: %self: %AnyParam.241 = bind_name self, %self.param
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: !members:
- // CHECK:STDOUT: .K = %K.decl
- // CHECK:STDOUT: witness = file.%Y.impl_witness
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: generic class @AnyParam(imports.%PackageHasParam.import_ref.5ab: type, imports.%PackageHasParam.import_ref.34c: @AnyParam.%T (%T)) [from "has_param.carbon"] {
- // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic = %T (constants.%T)]
- // CHECK:STDOUT: %X: @AnyParam.%T (%T) = bind_symbolic_name X, 1 [symbolic = %X (constants.%X)]
- // CHECK:STDOUT: %pattern_type: type = pattern_type %T [symbolic = %pattern_type (constants.%pattern_type.7dc)]
- // CHECK:STDOUT:
- // CHECK:STDOUT: !definition:
- // CHECK:STDOUT:
- // CHECK:STDOUT: class {
- // CHECK:STDOUT: complete_type_witness = imports.%PackageHasParam.import_ref.8f2
- // CHECK:STDOUT:
- // CHECK:STDOUT: !members:
- // CHECK:STDOUT: .Self = imports.%PackageHasParam.import_ref.601
- // CHECK:STDOUT: }
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: generic fn @K.1(imports.%PackageHasParam.import_ref.292: %Y.type) [from "has_param.carbon"] {
- // CHECK:STDOUT: %Self: %Y.type = bind_symbolic_name Self, 0 [symbolic = %Self (constants.%Self.f64)]
- // CHECK:STDOUT: %Self.as_type: type = facet_access_type %Self [symbolic = %Self.as_type (constants.%Self.as_type.61d)]
- // CHECK:STDOUT: %pattern_type: type = pattern_type %Self.as_type [symbolic = %pattern_type (constants.%pattern_type.cb4)]
- // CHECK:STDOUT:
- // CHECK:STDOUT: !definition:
- // CHECK:STDOUT: %require_complete: <witness> = require_complete_type %Self.as_type [symbolic = %require_complete (constants.%require_complete.b14)]
- // CHECK:STDOUT:
- // CHECK:STDOUT: fn;
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: fn @K.2(%self.param: %AnyParam.241) {
- // CHECK:STDOUT: !entry:
- // CHECK:STDOUT: return
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: fn @L() {
- // CHECK:STDOUT: !entry:
- // CHECK:STDOUT: name_binding_decl {
- // CHECK:STDOUT: %obj.patt: %pattern_type.004 = binding_pattern obj [concrete]
- // CHECK:STDOUT: %obj.var_patt: %pattern_type.004 = var_pattern %obj.patt [concrete]
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %obj.var: ref %AnyParam.241 = var %obj.var_patt
- // CHECK:STDOUT: %.loc13_58.1: %empty_struct_type = struct_literal ()
- // CHECK:STDOUT: %.loc13_58.2: init %AnyParam.241 = class_init (), %obj.var [concrete = constants.%AnyParam.val]
- // CHECK:STDOUT: %.loc13_3.1: init %AnyParam.241 = converted %.loc13_58.1, %.loc13_58.2 [concrete = constants.%AnyParam.val]
- // CHECK:STDOUT: assign %obj.var, %.loc13_3.1
- // CHECK:STDOUT: %.loc13_53: type = splice_block %AnyParam [concrete = constants.%AnyParam.241] {
- // CHECK:STDOUT: %PackageHasParam.ref.loc13: <namespace> = name_ref PackageHasParam, imports.%PackageHasParam [concrete = imports.%PackageHasParam]
- // CHECK:STDOUT: %AnyParam.ref: %AnyParam.type = name_ref AnyParam, imports.%PackageHasParam.AnyParam [concrete = constants.%AnyParam.generic]
- // CHECK:STDOUT: %GenericInterface.ref: %GenericInterface.type.c92 = name_ref GenericInterface, file.%GenericInterface.decl [concrete = constants.%GenericInterface.generic]
- // CHECK:STDOUT: %AnyParam: type = class_type @AnyParam, @AnyParam(constants.%GenericInterface.type.c92, constants.%GenericInterface.generic) [concrete = constants.%AnyParam.241]
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %obj: ref %AnyParam.241 = bind_name obj, %obj.var
- // CHECK:STDOUT: %obj.ref: ref %AnyParam.241 = name_ref obj, %obj
- // CHECK:STDOUT: %PackageHasParam.ref.loc14: <namespace> = name_ref PackageHasParam, imports.%PackageHasParam [concrete = imports.%PackageHasParam]
- // CHECK:STDOUT: %Y.ref: type = name_ref Y, imports.%PackageHasParam.Y [concrete = constants.%Y.type]
- // CHECK:STDOUT: %K.ref: %Y.assoc_type = name_ref K, imports.%PackageHasParam.import_ref.f69 [concrete = constants.%assoc0.494]
- // CHECK:STDOUT: %impl.elem0.loc14: %.0fb = impl_witness_access constants.%Y.impl_witness, element0 [concrete = constants.%K.2e9]
- // CHECK:STDOUT: %bound_method.loc14: <bound method> = bound_method %obj.ref, %impl.elem0.loc14
- // CHECK:STDOUT: %.loc14: %AnyParam.241 = bind_value %obj.ref
- // CHECK:STDOUT: %K.call: init %empty_tuple.type = call %bound_method.loc14(%.loc14)
- // CHECK:STDOUT: %impl.elem0.loc13: %.644 = impl_witness_access constants.%Destroy.impl_witness.98b, element0 [concrete = constants.%Op.6f3]
- // CHECK:STDOUT: %bound_method.loc13_3.1: <bound method> = bound_method %obj.var, %impl.elem0.loc13
- // CHECK:STDOUT: %specific_fn: <specific function> = specific_function %impl.elem0.loc13, @Op.2(constants.%AnyParam.241) [concrete = constants.%Op.specific_fn]
- // CHECK:STDOUT: %bound_method.loc13_3.2: <bound method> = bound_method %obj.var, %specific_fn
- // CHECK:STDOUT: %.loc13_3.2: %AnyParam.241 = bind_value %obj.var
- // CHECK:STDOUT: %no_op: init %empty_tuple.type = call %bound_method.loc13_3.2(%.loc13_3.2)
- // CHECK:STDOUT: return
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: specific @GenericInterface(constants.%U) {
- // CHECK:STDOUT: %U.loc6_28.2 => constants.%U
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: specific @AnyParam(constants.%T, constants.%X) {
- // CHECK:STDOUT: %T => constants.%T
- // CHECK:STDOUT: %X => constants.%X
- // CHECK:STDOUT: %pattern_type => constants.%pattern_type.7dc
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: specific @AnyParam(constants.%GenericInterface.type.c92, constants.%GenericInterface.generic) {
- // CHECK:STDOUT: %T => constants.%GenericInterface.type.c92
- // CHECK:STDOUT: %X => constants.%GenericInterface.generic
- // CHECK:STDOUT: %pattern_type => constants.%pattern_type.438
- // CHECK:STDOUT:
- // CHECK:STDOUT: !definition:
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: specific @K.1(constants.%Self.f64) {
- // CHECK:STDOUT: %Self => constants.%Self.f64
- // CHECK:STDOUT: %Self.as_type => constants.%Self.as_type.61d
- // CHECK:STDOUT: %pattern_type => constants.%pattern_type.cb4
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: specific @K.1(constants.%Y.facet) {
- // CHECK:STDOUT: %Self => constants.%Y.facet
- // CHECK:STDOUT: %Self.as_type => constants.%AnyParam.241
- // CHECK:STDOUT: %pattern_type => constants.%pattern_type.004
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: --- use_generic_interface_as_param.carbon
- // CHECK:STDOUT:
- // CHECK:STDOUT: constants {
- // CHECK:STDOUT: %M.type: type = fn_type @M [concrete]
- // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete]
- // CHECK:STDOUT: %M: %M.type = struct_value () [concrete]
- // CHECK:STDOUT: %AnyParam.type: type = generic_class_type @AnyParam [concrete]
- // CHECK:STDOUT: %AnyParam.generic: %AnyParam.type = struct_value () [concrete]
- // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete]
- // CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %empty_struct_type [concrete]
- // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic]
- // CHECK:STDOUT: %X: %T = bind_symbolic_name X, 1 [symbolic]
- // CHECK:STDOUT: %pattern_type.7dc: type = pattern_type %T [symbolic]
- // CHECK:STDOUT: %GenericInterface.type.0da: type = generic_interface_type @GenericInterface [concrete]
- // CHECK:STDOUT: %GenericInterface.generic: %GenericInterface.type.0da = struct_value () [concrete]
- // CHECK:STDOUT: %U: type = bind_symbolic_name U, 0 [symbolic]
- // CHECK:STDOUT: %GenericInterface.type.138: type = facet_type <@GenericInterface, @GenericInterface(%U)> [symbolic]
- // CHECK:STDOUT: %Self.13b: %GenericInterface.type.138 = bind_symbolic_name Self, 1 [symbolic]
- // CHECK:STDOUT: %pattern_type.a64: type = pattern_type %GenericInterface.type.0da [concrete]
- // CHECK:STDOUT: %AnyParam.861: type = class_type @AnyParam, @AnyParam(%GenericInterface.type.0da, %GenericInterface.generic) [concrete]
- // CHECK:STDOUT: %pattern_type.3ad: type = pattern_type %AnyParam.861 [concrete]
- // CHECK:STDOUT: %AnyParam.val: %AnyParam.861 = struct_value () [concrete]
- // CHECK:STDOUT: %Y.type: type = facet_type <@Y> [concrete]
- // CHECK:STDOUT: %Self.f64: %Y.type = bind_symbolic_name Self, 0 [symbolic]
- // CHECK:STDOUT: %Y.assoc_type: type = assoc_entity_type @Y [concrete]
- // CHECK:STDOUT: %assoc0.494: %Y.assoc_type = assoc_entity element0, imports.%PackageHasParam.import_ref.ce2 [concrete]
- // CHECK:STDOUT: %K.type.311: type = fn_type @K.1 [concrete]
- // CHECK:STDOUT: %K.7a1: %K.type.311 = struct_value () [concrete]
- // CHECK:STDOUT: %Self.as_type.61d: type = facet_access_type %Self.f64 [symbolic]
- // CHECK:STDOUT: %pattern_type.cb4: type = pattern_type %Self.as_type.61d [symbolic]
- // CHECK:STDOUT: %require_complete.b14: <witness> = require_complete_type %Self.as_type.61d [symbolic]
- // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete]
- // CHECK:STDOUT: %Op.type.92c: type = fn_type @Op.1, @impl.4b5(%T) [symbolic]
- // CHECK:STDOUT: %Op.b8f: %Op.type.92c = struct_value () [symbolic]
- // CHECK:STDOUT: %Y.impl_witness: <witness> = impl_witness imports.%Y.impl_witness_table [concrete]
- // CHECK:STDOUT: %Y.facet: %Y.type = facet_value %AnyParam.861, (%Y.impl_witness) [concrete]
- // CHECK:STDOUT: %.e17: type = fn_type_with_self_type %K.type.311, %Y.facet [concrete]
- // CHECK:STDOUT: %K.type.7f9: type = fn_type @K.2 [concrete]
- // CHECK:STDOUT: %K.c3c: %K.type.7f9 = struct_value () [concrete]
- // CHECK:STDOUT: %Op.type.f00: type = fn_type @Op.2 [concrete]
- // CHECK:STDOUT: %Destroy.impl_witness.c49: <witness> = impl_witness imports.%Destroy.impl_witness_table, @impl.4b5(%AnyParam.861) [concrete]
- // CHECK:STDOUT: %Op.type.77e: type = fn_type @Op.1, @impl.4b5(%AnyParam.861) [concrete]
- // CHECK:STDOUT: %Op.49f: %Op.type.77e = struct_value () [concrete]
- // CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %AnyParam.861, (%Destroy.impl_witness.c49) [concrete]
- // CHECK:STDOUT: %.a90: type = fn_type_with_self_type %Op.type.f00, %Destroy.facet [concrete]
- // CHECK:STDOUT: %Op.specific_fn: <specific function> = specific_function %Op.49f, @Op.1(%AnyParam.861) [concrete]
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: imports {
- // CHECK:STDOUT: %Core.ece: <namespace> = namespace file.%Core.import, [concrete] {
- // CHECK:STDOUT: .Destroy = %Core.Destroy
- // CHECK:STDOUT: import Core//prelude
- // CHECK:STDOUT: import Core//prelude/...
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %PackageHasParam: <namespace> = namespace file.%PackageHasParam.import, [concrete] {
- // CHECK:STDOUT: .AnyParam = %PackageHasParam.AnyParam
- // CHECK:STDOUT: .Y = %PackageHasParam.Y
- // CHECK:STDOUT: import PackageHasParam//default
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %PackageGenericInterface: <namespace> = namespace file.%PackageGenericInterface.import, [concrete] {
- // CHECK:STDOUT: .GenericInterface = %PackageGenericInterface.GenericInterface
- // CHECK:STDOUT: import PackageGenericInterface//default
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %PackageHasParam.AnyParam: %AnyParam.type = import_ref PackageHasParam//default, AnyParam, loaded [concrete = constants.%AnyParam.generic]
- // CHECK:STDOUT: %PackageHasParam.import_ref.5ab: type = import_ref PackageHasParam//default, loc4_16, loaded [symbolic = @AnyParam.%T (constants.%T)]
- // CHECK:STDOUT: %PackageHasParam.import_ref.34c: @AnyParam.%T (%T) = import_ref PackageHasParam//default, loc4_26, loaded [symbolic = @AnyParam.%X (constants.%X)]
- // CHECK:STDOUT: %PackageHasParam.import_ref.8f2: <witness> = import_ref PackageHasParam//default, loc4_34, loaded [concrete = constants.%complete_type]
- // CHECK:STDOUT: %PackageHasParam.import_ref.601 = import_ref PackageHasParam//default, inst33 [no loc], unloaded
- // CHECK:STDOUT: %PackageGenericInterface.GenericInterface: %GenericInterface.type.0da = import_ref PackageGenericInterface//default, GenericInterface, loaded [concrete = constants.%GenericInterface.generic]
- // CHECK:STDOUT: %PackageGenericInterface.import_ref.5ab: type = import_ref PackageGenericInterface//default, loc6_28, loaded [symbolic = @GenericInterface.%U (constants.%U)]
- // CHECK:STDOUT: %PackageGenericInterface.import_ref.c3b = import_ref PackageGenericInterface//default, inst29 [no loc], unloaded
- // CHECK:STDOUT: %PackageHasParam.Y: type = import_ref PackageHasParam//default, Y, loaded [concrete = constants.%Y.type]
- // CHECK:STDOUT: %PackageHasParam.import_ref.dc1 = import_ref PackageHasParam//default, inst40 [no loc], unloaded
- // CHECK:STDOUT: %PackageHasParam.import_ref.f69: %Y.assoc_type = import_ref PackageHasParam//default, loc7_22, loaded [concrete = constants.%assoc0.494]
- // CHECK:STDOUT: %PackageHasParam.K = import_ref PackageHasParam//default, K, unloaded
- // CHECK:STDOUT: %PackageHasParam.import_ref.ce2: %K.type.311 = import_ref PackageHasParam//default, loc7_22, loaded [concrete = constants.%K.7a1]
- // CHECK:STDOUT: %PackageHasParam.import_ref.292: %Y.type = import_ref PackageHasParam//default, inst40 [no loc], loaded [symbolic = constants.%Self.f64]
- // CHECK:STDOUT: %PackageGenericInterface.import_ref.53c: <witness> = import_ref PackageGenericInterface//default, loc8_70, loaded [concrete = constants.%Y.impl_witness]
- // CHECK:STDOUT: %PackageGenericInterface.import_ref.321: type = import_ref PackageGenericInterface//default, loc8_47, loaded [concrete = constants.%AnyParam.861]
- // CHECK:STDOUT: %PackageGenericInterface.import_ref.ca6: type = import_ref PackageGenericInterface//default, loc8_67, loaded [concrete = constants.%Y.type]
- // CHECK:STDOUT: %PackageGenericInterface.import_ref.01e: @impl.4b5.%Op.type (%Op.type.92c) = import_ref PackageGenericInterface//default, inst154 [indirect], loaded [symbolic = @impl.4b5.%Op (constants.%Op.b8f)]
- // CHECK:STDOUT: %Destroy.impl_witness_table = impl_witness_table (%PackageGenericInterface.import_ref.01e), @impl.4b5 [concrete]
- // CHECK:STDOUT: %PackageGenericInterface.import_ref.456: %K.type.7f9 = import_ref PackageGenericInterface//default, loc9_22, loaded [concrete = constants.%K.c3c]
- // CHECK:STDOUT: %Y.impl_witness_table = impl_witness_table (%PackageGenericInterface.import_ref.456), @impl.02a [concrete]
- // CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type]
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: file {
- // CHECK:STDOUT: package: <namespace> = namespace [concrete] {
- // CHECK:STDOUT: .Core = imports.%Core.ece
- // CHECK:STDOUT: .PackageHasParam = imports.%PackageHasParam
- // CHECK:STDOUT: .PackageGenericInterface = imports.%PackageGenericInterface
- // CHECK:STDOUT: .M = %M.decl
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %Core.import = import Core
- // CHECK:STDOUT: %PackageHasParam.import = import PackageHasParam
- // CHECK:STDOUT: %PackageGenericInterface.import = import PackageGenericInterface
- // CHECK:STDOUT: %M.decl: %M.type = fn_decl @M [concrete = constants.%M] {} {}
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: generic interface @GenericInterface(imports.%PackageGenericInterface.import_ref.5ab: type) [from "has_generic_interface.carbon"] {
- // CHECK:STDOUT: %U: type = bind_symbolic_name U, 0 [symbolic = %U (constants.%U)]
- // CHECK:STDOUT:
- // CHECK:STDOUT: !definition:
- // CHECK:STDOUT: %GenericInterface.type: type = facet_type <@GenericInterface, @GenericInterface(%U)> [symbolic = %GenericInterface.type (constants.%GenericInterface.type.138)]
- // CHECK:STDOUT: %Self: @GenericInterface.%GenericInterface.type (%GenericInterface.type.138) = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.13b)]
- // CHECK:STDOUT:
- // CHECK:STDOUT: interface {
- // CHECK:STDOUT: !members:
- // CHECK:STDOUT: .Self = imports.%PackageGenericInterface.import_ref.c3b
- // CHECK:STDOUT: witness = ()
- // CHECK:STDOUT: }
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: interface @Y [from "has_param.carbon"] {
- // CHECK:STDOUT: !members:
- // CHECK:STDOUT: .Self = imports.%PackageHasParam.import_ref.dc1
- // CHECK:STDOUT: .K = imports.%PackageHasParam.import_ref.f69
- // CHECK:STDOUT: witness = (imports.%PackageHasParam.K)
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: impl @impl.02a: imports.%PackageGenericInterface.import_ref.321 as imports.%PackageGenericInterface.import_ref.ca6 [from "has_generic_interface.carbon"] {
- // CHECK:STDOUT: !members:
- // CHECK:STDOUT: witness = imports.%PackageGenericInterface.import_ref.53c
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: generic class @AnyParam(imports.%PackageHasParam.import_ref.5ab: type, imports.%PackageHasParam.import_ref.34c: @AnyParam.%T (%T)) [from "has_param.carbon"] {
- // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic = %T (constants.%T)]
- // CHECK:STDOUT: %X: @AnyParam.%T (%T) = bind_symbolic_name X, 1 [symbolic = %X (constants.%X)]
- // CHECK:STDOUT: %pattern_type: type = pattern_type %T [symbolic = %pattern_type (constants.%pattern_type.7dc)]
- // CHECK:STDOUT:
- // CHECK:STDOUT: !definition:
- // CHECK:STDOUT:
- // CHECK:STDOUT: class {
- // CHECK:STDOUT: complete_type_witness = imports.%PackageHasParam.import_ref.8f2
- // CHECK:STDOUT:
- // CHECK:STDOUT: !members:
- // CHECK:STDOUT: .Self = imports.%PackageHasParam.import_ref.601
- // CHECK:STDOUT: }
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: fn @M() {
- // CHECK:STDOUT: !entry:
- // CHECK:STDOUT: name_binding_decl {
- // CHECK:STDOUT: %obj.patt: %pattern_type.3ad = binding_pattern obj [concrete]
- // CHECK:STDOUT: %obj.var_patt: %pattern_type.3ad = var_pattern %obj.patt [concrete]
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %obj.var: ref %AnyParam.861 = var %obj.var_patt
- // CHECK:STDOUT: %.loc9_50.1: %empty_struct_type = struct_literal ()
- // CHECK:STDOUT: %.loc9_50.2: init %AnyParam.861 = class_init (), %obj.var [concrete = constants.%AnyParam.val]
- // CHECK:STDOUT: %.loc8_3.1: init %AnyParam.861 = converted %.loc9_50.1, %.loc9_50.2 [concrete = constants.%AnyParam.val]
- // CHECK:STDOUT: assign %obj.var, %.loc8_3.1
- // CHECK:STDOUT: %.loc9_45: type = splice_block %AnyParam [concrete = constants.%AnyParam.861] {
- // CHECK:STDOUT: %PackageHasParam.ref.loc8: <namespace> = name_ref PackageHasParam, imports.%PackageHasParam [concrete = imports.%PackageHasParam]
- // CHECK:STDOUT: %AnyParam.ref: %AnyParam.type = name_ref AnyParam, imports.%PackageHasParam.AnyParam [concrete = constants.%AnyParam.generic]
- // CHECK:STDOUT: %PackageGenericInterface.ref: <namespace> = name_ref PackageGenericInterface, imports.%PackageGenericInterface [concrete = imports.%PackageGenericInterface]
- // CHECK:STDOUT: %GenericInterface.ref: %GenericInterface.type.0da = name_ref GenericInterface, imports.%PackageGenericInterface.GenericInterface [concrete = constants.%GenericInterface.generic]
- // CHECK:STDOUT: %AnyParam: type = class_type @AnyParam, @AnyParam(constants.%GenericInterface.type.0da, constants.%GenericInterface.generic) [concrete = constants.%AnyParam.861]
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %obj: ref %AnyParam.861 = bind_name obj, %obj.var
- // CHECK:STDOUT: %obj.ref: ref %AnyParam.861 = name_ref obj, %obj
- // CHECK:STDOUT: %PackageHasParam.ref.loc10: <namespace> = name_ref PackageHasParam, imports.%PackageHasParam [concrete = imports.%PackageHasParam]
- // CHECK:STDOUT: %Y.ref: type = name_ref Y, imports.%PackageHasParam.Y [concrete = constants.%Y.type]
- // CHECK:STDOUT: %K.ref: %Y.assoc_type = name_ref K, imports.%PackageHasParam.import_ref.f69 [concrete = constants.%assoc0.494]
- // CHECK:STDOUT: %impl.elem0.loc10: %.e17 = impl_witness_access constants.%Y.impl_witness, element0 [concrete = constants.%K.c3c]
- // CHECK:STDOUT: %bound_method.loc10: <bound method> = bound_method %obj.ref, %impl.elem0.loc10
- // CHECK:STDOUT: %.loc10: %AnyParam.861 = bind_value %obj.ref
- // CHECK:STDOUT: %K.call: init %empty_tuple.type = call %bound_method.loc10(%.loc10)
- // CHECK:STDOUT: %impl.elem0.loc8: %.a90 = impl_witness_access constants.%Destroy.impl_witness.c49, element0 [concrete = constants.%Op.49f]
- // CHECK:STDOUT: %bound_method.loc8_3.1: <bound method> = bound_method %obj.var, %impl.elem0.loc8
- // CHECK:STDOUT: %specific_fn: <specific function> = specific_function %impl.elem0.loc8, @Op.1(constants.%AnyParam.861) [concrete = constants.%Op.specific_fn]
- // CHECK:STDOUT: %bound_method.loc8_3.2: <bound method> = bound_method %obj.var, %specific_fn
- // CHECK:STDOUT: %.loc8_3.2: %AnyParam.861 = bind_value %obj.var
- // CHECK:STDOUT: %no_op: init %empty_tuple.type = call %bound_method.loc8_3.2(%.loc8_3.2)
- // CHECK:STDOUT: return
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: generic fn @K.1(imports.%PackageHasParam.import_ref.292: %Y.type) [from "has_param.carbon"] {
- // CHECK:STDOUT: %Self: %Y.type = bind_symbolic_name Self, 0 [symbolic = %Self (constants.%Self.f64)]
- // CHECK:STDOUT: %Self.as_type: type = facet_access_type %Self [symbolic = %Self.as_type (constants.%Self.as_type.61d)]
- // CHECK:STDOUT: %pattern_type: type = pattern_type %Self.as_type [symbolic = %pattern_type (constants.%pattern_type.cb4)]
- // CHECK:STDOUT:
- // CHECK:STDOUT: !definition:
- // CHECK:STDOUT: %require_complete: <witness> = require_complete_type %Self.as_type [symbolic = %require_complete (constants.%require_complete.b14)]
- // CHECK:STDOUT:
- // CHECK:STDOUT: fn;
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: fn @K.2 [from "has_generic_interface.carbon"];
- // CHECK:STDOUT:
- // CHECK:STDOUT: specific @AnyParam(constants.%T, constants.%X) {
- // CHECK:STDOUT: %T => constants.%T
- // CHECK:STDOUT: %X => constants.%X
- // CHECK:STDOUT: %pattern_type => constants.%pattern_type.7dc
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: specific @GenericInterface(constants.%U) {
- // CHECK:STDOUT: %U => constants.%U
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: specific @AnyParam(constants.%GenericInterface.type.0da, constants.%GenericInterface.generic) {
- // CHECK:STDOUT: %T => constants.%GenericInterface.type.0da
- // CHECK:STDOUT: %X => constants.%GenericInterface.generic
- // CHECK:STDOUT: %pattern_type => constants.%pattern_type.a64
- // CHECK:STDOUT:
- // CHECK:STDOUT: !definition:
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: specific @K.1(constants.%Self.f64) {
- // CHECK:STDOUT: %Self => constants.%Self.f64
- // CHECK:STDOUT: %Self.as_type => constants.%Self.as_type.61d
- // CHECK:STDOUT: %pattern_type => constants.%pattern_type.cb4
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: --- has_generic_class.carbon
- // CHECK:STDOUT:
- // CHECK:STDOUT: constants {
- // CHECK:STDOUT: %U: type = bind_symbolic_name U, 0 [symbolic]
- // CHECK:STDOUT: %pattern_type.98f: type = pattern_type type [concrete]
- // CHECK:STDOUT: %GenericClass.type: type = generic_class_type @GenericClass [concrete]
- // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete]
- // CHECK:STDOUT: %GenericClass.generic: %GenericClass.type = struct_value () [concrete]
- // CHECK:STDOUT: %GenericClass: type = class_type @GenericClass, @GenericClass(%U) [symbolic]
- // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete]
- // CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %empty_struct_type [concrete]
- // CHECK:STDOUT: %AnyParam.type: type = generic_class_type @AnyParam [concrete]
- // CHECK:STDOUT: %AnyParam.generic: %AnyParam.type = struct_value () [concrete]
- // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic]
- // CHECK:STDOUT: %X: %T = bind_symbolic_name X, 1 [symbolic]
- // CHECK:STDOUT: %pattern_type.7dc: type = pattern_type %T [symbolic]
- // CHECK:STDOUT: %pattern_type.17e: type = pattern_type %GenericClass.type [concrete]
- // CHECK:STDOUT: %AnyParam.0dd: type = class_type @AnyParam, @AnyParam(%GenericClass.type, %GenericClass.generic) [concrete]
- // CHECK:STDOUT: %Y.type: type = facet_type <@Y> [concrete]
- // CHECK:STDOUT: %Self.f64: %Y.type = bind_symbolic_name Self, 0 [symbolic]
- // CHECK:STDOUT: %K.type.311: type = fn_type @K.1 [concrete]
- // CHECK:STDOUT: %K.7a1: %K.type.311 = struct_value () [concrete]
- // CHECK:STDOUT: %Self.as_type.61d: type = facet_access_type %Self.f64 [symbolic]
- // CHECK:STDOUT: %pattern_type.cb4: type = pattern_type %Self.as_type.61d [symbolic]
- // CHECK:STDOUT: %require_complete.b14: <witness> = require_complete_type %Self.as_type.61d [symbolic]
- // CHECK:STDOUT: %Y.impl_witness: <witness> = impl_witness file.%Y.impl_witness_table [concrete]
- // CHECK:STDOUT: %pattern_type.64f: type = pattern_type %AnyParam.0dd [concrete]
- // CHECK:STDOUT: %K.type.965: type = fn_type @K.2 [concrete]
- // CHECK:STDOUT: %K.5a9: %K.type.965 = struct_value () [concrete]
- // CHECK:STDOUT: %Y.facet: %Y.type = facet_value %AnyParam.0dd, (%Y.impl_witness) [concrete]
- // CHECK:STDOUT: %L.type: type = fn_type @L [concrete]
- // CHECK:STDOUT: %L: %L.type = struct_value () [concrete]
- // CHECK:STDOUT: %AnyParam.val: %AnyParam.0dd = struct_value () [concrete]
- // CHECK:STDOUT: %Y.assoc_type: type = assoc_entity_type @Y [concrete]
- // CHECK:STDOUT: %assoc0.494: %Y.assoc_type = assoc_entity element0, imports.%PackageHasParam.import_ref.ce2 [concrete]
- // CHECK:STDOUT: %.701: type = fn_type_with_self_type %K.type.311, %Y.facet [concrete]
- // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete]
- // CHECK:STDOUT: %Op.type.bae: type = fn_type @Op.1 [concrete]
- // CHECK:STDOUT: %Op.type.bc9: type = fn_type @Op.2, @impl.49c(%T) [symbolic]
- // CHECK:STDOUT: %Op.46f: %Op.type.bc9 = struct_value () [symbolic]
- // CHECK:STDOUT: %Destroy.impl_witness.418: <witness> = impl_witness imports.%Destroy.impl_witness_table, @impl.49c(%AnyParam.0dd) [concrete]
- // CHECK:STDOUT: %Op.type.f56: type = fn_type @Op.2, @impl.49c(%AnyParam.0dd) [concrete]
- // CHECK:STDOUT: %Op.1fa: %Op.type.f56 = struct_value () [concrete]
- // CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %AnyParam.0dd, (%Destroy.impl_witness.418) [concrete]
- // CHECK:STDOUT: %.94f: type = fn_type_with_self_type %Op.type.bae, %Destroy.facet [concrete]
- // CHECK:STDOUT: %Op.specific_fn: <specific function> = specific_function %Op.1fa, @Op.2(%AnyParam.0dd) [concrete]
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: imports {
- // CHECK:STDOUT: %Core: <namespace> = namespace file.%Core.import, [concrete] {
- // CHECK:STDOUT: .Destroy = %Core.Destroy
- // CHECK:STDOUT: import Core//prelude
- // CHECK:STDOUT: import Core//prelude/...
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %PackageHasParam: <namespace> = namespace file.%PackageHasParam.import, [concrete] {
- // CHECK:STDOUT: .AnyParam = %PackageHasParam.AnyParam
- // CHECK:STDOUT: .Y = %PackageHasParam.Y
- // CHECK:STDOUT: import PackageHasParam//default
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %PackageHasParam.AnyParam: %AnyParam.type = import_ref PackageHasParam//default, AnyParam, loaded [concrete = constants.%AnyParam.generic]
- // CHECK:STDOUT: %PackageHasParam.import_ref.5ab: type = import_ref PackageHasParam//default, loc4_16, loaded [symbolic = @AnyParam.%T (constants.%T)]
- // CHECK:STDOUT: %PackageHasParam.import_ref.34c: @AnyParam.%T (%T) = import_ref PackageHasParam//default, loc4_26, loaded [symbolic = @AnyParam.%X (constants.%X)]
- // CHECK:STDOUT: %PackageHasParam.import_ref.8f2: <witness> = import_ref PackageHasParam//default, loc4_34, loaded [concrete = constants.%complete_type]
- // CHECK:STDOUT: %PackageHasParam.import_ref.601 = import_ref PackageHasParam//default, inst33 [no loc], unloaded
- // CHECK:STDOUT: %PackageHasParam.Y: type = import_ref PackageHasParam//default, Y, loaded [concrete = constants.%Y.type]
- // CHECK:STDOUT: %PackageHasParam.import_ref.dc1 = import_ref PackageHasParam//default, inst40 [no loc], unloaded
- // CHECK:STDOUT: %PackageHasParam.import_ref.f69: %Y.assoc_type = import_ref PackageHasParam//default, loc7_22, loaded [concrete = constants.%assoc0.494]
- // CHECK:STDOUT: %PackageHasParam.K: %K.type.311 = import_ref PackageHasParam//default, K, loaded [concrete = constants.%K.7a1]
- // CHECK:STDOUT: %PackageHasParam.import_ref.292: %Y.type = import_ref PackageHasParam//default, inst40 [no loc], loaded [symbolic = constants.%Self.f64]
- // CHECK:STDOUT: %PackageHasParam.import_ref.ce2: %K.type.311 = import_ref PackageHasParam//default, loc7_22, loaded [concrete = constants.%K.7a1]
- // CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type]
- // CHECK:STDOUT: %Core.import_ref.0b9: @impl.49c.%Op.type (%Op.type.bc9) = import_ref Core//prelude/parts/destroy, loc8_23, loaded [symbolic = @impl.49c.%Op (constants.%Op.46f)]
- // CHECK:STDOUT: %Destroy.impl_witness_table = impl_witness_table (%Core.import_ref.0b9), @impl.49c [concrete]
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: file {
- // CHECK:STDOUT: package: <namespace> = namespace [concrete] {
- // CHECK:STDOUT: .Core = imports.%Core
- // CHECK:STDOUT: .PackageHasParam = imports.%PackageHasParam
- // CHECK:STDOUT: .GenericClass = %GenericClass.decl
- // CHECK:STDOUT: .L = %L.decl
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %Core.import = import Core
- // CHECK:STDOUT: %PackageHasParam.import = import PackageHasParam
- // CHECK:STDOUT: %GenericClass.decl: %GenericClass.type = class_decl @GenericClass [concrete = constants.%GenericClass.generic] {
- // CHECK:STDOUT: %U.patt: %pattern_type.98f = symbolic_binding_pattern U, 0 [concrete]
- // CHECK:STDOUT: } {
- // CHECK:STDOUT: %U.loc6_20.1: type = bind_symbolic_name U, 0 [symbolic = %U.loc6_20.2 (constants.%U)]
- // CHECK:STDOUT: }
- // CHECK:STDOUT: impl_decl @impl.4c1 [concrete] {} {
- // CHECK:STDOUT: %PackageHasParam.ref.loc8_6: <namespace> = name_ref PackageHasParam, imports.%PackageHasParam [concrete = imports.%PackageHasParam]
- // CHECK:STDOUT: %AnyParam.ref: %AnyParam.type = name_ref AnyParam, imports.%PackageHasParam.AnyParam [concrete = constants.%AnyParam.generic]
- // CHECK:STDOUT: %GenericClass.ref: %GenericClass.type = name_ref GenericClass, file.%GenericClass.decl [concrete = constants.%GenericClass.generic]
- // CHECK:STDOUT: %AnyParam: type = class_type @AnyParam, @AnyParam(constants.%GenericClass.type, constants.%GenericClass.generic) [concrete = constants.%AnyParam.0dd]
- // CHECK:STDOUT: %PackageHasParam.ref.loc8_48: <namespace> = name_ref PackageHasParam, imports.%PackageHasParam [concrete = imports.%PackageHasParam]
- // CHECK:STDOUT: %Y.ref: type = name_ref Y, imports.%PackageHasParam.Y [concrete = constants.%Y.type]
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %Y.impl_witness_table = impl_witness_table (@impl.4c1.%K.decl), @impl.4c1 [concrete]
- // CHECK:STDOUT: %Y.impl_witness: <witness> = impl_witness %Y.impl_witness_table [concrete = constants.%Y.impl_witness]
- // CHECK:STDOUT: %L.decl: %L.type = fn_decl @L [concrete = constants.%L] {} {}
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: interface @Y [from "has_param.carbon"] {
- // CHECK:STDOUT: !members:
- // CHECK:STDOUT: .Self = imports.%PackageHasParam.import_ref.dc1
- // CHECK:STDOUT: .K = imports.%PackageHasParam.import_ref.f69
- // CHECK:STDOUT: witness = (imports.%PackageHasParam.K)
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: impl @impl.4c1: %AnyParam as %Y.ref {
- // CHECK:STDOUT: %K.decl: %K.type.965 = fn_decl @K.2 [concrete = constants.%K.5a9] {
- // CHECK:STDOUT: %self.patt: %pattern_type.64f = binding_pattern self [concrete]
- // CHECK:STDOUT: %self.param_patt: %pattern_type.64f = value_param_pattern %self.patt, call_param0 [concrete]
- // CHECK:STDOUT: } {
- // CHECK:STDOUT: %self.param: %AnyParam.0dd = value_param call_param0
- // CHECK:STDOUT: %Self.ref: type = name_ref Self, @impl.4c1.%AnyParam [concrete = constants.%AnyParam.0dd]
- // CHECK:STDOUT: %self: %AnyParam.0dd = bind_name self, %self.param
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: !members:
- // CHECK:STDOUT: .K = %K.decl
- // CHECK:STDOUT: witness = file.%Y.impl_witness
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: generic class @GenericClass(%U.loc6_20.1: type) {
- // CHECK:STDOUT: %U.loc6_20.2: type = bind_symbolic_name U, 0 [symbolic = %U.loc6_20.2 (constants.%U)]
- // CHECK:STDOUT:
- // CHECK:STDOUT: !definition:
- // CHECK:STDOUT:
- // CHECK:STDOUT: class {
- // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete = constants.%empty_struct_type]
- // CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %empty_struct_type [concrete = constants.%complete_type]
- // CHECK:STDOUT: complete_type_witness = %complete_type
- // CHECK:STDOUT:
- // CHECK:STDOUT: !members:
- // CHECK:STDOUT: .Self = constants.%GenericClass
- // CHECK:STDOUT: }
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: generic class @AnyParam(imports.%PackageHasParam.import_ref.5ab: type, imports.%PackageHasParam.import_ref.34c: @AnyParam.%T (%T)) [from "has_param.carbon"] {
- // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic = %T (constants.%T)]
- // CHECK:STDOUT: %X: @AnyParam.%T (%T) = bind_symbolic_name X, 1 [symbolic = %X (constants.%X)]
- // CHECK:STDOUT: %pattern_type: type = pattern_type %T [symbolic = %pattern_type (constants.%pattern_type.7dc)]
- // CHECK:STDOUT:
- // CHECK:STDOUT: !definition:
- // CHECK:STDOUT:
- // CHECK:STDOUT: class {
- // CHECK:STDOUT: complete_type_witness = imports.%PackageHasParam.import_ref.8f2
- // CHECK:STDOUT:
- // CHECK:STDOUT: !members:
- // CHECK:STDOUT: .Self = imports.%PackageHasParam.import_ref.601
- // CHECK:STDOUT: }
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: generic fn @K.1(imports.%PackageHasParam.import_ref.292: %Y.type) [from "has_param.carbon"] {
- // CHECK:STDOUT: %Self: %Y.type = bind_symbolic_name Self, 0 [symbolic = %Self (constants.%Self.f64)]
- // CHECK:STDOUT: %Self.as_type: type = facet_access_type %Self [symbolic = %Self.as_type (constants.%Self.as_type.61d)]
- // CHECK:STDOUT: %pattern_type: type = pattern_type %Self.as_type [symbolic = %pattern_type (constants.%pattern_type.cb4)]
- // CHECK:STDOUT:
- // CHECK:STDOUT: !definition:
- // CHECK:STDOUT: %require_complete: <witness> = require_complete_type %Self.as_type [symbolic = %require_complete (constants.%require_complete.b14)]
- // CHECK:STDOUT:
- // CHECK:STDOUT: fn;
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: fn @K.2(%self.param: %AnyParam.0dd) {
- // CHECK:STDOUT: !entry:
- // CHECK:STDOUT: return
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: fn @L() {
- // CHECK:STDOUT: !entry:
- // CHECK:STDOUT: name_binding_decl {
- // CHECK:STDOUT: %obj.patt: %pattern_type.64f = binding_pattern obj [concrete]
- // CHECK:STDOUT: %obj.var_patt: %pattern_type.64f = var_pattern %obj.patt [concrete]
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %obj.var: ref %AnyParam.0dd = var %obj.var_patt
- // CHECK:STDOUT: %.loc13_54.1: %empty_struct_type = struct_literal ()
- // CHECK:STDOUT: %.loc13_54.2: init %AnyParam.0dd = class_init (), %obj.var [concrete = constants.%AnyParam.val]
- // CHECK:STDOUT: %.loc13_3.1: init %AnyParam.0dd = converted %.loc13_54.1, %.loc13_54.2 [concrete = constants.%AnyParam.val]
- // CHECK:STDOUT: assign %obj.var, %.loc13_3.1
- // CHECK:STDOUT: %.loc13_49: type = splice_block %AnyParam [concrete = constants.%AnyParam.0dd] {
- // CHECK:STDOUT: %PackageHasParam.ref.loc13: <namespace> = name_ref PackageHasParam, imports.%PackageHasParam [concrete = imports.%PackageHasParam]
- // CHECK:STDOUT: %AnyParam.ref: %AnyParam.type = name_ref AnyParam, imports.%PackageHasParam.AnyParam [concrete = constants.%AnyParam.generic]
- // CHECK:STDOUT: %GenericClass.ref: %GenericClass.type = name_ref GenericClass, file.%GenericClass.decl [concrete = constants.%GenericClass.generic]
- // CHECK:STDOUT: %AnyParam: type = class_type @AnyParam, @AnyParam(constants.%GenericClass.type, constants.%GenericClass.generic) [concrete = constants.%AnyParam.0dd]
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %obj: ref %AnyParam.0dd = bind_name obj, %obj.var
- // CHECK:STDOUT: %obj.ref: ref %AnyParam.0dd = name_ref obj, %obj
- // CHECK:STDOUT: %PackageHasParam.ref.loc14: <namespace> = name_ref PackageHasParam, imports.%PackageHasParam [concrete = imports.%PackageHasParam]
- // CHECK:STDOUT: %Y.ref: type = name_ref Y, imports.%PackageHasParam.Y [concrete = constants.%Y.type]
- // CHECK:STDOUT: %K.ref: %Y.assoc_type = name_ref K, imports.%PackageHasParam.import_ref.f69 [concrete = constants.%assoc0.494]
- // CHECK:STDOUT: %impl.elem0.loc14: %.701 = impl_witness_access constants.%Y.impl_witness, element0 [concrete = constants.%K.5a9]
- // CHECK:STDOUT: %bound_method.loc14: <bound method> = bound_method %obj.ref, %impl.elem0.loc14
- // CHECK:STDOUT: %.loc14: %AnyParam.0dd = bind_value %obj.ref
- // CHECK:STDOUT: %K.call: init %empty_tuple.type = call %bound_method.loc14(%.loc14)
- // CHECK:STDOUT: %impl.elem0.loc13: %.94f = impl_witness_access constants.%Destroy.impl_witness.418, element0 [concrete = constants.%Op.1fa]
- // CHECK:STDOUT: %bound_method.loc13_3.1: <bound method> = bound_method %obj.var, %impl.elem0.loc13
- // CHECK:STDOUT: %specific_fn: <specific function> = specific_function %impl.elem0.loc13, @Op.2(constants.%AnyParam.0dd) [concrete = constants.%Op.specific_fn]
- // CHECK:STDOUT: %bound_method.loc13_3.2: <bound method> = bound_method %obj.var, %specific_fn
- // CHECK:STDOUT: %.loc13_3.2: %AnyParam.0dd = bind_value %obj.var
- // CHECK:STDOUT: %no_op: init %empty_tuple.type = call %bound_method.loc13_3.2(%.loc13_3.2)
- // CHECK:STDOUT: return
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: specific @GenericClass(constants.%U) {
- // CHECK:STDOUT: %U.loc6_20.2 => constants.%U
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: specific @AnyParam(constants.%T, constants.%X) {
- // CHECK:STDOUT: %T => constants.%T
- // CHECK:STDOUT: %X => constants.%X
- // CHECK:STDOUT: %pattern_type => constants.%pattern_type.7dc
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: specific @AnyParam(constants.%GenericClass.type, constants.%GenericClass.generic) {
- // CHECK:STDOUT: %T => constants.%GenericClass.type
- // CHECK:STDOUT: %X => constants.%GenericClass.generic
- // CHECK:STDOUT: %pattern_type => constants.%pattern_type.17e
- // CHECK:STDOUT:
- // CHECK:STDOUT: !definition:
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: specific @K.1(constants.%Self.f64) {
- // CHECK:STDOUT: %Self => constants.%Self.f64
- // CHECK:STDOUT: %Self.as_type => constants.%Self.as_type.61d
- // CHECK:STDOUT: %pattern_type => constants.%pattern_type.cb4
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: specific @K.1(constants.%Y.facet) {
- // CHECK:STDOUT: %Self => constants.%Y.facet
- // CHECK:STDOUT: %Self.as_type => constants.%AnyParam.0dd
- // CHECK:STDOUT: %pattern_type => constants.%pattern_type.64f
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: --- use_generic_class_as_param.carbon
- // CHECK:STDOUT:
- // CHECK:STDOUT: constants {
- // CHECK:STDOUT: %M.type: type = fn_type @M [concrete]
- // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete]
- // CHECK:STDOUT: %M: %M.type = struct_value () [concrete]
- // CHECK:STDOUT: %AnyParam.type: type = generic_class_type @AnyParam [concrete]
- // CHECK:STDOUT: %AnyParam.generic: %AnyParam.type = struct_value () [concrete]
- // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete]
- // CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %empty_struct_type [concrete]
- // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic]
- // CHECK:STDOUT: %X: %T = bind_symbolic_name X, 1 [symbolic]
- // CHECK:STDOUT: %pattern_type.7dc: type = pattern_type %T [symbolic]
- // CHECK:STDOUT: %GenericClass.type: type = generic_class_type @GenericClass [concrete]
- // CHECK:STDOUT: %GenericClass.generic: %GenericClass.type = struct_value () [concrete]
- // CHECK:STDOUT: %U: type = bind_symbolic_name U, 0 [symbolic]
- // CHECK:STDOUT: %pattern_type.17a: type = pattern_type %GenericClass.type [concrete]
- // CHECK:STDOUT: %AnyParam.d71: type = class_type @AnyParam, @AnyParam(%GenericClass.type, %GenericClass.generic) [concrete]
- // CHECK:STDOUT: %pattern_type.312: type = pattern_type %AnyParam.d71 [concrete]
- // CHECK:STDOUT: %AnyParam.val: %AnyParam.d71 = struct_value () [concrete]
- // CHECK:STDOUT: %Y.type: type = facet_type <@Y> [concrete]
- // CHECK:STDOUT: %Self.f64: %Y.type = bind_symbolic_name Self, 0 [symbolic]
- // CHECK:STDOUT: %Y.assoc_type: type = assoc_entity_type @Y [concrete]
- // CHECK:STDOUT: %assoc0.494: %Y.assoc_type = assoc_entity element0, imports.%PackageHasParam.import_ref.ce2 [concrete]
- // CHECK:STDOUT: %K.type.311: type = fn_type @K.1 [concrete]
- // CHECK:STDOUT: %K.7a1: %K.type.311 = struct_value () [concrete]
- // CHECK:STDOUT: %Self.as_type.61d: type = facet_access_type %Self.f64 [symbolic]
- // CHECK:STDOUT: %pattern_type.cb4: type = pattern_type %Self.as_type.61d [symbolic]
- // CHECK:STDOUT: %require_complete.b14: <witness> = require_complete_type %Self.as_type.61d [symbolic]
- // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete]
- // CHECK:STDOUT: %Op.type.5d4: type = fn_type @Op.1, @impl.1d2(%T) [symbolic]
- // CHECK:STDOUT: %Op.ab3: %Op.type.5d4 = struct_value () [symbolic]
- // CHECK:STDOUT: %Y.impl_witness: <witness> = impl_witness imports.%Y.impl_witness_table [concrete]
- // CHECK:STDOUT: %Y.facet: %Y.type = facet_value %AnyParam.d71, (%Y.impl_witness) [concrete]
- // CHECK:STDOUT: %.0dd: type = fn_type_with_self_type %K.type.311, %Y.facet [concrete]
- // CHECK:STDOUT: %K.type.9cf: type = fn_type @K.2 [concrete]
- // CHECK:STDOUT: %K.039: %K.type.9cf = struct_value () [concrete]
- // CHECK:STDOUT: %Op.type.0fd: type = fn_type @Op.2 [concrete]
- // CHECK:STDOUT: %Destroy.impl_witness.ea7: <witness> = impl_witness imports.%Destroy.impl_witness_table, @impl.1d2(%AnyParam.d71) [concrete]
- // CHECK:STDOUT: %Op.type.051: type = fn_type @Op.1, @impl.1d2(%AnyParam.d71) [concrete]
- // CHECK:STDOUT: %Op.d0b: %Op.type.051 = struct_value () [concrete]
- // CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %AnyParam.d71, (%Destroy.impl_witness.ea7) [concrete]
- // CHECK:STDOUT: %.275: type = fn_type_with_self_type %Op.type.0fd, %Destroy.facet [concrete]
- // CHECK:STDOUT: %Op.specific_fn: <specific function> = specific_function %Op.d0b, @Op.1(%AnyParam.d71) [concrete]
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: imports {
- // CHECK:STDOUT: %Core.ece: <namespace> = namespace file.%Core.import, [concrete] {
- // CHECK:STDOUT: .Destroy = %Core.Destroy
- // CHECK:STDOUT: import Core//prelude
- // CHECK:STDOUT: import Core//prelude/...
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %PackageHasParam: <namespace> = namespace file.%PackageHasParam.import, [concrete] {
- // CHECK:STDOUT: .AnyParam = %PackageHasParam.AnyParam
- // CHECK:STDOUT: .Y = %PackageHasParam.Y
- // CHECK:STDOUT: import PackageHasParam//default
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %PackageGenericClass: <namespace> = namespace file.%PackageGenericClass.import, [concrete] {
- // CHECK:STDOUT: .GenericClass = %PackageGenericClass.GenericClass
- // CHECK:STDOUT: import PackageGenericClass//default
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %PackageHasParam.AnyParam: %AnyParam.type = import_ref PackageHasParam//default, AnyParam, loaded [concrete = constants.%AnyParam.generic]
- // CHECK:STDOUT: %PackageHasParam.import_ref.5ab: type = import_ref PackageHasParam//default, loc4_16, loaded [symbolic = @AnyParam.%T (constants.%T)]
- // CHECK:STDOUT: %PackageHasParam.import_ref.34c: @AnyParam.%T (%T) = import_ref PackageHasParam//default, loc4_26, loaded [symbolic = @AnyParam.%X (constants.%X)]
- // CHECK:STDOUT: %PackageHasParam.import_ref.8f2: <witness> = import_ref PackageHasParam//default, loc4_34, loaded [concrete = constants.%complete_type]
- // CHECK:STDOUT: %PackageHasParam.import_ref.601 = import_ref PackageHasParam//default, inst33 [no loc], unloaded
- // CHECK:STDOUT: %PackageGenericClass.GenericClass: %GenericClass.type = import_ref PackageGenericClass//default, GenericClass, loaded [concrete = constants.%GenericClass.generic]
- // CHECK:STDOUT: %PackageGenericClass.import_ref.5ab: type = import_ref PackageGenericClass//default, loc6_20, loaded [symbolic = @GenericClass.%U (constants.%U)]
- // CHECK:STDOUT: %PackageGenericClass.import_ref.8f2: <witness> = import_ref PackageGenericClass//default, loc6_31, loaded [concrete = constants.%complete_type]
- // CHECK:STDOUT: %PackageGenericClass.import_ref.065 = import_ref PackageGenericClass//default, inst28 [no loc], unloaded
- // CHECK:STDOUT: %PackageHasParam.Y: type = import_ref PackageHasParam//default, Y, loaded [concrete = constants.%Y.type]
- // CHECK:STDOUT: %PackageHasParam.import_ref.dc1 = import_ref PackageHasParam//default, inst40 [no loc], unloaded
- // CHECK:STDOUT: %PackageHasParam.import_ref.f69: %Y.assoc_type = import_ref PackageHasParam//default, loc7_22, loaded [concrete = constants.%assoc0.494]
- // CHECK:STDOUT: %PackageHasParam.K = import_ref PackageHasParam//default, K, unloaded
- // CHECK:STDOUT: %PackageHasParam.import_ref.ce2: %K.type.311 = import_ref PackageHasParam//default, loc7_22, loaded [concrete = constants.%K.7a1]
- // CHECK:STDOUT: %PackageHasParam.import_ref.292: %Y.type = import_ref PackageHasParam//default, inst40 [no loc], loaded [symbolic = constants.%Self.f64]
- // CHECK:STDOUT: %PackageGenericClass.import_ref.246: <witness> = import_ref PackageGenericClass//default, loc8_66, loaded [concrete = constants.%Y.impl_witness]
- // CHECK:STDOUT: %PackageGenericClass.import_ref.a0e: type = import_ref PackageGenericClass//default, loc8_43, loaded [concrete = constants.%AnyParam.d71]
- // CHECK:STDOUT: %PackageGenericClass.import_ref.ca6: type = import_ref PackageGenericClass//default, loc8_63, loaded [concrete = constants.%Y.type]
- // CHECK:STDOUT: %PackageGenericClass.import_ref.9fa: @impl.1d2.%Op.type (%Op.type.5d4) = import_ref PackageGenericClass//default, inst152 [indirect], loaded [symbolic = @impl.1d2.%Op (constants.%Op.ab3)]
- // CHECK:STDOUT: %Destroy.impl_witness_table = impl_witness_table (%PackageGenericClass.import_ref.9fa), @impl.1d2 [concrete]
- // CHECK:STDOUT: %PackageGenericClass.import_ref.fbf: %K.type.9cf = import_ref PackageGenericClass//default, loc9_22, loaded [concrete = constants.%K.039]
- // CHECK:STDOUT: %Y.impl_witness_table = impl_witness_table (%PackageGenericClass.import_ref.fbf), @impl.421 [concrete]
- // CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type]
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: file {
- // CHECK:STDOUT: package: <namespace> = namespace [concrete] {
- // CHECK:STDOUT: .Core = imports.%Core.ece
- // CHECK:STDOUT: .PackageHasParam = imports.%PackageHasParam
- // CHECK:STDOUT: .PackageGenericClass = imports.%PackageGenericClass
- // CHECK:STDOUT: .M = %M.decl
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %Core.import = import Core
- // CHECK:STDOUT: %PackageHasParam.import = import PackageHasParam
- // CHECK:STDOUT: %PackageGenericClass.import = import PackageGenericClass
- // CHECK:STDOUT: %M.decl: %M.type = fn_decl @M [concrete = constants.%M] {} {}
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: interface @Y [from "has_param.carbon"] {
- // CHECK:STDOUT: !members:
- // CHECK:STDOUT: .Self = imports.%PackageHasParam.import_ref.dc1
- // CHECK:STDOUT: .K = imports.%PackageHasParam.import_ref.f69
- // CHECK:STDOUT: witness = (imports.%PackageHasParam.K)
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: impl @impl.421: imports.%PackageGenericClass.import_ref.a0e as imports.%PackageGenericClass.import_ref.ca6 [from "has_generic_class.carbon"] {
- // CHECK:STDOUT: !members:
- // CHECK:STDOUT: witness = imports.%PackageGenericClass.import_ref.246
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: generic class @AnyParam(imports.%PackageHasParam.import_ref.5ab: type, imports.%PackageHasParam.import_ref.34c: @AnyParam.%T (%T)) [from "has_param.carbon"] {
- // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic = %T (constants.%T)]
- // CHECK:STDOUT: %X: @AnyParam.%T (%T) = bind_symbolic_name X, 1 [symbolic = %X (constants.%X)]
- // CHECK:STDOUT: %pattern_type: type = pattern_type %T [symbolic = %pattern_type (constants.%pattern_type.7dc)]
- // CHECK:STDOUT:
- // CHECK:STDOUT: !definition:
- // CHECK:STDOUT:
- // CHECK:STDOUT: class {
- // CHECK:STDOUT: complete_type_witness = imports.%PackageHasParam.import_ref.8f2
- // CHECK:STDOUT:
- // CHECK:STDOUT: !members:
- // CHECK:STDOUT: .Self = imports.%PackageHasParam.import_ref.601
- // CHECK:STDOUT: }
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: generic class @GenericClass(imports.%PackageGenericClass.import_ref.5ab: type) [from "has_generic_class.carbon"] {
- // CHECK:STDOUT: %U: type = bind_symbolic_name U, 0 [symbolic = %U (constants.%U)]
- // CHECK:STDOUT:
- // CHECK:STDOUT: !definition:
- // CHECK:STDOUT:
- // CHECK:STDOUT: class {
- // CHECK:STDOUT: complete_type_witness = imports.%PackageGenericClass.import_ref.8f2
- // CHECK:STDOUT:
- // CHECK:STDOUT: !members:
- // CHECK:STDOUT: .Self = imports.%PackageGenericClass.import_ref.065
- // CHECK:STDOUT: }
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: fn @M() {
- // CHECK:STDOUT: !entry:
- // CHECK:STDOUT: name_binding_decl {
- // CHECK:STDOUT: %obj.patt: %pattern_type.312 = binding_pattern obj [concrete]
- // CHECK:STDOUT: %obj.var_patt: %pattern_type.312 = var_pattern %obj.patt [concrete]
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %obj.var: ref %AnyParam.d71 = var %obj.var_patt
- // CHECK:STDOUT: %.loc8_74.1: %empty_struct_type = struct_literal ()
- // CHECK:STDOUT: %.loc8_74.2: init %AnyParam.d71 = class_init (), %obj.var [concrete = constants.%AnyParam.val]
- // CHECK:STDOUT: %.loc8_3.1: init %AnyParam.d71 = converted %.loc8_74.1, %.loc8_74.2 [concrete = constants.%AnyParam.val]
- // CHECK:STDOUT: assign %obj.var, %.loc8_3.1
- // CHECK:STDOUT: %.loc8_69: type = splice_block %AnyParam [concrete = constants.%AnyParam.d71] {
- // CHECK:STDOUT: %PackageHasParam.ref.loc8: <namespace> = name_ref PackageHasParam, imports.%PackageHasParam [concrete = imports.%PackageHasParam]
- // CHECK:STDOUT: %AnyParam.ref: %AnyParam.type = name_ref AnyParam, imports.%PackageHasParam.AnyParam [concrete = constants.%AnyParam.generic]
- // CHECK:STDOUT: %PackageGenericClass.ref: <namespace> = name_ref PackageGenericClass, imports.%PackageGenericClass [concrete = imports.%PackageGenericClass]
- // CHECK:STDOUT: %GenericClass.ref: %GenericClass.type = name_ref GenericClass, imports.%PackageGenericClass.GenericClass [concrete = constants.%GenericClass.generic]
- // CHECK:STDOUT: %AnyParam: type = class_type @AnyParam, @AnyParam(constants.%GenericClass.type, constants.%GenericClass.generic) [concrete = constants.%AnyParam.d71]
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %obj: ref %AnyParam.d71 = bind_name obj, %obj.var
- // CHECK:STDOUT: %obj.ref: ref %AnyParam.d71 = name_ref obj, %obj
- // CHECK:STDOUT: %PackageHasParam.ref.loc9: <namespace> = name_ref PackageHasParam, imports.%PackageHasParam [concrete = imports.%PackageHasParam]
- // CHECK:STDOUT: %Y.ref: type = name_ref Y, imports.%PackageHasParam.Y [concrete = constants.%Y.type]
- // CHECK:STDOUT: %K.ref: %Y.assoc_type = name_ref K, imports.%PackageHasParam.import_ref.f69 [concrete = constants.%assoc0.494]
- // CHECK:STDOUT: %impl.elem0.loc9: %.0dd = impl_witness_access constants.%Y.impl_witness, element0 [concrete = constants.%K.039]
- // CHECK:STDOUT: %bound_method.loc9: <bound method> = bound_method %obj.ref, %impl.elem0.loc9
- // CHECK:STDOUT: %.loc9: %AnyParam.d71 = bind_value %obj.ref
- // CHECK:STDOUT: %K.call: init %empty_tuple.type = call %bound_method.loc9(%.loc9)
- // CHECK:STDOUT: %impl.elem0.loc8: %.275 = impl_witness_access constants.%Destroy.impl_witness.ea7, element0 [concrete = constants.%Op.d0b]
- // CHECK:STDOUT: %bound_method.loc8_3.1: <bound method> = bound_method %obj.var, %impl.elem0.loc8
- // CHECK:STDOUT: %specific_fn: <specific function> = specific_function %impl.elem0.loc8, @Op.1(constants.%AnyParam.d71) [concrete = constants.%Op.specific_fn]
- // CHECK:STDOUT: %bound_method.loc8_3.2: <bound method> = bound_method %obj.var, %specific_fn
- // CHECK:STDOUT: %.loc8_3.2: %AnyParam.d71 = bind_value %obj.var
- // CHECK:STDOUT: %no_op: init %empty_tuple.type = call %bound_method.loc8_3.2(%.loc8_3.2)
- // CHECK:STDOUT: return
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: generic fn @K.1(imports.%PackageHasParam.import_ref.292: %Y.type) [from "has_param.carbon"] {
- // CHECK:STDOUT: %Self: %Y.type = bind_symbolic_name Self, 0 [symbolic = %Self (constants.%Self.f64)]
- // CHECK:STDOUT: %Self.as_type: type = facet_access_type %Self [symbolic = %Self.as_type (constants.%Self.as_type.61d)]
- // CHECK:STDOUT: %pattern_type: type = pattern_type %Self.as_type [symbolic = %pattern_type (constants.%pattern_type.cb4)]
- // CHECK:STDOUT:
- // CHECK:STDOUT: !definition:
- // CHECK:STDOUT: %require_complete: <witness> = require_complete_type %Self.as_type [symbolic = %require_complete (constants.%require_complete.b14)]
- // CHECK:STDOUT:
- // CHECK:STDOUT: fn;
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: fn @K.2 [from "has_generic_class.carbon"];
- // CHECK:STDOUT:
- // CHECK:STDOUT: specific @AnyParam(constants.%T, constants.%X) {
- // CHECK:STDOUT: %T => constants.%T
- // CHECK:STDOUT: %X => constants.%X
- // CHECK:STDOUT: %pattern_type => constants.%pattern_type.7dc
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: specific @GenericClass(constants.%U) {
- // CHECK:STDOUT: %U => constants.%U
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: specific @AnyParam(constants.%GenericClass.type, constants.%GenericClass.generic) {
- // CHECK:STDOUT: %T => constants.%GenericClass.type
- // CHECK:STDOUT: %X => constants.%GenericClass.generic
- // CHECK:STDOUT: %pattern_type => constants.%pattern_type.17a
- // CHECK:STDOUT:
- // CHECK:STDOUT: !definition:
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: specific @K.1(constants.%Self.f64) {
- // CHECK:STDOUT: %Self => constants.%Self.f64
- // CHECK:STDOUT: %Self.as_type => constants.%Self.as_type.61d
- // CHECK:STDOUT: %pattern_type => constants.%pattern_type.cb4
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: --- has_extra_interfaces.carbon
- // CHECK:STDOUT:
- // CHECK:STDOUT: constants {
- // CHECK:STDOUT: %Extra1.type: type = facet_type <@Extra1> [concrete]
- // CHECK:STDOUT: %Self.66c: %Extra1.type = bind_symbolic_name Self, 0 [symbolic]
- // CHECK:STDOUT: %Extra2.type: type = facet_type <@Extra2> [concrete]
- // CHECK:STDOUT: %Self.2ed: %Extra2.type = bind_symbolic_name Self, 0 [symbolic]
- // CHECK:STDOUT: %Extra3.type: type = facet_type <@Extra3> [concrete]
- // CHECK:STDOUT: %Self.622: %Extra3.type = bind_symbolic_name Self, 0 [symbolic]
- // CHECK:STDOUT: %Extra4.type: type = facet_type <@Extra4> [concrete]
- // CHECK:STDOUT: %Self.234: %Extra4.type = bind_symbolic_name Self, 0 [symbolic]
- // CHECK:STDOUT: %Extra5.type: type = facet_type <@Extra5> [concrete]
- // CHECK:STDOUT: %Self.d1b: %Extra5.type = bind_symbolic_name Self, 0 [symbolic]
- // CHECK:STDOUT: %Extra6.type: type = facet_type <@Extra6> [concrete]
- // CHECK:STDOUT: %Self.aeb: %Extra6.type = bind_symbolic_name Self, 0 [symbolic]
- // CHECK:STDOUT: %Extra7.type: type = facet_type <@Extra7> [concrete]
- // CHECK:STDOUT: %Self.b7e: %Extra7.type = bind_symbolic_name Self, 0 [symbolic]
- // CHECK:STDOUT: %Extra8.type: type = facet_type <@Extra8> [concrete]
- // CHECK:STDOUT: %Self.f90: %Extra8.type = bind_symbolic_name Self, 0 [symbolic]
- // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic]
- // CHECK:STDOUT: %pattern_type.98f: type = pattern_type type [concrete]
- // CHECK:STDOUT: %C.type: type = generic_class_type @C [concrete]
- // CHECK:STDOUT: %C.generic: %C.type = struct_value () [concrete]
- // CHECK:STDOUT: %C.f2e: type = class_type @C, @C(%T) [symbolic]
- // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete]
- // CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %empty_struct_type [concrete]
- // CHECK:STDOUT: %I.type: type = facet_type <@I> [concrete]
- // CHECK:STDOUT: %Self.826: %I.type = bind_symbolic_name Self, 0 [symbolic]
- // CHECK:STDOUT: %Self.as_type: type = facet_access_type %Self.826 [symbolic]
- // CHECK:STDOUT: %pattern_type.6de: type = pattern_type %Self.as_type [symbolic]
- // CHECK:STDOUT: %F.type.cf0: type = fn_type @F.1 [concrete]
- // CHECK:STDOUT: %F.bc6: %F.type.cf0 = struct_value () [concrete]
- // CHECK:STDOUT: %I.assoc_type: type = assoc_entity_type @I [concrete]
- // CHECK:STDOUT: %assoc0: %I.assoc_type = assoc_entity element0, @I.%F.decl [concrete]
- // CHECK:STDOUT: %tuple.type.c53: type = tuple_type (type, type, type, type, type, type, type, type) [concrete]
- // CHECK:STDOUT: %tuple.type.15d: type = tuple_type (%Extra1.type, %Extra2.type, %Extra3.type, %Extra4.type, %Extra5.type, %Extra6.type, %Extra7.type, %Extra8.type) [concrete]
- // CHECK:STDOUT: %C.69b: type = class_type @C, @C(%tuple.type.15d) [concrete]
- // CHECK:STDOUT: %I.impl_witness: <witness> = impl_witness file.%I.impl_witness_table [concrete]
- // CHECK:STDOUT: %pattern_type.e23: type = pattern_type %C.69b [concrete]
- // CHECK:STDOUT: %F.type.06f: type = fn_type @F.2 [concrete]
- // CHECK:STDOUT: %F.13c: %F.type.06f = struct_value () [concrete]
- // CHECK:STDOUT: %I.facet: %I.type = facet_value %C.69b, (%I.impl_witness) [concrete]
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: imports {
- // CHECK:STDOUT: %Core: <namespace> = namespace file.%Core.import, [concrete] {
- // CHECK:STDOUT: import Core//prelude
- // CHECK:STDOUT: import Core//prelude/...
- // CHECK:STDOUT: }
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: file {
- // CHECK:STDOUT: package: <namespace> = namespace [concrete] {
- // CHECK:STDOUT: .Core = imports.%Core
- // CHECK:STDOUT: .Extra1 = %Extra1.decl
- // CHECK:STDOUT: .Extra2 = %Extra2.decl
- // CHECK:STDOUT: .Extra3 = %Extra3.decl
- // CHECK:STDOUT: .Extra4 = %Extra4.decl
- // CHECK:STDOUT: .Extra5 = %Extra5.decl
- // CHECK:STDOUT: .Extra6 = %Extra6.decl
- // CHECK:STDOUT: .Extra7 = %Extra7.decl
- // CHECK:STDOUT: .Extra8 = %Extra8.decl
- // CHECK:STDOUT: .C = %C.decl
- // CHECK:STDOUT: .I = %I.decl
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %Core.import = import Core
- // CHECK:STDOUT: %Extra1.decl: type = interface_decl @Extra1 [concrete = constants.%Extra1.type] {} {}
- // CHECK:STDOUT: %Extra2.decl: type = interface_decl @Extra2 [concrete = constants.%Extra2.type] {} {}
- // CHECK:STDOUT: %Extra3.decl: type = interface_decl @Extra3 [concrete = constants.%Extra3.type] {} {}
- // CHECK:STDOUT: %Extra4.decl: type = interface_decl @Extra4 [concrete = constants.%Extra4.type] {} {}
- // CHECK:STDOUT: %Extra5.decl: type = interface_decl @Extra5 [concrete = constants.%Extra5.type] {} {}
- // CHECK:STDOUT: %Extra6.decl: type = interface_decl @Extra6 [concrete = constants.%Extra6.type] {} {}
- // CHECK:STDOUT: %Extra7.decl: type = interface_decl @Extra7 [concrete = constants.%Extra7.type] {} {}
- // CHECK:STDOUT: %Extra8.decl: type = interface_decl @Extra8 [concrete = constants.%Extra8.type] {} {}
- // CHECK:STDOUT: %C.decl: %C.type = class_decl @C [concrete = constants.%C.generic] {
- // CHECK:STDOUT: %T.patt: %pattern_type.98f = symbolic_binding_pattern T, 0 [concrete]
- // CHECK:STDOUT: } {
- // CHECK:STDOUT: %T.loc13_9.1: type = bind_symbolic_name T, 0 [symbolic = %T.loc13_9.2 (constants.%T)]
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %I.decl: type = interface_decl @I [concrete = constants.%I.type] {} {}
- // CHECK:STDOUT: impl_decl @impl [concrete] {} {
- // CHECK:STDOUT: %C.ref: %C.type = name_ref C, file.%C.decl [concrete = constants.%C.generic]
- // CHECK:STDOUT: %Extra1.ref: type = name_ref Extra1, file.%Extra1.decl [concrete = constants.%Extra1.type]
- // CHECK:STDOUT: %Extra2.ref: type = name_ref Extra2, file.%Extra2.decl [concrete = constants.%Extra2.type]
- // CHECK:STDOUT: %Extra3.ref: type = name_ref Extra3, file.%Extra3.decl [concrete = constants.%Extra3.type]
- // CHECK:STDOUT: %Extra4.ref: type = name_ref Extra4, file.%Extra4.decl [concrete = constants.%Extra4.type]
- // CHECK:STDOUT: %Extra5.ref: type = name_ref Extra5, file.%Extra5.decl [concrete = constants.%Extra5.type]
- // CHECK:STDOUT: %Extra6.ref: type = name_ref Extra6, file.%Extra6.decl [concrete = constants.%Extra6.type]
- // CHECK:STDOUT: %Extra7.ref: type = name_ref Extra7, file.%Extra7.decl [concrete = constants.%Extra7.type]
- // CHECK:STDOUT: %Extra8.ref: type = name_ref Extra8, file.%Extra8.decl [concrete = constants.%Extra8.type]
- // CHECK:STDOUT: %.loc16_71: %tuple.type.c53 = tuple_literal (%Extra1.ref, %Extra2.ref, %Extra3.ref, %Extra4.ref, %Extra5.ref, %Extra6.ref, %Extra7.ref, %Extra8.ref)
- // CHECK:STDOUT: %.loc16_72: type = converted %.loc16_71, constants.%tuple.type.15d [concrete = constants.%tuple.type.15d]
- // CHECK:STDOUT: %C: type = class_type @C, @C(constants.%tuple.type.15d) [concrete = constants.%C.69b]
- // CHECK:STDOUT: %I.ref: type = name_ref I, file.%I.decl [concrete = constants.%I.type]
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %I.impl_witness_table = impl_witness_table (@impl.%F.decl), @impl [concrete]
- // CHECK:STDOUT: %I.impl_witness: <witness> = impl_witness %I.impl_witness_table [concrete = constants.%I.impl_witness]
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: interface @Extra1 {
- // CHECK:STDOUT: %Self: %Extra1.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self.66c]
- // CHECK:STDOUT:
- // CHECK:STDOUT: !members:
- // CHECK:STDOUT: .Self = %Self
- // CHECK:STDOUT: witness = ()
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: interface @Extra2 {
- // CHECK:STDOUT: %Self: %Extra2.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self.2ed]
- // CHECK:STDOUT:
- // CHECK:STDOUT: !members:
- // CHECK:STDOUT: .Self = %Self
- // CHECK:STDOUT: witness = ()
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: interface @Extra3 {
- // CHECK:STDOUT: %Self: %Extra3.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self.622]
- // CHECK:STDOUT:
- // CHECK:STDOUT: !members:
- // CHECK:STDOUT: .Self = %Self
- // CHECK:STDOUT: witness = ()
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: interface @Extra4 {
- // CHECK:STDOUT: %Self: %Extra4.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self.234]
- // CHECK:STDOUT:
- // CHECK:STDOUT: !members:
- // CHECK:STDOUT: .Self = %Self
- // CHECK:STDOUT: witness = ()
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: interface @Extra5 {
- // CHECK:STDOUT: %Self: %Extra5.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self.d1b]
- // CHECK:STDOUT:
- // CHECK:STDOUT: !members:
- // CHECK:STDOUT: .Self = %Self
- // CHECK:STDOUT: witness = ()
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: interface @Extra6 {
- // CHECK:STDOUT: %Self: %Extra6.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self.aeb]
- // CHECK:STDOUT:
- // CHECK:STDOUT: !members:
- // CHECK:STDOUT: .Self = %Self
- // CHECK:STDOUT: witness = ()
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: interface @Extra7 {
- // CHECK:STDOUT: %Self: %Extra7.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self.b7e]
- // CHECK:STDOUT:
- // CHECK:STDOUT: !members:
- // CHECK:STDOUT: .Self = %Self
- // CHECK:STDOUT: witness = ()
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: interface @Extra8 {
- // CHECK:STDOUT: %Self: %Extra8.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self.f90]
- // CHECK:STDOUT:
- // CHECK:STDOUT: !members:
- // CHECK:STDOUT: .Self = %Self
- // CHECK:STDOUT: witness = ()
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: interface @I {
- // CHECK:STDOUT: %Self: %I.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self.826]
- // CHECK:STDOUT: %F.decl: %F.type.cf0 = fn_decl @F.1 [concrete = constants.%F.bc6] {
- // CHECK:STDOUT: %self.patt: @F.1.%pattern_type (%pattern_type.6de) = binding_pattern self [concrete]
- // CHECK:STDOUT: %self.param_patt: @F.1.%pattern_type (%pattern_type.6de) = value_param_pattern %self.patt, call_param0 [concrete]
- // CHECK:STDOUT: } {
- // CHECK:STDOUT: %self.param: @F.1.%Self.as_type.loc14_26.1 (%Self.as_type) = value_param call_param0
- // CHECK:STDOUT: %.loc14_26.1: type = splice_block %.loc14_26.2 [symbolic = %Self.as_type.loc14_26.1 (constants.%Self.as_type)] {
- // CHECK:STDOUT: %Self.ref: %I.type = name_ref Self, @I.%Self [symbolic = %Self (constants.%Self.826)]
- // CHECK:STDOUT: %Self.as_type.loc14_26.2: type = facet_access_type %Self.ref [symbolic = %Self.as_type.loc14_26.1 (constants.%Self.as_type)]
- // CHECK:STDOUT: %.loc14_26.2: type = converted %Self.ref, %Self.as_type.loc14_26.2 [symbolic = %Self.as_type.loc14_26.1 (constants.%Self.as_type)]
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %self: @F.1.%Self.as_type.loc14_26.1 (%Self.as_type) = bind_name self, %self.param
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %assoc0: %I.assoc_type = assoc_entity element0, %F.decl [concrete = constants.%assoc0]
- // CHECK:STDOUT:
- // CHECK:STDOUT: !members:
- // CHECK:STDOUT: .Self = %Self
- // CHECK:STDOUT: .F = %assoc0
- // CHECK:STDOUT: witness = (%F.decl)
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: impl @impl: %C as %I.ref {
- // CHECK:STDOUT: %F.decl: %F.type.06f = fn_decl @F.2 [concrete = constants.%F.13c] {
- // CHECK:STDOUT: %self.patt: %pattern_type.e23 = binding_pattern self [concrete]
- // CHECK:STDOUT: %self.param_patt: %pattern_type.e23 = value_param_pattern %self.patt, call_param0 [concrete]
- // CHECK:STDOUT: } {
- // CHECK:STDOUT: %self.param: %C.69b = value_param call_param0
- // CHECK:STDOUT: %Self.ref: type = name_ref Self, @impl.%C [concrete = constants.%C.69b]
- // CHECK:STDOUT: %self: %C.69b = bind_name self, %self.param
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: !members:
- // CHECK:STDOUT: .F = %F.decl
- // CHECK:STDOUT: witness = file.%I.impl_witness
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: generic class @C(%T.loc13_9.1: type) {
- // CHECK:STDOUT: %T.loc13_9.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc13_9.2 (constants.%T)]
- // CHECK:STDOUT:
- // CHECK:STDOUT: !definition:
- // CHECK:STDOUT:
- // CHECK:STDOUT: class {
- // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete = constants.%empty_struct_type]
- // CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %empty_struct_type [concrete = constants.%complete_type]
- // CHECK:STDOUT: complete_type_witness = %complete_type
- // CHECK:STDOUT:
- // CHECK:STDOUT: !members:
- // CHECK:STDOUT: .Self = constants.%C.f2e
- // CHECK:STDOUT: }
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: generic fn @F.1(@I.%Self: %I.type) {
- // CHECK:STDOUT: %Self: %I.type = bind_symbolic_name Self, 0 [symbolic = %Self (constants.%Self.826)]
- // CHECK:STDOUT: %Self.as_type.loc14_26.1: type = facet_access_type %Self [symbolic = %Self.as_type.loc14_26.1 (constants.%Self.as_type)]
- // CHECK:STDOUT: %pattern_type: type = pattern_type %Self.as_type.loc14_26.1 [symbolic = %pattern_type (constants.%pattern_type.6de)]
- // CHECK:STDOUT:
- // CHECK:STDOUT: fn(%self.param: @F.1.%Self.as_type.loc14_26.1 (%Self.as_type));
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: fn @F.2(%self.param: %C.69b) {
- // CHECK:STDOUT: !entry:
- // CHECK:STDOUT: return
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: specific @C(constants.%T) {
- // CHECK:STDOUT: %T.loc13_9.2 => constants.%T
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: specific @F.1(constants.%Self.826) {
- // CHECK:STDOUT: %Self => constants.%Self.826
- // CHECK:STDOUT: %Self.as_type.loc14_26.1 => constants.%Self.as_type
- // CHECK:STDOUT: %pattern_type => constants.%pattern_type.6de
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: specific @C(constants.%tuple.type.15d) {
- // CHECK:STDOUT: %T.loc13_9.2 => constants.%tuple.type.15d
- // CHECK:STDOUT:
- // CHECK:STDOUT: !definition:
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: specific @F.1(constants.%I.facet) {
- // CHECK:STDOUT: %Self => constants.%I.facet
- // CHECK:STDOUT: %Self.as_type.loc14_26.1 => constants.%C.69b
- // CHECK:STDOUT: %pattern_type => constants.%pattern_type.e23
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: --- fail_use_has_extra_interfaces.carbon
- // CHECK:STDOUT:
- // CHECK:STDOUT: constants {
- // CHECK:STDOUT: %C.type: type = generic_class_type @C [concrete]
- // CHECK:STDOUT: %C.generic: %C.type = struct_value () [concrete]
- // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete]
- // CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %empty_struct_type [concrete]
- // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic]
- // CHECK:STDOUT: %C.42e: type = class_type @C, @C(type) [concrete]
- // CHECK:STDOUT: %pattern_type.6e4: type = pattern_type %C.42e [concrete]
- // CHECK:STDOUT: %Test.type: type = fn_type @Test [concrete]
- // CHECK:STDOUT: %Test: %Test.type = struct_value () [concrete]
- // CHECK:STDOUT: %I.type: type = facet_type <@I> [concrete]
- // CHECK:STDOUT: %Self.013: %I.type = bind_symbolic_name Self, 0 [symbolic]
- // CHECK:STDOUT: %I.assoc_type: type = assoc_entity_type @I [concrete]
- // CHECK:STDOUT: %assoc0: %I.assoc_type = assoc_entity element0, imports.%HasExtraInterfaces.import_ref.d54 [concrete]
- // CHECK:STDOUT: %F.type: type = fn_type @F [concrete]
- // CHECK:STDOUT: %F: %F.type = struct_value () [concrete]
- // CHECK:STDOUT: %Self.as_type: type = facet_access_type %Self.013 [symbolic]
- // CHECK:STDOUT: %pattern_type.e10: type = pattern_type %Self.as_type [symbolic]
- // CHECK:STDOUT: %Extra8.type: type = facet_type <@Extra8> [concrete]
- // CHECK:STDOUT: %Extra7.type: type = facet_type <@Extra7> [concrete]
- // CHECK:STDOUT: %Extra6.type: type = facet_type <@Extra6> [concrete]
- // CHECK:STDOUT: %Extra5.type: type = facet_type <@Extra5> [concrete]
- // CHECK:STDOUT: %Extra4.type: type = facet_type <@Extra4> [concrete]
- // CHECK:STDOUT: %Extra3.type: type = facet_type <@Extra3> [concrete]
- // CHECK:STDOUT: %Extra2.type: type = facet_type <@Extra2> [concrete]
- // CHECK:STDOUT: %Extra1.type: type = facet_type <@Extra1> [concrete]
- // CHECK:STDOUT: %tuple.type: type = tuple_type (%Extra1.type, %Extra2.type, %Extra3.type, %Extra4.type, %Extra5.type, %Extra6.type, %Extra7.type, %Extra8.type) [concrete]
- // CHECK:STDOUT: %C.074: type = class_type @C, @C(%tuple.type) [concrete]
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: imports {
- // CHECK:STDOUT: %Core: <namespace> = namespace file.%Core.import, [concrete] {
- // CHECK:STDOUT: import Core//prelude
- // CHECK:STDOUT: import Core//prelude/...
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %HasExtraInterfaces: <namespace> = namespace file.%HasExtraInterfaces.import, [concrete] {
- // CHECK:STDOUT: .C = %HasExtraInterfaces.C
- // CHECK:STDOUT: .I = %HasExtraInterfaces.I
- // CHECK:STDOUT: import HasExtraInterfaces//default
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %HasExtraInterfaces.C: %C.type = import_ref HasExtraInterfaces//default, C, loaded [concrete = constants.%C.generic]
- // CHECK:STDOUT: %HasExtraInterfaces.import_ref.5ab: type = import_ref HasExtraInterfaces//default, loc13_9, loaded [symbolic = @C.%T (constants.%T)]
- // CHECK:STDOUT: %HasExtraInterfaces.import_ref.8f2: <witness> = import_ref HasExtraInterfaces//default, loc13_20, loaded [concrete = constants.%complete_type]
- // CHECK:STDOUT: %HasExtraInterfaces.import_ref.4c0 = import_ref HasExtraInterfaces//default, inst66 [no loc], unloaded
- // CHECK:STDOUT: %HasExtraInterfaces.I: type = import_ref HasExtraInterfaces//default, I, loaded [concrete = constants.%I.type]
- // CHECK:STDOUT: %HasExtraInterfaces.import_ref.e5d = import_ref HasExtraInterfaces//default, inst73 [no loc], unloaded
- // CHECK:STDOUT: %HasExtraInterfaces.import_ref.be9: %I.assoc_type = import_ref HasExtraInterfaces//default, loc14_33, loaded [concrete = constants.%assoc0]
- // CHECK:STDOUT: %HasExtraInterfaces.F = import_ref HasExtraInterfaces//default, F, unloaded
- // CHECK:STDOUT: %HasExtraInterfaces.import_ref.d54: %F.type = import_ref HasExtraInterfaces//default, loc14_33, loaded [concrete = constants.%F]
- // CHECK:STDOUT: %HasExtraInterfaces.import_ref.1db: %I.type = import_ref HasExtraInterfaces//default, inst73 [no loc], loaded [symbolic = constants.%Self.013]
- // CHECK:STDOUT: %HasExtraInterfaces.import_ref.bca = import_ref HasExtraInterfaces//default, loc16_79, unloaded
- // CHECK:STDOUT: %HasExtraInterfaces.import_ref.9c8 = import_ref HasExtraInterfaces//default, inst54 [no loc], unloaded
- // CHECK:STDOUT: %HasExtraInterfaces.import_ref.dfe = import_ref HasExtraInterfaces//default, inst49 [no loc], unloaded
- // CHECK:STDOUT: %HasExtraInterfaces.import_ref.6b6 = import_ref HasExtraInterfaces//default, inst44 [no loc], unloaded
- // CHECK:STDOUT: %HasExtraInterfaces.import_ref.576 = import_ref HasExtraInterfaces//default, inst39 [no loc], unloaded
- // CHECK:STDOUT: %HasExtraInterfaces.import_ref.0dd = import_ref HasExtraInterfaces//default, inst34 [no loc], unloaded
- // CHECK:STDOUT: %HasExtraInterfaces.import_ref.f83 = import_ref HasExtraInterfaces//default, inst29 [no loc], unloaded
- // CHECK:STDOUT: %HasExtraInterfaces.import_ref.975 = import_ref HasExtraInterfaces//default, inst24 [no loc], unloaded
- // CHECK:STDOUT: %HasExtraInterfaces.import_ref.a3c = import_ref HasExtraInterfaces//default, inst19 [no loc], unloaded
- // CHECK:STDOUT: %HasExtraInterfaces.import_ref.aa8: type = import_ref HasExtraInterfaces//default, loc16_72, loaded [concrete = constants.%C.074]
- // CHECK:STDOUT: %HasExtraInterfaces.import_ref.301: type = import_ref HasExtraInterfaces//default, loc16_77, loaded [concrete = constants.%I.type]
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: file {
- // CHECK:STDOUT: package: <namespace> = namespace [concrete] {
- // CHECK:STDOUT: .Core = imports.%Core
- // CHECK:STDOUT: .HasExtraInterfaces = imports.%HasExtraInterfaces
- // CHECK:STDOUT: .Test = %Test.decl
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %Core.import = import Core
- // CHECK:STDOUT: %HasExtraInterfaces.import = import HasExtraInterfaces
- // CHECK:STDOUT: %Test.decl: %Test.type = fn_decl @Test [concrete = constants.%Test] {
- // CHECK:STDOUT: %c.patt: %pattern_type.6e4 = binding_pattern c [concrete]
- // CHECK:STDOUT: %c.param_patt: %pattern_type.6e4 = value_param_pattern %c.patt, call_param0 [concrete]
- // CHECK:STDOUT: } {
- // CHECK:STDOUT: %c.param: %C.42e = value_param call_param0
- // CHECK:STDOUT: %.loc5: type = splice_block %C [concrete = constants.%C.42e] {
- // CHECK:STDOUT: %HasExtraInterfaces.ref.loc5: <namespace> = name_ref HasExtraInterfaces, imports.%HasExtraInterfaces [concrete = imports.%HasExtraInterfaces]
- // CHECK:STDOUT: %C.ref: %C.type = name_ref C, imports.%HasExtraInterfaces.C [concrete = constants.%C.generic]
- // CHECK:STDOUT: %C: type = class_type @C, @C(type) [concrete = constants.%C.42e]
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %c: %C.42e = bind_name c, %c.param
- // CHECK:STDOUT: }
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: interface @I [from "has_extra_interfaces.carbon"] {
- // CHECK:STDOUT: !members:
- // CHECK:STDOUT: .Self = imports.%HasExtraInterfaces.import_ref.e5d
- // CHECK:STDOUT: .F = imports.%HasExtraInterfaces.import_ref.be9
- // CHECK:STDOUT: witness = (imports.%HasExtraInterfaces.F)
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: interface @Extra8 [from "has_extra_interfaces.carbon"] {
- // CHECK:STDOUT: !members:
- // CHECK:STDOUT: .Self = imports.%HasExtraInterfaces.import_ref.9c8
- // CHECK:STDOUT: witness = ()
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: interface @Extra7 [from "has_extra_interfaces.carbon"] {
- // CHECK:STDOUT: !members:
- // CHECK:STDOUT: .Self = imports.%HasExtraInterfaces.import_ref.dfe
- // CHECK:STDOUT: witness = ()
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: interface @Extra6 [from "has_extra_interfaces.carbon"] {
- // CHECK:STDOUT: !members:
- // CHECK:STDOUT: .Self = imports.%HasExtraInterfaces.import_ref.6b6
- // CHECK:STDOUT: witness = ()
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: interface @Extra5 [from "has_extra_interfaces.carbon"] {
- // CHECK:STDOUT: !members:
- // CHECK:STDOUT: .Self = imports.%HasExtraInterfaces.import_ref.576
- // CHECK:STDOUT: witness = ()
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: interface @Extra4 [from "has_extra_interfaces.carbon"] {
- // CHECK:STDOUT: !members:
- // CHECK:STDOUT: .Self = imports.%HasExtraInterfaces.import_ref.0dd
- // CHECK:STDOUT: witness = ()
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: interface @Extra3 [from "has_extra_interfaces.carbon"] {
- // CHECK:STDOUT: !members:
- // CHECK:STDOUT: .Self = imports.%HasExtraInterfaces.import_ref.f83
- // CHECK:STDOUT: witness = ()
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: interface @Extra2 [from "has_extra_interfaces.carbon"] {
- // CHECK:STDOUT: !members:
- // CHECK:STDOUT: .Self = imports.%HasExtraInterfaces.import_ref.975
- // CHECK:STDOUT: witness = ()
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: interface @Extra1 [from "has_extra_interfaces.carbon"] {
- // CHECK:STDOUT: !members:
- // CHECK:STDOUT: .Self = imports.%HasExtraInterfaces.import_ref.a3c
- // CHECK:STDOUT: witness = ()
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: impl @impl: imports.%HasExtraInterfaces.import_ref.aa8 as imports.%HasExtraInterfaces.import_ref.301 [from "has_extra_interfaces.carbon"] {
- // CHECK:STDOUT: !members:
- // CHECK:STDOUT: witness = imports.%HasExtraInterfaces.import_ref.bca
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: generic class @C(imports.%HasExtraInterfaces.import_ref.5ab: type) [from "has_extra_interfaces.carbon"] {
- // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic = %T (constants.%T)]
- // CHECK:STDOUT:
- // CHECK:STDOUT: !definition:
- // CHECK:STDOUT:
- // CHECK:STDOUT: class {
- // CHECK:STDOUT: complete_type_witness = imports.%HasExtraInterfaces.import_ref.8f2
- // CHECK:STDOUT:
- // CHECK:STDOUT: !members:
- // CHECK:STDOUT: .Self = imports.%HasExtraInterfaces.import_ref.4c0
- // CHECK:STDOUT: }
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: fn @Test(%c.param: %C.42e) {
- // CHECK:STDOUT: !entry:
- // CHECK:STDOUT: %c.ref: %C.42e = name_ref c, %c
- // CHECK:STDOUT: %HasExtraInterfaces.ref.loc12: <namespace> = name_ref HasExtraInterfaces, imports.%HasExtraInterfaces [concrete = imports.%HasExtraInterfaces]
- // CHECK:STDOUT: %I.ref: type = name_ref I, imports.%HasExtraInterfaces.I [concrete = constants.%I.type]
- // CHECK:STDOUT: %F.ref: %I.assoc_type = name_ref F, imports.%HasExtraInterfaces.import_ref.be9 [concrete = constants.%assoc0]
- // CHECK:STDOUT: return
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: generic fn @F(imports.%HasExtraInterfaces.import_ref.1db: %I.type) [from "has_extra_interfaces.carbon"] {
- // CHECK:STDOUT: %Self: %I.type = bind_symbolic_name Self, 0 [symbolic = %Self (constants.%Self.013)]
- // CHECK:STDOUT: %Self.as_type: type = facet_access_type %Self [symbolic = %Self.as_type (constants.%Self.as_type)]
- // CHECK:STDOUT: %pattern_type: type = pattern_type %Self.as_type [symbolic = %pattern_type (constants.%pattern_type.e10)]
- // CHECK:STDOUT:
- // CHECK:STDOUT: fn;
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: specific @C(constants.%T) {
- // CHECK:STDOUT: %T => constants.%T
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: specific @C(type) {
- // CHECK:STDOUT: %T => type
- // CHECK:STDOUT:
- // CHECK:STDOUT: !definition:
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: specific @F(constants.%Self.013) {
- // CHECK:STDOUT: %Self => constants.%Self.013
- // CHECK:STDOUT: %Self.as_type => constants.%Self.as_type
- // CHECK:STDOUT: %pattern_type => constants.%pattern_type.e10
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: specific @C(constants.%tuple.type) {
- // CHECK:STDOUT: %T => constants.%tuple.type
- // CHECK:STDOUT:
- // CHECK:STDOUT: !definition:
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
|