| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984 |
- // 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/primitives.carbon
- // 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/interop/cpp/function/overloads.carbon
- // TIP: To dump output, run:
- // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/check/testdata/interop/cpp/function/overloads.carbon
- // ============================================================================
- // Overloaded sets tests
- // ============================================================================
- // --- multiple_functions_no_overloads.h
- auto foo(short a) -> void;
- auto bar(short a) -> void;
- // --- import_multiple_functions_no_overloads.carbon
- library "[[@TEST_NAME]]";
- import Cpp library "multiple_functions_no_overloads.h";
- fn F() {
- Cpp.bar(1 as i16);
- }
- // --- overloaded_functions.h
- auto foo(short a) -> void;
- auto foo(int a) -> void;
- // --- import_overloaded_functions.carbon
- library "[[@TEST_NAME]]";
- import Cpp library "overloaded_functions.h";
- fn F() {
- Cpp.foo(1 as i32);
- }
- // --- both_overloaded_functions_called.h
- auto foo(short a) -> void;
- auto foo(int a) -> void;
- // --- import_both_overloaded_functions_called.carbon
- library "[[@TEST_NAME]]";
- import Cpp library "both_overloaded_functions_called.h";
- fn F() {
- Cpp.foo(1 as i32);
- Cpp.foo(1 as i16);
- }
- // --- multiple_overloaded_sets.h
- auto foo(short a) -> void;
- auto foo(int a) -> void;
- auto bar(long a) -> void;
- auto bar(int a) -> void;
- // --- import_multiple_overloaded_sets.carbon
- library "[[@TEST_NAME]]";
- import Cpp library "multiple_overloaded_sets.h";
- fn F() {
- Cpp.foo(1 as i32);
- Cpp.bar(1 as i32);
- }
- // ============================================================================
- // Call args tests
- // ============================================================================
- // --- int_literal.h
- auto foo(int a) -> int;
- auto foo(unsigned int a) -> unsigned int;
- auto foo(long a) -> long;
- auto foo(unsigned long a) -> unsigned long;
- auto foo(long long a) -> long long;
- auto foo(unsigned long long a) -> unsigned long long;
- auto foo(__int128 a) -> __int128;
- auto foo(unsigned __int128 a) -> unsigned __int128;
- // --- import_int_literal.carbon
- library "[[@TEST_NAME]]";
- import Cpp library "int_literal.h";
- fn F() {
- // i32_max
- let a: i32 = Cpp.foo(2147483647);
- // i32_max + 1
- // It could fit to unsigned int, but only signed integers are considered, so assigned to long.
- // Decimal, hexadecimal and binary integer literals are treated the same when assigning a C++ type.
- let b: i64 = Cpp.foo(2147483648);
- let b_hexa: i64 = Cpp.foo(0x8000_0000);
- let b_binary: i64 = Cpp.foo(0b1000_0000_0000_0000_0000_0000_0000_0000);
- // i64_max
- let c: i64 = Cpp.foo(9223372036854775807);
- // i64_max + 1
- // Could fit to unsigned long, but only signed integers are considered, so fitted to _int128.
- let d: i128 = Cpp.foo(9223372036854775808);
- // u64_max
- let e: i128 = Cpp.foo(18446744073709551615);
- // u64_max + 1
- let f: i128 = Cpp.foo(18446744073709551616);
- // i128_max
- let g: i128 = Cpp.foo(170141183460469231731687303715884105727);
- }
- // --- fail_import_large_int_literal.carbon
- library "[[@TEST_NAME]]";
- import Cpp library "int_literal.h";
- fn F() {
- // TODO: get rid of the second error message here.
- // i128_max + 1
- // CHECK:STDERR: fail_import_large_int_literal.carbon:[[@LINE+8]]:25: error: integer value 170141183460469231731687303715884105728 too large to fit in a signed C++ integer type; requires 129 bits, but max is 128 [IntTooLargeForCppType]
- // CHECK:STDERR: let h: i128 = Cpp.foo(170141183460469231731687303715884105728);
- // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- // CHECK:STDERR:
- // CHECK:STDERR: fail_import_large_int_literal.carbon:[[@LINE+4]]:25: error: call argument of type `Core.IntLiteral` is not supported [CppCallArgTypeNotSupported]
- // CHECK:STDERR: let h: i128 = Cpp.foo(170141183460469231731687303715884105728);
- // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- // CHECK:STDERR:
- let h: i128 = Cpp.foo(170141183460469231731687303715884105728);
- }
- // --- negative_int_literal.h
- auto foo(long a) -> void;
- auto foo(int a) -> void;
- // --- import_negative_int_literal.carbon
- library "[[@TEST_NAME]]";
- import Cpp library "negative_int_literal.h";
- fn F() {
- // selects `auto foo(int a) -> void;`
- Cpp.foo(-1);
- }
- // --- negative_literal_passed_to_unsigned.h
- auto foo(unsigned int a) -> void;
- // --- fail_import_negative_literal_passed_to_unsigned.carbon
- library "[[@TEST_NAME]]";
- import Cpp library "negative_literal_passed_to_unsigned.h";
- fn F() {
- // CHECK:STDERR: fail_import_negative_literal_passed_to_unsigned.carbon:[[@LINE+8]]:11: error: negative integer value -1 converted to unsigned type `u32` [NegativeIntInUnsignedType]
- // CHECK:STDERR: Cpp.foo(-1);
- // CHECK:STDERR: ^~
- // CHECK:STDERR: fail_import_negative_literal_passed_to_unsigned.carbon:[[@LINE-6]]:10: in file included here [InCppInclude]
- // CHECK:STDERR: ./negative_literal_passed_to_unsigned.h:2:23: note: initializing function parameter [InCallToFunctionParam]
- // CHECK:STDERR: auto foo(unsigned int a) -> void;
- // CHECK:STDERR: ^
- // CHECK:STDERR:
- Cpp.foo(-1);
- }
- // --- floating_point_literal.h
- auto foo(float a) -> float;
- auto foo(double a) -> double;
- // --- import_floating_point_literal.carbon
- library "[[@TEST_NAME]]";
- import Cpp library "floating_point_literal.h";
- fn F() {
- let d: f64 = Cpp.foo(1.0);
- }
- // --- fail_import_large_floating_point_literal.carbon
- library "[[@TEST_NAME]]";
- import Cpp library "floating_point_literal.h";
- fn F() {
- // CHECK:STDERR: fail_import_large_floating_point_literal.carbon:[[@LINE+8]]:11: error: value 18*10^307 too large for floating-point type `f64` [FloatLiteralTooLargeForType]
- // CHECK:STDERR: Cpp.foo(1.8e+308);
- // CHECK:STDERR: ^~~~~~~~
- // CHECK:STDERR: fail_import_large_floating_point_literal.carbon:[[@LINE-6]]:10: in file included here [InCppInclude]
- // CHECK:STDERR: ./floating_point_literal.h:3:17: note: initializing function parameter [InCallToFunctionParam]
- // CHECK:STDERR: auto foo(double a) -> double;
- // CHECK:STDERR: ^
- // CHECK:STDERR:
- Cpp.foo(1.8e+308);
- }
- // --- struct_init.h
- struct NoFields {};
- auto PassNoFields(NoFields s) -> void;
- struct ThreeFields {
- int a, b, c;
- };
- auto PassThreeFields(ThreeFields t) -> void;
- // --- struct_init.carbon
- library "[[@TEST_NAME]]";
- import Cpp library "struct_init.h";
- fn MakeEmpty() -> {};
- fn Empty(value: {}, ref reference: {}) {
- Cpp.PassNoFields({});
- Cpp.PassNoFields(value);
- Cpp.PassNoFields(reference);
- Cpp.PassNoFields(MakeEmpty());
- }
- // --- fail_todo_struct_init_nonempty.carbon
- library "[[@TEST_NAME]]";
- import Cpp library "struct_init.h";
- fn MakeThreeFields() -> {.a: i32, .b: i32, .c: i32};
- fn ThreeFields(value: {.a: i32, .b: i32, .c: i32}, ref reference: {.a: i32, .b: i32, .c: i32}) {
- // CHECK:STDERR: fail_todo_struct_init_nonempty.carbon:[[@LINE+11]]:23: error: cannot implicitly convert expression of type `{.a: Core.IntLiteral, .b: Core.IntLiteral, .c: Core.IntLiteral}` to `Cpp.ThreeFields` [ConversionFailure]
- // CHECK:STDERR: Cpp.PassThreeFields({.a = 1, .b = 2, .c = 3});
- // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~
- // CHECK:STDERR: fail_todo_struct_init_nonempty.carbon:[[@LINE+8]]:23: note: type `{.a: Core.IntLiteral, .b: Core.IntLiteral, .c: Core.IntLiteral}` does not implement interface `Core.ImplicitAs(Cpp.ThreeFields)` [MissingImplInMemberAccessNote]
- // CHECK:STDERR: Cpp.PassThreeFields({.a = 1, .b = 2, .c = 3});
- // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~
- // CHECK:STDERR: fail_todo_struct_init_nonempty.carbon:[[@LINE-11]]:10: in file included here [InCppInclude]
- // CHECK:STDERR: ./struct_init.h:10:34: note: initializing function parameter [InCallToFunctionParam]
- // CHECK:STDERR: auto PassThreeFields(ThreeFields t) -> void;
- // CHECK:STDERR: ^
- // CHECK:STDERR:
- Cpp.PassThreeFields({.a = 1, .b = 2, .c = 3});
- // CHECK:STDERR: fail_todo_struct_init_nonempty.carbon:[[@LINE+11]]:23: error: cannot implicitly convert expression of type `{.a: i32, .b: i32, .c: i32}` to `Cpp.ThreeFields` [ConversionFailure]
- // CHECK:STDERR: Cpp.PassThreeFields(value);
- // CHECK:STDERR: ^~~~~
- // CHECK:STDERR: fail_todo_struct_init_nonempty.carbon:[[@LINE+8]]:23: note: type `{.a: i32, .b: i32, .c: i32}` does not implement interface `Core.ImplicitAs(Cpp.ThreeFields)` [MissingImplInMemberAccessNote]
- // CHECK:STDERR: Cpp.PassThreeFields(value);
- // CHECK:STDERR: ^~~~~
- // CHECK:STDERR: fail_todo_struct_init_nonempty.carbon:[[@LINE-24]]:10: in file included here [InCppInclude]
- // CHECK:STDERR: ./struct_init.h:10:34: note: initializing function parameter [InCallToFunctionParam]
- // CHECK:STDERR: auto PassThreeFields(ThreeFields t) -> void;
- // CHECK:STDERR: ^
- // CHECK:STDERR:
- Cpp.PassThreeFields(value);
- // CHECK:STDERR: fail_todo_struct_init_nonempty.carbon:[[@LINE+11]]:23: error: cannot implicitly convert expression of type `{.a: i32, .b: i32, .c: i32}` to `Cpp.ThreeFields` [ConversionFailure]
- // CHECK:STDERR: Cpp.PassThreeFields(reference);
- // CHECK:STDERR: ^~~~~~~~~
- // CHECK:STDERR: fail_todo_struct_init_nonempty.carbon:[[@LINE+8]]:23: note: type `{.a: i32, .b: i32, .c: i32}` does not implement interface `Core.ImplicitAs(Cpp.ThreeFields)` [MissingImplInMemberAccessNote]
- // CHECK:STDERR: Cpp.PassThreeFields(reference);
- // CHECK:STDERR: ^~~~~~~~~
- // CHECK:STDERR: fail_todo_struct_init_nonempty.carbon:[[@LINE-37]]:10: in file included here [InCppInclude]
- // CHECK:STDERR: ./struct_init.h:10:34: note: initializing function parameter [InCallToFunctionParam]
- // CHECK:STDERR: auto PassThreeFields(ThreeFields t) -> void;
- // CHECK:STDERR: ^
- // CHECK:STDERR:
- Cpp.PassThreeFields(reference);
- // CHECK:STDERR: fail_todo_struct_init_nonempty.carbon:[[@LINE+11]]:23: error: cannot implicitly convert expression of type `{.a: i32, .b: i32, .c: i32}` to `Cpp.ThreeFields` [ConversionFailure]
- // CHECK:STDERR: Cpp.PassThreeFields(MakeThreeFields());
- // CHECK:STDERR: ^~~~~~~~~~~~~~~~~
- // CHECK:STDERR: fail_todo_struct_init_nonempty.carbon:[[@LINE+8]]:23: note: type `{.a: i32, .b: i32, .c: i32}` does not implement interface `Core.ImplicitAs(Cpp.ThreeFields)` [MissingImplInMemberAccessNote]
- // CHECK:STDERR: Cpp.PassThreeFields(MakeThreeFields());
- // CHECK:STDERR: ^~~~~~~~~~~~~~~~~
- // CHECK:STDERR: fail_todo_struct_init_nonempty.carbon:[[@LINE-50]]:10: in file included here [InCppInclude]
- // CHECK:STDERR: ./struct_init.h:10:34: note: initializing function parameter [InCallToFunctionParam]
- // CHECK:STDERR: auto PassThreeFields(ThreeFields t) -> void;
- // CHECK:STDERR: ^
- // CHECK:STDERR:
- Cpp.PassThreeFields(MakeThreeFields());
- // CHECK:STDERR: fail_todo_struct_init_nonempty.carbon:[[@LINE+11]]:23: error: cannot implicitly convert expression of type `{.b: Core.IntLiteral, .c: Core.IntLiteral, .a: Core.IntLiteral}` to `Cpp.ThreeFields` [ConversionFailure]
- // CHECK:STDERR: Cpp.PassThreeFields({.b = 1, .c = 2, .a = 3});
- // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~
- // CHECK:STDERR: fail_todo_struct_init_nonempty.carbon:[[@LINE+8]]:23: note: type `{.b: Core.IntLiteral, .c: Core.IntLiteral, .a: Core.IntLiteral}` does not implement interface `Core.ImplicitAs(Cpp.ThreeFields)` [MissingImplInMemberAccessNote]
- // CHECK:STDERR: Cpp.PassThreeFields({.b = 1, .c = 2, .a = 3});
- // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~
- // CHECK:STDERR: fail_todo_struct_init_nonempty.carbon:[[@LINE-63]]:10: in file included here [InCppInclude]
- // CHECK:STDERR: ./struct_init.h:10:34: note: initializing function parameter [InCallToFunctionParam]
- // CHECK:STDERR: auto PassThreeFields(ThreeFields t) -> void;
- // CHECK:STDERR: ^
- // CHECK:STDERR:
- Cpp.PassThreeFields({.b = 1, .c = 2, .a = 3});
- }
- // --- fail_struct_init_field_mismatch.carbon
- library "[[@TEST_NAME]]";
- import Cpp library "struct_init.h";
- fn F() {
- // CHECK:STDERR: fail_struct_init_field_mismatch.carbon:[[@LINE+8]]:55: error: no matching function for call to 'PassThreeFields' [CppInteropParseError]
- // CHECK:STDERR: 15 | Cpp.PassThreeFields({.a = 1, .b = 2, .c = 3, .d = 4});
- // CHECK:STDERR: | ^
- // CHECK:STDERR: fail_struct_init_field_mismatch.carbon:[[@LINE-6]]:10: in file included here [InCppInclude]
- // CHECK:STDERR: ./struct_init.h:10:6: note: candidate function not viable: cannot convert initializer list argument to 'ThreeFields' [CppInteropParseNote]
- // CHECK:STDERR: 10 | auto PassThreeFields(ThreeFields t) -> void;
- // CHECK:STDERR: | ^ ~~~~~~~~~~~~~
- // CHECK:STDERR:
- Cpp.PassThreeFields({.a = 1, .b = 2, .c = 3, .d = 4});
- // CHECK:STDERR: fail_struct_init_field_mismatch.carbon:[[@LINE+8]]:47: error: no matching function for call to 'PassThreeFields' [CppInteropParseError]
- // CHECK:STDERR: 25 | Cpp.PassThreeFields({.a = 1, .x = 2, .c = 3});
- // CHECK:STDERR: | ^
- // CHECK:STDERR: fail_struct_init_field_mismatch.carbon:[[@LINE-16]]:10: in file included here [InCppInclude]
- // CHECK:STDERR: ./struct_init.h:10:6: note: candidate function not viable: cannot convert initializer list argument to 'ThreeFields' [CppInteropParseNote]
- // CHECK:STDERR: 10 | auto PassThreeFields(ThreeFields t) -> void;
- // CHECK:STDERR: | ^ ~~~~~~~~~~~~~
- // CHECK:STDERR:
- Cpp.PassThreeFields({.a = 1, .x = 2, .c = 3});
- }
- // --- fail_struct_init_unsupported_field_name.carbon
- library "[[@TEST_NAME]]";
- import Cpp library "struct_init.h";
- fn F() {
- // CHECK:STDERR: fail_struct_init_unsupported_field_name.carbon:[[@LINE+4]]:23: error: field name `base` cannot be mapped into C++ [CppCallFieldNameNotSupported]
- // CHECK:STDERR: Cpp.PassThreeFields({.base = 1});
- // CHECK:STDERR: ^~~~~~~~~~~
- // CHECK:STDERR:
- Cpp.PassThreeFields({.base = 1});
- }
- // --- fail_struct_init_from_tuple.carbon
- library "[[@TEST_NAME]]";
- import Cpp library "struct_init.h";
- // TODO: Struct init from an undesignated list is allowed in C++, but not in
- // Carbon. Should we allow it when initializing a C++ class type?
- fn MakeEmpty() -> ();
- fn Empty(value: (), ref reference: ()) {
- // CHECK:STDERR: fail_struct_init_from_tuple.carbon:[[@LINE+11]]:20: error: cannot implicitly convert expression of type `()` to `Cpp.NoFields` [ConversionFailure]
- // CHECK:STDERR: Cpp.PassNoFields(());
- // CHECK:STDERR: ^~
- // CHECK:STDERR: fail_struct_init_from_tuple.carbon:[[@LINE+8]]:20: note: type `()` does not implement interface `Core.ImplicitAs(Cpp.NoFields)` [MissingImplInMemberAccessNote]
- // CHECK:STDERR: Cpp.PassNoFields(());
- // CHECK:STDERR: ^~
- // CHECK:STDERR: fail_struct_init_from_tuple.carbon:[[@LINE-14]]:10: in file included here [InCppInclude]
- // CHECK:STDERR: ./struct_init.h:4:28: note: initializing function parameter [InCallToFunctionParam]
- // CHECK:STDERR: auto PassNoFields(NoFields s) -> void;
- // CHECK:STDERR: ^
- // CHECK:STDERR:
- Cpp.PassNoFields(());
- // CHECK:STDERR: fail_struct_init_from_tuple.carbon:[[@LINE+11]]:20: error: cannot implicitly convert expression of type `()` to `Cpp.NoFields` [ConversionFailure]
- // CHECK:STDERR: Cpp.PassNoFields(value);
- // CHECK:STDERR: ^~~~~
- // CHECK:STDERR: fail_struct_init_from_tuple.carbon:[[@LINE+8]]:20: note: type `()` does not implement interface `Core.ImplicitAs(Cpp.NoFields)` [MissingImplInMemberAccessNote]
- // CHECK:STDERR: Cpp.PassNoFields(value);
- // CHECK:STDERR: ^~~~~
- // CHECK:STDERR: fail_struct_init_from_tuple.carbon:[[@LINE-27]]:10: in file included here [InCppInclude]
- // CHECK:STDERR: ./struct_init.h:4:28: note: initializing function parameter [InCallToFunctionParam]
- // CHECK:STDERR: auto PassNoFields(NoFields s) -> void;
- // CHECK:STDERR: ^
- // CHECK:STDERR:
- Cpp.PassNoFields(value);
- // CHECK:STDERR: fail_struct_init_from_tuple.carbon:[[@LINE+11]]:20: error: cannot implicitly convert expression of type `()` to `Cpp.NoFields` [ConversionFailure]
- // CHECK:STDERR: Cpp.PassNoFields(reference);
- // CHECK:STDERR: ^~~~~~~~~
- // CHECK:STDERR: fail_struct_init_from_tuple.carbon:[[@LINE+8]]:20: note: type `()` does not implement interface `Core.ImplicitAs(Cpp.NoFields)` [MissingImplInMemberAccessNote]
- // CHECK:STDERR: Cpp.PassNoFields(reference);
- // CHECK:STDERR: ^~~~~~~~~
- // CHECK:STDERR: fail_struct_init_from_tuple.carbon:[[@LINE-40]]:10: in file included here [InCppInclude]
- // CHECK:STDERR: ./struct_init.h:4:28: note: initializing function parameter [InCallToFunctionParam]
- // CHECK:STDERR: auto PassNoFields(NoFields s) -> void;
- // CHECK:STDERR: ^
- // CHECK:STDERR:
- Cpp.PassNoFields(reference);
- // CHECK:STDERR: fail_struct_init_from_tuple.carbon:[[@LINE+11]]:20: error: cannot implicitly convert expression of type `()` to `Cpp.NoFields` [ConversionFailure]
- // CHECK:STDERR: Cpp.PassNoFields(MakeEmpty());
- // CHECK:STDERR: ^~~~~~~~~~~
- // CHECK:STDERR: fail_struct_init_from_tuple.carbon:[[@LINE+8]]:20: note: type `()` does not implement interface `Core.ImplicitAs(Cpp.NoFields)` [MissingImplInMemberAccessNote]
- // CHECK:STDERR: Cpp.PassNoFields(MakeEmpty());
- // CHECK:STDERR: ^~~~~~~~~~~
- // CHECK:STDERR: fail_struct_init_from_tuple.carbon:[[@LINE-53]]:10: in file included here [InCppInclude]
- // CHECK:STDERR: ./struct_init.h:4:28: note: initializing function parameter [InCallToFunctionParam]
- // CHECK:STDERR: auto PassNoFields(NoFields s) -> void;
- // CHECK:STDERR: ^
- // CHECK:STDERR:
- Cpp.PassNoFields(MakeEmpty());
- }
- fn MakeThreeFields() -> (i32, i32, i32);
- fn ThreeFields(value: (i32, i32, i32), ref reference: (i32, i32, i32)) {
- // CHECK:STDERR: fail_struct_init_from_tuple.carbon:[[@LINE+11]]:23: error: cannot implicitly convert expression of type `(Core.IntLiteral, Core.IntLiteral, Core.IntLiteral)` to `Cpp.ThreeFields` [ConversionFailure]
- // CHECK:STDERR: Cpp.PassThreeFields((1, 2, 3));
- // CHECK:STDERR: ^~~~~~~~~
- // CHECK:STDERR: fail_struct_init_from_tuple.carbon:[[@LINE+8]]:23: note: type `(Core.IntLiteral, Core.IntLiteral, Core.IntLiteral)` does not implement interface `Core.ImplicitAs(Cpp.ThreeFields)` [MissingImplInMemberAccessNote]
- // CHECK:STDERR: Cpp.PassThreeFields((1, 2, 3));
- // CHECK:STDERR: ^~~~~~~~~
- // CHECK:STDERR: fail_struct_init_from_tuple.carbon:[[@LINE-70]]:10: in file included here [InCppInclude]
- // CHECK:STDERR: ./struct_init.h:10:34: note: initializing function parameter [InCallToFunctionParam]
- // CHECK:STDERR: auto PassThreeFields(ThreeFields t) -> void;
- // CHECK:STDERR: ^
- // CHECK:STDERR:
- Cpp.PassThreeFields((1, 2, 3));
- // CHECK:STDERR: fail_struct_init_from_tuple.carbon:[[@LINE+11]]:23: error: cannot implicitly convert expression of type `(i32, i32, i32)` to `Cpp.ThreeFields` [ConversionFailure]
- // CHECK:STDERR: Cpp.PassThreeFields(value);
- // CHECK:STDERR: ^~~~~
- // CHECK:STDERR: fail_struct_init_from_tuple.carbon:[[@LINE+8]]:23: note: type `(i32, i32, i32)` does not implement interface `Core.ImplicitAs(Cpp.ThreeFields)` [MissingImplInMemberAccessNote]
- // CHECK:STDERR: Cpp.PassThreeFields(value);
- // CHECK:STDERR: ^~~~~
- // CHECK:STDERR: fail_struct_init_from_tuple.carbon:[[@LINE-83]]:10: in file included here [InCppInclude]
- // CHECK:STDERR: ./struct_init.h:10:34: note: initializing function parameter [InCallToFunctionParam]
- // CHECK:STDERR: auto PassThreeFields(ThreeFields t) -> void;
- // CHECK:STDERR: ^
- // CHECK:STDERR:
- Cpp.PassThreeFields(value);
- // CHECK:STDERR: fail_struct_init_from_tuple.carbon:[[@LINE+11]]:23: error: cannot implicitly convert expression of type `(i32, i32, i32)` to `Cpp.ThreeFields` [ConversionFailure]
- // CHECK:STDERR: Cpp.PassThreeFields(reference);
- // CHECK:STDERR: ^~~~~~~~~
- // CHECK:STDERR: fail_struct_init_from_tuple.carbon:[[@LINE+8]]:23: note: type `(i32, i32, i32)` does not implement interface `Core.ImplicitAs(Cpp.ThreeFields)` [MissingImplInMemberAccessNote]
- // CHECK:STDERR: Cpp.PassThreeFields(reference);
- // CHECK:STDERR: ^~~~~~~~~
- // CHECK:STDERR: fail_struct_init_from_tuple.carbon:[[@LINE-96]]:10: in file included here [InCppInclude]
- // CHECK:STDERR: ./struct_init.h:10:34: note: initializing function parameter [InCallToFunctionParam]
- // CHECK:STDERR: auto PassThreeFields(ThreeFields t) -> void;
- // CHECK:STDERR: ^
- // CHECK:STDERR:
- Cpp.PassThreeFields(reference);
- // CHECK:STDERR: fail_struct_init_from_tuple.carbon:[[@LINE+11]]:23: error: cannot implicitly convert expression of type `(i32, i32, i32)` to `Cpp.ThreeFields` [ConversionFailure]
- // CHECK:STDERR: Cpp.PassThreeFields(MakeThreeFields());
- // CHECK:STDERR: ^~~~~~~~~~~~~~~~~
- // CHECK:STDERR: fail_struct_init_from_tuple.carbon:[[@LINE+8]]:23: note: type `(i32, i32, i32)` does not implement interface `Core.ImplicitAs(Cpp.ThreeFields)` [MissingImplInMemberAccessNote]
- // CHECK:STDERR: Cpp.PassThreeFields(MakeThreeFields());
- // CHECK:STDERR: ^~~~~~~~~~~~~~~~~
- // CHECK:STDERR: fail_struct_init_from_tuple.carbon:[[@LINE-109]]:10: in file included here [InCppInclude]
- // CHECK:STDERR: ./struct_init.h:10:34: note: initializing function parameter [InCallToFunctionParam]
- // CHECK:STDERR: auto PassThreeFields(ThreeFields t) -> void;
- // CHECK:STDERR: ^
- // CHECK:STDERR:
- Cpp.PassThreeFields(MakeThreeFields());
- }
- // --- int_from_struct.h
- auto PassInt(int n) -> void;
- struct S {};
- auto PassOverloaded(int n) -> void;
- auto PassOverloaded(S n) -> void;
- // --- fail_int_from_struct.carbon
- library "[[@TEST_NAME]]";
- import Cpp library "int_from_struct.h";
- fn F() {
- // C++ permits `{}` to be used to initialize an int, but Carbon does not.
- // CHECK:STDERR: fail_int_from_struct.carbon:[[@LINE+11]]:15: error: cannot implicitly convert expression of type `{}` to `i32` [ConversionFailure]
- // CHECK:STDERR: Cpp.PassInt({});
- // CHECK:STDERR: ^~
- // CHECK:STDERR: fail_int_from_struct.carbon:[[@LINE+8]]:15: note: type `{}` does not implement interface `Core.ImplicitAs(i32)` [MissingImplInMemberAccessNote]
- // CHECK:STDERR: Cpp.PassInt({});
- // CHECK:STDERR: ^~
- // CHECK:STDERR: fail_int_from_struct.carbon:[[@LINE-11]]:10: in file included here [InCppInclude]
- // CHECK:STDERR: ./int_from_struct.h:2:18: note: initializing function parameter [InCallToFunctionParam]
- // CHECK:STDERR: auto PassInt(int n) -> void;
- // CHECK:STDERR: ^
- // CHECK:STDERR:
- Cpp.PassInt({});
- // CHECK:STDERR: fail_int_from_struct.carbon:[[@LINE+11]]:15: error: cannot implicitly convert expression of type `()` to `i32` [ConversionFailure]
- // CHECK:STDERR: Cpp.PassInt(());
- // CHECK:STDERR: ^~
- // CHECK:STDERR: fail_int_from_struct.carbon:[[@LINE+8]]:15: note: type `()` does not implement interface `Core.ImplicitAs(i32)` [MissingImplInMemberAccessNote]
- // CHECK:STDERR: Cpp.PassInt(());
- // CHECK:STDERR: ^~
- // CHECK:STDERR: fail_int_from_struct.carbon:[[@LINE-24]]:10: in file included here [InCppInclude]
- // CHECK:STDERR: ./int_from_struct.h:2:18: note: initializing function parameter [InCallToFunctionParam]
- // CHECK:STDERR: auto PassInt(int n) -> void;
- // CHECK:STDERR: ^
- // CHECK:STDERR:
- Cpp.PassInt(());
- }
- // --- fail_int_from_struct_overloaded.carbon
- library "[[@TEST_NAME]]";
- import Cpp library "int_from_struct.h";
- fn F() {
- // C++ overload resolution prefers to convert `{}` to `int` rather than to an
- // empty struct. So that's the overload we pick, even though we can't call it.
- // CHECK:STDERR: fail_int_from_struct_overloaded.carbon:[[@LINE+11]]:22: error: cannot implicitly convert expression of type `{}` to `i32` [ConversionFailure]
- // CHECK:STDERR: Cpp.PassOverloaded({});
- // CHECK:STDERR: ^~
- // CHECK:STDERR: fail_int_from_struct_overloaded.carbon:[[@LINE+8]]:22: note: type `{}` does not implement interface `Core.ImplicitAs(i32)` [MissingImplInMemberAccessNote]
- // CHECK:STDERR: Cpp.PassOverloaded({});
- // CHECK:STDERR: ^~
- // CHECK:STDERR: fail_int_from_struct_overloaded.carbon:[[@LINE-12]]:10: in file included here [InCppInclude]
- // CHECK:STDERR: ./int_from_struct.h:6:25: note: initializing function parameter [InCallToFunctionParam]
- // CHECK:STDERR: auto PassOverloaded(int n) -> void;
- // CHECK:STDERR: ^
- // CHECK:STDERR:
- Cpp.PassOverloaded({});
- // CHECK:STDERR: fail_int_from_struct_overloaded.carbon:[[@LINE+11]]:22: error: cannot implicitly convert expression of type `()` to `i32` [ConversionFailure]
- // CHECK:STDERR: Cpp.PassOverloaded(());
- // CHECK:STDERR: ^~
- // CHECK:STDERR: fail_int_from_struct_overloaded.carbon:[[@LINE+8]]:22: note: type `()` does not implement interface `Core.ImplicitAs(i32)` [MissingImplInMemberAccessNote]
- // CHECK:STDERR: Cpp.PassOverloaded(());
- // CHECK:STDERR: ^~
- // CHECK:STDERR: fail_int_from_struct_overloaded.carbon:[[@LINE-25]]:10: in file included here [InCppInclude]
- // CHECK:STDERR: ./int_from_struct.h:6:25: note: initializing function parameter [InCallToFunctionParam]
- // CHECK:STDERR: auto PassOverloaded(int n) -> void;
- // CHECK:STDERR: ^
- // CHECK:STDERR:
- Cpp.PassOverloaded(());
- }
- // --- nested_structs.h
- struct A {
- int x, y;
- };
- struct B {
- A a;
- int n;
- };
- void TakeB(B);
- // --- fail_pass_nested_structs_inner_field_mismatch.carbon
- library "[[@TEST_NAME]]";
- import Cpp library "nested_structs.h";
- fn F() {
- // CHECK:STDERR: fail_pass_nested_structs_inner_field_mismatch.carbon:[[@LINE+8]]:44: error: no matching function for call to 'TakeB' [CppInteropParseError]
- // CHECK:STDERR: 15 | Cpp.TakeB({.a = {.x = 1, .z = 2}, .n = 3});
- // CHECK:STDERR: | ^
- // CHECK:STDERR: fail_pass_nested_structs_inner_field_mismatch.carbon:[[@LINE-6]]:10: in file included here [InCppInclude]
- // CHECK:STDERR: ./nested_structs.h:11:6: note: candidate function not viable: cannot convert initializer list argument to 'B' [CppInteropParseNote]
- // CHECK:STDERR: 11 | void TakeB(B);
- // CHECK:STDERR: | ^ ~
- // CHECK:STDERR:
- Cpp.TakeB({.a = {.x = 1, .z = 2}, .n = 3});
- }
- // --- fail_todo_pass_nested_structs.carbon
- library "[[@TEST_NAME]]";
- import Cpp library "nested_structs.h";
- fn F() {
- // CHECK:STDERR: fail_todo_pass_nested_structs.carbon:[[@LINE+11]]:13: error: cannot implicitly convert expression of type `{.a: {.x: Core.IntLiteral, .y: Core.IntLiteral}, .n: Core.IntLiteral}` to `Cpp.B` [ConversionFailure]
- // CHECK:STDERR: Cpp.TakeB({.a = {.x = 1, .y = 2}, .n = 3});
- // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- // CHECK:STDERR: fail_todo_pass_nested_structs.carbon:[[@LINE+8]]:13: note: type `{.a: {.x: Core.IntLiteral, .y: Core.IntLiteral}, .n: Core.IntLiteral}` does not implement interface `Core.ImplicitAs(Cpp.B)` [MissingImplInMemberAccessNote]
- // CHECK:STDERR: Cpp.TakeB({.a = {.x = 1, .y = 2}, .n = 3});
- // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- // CHECK:STDERR: fail_todo_pass_nested_structs.carbon:[[@LINE-9]]:10: in file included here [InCppInclude]
- // CHECK:STDERR: ./nested_structs.h:11:13: note: initializing function parameter [InCallToFunctionParam]
- // CHECK:STDERR: void TakeB(B);
- // CHECK:STDERR: ^
- // CHECK:STDERR:
- Cpp.TakeB({.a = {.x = 1, .y = 2}, .n = 3});
- }
- // ============================================================================
- // Overload rejected on Carbon side
- // ============================================================================
- // --- upsizing_rejected.h
- auto foo(int a) -> void;
- // --- fail_import_upsizing_rejected.carbon
- library "[[@TEST_NAME]]";
- import Cpp library "upsizing_rejected.h";
- fn F() {
- // CHECK:STDERR: fail_import_upsizing_rejected.carbon:[[@LINE+11]]:11: error: cannot implicitly convert expression of type `i16` to `i32` [ConversionFailure]
- // CHECK:STDERR: Cpp.foo(1 as i16);
- // CHECK:STDERR: ^~~~~~~~
- // CHECK:STDERR: fail_import_upsizing_rejected.carbon:[[@LINE+8]]:11: note: type `i16` does not implement interface `Core.ImplicitAs(i32)` [MissingImplInMemberAccessNote]
- // CHECK:STDERR: Cpp.foo(1 as i16);
- // CHECK:STDERR: ^~~~~~~~
- // CHECK:STDERR: fail_import_upsizing_rejected.carbon:[[@LINE-9]]:10: in file included here [InCppInclude]
- // CHECK:STDERR: ./upsizing_rejected.h:2:14: note: initializing function parameter [InCallToFunctionParam]
- // CHECK:STDERR: auto foo(int a) -> void;
- // CHECK:STDERR: ^
- // CHECK:STDERR:
- Cpp.foo(1 as i16);
- }
- // --- downsizing_rejected.h
- auto foo(short a) -> void;
- // --- fail_import_downsizing_rejected.carbon
- library "[[@TEST_NAME]]";
- import Cpp library "downsizing_rejected.h";
- fn F() {
- // CHECK:STDERR: fail_import_downsizing_rejected.carbon:[[@LINE+11]]:11: error: cannot implicitly convert expression of type `i32` to `i16` [ConversionFailure]
- // CHECK:STDERR: Cpp.foo(1 as i32);
- // CHECK:STDERR: ^~~~~~~~
- // CHECK:STDERR: fail_import_downsizing_rejected.carbon:[[@LINE+8]]:11: note: type `i32` does not implement interface `Core.ImplicitAs(i16)` [MissingImplInMemberAccessNote]
- // CHECK:STDERR: Cpp.foo(1 as i32);
- // CHECK:STDERR: ^~~~~~~~
- // CHECK:STDERR: fail_import_downsizing_rejected.carbon:[[@LINE-9]]:10: in file included here [InCppInclude]
- // CHECK:STDERR: ./downsizing_rejected.h:2:16: note: initializing function parameter [InCallToFunctionParam]
- // CHECK:STDERR: auto foo(short a) -> void;
- // CHECK:STDERR: ^
- // CHECK:STDERR:
- Cpp.foo(1 as i32);
- }
- // ============================================================================
- // No viable function found
- // ============================================================================
- // --- no_viable_function.h
- auto foo(short a, int b) -> void;
- // --- fail_import_no_viable_function.carbon
- library "[[@TEST_NAME]]";
- import Cpp library "no_viable_function.h";
- fn F() {
- // CHECK:STDERR: fail_import_no_viable_function.carbon:[[@LINE+8]]:19: error: no matching function for call to 'foo' [CppInteropParseError]
- // CHECK:STDERR: 15 | Cpp.foo(1 as i64);
- // CHECK:STDERR: | ^
- // CHECK:STDERR: fail_import_no_viable_function.carbon:[[@LINE-6]]:10: in file included here [InCppInclude]
- // CHECK:STDERR: ./no_viable_function.h:2:6: note: candidate function not viable: requires 2 arguments, but 1 was provided [CppInteropParseNote]
- // CHECK:STDERR: 2 | auto foo(short a, int b) -> void;
- // CHECK:STDERR: | ^ ~~~~~~~~~~~~~~
- // CHECK:STDERR:
- Cpp.foo(1 as i64);
- }
- // ============================================================================
- // Ambiguous overload found
- // ============================================================================
- // --- ambiguous_overload.h
- auto foo(short a) -> void;
- auto foo(int a) -> void;
- // --- fail_import_ambiguous_overload.carbon
- library "[[@TEST_NAME]]";
- import Cpp library "ambiguous_overload.h";
- fn F() {
- // CHECK:STDERR: fail_import_ambiguous_overload.carbon:[[@LINE+12]]:19: error: call to 'foo' is ambiguous [CppInteropParseError]
- // CHECK:STDERR: 19 | Cpp.foo(1 as i64);
- // CHECK:STDERR: | ^
- // CHECK:STDERR: fail_import_ambiguous_overload.carbon:[[@LINE-6]]:10: in file included here [InCppInclude]
- // CHECK:STDERR: ./ambiguous_overload.h:2:6: note: candidate function [CppInteropParseNote]
- // CHECK:STDERR: 2 | auto foo(short a) -> void;
- // CHECK:STDERR: | ^
- // CHECK:STDERR: fail_import_ambiguous_overload.carbon:[[@LINE-10]]:10: in file included here [InCppInclude]
- // CHECK:STDERR: ./ambiguous_overload.h:3:6: note: candidate function [CppInteropParseNote]
- // CHECK:STDERR: 3 | auto foo(int a) -> void;
- // CHECK:STDERR: | ^
- // CHECK:STDERR:
- Cpp.foo(1 as i64);
- }
- // ============================================================================
- // Deleted function found
- // ============================================================================
- // --- deleted_function.h
- auto foo(short a) -> void;
- auto foo(int a) -> void = delete;
- // --- fail_import_deleted_function.carbon
- library "[[@TEST_NAME]]";
- import Cpp library "deleted_function.h";
- fn F() {
- // CHECK:STDERR: fail_import_deleted_function.carbon:[[@LINE+12]]:19: error: call to deleted function 'foo' [CppInteropParseError]
- // CHECK:STDERR: 19 | Cpp.foo(1 as i32);
- // CHECK:STDERR: | ^
- // CHECK:STDERR: fail_import_deleted_function.carbon:[[@LINE-6]]:10: in file included here [InCppInclude]
- // CHECK:STDERR: ./deleted_function.h:3:6: note: candidate function has been explicitly deleted [CppInteropParseNote]
- // CHECK:STDERR: 3 | auto foo(int a) -> void = delete;
- // CHECK:STDERR: | ^
- // CHECK:STDERR: fail_import_deleted_function.carbon:[[@LINE-10]]:10: in file included here [InCppInclude]
- // CHECK:STDERR: ./deleted_function.h:2:6: note: candidate function [CppInteropParseNote]
- // CHECK:STDERR: 2 | auto foo(short a) -> void;
- // CHECK:STDERR: | ^
- // CHECK:STDERR:
- Cpp.foo(1 as i32);
- }
- // --- fail_missing_impl.carbon
- library "[[@TEST_NAME]]";
- import Cpp inline '''
- void foo();
- void foo(int);
- ''';
- interface I {}
- fn EchoValue[ValueT:! I](value:! ValueT) {}
- fn F() {
- // CHECK:STDERR: fail_missing_impl.carbon:[[@LINE+7]]:3: error: cannot convert type `<type of Cpp.foo>` into type implementing `I` [ConversionFailureTypeToFacet]
- // CHECK:STDERR: EchoValue(Cpp.foo);
- // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~
- // CHECK:STDERR: fail_missing_impl.carbon:[[@LINE-6]]:1: note: while deducing parameters of generic declared here [DeductionGenericHere]
- // CHECK:STDERR: fn EchoValue[ValueT:! I](value:! ValueT) {}
- // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- // CHECK:STDERR:
- EchoValue(Cpp.foo);
- }
- // CHECK:STDOUT: --- import_multiple_functions_no_overloads.carbon
- // CHECK:STDOUT:
- // CHECK:STDOUT: constants {
- // CHECK:STDOUT: %F.type: type = fn_type @F [concrete]
- // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete]
- // CHECK:STDOUT: %F: %F.type = struct_value () [concrete]
- // CHECK:STDOUT: %bar.cpp_overload_set.type: type = cpp_overload_set_type @bar.cpp_overload_set [concrete]
- // CHECK:STDOUT: %bar.cpp_overload_set.value: %bar.cpp_overload_set.type = cpp_overload_set_value @bar.cpp_overload_set [concrete]
- // CHECK:STDOUT: %int_1.5b8: Core.IntLiteral = int_value 1 [concrete]
- // CHECK:STDOUT: %int_16: Core.IntLiteral = int_value 16 [concrete]
- // CHECK:STDOUT: %Int.type: type = generic_class_type @Int [concrete]
- // CHECK:STDOUT: %Int.generic: %Int.type = struct_value () [concrete]
- // CHECK:STDOUT: %N: Core.IntLiteral = symbolic_binding N, 0 [symbolic]
- // CHECK:STDOUT: %i16: type = class_type @Int, @Int(%int_16) [concrete]
- // CHECK:STDOUT: %As.type.90f: type = generic_interface_type @As [concrete]
- // CHECK:STDOUT: %As.generic: %As.type.90f = struct_value () [concrete]
- // CHECK:STDOUT: %As.type.359: type = facet_type <@As, @As(%i16)> [concrete]
- // CHECK:STDOUT: %As.Convert.type.be5: type = fn_type @As.Convert, @As(%i16) [concrete]
- // CHECK:STDOUT: %To: Core.IntLiteral = symbolic_binding To, 0 [symbolic]
- // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.type.09e: type = fn_type @Core.IntLiteral.as.As.impl.Convert, @Core.IntLiteral.as.As.impl(%To) [symbolic]
- // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.dbe: %Core.IntLiteral.as.As.impl.Convert.type.09e = struct_value () [symbolic]
- // CHECK:STDOUT: %As.impl_witness.b61: <witness> = impl_witness imports.%As.impl_witness_table.9fc, @Core.IntLiteral.as.As.impl(%int_16) [concrete]
- // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.type.c60: type = fn_type @Core.IntLiteral.as.As.impl.Convert, @Core.IntLiteral.as.As.impl(%int_16) [concrete]
- // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.a42: %Core.IntLiteral.as.As.impl.Convert.type.c60 = struct_value () [concrete]
- // CHECK:STDOUT: %As.facet: %As.type.359 = facet_value Core.IntLiteral, (%As.impl_witness.b61) [concrete]
- // CHECK:STDOUT: %.240: type = fn_type_with_self_type %As.Convert.type.be5, %As.facet [concrete]
- // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.bound: <bound method> = bound_method %int_1.5b8, %Core.IntLiteral.as.As.impl.Convert.a42 [concrete]
- // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.specific_fn: <specific function> = specific_function %Core.IntLiteral.as.As.impl.Convert.a42, @Core.IntLiteral.as.As.impl.Convert(%int_16) [concrete]
- // CHECK:STDOUT: %bound_method.4da: <bound method> = bound_method %int_1.5b8, %Core.IntLiteral.as.As.impl.Convert.specific_fn [concrete]
- // CHECK:STDOUT: %int_1.f90: %i16 = int_value 1 [concrete]
- // CHECK:STDOUT: %ptr.251: type = ptr_type %i16 [concrete]
- // CHECK:STDOUT: %pattern_type.54c: type = pattern_type %ptr.251 [concrete]
- // CHECK:STDOUT: %bar__carbon_thunk.type: type = fn_type @bar__carbon_thunk [concrete]
- // CHECK:STDOUT: %bar__carbon_thunk: %bar__carbon_thunk.type = struct_value () [concrete]
- // CHECK:STDOUT: %Copy.type: type = facet_type <@Copy> [concrete]
- // CHECK:STDOUT: %Copy.Op.type: type = fn_type @Copy.Op [concrete]
- // CHECK:STDOUT: %Int.as.Copy.impl.Op.type.824: type = fn_type @Int.as.Copy.impl.Op, @Int.as.Copy.impl(%N) [symbolic]
- // CHECK:STDOUT: %Int.as.Copy.impl.Op.9b9: %Int.as.Copy.impl.Op.type.824 = struct_value () [symbolic]
- // CHECK:STDOUT: %Copy.impl_witness.e99: <witness> = impl_witness imports.%Copy.impl_witness_table.e76, @Int.as.Copy.impl(%int_16) [concrete]
- // CHECK:STDOUT: %Int.as.Copy.impl.Op.type.97f: type = fn_type @Int.as.Copy.impl.Op, @Int.as.Copy.impl(%int_16) [concrete]
- // CHECK:STDOUT: %Int.as.Copy.impl.Op.0da: %Int.as.Copy.impl.Op.type.97f = struct_value () [concrete]
- // CHECK:STDOUT: %Copy.facet: %Copy.type = facet_value %i16, (%Copy.impl_witness.e99) [concrete]
- // CHECK:STDOUT: %.03d: type = fn_type_with_self_type %Copy.Op.type, %Copy.facet [concrete]
- // CHECK:STDOUT: %Int.as.Copy.impl.Op.bound: <bound method> = bound_method %int_1.f90, %Int.as.Copy.impl.Op.0da [concrete]
- // CHECK:STDOUT: %Int.as.Copy.impl.Op.specific_fn: <specific function> = specific_function %Int.as.Copy.impl.Op.0da, @Int.as.Copy.impl.Op(%int_16) [concrete]
- // CHECK:STDOUT: %bound_method.a48: <bound method> = bound_method %int_1.f90, %Int.as.Copy.impl.Op.specific_fn [concrete]
- // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete]
- // CHECK:STDOUT: %DestroyOp.type: type = fn_type @DestroyOp [concrete]
- // CHECK:STDOUT: %DestroyOp: %DestroyOp.type = struct_value () [concrete]
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: imports {
- // CHECK:STDOUT: %Core: <namespace> = namespace file.%Core.import, [concrete] {
- // CHECK:STDOUT: .Int = %Core.Int
- // CHECK:STDOUT: .As = %Core.As
- // CHECK:STDOUT: .Copy = %Core.Copy
- // CHECK:STDOUT: .Destroy = %Core.Destroy
- // CHECK:STDOUT: import Core//prelude
- // CHECK:STDOUT: import Core//prelude/...
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %Cpp: <namespace> = namespace file.%Cpp.import_cpp, [concrete] {
- // CHECK:STDOUT: .bar = %bar.cpp_overload_set.value
- // CHECK:STDOUT: import Cpp//...
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %bar.cpp_overload_set.value: %bar.cpp_overload_set.type = cpp_overload_set_value @bar.cpp_overload_set [concrete = constants.%bar.cpp_overload_set.value]
- // CHECK:STDOUT: %Core.Int: %Int.type = import_ref Core//prelude/parts/int, Int, loaded [concrete = constants.%Int.generic]
- // CHECK:STDOUT: %Core.As: %As.type.90f = import_ref Core//prelude/parts/as, As, loaded [concrete = constants.%As.generic]
- // CHECK:STDOUT: %Core.import_ref.ca0: @Core.IntLiteral.as.As.impl.%Core.IntLiteral.as.As.impl.Convert.type (%Core.IntLiteral.as.As.impl.Convert.type.09e) = import_ref Core//prelude/parts/int, loc{{\d+_\d+}}, loaded [symbolic = @Core.IntLiteral.as.As.impl.%Core.IntLiteral.as.As.impl.Convert (constants.%Core.IntLiteral.as.As.impl.Convert.dbe)]
- // CHECK:STDOUT: %As.impl_witness_table.9fc = impl_witness_table (%Core.import_ref.ca0), @Core.IntLiteral.as.As.impl [concrete]
- // CHECK:STDOUT: %bar__carbon_thunk.decl: %bar__carbon_thunk.type = fn_decl @bar__carbon_thunk [concrete = constants.%bar__carbon_thunk] {
- // CHECK:STDOUT: %a.patt: %pattern_type.54c = value_binding_pattern a [concrete]
- // CHECK:STDOUT: %a.param_patt: %pattern_type.54c = value_param_pattern %a.patt, call_param0 [concrete]
- // CHECK:STDOUT: } {
- // CHECK:STDOUT: %a.param: %ptr.251 = value_param call_param0
- // CHECK:STDOUT: %.1: type = splice_block constants.%ptr.251 [concrete = constants.%ptr.251] {
- // CHECK:STDOUT: %int_16: Core.IntLiteral = int_value 16 [concrete = constants.%int_16]
- // CHECK:STDOUT: %i16: type = class_type @Int, @Int(constants.%int_16) [concrete = constants.%i16]
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %a: %ptr.251 = value_binding a, %a.param
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %Core.Copy: type = import_ref Core//prelude/parts/copy, Copy, loaded [concrete = constants.%Copy.type]
- // CHECK:STDOUT: %Core.import_ref.18d: @Int.as.Copy.impl.%Int.as.Copy.impl.Op.type (%Int.as.Copy.impl.Op.type.824) = import_ref Core//prelude/parts/int, loc{{\d+_\d+}}, loaded [symbolic = @Int.as.Copy.impl.%Int.as.Copy.impl.Op (constants.%Int.as.Copy.impl.Op.9b9)]
- // CHECK:STDOUT: %Copy.impl_witness_table.e76 = impl_witness_table (%Core.import_ref.18d), @Int.as.Copy.impl [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
- // CHECK:STDOUT: .Cpp = imports.%Cpp
- // CHECK:STDOUT: .F = %F.decl
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %Core.import = import Core
- // CHECK:STDOUT: %Cpp.import_cpp = import_cpp {
- // CHECK:STDOUT: import Cpp "multiple_functions_no_overloads.h"
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [concrete = constants.%F] {} {}
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: fn @F() {
- // CHECK:STDOUT: !entry:
- // CHECK:STDOUT: %Cpp.ref: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
- // CHECK:STDOUT: %bar.ref: %bar.cpp_overload_set.type = name_ref bar, imports.%bar.cpp_overload_set.value [concrete = constants.%bar.cpp_overload_set.value]
- // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8]
- // CHECK:STDOUT: %int_16: Core.IntLiteral = int_value 16 [concrete = constants.%int_16]
- // CHECK:STDOUT: %i16: type = class_type @Int, @Int(constants.%int_16) [concrete = constants.%i16]
- // CHECK:STDOUT: %impl.elem0.loc7_13.1: %.240 = impl_witness_access constants.%As.impl_witness.b61, element0 [concrete = constants.%Core.IntLiteral.as.As.impl.Convert.a42]
- // CHECK:STDOUT: %bound_method.loc7_13.1: <bound method> = bound_method %int_1, %impl.elem0.loc7_13.1 [concrete = constants.%Core.IntLiteral.as.As.impl.Convert.bound]
- // CHECK:STDOUT: %specific_fn.loc7_13.1: <specific function> = specific_function %impl.elem0.loc7_13.1, @Core.IntLiteral.as.As.impl.Convert(constants.%int_16) [concrete = constants.%Core.IntLiteral.as.As.impl.Convert.specific_fn]
- // CHECK:STDOUT: %bound_method.loc7_13.2: <bound method> = bound_method %int_1, %specific_fn.loc7_13.1 [concrete = constants.%bound_method.4da]
- // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.call: init %i16 = call %bound_method.loc7_13.2(%int_1) [concrete = constants.%int_1.f90]
- // CHECK:STDOUT: %.loc7_13.1: %i16 = value_of_initializer %Core.IntLiteral.as.As.impl.Convert.call [concrete = constants.%int_1.f90]
- // CHECK:STDOUT: %.loc7_13.2: %i16 = converted %int_1, %.loc7_13.1 [concrete = constants.%int_1.f90]
- // CHECK:STDOUT: %.loc7_13.3: ref %i16 = temporary_storage
- // CHECK:STDOUT: %impl.elem0.loc7_13.2: %.03d = impl_witness_access constants.%Copy.impl_witness.e99, element0 [concrete = constants.%Int.as.Copy.impl.Op.0da]
- // CHECK:STDOUT: %bound_method.loc7_13.3: <bound method> = bound_method %.loc7_13.2, %impl.elem0.loc7_13.2 [concrete = constants.%Int.as.Copy.impl.Op.bound]
- // CHECK:STDOUT: %specific_fn.loc7_13.2: <specific function> = specific_function %impl.elem0.loc7_13.2, @Int.as.Copy.impl.Op(constants.%int_16) [concrete = constants.%Int.as.Copy.impl.Op.specific_fn]
- // CHECK:STDOUT: %bound_method.loc7_13.4: <bound method> = bound_method %.loc7_13.2, %specific_fn.loc7_13.2 [concrete = constants.%bound_method.a48]
- // CHECK:STDOUT: %Int.as.Copy.impl.Op.call: init %i16 = call %bound_method.loc7_13.4(%.loc7_13.2) [concrete = constants.%int_1.f90]
- // CHECK:STDOUT: %.loc7_13.4: ref %i16 = temporary %.loc7_13.3, %Int.as.Copy.impl.Op.call
- // CHECK:STDOUT: %addr: %ptr.251 = addr_of %.loc7_13.4
- // CHECK:STDOUT: %bar__carbon_thunk.call: init %empty_tuple.type = call imports.%bar__carbon_thunk.decl(%addr)
- // CHECK:STDOUT: %DestroyOp.bound: <bound method> = bound_method %.loc7_13.4, constants.%DestroyOp
- // CHECK:STDOUT: %DestroyOp.call: init %empty_tuple.type = call %DestroyOp.bound(%.loc7_13.4)
- // CHECK:STDOUT: return
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: fn @bar(%a.param: %i16);
- // CHECK:STDOUT:
- // CHECK:STDOUT: fn @bar__carbon_thunk(%a.param: %ptr.251);
- // CHECK:STDOUT:
- // CHECK:STDOUT: fn @DestroyOp(%self.param: ref %i16) = "no_op";
- // CHECK:STDOUT:
- // CHECK:STDOUT: --- import_overloaded_functions.carbon
- // CHECK:STDOUT:
- // CHECK:STDOUT: constants {
- // CHECK:STDOUT: %F.type: type = fn_type @F [concrete]
- // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete]
- // CHECK:STDOUT: %F: %F.type = struct_value () [concrete]
- // CHECK:STDOUT: %foo.cpp_overload_set.type: type = cpp_overload_set_type @foo.cpp_overload_set [concrete]
- // CHECK:STDOUT: %foo.cpp_overload_set.value: %foo.cpp_overload_set.type = cpp_overload_set_value @foo.cpp_overload_set [concrete]
- // CHECK:STDOUT: %int_1.5b8: Core.IntLiteral = int_value 1 [concrete]
- // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete]
- // CHECK:STDOUT: %Int.type: type = generic_class_type @Int [concrete]
- // CHECK:STDOUT: %Int.generic: %Int.type = struct_value () [concrete]
- // CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [concrete]
- // CHECK:STDOUT: %As.type.90f: type = generic_interface_type @As [concrete]
- // CHECK:STDOUT: %As.generic: %As.type.90f = struct_value () [concrete]
- // CHECK:STDOUT: %As.type.047: type = facet_type <@As, @As(%i32)> [concrete]
- // CHECK:STDOUT: %As.Convert.type.99b: type = fn_type @As.Convert, @As(%i32) [concrete]
- // CHECK:STDOUT: %To: Core.IntLiteral = symbolic_binding To, 0 [symbolic]
- // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.type.09e: type = fn_type @Core.IntLiteral.as.As.impl.Convert, @Core.IntLiteral.as.As.impl(%To) [symbolic]
- // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.dbe: %Core.IntLiteral.as.As.impl.Convert.type.09e = struct_value () [symbolic]
- // CHECK:STDOUT: %As.impl_witness.ab6: <witness> = impl_witness imports.%As.impl_witness_table.9fc, @Core.IntLiteral.as.As.impl(%int_32) [concrete]
- // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.type.8ec: type = fn_type @Core.IntLiteral.as.As.impl.Convert, @Core.IntLiteral.as.As.impl(%int_32) [concrete]
- // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.29b: %Core.IntLiteral.as.As.impl.Convert.type.8ec = struct_value () [concrete]
- // CHECK:STDOUT: %As.facet: %As.type.047 = facet_value Core.IntLiteral, (%As.impl_witness.ab6) [concrete]
- // CHECK:STDOUT: %.97a: type = fn_type_with_self_type %As.Convert.type.99b, %As.facet [concrete]
- // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.bound: <bound method> = bound_method %int_1.5b8, %Core.IntLiteral.as.As.impl.Convert.29b [concrete]
- // CHECK:STDOUT: %pattern_type.7ce: type = pattern_type %i32 [concrete]
- // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.specific_fn: <specific function> = specific_function %Core.IntLiteral.as.As.impl.Convert.29b, @Core.IntLiteral.as.As.impl.Convert(%int_32) [concrete]
- // CHECK:STDOUT: %bound_method: <bound method> = bound_method %int_1.5b8, %Core.IntLiteral.as.As.impl.Convert.specific_fn [concrete]
- // CHECK:STDOUT: %int_1.5d2: %i32 = int_value 1 [concrete]
- // CHECK:STDOUT: %foo.type: type = fn_type @foo [concrete]
- // CHECK:STDOUT: %foo: %foo.type = struct_value () [concrete]
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: imports {
- // CHECK:STDOUT: %Core: <namespace> = namespace file.%Core.import, [concrete] {
- // CHECK:STDOUT: .Int = %Core.Int
- // CHECK:STDOUT: .As = %Core.As
- // CHECK:STDOUT: import Core//prelude
- // CHECK:STDOUT: import Core//prelude/...
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %Cpp: <namespace> = namespace file.%Cpp.import_cpp, [concrete] {
- // CHECK:STDOUT: .foo = %foo.cpp_overload_set.value
- // CHECK:STDOUT: import Cpp//...
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %foo.cpp_overload_set.value: %foo.cpp_overload_set.type = cpp_overload_set_value @foo.cpp_overload_set [concrete = constants.%foo.cpp_overload_set.value]
- // CHECK:STDOUT: %Core.Int: %Int.type = import_ref Core//prelude/parts/int, Int, loaded [concrete = constants.%Int.generic]
- // CHECK:STDOUT: %Core.As: %As.type.90f = import_ref Core//prelude/parts/as, As, loaded [concrete = constants.%As.generic]
- // CHECK:STDOUT: %Core.import_ref.ca0: @Core.IntLiteral.as.As.impl.%Core.IntLiteral.as.As.impl.Convert.type (%Core.IntLiteral.as.As.impl.Convert.type.09e) = import_ref Core//prelude/parts/int, loc{{\d+_\d+}}, loaded [symbolic = @Core.IntLiteral.as.As.impl.%Core.IntLiteral.as.As.impl.Convert (constants.%Core.IntLiteral.as.As.impl.Convert.dbe)]
- // CHECK:STDOUT: %As.impl_witness_table.9fc = impl_witness_table (%Core.import_ref.ca0), @Core.IntLiteral.as.As.impl [concrete]
- // CHECK:STDOUT: %foo.decl: %foo.type = fn_decl @foo [concrete = constants.%foo] {
- // CHECK:STDOUT: %a.patt: %pattern_type.7ce = value_binding_pattern a [concrete]
- // CHECK:STDOUT: %a.param_patt: %pattern_type.7ce = value_param_pattern %a.patt, call_param0 [concrete]
- // CHECK:STDOUT: } {
- // CHECK:STDOUT: %a.param: %i32 = value_param call_param0
- // CHECK:STDOUT: %.1: type = splice_block %i32 [concrete = constants.%i32] {
- // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete = constants.%int_32]
- // CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32]
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %a: %i32 = value_binding a, %a.param
- // CHECK:STDOUT: }
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: file {
- // CHECK:STDOUT: package: <namespace> = namespace [concrete] {
- // CHECK:STDOUT: .Core = imports.%Core
- // CHECK:STDOUT: .Cpp = imports.%Cpp
- // CHECK:STDOUT: .F = %F.decl
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %Core.import = import Core
- // CHECK:STDOUT: %Cpp.import_cpp = import_cpp {
- // CHECK:STDOUT: import Cpp "overloaded_functions.h"
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [concrete = constants.%F] {} {}
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: fn @F() {
- // CHECK:STDOUT: !entry:
- // CHECK:STDOUT: %Cpp.ref: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
- // CHECK:STDOUT: %foo.ref: %foo.cpp_overload_set.type = name_ref foo, imports.%foo.cpp_overload_set.value [concrete = constants.%foo.cpp_overload_set.value]
- // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8]
- // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete = constants.%int_32]
- // CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32]
- // CHECK:STDOUT: %impl.elem0: %.97a = impl_witness_access constants.%As.impl_witness.ab6, element0 [concrete = constants.%Core.IntLiteral.as.As.impl.Convert.29b]
- // CHECK:STDOUT: %bound_method.loc7_13.1: <bound method> = bound_method %int_1, %impl.elem0 [concrete = constants.%Core.IntLiteral.as.As.impl.Convert.bound]
- // CHECK:STDOUT: %specific_fn: <specific function> = specific_function %impl.elem0, @Core.IntLiteral.as.As.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.As.impl.Convert.specific_fn]
- // CHECK:STDOUT: %bound_method.loc7_13.2: <bound method> = bound_method %int_1, %specific_fn [concrete = constants.%bound_method]
- // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.call: init %i32 = call %bound_method.loc7_13.2(%int_1) [concrete = constants.%int_1.5d2]
- // CHECK:STDOUT: %.loc7_13.1: %i32 = value_of_initializer %Core.IntLiteral.as.As.impl.Convert.call [concrete = constants.%int_1.5d2]
- // CHECK:STDOUT: %.loc7_13.2: %i32 = converted %int_1, %.loc7_13.1 [concrete = constants.%int_1.5d2]
- // CHECK:STDOUT: %foo.call: init %empty_tuple.type = call imports.%foo.decl(%.loc7_13.2)
- // CHECK:STDOUT: return
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: fn @foo(%a.param: %i32);
- // CHECK:STDOUT:
- // CHECK:STDOUT: --- import_both_overloaded_functions_called.carbon
- // CHECK:STDOUT:
- // CHECK:STDOUT: constants {
- // CHECK:STDOUT: %F.type: type = fn_type @F [concrete]
- // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete]
- // CHECK:STDOUT: %F: %F.type = struct_value () [concrete]
- // CHECK:STDOUT: %foo.cpp_overload_set.type: type = cpp_overload_set_type @foo.cpp_overload_set [concrete]
- // CHECK:STDOUT: %foo.cpp_overload_set.value: %foo.cpp_overload_set.type = cpp_overload_set_value @foo.cpp_overload_set [concrete]
- // CHECK:STDOUT: %int_1.5b8: Core.IntLiteral = int_value 1 [concrete]
- // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete]
- // CHECK:STDOUT: %Int.type: type = generic_class_type @Int [concrete]
- // CHECK:STDOUT: %Int.generic: %Int.type = struct_value () [concrete]
- // CHECK:STDOUT: %N: Core.IntLiteral = symbolic_binding N, 0 [symbolic]
- // CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [concrete]
- // CHECK:STDOUT: %As.type.90f: type = generic_interface_type @As [concrete]
- // CHECK:STDOUT: %As.generic: %As.type.90f = struct_value () [concrete]
- // CHECK:STDOUT: %As.type.047: type = facet_type <@As, @As(%i32)> [concrete]
- // CHECK:STDOUT: %As.Convert.type.99b: type = fn_type @As.Convert, @As(%i32) [concrete]
- // CHECK:STDOUT: %To: Core.IntLiteral = symbolic_binding To, 0 [symbolic]
- // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.type.09e: type = fn_type @Core.IntLiteral.as.As.impl.Convert, @Core.IntLiteral.as.As.impl(%To) [symbolic]
- // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.dbe: %Core.IntLiteral.as.As.impl.Convert.type.09e = struct_value () [symbolic]
- // CHECK:STDOUT: %As.impl_witness.ab6: <witness> = impl_witness imports.%As.impl_witness_table.9fc, @Core.IntLiteral.as.As.impl(%int_32) [concrete]
- // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.type.8ec: type = fn_type @Core.IntLiteral.as.As.impl.Convert, @Core.IntLiteral.as.As.impl(%int_32) [concrete]
- // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.29b: %Core.IntLiteral.as.As.impl.Convert.type.8ec = struct_value () [concrete]
- // CHECK:STDOUT: %As.facet.d6e: %As.type.047 = facet_value Core.IntLiteral, (%As.impl_witness.ab6) [concrete]
- // CHECK:STDOUT: %.97a: type = fn_type_with_self_type %As.Convert.type.99b, %As.facet.d6e [concrete]
- // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.bound.bd3: <bound method> = bound_method %int_1.5b8, %Core.IntLiteral.as.As.impl.Convert.29b [concrete]
- // CHECK:STDOUT: %pattern_type.7ce: type = pattern_type %i32 [concrete]
- // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.specific_fn.fab: <specific function> = specific_function %Core.IntLiteral.as.As.impl.Convert.29b, @Core.IntLiteral.as.As.impl.Convert(%int_32) [concrete]
- // CHECK:STDOUT: %bound_method.290: <bound method> = bound_method %int_1.5b8, %Core.IntLiteral.as.As.impl.Convert.specific_fn.fab [concrete]
- // CHECK:STDOUT: %int_1.5d2: %i32 = int_value 1 [concrete]
- // CHECK:STDOUT: %foo.type.a5abd1.1: type = fn_type @foo.1 [concrete]
- // CHECK:STDOUT: %foo.23ea43.1: %foo.type.a5abd1.1 = struct_value () [concrete]
- // CHECK:STDOUT: %int_16: Core.IntLiteral = int_value 16 [concrete]
- // CHECK:STDOUT: %i16: type = class_type @Int, @Int(%int_16) [concrete]
- // CHECK:STDOUT: %As.type.359: type = facet_type <@As, @As(%i16)> [concrete]
- // CHECK:STDOUT: %As.Convert.type.be5: type = fn_type @As.Convert, @As(%i16) [concrete]
- // CHECK:STDOUT: %As.impl_witness.b61: <witness> = impl_witness imports.%As.impl_witness_table.9fc, @Core.IntLiteral.as.As.impl(%int_16) [concrete]
- // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.type.c60: type = fn_type @Core.IntLiteral.as.As.impl.Convert, @Core.IntLiteral.as.As.impl(%int_16) [concrete]
- // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.a42: %Core.IntLiteral.as.As.impl.Convert.type.c60 = struct_value () [concrete]
- // CHECK:STDOUT: %As.facet.071: %As.type.359 = facet_value Core.IntLiteral, (%As.impl_witness.b61) [concrete]
- // CHECK:STDOUT: %.240: type = fn_type_with_self_type %As.Convert.type.be5, %As.facet.071 [concrete]
- // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.bound.896: <bound method> = bound_method %int_1.5b8, %Core.IntLiteral.as.As.impl.Convert.a42 [concrete]
- // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.specific_fn.00b: <specific function> = specific_function %Core.IntLiteral.as.As.impl.Convert.a42, @Core.IntLiteral.as.As.impl.Convert(%int_16) [concrete]
- // CHECK:STDOUT: %bound_method.4da: <bound method> = bound_method %int_1.5b8, %Core.IntLiteral.as.As.impl.Convert.specific_fn.00b [concrete]
- // CHECK:STDOUT: %int_1.f90: %i16 = int_value 1 [concrete]
- // CHECK:STDOUT: %ptr.251: type = ptr_type %i16 [concrete]
- // CHECK:STDOUT: %pattern_type.54c: type = pattern_type %ptr.251 [concrete]
- // CHECK:STDOUT: %foo__carbon_thunk.type: type = fn_type @foo__carbon_thunk [concrete]
- // CHECK:STDOUT: %foo__carbon_thunk: %foo__carbon_thunk.type = struct_value () [concrete]
- // CHECK:STDOUT: %Copy.type: type = facet_type <@Copy> [concrete]
- // CHECK:STDOUT: %Copy.Op.type: type = fn_type @Copy.Op [concrete]
- // CHECK:STDOUT: %Int.as.Copy.impl.Op.type.824: type = fn_type @Int.as.Copy.impl.Op, @Int.as.Copy.impl(%N) [symbolic]
- // CHECK:STDOUT: %Int.as.Copy.impl.Op.9b9: %Int.as.Copy.impl.Op.type.824 = struct_value () [symbolic]
- // CHECK:STDOUT: %Copy.impl_witness.e99: <witness> = impl_witness imports.%Copy.impl_witness_table.e76, @Int.as.Copy.impl(%int_16) [concrete]
- // CHECK:STDOUT: %Int.as.Copy.impl.Op.type.97f: type = fn_type @Int.as.Copy.impl.Op, @Int.as.Copy.impl(%int_16) [concrete]
- // CHECK:STDOUT: %Int.as.Copy.impl.Op.0da: %Int.as.Copy.impl.Op.type.97f = struct_value () [concrete]
- // CHECK:STDOUT: %Copy.facet: %Copy.type = facet_value %i16, (%Copy.impl_witness.e99) [concrete]
- // CHECK:STDOUT: %.03d: type = fn_type_with_self_type %Copy.Op.type, %Copy.facet [concrete]
- // CHECK:STDOUT: %Int.as.Copy.impl.Op.bound: <bound method> = bound_method %int_1.f90, %Int.as.Copy.impl.Op.0da [concrete]
- // CHECK:STDOUT: %Int.as.Copy.impl.Op.specific_fn: <specific function> = specific_function %Int.as.Copy.impl.Op.0da, @Int.as.Copy.impl.Op(%int_16) [concrete]
- // CHECK:STDOUT: %bound_method.a48: <bound method> = bound_method %int_1.f90, %Int.as.Copy.impl.Op.specific_fn [concrete]
- // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete]
- // CHECK:STDOUT: %DestroyOp.type: type = fn_type @DestroyOp [concrete]
- // CHECK:STDOUT: %DestroyOp: %DestroyOp.type = struct_value () [concrete]
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: imports {
- // CHECK:STDOUT: %Core: <namespace> = namespace file.%Core.import, [concrete] {
- // CHECK:STDOUT: .Int = %Core.Int
- // CHECK:STDOUT: .As = %Core.As
- // CHECK:STDOUT: .Copy = %Core.Copy
- // CHECK:STDOUT: .Destroy = %Core.Destroy
- // CHECK:STDOUT: import Core//prelude
- // CHECK:STDOUT: import Core//prelude/...
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %Cpp: <namespace> = namespace file.%Cpp.import_cpp, [concrete] {
- // CHECK:STDOUT: .foo = %foo.cpp_overload_set.value
- // CHECK:STDOUT: import Cpp//...
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %foo.cpp_overload_set.value: %foo.cpp_overload_set.type = cpp_overload_set_value @foo.cpp_overload_set [concrete = constants.%foo.cpp_overload_set.value]
- // CHECK:STDOUT: %Core.Int: %Int.type = import_ref Core//prelude/parts/int, Int, loaded [concrete = constants.%Int.generic]
- // CHECK:STDOUT: %Core.As: %As.type.90f = import_ref Core//prelude/parts/as, As, loaded [concrete = constants.%As.generic]
- // CHECK:STDOUT: %Core.import_ref.ca0: @Core.IntLiteral.as.As.impl.%Core.IntLiteral.as.As.impl.Convert.type (%Core.IntLiteral.as.As.impl.Convert.type.09e) = import_ref Core//prelude/parts/int, loc{{\d+_\d+}}, loaded [symbolic = @Core.IntLiteral.as.As.impl.%Core.IntLiteral.as.As.impl.Convert (constants.%Core.IntLiteral.as.As.impl.Convert.dbe)]
- // CHECK:STDOUT: %As.impl_witness_table.9fc = impl_witness_table (%Core.import_ref.ca0), @Core.IntLiteral.as.As.impl [concrete]
- // CHECK:STDOUT: %foo.decl.bd967b.1: %foo.type.a5abd1.1 = fn_decl @foo.1 [concrete = constants.%foo.23ea43.1] {
- // CHECK:STDOUT: %a.patt: %pattern_type.7ce = value_binding_pattern a [concrete]
- // CHECK:STDOUT: %a.param_patt: %pattern_type.7ce = value_param_pattern %a.patt, call_param0 [concrete]
- // CHECK:STDOUT: } {
- // CHECK:STDOUT: %a.param: %i32 = value_param call_param0
- // CHECK:STDOUT: %.1: type = splice_block %i32 [concrete = constants.%i32] {
- // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete = constants.%int_32]
- // CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32]
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %a: %i32 = value_binding a, %a.param
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %foo__carbon_thunk.decl: %foo__carbon_thunk.type = fn_decl @foo__carbon_thunk [concrete = constants.%foo__carbon_thunk] {
- // CHECK:STDOUT: %a.patt: %pattern_type.54c = value_binding_pattern a [concrete]
- // CHECK:STDOUT: %a.param_patt: %pattern_type.54c = value_param_pattern %a.patt, call_param0 [concrete]
- // CHECK:STDOUT: } {
- // CHECK:STDOUT: %a.param: %ptr.251 = value_param call_param0
- // CHECK:STDOUT: %.1: type = splice_block constants.%ptr.251 [concrete = constants.%ptr.251] {
- // CHECK:STDOUT: %int_16: Core.IntLiteral = int_value 16 [concrete = constants.%int_16]
- // CHECK:STDOUT: %i16: type = class_type @Int, @Int(constants.%int_16) [concrete = constants.%i16]
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %a: %ptr.251 = value_binding a, %a.param
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %Core.Copy: type = import_ref Core//prelude/parts/copy, Copy, loaded [concrete = constants.%Copy.type]
- // CHECK:STDOUT: %Core.import_ref.18d: @Int.as.Copy.impl.%Int.as.Copy.impl.Op.type (%Int.as.Copy.impl.Op.type.824) = import_ref Core//prelude/parts/int, loc{{\d+_\d+}}, loaded [symbolic = @Int.as.Copy.impl.%Int.as.Copy.impl.Op (constants.%Int.as.Copy.impl.Op.9b9)]
- // CHECK:STDOUT: %Copy.impl_witness_table.e76 = impl_witness_table (%Core.import_ref.18d), @Int.as.Copy.impl [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
- // CHECK:STDOUT: .Cpp = imports.%Cpp
- // CHECK:STDOUT: .F = %F.decl
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %Core.import = import Core
- // CHECK:STDOUT: %Cpp.import_cpp = import_cpp {
- // CHECK:STDOUT: import Cpp "both_overloaded_functions_called.h"
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [concrete = constants.%F] {} {}
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: fn @F() {
- // CHECK:STDOUT: !entry:
- // CHECK:STDOUT: %Cpp.ref.loc7: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
- // CHECK:STDOUT: %foo.ref.loc7: %foo.cpp_overload_set.type = name_ref foo, imports.%foo.cpp_overload_set.value [concrete = constants.%foo.cpp_overload_set.value]
- // CHECK:STDOUT: %int_1.loc7: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8]
- // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete = constants.%int_32]
- // CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32]
- // CHECK:STDOUT: %impl.elem0.loc7: %.97a = impl_witness_access constants.%As.impl_witness.ab6, element0 [concrete = constants.%Core.IntLiteral.as.As.impl.Convert.29b]
- // CHECK:STDOUT: %bound_method.loc7_13.1: <bound method> = bound_method %int_1.loc7, %impl.elem0.loc7 [concrete = constants.%Core.IntLiteral.as.As.impl.Convert.bound.bd3]
- // CHECK:STDOUT: %specific_fn.loc7: <specific function> = specific_function %impl.elem0.loc7, @Core.IntLiteral.as.As.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.As.impl.Convert.specific_fn.fab]
- // CHECK:STDOUT: %bound_method.loc7_13.2: <bound method> = bound_method %int_1.loc7, %specific_fn.loc7 [concrete = constants.%bound_method.290]
- // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.call.loc7: init %i32 = call %bound_method.loc7_13.2(%int_1.loc7) [concrete = constants.%int_1.5d2]
- // CHECK:STDOUT: %.loc7_13.1: %i32 = value_of_initializer %Core.IntLiteral.as.As.impl.Convert.call.loc7 [concrete = constants.%int_1.5d2]
- // CHECK:STDOUT: %.loc7_13.2: %i32 = converted %int_1.loc7, %.loc7_13.1 [concrete = constants.%int_1.5d2]
- // CHECK:STDOUT: %foo.call: init %empty_tuple.type = call imports.%foo.decl.bd967b.1(%.loc7_13.2)
- // CHECK:STDOUT: %Cpp.ref.loc8: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
- // CHECK:STDOUT: %foo.ref.loc8: %foo.cpp_overload_set.type = name_ref foo, imports.%foo.cpp_overload_set.value [concrete = constants.%foo.cpp_overload_set.value]
- // CHECK:STDOUT: %int_1.loc8: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8]
- // CHECK:STDOUT: %int_16: Core.IntLiteral = int_value 16 [concrete = constants.%int_16]
- // CHECK:STDOUT: %i16: type = class_type @Int, @Int(constants.%int_16) [concrete = constants.%i16]
- // CHECK:STDOUT: %impl.elem0.loc8_13.1: %.240 = impl_witness_access constants.%As.impl_witness.b61, element0 [concrete = constants.%Core.IntLiteral.as.As.impl.Convert.a42]
- // CHECK:STDOUT: %bound_method.loc8_13.1: <bound method> = bound_method %int_1.loc8, %impl.elem0.loc8_13.1 [concrete = constants.%Core.IntLiteral.as.As.impl.Convert.bound.896]
- // CHECK:STDOUT: %specific_fn.loc8_13.1: <specific function> = specific_function %impl.elem0.loc8_13.1, @Core.IntLiteral.as.As.impl.Convert(constants.%int_16) [concrete = constants.%Core.IntLiteral.as.As.impl.Convert.specific_fn.00b]
- // CHECK:STDOUT: %bound_method.loc8_13.2: <bound method> = bound_method %int_1.loc8, %specific_fn.loc8_13.1 [concrete = constants.%bound_method.4da]
- // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.call.loc8: init %i16 = call %bound_method.loc8_13.2(%int_1.loc8) [concrete = constants.%int_1.f90]
- // CHECK:STDOUT: %.loc8_13.1: %i16 = value_of_initializer %Core.IntLiteral.as.As.impl.Convert.call.loc8 [concrete = constants.%int_1.f90]
- // CHECK:STDOUT: %.loc8_13.2: %i16 = converted %int_1.loc8, %.loc8_13.1 [concrete = constants.%int_1.f90]
- // CHECK:STDOUT: %.loc8_13.3: ref %i16 = temporary_storage
- // CHECK:STDOUT: %impl.elem0.loc8_13.2: %.03d = impl_witness_access constants.%Copy.impl_witness.e99, element0 [concrete = constants.%Int.as.Copy.impl.Op.0da]
- // CHECK:STDOUT: %bound_method.loc8_13.3: <bound method> = bound_method %.loc8_13.2, %impl.elem0.loc8_13.2 [concrete = constants.%Int.as.Copy.impl.Op.bound]
- // CHECK:STDOUT: %specific_fn.loc8_13.2: <specific function> = specific_function %impl.elem0.loc8_13.2, @Int.as.Copy.impl.Op(constants.%int_16) [concrete = constants.%Int.as.Copy.impl.Op.specific_fn]
- // CHECK:STDOUT: %bound_method.loc8_13.4: <bound method> = bound_method %.loc8_13.2, %specific_fn.loc8_13.2 [concrete = constants.%bound_method.a48]
- // CHECK:STDOUT: %Int.as.Copy.impl.Op.call: init %i16 = call %bound_method.loc8_13.4(%.loc8_13.2) [concrete = constants.%int_1.f90]
- // CHECK:STDOUT: %.loc8_13.4: ref %i16 = temporary %.loc8_13.3, %Int.as.Copy.impl.Op.call
- // CHECK:STDOUT: %addr: %ptr.251 = addr_of %.loc8_13.4
- // CHECK:STDOUT: %foo__carbon_thunk.call: init %empty_tuple.type = call imports.%foo__carbon_thunk.decl(%addr)
- // CHECK:STDOUT: %DestroyOp.bound: <bound method> = bound_method %.loc8_13.4, constants.%DestroyOp
- // CHECK:STDOUT: %DestroyOp.call: init %empty_tuple.type = call %DestroyOp.bound(%.loc8_13.4)
- // CHECK:STDOUT: return
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: fn @foo.1(%a.param: %i32);
- // CHECK:STDOUT:
- // CHECK:STDOUT: fn @foo.2(%a.param: %i16);
- // CHECK:STDOUT:
- // CHECK:STDOUT: fn @foo__carbon_thunk(%a.param: %ptr.251);
- // CHECK:STDOUT:
- // CHECK:STDOUT: fn @DestroyOp(%self.param: ref %i16) = "no_op";
- // CHECK:STDOUT:
- // CHECK:STDOUT: --- import_multiple_overloaded_sets.carbon
- // CHECK:STDOUT:
- // CHECK:STDOUT: constants {
- // CHECK:STDOUT: %F.type: type = fn_type @F [concrete]
- // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete]
- // CHECK:STDOUT: %F: %F.type = struct_value () [concrete]
- // CHECK:STDOUT: %foo.cpp_overload_set.type: type = cpp_overload_set_type @foo.cpp_overload_set [concrete]
- // CHECK:STDOUT: %foo.cpp_overload_set.value: %foo.cpp_overload_set.type = cpp_overload_set_value @foo.cpp_overload_set [concrete]
- // CHECK:STDOUT: %int_1.5b8: Core.IntLiteral = int_value 1 [concrete]
- // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete]
- // CHECK:STDOUT: %Int.type: type = generic_class_type @Int [concrete]
- // CHECK:STDOUT: %Int.generic: %Int.type = struct_value () [concrete]
- // CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [concrete]
- // CHECK:STDOUT: %As.type.90f: type = generic_interface_type @As [concrete]
- // CHECK:STDOUT: %As.generic: %As.type.90f = struct_value () [concrete]
- // CHECK:STDOUT: %As.type.047: type = facet_type <@As, @As(%i32)> [concrete]
- // CHECK:STDOUT: %As.Convert.type.99b: type = fn_type @As.Convert, @As(%i32) [concrete]
- // CHECK:STDOUT: %To: Core.IntLiteral = symbolic_binding To, 0 [symbolic]
- // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.type.09e: type = fn_type @Core.IntLiteral.as.As.impl.Convert, @Core.IntLiteral.as.As.impl(%To) [symbolic]
- // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.dbe: %Core.IntLiteral.as.As.impl.Convert.type.09e = struct_value () [symbolic]
- // CHECK:STDOUT: %As.impl_witness.ab6: <witness> = impl_witness imports.%As.impl_witness_table.9fc, @Core.IntLiteral.as.As.impl(%int_32) [concrete]
- // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.type.8ec: type = fn_type @Core.IntLiteral.as.As.impl.Convert, @Core.IntLiteral.as.As.impl(%int_32) [concrete]
- // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.29b: %Core.IntLiteral.as.As.impl.Convert.type.8ec = struct_value () [concrete]
- // CHECK:STDOUT: %As.facet: %As.type.047 = facet_value Core.IntLiteral, (%As.impl_witness.ab6) [concrete]
- // CHECK:STDOUT: %.97a: type = fn_type_with_self_type %As.Convert.type.99b, %As.facet [concrete]
- // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.bound: <bound method> = bound_method %int_1.5b8, %Core.IntLiteral.as.As.impl.Convert.29b [concrete]
- // CHECK:STDOUT: %pattern_type.7ce: type = pattern_type %i32 [concrete]
- // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.specific_fn: <specific function> = specific_function %Core.IntLiteral.as.As.impl.Convert.29b, @Core.IntLiteral.as.As.impl.Convert(%int_32) [concrete]
- // CHECK:STDOUT: %bound_method: <bound method> = bound_method %int_1.5b8, %Core.IntLiteral.as.As.impl.Convert.specific_fn [concrete]
- // CHECK:STDOUT: %int_1.5d2: %i32 = int_value 1 [concrete]
- // CHECK:STDOUT: %foo.type: type = fn_type @foo [concrete]
- // CHECK:STDOUT: %foo: %foo.type = struct_value () [concrete]
- // CHECK:STDOUT: %bar.cpp_overload_set.type: type = cpp_overload_set_type @bar.cpp_overload_set [concrete]
- // CHECK:STDOUT: %bar.cpp_overload_set.value: %bar.cpp_overload_set.type = cpp_overload_set_value @bar.cpp_overload_set [concrete]
- // CHECK:STDOUT: %bar.type: type = fn_type @bar [concrete]
- // CHECK:STDOUT: %bar: %bar.type = struct_value () [concrete]
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: imports {
- // CHECK:STDOUT: %Core: <namespace> = namespace file.%Core.import, [concrete] {
- // CHECK:STDOUT: .Int = %Core.Int
- // CHECK:STDOUT: .As = %Core.As
- // CHECK:STDOUT: import Core//prelude
- // CHECK:STDOUT: import Core//prelude/...
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %Cpp: <namespace> = namespace file.%Cpp.import_cpp, [concrete] {
- // CHECK:STDOUT: .foo = %foo.cpp_overload_set.value
- // CHECK:STDOUT: .bar = %bar.cpp_overload_set.value
- // CHECK:STDOUT: import Cpp//...
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %foo.cpp_overload_set.value: %foo.cpp_overload_set.type = cpp_overload_set_value @foo.cpp_overload_set [concrete = constants.%foo.cpp_overload_set.value]
- // CHECK:STDOUT: %Core.Int: %Int.type = import_ref Core//prelude/parts/int, Int, loaded [concrete = constants.%Int.generic]
- // CHECK:STDOUT: %Core.As: %As.type.90f = import_ref Core//prelude/parts/as, As, loaded [concrete = constants.%As.generic]
- // CHECK:STDOUT: %Core.import_ref.ca0: @Core.IntLiteral.as.As.impl.%Core.IntLiteral.as.As.impl.Convert.type (%Core.IntLiteral.as.As.impl.Convert.type.09e) = import_ref Core//prelude/parts/int, loc{{\d+_\d+}}, loaded [symbolic = @Core.IntLiteral.as.As.impl.%Core.IntLiteral.as.As.impl.Convert (constants.%Core.IntLiteral.as.As.impl.Convert.dbe)]
- // CHECK:STDOUT: %As.impl_witness_table.9fc = impl_witness_table (%Core.import_ref.ca0), @Core.IntLiteral.as.As.impl [concrete]
- // CHECK:STDOUT: %foo.decl: %foo.type = fn_decl @foo [concrete = constants.%foo] {
- // CHECK:STDOUT: %a.patt: %pattern_type.7ce = value_binding_pattern a [concrete]
- // CHECK:STDOUT: %a.param_patt: %pattern_type.7ce = value_param_pattern %a.patt, call_param0 [concrete]
- // CHECK:STDOUT: } {
- // CHECK:STDOUT: %a.param: %i32 = value_param call_param0
- // CHECK:STDOUT: %.1: type = splice_block %i32 [concrete = constants.%i32] {
- // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete = constants.%int_32]
- // CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32]
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %a: %i32 = value_binding a, %a.param
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %bar.cpp_overload_set.value: %bar.cpp_overload_set.type = cpp_overload_set_value @bar.cpp_overload_set [concrete = constants.%bar.cpp_overload_set.value]
- // CHECK:STDOUT: %bar.decl: %bar.type = fn_decl @bar [concrete = constants.%bar] {
- // CHECK:STDOUT: %a.patt: %pattern_type.7ce = value_binding_pattern a [concrete]
- // CHECK:STDOUT: %a.param_patt: %pattern_type.7ce = value_param_pattern %a.patt, call_param0 [concrete]
- // CHECK:STDOUT: } {
- // CHECK:STDOUT: %a.param: %i32 = value_param call_param0
- // CHECK:STDOUT: %.1: type = splice_block %i32 [concrete = constants.%i32] {
- // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete = constants.%int_32]
- // CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32]
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %a: %i32 = value_binding a, %a.param
- // CHECK:STDOUT: }
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: file {
- // CHECK:STDOUT: package: <namespace> = namespace [concrete] {
- // CHECK:STDOUT: .Core = imports.%Core
- // CHECK:STDOUT: .Cpp = imports.%Cpp
- // CHECK:STDOUT: .F = %F.decl
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %Core.import = import Core
- // CHECK:STDOUT: %Cpp.import_cpp = import_cpp {
- // CHECK:STDOUT: import Cpp "multiple_overloaded_sets.h"
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [concrete = constants.%F] {} {}
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: fn @F() {
- // CHECK:STDOUT: !entry:
- // CHECK:STDOUT: %Cpp.ref.loc7: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
- // CHECK:STDOUT: %foo.ref: %foo.cpp_overload_set.type = name_ref foo, imports.%foo.cpp_overload_set.value [concrete = constants.%foo.cpp_overload_set.value]
- // CHECK:STDOUT: %int_1.loc7: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8]
- // CHECK:STDOUT: %int_32.loc7: Core.IntLiteral = int_value 32 [concrete = constants.%int_32]
- // CHECK:STDOUT: %i32.loc7: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32]
- // CHECK:STDOUT: %impl.elem0.loc7: %.97a = impl_witness_access constants.%As.impl_witness.ab6, element0 [concrete = constants.%Core.IntLiteral.as.As.impl.Convert.29b]
- // CHECK:STDOUT: %bound_method.loc7_13.1: <bound method> = bound_method %int_1.loc7, %impl.elem0.loc7 [concrete = constants.%Core.IntLiteral.as.As.impl.Convert.bound]
- // CHECK:STDOUT: %specific_fn.loc7: <specific function> = specific_function %impl.elem0.loc7, @Core.IntLiteral.as.As.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.As.impl.Convert.specific_fn]
- // CHECK:STDOUT: %bound_method.loc7_13.2: <bound method> = bound_method %int_1.loc7, %specific_fn.loc7 [concrete = constants.%bound_method]
- // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.call.loc7: init %i32 = call %bound_method.loc7_13.2(%int_1.loc7) [concrete = constants.%int_1.5d2]
- // CHECK:STDOUT: %.loc7_13.1: %i32 = value_of_initializer %Core.IntLiteral.as.As.impl.Convert.call.loc7 [concrete = constants.%int_1.5d2]
- // CHECK:STDOUT: %.loc7_13.2: %i32 = converted %int_1.loc7, %.loc7_13.1 [concrete = constants.%int_1.5d2]
- // CHECK:STDOUT: %foo.call: init %empty_tuple.type = call imports.%foo.decl(%.loc7_13.2)
- // CHECK:STDOUT: %Cpp.ref.loc8: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
- // CHECK:STDOUT: %bar.ref: %bar.cpp_overload_set.type = name_ref bar, imports.%bar.cpp_overload_set.value [concrete = constants.%bar.cpp_overload_set.value]
- // CHECK:STDOUT: %int_1.loc8: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8]
- // CHECK:STDOUT: %int_32.loc8: Core.IntLiteral = int_value 32 [concrete = constants.%int_32]
- // CHECK:STDOUT: %i32.loc8: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32]
- // CHECK:STDOUT: %impl.elem0.loc8: %.97a = impl_witness_access constants.%As.impl_witness.ab6, element0 [concrete = constants.%Core.IntLiteral.as.As.impl.Convert.29b]
- // CHECK:STDOUT: %bound_method.loc8_13.1: <bound method> = bound_method %int_1.loc8, %impl.elem0.loc8 [concrete = constants.%Core.IntLiteral.as.As.impl.Convert.bound]
- // CHECK:STDOUT: %specific_fn.loc8: <specific function> = specific_function %impl.elem0.loc8, @Core.IntLiteral.as.As.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.As.impl.Convert.specific_fn]
- // CHECK:STDOUT: %bound_method.loc8_13.2: <bound method> = bound_method %int_1.loc8, %specific_fn.loc8 [concrete = constants.%bound_method]
- // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.call.loc8: init %i32 = call %bound_method.loc8_13.2(%int_1.loc8) [concrete = constants.%int_1.5d2]
- // CHECK:STDOUT: %.loc8_13.1: %i32 = value_of_initializer %Core.IntLiteral.as.As.impl.Convert.call.loc8 [concrete = constants.%int_1.5d2]
- // CHECK:STDOUT: %.loc8_13.2: %i32 = converted %int_1.loc8, %.loc8_13.1 [concrete = constants.%int_1.5d2]
- // CHECK:STDOUT: %bar.call: init %empty_tuple.type = call imports.%bar.decl(%.loc8_13.2)
- // CHECK:STDOUT: return
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: fn @foo(%a.param: %i32);
- // CHECK:STDOUT:
- // CHECK:STDOUT: fn @bar(%a.param: %i32);
- // CHECK:STDOUT:
- // CHECK:STDOUT: --- import_int_literal.carbon
- // CHECK:STDOUT:
- // CHECK:STDOUT: constants {
- // CHECK:STDOUT: %F.type: type = fn_type @F [concrete]
- // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete]
- // CHECK:STDOUT: %F: %F.type = struct_value () [concrete]
- // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete]
- // CHECK:STDOUT: %Int.type: type = generic_class_type @Int [concrete]
- // CHECK:STDOUT: %Int.generic: %Int.type = struct_value () [concrete]
- // CHECK:STDOUT: %N: Core.IntLiteral = symbolic_binding N, 0 [symbolic]
- // CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [concrete]
- // CHECK:STDOUT: %pattern_type.7ce: type = pattern_type %i32 [concrete]
- // CHECK:STDOUT: %foo.cpp_overload_set.type: type = cpp_overload_set_type @foo.cpp_overload_set [concrete]
- // CHECK:STDOUT: %foo.cpp_overload_set.value: %foo.cpp_overload_set.type = cpp_overload_set_value @foo.cpp_overload_set [concrete]
- // CHECK:STDOUT: %int_2147483647.d89: Core.IntLiteral = int_value 2147483647 [concrete]
- // CHECK:STDOUT: %foo.type.a5abd1.1: type = fn_type @foo.1 [concrete]
- // CHECK:STDOUT: %foo.23ea43.1: %foo.type.a5abd1.1 = struct_value () [concrete]
- // CHECK:STDOUT: %ImplicitAs.type.cc7: type = generic_interface_type @ImplicitAs [concrete]
- // CHECK:STDOUT: %ImplicitAs.generic: %ImplicitAs.type.cc7 = struct_value () [concrete]
- // CHECK:STDOUT: %ImplicitAs.type.e8c: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete]
- // CHECK:STDOUT: %ImplicitAs.Convert.type.1b6: type = fn_type @ImplicitAs.Convert, @ImplicitAs(%i32) [concrete]
- // CHECK:STDOUT: %To: Core.IntLiteral = symbolic_binding To, 0 [symbolic]
- // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.4e6: type = fn_type @Core.IntLiteral.as.ImplicitAs.impl.Convert, @Core.IntLiteral.as.ImplicitAs.impl(%To) [symbolic]
- // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.3c2: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.4e6 = struct_value () [symbolic]
- // CHECK:STDOUT: %ImplicitAs.impl_witness.6bc: <witness> = impl_witness imports.%ImplicitAs.impl_witness_table.74f, @Core.IntLiteral.as.ImplicitAs.impl(%int_32) [concrete]
- // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.e0d: type = fn_type @Core.IntLiteral.as.ImplicitAs.impl.Convert, @Core.IntLiteral.as.ImplicitAs.impl(%int_32) [concrete]
- // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.e0d = struct_value () [concrete]
- // CHECK:STDOUT: %ImplicitAs.facet.b94: %ImplicitAs.type.e8c = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.6bc) [concrete]
- // CHECK:STDOUT: %.863: type = fn_type_with_self_type %ImplicitAs.Convert.type.1b6, %ImplicitAs.facet.b94 [concrete]
- // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.5e6: <bound method> = bound_method %int_2147483647.d89, %Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5 [concrete]
- // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn.709: <specific function> = specific_function %Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5, @Core.IntLiteral.as.ImplicitAs.impl.Convert(%int_32) [concrete]
- // CHECK:STDOUT: %bound_method.076: <bound method> = bound_method %int_2147483647.d89, %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn.709 [concrete]
- // CHECK:STDOUT: %int_2147483647.a74: %i32 = int_value 2147483647 [concrete]
- // CHECK:STDOUT: %int_64: Core.IntLiteral = int_value 64 [concrete]
- // CHECK:STDOUT: %i64: type = class_type @Int, @Int(%int_64) [concrete]
- // CHECK:STDOUT: %pattern_type.95b: type = pattern_type %i64 [concrete]
- // CHECK:STDOUT: %int_2147483648.1db: Core.IntLiteral = int_value 2147483648 [concrete]
- // CHECK:STDOUT: %foo.type.a5abd1.2: type = fn_type @foo.2 [concrete]
- // CHECK:STDOUT: %foo.23ea43.2: %foo.type.a5abd1.2 = struct_value () [concrete]
- // CHECK:STDOUT: %ImplicitAs.type.2ad: type = facet_type <@ImplicitAs, @ImplicitAs(%i64)> [concrete]
- // CHECK:STDOUT: %ImplicitAs.Convert.type.94e: type = fn_type @ImplicitAs.Convert, @ImplicitAs(%i64) [concrete]
- // CHECK:STDOUT: %ImplicitAs.impl_witness.556: <witness> = impl_witness imports.%ImplicitAs.impl_witness_table.74f, @Core.IntLiteral.as.ImplicitAs.impl(%int_64) [concrete]
- // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.b78: type = fn_type @Core.IntLiteral.as.ImplicitAs.impl.Convert, @Core.IntLiteral.as.ImplicitAs.impl(%int_64) [concrete]
- // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.57d: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.b78 = struct_value () [concrete]
- // CHECK:STDOUT: %ImplicitAs.facet.d48: %ImplicitAs.type.2ad = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.556) [concrete]
- // CHECK:STDOUT: %.567: type = fn_type_with_self_type %ImplicitAs.Convert.type.94e, %ImplicitAs.facet.d48 [concrete]
- // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.8a4: <bound method> = bound_method %int_2147483648.1db, %Core.IntLiteral.as.ImplicitAs.impl.Convert.57d [concrete]
- // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn.8d7: <specific function> = specific_function %Core.IntLiteral.as.ImplicitAs.impl.Convert.57d, @Core.IntLiteral.as.ImplicitAs.impl.Convert(%int_64) [concrete]
- // CHECK:STDOUT: %bound_method.41d: <bound method> = bound_method %int_2147483648.1db, %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn.8d7 [concrete]
- // CHECK:STDOUT: %int_2147483648.e1f: %i64 = int_value 2147483648 [concrete]
- // CHECK:STDOUT: %int_9223372036854775807.e6f: Core.IntLiteral = int_value 9223372036854775807 [concrete]
- // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.6d9: <bound method> = bound_method %int_9223372036854775807.e6f, %Core.IntLiteral.as.ImplicitAs.impl.Convert.57d [concrete]
- // CHECK:STDOUT: %bound_method.ef8: <bound method> = bound_method %int_9223372036854775807.e6f, %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn.8d7 [concrete]
- // CHECK:STDOUT: %int_9223372036854775807.9c2: %i64 = int_value 9223372036854775807 [concrete]
- // CHECK:STDOUT: %int_128: Core.IntLiteral = int_value 128 [concrete]
- // CHECK:STDOUT: %i128: type = class_type @Int, @Int(%int_128) [concrete]
- // CHECK:STDOUT: %pattern_type.57d: type = pattern_type %i128 [concrete]
- // CHECK:STDOUT: %int_9223372036854775808.293: Core.IntLiteral = int_value 9223372036854775808 [concrete]
- // CHECK:STDOUT: %ptr.974: type = ptr_type %i128 [concrete]
- // CHECK:STDOUT: %pattern_type.662: type = pattern_type %ptr.974 [concrete]
- // CHECK:STDOUT: %foo__carbon_thunk.type: type = fn_type @foo__carbon_thunk [concrete]
- // CHECK:STDOUT: %foo__carbon_thunk: %foo__carbon_thunk.type = struct_value () [concrete]
- // CHECK:STDOUT: %ImplicitAs.type.e19: type = facet_type <@ImplicitAs, @ImplicitAs(%i128)> [concrete]
- // CHECK:STDOUT: %ImplicitAs.Convert.type.812: type = fn_type @ImplicitAs.Convert, @ImplicitAs(%i128) [concrete]
- // CHECK:STDOUT: %ImplicitAs.impl_witness.47a: <witness> = impl_witness imports.%ImplicitAs.impl_witness_table.74f, @Core.IntLiteral.as.ImplicitAs.impl(%int_128) [concrete]
- // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.74a: type = fn_type @Core.IntLiteral.as.ImplicitAs.impl.Convert, @Core.IntLiteral.as.ImplicitAs.impl(%int_128) [concrete]
- // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.75a: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.74a = struct_value () [concrete]
- // CHECK:STDOUT: %ImplicitAs.facet.daa: %ImplicitAs.type.e19 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.47a) [concrete]
- // CHECK:STDOUT: %.700: type = fn_type_with_self_type %ImplicitAs.Convert.type.812, %ImplicitAs.facet.daa [concrete]
- // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.6a8: <bound method> = bound_method %int_9223372036854775808.293, %Core.IntLiteral.as.ImplicitAs.impl.Convert.75a [concrete]
- // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn.e59: <specific function> = specific_function %Core.IntLiteral.as.ImplicitAs.impl.Convert.75a, @Core.IntLiteral.as.ImplicitAs.impl.Convert(%int_128) [concrete]
- // CHECK:STDOUT: %bound_method.561: <bound method> = bound_method %int_9223372036854775808.293, %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn.e59 [concrete]
- // CHECK:STDOUT: %int_9223372036854775808.f14: %i128 = int_value 9223372036854775808 [concrete]
- // CHECK:STDOUT: %Copy.type: type = facet_type <@Copy> [concrete]
- // CHECK:STDOUT: %Copy.Op.type: type = fn_type @Copy.Op [concrete]
- // CHECK:STDOUT: %Int.as.Copy.impl.Op.type.824: type = fn_type @Int.as.Copy.impl.Op, @Int.as.Copy.impl(%N) [symbolic]
- // CHECK:STDOUT: %Int.as.Copy.impl.Op.9b9: %Int.as.Copy.impl.Op.type.824 = struct_value () [symbolic]
- // CHECK:STDOUT: %Copy.impl_witness.a35: <witness> = impl_witness imports.%Copy.impl_witness_table.e76, @Int.as.Copy.impl(%int_128) [concrete]
- // CHECK:STDOUT: %Int.as.Copy.impl.Op.type.3b0: type = fn_type @Int.as.Copy.impl.Op, @Int.as.Copy.impl(%int_128) [concrete]
- // CHECK:STDOUT: %Int.as.Copy.impl.Op.bc1: %Int.as.Copy.impl.Op.type.3b0 = struct_value () [concrete]
- // CHECK:STDOUT: %Copy.facet: %Copy.type = facet_value %i128, (%Copy.impl_witness.a35) [concrete]
- // CHECK:STDOUT: %.80a: type = fn_type_with_self_type %Copy.Op.type, %Copy.facet [concrete]
- // CHECK:STDOUT: %Int.as.Copy.impl.Op.bound.def: <bound method> = bound_method %int_9223372036854775808.f14, %Int.as.Copy.impl.Op.bc1 [concrete]
- // CHECK:STDOUT: %Int.as.Copy.impl.Op.specific_fn: <specific function> = specific_function %Int.as.Copy.impl.Op.bc1, @Int.as.Copy.impl.Op(%int_128) [concrete]
- // CHECK:STDOUT: %bound_method.b4e: <bound method> = bound_method %int_9223372036854775808.f14, %Int.as.Copy.impl.Op.specific_fn [concrete]
- // CHECK:STDOUT: %int_18446744073709551615.5ec: Core.IntLiteral = int_value 18446744073709551615 [concrete]
- // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.9ac: <bound method> = bound_method %int_18446744073709551615.5ec, %Core.IntLiteral.as.ImplicitAs.impl.Convert.75a [concrete]
- // CHECK:STDOUT: %bound_method.422: <bound method> = bound_method %int_18446744073709551615.5ec, %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn.e59 [concrete]
- // CHECK:STDOUT: %int_18446744073709551615.f56: %i128 = int_value 18446744073709551615 [concrete]
- // CHECK:STDOUT: %Int.as.Copy.impl.Op.bound.cf0: <bound method> = bound_method %int_18446744073709551615.f56, %Int.as.Copy.impl.Op.bc1 [concrete]
- // CHECK:STDOUT: %bound_method.2cb: <bound method> = bound_method %int_18446744073709551615.f56, %Int.as.Copy.impl.Op.specific_fn [concrete]
- // CHECK:STDOUT: %int_18446744073709551616.1ee: Core.IntLiteral = int_value 18446744073709551616 [concrete]
- // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.6a3: <bound method> = bound_method %int_18446744073709551616.1ee, %Core.IntLiteral.as.ImplicitAs.impl.Convert.75a [concrete]
- // CHECK:STDOUT: %bound_method.e31: <bound method> = bound_method %int_18446744073709551616.1ee, %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn.e59 [concrete]
- // CHECK:STDOUT: %int_18446744073709551616.92b: %i128 = int_value 18446744073709551616 [concrete]
- // CHECK:STDOUT: %Int.as.Copy.impl.Op.bound.bcd: <bound method> = bound_method %int_18446744073709551616.92b, %Int.as.Copy.impl.Op.bc1 [concrete]
- // CHECK:STDOUT: %bound_method.6a9: <bound method> = bound_method %int_18446744073709551616.92b, %Int.as.Copy.impl.Op.specific_fn [concrete]
- // CHECK:STDOUT: %int_170141183460469231731687303715884105727.fea: Core.IntLiteral = int_value 170141183460469231731687303715884105727 [concrete]
- // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.8e8: <bound method> = bound_method %int_170141183460469231731687303715884105727.fea, %Core.IntLiteral.as.ImplicitAs.impl.Convert.75a [concrete]
- // CHECK:STDOUT: %bound_method.d00: <bound method> = bound_method %int_170141183460469231731687303715884105727.fea, %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn.e59 [concrete]
- // CHECK:STDOUT: %int_170141183460469231731687303715884105727.ff5: %i128 = int_value 170141183460469231731687303715884105727 [concrete]
- // CHECK:STDOUT: %Int.as.Copy.impl.Op.bound.78b: <bound method> = bound_method %int_170141183460469231731687303715884105727.ff5, %Int.as.Copy.impl.Op.bc1 [concrete]
- // CHECK:STDOUT: %bound_method.2fb: <bound method> = bound_method %int_170141183460469231731687303715884105727.ff5, %Int.as.Copy.impl.Op.specific_fn [concrete]
- // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete]
- // CHECK:STDOUT: %DestroyOp.type: type = fn_type @DestroyOp [concrete]
- // CHECK:STDOUT: %DestroyOp: %DestroyOp.type = struct_value () [concrete]
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: imports {
- // CHECK:STDOUT: %Core: <namespace> = namespace file.%Core.import, [concrete] {
- // CHECK:STDOUT: .Int = %Core.Int
- // CHECK:STDOUT: .ImplicitAs = %Core.ImplicitAs
- // CHECK:STDOUT: .Copy = %Core.Copy
- // CHECK:STDOUT: .Destroy = %Core.Destroy
- // CHECK:STDOUT: import Core//prelude
- // CHECK:STDOUT: import Core//prelude/...
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %Cpp: <namespace> = namespace file.%Cpp.import_cpp, [concrete] {
- // CHECK:STDOUT: .foo = %foo.cpp_overload_set.value
- // CHECK:STDOUT: import Cpp//...
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %Core.Int: %Int.type = import_ref Core//prelude/parts/int, Int, loaded [concrete = constants.%Int.generic]
- // CHECK:STDOUT: %foo.cpp_overload_set.value: %foo.cpp_overload_set.type = cpp_overload_set_value @foo.cpp_overload_set [concrete = constants.%foo.cpp_overload_set.value]
- // CHECK:STDOUT: %foo.decl.bd967b.1: %foo.type.a5abd1.1 = fn_decl @foo.1 [concrete = constants.%foo.23ea43.1] {
- // CHECK:STDOUT: %a.patt: %pattern_type.7ce = value_binding_pattern a [concrete]
- // CHECK:STDOUT: %a.param_patt: %pattern_type.7ce = value_param_pattern %a.patt, call_param0 [concrete]
- // CHECK:STDOUT: %return.patt: %pattern_type.7ce = return_slot_pattern [concrete]
- // CHECK:STDOUT: %return.param_patt: %pattern_type.7ce = out_param_pattern %return.patt, call_param1 [concrete]
- // CHECK:STDOUT: } {
- // CHECK:STDOUT: %int_32.1: Core.IntLiteral = int_value 32 [concrete = constants.%int_32]
- // CHECK:STDOUT: %i32.1: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32]
- // CHECK:STDOUT: %a.param: %i32 = value_param call_param0
- // CHECK:STDOUT: %.1: type = splice_block %i32.2 [concrete = constants.%i32] {
- // CHECK:STDOUT: %int_32.2: Core.IntLiteral = int_value 32 [concrete = constants.%int_32]
- // CHECK:STDOUT: %i32.2: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32]
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %a: %i32 = value_binding a, %a.param
- // CHECK:STDOUT: %return.param: ref %i32 = out_param call_param1
- // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %Core.ImplicitAs: %ImplicitAs.type.cc7 = import_ref Core//prelude/parts/as, ImplicitAs, loaded [concrete = constants.%ImplicitAs.generic]
- // CHECK:STDOUT: %Core.import_ref.42d: @Core.IntLiteral.as.ImplicitAs.impl.%Core.IntLiteral.as.ImplicitAs.impl.Convert.type (%Core.IntLiteral.as.ImplicitAs.impl.Convert.type.4e6) = import_ref Core//prelude/parts/int, loc{{\d+_\d+}}, loaded [symbolic = @Core.IntLiteral.as.ImplicitAs.impl.%Core.IntLiteral.as.ImplicitAs.impl.Convert (constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.3c2)]
- // CHECK:STDOUT: %ImplicitAs.impl_witness_table.74f = impl_witness_table (%Core.import_ref.42d), @Core.IntLiteral.as.ImplicitAs.impl [concrete]
- // CHECK:STDOUT: %foo.decl.bd967b.2: %foo.type.a5abd1.2 = fn_decl @foo.2 [concrete = constants.%foo.23ea43.2] {
- // CHECK:STDOUT: %a.patt: %pattern_type.95b = value_binding_pattern a [concrete]
- // CHECK:STDOUT: %a.param_patt: %pattern_type.95b = value_param_pattern %a.patt, call_param0 [concrete]
- // CHECK:STDOUT: %return.patt: %pattern_type.95b = return_slot_pattern [concrete]
- // CHECK:STDOUT: %return.param_patt: %pattern_type.95b = out_param_pattern %return.patt, call_param1 [concrete]
- // CHECK:STDOUT: } {
- // CHECK:STDOUT: %int_64.1: Core.IntLiteral = int_value 64 [concrete = constants.%int_64]
- // CHECK:STDOUT: %i64.1: type = class_type @Int, @Int(constants.%int_64) [concrete = constants.%i64]
- // CHECK:STDOUT: %a.param: %i64 = value_param call_param0
- // CHECK:STDOUT: %.1: type = splice_block %i64.2 [concrete = constants.%i64] {
- // CHECK:STDOUT: %int_64.2: Core.IntLiteral = int_value 64 [concrete = constants.%int_64]
- // CHECK:STDOUT: %i64.2: type = class_type @Int, @Int(constants.%int_64) [concrete = constants.%i64]
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %a: %i64 = value_binding a, %a.param
- // CHECK:STDOUT: %return.param: ref %i64 = out_param call_param1
- // CHECK:STDOUT: %return: ref %i64 = return_slot %return.param
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %foo__carbon_thunk.decl: %foo__carbon_thunk.type = fn_decl @foo__carbon_thunk [concrete = constants.%foo__carbon_thunk] {
- // CHECK:STDOUT: %a.patt: %pattern_type.662 = value_binding_pattern a [concrete]
- // CHECK:STDOUT: %a.param_patt: %pattern_type.662 = value_param_pattern %a.patt, call_param0 [concrete]
- // CHECK:STDOUT: %return.patt: %pattern_type.662 = value_binding_pattern r#return [concrete]
- // CHECK:STDOUT: %return.param_patt: %pattern_type.662 = value_param_pattern %return.patt, call_param1 [concrete]
- // CHECK:STDOUT: } {
- // CHECK:STDOUT: %a.param: %ptr.974 = value_param call_param0
- // CHECK:STDOUT: %.1: type = splice_block constants.%ptr.974 [concrete = constants.%ptr.974] {
- // CHECK:STDOUT: %int_128.2: Core.IntLiteral = int_value 128 [concrete = constants.%int_128]
- // CHECK:STDOUT: %i128.2: type = class_type @Int, @Int(constants.%int_128) [concrete = constants.%i128]
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %a: %ptr.974 = value_binding a, %a.param
- // CHECK:STDOUT: %return.param: %ptr.974 = value_param call_param1
- // CHECK:STDOUT: %.2: type = splice_block constants.%ptr.974 [concrete = constants.%ptr.974] {
- // CHECK:STDOUT: %int_128.1: Core.IntLiteral = int_value 128 [concrete = constants.%int_128]
- // CHECK:STDOUT: %i128.1: type = class_type @Int, @Int(constants.%int_128) [concrete = constants.%i128]
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %return: %ptr.974 = value_binding r#return, %return.param
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %Core.Copy: type = import_ref Core//prelude/parts/copy, Copy, loaded [concrete = constants.%Copy.type]
- // CHECK:STDOUT: %Core.import_ref.18d: @Int.as.Copy.impl.%Int.as.Copy.impl.Op.type (%Int.as.Copy.impl.Op.type.824) = import_ref Core//prelude/parts/int, loc{{\d+_\d+}}, loaded [symbolic = @Int.as.Copy.impl.%Int.as.Copy.impl.Op (constants.%Int.as.Copy.impl.Op.9b9)]
- // CHECK:STDOUT: %Copy.impl_witness_table.e76 = impl_witness_table (%Core.import_ref.18d), @Int.as.Copy.impl [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
- // CHECK:STDOUT: .Cpp = imports.%Cpp
- // CHECK:STDOUT: .F = %F.decl
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %Core.import = import Core
- // CHECK:STDOUT: %Cpp.import_cpp = import_cpp {
- // CHECK:STDOUT: import Cpp "int_literal.h"
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [concrete = constants.%F] {} {}
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: fn @F() {
- // CHECK:STDOUT: !entry:
- // CHECK:STDOUT: name_binding_decl {
- // CHECK:STDOUT: %a.patt: %pattern_type.7ce = value_binding_pattern a [concrete]
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %Cpp.ref.loc8: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
- // CHECK:STDOUT: %foo.ref.loc8: %foo.cpp_overload_set.type = name_ref foo, imports.%foo.cpp_overload_set.value [concrete = constants.%foo.cpp_overload_set.value]
- // CHECK:STDOUT: %int_2147483647: Core.IntLiteral = int_value 2147483647 [concrete = constants.%int_2147483647.d89]
- // CHECK:STDOUT: %impl.elem0.loc8: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5]
- // CHECK:STDOUT: %bound_method.loc8_24.1: <bound method> = bound_method %int_2147483647, %impl.elem0.loc8 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.5e6]
- // CHECK:STDOUT: %specific_fn.loc8: <specific function> = specific_function %impl.elem0.loc8, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn.709]
- // CHECK:STDOUT: %bound_method.loc8_24.2: <bound method> = bound_method %int_2147483647, %specific_fn.loc8 [concrete = constants.%bound_method.076]
- // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc8: init %i32 = call %bound_method.loc8_24.2(%int_2147483647) [concrete = constants.%int_2147483647.a74]
- // CHECK:STDOUT: %.loc8_24.1: %i32 = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc8 [concrete = constants.%int_2147483647.a74]
- // CHECK:STDOUT: %.loc8_24.2: %i32 = converted %int_2147483647, %.loc8_24.1 [concrete = constants.%int_2147483647.a74]
- // CHECK:STDOUT: %foo.call.loc8: init %i32 = call imports.%foo.decl.bd967b.1(%.loc8_24.2)
- // CHECK:STDOUT: %.loc8_10: type = splice_block %i32 [concrete = constants.%i32] {
- // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete = constants.%int_32]
- // CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32]
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %.loc8_34.1: %i32 = value_of_initializer %foo.call.loc8
- // CHECK:STDOUT: %.loc8_34.2: %i32 = converted %foo.call.loc8, %.loc8_34.1
- // CHECK:STDOUT: %a: %i32 = value_binding a, %.loc8_34.2
- // CHECK:STDOUT: name_binding_decl {
- // CHECK:STDOUT: %b.patt: %pattern_type.95b = value_binding_pattern b [concrete]
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %Cpp.ref.loc13: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
- // CHECK:STDOUT: %foo.ref.loc13: %foo.cpp_overload_set.type = name_ref foo, imports.%foo.cpp_overload_set.value [concrete = constants.%foo.cpp_overload_set.value]
- // CHECK:STDOUT: %int_2147483648.loc13: Core.IntLiteral = int_value 2147483648 [concrete = constants.%int_2147483648.1db]
- // CHECK:STDOUT: %impl.elem0.loc13: %.567 = impl_witness_access constants.%ImplicitAs.impl_witness.556, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.57d]
- // CHECK:STDOUT: %bound_method.loc13_24.1: <bound method> = bound_method %int_2147483648.loc13, %impl.elem0.loc13 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.8a4]
- // CHECK:STDOUT: %specific_fn.loc13: <specific function> = specific_function %impl.elem0.loc13, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_64) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn.8d7]
- // CHECK:STDOUT: %bound_method.loc13_24.2: <bound method> = bound_method %int_2147483648.loc13, %specific_fn.loc13 [concrete = constants.%bound_method.41d]
- // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc13: init %i64 = call %bound_method.loc13_24.2(%int_2147483648.loc13) [concrete = constants.%int_2147483648.e1f]
- // CHECK:STDOUT: %.loc13_24.1: %i64 = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc13 [concrete = constants.%int_2147483648.e1f]
- // CHECK:STDOUT: %.loc13_24.2: %i64 = converted %int_2147483648.loc13, %.loc13_24.1 [concrete = constants.%int_2147483648.e1f]
- // CHECK:STDOUT: %foo.call.loc13: init %i64 = call imports.%foo.decl.bd967b.2(%.loc13_24.2)
- // CHECK:STDOUT: %.loc13_10: type = splice_block %i64.loc13 [concrete = constants.%i64] {
- // CHECK:STDOUT: %int_64.loc13: Core.IntLiteral = int_value 64 [concrete = constants.%int_64]
- // CHECK:STDOUT: %i64.loc13: type = class_type @Int, @Int(constants.%int_64) [concrete = constants.%i64]
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %.loc13_34.1: %i64 = value_of_initializer %foo.call.loc13
- // CHECK:STDOUT: %.loc13_34.2: %i64 = converted %foo.call.loc13, %.loc13_34.1
- // CHECK:STDOUT: %b: %i64 = value_binding b, %.loc13_34.2
- // CHECK:STDOUT: name_binding_decl {
- // CHECK:STDOUT: %b_hexa.patt: %pattern_type.95b = value_binding_pattern b_hexa [concrete]
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %Cpp.ref.loc14: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
- // CHECK:STDOUT: %foo.ref.loc14: %foo.cpp_overload_set.type = name_ref foo, imports.%foo.cpp_overload_set.value [concrete = constants.%foo.cpp_overload_set.value]
- // CHECK:STDOUT: %int_2147483648.loc14: Core.IntLiteral = int_value 2147483648 [concrete = constants.%int_2147483648.1db]
- // CHECK:STDOUT: %impl.elem0.loc14: %.567 = impl_witness_access constants.%ImplicitAs.impl_witness.556, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.57d]
- // CHECK:STDOUT: %bound_method.loc14_29.1: <bound method> = bound_method %int_2147483648.loc14, %impl.elem0.loc14 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.8a4]
- // CHECK:STDOUT: %specific_fn.loc14: <specific function> = specific_function %impl.elem0.loc14, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_64) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn.8d7]
- // CHECK:STDOUT: %bound_method.loc14_29.2: <bound method> = bound_method %int_2147483648.loc14, %specific_fn.loc14 [concrete = constants.%bound_method.41d]
- // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc14: init %i64 = call %bound_method.loc14_29.2(%int_2147483648.loc14) [concrete = constants.%int_2147483648.e1f]
- // CHECK:STDOUT: %.loc14_29.1: %i64 = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc14 [concrete = constants.%int_2147483648.e1f]
- // CHECK:STDOUT: %.loc14_29.2: %i64 = converted %int_2147483648.loc14, %.loc14_29.1 [concrete = constants.%int_2147483648.e1f]
- // CHECK:STDOUT: %foo.call.loc14: init %i64 = call imports.%foo.decl.bd967b.2(%.loc14_29.2)
- // CHECK:STDOUT: %.loc14_15: type = splice_block %i64.loc14 [concrete = constants.%i64] {
- // CHECK:STDOUT: %int_64.loc14: Core.IntLiteral = int_value 64 [concrete = constants.%int_64]
- // CHECK:STDOUT: %i64.loc14: type = class_type @Int, @Int(constants.%int_64) [concrete = constants.%i64]
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %.loc14_40.1: %i64 = value_of_initializer %foo.call.loc14
- // CHECK:STDOUT: %.loc14_40.2: %i64 = converted %foo.call.loc14, %.loc14_40.1
- // CHECK:STDOUT: %b_hexa: %i64 = value_binding b_hexa, %.loc14_40.2
- // CHECK:STDOUT: name_binding_decl {
- // CHECK:STDOUT: %b_binary.patt: %pattern_type.95b = value_binding_pattern b_binary [concrete]
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %Cpp.ref.loc15: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
- // CHECK:STDOUT: %foo.ref.loc15: %foo.cpp_overload_set.type = name_ref foo, imports.%foo.cpp_overload_set.value [concrete = constants.%foo.cpp_overload_set.value]
- // CHECK:STDOUT: %int_2147483648.loc15: Core.IntLiteral = int_value 2147483648 [concrete = constants.%int_2147483648.1db]
- // CHECK:STDOUT: %impl.elem0.loc15: %.567 = impl_witness_access constants.%ImplicitAs.impl_witness.556, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.57d]
- // CHECK:STDOUT: %bound_method.loc15_31.1: <bound method> = bound_method %int_2147483648.loc15, %impl.elem0.loc15 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.8a4]
- // CHECK:STDOUT: %specific_fn.loc15: <specific function> = specific_function %impl.elem0.loc15, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_64) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn.8d7]
- // CHECK:STDOUT: %bound_method.loc15_31.2: <bound method> = bound_method %int_2147483648.loc15, %specific_fn.loc15 [concrete = constants.%bound_method.41d]
- // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc15: init %i64 = call %bound_method.loc15_31.2(%int_2147483648.loc15) [concrete = constants.%int_2147483648.e1f]
- // CHECK:STDOUT: %.loc15_31.1: %i64 = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc15 [concrete = constants.%int_2147483648.e1f]
- // CHECK:STDOUT: %.loc15_31.2: %i64 = converted %int_2147483648.loc15, %.loc15_31.1 [concrete = constants.%int_2147483648.e1f]
- // CHECK:STDOUT: %foo.call.loc15: init %i64 = call imports.%foo.decl.bd967b.2(%.loc15_31.2)
- // CHECK:STDOUT: %.loc15_17: type = splice_block %i64.loc15 [concrete = constants.%i64] {
- // CHECK:STDOUT: %int_64.loc15: Core.IntLiteral = int_value 64 [concrete = constants.%int_64]
- // CHECK:STDOUT: %i64.loc15: type = class_type @Int, @Int(constants.%int_64) [concrete = constants.%i64]
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %.loc15_72.1: %i64 = value_of_initializer %foo.call.loc15
- // CHECK:STDOUT: %.loc15_72.2: %i64 = converted %foo.call.loc15, %.loc15_72.1
- // CHECK:STDOUT: %b_binary: %i64 = value_binding b_binary, %.loc15_72.2
- // CHECK:STDOUT: name_binding_decl {
- // CHECK:STDOUT: %c.patt: %pattern_type.95b = value_binding_pattern c [concrete]
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %Cpp.ref.loc18: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
- // CHECK:STDOUT: %foo.ref.loc18: %foo.cpp_overload_set.type = name_ref foo, imports.%foo.cpp_overload_set.value [concrete = constants.%foo.cpp_overload_set.value]
- // CHECK:STDOUT: %int_9223372036854775807: Core.IntLiteral = int_value 9223372036854775807 [concrete = constants.%int_9223372036854775807.e6f]
- // CHECK:STDOUT: %impl.elem0.loc18: %.567 = impl_witness_access constants.%ImplicitAs.impl_witness.556, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.57d]
- // CHECK:STDOUT: %bound_method.loc18_24.1: <bound method> = bound_method %int_9223372036854775807, %impl.elem0.loc18 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.6d9]
- // CHECK:STDOUT: %specific_fn.loc18: <specific function> = specific_function %impl.elem0.loc18, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_64) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn.8d7]
- // CHECK:STDOUT: %bound_method.loc18_24.2: <bound method> = bound_method %int_9223372036854775807, %specific_fn.loc18 [concrete = constants.%bound_method.ef8]
- // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc18: init %i64 = call %bound_method.loc18_24.2(%int_9223372036854775807) [concrete = constants.%int_9223372036854775807.9c2]
- // CHECK:STDOUT: %.loc18_24.1: %i64 = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc18 [concrete = constants.%int_9223372036854775807.9c2]
- // CHECK:STDOUT: %.loc18_24.2: %i64 = converted %int_9223372036854775807, %.loc18_24.1 [concrete = constants.%int_9223372036854775807.9c2]
- // CHECK:STDOUT: %foo.call.loc18: init %i64 = call imports.%foo.decl.bd967b.2(%.loc18_24.2)
- // CHECK:STDOUT: %.loc18_10: type = splice_block %i64.loc18 [concrete = constants.%i64] {
- // CHECK:STDOUT: %int_64.loc18: Core.IntLiteral = int_value 64 [concrete = constants.%int_64]
- // CHECK:STDOUT: %i64.loc18: type = class_type @Int, @Int(constants.%int_64) [concrete = constants.%i64]
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %.loc18_43.1: %i64 = value_of_initializer %foo.call.loc18
- // CHECK:STDOUT: %.loc18_43.2: %i64 = converted %foo.call.loc18, %.loc18_43.1
- // CHECK:STDOUT: %c: %i64 = value_binding c, %.loc18_43.2
- // CHECK:STDOUT: name_binding_decl {
- // CHECK:STDOUT: %d.patt: %pattern_type.57d = value_binding_pattern d [concrete]
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %Cpp.ref.loc22: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
- // CHECK:STDOUT: %foo.ref.loc22: %foo.cpp_overload_set.type = name_ref foo, imports.%foo.cpp_overload_set.value [concrete = constants.%foo.cpp_overload_set.value]
- // CHECK:STDOUT: %int_9223372036854775808: Core.IntLiteral = int_value 9223372036854775808 [concrete = constants.%int_9223372036854775808.293]
- // CHECK:STDOUT: %impl.elem0.loc22_25.1: %.700 = impl_witness_access constants.%ImplicitAs.impl_witness.47a, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.75a]
- // CHECK:STDOUT: %bound_method.loc22_25.1: <bound method> = bound_method %int_9223372036854775808, %impl.elem0.loc22_25.1 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.6a8]
- // CHECK:STDOUT: %specific_fn.loc22_25.1: <specific function> = specific_function %impl.elem0.loc22_25.1, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_128) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn.e59]
- // CHECK:STDOUT: %bound_method.loc22_25.2: <bound method> = bound_method %int_9223372036854775808, %specific_fn.loc22_25.1 [concrete = constants.%bound_method.561]
- // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc22: init %i128 = call %bound_method.loc22_25.2(%int_9223372036854775808) [concrete = constants.%int_9223372036854775808.f14]
- // CHECK:STDOUT: %.loc22_25.1: %i128 = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc22 [concrete = constants.%int_9223372036854775808.f14]
- // CHECK:STDOUT: %.loc22_25.2: %i128 = converted %int_9223372036854775808, %.loc22_25.1 [concrete = constants.%int_9223372036854775808.f14]
- // CHECK:STDOUT: %.loc22_25.3: ref %i128 = temporary_storage
- // CHECK:STDOUT: %impl.elem0.loc22_25.2: %.80a = impl_witness_access constants.%Copy.impl_witness.a35, element0 [concrete = constants.%Int.as.Copy.impl.Op.bc1]
- // CHECK:STDOUT: %bound_method.loc22_25.3: <bound method> = bound_method %.loc22_25.2, %impl.elem0.loc22_25.2 [concrete = constants.%Int.as.Copy.impl.Op.bound.def]
- // CHECK:STDOUT: %specific_fn.loc22_25.2: <specific function> = specific_function %impl.elem0.loc22_25.2, @Int.as.Copy.impl.Op(constants.%int_128) [concrete = constants.%Int.as.Copy.impl.Op.specific_fn]
- // CHECK:STDOUT: %bound_method.loc22_25.4: <bound method> = bound_method %.loc22_25.2, %specific_fn.loc22_25.2 [concrete = constants.%bound_method.b4e]
- // CHECK:STDOUT: %Int.as.Copy.impl.Op.call.loc22: init %i128 = call %bound_method.loc22_25.4(%.loc22_25.2) [concrete = constants.%int_9223372036854775808.f14]
- // CHECK:STDOUT: %.loc22_25.4: ref %i128 = temporary %.loc22_25.3, %Int.as.Copy.impl.Op.call.loc22
- // CHECK:STDOUT: %addr.loc22_44.1: %ptr.974 = addr_of %.loc22_25.4
- // CHECK:STDOUT: %.loc22_44.1: ref %i128 = temporary_storage
- // CHECK:STDOUT: %addr.loc22_44.2: %ptr.974 = addr_of %.loc22_44.1
- // CHECK:STDOUT: %foo__carbon_thunk.call.loc22: init %empty_tuple.type = call imports.%foo__carbon_thunk.decl(%addr.loc22_44.1, %addr.loc22_44.2)
- // CHECK:STDOUT: %.loc22_44.2: init %i128 to %.loc22_44.1 = mark_in_place_init %foo__carbon_thunk.call.loc22
- // CHECK:STDOUT: %.loc22_10: type = splice_block %i128.loc22 [concrete = constants.%i128] {
- // CHECK:STDOUT: %int_128.loc22: Core.IntLiteral = int_value 128 [concrete = constants.%int_128]
- // CHECK:STDOUT: %i128.loc22: type = class_type @Int, @Int(constants.%int_128) [concrete = constants.%i128]
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %.loc22_44.3: ref %i128 = temporary %.loc22_44.1, %.loc22_44.2
- // CHECK:STDOUT: %.loc22_44.4: %i128 = acquire_value %.loc22_44.3
- // CHECK:STDOUT: %d: %i128 = value_binding d, %.loc22_44.4
- // CHECK:STDOUT: name_binding_decl {
- // CHECK:STDOUT: %e.patt: %pattern_type.57d = value_binding_pattern e [concrete]
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %Cpp.ref.loc25: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
- // CHECK:STDOUT: %foo.ref.loc25: %foo.cpp_overload_set.type = name_ref foo, imports.%foo.cpp_overload_set.value [concrete = constants.%foo.cpp_overload_set.value]
- // CHECK:STDOUT: %int_18446744073709551615: Core.IntLiteral = int_value 18446744073709551615 [concrete = constants.%int_18446744073709551615.5ec]
- // CHECK:STDOUT: %impl.elem0.loc25_25.1: %.700 = impl_witness_access constants.%ImplicitAs.impl_witness.47a, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.75a]
- // CHECK:STDOUT: %bound_method.loc25_25.1: <bound method> = bound_method %int_18446744073709551615, %impl.elem0.loc25_25.1 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.9ac]
- // CHECK:STDOUT: %specific_fn.loc25_25.1: <specific function> = specific_function %impl.elem0.loc25_25.1, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_128) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn.e59]
- // CHECK:STDOUT: %bound_method.loc25_25.2: <bound method> = bound_method %int_18446744073709551615, %specific_fn.loc25_25.1 [concrete = constants.%bound_method.422]
- // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc25: init %i128 = call %bound_method.loc25_25.2(%int_18446744073709551615) [concrete = constants.%int_18446744073709551615.f56]
- // CHECK:STDOUT: %.loc25_25.1: %i128 = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc25 [concrete = constants.%int_18446744073709551615.f56]
- // CHECK:STDOUT: %.loc25_25.2: %i128 = converted %int_18446744073709551615, %.loc25_25.1 [concrete = constants.%int_18446744073709551615.f56]
- // CHECK:STDOUT: %.loc25_25.3: ref %i128 = temporary_storage
- // CHECK:STDOUT: %impl.elem0.loc25_25.2: %.80a = impl_witness_access constants.%Copy.impl_witness.a35, element0 [concrete = constants.%Int.as.Copy.impl.Op.bc1]
- // CHECK:STDOUT: %bound_method.loc25_25.3: <bound method> = bound_method %.loc25_25.2, %impl.elem0.loc25_25.2 [concrete = constants.%Int.as.Copy.impl.Op.bound.cf0]
- // CHECK:STDOUT: %specific_fn.loc25_25.2: <specific function> = specific_function %impl.elem0.loc25_25.2, @Int.as.Copy.impl.Op(constants.%int_128) [concrete = constants.%Int.as.Copy.impl.Op.specific_fn]
- // CHECK:STDOUT: %bound_method.loc25_25.4: <bound method> = bound_method %.loc25_25.2, %specific_fn.loc25_25.2 [concrete = constants.%bound_method.2cb]
- // CHECK:STDOUT: %Int.as.Copy.impl.Op.call.loc25: init %i128 = call %bound_method.loc25_25.4(%.loc25_25.2) [concrete = constants.%int_18446744073709551615.f56]
- // CHECK:STDOUT: %.loc25_25.4: ref %i128 = temporary %.loc25_25.3, %Int.as.Copy.impl.Op.call.loc25
- // CHECK:STDOUT: %addr.loc25_45.1: %ptr.974 = addr_of %.loc25_25.4
- // CHECK:STDOUT: %.loc25_45.1: ref %i128 = temporary_storage
- // CHECK:STDOUT: %addr.loc25_45.2: %ptr.974 = addr_of %.loc25_45.1
- // CHECK:STDOUT: %foo__carbon_thunk.call.loc25: init %empty_tuple.type = call imports.%foo__carbon_thunk.decl(%addr.loc25_45.1, %addr.loc25_45.2)
- // CHECK:STDOUT: %.loc25_45.2: init %i128 to %.loc25_45.1 = mark_in_place_init %foo__carbon_thunk.call.loc25
- // CHECK:STDOUT: %.loc25_10: type = splice_block %i128.loc25 [concrete = constants.%i128] {
- // CHECK:STDOUT: %int_128.loc25: Core.IntLiteral = int_value 128 [concrete = constants.%int_128]
- // CHECK:STDOUT: %i128.loc25: type = class_type @Int, @Int(constants.%int_128) [concrete = constants.%i128]
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %.loc25_45.3: ref %i128 = temporary %.loc25_45.1, %.loc25_45.2
- // CHECK:STDOUT: %.loc25_45.4: %i128 = acquire_value %.loc25_45.3
- // CHECK:STDOUT: %e: %i128 = value_binding e, %.loc25_45.4
- // CHECK:STDOUT: name_binding_decl {
- // CHECK:STDOUT: %f.patt: %pattern_type.57d = value_binding_pattern f [concrete]
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %Cpp.ref.loc28: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
- // CHECK:STDOUT: %foo.ref.loc28: %foo.cpp_overload_set.type = name_ref foo, imports.%foo.cpp_overload_set.value [concrete = constants.%foo.cpp_overload_set.value]
- // CHECK:STDOUT: %int_18446744073709551616: Core.IntLiteral = int_value 18446744073709551616 [concrete = constants.%int_18446744073709551616.1ee]
- // CHECK:STDOUT: %impl.elem0.loc28_25.1: %.700 = impl_witness_access constants.%ImplicitAs.impl_witness.47a, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.75a]
- // CHECK:STDOUT: %bound_method.loc28_25.1: <bound method> = bound_method %int_18446744073709551616, %impl.elem0.loc28_25.1 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.6a3]
- // CHECK:STDOUT: %specific_fn.loc28_25.1: <specific function> = specific_function %impl.elem0.loc28_25.1, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_128) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn.e59]
- // CHECK:STDOUT: %bound_method.loc28_25.2: <bound method> = bound_method %int_18446744073709551616, %specific_fn.loc28_25.1 [concrete = constants.%bound_method.e31]
- // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc28: init %i128 = call %bound_method.loc28_25.2(%int_18446744073709551616) [concrete = constants.%int_18446744073709551616.92b]
- // CHECK:STDOUT: %.loc28_25.1: %i128 = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc28 [concrete = constants.%int_18446744073709551616.92b]
- // CHECK:STDOUT: %.loc28_25.2: %i128 = converted %int_18446744073709551616, %.loc28_25.1 [concrete = constants.%int_18446744073709551616.92b]
- // CHECK:STDOUT: %.loc28_25.3: ref %i128 = temporary_storage
- // CHECK:STDOUT: %impl.elem0.loc28_25.2: %.80a = impl_witness_access constants.%Copy.impl_witness.a35, element0 [concrete = constants.%Int.as.Copy.impl.Op.bc1]
- // CHECK:STDOUT: %bound_method.loc28_25.3: <bound method> = bound_method %.loc28_25.2, %impl.elem0.loc28_25.2 [concrete = constants.%Int.as.Copy.impl.Op.bound.bcd]
- // CHECK:STDOUT: %specific_fn.loc28_25.2: <specific function> = specific_function %impl.elem0.loc28_25.2, @Int.as.Copy.impl.Op(constants.%int_128) [concrete = constants.%Int.as.Copy.impl.Op.specific_fn]
- // CHECK:STDOUT: %bound_method.loc28_25.4: <bound method> = bound_method %.loc28_25.2, %specific_fn.loc28_25.2 [concrete = constants.%bound_method.6a9]
- // CHECK:STDOUT: %Int.as.Copy.impl.Op.call.loc28: init %i128 = call %bound_method.loc28_25.4(%.loc28_25.2) [concrete = constants.%int_18446744073709551616.92b]
- // CHECK:STDOUT: %.loc28_25.4: ref %i128 = temporary %.loc28_25.3, %Int.as.Copy.impl.Op.call.loc28
- // CHECK:STDOUT: %addr.loc28_45.1: %ptr.974 = addr_of %.loc28_25.4
- // CHECK:STDOUT: %.loc28_45.1: ref %i128 = temporary_storage
- // CHECK:STDOUT: %addr.loc28_45.2: %ptr.974 = addr_of %.loc28_45.1
- // CHECK:STDOUT: %foo__carbon_thunk.call.loc28: init %empty_tuple.type = call imports.%foo__carbon_thunk.decl(%addr.loc28_45.1, %addr.loc28_45.2)
- // CHECK:STDOUT: %.loc28_45.2: init %i128 to %.loc28_45.1 = mark_in_place_init %foo__carbon_thunk.call.loc28
- // CHECK:STDOUT: %.loc28_10: type = splice_block %i128.loc28 [concrete = constants.%i128] {
- // CHECK:STDOUT: %int_128.loc28: Core.IntLiteral = int_value 128 [concrete = constants.%int_128]
- // CHECK:STDOUT: %i128.loc28: type = class_type @Int, @Int(constants.%int_128) [concrete = constants.%i128]
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %.loc28_45.3: ref %i128 = temporary %.loc28_45.1, %.loc28_45.2
- // CHECK:STDOUT: %.loc28_45.4: %i128 = acquire_value %.loc28_45.3
- // CHECK:STDOUT: %f: %i128 = value_binding f, %.loc28_45.4
- // CHECK:STDOUT: name_binding_decl {
- // CHECK:STDOUT: %g.patt: %pattern_type.57d = value_binding_pattern g [concrete]
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %Cpp.ref.loc31: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
- // CHECK:STDOUT: %foo.ref.loc31: %foo.cpp_overload_set.type = name_ref foo, imports.%foo.cpp_overload_set.value [concrete = constants.%foo.cpp_overload_set.value]
- // CHECK:STDOUT: %int_170141183460469231731687303715884105727: Core.IntLiteral = int_value 170141183460469231731687303715884105727 [concrete = constants.%int_170141183460469231731687303715884105727.fea]
- // CHECK:STDOUT: %impl.elem0.loc31_25.1: %.700 = impl_witness_access constants.%ImplicitAs.impl_witness.47a, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.75a]
- // CHECK:STDOUT: %bound_method.loc31_25.1: <bound method> = bound_method %int_170141183460469231731687303715884105727, %impl.elem0.loc31_25.1 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.8e8]
- // CHECK:STDOUT: %specific_fn.loc31_25.1: <specific function> = specific_function %impl.elem0.loc31_25.1, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_128) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn.e59]
- // CHECK:STDOUT: %bound_method.loc31_25.2: <bound method> = bound_method %int_170141183460469231731687303715884105727, %specific_fn.loc31_25.1 [concrete = constants.%bound_method.d00]
- // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc31: init %i128 = call %bound_method.loc31_25.2(%int_170141183460469231731687303715884105727) [concrete = constants.%int_170141183460469231731687303715884105727.ff5]
- // CHECK:STDOUT: %.loc31_25.1: %i128 = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc31 [concrete = constants.%int_170141183460469231731687303715884105727.ff5]
- // CHECK:STDOUT: %.loc31_25.2: %i128 = converted %int_170141183460469231731687303715884105727, %.loc31_25.1 [concrete = constants.%int_170141183460469231731687303715884105727.ff5]
- // CHECK:STDOUT: %.loc31_25.3: ref %i128 = temporary_storage
- // CHECK:STDOUT: %impl.elem0.loc31_25.2: %.80a = impl_witness_access constants.%Copy.impl_witness.a35, element0 [concrete = constants.%Int.as.Copy.impl.Op.bc1]
- // CHECK:STDOUT: %bound_method.loc31_25.3: <bound method> = bound_method %.loc31_25.2, %impl.elem0.loc31_25.2 [concrete = constants.%Int.as.Copy.impl.Op.bound.78b]
- // CHECK:STDOUT: %specific_fn.loc31_25.2: <specific function> = specific_function %impl.elem0.loc31_25.2, @Int.as.Copy.impl.Op(constants.%int_128) [concrete = constants.%Int.as.Copy.impl.Op.specific_fn]
- // CHECK:STDOUT: %bound_method.loc31_25.4: <bound method> = bound_method %.loc31_25.2, %specific_fn.loc31_25.2 [concrete = constants.%bound_method.2fb]
- // CHECK:STDOUT: %Int.as.Copy.impl.Op.call.loc31: init %i128 = call %bound_method.loc31_25.4(%.loc31_25.2) [concrete = constants.%int_170141183460469231731687303715884105727.ff5]
- // CHECK:STDOUT: %.loc31_25.4: ref %i128 = temporary %.loc31_25.3, %Int.as.Copy.impl.Op.call.loc31
- // CHECK:STDOUT: %addr.loc31_64.1: %ptr.974 = addr_of %.loc31_25.4
- // CHECK:STDOUT: %.loc31_64.1: ref %i128 = temporary_storage
- // CHECK:STDOUT: %addr.loc31_64.2: %ptr.974 = addr_of %.loc31_64.1
- // CHECK:STDOUT: %foo__carbon_thunk.call.loc31: init %empty_tuple.type = call imports.%foo__carbon_thunk.decl(%addr.loc31_64.1, %addr.loc31_64.2)
- // CHECK:STDOUT: %.loc31_64.2: init %i128 to %.loc31_64.1 = mark_in_place_init %foo__carbon_thunk.call.loc31
- // CHECK:STDOUT: %.loc31_10: type = splice_block %i128.loc31 [concrete = constants.%i128] {
- // CHECK:STDOUT: %int_128.loc31: Core.IntLiteral = int_value 128 [concrete = constants.%int_128]
- // CHECK:STDOUT: %i128.loc31: type = class_type @Int, @Int(constants.%int_128) [concrete = constants.%i128]
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %.loc31_64.3: ref %i128 = temporary %.loc31_64.1, %.loc31_64.2
- // CHECK:STDOUT: %.loc31_64.4: %i128 = acquire_value %.loc31_64.3
- // CHECK:STDOUT: %g: %i128 = value_binding g, %.loc31_64.4
- // CHECK:STDOUT: %DestroyOp.bound.loc31_64: <bound method> = bound_method %.loc31_64.3, constants.%DestroyOp
- // CHECK:STDOUT: %DestroyOp.call.loc31_64: init %empty_tuple.type = call %DestroyOp.bound.loc31_64(%.loc31_64.3)
- // CHECK:STDOUT: %DestroyOp.bound.loc31_25: <bound method> = bound_method %.loc31_25.4, constants.%DestroyOp
- // CHECK:STDOUT: %DestroyOp.call.loc31_25: init %empty_tuple.type = call %DestroyOp.bound.loc31_25(%.loc31_25.4)
- // CHECK:STDOUT: %DestroyOp.bound.loc28_45: <bound method> = bound_method %.loc28_45.3, constants.%DestroyOp
- // CHECK:STDOUT: %DestroyOp.call.loc28_45: init %empty_tuple.type = call %DestroyOp.bound.loc28_45(%.loc28_45.3)
- // CHECK:STDOUT: %DestroyOp.bound.loc28_25: <bound method> = bound_method %.loc28_25.4, constants.%DestroyOp
- // CHECK:STDOUT: %DestroyOp.call.loc28_25: init %empty_tuple.type = call %DestroyOp.bound.loc28_25(%.loc28_25.4)
- // CHECK:STDOUT: %DestroyOp.bound.loc25_45: <bound method> = bound_method %.loc25_45.3, constants.%DestroyOp
- // CHECK:STDOUT: %DestroyOp.call.loc25_45: init %empty_tuple.type = call %DestroyOp.bound.loc25_45(%.loc25_45.3)
- // CHECK:STDOUT: %DestroyOp.bound.loc25_25: <bound method> = bound_method %.loc25_25.4, constants.%DestroyOp
- // CHECK:STDOUT: %DestroyOp.call.loc25_25: init %empty_tuple.type = call %DestroyOp.bound.loc25_25(%.loc25_25.4)
- // CHECK:STDOUT: %DestroyOp.bound.loc22_44: <bound method> = bound_method %.loc22_44.3, constants.%DestroyOp
- // CHECK:STDOUT: %DestroyOp.call.loc22_44: init %empty_tuple.type = call %DestroyOp.bound.loc22_44(%.loc22_44.3)
- // CHECK:STDOUT: %DestroyOp.bound.loc22_25: <bound method> = bound_method %.loc22_25.4, constants.%DestroyOp
- // CHECK:STDOUT: %DestroyOp.call.loc22_25: init %empty_tuple.type = call %DestroyOp.bound.loc22_25(%.loc22_25.4)
- // CHECK:STDOUT: return
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: fn @foo.1(%a.param: %i32) -> out %return.param: %i32;
- // CHECK:STDOUT:
- // CHECK:STDOUT: fn @foo.2(%a.param: %i64) -> out %return.param: %i64;
- // CHECK:STDOUT:
- // CHECK:STDOUT: fn @foo.3(%a.param: %i128) -> out %return.param: %i128;
- // CHECK:STDOUT:
- // CHECK:STDOUT: fn @foo__carbon_thunk(%a.param: %ptr.974, %return.param: %ptr.974);
- // CHECK:STDOUT:
- // CHECK:STDOUT: fn @DestroyOp(%self.param: ref %i128) = "no_op";
- // CHECK:STDOUT:
- // CHECK:STDOUT: --- fail_import_large_int_literal.carbon
- // CHECK:STDOUT:
- // CHECK:STDOUT: constants {
- // CHECK:STDOUT: %F.type: type = fn_type @F [concrete]
- // CHECK:STDOUT: %F: %F.type = struct_value () [concrete]
- // CHECK:STDOUT: %int_128: Core.IntLiteral = int_value 128 [concrete]
- // CHECK:STDOUT: %Int.type: type = generic_class_type @Int [concrete]
- // CHECK:STDOUT: %Int.generic: %Int.type = struct_value () [concrete]
- // CHECK:STDOUT: %i128: type = class_type @Int, @Int(%int_128) [concrete]
- // CHECK:STDOUT: %pattern_type.57d: type = pattern_type %i128 [concrete]
- // CHECK:STDOUT: %foo.cpp_overload_set.type: type = cpp_overload_set_type @foo.cpp_overload_set [concrete]
- // CHECK:STDOUT: %foo.cpp_overload_set.value: %foo.cpp_overload_set.type = cpp_overload_set_value @foo.cpp_overload_set [concrete]
- // CHECK:STDOUT: %int_170141183460469231731687303715884105728: Core.IntLiteral = int_value 170141183460469231731687303715884105728 [concrete]
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: imports {
- // CHECK:STDOUT: %Core: <namespace> = namespace file.%Core.import, [concrete] {
- // CHECK:STDOUT: .Int = %Core.Int
- // CHECK:STDOUT: import Core//prelude
- // CHECK:STDOUT: import Core//prelude/...
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %Cpp: <namespace> = namespace file.%Cpp.import_cpp, [concrete] {
- // CHECK:STDOUT: .foo = %foo.cpp_overload_set.value
- // CHECK:STDOUT: import Cpp//...
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %Core.Int: %Int.type = import_ref Core//prelude/parts/int, Int, loaded [concrete = constants.%Int.generic]
- // CHECK:STDOUT: %foo.cpp_overload_set.value: %foo.cpp_overload_set.type = cpp_overload_set_value @foo.cpp_overload_set [concrete = constants.%foo.cpp_overload_set.value]
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: file {
- // CHECK:STDOUT: package: <namespace> = namespace [concrete] {
- // CHECK:STDOUT: .Core = imports.%Core
- // CHECK:STDOUT: .Cpp = imports.%Cpp
- // CHECK:STDOUT: .F = %F.decl
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %Core.import = import Core
- // CHECK:STDOUT: %Cpp.import_cpp = import_cpp {
- // CHECK:STDOUT: import Cpp "int_literal.h"
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [concrete = constants.%F] {} {}
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: fn @F() {
- // CHECK:STDOUT: !entry:
- // CHECK:STDOUT: name_binding_decl {
- // CHECK:STDOUT: %h.patt: %pattern_type.57d = value_binding_pattern h [concrete]
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %Cpp.ref: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
- // CHECK:STDOUT: %foo.ref: %foo.cpp_overload_set.type = name_ref foo, imports.%foo.cpp_overload_set.value [concrete = constants.%foo.cpp_overload_set.value]
- // CHECK:STDOUT: %int_170141183460469231731687303715884105728: Core.IntLiteral = int_value 170141183460469231731687303715884105728 [concrete = constants.%int_170141183460469231731687303715884105728]
- // CHECK:STDOUT: %.loc17: type = splice_block %i128 [concrete = constants.%i128] {
- // CHECK:STDOUT: %int_128: Core.IntLiteral = int_value 128 [concrete = constants.%int_128]
- // CHECK:STDOUT: %i128: type = class_type @Int, @Int(constants.%int_128) [concrete = constants.%i128]
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %h: %i128 = value_binding h, <error> [concrete = <error>]
- // CHECK:STDOUT: return
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: --- import_negative_int_literal.carbon
- // CHECK:STDOUT:
- // CHECK:STDOUT: constants {
- // CHECK:STDOUT: %F.type: type = fn_type @F [concrete]
- // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete]
- // CHECK:STDOUT: %F: %F.type = struct_value () [concrete]
- // CHECK:STDOUT: %foo.cpp_overload_set.type: type = cpp_overload_set_type @foo.cpp_overload_set [concrete]
- // CHECK:STDOUT: %foo.cpp_overload_set.value: %foo.cpp_overload_set.type = cpp_overload_set_value @foo.cpp_overload_set [concrete]
- // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete]
- // CHECK:STDOUT: %Negate.type: type = facet_type <@Negate> [concrete]
- // CHECK:STDOUT: %Negate.Op.type: type = fn_type @Negate.Op [concrete]
- // CHECK:STDOUT: %Negate.impl_witness: <witness> = impl_witness imports.%Negate.impl_witness_table [concrete]
- // CHECK:STDOUT: %Negate.facet: %Negate.type = facet_value Core.IntLiteral, (%Negate.impl_witness) [concrete]
- // CHECK:STDOUT: %.826: type = fn_type_with_self_type %Negate.Op.type, %Negate.facet [concrete]
- // CHECK:STDOUT: %Core.IntLiteral.as.Negate.impl.Op.type: type = fn_type @Core.IntLiteral.as.Negate.impl.Op [concrete]
- // CHECK:STDOUT: %Core.IntLiteral.as.Negate.impl.Op: %Core.IntLiteral.as.Negate.impl.Op.type = struct_value () [concrete]
- // CHECK:STDOUT: %Core.IntLiteral.as.Negate.impl.Op.bound: <bound method> = bound_method %int_1, %Core.IntLiteral.as.Negate.impl.Op [concrete]
- // CHECK:STDOUT: %int_-1.638: Core.IntLiteral = int_value -1 [concrete]
- // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete]
- // CHECK:STDOUT: %Int.type: type = generic_class_type @Int [concrete]
- // CHECK:STDOUT: %Int.generic: %Int.type = struct_value () [concrete]
- // CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [concrete]
- // CHECK:STDOUT: %pattern_type.7ce: type = pattern_type %i32 [concrete]
- // CHECK:STDOUT: %foo.type: type = fn_type @foo [concrete]
- // CHECK:STDOUT: %foo: %foo.type = struct_value () [concrete]
- // CHECK:STDOUT: %ImplicitAs.type.cc7: type = generic_interface_type @ImplicitAs [concrete]
- // CHECK:STDOUT: %ImplicitAs.generic: %ImplicitAs.type.cc7 = struct_value () [concrete]
- // CHECK:STDOUT: %ImplicitAs.type.e8c: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete]
- // CHECK:STDOUT: %ImplicitAs.Convert.type.1b6: type = fn_type @ImplicitAs.Convert, @ImplicitAs(%i32) [concrete]
- // CHECK:STDOUT: %To: Core.IntLiteral = symbolic_binding To, 0 [symbolic]
- // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.4e6: type = fn_type @Core.IntLiteral.as.ImplicitAs.impl.Convert, @Core.IntLiteral.as.ImplicitAs.impl(%To) [symbolic]
- // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.3c2: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.4e6 = struct_value () [symbolic]
- // CHECK:STDOUT: %ImplicitAs.impl_witness.6bc: <witness> = impl_witness imports.%ImplicitAs.impl_witness_table.74f, @Core.IntLiteral.as.ImplicitAs.impl(%int_32) [concrete]
- // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.e0d: type = fn_type @Core.IntLiteral.as.ImplicitAs.impl.Convert, @Core.IntLiteral.as.ImplicitAs.impl(%int_32) [concrete]
- // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.e0d = struct_value () [concrete]
- // CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.e8c = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.6bc) [concrete]
- // CHECK:STDOUT: %.863: type = fn_type_with_self_type %ImplicitAs.Convert.type.1b6, %ImplicitAs.facet [concrete]
- // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound: <bound method> = bound_method %int_-1.638, %Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5 [concrete]
- // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn: <specific function> = specific_function %Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5, @Core.IntLiteral.as.ImplicitAs.impl.Convert(%int_32) [concrete]
- // CHECK:STDOUT: %bound_method: <bound method> = bound_method %int_-1.638, %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete]
- // CHECK:STDOUT: %int_-1.251: %i32 = int_value -1 [concrete]
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: imports {
- // CHECK:STDOUT: %Core: <namespace> = namespace file.%Core.import, [concrete] {
- // CHECK:STDOUT: .Negate = %Core.Negate
- // CHECK:STDOUT: .Int = %Core.Int
- // CHECK:STDOUT: .ImplicitAs = %Core.ImplicitAs
- // CHECK:STDOUT: import Core//prelude
- // CHECK:STDOUT: import Core//prelude/...
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %Cpp: <namespace> = namespace file.%Cpp.import_cpp, [concrete] {
- // CHECK:STDOUT: .foo = %foo.cpp_overload_set.value
- // CHECK:STDOUT: import Cpp//...
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %foo.cpp_overload_set.value: %foo.cpp_overload_set.type = cpp_overload_set_value @foo.cpp_overload_set [concrete = constants.%foo.cpp_overload_set.value]
- // CHECK:STDOUT: %Core.Negate: type = import_ref Core//prelude/parts/int_literal, Negate, loaded [concrete = constants.%Negate.type]
- // CHECK:STDOUT: %Core.import_ref.abd = import_ref Core//prelude/parts/int_literal, loc{{\d+_\d+}}, unloaded
- // CHECK:STDOUT: %Core.import_ref.82e: %Core.IntLiteral.as.Negate.impl.Op.type = import_ref Core//prelude/parts/int_literal, loc{{\d+_\d+}}, loaded [concrete = constants.%Core.IntLiteral.as.Negate.impl.Op]
- // CHECK:STDOUT: %Negate.impl_witness_table = impl_witness_table (%Core.import_ref.abd, %Core.import_ref.82e), @Core.IntLiteral.as.Negate.impl [concrete]
- // CHECK:STDOUT: %Core.Int: %Int.type = import_ref Core//prelude/parts/int, Int, loaded [concrete = constants.%Int.generic]
- // CHECK:STDOUT: %foo.decl: %foo.type = fn_decl @foo [concrete = constants.%foo] {
- // CHECK:STDOUT: %a.patt: %pattern_type.7ce = value_binding_pattern a [concrete]
- // CHECK:STDOUT: %a.param_patt: %pattern_type.7ce = value_param_pattern %a.patt, call_param0 [concrete]
- // CHECK:STDOUT: } {
- // CHECK:STDOUT: %a.param: %i32 = value_param call_param0
- // CHECK:STDOUT: %.1: type = splice_block %i32 [concrete = constants.%i32] {
- // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete = constants.%int_32]
- // CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32]
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %a: %i32 = value_binding a, %a.param
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %Core.ImplicitAs: %ImplicitAs.type.cc7 = import_ref Core//prelude/parts/as, ImplicitAs, loaded [concrete = constants.%ImplicitAs.generic]
- // CHECK:STDOUT: %Core.import_ref.42d: @Core.IntLiteral.as.ImplicitAs.impl.%Core.IntLiteral.as.ImplicitAs.impl.Convert.type (%Core.IntLiteral.as.ImplicitAs.impl.Convert.type.4e6) = import_ref Core//prelude/parts/int, loc{{\d+_\d+}}, loaded [symbolic = @Core.IntLiteral.as.ImplicitAs.impl.%Core.IntLiteral.as.ImplicitAs.impl.Convert (constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.3c2)]
- // CHECK:STDOUT: %ImplicitAs.impl_witness_table.74f = impl_witness_table (%Core.import_ref.42d), @Core.IntLiteral.as.ImplicitAs.impl [concrete]
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: file {
- // CHECK:STDOUT: package: <namespace> = namespace [concrete] {
- // CHECK:STDOUT: .Core = imports.%Core
- // CHECK:STDOUT: .Cpp = imports.%Cpp
- // CHECK:STDOUT: .F = %F.decl
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %Core.import = import Core
- // CHECK:STDOUT: %Cpp.import_cpp = import_cpp {
- // CHECK:STDOUT: import Cpp "negative_int_literal.h"
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [concrete = constants.%F] {} {}
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: fn @F() {
- // CHECK:STDOUT: !entry:
- // CHECK:STDOUT: %Cpp.ref: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
- // CHECK:STDOUT: %foo.ref: %foo.cpp_overload_set.type = name_ref foo, imports.%foo.cpp_overload_set.value [concrete = constants.%foo.cpp_overload_set.value]
- // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1]
- // CHECK:STDOUT: %impl.elem1: %.826 = impl_witness_access constants.%Negate.impl_witness, element1 [concrete = constants.%Core.IntLiteral.as.Negate.impl.Op]
- // CHECK:STDOUT: %bound_method.loc8_11.1: <bound method> = bound_method %int_1, %impl.elem1 [concrete = constants.%Core.IntLiteral.as.Negate.impl.Op.bound]
- // CHECK:STDOUT: %Core.IntLiteral.as.Negate.impl.Op.call: init Core.IntLiteral = call %bound_method.loc8_11.1(%int_1) [concrete = constants.%int_-1.638]
- // CHECK:STDOUT: %impl.elem0: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5]
- // CHECK:STDOUT: %bound_method.loc8_11.2: <bound method> = bound_method %Core.IntLiteral.as.Negate.impl.Op.call, %impl.elem0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound]
- // CHECK:STDOUT: %specific_fn: <specific function> = specific_function %impl.elem0, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn]
- // CHECK:STDOUT: %bound_method.loc8_11.3: <bound method> = bound_method %Core.IntLiteral.as.Negate.impl.Op.call, %specific_fn [concrete = constants.%bound_method]
- // CHECK:STDOUT: %.loc8_11.1: Core.IntLiteral = value_of_initializer %Core.IntLiteral.as.Negate.impl.Op.call [concrete = constants.%int_-1.638]
- // CHECK:STDOUT: %.loc8_11.2: Core.IntLiteral = converted %Core.IntLiteral.as.Negate.impl.Op.call, %.loc8_11.1 [concrete = constants.%int_-1.638]
- // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call: init %i32 = call %bound_method.loc8_11.3(%.loc8_11.2) [concrete = constants.%int_-1.251]
- // CHECK:STDOUT: %.loc8_11.3: %i32 = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call [concrete = constants.%int_-1.251]
- // CHECK:STDOUT: %.loc8_11.4: %i32 = converted %Core.IntLiteral.as.Negate.impl.Op.call, %.loc8_11.3 [concrete = constants.%int_-1.251]
- // CHECK:STDOUT: %foo.call: init %empty_tuple.type = call imports.%foo.decl(%.loc8_11.4)
- // CHECK:STDOUT: return
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: fn @foo(%a.param: %i32);
- // CHECK:STDOUT:
- // CHECK:STDOUT: --- fail_import_negative_literal_passed_to_unsigned.carbon
- // CHECK:STDOUT:
- // CHECK:STDOUT: constants {
- // CHECK:STDOUT: %F.type: type = fn_type @F [concrete]
- // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete]
- // CHECK:STDOUT: %F: %F.type = struct_value () [concrete]
- // CHECK:STDOUT: %foo.cpp_overload_set.type: type = cpp_overload_set_type @foo.cpp_overload_set [concrete]
- // CHECK:STDOUT: %foo.cpp_overload_set.value: %foo.cpp_overload_set.type = cpp_overload_set_value @foo.cpp_overload_set [concrete]
- // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete]
- // CHECK:STDOUT: %Negate.type: type = facet_type <@Negate> [concrete]
- // CHECK:STDOUT: %Negate.Op.type: type = fn_type @Negate.Op [concrete]
- // CHECK:STDOUT: %Negate.impl_witness: <witness> = impl_witness imports.%Negate.impl_witness_table [concrete]
- // CHECK:STDOUT: %Negate.facet: %Negate.type = facet_value Core.IntLiteral, (%Negate.impl_witness) [concrete]
- // CHECK:STDOUT: %.826: type = fn_type_with_self_type %Negate.Op.type, %Negate.facet [concrete]
- // CHECK:STDOUT: %Core.IntLiteral.as.Negate.impl.Op.type: type = fn_type @Core.IntLiteral.as.Negate.impl.Op [concrete]
- // CHECK:STDOUT: %Core.IntLiteral.as.Negate.impl.Op: %Core.IntLiteral.as.Negate.impl.Op.type = struct_value () [concrete]
- // CHECK:STDOUT: %Core.IntLiteral.as.Negate.impl.Op.bound: <bound method> = bound_method %int_1, %Core.IntLiteral.as.Negate.impl.Op [concrete]
- // CHECK:STDOUT: %int_-1.638: Core.IntLiteral = int_value -1 [concrete]
- // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete]
- // CHECK:STDOUT: %UInt.type: type = generic_class_type @UInt [concrete]
- // CHECK:STDOUT: %UInt.generic: %UInt.type = struct_value () [concrete]
- // CHECK:STDOUT: %u32: type = class_type @UInt, @UInt(%int_32) [concrete]
- // CHECK:STDOUT: %pattern_type.4a9: type = pattern_type %u32 [concrete]
- // CHECK:STDOUT: %foo.type: type = fn_type @foo [concrete]
- // CHECK:STDOUT: %foo: %foo.type = struct_value () [concrete]
- // CHECK:STDOUT: %ImplicitAs.type.cc7: type = generic_interface_type @ImplicitAs [concrete]
- // CHECK:STDOUT: %ImplicitAs.generic: %ImplicitAs.type.cc7 = struct_value () [concrete]
- // CHECK:STDOUT: %ImplicitAs.type.146: type = facet_type <@ImplicitAs, @ImplicitAs(%u32)> [concrete]
- // CHECK:STDOUT: %ImplicitAs.Convert.type.92a: type = fn_type @ImplicitAs.Convert, @ImplicitAs(%u32) [concrete]
- // CHECK:STDOUT: %To: Core.IntLiteral = symbolic_binding To, 0 [symbolic]
- // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.6a6: type = fn_type @Core.IntLiteral.as.ImplicitAs.impl.Convert, @Core.IntLiteral.as.ImplicitAs.impl(%To) [symbolic]
- // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.46e: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.6a6 = struct_value () [symbolic]
- // CHECK:STDOUT: %ImplicitAs.impl_witness.29e: <witness> = impl_witness imports.%ImplicitAs.impl_witness_table.899, @Core.IntLiteral.as.ImplicitAs.impl(%int_32) [concrete]
- // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.b07: type = fn_type @Core.IntLiteral.as.ImplicitAs.impl.Convert, @Core.IntLiteral.as.ImplicitAs.impl(%int_32) [concrete]
- // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.90e: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.b07 = struct_value () [concrete]
- // CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.146 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.29e) [concrete]
- // CHECK:STDOUT: %.aab: type = fn_type_with_self_type %ImplicitAs.Convert.type.92a, %ImplicitAs.facet [concrete]
- // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound: <bound method> = bound_method %int_-1.638, %Core.IntLiteral.as.ImplicitAs.impl.Convert.90e [concrete]
- // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn: <specific function> = specific_function %Core.IntLiteral.as.ImplicitAs.impl.Convert.90e, @Core.IntLiteral.as.ImplicitAs.impl.Convert(%int_32) [concrete]
- // CHECK:STDOUT: %bound_method: <bound method> = bound_method %int_-1.638, %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete]
- // CHECK:STDOUT: %int_-1.311: %u32 = int_value 18446744073709551615 [concrete]
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: imports {
- // CHECK:STDOUT: %Core: <namespace> = namespace file.%Core.import, [concrete] {
- // CHECK:STDOUT: .Negate = %Core.Negate
- // CHECK:STDOUT: .UInt = %Core.UInt
- // CHECK:STDOUT: .ImplicitAs = %Core.ImplicitAs
- // CHECK:STDOUT: import Core//prelude
- // CHECK:STDOUT: import Core//prelude/...
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %Cpp: <namespace> = namespace file.%Cpp.import_cpp, [concrete] {
- // CHECK:STDOUT: .foo = %foo.cpp_overload_set.value
- // CHECK:STDOUT: import Cpp//...
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %foo.cpp_overload_set.value: %foo.cpp_overload_set.type = cpp_overload_set_value @foo.cpp_overload_set [concrete = constants.%foo.cpp_overload_set.value]
- // CHECK:STDOUT: %Core.Negate: type = import_ref Core//prelude/parts/int_literal, Negate, loaded [concrete = constants.%Negate.type]
- // CHECK:STDOUT: %Core.import_ref.abd = import_ref Core//prelude/parts/int_literal, loc{{\d+_\d+}}, unloaded
- // CHECK:STDOUT: %Core.import_ref.82e: %Core.IntLiteral.as.Negate.impl.Op.type = import_ref Core//prelude/parts/int_literal, loc{{\d+_\d+}}, loaded [concrete = constants.%Core.IntLiteral.as.Negate.impl.Op]
- // CHECK:STDOUT: %Negate.impl_witness_table = impl_witness_table (%Core.import_ref.abd, %Core.import_ref.82e), @Core.IntLiteral.as.Negate.impl [concrete]
- // CHECK:STDOUT: %Core.UInt: %UInt.type = import_ref Core//prelude/parts/uint, UInt, loaded [concrete = constants.%UInt.generic]
- // CHECK:STDOUT: %foo.decl: %foo.type = fn_decl @foo [concrete = constants.%foo] {
- // CHECK:STDOUT: %a.patt: %pattern_type.4a9 = value_binding_pattern a [concrete]
- // CHECK:STDOUT: %a.param_patt: %pattern_type.4a9 = value_param_pattern %a.patt, call_param0 [concrete]
- // CHECK:STDOUT: } {
- // CHECK:STDOUT: %a.param: %u32 = value_param call_param0
- // CHECK:STDOUT: %.1: type = splice_block %u32 [concrete = constants.%u32] {
- // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete = constants.%int_32]
- // CHECK:STDOUT: %u32: type = class_type @UInt, @UInt(constants.%int_32) [concrete = constants.%u32]
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %a: %u32 = value_binding a, %a.param
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %Core.ImplicitAs: %ImplicitAs.type.cc7 = import_ref Core//prelude/parts/as, ImplicitAs, loaded [concrete = constants.%ImplicitAs.generic]
- // CHECK:STDOUT: %Core.import_ref.741: @Core.IntLiteral.as.ImplicitAs.impl.%Core.IntLiteral.as.ImplicitAs.impl.Convert.type (%Core.IntLiteral.as.ImplicitAs.impl.Convert.type.6a6) = import_ref Core//prelude/parts/uint, loc{{\d+_\d+}}, loaded [symbolic = @Core.IntLiteral.as.ImplicitAs.impl.%Core.IntLiteral.as.ImplicitAs.impl.Convert (constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.46e)]
- // CHECK:STDOUT: %ImplicitAs.impl_witness_table.899 = impl_witness_table (%Core.import_ref.741), @Core.IntLiteral.as.ImplicitAs.impl [concrete]
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: file {
- // CHECK:STDOUT: package: <namespace> = namespace [concrete] {
- // CHECK:STDOUT: .Core = imports.%Core
- // CHECK:STDOUT: .Cpp = imports.%Cpp
- // CHECK:STDOUT: .F = %F.decl
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %Core.import = import Core
- // CHECK:STDOUT: %Cpp.import_cpp = import_cpp {
- // CHECK:STDOUT: import Cpp "negative_literal_passed_to_unsigned.h"
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [concrete = constants.%F] {} {}
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: fn @F() {
- // CHECK:STDOUT: !entry:
- // CHECK:STDOUT: %Cpp.ref: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
- // CHECK:STDOUT: %foo.ref: %foo.cpp_overload_set.type = name_ref foo, imports.%foo.cpp_overload_set.value [concrete = constants.%foo.cpp_overload_set.value]
- // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1]
- // CHECK:STDOUT: %impl.elem1: %.826 = impl_witness_access constants.%Negate.impl_witness, element1 [concrete = constants.%Core.IntLiteral.as.Negate.impl.Op]
- // CHECK:STDOUT: %bound_method.loc15_11.1: <bound method> = bound_method %int_1, %impl.elem1 [concrete = constants.%Core.IntLiteral.as.Negate.impl.Op.bound]
- // CHECK:STDOUT: %Core.IntLiteral.as.Negate.impl.Op.call: init Core.IntLiteral = call %bound_method.loc15_11.1(%int_1) [concrete = constants.%int_-1.638]
- // CHECK:STDOUT: %impl.elem0: %.aab = impl_witness_access constants.%ImplicitAs.impl_witness.29e, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.90e]
- // CHECK:STDOUT: %bound_method.loc15_11.2: <bound method> = bound_method %Core.IntLiteral.as.Negate.impl.Op.call, %impl.elem0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound]
- // CHECK:STDOUT: %specific_fn: <specific function> = specific_function %impl.elem0, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn]
- // CHECK:STDOUT: %bound_method.loc15_11.3: <bound method> = bound_method %Core.IntLiteral.as.Negate.impl.Op.call, %specific_fn [concrete = constants.%bound_method]
- // CHECK:STDOUT: %.loc15_11.1: Core.IntLiteral = value_of_initializer %Core.IntLiteral.as.Negate.impl.Op.call [concrete = constants.%int_-1.638]
- // CHECK:STDOUT: %.loc15_11.2: Core.IntLiteral = converted %Core.IntLiteral.as.Negate.impl.Op.call, %.loc15_11.1 [concrete = constants.%int_-1.638]
- // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call: init %u32 = call %bound_method.loc15_11.3(%.loc15_11.2) [concrete = constants.%int_-1.311]
- // CHECK:STDOUT: %.loc15_11.3: %u32 = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call [concrete = constants.%int_-1.311]
- // CHECK:STDOUT: %.loc15_11.4: %u32 = converted %Core.IntLiteral.as.Negate.impl.Op.call, %.loc15_11.3 [concrete = constants.%int_-1.311]
- // CHECK:STDOUT: %foo.call: init %empty_tuple.type = call imports.%foo.decl(%.loc15_11.4)
- // CHECK:STDOUT: return
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: fn @foo(%a.param: %u32);
- // CHECK:STDOUT:
- // CHECK:STDOUT: --- import_floating_point_literal.carbon
- // CHECK:STDOUT:
- // CHECK:STDOUT: constants {
- // CHECK:STDOUT: %F.type: type = fn_type @F [concrete]
- // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete]
- // CHECK:STDOUT: %F: %F.type = struct_value () [concrete]
- // CHECK:STDOUT: %int_64: Core.IntLiteral = int_value 64 [concrete]
- // CHECK:STDOUT: %Float.type: type = generic_class_type @Float [concrete]
- // CHECK:STDOUT: %Float.generic: %Float.type = struct_value () [concrete]
- // CHECK:STDOUT: %N: Core.IntLiteral = symbolic_binding N, 0 [symbolic]
- // CHECK:STDOUT: %f64.d77: type = class_type @Float, @Float(%int_64) [concrete]
- // CHECK:STDOUT: %pattern_type.0ae: type = pattern_type %f64.d77 [concrete]
- // CHECK:STDOUT: %foo.cpp_overload_set.type: type = cpp_overload_set_type @foo.cpp_overload_set [concrete]
- // CHECK:STDOUT: %foo.cpp_overload_set.value: %foo.cpp_overload_set.type = cpp_overload_set_value @foo.cpp_overload_set [concrete]
- // CHECK:STDOUT: %float.674: Core.FloatLiteral = float_literal_value 10e-1 [concrete]
- // CHECK:STDOUT: %ptr.bcc: type = ptr_type %f64.d77 [concrete]
- // CHECK:STDOUT: %pattern_type.0ce: type = pattern_type %ptr.bcc [concrete]
- // CHECK:STDOUT: %foo__carbon_thunk.type: type = fn_type @foo__carbon_thunk [concrete]
- // CHECK:STDOUT: %foo__carbon_thunk: %foo__carbon_thunk.type = struct_value () [concrete]
- // CHECK:STDOUT: %ImplicitAs.type.cc7: type = generic_interface_type @ImplicitAs [concrete]
- // CHECK:STDOUT: %ImplicitAs.generic: %ImplicitAs.type.cc7 = struct_value () [concrete]
- // CHECK:STDOUT: %ImplicitAs.type.4a8: type = facet_type <@ImplicitAs, @ImplicitAs(%f64.d77)> [concrete]
- // CHECK:STDOUT: %ImplicitAs.Convert.type.726: type = fn_type @ImplicitAs.Convert, @ImplicitAs(%f64.d77) [concrete]
- // CHECK:STDOUT: %To: Core.IntLiteral = symbolic_binding To, 0 [symbolic]
- // CHECK:STDOUT: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.type.02f: type = fn_type @Core.FloatLiteral.as.ImplicitAs.impl.Convert, @Core.FloatLiteral.as.ImplicitAs.impl(%To) [symbolic]
- // CHECK:STDOUT: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.1f0: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.type.02f = struct_value () [symbolic]
- // CHECK:STDOUT: %ImplicitAs.impl_witness.cb2: <witness> = impl_witness imports.%ImplicitAs.impl_witness_table, @Core.FloatLiteral.as.ImplicitAs.impl(%int_64) [concrete]
- // CHECK:STDOUT: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.type.2c7: type = fn_type @Core.FloatLiteral.as.ImplicitAs.impl.Convert, @Core.FloatLiteral.as.ImplicitAs.impl(%int_64) [concrete]
- // CHECK:STDOUT: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.239: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.type.2c7 = struct_value () [concrete]
- // CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.4a8 = facet_value Core.FloatLiteral, (%ImplicitAs.impl_witness.cb2) [concrete]
- // CHECK:STDOUT: %.b13: type = fn_type_with_self_type %ImplicitAs.Convert.type.726, %ImplicitAs.facet [concrete]
- // CHECK:STDOUT: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.bound: <bound method> = bound_method %float.674, %Core.FloatLiteral.as.ImplicitAs.impl.Convert.239 [concrete]
- // CHECK:STDOUT: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.specific_fn: <specific function> = specific_function %Core.FloatLiteral.as.ImplicitAs.impl.Convert.239, @Core.FloatLiteral.as.ImplicitAs.impl.Convert(%int_64) [concrete]
- // CHECK:STDOUT: %bound_method.581: <bound method> = bound_method %float.674, %Core.FloatLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete]
- // CHECK:STDOUT: %float.d20: %f64.d77 = float_value 1 [concrete]
- // CHECK:STDOUT: %Copy.type: type = facet_type <@Copy> [concrete]
- // CHECK:STDOUT: %Copy.Op.type: type = fn_type @Copy.Op [concrete]
- // CHECK:STDOUT: %Float.as.Copy.impl.Op.type.2fe: type = fn_type @Float.as.Copy.impl.Op, @Float.as.Copy.impl(%N) [symbolic]
- // CHECK:STDOUT: %Float.as.Copy.impl.Op.240: %Float.as.Copy.impl.Op.type.2fe = struct_value () [symbolic]
- // CHECK:STDOUT: %Copy.impl_witness.1e3: <witness> = impl_witness imports.%Copy.impl_witness_table.119, @Float.as.Copy.impl(%int_64) [concrete]
- // CHECK:STDOUT: %Float.as.Copy.impl.Op.type.07e: type = fn_type @Float.as.Copy.impl.Op, @Float.as.Copy.impl(%int_64) [concrete]
- // CHECK:STDOUT: %Float.as.Copy.impl.Op.f05: %Float.as.Copy.impl.Op.type.07e = struct_value () [concrete]
- // CHECK:STDOUT: %Copy.facet: %Copy.type = facet_value %f64.d77, (%Copy.impl_witness.1e3) [concrete]
- // CHECK:STDOUT: %.c41: type = fn_type_with_self_type %Copy.Op.type, %Copy.facet [concrete]
- // CHECK:STDOUT: %Float.as.Copy.impl.Op.bound: <bound method> = bound_method %float.d20, %Float.as.Copy.impl.Op.f05 [concrete]
- // CHECK:STDOUT: %Float.as.Copy.impl.Op.specific_fn: <specific function> = specific_function %Float.as.Copy.impl.Op.f05, @Float.as.Copy.impl.Op(%int_64) [concrete]
- // CHECK:STDOUT: %bound_method.9b6: <bound method> = bound_method %float.d20, %Float.as.Copy.impl.Op.specific_fn [concrete]
- // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete]
- // CHECK:STDOUT: %DestroyOp.type: type = fn_type @DestroyOp [concrete]
- // CHECK:STDOUT: %DestroyOp: %DestroyOp.type = struct_value () [concrete]
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: imports {
- // CHECK:STDOUT: %Core: <namespace> = namespace file.%Core.import, [concrete] {
- // CHECK:STDOUT: .Float = %Core.Float
- // CHECK:STDOUT: .ImplicitAs = %Core.ImplicitAs
- // CHECK:STDOUT: .Copy = %Core.Copy
- // CHECK:STDOUT: .Destroy = %Core.Destroy
- // CHECK:STDOUT: import Core//prelude
- // CHECK:STDOUT: import Core//prelude/...
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %Cpp: <namespace> = namespace file.%Cpp.import_cpp, [concrete] {
- // CHECK:STDOUT: .foo = %foo.cpp_overload_set.value
- // CHECK:STDOUT: import Cpp//...
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %Core.Float: %Float.type = import_ref Core//prelude/parts/float, Float, loaded [concrete = constants.%Float.generic]
- // CHECK:STDOUT: %foo.cpp_overload_set.value: %foo.cpp_overload_set.type = cpp_overload_set_value @foo.cpp_overload_set [concrete = constants.%foo.cpp_overload_set.value]
- // CHECK:STDOUT: %foo__carbon_thunk.decl: %foo__carbon_thunk.type = fn_decl @foo__carbon_thunk [concrete = constants.%foo__carbon_thunk] {
- // CHECK:STDOUT: %a.patt: %pattern_type.0ce = value_binding_pattern a [concrete]
- // CHECK:STDOUT: %a.param_patt: %pattern_type.0ce = value_param_pattern %a.patt, call_param0 [concrete]
- // CHECK:STDOUT: %return.patt: %pattern_type.0ce = value_binding_pattern r#return [concrete]
- // CHECK:STDOUT: %return.param_patt: %pattern_type.0ce = value_param_pattern %return.patt, call_param1 [concrete]
- // CHECK:STDOUT: } {
- // CHECK:STDOUT: %a.param: %ptr.bcc = value_param call_param0
- // CHECK:STDOUT: %.1: type = splice_block constants.%ptr.bcc [concrete = constants.%ptr.bcc] {
- // CHECK:STDOUT: %int_64.2: Core.IntLiteral = int_value 64 [concrete = constants.%int_64]
- // CHECK:STDOUT: %f64.2: type = class_type @Float, @Float(constants.%int_64) [concrete = constants.%f64.d77]
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %a: %ptr.bcc = value_binding a, %a.param
- // CHECK:STDOUT: %return.param: %ptr.bcc = value_param call_param1
- // CHECK:STDOUT: %.2: type = splice_block constants.%ptr.bcc [concrete = constants.%ptr.bcc] {
- // CHECK:STDOUT: %int_64.1: Core.IntLiteral = int_value 64 [concrete = constants.%int_64]
- // CHECK:STDOUT: %f64.1: type = class_type @Float, @Float(constants.%int_64) [concrete = constants.%f64.d77]
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %return: %ptr.bcc = value_binding r#return, %return.param
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %Core.ImplicitAs: %ImplicitAs.type.cc7 = import_ref Core//prelude/parts/as, ImplicitAs, loaded [concrete = constants.%ImplicitAs.generic]
- // CHECK:STDOUT: %Core.import_ref.38a: @Core.FloatLiteral.as.ImplicitAs.impl.%Core.FloatLiteral.as.ImplicitAs.impl.Convert.type (%Core.FloatLiteral.as.ImplicitAs.impl.Convert.type.02f) = import_ref Core//prelude/parts/float, loc{{\d+_\d+}}, loaded [symbolic = @Core.FloatLiteral.as.ImplicitAs.impl.%Core.FloatLiteral.as.ImplicitAs.impl.Convert (constants.%Core.FloatLiteral.as.ImplicitAs.impl.Convert.1f0)]
- // CHECK:STDOUT: %ImplicitAs.impl_witness_table = impl_witness_table (%Core.import_ref.38a), @Core.FloatLiteral.as.ImplicitAs.impl [concrete]
- // CHECK:STDOUT: %Core.Copy: type = import_ref Core//prelude/parts/copy, Copy, loaded [concrete = constants.%Copy.type]
- // CHECK:STDOUT: %Core.import_ref.47c: @Float.as.Copy.impl.%Float.as.Copy.impl.Op.type (%Float.as.Copy.impl.Op.type.2fe) = import_ref Core//prelude/parts/float, loc{{\d+_\d+}}, loaded [symbolic = @Float.as.Copy.impl.%Float.as.Copy.impl.Op (constants.%Float.as.Copy.impl.Op.240)]
- // CHECK:STDOUT: %Copy.impl_witness_table.119 = impl_witness_table (%Core.import_ref.47c), @Float.as.Copy.impl [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
- // CHECK:STDOUT: .Cpp = imports.%Cpp
- // CHECK:STDOUT: .F = %F.decl
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %Core.import = import Core
- // CHECK:STDOUT: %Cpp.import_cpp = import_cpp {
- // CHECK:STDOUT: import Cpp "floating_point_literal.h"
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [concrete = constants.%F] {} {}
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: fn @F() {
- // CHECK:STDOUT: !entry:
- // CHECK:STDOUT: name_binding_decl {
- // CHECK:STDOUT: %d.patt: %pattern_type.0ae = value_binding_pattern d [concrete]
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %Cpp.ref: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
- // CHECK:STDOUT: %foo.ref: %foo.cpp_overload_set.type = name_ref foo, imports.%foo.cpp_overload_set.value [concrete = constants.%foo.cpp_overload_set.value]
- // CHECK:STDOUT: %float: Core.FloatLiteral = float_literal_value 10e-1 [concrete = constants.%float.674]
- // CHECK:STDOUT: %impl.elem0.loc7_24.1: %.b13 = impl_witness_access constants.%ImplicitAs.impl_witness.cb2, element0 [concrete = constants.%Core.FloatLiteral.as.ImplicitAs.impl.Convert.239]
- // CHECK:STDOUT: %bound_method.loc7_24.1: <bound method> = bound_method %float, %impl.elem0.loc7_24.1 [concrete = constants.%Core.FloatLiteral.as.ImplicitAs.impl.Convert.bound]
- // CHECK:STDOUT: %specific_fn.loc7_24.1: <specific function> = specific_function %impl.elem0.loc7_24.1, @Core.FloatLiteral.as.ImplicitAs.impl.Convert(constants.%int_64) [concrete = constants.%Core.FloatLiteral.as.ImplicitAs.impl.Convert.specific_fn]
- // CHECK:STDOUT: %bound_method.loc7_24.2: <bound method> = bound_method %float, %specific_fn.loc7_24.1 [concrete = constants.%bound_method.581]
- // CHECK:STDOUT: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.call: init %f64.d77 = call %bound_method.loc7_24.2(%float) [concrete = constants.%float.d20]
- // CHECK:STDOUT: %.loc7_24.1: %f64.d77 = value_of_initializer %Core.FloatLiteral.as.ImplicitAs.impl.Convert.call [concrete = constants.%float.d20]
- // CHECK:STDOUT: %.loc7_24.2: %f64.d77 = converted %float, %.loc7_24.1 [concrete = constants.%float.d20]
- // CHECK:STDOUT: %.loc7_24.3: ref %f64.d77 = temporary_storage
- // CHECK:STDOUT: %impl.elem0.loc7_24.2: %.c41 = impl_witness_access constants.%Copy.impl_witness.1e3, element0 [concrete = constants.%Float.as.Copy.impl.Op.f05]
- // CHECK:STDOUT: %bound_method.loc7_24.3: <bound method> = bound_method %.loc7_24.2, %impl.elem0.loc7_24.2 [concrete = constants.%Float.as.Copy.impl.Op.bound]
- // CHECK:STDOUT: %specific_fn.loc7_24.2: <specific function> = specific_function %impl.elem0.loc7_24.2, @Float.as.Copy.impl.Op(constants.%int_64) [concrete = constants.%Float.as.Copy.impl.Op.specific_fn]
- // CHECK:STDOUT: %bound_method.loc7_24.4: <bound method> = bound_method %.loc7_24.2, %specific_fn.loc7_24.2 [concrete = constants.%bound_method.9b6]
- // CHECK:STDOUT: %Float.as.Copy.impl.Op.call: init %f64.d77 = call %bound_method.loc7_24.4(%.loc7_24.2) [concrete = constants.%float.d20]
- // CHECK:STDOUT: %.loc7_24.4: ref %f64.d77 = temporary %.loc7_24.3, %Float.as.Copy.impl.Op.call
- // CHECK:STDOUT: %addr.loc7_27.1: %ptr.bcc = addr_of %.loc7_24.4
- // CHECK:STDOUT: %.loc7_27.1: ref %f64.d77 = temporary_storage
- // CHECK:STDOUT: %addr.loc7_27.2: %ptr.bcc = addr_of %.loc7_27.1
- // CHECK:STDOUT: %foo__carbon_thunk.call: init %empty_tuple.type = call imports.%foo__carbon_thunk.decl(%addr.loc7_27.1, %addr.loc7_27.2)
- // CHECK:STDOUT: %.loc7_27.2: init %f64.d77 to %.loc7_27.1 = mark_in_place_init %foo__carbon_thunk.call
- // CHECK:STDOUT: %.loc7_10: type = splice_block %f64 [concrete = constants.%f64.d77] {
- // CHECK:STDOUT: %int_64: Core.IntLiteral = int_value 64 [concrete = constants.%int_64]
- // CHECK:STDOUT: %f64: type = class_type @Float, @Float(constants.%int_64) [concrete = constants.%f64.d77]
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %.loc7_27.3: ref %f64.d77 = temporary %.loc7_27.1, %.loc7_27.2
- // CHECK:STDOUT: %.loc7_27.4: %f64.d77 = acquire_value %.loc7_27.3
- // CHECK:STDOUT: %d: %f64.d77 = value_binding d, %.loc7_27.4
- // CHECK:STDOUT: %DestroyOp.bound.loc7_27: <bound method> = bound_method %.loc7_27.3, constants.%DestroyOp
- // CHECK:STDOUT: %DestroyOp.call.loc7_27: init %empty_tuple.type = call %DestroyOp.bound.loc7_27(%.loc7_27.3)
- // CHECK:STDOUT: %DestroyOp.bound.loc7_24: <bound method> = bound_method %.loc7_24.4, constants.%DestroyOp
- // CHECK:STDOUT: %DestroyOp.call.loc7_24: init %empty_tuple.type = call %DestroyOp.bound.loc7_24(%.loc7_24.4)
- // CHECK:STDOUT: return
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: fn @foo(%a.param: %f64.d77) -> out %return.param: %f64.d77;
- // CHECK:STDOUT:
- // CHECK:STDOUT: fn @foo__carbon_thunk(%a.param: %ptr.bcc, %return.param: %ptr.bcc);
- // CHECK:STDOUT:
- // CHECK:STDOUT: fn @DestroyOp(%self.param: ref %f64.d77) = "no_op";
- // CHECK:STDOUT:
- // CHECK:STDOUT: --- fail_import_large_floating_point_literal.carbon
- // CHECK:STDOUT:
- // CHECK:STDOUT: constants {
- // CHECK:STDOUT: %F.type: type = fn_type @F [concrete]
- // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete]
- // CHECK:STDOUT: %F: %F.type = struct_value () [concrete]
- // CHECK:STDOUT: %foo.cpp_overload_set.type: type = cpp_overload_set_type @foo.cpp_overload_set [concrete]
- // CHECK:STDOUT: %foo.cpp_overload_set.value: %foo.cpp_overload_set.type = cpp_overload_set_value @foo.cpp_overload_set [concrete]
- // CHECK:STDOUT: %float: Core.FloatLiteral = float_literal_value 18e307 [concrete]
- // CHECK:STDOUT: %int_64: Core.IntLiteral = int_value 64 [concrete]
- // CHECK:STDOUT: %Float.type: type = generic_class_type @Float [concrete]
- // CHECK:STDOUT: %Float.generic: %Float.type = struct_value () [concrete]
- // CHECK:STDOUT: %N: Core.IntLiteral = symbolic_binding N, 0 [symbolic]
- // CHECK:STDOUT: %f64.d77: type = class_type @Float, @Float(%int_64) [concrete]
- // CHECK:STDOUT: %ptr.bcc: type = ptr_type %f64.d77 [concrete]
- // CHECK:STDOUT: %pattern_type.0ce: type = pattern_type %ptr.bcc [concrete]
- // CHECK:STDOUT: %foo__carbon_thunk.type: type = fn_type @foo__carbon_thunk [concrete]
- // CHECK:STDOUT: %foo__carbon_thunk: %foo__carbon_thunk.type = struct_value () [concrete]
- // CHECK:STDOUT: %ImplicitAs.type.cc7: type = generic_interface_type @ImplicitAs [concrete]
- // CHECK:STDOUT: %ImplicitAs.generic: %ImplicitAs.type.cc7 = struct_value () [concrete]
- // CHECK:STDOUT: %ImplicitAs.type.4a8: type = facet_type <@ImplicitAs, @ImplicitAs(%f64.d77)> [concrete]
- // CHECK:STDOUT: %ImplicitAs.Convert.type.726: type = fn_type @ImplicitAs.Convert, @ImplicitAs(%f64.d77) [concrete]
- // CHECK:STDOUT: %To: Core.IntLiteral = symbolic_binding To, 0 [symbolic]
- // CHECK:STDOUT: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.type.02f: type = fn_type @Core.FloatLiteral.as.ImplicitAs.impl.Convert, @Core.FloatLiteral.as.ImplicitAs.impl(%To) [symbolic]
- // CHECK:STDOUT: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.1f0: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.type.02f = struct_value () [symbolic]
- // CHECK:STDOUT: %ImplicitAs.impl_witness.cb2: <witness> = impl_witness imports.%ImplicitAs.impl_witness_table, @Core.FloatLiteral.as.ImplicitAs.impl(%int_64) [concrete]
- // CHECK:STDOUT: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.type.2c7: type = fn_type @Core.FloatLiteral.as.ImplicitAs.impl.Convert, @Core.FloatLiteral.as.ImplicitAs.impl(%int_64) [concrete]
- // CHECK:STDOUT: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.239: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.type.2c7 = struct_value () [concrete]
- // CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.4a8 = facet_value Core.FloatLiteral, (%ImplicitAs.impl_witness.cb2) [concrete]
- // CHECK:STDOUT: %.b13: type = fn_type_with_self_type %ImplicitAs.Convert.type.726, %ImplicitAs.facet [concrete]
- // CHECK:STDOUT: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.bound: <bound method> = bound_method %float, %Core.FloatLiteral.as.ImplicitAs.impl.Convert.239 [concrete]
- // CHECK:STDOUT: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.specific_fn: <specific function> = specific_function %Core.FloatLiteral.as.ImplicitAs.impl.Convert.239, @Core.FloatLiteral.as.ImplicitAs.impl.Convert(%int_64) [concrete]
- // CHECK:STDOUT: %bound_method: <bound method> = bound_method %float, %Core.FloatLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete]
- // CHECK:STDOUT: %Copy.type: type = facet_type <@Copy> [concrete]
- // CHECK:STDOUT: %Copy.Op.type: type = fn_type @Copy.Op [concrete]
- // CHECK:STDOUT: %Float.as.Copy.impl.Op.type.2fe: type = fn_type @Float.as.Copy.impl.Op, @Float.as.Copy.impl(%N) [symbolic]
- // CHECK:STDOUT: %Float.as.Copy.impl.Op.240: %Float.as.Copy.impl.Op.type.2fe = struct_value () [symbolic]
- // CHECK:STDOUT: %Copy.impl_witness.1e3: <witness> = impl_witness imports.%Copy.impl_witness_table.119, @Float.as.Copy.impl(%int_64) [concrete]
- // CHECK:STDOUT: %Float.as.Copy.impl.Op.type.07e: type = fn_type @Float.as.Copy.impl.Op, @Float.as.Copy.impl(%int_64) [concrete]
- // CHECK:STDOUT: %Float.as.Copy.impl.Op.f05: %Float.as.Copy.impl.Op.type.07e = struct_value () [concrete]
- // CHECK:STDOUT: %Copy.facet: %Copy.type = facet_value %f64.d77, (%Copy.impl_witness.1e3) [concrete]
- // CHECK:STDOUT: %.c41: type = fn_type_with_self_type %Copy.Op.type, %Copy.facet [concrete]
- // CHECK:STDOUT: %Float.as.Copy.impl.Op.specific_fn: <specific function> = specific_function %Float.as.Copy.impl.Op.f05, @Float.as.Copy.impl.Op(%int_64) [concrete]
- // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete]
- // CHECK:STDOUT: %DestroyOp.type: type = fn_type @DestroyOp [concrete]
- // CHECK:STDOUT: %DestroyOp: %DestroyOp.type = struct_value () [concrete]
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: imports {
- // CHECK:STDOUT: %Core: <namespace> = namespace file.%Core.import, [concrete] {
- // CHECK:STDOUT: .Float = %Core.Float
- // CHECK:STDOUT: .ImplicitAs = %Core.ImplicitAs
- // CHECK:STDOUT: .Copy = %Core.Copy
- // CHECK:STDOUT: .Destroy = %Core.Destroy
- // CHECK:STDOUT: import Core//prelude
- // CHECK:STDOUT: import Core//prelude/...
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %Cpp: <namespace> = namespace file.%Cpp.import_cpp, [concrete] {
- // CHECK:STDOUT: .foo = %foo.cpp_overload_set.value
- // CHECK:STDOUT: import Cpp//...
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %foo.cpp_overload_set.value: %foo.cpp_overload_set.type = cpp_overload_set_value @foo.cpp_overload_set [concrete = constants.%foo.cpp_overload_set.value]
- // CHECK:STDOUT: %Core.Float: %Float.type = import_ref Core//prelude/parts/float, Float, loaded [concrete = constants.%Float.generic]
- // CHECK:STDOUT: %foo__carbon_thunk.decl: %foo__carbon_thunk.type = fn_decl @foo__carbon_thunk [concrete = constants.%foo__carbon_thunk] {
- // CHECK:STDOUT: %a.patt: %pattern_type.0ce = value_binding_pattern a [concrete]
- // CHECK:STDOUT: %a.param_patt: %pattern_type.0ce = value_param_pattern %a.patt, call_param0 [concrete]
- // CHECK:STDOUT: %return.patt: %pattern_type.0ce = value_binding_pattern r#return [concrete]
- // CHECK:STDOUT: %return.param_patt: %pattern_type.0ce = value_param_pattern %return.patt, call_param1 [concrete]
- // CHECK:STDOUT: } {
- // CHECK:STDOUT: %a.param: %ptr.bcc = value_param call_param0
- // CHECK:STDOUT: %.1: type = splice_block constants.%ptr.bcc [concrete = constants.%ptr.bcc] {
- // CHECK:STDOUT: %int_64.2: Core.IntLiteral = int_value 64 [concrete = constants.%int_64]
- // CHECK:STDOUT: %f64.2: type = class_type @Float, @Float(constants.%int_64) [concrete = constants.%f64.d77]
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %a: %ptr.bcc = value_binding a, %a.param
- // CHECK:STDOUT: %return.param: %ptr.bcc = value_param call_param1
- // CHECK:STDOUT: %.2: type = splice_block constants.%ptr.bcc [concrete = constants.%ptr.bcc] {
- // CHECK:STDOUT: %int_64.1: Core.IntLiteral = int_value 64 [concrete = constants.%int_64]
- // CHECK:STDOUT: %f64.1: type = class_type @Float, @Float(constants.%int_64) [concrete = constants.%f64.d77]
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %return: %ptr.bcc = value_binding r#return, %return.param
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %Core.ImplicitAs: %ImplicitAs.type.cc7 = import_ref Core//prelude/parts/as, ImplicitAs, loaded [concrete = constants.%ImplicitAs.generic]
- // CHECK:STDOUT: %Core.import_ref.38a: @Core.FloatLiteral.as.ImplicitAs.impl.%Core.FloatLiteral.as.ImplicitAs.impl.Convert.type (%Core.FloatLiteral.as.ImplicitAs.impl.Convert.type.02f) = import_ref Core//prelude/parts/float, loc{{\d+_\d+}}, loaded [symbolic = @Core.FloatLiteral.as.ImplicitAs.impl.%Core.FloatLiteral.as.ImplicitAs.impl.Convert (constants.%Core.FloatLiteral.as.ImplicitAs.impl.Convert.1f0)]
- // CHECK:STDOUT: %ImplicitAs.impl_witness_table = impl_witness_table (%Core.import_ref.38a), @Core.FloatLiteral.as.ImplicitAs.impl [concrete]
- // CHECK:STDOUT: %Core.Copy: type = import_ref Core//prelude/parts/copy, Copy, loaded [concrete = constants.%Copy.type]
- // CHECK:STDOUT: %Core.import_ref.47c: @Float.as.Copy.impl.%Float.as.Copy.impl.Op.type (%Float.as.Copy.impl.Op.type.2fe) = import_ref Core//prelude/parts/float, loc{{\d+_\d+}}, loaded [symbolic = @Float.as.Copy.impl.%Float.as.Copy.impl.Op (constants.%Float.as.Copy.impl.Op.240)]
- // CHECK:STDOUT: %Copy.impl_witness_table.119 = impl_witness_table (%Core.import_ref.47c), @Float.as.Copy.impl [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
- // CHECK:STDOUT: .Cpp = imports.%Cpp
- // CHECK:STDOUT: .F = %F.decl
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %Core.import = import Core
- // CHECK:STDOUT: %Cpp.import_cpp = import_cpp {
- // CHECK:STDOUT: import Cpp "floating_point_literal.h"
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [concrete = constants.%F] {} {}
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: fn @F() {
- // CHECK:STDOUT: !entry:
- // CHECK:STDOUT: %Cpp.ref: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
- // CHECK:STDOUT: %foo.ref: %foo.cpp_overload_set.type = name_ref foo, imports.%foo.cpp_overload_set.value [concrete = constants.%foo.cpp_overload_set.value]
- // CHECK:STDOUT: %float: Core.FloatLiteral = float_literal_value 18e307 [concrete = constants.%float]
- // CHECK:STDOUT: %impl.elem0.loc15_11.1: %.b13 = impl_witness_access constants.%ImplicitAs.impl_witness.cb2, element0 [concrete = constants.%Core.FloatLiteral.as.ImplicitAs.impl.Convert.239]
- // CHECK:STDOUT: %bound_method.loc15_11.1: <bound method> = bound_method %float, %impl.elem0.loc15_11.1 [concrete = constants.%Core.FloatLiteral.as.ImplicitAs.impl.Convert.bound]
- // CHECK:STDOUT: %specific_fn.loc15_11.1: <specific function> = specific_function %impl.elem0.loc15_11.1, @Core.FloatLiteral.as.ImplicitAs.impl.Convert(constants.%int_64) [concrete = constants.%Core.FloatLiteral.as.ImplicitAs.impl.Convert.specific_fn]
- // CHECK:STDOUT: %bound_method.loc15_11.2: <bound method> = bound_method %float, %specific_fn.loc15_11.1 [concrete = constants.%bound_method]
- // CHECK:STDOUT: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.call: init %f64.d77 = call %bound_method.loc15_11.2(%float) [concrete = <error>]
- // CHECK:STDOUT: %.loc15_11.1: %f64.d77 = value_of_initializer %Core.FloatLiteral.as.ImplicitAs.impl.Convert.call [concrete = <error>]
- // CHECK:STDOUT: %.loc15_11.2: %f64.d77 = converted %float, %.loc15_11.1 [concrete = <error>]
- // CHECK:STDOUT: %.loc15_11.3: ref %f64.d77 = temporary_storage
- // CHECK:STDOUT: %impl.elem0.loc15_11.2: %.c41 = impl_witness_access constants.%Copy.impl_witness.1e3, element0 [concrete = constants.%Float.as.Copy.impl.Op.f05]
- // CHECK:STDOUT: %bound_method.loc15_11.3: <bound method> = bound_method %.loc15_11.2, %impl.elem0.loc15_11.2 [concrete = <error>]
- // CHECK:STDOUT: %specific_fn.loc15_11.2: <specific function> = specific_function %impl.elem0.loc15_11.2, @Float.as.Copy.impl.Op(constants.%int_64) [concrete = constants.%Float.as.Copy.impl.Op.specific_fn]
- // CHECK:STDOUT: %bound_method.loc15_11.4: <bound method> = bound_method %.loc15_11.2, %specific_fn.loc15_11.2 [concrete = <error>]
- // CHECK:STDOUT: %Float.as.Copy.impl.Op.call: init %f64.d77 = call %bound_method.loc15_11.4(%.loc15_11.2) [concrete = <error>]
- // CHECK:STDOUT: %.loc15_11.4: ref %f64.d77 = temporary %.loc15_11.3, %Float.as.Copy.impl.Op.call
- // CHECK:STDOUT: %addr.loc15_19.1: %ptr.bcc = addr_of %.loc15_11.4
- // CHECK:STDOUT: %.loc15_19.1: ref %f64.d77 = temporary_storage
- // CHECK:STDOUT: %addr.loc15_19.2: %ptr.bcc = addr_of %.loc15_19.1
- // CHECK:STDOUT: %foo__carbon_thunk.call: init %empty_tuple.type = call imports.%foo__carbon_thunk.decl(%addr.loc15_19.1, %addr.loc15_19.2)
- // CHECK:STDOUT: %.loc15_19.2: init %f64.d77 to %.loc15_19.1 = mark_in_place_init %foo__carbon_thunk.call
- // CHECK:STDOUT: %.loc15_19.3: ref %f64.d77 = temporary %.loc15_19.1, %.loc15_19.2
- // CHECK:STDOUT: %DestroyOp.bound.loc15_19: <bound method> = bound_method %.loc15_19.3, constants.%DestroyOp
- // CHECK:STDOUT: %DestroyOp.call.loc15_19: init %empty_tuple.type = call %DestroyOp.bound.loc15_19(%.loc15_19.3)
- // CHECK:STDOUT: %DestroyOp.bound.loc15_11: <bound method> = bound_method %.loc15_11.4, constants.%DestroyOp
- // CHECK:STDOUT: %DestroyOp.call.loc15_11: init %empty_tuple.type = call %DestroyOp.bound.loc15_11(%.loc15_11.4)
- // CHECK:STDOUT: return
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: fn @foo(%a.param: %f64.d77) -> out %return.param: %f64.d77;
- // CHECK:STDOUT:
- // CHECK:STDOUT: fn @foo__carbon_thunk(%a.param: %ptr.bcc, %return.param: %ptr.bcc);
- // CHECK:STDOUT:
- // CHECK:STDOUT: fn @DestroyOp(%self.param: ref %f64.d77) = "no_op";
- // CHECK:STDOUT:
- // CHECK:STDOUT: --- struct_init.carbon
- // CHECK:STDOUT:
- // CHECK:STDOUT: constants {
- // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete]
- // CHECK:STDOUT: %empty_struct: %empty_struct_type = struct_value () [concrete]
- // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete]
- // CHECK:STDOUT: %.dde: Core.Form = init_form %empty_struct_type, call_param0 [concrete]
- // CHECK:STDOUT: %pattern_type.a96: type = pattern_type %empty_struct_type [concrete]
- // CHECK:STDOUT: %MakeEmpty.type: type = fn_type @MakeEmpty [concrete]
- // CHECK:STDOUT: %MakeEmpty: %MakeEmpty.type = struct_value () [concrete]
- // CHECK:STDOUT: %Empty.type: type = fn_type @Empty [concrete]
- // CHECK:STDOUT: %Empty: %Empty.type = struct_value () [concrete]
- // CHECK:STDOUT: %PassNoFields.cpp_overload_set.type: type = cpp_overload_set_type @PassNoFields.cpp_overload_set [concrete]
- // CHECK:STDOUT: %PassNoFields.cpp_overload_set.value: %PassNoFields.cpp_overload_set.type = cpp_overload_set_value @PassNoFields.cpp_overload_set [concrete]
- // CHECK:STDOUT: %NoFields: type = class_type @NoFields [concrete]
- // CHECK:STDOUT: %ptr.dd0: type = ptr_type %NoFields [concrete]
- // CHECK:STDOUT: %pattern_type.a92: type = pattern_type %ptr.dd0 [concrete]
- // CHECK:STDOUT: %PassNoFields__carbon_thunk.type: type = fn_type @PassNoFields__carbon_thunk [concrete]
- // CHECK:STDOUT: %PassNoFields__carbon_thunk: %PassNoFields__carbon_thunk.type = struct_value () [concrete]
- // CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %empty_struct_type [concrete]
- // CHECK:STDOUT: %NoFields.val: %NoFields = struct_value () [concrete]
- // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete]
- // CHECK:STDOUT: %NoFields.cpp_destructor.type: type = fn_type @NoFields.cpp_destructor [concrete]
- // CHECK:STDOUT: %NoFields.cpp_destructor: %NoFields.cpp_destructor.type = struct_value () [concrete]
- // CHECK:STDOUT: %DestroyOp.type: type = fn_type @DestroyOp [concrete]
- // CHECK:STDOUT: %DestroyOp: %DestroyOp.type = struct_value () [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: %Cpp: <namespace> = namespace file.%Cpp.import_cpp, [concrete] {
- // CHECK:STDOUT: .PassNoFields = %PassNoFields.cpp_overload_set.value
- // CHECK:STDOUT: import Cpp//...
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %PassNoFields.cpp_overload_set.value: %PassNoFields.cpp_overload_set.type = cpp_overload_set_value @PassNoFields.cpp_overload_set [concrete = constants.%PassNoFields.cpp_overload_set.value]
- // CHECK:STDOUT: %PassNoFields__carbon_thunk.decl: %PassNoFields__carbon_thunk.type = fn_decl @PassNoFields__carbon_thunk [concrete = constants.%PassNoFields__carbon_thunk] {
- // CHECK:STDOUT: %s.patt: %pattern_type.a92 = value_binding_pattern s [concrete]
- // CHECK:STDOUT: %s.param_patt: %pattern_type.a92 = value_param_pattern %s.patt, call_param0 [concrete]
- // CHECK:STDOUT: } {
- // CHECK:STDOUT: %s.param: %ptr.dd0 = value_param call_param0
- // CHECK:STDOUT: %s: %ptr.dd0 = value_binding s, %s.param
- // CHECK:STDOUT: }
- // 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
- // CHECK:STDOUT: .Cpp = imports.%Cpp
- // CHECK:STDOUT: .MakeEmpty = %MakeEmpty.decl
- // CHECK:STDOUT: .Empty = %Empty.decl
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %Core.import = import Core
- // CHECK:STDOUT: %Cpp.import_cpp = import_cpp {
- // CHECK:STDOUT: import Cpp "struct_init.h"
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %MakeEmpty.decl: %MakeEmpty.type = fn_decl @MakeEmpty [concrete = constants.%MakeEmpty] {
- // CHECK:STDOUT: %return.patt: %pattern_type.a96 = return_slot_pattern [concrete]
- // CHECK:STDOUT: %return.param_patt: %pattern_type.a96 = out_param_pattern %return.patt, call_param0 [concrete]
- // CHECK:STDOUT: } {
- // CHECK:STDOUT: %.loc6_20.1: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct]
- // CHECK:STDOUT: %.loc6_20.2: type = converted %.loc6_20.1, constants.%empty_struct_type [concrete = constants.%empty_struct_type]
- // CHECK:STDOUT: %.loc6_20.3: Core.Form = init_form %.loc6_20.2, call_param0 [concrete = constants.%.dde]
- // CHECK:STDOUT: %return.param: ref %empty_struct_type = out_param call_param0
- // CHECK:STDOUT: %return: ref %empty_struct_type = return_slot %return.param
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %Empty.decl: %Empty.type = fn_decl @Empty [concrete = constants.%Empty] {
- // CHECK:STDOUT: %value.patt: %pattern_type.a96 = value_binding_pattern value [concrete]
- // CHECK:STDOUT: %value.param_patt: %pattern_type.a96 = value_param_pattern %value.patt, call_param0 [concrete]
- // CHECK:STDOUT: %reference.patt: %pattern_type.a96 = ref_binding_pattern reference [concrete]
- // CHECK:STDOUT: %reference.param_patt: %pattern_type.a96 = ref_param_pattern %reference.patt, call_param1 [concrete]
- // CHECK:STDOUT: } {
- // CHECK:STDOUT: %value.param: %empty_struct_type = value_param call_param0
- // CHECK:STDOUT: %.loc8_18.1: type = splice_block %.loc8_18.3 [concrete = constants.%empty_struct_type] {
- // CHECK:STDOUT: %.loc8_18.2: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct]
- // CHECK:STDOUT: %.loc8_18.3: type = converted %.loc8_18.2, constants.%empty_struct_type [concrete = constants.%empty_struct_type]
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %value: %empty_struct_type = value_binding value, %value.param
- // CHECK:STDOUT: %reference.param: ref %empty_struct_type = ref_param call_param1
- // CHECK:STDOUT: %.loc8_37.1: type = splice_block %.loc8_37.3 [concrete = constants.%empty_struct_type] {
- // CHECK:STDOUT: %.loc8_37.2: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct]
- // CHECK:STDOUT: %.loc8_37.3: type = converted %.loc8_37.2, constants.%empty_struct_type [concrete = constants.%empty_struct_type]
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %reference: ref %empty_struct_type = ref_binding reference, %reference.param
- // CHECK:STDOUT: }
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: class @NoFields {
- // 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: import Cpp//...
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: fn @MakeEmpty() -> out %return.param: %empty_struct_type;
- // CHECK:STDOUT:
- // CHECK:STDOUT: fn @Empty(%value.param: %empty_struct_type, %reference.param: ref %empty_struct_type) {
- // CHECK:STDOUT: !entry:
- // CHECK:STDOUT: %Cpp.ref.loc9: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
- // CHECK:STDOUT: %PassNoFields.ref.loc9: %PassNoFields.cpp_overload_set.type = name_ref PassNoFields, imports.%PassNoFields.cpp_overload_set.value [concrete = constants.%PassNoFields.cpp_overload_set.value]
- // CHECK:STDOUT: %.loc9_21.1: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct]
- // CHECK:STDOUT: %.loc9_21.2: ref %NoFields = temporary_storage
- // CHECK:STDOUT: %.loc9_21.3: init %NoFields to %.loc9_21.2 = class_init () [concrete = constants.%NoFields.val]
- // CHECK:STDOUT: %.loc9_21.4: ref %NoFields = temporary %.loc9_21.2, %.loc9_21.3
- // CHECK:STDOUT: %.loc9_21.5: ref %NoFields = converted %.loc9_21.1, %.loc9_21.4
- // CHECK:STDOUT: %.loc9_21.6: %NoFields = acquire_value %.loc9_21.5
- // CHECK:STDOUT: %.loc9_21.7: ref %NoFields = value_as_ref %.loc9_21.6
- // CHECK:STDOUT: %addr.loc9: %ptr.dd0 = addr_of %.loc9_21.7
- // CHECK:STDOUT: %PassNoFields__carbon_thunk.call.loc9: init %empty_tuple.type = call imports.%PassNoFields__carbon_thunk.decl(%addr.loc9)
- // CHECK:STDOUT: %Cpp.ref.loc11: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
- // CHECK:STDOUT: %PassNoFields.ref.loc11: %PassNoFields.cpp_overload_set.type = name_ref PassNoFields, imports.%PassNoFields.cpp_overload_set.value [concrete = constants.%PassNoFields.cpp_overload_set.value]
- // CHECK:STDOUT: %value.ref: %empty_struct_type = name_ref value, %value
- // CHECK:STDOUT: %.loc11_20.1: ref %NoFields = temporary_storage
- // CHECK:STDOUT: %.loc11_20.2: init %NoFields to %.loc11_20.1 = class_init () [concrete = constants.%NoFields.val]
- // CHECK:STDOUT: %.loc11_20.3: ref %NoFields = temporary %.loc11_20.1, %.loc11_20.2
- // CHECK:STDOUT: %.loc11_20.4: ref %NoFields = converted %value.ref, %.loc11_20.3
- // CHECK:STDOUT: %.loc11_20.5: %NoFields = acquire_value %.loc11_20.4
- // CHECK:STDOUT: %.loc11_20.6: ref %NoFields = value_as_ref %.loc11_20.5
- // CHECK:STDOUT: %addr.loc11: %ptr.dd0 = addr_of %.loc11_20.6
- // CHECK:STDOUT: %PassNoFields__carbon_thunk.call.loc11: init %empty_tuple.type = call imports.%PassNoFields__carbon_thunk.decl(%addr.loc11)
- // CHECK:STDOUT: %Cpp.ref.loc13: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
- // CHECK:STDOUT: %PassNoFields.ref.loc13: %PassNoFields.cpp_overload_set.type = name_ref PassNoFields, imports.%PassNoFields.cpp_overload_set.value [concrete = constants.%PassNoFields.cpp_overload_set.value]
- // CHECK:STDOUT: %reference.ref: ref %empty_struct_type = name_ref reference, %reference
- // CHECK:STDOUT: %.loc13_20.1: ref %NoFields = temporary_storage
- // CHECK:STDOUT: %.loc13_20.2: init %NoFields to %.loc13_20.1 = class_init () [concrete = constants.%NoFields.val]
- // CHECK:STDOUT: %.loc13_20.3: ref %NoFields = temporary %.loc13_20.1, %.loc13_20.2
- // CHECK:STDOUT: %.loc13_20.4: ref %NoFields = converted %reference.ref, %.loc13_20.3
- // CHECK:STDOUT: %.loc13_20.5: %NoFields = acquire_value %.loc13_20.4
- // CHECK:STDOUT: %.loc13_20.6: ref %NoFields = value_as_ref %.loc13_20.5
- // CHECK:STDOUT: %addr.loc13: %ptr.dd0 = addr_of %.loc13_20.6
- // CHECK:STDOUT: %PassNoFields__carbon_thunk.call.loc13: init %empty_tuple.type = call imports.%PassNoFields__carbon_thunk.decl(%addr.loc13)
- // CHECK:STDOUT: %Cpp.ref.loc15: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
- // CHECK:STDOUT: %PassNoFields.ref.loc15: %PassNoFields.cpp_overload_set.type = name_ref PassNoFields, imports.%PassNoFields.cpp_overload_set.value [concrete = constants.%PassNoFields.cpp_overload_set.value]
- // CHECK:STDOUT: %MakeEmpty.ref: %MakeEmpty.type = name_ref MakeEmpty, file.%MakeEmpty.decl [concrete = constants.%MakeEmpty]
- // CHECK:STDOUT: %MakeEmpty.call: init %empty_struct_type = call %MakeEmpty.ref()
- // CHECK:STDOUT: %.loc15_30.1: ref %empty_struct_type = temporary_storage
- // CHECK:STDOUT: %.loc15_30.2: ref %empty_struct_type = temporary %.loc15_30.1, %MakeEmpty.call
- // CHECK:STDOUT: %.loc15_30.3: ref %NoFields = temporary_storage
- // CHECK:STDOUT: %.loc15_30.4: init %NoFields to %.loc15_30.3 = class_init () [concrete = constants.%NoFields.val]
- // CHECK:STDOUT: %.loc15_30.5: ref %NoFields = temporary %.loc15_30.3, %.loc15_30.4
- // CHECK:STDOUT: %.loc15_30.6: ref %NoFields = converted %MakeEmpty.call, %.loc15_30.5
- // CHECK:STDOUT: %.loc15_30.7: %NoFields = acquire_value %.loc15_30.6
- // CHECK:STDOUT: %.loc15_30.8: ref %NoFields = value_as_ref %.loc15_30.7
- // CHECK:STDOUT: %addr.loc15: %ptr.dd0 = addr_of %.loc15_30.8
- // CHECK:STDOUT: %PassNoFields__carbon_thunk.call.loc15: init %empty_tuple.type = call imports.%PassNoFields__carbon_thunk.decl(%addr.loc15)
- // CHECK:STDOUT: %NoFields.cpp_destructor.bound.loc15: <bound method> = bound_method %.loc15_30.5, constants.%NoFields.cpp_destructor
- // CHECK:STDOUT: %NoFields.cpp_destructor.call.loc15: init %empty_tuple.type = call %NoFields.cpp_destructor.bound.loc15(%.loc15_30.5)
- // CHECK:STDOUT: %DestroyOp.bound: <bound method> = bound_method %.loc15_30.2, constants.%DestroyOp
- // CHECK:STDOUT: %DestroyOp.call: init %empty_tuple.type = call %DestroyOp.bound(%.loc15_30.2)
- // CHECK:STDOUT: %NoFields.cpp_destructor.bound.loc13: <bound method> = bound_method %.loc13_20.3, constants.%NoFields.cpp_destructor
- // CHECK:STDOUT: %NoFields.cpp_destructor.call.loc13: init %empty_tuple.type = call %NoFields.cpp_destructor.bound.loc13(%.loc13_20.3)
- // CHECK:STDOUT: %NoFields.cpp_destructor.bound.loc11: <bound method> = bound_method %.loc11_20.3, constants.%NoFields.cpp_destructor
- // CHECK:STDOUT: %NoFields.cpp_destructor.call.loc11: init %empty_tuple.type = call %NoFields.cpp_destructor.bound.loc11(%.loc11_20.3)
- // CHECK:STDOUT: %NoFields.cpp_destructor.bound.loc9: <bound method> = bound_method %.loc9_21.4, constants.%NoFields.cpp_destructor
- // CHECK:STDOUT: %NoFields.cpp_destructor.call.loc9: init %empty_tuple.type = call %NoFields.cpp_destructor.bound.loc9(%.loc9_21.4)
- // CHECK:STDOUT: return
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: fn @PassNoFields(%s.param: %NoFields);
- // CHECK:STDOUT:
- // CHECK:STDOUT: fn @PassNoFields__carbon_thunk(%s.param: %ptr.dd0);
- // CHECK:STDOUT:
- // CHECK:STDOUT: fn @NoFields.cpp_destructor(%self.param: ref %NoFields) = "no_op";
- // CHECK:STDOUT:
- // CHECK:STDOUT: fn @DestroyOp(%self.param: ref %empty_struct_type) = "no_op";
- // CHECK:STDOUT:
- // CHECK:STDOUT: --- fail_todo_struct_init_nonempty.carbon
- // CHECK:STDOUT:
- // CHECK:STDOUT: constants {
- // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete]
- // CHECK:STDOUT: %Int.type: type = generic_class_type @Int [concrete]
- // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete]
- // CHECK:STDOUT: %Int.generic: %Int.type = struct_value () [concrete]
- // CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [concrete]
- // CHECK:STDOUT: %struct_type.a.b.c.0b6: type = struct_type {.a: %i32, .b: %i32, .c: %i32} [concrete]
- // CHECK:STDOUT: %.386: Core.Form = init_form %struct_type.a.b.c.0b6, call_param0 [concrete]
- // CHECK:STDOUT: %pattern_type.8ae: type = pattern_type %struct_type.a.b.c.0b6 [concrete]
- // CHECK:STDOUT: %MakeThreeFields.type: type = fn_type @MakeThreeFields [concrete]
- // CHECK:STDOUT: %MakeThreeFields: %MakeThreeFields.type = struct_value () [concrete]
- // CHECK:STDOUT: %ThreeFields.type: type = fn_type @ThreeFields.loc8 [concrete]
- // CHECK:STDOUT: %ThreeFields.c3a: %ThreeFields.type = struct_value () [concrete]
- // CHECK:STDOUT: %PassThreeFields.cpp_overload_set.type: type = cpp_overload_set_type @PassThreeFields.cpp_overload_set [concrete]
- // CHECK:STDOUT: %PassThreeFields.cpp_overload_set.value: %PassThreeFields.cpp_overload_set.type = cpp_overload_set_value @PassThreeFields.cpp_overload_set [concrete]
- // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete]
- // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [concrete]
- // CHECK:STDOUT: %int_3: Core.IntLiteral = int_value 3 [concrete]
- // CHECK:STDOUT: %struct_type.a.b.c.90d: type = struct_type {.a: Core.IntLiteral, .b: Core.IntLiteral, .c: Core.IntLiteral} [concrete]
- // CHECK:STDOUT: %struct.ec0: %struct_type.a.b.c.90d = struct_value (%int_1, %int_2, %int_3) [concrete]
- // CHECK:STDOUT: %ThreeFields.942: type = class_type @ThreeFields.1 [concrete]
- // CHECK:STDOUT: %ptr.f81: type = ptr_type %ThreeFields.942 [concrete]
- // CHECK:STDOUT: %pattern_type.7bb: type = pattern_type %ptr.f81 [concrete]
- // CHECK:STDOUT: %PassThreeFields__carbon_thunk.type: type = fn_type @PassThreeFields__carbon_thunk [concrete]
- // CHECK:STDOUT: %PassThreeFields__carbon_thunk: %PassThreeFields__carbon_thunk.type = struct_value () [concrete]
- // CHECK:STDOUT: %ThreeFields.elem: type = unbound_element_type %ThreeFields.942, %i32 [concrete]
- // CHECK:STDOUT: %.c77: type = custom_layout_type {size=12, align=4, .a@0: %i32, .b@4: %i32, .c@8: %i32} [concrete]
- // CHECK:STDOUT: %complete_type.702: <witness> = complete_type_witness %.c77 [concrete]
- // CHECK:STDOUT: %ImplicitAs.type.cc7: type = generic_interface_type @ImplicitAs [concrete]
- // CHECK:STDOUT: %ImplicitAs.generic: %ImplicitAs.type.cc7 = struct_value () [concrete]
- // CHECK:STDOUT: %struct_type.b.c.a: type = struct_type {.b: Core.IntLiteral, .c: Core.IntLiteral, .a: Core.IntLiteral} [concrete]
- // CHECK:STDOUT: %struct.d34: %struct_type.b.c.a = struct_value (%int_1, %int_2, %int_3) [concrete]
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: imports {
- // CHECK:STDOUT: %Core: <namespace> = namespace file.%Core.import, [concrete] {
- // CHECK:STDOUT: .Int = %Core.Int
- // CHECK:STDOUT: .ImplicitAs = %Core.ImplicitAs
- // CHECK:STDOUT: import Core//prelude
- // CHECK:STDOUT: import Core//prelude/...
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %Cpp: <namespace> = namespace file.%Cpp.import_cpp, [concrete] {
- // CHECK:STDOUT: .PassThreeFields = %PassThreeFields.cpp_overload_set.value
- // CHECK:STDOUT: import Cpp//...
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %Core.Int: %Int.type = import_ref Core//prelude/parts/int, Int, loaded [concrete = constants.%Int.generic]
- // CHECK:STDOUT: %PassThreeFields.cpp_overload_set.value: %PassThreeFields.cpp_overload_set.type = cpp_overload_set_value @PassThreeFields.cpp_overload_set [concrete = constants.%PassThreeFields.cpp_overload_set.value]
- // CHECK:STDOUT: %PassThreeFields__carbon_thunk.decl: %PassThreeFields__carbon_thunk.type = fn_decl @PassThreeFields__carbon_thunk [concrete = constants.%PassThreeFields__carbon_thunk] {
- // CHECK:STDOUT: %t.patt: %pattern_type.7bb = value_binding_pattern t [concrete]
- // CHECK:STDOUT: %t.param_patt: %pattern_type.7bb = value_param_pattern %t.patt, call_param0 [concrete]
- // CHECK:STDOUT: } {
- // CHECK:STDOUT: %t.param: %ptr.f81 = value_param call_param0
- // CHECK:STDOUT: %t: %ptr.f81 = value_binding t, %t.param
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %Core.ImplicitAs: %ImplicitAs.type.cc7 = import_ref Core//prelude/parts/as, ImplicitAs, loaded [concrete = constants.%ImplicitAs.generic]
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: file {
- // CHECK:STDOUT: package: <namespace> = namespace [concrete] {
- // CHECK:STDOUT: .Core = imports.%Core
- // CHECK:STDOUT: .Cpp = imports.%Cpp
- // CHECK:STDOUT: .MakeThreeFields = %MakeThreeFields.decl
- // CHECK:STDOUT: .ThreeFields = %ThreeFields.decl
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %Core.import = import Core
- // CHECK:STDOUT: %Cpp.import_cpp = import_cpp {
- // CHECK:STDOUT: import Cpp "struct_init.h"
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %MakeThreeFields.decl: %MakeThreeFields.type = fn_decl @MakeThreeFields [concrete = constants.%MakeThreeFields] {
- // CHECK:STDOUT: %return.patt: %pattern_type.8ae = return_slot_pattern [concrete]
- // CHECK:STDOUT: %return.param_patt: %pattern_type.8ae = out_param_pattern %return.patt, call_param0 [concrete]
- // CHECK:STDOUT: } {
- // CHECK:STDOUT: %int_32.loc6_30: Core.IntLiteral = int_value 32 [concrete = constants.%int_32]
- // CHECK:STDOUT: %i32.loc6_30: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32]
- // CHECK:STDOUT: %int_32.loc6_39: Core.IntLiteral = int_value 32 [concrete = constants.%int_32]
- // CHECK:STDOUT: %i32.loc6_39: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32]
- // CHECK:STDOUT: %int_32.loc6_48: Core.IntLiteral = int_value 32 [concrete = constants.%int_32]
- // CHECK:STDOUT: %i32.loc6_48: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32]
- // CHECK:STDOUT: %struct_type.a.b.c: type = struct_type {.a: %i32, .b: %i32, .c: %i32} [concrete = constants.%struct_type.a.b.c.0b6]
- // CHECK:STDOUT: %.loc6: Core.Form = init_form %struct_type.a.b.c, call_param0 [concrete = constants.%.386]
- // CHECK:STDOUT: %return.param: ref %struct_type.a.b.c.0b6 = out_param call_param0
- // CHECK:STDOUT: %return: ref %struct_type.a.b.c.0b6 = return_slot %return.param
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %ThreeFields.decl: %ThreeFields.type = fn_decl @ThreeFields.loc8 [concrete = constants.%ThreeFields.c3a] {
- // CHECK:STDOUT: %value.patt: %pattern_type.8ae = value_binding_pattern value [concrete]
- // CHECK:STDOUT: %value.param_patt: %pattern_type.8ae = value_param_pattern %value.patt, call_param0 [concrete]
- // CHECK:STDOUT: %reference.patt: %pattern_type.8ae = ref_binding_pattern reference [concrete]
- // CHECK:STDOUT: %reference.param_patt: %pattern_type.8ae = ref_param_pattern %reference.patt, call_param1 [concrete]
- // CHECK:STDOUT: } {
- // CHECK:STDOUT: %value.param: %struct_type.a.b.c.0b6 = value_param call_param0
- // CHECK:STDOUT: %.loc8_49: type = splice_block %struct_type.a.b.c.loc8_49 [concrete = constants.%struct_type.a.b.c.0b6] {
- // CHECK:STDOUT: %int_32.loc8_28: Core.IntLiteral = int_value 32 [concrete = constants.%int_32]
- // CHECK:STDOUT: %i32.loc8_28: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32]
- // CHECK:STDOUT: %int_32.loc8_37: Core.IntLiteral = int_value 32 [concrete = constants.%int_32]
- // CHECK:STDOUT: %i32.loc8_37: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32]
- // CHECK:STDOUT: %int_32.loc8_46: Core.IntLiteral = int_value 32 [concrete = constants.%int_32]
- // CHECK:STDOUT: %i32.loc8_46: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32]
- // CHECK:STDOUT: %struct_type.a.b.c.loc8_49: type = struct_type {.a: %i32, .b: %i32, .c: %i32} [concrete = constants.%struct_type.a.b.c.0b6]
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %value: %struct_type.a.b.c.0b6 = value_binding value, %value.param
- // CHECK:STDOUT: %reference.param: ref %struct_type.a.b.c.0b6 = ref_param call_param1
- // CHECK:STDOUT: %.loc8_93: type = splice_block %struct_type.a.b.c.loc8_93 [concrete = constants.%struct_type.a.b.c.0b6] {
- // CHECK:STDOUT: %int_32.loc8_72: Core.IntLiteral = int_value 32 [concrete = constants.%int_32]
- // CHECK:STDOUT: %i32.loc8_72: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32]
- // CHECK:STDOUT: %int_32.loc8_81: Core.IntLiteral = int_value 32 [concrete = constants.%int_32]
- // CHECK:STDOUT: %i32.loc8_81: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32]
- // CHECK:STDOUT: %int_32.loc8_90: Core.IntLiteral = int_value 32 [concrete = constants.%int_32]
- // CHECK:STDOUT: %i32.loc8_90: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32]
- // CHECK:STDOUT: %struct_type.a.b.c.loc8_93: type = struct_type {.a: %i32, .b: %i32, .c: %i32} [concrete = constants.%struct_type.a.b.c.0b6]
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %reference: ref %struct_type.a.b.c.0b6 = ref_binding reference, %reference.param
- // CHECK:STDOUT: }
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: class @ThreeFields.1 {
- // CHECK:STDOUT: %int_32.1: Core.IntLiteral = int_value 32 [concrete = constants.%int_32]
- // CHECK:STDOUT: %i32.1: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32]
- // CHECK:STDOUT: %.1: %ThreeFields.elem = field_decl a, element0 [concrete]
- // CHECK:STDOUT: %int_32.2: Core.IntLiteral = int_value 32 [concrete = constants.%int_32]
- // CHECK:STDOUT: %i32.2: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32]
- // CHECK:STDOUT: %.2: %ThreeFields.elem = field_decl b, element1 [concrete]
- // CHECK:STDOUT: %int_32.3: Core.IntLiteral = int_value 32 [concrete = constants.%int_32]
- // CHECK:STDOUT: %i32.3: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32]
- // CHECK:STDOUT: %.3: %ThreeFields.elem = field_decl c, element2 [concrete]
- // CHECK:STDOUT: %.4: type = custom_layout_type {size=12, align=4, .a@0: %i32, .b@4: %i32, .c@8: %i32} [concrete = constants.%.c77]
- // CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %.4 [concrete = constants.%complete_type.702]
- // CHECK:STDOUT: complete_type_witness = %complete_type
- // CHECK:STDOUT:
- // CHECK:STDOUT: !members:
- // CHECK:STDOUT: import Cpp//...
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: fn @MakeThreeFields() -> out %return.param: %struct_type.a.b.c.0b6;
- // CHECK:STDOUT:
- // CHECK:STDOUT: fn @ThreeFields.loc8(%value.param: %struct_type.a.b.c.0b6, %reference.param: ref %struct_type.a.b.c.0b6) {
- // CHECK:STDOUT: !entry:
- // CHECK:STDOUT: %Cpp.ref.loc20: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
- // CHECK:STDOUT: %PassThreeFields.ref.loc20: %PassThreeFields.cpp_overload_set.type = name_ref PassThreeFields, imports.%PassThreeFields.cpp_overload_set.value [concrete = constants.%PassThreeFields.cpp_overload_set.value]
- // CHECK:STDOUT: %int_1.loc20: Core.IntLiteral = int_value 1 [concrete = constants.%int_1]
- // CHECK:STDOUT: %int_2.loc20: Core.IntLiteral = int_value 2 [concrete = constants.%int_2]
- // CHECK:STDOUT: %int_3.loc20: Core.IntLiteral = int_value 3 [concrete = constants.%int_3]
- // CHECK:STDOUT: %.loc20_46.1: %struct_type.a.b.c.90d = struct_literal (%int_1.loc20, %int_2.loc20, %int_3.loc20) [concrete = constants.%struct.ec0]
- // CHECK:STDOUT: %.loc20_46.2: %ThreeFields.942 = converted %.loc20_46.1, <error> [concrete = <error>]
- // CHECK:STDOUT: %addr.loc20: %ptr.f81 = addr_of <error> [concrete = <error>]
- // CHECK:STDOUT: %PassThreeFields__carbon_thunk.call.loc20: init %empty_tuple.type = call imports.%PassThreeFields__carbon_thunk.decl(%addr.loc20)
- // CHECK:STDOUT: %Cpp.ref.loc33: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
- // CHECK:STDOUT: %PassThreeFields.ref.loc33: %PassThreeFields.cpp_overload_set.type = name_ref PassThreeFields, imports.%PassThreeFields.cpp_overload_set.value [concrete = constants.%PassThreeFields.cpp_overload_set.value]
- // CHECK:STDOUT: %value.ref: %struct_type.a.b.c.0b6 = name_ref value, %value
- // CHECK:STDOUT: %.loc33: %ThreeFields.942 = converted %value.ref, <error> [concrete = <error>]
- // CHECK:STDOUT: %addr.loc33: %ptr.f81 = addr_of <error> [concrete = <error>]
- // CHECK:STDOUT: %PassThreeFields__carbon_thunk.call.loc33: init %empty_tuple.type = call imports.%PassThreeFields__carbon_thunk.decl(%addr.loc33)
- // CHECK:STDOUT: %Cpp.ref.loc46: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
- // CHECK:STDOUT: %PassThreeFields.ref.loc46: %PassThreeFields.cpp_overload_set.type = name_ref PassThreeFields, imports.%PassThreeFields.cpp_overload_set.value [concrete = constants.%PassThreeFields.cpp_overload_set.value]
- // CHECK:STDOUT: %reference.ref: ref %struct_type.a.b.c.0b6 = name_ref reference, %reference
- // CHECK:STDOUT: %.loc46: %ThreeFields.942 = converted %reference.ref, <error> [concrete = <error>]
- // CHECK:STDOUT: %addr.loc46: %ptr.f81 = addr_of <error> [concrete = <error>]
- // CHECK:STDOUT: %PassThreeFields__carbon_thunk.call.loc46: init %empty_tuple.type = call imports.%PassThreeFields__carbon_thunk.decl(%addr.loc46)
- // CHECK:STDOUT: %Cpp.ref.loc59: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
- // CHECK:STDOUT: %PassThreeFields.ref.loc59: %PassThreeFields.cpp_overload_set.type = name_ref PassThreeFields, imports.%PassThreeFields.cpp_overload_set.value [concrete = constants.%PassThreeFields.cpp_overload_set.value]
- // CHECK:STDOUT: %MakeThreeFields.ref: %MakeThreeFields.type = name_ref MakeThreeFields, file.%MakeThreeFields.decl [concrete = constants.%MakeThreeFields]
- // CHECK:STDOUT: %.loc59_39.1: ref %struct_type.a.b.c.0b6 = temporary_storage
- // CHECK:STDOUT: %MakeThreeFields.call: init %struct_type.a.b.c.0b6 to %.loc59_39.1 = call %MakeThreeFields.ref()
- // CHECK:STDOUT: %.loc59_39.2: %ThreeFields.942 = converted %MakeThreeFields.call, <error> [concrete = <error>]
- // CHECK:STDOUT: %addr.loc59: %ptr.f81 = addr_of <error> [concrete = <error>]
- // CHECK:STDOUT: %PassThreeFields__carbon_thunk.call.loc59: init %empty_tuple.type = call imports.%PassThreeFields__carbon_thunk.decl(%addr.loc59)
- // CHECK:STDOUT: %Cpp.ref.loc72: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
- // CHECK:STDOUT: %PassThreeFields.ref.loc72: %PassThreeFields.cpp_overload_set.type = name_ref PassThreeFields, imports.%PassThreeFields.cpp_overload_set.value [concrete = constants.%PassThreeFields.cpp_overload_set.value]
- // CHECK:STDOUT: %int_1.loc72: Core.IntLiteral = int_value 1 [concrete = constants.%int_1]
- // CHECK:STDOUT: %int_2.loc72: Core.IntLiteral = int_value 2 [concrete = constants.%int_2]
- // CHECK:STDOUT: %int_3.loc72: Core.IntLiteral = int_value 3 [concrete = constants.%int_3]
- // CHECK:STDOUT: %.loc72_46.1: %struct_type.b.c.a = struct_literal (%int_1.loc72, %int_2.loc72, %int_3.loc72) [concrete = constants.%struct.d34]
- // CHECK:STDOUT: %.loc72_46.2: %ThreeFields.942 = converted %.loc72_46.1, <error> [concrete = <error>]
- // CHECK:STDOUT: %addr.loc72: %ptr.f81 = addr_of <error> [concrete = <error>]
- // CHECK:STDOUT: %PassThreeFields__carbon_thunk.call.loc72: init %empty_tuple.type = call imports.%PassThreeFields__carbon_thunk.decl(%addr.loc72)
- // CHECK:STDOUT: return
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: fn @PassThreeFields(%t.param: %ThreeFields.942);
- // CHECK:STDOUT:
- // CHECK:STDOUT: fn @PassThreeFields__carbon_thunk(%t.param: %ptr.f81);
- // CHECK:STDOUT:
- // CHECK:STDOUT: --- fail_struct_init_field_mismatch.carbon
- // CHECK:STDOUT:
- // CHECK:STDOUT: constants {
- // CHECK:STDOUT: %F.type: type = fn_type @F [concrete]
- // CHECK:STDOUT: %F: %F.type = struct_value () [concrete]
- // CHECK:STDOUT: %PassThreeFields.cpp_overload_set.type: type = cpp_overload_set_type @PassThreeFields.cpp_overload_set [concrete]
- // CHECK:STDOUT: %PassThreeFields.cpp_overload_set.value: %PassThreeFields.cpp_overload_set.type = cpp_overload_set_value @PassThreeFields.cpp_overload_set [concrete]
- // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete]
- // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [concrete]
- // CHECK:STDOUT: %int_3: Core.IntLiteral = int_value 3 [concrete]
- // CHECK:STDOUT: %int_4: Core.IntLiteral = int_value 4 [concrete]
- // CHECK:STDOUT: %struct_type.a.b.c.d: type = struct_type {.a: Core.IntLiteral, .b: Core.IntLiteral, .c: Core.IntLiteral, .d: Core.IntLiteral} [concrete]
- // CHECK:STDOUT: %struct.9a6: %struct_type.a.b.c.d = struct_value (%int_1, %int_2, %int_3, %int_4) [concrete]
- // CHECK:STDOUT: %struct_type.a.x.c: type = struct_type {.a: Core.IntLiteral, .x: Core.IntLiteral, .c: Core.IntLiteral} [concrete]
- // CHECK:STDOUT: %struct.11a: %struct_type.a.x.c = struct_value (%int_1, %int_2, %int_3) [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: %Cpp: <namespace> = namespace file.%Cpp.import_cpp, [concrete] {
- // CHECK:STDOUT: .PassThreeFields = %PassThreeFields.cpp_overload_set.value
- // CHECK:STDOUT: import Cpp//...
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %PassThreeFields.cpp_overload_set.value: %PassThreeFields.cpp_overload_set.type = cpp_overload_set_value @PassThreeFields.cpp_overload_set [concrete = constants.%PassThreeFields.cpp_overload_set.value]
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: file {
- // CHECK:STDOUT: package: <namespace> = namespace [concrete] {
- // CHECK:STDOUT: .Core = imports.%Core
- // CHECK:STDOUT: .Cpp = imports.%Cpp
- // CHECK:STDOUT: .F = %F.decl
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %Core.import = import Core
- // CHECK:STDOUT: %Cpp.import_cpp = import_cpp {
- // CHECK:STDOUT: import Cpp "struct_init.h"
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [concrete = constants.%F] {} {}
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: fn @F() {
- // CHECK:STDOUT: !entry:
- // CHECK:STDOUT: %Cpp.ref.loc15: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
- // CHECK:STDOUT: %PassThreeFields.ref.loc15: %PassThreeFields.cpp_overload_set.type = name_ref PassThreeFields, imports.%PassThreeFields.cpp_overload_set.value [concrete = constants.%PassThreeFields.cpp_overload_set.value]
- // CHECK:STDOUT: %int_1.loc15: Core.IntLiteral = int_value 1 [concrete = constants.%int_1]
- // CHECK:STDOUT: %int_2.loc15: Core.IntLiteral = int_value 2 [concrete = constants.%int_2]
- // CHECK:STDOUT: %int_3.loc15: Core.IntLiteral = int_value 3 [concrete = constants.%int_3]
- // CHECK:STDOUT: %int_4: Core.IntLiteral = int_value 4 [concrete = constants.%int_4]
- // CHECK:STDOUT: %.loc15: %struct_type.a.b.c.d = struct_literal (%int_1.loc15, %int_2.loc15, %int_3.loc15, %int_4) [concrete = constants.%struct.9a6]
- // CHECK:STDOUT: %Cpp.ref.loc25: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
- // CHECK:STDOUT: %PassThreeFields.ref.loc25: %PassThreeFields.cpp_overload_set.type = name_ref PassThreeFields, imports.%PassThreeFields.cpp_overload_set.value [concrete = constants.%PassThreeFields.cpp_overload_set.value]
- // CHECK:STDOUT: %int_1.loc25: Core.IntLiteral = int_value 1 [concrete = constants.%int_1]
- // CHECK:STDOUT: %int_2.loc25: Core.IntLiteral = int_value 2 [concrete = constants.%int_2]
- // CHECK:STDOUT: %int_3.loc25: Core.IntLiteral = int_value 3 [concrete = constants.%int_3]
- // CHECK:STDOUT: %.loc25: %struct_type.a.x.c = struct_literal (%int_1.loc25, %int_2.loc25, %int_3.loc25) [concrete = constants.%struct.11a]
- // CHECK:STDOUT: return
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: --- fail_struct_init_unsupported_field_name.carbon
- // CHECK:STDOUT:
- // CHECK:STDOUT: constants {
- // CHECK:STDOUT: %F.type: type = fn_type @F [concrete]
- // CHECK:STDOUT: %F: %F.type = struct_value () [concrete]
- // CHECK:STDOUT: %PassThreeFields.cpp_overload_set.type: type = cpp_overload_set_type @PassThreeFields.cpp_overload_set [concrete]
- // CHECK:STDOUT: %PassThreeFields.cpp_overload_set.value: %PassThreeFields.cpp_overload_set.type = cpp_overload_set_value @PassThreeFields.cpp_overload_set [concrete]
- // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete]
- // CHECK:STDOUT: %struct_type.base: type = struct_type {.base: Core.IntLiteral} [concrete]
- // CHECK:STDOUT: %struct: %struct_type.base = struct_value (%int_1) [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: %Cpp: <namespace> = namespace file.%Cpp.import_cpp, [concrete] {
- // CHECK:STDOUT: .PassThreeFields = %PassThreeFields.cpp_overload_set.value
- // CHECK:STDOUT: import Cpp//...
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %PassThreeFields.cpp_overload_set.value: %PassThreeFields.cpp_overload_set.type = cpp_overload_set_value @PassThreeFields.cpp_overload_set [concrete = constants.%PassThreeFields.cpp_overload_set.value]
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: file {
- // CHECK:STDOUT: package: <namespace> = namespace [concrete] {
- // CHECK:STDOUT: .Core = imports.%Core
- // CHECK:STDOUT: .Cpp = imports.%Cpp
- // CHECK:STDOUT: .F = %F.decl
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %Core.import = import Core
- // CHECK:STDOUT: %Cpp.import_cpp = import_cpp {
- // CHECK:STDOUT: import Cpp "struct_init.h"
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [concrete = constants.%F] {} {}
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: fn @F() {
- // CHECK:STDOUT: !entry:
- // CHECK:STDOUT: %Cpp.ref: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
- // CHECK:STDOUT: %PassThreeFields.ref: %PassThreeFields.cpp_overload_set.type = name_ref PassThreeFields, imports.%PassThreeFields.cpp_overload_set.value [concrete = constants.%PassThreeFields.cpp_overload_set.value]
- // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1]
- // CHECK:STDOUT: %.loc11: %struct_type.base = struct_literal (%int_1) [concrete = constants.%struct]
- // CHECK:STDOUT: return
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: --- fail_struct_init_from_tuple.carbon
- // CHECK:STDOUT:
- // CHECK:STDOUT: constants {
- // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete]
- // CHECK:STDOUT: %empty_tuple: %empty_tuple.type = tuple_value () [concrete]
- // CHECK:STDOUT: %.842: Core.Form = init_form %empty_tuple.type, call_param0 [concrete]
- // CHECK:STDOUT: %pattern_type.cb1: type = pattern_type %empty_tuple.type [concrete]
- // CHECK:STDOUT: %MakeEmpty.type: type = fn_type @MakeEmpty [concrete]
- // CHECK:STDOUT: %MakeEmpty: %MakeEmpty.type = struct_value () [concrete]
- // CHECK:STDOUT: %Empty.type: type = fn_type @Empty [concrete]
- // CHECK:STDOUT: %Empty: %Empty.type = struct_value () [concrete]
- // CHECK:STDOUT: %PassNoFields.cpp_overload_set.type: type = cpp_overload_set_type @PassNoFields.cpp_overload_set [concrete]
- // CHECK:STDOUT: %PassNoFields.cpp_overload_set.value: %PassNoFields.cpp_overload_set.type = cpp_overload_set_value @PassNoFields.cpp_overload_set [concrete]
- // CHECK:STDOUT: %NoFields: type = class_type @NoFields [concrete]
- // CHECK:STDOUT: %ptr.dd0: type = ptr_type %NoFields [concrete]
- // CHECK:STDOUT: %pattern_type.a92: type = pattern_type %ptr.dd0 [concrete]
- // CHECK:STDOUT: %PassNoFields__carbon_thunk.type: type = fn_type @PassNoFields__carbon_thunk [concrete]
- // CHECK:STDOUT: %PassNoFields__carbon_thunk: %PassNoFields__carbon_thunk.type = struct_value () [concrete]
- // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete]
- // CHECK:STDOUT: %complete_type.357: <witness> = complete_type_witness %empty_struct_type [concrete]
- // CHECK:STDOUT: %ImplicitAs.type.cc7: type = generic_interface_type @ImplicitAs [concrete]
- // CHECK:STDOUT: %ImplicitAs.generic: %ImplicitAs.type.cc7 = struct_value () [concrete]
- // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete]
- // CHECK:STDOUT: %Int.type: type = generic_class_type @Int [concrete]
- // CHECK:STDOUT: %Int.generic: %Int.type = struct_value () [concrete]
- // CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [concrete]
- // CHECK:STDOUT: %tuple.type.ff9: type = tuple_type (type, type, type) [concrete]
- // CHECK:STDOUT: %tuple.e64: %tuple.type.ff9 = tuple_value (%i32, %i32, %i32) [concrete]
- // CHECK:STDOUT: %tuple.type.189: type = tuple_type (%i32, %i32, %i32) [concrete]
- // CHECK:STDOUT: %.594: Core.Form = init_form %tuple.type.189, call_param0 [concrete]
- // CHECK:STDOUT: %pattern_type.b5a: type = pattern_type %tuple.type.189 [concrete]
- // CHECK:STDOUT: %MakeThreeFields.type: type = fn_type @MakeThreeFields [concrete]
- // CHECK:STDOUT: %MakeThreeFields: %MakeThreeFields.type = struct_value () [concrete]
- // CHECK:STDOUT: %ThreeFields.type: type = fn_type @ThreeFields.loc67 [concrete]
- // CHECK:STDOUT: %ThreeFields.c3a: %ThreeFields.type = struct_value () [concrete]
- // CHECK:STDOUT: %PassThreeFields.cpp_overload_set.type: type = cpp_overload_set_type @PassThreeFields.cpp_overload_set [concrete]
- // CHECK:STDOUT: %PassThreeFields.cpp_overload_set.value: %PassThreeFields.cpp_overload_set.type = cpp_overload_set_value @PassThreeFields.cpp_overload_set [concrete]
- // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete]
- // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [concrete]
- // CHECK:STDOUT: %int_3: Core.IntLiteral = int_value 3 [concrete]
- // CHECK:STDOUT: %tuple.type.37f: type = tuple_type (Core.IntLiteral, Core.IntLiteral, Core.IntLiteral) [concrete]
- // CHECK:STDOUT: %tuple.2d5: %tuple.type.37f = tuple_value (%int_1, %int_2, %int_3) [concrete]
- // CHECK:STDOUT: %ThreeFields.942: type = class_type @ThreeFields.1 [concrete]
- // CHECK:STDOUT: %ptr.f81: type = ptr_type %ThreeFields.942 [concrete]
- // CHECK:STDOUT: %pattern_type.7bb: type = pattern_type %ptr.f81 [concrete]
- // CHECK:STDOUT: %PassThreeFields__carbon_thunk.type: type = fn_type @PassThreeFields__carbon_thunk [concrete]
- // CHECK:STDOUT: %PassThreeFields__carbon_thunk: %PassThreeFields__carbon_thunk.type = struct_value () [concrete]
- // CHECK:STDOUT: %ThreeFields.elem: type = unbound_element_type %ThreeFields.942, %i32 [concrete]
- // CHECK:STDOUT: %.c77: type = custom_layout_type {size=12, align=4, .a@0: %i32, .b@4: %i32, .c@8: %i32} [concrete]
- // CHECK:STDOUT: %complete_type.702: <witness> = complete_type_witness %.c77 [concrete]
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: imports {
- // CHECK:STDOUT: %Core: <namespace> = namespace file.%Core.import, [concrete] {
- // CHECK:STDOUT: .ImplicitAs = %Core.ImplicitAs
- // CHECK:STDOUT: .Int = %Core.Int
- // CHECK:STDOUT: import Core//prelude
- // CHECK:STDOUT: import Core//prelude/...
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %Cpp: <namespace> = namespace file.%Cpp.import_cpp, [concrete] {
- // CHECK:STDOUT: .PassNoFields = %PassNoFields.cpp_overload_set.value
- // CHECK:STDOUT: .PassThreeFields = %PassThreeFields.cpp_overload_set.value
- // CHECK:STDOUT: import Cpp//...
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %PassNoFields.cpp_overload_set.value: %PassNoFields.cpp_overload_set.type = cpp_overload_set_value @PassNoFields.cpp_overload_set [concrete = constants.%PassNoFields.cpp_overload_set.value]
- // CHECK:STDOUT: %PassNoFields__carbon_thunk.decl: %PassNoFields__carbon_thunk.type = fn_decl @PassNoFields__carbon_thunk [concrete = constants.%PassNoFields__carbon_thunk] {
- // CHECK:STDOUT: %s.patt: %pattern_type.a92 = value_binding_pattern s [concrete]
- // CHECK:STDOUT: %s.param_patt: %pattern_type.a92 = value_param_pattern %s.patt, call_param0 [concrete]
- // CHECK:STDOUT: } {
- // CHECK:STDOUT: %s.param: %ptr.dd0 = value_param call_param0
- // CHECK:STDOUT: %s: %ptr.dd0 = value_binding s, %s.param
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %Core.ImplicitAs: %ImplicitAs.type.cc7 = import_ref Core//prelude/parts/as, ImplicitAs, loaded [concrete = constants.%ImplicitAs.generic]
- // CHECK:STDOUT: %Core.Int: %Int.type = import_ref Core//prelude/parts/int, Int, loaded [concrete = constants.%Int.generic]
- // CHECK:STDOUT: %PassThreeFields.cpp_overload_set.value: %PassThreeFields.cpp_overload_set.type = cpp_overload_set_value @PassThreeFields.cpp_overload_set [concrete = constants.%PassThreeFields.cpp_overload_set.value]
- // CHECK:STDOUT: %PassThreeFields__carbon_thunk.decl: %PassThreeFields__carbon_thunk.type = fn_decl @PassThreeFields__carbon_thunk [concrete = constants.%PassThreeFields__carbon_thunk] {
- // CHECK:STDOUT: %t.patt: %pattern_type.7bb = value_binding_pattern t [concrete]
- // CHECK:STDOUT: %t.param_patt: %pattern_type.7bb = value_param_pattern %t.patt, call_param0 [concrete]
- // CHECK:STDOUT: } {
- // CHECK:STDOUT: %t.param: %ptr.f81 = value_param call_param0
- // CHECK:STDOUT: %t: %ptr.f81 = value_binding t, %t.param
- // CHECK:STDOUT: }
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: file {
- // CHECK:STDOUT: package: <namespace> = namespace [concrete] {
- // CHECK:STDOUT: .Core = imports.%Core
- // CHECK:STDOUT: .Cpp = imports.%Cpp
- // CHECK:STDOUT: .MakeEmpty = %MakeEmpty.decl
- // CHECK:STDOUT: .Empty = %Empty.decl
- // CHECK:STDOUT: .MakeThreeFields = %MakeThreeFields.decl
- // CHECK:STDOUT: .ThreeFields = %ThreeFields.decl
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %Core.import = import Core
- // CHECK:STDOUT: %Cpp.import_cpp = import_cpp {
- // CHECK:STDOUT: import Cpp "struct_init.h"
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %MakeEmpty.decl: %MakeEmpty.type = fn_decl @MakeEmpty [concrete = constants.%MakeEmpty] {
- // CHECK:STDOUT: %return.patt: %pattern_type.cb1 = return_slot_pattern [concrete]
- // CHECK:STDOUT: %return.param_patt: %pattern_type.cb1 = out_param_pattern %return.patt, call_param0 [concrete]
- // CHECK:STDOUT: } {
- // CHECK:STDOUT: %.loc9_20.1: %empty_tuple.type = tuple_literal () [concrete = constants.%empty_tuple]
- // CHECK:STDOUT: %.loc9_20.2: type = converted %.loc9_20.1, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type]
- // CHECK:STDOUT: %.loc9_20.3: Core.Form = init_form %.loc9_20.2, call_param0 [concrete = constants.%.842]
- // CHECK:STDOUT: %return.param: ref %empty_tuple.type = out_param call_param0
- // CHECK:STDOUT: %return: ref %empty_tuple.type = return_slot %return.param
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %Empty.decl: %Empty.type = fn_decl @Empty [concrete = constants.%Empty] {
- // CHECK:STDOUT: %value.patt: %pattern_type.cb1 = value_binding_pattern value [concrete]
- // CHECK:STDOUT: %value.param_patt: %pattern_type.cb1 = value_param_pattern %value.patt, call_param0 [concrete]
- // CHECK:STDOUT: %reference.patt: %pattern_type.cb1 = ref_binding_pattern reference [concrete]
- // CHECK:STDOUT: %reference.param_patt: %pattern_type.cb1 = ref_param_pattern %reference.patt, call_param1 [concrete]
- // CHECK:STDOUT: } {
- // CHECK:STDOUT: %value.param: %empty_tuple.type = value_param call_param0
- // CHECK:STDOUT: %.loc11_18.1: type = splice_block %.loc11_18.3 [concrete = constants.%empty_tuple.type] {
- // CHECK:STDOUT: %.loc11_18.2: %empty_tuple.type = tuple_literal () [concrete = constants.%empty_tuple]
- // CHECK:STDOUT: %.loc11_18.3: type = converted %.loc11_18.2, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type]
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %value: %empty_tuple.type = value_binding value, %value.param
- // CHECK:STDOUT: %reference.param: ref %empty_tuple.type = ref_param call_param1
- // CHECK:STDOUT: %.loc11_37.1: type = splice_block %.loc11_37.3 [concrete = constants.%empty_tuple.type] {
- // CHECK:STDOUT: %.loc11_37.2: %empty_tuple.type = tuple_literal () [concrete = constants.%empty_tuple]
- // CHECK:STDOUT: %.loc11_37.3: type = converted %.loc11_37.2, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type]
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %reference: ref %empty_tuple.type = ref_binding reference, %reference.param
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %MakeThreeFields.decl: %MakeThreeFields.type = fn_decl @MakeThreeFields [concrete = constants.%MakeThreeFields] {
- // CHECK:STDOUT: %return.patt: %pattern_type.b5a = return_slot_pattern [concrete]
- // CHECK:STDOUT: %return.param_patt: %pattern_type.b5a = out_param_pattern %return.patt, call_param0 [concrete]
- // CHECK:STDOUT: } {
- // CHECK:STDOUT: %int_32.loc65_26: Core.IntLiteral = int_value 32 [concrete = constants.%int_32]
- // CHECK:STDOUT: %i32.loc65_26: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32]
- // CHECK:STDOUT: %int_32.loc65_31: Core.IntLiteral = int_value 32 [concrete = constants.%int_32]
- // CHECK:STDOUT: %i32.loc65_31: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32]
- // CHECK:STDOUT: %int_32.loc65_36: Core.IntLiteral = int_value 32 [concrete = constants.%int_32]
- // CHECK:STDOUT: %i32.loc65_36: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32]
- // CHECK:STDOUT: %.loc65_39.1: %tuple.type.ff9 = tuple_literal (%i32.loc65_26, %i32.loc65_31, %i32.loc65_36) [concrete = constants.%tuple.e64]
- // CHECK:STDOUT: %.loc65_39.2: type = converted %.loc65_39.1, constants.%tuple.type.189 [concrete = constants.%tuple.type.189]
- // CHECK:STDOUT: %.loc65_39.3: Core.Form = init_form %.loc65_39.2, call_param0 [concrete = constants.%.594]
- // CHECK:STDOUT: %return.param: ref %tuple.type.189 = out_param call_param0
- // CHECK:STDOUT: %return: ref %tuple.type.189 = return_slot %return.param
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %ThreeFields.decl: %ThreeFields.type = fn_decl @ThreeFields.loc67 [concrete = constants.%ThreeFields.c3a] {
- // CHECK:STDOUT: %value.patt: %pattern_type.b5a = value_binding_pattern value [concrete]
- // CHECK:STDOUT: %value.param_patt: %pattern_type.b5a = value_param_pattern %value.patt, call_param0 [concrete]
- // CHECK:STDOUT: %reference.patt: %pattern_type.b5a = ref_binding_pattern reference [concrete]
- // CHECK:STDOUT: %reference.param_patt: %pattern_type.b5a = ref_param_pattern %reference.patt, call_param1 [concrete]
- // CHECK:STDOUT: } {
- // CHECK:STDOUT: %value.param: %tuple.type.189 = value_param call_param0
- // CHECK:STDOUT: %.loc67_37.1: type = splice_block %.loc67_37.3 [concrete = constants.%tuple.type.189] {
- // CHECK:STDOUT: %int_32.loc67_24: Core.IntLiteral = int_value 32 [concrete = constants.%int_32]
- // CHECK:STDOUT: %i32.loc67_24: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32]
- // CHECK:STDOUT: %int_32.loc67_29: Core.IntLiteral = int_value 32 [concrete = constants.%int_32]
- // CHECK:STDOUT: %i32.loc67_29: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32]
- // CHECK:STDOUT: %int_32.loc67_34: Core.IntLiteral = int_value 32 [concrete = constants.%int_32]
- // CHECK:STDOUT: %i32.loc67_34: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32]
- // CHECK:STDOUT: %.loc67_37.2: %tuple.type.ff9 = tuple_literal (%i32.loc67_24, %i32.loc67_29, %i32.loc67_34) [concrete = constants.%tuple.e64]
- // CHECK:STDOUT: %.loc67_37.3: type = converted %.loc67_37.2, constants.%tuple.type.189 [concrete = constants.%tuple.type.189]
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %value: %tuple.type.189 = value_binding value, %value.param
- // CHECK:STDOUT: %reference.param: ref %tuple.type.189 = ref_param call_param1
- // CHECK:STDOUT: %.loc67_69.1: type = splice_block %.loc67_69.3 [concrete = constants.%tuple.type.189] {
- // CHECK:STDOUT: %int_32.loc67_56: Core.IntLiteral = int_value 32 [concrete = constants.%int_32]
- // CHECK:STDOUT: %i32.loc67_56: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32]
- // CHECK:STDOUT: %int_32.loc67_61: Core.IntLiteral = int_value 32 [concrete = constants.%int_32]
- // CHECK:STDOUT: %i32.loc67_61: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32]
- // CHECK:STDOUT: %int_32.loc67_66: Core.IntLiteral = int_value 32 [concrete = constants.%int_32]
- // CHECK:STDOUT: %i32.loc67_66: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32]
- // CHECK:STDOUT: %.loc67_69.2: %tuple.type.ff9 = tuple_literal (%i32.loc67_56, %i32.loc67_61, %i32.loc67_66) [concrete = constants.%tuple.e64]
- // CHECK:STDOUT: %.loc67_69.3: type = converted %.loc67_69.2, constants.%tuple.type.189 [concrete = constants.%tuple.type.189]
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %reference: ref %tuple.type.189 = ref_binding reference, %reference.param
- // CHECK:STDOUT: }
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: class @NoFields {
- // 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.357]
- // CHECK:STDOUT: complete_type_witness = %complete_type
- // CHECK:STDOUT:
- // CHECK:STDOUT: !members:
- // CHECK:STDOUT: import Cpp//...
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: class @ThreeFields.1 {
- // CHECK:STDOUT: %int_32.1: Core.IntLiteral = int_value 32 [concrete = constants.%int_32]
- // CHECK:STDOUT: %i32.1: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32]
- // CHECK:STDOUT: %.1: %ThreeFields.elem = field_decl a, element0 [concrete]
- // CHECK:STDOUT: %int_32.2: Core.IntLiteral = int_value 32 [concrete = constants.%int_32]
- // CHECK:STDOUT: %i32.2: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32]
- // CHECK:STDOUT: %.2: %ThreeFields.elem = field_decl b, element1 [concrete]
- // CHECK:STDOUT: %int_32.3: Core.IntLiteral = int_value 32 [concrete = constants.%int_32]
- // CHECK:STDOUT: %i32.3: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32]
- // CHECK:STDOUT: %.3: %ThreeFields.elem = field_decl c, element2 [concrete]
- // CHECK:STDOUT: %.4: type = custom_layout_type {size=12, align=4, .a@0: %i32, .b@4: %i32, .c@8: %i32} [concrete = constants.%.c77]
- // CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %.4 [concrete = constants.%complete_type.702]
- // CHECK:STDOUT: complete_type_witness = %complete_type
- // CHECK:STDOUT:
- // CHECK:STDOUT: !members:
- // CHECK:STDOUT: import Cpp//...
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: fn @MakeEmpty() -> out %return.param: %empty_tuple.type;
- // CHECK:STDOUT:
- // CHECK:STDOUT: fn @Empty(%value.param: %empty_tuple.type, %reference.param: ref %empty_tuple.type) {
- // CHECK:STDOUT: !entry:
- // CHECK:STDOUT: %Cpp.ref.loc23: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
- // CHECK:STDOUT: %PassNoFields.ref.loc23: %PassNoFields.cpp_overload_set.type = name_ref PassNoFields, imports.%PassNoFields.cpp_overload_set.value [concrete = constants.%PassNoFields.cpp_overload_set.value]
- // CHECK:STDOUT: %.loc23_21.1: %empty_tuple.type = tuple_literal () [concrete = constants.%empty_tuple]
- // CHECK:STDOUT: %.loc23_21.2: %NoFields = converted %.loc23_21.1, <error> [concrete = <error>]
- // CHECK:STDOUT: %addr.loc23: %ptr.dd0 = addr_of <error> [concrete = <error>]
- // CHECK:STDOUT: %PassNoFields__carbon_thunk.call.loc23: init %empty_tuple.type = call imports.%PassNoFields__carbon_thunk.decl(%addr.loc23)
- // CHECK:STDOUT: %Cpp.ref.loc36: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
- // CHECK:STDOUT: %PassNoFields.ref.loc36: %PassNoFields.cpp_overload_set.type = name_ref PassNoFields, imports.%PassNoFields.cpp_overload_set.value [concrete = constants.%PassNoFields.cpp_overload_set.value]
- // CHECK:STDOUT: %value.ref: %empty_tuple.type = name_ref value, %value
- // CHECK:STDOUT: %.loc36: %NoFields = converted %value.ref, <error> [concrete = <error>]
- // CHECK:STDOUT: %addr.loc36: %ptr.dd0 = addr_of <error> [concrete = <error>]
- // CHECK:STDOUT: %PassNoFields__carbon_thunk.call.loc36: init %empty_tuple.type = call imports.%PassNoFields__carbon_thunk.decl(%addr.loc36)
- // CHECK:STDOUT: %Cpp.ref.loc49: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
- // CHECK:STDOUT: %PassNoFields.ref.loc49: %PassNoFields.cpp_overload_set.type = name_ref PassNoFields, imports.%PassNoFields.cpp_overload_set.value [concrete = constants.%PassNoFields.cpp_overload_set.value]
- // CHECK:STDOUT: %reference.ref: ref %empty_tuple.type = name_ref reference, %reference
- // CHECK:STDOUT: %.loc49: %NoFields = converted %reference.ref, <error> [concrete = <error>]
- // CHECK:STDOUT: %addr.loc49: %ptr.dd0 = addr_of <error> [concrete = <error>]
- // CHECK:STDOUT: %PassNoFields__carbon_thunk.call.loc49: init %empty_tuple.type = call imports.%PassNoFields__carbon_thunk.decl(%addr.loc49)
- // CHECK:STDOUT: %Cpp.ref.loc62: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
- // CHECK:STDOUT: %PassNoFields.ref.loc62: %PassNoFields.cpp_overload_set.type = name_ref PassNoFields, imports.%PassNoFields.cpp_overload_set.value [concrete = constants.%PassNoFields.cpp_overload_set.value]
- // CHECK:STDOUT: %MakeEmpty.ref: %MakeEmpty.type = name_ref MakeEmpty, file.%MakeEmpty.decl [concrete = constants.%MakeEmpty]
- // CHECK:STDOUT: %MakeEmpty.call: init %empty_tuple.type = call %MakeEmpty.ref()
- // CHECK:STDOUT: %.loc62: %NoFields = converted %MakeEmpty.call, <error> [concrete = <error>]
- // CHECK:STDOUT: %addr.loc62: %ptr.dd0 = addr_of <error> [concrete = <error>]
- // CHECK:STDOUT: %PassNoFields__carbon_thunk.call.loc62: init %empty_tuple.type = call imports.%PassNoFields__carbon_thunk.decl(%addr.loc62)
- // CHECK:STDOUT: return
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: fn @PassNoFields(%s.param: %NoFields);
- // CHECK:STDOUT:
- // CHECK:STDOUT: fn @PassNoFields__carbon_thunk(%s.param: %ptr.dd0);
- // CHECK:STDOUT:
- // CHECK:STDOUT: fn @MakeThreeFields() -> out %return.param: %tuple.type.189;
- // CHECK:STDOUT:
- // CHECK:STDOUT: fn @ThreeFields.loc67(%value.param: %tuple.type.189, %reference.param: ref %tuple.type.189) {
- // CHECK:STDOUT: !entry:
- // CHECK:STDOUT: %Cpp.ref.loc79: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
- // CHECK:STDOUT: %PassThreeFields.ref.loc79: %PassThreeFields.cpp_overload_set.type = name_ref PassThreeFields, imports.%PassThreeFields.cpp_overload_set.value [concrete = constants.%PassThreeFields.cpp_overload_set.value]
- // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1]
- // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [concrete = constants.%int_2]
- // CHECK:STDOUT: %int_3: Core.IntLiteral = int_value 3 [concrete = constants.%int_3]
- // CHECK:STDOUT: %.loc79_31.1: %tuple.type.37f = tuple_literal (%int_1, %int_2, %int_3) [concrete = constants.%tuple.2d5]
- // CHECK:STDOUT: %.loc79_31.2: %ThreeFields.942 = converted %.loc79_31.1, <error> [concrete = <error>]
- // CHECK:STDOUT: %addr.loc79: %ptr.f81 = addr_of <error> [concrete = <error>]
- // CHECK:STDOUT: %PassThreeFields__carbon_thunk.call.loc79: init %empty_tuple.type = call imports.%PassThreeFields__carbon_thunk.decl(%addr.loc79)
- // CHECK:STDOUT: %Cpp.ref.loc92: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
- // CHECK:STDOUT: %PassThreeFields.ref.loc92: %PassThreeFields.cpp_overload_set.type = name_ref PassThreeFields, imports.%PassThreeFields.cpp_overload_set.value [concrete = constants.%PassThreeFields.cpp_overload_set.value]
- // CHECK:STDOUT: %value.ref: %tuple.type.189 = name_ref value, %value
- // CHECK:STDOUT: %.loc92: %ThreeFields.942 = converted %value.ref, <error> [concrete = <error>]
- // CHECK:STDOUT: %addr.loc92: %ptr.f81 = addr_of <error> [concrete = <error>]
- // CHECK:STDOUT: %PassThreeFields__carbon_thunk.call.loc92: init %empty_tuple.type = call imports.%PassThreeFields__carbon_thunk.decl(%addr.loc92)
- // CHECK:STDOUT: %Cpp.ref.loc105: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
- // CHECK:STDOUT: %PassThreeFields.ref.loc105: %PassThreeFields.cpp_overload_set.type = name_ref PassThreeFields, imports.%PassThreeFields.cpp_overload_set.value [concrete = constants.%PassThreeFields.cpp_overload_set.value]
- // CHECK:STDOUT: %reference.ref: ref %tuple.type.189 = name_ref reference, %reference
- // CHECK:STDOUT: %.loc105: %ThreeFields.942 = converted %reference.ref, <error> [concrete = <error>]
- // CHECK:STDOUT: %addr.loc105: %ptr.f81 = addr_of <error> [concrete = <error>]
- // CHECK:STDOUT: %PassThreeFields__carbon_thunk.call.loc105: init %empty_tuple.type = call imports.%PassThreeFields__carbon_thunk.decl(%addr.loc105)
- // CHECK:STDOUT: %Cpp.ref.loc118: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
- // CHECK:STDOUT: %PassThreeFields.ref.loc118: %PassThreeFields.cpp_overload_set.type = name_ref PassThreeFields, imports.%PassThreeFields.cpp_overload_set.value [concrete = constants.%PassThreeFields.cpp_overload_set.value]
- // CHECK:STDOUT: %MakeThreeFields.ref: %MakeThreeFields.type = name_ref MakeThreeFields, file.%MakeThreeFields.decl [concrete = constants.%MakeThreeFields]
- // CHECK:STDOUT: %.loc118_39.1: ref %tuple.type.189 = temporary_storage
- // CHECK:STDOUT: %MakeThreeFields.call: init %tuple.type.189 to %.loc118_39.1 = call %MakeThreeFields.ref()
- // CHECK:STDOUT: %.loc118_39.2: %ThreeFields.942 = converted %MakeThreeFields.call, <error> [concrete = <error>]
- // CHECK:STDOUT: %addr.loc118: %ptr.f81 = addr_of <error> [concrete = <error>]
- // CHECK:STDOUT: %PassThreeFields__carbon_thunk.call.loc118: init %empty_tuple.type = call imports.%PassThreeFields__carbon_thunk.decl(%addr.loc118)
- // CHECK:STDOUT: return
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: fn @PassThreeFields(%t.param: %ThreeFields.942);
- // CHECK:STDOUT:
- // CHECK:STDOUT: fn @PassThreeFields__carbon_thunk(%t.param: %ptr.f81);
- // CHECK:STDOUT:
- // CHECK:STDOUT: --- fail_int_from_struct.carbon
- // CHECK:STDOUT:
- // CHECK:STDOUT: constants {
- // CHECK:STDOUT: %F.type: type = fn_type @F [concrete]
- // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete]
- // CHECK:STDOUT: %F: %F.type = struct_value () [concrete]
- // CHECK:STDOUT: %PassInt.cpp_overload_set.type: type = cpp_overload_set_type @PassInt.cpp_overload_set [concrete]
- // CHECK:STDOUT: %PassInt.cpp_overload_set.value: %PassInt.cpp_overload_set.type = cpp_overload_set_value @PassInt.cpp_overload_set [concrete]
- // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete]
- // CHECK:STDOUT: %empty_struct: %empty_struct_type = struct_value () [concrete]
- // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete]
- // CHECK:STDOUT: %Int.type: type = generic_class_type @Int [concrete]
- // CHECK:STDOUT: %Int.generic: %Int.type = struct_value () [concrete]
- // CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [concrete]
- // CHECK:STDOUT: %pattern_type.7ce: type = pattern_type %i32 [concrete]
- // CHECK:STDOUT: %PassInt.type: type = fn_type @PassInt [concrete]
- // CHECK:STDOUT: %PassInt: %PassInt.type = struct_value () [concrete]
- // CHECK:STDOUT: %ImplicitAs.type.cc7: type = generic_interface_type @ImplicitAs [concrete]
- // CHECK:STDOUT: %ImplicitAs.generic: %ImplicitAs.type.cc7 = 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: .Int = %Core.Int
- // CHECK:STDOUT: .ImplicitAs = %Core.ImplicitAs
- // CHECK:STDOUT: import Core//prelude
- // CHECK:STDOUT: import Core//prelude/...
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %Cpp: <namespace> = namespace file.%Cpp.import_cpp, [concrete] {
- // CHECK:STDOUT: .PassInt = %PassInt.cpp_overload_set.value
- // CHECK:STDOUT: import Cpp//...
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %PassInt.cpp_overload_set.value: %PassInt.cpp_overload_set.type = cpp_overload_set_value @PassInt.cpp_overload_set [concrete = constants.%PassInt.cpp_overload_set.value]
- // CHECK:STDOUT: %Core.Int: %Int.type = import_ref Core//prelude/parts/int, Int, loaded [concrete = constants.%Int.generic]
- // CHECK:STDOUT: %PassInt.decl: %PassInt.type = fn_decl @PassInt [concrete = constants.%PassInt] {
- // CHECK:STDOUT: %n.patt: %pattern_type.7ce = value_binding_pattern n [concrete]
- // CHECK:STDOUT: %n.param_patt: %pattern_type.7ce = value_param_pattern %n.patt, call_param0 [concrete]
- // CHECK:STDOUT: } {
- // CHECK:STDOUT: %n.param: %i32 = value_param call_param0
- // CHECK:STDOUT: %.1: type = splice_block %i32 [concrete = constants.%i32] {
- // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete = constants.%int_32]
- // CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32]
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %n: %i32 = value_binding n, %n.param
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %Core.ImplicitAs: %ImplicitAs.type.cc7 = import_ref Core//prelude/parts/as, ImplicitAs, loaded [concrete = constants.%ImplicitAs.generic]
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: file {
- // CHECK:STDOUT: package: <namespace> = namespace [concrete] {
- // CHECK:STDOUT: .Core = imports.%Core
- // CHECK:STDOUT: .Cpp = imports.%Cpp
- // CHECK:STDOUT: .F = %F.decl
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %Core.import = import Core
- // CHECK:STDOUT: %Cpp.import_cpp = import_cpp {
- // CHECK:STDOUT: import Cpp "int_from_struct.h"
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [concrete = constants.%F] {} {}
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: fn @F() {
- // CHECK:STDOUT: !entry:
- // CHECK:STDOUT: %Cpp.ref.loc20: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
- // CHECK:STDOUT: %PassInt.ref.loc20: %PassInt.cpp_overload_set.type = name_ref PassInt, imports.%PassInt.cpp_overload_set.value [concrete = constants.%PassInt.cpp_overload_set.value]
- // CHECK:STDOUT: %.loc20_16.1: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct]
- // CHECK:STDOUT: %.loc20_16.2: %i32 = converted %.loc20_16.1, <error> [concrete = <error>]
- // CHECK:STDOUT: %PassInt.call.loc20: init %empty_tuple.type = call imports.%PassInt.decl(<error>)
- // CHECK:STDOUT: %Cpp.ref.loc33: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
- // CHECK:STDOUT: %PassInt.ref.loc33: %PassInt.cpp_overload_set.type = name_ref PassInt, imports.%PassInt.cpp_overload_set.value [concrete = constants.%PassInt.cpp_overload_set.value]
- // CHECK:STDOUT: %.loc33_16.1: %empty_tuple.type = tuple_literal () [concrete = constants.%empty_tuple]
- // CHECK:STDOUT: %.loc33_16.2: %i32 = converted %.loc33_16.1, <error> [concrete = <error>]
- // CHECK:STDOUT: %PassInt.call.loc33: init %empty_tuple.type = call imports.%PassInt.decl(<error>)
- // CHECK:STDOUT: return
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: fn @PassInt(%n.param: %i32);
- // CHECK:STDOUT:
- // CHECK:STDOUT: --- fail_int_from_struct_overloaded.carbon
- // CHECK:STDOUT:
- // CHECK:STDOUT: constants {
- // CHECK:STDOUT: %F.type: type = fn_type @F [concrete]
- // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete]
- // CHECK:STDOUT: %F: %F.type = struct_value () [concrete]
- // CHECK:STDOUT: %PassOverloaded.cpp_overload_set.type: type = cpp_overload_set_type @PassOverloaded.cpp_overload_set [concrete]
- // CHECK:STDOUT: %PassOverloaded.cpp_overload_set.value: %PassOverloaded.cpp_overload_set.type = cpp_overload_set_value @PassOverloaded.cpp_overload_set [concrete]
- // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete]
- // CHECK:STDOUT: %empty_struct: %empty_struct_type = struct_value () [concrete]
- // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete]
- // CHECK:STDOUT: %Int.type: type = generic_class_type @Int [concrete]
- // CHECK:STDOUT: %Int.generic: %Int.type = struct_value () [concrete]
- // CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [concrete]
- // CHECK:STDOUT: %pattern_type.7ce: type = pattern_type %i32 [concrete]
- // CHECK:STDOUT: %PassOverloaded.type: type = fn_type @PassOverloaded [concrete]
- // CHECK:STDOUT: %PassOverloaded: %PassOverloaded.type = struct_value () [concrete]
- // CHECK:STDOUT: %ImplicitAs.type.cc7: type = generic_interface_type @ImplicitAs [concrete]
- // CHECK:STDOUT: %ImplicitAs.generic: %ImplicitAs.type.cc7 = 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: .Int = %Core.Int
- // CHECK:STDOUT: .ImplicitAs = %Core.ImplicitAs
- // CHECK:STDOUT: import Core//prelude
- // CHECK:STDOUT: import Core//prelude/...
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %Cpp: <namespace> = namespace file.%Cpp.import_cpp, [concrete] {
- // CHECK:STDOUT: .PassOverloaded = %PassOverloaded.cpp_overload_set.value
- // CHECK:STDOUT: import Cpp//...
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %PassOverloaded.cpp_overload_set.value: %PassOverloaded.cpp_overload_set.type = cpp_overload_set_value @PassOverloaded.cpp_overload_set [concrete = constants.%PassOverloaded.cpp_overload_set.value]
- // CHECK:STDOUT: %Core.Int: %Int.type = import_ref Core//prelude/parts/int, Int, loaded [concrete = constants.%Int.generic]
- // CHECK:STDOUT: %PassOverloaded.decl: %PassOverloaded.type = fn_decl @PassOverloaded [concrete = constants.%PassOverloaded] {
- // CHECK:STDOUT: %n.patt: %pattern_type.7ce = value_binding_pattern n [concrete]
- // CHECK:STDOUT: %n.param_patt: %pattern_type.7ce = value_param_pattern %n.patt, call_param0 [concrete]
- // CHECK:STDOUT: } {
- // CHECK:STDOUT: %n.param: %i32 = value_param call_param0
- // CHECK:STDOUT: %.1: type = splice_block %i32 [concrete = constants.%i32] {
- // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete = constants.%int_32]
- // CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32]
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %n: %i32 = value_binding n, %n.param
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %Core.ImplicitAs: %ImplicitAs.type.cc7 = import_ref Core//prelude/parts/as, ImplicitAs, loaded [concrete = constants.%ImplicitAs.generic]
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: file {
- // CHECK:STDOUT: package: <namespace> = namespace [concrete] {
- // CHECK:STDOUT: .Core = imports.%Core
- // CHECK:STDOUT: .Cpp = imports.%Cpp
- // CHECK:STDOUT: .F = %F.decl
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %Core.import = import Core
- // CHECK:STDOUT: %Cpp.import_cpp = import_cpp {
- // CHECK:STDOUT: import Cpp "int_from_struct.h"
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [concrete = constants.%F] {} {}
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: fn @F() {
- // CHECK:STDOUT: !entry:
- // CHECK:STDOUT: %Cpp.ref.loc21: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
- // CHECK:STDOUT: %PassOverloaded.ref.loc21: %PassOverloaded.cpp_overload_set.type = name_ref PassOverloaded, imports.%PassOverloaded.cpp_overload_set.value [concrete = constants.%PassOverloaded.cpp_overload_set.value]
- // CHECK:STDOUT: %.loc21_23.1: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct]
- // CHECK:STDOUT: %.loc21_23.2: %i32 = converted %.loc21_23.1, <error> [concrete = <error>]
- // CHECK:STDOUT: %PassOverloaded.call.loc21: init %empty_tuple.type = call imports.%PassOverloaded.decl(<error>)
- // CHECK:STDOUT: %Cpp.ref.loc34: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
- // CHECK:STDOUT: %PassOverloaded.ref.loc34: %PassOverloaded.cpp_overload_set.type = name_ref PassOverloaded, imports.%PassOverloaded.cpp_overload_set.value [concrete = constants.%PassOverloaded.cpp_overload_set.value]
- // CHECK:STDOUT: %.loc34_23.1: %empty_tuple.type = tuple_literal () [concrete = constants.%empty_tuple]
- // CHECK:STDOUT: %.loc34_23.2: %i32 = converted %.loc34_23.1, <error> [concrete = <error>]
- // CHECK:STDOUT: %PassOverloaded.call.loc34: init %empty_tuple.type = call imports.%PassOverloaded.decl(<error>)
- // CHECK:STDOUT: return
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: fn @PassOverloaded(%n.param: %i32);
- // CHECK:STDOUT:
- // CHECK:STDOUT: --- fail_pass_nested_structs_inner_field_mismatch.carbon
- // CHECK:STDOUT:
- // CHECK:STDOUT: constants {
- // CHECK:STDOUT: %F.type: type = fn_type @F [concrete]
- // CHECK:STDOUT: %F: %F.type = struct_value () [concrete]
- // CHECK:STDOUT: %TakeB.cpp_overload_set.type: type = cpp_overload_set_type @TakeB.cpp_overload_set [concrete]
- // CHECK:STDOUT: %TakeB.cpp_overload_set.value: %TakeB.cpp_overload_set.type = cpp_overload_set_value @TakeB.cpp_overload_set [concrete]
- // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete]
- // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [concrete]
- // CHECK:STDOUT: %struct_type.x.z: type = struct_type {.x: Core.IntLiteral, .z: Core.IntLiteral} [concrete]
- // CHECK:STDOUT: %struct.c50: %struct_type.x.z = struct_value (%int_1, %int_2) [concrete]
- // CHECK:STDOUT: %int_3: Core.IntLiteral = int_value 3 [concrete]
- // CHECK:STDOUT: %struct_type.a.n: type = struct_type {.a: %struct_type.x.z, .n: Core.IntLiteral} [concrete]
- // CHECK:STDOUT: %struct.7ea: %struct_type.a.n = struct_value (%struct.c50, %int_3) [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: %Cpp: <namespace> = namespace file.%Cpp.import_cpp, [concrete] {
- // CHECK:STDOUT: .TakeB = %TakeB.cpp_overload_set.value
- // CHECK:STDOUT: import Cpp//...
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %TakeB.cpp_overload_set.value: %TakeB.cpp_overload_set.type = cpp_overload_set_value @TakeB.cpp_overload_set [concrete = constants.%TakeB.cpp_overload_set.value]
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: file {
- // CHECK:STDOUT: package: <namespace> = namespace [concrete] {
- // CHECK:STDOUT: .Core = imports.%Core
- // CHECK:STDOUT: .Cpp = imports.%Cpp
- // CHECK:STDOUT: .F = %F.decl
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %Core.import = import Core
- // CHECK:STDOUT: %Cpp.import_cpp = import_cpp {
- // CHECK:STDOUT: import Cpp "nested_structs.h"
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [concrete = constants.%F] {} {}
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: fn @F() {
- // CHECK:STDOUT: !entry:
- // CHECK:STDOUT: %Cpp.ref: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
- // CHECK:STDOUT: %TakeB.ref: %TakeB.cpp_overload_set.type = name_ref TakeB, imports.%TakeB.cpp_overload_set.value [concrete = constants.%TakeB.cpp_overload_set.value]
- // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1]
- // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [concrete = constants.%int_2]
- // CHECK:STDOUT: %.loc15_34: %struct_type.x.z = struct_literal (%int_1, %int_2) [concrete = constants.%struct.c50]
- // CHECK:STDOUT: %int_3: Core.IntLiteral = int_value 3 [concrete = constants.%int_3]
- // CHECK:STDOUT: %.loc15_43: %struct_type.a.n = struct_literal (%.loc15_34, %int_3) [concrete = constants.%struct.7ea]
- // CHECK:STDOUT: return
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: --- fail_todo_pass_nested_structs.carbon
- // CHECK:STDOUT:
- // CHECK:STDOUT: constants {
- // CHECK:STDOUT: %F.type: type = fn_type @F [concrete]
- // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete]
- // CHECK:STDOUT: %F: %F.type = struct_value () [concrete]
- // CHECK:STDOUT: %TakeB.cpp_overload_set.type: type = cpp_overload_set_type @TakeB.cpp_overload_set [concrete]
- // CHECK:STDOUT: %TakeB.cpp_overload_set.value: %TakeB.cpp_overload_set.type = cpp_overload_set_value @TakeB.cpp_overload_set [concrete]
- // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete]
- // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [concrete]
- // CHECK:STDOUT: %struct_type.x.y: type = struct_type {.x: Core.IntLiteral, .y: Core.IntLiteral} [concrete]
- // CHECK:STDOUT: %struct.004: %struct_type.x.y = struct_value (%int_1, %int_2) [concrete]
- // CHECK:STDOUT: %int_3: Core.IntLiteral = int_value 3 [concrete]
- // CHECK:STDOUT: %struct_type.a.n.988: type = struct_type {.a: %struct_type.x.y, .n: Core.IntLiteral} [concrete]
- // CHECK:STDOUT: %struct.516: %struct_type.a.n.988 = struct_value (%struct.004, %int_3) [concrete]
- // CHECK:STDOUT: %B: type = class_type @B [concrete]
- // CHECK:STDOUT: %ptr.a04: type = ptr_type %B [concrete]
- // CHECK:STDOUT: %pattern_type.837: type = pattern_type %ptr.a04 [concrete]
- // CHECK:STDOUT: %TakeB__carbon_thunk.type: type = fn_type @TakeB__carbon_thunk [concrete]
- // CHECK:STDOUT: %TakeB__carbon_thunk: %TakeB__carbon_thunk.type = struct_value () [concrete]
- // CHECK:STDOUT: %A: type = class_type @A [concrete]
- // CHECK:STDOUT: %B.elem.bad: type = unbound_element_type %B, %A [concrete]
- // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete]
- // CHECK:STDOUT: %Int.type: type = generic_class_type @Int [concrete]
- // CHECK:STDOUT: %Int.generic: %Int.type = struct_value () [concrete]
- // CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [concrete]
- // CHECK:STDOUT: %B.elem.c76: type = unbound_element_type %B, %i32 [concrete]
- // CHECK:STDOUT: %.e7f: type = custom_layout_type {size=12, align=4, .a@0: %A, .n@8: %i32} [concrete]
- // CHECK:STDOUT: %complete_type.b39: <witness> = complete_type_witness %.e7f [concrete]
- // CHECK:STDOUT: %A.elem: type = unbound_element_type %A, %i32 [concrete]
- // CHECK:STDOUT: %.7b6: type = custom_layout_type {size=8, align=4, .x@0: %i32, .y@4: %i32} [concrete]
- // CHECK:STDOUT: %complete_type.1e0: <witness> = complete_type_witness %.7b6 [concrete]
- // CHECK:STDOUT: %ImplicitAs.type.cc7: type = generic_interface_type @ImplicitAs [concrete]
- // CHECK:STDOUT: %ImplicitAs.generic: %ImplicitAs.type.cc7 = struct_value () [concrete]
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: imports {
- // CHECK:STDOUT: %Core: <namespace> = namespace file.%Core.import, [concrete] {
- // CHECK:STDOUT: .Int = %Core.Int
- // CHECK:STDOUT: .ImplicitAs = %Core.ImplicitAs
- // CHECK:STDOUT: import Core//prelude
- // CHECK:STDOUT: import Core//prelude/...
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %Cpp: <namespace> = namespace file.%Cpp.import_cpp, [concrete] {
- // CHECK:STDOUT: .TakeB = %TakeB.cpp_overload_set.value
- // CHECK:STDOUT: import Cpp//...
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %TakeB.cpp_overload_set.value: %TakeB.cpp_overload_set.type = cpp_overload_set_value @TakeB.cpp_overload_set [concrete = constants.%TakeB.cpp_overload_set.value]
- // CHECK:STDOUT: %TakeB__carbon_thunk.decl: %TakeB__carbon_thunk.type = fn_decl @TakeB__carbon_thunk [concrete = constants.%TakeB__carbon_thunk] {
- // CHECK:STDOUT: %_.patt: %pattern_type.837 = value_binding_pattern _ [concrete]
- // CHECK:STDOUT: %_.param_patt: %pattern_type.837 = value_param_pattern %_.patt, call_param0 [concrete]
- // CHECK:STDOUT: } {
- // CHECK:STDOUT: %_.param: %ptr.a04 = value_param call_param0
- // CHECK:STDOUT: %_: %ptr.a04 = value_binding _, %_.param
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %Core.Int: %Int.type = import_ref Core//prelude/parts/int, Int, loaded [concrete = constants.%Int.generic]
- // CHECK:STDOUT: %Core.ImplicitAs: %ImplicitAs.type.cc7 = import_ref Core//prelude/parts/as, ImplicitAs, loaded [concrete = constants.%ImplicitAs.generic]
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: file {
- // CHECK:STDOUT: package: <namespace> = namespace [concrete] {
- // CHECK:STDOUT: .Core = imports.%Core
- // CHECK:STDOUT: .Cpp = imports.%Cpp
- // CHECK:STDOUT: .F = %F.decl
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %Core.import = import Core
- // CHECK:STDOUT: %Cpp.import_cpp = import_cpp {
- // CHECK:STDOUT: import Cpp "nested_structs.h"
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [concrete = constants.%F] {} {}
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: class @B {
- // CHECK:STDOUT: %.1: %B.elem.bad = field_decl a, element0 [concrete]
- // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete = constants.%int_32]
- // CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32]
- // CHECK:STDOUT: %.2: %B.elem.c76 = field_decl n, element1 [concrete]
- // CHECK:STDOUT: %.3: type = custom_layout_type {size=12, align=4, .a@0: %A, .n@8: %i32} [concrete = constants.%.e7f]
- // CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %.3 [concrete = constants.%complete_type.b39]
- // CHECK:STDOUT: complete_type_witness = %complete_type
- // CHECK:STDOUT:
- // CHECK:STDOUT: !members:
- // CHECK:STDOUT: import Cpp//...
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: class @A {
- // CHECK:STDOUT: %int_32.1: Core.IntLiteral = int_value 32 [concrete = constants.%int_32]
- // CHECK:STDOUT: %i32.1: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32]
- // CHECK:STDOUT: %.1: %A.elem = field_decl x, element0 [concrete]
- // CHECK:STDOUT: %int_32.2: Core.IntLiteral = int_value 32 [concrete = constants.%int_32]
- // CHECK:STDOUT: %i32.2: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32]
- // CHECK:STDOUT: %.2: %A.elem = field_decl y, element1 [concrete]
- // CHECK:STDOUT: %.3: type = custom_layout_type {size=8, align=4, .x@0: %i32, .y@4: %i32} [concrete = constants.%.7b6]
- // CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %.3 [concrete = constants.%complete_type.1e0]
- // CHECK:STDOUT: complete_type_witness = %complete_type
- // CHECK:STDOUT:
- // CHECK:STDOUT: !members:
- // CHECK:STDOUT: import Cpp//...
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: fn @F() {
- // CHECK:STDOUT: !entry:
- // CHECK:STDOUT: %Cpp.ref: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
- // CHECK:STDOUT: %TakeB.ref: %TakeB.cpp_overload_set.type = name_ref TakeB, imports.%TakeB.cpp_overload_set.value [concrete = constants.%TakeB.cpp_overload_set.value]
- // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1]
- // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [concrete = constants.%int_2]
- // CHECK:STDOUT: %.loc18_34: %struct_type.x.y = struct_literal (%int_1, %int_2) [concrete = constants.%struct.004]
- // CHECK:STDOUT: %int_3: Core.IntLiteral = int_value 3 [concrete = constants.%int_3]
- // CHECK:STDOUT: %.loc18_43.1: %struct_type.a.n.988 = struct_literal (%.loc18_34, %int_3) [concrete = constants.%struct.516]
- // CHECK:STDOUT: %.loc18_43.2: %B = converted %.loc18_43.1, <error> [concrete = <error>]
- // CHECK:STDOUT: %addr: %ptr.a04 = addr_of <error> [concrete = <error>]
- // CHECK:STDOUT: %TakeB__carbon_thunk.call: init %empty_tuple.type = call imports.%TakeB__carbon_thunk.decl(%addr)
- // CHECK:STDOUT: return
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: fn @TakeB(%_.param: %B);
- // CHECK:STDOUT:
- // CHECK:STDOUT: fn @TakeB__carbon_thunk(%_.param: %ptr.a04);
- // CHECK:STDOUT:
- // CHECK:STDOUT: --- fail_import_upsizing_rejected.carbon
- // CHECK:STDOUT:
- // CHECK:STDOUT: constants {
- // CHECK:STDOUT: %F.type: type = fn_type @F [concrete]
- // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete]
- // CHECK:STDOUT: %F: %F.type = struct_value () [concrete]
- // CHECK:STDOUT: %foo.cpp_overload_set.type: type = cpp_overload_set_type @foo.cpp_overload_set [concrete]
- // CHECK:STDOUT: %foo.cpp_overload_set.value: %foo.cpp_overload_set.type = cpp_overload_set_value @foo.cpp_overload_set [concrete]
- // CHECK:STDOUT: %int_1.5b8: Core.IntLiteral = int_value 1 [concrete]
- // CHECK:STDOUT: %int_16: Core.IntLiteral = int_value 16 [concrete]
- // CHECK:STDOUT: %Int.type: type = generic_class_type @Int [concrete]
- // CHECK:STDOUT: %Int.generic: %Int.type = struct_value () [concrete]
- // CHECK:STDOUT: %i16: type = class_type @Int, @Int(%int_16) [concrete]
- // CHECK:STDOUT: %As.type.90f: type = generic_interface_type @As [concrete]
- // CHECK:STDOUT: %As.generic: %As.type.90f = struct_value () [concrete]
- // CHECK:STDOUT: %As.type.359: type = facet_type <@As, @As(%i16)> [concrete]
- // CHECK:STDOUT: %As.Convert.type.be5: type = fn_type @As.Convert, @As(%i16) [concrete]
- // CHECK:STDOUT: %To: Core.IntLiteral = symbolic_binding To, 0 [symbolic]
- // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.type.09e: type = fn_type @Core.IntLiteral.as.As.impl.Convert, @Core.IntLiteral.as.As.impl(%To) [symbolic]
- // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.dbe: %Core.IntLiteral.as.As.impl.Convert.type.09e = struct_value () [symbolic]
- // CHECK:STDOUT: %As.impl_witness.b61: <witness> = impl_witness imports.%As.impl_witness_table.9fc, @Core.IntLiteral.as.As.impl(%int_16) [concrete]
- // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.type.c60: type = fn_type @Core.IntLiteral.as.As.impl.Convert, @Core.IntLiteral.as.As.impl(%int_16) [concrete]
- // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.a42: %Core.IntLiteral.as.As.impl.Convert.type.c60 = struct_value () [concrete]
- // CHECK:STDOUT: %As.facet: %As.type.359 = facet_value Core.IntLiteral, (%As.impl_witness.b61) [concrete]
- // CHECK:STDOUT: %.240: type = fn_type_with_self_type %As.Convert.type.be5, %As.facet [concrete]
- // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.bound: <bound method> = bound_method %int_1.5b8, %Core.IntLiteral.as.As.impl.Convert.a42 [concrete]
- // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.specific_fn: <specific function> = specific_function %Core.IntLiteral.as.As.impl.Convert.a42, @Core.IntLiteral.as.As.impl.Convert(%int_16) [concrete]
- // CHECK:STDOUT: %bound_method: <bound method> = bound_method %int_1.5b8, %Core.IntLiteral.as.As.impl.Convert.specific_fn [concrete]
- // CHECK:STDOUT: %int_1.f90: %i16 = int_value 1 [concrete]
- // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete]
- // CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [concrete]
- // CHECK:STDOUT: %pattern_type.7ce: type = pattern_type %i32 [concrete]
- // CHECK:STDOUT: %foo.type: type = fn_type @foo [concrete]
- // CHECK:STDOUT: %foo: %foo.type = struct_value () [concrete]
- // CHECK:STDOUT: %ImplicitAs.type.cc7: type = generic_interface_type @ImplicitAs [concrete]
- // CHECK:STDOUT: %ImplicitAs.generic: %ImplicitAs.type.cc7 = struct_value () [concrete]
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: imports {
- // CHECK:STDOUT: %Core: <namespace> = namespace file.%Core.import, [concrete] {
- // CHECK:STDOUT: .Int = %Core.Int
- // CHECK:STDOUT: .As = %Core.As
- // CHECK:STDOUT: .ImplicitAs = %Core.ImplicitAs
- // CHECK:STDOUT: import Core//prelude
- // CHECK:STDOUT: import Core//prelude/...
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %Cpp: <namespace> = namespace file.%Cpp.import_cpp, [concrete] {
- // CHECK:STDOUT: .foo = %foo.cpp_overload_set.value
- // CHECK:STDOUT: import Cpp//...
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %foo.cpp_overload_set.value: %foo.cpp_overload_set.type = cpp_overload_set_value @foo.cpp_overload_set [concrete = constants.%foo.cpp_overload_set.value]
- // CHECK:STDOUT: %Core.Int: %Int.type = import_ref Core//prelude/parts/int, Int, loaded [concrete = constants.%Int.generic]
- // CHECK:STDOUT: %Core.As: %As.type.90f = import_ref Core//prelude/parts/as, As, loaded [concrete = constants.%As.generic]
- // CHECK:STDOUT: %Core.import_ref.ca0: @Core.IntLiteral.as.As.impl.%Core.IntLiteral.as.As.impl.Convert.type (%Core.IntLiteral.as.As.impl.Convert.type.09e) = import_ref Core//prelude/parts/int, loc{{\d+_\d+}}, loaded [symbolic = @Core.IntLiteral.as.As.impl.%Core.IntLiteral.as.As.impl.Convert (constants.%Core.IntLiteral.as.As.impl.Convert.dbe)]
- // CHECK:STDOUT: %As.impl_witness_table.9fc = impl_witness_table (%Core.import_ref.ca0), @Core.IntLiteral.as.As.impl [concrete]
- // CHECK:STDOUT: %foo.decl: %foo.type = fn_decl @foo [concrete = constants.%foo] {
- // CHECK:STDOUT: %a.patt: %pattern_type.7ce = value_binding_pattern a [concrete]
- // CHECK:STDOUT: %a.param_patt: %pattern_type.7ce = value_param_pattern %a.patt, call_param0 [concrete]
- // CHECK:STDOUT: } {
- // CHECK:STDOUT: %a.param: %i32 = value_param call_param0
- // CHECK:STDOUT: %.1: type = splice_block %i32 [concrete = constants.%i32] {
- // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete = constants.%int_32]
- // CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32]
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %a: %i32 = value_binding a, %a.param
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %Core.ImplicitAs: %ImplicitAs.type.cc7 = import_ref Core//prelude/parts/as, ImplicitAs, loaded [concrete = constants.%ImplicitAs.generic]
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: file {
- // CHECK:STDOUT: package: <namespace> = namespace [concrete] {
- // CHECK:STDOUT: .Core = imports.%Core
- // CHECK:STDOUT: .Cpp = imports.%Cpp
- // CHECK:STDOUT: .F = %F.decl
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %Core.import = import Core
- // CHECK:STDOUT: %Cpp.import_cpp = import_cpp {
- // CHECK:STDOUT: import Cpp "upsizing_rejected.h"
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [concrete = constants.%F] {} {}
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: fn @F() {
- // CHECK:STDOUT: !entry:
- // CHECK:STDOUT: %Cpp.ref: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
- // CHECK:STDOUT: %foo.ref: %foo.cpp_overload_set.type = name_ref foo, imports.%foo.cpp_overload_set.value [concrete = constants.%foo.cpp_overload_set.value]
- // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8]
- // CHECK:STDOUT: %int_16: Core.IntLiteral = int_value 16 [concrete = constants.%int_16]
- // CHECK:STDOUT: %i16: type = class_type @Int, @Int(constants.%int_16) [concrete = constants.%i16]
- // CHECK:STDOUT: %impl.elem0: %.240 = impl_witness_access constants.%As.impl_witness.b61, element0 [concrete = constants.%Core.IntLiteral.as.As.impl.Convert.a42]
- // CHECK:STDOUT: %bound_method.loc18_13.1: <bound method> = bound_method %int_1, %impl.elem0 [concrete = constants.%Core.IntLiteral.as.As.impl.Convert.bound]
- // CHECK:STDOUT: %specific_fn: <specific function> = specific_function %impl.elem0, @Core.IntLiteral.as.As.impl.Convert(constants.%int_16) [concrete = constants.%Core.IntLiteral.as.As.impl.Convert.specific_fn]
- // CHECK:STDOUT: %bound_method.loc18_13.2: <bound method> = bound_method %int_1, %specific_fn [concrete = constants.%bound_method]
- // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.call: init %i16 = call %bound_method.loc18_13.2(%int_1) [concrete = constants.%int_1.f90]
- // CHECK:STDOUT: %.loc18_13.1: %i16 = value_of_initializer %Core.IntLiteral.as.As.impl.Convert.call [concrete = constants.%int_1.f90]
- // CHECK:STDOUT: %.loc18_13.2: %i16 = converted %int_1, %.loc18_13.1 [concrete = constants.%int_1.f90]
- // CHECK:STDOUT: %.loc18_13.3: %i32 = converted %.loc18_13.2, <error> [concrete = <error>]
- // CHECK:STDOUT: %foo.call: init %empty_tuple.type = call imports.%foo.decl(<error>)
- // CHECK:STDOUT: return
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: fn @foo(%a.param: %i32);
- // CHECK:STDOUT:
- // CHECK:STDOUT: --- fail_import_downsizing_rejected.carbon
- // CHECK:STDOUT:
- // CHECK:STDOUT: constants {
- // CHECK:STDOUT: %F.type: type = fn_type @F [concrete]
- // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete]
- // CHECK:STDOUT: %F: %F.type = struct_value () [concrete]
- // CHECK:STDOUT: %foo.cpp_overload_set.type: type = cpp_overload_set_type @foo.cpp_overload_set [concrete]
- // CHECK:STDOUT: %foo.cpp_overload_set.value: %foo.cpp_overload_set.type = cpp_overload_set_value @foo.cpp_overload_set [concrete]
- // CHECK:STDOUT: %int_1.5b8: Core.IntLiteral = int_value 1 [concrete]
- // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete]
- // CHECK:STDOUT: %Int.type: type = generic_class_type @Int [concrete]
- // CHECK:STDOUT: %Int.generic: %Int.type = struct_value () [concrete]
- // CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [concrete]
- // CHECK:STDOUT: %As.type.90f: type = generic_interface_type @As [concrete]
- // CHECK:STDOUT: %As.generic: %As.type.90f = struct_value () [concrete]
- // CHECK:STDOUT: %As.type.047: type = facet_type <@As, @As(%i32)> [concrete]
- // CHECK:STDOUT: %As.Convert.type.99b: type = fn_type @As.Convert, @As(%i32) [concrete]
- // CHECK:STDOUT: %To: Core.IntLiteral = symbolic_binding To, 0 [symbolic]
- // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.type.09e: type = fn_type @Core.IntLiteral.as.As.impl.Convert, @Core.IntLiteral.as.As.impl(%To) [symbolic]
- // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.dbe: %Core.IntLiteral.as.As.impl.Convert.type.09e = struct_value () [symbolic]
- // CHECK:STDOUT: %As.impl_witness.ab6: <witness> = impl_witness imports.%As.impl_witness_table.9fc, @Core.IntLiteral.as.As.impl(%int_32) [concrete]
- // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.type.8ec: type = fn_type @Core.IntLiteral.as.As.impl.Convert, @Core.IntLiteral.as.As.impl(%int_32) [concrete]
- // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.29b: %Core.IntLiteral.as.As.impl.Convert.type.8ec = struct_value () [concrete]
- // CHECK:STDOUT: %As.facet: %As.type.047 = facet_value Core.IntLiteral, (%As.impl_witness.ab6) [concrete]
- // CHECK:STDOUT: %.97a: type = fn_type_with_self_type %As.Convert.type.99b, %As.facet [concrete]
- // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.bound: <bound method> = bound_method %int_1.5b8, %Core.IntLiteral.as.As.impl.Convert.29b [concrete]
- // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.specific_fn: <specific function> = specific_function %Core.IntLiteral.as.As.impl.Convert.29b, @Core.IntLiteral.as.As.impl.Convert(%int_32) [concrete]
- // CHECK:STDOUT: %bound_method: <bound method> = bound_method %int_1.5b8, %Core.IntLiteral.as.As.impl.Convert.specific_fn [concrete]
- // CHECK:STDOUT: %int_1.5d2: %i32 = int_value 1 [concrete]
- // CHECK:STDOUT: %int_16: Core.IntLiteral = int_value 16 [concrete]
- // CHECK:STDOUT: %i16: type = class_type @Int, @Int(%int_16) [concrete]
- // CHECK:STDOUT: %ptr: type = ptr_type %i16 [concrete]
- // CHECK:STDOUT: %pattern_type.54c: type = pattern_type %ptr [concrete]
- // CHECK:STDOUT: %foo__carbon_thunk.type: type = fn_type @foo__carbon_thunk [concrete]
- // CHECK:STDOUT: %foo__carbon_thunk: %foo__carbon_thunk.type = struct_value () [concrete]
- // CHECK:STDOUT: %ImplicitAs.type.cc7: type = generic_interface_type @ImplicitAs [concrete]
- // CHECK:STDOUT: %ImplicitAs.generic: %ImplicitAs.type.cc7 = struct_value () [concrete]
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: imports {
- // CHECK:STDOUT: %Core: <namespace> = namespace file.%Core.import, [concrete] {
- // CHECK:STDOUT: .Int = %Core.Int
- // CHECK:STDOUT: .As = %Core.As
- // CHECK:STDOUT: .ImplicitAs = %Core.ImplicitAs
- // CHECK:STDOUT: import Core//prelude
- // CHECK:STDOUT: import Core//prelude/...
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %Cpp: <namespace> = namespace file.%Cpp.import_cpp, [concrete] {
- // CHECK:STDOUT: .foo = %foo.cpp_overload_set.value
- // CHECK:STDOUT: import Cpp//...
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %foo.cpp_overload_set.value: %foo.cpp_overload_set.type = cpp_overload_set_value @foo.cpp_overload_set [concrete = constants.%foo.cpp_overload_set.value]
- // CHECK:STDOUT: %Core.Int: %Int.type = import_ref Core//prelude/parts/int, Int, loaded [concrete = constants.%Int.generic]
- // CHECK:STDOUT: %Core.As: %As.type.90f = import_ref Core//prelude/parts/as, As, loaded [concrete = constants.%As.generic]
- // CHECK:STDOUT: %Core.import_ref.ca0: @Core.IntLiteral.as.As.impl.%Core.IntLiteral.as.As.impl.Convert.type (%Core.IntLiteral.as.As.impl.Convert.type.09e) = import_ref Core//prelude/parts/int, loc{{\d+_\d+}}, loaded [symbolic = @Core.IntLiteral.as.As.impl.%Core.IntLiteral.as.As.impl.Convert (constants.%Core.IntLiteral.as.As.impl.Convert.dbe)]
- // CHECK:STDOUT: %As.impl_witness_table.9fc = impl_witness_table (%Core.import_ref.ca0), @Core.IntLiteral.as.As.impl [concrete]
- // CHECK:STDOUT: %foo__carbon_thunk.decl: %foo__carbon_thunk.type = fn_decl @foo__carbon_thunk [concrete = constants.%foo__carbon_thunk] {
- // CHECK:STDOUT: %a.patt: %pattern_type.54c = value_binding_pattern a [concrete]
- // CHECK:STDOUT: %a.param_patt: %pattern_type.54c = value_param_pattern %a.patt, call_param0 [concrete]
- // CHECK:STDOUT: } {
- // CHECK:STDOUT: %a.param: %ptr = value_param call_param0
- // CHECK:STDOUT: %.1: type = splice_block constants.%ptr [concrete = constants.%ptr] {
- // CHECK:STDOUT: %int_16: Core.IntLiteral = int_value 16 [concrete = constants.%int_16]
- // CHECK:STDOUT: %i16: type = class_type @Int, @Int(constants.%int_16) [concrete = constants.%i16]
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %a: %ptr = value_binding a, %a.param
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %Core.ImplicitAs: %ImplicitAs.type.cc7 = import_ref Core//prelude/parts/as, ImplicitAs, loaded [concrete = constants.%ImplicitAs.generic]
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: file {
- // CHECK:STDOUT: package: <namespace> = namespace [concrete] {
- // CHECK:STDOUT: .Core = imports.%Core
- // CHECK:STDOUT: .Cpp = imports.%Cpp
- // CHECK:STDOUT: .F = %F.decl
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %Core.import = import Core
- // CHECK:STDOUT: %Cpp.import_cpp = import_cpp {
- // CHECK:STDOUT: import Cpp "downsizing_rejected.h"
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [concrete = constants.%F] {} {}
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: fn @F() {
- // CHECK:STDOUT: !entry:
- // CHECK:STDOUT: %Cpp.ref: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
- // CHECK:STDOUT: %foo.ref: %foo.cpp_overload_set.type = name_ref foo, imports.%foo.cpp_overload_set.value [concrete = constants.%foo.cpp_overload_set.value]
- // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8]
- // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete = constants.%int_32]
- // CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32]
- // CHECK:STDOUT: %impl.elem0: %.97a = impl_witness_access constants.%As.impl_witness.ab6, element0 [concrete = constants.%Core.IntLiteral.as.As.impl.Convert.29b]
- // CHECK:STDOUT: %bound_method.loc18_13.1: <bound method> = bound_method %int_1, %impl.elem0 [concrete = constants.%Core.IntLiteral.as.As.impl.Convert.bound]
- // CHECK:STDOUT: %specific_fn: <specific function> = specific_function %impl.elem0, @Core.IntLiteral.as.As.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.As.impl.Convert.specific_fn]
- // CHECK:STDOUT: %bound_method.loc18_13.2: <bound method> = bound_method %int_1, %specific_fn [concrete = constants.%bound_method]
- // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.call: init %i32 = call %bound_method.loc18_13.2(%int_1) [concrete = constants.%int_1.5d2]
- // CHECK:STDOUT: %.loc18_13.1: %i32 = value_of_initializer %Core.IntLiteral.as.As.impl.Convert.call [concrete = constants.%int_1.5d2]
- // CHECK:STDOUT: %.loc18_13.2: %i32 = converted %int_1, %.loc18_13.1 [concrete = constants.%int_1.5d2]
- // CHECK:STDOUT: %.loc18_13.3: %i16 = converted %.loc18_13.2, <error> [concrete = <error>]
- // CHECK:STDOUT: %addr: %ptr = addr_of <error> [concrete = <error>]
- // CHECK:STDOUT: %foo__carbon_thunk.call: init %empty_tuple.type = call imports.%foo__carbon_thunk.decl(%addr)
- // CHECK:STDOUT: return
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: fn @foo(%a.param: %i16);
- // CHECK:STDOUT:
- // CHECK:STDOUT: fn @foo__carbon_thunk(%a.param: %ptr);
- // CHECK:STDOUT:
- // CHECK:STDOUT: --- fail_import_no_viable_function.carbon
- // CHECK:STDOUT:
- // CHECK:STDOUT: constants {
- // CHECK:STDOUT: %F.type: type = fn_type @F [concrete]
- // CHECK:STDOUT: %F: %F.type = struct_value () [concrete]
- // CHECK:STDOUT: %foo.cpp_overload_set.type: type = cpp_overload_set_type @foo.cpp_overload_set [concrete]
- // CHECK:STDOUT: %foo.cpp_overload_set.value: %foo.cpp_overload_set.type = cpp_overload_set_value @foo.cpp_overload_set [concrete]
- // CHECK:STDOUT: %int_1.5b8: Core.IntLiteral = int_value 1 [concrete]
- // CHECK:STDOUT: %int_64: Core.IntLiteral = int_value 64 [concrete]
- // CHECK:STDOUT: %Int.type: type = generic_class_type @Int [concrete]
- // CHECK:STDOUT: %Int.generic: %Int.type = struct_value () [concrete]
- // CHECK:STDOUT: %i64: type = class_type @Int, @Int(%int_64) [concrete]
- // CHECK:STDOUT: %As.type.90f: type = generic_interface_type @As [concrete]
- // CHECK:STDOUT: %As.generic: %As.type.90f = struct_value () [concrete]
- // CHECK:STDOUT: %As.type.229: type = facet_type <@As, @As(%i64)> [concrete]
- // CHECK:STDOUT: %As.Convert.type.d57: type = fn_type @As.Convert, @As(%i64) [concrete]
- // CHECK:STDOUT: %To: Core.IntLiteral = symbolic_binding To, 0 [symbolic]
- // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.type.09e: type = fn_type @Core.IntLiteral.as.As.impl.Convert, @Core.IntLiteral.as.As.impl(%To) [symbolic]
- // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.dbe: %Core.IntLiteral.as.As.impl.Convert.type.09e = struct_value () [symbolic]
- // CHECK:STDOUT: %As.impl_witness.c71: <witness> = impl_witness imports.%As.impl_witness_table.9fc, @Core.IntLiteral.as.As.impl(%int_64) [concrete]
- // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.type.cee: type = fn_type @Core.IntLiteral.as.As.impl.Convert, @Core.IntLiteral.as.As.impl(%int_64) [concrete]
- // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.a54: %Core.IntLiteral.as.As.impl.Convert.type.cee = struct_value () [concrete]
- // CHECK:STDOUT: %As.facet: %As.type.229 = facet_value Core.IntLiteral, (%As.impl_witness.c71) [concrete]
- // CHECK:STDOUT: %.aba: type = fn_type_with_self_type %As.Convert.type.d57, %As.facet [concrete]
- // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.bound: <bound method> = bound_method %int_1.5b8, %Core.IntLiteral.as.As.impl.Convert.a54 [concrete]
- // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.specific_fn: <specific function> = specific_function %Core.IntLiteral.as.As.impl.Convert.a54, @Core.IntLiteral.as.As.impl.Convert(%int_64) [concrete]
- // CHECK:STDOUT: %bound_method: <bound method> = bound_method %int_1.5b8, %Core.IntLiteral.as.As.impl.Convert.specific_fn [concrete]
- // CHECK:STDOUT: %int_1.41a: %i64 = int_value 1 [concrete]
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: imports {
- // CHECK:STDOUT: %Core: <namespace> = namespace file.%Core.import, [concrete] {
- // CHECK:STDOUT: .Int = %Core.Int
- // CHECK:STDOUT: .As = %Core.As
- // CHECK:STDOUT: import Core//prelude
- // CHECK:STDOUT: import Core//prelude/...
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %Cpp: <namespace> = namespace file.%Cpp.import_cpp, [concrete] {
- // CHECK:STDOUT: .foo = %foo.cpp_overload_set.value
- // CHECK:STDOUT: import Cpp//...
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %foo.cpp_overload_set.value: %foo.cpp_overload_set.type = cpp_overload_set_value @foo.cpp_overload_set [concrete = constants.%foo.cpp_overload_set.value]
- // CHECK:STDOUT: %Core.Int: %Int.type = import_ref Core//prelude/parts/int, Int, loaded [concrete = constants.%Int.generic]
- // CHECK:STDOUT: %Core.As: %As.type.90f = import_ref Core//prelude/parts/as, As, loaded [concrete = constants.%As.generic]
- // CHECK:STDOUT: %Core.import_ref.ca0: @Core.IntLiteral.as.As.impl.%Core.IntLiteral.as.As.impl.Convert.type (%Core.IntLiteral.as.As.impl.Convert.type.09e) = import_ref Core//prelude/parts/int, loc{{\d+_\d+}}, loaded [symbolic = @Core.IntLiteral.as.As.impl.%Core.IntLiteral.as.As.impl.Convert (constants.%Core.IntLiteral.as.As.impl.Convert.dbe)]
- // CHECK:STDOUT: %As.impl_witness_table.9fc = impl_witness_table (%Core.import_ref.ca0), @Core.IntLiteral.as.As.impl [concrete]
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: file {
- // CHECK:STDOUT: package: <namespace> = namespace [concrete] {
- // CHECK:STDOUT: .Core = imports.%Core
- // CHECK:STDOUT: .Cpp = imports.%Cpp
- // CHECK:STDOUT: .F = %F.decl
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %Core.import = import Core
- // CHECK:STDOUT: %Cpp.import_cpp = import_cpp {
- // CHECK:STDOUT: import Cpp "no_viable_function.h"
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [concrete = constants.%F] {} {}
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: fn @F() {
- // CHECK:STDOUT: !entry:
- // CHECK:STDOUT: %Cpp.ref: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
- // CHECK:STDOUT: %foo.ref: %foo.cpp_overload_set.type = name_ref foo, imports.%foo.cpp_overload_set.value [concrete = constants.%foo.cpp_overload_set.value]
- // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8]
- // CHECK:STDOUT: %int_64: Core.IntLiteral = int_value 64 [concrete = constants.%int_64]
- // CHECK:STDOUT: %i64: type = class_type @Int, @Int(constants.%int_64) [concrete = constants.%i64]
- // CHECK:STDOUT: %impl.elem0: %.aba = impl_witness_access constants.%As.impl_witness.c71, element0 [concrete = constants.%Core.IntLiteral.as.As.impl.Convert.a54]
- // CHECK:STDOUT: %bound_method.loc15_13.1: <bound method> = bound_method %int_1, %impl.elem0 [concrete = constants.%Core.IntLiteral.as.As.impl.Convert.bound]
- // CHECK:STDOUT: %specific_fn: <specific function> = specific_function %impl.elem0, @Core.IntLiteral.as.As.impl.Convert(constants.%int_64) [concrete = constants.%Core.IntLiteral.as.As.impl.Convert.specific_fn]
- // CHECK:STDOUT: %bound_method.loc15_13.2: <bound method> = bound_method %int_1, %specific_fn [concrete = constants.%bound_method]
- // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.call: init %i64 = call %bound_method.loc15_13.2(%int_1) [concrete = constants.%int_1.41a]
- // CHECK:STDOUT: %.loc15_13.1: %i64 = value_of_initializer %Core.IntLiteral.as.As.impl.Convert.call [concrete = constants.%int_1.41a]
- // CHECK:STDOUT: %.loc15_13.2: %i64 = converted %int_1, %.loc15_13.1 [concrete = constants.%int_1.41a]
- // CHECK:STDOUT: return
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: --- fail_import_ambiguous_overload.carbon
- // CHECK:STDOUT:
- // CHECK:STDOUT: constants {
- // CHECK:STDOUT: %F.type: type = fn_type @F [concrete]
- // CHECK:STDOUT: %F: %F.type = struct_value () [concrete]
- // CHECK:STDOUT: %foo.cpp_overload_set.type: type = cpp_overload_set_type @foo.cpp_overload_set [concrete]
- // CHECK:STDOUT: %foo.cpp_overload_set.value: %foo.cpp_overload_set.type = cpp_overload_set_value @foo.cpp_overload_set [concrete]
- // CHECK:STDOUT: %int_1.5b8: Core.IntLiteral = int_value 1 [concrete]
- // CHECK:STDOUT: %int_64: Core.IntLiteral = int_value 64 [concrete]
- // CHECK:STDOUT: %Int.type: type = generic_class_type @Int [concrete]
- // CHECK:STDOUT: %Int.generic: %Int.type = struct_value () [concrete]
- // CHECK:STDOUT: %i64: type = class_type @Int, @Int(%int_64) [concrete]
- // CHECK:STDOUT: %As.type.90f: type = generic_interface_type @As [concrete]
- // CHECK:STDOUT: %As.generic: %As.type.90f = struct_value () [concrete]
- // CHECK:STDOUT: %As.type.229: type = facet_type <@As, @As(%i64)> [concrete]
- // CHECK:STDOUT: %As.Convert.type.d57: type = fn_type @As.Convert, @As(%i64) [concrete]
- // CHECK:STDOUT: %To: Core.IntLiteral = symbolic_binding To, 0 [symbolic]
- // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.type.09e: type = fn_type @Core.IntLiteral.as.As.impl.Convert, @Core.IntLiteral.as.As.impl(%To) [symbolic]
- // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.dbe: %Core.IntLiteral.as.As.impl.Convert.type.09e = struct_value () [symbolic]
- // CHECK:STDOUT: %As.impl_witness.c71: <witness> = impl_witness imports.%As.impl_witness_table.9fc, @Core.IntLiteral.as.As.impl(%int_64) [concrete]
- // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.type.cee: type = fn_type @Core.IntLiteral.as.As.impl.Convert, @Core.IntLiteral.as.As.impl(%int_64) [concrete]
- // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.a54: %Core.IntLiteral.as.As.impl.Convert.type.cee = struct_value () [concrete]
- // CHECK:STDOUT: %As.facet: %As.type.229 = facet_value Core.IntLiteral, (%As.impl_witness.c71) [concrete]
- // CHECK:STDOUT: %.aba: type = fn_type_with_self_type %As.Convert.type.d57, %As.facet [concrete]
- // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.bound: <bound method> = bound_method %int_1.5b8, %Core.IntLiteral.as.As.impl.Convert.a54 [concrete]
- // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.specific_fn: <specific function> = specific_function %Core.IntLiteral.as.As.impl.Convert.a54, @Core.IntLiteral.as.As.impl.Convert(%int_64) [concrete]
- // CHECK:STDOUT: %bound_method: <bound method> = bound_method %int_1.5b8, %Core.IntLiteral.as.As.impl.Convert.specific_fn [concrete]
- // CHECK:STDOUT: %int_1.41a: %i64 = int_value 1 [concrete]
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: imports {
- // CHECK:STDOUT: %Core: <namespace> = namespace file.%Core.import, [concrete] {
- // CHECK:STDOUT: .Int = %Core.Int
- // CHECK:STDOUT: .As = %Core.As
- // CHECK:STDOUT: import Core//prelude
- // CHECK:STDOUT: import Core//prelude/...
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %Cpp: <namespace> = namespace file.%Cpp.import_cpp, [concrete] {
- // CHECK:STDOUT: .foo = %foo.cpp_overload_set.value
- // CHECK:STDOUT: import Cpp//...
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %foo.cpp_overload_set.value: %foo.cpp_overload_set.type = cpp_overload_set_value @foo.cpp_overload_set [concrete = constants.%foo.cpp_overload_set.value]
- // CHECK:STDOUT: %Core.Int: %Int.type = import_ref Core//prelude/parts/int, Int, loaded [concrete = constants.%Int.generic]
- // CHECK:STDOUT: %Core.As: %As.type.90f = import_ref Core//prelude/parts/as, As, loaded [concrete = constants.%As.generic]
- // CHECK:STDOUT: %Core.import_ref.ca0: @Core.IntLiteral.as.As.impl.%Core.IntLiteral.as.As.impl.Convert.type (%Core.IntLiteral.as.As.impl.Convert.type.09e) = import_ref Core//prelude/parts/int, loc{{\d+_\d+}}, loaded [symbolic = @Core.IntLiteral.as.As.impl.%Core.IntLiteral.as.As.impl.Convert (constants.%Core.IntLiteral.as.As.impl.Convert.dbe)]
- // CHECK:STDOUT: %As.impl_witness_table.9fc = impl_witness_table (%Core.import_ref.ca0), @Core.IntLiteral.as.As.impl [concrete]
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: file {
- // CHECK:STDOUT: package: <namespace> = namespace [concrete] {
- // CHECK:STDOUT: .Core = imports.%Core
- // CHECK:STDOUT: .Cpp = imports.%Cpp
- // CHECK:STDOUT: .F = %F.decl
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %Core.import = import Core
- // CHECK:STDOUT: %Cpp.import_cpp = import_cpp {
- // CHECK:STDOUT: import Cpp "ambiguous_overload.h"
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [concrete = constants.%F] {} {}
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: fn @F() {
- // CHECK:STDOUT: !entry:
- // CHECK:STDOUT: %Cpp.ref: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
- // CHECK:STDOUT: %foo.ref: %foo.cpp_overload_set.type = name_ref foo, imports.%foo.cpp_overload_set.value [concrete = constants.%foo.cpp_overload_set.value]
- // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8]
- // CHECK:STDOUT: %int_64: Core.IntLiteral = int_value 64 [concrete = constants.%int_64]
- // CHECK:STDOUT: %i64: type = class_type @Int, @Int(constants.%int_64) [concrete = constants.%i64]
- // CHECK:STDOUT: %impl.elem0: %.aba = impl_witness_access constants.%As.impl_witness.c71, element0 [concrete = constants.%Core.IntLiteral.as.As.impl.Convert.a54]
- // CHECK:STDOUT: %bound_method.loc19_13.1: <bound method> = bound_method %int_1, %impl.elem0 [concrete = constants.%Core.IntLiteral.as.As.impl.Convert.bound]
- // CHECK:STDOUT: %specific_fn: <specific function> = specific_function %impl.elem0, @Core.IntLiteral.as.As.impl.Convert(constants.%int_64) [concrete = constants.%Core.IntLiteral.as.As.impl.Convert.specific_fn]
- // CHECK:STDOUT: %bound_method.loc19_13.2: <bound method> = bound_method %int_1, %specific_fn [concrete = constants.%bound_method]
- // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.call: init %i64 = call %bound_method.loc19_13.2(%int_1) [concrete = constants.%int_1.41a]
- // CHECK:STDOUT: %.loc19_13.1: %i64 = value_of_initializer %Core.IntLiteral.as.As.impl.Convert.call [concrete = constants.%int_1.41a]
- // CHECK:STDOUT: %.loc19_13.2: %i64 = converted %int_1, %.loc19_13.1 [concrete = constants.%int_1.41a]
- // CHECK:STDOUT: return
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: --- fail_import_deleted_function.carbon
- // CHECK:STDOUT:
- // CHECK:STDOUT: constants {
- // CHECK:STDOUT: %F.type: type = fn_type @F [concrete]
- // CHECK:STDOUT: %F: %F.type = struct_value () [concrete]
- // CHECK:STDOUT: %foo.cpp_overload_set.type: type = cpp_overload_set_type @foo.cpp_overload_set [concrete]
- // CHECK:STDOUT: %foo.cpp_overload_set.value: %foo.cpp_overload_set.type = cpp_overload_set_value @foo.cpp_overload_set [concrete]
- // CHECK:STDOUT: %int_1.5b8: Core.IntLiteral = int_value 1 [concrete]
- // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete]
- // CHECK:STDOUT: %Int.type: type = generic_class_type @Int [concrete]
- // CHECK:STDOUT: %Int.generic: %Int.type = struct_value () [concrete]
- // CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [concrete]
- // CHECK:STDOUT: %As.type.90f: type = generic_interface_type @As [concrete]
- // CHECK:STDOUT: %As.generic: %As.type.90f = struct_value () [concrete]
- // CHECK:STDOUT: %As.type.047: type = facet_type <@As, @As(%i32)> [concrete]
- // CHECK:STDOUT: %As.Convert.type.99b: type = fn_type @As.Convert, @As(%i32) [concrete]
- // CHECK:STDOUT: %To: Core.IntLiteral = symbolic_binding To, 0 [symbolic]
- // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.type.09e: type = fn_type @Core.IntLiteral.as.As.impl.Convert, @Core.IntLiteral.as.As.impl(%To) [symbolic]
- // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.dbe: %Core.IntLiteral.as.As.impl.Convert.type.09e = struct_value () [symbolic]
- // CHECK:STDOUT: %As.impl_witness.ab6: <witness> = impl_witness imports.%As.impl_witness_table.9fc, @Core.IntLiteral.as.As.impl(%int_32) [concrete]
- // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.type.8ec: type = fn_type @Core.IntLiteral.as.As.impl.Convert, @Core.IntLiteral.as.As.impl(%int_32) [concrete]
- // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.29b: %Core.IntLiteral.as.As.impl.Convert.type.8ec = struct_value () [concrete]
- // CHECK:STDOUT: %As.facet: %As.type.047 = facet_value Core.IntLiteral, (%As.impl_witness.ab6) [concrete]
- // CHECK:STDOUT: %.97a: type = fn_type_with_self_type %As.Convert.type.99b, %As.facet [concrete]
- // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.bound: <bound method> = bound_method %int_1.5b8, %Core.IntLiteral.as.As.impl.Convert.29b [concrete]
- // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.specific_fn: <specific function> = specific_function %Core.IntLiteral.as.As.impl.Convert.29b, @Core.IntLiteral.as.As.impl.Convert(%int_32) [concrete]
- // CHECK:STDOUT: %bound_method: <bound method> = bound_method %int_1.5b8, %Core.IntLiteral.as.As.impl.Convert.specific_fn [concrete]
- // CHECK:STDOUT: %int_1.5d2: %i32 = int_value 1 [concrete]
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: imports {
- // CHECK:STDOUT: %Core: <namespace> = namespace file.%Core.import, [concrete] {
- // CHECK:STDOUT: .Int = %Core.Int
- // CHECK:STDOUT: .As = %Core.As
- // CHECK:STDOUT: import Core//prelude
- // CHECK:STDOUT: import Core//prelude/...
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %Cpp: <namespace> = namespace file.%Cpp.import_cpp, [concrete] {
- // CHECK:STDOUT: .foo = %foo.cpp_overload_set.value
- // CHECK:STDOUT: import Cpp//...
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %foo.cpp_overload_set.value: %foo.cpp_overload_set.type = cpp_overload_set_value @foo.cpp_overload_set [concrete = constants.%foo.cpp_overload_set.value]
- // CHECK:STDOUT: %Core.Int: %Int.type = import_ref Core//prelude/parts/int, Int, loaded [concrete = constants.%Int.generic]
- // CHECK:STDOUT: %Core.As: %As.type.90f = import_ref Core//prelude/parts/as, As, loaded [concrete = constants.%As.generic]
- // CHECK:STDOUT: %Core.import_ref.ca0: @Core.IntLiteral.as.As.impl.%Core.IntLiteral.as.As.impl.Convert.type (%Core.IntLiteral.as.As.impl.Convert.type.09e) = import_ref Core//prelude/parts/int, loc{{\d+_\d+}}, loaded [symbolic = @Core.IntLiteral.as.As.impl.%Core.IntLiteral.as.As.impl.Convert (constants.%Core.IntLiteral.as.As.impl.Convert.dbe)]
- // CHECK:STDOUT: %As.impl_witness_table.9fc = impl_witness_table (%Core.import_ref.ca0), @Core.IntLiteral.as.As.impl [concrete]
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: file {
- // CHECK:STDOUT: package: <namespace> = namespace [concrete] {
- // CHECK:STDOUT: .Core = imports.%Core
- // CHECK:STDOUT: .Cpp = imports.%Cpp
- // CHECK:STDOUT: .F = %F.decl
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %Core.import = import Core
- // CHECK:STDOUT: %Cpp.import_cpp = import_cpp {
- // CHECK:STDOUT: import Cpp "deleted_function.h"
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [concrete = constants.%F] {} {}
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: fn @F() {
- // CHECK:STDOUT: !entry:
- // CHECK:STDOUT: %Cpp.ref: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
- // CHECK:STDOUT: %foo.ref: %foo.cpp_overload_set.type = name_ref foo, imports.%foo.cpp_overload_set.value [concrete = constants.%foo.cpp_overload_set.value]
- // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8]
- // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete = constants.%int_32]
- // CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32]
- // CHECK:STDOUT: %impl.elem0: %.97a = impl_witness_access constants.%As.impl_witness.ab6, element0 [concrete = constants.%Core.IntLiteral.as.As.impl.Convert.29b]
- // CHECK:STDOUT: %bound_method.loc19_13.1: <bound method> = bound_method %int_1, %impl.elem0 [concrete = constants.%Core.IntLiteral.as.As.impl.Convert.bound]
- // CHECK:STDOUT: %specific_fn: <specific function> = specific_function %impl.elem0, @Core.IntLiteral.as.As.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.As.impl.Convert.specific_fn]
- // CHECK:STDOUT: %bound_method.loc19_13.2: <bound method> = bound_method %int_1, %specific_fn [concrete = constants.%bound_method]
- // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.call: init %i32 = call %bound_method.loc19_13.2(%int_1) [concrete = constants.%int_1.5d2]
- // CHECK:STDOUT: %.loc19_13.1: %i32 = value_of_initializer %Core.IntLiteral.as.As.impl.Convert.call [concrete = constants.%int_1.5d2]
- // CHECK:STDOUT: %.loc19_13.2: %i32 = converted %int_1, %.loc19_13.1 [concrete = constants.%int_1.5d2]
- // CHECK:STDOUT: return
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: --- fail_missing_impl.carbon
- // CHECK:STDOUT:
- // CHECK:STDOUT: constants {
- // CHECK:STDOUT: %I.type: type = facet_type <@I> [concrete]
- // CHECK:STDOUT: %Self: %I.type = symbolic_binding Self, 0 [symbolic]
- // CHECK:STDOUT: %type: type = facet_type <type> [concrete]
- // CHECK:STDOUT: %.Self: %type = symbolic_binding .Self [symbolic_self]
- // CHECK:STDOUT: %ValueT: %I.type = symbolic_binding ValueT, 0 [symbolic]
- // CHECK:STDOUT: %pattern_type.9d9: type = pattern_type %I.type [concrete]
- // CHECK:STDOUT: %ValueT.binding.as_type: type = symbolic_binding_type ValueT, 0, %ValueT [symbolic]
- // CHECK:STDOUT: %value: %ValueT.binding.as_type = symbolic_binding value, 1 [symbolic]
- // CHECK:STDOUT: %pattern_type.422: type = pattern_type %ValueT.binding.as_type [symbolic]
- // CHECK:STDOUT: %EchoValue.type: type = fn_type @EchoValue [concrete]
- // CHECK:STDOUT: %EchoValue: %EchoValue.type = struct_value () [concrete]
- // CHECK:STDOUT: %F.type: type = fn_type @F [concrete]
- // CHECK:STDOUT: %F: %F.type = struct_value () [concrete]
- // CHECK:STDOUT: %foo.cpp_overload_set.type: type = cpp_overload_set_type @foo.cpp_overload_set [concrete]
- // CHECK:STDOUT: %foo.cpp_overload_set.value: %foo.cpp_overload_set.type = cpp_overload_set_value @foo.cpp_overload_set [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: %Cpp: <namespace> = namespace file.%Cpp.import_cpp, [concrete] {
- // CHECK:STDOUT: .foo = %foo.cpp_overload_set.value
- // CHECK:STDOUT: import Cpp//...
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %foo.cpp_overload_set.value: %foo.cpp_overload_set.type = cpp_overload_set_value @foo.cpp_overload_set [concrete = constants.%foo.cpp_overload_set.value]
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: file {
- // CHECK:STDOUT: package: <namespace> = namespace [concrete] {
- // CHECK:STDOUT: .Core = imports.%Core
- // CHECK:STDOUT: .Cpp = imports.%Cpp
- // CHECK:STDOUT: .I = %I.decl
- // CHECK:STDOUT: .EchoValue = %EchoValue.decl
- // CHECK:STDOUT: .F = %F.decl
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %Core.import = import Core
- // CHECK:STDOUT: %Cpp.import_cpp = import_cpp {
- // CHECK:STDOUT: import Cpp inline
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %I.decl: type = interface_decl @I [concrete = constants.%I.type] {} {}
- // CHECK:STDOUT: %EchoValue.decl: %EchoValue.type = fn_decl @EchoValue [concrete = constants.%EchoValue] {
- // CHECK:STDOUT: %ValueT.patt: %pattern_type.9d9 = symbolic_binding_pattern ValueT, 0 [concrete]
- // CHECK:STDOUT: %value.patt: @EchoValue.%pattern_type (%pattern_type.422) = symbolic_binding_pattern value, 1 [concrete]
- // CHECK:STDOUT: } {
- // CHECK:STDOUT: %.loc10_23: type = splice_block %I.ref [concrete = constants.%I.type] {
- // CHECK:STDOUT: %.Self.2: %type = symbolic_binding .Self [symbolic_self = constants.%.Self]
- // CHECK:STDOUT: %I.ref: type = name_ref I, file.%I.decl [concrete = constants.%I.type]
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %ValueT.loc10_14.2: %I.type = symbolic_binding ValueT, 0 [symbolic = %ValueT.loc10_14.1 (constants.%ValueT)]
- // CHECK:STDOUT: %.loc10_34.1: type = splice_block %.loc10_34.2 [symbolic = %ValueT.binding.as_type (constants.%ValueT.binding.as_type)] {
- // CHECK:STDOUT: %.Self.1: %type = symbolic_binding .Self [symbolic_self = constants.%.Self]
- // CHECK:STDOUT: %ValueT.ref: %I.type = name_ref ValueT, %ValueT.loc10_14.2 [symbolic = %ValueT.loc10_14.1 (constants.%ValueT)]
- // CHECK:STDOUT: %ValueT.as_type: type = facet_access_type %ValueT.ref [symbolic = %ValueT.binding.as_type (constants.%ValueT.binding.as_type)]
- // CHECK:STDOUT: %.loc10_34.2: type = converted %ValueT.ref, %ValueT.as_type [symbolic = %ValueT.binding.as_type (constants.%ValueT.binding.as_type)]
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %value.loc10_26.2: @EchoValue.%ValueT.binding.as_type (%ValueT.binding.as_type) = symbolic_binding value, 1 [symbolic = %value.loc10_26.1 (constants.%value)]
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [concrete = constants.%F] {} {}
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: interface @I {
- // CHECK:STDOUT: %Self: %I.type = symbolic_binding Self, 0 [symbolic = constants.%Self]
- // CHECK:STDOUT:
- // CHECK:STDOUT: !members:
- // CHECK:STDOUT: .Self = %Self
- // CHECK:STDOUT: witness = ()
- // CHECK:STDOUT:
- // CHECK:STDOUT: !requires:
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: generic fn @EchoValue(%ValueT.loc10_14.2: %I.type, %value.loc10_26.2: @EchoValue.%ValueT.binding.as_type (%ValueT.binding.as_type)) {
- // CHECK:STDOUT: %ValueT.loc10_14.1: %I.type = symbolic_binding ValueT, 0 [symbolic = %ValueT.loc10_14.1 (constants.%ValueT)]
- // CHECK:STDOUT: %ValueT.binding.as_type: type = symbolic_binding_type ValueT, 0, %ValueT.loc10_14.1 [symbolic = %ValueT.binding.as_type (constants.%ValueT.binding.as_type)]
- // CHECK:STDOUT: %value.loc10_26.1: @EchoValue.%ValueT.binding.as_type (%ValueT.binding.as_type) = symbolic_binding value, 1 [symbolic = %value.loc10_26.1 (constants.%value)]
- // CHECK:STDOUT: %pattern_type: type = pattern_type %ValueT.binding.as_type [symbolic = %pattern_type (constants.%pattern_type.422)]
- // CHECK:STDOUT:
- // CHECK:STDOUT: !definition:
- // CHECK:STDOUT:
- // CHECK:STDOUT: fn() {
- // CHECK:STDOUT: !entry:
- // CHECK:STDOUT: return
- // CHECK:STDOUT: }
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: fn @F() {
- // CHECK:STDOUT: !entry:
- // CHECK:STDOUT: %EchoValue.ref: %EchoValue.type = name_ref EchoValue, file.%EchoValue.decl [concrete = constants.%EchoValue]
- // CHECK:STDOUT: %Cpp.ref: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
- // CHECK:STDOUT: %foo.ref: %foo.cpp_overload_set.type = name_ref foo, imports.%foo.cpp_overload_set.value [concrete = constants.%foo.cpp_overload_set.value]
- // CHECK:STDOUT: return
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: specific @EchoValue(constants.%ValueT, constants.%value) {
- // CHECK:STDOUT: %ValueT.loc10_14.1 => constants.%ValueT
- // CHECK:STDOUT: %ValueT.binding.as_type => constants.%ValueT.binding.as_type
- // CHECK:STDOUT: %value.loc10_26.1 => constants.%value
- // CHECK:STDOUT: %pattern_type => constants.%pattern_type.422
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
|