| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584 |
- // 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.1: %Class.type = struct_value () [template]
- // CHECK:STDOUT: %CompleteClass.type: type = generic_class_type @CompleteClass [template]
- // CHECK:STDOUT: %CompleteClass.1: %CompleteClass.type = struct_value () [template]
- // CHECK:STDOUT: %CompleteClass.2: type = class_type @CompleteClass, @CompleteClass(%T) [symbolic]
- // CHECK:STDOUT: %.1: 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, %.1 [template]
- // CHECK:STDOUT: %.2: type = unbound_element_type %CompleteClass.2, %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: %.3: type = struct_type {.n: %i32} [template]
- // CHECK:STDOUT: %.4: <witness> = complete_type_witness %.3 [template]
- // CHECK:STDOUT: %.5: 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(%.1) [template]
- // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template]
- // CHECK:STDOUT: %.25: <witness> = interface_witness (%Convert.14) [template]
- // CHECK:STDOUT: %.26: <bound method> = bound_method %.5, %Convert.14 [template]
- // CHECK:STDOUT: %.27: <specific function> = specific_function %.26, @Convert.2(%.1) [template]
- // CHECK:STDOUT: %.28: %i32 = int_value 0 [template]
- // CHECK:STDOUT: %CompleteClass.3: 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.1] {
- // 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.1] {
- // 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.3 = return_slot_pattern
- // CHECK:STDOUT: %return.param_patt: %CompleteClass.3 = out_param_pattern %return.patt, runtime_param0
- // CHECK:STDOUT: } {
- // CHECK:STDOUT: %CompleteClass.ref: %CompleteClass.type = name_ref CompleteClass, file.%CompleteClass.decl [template = constants.%CompleteClass.1]
- // CHECK:STDOUT: %.loc11_25: Core.IntLiteral = int_value 32 [template = constants.%.1]
- // CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc11_25) [template = constants.%i32]
- // CHECK:STDOUT: %.loc11_24.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32]
- // CHECK:STDOUT: %.loc11_24.2: type = converted %int.make_type_signed, %.loc11_24.1 [template = constants.%i32]
- // CHECK:STDOUT: %CompleteClass: type = class_type @CompleteClass, @CompleteClass(constants.%i32) [template = constants.%CompleteClass.3]
- // CHECK:STDOUT: %return.param: ref %CompleteClass.3 = out_param runtime_param0
- // CHECK:STDOUT: %return: ref %CompleteClass.3 = 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.2)]
- // CHECK:STDOUT: %.loc7_8.2: type = unbound_element_type @CompleteClass.%CompleteClass (%CompleteClass.2), %i32 [symbolic = %.loc7_8.2 (constants.%.2)]
- // 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: %.loc7_10.1: Core.IntLiteral = int_value 32 [template = constants.%.1]
- // CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc7_10.1) [template = constants.%i32]
- // CHECK:STDOUT: %.loc7_10.2: type = value_of_initializer %int.make_type_signed [template = constants.%i32]
- // CHECK:STDOUT: %.loc7_10.3: type = converted %int.make_type_signed, %.loc7_10.2 [template = constants.%i32]
- // CHECK:STDOUT: %.loc7_8.1: @CompleteClass.%.loc7_8.2 (%.2) = 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: %.loc8_13.1: Core.IntLiteral = int_value 32 [template = constants.%.1]
- // CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc8_13.1) [template = constants.%i32]
- // CHECK:STDOUT: %.loc8_13.2: type = value_of_initializer %int.make_type_signed [template = constants.%i32]
- // CHECK:STDOUT: %.loc8_13.3: type = converted %int.make_type_signed, %.loc8_13.2 [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: %.loc9: <witness> = complete_type_witness %.3 [template = constants.%.4]
- // CHECK:STDOUT:
- // CHECK:STDOUT: !members:
- // CHECK:STDOUT: .Self = constants.%CompleteClass.2
- // CHECK:STDOUT: .n = %.loc7_8.1
- // CHECK:STDOUT: .F = %F.decl
- // 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: %.loc8_26: Core.IntLiteral = int_value 0 [template = constants.%.5]
- // CHECK:STDOUT: %.loc8_27.1: %Convert.type.2 = interface_witness_access constants.%.25, element0 [template = constants.%Convert.14]
- // CHECK:STDOUT: %.loc8_27.2: <bound method> = bound_method %.loc8_26, %.loc8_27.1 [template = constants.%.26]
- // CHECK:STDOUT: %.loc8_27.3: <specific function> = specific_function %.loc8_27.2, @Convert.2(constants.%.1) [template = constants.%.27]
- // CHECK:STDOUT: %int.convert_checked: init %i32 = call %.loc8_27.3(%.loc8_26) [template = constants.%.28]
- // CHECK:STDOUT: %.loc8_27.4: %i32 = value_of_initializer %int.convert_checked [template = constants.%.28]
- // CHECK:STDOUT: %.loc8_27.5: %i32 = converted %.loc8_26, %.loc8_27.4 [template = constants.%.28]
- // CHECK:STDOUT: return %.loc8_27.5
- // CHECK:STDOUT: }
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: fn @F.2() -> %CompleteClass.3;
- // 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.2
- // CHECK:STDOUT: %.loc7_8.2 => constants.%.2
- // 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.%ImplicitAs.type (%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: %Self.2: %ImplicitAs.type.2 = bind_symbolic_name Self, 1 [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: %.1: type = assoc_entity_type %ImplicitAs.type.2, %Convert.type.1 [symbolic]
- // CHECK:STDOUT: %.2: %.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: %.3: <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: %.4: <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: %.5: <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: %.6: type = assoc_entity_type %ImplicitAs.type.5, %Convert.type.5 [template]
- // CHECK:STDOUT: %.7: %.6 = 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: %.8: <witness> = interface_witness (%Convert.6) [symbolic]
- // CHECK:STDOUT: %As.type.2: type = facet_type <@As, @As(%Dest)> [symbolic]
- // CHECK:STDOUT: %Self.3: @As.%As.type (%As.type.2) = bind_symbolic_name Self, 1 [symbolic]
- // CHECK:STDOUT: %As.type.3: type = facet_type <@As, @As(%iN)> [symbolic]
- // CHECK:STDOUT: %Self.4: %As.type.2 = bind_symbolic_name Self, 1 [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: %.9: type = assoc_entity_type %As.type.2, %Convert.type.7 [symbolic]
- // CHECK:STDOUT: %.10: %.9 = 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: %.11: <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: %.12: <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: %.13: <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: %.14: type = assoc_entity_type %As.type.5, %Convert.type.11 [template]
- // CHECK:STDOUT: %.15: %.14 = 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: %.16: <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.1: %Class.type = struct_value () [template]
- // CHECK:STDOUT: %Class.2: type = class_type @Class, @Class(%T) [symbolic]
- // CHECK:STDOUT: %.17: type = unbound_element_type %Class.2, %T [symbolic]
- // CHECK:STDOUT: %.18: type = struct_type {.x: %T} [symbolic]
- // CHECK:STDOUT: %.19: <witness> = complete_type_witness %.18 [symbolic]
- // CHECK:STDOUT: %CompleteClass.type: type = generic_class_type @CompleteClass [template]
- // CHECK:STDOUT: %CompleteClass.1: %CompleteClass.type = struct_value () [template]
- // CHECK:STDOUT: %.20: Core.IntLiteral = int_value 32 [template]
- // CHECK:STDOUT: %i32: type = int_type signed, %.20 [template]
- // CHECK:STDOUT: %CompleteClass.2: type = class_type @CompleteClass, @CompleteClass(%T) [symbolic]
- // CHECK:STDOUT: %.23: type = unbound_element_type %CompleteClass.2, %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.3: 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: %.24: type = unbound_element_type %CompleteClass.3, %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: %.26: Core.IntLiteral = int_value 1 [template]
- // CHECK:STDOUT: %.27: 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: %.28: type = assoc_entity_type %ImplicitAs.type.6, %Convert.type.13 [template]
- // CHECK:STDOUT: %.29: %.28 = assoc_entity element0, imports.%import_ref.10 [template]
- // CHECK:STDOUT: %.30: %.1 = assoc_entity element0, imports.%import_ref.43 [symbolic]
- // CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.20) [template]
- // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template]
- // CHECK:STDOUT: %.31: <witness> = interface_witness (%Convert.14) [template]
- // CHECK:STDOUT: %.32: <bound method> = bound_method %.26, %Convert.14 [template]
- // CHECK:STDOUT: %.33: <specific function> = specific_function %.32, @Convert.2(%.20) [template]
- // CHECK:STDOUT: %.34: %i32 = int_value 1 [template]
- // CHECK:STDOUT: %struct: %CompleteClass.3 = struct_value (%.34) [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.1]
- // CHECK:STDOUT: %Core: <namespace> = namespace file.%Core.import, [template] {
- // CHECK:STDOUT: .Int = %import_ref.41
- // CHECK:STDOUT: .ImplicitAs = %import_ref.42
- // CHECK:STDOUT: import Core//prelude
- // CHECK:STDOUT: import Core//prelude/...
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %import_ref.4 = import_ref Main//foo, inst+77, unloaded
- // CHECK:STDOUT: %import_ref.5: @ImplicitAs.%.1 (%.1) = import_ref Main//foo, inst+78, loaded [symbolic = @ImplicitAs.%.2 (constants.%.30)]
- // CHECK:STDOUT: %import_ref.6 = import_ref Main//foo, inst+79, unloaded
- // CHECK:STDOUT: %import_ref.7: type = import_ref Main//foo, inst+121, loaded [template = Core.IntLiteral]
- // CHECK:STDOUT: %import_ref.8: type = import_ref Main//foo, inst+122, loaded [symbolic = @impl.1.%ImplicitAs.type (constants.%ImplicitAs.type.3)]
- // CHECK:STDOUT: %import_ref.9: <witness> = import_ref Main//foo, inst+123, loaded [symbolic = @impl.1.%.1 (constants.%.3)]
- // CHECK:STDOUT: %import_ref.10 = import_ref Main//foo, inst+94, unloaded
- // CHECK:STDOUT: %import_ref.11: type = import_ref Main//foo, inst+151, loaded [template = Core.IntLiteral]
- // CHECK:STDOUT: %import_ref.12: type = import_ref Main//foo, inst+152, loaded [symbolic = @impl.2.%ImplicitAs.type (constants.%ImplicitAs.type.4)]
- // CHECK:STDOUT: %import_ref.13 = import_ref Main//foo, inst+153, unloaded
- // CHECK:STDOUT: %import_ref.14: type = import_ref Main//foo, inst+180, loaded [symbolic = @impl.3.%iN (constants.%iN)]
- // CHECK:STDOUT: %import_ref.15: type = import_ref Main//foo, inst+181, loaded [template = constants.%ImplicitAs.type.5]
- // CHECK:STDOUT: %import_ref.16 = import_ref Main//foo, inst+182, unloaded
- // CHECK:STDOUT: %import_ref.18: type = import_ref Main//foo, inst+212, loaded [symbolic = @impl.4.%uN (constants.%uN)]
- // CHECK:STDOUT: %import_ref.19: type = import_ref Main//foo, inst+213, loaded [template = constants.%ImplicitAs.type.5]
- // CHECK:STDOUT: %import_ref.20 = import_ref Main//foo, inst+214, unloaded
- // CHECK:STDOUT: %import_ref.21 = import_ref Main//foo, inst+244, unloaded
- // CHECK:STDOUT: %import_ref.22 = import_ref Main//foo, inst+245, unloaded
- // CHECK:STDOUT: %import_ref.23 = import_ref Main//foo, inst+246, unloaded
- // CHECK:STDOUT: %import_ref.24: type = import_ref Main//foo, inst+252, loaded [template = Core.IntLiteral]
- // CHECK:STDOUT: %import_ref.25: type = import_ref Main//foo, inst+253, loaded [symbolic = @impl.5.%As.type (constants.%As.type.3)]
- // CHECK:STDOUT: %import_ref.26 = import_ref Main//foo, inst+254, unloaded
- // CHECK:STDOUT: %import_ref.27 = import_ref Main//foo, inst+269, unloaded
- // CHECK:STDOUT: %import_ref.28: type = import_ref Main//foo, inst+306, loaded [template = Core.IntLiteral]
- // CHECK:STDOUT: %import_ref.29: type = import_ref Main//foo, inst+307, loaded [symbolic = @impl.6.%As.type (constants.%As.type.4)]
- // CHECK:STDOUT: %import_ref.30 = import_ref Main//foo, inst+308, unloaded
- // CHECK:STDOUT: %import_ref.31: type = import_ref Main//foo, inst+335, loaded [symbolic = @impl.7.%iN (constants.%iN)]
- // CHECK:STDOUT: %import_ref.32: type = import_ref Main//foo, inst+336, loaded [template = constants.%As.type.5]
- // CHECK:STDOUT: %import_ref.33 = import_ref Main//foo, inst+337, unloaded
- // CHECK:STDOUT: %import_ref.35: type = import_ref Main//foo, inst+367, loaded [symbolic = @impl.8.%uN (constants.%uN)]
- // CHECK:STDOUT: %import_ref.36: type = import_ref Main//foo, inst+368, loaded [template = constants.%As.type.5]
- // CHECK:STDOUT: %import_ref.37 = import_ref Main//foo, inst+369, unloaded
- // CHECK:STDOUT: %import_ref.38 = import_ref Main//foo, inst+25, unloaded
- // CHECK:STDOUT: %import_ref.39 = import_ref Main//foo, inst+44, unloaded
- // CHECK:STDOUT: %import_ref.40 = import_ref Main//foo, inst+53, 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.1] {
- // 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.3 = return_slot_pattern
- // CHECK:STDOUT: %return.param_patt: %CompleteClass.3 = 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.1]
- // CHECK:STDOUT: %.loc8_25: Core.IntLiteral = int_value 32 [template = constants.%.20]
- // CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc8_25) [template = constants.%i32]
- // CHECK:STDOUT: %.loc8_24.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32]
- // CHECK:STDOUT: %.loc8_24.2: type = converted %int.make_type_signed, %.loc8_24.1 [template = constants.%i32]
- // CHECK:STDOUT: %CompleteClass: type = class_type @CompleteClass, @CompleteClass(constants.%i32) [template = constants.%CompleteClass.3]
- // CHECK:STDOUT: %return.param: ref %CompleteClass.3 = out_param runtime_param0
- // CHECK:STDOUT: %return: ref %CompleteClass.3 = 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.2)]
- // 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: %.1: type = assoc_entity_type @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.2), @ImplicitAs.%Convert.type (%Convert.type.1) [symbolic = %.1 (constants.%.1)]
- // CHECK:STDOUT: %.2: @ImplicitAs.%.1 (%.1) = assoc_entity element0, imports.%import_ref.10 [symbolic = %.2 (constants.%.2)]
- // 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.4)]
- // 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: %.1: type = assoc_entity_type @As.%As.type (%As.type.2), @As.%Convert.type (%Convert.type.7) [symbolic = %.1 (constants.%.9)]
- // CHECK:STDOUT: %.2: @As.%.1 (%.9) = assoc_entity element0, imports.%import_ref.27 [symbolic = %.2 (constants.%.10)]
- // 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: %.1: <witness> = interface_witness (%Convert) [symbolic = %.1 (constants.%.3)]
- // 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: %.1: <witness> = interface_witness (%Convert) [symbolic = %.1 (constants.%.4)]
- // 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: %.1: <witness> = interface_witness (%Convert) [symbolic = %.1 (constants.%.5)]
- // 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: %.1: <witness> = interface_witness (%Convert) [symbolic = %.1 (constants.%.8)]
- // 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: %.1: <witness> = interface_witness (%Convert) [symbolic = %.1 (constants.%.11)]
- // 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: %.1: <witness> = interface_witness (%Convert) [symbolic = %.1 (constants.%.12)]
- // 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: %.1: <witness> = interface_witness (%Convert) [symbolic = %.1 (constants.%.13)]
- // 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: %.1: <witness> = interface_witness (%Convert) [symbolic = %.1 (constants.%.16)]
- // 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.2)]
- // CHECK:STDOUT: %.loc5_8.2: type = unbound_element_type @Class.%Class (%Class.2), @Class.%T.1 (%T) [symbolic = %.loc5_8.2 (constants.%.17)]
- // CHECK:STDOUT: %.loc6_1.2: type = struct_type {.x: @Class.%T.1 (%T)} [symbolic = %.loc6_1.2 (constants.%.18)]
- // CHECK:STDOUT: %.loc6_1.3: <witness> = complete_type_witness @Class.%.loc6_1.2 (%.18) [symbolic = %.loc6_1.3 (constants.%.19)]
- // CHECK:STDOUT:
- // CHECK:STDOUT: class {
- // CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc4 [symbolic = %T.1 (constants.%T)]
- // CHECK:STDOUT: %.loc5_8.1: @Class.%.loc5_8.2 (%.17) = field_decl x, element0 [template]
- // CHECK:STDOUT: %.loc6_1.1: <witness> = complete_type_witness %.18 [symbolic = %.loc6_1.3 (constants.%.19)]
- // CHECK:STDOUT:
- // CHECK:STDOUT: !members:
- // CHECK:STDOUT: .Self = constants.%Class.2
- // CHECK:STDOUT: .x = %.loc5_8.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.2)]
- // CHECK:STDOUT: %.1: type = unbound_element_type @CompleteClass.%CompleteClass (%CompleteClass.2), %i32 [symbolic = %.1 (constants.%.23)]
- // 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.38
- // CHECK:STDOUT: .n = imports.%import_ref.39
- // CHECK:STDOUT: .F = imports.%import_ref.40
- // CHECK:STDOUT: }
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: generic fn @Convert.1(constants.%Dest: type, constants.%Self.1: @ImplicitAs.%ImplicitAs.type (%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.2)]
- // CHECK:STDOUT:
- // CHECK:STDOUT: fn[%self.param_patt: @Convert.1.%Self (%Self.2)]() -> @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.3: @As.%As.type (%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.4)]
- // CHECK:STDOUT:
- // CHECK:STDOUT: fn[%self.param_patt: @Convert.6.%Self (%Self.4)]() -> @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: %CompleteClass.3 {
- // CHECK:STDOUT: !entry:
- // CHECK:STDOUT: %.loc9_16: Core.IntLiteral = int_value 1 [template = constants.%.26]
- // CHECK:STDOUT: %.loc9_17.1: %.27 = struct_literal (%.loc9_16)
- // CHECK:STDOUT: %.loc9_17.2: %Convert.type.13 = interface_witness_access constants.%.31, element0 [template = constants.%Convert.14]
- // CHECK:STDOUT: %.loc9_17.3: <bound method> = bound_method %.loc9_16, %.loc9_17.2 [template = constants.%.32]
- // CHECK:STDOUT: %.loc9_17.4: <specific function> = specific_function %.loc9_17.3, @Convert.2(constants.%.20) [template = constants.%.33]
- // CHECK:STDOUT: %int.convert_checked: init %i32 = call %.loc9_17.4(%.loc9_16) [template = constants.%.34]
- // CHECK:STDOUT: %.loc9_17.5: init %i32 = converted %.loc9_16, %int.convert_checked [template = constants.%.34]
- // CHECK:STDOUT: %.loc9_17.6: ref %i32 = class_element_access %return, element0
- // CHECK:STDOUT: %.loc9_17.7: init %i32 = initialize_from %.loc9_17.5 to %.loc9_17.6 [template = constants.%.34]
- // CHECK:STDOUT: %.loc9_17.8: init %CompleteClass.3 = class_init (%.loc9_17.7), %return [template = constants.%struct]
- // CHECK:STDOUT: %.loc9_18: init %CompleteClass.3 = converted %.loc9_17.1, %.loc9_17.8 [template = constants.%struct]
- // 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: }
- // 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.2
- // CHECK:STDOUT: %Convert.type => constants.%Convert.type.5
- // CHECK:STDOUT: %Convert => constants.%Convert.5
- // CHECK:STDOUT: %.1 => constants.%.6
- // CHECK:STDOUT: %.2 => constants.%.7
- // 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.3) {
- // CHECK:STDOUT: %Dest => constants.%Dest
- // CHECK:STDOUT: %As.type => constants.%As.type.2
- // CHECK:STDOUT: %Self => constants.%Self.3
- // 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.4
- // CHECK:STDOUT: %Convert.type => constants.%Convert.type.11
- // CHECK:STDOUT: %Convert => constants.%Convert.11
- // CHECK:STDOUT: %.1 => constants.%.14
- // CHECK:STDOUT: %.2 => constants.%.15
- // 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.2
- // CHECK:STDOUT: %.1 => constants.%.23
- // 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.3
- // CHECK:STDOUT: %.1 => constants.%.24
- // 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.2
- // CHECK:STDOUT: %Convert.type => constants.%Convert.type.13
- // CHECK:STDOUT: %Convert => constants.%Convert.13
- // CHECK:STDOUT: %.1 => constants.%.28
- // CHECK:STDOUT: %.2 => constants.%.29
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: specific @impl.1(constants.%.20) {
- // CHECK:STDOUT: %N => constants.%.20
- // CHECK:STDOUT: %N.patt => constants.%.20
- // 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: %.1 => constants.%.31
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: specific @Convert.2(constants.%.20) {
- // CHECK:STDOUT: %N => constants.%.20
- // 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: %.1: 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, %.1 [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.1: %CompleteClass.type = struct_value () [template]
- // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic]
- // CHECK:STDOUT: %CompleteClass.2: type = class_type @CompleteClass, @CompleteClass(%T) [symbolic]
- // CHECK:STDOUT: %T.patt: type = symbolic_binding_pattern T, 0 [symbolic]
- // CHECK:STDOUT: %.4: type = unbound_element_type %CompleteClass.2, %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.3: type = class_type @CompleteClass, @CompleteClass(%i32) [template]
- // CHECK:STDOUT: %.5: type = unbound_element_type %CompleteClass.3, %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: %.7: <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.1]
- // CHECK:STDOUT: %import_ref.3: %F.type.3 = import_ref Main//foo, inst+413, 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 = import_ref Main//foo, inst+25, unloaded
- // CHECK:STDOUT: %import_ref.6: @CompleteClass.%.1 (%.4) = import_ref Main//foo, inst+44, loaded [template = %.1]
- // CHECK:STDOUT: %import_ref.7: @CompleteClass.%F.type (%F.type.1) = import_ref Main//foo, inst+53, 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: %.loc5_19.1: Core.IntLiteral = int_value 32 [template = constants.%.1]
- // CHECK:STDOUT: %int.make_type_signed.loc5: init type = call constants.%Int(%.loc5_19.1) [template = constants.%i32]
- // CHECK:STDOUT: %.loc5_19.2: type = value_of_initializer %int.make_type_signed.loc5 [template = constants.%i32]
- // CHECK:STDOUT: %.loc5_19.3: type = converted %int.make_type_signed.loc5, %.loc5_19.2 [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: %.loc10_18.1: Core.IntLiteral = int_value 32 [template = constants.%.1]
- // CHECK:STDOUT: %int.make_type_signed.loc10: init type = call constants.%Int(%.loc10_18.1) [template = constants.%i32]
- // CHECK:STDOUT: %.loc10_18.2: type = value_of_initializer %int.make_type_signed.loc10 [template = constants.%i32]
- // CHECK:STDOUT: %.loc10_18.3: type = converted %int.make_type_signed.loc10, %.loc10_18.2 [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.2)]
- // CHECK:STDOUT: %.1: type = unbound_element_type @CompleteClass.%CompleteClass (%CompleteClass.2), %i32 [symbolic = %.1 (constants.%.4)]
- // 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: }
- // 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.1]
- // CHECK:STDOUT: %.loc6_24: Core.IntLiteral = int_value 32 [template = constants.%.1]
- // CHECK:STDOUT: %int.make_type_signed.loc6: init type = call constants.%Int(%.loc6_24) [template = constants.%i32]
- // CHECK:STDOUT: %.loc6_23.1: type = value_of_initializer %int.make_type_signed.loc6 [template = constants.%i32]
- // CHECK:STDOUT: %.loc6_23.2: type = converted %int.make_type_signed.loc6, %.loc6_23.1 [template = constants.%i32]
- // CHECK:STDOUT: %CompleteClass: type = class_type @CompleteClass, @CompleteClass(constants.%i32) [template = constants.%CompleteClass.3]
- // CHECK:STDOUT: %v.var: ref %CompleteClass.3 = var v
- // CHECK:STDOUT: %v: ref %CompleteClass.3 = 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.3 = splice_block %v.var {}
- // CHECK:STDOUT: %F.call.loc6: init %CompleteClass.3 = call %F.ref.loc6() to %.loc6_7
- // CHECK:STDOUT: assign %v.var, %F.call.loc6
- // CHECK:STDOUT: %v.ref: ref %CompleteClass.3 = name_ref v, %v
- // CHECK:STDOUT: %.loc7_11.1: %F.type.2 = specific_constant imports.%import_ref.7, @CompleteClass(constants.%i32) [template = constants.%F.2]
- // CHECK:STDOUT: %F.ref.loc7: %F.type.2 = name_ref F, %.loc7_11.1 [template = constants.%F.2]
- // CHECK:STDOUT: %.loc7_11.2: <specific function> = specific_function %F.ref.loc7, @F.1(constants.%i32) [template = constants.%.7]
- // CHECK:STDOUT: %F.call.loc7: init %i32 = call %.loc7_11.2()
- // 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.3;
- // 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.1]
- // CHECK:STDOUT: %.loc11_24: Core.IntLiteral = int_value 32 [template = constants.%.1]
- // CHECK:STDOUT: %int.make_type_signed.loc11: init type = call constants.%Int(%.loc11_24) [template = constants.%i32]
- // CHECK:STDOUT: %.loc11_23.1: type = value_of_initializer %int.make_type_signed.loc11 [template = constants.%i32]
- // CHECK:STDOUT: %.loc11_23.2: type = converted %int.make_type_signed.loc11, %.loc11_23.1 [template = constants.%i32]
- // CHECK:STDOUT: %CompleteClass: type = class_type @CompleteClass, @CompleteClass(constants.%i32) [template = constants.%CompleteClass.3]
- // CHECK:STDOUT: %v.var: ref %CompleteClass.3 = var v
- // CHECK:STDOUT: %v: ref %CompleteClass.3 = 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.3 = splice_block %v.var {}
- // CHECK:STDOUT: %F.call: init %CompleteClass.3 = call %F.ref() to %.loc11_7
- // CHECK:STDOUT: assign %v.var, %F.call
- // CHECK:STDOUT: %v.ref: ref %CompleteClass.3 = name_ref v, %v
- // CHECK:STDOUT: %n.ref: %.5 = name_ref n, imports.%import_ref.6 [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.2
- // CHECK:STDOUT: %.1 => constants.%.4
- // 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.3
- // CHECK:STDOUT: %.1 => constants.%.5
- // 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.1: %CompleteClass.type = struct_value () [template]
- // CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template]
- // CHECK:STDOUT: %i32: type = int_type signed, %.1 [template]
- // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic]
- // CHECK:STDOUT: %CompleteClass.2: type = class_type @CompleteClass, @CompleteClass(%T) [symbolic]
- // CHECK:STDOUT: %T.patt: type = symbolic_binding_pattern T, 0 [symbolic]
- // CHECK:STDOUT: %.4: type = unbound_element_type %CompleteClass.2, %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: %.5: type = ptr_type %i32 [template]
- // CHECK:STDOUT: %CompleteClass.3: type = class_type @CompleteClass, @CompleteClass(%.5) [template]
- // CHECK:STDOUT: %.6: type = unbound_element_type %CompleteClass.3, %i32 [template]
- // CHECK:STDOUT: %F.type.2: type = fn_type @F.1, @CompleteClass(%.5) [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.4: type = class_type @CompleteClass, @CompleteClass(%i32) [template]
- // CHECK:STDOUT: %.8: type = unbound_element_type %CompleteClass.4, %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: %.14: <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: %.15: <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: %.16: <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: %.19: <witness> = interface_witness (%Convert.7) [symbolic]
- // CHECK:STDOUT: %As.type.2: type = facet_type <@As, @As(%Dest)> [symbolic]
- // CHECK:STDOUT: %Self.3: @As.%As.type (%As.type.2) = bind_symbolic_name Self, 1 [symbolic]
- // CHECK:STDOUT: %As.type.3: type = facet_type <@As, @As(%iN)> [symbolic]
- // CHECK:STDOUT: %Self.4: %As.type.2 = bind_symbolic_name Self, 1 [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: %.20: type = assoc_entity_type %As.type.2, %Convert.type.8 [symbolic]
- // CHECK:STDOUT: %.21: %.20 = assoc_entity element0, imports.%import_ref.33 [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: %.22: <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: %.23: <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: %.24: <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: %.25: type = assoc_entity_type %As.type.5, %Convert.type.12 [template]
- // CHECK:STDOUT: %.26: %.25 = assoc_entity element0, imports.%import_ref.40 [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: %.27: <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.1]
- // CHECK:STDOUT: %import_ref.3: %F.type.3 = import_ref Main//foo, inst+413, loaded [template = constants.%F.3]
- // CHECK:STDOUT: %Core: <namespace> = namespace file.%Core.import, [template] {
- // CHECK:STDOUT: .Int = %import_ref.7
- // CHECK:STDOUT: .ImplicitAs = %import_ref.8
- // CHECK:STDOUT: import Core//prelude
- // CHECK:STDOUT: import Core//prelude/...
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %import_ref.4 = import_ref Main//foo, inst+25, unloaded
- // CHECK:STDOUT: %import_ref.5 = import_ref Main//foo, inst+44, unloaded
- // CHECK:STDOUT: %import_ref.6 = import_ref Main//foo, inst+53, unloaded
- // CHECK:STDOUT: %import_ref.14: type = import_ref Main//foo, inst+121, loaded [template = Core.IntLiteral]
- // CHECK:STDOUT: %import_ref.15: type = import_ref Main//foo, inst+122, loaded [symbolic = @impl.1.%ImplicitAs.type (constants.%ImplicitAs.type.4)]
- // CHECK:STDOUT: %import_ref.16 = import_ref Main//foo, inst+123, unloaded
- // CHECK:STDOUT: %import_ref.17: type = import_ref Main//foo, inst+151, loaded [template = Core.IntLiteral]
- // CHECK:STDOUT: %import_ref.18: type = import_ref Main//foo, inst+152, loaded [symbolic = @impl.2.%ImplicitAs.type (constants.%ImplicitAs.type.5)]
- // CHECK:STDOUT: %import_ref.19 = import_ref Main//foo, inst+153, unloaded
- // CHECK:STDOUT: %import_ref.20: type = import_ref Main//foo, inst+180, loaded [symbolic = @impl.3.%iN (constants.%iN)]
- // CHECK:STDOUT: %import_ref.21: type = import_ref Main//foo, inst+181, loaded [template = constants.%ImplicitAs.type.6]
- // CHECK:STDOUT: %import_ref.22 = import_ref Main//foo, inst+182, unloaded
- // CHECK:STDOUT: %import_ref.24: type = import_ref Main//foo, inst+212, loaded [symbolic = @impl.4.%uN (constants.%uN)]
- // CHECK:STDOUT: %import_ref.25: type = import_ref Main//foo, inst+213, loaded [template = constants.%ImplicitAs.type.6]
- // CHECK:STDOUT: %import_ref.26 = import_ref Main//foo, inst+214, unloaded
- // CHECK:STDOUT: %import_ref.27 = import_ref Main//foo, inst+244, unloaded
- // CHECK:STDOUT: %import_ref.28 = import_ref Main//foo, inst+245, unloaded
- // CHECK:STDOUT: %import_ref.29 = import_ref Main//foo, inst+246, unloaded
- // CHECK:STDOUT: %import_ref.30: type = import_ref Main//foo, inst+252, loaded [template = Core.IntLiteral]
- // CHECK:STDOUT: %import_ref.31: type = import_ref Main//foo, inst+253, loaded [symbolic = @impl.5.%As.type (constants.%As.type.3)]
- // CHECK:STDOUT: %import_ref.32 = import_ref Main//foo, inst+254, unloaded
- // CHECK:STDOUT: %import_ref.33 = import_ref Main//foo, inst+269, unloaded
- // CHECK:STDOUT: %import_ref.34: type = import_ref Main//foo, inst+306, loaded [template = Core.IntLiteral]
- // CHECK:STDOUT: %import_ref.35: type = import_ref Main//foo, inst+307, loaded [symbolic = @impl.6.%As.type (constants.%As.type.4)]
- // CHECK:STDOUT: %import_ref.36 = import_ref Main//foo, inst+308, unloaded
- // CHECK:STDOUT: %import_ref.37: type = import_ref Main//foo, inst+335, loaded [symbolic = @impl.7.%iN (constants.%iN)]
- // CHECK:STDOUT: %import_ref.38: type = import_ref Main//foo, inst+336, loaded [template = constants.%As.type.5]
- // CHECK:STDOUT: %import_ref.39 = import_ref Main//foo, inst+337, unloaded
- // CHECK:STDOUT: %import_ref.41: type = import_ref Main//foo, inst+367, loaded [symbolic = @impl.8.%uN (constants.%uN)]
- // CHECK:STDOUT: %import_ref.42: type = import_ref Main//foo, inst+368, loaded [template = constants.%As.type.5]
- // CHECK:STDOUT: %import_ref.43 = import_ref Main//foo, inst+369, 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.4)]
- // 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: %.1: type = assoc_entity_type @As.%As.type (%As.type.2), @As.%Convert.type (%Convert.type.8) [symbolic = %.1 (constants.%.20)]
- // CHECK:STDOUT: %.2: @As.%.1 (%.20) = assoc_entity element0, imports.%import_ref.33 [symbolic = %.2 (constants.%.21)]
- // CHECK:STDOUT:
- // CHECK:STDOUT: interface {
- // CHECK:STDOUT: !members:
- // CHECK:STDOUT: .Self = imports.%import_ref.27
- // CHECK:STDOUT: .Convert = imports.%import_ref.28
- // CHECK:STDOUT: witness = (imports.%import_ref.29)
- // 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: %.1: <witness> = interface_witness (%Convert) [symbolic = %.1 (constants.%.14)]
- // 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.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: %.1: <witness> = interface_witness (%Convert) [symbolic = %.1 (constants.%.15)]
- // CHECK:STDOUT:
- // CHECK:STDOUT: impl: imports.%import_ref.17 as imports.%import_ref.18 {
- // CHECK:STDOUT: !members:
- // CHECK:STDOUT: witness = imports.%import_ref.19
- // 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: %.1: <witness> = interface_witness (%Convert) [symbolic = %.1 (constants.%.16)]
- // CHECK:STDOUT:
- // CHECK:STDOUT: impl: imports.%import_ref.20 as imports.%import_ref.21 {
- // CHECK:STDOUT: !members:
- // CHECK:STDOUT: witness = imports.%import_ref.22
- // 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: %.1: <witness> = interface_witness (%Convert) [symbolic = %.1 (constants.%.19)]
- // 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.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: %.1: <witness> = interface_witness (%Convert) [symbolic = %.1 (constants.%.22)]
- // CHECK:STDOUT:
- // CHECK:STDOUT: impl: imports.%import_ref.30 as imports.%import_ref.31 {
- // CHECK:STDOUT: !members:
- // CHECK:STDOUT: witness = imports.%import_ref.32
- // 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: %.1: <witness> = interface_witness (%Convert) [symbolic = %.1 (constants.%.23)]
- // CHECK:STDOUT:
- // CHECK:STDOUT: impl: imports.%import_ref.34 as imports.%import_ref.35 {
- // CHECK:STDOUT: !members:
- // CHECK:STDOUT: witness = imports.%import_ref.36
- // 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: %.1: <witness> = interface_witness (%Convert) [symbolic = %.1 (constants.%.24)]
- // CHECK:STDOUT:
- // CHECK:STDOUT: impl: imports.%import_ref.37 as imports.%import_ref.38 {
- // CHECK:STDOUT: !members:
- // CHECK:STDOUT: witness = imports.%import_ref.39
- // 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: %.1: <witness> = interface_witness (%Convert) [symbolic = %.1 (constants.%.27)]
- // CHECK:STDOUT:
- // CHECK:STDOUT: impl: imports.%import_ref.41 as imports.%import_ref.42 {
- // CHECK:STDOUT: !members:
- // CHECK:STDOUT: witness = imports.%import_ref.43
- // 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.2)]
- // CHECK:STDOUT: %.1: type = unbound_element_type @CompleteClass.%CompleteClass (%CompleteClass.2), %i32 [symbolic = %.1 (constants.%.4)]
- // 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.4
- // CHECK:STDOUT: .n = imports.%import_ref.5
- // CHECK:STDOUT: .F = imports.%import_ref.6
- // 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.1]
- // CHECK:STDOUT: %.loc14_24: Core.IntLiteral = int_value 32 [template = constants.%.1]
- // CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc14_24) [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: %.loc14_27.3: type = ptr_type %i32 [template = constants.%.5]
- // CHECK:STDOUT: %CompleteClass: type = class_type @CompleteClass, @CompleteClass(constants.%.5) [template = constants.%CompleteClass.3]
- // CHECK:STDOUT: %v.var: ref %CompleteClass.3 = var v
- // CHECK:STDOUT: %v: ref %CompleteClass.3 = 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_33: ref %CompleteClass.4 = temporary_storage
- // CHECK:STDOUT: %F.call: init %CompleteClass.4 = call %F.ref() to %.loc14_33
- // CHECK:STDOUT: %.loc14_35: %CompleteClass.3 = 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.4;
- // 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.3: @As.%As.type (%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.4)]
- // CHECK:STDOUT:
- // CHECK:STDOUT: fn[%self.param_patt: @Convert.6.%Self (%Self.4)]() -> @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.2
- // CHECK:STDOUT: %.1 => constants.%.4
- // 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.%.5) {
- // CHECK:STDOUT: %T => constants.%.5
- // CHECK:STDOUT: %T.patt => constants.%.5
- // CHECK:STDOUT:
- // CHECK:STDOUT: !definition:
- // CHECK:STDOUT: %CompleteClass => constants.%CompleteClass.3
- // CHECK:STDOUT: %.1 => constants.%.6
- // 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.4
- // CHECK:STDOUT: %.1 => constants.%.8
- // 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.3) {
- // CHECK:STDOUT: %Dest => constants.%Dest
- // CHECK:STDOUT: %As.type => constants.%As.type.2
- // CHECK:STDOUT: %Self => constants.%Self.3
- // 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.4
- // CHECK:STDOUT: %Convert.type => constants.%Convert.type.12
- // CHECK:STDOUT: %Convert => constants.%Convert.12
- // CHECK:STDOUT: %.1 => constants.%.25
- // CHECK:STDOUT: %.2 => constants.%.26
- // 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.%ImplicitAs.type (%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: %Self.2: %ImplicitAs.type.2 = bind_symbolic_name Self, 1 [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: %.1: type = assoc_entity_type %ImplicitAs.type.2, %Convert.type.1 [symbolic]
- // CHECK:STDOUT: %.2: %.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: %.3: <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: %.4: <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: %.5: <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: %.6: type = assoc_entity_type %ImplicitAs.type.5, %Convert.type.5 [template]
- // CHECK:STDOUT: %.7: %.6 = 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: %.8: <witness> = interface_witness (%Convert.6) [symbolic]
- // CHECK:STDOUT: %As.type.2: type = facet_type <@As, @As(%Dest)> [symbolic]
- // CHECK:STDOUT: %Self.3: @As.%As.type (%As.type.2) = bind_symbolic_name Self, 1 [symbolic]
- // CHECK:STDOUT: %As.type.3: type = facet_type <@As, @As(%iN)> [symbolic]
- // CHECK:STDOUT: %Self.4: %As.type.2 = bind_symbolic_name Self, 1 [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: %.9: type = assoc_entity_type %As.type.2, %Convert.type.7 [symbolic]
- // CHECK:STDOUT: %.10: %.9 = 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: %.11: <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: %.12: <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: %.13: <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: %.14: type = assoc_entity_type %As.type.5, %Convert.type.11 [template]
- // CHECK:STDOUT: %.15: %.14 = 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: %.16: <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.1: %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: %.17: %.type = struct_value () [template]
- // CHECK:STDOUT: %.18: 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.1]
- // CHECK:STDOUT: %import_ref.2 = import_ref Main//foo, inst+20, unloaded
- // CHECK:STDOUT: %import_ref.3 = import_ref Main//foo, inst+413, 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+77, unloaded
- // CHECK:STDOUT: %import_ref.5 = import_ref Main//foo, inst+78, unloaded
- // CHECK:STDOUT: %import_ref.6 = import_ref Main//foo, inst+79, unloaded
- // CHECK:STDOUT: %import_ref.7: type = import_ref Main//foo, inst+121, loaded [template = Core.IntLiteral]
- // CHECK:STDOUT: %import_ref.8: type = import_ref Main//foo, inst+122, loaded [symbolic = @impl.1.%ImplicitAs.type (constants.%ImplicitAs.type.3)]
- // CHECK:STDOUT: %import_ref.9 = import_ref Main//foo, inst+123, unloaded
- // CHECK:STDOUT: %import_ref.10 = import_ref Main//foo, inst+94, unloaded
- // CHECK:STDOUT: %import_ref.11: type = import_ref Main//foo, inst+151, loaded [template = Core.IntLiteral]
- // CHECK:STDOUT: %import_ref.12: type = import_ref Main//foo, inst+152, loaded [symbolic = @impl.2.%ImplicitAs.type (constants.%ImplicitAs.type.4)]
- // CHECK:STDOUT: %import_ref.13 = import_ref Main//foo, inst+153, unloaded
- // CHECK:STDOUT: %import_ref.14: type = import_ref Main//foo, inst+180, loaded [symbolic = @impl.3.%iN (constants.%iN)]
- // CHECK:STDOUT: %import_ref.15: type = import_ref Main//foo, inst+181, loaded [template = constants.%ImplicitAs.type.5]
- // CHECK:STDOUT: %import_ref.16 = import_ref Main//foo, inst+182, unloaded
- // CHECK:STDOUT: %import_ref.18: type = import_ref Main//foo, inst+212, loaded [symbolic = @impl.4.%uN (constants.%uN)]
- // CHECK:STDOUT: %import_ref.19: type = import_ref Main//foo, inst+213, loaded [template = constants.%ImplicitAs.type.5]
- // CHECK:STDOUT: %import_ref.20 = import_ref Main//foo, inst+214, unloaded
- // CHECK:STDOUT: %import_ref.21 = import_ref Main//foo, inst+244, unloaded
- // CHECK:STDOUT: %import_ref.22 = import_ref Main//foo, inst+245, unloaded
- // CHECK:STDOUT: %import_ref.23 = import_ref Main//foo, inst+246, unloaded
- // CHECK:STDOUT: %import_ref.24: type = import_ref Main//foo, inst+252, loaded [template = Core.IntLiteral]
- // CHECK:STDOUT: %import_ref.25: type = import_ref Main//foo, inst+253, loaded [symbolic = @impl.5.%As.type (constants.%As.type.3)]
- // CHECK:STDOUT: %import_ref.26 = import_ref Main//foo, inst+254, unloaded
- // CHECK:STDOUT: %import_ref.27 = import_ref Main//foo, inst+269, unloaded
- // CHECK:STDOUT: %import_ref.28: type = import_ref Main//foo, inst+306, loaded [template = Core.IntLiteral]
- // CHECK:STDOUT: %import_ref.29: type = import_ref Main//foo, inst+307, loaded [symbolic = @impl.6.%As.type (constants.%As.type.4)]
- // CHECK:STDOUT: %import_ref.30 = import_ref Main//foo, inst+308, unloaded
- // CHECK:STDOUT: %import_ref.31: type = import_ref Main//foo, inst+335, loaded [symbolic = @impl.7.%iN (constants.%iN)]
- // CHECK:STDOUT: %import_ref.32: type = import_ref Main//foo, inst+336, loaded [template = constants.%As.type.5]
- // CHECK:STDOUT: %import_ref.33 = import_ref Main//foo, inst+337, unloaded
- // CHECK:STDOUT: %import_ref.35: type = import_ref Main//foo, inst+367, loaded [symbolic = @impl.8.%uN (constants.%uN)]
- // CHECK:STDOUT: %import_ref.36: type = import_ref Main//foo, inst+368, loaded [template = constants.%As.type.5]
- // CHECK:STDOUT: %import_ref.37 = import_ref Main//foo, inst+369, 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.%.17] {
- // 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.2)]
- // 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: %.1: type = assoc_entity_type @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.2), @ImplicitAs.%Convert.type (%Convert.type.1) [symbolic = %.1 (constants.%.1)]
- // CHECK:STDOUT: %.2: @ImplicitAs.%.1 (%.1) = assoc_entity element0, imports.%import_ref.10 [symbolic = %.2 (constants.%.2)]
- // 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.4)]
- // 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: %.1: type = assoc_entity_type @As.%As.type (%As.type.2), @As.%Convert.type (%Convert.type.7) [symbolic = %.1 (constants.%.9)]
- // CHECK:STDOUT: %.2: @As.%.1 (%.9) = assoc_entity element0, imports.%import_ref.27 [symbolic = %.2 (constants.%.10)]
- // 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: %.1: <witness> = interface_witness (%Convert) [symbolic = %.1 (constants.%.3)]
- // 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: %.1: <witness> = interface_witness (%Convert) [symbolic = %.1 (constants.%.4)]
- // 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: %.1: <witness> = interface_witness (%Convert) [symbolic = %.1 (constants.%.5)]
- // 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: %.1: <witness> = interface_witness (%Convert) [symbolic = %.1 (constants.%.8)]
- // 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: %.1: <witness> = interface_witness (%Convert) [symbolic = %.1 (constants.%.11)]
- // 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: %.1: <witness> = interface_witness (%Convert) [symbolic = %.1 (constants.%.12)]
- // 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: %.1: <witness> = interface_witness (%Convert) [symbolic = %.1 (constants.%.13)]
- // 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: %.1: <witness> = interface_witness (%Convert) [symbolic = %.1 (constants.%.16)]
- // 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: %.loc17: <witness> = complete_type_witness <error> [template = <error>]
- // CHECK:STDOUT:
- // CHECK:STDOUT: !members:
- // CHECK:STDOUT: .Self = constants.%.18
- // CHECK:STDOUT: .x = %.loc16
- // CHECK:STDOUT: }
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: generic fn @Convert.1(constants.%Dest: type, constants.%Self.1: @ImplicitAs.%ImplicitAs.type (%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.2)]
- // CHECK:STDOUT:
- // CHECK:STDOUT: fn[%self.param_patt: @Convert.1.%Self (%Self.2)]() -> @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.3: @As.%As.type (%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.4)]
- // CHECK:STDOUT:
- // CHECK:STDOUT: fn[%self.param_patt: @Convert.6.%Self (%Self.4)]() -> @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: }
- // 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.2
- // CHECK:STDOUT: %Convert.type => constants.%Convert.type.5
- // CHECK:STDOUT: %Convert => constants.%Convert.5
- // CHECK:STDOUT: %.1 => constants.%.6
- // CHECK:STDOUT: %.2 => constants.%.7
- // 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.3) {
- // CHECK:STDOUT: %Dest => constants.%Dest
- // CHECK:STDOUT: %As.type => constants.%As.type.2
- // CHECK:STDOUT: %Self => constants.%Self.3
- // 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.4
- // CHECK:STDOUT: %Convert.type => constants.%Convert.type.11
- // CHECK:STDOUT: %Convert => constants.%Convert.11
- // CHECK:STDOUT: %.1 => constants.%.14
- // CHECK:STDOUT: %.2 => constants.%.15
- // 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:
|