| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609 |
- // 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
- //
- // AUTOUPDATE
- // TIP: To test this file alone, run:
- // TIP: bazel test //toolchain/testing:file_test --test_arg=--file_tests=toolchain/check/testdata/class/generic/import.carbon
- // TIP: To dump output, run:
- // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/check/testdata/class/generic/import.carbon
- // --- foo.carbon
- library "[[@TEST_NAME]]";
- class Class(T:! type);
- class CompleteClass(T:! type) {
- var n: i32;
- fn F() -> i32 { return 0; }
- }
- fn F() -> CompleteClass(i32);
- // --- foo.impl.carbon
- impl library "[[@TEST_NAME]]";
- class Class(T:! type) {
- var x: T;
- }
- fn F() -> CompleteClass(i32) {
- return {.n = 1};
- }
- // --- use_foo.carbon
- library "[[@TEST_NAME]]";
- import library "foo";
- fn UseMethod() -> i32 {
- var v: CompleteClass(i32) = F();
- return v.F();
- }
- fn UseField() -> i32 {
- var v: CompleteClass(i32) = F();
- return v.n;
- }
- // --- fail_generic_arg_mismatch.carbon
- library "[[@TEST_NAME]]";
- import library "foo";
- fn Use() {
- // TODO: Include the generic arguments in the formatted type name.
- // CHECK:STDERR: fail_generic_arg_mismatch.carbon:[[@LINE+7]]:3: error: cannot implicitly convert from `CompleteClass(i32)` to `CompleteClass(i32*)` [ImplicitAsConversionFailure]
- // CHECK:STDERR: var v: CompleteClass(i32*) = F();
- // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- // CHECK:STDERR: fail_generic_arg_mismatch.carbon:[[@LINE+4]]:3: note: type `CompleteClass(i32)` does not implement interface `ImplicitAs(CompleteClass(i32*))` [MissingImplInMemberAccessNote]
- // CHECK:STDERR: var v: CompleteClass(i32*) = F();
- // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- // CHECK:STDERR:
- var v: CompleteClass(i32*) = F();
- }
- // --- fail_foo.impl.carbon
- impl library "[[@TEST_NAME]]";
- // CHECK:STDERR: fail_foo.impl.carbon:[[@LINE+8]]:13: error: redeclaration differs at parameter 1 [RedeclParamDiffers]
- // CHECK:STDERR: class Class(U:! type) {
- // CHECK:STDERR: ^~~~~~~~
- // CHECK:STDERR: fail_foo.impl.carbon:[[@LINE-5]]:6: in import [InImport]
- // CHECK:STDERR: foo.carbon:4:13: note: previous declaration's corresponding parameter here [RedeclParamPrevious]
- // CHECK:STDERR: class Class(T:! type);
- // CHECK:STDERR: ^~~~~~~~
- // CHECK:STDERR:
- class Class(U:! type) {
- // CHECK:STDERR: fail_foo.impl.carbon:[[@LINE+3]]:10: error: name `T` not found [NameNotFound]
- // CHECK:STDERR: var x: T;
- // CHECK:STDERR: ^
- var x: T;
- }
- // CHECK:STDOUT: --- foo.carbon
- // CHECK:STDOUT:
- // CHECK:STDOUT: constants {
- // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic]
- // CHECK:STDOUT: %T.patt: type = symbolic_binding_pattern T, 0 [symbolic]
- // CHECK:STDOUT: %Class.type: type = generic_class_type @Class [template]
- // CHECK:STDOUT: %Class.generic: %Class.type = struct_value () [template]
- // CHECK:STDOUT: %CompleteClass.type: type = generic_class_type @CompleteClass [template]
- // CHECK:STDOUT: %CompleteClass.generic: %CompleteClass.type = struct_value () [template]
- // CHECK:STDOUT: %CompleteClass.1: type = class_type @CompleteClass, @CompleteClass(%T) [symbolic]
- // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template]
- // CHECK:STDOUT: %Int.type: type = fn_type @Int [template]
- // CHECK:STDOUT: %Int: %Int.type = struct_value () [template]
- // CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template]
- // CHECK:STDOUT: %CompleteClass.elem: type = unbound_element_type %CompleteClass.1, %i32 [symbolic]
- // CHECK:STDOUT: %F.type.1: type = fn_type @F.1, @CompleteClass(%T) [symbolic]
- // CHECK:STDOUT: %F.1: %F.type.1 = struct_value () [symbolic]
- // CHECK:STDOUT: %struct_type.n: type = struct_type {.n: %i32} [template]
- // CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %struct_type.n [template]
- // CHECK:STDOUT: %int_0.1: Core.IntLiteral = int_value 0 [template]
- // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template]
- // CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%int_32) [template]
- // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template]
- // CHECK:STDOUT: %interface.9: <witness> = interface_witness (%Convert.14) [template]
- // CHECK:STDOUT: %Convert.bound: <bound method> = bound_method %int_0.1, %Convert.14 [template]
- // CHECK:STDOUT: %Convert.specific_fn: <specific function> = specific_function %Convert.bound, @Convert.2(%int_32) [template]
- // CHECK:STDOUT: %int_0.2: %i32 = int_value 0 [template]
- // CHECK:STDOUT: %CompleteClass.2: type = class_type @CompleteClass, @CompleteClass(%i32) [template]
- // CHECK:STDOUT: %F.type.2: type = fn_type @F.2 [template]
- // CHECK:STDOUT: %F.2: %F.type.2 = struct_value () [template]
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: imports {
- // CHECK:STDOUT: %Core: <namespace> = namespace file.%Core.import, [template] {
- // CHECK:STDOUT: .Int = %import_ref.1
- // CHECK:STDOUT: .ImplicitAs = %import_ref.2
- // CHECK:STDOUT: import Core//prelude
- // CHECK:STDOUT: import Core//prelude/...
- // CHECK:STDOUT: }
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: file {
- // CHECK:STDOUT: package: <namespace> = namespace [template] {
- // CHECK:STDOUT: .Core = imports.%Core
- // CHECK:STDOUT: .Class = %Class.decl
- // CHECK:STDOUT: .CompleteClass = %CompleteClass.decl
- // CHECK:STDOUT: .F = %F.decl
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %Core.import = import Core
- // CHECK:STDOUT: %Class.decl: %Class.type = class_decl @Class [template = constants.%Class.generic] {
- // CHECK:STDOUT: %T.patt.loc4_13.1: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc4_13.2 (constants.%T.patt)]
- // CHECK:STDOUT: %T.param_patt: type = value_param_pattern %T.patt.loc4_13.1, runtime_param<invalid> [symbolic = %T.patt.loc4_13.2 (constants.%T.patt)]
- // CHECK:STDOUT: } {
- // CHECK:STDOUT: %T.param: type = value_param runtime_param<invalid>
- // CHECK:STDOUT: %T.loc4_13.1: type = bind_symbolic_name T, 0, %T.param [symbolic = %T.loc4_13.2 (constants.%T)]
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %CompleteClass.decl: %CompleteClass.type = class_decl @CompleteClass [template = constants.%CompleteClass.generic] {
- // CHECK:STDOUT: %T.patt.loc6_21.1: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc6_21.2 (constants.%T.patt)]
- // CHECK:STDOUT: %T.param_patt: type = value_param_pattern %T.patt.loc6_21.1, runtime_param<invalid> [symbolic = %T.patt.loc6_21.2 (constants.%T.patt)]
- // CHECK:STDOUT: } {
- // CHECK:STDOUT: %T.param: type = value_param runtime_param<invalid>
- // CHECK:STDOUT: %T.loc6_21.1: type = bind_symbolic_name T, 0, %T.param [symbolic = %T.loc6_21.2 (constants.%T)]
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %F.decl: %F.type.2 = fn_decl @F.2 [template = constants.%F.2] {
- // CHECK:STDOUT: %return.patt: %CompleteClass.2 = return_slot_pattern
- // CHECK:STDOUT: %return.param_patt: %CompleteClass.2 = out_param_pattern %return.patt, runtime_param0
- // CHECK:STDOUT: } {
- // CHECK:STDOUT: %CompleteClass.ref: %CompleteClass.type = name_ref CompleteClass, file.%CompleteClass.decl [template = constants.%CompleteClass.generic]
- // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32]
- // CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32]
- // CHECK:STDOUT: %.loc11_28.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32]
- // CHECK:STDOUT: %.loc11_28.2: type = converted %int.make_type_signed, %.loc11_28.1 [template = constants.%i32]
- // CHECK:STDOUT: %CompleteClass: type = class_type @CompleteClass, @CompleteClass(constants.%i32) [template = constants.%CompleteClass.2]
- // CHECK:STDOUT: %return.param: ref %CompleteClass.2 = out_param runtime_param0
- // CHECK:STDOUT: %return: ref %CompleteClass.2 = return_slot %return.param
- // CHECK:STDOUT: }
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: generic class @Class(%T.loc4_13.1: type) {
- // CHECK:STDOUT: %T.loc4_13.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc4_13.2 (constants.%T)]
- // CHECK:STDOUT: %T.patt.loc4_13.2: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc4_13.2 (constants.%T.patt)]
- // CHECK:STDOUT:
- // CHECK:STDOUT: class;
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: generic class @CompleteClass(%T.loc6_21.1: type) {
- // CHECK:STDOUT: %T.loc6_21.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc6_21.2 (constants.%T)]
- // CHECK:STDOUT: %T.patt.loc6_21.2: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc6_21.2 (constants.%T.patt)]
- // CHECK:STDOUT:
- // CHECK:STDOUT: !definition:
- // CHECK:STDOUT: %CompleteClass: type = class_type @CompleteClass, @CompleteClass(%T.loc6_21.2) [symbolic = %CompleteClass (constants.%CompleteClass.1)]
- // CHECK:STDOUT: %CompleteClass.elem: type = unbound_element_type @CompleteClass.%CompleteClass (%CompleteClass.1), %i32 [symbolic = %CompleteClass.elem (constants.%CompleteClass.elem)]
- // CHECK:STDOUT: %F.type: type = fn_type @F.1, @CompleteClass(%T.loc6_21.2) [symbolic = %F.type (constants.%F.type.1)]
- // CHECK:STDOUT: %F: @CompleteClass.%F.type (%F.type.1) = struct_value () [symbolic = %F (constants.%F.1)]
- // CHECK:STDOUT:
- // CHECK:STDOUT: class {
- // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32]
- // CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32]
- // CHECK:STDOUT: %.loc7_10.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32]
- // CHECK:STDOUT: %.loc7_10.2: type = converted %int.make_type_signed, %.loc7_10.1 [template = constants.%i32]
- // CHECK:STDOUT: %.loc7_8: @CompleteClass.%CompleteClass.elem (%CompleteClass.elem) = field_decl n, element0 [template]
- // CHECK:STDOUT: %F.decl: @CompleteClass.%F.type (%F.type.1) = fn_decl @F.1 [symbolic = @CompleteClass.%F (constants.%F.1)] {
- // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern
- // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param0
- // CHECK:STDOUT: } {
- // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32]
- // CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32]
- // CHECK:STDOUT: %.loc8_13.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32]
- // CHECK:STDOUT: %.loc8_13.2: type = converted %int.make_type_signed, %.loc8_13.1 [template = constants.%i32]
- // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param0
- // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %struct_type.n [template = constants.%complete_type]
- // CHECK:STDOUT:
- // CHECK:STDOUT: !members:
- // CHECK:STDOUT: .Self = constants.%CompleteClass.1
- // CHECK:STDOUT: .n = %.loc7_8
- // CHECK:STDOUT: .F = %F.decl
- // CHECK:STDOUT: complete_type_witness = %complete_type
- // CHECK:STDOUT: }
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: generic fn @F.1(@CompleteClass.%T.loc6_21.1: type) {
- // CHECK:STDOUT: !definition:
- // CHECK:STDOUT:
- // CHECK:STDOUT: fn() -> %i32 {
- // CHECK:STDOUT: !entry:
- // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [template = constants.%int_0.1]
- // CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14]
- // CHECK:STDOUT: %Convert.bound: <bound method> = bound_method %int_0, %impl.elem0 [template = constants.%Convert.bound]
- // CHECK:STDOUT: %Convert.specific_fn: <specific function> = specific_function %Convert.bound, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn]
- // CHECK:STDOUT: %int.convert_checked: init %i32 = call %Convert.specific_fn(%int_0) [template = constants.%int_0.2]
- // CHECK:STDOUT: %.loc8_27.1: %i32 = value_of_initializer %int.convert_checked [template = constants.%int_0.2]
- // CHECK:STDOUT: %.loc8_27.2: %i32 = converted %int_0, %.loc8_27.1 [template = constants.%int_0.2]
- // CHECK:STDOUT: return %.loc8_27.2
- // CHECK:STDOUT: }
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: fn @F.2() -> %CompleteClass.2;
- // CHECK:STDOUT:
- // CHECK:STDOUT: specific @Class(constants.%T) {
- // CHECK:STDOUT: %T.loc4_13.2 => constants.%T
- // CHECK:STDOUT: %T.patt.loc4_13.2 => constants.%T
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: specific @CompleteClass(constants.%T) {
- // CHECK:STDOUT: %T.loc6_21.2 => constants.%T
- // CHECK:STDOUT: %T.patt.loc6_21.2 => constants.%T
- // CHECK:STDOUT:
- // CHECK:STDOUT: !definition:
- // CHECK:STDOUT: %CompleteClass => constants.%CompleteClass.1
- // CHECK:STDOUT: %CompleteClass.elem => constants.%CompleteClass.elem
- // CHECK:STDOUT: %F.type => constants.%F.type.1
- // CHECK:STDOUT: %F => constants.%F.1
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: specific @F.1(constants.%T) {}
- // CHECK:STDOUT:
- // CHECK:STDOUT: specific @CompleteClass(%T.loc6_21.2) {
- // CHECK:STDOUT: %T.loc6_21.2 => constants.%T
- // CHECK:STDOUT: %T.patt.loc6_21.2 => constants.%T
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: specific @CompleteClass(constants.%i32) {
- // CHECK:STDOUT: %T.loc6_21.2 => constants.%i32
- // CHECK:STDOUT: %T.patt.loc6_21.2 => constants.%i32
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: --- foo.impl.carbon
- // CHECK:STDOUT:
- // CHECK:STDOUT: constants {
- // CHECK:STDOUT: %N: Core.IntLiteral = bind_symbolic_name N, 0 [symbolic]
- // CHECK:STDOUT: %iN: type = int_type signed, %N [symbolic]
- // CHECK:STDOUT: %Dest: type = bind_symbolic_name Dest, 0 [symbolic]
- // CHECK:STDOUT: %ImplicitAs.type.2: type = facet_type <@ImplicitAs, @ImplicitAs(%Dest)> [symbolic]
- // CHECK:STDOUT: %Self.1: %ImplicitAs.type.2 = bind_symbolic_name Self, 1 [symbolic]
- // CHECK:STDOUT: %Dest.patt: type = symbolic_binding_pattern Dest, 0 [symbolic]
- // CHECK:STDOUT: %ImplicitAs.type.3: type = facet_type <@ImplicitAs, @ImplicitAs(%iN)> [symbolic]
- // CHECK:STDOUT: %N.patt: Core.IntLiteral = symbolic_binding_pattern N, 0 [symbolic]
- // CHECK:STDOUT: %Convert.type.1: type = fn_type @Convert.1, @ImplicitAs(%Dest) [symbolic]
- // CHECK:STDOUT: %Convert.1: %Convert.type.1 = struct_value () [symbolic]
- // CHECK:STDOUT: %Self.as_type.1: type = facet_access_type %Self.1 [symbolic]
- // CHECK:STDOUT: %Convert.assoc_type.1: type = assoc_entity_type %ImplicitAs.type.2, %Convert.type.1 [symbolic]
- // CHECK:STDOUT: %assoc0.1: %Convert.assoc_type.1 = assoc_entity element0, imports.%import_ref.10 [symbolic]
- // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.2, @impl.1(%N) [symbolic]
- // CHECK:STDOUT: %Convert.2: %Convert.type.2 = struct_value () [symbolic]
- // CHECK:STDOUT: %interface.1: <witness> = interface_witness (%Convert.2) [symbolic]
- // CHECK:STDOUT: %uN: type = int_type unsigned, %N [symbolic]
- // CHECK:STDOUT: %ImplicitAs.type.4: type = facet_type <@ImplicitAs, @ImplicitAs(%uN)> [symbolic]
- // CHECK:STDOUT: %Convert.type.3: type = fn_type @Convert.3, @impl.2(%N) [symbolic]
- // CHECK:STDOUT: %Convert.3: %Convert.type.3 = struct_value () [symbolic]
- // CHECK:STDOUT: %interface.2: <witness> = interface_witness (%Convert.3) [symbolic]
- // CHECK:STDOUT: %ImplicitAs.type.5: type = facet_type <@ImplicitAs, @ImplicitAs(Core.IntLiteral)> [template]
- // CHECK:STDOUT: %Convert.type.4: type = fn_type @Convert.4, @impl.3(%N) [symbolic]
- // CHECK:STDOUT: %Convert.4: %Convert.type.4 = struct_value () [symbolic]
- // CHECK:STDOUT: %interface.3: <witness> = interface_witness (%Convert.4) [symbolic]
- // CHECK:STDOUT: %Convert.type.5: type = fn_type @Convert.1, @ImplicitAs(Core.IntLiteral) [template]
- // CHECK:STDOUT: %Convert.5: %Convert.type.5 = struct_value () [template]
- // CHECK:STDOUT: %Convert.assoc_type.2: type = assoc_entity_type %ImplicitAs.type.5, %Convert.type.5 [template]
- // CHECK:STDOUT: %assoc0.2: %Convert.assoc_type.2 = assoc_entity element0, imports.%import_ref.17 [template]
- // CHECK:STDOUT: %Convert.type.6: type = fn_type @Convert.5, @impl.4(%N) [symbolic]
- // CHECK:STDOUT: %Convert.6: %Convert.type.6 = struct_value () [symbolic]
- // CHECK:STDOUT: %interface.4: <witness> = interface_witness (%Convert.6) [symbolic]
- // CHECK:STDOUT: %As.type.2: type = facet_type <@As, @As(%Dest)> [symbolic]
- // CHECK:STDOUT: %Self.2: %As.type.2 = bind_symbolic_name Self, 1 [symbolic]
- // CHECK:STDOUT: %As.type.3: type = facet_type <@As, @As(%iN)> [symbolic]
- // CHECK:STDOUT: %Convert.type.7: type = fn_type @Convert.6, @As(%Dest) [symbolic]
- // CHECK:STDOUT: %Convert.7: %Convert.type.7 = struct_value () [symbolic]
- // CHECK:STDOUT: %Self.as_type.2: type = facet_access_type %Self.2 [symbolic]
- // CHECK:STDOUT: %Convert.assoc_type.3: type = assoc_entity_type %As.type.2, %Convert.type.7 [symbolic]
- // CHECK:STDOUT: %assoc0.3: %Convert.assoc_type.3 = assoc_entity element0, imports.%import_ref.27 [symbolic]
- // CHECK:STDOUT: %Convert.type.8: type = fn_type @Convert.7, @impl.5(%N) [symbolic]
- // CHECK:STDOUT: %Convert.8: %Convert.type.8 = struct_value () [symbolic]
- // CHECK:STDOUT: %interface.5: <witness> = interface_witness (%Convert.8) [symbolic]
- // CHECK:STDOUT: %As.type.4: type = facet_type <@As, @As(%uN)> [symbolic]
- // CHECK:STDOUT: %Convert.type.9: type = fn_type @Convert.8, @impl.6(%N) [symbolic]
- // CHECK:STDOUT: %Convert.9: %Convert.type.9 = struct_value () [symbolic]
- // CHECK:STDOUT: %interface.6: <witness> = interface_witness (%Convert.9) [symbolic]
- // CHECK:STDOUT: %As.type.5: type = facet_type <@As, @As(Core.IntLiteral)> [template]
- // CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.9, @impl.7(%N) [symbolic]
- // CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [symbolic]
- // CHECK:STDOUT: %interface.7: <witness> = interface_witness (%Convert.10) [symbolic]
- // CHECK:STDOUT: %Convert.type.11: type = fn_type @Convert.6, @As(Core.IntLiteral) [template]
- // CHECK:STDOUT: %Convert.11: %Convert.type.11 = struct_value () [template]
- // CHECK:STDOUT: %Convert.assoc_type.4: type = assoc_entity_type %As.type.5, %Convert.type.11 [template]
- // CHECK:STDOUT: %assoc0.4: %Convert.assoc_type.4 = assoc_entity element0, imports.%import_ref.34 [template]
- // CHECK:STDOUT: %Convert.type.12: type = fn_type @Convert.10, @impl.8(%N) [symbolic]
- // CHECK:STDOUT: %Convert.12: %Convert.type.12 = struct_value () [symbolic]
- // CHECK:STDOUT: %interface.8: <witness> = interface_witness (%Convert.12) [symbolic]
- // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic]
- // CHECK:STDOUT: %T.patt: type = symbolic_binding_pattern T, 0 [symbolic]
- // CHECK:STDOUT: %Class.type: type = generic_class_type @Class [template]
- // CHECK:STDOUT: %Class.generic: %Class.type = struct_value () [template]
- // CHECK:STDOUT: %Class: type = class_type @Class, @Class(%T) [symbolic]
- // CHECK:STDOUT: %Class.elem: type = unbound_element_type %Class, %T [symbolic]
- // CHECK:STDOUT: %struct_type.x: type = struct_type {.x: %T} [symbolic]
- // CHECK:STDOUT: %complete_type.1: <witness> = complete_type_witness %struct_type.x [symbolic]
- // CHECK:STDOUT: %CompleteClass.type: type = generic_class_type @CompleteClass [template]
- // CHECK:STDOUT: %CompleteClass.generic: %CompleteClass.type = struct_value () [template]
- // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template]
- // CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template]
- // CHECK:STDOUT: %struct_type.n.1: type = struct_type {.n: %i32} [template]
- // CHECK:STDOUT: %complete_type.2: <witness> = complete_type_witness %struct_type.n.1 [template]
- // CHECK:STDOUT: %CompleteClass.1: type = class_type @CompleteClass, @CompleteClass(%T) [symbolic]
- // CHECK:STDOUT: %CompleteClass.elem.1: type = unbound_element_type %CompleteClass.1, %i32 [symbolic]
- // CHECK:STDOUT: %F.type.1: type = fn_type @F.1, @CompleteClass(%T) [symbolic]
- // CHECK:STDOUT: %F.1: %F.type.1 = struct_value () [symbolic]
- // CHECK:STDOUT: %Int.type: type = fn_type @Int [template]
- // CHECK:STDOUT: %Int: %Int.type = struct_value () [template]
- // CHECK:STDOUT: %CompleteClass.2: type = class_type @CompleteClass, @CompleteClass(%i32) [template]
- // CHECK:STDOUT: %F.type.2: type = fn_type @F.2 [template]
- // CHECK:STDOUT: %F.2: %F.type.2 = struct_value () [template]
- // CHECK:STDOUT: %CompleteClass.elem.2: type = unbound_element_type %CompleteClass.2, %i32 [template]
- // CHECK:STDOUT: %F.type.3: type = fn_type @F.1, @CompleteClass(%i32) [template]
- // CHECK:STDOUT: %F.3: %F.type.3 = struct_value () [template]
- // CHECK:STDOUT: %int_1.1: Core.IntLiteral = int_value 1 [template]
- // CHECK:STDOUT: %struct_type.n.2: type = struct_type {.n: Core.IntLiteral} [template]
- // CHECK:STDOUT: %ImplicitAs.type.6: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [template]
- // CHECK:STDOUT: %Convert.type.13: type = fn_type @Convert.1, @ImplicitAs(%i32) [template]
- // CHECK:STDOUT: %Convert.13: %Convert.type.13 = struct_value () [template]
- // CHECK:STDOUT: %Convert.assoc_type.5: type = assoc_entity_type %ImplicitAs.type.6, %Convert.type.13 [template]
- // CHECK:STDOUT: %assoc0.5: %Convert.assoc_type.5 = assoc_entity element0, imports.%import_ref.10 [template]
- // CHECK:STDOUT: %assoc0.6: %Convert.assoc_type.1 = assoc_entity element0, imports.%import_ref.44 [symbolic]
- // CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%int_32) [template]
- // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template]
- // CHECK:STDOUT: %interface.9: <witness> = interface_witness (%Convert.14) [template]
- // CHECK:STDOUT: %Convert.bound: <bound method> = bound_method %int_1.1, %Convert.14 [template]
- // CHECK:STDOUT: %Convert.specific_fn: <specific function> = specific_function %Convert.bound, @Convert.2(%int_32) [template]
- // CHECK:STDOUT: %int_1.2: %i32 = int_value 1 [template]
- // CHECK:STDOUT: %CompleteClass.val: %CompleteClass.2 = struct_value (%int_1.2) [template]
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: imports {
- // CHECK:STDOUT: %import_ref.2: %CompleteClass.type = import_ref Main//foo, inst+20, loaded [template = constants.%CompleteClass.generic]
- // CHECK:STDOUT: %Core: <namespace> = namespace file.%Core.import, [template] {
- // CHECK:STDOUT: .Int = %import_ref.42
- // CHECK:STDOUT: .ImplicitAs = %import_ref.43
- // CHECK:STDOUT: import Core//prelude
- // CHECK:STDOUT: import Core//prelude/...
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %import_ref.4 = import_ref Main//foo, inst+72, unloaded
- // CHECK:STDOUT: %import_ref.5: @ImplicitAs.%Convert.assoc_type (%Convert.assoc_type.1) = import_ref Main//foo, inst+73, loaded [symbolic = @ImplicitAs.%assoc0 (constants.%assoc0.6)]
- // CHECK:STDOUT: %import_ref.6 = import_ref Main//foo, inst+74, unloaded
- // CHECK:STDOUT: %import_ref.7: type = import_ref Main//foo, inst+112, loaded [template = Core.IntLiteral]
- // CHECK:STDOUT: %import_ref.8: type = import_ref Main//foo, inst+113, loaded [symbolic = @impl.1.%ImplicitAs.type (constants.%ImplicitAs.type.3)]
- // CHECK:STDOUT: %import_ref.9: <witness> = import_ref Main//foo, inst+114, loaded [symbolic = @impl.1.%interface (constants.%interface.1)]
- // CHECK:STDOUT: %import_ref.10 = import_ref Main//foo, inst+86, unloaded
- // CHECK:STDOUT: %import_ref.11: type = import_ref Main//foo, inst+137, loaded [template = Core.IntLiteral]
- // CHECK:STDOUT: %import_ref.12: type = import_ref Main//foo, inst+138, loaded [symbolic = @impl.2.%ImplicitAs.type (constants.%ImplicitAs.type.4)]
- // CHECK:STDOUT: %import_ref.13 = import_ref Main//foo, inst+139, unloaded
- // CHECK:STDOUT: %import_ref.14: type = import_ref Main//foo, inst+161, loaded [symbolic = @impl.3.%iN (constants.%iN)]
- // CHECK:STDOUT: %import_ref.15: type = import_ref Main//foo, inst+162, loaded [template = constants.%ImplicitAs.type.5]
- // CHECK:STDOUT: %import_ref.16 = import_ref Main//foo, inst+163, unloaded
- // CHECK:STDOUT: %import_ref.18: type = import_ref Main//foo, inst+188, loaded [symbolic = @impl.4.%uN (constants.%uN)]
- // CHECK:STDOUT: %import_ref.19: type = import_ref Main//foo, inst+189, loaded [template = constants.%ImplicitAs.type.5]
- // CHECK:STDOUT: %import_ref.20 = import_ref Main//foo, inst+190, unloaded
- // CHECK:STDOUT: %import_ref.21 = import_ref Main//foo, inst+215, unloaded
- // CHECK:STDOUT: %import_ref.22 = import_ref Main//foo, inst+216, unloaded
- // CHECK:STDOUT: %import_ref.23 = import_ref Main//foo, inst+217, unloaded
- // CHECK:STDOUT: %import_ref.24: type = import_ref Main//foo, inst+221, loaded [template = Core.IntLiteral]
- // CHECK:STDOUT: %import_ref.25: type = import_ref Main//foo, inst+222, loaded [symbolic = @impl.5.%As.type (constants.%As.type.3)]
- // CHECK:STDOUT: %import_ref.26 = import_ref Main//foo, inst+223, unloaded
- // CHECK:STDOUT: %import_ref.27 = import_ref Main//foo, inst+235, unloaded
- // CHECK:STDOUT: %import_ref.28: type = import_ref Main//foo, inst+268, loaded [template = Core.IntLiteral]
- // CHECK:STDOUT: %import_ref.29: type = import_ref Main//foo, inst+269, loaded [symbolic = @impl.6.%As.type (constants.%As.type.4)]
- // CHECK:STDOUT: %import_ref.30 = import_ref Main//foo, inst+270, unloaded
- // CHECK:STDOUT: %import_ref.31: type = import_ref Main//foo, inst+292, loaded [symbolic = @impl.7.%iN (constants.%iN)]
- // CHECK:STDOUT: %import_ref.32: type = import_ref Main//foo, inst+293, loaded [template = constants.%As.type.5]
- // CHECK:STDOUT: %import_ref.33 = import_ref Main//foo, inst+294, unloaded
- // CHECK:STDOUT: %import_ref.35: type = import_ref Main//foo, inst+319, loaded [symbolic = @impl.8.%uN (constants.%uN)]
- // CHECK:STDOUT: %import_ref.36: type = import_ref Main//foo, inst+320, loaded [template = constants.%As.type.5]
- // CHECK:STDOUT: %import_ref.37 = import_ref Main//foo, inst+321, unloaded
- // CHECK:STDOUT: %import_ref.38: <witness> = import_ref Main//foo, inst+54, loaded [template = constants.%complete_type.2]
- // CHECK:STDOUT: %import_ref.39 = import_ref Main//foo, inst+25, unloaded
- // CHECK:STDOUT: %import_ref.40 = import_ref Main//foo, inst+41, unloaded
- // CHECK:STDOUT: %import_ref.41 = import_ref Main//foo, inst+50, unloaded
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: file {
- // CHECK:STDOUT: package: <namespace> = namespace [template] {
- // CHECK:STDOUT: .Class = %Class.decl
- // CHECK:STDOUT: .CompleteClass = imports.%import_ref.2
- // CHECK:STDOUT: .F = %F.decl
- // CHECK:STDOUT: .Core = imports.%Core
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %default.import.loc2_6.1 = import <invalid>
- // CHECK:STDOUT: %default.import.loc2_6.2 = import <invalid>
- // CHECK:STDOUT: %Core.import = import Core
- // CHECK:STDOUT: %Class.decl: %Class.type = class_decl @Class [template = constants.%Class.generic] {
- // CHECK:STDOUT: %T.patt.loc4: type = symbolic_binding_pattern T, 0 [symbolic = constants.%T.patt]
- // CHECK:STDOUT: %T.param_patt: type = value_param_pattern %T.patt.loc4, runtime_param<invalid> [symbolic = constants.%T.patt]
- // CHECK:STDOUT: } {
- // CHECK:STDOUT: %T.param: type = value_param runtime_param<invalid>
- // CHECK:STDOUT: %T.loc4: type = bind_symbolic_name T, 0, %T.param [symbolic = constants.%T]
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %F.decl: %F.type.2 = fn_decl @F.2 [template = constants.%F.2] {
- // CHECK:STDOUT: %return.patt: %CompleteClass.2 = return_slot_pattern
- // CHECK:STDOUT: %return.param_patt: %CompleteClass.2 = out_param_pattern %return.patt, runtime_param0
- // CHECK:STDOUT: } {
- // CHECK:STDOUT: %CompleteClass.ref: %CompleteClass.type = name_ref CompleteClass, imports.%import_ref.2 [template = constants.%CompleteClass.generic]
- // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32]
- // CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32]
- // CHECK:STDOUT: %.loc8_28.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32]
- // CHECK:STDOUT: %.loc8_28.2: type = converted %int.make_type_signed, %.loc8_28.1 [template = constants.%i32]
- // CHECK:STDOUT: %CompleteClass: type = class_type @CompleteClass, @CompleteClass(constants.%i32) [template = constants.%CompleteClass.2]
- // CHECK:STDOUT: %return.param: ref %CompleteClass.2 = out_param runtime_param0
- // CHECK:STDOUT: %return: ref %CompleteClass.2 = return_slot %return.param
- // CHECK:STDOUT: }
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: generic interface @ImplicitAs(constants.%Dest: type) {
- // CHECK:STDOUT: %Dest: type = bind_symbolic_name Dest, 0 [symbolic = %Dest (constants.%Dest)]
- // CHECK:STDOUT: %Dest.patt: type = symbolic_binding_pattern Dest, 0 [symbolic = %Dest.patt (constants.%Dest.patt)]
- // CHECK:STDOUT:
- // CHECK:STDOUT: !definition:
- // CHECK:STDOUT: %ImplicitAs.type: type = facet_type <@ImplicitAs, @ImplicitAs(%Dest)> [symbolic = %ImplicitAs.type (constants.%ImplicitAs.type.2)]
- // CHECK:STDOUT: %Self: %ImplicitAs.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.1)]
- // CHECK:STDOUT: %Convert.type: type = fn_type @Convert.1, @ImplicitAs(%Dest) [symbolic = %Convert.type (constants.%Convert.type.1)]
- // CHECK:STDOUT: %Convert: @ImplicitAs.%Convert.type (%Convert.type.1) = struct_value () [symbolic = %Convert (constants.%Convert.1)]
- // CHECK:STDOUT: %Convert.assoc_type: type = assoc_entity_type @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.2), @ImplicitAs.%Convert.type (%Convert.type.1) [symbolic = %Convert.assoc_type (constants.%Convert.assoc_type.1)]
- // CHECK:STDOUT: %assoc0: @ImplicitAs.%Convert.assoc_type (%Convert.assoc_type.1) = assoc_entity element0, imports.%import_ref.10 [symbolic = %assoc0 (constants.%assoc0.1)]
- // CHECK:STDOUT:
- // CHECK:STDOUT: interface {
- // CHECK:STDOUT: !members:
- // CHECK:STDOUT: .Self = imports.%import_ref.4
- // CHECK:STDOUT: .Convert = imports.%import_ref.5
- // CHECK:STDOUT: witness = (imports.%import_ref.6)
- // CHECK:STDOUT: }
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: generic interface @As(constants.%Dest: type) {
- // CHECK:STDOUT: %Dest: type = bind_symbolic_name Dest, 0 [symbolic = %Dest (constants.%Dest)]
- // CHECK:STDOUT: %Dest.patt: type = symbolic_binding_pattern Dest, 0 [symbolic = %Dest.patt (constants.%Dest.patt)]
- // CHECK:STDOUT:
- // CHECK:STDOUT: !definition:
- // CHECK:STDOUT: %As.type: type = facet_type <@As, @As(%Dest)> [symbolic = %As.type (constants.%As.type.2)]
- // CHECK:STDOUT: %Self: %As.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.2)]
- // CHECK:STDOUT: %Convert.type: type = fn_type @Convert.6, @As(%Dest) [symbolic = %Convert.type (constants.%Convert.type.7)]
- // CHECK:STDOUT: %Convert: @As.%Convert.type (%Convert.type.7) = struct_value () [symbolic = %Convert (constants.%Convert.7)]
- // CHECK:STDOUT: %Convert.assoc_type: type = assoc_entity_type @As.%As.type (%As.type.2), @As.%Convert.type (%Convert.type.7) [symbolic = %Convert.assoc_type (constants.%Convert.assoc_type.3)]
- // CHECK:STDOUT: %assoc0: @As.%Convert.assoc_type (%Convert.assoc_type.3) = assoc_entity element0, imports.%import_ref.27 [symbolic = %assoc0 (constants.%assoc0.3)]
- // CHECK:STDOUT:
- // CHECK:STDOUT: interface {
- // CHECK:STDOUT: !members:
- // CHECK:STDOUT: .Self = imports.%import_ref.21
- // CHECK:STDOUT: .Convert = imports.%import_ref.22
- // CHECK:STDOUT: witness = (imports.%import_ref.23)
- // CHECK:STDOUT: }
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: generic impl @impl.1(constants.%N: Core.IntLiteral) {
- // CHECK:STDOUT: %N: Core.IntLiteral = bind_symbolic_name N, 0 [symbolic = %N (constants.%N)]
- // CHECK:STDOUT: %N.patt: Core.IntLiteral = symbolic_binding_pattern N, 0 [symbolic = %N.patt (constants.%N.patt)]
- // CHECK:STDOUT: %iN: type = int_type signed, %N [symbolic = %iN (constants.%iN)]
- // CHECK:STDOUT: %ImplicitAs.type: type = facet_type <@ImplicitAs, @ImplicitAs(%iN)> [symbolic = %ImplicitAs.type (constants.%ImplicitAs.type.3)]
- // CHECK:STDOUT:
- // CHECK:STDOUT: !definition:
- // CHECK:STDOUT: %Convert.type: type = fn_type @Convert.2, @impl.1(%N) [symbolic = %Convert.type (constants.%Convert.type.2)]
- // CHECK:STDOUT: %Convert: @impl.1.%Convert.type (%Convert.type.2) = struct_value () [symbolic = %Convert (constants.%Convert.2)]
- // CHECK:STDOUT: %interface: <witness> = interface_witness (%Convert) [symbolic = %interface (constants.%interface.1)]
- // CHECK:STDOUT:
- // CHECK:STDOUT: impl: imports.%import_ref.7 as imports.%import_ref.8 {
- // CHECK:STDOUT: !members:
- // CHECK:STDOUT: witness = imports.%import_ref.9
- // CHECK:STDOUT: }
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: generic impl @impl.2(constants.%N: Core.IntLiteral) {
- // CHECK:STDOUT: %N: Core.IntLiteral = bind_symbolic_name N, 0 [symbolic = %N (constants.%N)]
- // CHECK:STDOUT: %N.patt: Core.IntLiteral = symbolic_binding_pattern N, 0 [symbolic = %N.patt (constants.%N.patt)]
- // CHECK:STDOUT: %uN: type = int_type unsigned, %N [symbolic = %uN (constants.%uN)]
- // CHECK:STDOUT: %ImplicitAs.type: type = facet_type <@ImplicitAs, @ImplicitAs(%uN)> [symbolic = %ImplicitAs.type (constants.%ImplicitAs.type.4)]
- // CHECK:STDOUT:
- // CHECK:STDOUT: !definition:
- // CHECK:STDOUT: %Convert.type: type = fn_type @Convert.3, @impl.2(%N) [symbolic = %Convert.type (constants.%Convert.type.3)]
- // CHECK:STDOUT: %Convert: @impl.2.%Convert.type (%Convert.type.3) = struct_value () [symbolic = %Convert (constants.%Convert.3)]
- // CHECK:STDOUT: %interface: <witness> = interface_witness (%Convert) [symbolic = %interface (constants.%interface.2)]
- // CHECK:STDOUT:
- // CHECK:STDOUT: impl: imports.%import_ref.11 as imports.%import_ref.12 {
- // CHECK:STDOUT: !members:
- // CHECK:STDOUT: witness = imports.%import_ref.13
- // CHECK:STDOUT: }
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: generic impl @impl.3(constants.%N: Core.IntLiteral) {
- // CHECK:STDOUT: %N: Core.IntLiteral = bind_symbolic_name N, 0 [symbolic = %N (constants.%N)]
- // CHECK:STDOUT: %N.patt: Core.IntLiteral = symbolic_binding_pattern N, 0 [symbolic = %N.patt (constants.%N.patt)]
- // CHECK:STDOUT: %iN: type = int_type signed, %N [symbolic = %iN (constants.%iN)]
- // CHECK:STDOUT:
- // CHECK:STDOUT: !definition:
- // CHECK:STDOUT: %Convert.type: type = fn_type @Convert.4, @impl.3(%N) [symbolic = %Convert.type (constants.%Convert.type.4)]
- // CHECK:STDOUT: %Convert: @impl.3.%Convert.type (%Convert.type.4) = struct_value () [symbolic = %Convert (constants.%Convert.4)]
- // CHECK:STDOUT: %interface: <witness> = interface_witness (%Convert) [symbolic = %interface (constants.%interface.3)]
- // CHECK:STDOUT:
- // CHECK:STDOUT: impl: imports.%import_ref.14 as imports.%import_ref.15 {
- // CHECK:STDOUT: !members:
- // CHECK:STDOUT: witness = imports.%import_ref.16
- // CHECK:STDOUT: }
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: generic impl @impl.4(constants.%N: Core.IntLiteral) {
- // CHECK:STDOUT: %N: Core.IntLiteral = bind_symbolic_name N, 0 [symbolic = %N (constants.%N)]
- // CHECK:STDOUT: %N.patt: Core.IntLiteral = symbolic_binding_pattern N, 0 [symbolic = %N.patt (constants.%N.patt)]
- // CHECK:STDOUT: %uN: type = int_type unsigned, %N [symbolic = %uN (constants.%uN)]
- // CHECK:STDOUT:
- // CHECK:STDOUT: !definition:
- // CHECK:STDOUT: %Convert.type: type = fn_type @Convert.5, @impl.4(%N) [symbolic = %Convert.type (constants.%Convert.type.6)]
- // CHECK:STDOUT: %Convert: @impl.4.%Convert.type (%Convert.type.6) = struct_value () [symbolic = %Convert (constants.%Convert.6)]
- // CHECK:STDOUT: %interface: <witness> = interface_witness (%Convert) [symbolic = %interface (constants.%interface.4)]
- // CHECK:STDOUT:
- // CHECK:STDOUT: impl: imports.%import_ref.18 as imports.%import_ref.19 {
- // CHECK:STDOUT: !members:
- // CHECK:STDOUT: witness = imports.%import_ref.20
- // CHECK:STDOUT: }
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: generic impl @impl.5(constants.%N: Core.IntLiteral) {
- // CHECK:STDOUT: %N: Core.IntLiteral = bind_symbolic_name N, 0 [symbolic = %N (constants.%N)]
- // CHECK:STDOUT: %N.patt: Core.IntLiteral = symbolic_binding_pattern N, 0 [symbolic = %N.patt (constants.%N.patt)]
- // CHECK:STDOUT: %iN: type = int_type signed, %N [symbolic = %iN (constants.%iN)]
- // CHECK:STDOUT: %As.type: type = facet_type <@As, @As(%iN)> [symbolic = %As.type (constants.%As.type.3)]
- // CHECK:STDOUT:
- // CHECK:STDOUT: !definition:
- // CHECK:STDOUT: %Convert.type: type = fn_type @Convert.7, @impl.5(%N) [symbolic = %Convert.type (constants.%Convert.type.8)]
- // CHECK:STDOUT: %Convert: @impl.5.%Convert.type (%Convert.type.8) = struct_value () [symbolic = %Convert (constants.%Convert.8)]
- // CHECK:STDOUT: %interface: <witness> = interface_witness (%Convert) [symbolic = %interface (constants.%interface.5)]
- // CHECK:STDOUT:
- // CHECK:STDOUT: impl: imports.%import_ref.24 as imports.%import_ref.25 {
- // CHECK:STDOUT: !members:
- // CHECK:STDOUT: witness = imports.%import_ref.26
- // CHECK:STDOUT: }
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: generic impl @impl.6(constants.%N: Core.IntLiteral) {
- // CHECK:STDOUT: %N: Core.IntLiteral = bind_symbolic_name N, 0 [symbolic = %N (constants.%N)]
- // CHECK:STDOUT: %N.patt: Core.IntLiteral = symbolic_binding_pattern N, 0 [symbolic = %N.patt (constants.%N.patt)]
- // CHECK:STDOUT: %uN: type = int_type unsigned, %N [symbolic = %uN (constants.%uN)]
- // CHECK:STDOUT: %As.type: type = facet_type <@As, @As(%uN)> [symbolic = %As.type (constants.%As.type.4)]
- // CHECK:STDOUT:
- // CHECK:STDOUT: !definition:
- // CHECK:STDOUT: %Convert.type: type = fn_type @Convert.8, @impl.6(%N) [symbolic = %Convert.type (constants.%Convert.type.9)]
- // CHECK:STDOUT: %Convert: @impl.6.%Convert.type (%Convert.type.9) = struct_value () [symbolic = %Convert (constants.%Convert.9)]
- // CHECK:STDOUT: %interface: <witness> = interface_witness (%Convert) [symbolic = %interface (constants.%interface.6)]
- // CHECK:STDOUT:
- // CHECK:STDOUT: impl: imports.%import_ref.28 as imports.%import_ref.29 {
- // CHECK:STDOUT: !members:
- // CHECK:STDOUT: witness = imports.%import_ref.30
- // CHECK:STDOUT: }
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: generic impl @impl.7(constants.%N: Core.IntLiteral) {
- // CHECK:STDOUT: %N: Core.IntLiteral = bind_symbolic_name N, 0 [symbolic = %N (constants.%N)]
- // CHECK:STDOUT: %N.patt: Core.IntLiteral = symbolic_binding_pattern N, 0 [symbolic = %N.patt (constants.%N.patt)]
- // CHECK:STDOUT: %iN: type = int_type signed, %N [symbolic = %iN (constants.%iN)]
- // CHECK:STDOUT:
- // CHECK:STDOUT: !definition:
- // CHECK:STDOUT: %Convert.type: type = fn_type @Convert.9, @impl.7(%N) [symbolic = %Convert.type (constants.%Convert.type.10)]
- // CHECK:STDOUT: %Convert: @impl.7.%Convert.type (%Convert.type.10) = struct_value () [symbolic = %Convert (constants.%Convert.10)]
- // CHECK:STDOUT: %interface: <witness> = interface_witness (%Convert) [symbolic = %interface (constants.%interface.7)]
- // CHECK:STDOUT:
- // CHECK:STDOUT: impl: imports.%import_ref.31 as imports.%import_ref.32 {
- // CHECK:STDOUT: !members:
- // CHECK:STDOUT: witness = imports.%import_ref.33
- // CHECK:STDOUT: }
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: generic impl @impl.8(constants.%N: Core.IntLiteral) {
- // CHECK:STDOUT: %N: Core.IntLiteral = bind_symbolic_name N, 0 [symbolic = %N (constants.%N)]
- // CHECK:STDOUT: %N.patt: Core.IntLiteral = symbolic_binding_pattern N, 0 [symbolic = %N.patt (constants.%N.patt)]
- // CHECK:STDOUT: %uN: type = int_type unsigned, %N [symbolic = %uN (constants.%uN)]
- // CHECK:STDOUT:
- // CHECK:STDOUT: !definition:
- // CHECK:STDOUT: %Convert.type: type = fn_type @Convert.10, @impl.8(%N) [symbolic = %Convert.type (constants.%Convert.type.12)]
- // CHECK:STDOUT: %Convert: @impl.8.%Convert.type (%Convert.type.12) = struct_value () [symbolic = %Convert (constants.%Convert.12)]
- // CHECK:STDOUT: %interface: <witness> = interface_witness (%Convert) [symbolic = %interface (constants.%interface.8)]
- // CHECK:STDOUT:
- // CHECK:STDOUT: impl: imports.%import_ref.35 as imports.%import_ref.36 {
- // CHECK:STDOUT: !members:
- // CHECK:STDOUT: witness = imports.%import_ref.37
- // CHECK:STDOUT: }
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: generic class @Class(constants.%T: type) {
- // CHECK:STDOUT: %T.1: type = bind_symbolic_name T, 0 [symbolic = %T.1 (constants.%T)]
- // CHECK:STDOUT: %T.patt.1: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.1 (constants.%T.patt)]
- // CHECK:STDOUT:
- // CHECK:STDOUT: !definition:
- // CHECK:STDOUT: %Class: type = class_type @Class, @Class(%T.1) [symbolic = %Class (constants.%Class)]
- // CHECK:STDOUT: %Class.elem: type = unbound_element_type @Class.%Class (%Class), @Class.%T.1 (%T) [symbolic = %Class.elem (constants.%Class.elem)]
- // CHECK:STDOUT: %struct_type.x: type = struct_type {.x: @Class.%T.1 (%T)} [symbolic = %struct_type.x (constants.%struct_type.x)]
- // CHECK:STDOUT: %complete_type.loc6_1.2: <witness> = complete_type_witness @Class.%struct_type.x (%struct_type.x) [symbolic = %complete_type.loc6_1.2 (constants.%complete_type.1)]
- // CHECK:STDOUT:
- // CHECK:STDOUT: class {
- // CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc4 [symbolic = %T.1 (constants.%T)]
- // CHECK:STDOUT: %.loc5: @Class.%Class.elem (%Class.elem) = field_decl x, element0 [template]
- // CHECK:STDOUT: %complete_type.loc6_1.1: <witness> = complete_type_witness %struct_type.x [symbolic = %complete_type.loc6_1.2 (constants.%complete_type.1)]
- // CHECK:STDOUT:
- // CHECK:STDOUT: !members:
- // CHECK:STDOUT: .Self = constants.%Class
- // CHECK:STDOUT: .x = %.loc5
- // CHECK:STDOUT: complete_type_witness = %complete_type.loc6_1.1
- // CHECK:STDOUT: }
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: generic class @CompleteClass(constants.%T: type) {
- // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic = %T (constants.%T)]
- // CHECK:STDOUT: %T.patt: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt (constants.%T.patt)]
- // CHECK:STDOUT:
- // CHECK:STDOUT: !definition:
- // CHECK:STDOUT: %CompleteClass: type = class_type @CompleteClass, @CompleteClass(%T) [symbolic = %CompleteClass (constants.%CompleteClass.1)]
- // CHECK:STDOUT: %CompleteClass.elem: type = unbound_element_type @CompleteClass.%CompleteClass (%CompleteClass.1), %i32 [symbolic = %CompleteClass.elem (constants.%CompleteClass.elem.1)]
- // CHECK:STDOUT: %F.type: type = fn_type @F.1, @CompleteClass(%T) [symbolic = %F.type (constants.%F.type.1)]
- // CHECK:STDOUT: %F: @CompleteClass.%F.type (%F.type.1) = struct_value () [symbolic = %F (constants.%F.1)]
- // CHECK:STDOUT:
- // CHECK:STDOUT: class {
- // CHECK:STDOUT: !members:
- // CHECK:STDOUT: .Self = imports.%import_ref.39
- // CHECK:STDOUT: .n = imports.%import_ref.40
- // CHECK:STDOUT: .F = imports.%import_ref.41
- // CHECK:STDOUT: complete_type_witness = imports.%import_ref.38
- // CHECK:STDOUT: }
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: generic fn @Convert.1(constants.%Dest: type, constants.%Self.1: %ImplicitAs.type.2) {
- // CHECK:STDOUT: %Dest: type = bind_symbolic_name Dest, 0 [symbolic = %Dest (constants.%Dest)]
- // CHECK:STDOUT: %ImplicitAs.type: type = facet_type <@ImplicitAs, @ImplicitAs(%Dest)> [symbolic = %ImplicitAs.type (constants.%ImplicitAs.type.2)]
- // CHECK:STDOUT: %Self: %ImplicitAs.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.1)]
- // CHECK:STDOUT: %Self.as_type: type = facet_access_type %Self [symbolic = %Self.as_type (constants.%Self.as_type.1)]
- // CHECK:STDOUT:
- // CHECK:STDOUT: fn[%self.param_patt: @Convert.1.%Self.as_type (%Self.as_type.1)]() -> @Convert.1.%Dest (%Dest);
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: generic fn @Convert.2(constants.%N: Core.IntLiteral) {
- // CHECK:STDOUT: %N: Core.IntLiteral = bind_symbolic_name N, 0 [symbolic = %N (constants.%N)]
- // CHECK:STDOUT: %iN: type = int_type signed, %N [symbolic = %iN (constants.%iN)]
- // CHECK:STDOUT:
- // CHECK:STDOUT: !definition:
- // CHECK:STDOUT:
- // CHECK:STDOUT: fn[%self.param_patt: Core.IntLiteral]() -> @Convert.2.%iN (%iN) = "int.convert_checked";
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: generic fn @Convert.3(constants.%N: Core.IntLiteral) {
- // CHECK:STDOUT: %N: Core.IntLiteral = bind_symbolic_name N, 0 [symbolic = %N (constants.%N)]
- // CHECK:STDOUT: %uN: type = int_type unsigned, %N [symbolic = %uN (constants.%uN)]
- // CHECK:STDOUT:
- // CHECK:STDOUT: !definition:
- // CHECK:STDOUT:
- // CHECK:STDOUT: fn[%self.param_patt: Core.IntLiteral]() -> @Convert.3.%uN (%uN) = "int.convert_checked";
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: generic fn @Convert.4(constants.%N: Core.IntLiteral) {
- // CHECK:STDOUT: %N: Core.IntLiteral = bind_symbolic_name N, 0 [symbolic = %N (constants.%N)]
- // CHECK:STDOUT: %iN: type = int_type signed, %N [symbolic = %iN (constants.%iN)]
- // CHECK:STDOUT:
- // CHECK:STDOUT: !definition:
- // CHECK:STDOUT:
- // CHECK:STDOUT: fn[%self.param_patt: @Convert.4.%iN (%iN)]() -> Core.IntLiteral = "int.convert_checked";
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: generic fn @Convert.5(constants.%N: Core.IntLiteral) {
- // CHECK:STDOUT: %N: Core.IntLiteral = bind_symbolic_name N, 0 [symbolic = %N (constants.%N)]
- // CHECK:STDOUT: %uN: type = int_type unsigned, %N [symbolic = %uN (constants.%uN)]
- // CHECK:STDOUT:
- // CHECK:STDOUT: !definition:
- // CHECK:STDOUT:
- // CHECK:STDOUT: fn[%self.param_patt: @Convert.5.%uN (%uN)]() -> Core.IntLiteral = "int.convert_checked";
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: generic fn @Convert.6(constants.%Dest: type, constants.%Self.2: %As.type.2) {
- // CHECK:STDOUT: %Dest: type = bind_symbolic_name Dest, 0 [symbolic = %Dest (constants.%Dest)]
- // CHECK:STDOUT: %As.type: type = facet_type <@As, @As(%Dest)> [symbolic = %As.type (constants.%As.type.2)]
- // CHECK:STDOUT: %Self: %As.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.2)]
- // CHECK:STDOUT: %Self.as_type: type = facet_access_type %Self [symbolic = %Self.as_type (constants.%Self.as_type.2)]
- // CHECK:STDOUT:
- // CHECK:STDOUT: fn[%self.param_patt: @Convert.6.%Self.as_type (%Self.as_type.2)]() -> @Convert.6.%Dest (%Dest);
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: generic fn @Convert.7(constants.%N: Core.IntLiteral) {
- // CHECK:STDOUT: %N: Core.IntLiteral = bind_symbolic_name N, 0 [symbolic = %N (constants.%N)]
- // CHECK:STDOUT: %iN: type = int_type signed, %N [symbolic = %iN (constants.%iN)]
- // CHECK:STDOUT:
- // CHECK:STDOUT: !definition:
- // CHECK:STDOUT:
- // CHECK:STDOUT: fn[%self.param_patt: Core.IntLiteral]() -> @Convert.7.%iN (%iN) = "int.convert_checked";
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: generic fn @Convert.8(constants.%N: Core.IntLiteral) {
- // CHECK:STDOUT: %N: Core.IntLiteral = bind_symbolic_name N, 0 [symbolic = %N (constants.%N)]
- // CHECK:STDOUT: %uN: type = int_type unsigned, %N [symbolic = %uN (constants.%uN)]
- // CHECK:STDOUT:
- // CHECK:STDOUT: !definition:
- // CHECK:STDOUT:
- // CHECK:STDOUT: fn[%self.param_patt: Core.IntLiteral]() -> @Convert.8.%uN (%uN) = "int.convert_checked";
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: generic fn @Convert.9(constants.%N: Core.IntLiteral) {
- // CHECK:STDOUT: %N: Core.IntLiteral = bind_symbolic_name N, 0 [symbolic = %N (constants.%N)]
- // CHECK:STDOUT: %iN: type = int_type signed, %N [symbolic = %iN (constants.%iN)]
- // CHECK:STDOUT:
- // CHECK:STDOUT: !definition:
- // CHECK:STDOUT:
- // CHECK:STDOUT: fn[%self.param_patt: @Convert.9.%iN (%iN)]() -> Core.IntLiteral = "int.convert_checked";
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: generic fn @Convert.10(constants.%N: Core.IntLiteral) {
- // CHECK:STDOUT: %N: Core.IntLiteral = bind_symbolic_name N, 0 [symbolic = %N (constants.%N)]
- // CHECK:STDOUT: %uN: type = int_type unsigned, %N [symbolic = %uN (constants.%uN)]
- // CHECK:STDOUT:
- // CHECK:STDOUT: !definition:
- // CHECK:STDOUT:
- // CHECK:STDOUT: fn[%self.param_patt: @Convert.10.%uN (%uN)]() -> Core.IntLiteral = "int.convert_checked";
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: generic fn @F.1(constants.%T: type) {
- // CHECK:STDOUT: !definition:
- // CHECK:STDOUT:
- // CHECK:STDOUT: fn() -> %i32;
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: fn @F.2() -> %return.param_patt: %CompleteClass.2 {
- // CHECK:STDOUT: !entry:
- // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template = constants.%int_1.1]
- // CHECK:STDOUT: %.loc9_17.1: %struct_type.n.2 = struct_literal (%int_1)
- // CHECK:STDOUT: %impl.elem0: %Convert.type.13 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14]
- // CHECK:STDOUT: %Convert.bound: <bound method> = bound_method %int_1, %impl.elem0 [template = constants.%Convert.bound]
- // CHECK:STDOUT: %Convert.specific_fn: <specific function> = specific_function %Convert.bound, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn]
- // CHECK:STDOUT: %int.convert_checked: init %i32 = call %Convert.specific_fn(%int_1) [template = constants.%int_1.2]
- // CHECK:STDOUT: %.loc9_17.2: init %i32 = converted %int_1, %int.convert_checked [template = constants.%int_1.2]
- // CHECK:STDOUT: %.loc9_17.3: ref %i32 = class_element_access %return, element0
- // CHECK:STDOUT: %.loc9_17.4: init %i32 = initialize_from %.loc9_17.2 to %.loc9_17.3 [template = constants.%int_1.2]
- // CHECK:STDOUT: %.loc9_17.5: init %CompleteClass.2 = class_init (%.loc9_17.4), %return [template = constants.%CompleteClass.val]
- // CHECK:STDOUT: %.loc9_18: init %CompleteClass.2 = converted %.loc9_17.1, %.loc9_17.5 [template = constants.%CompleteClass.val]
- // CHECK:STDOUT: return %.loc9_18 to %return
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: specific @ImplicitAs(constants.%Dest) {
- // CHECK:STDOUT: %Dest => constants.%Dest
- // CHECK:STDOUT: %Dest.patt => constants.%Dest
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: specific @ImplicitAs(constants.%iN) {
- // CHECK:STDOUT: %Dest => constants.%iN
- // CHECK:STDOUT: %Dest.patt => constants.%iN
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: specific @ImplicitAs(%Dest) {
- // CHECK:STDOUT: %Dest => constants.%Dest
- // CHECK:STDOUT: %Dest.patt => constants.%Dest
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: specific @ImplicitAs(@impl.1.%iN) {
- // CHECK:STDOUT: %Dest => constants.%iN
- // CHECK:STDOUT: %Dest.patt => constants.%iN
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: specific @impl.1(constants.%N) {
- // CHECK:STDOUT: %N => constants.%N
- // CHECK:STDOUT: %N.patt => constants.%N
- // CHECK:STDOUT: %iN => constants.%iN
- // CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.3
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: specific @impl.1(%N) {
- // CHECK:STDOUT: %N => constants.%N
- // CHECK:STDOUT: %N.patt => constants.%N
- // CHECK:STDOUT: %iN => constants.%iN
- // CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.3
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: specific @ImplicitAs(@Convert.1.%Dest) {
- // CHECK:STDOUT: %Dest => constants.%Dest
- // CHECK:STDOUT: %Dest.patt => constants.%Dest
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: specific @Convert.1(constants.%Dest, constants.%Self.1) {
- // CHECK:STDOUT: %Dest => constants.%Dest
- // CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.2
- // CHECK:STDOUT: %Self => constants.%Self.1
- // CHECK:STDOUT: %Self.as_type => constants.%Self.as_type.1
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: specific @Convert.2(constants.%N) {
- // CHECK:STDOUT: %N => constants.%N
- // CHECK:STDOUT: %iN => constants.%iN
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: specific @ImplicitAs(constants.%uN) {
- // CHECK:STDOUT: %Dest => constants.%uN
- // CHECK:STDOUT: %Dest.patt => constants.%uN
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: specific @ImplicitAs(@impl.2.%uN) {
- // CHECK:STDOUT: %Dest => constants.%uN
- // CHECK:STDOUT: %Dest.patt => constants.%uN
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: specific @impl.2(constants.%N) {
- // CHECK:STDOUT: %N => constants.%N
- // CHECK:STDOUT: %N.patt => constants.%N
- // CHECK:STDOUT: %uN => constants.%uN
- // CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.4
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: specific @impl.2(%N) {
- // CHECK:STDOUT: %N => constants.%N
- // CHECK:STDOUT: %N.patt => constants.%N
- // CHECK:STDOUT: %uN => constants.%uN
- // CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.4
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: specific @Convert.3(constants.%N) {
- // CHECK:STDOUT: %N => constants.%N
- // CHECK:STDOUT: %uN => constants.%uN
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: specific @ImplicitAs(Core.IntLiteral) {
- // CHECK:STDOUT: %Dest => Core.IntLiteral
- // CHECK:STDOUT: %Dest.patt => Core.IntLiteral
- // CHECK:STDOUT:
- // CHECK:STDOUT: !definition:
- // CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.5
- // CHECK:STDOUT: %Self => constants.%Self.1
- // CHECK:STDOUT: %Convert.type => constants.%Convert.type.5
- // CHECK:STDOUT: %Convert => constants.%Convert.5
- // CHECK:STDOUT: %Convert.assoc_type => constants.%Convert.assoc_type.2
- // CHECK:STDOUT: %assoc0 => constants.%assoc0.2
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: specific @impl.3(constants.%N) {
- // CHECK:STDOUT: %N => constants.%N
- // CHECK:STDOUT: %N.patt => constants.%N
- // CHECK:STDOUT: %iN => constants.%iN
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: specific @impl.3(%N) {
- // CHECK:STDOUT: %N => constants.%N
- // CHECK:STDOUT: %N.patt => constants.%N
- // CHECK:STDOUT: %iN => constants.%iN
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: specific @Convert.4(constants.%N) {
- // CHECK:STDOUT: %N => constants.%N
- // CHECK:STDOUT: %iN => constants.%iN
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: specific @impl.4(constants.%N) {
- // CHECK:STDOUT: %N => constants.%N
- // CHECK:STDOUT: %N.patt => constants.%N
- // CHECK:STDOUT: %uN => constants.%uN
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: specific @impl.4(%N) {
- // CHECK:STDOUT: %N => constants.%N
- // CHECK:STDOUT: %N.patt => constants.%N
- // CHECK:STDOUT: %uN => constants.%uN
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: specific @Convert.5(constants.%N) {
- // CHECK:STDOUT: %N => constants.%N
- // CHECK:STDOUT: %uN => constants.%uN
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: specific @As(constants.%Dest) {
- // CHECK:STDOUT: %Dest => constants.%Dest
- // CHECK:STDOUT: %Dest.patt => constants.%Dest
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: specific @As(constants.%iN) {
- // CHECK:STDOUT: %Dest => constants.%iN
- // CHECK:STDOUT: %Dest.patt => constants.%iN
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: specific @As(%Dest) {
- // CHECK:STDOUT: %Dest => constants.%Dest
- // CHECK:STDOUT: %Dest.patt => constants.%Dest
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: specific @As(@impl.5.%iN) {
- // CHECK:STDOUT: %Dest => constants.%iN
- // CHECK:STDOUT: %Dest.patt => constants.%iN
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: specific @impl.5(constants.%N) {
- // CHECK:STDOUT: %N => constants.%N
- // CHECK:STDOUT: %N.patt => constants.%N
- // CHECK:STDOUT: %iN => constants.%iN
- // CHECK:STDOUT: %As.type => constants.%As.type.3
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: specific @impl.5(%N) {
- // CHECK:STDOUT: %N => constants.%N
- // CHECK:STDOUT: %N.patt => constants.%N
- // CHECK:STDOUT: %iN => constants.%iN
- // CHECK:STDOUT: %As.type => constants.%As.type.3
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: specific @As(@Convert.6.%Dest) {
- // CHECK:STDOUT: %Dest => constants.%Dest
- // CHECK:STDOUT: %Dest.patt => constants.%Dest
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: specific @Convert.6(constants.%Dest, constants.%Self.2) {
- // CHECK:STDOUT: %Dest => constants.%Dest
- // CHECK:STDOUT: %As.type => constants.%As.type.2
- // CHECK:STDOUT: %Self => constants.%Self.2
- // CHECK:STDOUT: %Self.as_type => constants.%Self.as_type.2
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: specific @Convert.7(constants.%N) {
- // CHECK:STDOUT: %N => constants.%N
- // CHECK:STDOUT: %iN => constants.%iN
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: specific @As(constants.%uN) {
- // CHECK:STDOUT: %Dest => constants.%uN
- // CHECK:STDOUT: %Dest.patt => constants.%uN
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: specific @As(@impl.6.%uN) {
- // CHECK:STDOUT: %Dest => constants.%uN
- // CHECK:STDOUT: %Dest.patt => constants.%uN
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: specific @impl.6(constants.%N) {
- // CHECK:STDOUT: %N => constants.%N
- // CHECK:STDOUT: %N.patt => constants.%N
- // CHECK:STDOUT: %uN => constants.%uN
- // CHECK:STDOUT: %As.type => constants.%As.type.4
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: specific @impl.6(%N) {
- // CHECK:STDOUT: %N => constants.%N
- // CHECK:STDOUT: %N.patt => constants.%N
- // CHECK:STDOUT: %uN => constants.%uN
- // CHECK:STDOUT: %As.type => constants.%As.type.4
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: specific @Convert.8(constants.%N) {
- // CHECK:STDOUT: %N => constants.%N
- // CHECK:STDOUT: %uN => constants.%uN
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: specific @As(Core.IntLiteral) {
- // CHECK:STDOUT: %Dest => Core.IntLiteral
- // CHECK:STDOUT: %Dest.patt => Core.IntLiteral
- // CHECK:STDOUT:
- // CHECK:STDOUT: !definition:
- // CHECK:STDOUT: %As.type => constants.%As.type.5
- // CHECK:STDOUT: %Self => constants.%Self.2
- // CHECK:STDOUT: %Convert.type => constants.%Convert.type.11
- // CHECK:STDOUT: %Convert => constants.%Convert.11
- // CHECK:STDOUT: %Convert.assoc_type => constants.%Convert.assoc_type.4
- // CHECK:STDOUT: %assoc0 => constants.%assoc0.4
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: specific @impl.7(constants.%N) {
- // CHECK:STDOUT: %N => constants.%N
- // CHECK:STDOUT: %N.patt => constants.%N
- // CHECK:STDOUT: %iN => constants.%iN
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: specific @impl.7(%N) {
- // CHECK:STDOUT: %N => constants.%N
- // CHECK:STDOUT: %N.patt => constants.%N
- // CHECK:STDOUT: %iN => constants.%iN
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: specific @Convert.9(constants.%N) {
- // CHECK:STDOUT: %N => constants.%N
- // CHECK:STDOUT: %iN => constants.%iN
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: specific @impl.8(constants.%N) {
- // CHECK:STDOUT: %N => constants.%N
- // CHECK:STDOUT: %N.patt => constants.%N
- // CHECK:STDOUT: %uN => constants.%uN
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: specific @impl.8(%N) {
- // CHECK:STDOUT: %N => constants.%N
- // CHECK:STDOUT: %N.patt => constants.%N
- // CHECK:STDOUT: %uN => constants.%uN
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: specific @Convert.10(constants.%N) {
- // CHECK:STDOUT: %N => constants.%N
- // CHECK:STDOUT: %uN => constants.%uN
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: specific @Class(constants.%T) {
- // CHECK:STDOUT: %T.1 => constants.%T
- // CHECK:STDOUT: %T.patt.1 => constants.%T
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: specific @Class(%T.1) {
- // CHECK:STDOUT: %T.1 => constants.%T
- // CHECK:STDOUT: %T.patt.1 => constants.%T
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: specific @CompleteClass(constants.%T) {
- // CHECK:STDOUT: %T => constants.%T
- // CHECK:STDOUT: %T.patt => constants.%T
- // CHECK:STDOUT:
- // CHECK:STDOUT: !definition:
- // CHECK:STDOUT: %CompleteClass => constants.%CompleteClass.1
- // CHECK:STDOUT: %CompleteClass.elem => constants.%CompleteClass.elem.1
- // CHECK:STDOUT: %F.type => constants.%F.type.1
- // CHECK:STDOUT: %F => constants.%F.1
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: specific @CompleteClass(%T) {
- // CHECK:STDOUT: %T => constants.%T
- // CHECK:STDOUT: %T.patt => constants.%T
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: specific @F.1(constants.%T) {}
- // CHECK:STDOUT:
- // CHECK:STDOUT: specific @CompleteClass(constants.%i32) {
- // CHECK:STDOUT: %T => constants.%i32
- // CHECK:STDOUT: %T.patt => constants.%i32
- // CHECK:STDOUT:
- // CHECK:STDOUT: !definition:
- // CHECK:STDOUT: %CompleteClass => constants.%CompleteClass.2
- // CHECK:STDOUT: %CompleteClass.elem => constants.%CompleteClass.elem.2
- // CHECK:STDOUT: %F.type => constants.%F.type.3
- // CHECK:STDOUT: %F => constants.%F.3
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: specific @ImplicitAs(constants.%i32) {
- // CHECK:STDOUT: %Dest => constants.%i32
- // CHECK:STDOUT: %Dest.patt => constants.%i32
- // CHECK:STDOUT:
- // CHECK:STDOUT: !definition:
- // CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.6
- // CHECK:STDOUT: %Self => constants.%Self.1
- // CHECK:STDOUT: %Convert.type => constants.%Convert.type.13
- // CHECK:STDOUT: %Convert => constants.%Convert.13
- // CHECK:STDOUT: %Convert.assoc_type => constants.%Convert.assoc_type.5
- // CHECK:STDOUT: %assoc0 => constants.%assoc0.5
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: specific @impl.1(constants.%int_32) {
- // CHECK:STDOUT: %N => constants.%int_32
- // CHECK:STDOUT: %N.patt => constants.%int_32
- // CHECK:STDOUT: %iN => constants.%i32
- // CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.6
- // CHECK:STDOUT:
- // CHECK:STDOUT: !definition:
- // CHECK:STDOUT: %Convert.type => constants.%Convert.type.14
- // CHECK:STDOUT: %Convert => constants.%Convert.14
- // CHECK:STDOUT: %interface => constants.%interface.9
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: specific @Convert.2(constants.%int_32) {
- // CHECK:STDOUT: %N => constants.%int_32
- // CHECK:STDOUT: %iN => constants.%i32
- // CHECK:STDOUT:
- // CHECK:STDOUT: !definition:
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: --- use_foo.carbon
- // CHECK:STDOUT:
- // CHECK:STDOUT: constants {
- // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template]
- // CHECK:STDOUT: %Int.type: type = fn_type @Int [template]
- // CHECK:STDOUT: %Int: %Int.type = struct_value () [template]
- // CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template]
- // CHECK:STDOUT: %UseMethod.type: type = fn_type @UseMethod [template]
- // CHECK:STDOUT: %UseMethod: %UseMethod.type = struct_value () [template]
- // CHECK:STDOUT: %CompleteClass.type: type = generic_class_type @CompleteClass [template]
- // CHECK:STDOUT: %CompleteClass.generic: %CompleteClass.type = struct_value () [template]
- // CHECK:STDOUT: %struct_type.n: type = struct_type {.n: %i32} [template]
- // CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %struct_type.n [template]
- // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic]
- // CHECK:STDOUT: %CompleteClass.1: type = class_type @CompleteClass, @CompleteClass(%T) [symbolic]
- // CHECK:STDOUT: %T.patt: type = symbolic_binding_pattern T, 0 [symbolic]
- // CHECK:STDOUT: %CompleteClass.elem.1: type = unbound_element_type %CompleteClass.1, %i32 [symbolic]
- // CHECK:STDOUT: %F.type.1: type = fn_type @F.1, @CompleteClass(%T) [symbolic]
- // CHECK:STDOUT: %F.1: %F.type.1 = struct_value () [symbolic]
- // CHECK:STDOUT: %CompleteClass.2: type = class_type @CompleteClass, @CompleteClass(%i32) [template]
- // CHECK:STDOUT: %CompleteClass.elem.2: type = unbound_element_type %CompleteClass.2, %i32 [template]
- // CHECK:STDOUT: %F.type.2: type = fn_type @F.1, @CompleteClass(%i32) [template]
- // CHECK:STDOUT: %F.2: %F.type.2 = struct_value () [template]
- // CHECK:STDOUT: %F.type.3: type = fn_type @F.2 [template]
- // CHECK:STDOUT: %F.3: %F.type.3 = struct_value () [template]
- // CHECK:STDOUT: %F.specific_fn: <specific function> = specific_function %F.2, @F.1(%i32) [template]
- // CHECK:STDOUT: %UseField.type: type = fn_type @UseField [template]
- // CHECK:STDOUT: %UseField: %UseField.type = struct_value () [template]
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: imports {
- // CHECK:STDOUT: %import_ref.1 = import_ref Main//foo, inst+9, unloaded
- // CHECK:STDOUT: %import_ref.2: %CompleteClass.type = import_ref Main//foo, inst+20, loaded [template = constants.%CompleteClass.generic]
- // CHECK:STDOUT: %import_ref.3: %F.type.3 = import_ref Main//foo, inst+362, loaded [template = constants.%F.3]
- // CHECK:STDOUT: %Core: <namespace> = namespace file.%Core.import, [template] {
- // CHECK:STDOUT: .Int = %import_ref.4
- // CHECK:STDOUT: import Core//prelude
- // CHECK:STDOUT: import Core//prelude/...
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %import_ref.5: <witness> = import_ref Main//foo, inst+54, loaded [template = constants.%complete_type]
- // CHECK:STDOUT: %import_ref.6 = import_ref Main//foo, inst+25, unloaded
- // CHECK:STDOUT: %import_ref.7: @CompleteClass.%CompleteClass.elem (%CompleteClass.elem.1) = import_ref Main//foo, inst+41, loaded [template = %.1]
- // CHECK:STDOUT: %import_ref.8: @CompleteClass.%F.type (%F.type.1) = import_ref Main//foo, inst+50, loaded [symbolic = @CompleteClass.%F (constants.%F.1)]
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: file {
- // CHECK:STDOUT: package: <namespace> = namespace [template] {
- // CHECK:STDOUT: .Class = imports.%import_ref.1
- // CHECK:STDOUT: .CompleteClass = imports.%import_ref.2
- // CHECK:STDOUT: .F = imports.%import_ref.3
- // CHECK:STDOUT: .Core = imports.%Core
- // CHECK:STDOUT: .UseMethod = %UseMethod.decl
- // CHECK:STDOUT: .UseField = %UseField.decl
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %Core.import = import Core
- // CHECK:STDOUT: %default.import = import <invalid>
- // CHECK:STDOUT: %UseMethod.decl: %UseMethod.type = fn_decl @UseMethod [template = constants.%UseMethod] {
- // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern
- // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param0
- // CHECK:STDOUT: } {
- // CHECK:STDOUT: %int_32.loc5: Core.IntLiteral = int_value 32 [template = constants.%int_32]
- // CHECK:STDOUT: %int.make_type_signed.loc5: init type = call constants.%Int(%int_32.loc5) [template = constants.%i32]
- // CHECK:STDOUT: %.loc5_19.1: type = value_of_initializer %int.make_type_signed.loc5 [template = constants.%i32]
- // CHECK:STDOUT: %.loc5_19.2: type = converted %int.make_type_signed.loc5, %.loc5_19.1 [template = constants.%i32]
- // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param0
- // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %UseField.decl: %UseField.type = fn_decl @UseField [template = constants.%UseField] {
- // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern
- // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param0
- // CHECK:STDOUT: } {
- // CHECK:STDOUT: %int_32.loc10: Core.IntLiteral = int_value 32 [template = constants.%int_32]
- // CHECK:STDOUT: %int.make_type_signed.loc10: init type = call constants.%Int(%int_32.loc10) [template = constants.%i32]
- // CHECK:STDOUT: %.loc10_18.1: type = value_of_initializer %int.make_type_signed.loc10 [template = constants.%i32]
- // CHECK:STDOUT: %.loc10_18.2: type = converted %int.make_type_signed.loc10, %.loc10_18.1 [template = constants.%i32]
- // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param0
- // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param
- // CHECK:STDOUT: }
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: generic class @CompleteClass(constants.%T: type) {
- // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic = %T (constants.%T)]
- // CHECK:STDOUT: %T.patt: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt (constants.%T.patt)]
- // CHECK:STDOUT:
- // CHECK:STDOUT: !definition:
- // CHECK:STDOUT: %CompleteClass: type = class_type @CompleteClass, @CompleteClass(%T) [symbolic = %CompleteClass (constants.%CompleteClass.1)]
- // CHECK:STDOUT: %CompleteClass.elem: type = unbound_element_type @CompleteClass.%CompleteClass (%CompleteClass.1), %i32 [symbolic = %CompleteClass.elem (constants.%CompleteClass.elem.1)]
- // CHECK:STDOUT: %F.type: type = fn_type @F.1, @CompleteClass(%T) [symbolic = %F.type (constants.%F.type.1)]
- // CHECK:STDOUT: %F: @CompleteClass.%F.type (%F.type.1) = struct_value () [symbolic = %F (constants.%F.1)]
- // CHECK:STDOUT:
- // CHECK:STDOUT: class {
- // CHECK:STDOUT: !members:
- // CHECK:STDOUT: .Self = imports.%import_ref.6
- // CHECK:STDOUT: .n = imports.%import_ref.7
- // CHECK:STDOUT: .F = imports.%import_ref.8
- // CHECK:STDOUT: complete_type_witness = imports.%import_ref.5
- // CHECK:STDOUT: }
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: fn @UseMethod() -> %i32 {
- // CHECK:STDOUT: !entry:
- // CHECK:STDOUT: %CompleteClass.ref: %CompleteClass.type = name_ref CompleteClass, imports.%import_ref.2 [template = constants.%CompleteClass.generic]
- // CHECK:STDOUT: %int_32.loc6: Core.IntLiteral = int_value 32 [template = constants.%int_32]
- // CHECK:STDOUT: %int.make_type_signed.loc6: init type = call constants.%Int(%int_32.loc6) [template = constants.%i32]
- // CHECK:STDOUT: %.loc6_27.1: type = value_of_initializer %int.make_type_signed.loc6 [template = constants.%i32]
- // CHECK:STDOUT: %.loc6_27.2: type = converted %int.make_type_signed.loc6, %.loc6_27.1 [template = constants.%i32]
- // CHECK:STDOUT: %CompleteClass: type = class_type @CompleteClass, @CompleteClass(constants.%i32) [template = constants.%CompleteClass.2]
- // CHECK:STDOUT: %v.var: ref %CompleteClass.2 = var v
- // CHECK:STDOUT: %v: ref %CompleteClass.2 = bind_name v, %v.var
- // CHECK:STDOUT: %F.ref.loc6: %F.type.3 = name_ref F, imports.%import_ref.3 [template = constants.%F.3]
- // CHECK:STDOUT: %.loc6_7: ref %CompleteClass.2 = splice_block %v.var {}
- // CHECK:STDOUT: %F.call.loc6: init %CompleteClass.2 = call %F.ref.loc6() to %.loc6_7
- // CHECK:STDOUT: assign %v.var, %F.call.loc6
- // CHECK:STDOUT: %v.ref: ref %CompleteClass.2 = name_ref v, %v
- // CHECK:STDOUT: %.loc7_11: %F.type.2 = specific_constant imports.%import_ref.8, @CompleteClass(constants.%i32) [template = constants.%F.2]
- // CHECK:STDOUT: %F.ref.loc7: %F.type.2 = name_ref F, %.loc7_11 [template = constants.%F.2]
- // CHECK:STDOUT: %F.specific_fn: <specific function> = specific_function %F.ref.loc7, @F.1(constants.%i32) [template = constants.%F.specific_fn]
- // CHECK:STDOUT: %F.call.loc7: init %i32 = call %F.specific_fn()
- // CHECK:STDOUT: %.loc7_15.1: %i32 = value_of_initializer %F.call.loc7
- // CHECK:STDOUT: %.loc7_15.2: %i32 = converted %F.call.loc7, %.loc7_15.1
- // CHECK:STDOUT: return %.loc7_15.2
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: generic fn @F.1(constants.%T: type) {
- // CHECK:STDOUT: !definition:
- // CHECK:STDOUT:
- // CHECK:STDOUT: fn() -> %i32;
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: fn @F.2() -> %CompleteClass.2;
- // CHECK:STDOUT:
- // CHECK:STDOUT: fn @UseField() -> %i32 {
- // CHECK:STDOUT: !entry:
- // CHECK:STDOUT: %CompleteClass.ref: %CompleteClass.type = name_ref CompleteClass, imports.%import_ref.2 [template = constants.%CompleteClass.generic]
- // CHECK:STDOUT: %int_32.loc11: Core.IntLiteral = int_value 32 [template = constants.%int_32]
- // CHECK:STDOUT: %int.make_type_signed.loc11: init type = call constants.%Int(%int_32.loc11) [template = constants.%i32]
- // CHECK:STDOUT: %.loc11_27.1: type = value_of_initializer %int.make_type_signed.loc11 [template = constants.%i32]
- // CHECK:STDOUT: %.loc11_27.2: type = converted %int.make_type_signed.loc11, %.loc11_27.1 [template = constants.%i32]
- // CHECK:STDOUT: %CompleteClass: type = class_type @CompleteClass, @CompleteClass(constants.%i32) [template = constants.%CompleteClass.2]
- // CHECK:STDOUT: %v.var: ref %CompleteClass.2 = var v
- // CHECK:STDOUT: %v: ref %CompleteClass.2 = bind_name v, %v.var
- // CHECK:STDOUT: %F.ref: %F.type.3 = name_ref F, imports.%import_ref.3 [template = constants.%F.3]
- // CHECK:STDOUT: %.loc11_7: ref %CompleteClass.2 = splice_block %v.var {}
- // CHECK:STDOUT: %F.call: init %CompleteClass.2 = call %F.ref() to %.loc11_7
- // CHECK:STDOUT: assign %v.var, %F.call
- // CHECK:STDOUT: %v.ref: ref %CompleteClass.2 = name_ref v, %v
- // CHECK:STDOUT: %n.ref: %CompleteClass.elem.2 = name_ref n, imports.%import_ref.7 [template = imports.%.1]
- // CHECK:STDOUT: %.loc12_11.1: ref %i32 = class_element_access %v.ref, element0
- // CHECK:STDOUT: %.loc12_11.2: %i32 = bind_value %.loc12_11.1
- // CHECK:STDOUT: return %.loc12_11.2
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: specific @CompleteClass(constants.%T) {
- // CHECK:STDOUT: %T => constants.%T
- // CHECK:STDOUT: %T.patt => constants.%T
- // CHECK:STDOUT:
- // CHECK:STDOUT: !definition:
- // CHECK:STDOUT: %CompleteClass => constants.%CompleteClass.1
- // CHECK:STDOUT: %CompleteClass.elem => constants.%CompleteClass.elem.1
- // CHECK:STDOUT: %F.type => constants.%F.type.1
- // CHECK:STDOUT: %F => constants.%F.1
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: specific @CompleteClass(%T) {
- // CHECK:STDOUT: %T => constants.%T
- // CHECK:STDOUT: %T.patt => constants.%T
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: specific @F.1(constants.%T) {}
- // CHECK:STDOUT:
- // CHECK:STDOUT: specific @CompleteClass(constants.%i32) {
- // CHECK:STDOUT: %T => constants.%i32
- // CHECK:STDOUT: %T.patt => constants.%i32
- // CHECK:STDOUT:
- // CHECK:STDOUT: !definition:
- // CHECK:STDOUT: %CompleteClass => constants.%CompleteClass.2
- // CHECK:STDOUT: %CompleteClass.elem => constants.%CompleteClass.elem.2
- // CHECK:STDOUT: %F.type => constants.%F.type.2
- // CHECK:STDOUT: %F => constants.%F.2
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: specific @F.1(constants.%i32) {
- // CHECK:STDOUT: !definition:
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: --- fail_generic_arg_mismatch.carbon
- // CHECK:STDOUT:
- // CHECK:STDOUT: constants {
- // CHECK:STDOUT: %Use.type: type = fn_type @Use [template]
- // CHECK:STDOUT: %Use: %Use.type = struct_value () [template]
- // CHECK:STDOUT: %CompleteClass.type: type = generic_class_type @CompleteClass [template]
- // CHECK:STDOUT: %CompleteClass.generic: %CompleteClass.type = struct_value () [template]
- // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template]
- // CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template]
- // CHECK:STDOUT: %struct_type.n: type = struct_type {.n: %i32} [template]
- // CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %struct_type.n [template]
- // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic]
- // CHECK:STDOUT: %CompleteClass.1: type = class_type @CompleteClass, @CompleteClass(%T) [symbolic]
- // CHECK:STDOUT: %T.patt: type = symbolic_binding_pattern T, 0 [symbolic]
- // CHECK:STDOUT: %CompleteClass.elem.1: type = unbound_element_type %CompleteClass.1, %i32 [symbolic]
- // CHECK:STDOUT: %F.type.1: type = fn_type @F.1, @CompleteClass(%T) [symbolic]
- // CHECK:STDOUT: %F.1: %F.type.1 = struct_value () [symbolic]
- // CHECK:STDOUT: %Int.type: type = fn_type @Int [template]
- // CHECK:STDOUT: %Int: %Int.type = struct_value () [template]
- // CHECK:STDOUT: %ptr.1: type = ptr_type %i32 [template]
- // CHECK:STDOUT: %CompleteClass.2: type = class_type @CompleteClass, @CompleteClass(%ptr.1) [template]
- // CHECK:STDOUT: %CompleteClass.elem.2: type = unbound_element_type %CompleteClass.2, %i32 [template]
- // CHECK:STDOUT: %F.type.2: type = fn_type @F.1, @CompleteClass(%ptr.1) [template]
- // CHECK:STDOUT: %F.2: %F.type.2 = struct_value () [template]
- // CHECK:STDOUT: %F.type.3: type = fn_type @F.2 [template]
- // CHECK:STDOUT: %F.3: %F.type.3 = struct_value () [template]
- // CHECK:STDOUT: %CompleteClass.3: type = class_type @CompleteClass, @CompleteClass(%i32) [template]
- // CHECK:STDOUT: %CompleteClass.elem.3: type = unbound_element_type %CompleteClass.3, %i32 [template]
- // CHECK:STDOUT: %F.type.4: type = fn_type @F.1, @CompleteClass(%i32) [template]
- // CHECK:STDOUT: %F.4: %F.type.4 = struct_value () [template]
- // CHECK:STDOUT: %Dest: type = bind_symbolic_name Dest, 0 [symbolic]
- // CHECK:STDOUT: %Dest.patt: type = symbolic_binding_pattern Dest, 0 [symbolic]
- // CHECK:STDOUT: %N: Core.IntLiteral = bind_symbolic_name N, 0 [symbolic]
- // CHECK:STDOUT: %iN: type = int_type signed, %N [symbolic]
- // CHECK:STDOUT: %ImplicitAs.type.4: type = facet_type <@ImplicitAs, @ImplicitAs(%iN)> [symbolic]
- // CHECK:STDOUT: %N.patt: Core.IntLiteral = symbolic_binding_pattern N, 0 [symbolic]
- // CHECK:STDOUT: %Convert.type.3: type = fn_type @Convert.2, @impl.1(%N) [symbolic]
- // CHECK:STDOUT: %Convert.3: %Convert.type.3 = struct_value () [symbolic]
- // CHECK:STDOUT: %interface.1: <witness> = interface_witness (%Convert.3) [symbolic]
- // CHECK:STDOUT: %uN: type = int_type unsigned, %N [symbolic]
- // CHECK:STDOUT: %ImplicitAs.type.5: type = facet_type <@ImplicitAs, @ImplicitAs(%uN)> [symbolic]
- // CHECK:STDOUT: %Convert.type.4: type = fn_type @Convert.3, @impl.2(%N) [symbolic]
- // CHECK:STDOUT: %Convert.4: %Convert.type.4 = struct_value () [symbolic]
- // CHECK:STDOUT: %interface.2: <witness> = interface_witness (%Convert.4) [symbolic]
- // CHECK:STDOUT: %ImplicitAs.type.6: type = facet_type <@ImplicitAs, @ImplicitAs(Core.IntLiteral)> [template]
- // CHECK:STDOUT: %Convert.type.5: type = fn_type @Convert.4, @impl.3(%N) [symbolic]
- // CHECK:STDOUT: %Convert.5: %Convert.type.5 = struct_value () [symbolic]
- // CHECK:STDOUT: %interface.3: <witness> = interface_witness (%Convert.5) [symbolic]
- // CHECK:STDOUT: %Convert.type.7: type = fn_type @Convert.5, @impl.4(%N) [symbolic]
- // CHECK:STDOUT: %Convert.7: %Convert.type.7 = struct_value () [symbolic]
- // CHECK:STDOUT: %interface.4: <witness> = interface_witness (%Convert.7) [symbolic]
- // CHECK:STDOUT: %As.type.2: type = facet_type <@As, @As(%Dest)> [symbolic]
- // CHECK:STDOUT: %Self.2: %As.type.2 = bind_symbolic_name Self, 1 [symbolic]
- // CHECK:STDOUT: %As.type.3: type = facet_type <@As, @As(%iN)> [symbolic]
- // CHECK:STDOUT: %Convert.type.8: type = fn_type @Convert.6, @As(%Dest) [symbolic]
- // CHECK:STDOUT: %Convert.8: %Convert.type.8 = struct_value () [symbolic]
- // CHECK:STDOUT: %Self.as_type.2: type = facet_access_type %Self.2 [symbolic]
- // CHECK:STDOUT: %Convert.assoc_type.4: type = assoc_entity_type %As.type.2, %Convert.type.8 [symbolic]
- // CHECK:STDOUT: %assoc0.5: %Convert.assoc_type.4 = assoc_entity element0, imports.%import_ref.34 [symbolic]
- // CHECK:STDOUT: %Convert.type.9: type = fn_type @Convert.7, @impl.5(%N) [symbolic]
- // CHECK:STDOUT: %Convert.9: %Convert.type.9 = struct_value () [symbolic]
- // CHECK:STDOUT: %interface.5: <witness> = interface_witness (%Convert.9) [symbolic]
- // CHECK:STDOUT: %As.type.4: type = facet_type <@As, @As(%uN)> [symbolic]
- // CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.8, @impl.6(%N) [symbolic]
- // CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [symbolic]
- // CHECK:STDOUT: %interface.6: <witness> = interface_witness (%Convert.10) [symbolic]
- // CHECK:STDOUT: %As.type.5: type = facet_type <@As, @As(Core.IntLiteral)> [template]
- // CHECK:STDOUT: %Convert.type.11: type = fn_type @Convert.9, @impl.7(%N) [symbolic]
- // CHECK:STDOUT: %Convert.11: %Convert.type.11 = struct_value () [symbolic]
- // CHECK:STDOUT: %interface.7: <witness> = interface_witness (%Convert.11) [symbolic]
- // CHECK:STDOUT: %Convert.type.12: type = fn_type @Convert.6, @As(Core.IntLiteral) [template]
- // CHECK:STDOUT: %Convert.12: %Convert.type.12 = struct_value () [template]
- // CHECK:STDOUT: %Convert.assoc_type.5: type = assoc_entity_type %As.type.5, %Convert.type.12 [template]
- // CHECK:STDOUT: %assoc0.6: %Convert.assoc_type.5 = assoc_entity element0, imports.%import_ref.41 [template]
- // CHECK:STDOUT: %Convert.type.13: type = fn_type @Convert.10, @impl.8(%N) [symbolic]
- // CHECK:STDOUT: %Convert.13: %Convert.type.13 = struct_value () [symbolic]
- // CHECK:STDOUT: %interface.8: <witness> = interface_witness (%Convert.13) [symbolic]
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: imports {
- // CHECK:STDOUT: %import_ref.1 = import_ref Main//foo, inst+9, unloaded
- // CHECK:STDOUT: %import_ref.2: %CompleteClass.type = import_ref Main//foo, inst+20, loaded [template = constants.%CompleteClass.generic]
- // CHECK:STDOUT: %import_ref.3: %F.type.3 = import_ref Main//foo, inst+362, loaded [template = constants.%F.3]
- // CHECK:STDOUT: %Core: <namespace> = namespace file.%Core.import, [template] {
- // CHECK:STDOUT: .Int = %import_ref.8
- // CHECK:STDOUT: .ImplicitAs = %import_ref.9
- // CHECK:STDOUT: import Core//prelude
- // CHECK:STDOUT: import Core//prelude/...
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %import_ref.4: <witness> = import_ref Main//foo, inst+54, loaded [template = constants.%complete_type]
- // CHECK:STDOUT: %import_ref.5 = import_ref Main//foo, inst+25, unloaded
- // CHECK:STDOUT: %import_ref.6 = import_ref Main//foo, inst+41, unloaded
- // CHECK:STDOUT: %import_ref.7 = import_ref Main//foo, inst+50, unloaded
- // CHECK:STDOUT: %import_ref.15: type = import_ref Main//foo, inst+112, loaded [template = Core.IntLiteral]
- // CHECK:STDOUT: %import_ref.16: type = import_ref Main//foo, inst+113, loaded [symbolic = @impl.1.%ImplicitAs.type (constants.%ImplicitAs.type.4)]
- // CHECK:STDOUT: %import_ref.17 = import_ref Main//foo, inst+114, unloaded
- // CHECK:STDOUT: %import_ref.18: type = import_ref Main//foo, inst+137, loaded [template = Core.IntLiteral]
- // CHECK:STDOUT: %import_ref.19: type = import_ref Main//foo, inst+138, loaded [symbolic = @impl.2.%ImplicitAs.type (constants.%ImplicitAs.type.5)]
- // CHECK:STDOUT: %import_ref.20 = import_ref Main//foo, inst+139, unloaded
- // CHECK:STDOUT: %import_ref.21: type = import_ref Main//foo, inst+161, loaded [symbolic = @impl.3.%iN (constants.%iN)]
- // CHECK:STDOUT: %import_ref.22: type = import_ref Main//foo, inst+162, loaded [template = constants.%ImplicitAs.type.6]
- // CHECK:STDOUT: %import_ref.23 = import_ref Main//foo, inst+163, unloaded
- // CHECK:STDOUT: %import_ref.25: type = import_ref Main//foo, inst+188, loaded [symbolic = @impl.4.%uN (constants.%uN)]
- // CHECK:STDOUT: %import_ref.26: type = import_ref Main//foo, inst+189, loaded [template = constants.%ImplicitAs.type.6]
- // CHECK:STDOUT: %import_ref.27 = import_ref Main//foo, inst+190, unloaded
- // CHECK:STDOUT: %import_ref.28 = import_ref Main//foo, inst+215, unloaded
- // CHECK:STDOUT: %import_ref.29 = import_ref Main//foo, inst+216, unloaded
- // CHECK:STDOUT: %import_ref.30 = import_ref Main//foo, inst+217, unloaded
- // CHECK:STDOUT: %import_ref.31: type = import_ref Main//foo, inst+221, loaded [template = Core.IntLiteral]
- // CHECK:STDOUT: %import_ref.32: type = import_ref Main//foo, inst+222, loaded [symbolic = @impl.5.%As.type (constants.%As.type.3)]
- // CHECK:STDOUT: %import_ref.33 = import_ref Main//foo, inst+223, unloaded
- // CHECK:STDOUT: %import_ref.34 = import_ref Main//foo, inst+235, unloaded
- // CHECK:STDOUT: %import_ref.35: type = import_ref Main//foo, inst+268, loaded [template = Core.IntLiteral]
- // CHECK:STDOUT: %import_ref.36: type = import_ref Main//foo, inst+269, loaded [symbolic = @impl.6.%As.type (constants.%As.type.4)]
- // CHECK:STDOUT: %import_ref.37 = import_ref Main//foo, inst+270, unloaded
- // CHECK:STDOUT: %import_ref.38: type = import_ref Main//foo, inst+292, loaded [symbolic = @impl.7.%iN (constants.%iN)]
- // CHECK:STDOUT: %import_ref.39: type = import_ref Main//foo, inst+293, loaded [template = constants.%As.type.5]
- // CHECK:STDOUT: %import_ref.40 = import_ref Main//foo, inst+294, unloaded
- // CHECK:STDOUT: %import_ref.42: type = import_ref Main//foo, inst+319, loaded [symbolic = @impl.8.%uN (constants.%uN)]
- // CHECK:STDOUT: %import_ref.43: type = import_ref Main//foo, inst+320, loaded [template = constants.%As.type.5]
- // CHECK:STDOUT: %import_ref.44 = import_ref Main//foo, inst+321, unloaded
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: file {
- // CHECK:STDOUT: package: <namespace> = namespace [template] {
- // CHECK:STDOUT: .Class = imports.%import_ref.1
- // CHECK:STDOUT: .CompleteClass = imports.%import_ref.2
- // CHECK:STDOUT: .F = imports.%import_ref.3
- // CHECK:STDOUT: .Core = imports.%Core
- // CHECK:STDOUT: .Use = %Use.decl
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %Core.import = import Core
- // CHECK:STDOUT: %default.import = import <invalid>
- // CHECK:STDOUT: %Use.decl: %Use.type = fn_decl @Use [template = constants.%Use] {} {}
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: generic interface @As(constants.%Dest: type) {
- // CHECK:STDOUT: %Dest: type = bind_symbolic_name Dest, 0 [symbolic = %Dest (constants.%Dest)]
- // CHECK:STDOUT: %Dest.patt: type = symbolic_binding_pattern Dest, 0 [symbolic = %Dest.patt (constants.%Dest.patt)]
- // CHECK:STDOUT:
- // CHECK:STDOUT: !definition:
- // CHECK:STDOUT: %As.type: type = facet_type <@As, @As(%Dest)> [symbolic = %As.type (constants.%As.type.2)]
- // CHECK:STDOUT: %Self: %As.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.2)]
- // CHECK:STDOUT: %Convert.type: type = fn_type @Convert.6, @As(%Dest) [symbolic = %Convert.type (constants.%Convert.type.8)]
- // CHECK:STDOUT: %Convert: @As.%Convert.type (%Convert.type.8) = struct_value () [symbolic = %Convert (constants.%Convert.8)]
- // CHECK:STDOUT: %Convert.assoc_type: type = assoc_entity_type @As.%As.type (%As.type.2), @As.%Convert.type (%Convert.type.8) [symbolic = %Convert.assoc_type (constants.%Convert.assoc_type.4)]
- // CHECK:STDOUT: %assoc0: @As.%Convert.assoc_type (%Convert.assoc_type.4) = assoc_entity element0, imports.%import_ref.34 [symbolic = %assoc0 (constants.%assoc0.5)]
- // CHECK:STDOUT:
- // CHECK:STDOUT: interface {
- // CHECK:STDOUT: !members:
- // CHECK:STDOUT: .Self = imports.%import_ref.28
- // CHECK:STDOUT: .Convert = imports.%import_ref.29
- // CHECK:STDOUT: witness = (imports.%import_ref.30)
- // CHECK:STDOUT: }
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: generic impl @impl.1(constants.%N: Core.IntLiteral) {
- // CHECK:STDOUT: %N: Core.IntLiteral = bind_symbolic_name N, 0 [symbolic = %N (constants.%N)]
- // CHECK:STDOUT: %N.patt: Core.IntLiteral = symbolic_binding_pattern N, 0 [symbolic = %N.patt (constants.%N.patt)]
- // CHECK:STDOUT: %iN: type = int_type signed, %N [symbolic = %iN (constants.%iN)]
- // CHECK:STDOUT: %ImplicitAs.type: type = facet_type <@ImplicitAs, @ImplicitAs(%iN)> [symbolic = %ImplicitAs.type (constants.%ImplicitAs.type.4)]
- // CHECK:STDOUT:
- // CHECK:STDOUT: !definition:
- // CHECK:STDOUT: %Convert.type: type = fn_type @Convert.2, @impl.1(%N) [symbolic = %Convert.type (constants.%Convert.type.3)]
- // CHECK:STDOUT: %Convert: @impl.1.%Convert.type (%Convert.type.3) = struct_value () [symbolic = %Convert (constants.%Convert.3)]
- // CHECK:STDOUT: %interface: <witness> = interface_witness (%Convert) [symbolic = %interface (constants.%interface.1)]
- // CHECK:STDOUT:
- // CHECK:STDOUT: impl: imports.%import_ref.15 as imports.%import_ref.16 {
- // CHECK:STDOUT: !members:
- // CHECK:STDOUT: witness = imports.%import_ref.17
- // CHECK:STDOUT: }
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: generic impl @impl.2(constants.%N: Core.IntLiteral) {
- // CHECK:STDOUT: %N: Core.IntLiteral = bind_symbolic_name N, 0 [symbolic = %N (constants.%N)]
- // CHECK:STDOUT: %N.patt: Core.IntLiteral = symbolic_binding_pattern N, 0 [symbolic = %N.patt (constants.%N.patt)]
- // CHECK:STDOUT: %uN: type = int_type unsigned, %N [symbolic = %uN (constants.%uN)]
- // CHECK:STDOUT: %ImplicitAs.type: type = facet_type <@ImplicitAs, @ImplicitAs(%uN)> [symbolic = %ImplicitAs.type (constants.%ImplicitAs.type.5)]
- // CHECK:STDOUT:
- // CHECK:STDOUT: !definition:
- // CHECK:STDOUT: %Convert.type: type = fn_type @Convert.3, @impl.2(%N) [symbolic = %Convert.type (constants.%Convert.type.4)]
- // CHECK:STDOUT: %Convert: @impl.2.%Convert.type (%Convert.type.4) = struct_value () [symbolic = %Convert (constants.%Convert.4)]
- // CHECK:STDOUT: %interface: <witness> = interface_witness (%Convert) [symbolic = %interface (constants.%interface.2)]
- // CHECK:STDOUT:
- // CHECK:STDOUT: impl: imports.%import_ref.18 as imports.%import_ref.19 {
- // CHECK:STDOUT: !members:
- // CHECK:STDOUT: witness = imports.%import_ref.20
- // CHECK:STDOUT: }
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: generic impl @impl.3(constants.%N: Core.IntLiteral) {
- // CHECK:STDOUT: %N: Core.IntLiteral = bind_symbolic_name N, 0 [symbolic = %N (constants.%N)]
- // CHECK:STDOUT: %N.patt: Core.IntLiteral = symbolic_binding_pattern N, 0 [symbolic = %N.patt (constants.%N.patt)]
- // CHECK:STDOUT: %iN: type = int_type signed, %N [symbolic = %iN (constants.%iN)]
- // CHECK:STDOUT:
- // CHECK:STDOUT: !definition:
- // CHECK:STDOUT: %Convert.type: type = fn_type @Convert.4, @impl.3(%N) [symbolic = %Convert.type (constants.%Convert.type.5)]
- // CHECK:STDOUT: %Convert: @impl.3.%Convert.type (%Convert.type.5) = struct_value () [symbolic = %Convert (constants.%Convert.5)]
- // CHECK:STDOUT: %interface: <witness> = interface_witness (%Convert) [symbolic = %interface (constants.%interface.3)]
- // CHECK:STDOUT:
- // CHECK:STDOUT: impl: imports.%import_ref.21 as imports.%import_ref.22 {
- // CHECK:STDOUT: !members:
- // CHECK:STDOUT: witness = imports.%import_ref.23
- // CHECK:STDOUT: }
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: generic impl @impl.4(constants.%N: Core.IntLiteral) {
- // CHECK:STDOUT: %N: Core.IntLiteral = bind_symbolic_name N, 0 [symbolic = %N (constants.%N)]
- // CHECK:STDOUT: %N.patt: Core.IntLiteral = symbolic_binding_pattern N, 0 [symbolic = %N.patt (constants.%N.patt)]
- // CHECK:STDOUT: %uN: type = int_type unsigned, %N [symbolic = %uN (constants.%uN)]
- // CHECK:STDOUT:
- // CHECK:STDOUT: !definition:
- // CHECK:STDOUT: %Convert.type: type = fn_type @Convert.5, @impl.4(%N) [symbolic = %Convert.type (constants.%Convert.type.7)]
- // CHECK:STDOUT: %Convert: @impl.4.%Convert.type (%Convert.type.7) = struct_value () [symbolic = %Convert (constants.%Convert.7)]
- // CHECK:STDOUT: %interface: <witness> = interface_witness (%Convert) [symbolic = %interface (constants.%interface.4)]
- // CHECK:STDOUT:
- // CHECK:STDOUT: impl: imports.%import_ref.25 as imports.%import_ref.26 {
- // CHECK:STDOUT: !members:
- // CHECK:STDOUT: witness = imports.%import_ref.27
- // CHECK:STDOUT: }
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: generic impl @impl.5(constants.%N: Core.IntLiteral) {
- // CHECK:STDOUT: %N: Core.IntLiteral = bind_symbolic_name N, 0 [symbolic = %N (constants.%N)]
- // CHECK:STDOUT: %N.patt: Core.IntLiteral = symbolic_binding_pattern N, 0 [symbolic = %N.patt (constants.%N.patt)]
- // CHECK:STDOUT: %iN: type = int_type signed, %N [symbolic = %iN (constants.%iN)]
- // CHECK:STDOUT: %As.type: type = facet_type <@As, @As(%iN)> [symbolic = %As.type (constants.%As.type.3)]
- // CHECK:STDOUT:
- // CHECK:STDOUT: !definition:
- // CHECK:STDOUT: %Convert.type: type = fn_type @Convert.7, @impl.5(%N) [symbolic = %Convert.type (constants.%Convert.type.9)]
- // CHECK:STDOUT: %Convert: @impl.5.%Convert.type (%Convert.type.9) = struct_value () [symbolic = %Convert (constants.%Convert.9)]
- // CHECK:STDOUT: %interface: <witness> = interface_witness (%Convert) [symbolic = %interface (constants.%interface.5)]
- // CHECK:STDOUT:
- // CHECK:STDOUT: impl: imports.%import_ref.31 as imports.%import_ref.32 {
- // CHECK:STDOUT: !members:
- // CHECK:STDOUT: witness = imports.%import_ref.33
- // CHECK:STDOUT: }
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: generic impl @impl.6(constants.%N: Core.IntLiteral) {
- // CHECK:STDOUT: %N: Core.IntLiteral = bind_symbolic_name N, 0 [symbolic = %N (constants.%N)]
- // CHECK:STDOUT: %N.patt: Core.IntLiteral = symbolic_binding_pattern N, 0 [symbolic = %N.patt (constants.%N.patt)]
- // CHECK:STDOUT: %uN: type = int_type unsigned, %N [symbolic = %uN (constants.%uN)]
- // CHECK:STDOUT: %As.type: type = facet_type <@As, @As(%uN)> [symbolic = %As.type (constants.%As.type.4)]
- // CHECK:STDOUT:
- // CHECK:STDOUT: !definition:
- // CHECK:STDOUT: %Convert.type: type = fn_type @Convert.8, @impl.6(%N) [symbolic = %Convert.type (constants.%Convert.type.10)]
- // CHECK:STDOUT: %Convert: @impl.6.%Convert.type (%Convert.type.10) = struct_value () [symbolic = %Convert (constants.%Convert.10)]
- // CHECK:STDOUT: %interface: <witness> = interface_witness (%Convert) [symbolic = %interface (constants.%interface.6)]
- // CHECK:STDOUT:
- // CHECK:STDOUT: impl: imports.%import_ref.35 as imports.%import_ref.36 {
- // CHECK:STDOUT: !members:
- // CHECK:STDOUT: witness = imports.%import_ref.37
- // CHECK:STDOUT: }
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: generic impl @impl.7(constants.%N: Core.IntLiteral) {
- // CHECK:STDOUT: %N: Core.IntLiteral = bind_symbolic_name N, 0 [symbolic = %N (constants.%N)]
- // CHECK:STDOUT: %N.patt: Core.IntLiteral = symbolic_binding_pattern N, 0 [symbolic = %N.patt (constants.%N.patt)]
- // CHECK:STDOUT: %iN: type = int_type signed, %N [symbolic = %iN (constants.%iN)]
- // CHECK:STDOUT:
- // CHECK:STDOUT: !definition:
- // CHECK:STDOUT: %Convert.type: type = fn_type @Convert.9, @impl.7(%N) [symbolic = %Convert.type (constants.%Convert.type.11)]
- // CHECK:STDOUT: %Convert: @impl.7.%Convert.type (%Convert.type.11) = struct_value () [symbolic = %Convert (constants.%Convert.11)]
- // CHECK:STDOUT: %interface: <witness> = interface_witness (%Convert) [symbolic = %interface (constants.%interface.7)]
- // CHECK:STDOUT:
- // CHECK:STDOUT: impl: imports.%import_ref.38 as imports.%import_ref.39 {
- // CHECK:STDOUT: !members:
- // CHECK:STDOUT: witness = imports.%import_ref.40
- // CHECK:STDOUT: }
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: generic impl @impl.8(constants.%N: Core.IntLiteral) {
- // CHECK:STDOUT: %N: Core.IntLiteral = bind_symbolic_name N, 0 [symbolic = %N (constants.%N)]
- // CHECK:STDOUT: %N.patt: Core.IntLiteral = symbolic_binding_pattern N, 0 [symbolic = %N.patt (constants.%N.patt)]
- // CHECK:STDOUT: %uN: type = int_type unsigned, %N [symbolic = %uN (constants.%uN)]
- // CHECK:STDOUT:
- // CHECK:STDOUT: !definition:
- // CHECK:STDOUT: %Convert.type: type = fn_type @Convert.10, @impl.8(%N) [symbolic = %Convert.type (constants.%Convert.type.13)]
- // CHECK:STDOUT: %Convert: @impl.8.%Convert.type (%Convert.type.13) = struct_value () [symbolic = %Convert (constants.%Convert.13)]
- // CHECK:STDOUT: %interface: <witness> = interface_witness (%Convert) [symbolic = %interface (constants.%interface.8)]
- // CHECK:STDOUT:
- // CHECK:STDOUT: impl: imports.%import_ref.42 as imports.%import_ref.43 {
- // CHECK:STDOUT: !members:
- // CHECK:STDOUT: witness = imports.%import_ref.44
- // CHECK:STDOUT: }
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: generic class @CompleteClass(constants.%T: type) {
- // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic = %T (constants.%T)]
- // CHECK:STDOUT: %T.patt: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt (constants.%T.patt)]
- // CHECK:STDOUT:
- // CHECK:STDOUT: !definition:
- // CHECK:STDOUT: %CompleteClass: type = class_type @CompleteClass, @CompleteClass(%T) [symbolic = %CompleteClass (constants.%CompleteClass.1)]
- // CHECK:STDOUT: %CompleteClass.elem: type = unbound_element_type @CompleteClass.%CompleteClass (%CompleteClass.1), %i32 [symbolic = %CompleteClass.elem (constants.%CompleteClass.elem.1)]
- // CHECK:STDOUT: %F.type: type = fn_type @F.1, @CompleteClass(%T) [symbolic = %F.type (constants.%F.type.1)]
- // CHECK:STDOUT: %F: @CompleteClass.%F.type (%F.type.1) = struct_value () [symbolic = %F (constants.%F.1)]
- // CHECK:STDOUT:
- // CHECK:STDOUT: class {
- // CHECK:STDOUT: !members:
- // CHECK:STDOUT: .Self = imports.%import_ref.5
- // CHECK:STDOUT: .n = imports.%import_ref.6
- // CHECK:STDOUT: .F = imports.%import_ref.7
- // CHECK:STDOUT: complete_type_witness = imports.%import_ref.4
- // CHECK:STDOUT: }
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: fn @Use() {
- // CHECK:STDOUT: !entry:
- // CHECK:STDOUT: %CompleteClass.ref: %CompleteClass.type = name_ref CompleteClass, imports.%import_ref.2 [template = constants.%CompleteClass.generic]
- // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32]
- // CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32]
- // CHECK:STDOUT: %.loc14_27.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32]
- // CHECK:STDOUT: %.loc14_27.2: type = converted %int.make_type_signed, %.loc14_27.1 [template = constants.%i32]
- // CHECK:STDOUT: %ptr: type = ptr_type %i32 [template = constants.%ptr.1]
- // CHECK:STDOUT: %CompleteClass: type = class_type @CompleteClass, @CompleteClass(constants.%ptr.1) [template = constants.%CompleteClass.2]
- // CHECK:STDOUT: %v.var: ref %CompleteClass.2 = var v
- // CHECK:STDOUT: %v: ref %CompleteClass.2 = bind_name v, %v.var
- // CHECK:STDOUT: %F.ref: %F.type.3 = name_ref F, imports.%import_ref.3 [template = constants.%F.3]
- // CHECK:STDOUT: %.loc14_34: ref %CompleteClass.3 = temporary_storage
- // CHECK:STDOUT: %F.call: init %CompleteClass.3 = call %F.ref() to %.loc14_34
- // CHECK:STDOUT: %.loc14_35: %CompleteClass.2 = converted %F.call, <error> [template = <error>]
- // CHECK:STDOUT: assign %v.var, <error>
- // CHECK:STDOUT: return
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: generic fn @F.1(constants.%T: type) {
- // CHECK:STDOUT: !definition:
- // CHECK:STDOUT:
- // CHECK:STDOUT: fn() -> %i32;
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: fn @F.2() -> %CompleteClass.3;
- // CHECK:STDOUT:
- // CHECK:STDOUT: generic fn @Convert.2(constants.%N: Core.IntLiteral) {
- // CHECK:STDOUT: %N: Core.IntLiteral = bind_symbolic_name N, 0 [symbolic = %N (constants.%N)]
- // CHECK:STDOUT: %iN: type = int_type signed, %N [symbolic = %iN (constants.%iN)]
- // CHECK:STDOUT:
- // CHECK:STDOUT: !definition:
- // CHECK:STDOUT:
- // CHECK:STDOUT: fn[%self.param_patt: Core.IntLiteral]() -> @Convert.2.%iN (%iN) = "int.convert_checked";
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: generic fn @Convert.3(constants.%N: Core.IntLiteral) {
- // CHECK:STDOUT: %N: Core.IntLiteral = bind_symbolic_name N, 0 [symbolic = %N (constants.%N)]
- // CHECK:STDOUT: %uN: type = int_type unsigned, %N [symbolic = %uN (constants.%uN)]
- // CHECK:STDOUT:
- // CHECK:STDOUT: !definition:
- // CHECK:STDOUT:
- // CHECK:STDOUT: fn[%self.param_patt: Core.IntLiteral]() -> @Convert.3.%uN (%uN) = "int.convert_checked";
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: generic fn @Convert.4(constants.%N: Core.IntLiteral) {
- // CHECK:STDOUT: %N: Core.IntLiteral = bind_symbolic_name N, 0 [symbolic = %N (constants.%N)]
- // CHECK:STDOUT: %iN: type = int_type signed, %N [symbolic = %iN (constants.%iN)]
- // CHECK:STDOUT:
- // CHECK:STDOUT: !definition:
- // CHECK:STDOUT:
- // CHECK:STDOUT: fn[%self.param_patt: @Convert.4.%iN (%iN)]() -> Core.IntLiteral = "int.convert_checked";
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: generic fn @Convert.5(constants.%N: Core.IntLiteral) {
- // CHECK:STDOUT: %N: Core.IntLiteral = bind_symbolic_name N, 0 [symbolic = %N (constants.%N)]
- // CHECK:STDOUT: %uN: type = int_type unsigned, %N [symbolic = %uN (constants.%uN)]
- // CHECK:STDOUT:
- // CHECK:STDOUT: !definition:
- // CHECK:STDOUT:
- // CHECK:STDOUT: fn[%self.param_patt: @Convert.5.%uN (%uN)]() -> Core.IntLiteral = "int.convert_checked";
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: generic fn @Convert.6(constants.%Dest: type, constants.%Self.2: %As.type.2) {
- // CHECK:STDOUT: %Dest: type = bind_symbolic_name Dest, 0 [symbolic = %Dest (constants.%Dest)]
- // CHECK:STDOUT: %As.type: type = facet_type <@As, @As(%Dest)> [symbolic = %As.type (constants.%As.type.2)]
- // CHECK:STDOUT: %Self: %As.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.2)]
- // CHECK:STDOUT: %Self.as_type: type = facet_access_type %Self [symbolic = %Self.as_type (constants.%Self.as_type.2)]
- // CHECK:STDOUT:
- // CHECK:STDOUT: fn[%self.param_patt: @Convert.6.%Self.as_type (%Self.as_type.2)]() -> @Convert.6.%Dest (%Dest);
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: generic fn @Convert.7(constants.%N: Core.IntLiteral) {
- // CHECK:STDOUT: %N: Core.IntLiteral = bind_symbolic_name N, 0 [symbolic = %N (constants.%N)]
- // CHECK:STDOUT: %iN: type = int_type signed, %N [symbolic = %iN (constants.%iN)]
- // CHECK:STDOUT:
- // CHECK:STDOUT: !definition:
- // CHECK:STDOUT:
- // CHECK:STDOUT: fn[%self.param_patt: Core.IntLiteral]() -> @Convert.7.%iN (%iN) = "int.convert_checked";
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: generic fn @Convert.8(constants.%N: Core.IntLiteral) {
- // CHECK:STDOUT: %N: Core.IntLiteral = bind_symbolic_name N, 0 [symbolic = %N (constants.%N)]
- // CHECK:STDOUT: %uN: type = int_type unsigned, %N [symbolic = %uN (constants.%uN)]
- // CHECK:STDOUT:
- // CHECK:STDOUT: !definition:
- // CHECK:STDOUT:
- // CHECK:STDOUT: fn[%self.param_patt: Core.IntLiteral]() -> @Convert.8.%uN (%uN) = "int.convert_checked";
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: generic fn @Convert.9(constants.%N: Core.IntLiteral) {
- // CHECK:STDOUT: %N: Core.IntLiteral = bind_symbolic_name N, 0 [symbolic = %N (constants.%N)]
- // CHECK:STDOUT: %iN: type = int_type signed, %N [symbolic = %iN (constants.%iN)]
- // CHECK:STDOUT:
- // CHECK:STDOUT: !definition:
- // CHECK:STDOUT:
- // CHECK:STDOUT: fn[%self.param_patt: @Convert.9.%iN (%iN)]() -> Core.IntLiteral = "int.convert_checked";
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: generic fn @Convert.10(constants.%N: Core.IntLiteral) {
- // CHECK:STDOUT: %N: Core.IntLiteral = bind_symbolic_name N, 0 [symbolic = %N (constants.%N)]
- // CHECK:STDOUT: %uN: type = int_type unsigned, %N [symbolic = %uN (constants.%uN)]
- // CHECK:STDOUT:
- // CHECK:STDOUT: !definition:
- // CHECK:STDOUT:
- // CHECK:STDOUT: fn[%self.param_patt: @Convert.10.%uN (%uN)]() -> Core.IntLiteral = "int.convert_checked";
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: specific @CompleteClass(constants.%T) {
- // CHECK:STDOUT: %T => constants.%T
- // CHECK:STDOUT: %T.patt => constants.%T
- // CHECK:STDOUT:
- // CHECK:STDOUT: !definition:
- // CHECK:STDOUT: %CompleteClass => constants.%CompleteClass.1
- // CHECK:STDOUT: %CompleteClass.elem => constants.%CompleteClass.elem.1
- // CHECK:STDOUT: %F.type => constants.%F.type.1
- // CHECK:STDOUT: %F => constants.%F.1
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: specific @CompleteClass(%T) {
- // CHECK:STDOUT: %T => constants.%T
- // CHECK:STDOUT: %T.patt => constants.%T
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: specific @F.1(constants.%T) {}
- // CHECK:STDOUT:
- // CHECK:STDOUT: specific @CompleteClass(constants.%ptr.1) {
- // CHECK:STDOUT: %T => constants.%ptr.1
- // CHECK:STDOUT: %T.patt => constants.%ptr.1
- // CHECK:STDOUT:
- // CHECK:STDOUT: !definition:
- // CHECK:STDOUT: %CompleteClass => constants.%CompleteClass.2
- // CHECK:STDOUT: %CompleteClass.elem => constants.%CompleteClass.elem.2
- // CHECK:STDOUT: %F.type => constants.%F.type.2
- // CHECK:STDOUT: %F => constants.%F.2
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: specific @CompleteClass(constants.%i32) {
- // CHECK:STDOUT: %T => constants.%i32
- // CHECK:STDOUT: %T.patt => constants.%i32
- // CHECK:STDOUT:
- // CHECK:STDOUT: !definition:
- // CHECK:STDOUT: %CompleteClass => constants.%CompleteClass.3
- // CHECK:STDOUT: %CompleteClass.elem => constants.%CompleteClass.elem.3
- // CHECK:STDOUT: %F.type => constants.%F.type.4
- // CHECK:STDOUT: %F => constants.%F.4
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: specific @impl.1(constants.%N) {
- // CHECK:STDOUT: %N => constants.%N
- // CHECK:STDOUT: %N.patt => constants.%N
- // CHECK:STDOUT: %iN => constants.%iN
- // CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.4
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: specific @impl.1(%N) {
- // CHECK:STDOUT: %N => constants.%N
- // CHECK:STDOUT: %N.patt => constants.%N
- // CHECK:STDOUT: %iN => constants.%iN
- // CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.4
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: specific @Convert.2(constants.%N) {
- // CHECK:STDOUT: %N => constants.%N
- // CHECK:STDOUT: %iN => constants.%iN
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: specific @impl.2(constants.%N) {
- // CHECK:STDOUT: %N => constants.%N
- // CHECK:STDOUT: %N.patt => constants.%N
- // CHECK:STDOUT: %uN => constants.%uN
- // CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.5
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: specific @impl.2(%N) {
- // CHECK:STDOUT: %N => constants.%N
- // CHECK:STDOUT: %N.patt => constants.%N
- // CHECK:STDOUT: %uN => constants.%uN
- // CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.5
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: specific @Convert.3(constants.%N) {
- // CHECK:STDOUT: %N => constants.%N
- // CHECK:STDOUT: %uN => constants.%uN
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: specific @impl.3(constants.%N) {
- // CHECK:STDOUT: %N => constants.%N
- // CHECK:STDOUT: %N.patt => constants.%N
- // CHECK:STDOUT: %iN => constants.%iN
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: specific @impl.3(%N) {
- // CHECK:STDOUT: %N => constants.%N
- // CHECK:STDOUT: %N.patt => constants.%N
- // CHECK:STDOUT: %iN => constants.%iN
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: specific @Convert.4(constants.%N) {
- // CHECK:STDOUT: %N => constants.%N
- // CHECK:STDOUT: %iN => constants.%iN
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: specific @impl.4(constants.%N) {
- // CHECK:STDOUT: %N => constants.%N
- // CHECK:STDOUT: %N.patt => constants.%N
- // CHECK:STDOUT: %uN => constants.%uN
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: specific @impl.4(%N) {
- // CHECK:STDOUT: %N => constants.%N
- // CHECK:STDOUT: %N.patt => constants.%N
- // CHECK:STDOUT: %uN => constants.%uN
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: specific @Convert.5(constants.%N) {
- // CHECK:STDOUT: %N => constants.%N
- // CHECK:STDOUT: %uN => constants.%uN
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: specific @As(constants.%Dest) {
- // CHECK:STDOUT: %Dest => constants.%Dest
- // CHECK:STDOUT: %Dest.patt => constants.%Dest
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: specific @As(constants.%iN) {
- // CHECK:STDOUT: %Dest => constants.%iN
- // CHECK:STDOUT: %Dest.patt => constants.%iN
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: specific @As(%Dest) {
- // CHECK:STDOUT: %Dest => constants.%Dest
- // CHECK:STDOUT: %Dest.patt => constants.%Dest
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: specific @As(@impl.5.%iN) {
- // CHECK:STDOUT: %Dest => constants.%iN
- // CHECK:STDOUT: %Dest.patt => constants.%iN
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: specific @impl.5(constants.%N) {
- // CHECK:STDOUT: %N => constants.%N
- // CHECK:STDOUT: %N.patt => constants.%N
- // CHECK:STDOUT: %iN => constants.%iN
- // CHECK:STDOUT: %As.type => constants.%As.type.3
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: specific @impl.5(%N) {
- // CHECK:STDOUT: %N => constants.%N
- // CHECK:STDOUT: %N.patt => constants.%N
- // CHECK:STDOUT: %iN => constants.%iN
- // CHECK:STDOUT: %As.type => constants.%As.type.3
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: specific @As(@Convert.6.%Dest) {
- // CHECK:STDOUT: %Dest => constants.%Dest
- // CHECK:STDOUT: %Dest.patt => constants.%Dest
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: specific @Convert.6(constants.%Dest, constants.%Self.2) {
- // CHECK:STDOUT: %Dest => constants.%Dest
- // CHECK:STDOUT: %As.type => constants.%As.type.2
- // CHECK:STDOUT: %Self => constants.%Self.2
- // CHECK:STDOUT: %Self.as_type => constants.%Self.as_type.2
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: specific @Convert.7(constants.%N) {
- // CHECK:STDOUT: %N => constants.%N
- // CHECK:STDOUT: %iN => constants.%iN
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: specific @As(constants.%uN) {
- // CHECK:STDOUT: %Dest => constants.%uN
- // CHECK:STDOUT: %Dest.patt => constants.%uN
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: specific @As(@impl.6.%uN) {
- // CHECK:STDOUT: %Dest => constants.%uN
- // CHECK:STDOUT: %Dest.patt => constants.%uN
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: specific @impl.6(constants.%N) {
- // CHECK:STDOUT: %N => constants.%N
- // CHECK:STDOUT: %N.patt => constants.%N
- // CHECK:STDOUT: %uN => constants.%uN
- // CHECK:STDOUT: %As.type => constants.%As.type.4
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: specific @impl.6(%N) {
- // CHECK:STDOUT: %N => constants.%N
- // CHECK:STDOUT: %N.patt => constants.%N
- // CHECK:STDOUT: %uN => constants.%uN
- // CHECK:STDOUT: %As.type => constants.%As.type.4
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: specific @Convert.8(constants.%N) {
- // CHECK:STDOUT: %N => constants.%N
- // CHECK:STDOUT: %uN => constants.%uN
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: specific @As(Core.IntLiteral) {
- // CHECK:STDOUT: %Dest => Core.IntLiteral
- // CHECK:STDOUT: %Dest.patt => Core.IntLiteral
- // CHECK:STDOUT:
- // CHECK:STDOUT: !definition:
- // CHECK:STDOUT: %As.type => constants.%As.type.5
- // CHECK:STDOUT: %Self => constants.%Self.2
- // CHECK:STDOUT: %Convert.type => constants.%Convert.type.12
- // CHECK:STDOUT: %Convert => constants.%Convert.12
- // CHECK:STDOUT: %Convert.assoc_type => constants.%Convert.assoc_type.5
- // CHECK:STDOUT: %assoc0 => constants.%assoc0.6
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: specific @impl.7(constants.%N) {
- // CHECK:STDOUT: %N => constants.%N
- // CHECK:STDOUT: %N.patt => constants.%N
- // CHECK:STDOUT: %iN => constants.%iN
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: specific @impl.7(%N) {
- // CHECK:STDOUT: %N => constants.%N
- // CHECK:STDOUT: %N.patt => constants.%N
- // CHECK:STDOUT: %iN => constants.%iN
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: specific @Convert.9(constants.%N) {
- // CHECK:STDOUT: %N => constants.%N
- // CHECK:STDOUT: %iN => constants.%iN
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: specific @impl.8(constants.%N) {
- // CHECK:STDOUT: %N => constants.%N
- // CHECK:STDOUT: %N.patt => constants.%N
- // CHECK:STDOUT: %uN => constants.%uN
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: specific @impl.8(%N) {
- // CHECK:STDOUT: %N => constants.%N
- // CHECK:STDOUT: %N.patt => constants.%N
- // CHECK:STDOUT: %uN => constants.%uN
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: specific @Convert.10(constants.%N) {
- // CHECK:STDOUT: %N => constants.%N
- // CHECK:STDOUT: %uN => constants.%uN
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: --- fail_foo.impl.carbon
- // CHECK:STDOUT:
- // CHECK:STDOUT: constants {
- // CHECK:STDOUT: %N: Core.IntLiteral = bind_symbolic_name N, 0 [symbolic]
- // CHECK:STDOUT: %iN: type = int_type signed, %N [symbolic]
- // CHECK:STDOUT: %Dest: type = bind_symbolic_name Dest, 0 [symbolic]
- // CHECK:STDOUT: %ImplicitAs.type.2: type = facet_type <@ImplicitAs, @ImplicitAs(%Dest)> [symbolic]
- // CHECK:STDOUT: %Self.1: %ImplicitAs.type.2 = bind_symbolic_name Self, 1 [symbolic]
- // CHECK:STDOUT: %Dest.patt: type = symbolic_binding_pattern Dest, 0 [symbolic]
- // CHECK:STDOUT: %ImplicitAs.type.3: type = facet_type <@ImplicitAs, @ImplicitAs(%iN)> [symbolic]
- // CHECK:STDOUT: %N.patt: Core.IntLiteral = symbolic_binding_pattern N, 0 [symbolic]
- // CHECK:STDOUT: %Convert.type.1: type = fn_type @Convert.1, @ImplicitAs(%Dest) [symbolic]
- // CHECK:STDOUT: %Convert.1: %Convert.type.1 = struct_value () [symbolic]
- // CHECK:STDOUT: %Self.as_type.1: type = facet_access_type %Self.1 [symbolic]
- // CHECK:STDOUT: %Convert.assoc_type.1: type = assoc_entity_type %ImplicitAs.type.2, %Convert.type.1 [symbolic]
- // CHECK:STDOUT: %assoc0.1: %Convert.assoc_type.1 = assoc_entity element0, imports.%import_ref.10 [symbolic]
- // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.2, @impl.1(%N) [symbolic]
- // CHECK:STDOUT: %Convert.2: %Convert.type.2 = struct_value () [symbolic]
- // CHECK:STDOUT: %interface.1: <witness> = interface_witness (%Convert.2) [symbolic]
- // CHECK:STDOUT: %uN: type = int_type unsigned, %N [symbolic]
- // CHECK:STDOUT: %ImplicitAs.type.4: type = facet_type <@ImplicitAs, @ImplicitAs(%uN)> [symbolic]
- // CHECK:STDOUT: %Convert.type.3: type = fn_type @Convert.3, @impl.2(%N) [symbolic]
- // CHECK:STDOUT: %Convert.3: %Convert.type.3 = struct_value () [symbolic]
- // CHECK:STDOUT: %interface.2: <witness> = interface_witness (%Convert.3) [symbolic]
- // CHECK:STDOUT: %ImplicitAs.type.5: type = facet_type <@ImplicitAs, @ImplicitAs(Core.IntLiteral)> [template]
- // CHECK:STDOUT: %Convert.type.4: type = fn_type @Convert.4, @impl.3(%N) [symbolic]
- // CHECK:STDOUT: %Convert.4: %Convert.type.4 = struct_value () [symbolic]
- // CHECK:STDOUT: %interface.3: <witness> = interface_witness (%Convert.4) [symbolic]
- // CHECK:STDOUT: %Convert.type.5: type = fn_type @Convert.1, @ImplicitAs(Core.IntLiteral) [template]
- // CHECK:STDOUT: %Convert.5: %Convert.type.5 = struct_value () [template]
- // CHECK:STDOUT: %Convert.assoc_type.2: type = assoc_entity_type %ImplicitAs.type.5, %Convert.type.5 [template]
- // CHECK:STDOUT: %assoc0.2: %Convert.assoc_type.2 = assoc_entity element0, imports.%import_ref.17 [template]
- // CHECK:STDOUT: %Convert.type.6: type = fn_type @Convert.5, @impl.4(%N) [symbolic]
- // CHECK:STDOUT: %Convert.6: %Convert.type.6 = struct_value () [symbolic]
- // CHECK:STDOUT: %interface.4: <witness> = interface_witness (%Convert.6) [symbolic]
- // CHECK:STDOUT: %As.type.2: type = facet_type <@As, @As(%Dest)> [symbolic]
- // CHECK:STDOUT: %Self.2: %As.type.2 = bind_symbolic_name Self, 1 [symbolic]
- // CHECK:STDOUT: %As.type.3: type = facet_type <@As, @As(%iN)> [symbolic]
- // CHECK:STDOUT: %Convert.type.7: type = fn_type @Convert.6, @As(%Dest) [symbolic]
- // CHECK:STDOUT: %Convert.7: %Convert.type.7 = struct_value () [symbolic]
- // CHECK:STDOUT: %Self.as_type.2: type = facet_access_type %Self.2 [symbolic]
- // CHECK:STDOUT: %Convert.assoc_type.3: type = assoc_entity_type %As.type.2, %Convert.type.7 [symbolic]
- // CHECK:STDOUT: %assoc0.3: %Convert.assoc_type.3 = assoc_entity element0, imports.%import_ref.27 [symbolic]
- // CHECK:STDOUT: %Convert.type.8: type = fn_type @Convert.7, @impl.5(%N) [symbolic]
- // CHECK:STDOUT: %Convert.8: %Convert.type.8 = struct_value () [symbolic]
- // CHECK:STDOUT: %interface.5: <witness> = interface_witness (%Convert.8) [symbolic]
- // CHECK:STDOUT: %As.type.4: type = facet_type <@As, @As(%uN)> [symbolic]
- // CHECK:STDOUT: %Convert.type.9: type = fn_type @Convert.8, @impl.6(%N) [symbolic]
- // CHECK:STDOUT: %Convert.9: %Convert.type.9 = struct_value () [symbolic]
- // CHECK:STDOUT: %interface.6: <witness> = interface_witness (%Convert.9) [symbolic]
- // CHECK:STDOUT: %As.type.5: type = facet_type <@As, @As(Core.IntLiteral)> [template]
- // CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.9, @impl.7(%N) [symbolic]
- // CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [symbolic]
- // CHECK:STDOUT: %interface.7: <witness> = interface_witness (%Convert.10) [symbolic]
- // CHECK:STDOUT: %Convert.type.11: type = fn_type @Convert.6, @As(Core.IntLiteral) [template]
- // CHECK:STDOUT: %Convert.11: %Convert.type.11 = struct_value () [template]
- // CHECK:STDOUT: %Convert.assoc_type.4: type = assoc_entity_type %As.type.5, %Convert.type.11 [template]
- // CHECK:STDOUT: %assoc0.4: %Convert.assoc_type.4 = assoc_entity element0, imports.%import_ref.34 [template]
- // CHECK:STDOUT: %Convert.type.12: type = fn_type @Convert.10, @impl.8(%N) [symbolic]
- // CHECK:STDOUT: %Convert.12: %Convert.type.12 = struct_value () [symbolic]
- // CHECK:STDOUT: %interface.8: <witness> = interface_witness (%Convert.12) [symbolic]
- // CHECK:STDOUT: %U: type = bind_symbolic_name U, 0 [symbolic]
- // CHECK:STDOUT: %U.patt: type = symbolic_binding_pattern U, 0 [symbolic]
- // CHECK:STDOUT: %Class.type: type = generic_class_type @Class [template]
- // CHECK:STDOUT: %Class.generic: %Class.type = struct_value () [template]
- // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic]
- // CHECK:STDOUT: %T.patt: type = symbolic_binding_pattern T, 0 [symbolic]
- // CHECK:STDOUT: %.type: type = generic_class_type @.1 [template]
- // CHECK:STDOUT: %.generic: %.type = struct_value () [template]
- // CHECK:STDOUT: %.1: type = class_type @.1, @.1(%U) [symbolic]
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: imports {
- // CHECK:STDOUT: %import_ref.1: %Class.type = import_ref Main//foo, inst+9, loaded [template = constants.%Class.generic]
- // CHECK:STDOUT: %import_ref.2 = import_ref Main//foo, inst+20, unloaded
- // CHECK:STDOUT: %import_ref.3 = import_ref Main//foo, inst+362, unloaded
- // CHECK:STDOUT: %Core: <namespace> = namespace file.%Core.import, [template] {
- // CHECK:STDOUT: import Core//prelude
- // CHECK:STDOUT: import Core//prelude/...
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %import_ref.4 = import_ref Main//foo, inst+72, unloaded
- // CHECK:STDOUT: %import_ref.5 = import_ref Main//foo, inst+73, unloaded
- // CHECK:STDOUT: %import_ref.6 = import_ref Main//foo, inst+74, unloaded
- // CHECK:STDOUT: %import_ref.7: type = import_ref Main//foo, inst+112, loaded [template = Core.IntLiteral]
- // CHECK:STDOUT: %import_ref.8: type = import_ref Main//foo, inst+113, loaded [symbolic = @impl.1.%ImplicitAs.type (constants.%ImplicitAs.type.3)]
- // CHECK:STDOUT: %import_ref.9 = import_ref Main//foo, inst+114, unloaded
- // CHECK:STDOUT: %import_ref.10 = import_ref Main//foo, inst+86, unloaded
- // CHECK:STDOUT: %import_ref.11: type = import_ref Main//foo, inst+137, loaded [template = Core.IntLiteral]
- // CHECK:STDOUT: %import_ref.12: type = import_ref Main//foo, inst+138, loaded [symbolic = @impl.2.%ImplicitAs.type (constants.%ImplicitAs.type.4)]
- // CHECK:STDOUT: %import_ref.13 = import_ref Main//foo, inst+139, unloaded
- // CHECK:STDOUT: %import_ref.14: type = import_ref Main//foo, inst+161, loaded [symbolic = @impl.3.%iN (constants.%iN)]
- // CHECK:STDOUT: %import_ref.15: type = import_ref Main//foo, inst+162, loaded [template = constants.%ImplicitAs.type.5]
- // CHECK:STDOUT: %import_ref.16 = import_ref Main//foo, inst+163, unloaded
- // CHECK:STDOUT: %import_ref.18: type = import_ref Main//foo, inst+188, loaded [symbolic = @impl.4.%uN (constants.%uN)]
- // CHECK:STDOUT: %import_ref.19: type = import_ref Main//foo, inst+189, loaded [template = constants.%ImplicitAs.type.5]
- // CHECK:STDOUT: %import_ref.20 = import_ref Main//foo, inst+190, unloaded
- // CHECK:STDOUT: %import_ref.21 = import_ref Main//foo, inst+215, unloaded
- // CHECK:STDOUT: %import_ref.22 = import_ref Main//foo, inst+216, unloaded
- // CHECK:STDOUT: %import_ref.23 = import_ref Main//foo, inst+217, unloaded
- // CHECK:STDOUT: %import_ref.24: type = import_ref Main//foo, inst+221, loaded [template = Core.IntLiteral]
- // CHECK:STDOUT: %import_ref.25: type = import_ref Main//foo, inst+222, loaded [symbolic = @impl.5.%As.type (constants.%As.type.3)]
- // CHECK:STDOUT: %import_ref.26 = import_ref Main//foo, inst+223, unloaded
- // CHECK:STDOUT: %import_ref.27 = import_ref Main//foo, inst+235, unloaded
- // CHECK:STDOUT: %import_ref.28: type = import_ref Main//foo, inst+268, loaded [template = Core.IntLiteral]
- // CHECK:STDOUT: %import_ref.29: type = import_ref Main//foo, inst+269, loaded [symbolic = @impl.6.%As.type (constants.%As.type.4)]
- // CHECK:STDOUT: %import_ref.30 = import_ref Main//foo, inst+270, unloaded
- // CHECK:STDOUT: %import_ref.31: type = import_ref Main//foo, inst+292, loaded [symbolic = @impl.7.%iN (constants.%iN)]
- // CHECK:STDOUT: %import_ref.32: type = import_ref Main//foo, inst+293, loaded [template = constants.%As.type.5]
- // CHECK:STDOUT: %import_ref.33 = import_ref Main//foo, inst+294, unloaded
- // CHECK:STDOUT: %import_ref.35: type = import_ref Main//foo, inst+319, loaded [symbolic = @impl.8.%uN (constants.%uN)]
- // CHECK:STDOUT: %import_ref.36: type = import_ref Main//foo, inst+320, loaded [template = constants.%As.type.5]
- // CHECK:STDOUT: %import_ref.37 = import_ref Main//foo, inst+321, unloaded
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: file {
- // CHECK:STDOUT: package: <namespace> = namespace [template] {
- // CHECK:STDOUT: .Class = imports.%import_ref.1
- // CHECK:STDOUT: .CompleteClass = imports.%import_ref.2
- // CHECK:STDOUT: .F = imports.%import_ref.3
- // CHECK:STDOUT: .Core = imports.%Core
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %default.import.loc2_6.1 = import <invalid>
- // CHECK:STDOUT: %default.import.loc2_6.2 = import <invalid>
- // CHECK:STDOUT: %Core.import = import Core
- // CHECK:STDOUT: %.decl: %.type = class_decl @.1 [template = constants.%.generic] {
- // CHECK:STDOUT: %U.patt.loc12_13.1: type = symbolic_binding_pattern U, 0 [symbolic = %U.patt.loc12_13.2 (constants.%U.patt)]
- // CHECK:STDOUT: %U.param_patt: type = value_param_pattern %U.patt.loc12_13.1, runtime_param<invalid> [symbolic = %U.patt.loc12_13.2 (constants.%U.patt)]
- // CHECK:STDOUT: } {
- // CHECK:STDOUT: %U.param: type = value_param runtime_param<invalid>
- // CHECK:STDOUT: %U.loc12_13.1: type = bind_symbolic_name U, 0, %U.param [symbolic = %U.loc12_13.2 (constants.%U)]
- // CHECK:STDOUT: }
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: generic interface @ImplicitAs(constants.%Dest: type) {
- // CHECK:STDOUT: %Dest: type = bind_symbolic_name Dest, 0 [symbolic = %Dest (constants.%Dest)]
- // CHECK:STDOUT: %Dest.patt: type = symbolic_binding_pattern Dest, 0 [symbolic = %Dest.patt (constants.%Dest.patt)]
- // CHECK:STDOUT:
- // CHECK:STDOUT: !definition:
- // CHECK:STDOUT: %ImplicitAs.type: type = facet_type <@ImplicitAs, @ImplicitAs(%Dest)> [symbolic = %ImplicitAs.type (constants.%ImplicitAs.type.2)]
- // CHECK:STDOUT: %Self: %ImplicitAs.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.1)]
- // CHECK:STDOUT: %Convert.type: type = fn_type @Convert.1, @ImplicitAs(%Dest) [symbolic = %Convert.type (constants.%Convert.type.1)]
- // CHECK:STDOUT: %Convert: @ImplicitAs.%Convert.type (%Convert.type.1) = struct_value () [symbolic = %Convert (constants.%Convert.1)]
- // CHECK:STDOUT: %Convert.assoc_type: type = assoc_entity_type @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.2), @ImplicitAs.%Convert.type (%Convert.type.1) [symbolic = %Convert.assoc_type (constants.%Convert.assoc_type.1)]
- // CHECK:STDOUT: %assoc0: @ImplicitAs.%Convert.assoc_type (%Convert.assoc_type.1) = assoc_entity element0, imports.%import_ref.10 [symbolic = %assoc0 (constants.%assoc0.1)]
- // CHECK:STDOUT:
- // CHECK:STDOUT: interface {
- // CHECK:STDOUT: !members:
- // CHECK:STDOUT: .Self = imports.%import_ref.4
- // CHECK:STDOUT: .Convert = imports.%import_ref.5
- // CHECK:STDOUT: witness = (imports.%import_ref.6)
- // CHECK:STDOUT: }
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: generic interface @As(constants.%Dest: type) {
- // CHECK:STDOUT: %Dest: type = bind_symbolic_name Dest, 0 [symbolic = %Dest (constants.%Dest)]
- // CHECK:STDOUT: %Dest.patt: type = symbolic_binding_pattern Dest, 0 [symbolic = %Dest.patt (constants.%Dest.patt)]
- // CHECK:STDOUT:
- // CHECK:STDOUT: !definition:
- // CHECK:STDOUT: %As.type: type = facet_type <@As, @As(%Dest)> [symbolic = %As.type (constants.%As.type.2)]
- // CHECK:STDOUT: %Self: %As.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.2)]
- // CHECK:STDOUT: %Convert.type: type = fn_type @Convert.6, @As(%Dest) [symbolic = %Convert.type (constants.%Convert.type.7)]
- // CHECK:STDOUT: %Convert: @As.%Convert.type (%Convert.type.7) = struct_value () [symbolic = %Convert (constants.%Convert.7)]
- // CHECK:STDOUT: %Convert.assoc_type: type = assoc_entity_type @As.%As.type (%As.type.2), @As.%Convert.type (%Convert.type.7) [symbolic = %Convert.assoc_type (constants.%Convert.assoc_type.3)]
- // CHECK:STDOUT: %assoc0: @As.%Convert.assoc_type (%Convert.assoc_type.3) = assoc_entity element0, imports.%import_ref.27 [symbolic = %assoc0 (constants.%assoc0.3)]
- // CHECK:STDOUT:
- // CHECK:STDOUT: interface {
- // CHECK:STDOUT: !members:
- // CHECK:STDOUT: .Self = imports.%import_ref.21
- // CHECK:STDOUT: .Convert = imports.%import_ref.22
- // CHECK:STDOUT: witness = (imports.%import_ref.23)
- // CHECK:STDOUT: }
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: generic impl @impl.1(constants.%N: Core.IntLiteral) {
- // CHECK:STDOUT: %N: Core.IntLiteral = bind_symbolic_name N, 0 [symbolic = %N (constants.%N)]
- // CHECK:STDOUT: %N.patt: Core.IntLiteral = symbolic_binding_pattern N, 0 [symbolic = %N.patt (constants.%N.patt)]
- // CHECK:STDOUT: %iN: type = int_type signed, %N [symbolic = %iN (constants.%iN)]
- // CHECK:STDOUT: %ImplicitAs.type: type = facet_type <@ImplicitAs, @ImplicitAs(%iN)> [symbolic = %ImplicitAs.type (constants.%ImplicitAs.type.3)]
- // CHECK:STDOUT:
- // CHECK:STDOUT: !definition:
- // CHECK:STDOUT: %Convert.type: type = fn_type @Convert.2, @impl.1(%N) [symbolic = %Convert.type (constants.%Convert.type.2)]
- // CHECK:STDOUT: %Convert: @impl.1.%Convert.type (%Convert.type.2) = struct_value () [symbolic = %Convert (constants.%Convert.2)]
- // CHECK:STDOUT: %interface: <witness> = interface_witness (%Convert) [symbolic = %interface (constants.%interface.1)]
- // CHECK:STDOUT:
- // CHECK:STDOUT: impl: imports.%import_ref.7 as imports.%import_ref.8 {
- // CHECK:STDOUT: !members:
- // CHECK:STDOUT: witness = imports.%import_ref.9
- // CHECK:STDOUT: }
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: generic impl @impl.2(constants.%N: Core.IntLiteral) {
- // CHECK:STDOUT: %N: Core.IntLiteral = bind_symbolic_name N, 0 [symbolic = %N (constants.%N)]
- // CHECK:STDOUT: %N.patt: Core.IntLiteral = symbolic_binding_pattern N, 0 [symbolic = %N.patt (constants.%N.patt)]
- // CHECK:STDOUT: %uN: type = int_type unsigned, %N [symbolic = %uN (constants.%uN)]
- // CHECK:STDOUT: %ImplicitAs.type: type = facet_type <@ImplicitAs, @ImplicitAs(%uN)> [symbolic = %ImplicitAs.type (constants.%ImplicitAs.type.4)]
- // CHECK:STDOUT:
- // CHECK:STDOUT: !definition:
- // CHECK:STDOUT: %Convert.type: type = fn_type @Convert.3, @impl.2(%N) [symbolic = %Convert.type (constants.%Convert.type.3)]
- // CHECK:STDOUT: %Convert: @impl.2.%Convert.type (%Convert.type.3) = struct_value () [symbolic = %Convert (constants.%Convert.3)]
- // CHECK:STDOUT: %interface: <witness> = interface_witness (%Convert) [symbolic = %interface (constants.%interface.2)]
- // CHECK:STDOUT:
- // CHECK:STDOUT: impl: imports.%import_ref.11 as imports.%import_ref.12 {
- // CHECK:STDOUT: !members:
- // CHECK:STDOUT: witness = imports.%import_ref.13
- // CHECK:STDOUT: }
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: generic impl @impl.3(constants.%N: Core.IntLiteral) {
- // CHECK:STDOUT: %N: Core.IntLiteral = bind_symbolic_name N, 0 [symbolic = %N (constants.%N)]
- // CHECK:STDOUT: %N.patt: Core.IntLiteral = symbolic_binding_pattern N, 0 [symbolic = %N.patt (constants.%N.patt)]
- // CHECK:STDOUT: %iN: type = int_type signed, %N [symbolic = %iN (constants.%iN)]
- // CHECK:STDOUT:
- // CHECK:STDOUT: !definition:
- // CHECK:STDOUT: %Convert.type: type = fn_type @Convert.4, @impl.3(%N) [symbolic = %Convert.type (constants.%Convert.type.4)]
- // CHECK:STDOUT: %Convert: @impl.3.%Convert.type (%Convert.type.4) = struct_value () [symbolic = %Convert (constants.%Convert.4)]
- // CHECK:STDOUT: %interface: <witness> = interface_witness (%Convert) [symbolic = %interface (constants.%interface.3)]
- // CHECK:STDOUT:
- // CHECK:STDOUT: impl: imports.%import_ref.14 as imports.%import_ref.15 {
- // CHECK:STDOUT: !members:
- // CHECK:STDOUT: witness = imports.%import_ref.16
- // CHECK:STDOUT: }
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: generic impl @impl.4(constants.%N: Core.IntLiteral) {
- // CHECK:STDOUT: %N: Core.IntLiteral = bind_symbolic_name N, 0 [symbolic = %N (constants.%N)]
- // CHECK:STDOUT: %N.patt: Core.IntLiteral = symbolic_binding_pattern N, 0 [symbolic = %N.patt (constants.%N.patt)]
- // CHECK:STDOUT: %uN: type = int_type unsigned, %N [symbolic = %uN (constants.%uN)]
- // CHECK:STDOUT:
- // CHECK:STDOUT: !definition:
- // CHECK:STDOUT: %Convert.type: type = fn_type @Convert.5, @impl.4(%N) [symbolic = %Convert.type (constants.%Convert.type.6)]
- // CHECK:STDOUT: %Convert: @impl.4.%Convert.type (%Convert.type.6) = struct_value () [symbolic = %Convert (constants.%Convert.6)]
- // CHECK:STDOUT: %interface: <witness> = interface_witness (%Convert) [symbolic = %interface (constants.%interface.4)]
- // CHECK:STDOUT:
- // CHECK:STDOUT: impl: imports.%import_ref.18 as imports.%import_ref.19 {
- // CHECK:STDOUT: !members:
- // CHECK:STDOUT: witness = imports.%import_ref.20
- // CHECK:STDOUT: }
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: generic impl @impl.5(constants.%N: Core.IntLiteral) {
- // CHECK:STDOUT: %N: Core.IntLiteral = bind_symbolic_name N, 0 [symbolic = %N (constants.%N)]
- // CHECK:STDOUT: %N.patt: Core.IntLiteral = symbolic_binding_pattern N, 0 [symbolic = %N.patt (constants.%N.patt)]
- // CHECK:STDOUT: %iN: type = int_type signed, %N [symbolic = %iN (constants.%iN)]
- // CHECK:STDOUT: %As.type: type = facet_type <@As, @As(%iN)> [symbolic = %As.type (constants.%As.type.3)]
- // CHECK:STDOUT:
- // CHECK:STDOUT: !definition:
- // CHECK:STDOUT: %Convert.type: type = fn_type @Convert.7, @impl.5(%N) [symbolic = %Convert.type (constants.%Convert.type.8)]
- // CHECK:STDOUT: %Convert: @impl.5.%Convert.type (%Convert.type.8) = struct_value () [symbolic = %Convert (constants.%Convert.8)]
- // CHECK:STDOUT: %interface: <witness> = interface_witness (%Convert) [symbolic = %interface (constants.%interface.5)]
- // CHECK:STDOUT:
- // CHECK:STDOUT: impl: imports.%import_ref.24 as imports.%import_ref.25 {
- // CHECK:STDOUT: !members:
- // CHECK:STDOUT: witness = imports.%import_ref.26
- // CHECK:STDOUT: }
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: generic impl @impl.6(constants.%N: Core.IntLiteral) {
- // CHECK:STDOUT: %N: Core.IntLiteral = bind_symbolic_name N, 0 [symbolic = %N (constants.%N)]
- // CHECK:STDOUT: %N.patt: Core.IntLiteral = symbolic_binding_pattern N, 0 [symbolic = %N.patt (constants.%N.patt)]
- // CHECK:STDOUT: %uN: type = int_type unsigned, %N [symbolic = %uN (constants.%uN)]
- // CHECK:STDOUT: %As.type: type = facet_type <@As, @As(%uN)> [symbolic = %As.type (constants.%As.type.4)]
- // CHECK:STDOUT:
- // CHECK:STDOUT: !definition:
- // CHECK:STDOUT: %Convert.type: type = fn_type @Convert.8, @impl.6(%N) [symbolic = %Convert.type (constants.%Convert.type.9)]
- // CHECK:STDOUT: %Convert: @impl.6.%Convert.type (%Convert.type.9) = struct_value () [symbolic = %Convert (constants.%Convert.9)]
- // CHECK:STDOUT: %interface: <witness> = interface_witness (%Convert) [symbolic = %interface (constants.%interface.6)]
- // CHECK:STDOUT:
- // CHECK:STDOUT: impl: imports.%import_ref.28 as imports.%import_ref.29 {
- // CHECK:STDOUT: !members:
- // CHECK:STDOUT: witness = imports.%import_ref.30
- // CHECK:STDOUT: }
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: generic impl @impl.7(constants.%N: Core.IntLiteral) {
- // CHECK:STDOUT: %N: Core.IntLiteral = bind_symbolic_name N, 0 [symbolic = %N (constants.%N)]
- // CHECK:STDOUT: %N.patt: Core.IntLiteral = symbolic_binding_pattern N, 0 [symbolic = %N.patt (constants.%N.patt)]
- // CHECK:STDOUT: %iN: type = int_type signed, %N [symbolic = %iN (constants.%iN)]
- // CHECK:STDOUT:
- // CHECK:STDOUT: !definition:
- // CHECK:STDOUT: %Convert.type: type = fn_type @Convert.9, @impl.7(%N) [symbolic = %Convert.type (constants.%Convert.type.10)]
- // CHECK:STDOUT: %Convert: @impl.7.%Convert.type (%Convert.type.10) = struct_value () [symbolic = %Convert (constants.%Convert.10)]
- // CHECK:STDOUT: %interface: <witness> = interface_witness (%Convert) [symbolic = %interface (constants.%interface.7)]
- // CHECK:STDOUT:
- // CHECK:STDOUT: impl: imports.%import_ref.31 as imports.%import_ref.32 {
- // CHECK:STDOUT: !members:
- // CHECK:STDOUT: witness = imports.%import_ref.33
- // CHECK:STDOUT: }
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: generic impl @impl.8(constants.%N: Core.IntLiteral) {
- // CHECK:STDOUT: %N: Core.IntLiteral = bind_symbolic_name N, 0 [symbolic = %N (constants.%N)]
- // CHECK:STDOUT: %N.patt: Core.IntLiteral = symbolic_binding_pattern N, 0 [symbolic = %N.patt (constants.%N.patt)]
- // CHECK:STDOUT: %uN: type = int_type unsigned, %N [symbolic = %uN (constants.%uN)]
- // CHECK:STDOUT:
- // CHECK:STDOUT: !definition:
- // CHECK:STDOUT: %Convert.type: type = fn_type @Convert.10, @impl.8(%N) [symbolic = %Convert.type (constants.%Convert.type.12)]
- // CHECK:STDOUT: %Convert: @impl.8.%Convert.type (%Convert.type.12) = struct_value () [symbolic = %Convert (constants.%Convert.12)]
- // CHECK:STDOUT: %interface: <witness> = interface_witness (%Convert) [symbolic = %interface (constants.%interface.8)]
- // CHECK:STDOUT:
- // CHECK:STDOUT: impl: imports.%import_ref.35 as imports.%import_ref.36 {
- // CHECK:STDOUT: !members:
- // CHECK:STDOUT: witness = imports.%import_ref.37
- // CHECK:STDOUT: }
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: generic class @Class(constants.%T: type) {
- // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic = %T (constants.%T)]
- // CHECK:STDOUT: %T.patt: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt (constants.%T.patt)]
- // CHECK:STDOUT:
- // CHECK:STDOUT: class;
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: generic class @.1(%U.loc12_13.1: type) {
- // CHECK:STDOUT: %U.loc12_13.2: type = bind_symbolic_name U, 0 [symbolic = %U.loc12_13.2 (constants.%U)]
- // CHECK:STDOUT: %U.patt.loc12_13.2: type = symbolic_binding_pattern U, 0 [symbolic = %U.patt.loc12_13.2 (constants.%U.patt)]
- // CHECK:STDOUT:
- // CHECK:STDOUT: !definition:
- // CHECK:STDOUT:
- // CHECK:STDOUT: class {
- // CHECK:STDOUT: %T.ref: <error> = name_ref T, <error> [template = <error>]
- // CHECK:STDOUT: %.loc16: <error> = field_decl x, element0 [template]
- // CHECK:STDOUT: %complete_type: <witness> = complete_type_witness <error> [template = <error>]
- // CHECK:STDOUT:
- // CHECK:STDOUT: !members:
- // CHECK:STDOUT: .Self = constants.%.1
- // CHECK:STDOUT: .x = %.loc16
- // CHECK:STDOUT: complete_type_witness = %complete_type
- // CHECK:STDOUT: }
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: generic fn @Convert.1(constants.%Dest: type, constants.%Self.1: %ImplicitAs.type.2) {
- // CHECK:STDOUT: %Dest: type = bind_symbolic_name Dest, 0 [symbolic = %Dest (constants.%Dest)]
- // CHECK:STDOUT: %ImplicitAs.type: type = facet_type <@ImplicitAs, @ImplicitAs(%Dest)> [symbolic = %ImplicitAs.type (constants.%ImplicitAs.type.2)]
- // CHECK:STDOUT: %Self: %ImplicitAs.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.1)]
- // CHECK:STDOUT: %Self.as_type: type = facet_access_type %Self [symbolic = %Self.as_type (constants.%Self.as_type.1)]
- // CHECK:STDOUT:
- // CHECK:STDOUT: fn[%self.param_patt: @Convert.1.%Self.as_type (%Self.as_type.1)]() -> @Convert.1.%Dest (%Dest);
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: generic fn @Convert.2(constants.%N: Core.IntLiteral) {
- // CHECK:STDOUT: %N: Core.IntLiteral = bind_symbolic_name N, 0 [symbolic = %N (constants.%N)]
- // CHECK:STDOUT: %iN: type = int_type signed, %N [symbolic = %iN (constants.%iN)]
- // CHECK:STDOUT:
- // CHECK:STDOUT: !definition:
- // CHECK:STDOUT:
- // CHECK:STDOUT: fn[%self.param_patt: Core.IntLiteral]() -> @Convert.2.%iN (%iN) = "int.convert_checked";
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: generic fn @Convert.3(constants.%N: Core.IntLiteral) {
- // CHECK:STDOUT: %N: Core.IntLiteral = bind_symbolic_name N, 0 [symbolic = %N (constants.%N)]
- // CHECK:STDOUT: %uN: type = int_type unsigned, %N [symbolic = %uN (constants.%uN)]
- // CHECK:STDOUT:
- // CHECK:STDOUT: !definition:
- // CHECK:STDOUT:
- // CHECK:STDOUT: fn[%self.param_patt: Core.IntLiteral]() -> @Convert.3.%uN (%uN) = "int.convert_checked";
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: generic fn @Convert.4(constants.%N: Core.IntLiteral) {
- // CHECK:STDOUT: %N: Core.IntLiteral = bind_symbolic_name N, 0 [symbolic = %N (constants.%N)]
- // CHECK:STDOUT: %iN: type = int_type signed, %N [symbolic = %iN (constants.%iN)]
- // CHECK:STDOUT:
- // CHECK:STDOUT: !definition:
- // CHECK:STDOUT:
- // CHECK:STDOUT: fn[%self.param_patt: @Convert.4.%iN (%iN)]() -> Core.IntLiteral = "int.convert_checked";
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: generic fn @Convert.5(constants.%N: Core.IntLiteral) {
- // CHECK:STDOUT: %N: Core.IntLiteral = bind_symbolic_name N, 0 [symbolic = %N (constants.%N)]
- // CHECK:STDOUT: %uN: type = int_type unsigned, %N [symbolic = %uN (constants.%uN)]
- // CHECK:STDOUT:
- // CHECK:STDOUT: !definition:
- // CHECK:STDOUT:
- // CHECK:STDOUT: fn[%self.param_patt: @Convert.5.%uN (%uN)]() -> Core.IntLiteral = "int.convert_checked";
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: generic fn @Convert.6(constants.%Dest: type, constants.%Self.2: %As.type.2) {
- // CHECK:STDOUT: %Dest: type = bind_symbolic_name Dest, 0 [symbolic = %Dest (constants.%Dest)]
- // CHECK:STDOUT: %As.type: type = facet_type <@As, @As(%Dest)> [symbolic = %As.type (constants.%As.type.2)]
- // CHECK:STDOUT: %Self: %As.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.2)]
- // CHECK:STDOUT: %Self.as_type: type = facet_access_type %Self [symbolic = %Self.as_type (constants.%Self.as_type.2)]
- // CHECK:STDOUT:
- // CHECK:STDOUT: fn[%self.param_patt: @Convert.6.%Self.as_type (%Self.as_type.2)]() -> @Convert.6.%Dest (%Dest);
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: generic fn @Convert.7(constants.%N: Core.IntLiteral) {
- // CHECK:STDOUT: %N: Core.IntLiteral = bind_symbolic_name N, 0 [symbolic = %N (constants.%N)]
- // CHECK:STDOUT: %iN: type = int_type signed, %N [symbolic = %iN (constants.%iN)]
- // CHECK:STDOUT:
- // CHECK:STDOUT: !definition:
- // CHECK:STDOUT:
- // CHECK:STDOUT: fn[%self.param_patt: Core.IntLiteral]() -> @Convert.7.%iN (%iN) = "int.convert_checked";
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: generic fn @Convert.8(constants.%N: Core.IntLiteral) {
- // CHECK:STDOUT: %N: Core.IntLiteral = bind_symbolic_name N, 0 [symbolic = %N (constants.%N)]
- // CHECK:STDOUT: %uN: type = int_type unsigned, %N [symbolic = %uN (constants.%uN)]
- // CHECK:STDOUT:
- // CHECK:STDOUT: !definition:
- // CHECK:STDOUT:
- // CHECK:STDOUT: fn[%self.param_patt: Core.IntLiteral]() -> @Convert.8.%uN (%uN) = "int.convert_checked";
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: generic fn @Convert.9(constants.%N: Core.IntLiteral) {
- // CHECK:STDOUT: %N: Core.IntLiteral = bind_symbolic_name N, 0 [symbolic = %N (constants.%N)]
- // CHECK:STDOUT: %iN: type = int_type signed, %N [symbolic = %iN (constants.%iN)]
- // CHECK:STDOUT:
- // CHECK:STDOUT: !definition:
- // CHECK:STDOUT:
- // CHECK:STDOUT: fn[%self.param_patt: @Convert.9.%iN (%iN)]() -> Core.IntLiteral = "int.convert_checked";
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: generic fn @Convert.10(constants.%N: Core.IntLiteral) {
- // CHECK:STDOUT: %N: Core.IntLiteral = bind_symbolic_name N, 0 [symbolic = %N (constants.%N)]
- // CHECK:STDOUT: %uN: type = int_type unsigned, %N [symbolic = %uN (constants.%uN)]
- // CHECK:STDOUT:
- // CHECK:STDOUT: !definition:
- // CHECK:STDOUT:
- // CHECK:STDOUT: fn[%self.param_patt: @Convert.10.%uN (%uN)]() -> Core.IntLiteral = "int.convert_checked";
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: specific @ImplicitAs(constants.%Dest) {
- // CHECK:STDOUT: %Dest => constants.%Dest
- // CHECK:STDOUT: %Dest.patt => constants.%Dest
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: specific @ImplicitAs(constants.%iN) {
- // CHECK:STDOUT: %Dest => constants.%iN
- // CHECK:STDOUT: %Dest.patt => constants.%iN
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: specific @ImplicitAs(%Dest) {
- // CHECK:STDOUT: %Dest => constants.%Dest
- // CHECK:STDOUT: %Dest.patt => constants.%Dest
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: specific @ImplicitAs(@impl.1.%iN) {
- // CHECK:STDOUT: %Dest => constants.%iN
- // CHECK:STDOUT: %Dest.patt => constants.%iN
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: specific @impl.1(constants.%N) {
- // CHECK:STDOUT: %N => constants.%N
- // CHECK:STDOUT: %N.patt => constants.%N
- // CHECK:STDOUT: %iN => constants.%iN
- // CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.3
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: specific @impl.1(%N) {
- // CHECK:STDOUT: %N => constants.%N
- // CHECK:STDOUT: %N.patt => constants.%N
- // CHECK:STDOUT: %iN => constants.%iN
- // CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.3
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: specific @ImplicitAs(@Convert.1.%Dest) {
- // CHECK:STDOUT: %Dest => constants.%Dest
- // CHECK:STDOUT: %Dest.patt => constants.%Dest
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: specific @Convert.1(constants.%Dest, constants.%Self.1) {
- // CHECK:STDOUT: %Dest => constants.%Dest
- // CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.2
- // CHECK:STDOUT: %Self => constants.%Self.1
- // CHECK:STDOUT: %Self.as_type => constants.%Self.as_type.1
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: specific @Convert.2(constants.%N) {
- // CHECK:STDOUT: %N => constants.%N
- // CHECK:STDOUT: %iN => constants.%iN
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: specific @ImplicitAs(constants.%uN) {
- // CHECK:STDOUT: %Dest => constants.%uN
- // CHECK:STDOUT: %Dest.patt => constants.%uN
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: specific @ImplicitAs(@impl.2.%uN) {
- // CHECK:STDOUT: %Dest => constants.%uN
- // CHECK:STDOUT: %Dest.patt => constants.%uN
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: specific @impl.2(constants.%N) {
- // CHECK:STDOUT: %N => constants.%N
- // CHECK:STDOUT: %N.patt => constants.%N
- // CHECK:STDOUT: %uN => constants.%uN
- // CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.4
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: specific @impl.2(%N) {
- // CHECK:STDOUT: %N => constants.%N
- // CHECK:STDOUT: %N.patt => constants.%N
- // CHECK:STDOUT: %uN => constants.%uN
- // CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.4
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: specific @Convert.3(constants.%N) {
- // CHECK:STDOUT: %N => constants.%N
- // CHECK:STDOUT: %uN => constants.%uN
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: specific @ImplicitAs(Core.IntLiteral) {
- // CHECK:STDOUT: %Dest => Core.IntLiteral
- // CHECK:STDOUT: %Dest.patt => Core.IntLiteral
- // CHECK:STDOUT:
- // CHECK:STDOUT: !definition:
- // CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.5
- // CHECK:STDOUT: %Self => constants.%Self.1
- // CHECK:STDOUT: %Convert.type => constants.%Convert.type.5
- // CHECK:STDOUT: %Convert => constants.%Convert.5
- // CHECK:STDOUT: %Convert.assoc_type => constants.%Convert.assoc_type.2
- // CHECK:STDOUT: %assoc0 => constants.%assoc0.2
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: specific @impl.3(constants.%N) {
- // CHECK:STDOUT: %N => constants.%N
- // CHECK:STDOUT: %N.patt => constants.%N
- // CHECK:STDOUT: %iN => constants.%iN
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: specific @impl.3(%N) {
- // CHECK:STDOUT: %N => constants.%N
- // CHECK:STDOUT: %N.patt => constants.%N
- // CHECK:STDOUT: %iN => constants.%iN
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: specific @Convert.4(constants.%N) {
- // CHECK:STDOUT: %N => constants.%N
- // CHECK:STDOUT: %iN => constants.%iN
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: specific @impl.4(constants.%N) {
- // CHECK:STDOUT: %N => constants.%N
- // CHECK:STDOUT: %N.patt => constants.%N
- // CHECK:STDOUT: %uN => constants.%uN
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: specific @impl.4(%N) {
- // CHECK:STDOUT: %N => constants.%N
- // CHECK:STDOUT: %N.patt => constants.%N
- // CHECK:STDOUT: %uN => constants.%uN
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: specific @Convert.5(constants.%N) {
- // CHECK:STDOUT: %N => constants.%N
- // CHECK:STDOUT: %uN => constants.%uN
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: specific @As(constants.%Dest) {
- // CHECK:STDOUT: %Dest => constants.%Dest
- // CHECK:STDOUT: %Dest.patt => constants.%Dest
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: specific @As(constants.%iN) {
- // CHECK:STDOUT: %Dest => constants.%iN
- // CHECK:STDOUT: %Dest.patt => constants.%iN
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: specific @As(%Dest) {
- // CHECK:STDOUT: %Dest => constants.%Dest
- // CHECK:STDOUT: %Dest.patt => constants.%Dest
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: specific @As(@impl.5.%iN) {
- // CHECK:STDOUT: %Dest => constants.%iN
- // CHECK:STDOUT: %Dest.patt => constants.%iN
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: specific @impl.5(constants.%N) {
- // CHECK:STDOUT: %N => constants.%N
- // CHECK:STDOUT: %N.patt => constants.%N
- // CHECK:STDOUT: %iN => constants.%iN
- // CHECK:STDOUT: %As.type => constants.%As.type.3
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: specific @impl.5(%N) {
- // CHECK:STDOUT: %N => constants.%N
- // CHECK:STDOUT: %N.patt => constants.%N
- // CHECK:STDOUT: %iN => constants.%iN
- // CHECK:STDOUT: %As.type => constants.%As.type.3
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: specific @As(@Convert.6.%Dest) {
- // CHECK:STDOUT: %Dest => constants.%Dest
- // CHECK:STDOUT: %Dest.patt => constants.%Dest
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: specific @Convert.6(constants.%Dest, constants.%Self.2) {
- // CHECK:STDOUT: %Dest => constants.%Dest
- // CHECK:STDOUT: %As.type => constants.%As.type.2
- // CHECK:STDOUT: %Self => constants.%Self.2
- // CHECK:STDOUT: %Self.as_type => constants.%Self.as_type.2
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: specific @Convert.7(constants.%N) {
- // CHECK:STDOUT: %N => constants.%N
- // CHECK:STDOUT: %iN => constants.%iN
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: specific @As(constants.%uN) {
- // CHECK:STDOUT: %Dest => constants.%uN
- // CHECK:STDOUT: %Dest.patt => constants.%uN
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: specific @As(@impl.6.%uN) {
- // CHECK:STDOUT: %Dest => constants.%uN
- // CHECK:STDOUT: %Dest.patt => constants.%uN
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: specific @impl.6(constants.%N) {
- // CHECK:STDOUT: %N => constants.%N
- // CHECK:STDOUT: %N.patt => constants.%N
- // CHECK:STDOUT: %uN => constants.%uN
- // CHECK:STDOUT: %As.type => constants.%As.type.4
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: specific @impl.6(%N) {
- // CHECK:STDOUT: %N => constants.%N
- // CHECK:STDOUT: %N.patt => constants.%N
- // CHECK:STDOUT: %uN => constants.%uN
- // CHECK:STDOUT: %As.type => constants.%As.type.4
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: specific @Convert.8(constants.%N) {
- // CHECK:STDOUT: %N => constants.%N
- // CHECK:STDOUT: %uN => constants.%uN
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: specific @As(Core.IntLiteral) {
- // CHECK:STDOUT: %Dest => Core.IntLiteral
- // CHECK:STDOUT: %Dest.patt => Core.IntLiteral
- // CHECK:STDOUT:
- // CHECK:STDOUT: !definition:
- // CHECK:STDOUT: %As.type => constants.%As.type.5
- // CHECK:STDOUT: %Self => constants.%Self.2
- // CHECK:STDOUT: %Convert.type => constants.%Convert.type.11
- // CHECK:STDOUT: %Convert => constants.%Convert.11
- // CHECK:STDOUT: %Convert.assoc_type => constants.%Convert.assoc_type.4
- // CHECK:STDOUT: %assoc0 => constants.%assoc0.4
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: specific @impl.7(constants.%N) {
- // CHECK:STDOUT: %N => constants.%N
- // CHECK:STDOUT: %N.patt => constants.%N
- // CHECK:STDOUT: %iN => constants.%iN
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: specific @impl.7(%N) {
- // CHECK:STDOUT: %N => constants.%N
- // CHECK:STDOUT: %N.patt => constants.%N
- // CHECK:STDOUT: %iN => constants.%iN
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: specific @Convert.9(constants.%N) {
- // CHECK:STDOUT: %N => constants.%N
- // CHECK:STDOUT: %iN => constants.%iN
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: specific @impl.8(constants.%N) {
- // CHECK:STDOUT: %N => constants.%N
- // CHECK:STDOUT: %N.patt => constants.%N
- // CHECK:STDOUT: %uN => constants.%uN
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: specific @impl.8(%N) {
- // CHECK:STDOUT: %N => constants.%N
- // CHECK:STDOUT: %N.patt => constants.%N
- // CHECK:STDOUT: %uN => constants.%uN
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: specific @Convert.10(constants.%N) {
- // CHECK:STDOUT: %N => constants.%N
- // CHECK:STDOUT: %uN => constants.%uN
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: specific @Class(constants.%T) {
- // CHECK:STDOUT: %T => constants.%T
- // CHECK:STDOUT: %T.patt => constants.%T
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: specific @.1(constants.%U) {
- // CHECK:STDOUT: %U.loc12_13.2 => constants.%U
- // CHECK:STDOUT: %U.patt.loc12_13.2 => constants.%U
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
|