| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732 |
- // Part of the Carbon Language project, under the Apache License v2.0 with LLVM
- // Exceptions. See /LICENSE for license information.
- // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
- //
- // INCLUDE-FILE: toolchain/testing/testdata/min_prelude/none.carbon
- // TODO: Add ranges and switch to "--dump-sem-ir-ranges=only".
- // EXTRA-ARGS: --dump-sem-ir-ranges=if-present
- //
- // AUTOUPDATE
- // TIP: To test this file alone, run:
- // TIP: bazel test //toolchain/testing:file_test --test_arg=--file_tests=toolchain/check/testdata/impl/import_interface_assoc_const.carbon
- // TIP: To dump output, run:
- // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/check/testdata/impl/import_interface_assoc_const.carbon
- // --- interface.carbon
- library "[[@TEST_NAME]]";
- interface I { let T:! type; }
- interface I3 {
- let T1:! type;
- let T2:! type;
- let T3:! type;
- }
- interface NonType {
- let Y:! {.a: {}};
- }
- // --- basic.carbon
- library "[[@TEST_NAME]]";
- import library "interface";
- class C1 { }
- impl C1 as I where .T = {} { }
- // --- redecl.carbon
- library "[[@TEST_NAME]]";
- import library "interface";
- class C2 { }
- impl C2 as I where .T = {};
- impl C2 as I where .T = {} { }
- // --- fail_redecl_adds_rewrites.carbon
- library "[[@TEST_NAME]]";
- import library "interface";
- class C3 { }
- // CHECK:STDERR: fail_redecl_adds_rewrites.carbon:[[@LINE+4]]:1: error: impl declared but not defined [ImplMissingDefinition]
- // CHECK:STDERR: impl C3 as I;
- // CHECK:STDERR: ^~~~~~~~~~~~~
- // CHECK:STDERR:
- impl C3 as I;
- impl C3 as I where .T = {} { }
- // --- fail_mismatch.carbon
- library "[[@TEST_NAME]]";
- import library "interface";
- class C4 { }
- // CHECK:STDERR: fail_mismatch.carbon:[[@LINE+4]]:1: error: impl declared but not defined [ImplMissingDefinition]
- // CHECK:STDERR: impl C4 as I where .T = {};
- // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~
- // CHECK:STDERR:
- impl C4 as I where .T = {};
- impl C4 as I where .T = () { }
- // --- fail_mismatch_bad_value.carbon
- library "[[@TEST_NAME]]";
- import library "interface";
- class C5 { }
- // This is testing that it won't complain about mismatching values if they
- // have errors.
- // CHECK:STDERR: fail_mismatch_bad_value.carbon:[[@LINE+8]]:27: error: name `BAD1` not found [NameNotFound]
- // CHECK:STDERR: impl C5 as I3 where .T1 = BAD1 and .T2 = {.a: {}} and .T3 = BAD2;
- // CHECK:STDERR: ^~~~
- // CHECK:STDERR:
- // CHECK:STDERR: fail_mismatch_bad_value.carbon:[[@LINE+4]]:61: error: name `BAD2` not found [NameNotFound]
- // CHECK:STDERR: impl C5 as I3 where .T1 = BAD1 and .T2 = {.a: {}} and .T3 = BAD2;
- // CHECK:STDERR: ^~~~
- // CHECK:STDERR:
- impl C5 as I3 where .T1 = BAD1 and .T2 = {.a: {}} and .T3 = BAD2;
- // CHECK:STDERR: fail_mismatch_bad_value.carbon:[[@LINE+8]]:46: error: name `BAD3` not found [NameNotFound]
- // CHECK:STDERR: impl C5 as I3 where .T1 = {.b: {}} and .T2 = BAD3 and .T3 = BAD4 { }
- // CHECK:STDERR: ^~~~
- // CHECK:STDERR:
- // CHECK:STDERR: fail_mismatch_bad_value.carbon:[[@LINE+4]]:61: error: name `BAD4` not found [NameNotFound]
- // CHECK:STDERR: impl C5 as I3 where .T1 = {.b: {}} and .T2 = BAD3 and .T3 = BAD4 { }
- // CHECK:STDERR: ^~~~
- // CHECK:STDERR:
- impl C5 as I3 where .T1 = {.b: {}} and .T2 = BAD3 and .T3 = BAD4 { }
- // --- fail_missing_on_definition.carbon
- library "[[@TEST_NAME]]";
- import library "interface";
- class C6 { }
- impl C6 as I where .T = {};
- // CHECK:STDERR: fail_missing_on_definition.carbon:[[@LINE+12]]:1: error: associated constant T not given a value in impl of interface I [ImplAssociatedConstantNeedsValue]
- // CHECK:STDERR: impl C6 as I { }
- // CHECK:STDERR: ^~~~~~~~~~~~~~
- // CHECK:STDERR: fail_missing_on_definition.carbon:[[@LINE-7]]:1: in import [InImport]
- // CHECK:STDERR: interface.carbon:3:19: note: associated constant declared here [AssociatedConstantHere]
- // CHECK:STDERR: interface I { let T:! type; }
- // CHECK:STDERR: ^~~~~~~~
- // CHECK:STDERR:
- // CHECK:STDERR: fail_missing_on_definition.carbon:[[@LINE-9]]:1: error: impl declared but not defined [ImplMissingDefinition]
- // CHECK:STDERR: impl C6 as I where .T = {};
- // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~
- // CHECK:STDERR:
- impl C6 as I { }
- // --- fail_two_different.carbon
- library "[[@TEST_NAME]]";
- import library "interface";
- class C7 { }
- // CHECK:STDERR: fail_two_different.carbon:[[@LINE+4]]:12: error: associated constant `.(I.T)` given two different values `{}` and `()` [AssociatedConstantWithDifferentValues]
- // CHECK:STDERR: impl C7 as I where .T = {} and .T = () { }
- // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~
- // CHECK:STDERR:
- impl C7 as I where .T = {} and .T = () { }
- // --- fail_two_different_first_bad.carbon
- library "[[@TEST_NAME]]";
- import library "interface";
- class C8 { }
- // CHECK:STDERR: fail_two_different_first_bad.carbon:[[@LINE+4]]:25: error: name `BAD5` not found [NameNotFound]
- // CHECK:STDERR: impl C8 as I where .T = BAD5 and .T = () { }
- // CHECK:STDERR: ^~~~
- // CHECK:STDERR:
- impl C8 as I where .T = BAD5 and .T = () { }
- // --- fail_two_different_second_bad.carbon
- library "[[@TEST_NAME]]";
- import library "interface";
- class C9 { }
- // CHECK:STDERR: fail_two_different_second_bad.carbon:[[@LINE+4]]:37: error: name `BAD6` not found [NameNotFound]
- // CHECK:STDERR: impl C9 as I where .T = {} and .T = BAD6 { }
- // CHECK:STDERR: ^~~~
- // CHECK:STDERR:
- impl C9 as I where .T = {} and .T = BAD6 { }
- // --- fail_two_different_both_bad.carbon
- library "[[@TEST_NAME]]";
- import library "interface";
- class CA { }
- // CHECK:STDERR: fail_two_different_both_bad.carbon:[[@LINE+8]]:25: error: name `BAD7` not found [NameNotFound]
- // CHECK:STDERR: impl CA as I where .T = BAD7 and .T = BAD8 { }
- // CHECK:STDERR: ^~~~
- // CHECK:STDERR:
- // CHECK:STDERR: fail_two_different_both_bad.carbon:[[@LINE+4]]:39: error: name `BAD8` not found [NameNotFound]
- // CHECK:STDERR: impl CA as I where .T = BAD7 and .T = BAD8 { }
- // CHECK:STDERR: ^~~~
- // CHECK:STDERR:
- impl CA as I where .T = BAD7 and .T = BAD8 { }
- // --- repeated.carbon
- library "[[@TEST_NAME]]";
- import library "interface";
- class CB { }
- impl CB as I where .T = {} and .T = {} { }
- // --- non-type.carbon
- library "[[@TEST_NAME]]";
- import library "interface";
- class CC { }
- impl CC as NonType where .Y = {.a = {}} { }
- // --- interface_with_function.carbon
- library "[[@TEST_NAME]]";
- interface IF { fn F(); }
- // --- fail_where_rewrite_function.carbon
- library "[[@TEST_NAME]]";
- import library "interface_with_function";
- class CD { }
- // CHECK:STDERR: fail_where_rewrite_function.carbon:[[@LINE+4]]:12: error: rewrite specified for associated function F [RewriteForAssociatedFunction]
- // CHECK:STDERR: impl CD as IF where .F = 0 {
- // CHECK:STDERR: ^~~~~~~~~~~~~~~
- // CHECK:STDERR:
- impl CD as IF where .F = 0 {
- fn F() {}
- }
- // CHECK:STDOUT: --- interface.carbon
- // CHECK:STDOUT:
- // CHECK:STDOUT: constants {
- // CHECK:STDOUT: %I.type: type = facet_type <@I> [concrete]
- // CHECK:STDOUT: %Self.ab9: %I.type = symbolic_binding Self, 0 [symbolic]
- // CHECK:STDOUT: %I.assoc_type: type = assoc_entity_type @I [concrete]
- // CHECK:STDOUT: %assoc0.2e7: %I.assoc_type = assoc_entity element0, @I.WithSelf.%T [concrete]
- // CHECK:STDOUT: %I3.type: type = facet_type <@I3> [concrete]
- // CHECK:STDOUT: %Self.70b: %I3.type = symbolic_binding Self, 0 [symbolic]
- // CHECK:STDOUT: %I3.assoc_type: type = assoc_entity_type @I3 [concrete]
- // CHECK:STDOUT: %assoc0.0d5: %I3.assoc_type = assoc_entity element0, @I3.WithSelf.%T1 [concrete]
- // CHECK:STDOUT: %assoc1: %I3.assoc_type = assoc_entity element1, @I3.WithSelf.%T2 [concrete]
- // CHECK:STDOUT: %assoc2: %I3.assoc_type = assoc_entity element2, @I3.WithSelf.%T3 [concrete]
- // CHECK:STDOUT: %NonType.type: type = facet_type <@NonType> [concrete]
- // CHECK:STDOUT: %Self.13f: %NonType.type = symbolic_binding Self, 0 [symbolic]
- // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete]
- // CHECK:STDOUT: %struct_type.a: type = struct_type {.a: %empty_struct_type} [concrete]
- // CHECK:STDOUT: %NonType.assoc_type: type = assoc_entity_type @NonType [concrete]
- // CHECK:STDOUT: %assoc0.0f3: %NonType.assoc_type = assoc_entity element0, @NonType.WithSelf.%Y [concrete]
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: file {
- // CHECK:STDOUT: package: <namespace> = namespace [concrete] {
- // CHECK:STDOUT: .I = %I.decl
- // CHECK:STDOUT: .I3 = %I3.decl
- // CHECK:STDOUT: .NonType = %NonType.decl
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %I.decl: type = interface_decl @I [concrete = constants.%I.type] {} {}
- // CHECK:STDOUT: %I3.decl: type = interface_decl @I3 [concrete = constants.%I3.type] {} {}
- // CHECK:STDOUT: %NonType.decl: type = interface_decl @NonType [concrete = constants.%NonType.type] {} {}
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: interface @I {
- // CHECK:STDOUT: %Self: %I.type = symbolic_binding Self, 0 [symbolic = constants.%Self.ab9]
- // CHECK:STDOUT: %I.WithSelf.decl = interface_with_self_decl @I [concrete]
- // CHECK:STDOUT:
- // CHECK:STDOUT: !with Self:
- // CHECK:STDOUT: %T: type = assoc_const_decl @T [concrete] {
- // CHECK:STDOUT: %assoc0: %I.assoc_type = assoc_entity element0, @I.WithSelf.%T [concrete = constants.%assoc0.2e7]
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: !members:
- // CHECK:STDOUT: .Self = %Self
- // CHECK:STDOUT: .T = @T.%assoc0
- // CHECK:STDOUT: witness = (@I.WithSelf.%T)
- // CHECK:STDOUT:
- // CHECK:STDOUT: !requires:
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: interface @I3 {
- // CHECK:STDOUT: %Self: %I3.type = symbolic_binding Self, 0 [symbolic = constants.%Self.70b]
- // CHECK:STDOUT: %I3.WithSelf.decl = interface_with_self_decl @I3 [concrete]
- // CHECK:STDOUT:
- // CHECK:STDOUT: !with Self:
- // CHECK:STDOUT: %T1: type = assoc_const_decl @T1 [concrete] {
- // CHECK:STDOUT: %assoc0: %I3.assoc_type = assoc_entity element0, @I3.WithSelf.%T1 [concrete = constants.%assoc0.0d5]
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %T2: type = assoc_const_decl @T2 [concrete] {
- // CHECK:STDOUT: %assoc1: %I3.assoc_type = assoc_entity element1, @I3.WithSelf.%T2 [concrete = constants.%assoc1]
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %T3: type = assoc_const_decl @T3 [concrete] {
- // CHECK:STDOUT: %assoc2: %I3.assoc_type = assoc_entity element2, @I3.WithSelf.%T3 [concrete = constants.%assoc2]
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: !members:
- // CHECK:STDOUT: .Self = %Self
- // CHECK:STDOUT: .T1 = @T1.%assoc0
- // CHECK:STDOUT: .T2 = @T2.%assoc1
- // CHECK:STDOUT: .T3 = @T3.%assoc2
- // CHECK:STDOUT: witness = (@I3.WithSelf.%T1, @I3.WithSelf.%T2, @I3.WithSelf.%T3)
- // CHECK:STDOUT:
- // CHECK:STDOUT: !requires:
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: interface @NonType {
- // CHECK:STDOUT: %Self: %NonType.type = symbolic_binding Self, 0 [symbolic = constants.%Self.13f]
- // CHECK:STDOUT: %NonType.WithSelf.decl = interface_with_self_decl @NonType [concrete]
- // CHECK:STDOUT:
- // CHECK:STDOUT: !with Self:
- // CHECK:STDOUT: %Y: %struct_type.a = assoc_const_decl @Y [concrete] {
- // CHECK:STDOUT: %assoc0: %NonType.assoc_type = assoc_entity element0, @NonType.WithSelf.%Y [concrete = constants.%assoc0.0f3]
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: !members:
- // CHECK:STDOUT: .Self = %Self
- // CHECK:STDOUT: .Y = @Y.%assoc0
- // CHECK:STDOUT: witness = (@NonType.WithSelf.%Y)
- // CHECK:STDOUT:
- // CHECK:STDOUT: !requires:
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: specific @I.WithSelf(constants.%Self.ab9) {}
- // CHECK:STDOUT:
- // CHECK:STDOUT: specific @I3.WithSelf(constants.%Self.70b) {}
- // CHECK:STDOUT:
- // CHECK:STDOUT: specific @NonType.WithSelf(constants.%Self.13f) {}
- // CHECK:STDOUT:
- // CHECK:STDOUT: --- basic.carbon
- // CHECK:STDOUT:
- // CHECK:STDOUT: constants {
- // CHECK:STDOUT: %C1: type = class_type @C1 [concrete]
- // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete]
- // CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %empty_struct_type [concrete]
- // CHECK:STDOUT: %I.type: type = facet_type <@I> [concrete]
- // CHECK:STDOUT: %Self: %I.type = symbolic_binding Self, 0 [symbolic]
- // CHECK:STDOUT: %.Self: %I.type = symbolic_binding .Self [symbolic_self]
- // CHECK:STDOUT: %.Self.binding.as_type: type = symbolic_binding_type .Self, %.Self [symbolic_self]
- // CHECK:STDOUT: %I.assoc_type: type = assoc_entity_type @I [concrete]
- // CHECK:STDOUT: %assoc0: %I.assoc_type = assoc_entity element0, imports.%Main.import_ref.9c9 [concrete]
- // CHECK:STDOUT: %I.lookup_impl_witness: <witness> = lookup_impl_witness %.Self, @I [symbolic_self]
- // CHECK:STDOUT: %impl.elem0: type = impl_witness_access %I.lookup_impl_witness, element0 [symbolic_self]
- // CHECK:STDOUT: %empty_struct: %empty_struct_type = struct_value () [concrete]
- // CHECK:STDOUT: %I_where.type: type = facet_type <@I where %impl.elem0 = %empty_struct_type> [concrete]
- // CHECK:STDOUT: %I.impl_witness: <witness> = impl_witness @C1.as.I.impl.%I.impl_witness_table [concrete]
- // CHECK:STDOUT: %I.facet: %I.type = facet_value %C1, (%I.impl_witness) [concrete]
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: imports {
- // CHECK:STDOUT: %Main.I: type = import_ref Main//interface, I, loaded [concrete = constants.%I.type]
- // CHECK:STDOUT: %Main.I3 = import_ref Main//interface, I3, unloaded
- // CHECK:STDOUT: %Main.NonType = import_ref Main//interface, NonType, unloaded
- // CHECK:STDOUT: %Main.import_ref.8ef: %I.assoc_type = import_ref Main//interface, loc3_20, loaded [concrete = constants.%assoc0]
- // CHECK:STDOUT: %Main.T: type = import_ref Main//interface, T, loaded [concrete = %T]
- // CHECK:STDOUT: %Main.import_ref.c82 = import_ref Main//interface, loc3_13, unloaded
- // CHECK:STDOUT: %Main.import_ref.9c9: type = import_ref Main//interface, loc3_20, loaded [concrete = %T]
- // CHECK:STDOUT: %T: type = assoc_const_decl @T [concrete] {}
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: file {
- // CHECK:STDOUT: package: <namespace> = namespace [concrete] {
- // CHECK:STDOUT: .I = imports.%Main.I
- // CHECK:STDOUT: .I3 = imports.%Main.I3
- // CHECK:STDOUT: .NonType = imports.%Main.NonType
- // CHECK:STDOUT: .C1 = %C1.decl
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %default.import = import <none>
- // CHECK:STDOUT: %C1.decl: type = class_decl @C1 [concrete = constants.%C1] {} {}
- // CHECK:STDOUT: impl_decl @C1.as.I.impl [concrete] {} {
- // CHECK:STDOUT: %C1.ref: type = name_ref C1, file.%C1.decl [concrete = constants.%C1]
- // CHECK:STDOUT: %I.ref: type = name_ref I, imports.%Main.I [concrete = constants.%I.type]
- // CHECK:STDOUT: %.Self: %I.type = symbolic_binding .Self [symbolic_self = constants.%.Self]
- // CHECK:STDOUT: %.Self.ref: %I.type = name_ref .Self, %.Self [symbolic_self = constants.%.Self]
- // CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self.ref [symbolic_self = constants.%.Self.binding.as_type]
- // CHECK:STDOUT: %.loc5_20: type = converted %.Self.ref, %.Self.as_type [symbolic_self = constants.%.Self.binding.as_type]
- // CHECK:STDOUT: %T.ref: %I.assoc_type = name_ref T, imports.%Main.import_ref.8ef [concrete = constants.%assoc0]
- // CHECK:STDOUT: %impl.elem0: type = impl_witness_access constants.%I.lookup_impl_witness, element0 [symbolic_self = constants.%impl.elem0]
- // CHECK:STDOUT: %.loc5_26.1: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct]
- // CHECK:STDOUT: %.loc5_26.2: type = converted %.loc5_26.1, constants.%empty_struct_type [concrete = constants.%empty_struct_type]
- // CHECK:STDOUT: %.loc5_14: type = where_expr %.Self [concrete = constants.%I_where.type] {
- // CHECK:STDOUT: requirement_base_facet_type constants.%I.type
- // CHECK:STDOUT: requirement_rewrite %impl.elem0, %.loc5_26.2
- // CHECK:STDOUT: }
- // CHECK:STDOUT: }
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: interface @I [from "interface.carbon"] {
- // CHECK:STDOUT: !members:
- // CHECK:STDOUT: .Self = imports.%Main.import_ref.c82
- // CHECK:STDOUT: .T = imports.%Main.import_ref.8ef
- // CHECK:STDOUT: witness = (imports.%Main.T)
- // CHECK:STDOUT:
- // CHECK:STDOUT: !requires:
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: impl @C1.as.I.impl: %C1.ref as %.loc5_14 {
- // CHECK:STDOUT: %I.impl_witness_table = impl_witness_table (%impl_witness_assoc_constant), @C1.as.I.impl [concrete]
- // CHECK:STDOUT: %I.impl_witness: <witness> = impl_witness %I.impl_witness_table [concrete = constants.%I.impl_witness]
- // CHECK:STDOUT: %impl_witness_assoc_constant: type = impl_witness_assoc_constant constants.%empty_struct_type [concrete = constants.%empty_struct_type]
- // CHECK:STDOUT:
- // CHECK:STDOUT: !members:
- // CHECK:STDOUT: witness = %I.impl_witness
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: class @C1 {
- // CHECK:STDOUT: %complete_type: <witness> = complete_type_witness constants.%empty_struct_type [concrete = constants.%complete_type]
- // CHECK:STDOUT: complete_type_witness = %complete_type
- // CHECK:STDOUT:
- // CHECK:STDOUT: !members:
- // CHECK:STDOUT: .Self = constants.%C1
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: specific @I.WithSelf(constants.%Self) {
- // CHECK:STDOUT: !definition:
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: specific @I.WithSelf(constants.%.Self) {
- // CHECK:STDOUT: !definition:
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: specific @I.WithSelf(constants.%I.facet) {
- // CHECK:STDOUT: !definition:
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: --- redecl.carbon
- // CHECK:STDOUT:
- // CHECK:STDOUT: constants {
- // CHECK:STDOUT: %C2: type = class_type @C2 [concrete]
- // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete]
- // CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %empty_struct_type [concrete]
- // CHECK:STDOUT: %I.type: type = facet_type <@I> [concrete]
- // CHECK:STDOUT: %Self: %I.type = symbolic_binding Self, 0 [symbolic]
- // CHECK:STDOUT: %.Self: %I.type = symbolic_binding .Self [symbolic_self]
- // CHECK:STDOUT: %.Self.binding.as_type: type = symbolic_binding_type .Self, %.Self [symbolic_self]
- // CHECK:STDOUT: %I.assoc_type: type = assoc_entity_type @I [concrete]
- // CHECK:STDOUT: %assoc0: %I.assoc_type = assoc_entity element0, imports.%Main.import_ref.9c9 [concrete]
- // CHECK:STDOUT: %I.lookup_impl_witness: <witness> = lookup_impl_witness %.Self, @I [symbolic_self]
- // CHECK:STDOUT: %impl.elem0: type = impl_witness_access %I.lookup_impl_witness, element0 [symbolic_self]
- // CHECK:STDOUT: %empty_struct: %empty_struct_type = struct_value () [concrete]
- // CHECK:STDOUT: %I_where.type: type = facet_type <@I where %impl.elem0 = %empty_struct_type> [concrete]
- // CHECK:STDOUT: %I.impl_witness: <witness> = impl_witness @C2.as.I.impl.%I.impl_witness_table [concrete]
- // CHECK:STDOUT: %I.facet: %I.type = facet_value %C2, (%I.impl_witness) [concrete]
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: imports {
- // CHECK:STDOUT: %Main.I: type = import_ref Main//interface, I, loaded [concrete = constants.%I.type]
- // CHECK:STDOUT: %Main.I3 = import_ref Main//interface, I3, unloaded
- // CHECK:STDOUT: %Main.NonType = import_ref Main//interface, NonType, unloaded
- // CHECK:STDOUT: %Main.import_ref.8ef: %I.assoc_type = import_ref Main//interface, loc3_20, loaded [concrete = constants.%assoc0]
- // CHECK:STDOUT: %Main.T: type = import_ref Main//interface, T, loaded [concrete = %T]
- // CHECK:STDOUT: %Main.import_ref.c82 = import_ref Main//interface, loc3_13, unloaded
- // CHECK:STDOUT: %Main.import_ref.9c9: type = import_ref Main//interface, loc3_20, loaded [concrete = %T]
- // CHECK:STDOUT: %T: type = assoc_const_decl @T [concrete] {}
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: file {
- // CHECK:STDOUT: package: <namespace> = namespace [concrete] {
- // CHECK:STDOUT: .I = imports.%Main.I
- // CHECK:STDOUT: .I3 = imports.%Main.I3
- // CHECK:STDOUT: .NonType = imports.%Main.NonType
- // CHECK:STDOUT: .C2 = %C2.decl
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %default.import = import <none>
- // CHECK:STDOUT: %C2.decl: type = class_decl @C2 [concrete = constants.%C2] {} {}
- // CHECK:STDOUT: impl_decl @C2.as.I.impl [concrete] {} {
- // CHECK:STDOUT: %C2.ref.loc5: type = name_ref C2, file.%C2.decl [concrete = constants.%C2]
- // CHECK:STDOUT: %I.ref.loc5: type = name_ref I, imports.%Main.I [concrete = constants.%I.type]
- // CHECK:STDOUT: %.Self.2: %I.type = symbolic_binding .Self [symbolic_self = constants.%.Self]
- // CHECK:STDOUT: %.Self.ref.loc5: %I.type = name_ref .Self, %.Self.2 [symbolic_self = constants.%.Self]
- // CHECK:STDOUT: %.Self.as_type.loc5: type = facet_access_type %.Self.ref.loc5 [symbolic_self = constants.%.Self.binding.as_type]
- // CHECK:STDOUT: %.loc5_20: type = converted %.Self.ref.loc5, %.Self.as_type.loc5 [symbolic_self = constants.%.Self.binding.as_type]
- // CHECK:STDOUT: %T.ref.loc5: %I.assoc_type = name_ref T, imports.%Main.import_ref.8ef [concrete = constants.%assoc0]
- // CHECK:STDOUT: %impl.elem0.loc5: type = impl_witness_access constants.%I.lookup_impl_witness, element0 [symbolic_self = constants.%impl.elem0]
- // CHECK:STDOUT: %.loc5_26.1: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct]
- // CHECK:STDOUT: %.loc5_26.2: type = converted %.loc5_26.1, constants.%empty_struct_type [concrete = constants.%empty_struct_type]
- // CHECK:STDOUT: %.loc5_14: type = where_expr %.Self.2 [concrete = constants.%I_where.type] {
- // CHECK:STDOUT: requirement_base_facet_type constants.%I.type
- // CHECK:STDOUT: requirement_rewrite %impl.elem0.loc5, %.loc5_26.2
- // CHECK:STDOUT: }
- // CHECK:STDOUT: }
- // CHECK:STDOUT: impl_decl @C2.as.I.impl [concrete] {} {
- // CHECK:STDOUT: %C2.ref.loc6: type = name_ref C2, file.%C2.decl [concrete = constants.%C2]
- // CHECK:STDOUT: %I.ref.loc6: type = name_ref I, imports.%Main.I [concrete = constants.%I.type]
- // CHECK:STDOUT: %.Self.1: %I.type = symbolic_binding .Self [symbolic_self = constants.%.Self]
- // CHECK:STDOUT: %.Self.ref.loc6: %I.type = name_ref .Self, %.Self.1 [symbolic_self = constants.%.Self]
- // CHECK:STDOUT: %.Self.as_type.loc6: type = facet_access_type %.Self.ref.loc6 [symbolic_self = constants.%.Self.binding.as_type]
- // CHECK:STDOUT: %.loc6_20: type = converted %.Self.ref.loc6, %.Self.as_type.loc6 [symbolic_self = constants.%.Self.binding.as_type]
- // CHECK:STDOUT: %T.ref.loc6: %I.assoc_type = name_ref T, imports.%Main.import_ref.8ef [concrete = constants.%assoc0]
- // CHECK:STDOUT: %impl.elem0.loc6: type = impl_witness_access constants.%I.lookup_impl_witness, element0 [symbolic_self = constants.%impl.elem0]
- // CHECK:STDOUT: %.loc6_26.1: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct]
- // CHECK:STDOUT: %.loc6_26.2: type = converted %.loc6_26.1, constants.%empty_struct_type [concrete = constants.%empty_struct_type]
- // CHECK:STDOUT: %.loc6_14: type = where_expr %.Self.1 [concrete = constants.%I_where.type] {
- // CHECK:STDOUT: requirement_base_facet_type constants.%I.type
- // CHECK:STDOUT: requirement_rewrite %impl.elem0.loc6, %.loc6_26.2
- // CHECK:STDOUT: }
- // CHECK:STDOUT: }
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: interface @I [from "interface.carbon"] {
- // CHECK:STDOUT: !members:
- // CHECK:STDOUT: .Self = imports.%Main.import_ref.c82
- // CHECK:STDOUT: .T = imports.%Main.import_ref.8ef
- // CHECK:STDOUT: witness = (imports.%Main.T)
- // CHECK:STDOUT:
- // CHECK:STDOUT: !requires:
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: impl @C2.as.I.impl: %C2.ref.loc5 as %.loc5_14 {
- // CHECK:STDOUT: %I.impl_witness_table = impl_witness_table (%impl_witness_assoc_constant), @C2.as.I.impl [concrete]
- // CHECK:STDOUT: %I.impl_witness: <witness> = impl_witness %I.impl_witness_table [concrete = constants.%I.impl_witness]
- // CHECK:STDOUT: %impl_witness_assoc_constant: type = impl_witness_assoc_constant constants.%empty_struct_type [concrete = constants.%empty_struct_type]
- // CHECK:STDOUT:
- // CHECK:STDOUT: !members:
- // CHECK:STDOUT: witness = %I.impl_witness
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: class @C2 {
- // CHECK:STDOUT: %complete_type: <witness> = complete_type_witness constants.%empty_struct_type [concrete = constants.%complete_type]
- // CHECK:STDOUT: complete_type_witness = %complete_type
- // CHECK:STDOUT:
- // CHECK:STDOUT: !members:
- // CHECK:STDOUT: .Self = constants.%C2
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: specific @I.WithSelf(constants.%Self) {
- // CHECK:STDOUT: !definition:
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: specific @I.WithSelf(constants.%.Self) {
- // CHECK:STDOUT: !definition:
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: specific @I.WithSelf(constants.%I.facet) {
- // CHECK:STDOUT: !definition:
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: --- fail_redecl_adds_rewrites.carbon
- // CHECK:STDOUT:
- // CHECK:STDOUT: constants {
- // CHECK:STDOUT: %C3: type = class_type @C3 [concrete]
- // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete]
- // CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %empty_struct_type [concrete]
- // CHECK:STDOUT: %I.type: type = facet_type <@I> [concrete]
- // CHECK:STDOUT: %Self: %I.type = symbolic_binding Self, 0 [symbolic]
- // CHECK:STDOUT: %.Self: %I.type = symbolic_binding .Self [symbolic_self]
- // CHECK:STDOUT: %.Self.binding.as_type: type = symbolic_binding_type .Self, %.Self [symbolic_self]
- // CHECK:STDOUT: %I.assoc_type: type = assoc_entity_type @I [concrete]
- // CHECK:STDOUT: %assoc0: %I.assoc_type = assoc_entity element0, imports.%Main.import_ref.9c9 [concrete]
- // CHECK:STDOUT: %I.lookup_impl_witness: <witness> = lookup_impl_witness %.Self, @I [symbolic_self]
- // CHECK:STDOUT: %impl.elem0: type = impl_witness_access %I.lookup_impl_witness, element0 [symbolic_self]
- // CHECK:STDOUT: %empty_struct: %empty_struct_type = struct_value () [concrete]
- // CHECK:STDOUT: %I_where.type: type = facet_type <@I where %impl.elem0 = %empty_struct_type> [concrete]
- // CHECK:STDOUT: %I.impl_witness.721: <witness> = impl_witness @C3.as.I.impl.b9a.%I.impl_witness_table [concrete]
- // CHECK:STDOUT: %I.facet: %I.type = facet_value %C3, (%I.impl_witness.721) [concrete]
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: imports {
- // CHECK:STDOUT: %Main.I: type = import_ref Main//interface, I, loaded [concrete = constants.%I.type]
- // CHECK:STDOUT: %Main.I3 = import_ref Main//interface, I3, unloaded
- // CHECK:STDOUT: %Main.NonType = import_ref Main//interface, NonType, unloaded
- // CHECK:STDOUT: %Main.import_ref.8ef: %I.assoc_type = import_ref Main//interface, loc3_20, loaded [concrete = constants.%assoc0]
- // CHECK:STDOUT: %Main.T: type = import_ref Main//interface, T, loaded [concrete = %T]
- // CHECK:STDOUT: %Main.import_ref.c82 = import_ref Main//interface, loc3_13, unloaded
- // CHECK:STDOUT: %Main.import_ref.9c9: type = import_ref Main//interface, loc3_20, loaded [concrete = %T]
- // CHECK:STDOUT: %T: type = assoc_const_decl @T [concrete] {}
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: file {
- // CHECK:STDOUT: package: <namespace> = namespace [concrete] {
- // CHECK:STDOUT: .I = imports.%Main.I
- // CHECK:STDOUT: .I3 = imports.%Main.I3
- // CHECK:STDOUT: .NonType = imports.%Main.NonType
- // CHECK:STDOUT: .C3 = %C3.decl
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %default.import = import <none>
- // CHECK:STDOUT: %C3.decl: type = class_decl @C3 [concrete = constants.%C3] {} {}
- // CHECK:STDOUT: impl_decl @C3.as.I.impl.4fb [concrete] {} {
- // CHECK:STDOUT: %C3.ref: type = name_ref C3, file.%C3.decl [concrete = constants.%C3]
- // CHECK:STDOUT: %I.ref: type = name_ref I, imports.%Main.I [concrete = constants.%I.type]
- // CHECK:STDOUT: }
- // CHECK:STDOUT: impl_decl @C3.as.I.impl.b9a [concrete] {} {
- // CHECK:STDOUT: %C3.ref: type = name_ref C3, file.%C3.decl [concrete = constants.%C3]
- // CHECK:STDOUT: %I.ref: type = name_ref I, imports.%Main.I [concrete = constants.%I.type]
- // CHECK:STDOUT: %.Self: %I.type = symbolic_binding .Self [symbolic_self = constants.%.Self]
- // CHECK:STDOUT: %.Self.ref: %I.type = name_ref .Self, %.Self [symbolic_self = constants.%.Self]
- // CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self.ref [symbolic_self = constants.%.Self.binding.as_type]
- // CHECK:STDOUT: %.loc10_20: type = converted %.Self.ref, %.Self.as_type [symbolic_self = constants.%.Self.binding.as_type]
- // CHECK:STDOUT: %T.ref: %I.assoc_type = name_ref T, imports.%Main.import_ref.8ef [concrete = constants.%assoc0]
- // CHECK:STDOUT: %impl.elem0: type = impl_witness_access constants.%I.lookup_impl_witness, element0 [symbolic_self = constants.%impl.elem0]
- // CHECK:STDOUT: %.loc10_26.1: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct]
- // CHECK:STDOUT: %.loc10_26.2: type = converted %.loc10_26.1, constants.%empty_struct_type [concrete = constants.%empty_struct_type]
- // CHECK:STDOUT: %.loc10_14: type = where_expr %.Self [concrete = constants.%I_where.type] {
- // CHECK:STDOUT: requirement_base_facet_type constants.%I.type
- // CHECK:STDOUT: requirement_rewrite %impl.elem0, %.loc10_26.2
- // CHECK:STDOUT: }
- // CHECK:STDOUT: }
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: interface @I [from "interface.carbon"] {
- // CHECK:STDOUT: !members:
- // CHECK:STDOUT: .Self = imports.%Main.import_ref.c82
- // CHECK:STDOUT: .T = imports.%Main.import_ref.8ef
- // CHECK:STDOUT: witness = (imports.%Main.T)
- // CHECK:STDOUT:
- // CHECK:STDOUT: !requires:
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: impl @C3.as.I.impl.4fb: %C3.ref as %I.ref;
- // CHECK:STDOUT:
- // CHECK:STDOUT: impl @C3.as.I.impl.b9a: %C3.ref as %.loc10_14 {
- // CHECK:STDOUT: %I.impl_witness_table = impl_witness_table (%impl_witness_assoc_constant), @C3.as.I.impl.b9a [concrete]
- // CHECK:STDOUT: %I.impl_witness: <witness> = impl_witness %I.impl_witness_table [concrete = constants.%I.impl_witness.721]
- // CHECK:STDOUT: %impl_witness_assoc_constant: type = impl_witness_assoc_constant constants.%empty_struct_type [concrete = constants.%empty_struct_type]
- // CHECK:STDOUT:
- // CHECK:STDOUT: !members:
- // CHECK:STDOUT: witness = %I.impl_witness
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: class @C3 {
- // CHECK:STDOUT: %complete_type: <witness> = complete_type_witness constants.%empty_struct_type [concrete = constants.%complete_type]
- // CHECK:STDOUT: complete_type_witness = %complete_type
- // CHECK:STDOUT:
- // CHECK:STDOUT: !members:
- // CHECK:STDOUT: .Self = constants.%C3
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: specific @I.WithSelf(constants.%Self) {
- // CHECK:STDOUT: !definition:
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: specific @I.WithSelf(constants.%.Self) {
- // CHECK:STDOUT: !definition:
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: specific @I.WithSelf(constants.%I.facet) {
- // CHECK:STDOUT: !definition:
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: --- fail_mismatch.carbon
- // CHECK:STDOUT:
- // CHECK:STDOUT: constants {
- // CHECK:STDOUT: %C4: type = class_type @C4 [concrete]
- // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete]
- // CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %empty_struct_type [concrete]
- // CHECK:STDOUT: %I.type: type = facet_type <@I> [concrete]
- // CHECK:STDOUT: %Self: %I.type = symbolic_binding Self, 0 [symbolic]
- // CHECK:STDOUT: %.Self: %I.type = symbolic_binding .Self [symbolic_self]
- // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete]
- // CHECK:STDOUT: %.Self.binding.as_type: type = symbolic_binding_type .Self, %.Self [symbolic_self]
- // CHECK:STDOUT: %I.assoc_type: type = assoc_entity_type @I [concrete]
- // CHECK:STDOUT: %assoc0: %I.assoc_type = assoc_entity element0, imports.%Main.import_ref.9c9 [concrete]
- // CHECK:STDOUT: %I.lookup_impl_witness: <witness> = lookup_impl_witness %.Self, @I [symbolic_self]
- // CHECK:STDOUT: %impl.elem0: type = impl_witness_access %I.lookup_impl_witness, element0 [symbolic_self]
- // CHECK:STDOUT: %empty_struct: %empty_struct_type = struct_value () [concrete]
- // CHECK:STDOUT: %I_where.type.1c0: type = facet_type <@I where %impl.elem0 = %empty_struct_type> [concrete]
- // CHECK:STDOUT: %empty_tuple: %empty_tuple.type = tuple_value () [concrete]
- // CHECK:STDOUT: %I_where.type.0f9: type = facet_type <@I where %impl.elem0 = %empty_tuple.type> [concrete]
- // CHECK:STDOUT: %I.impl_witness.68c: <witness> = impl_witness @C4.as.I.impl.95c.%I.impl_witness_table [concrete]
- // CHECK:STDOUT: %I.facet: %I.type = facet_value %C4, (%I.impl_witness.68c) [concrete]
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: imports {
- // CHECK:STDOUT: %Main.I: type = import_ref Main//interface, I, loaded [concrete = constants.%I.type]
- // CHECK:STDOUT: %Main.I3 = import_ref Main//interface, I3, unloaded
- // CHECK:STDOUT: %Main.NonType = import_ref Main//interface, NonType, unloaded
- // CHECK:STDOUT: %Main.import_ref.8ef: %I.assoc_type = import_ref Main//interface, loc3_20, loaded [concrete = constants.%assoc0]
- // CHECK:STDOUT: %Main.T: type = import_ref Main//interface, T, loaded [concrete = %T]
- // CHECK:STDOUT: %Main.import_ref.c82 = import_ref Main//interface, loc3_13, unloaded
- // CHECK:STDOUT: %Main.import_ref.9c9: type = import_ref Main//interface, loc3_20, loaded [concrete = %T]
- // CHECK:STDOUT: %T: type = assoc_const_decl @T [concrete] {}
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: file {
- // CHECK:STDOUT: package: <namespace> = namespace [concrete] {
- // CHECK:STDOUT: .I = imports.%Main.I
- // CHECK:STDOUT: .I3 = imports.%Main.I3
- // CHECK:STDOUT: .NonType = imports.%Main.NonType
- // CHECK:STDOUT: .C4 = %C4.decl
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %default.import = import <none>
- // CHECK:STDOUT: %C4.decl: type = class_decl @C4 [concrete = constants.%C4] {} {}
- // CHECK:STDOUT: impl_decl @C4.as.I.impl.2eb [concrete] {} {
- // CHECK:STDOUT: %C4.ref: type = name_ref C4, file.%C4.decl [concrete = constants.%C4]
- // CHECK:STDOUT: %I.ref: type = name_ref I, imports.%Main.I [concrete = constants.%I.type]
- // CHECK:STDOUT: %.Self: %I.type = symbolic_binding .Self [symbolic_self = constants.%.Self]
- // CHECK:STDOUT: %.Self.ref: %I.type = name_ref .Self, %.Self [symbolic_self = constants.%.Self]
- // CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self.ref [symbolic_self = constants.%.Self.binding.as_type]
- // CHECK:STDOUT: %.loc9_20: type = converted %.Self.ref, %.Self.as_type [symbolic_self = constants.%.Self.binding.as_type]
- // CHECK:STDOUT: %T.ref: %I.assoc_type = name_ref T, imports.%Main.import_ref.8ef [concrete = constants.%assoc0]
- // CHECK:STDOUT: %impl.elem0: type = impl_witness_access constants.%I.lookup_impl_witness, element0 [symbolic_self = constants.%impl.elem0]
- // CHECK:STDOUT: %.loc9_26.1: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct]
- // CHECK:STDOUT: %.loc9_26.2: type = converted %.loc9_26.1, constants.%empty_struct_type [concrete = constants.%empty_struct_type]
- // CHECK:STDOUT: %.loc9_14: type = where_expr %.Self [concrete = constants.%I_where.type.1c0] {
- // CHECK:STDOUT: requirement_base_facet_type constants.%I.type
- // CHECK:STDOUT: requirement_rewrite %impl.elem0, %.loc9_26.2
- // CHECK:STDOUT: }
- // CHECK:STDOUT: }
- // CHECK:STDOUT: impl_decl @C4.as.I.impl.95c [concrete] {} {
- // CHECK:STDOUT: %C4.ref: type = name_ref C4, file.%C4.decl [concrete = constants.%C4]
- // CHECK:STDOUT: %I.ref: type = name_ref I, imports.%Main.I [concrete = constants.%I.type]
- // CHECK:STDOUT: %.Self: %I.type = symbolic_binding .Self [symbolic_self = constants.%.Self]
- // CHECK:STDOUT: %.Self.ref: %I.type = name_ref .Self, %.Self [symbolic_self = constants.%.Self]
- // CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self.ref [symbolic_self = constants.%.Self.binding.as_type]
- // CHECK:STDOUT: %.loc10_20: type = converted %.Self.ref, %.Self.as_type [symbolic_self = constants.%.Self.binding.as_type]
- // CHECK:STDOUT: %T.ref: %I.assoc_type = name_ref T, imports.%Main.import_ref.8ef [concrete = constants.%assoc0]
- // CHECK:STDOUT: %impl.elem0: type = impl_witness_access constants.%I.lookup_impl_witness, element0 [symbolic_self = constants.%impl.elem0]
- // CHECK:STDOUT: %.loc10_26.1: %empty_tuple.type = tuple_literal () [concrete = constants.%empty_tuple]
- // CHECK:STDOUT: %.loc10_26.2: type = converted %.loc10_26.1, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type]
- // CHECK:STDOUT: %.loc10_14: type = where_expr %.Self [concrete = constants.%I_where.type.0f9] {
- // CHECK:STDOUT: requirement_base_facet_type constants.%I.type
- // CHECK:STDOUT: requirement_rewrite %impl.elem0, %.loc10_26.2
- // CHECK:STDOUT: }
- // CHECK:STDOUT: }
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: interface @I [from "interface.carbon"] {
- // CHECK:STDOUT: !members:
- // CHECK:STDOUT: .Self = imports.%Main.import_ref.c82
- // CHECK:STDOUT: .T = imports.%Main.import_ref.8ef
- // CHECK:STDOUT: witness = (imports.%Main.T)
- // CHECK:STDOUT:
- // CHECK:STDOUT: !requires:
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: impl @C4.as.I.impl.2eb: %C4.ref as %.loc9_14;
- // CHECK:STDOUT:
- // CHECK:STDOUT: impl @C4.as.I.impl.95c: %C4.ref as %.loc10_14 {
- // CHECK:STDOUT: %I.impl_witness_table = impl_witness_table (%impl_witness_assoc_constant), @C4.as.I.impl.95c [concrete]
- // CHECK:STDOUT: %I.impl_witness: <witness> = impl_witness %I.impl_witness_table [concrete = constants.%I.impl_witness.68c]
- // CHECK:STDOUT: %impl_witness_assoc_constant: type = impl_witness_assoc_constant constants.%empty_tuple.type [concrete = constants.%empty_tuple.type]
- // CHECK:STDOUT:
- // CHECK:STDOUT: !members:
- // CHECK:STDOUT: witness = %I.impl_witness
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: class @C4 {
- // CHECK:STDOUT: %complete_type: <witness> = complete_type_witness constants.%empty_struct_type [concrete = constants.%complete_type]
- // CHECK:STDOUT: complete_type_witness = %complete_type
- // CHECK:STDOUT:
- // CHECK:STDOUT: !members:
- // CHECK:STDOUT: .Self = constants.%C4
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: specific @I.WithSelf(constants.%Self) {
- // CHECK:STDOUT: !definition:
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: specific @I.WithSelf(constants.%.Self) {
- // CHECK:STDOUT: !definition:
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: specific @I.WithSelf(constants.%I.facet) {
- // CHECK:STDOUT: !definition:
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: --- fail_mismatch_bad_value.carbon
- // CHECK:STDOUT:
- // CHECK:STDOUT: constants {
- // CHECK:STDOUT: %C5: type = class_type @C5 [concrete]
- // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete]
- // CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %empty_struct_type [concrete]
- // CHECK:STDOUT: %I3.type: type = facet_type <@I3> [concrete]
- // CHECK:STDOUT: %Self: %I3.type = symbolic_binding Self, 0 [symbolic]
- // CHECK:STDOUT: %.Self: %I3.type = symbolic_binding .Self [symbolic_self]
- // CHECK:STDOUT: %.Self.binding.as_type: type = symbolic_binding_type .Self, %.Self [symbolic_self]
- // CHECK:STDOUT: %I3.assoc_type: type = assoc_entity_type @I3 [concrete]
- // CHECK:STDOUT: %assoc0: %I3.assoc_type = assoc_entity element0, imports.%Main.import_ref.889 [concrete]
- // CHECK:STDOUT: %I3.lookup_impl_witness: <witness> = lookup_impl_witness %.Self, @I3 [symbolic_self]
- // CHECK:STDOUT: %impl.elem0: type = impl_witness_access %I3.lookup_impl_witness, element0 [symbolic_self]
- // CHECK:STDOUT: %assoc1: %I3.assoc_type = assoc_entity element1, imports.%Main.import_ref.fa1 [concrete]
- // CHECK:STDOUT: %impl.elem1: type = impl_witness_access %I3.lookup_impl_witness, element1 [symbolic_self]
- // CHECK:STDOUT: %empty_struct: %empty_struct_type = struct_value () [concrete]
- // CHECK:STDOUT: %struct_type.a: type = struct_type {.a: %empty_struct_type} [concrete]
- // CHECK:STDOUT: %assoc2: %I3.assoc_type = assoc_entity element2, imports.%Main.import_ref.c77 [concrete]
- // CHECK:STDOUT: %impl.elem2: type = impl_witness_access %I3.lookup_impl_witness, element2 [symbolic_self]
- // CHECK:STDOUT: %struct_type.b: type = struct_type {.b: %empty_struct_type} [concrete]
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: imports {
- // CHECK:STDOUT: %Main.I = import_ref Main//interface, I, unloaded
- // CHECK:STDOUT: %Main.I3: type = import_ref Main//interface, I3, loaded [concrete = constants.%I3.type]
- // CHECK:STDOUT: %Main.NonType = import_ref Main//interface, NonType, unloaded
- // CHECK:STDOUT: %Main.import_ref.454: %I3.assoc_type = import_ref Main//interface, loc6_9, loaded [concrete = constants.%assoc0]
- // CHECK:STDOUT: %Main.import_ref.d88: %I3.assoc_type = import_ref Main//interface, loc7_9, loaded [concrete = constants.%assoc1]
- // CHECK:STDOUT: %Main.import_ref.4cd: %I3.assoc_type = import_ref Main//interface, loc8_9, loaded [concrete = constants.%assoc2]
- // CHECK:STDOUT: %Main.T1 = import_ref Main//interface, T1, unloaded
- // CHECK:STDOUT: %Main.T2 = import_ref Main//interface, T2, unloaded
- // CHECK:STDOUT: %Main.T3 = import_ref Main//interface, T3, unloaded
- // CHECK:STDOUT: %Main.import_ref.6d9 = import_ref Main//interface, loc5_14, unloaded
- // CHECK:STDOUT: %Main.import_ref.889: type = import_ref Main//interface, loc6_9, loaded [concrete = %T1]
- // CHECK:STDOUT: %T1: type = assoc_const_decl @T1 [concrete] {}
- // CHECK:STDOUT: %Main.import_ref.fa1: type = import_ref Main//interface, loc7_9, loaded [concrete = %T2]
- // CHECK:STDOUT: %T2: type = assoc_const_decl @T2 [concrete] {}
- // CHECK:STDOUT: %Main.import_ref.c77: type = import_ref Main//interface, loc8_9, loaded [concrete = %T3]
- // CHECK:STDOUT: %T3: type = assoc_const_decl @T3 [concrete] {}
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: file {
- // CHECK:STDOUT: package: <namespace> = namespace [concrete] {
- // CHECK:STDOUT: .I = imports.%Main.I
- // CHECK:STDOUT: .I3 = imports.%Main.I3
- // CHECK:STDOUT: .NonType = imports.%Main.NonType
- // CHECK:STDOUT: .C5 = %C5.decl
- // CHECK:STDOUT: .BAD1 = <poisoned>
- // CHECK:STDOUT: .BAD2 = <poisoned>
- // CHECK:STDOUT: .BAD3 = <poisoned>
- // CHECK:STDOUT: .BAD4 = <poisoned>
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %default.import = import <none>
- // CHECK:STDOUT: %C5.decl: type = class_decl @C5 [concrete = constants.%C5] {} {}
- // CHECK:STDOUT: impl_decl @C5.as.<error>.impl.bcbfb8.1 [concrete] {} {
- // CHECK:STDOUT: %C5.ref: type = name_ref C5, file.%C5.decl [concrete = constants.%C5]
- // CHECK:STDOUT: %I3.ref: type = name_ref I3, imports.%Main.I3 [concrete = constants.%I3.type]
- // CHECK:STDOUT: %.Self: %I3.type = symbolic_binding .Self [symbolic_self = constants.%.Self]
- // CHECK:STDOUT: %.Self.ref.loc17_21: %I3.type = name_ref .Self, %.Self [symbolic_self = constants.%.Self]
- // CHECK:STDOUT: %.Self.as_type.loc17_21: type = facet_access_type %.Self.ref.loc17_21 [symbolic_self = constants.%.Self.binding.as_type]
- // CHECK:STDOUT: %.loc17_21: type = converted %.Self.ref.loc17_21, %.Self.as_type.loc17_21 [symbolic_self = constants.%.Self.binding.as_type]
- // CHECK:STDOUT: %T1.ref: %I3.assoc_type = name_ref T1, imports.%Main.import_ref.454 [concrete = constants.%assoc0]
- // CHECK:STDOUT: %impl.elem0: type = impl_witness_access constants.%I3.lookup_impl_witness, element0 [symbolic_self = constants.%impl.elem0]
- // CHECK:STDOUT: %BAD1.ref: <error> = name_ref BAD1, <error> [concrete = <error>]
- // CHECK:STDOUT: %.Self.ref.loc17_36: %I3.type = name_ref .Self, %.Self [symbolic_self = constants.%.Self]
- // CHECK:STDOUT: %.Self.as_type.loc17_36: type = facet_access_type %.Self.ref.loc17_36 [symbolic_self = constants.%.Self.binding.as_type]
- // CHECK:STDOUT: %.loc17_36: type = converted %.Self.ref.loc17_36, %.Self.as_type.loc17_36 [symbolic_self = constants.%.Self.binding.as_type]
- // CHECK:STDOUT: %T2.ref: %I3.assoc_type = name_ref T2, imports.%Main.import_ref.d88 [concrete = constants.%assoc1]
- // CHECK:STDOUT: %impl.elem1: type = impl_witness_access constants.%I3.lookup_impl_witness, element1 [symbolic_self = constants.%impl.elem1]
- // CHECK:STDOUT: %.loc17_48.1: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct]
- // CHECK:STDOUT: %.loc17_48.2: type = converted %.loc17_48.1, constants.%empty_struct_type [concrete = constants.%empty_struct_type]
- // CHECK:STDOUT: %struct_type.a: type = struct_type {.a: %empty_struct_type} [concrete = constants.%struct_type.a]
- // CHECK:STDOUT: %.Self.ref.loc17_55: %I3.type = name_ref .Self, %.Self [symbolic_self = constants.%.Self]
- // CHECK:STDOUT: %.Self.as_type.loc17_55: type = facet_access_type %.Self.ref.loc17_55 [symbolic_self = constants.%.Self.binding.as_type]
- // CHECK:STDOUT: %.loc17_55: type = converted %.Self.ref.loc17_55, %.Self.as_type.loc17_55 [symbolic_self = constants.%.Self.binding.as_type]
- // CHECK:STDOUT: %T3.ref: %I3.assoc_type = name_ref T3, imports.%Main.import_ref.4cd [concrete = constants.%assoc2]
- // CHECK:STDOUT: %impl.elem2: type = impl_witness_access constants.%I3.lookup_impl_witness, element2 [symbolic_self = constants.%impl.elem2]
- // CHECK:STDOUT: %BAD2.ref: <error> = name_ref BAD2, <error> [concrete = <error>]
- // CHECK:STDOUT: %.loc17_15: type = where_expr %.Self [concrete = <error>] {
- // CHECK:STDOUT: requirement_base_facet_type constants.%I3.type
- // CHECK:STDOUT: requirement_rewrite %impl.elem0, <error>
- // CHECK:STDOUT: requirement_rewrite %impl.elem1, %struct_type.a
- // CHECK:STDOUT: requirement_rewrite %impl.elem2, <error>
- // CHECK:STDOUT: }
- // CHECK:STDOUT: }
- // CHECK:STDOUT: impl_decl @C5.as.<error>.impl.bcbfb8.2 [concrete] {} {
- // CHECK:STDOUT: %C5.ref: type = name_ref C5, file.%C5.decl [concrete = constants.%C5]
- // CHECK:STDOUT: %I3.ref: type = name_ref I3, imports.%Main.I3 [concrete = constants.%I3.type]
- // CHECK:STDOUT: %.Self: %I3.type = symbolic_binding .Self [symbolic_self = constants.%.Self]
- // CHECK:STDOUT: %.Self.ref.loc27_21: %I3.type = name_ref .Self, %.Self [symbolic_self = constants.%.Self]
- // CHECK:STDOUT: %.Self.as_type.loc27_21: type = facet_access_type %.Self.ref.loc27_21 [symbolic_self = constants.%.Self.binding.as_type]
- // CHECK:STDOUT: %.loc27_21: type = converted %.Self.ref.loc27_21, %.Self.as_type.loc27_21 [symbolic_self = constants.%.Self.binding.as_type]
- // CHECK:STDOUT: %T1.ref: %I3.assoc_type = name_ref T1, imports.%Main.import_ref.454 [concrete = constants.%assoc0]
- // CHECK:STDOUT: %impl.elem0: type = impl_witness_access constants.%I3.lookup_impl_witness, element0 [symbolic_self = constants.%impl.elem0]
- // CHECK:STDOUT: %.loc27_33.1: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct]
- // CHECK:STDOUT: %.loc27_33.2: type = converted %.loc27_33.1, constants.%empty_struct_type [concrete = constants.%empty_struct_type]
- // CHECK:STDOUT: %struct_type.b: type = struct_type {.b: %empty_struct_type} [concrete = constants.%struct_type.b]
- // CHECK:STDOUT: %.Self.ref.loc27_40: %I3.type = name_ref .Self, %.Self [symbolic_self = constants.%.Self]
- // CHECK:STDOUT: %.Self.as_type.loc27_40: type = facet_access_type %.Self.ref.loc27_40 [symbolic_self = constants.%.Self.binding.as_type]
- // CHECK:STDOUT: %.loc27_40: type = converted %.Self.ref.loc27_40, %.Self.as_type.loc27_40 [symbolic_self = constants.%.Self.binding.as_type]
- // CHECK:STDOUT: %T2.ref: %I3.assoc_type = name_ref T2, imports.%Main.import_ref.d88 [concrete = constants.%assoc1]
- // CHECK:STDOUT: %impl.elem1: type = impl_witness_access constants.%I3.lookup_impl_witness, element1 [symbolic_self = constants.%impl.elem1]
- // CHECK:STDOUT: %BAD3.ref: <error> = name_ref BAD3, <error> [concrete = <error>]
- // CHECK:STDOUT: %.Self.ref.loc27_55: %I3.type = name_ref .Self, %.Self [symbolic_self = constants.%.Self]
- // CHECK:STDOUT: %.Self.as_type.loc27_55: type = facet_access_type %.Self.ref.loc27_55 [symbolic_self = constants.%.Self.binding.as_type]
- // CHECK:STDOUT: %.loc27_55: type = converted %.Self.ref.loc27_55, %.Self.as_type.loc27_55 [symbolic_self = constants.%.Self.binding.as_type]
- // CHECK:STDOUT: %T3.ref: %I3.assoc_type = name_ref T3, imports.%Main.import_ref.4cd [concrete = constants.%assoc2]
- // CHECK:STDOUT: %impl.elem2: type = impl_witness_access constants.%I3.lookup_impl_witness, element2 [symbolic_self = constants.%impl.elem2]
- // CHECK:STDOUT: %BAD4.ref: <error> = name_ref BAD4, <error> [concrete = <error>]
- // CHECK:STDOUT: %.loc27_15: type = where_expr %.Self [concrete = <error>] {
- // CHECK:STDOUT: requirement_base_facet_type constants.%I3.type
- // CHECK:STDOUT: requirement_rewrite %impl.elem0, %struct_type.b
- // CHECK:STDOUT: requirement_rewrite %impl.elem1, <error>
- // CHECK:STDOUT: requirement_rewrite %impl.elem2, <error>
- // CHECK:STDOUT: }
- // CHECK:STDOUT: }
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: interface @I3 [from "interface.carbon"] {
- // CHECK:STDOUT: !members:
- // CHECK:STDOUT: .Self = imports.%Main.import_ref.6d9
- // CHECK:STDOUT: .T1 = imports.%Main.import_ref.454
- // CHECK:STDOUT: .T2 = imports.%Main.import_ref.d88
- // CHECK:STDOUT: .T3 = imports.%Main.import_ref.4cd
- // CHECK:STDOUT: witness = (imports.%Main.T1, imports.%Main.T2, imports.%Main.T3)
- // CHECK:STDOUT:
- // CHECK:STDOUT: !requires:
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: impl @C5.as.<error>.impl.bcbfb8.1: %C5.ref as %.loc17_15;
- // CHECK:STDOUT:
- // CHECK:STDOUT: impl @C5.as.<error>.impl.bcbfb8.2: %C5.ref as %.loc27_15 {
- // CHECK:STDOUT: !members:
- // CHECK:STDOUT: witness = <error>
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: class @C5 {
- // CHECK:STDOUT: %complete_type: <witness> = complete_type_witness constants.%empty_struct_type [concrete = constants.%complete_type]
- // CHECK:STDOUT: complete_type_witness = %complete_type
- // CHECK:STDOUT:
- // CHECK:STDOUT: !members:
- // CHECK:STDOUT: .Self = constants.%C5
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: specific @I3.WithSelf(constants.%Self) {
- // CHECK:STDOUT: !definition:
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: specific @I3.WithSelf(constants.%.Self) {
- // CHECK:STDOUT: !definition:
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: --- fail_missing_on_definition.carbon
- // CHECK:STDOUT:
- // CHECK:STDOUT: constants {
- // CHECK:STDOUT: %C6: type = class_type @C6 [concrete]
- // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete]
- // CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %empty_struct_type [concrete]
- // CHECK:STDOUT: %I.type: type = facet_type <@I> [concrete]
- // CHECK:STDOUT: %Self: %I.type = symbolic_binding Self, 0 [symbolic]
- // CHECK:STDOUT: %.Self: %I.type = symbolic_binding .Self [symbolic_self]
- // CHECK:STDOUT: %.Self.binding.as_type: type = symbolic_binding_type .Self, %.Self [symbolic_self]
- // CHECK:STDOUT: %I.assoc_type: type = assoc_entity_type @I [concrete]
- // CHECK:STDOUT: %assoc0: %I.assoc_type = assoc_entity element0, imports.%Main.import_ref.9c9 [concrete]
- // CHECK:STDOUT: %I.lookup_impl_witness: <witness> = lookup_impl_witness %.Self, @I [symbolic_self]
- // CHECK:STDOUT: %impl.elem0: type = impl_witness_access %I.lookup_impl_witness, element0 [symbolic_self]
- // CHECK:STDOUT: %empty_struct: %empty_struct_type = struct_value () [concrete]
- // CHECK:STDOUT: %I_where.type: type = facet_type <@I where %impl.elem0 = %empty_struct_type> [concrete]
- // CHECK:STDOUT: %I.impl_witness.9dc: <witness> = impl_witness @C6.as.I.impl.27c.%I.impl_witness_table [concrete]
- // CHECK:STDOUT: %I.facet: %I.type = facet_value %C6, (%I.impl_witness.9dc) [concrete]
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: imports {
- // CHECK:STDOUT: %Main.I: type = import_ref Main//interface, I, loaded [concrete = constants.%I.type]
- // CHECK:STDOUT: %Main.I3 = import_ref Main//interface, I3, unloaded
- // CHECK:STDOUT: %Main.NonType = import_ref Main//interface, NonType, unloaded
- // CHECK:STDOUT: %Main.import_ref.8ef: %I.assoc_type = import_ref Main//interface, loc3_20, loaded [concrete = constants.%assoc0]
- // CHECK:STDOUT: %Main.T: type = import_ref Main//interface, T, loaded [concrete = %T]
- // CHECK:STDOUT: %Main.import_ref.c82 = import_ref Main//interface, loc3_13, unloaded
- // CHECK:STDOUT: %Main.import_ref.9c9: type = import_ref Main//interface, loc3_20, loaded [concrete = %T]
- // CHECK:STDOUT: %T: type = assoc_const_decl @T [concrete] {}
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: file {
- // CHECK:STDOUT: package: <namespace> = namespace [concrete] {
- // CHECK:STDOUT: .I = imports.%Main.I
- // CHECK:STDOUT: .I3 = imports.%Main.I3
- // CHECK:STDOUT: .NonType = imports.%Main.NonType
- // CHECK:STDOUT: .C6 = %C6.decl
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %default.import = import <none>
- // CHECK:STDOUT: %C6.decl: type = class_decl @C6 [concrete = constants.%C6] {} {}
- // CHECK:STDOUT: impl_decl @C6.as.I.impl.756 [concrete] {} {
- // CHECK:STDOUT: %C6.ref: type = name_ref C6, file.%C6.decl [concrete = constants.%C6]
- // CHECK:STDOUT: %I.ref: type = name_ref I, imports.%Main.I [concrete = constants.%I.type]
- // CHECK:STDOUT: %.Self: %I.type = symbolic_binding .Self [symbolic_self = constants.%.Self]
- // CHECK:STDOUT: %.Self.ref: %I.type = name_ref .Self, %.Self [symbolic_self = constants.%.Self]
- // CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self.ref [symbolic_self = constants.%.Self.binding.as_type]
- // CHECK:STDOUT: %.loc5_20: type = converted %.Self.ref, %.Self.as_type [symbolic_self = constants.%.Self.binding.as_type]
- // CHECK:STDOUT: %T.ref: %I.assoc_type = name_ref T, imports.%Main.import_ref.8ef [concrete = constants.%assoc0]
- // CHECK:STDOUT: %impl.elem0: type = impl_witness_access constants.%I.lookup_impl_witness, element0 [symbolic_self = constants.%impl.elem0]
- // CHECK:STDOUT: %.loc5_26.1: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct]
- // CHECK:STDOUT: %.loc5_26.2: type = converted %.loc5_26.1, constants.%empty_struct_type [concrete = constants.%empty_struct_type]
- // CHECK:STDOUT: %.loc5_14: type = where_expr %.Self [concrete = constants.%I_where.type] {
- // CHECK:STDOUT: requirement_base_facet_type constants.%I.type
- // CHECK:STDOUT: requirement_rewrite %impl.elem0, %.loc5_26.2
- // CHECK:STDOUT: }
- // CHECK:STDOUT: }
- // CHECK:STDOUT: impl_decl @C6.as.I.impl.27c [concrete] {} {
- // CHECK:STDOUT: %C6.ref: type = name_ref C6, file.%C6.decl [concrete = constants.%C6]
- // CHECK:STDOUT: %I.ref: type = name_ref I, imports.%Main.I [concrete = constants.%I.type]
- // CHECK:STDOUT: }
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: interface @I [from "interface.carbon"] {
- // CHECK:STDOUT: !members:
- // CHECK:STDOUT: .Self = imports.%Main.import_ref.c82
- // CHECK:STDOUT: .T = imports.%Main.import_ref.8ef
- // CHECK:STDOUT: witness = (imports.%Main.T)
- // CHECK:STDOUT:
- // CHECK:STDOUT: !requires:
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: impl @C6.as.I.impl.756: %C6.ref as %.loc5_14;
- // CHECK:STDOUT:
- // CHECK:STDOUT: impl @C6.as.I.impl.27c: %C6.ref as %I.ref {
- // CHECK:STDOUT: %I.impl_witness_table = impl_witness_table (<error>), @C6.as.I.impl.27c [concrete]
- // CHECK:STDOUT: %I.impl_witness: <witness> = impl_witness %I.impl_witness_table [concrete = constants.%I.impl_witness.9dc]
- // CHECK:STDOUT:
- // CHECK:STDOUT: !members:
- // CHECK:STDOUT: witness = %I.impl_witness
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: class @C6 {
- // CHECK:STDOUT: %complete_type: <witness> = complete_type_witness constants.%empty_struct_type [concrete = constants.%complete_type]
- // CHECK:STDOUT: complete_type_witness = %complete_type
- // CHECK:STDOUT:
- // CHECK:STDOUT: !members:
- // CHECK:STDOUT: .Self = constants.%C6
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: specific @I.WithSelf(constants.%Self) {
- // CHECK:STDOUT: !definition:
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: specific @I.WithSelf(constants.%.Self) {
- // CHECK:STDOUT: !definition:
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: specific @I.WithSelf(constants.%I.facet) {
- // CHECK:STDOUT: !definition:
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: --- fail_two_different.carbon
- // CHECK:STDOUT:
- // CHECK:STDOUT: constants {
- // CHECK:STDOUT: %C7: type = class_type @C7 [concrete]
- // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete]
- // CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %empty_struct_type [concrete]
- // CHECK:STDOUT: %I.type: type = facet_type <@I> [concrete]
- // CHECK:STDOUT: %Self: %I.type = symbolic_binding Self, 0 [symbolic]
- // CHECK:STDOUT: %.Self: %I.type = symbolic_binding .Self [symbolic_self]
- // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete]
- // CHECK:STDOUT: %.Self.binding.as_type: type = symbolic_binding_type .Self, %.Self [symbolic_self]
- // CHECK:STDOUT: %I.assoc_type: type = assoc_entity_type @I [concrete]
- // CHECK:STDOUT: %assoc0: %I.assoc_type = assoc_entity element0, imports.%Main.import_ref.9c9 [concrete]
- // CHECK:STDOUT: %I.lookup_impl_witness: <witness> = lookup_impl_witness %.Self, @I [symbolic_self]
- // CHECK:STDOUT: %impl.elem0: type = impl_witness_access %I.lookup_impl_witness, element0 [symbolic_self]
- // CHECK:STDOUT: %empty_struct: %empty_struct_type = struct_value () [concrete]
- // CHECK:STDOUT: %empty_tuple: %empty_tuple.type = tuple_value () [concrete]
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: imports {
- // CHECK:STDOUT: %Main.I: type = import_ref Main//interface, I, loaded [concrete = constants.%I.type]
- // CHECK:STDOUT: %Main.I3 = import_ref Main//interface, I3, unloaded
- // CHECK:STDOUT: %Main.NonType = import_ref Main//interface, NonType, unloaded
- // CHECK:STDOUT: %Main.import_ref.8ef: %I.assoc_type = import_ref Main//interface, loc3_20, loaded [concrete = constants.%assoc0]
- // CHECK:STDOUT: %Main.T = import_ref Main//interface, T, unloaded
- // CHECK:STDOUT: %Main.import_ref.c82 = import_ref Main//interface, loc3_13, unloaded
- // CHECK:STDOUT: %Main.import_ref.9c9: type = import_ref Main//interface, loc3_20, loaded [concrete = %T]
- // CHECK:STDOUT: %T: type = assoc_const_decl @T [concrete] {}
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: file {
- // CHECK:STDOUT: package: <namespace> = namespace [concrete] {
- // CHECK:STDOUT: .I = imports.%Main.I
- // CHECK:STDOUT: .I3 = imports.%Main.I3
- // CHECK:STDOUT: .NonType = imports.%Main.NonType
- // CHECK:STDOUT: .C7 = %C7.decl
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %default.import = import <none>
- // CHECK:STDOUT: %C7.decl: type = class_decl @C7 [concrete = constants.%C7] {} {}
- // CHECK:STDOUT: impl_decl @C7.as.<error>.impl [concrete] {} {
- // CHECK:STDOUT: %C7.ref: type = name_ref C7, file.%C7.decl [concrete = constants.%C7]
- // CHECK:STDOUT: %I.ref: type = name_ref I, imports.%Main.I [concrete = constants.%I.type]
- // CHECK:STDOUT: %.Self: %I.type = symbolic_binding .Self [symbolic_self = constants.%.Self]
- // CHECK:STDOUT: %.Self.ref.loc10_20: %I.type = name_ref .Self, %.Self [symbolic_self = constants.%.Self]
- // CHECK:STDOUT: %.Self.as_type.loc10_20: type = facet_access_type %.Self.ref.loc10_20 [symbolic_self = constants.%.Self.binding.as_type]
- // CHECK:STDOUT: %.loc10_20: type = converted %.Self.ref.loc10_20, %.Self.as_type.loc10_20 [symbolic_self = constants.%.Self.binding.as_type]
- // CHECK:STDOUT: %T.ref.loc10_20: %I.assoc_type = name_ref T, imports.%Main.import_ref.8ef [concrete = constants.%assoc0]
- // CHECK:STDOUT: %impl.elem0.loc10_20: type = impl_witness_access constants.%I.lookup_impl_witness, element0 [symbolic_self = constants.%impl.elem0]
- // CHECK:STDOUT: %.loc10_26.1: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct]
- // CHECK:STDOUT: %.loc10_26.2: type = converted %.loc10_26.1, constants.%empty_struct_type [concrete = constants.%empty_struct_type]
- // CHECK:STDOUT: %.Self.ref.loc10_32: %I.type = name_ref .Self, %.Self [symbolic_self = constants.%.Self]
- // CHECK:STDOUT: %.Self.as_type.loc10_32: type = facet_access_type %.Self.ref.loc10_32 [symbolic_self = constants.%.Self.binding.as_type]
- // CHECK:STDOUT: %.loc10_32: type = converted %.Self.ref.loc10_32, %.Self.as_type.loc10_32 [symbolic_self = constants.%.Self.binding.as_type]
- // CHECK:STDOUT: %T.ref.loc10_32: %I.assoc_type = name_ref T, imports.%Main.import_ref.8ef [concrete = constants.%assoc0]
- // CHECK:STDOUT: %impl.elem0.loc10_32: type = impl_witness_access constants.%I.lookup_impl_witness, element0 [symbolic_self = constants.%impl.elem0]
- // CHECK:STDOUT: %impl.elem0.subst: type = impl_witness_access_substituted %impl.elem0.loc10_32, %.loc10_26.2 [concrete = constants.%empty_struct_type]
- // CHECK:STDOUT: %.loc10_38.1: %empty_tuple.type = tuple_literal () [concrete = constants.%empty_tuple]
- // CHECK:STDOUT: %.loc10_38.2: type = converted %.loc10_38.1, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type]
- // CHECK:STDOUT: %.loc10_14: type = where_expr %.Self [concrete = <error>] {
- // CHECK:STDOUT: requirement_base_facet_type constants.%I.type
- // CHECK:STDOUT: requirement_rewrite %impl.elem0.loc10_20, %.loc10_26.2
- // CHECK:STDOUT: requirement_rewrite %impl.elem0.subst, %.loc10_38.2
- // CHECK:STDOUT: }
- // CHECK:STDOUT: }
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: interface @I [from "interface.carbon"] {
- // CHECK:STDOUT: !members:
- // CHECK:STDOUT: .Self = imports.%Main.import_ref.c82
- // CHECK:STDOUT: .T = imports.%Main.import_ref.8ef
- // CHECK:STDOUT: witness = (imports.%Main.T)
- // CHECK:STDOUT:
- // CHECK:STDOUT: !requires:
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: impl @C7.as.<error>.impl: %C7.ref as %.loc10_14 {
- // CHECK:STDOUT: !members:
- // CHECK:STDOUT: witness = <error>
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: class @C7 {
- // CHECK:STDOUT: %complete_type: <witness> = complete_type_witness constants.%empty_struct_type [concrete = constants.%complete_type]
- // CHECK:STDOUT: complete_type_witness = %complete_type
- // CHECK:STDOUT:
- // CHECK:STDOUT: !members:
- // CHECK:STDOUT: .Self = constants.%C7
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: specific @I.WithSelf(constants.%Self) {
- // CHECK:STDOUT: !definition:
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: specific @I.WithSelf(constants.%.Self) {
- // CHECK:STDOUT: !definition:
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: --- fail_two_different_first_bad.carbon
- // CHECK:STDOUT:
- // CHECK:STDOUT: constants {
- // CHECK:STDOUT: %C8: type = class_type @C8 [concrete]
- // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete]
- // CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %empty_struct_type [concrete]
- // CHECK:STDOUT: %I.type: type = facet_type <@I> [concrete]
- // CHECK:STDOUT: %Self: %I.type = symbolic_binding Self, 0 [symbolic]
- // CHECK:STDOUT: %.Self: %I.type = symbolic_binding .Self [symbolic_self]
- // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete]
- // CHECK:STDOUT: %.Self.binding.as_type: type = symbolic_binding_type .Self, %.Self [symbolic_self]
- // CHECK:STDOUT: %I.assoc_type: type = assoc_entity_type @I [concrete]
- // CHECK:STDOUT: %assoc0: %I.assoc_type = assoc_entity element0, imports.%Main.import_ref.9c9 [concrete]
- // CHECK:STDOUT: %I.lookup_impl_witness: <witness> = lookup_impl_witness %.Self, @I [symbolic_self]
- // CHECK:STDOUT: %impl.elem0: type = impl_witness_access %I.lookup_impl_witness, element0 [symbolic_self]
- // CHECK:STDOUT: %empty_tuple: %empty_tuple.type = tuple_value () [concrete]
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: imports {
- // CHECK:STDOUT: %Main.I: type = import_ref Main//interface, I, loaded [concrete = constants.%I.type]
- // CHECK:STDOUT: %Main.I3 = import_ref Main//interface, I3, unloaded
- // CHECK:STDOUT: %Main.NonType = import_ref Main//interface, NonType, unloaded
- // CHECK:STDOUT: %Main.import_ref.8ef: %I.assoc_type = import_ref Main//interface, loc3_20, loaded [concrete = constants.%assoc0]
- // CHECK:STDOUT: %Main.T = import_ref Main//interface, T, unloaded
- // CHECK:STDOUT: %Main.import_ref.c82 = import_ref Main//interface, loc3_13, unloaded
- // CHECK:STDOUT: %Main.import_ref.9c9: type = import_ref Main//interface, loc3_20, loaded [concrete = %T]
- // CHECK:STDOUT: %T: type = assoc_const_decl @T [concrete] {}
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: file {
- // CHECK:STDOUT: package: <namespace> = namespace [concrete] {
- // CHECK:STDOUT: .I = imports.%Main.I
- // CHECK:STDOUT: .I3 = imports.%Main.I3
- // CHECK:STDOUT: .NonType = imports.%Main.NonType
- // CHECK:STDOUT: .C8 = %C8.decl
- // CHECK:STDOUT: .BAD5 = <poisoned>
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %default.import = import <none>
- // CHECK:STDOUT: %C8.decl: type = class_decl @C8 [concrete = constants.%C8] {} {}
- // CHECK:STDOUT: impl_decl @C8.as.<error>.impl [concrete] {} {
- // CHECK:STDOUT: %C8.ref: type = name_ref C8, file.%C8.decl [concrete = constants.%C8]
- // CHECK:STDOUT: %I.ref: type = name_ref I, imports.%Main.I [concrete = constants.%I.type]
- // CHECK:STDOUT: %.Self: %I.type = symbolic_binding .Self [symbolic_self = constants.%.Self]
- // CHECK:STDOUT: %.Self.ref.loc10_20: %I.type = name_ref .Self, %.Self [symbolic_self = constants.%.Self]
- // CHECK:STDOUT: %.Self.as_type.loc10_20: type = facet_access_type %.Self.ref.loc10_20 [symbolic_self = constants.%.Self.binding.as_type]
- // CHECK:STDOUT: %.loc10_20: type = converted %.Self.ref.loc10_20, %.Self.as_type.loc10_20 [symbolic_self = constants.%.Self.binding.as_type]
- // CHECK:STDOUT: %T.ref.loc10_20: %I.assoc_type = name_ref T, imports.%Main.import_ref.8ef [concrete = constants.%assoc0]
- // CHECK:STDOUT: %impl.elem0.loc10_20: type = impl_witness_access constants.%I.lookup_impl_witness, element0 [symbolic_self = constants.%impl.elem0]
- // CHECK:STDOUT: %BAD5.ref: <error> = name_ref BAD5, <error> [concrete = <error>]
- // CHECK:STDOUT: %.Self.ref.loc10_34: %I.type = name_ref .Self, %.Self [symbolic_self = constants.%.Self]
- // CHECK:STDOUT: %.Self.as_type.loc10_34: type = facet_access_type %.Self.ref.loc10_34 [symbolic_self = constants.%.Self.binding.as_type]
- // CHECK:STDOUT: %.loc10_34: type = converted %.Self.ref.loc10_34, %.Self.as_type.loc10_34 [symbolic_self = constants.%.Self.binding.as_type]
- // CHECK:STDOUT: %T.ref.loc10_34: %I.assoc_type = name_ref T, imports.%Main.import_ref.8ef [concrete = constants.%assoc0]
- // CHECK:STDOUT: %impl.elem0.loc10_34: type = impl_witness_access constants.%I.lookup_impl_witness, element0 [symbolic_self = constants.%impl.elem0]
- // CHECK:STDOUT: %impl.elem0.subst: type = impl_witness_access_substituted %impl.elem0.loc10_34, <error> [concrete = <error>]
- // CHECK:STDOUT: %.loc10_40.1: %empty_tuple.type = tuple_literal () [concrete = constants.%empty_tuple]
- // CHECK:STDOUT: %.loc10_40.2: type = converted %.loc10_40.1, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type]
- // CHECK:STDOUT: %.loc10_14: type = where_expr %.Self [concrete = <error>] {
- // CHECK:STDOUT: requirement_base_facet_type constants.%I.type
- // CHECK:STDOUT: requirement_rewrite %impl.elem0.loc10_20, <error>
- // CHECK:STDOUT: requirement_rewrite %impl.elem0.subst, %.loc10_40.2
- // CHECK:STDOUT: }
- // CHECK:STDOUT: }
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: interface @I [from "interface.carbon"] {
- // CHECK:STDOUT: !members:
- // CHECK:STDOUT: .Self = imports.%Main.import_ref.c82
- // CHECK:STDOUT: .T = imports.%Main.import_ref.8ef
- // CHECK:STDOUT: witness = (imports.%Main.T)
- // CHECK:STDOUT:
- // CHECK:STDOUT: !requires:
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: impl @C8.as.<error>.impl: %C8.ref as %.loc10_14 {
- // CHECK:STDOUT: !members:
- // CHECK:STDOUT: witness = <error>
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: class @C8 {
- // CHECK:STDOUT: %complete_type: <witness> = complete_type_witness constants.%empty_struct_type [concrete = constants.%complete_type]
- // CHECK:STDOUT: complete_type_witness = %complete_type
- // CHECK:STDOUT:
- // CHECK:STDOUT: !members:
- // CHECK:STDOUT: .Self = constants.%C8
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: specific @I.WithSelf(constants.%Self) {
- // CHECK:STDOUT: !definition:
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: specific @I.WithSelf(constants.%.Self) {
- // CHECK:STDOUT: !definition:
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: --- fail_two_different_second_bad.carbon
- // CHECK:STDOUT:
- // CHECK:STDOUT: constants {
- // CHECK:STDOUT: %C9: type = class_type @C9 [concrete]
- // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete]
- // CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %empty_struct_type [concrete]
- // CHECK:STDOUT: %I.type: type = facet_type <@I> [concrete]
- // CHECK:STDOUT: %Self: %I.type = symbolic_binding Self, 0 [symbolic]
- // CHECK:STDOUT: %.Self: %I.type = symbolic_binding .Self [symbolic_self]
- // CHECK:STDOUT: %.Self.binding.as_type: type = symbolic_binding_type .Self, %.Self [symbolic_self]
- // CHECK:STDOUT: %I.assoc_type: type = assoc_entity_type @I [concrete]
- // CHECK:STDOUT: %assoc0: %I.assoc_type = assoc_entity element0, imports.%Main.import_ref.9c9 [concrete]
- // CHECK:STDOUT: %I.lookup_impl_witness: <witness> = lookup_impl_witness %.Self, @I [symbolic_self]
- // CHECK:STDOUT: %impl.elem0: type = impl_witness_access %I.lookup_impl_witness, element0 [symbolic_self]
- // CHECK:STDOUT: %empty_struct: %empty_struct_type = struct_value () [concrete]
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: imports {
- // CHECK:STDOUT: %Main.I: type = import_ref Main//interface, I, loaded [concrete = constants.%I.type]
- // CHECK:STDOUT: %Main.I3 = import_ref Main//interface, I3, unloaded
- // CHECK:STDOUT: %Main.NonType = import_ref Main//interface, NonType, unloaded
- // CHECK:STDOUT: %Main.import_ref.8ef: %I.assoc_type = import_ref Main//interface, loc3_20, loaded [concrete = constants.%assoc0]
- // CHECK:STDOUT: %Main.T = import_ref Main//interface, T, unloaded
- // CHECK:STDOUT: %Main.import_ref.c82 = import_ref Main//interface, loc3_13, unloaded
- // CHECK:STDOUT: %Main.import_ref.9c9: type = import_ref Main//interface, loc3_20, loaded [concrete = %T]
- // CHECK:STDOUT: %T: type = assoc_const_decl @T [concrete] {}
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: file {
- // CHECK:STDOUT: package: <namespace> = namespace [concrete] {
- // CHECK:STDOUT: .I = imports.%Main.I
- // CHECK:STDOUT: .I3 = imports.%Main.I3
- // CHECK:STDOUT: .NonType = imports.%Main.NonType
- // CHECK:STDOUT: .C9 = %C9.decl
- // CHECK:STDOUT: .BAD6 = <poisoned>
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %default.import = import <none>
- // CHECK:STDOUT: %C9.decl: type = class_decl @C9 [concrete = constants.%C9] {} {}
- // CHECK:STDOUT: impl_decl @C9.as.<error>.impl [concrete] {} {
- // CHECK:STDOUT: %C9.ref: type = name_ref C9, file.%C9.decl [concrete = constants.%C9]
- // CHECK:STDOUT: %I.ref: type = name_ref I, imports.%Main.I [concrete = constants.%I.type]
- // CHECK:STDOUT: %.Self: %I.type = symbolic_binding .Self [symbolic_self = constants.%.Self]
- // CHECK:STDOUT: %.Self.ref.loc10_20: %I.type = name_ref .Self, %.Self [symbolic_self = constants.%.Self]
- // CHECK:STDOUT: %.Self.as_type.loc10_20: type = facet_access_type %.Self.ref.loc10_20 [symbolic_self = constants.%.Self.binding.as_type]
- // CHECK:STDOUT: %.loc10_20: type = converted %.Self.ref.loc10_20, %.Self.as_type.loc10_20 [symbolic_self = constants.%.Self.binding.as_type]
- // CHECK:STDOUT: %T.ref.loc10_20: %I.assoc_type = name_ref T, imports.%Main.import_ref.8ef [concrete = constants.%assoc0]
- // CHECK:STDOUT: %impl.elem0.loc10_20: type = impl_witness_access constants.%I.lookup_impl_witness, element0 [symbolic_self = constants.%impl.elem0]
- // CHECK:STDOUT: %.loc10_26.1: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct]
- // CHECK:STDOUT: %.loc10_26.2: type = converted %.loc10_26.1, constants.%empty_struct_type [concrete = constants.%empty_struct_type]
- // CHECK:STDOUT: %.Self.ref.loc10_32: %I.type = name_ref .Self, %.Self [symbolic_self = constants.%.Self]
- // CHECK:STDOUT: %.Self.as_type.loc10_32: type = facet_access_type %.Self.ref.loc10_32 [symbolic_self = constants.%.Self.binding.as_type]
- // CHECK:STDOUT: %.loc10_32: type = converted %.Self.ref.loc10_32, %.Self.as_type.loc10_32 [symbolic_self = constants.%.Self.binding.as_type]
- // CHECK:STDOUT: %T.ref.loc10_32: %I.assoc_type = name_ref T, imports.%Main.import_ref.8ef [concrete = constants.%assoc0]
- // CHECK:STDOUT: %impl.elem0.loc10_32: type = impl_witness_access constants.%I.lookup_impl_witness, element0 [symbolic_self = constants.%impl.elem0]
- // CHECK:STDOUT: %impl.elem0.subst: type = impl_witness_access_substituted %impl.elem0.loc10_32, %.loc10_26.2 [concrete = constants.%empty_struct_type]
- // CHECK:STDOUT: %BAD6.ref: <error> = name_ref BAD6, <error> [concrete = <error>]
- // CHECK:STDOUT: %.loc10_14: type = where_expr %.Self [concrete = <error>] {
- // CHECK:STDOUT: requirement_base_facet_type constants.%I.type
- // CHECK:STDOUT: requirement_rewrite %impl.elem0.loc10_20, %.loc10_26.2
- // CHECK:STDOUT: requirement_rewrite %impl.elem0.subst, <error>
- // CHECK:STDOUT: }
- // CHECK:STDOUT: }
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: interface @I [from "interface.carbon"] {
- // CHECK:STDOUT: !members:
- // CHECK:STDOUT: .Self = imports.%Main.import_ref.c82
- // CHECK:STDOUT: .T = imports.%Main.import_ref.8ef
- // CHECK:STDOUT: witness = (imports.%Main.T)
- // CHECK:STDOUT:
- // CHECK:STDOUT: !requires:
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: impl @C9.as.<error>.impl: %C9.ref as %.loc10_14 {
- // CHECK:STDOUT: !members:
- // CHECK:STDOUT: witness = <error>
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: class @C9 {
- // CHECK:STDOUT: %complete_type: <witness> = complete_type_witness constants.%empty_struct_type [concrete = constants.%complete_type]
- // CHECK:STDOUT: complete_type_witness = %complete_type
- // CHECK:STDOUT:
- // CHECK:STDOUT: !members:
- // CHECK:STDOUT: .Self = constants.%C9
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: specific @I.WithSelf(constants.%Self) {
- // CHECK:STDOUT: !definition:
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: specific @I.WithSelf(constants.%.Self) {
- // CHECK:STDOUT: !definition:
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: --- fail_two_different_both_bad.carbon
- // CHECK:STDOUT:
- // CHECK:STDOUT: constants {
- // CHECK:STDOUT: %CA: type = class_type @CA [concrete]
- // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete]
- // CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %empty_struct_type [concrete]
- // CHECK:STDOUT: %I.type: type = facet_type <@I> [concrete]
- // CHECK:STDOUT: %Self: %I.type = symbolic_binding Self, 0 [symbolic]
- // CHECK:STDOUT: %.Self: %I.type = symbolic_binding .Self [symbolic_self]
- // CHECK:STDOUT: %.Self.binding.as_type: type = symbolic_binding_type .Self, %.Self [symbolic_self]
- // CHECK:STDOUT: %I.assoc_type: type = assoc_entity_type @I [concrete]
- // CHECK:STDOUT: %assoc0: %I.assoc_type = assoc_entity element0, imports.%Main.import_ref.9c9 [concrete]
- // CHECK:STDOUT: %I.lookup_impl_witness: <witness> = lookup_impl_witness %.Self, @I [symbolic_self]
- // CHECK:STDOUT: %impl.elem0: type = impl_witness_access %I.lookup_impl_witness, element0 [symbolic_self]
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: imports {
- // CHECK:STDOUT: %Main.I: type = import_ref Main//interface, I, loaded [concrete = constants.%I.type]
- // CHECK:STDOUT: %Main.I3 = import_ref Main//interface, I3, unloaded
- // CHECK:STDOUT: %Main.NonType = import_ref Main//interface, NonType, unloaded
- // CHECK:STDOUT: %Main.import_ref.8ef: %I.assoc_type = import_ref Main//interface, loc3_20, loaded [concrete = constants.%assoc0]
- // CHECK:STDOUT: %Main.T = import_ref Main//interface, T, unloaded
- // CHECK:STDOUT: %Main.import_ref.c82 = import_ref Main//interface, loc3_13, unloaded
- // CHECK:STDOUT: %Main.import_ref.9c9: type = import_ref Main//interface, loc3_20, loaded [concrete = %T]
- // CHECK:STDOUT: %T: type = assoc_const_decl @T [concrete] {}
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: file {
- // CHECK:STDOUT: package: <namespace> = namespace [concrete] {
- // CHECK:STDOUT: .I = imports.%Main.I
- // CHECK:STDOUT: .I3 = imports.%Main.I3
- // CHECK:STDOUT: .NonType = imports.%Main.NonType
- // CHECK:STDOUT: .CA = %CA.decl
- // CHECK:STDOUT: .BAD7 = <poisoned>
- // CHECK:STDOUT: .BAD8 = <poisoned>
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %default.import = import <none>
- // CHECK:STDOUT: %CA.decl: type = class_decl @CA [concrete = constants.%CA] {} {}
- // CHECK:STDOUT: impl_decl @CA.as.<error>.impl [concrete] {} {
- // CHECK:STDOUT: %CA.ref: type = name_ref CA, file.%CA.decl [concrete = constants.%CA]
- // CHECK:STDOUT: %I.ref: type = name_ref I, imports.%Main.I [concrete = constants.%I.type]
- // CHECK:STDOUT: %.Self: %I.type = symbolic_binding .Self [symbolic_self = constants.%.Self]
- // CHECK:STDOUT: %.Self.ref.loc14_20: %I.type = name_ref .Self, %.Self [symbolic_self = constants.%.Self]
- // CHECK:STDOUT: %.Self.as_type.loc14_20: type = facet_access_type %.Self.ref.loc14_20 [symbolic_self = constants.%.Self.binding.as_type]
- // CHECK:STDOUT: %.loc14_20: type = converted %.Self.ref.loc14_20, %.Self.as_type.loc14_20 [symbolic_self = constants.%.Self.binding.as_type]
- // CHECK:STDOUT: %T.ref.loc14_20: %I.assoc_type = name_ref T, imports.%Main.import_ref.8ef [concrete = constants.%assoc0]
- // CHECK:STDOUT: %impl.elem0.loc14_20: type = impl_witness_access constants.%I.lookup_impl_witness, element0 [symbolic_self = constants.%impl.elem0]
- // CHECK:STDOUT: %BAD7.ref: <error> = name_ref BAD7, <error> [concrete = <error>]
- // CHECK:STDOUT: %.Self.ref.loc14_34: %I.type = name_ref .Self, %.Self [symbolic_self = constants.%.Self]
- // CHECK:STDOUT: %.Self.as_type.loc14_34: type = facet_access_type %.Self.ref.loc14_34 [symbolic_self = constants.%.Self.binding.as_type]
- // CHECK:STDOUT: %.loc14_34: type = converted %.Self.ref.loc14_34, %.Self.as_type.loc14_34 [symbolic_self = constants.%.Self.binding.as_type]
- // CHECK:STDOUT: %T.ref.loc14_34: %I.assoc_type = name_ref T, imports.%Main.import_ref.8ef [concrete = constants.%assoc0]
- // CHECK:STDOUT: %impl.elem0.loc14_34: type = impl_witness_access constants.%I.lookup_impl_witness, element0 [symbolic_self = constants.%impl.elem0]
- // CHECK:STDOUT: %impl.elem0.subst: type = impl_witness_access_substituted %impl.elem0.loc14_34, <error> [concrete = <error>]
- // CHECK:STDOUT: %BAD8.ref: <error> = name_ref BAD8, <error> [concrete = <error>]
- // CHECK:STDOUT: %.loc14_14: type = where_expr %.Self [concrete = <error>] {
- // CHECK:STDOUT: requirement_base_facet_type constants.%I.type
- // CHECK:STDOUT: requirement_rewrite %impl.elem0.loc14_20, <error>
- // CHECK:STDOUT: requirement_rewrite %impl.elem0.subst, <error>
- // CHECK:STDOUT: }
- // CHECK:STDOUT: }
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: interface @I [from "interface.carbon"] {
- // CHECK:STDOUT: !members:
- // CHECK:STDOUT: .Self = imports.%Main.import_ref.c82
- // CHECK:STDOUT: .T = imports.%Main.import_ref.8ef
- // CHECK:STDOUT: witness = (imports.%Main.T)
- // CHECK:STDOUT:
- // CHECK:STDOUT: !requires:
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: impl @CA.as.<error>.impl: %CA.ref as %.loc14_14 {
- // CHECK:STDOUT: !members:
- // CHECK:STDOUT: witness = <error>
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: class @CA {
- // CHECK:STDOUT: %complete_type: <witness> = complete_type_witness constants.%empty_struct_type [concrete = constants.%complete_type]
- // CHECK:STDOUT: complete_type_witness = %complete_type
- // CHECK:STDOUT:
- // CHECK:STDOUT: !members:
- // CHECK:STDOUT: .Self = constants.%CA
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: specific @I.WithSelf(constants.%Self) {
- // CHECK:STDOUT: !definition:
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: specific @I.WithSelf(constants.%.Self) {
- // CHECK:STDOUT: !definition:
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: --- repeated.carbon
- // CHECK:STDOUT:
- // CHECK:STDOUT: constants {
- // CHECK:STDOUT: %CB: type = class_type @CB [concrete]
- // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete]
- // CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %empty_struct_type [concrete]
- // CHECK:STDOUT: %I.type: type = facet_type <@I> [concrete]
- // CHECK:STDOUT: %Self: %I.type = symbolic_binding Self, 0 [symbolic]
- // CHECK:STDOUT: %.Self: %I.type = symbolic_binding .Self [symbolic_self]
- // CHECK:STDOUT: %.Self.binding.as_type: type = symbolic_binding_type .Self, %.Self [symbolic_self]
- // CHECK:STDOUT: %I.assoc_type: type = assoc_entity_type @I [concrete]
- // CHECK:STDOUT: %assoc0: %I.assoc_type = assoc_entity element0, imports.%Main.import_ref.9c9 [concrete]
- // CHECK:STDOUT: %I.lookup_impl_witness: <witness> = lookup_impl_witness %.Self, @I [symbolic_self]
- // CHECK:STDOUT: %impl.elem0: type = impl_witness_access %I.lookup_impl_witness, element0 [symbolic_self]
- // CHECK:STDOUT: %empty_struct: %empty_struct_type = struct_value () [concrete]
- // CHECK:STDOUT: %I_where.type: type = facet_type <@I where %impl.elem0 = %empty_struct_type> [concrete]
- // CHECK:STDOUT: %I.impl_witness: <witness> = impl_witness @CB.as.I.impl.%I.impl_witness_table [concrete]
- // CHECK:STDOUT: %I.facet: %I.type = facet_value %CB, (%I.impl_witness) [concrete]
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: imports {
- // CHECK:STDOUT: %Main.I: type = import_ref Main//interface, I, loaded [concrete = constants.%I.type]
- // CHECK:STDOUT: %Main.I3 = import_ref Main//interface, I3, unloaded
- // CHECK:STDOUT: %Main.NonType = import_ref Main//interface, NonType, unloaded
- // CHECK:STDOUT: %Main.import_ref.8ef: %I.assoc_type = import_ref Main//interface, loc3_20, loaded [concrete = constants.%assoc0]
- // CHECK:STDOUT: %Main.T: type = import_ref Main//interface, T, loaded [concrete = %T]
- // CHECK:STDOUT: %Main.import_ref.c82 = import_ref Main//interface, loc3_13, unloaded
- // CHECK:STDOUT: %Main.import_ref.9c9: type = import_ref Main//interface, loc3_20, loaded [concrete = %T]
- // CHECK:STDOUT: %T: type = assoc_const_decl @T [concrete] {}
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: file {
- // CHECK:STDOUT: package: <namespace> = namespace [concrete] {
- // CHECK:STDOUT: .I = imports.%Main.I
- // CHECK:STDOUT: .I3 = imports.%Main.I3
- // CHECK:STDOUT: .NonType = imports.%Main.NonType
- // CHECK:STDOUT: .CB = %CB.decl
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %default.import = import <none>
- // CHECK:STDOUT: %CB.decl: type = class_decl @CB [concrete = constants.%CB] {} {}
- // CHECK:STDOUT: impl_decl @CB.as.I.impl [concrete] {} {
- // CHECK:STDOUT: %CB.ref: type = name_ref CB, file.%CB.decl [concrete = constants.%CB]
- // CHECK:STDOUT: %I.ref: type = name_ref I, imports.%Main.I [concrete = constants.%I.type]
- // CHECK:STDOUT: %.Self: %I.type = symbolic_binding .Self [symbolic_self = constants.%.Self]
- // CHECK:STDOUT: %.Self.ref.loc6_20: %I.type = name_ref .Self, %.Self [symbolic_self = constants.%.Self]
- // CHECK:STDOUT: %.Self.as_type.loc6_20: type = facet_access_type %.Self.ref.loc6_20 [symbolic_self = constants.%.Self.binding.as_type]
- // CHECK:STDOUT: %.loc6_20: type = converted %.Self.ref.loc6_20, %.Self.as_type.loc6_20 [symbolic_self = constants.%.Self.binding.as_type]
- // CHECK:STDOUT: %T.ref.loc6_20: %I.assoc_type = name_ref T, imports.%Main.import_ref.8ef [concrete = constants.%assoc0]
- // CHECK:STDOUT: %impl.elem0.loc6_20: type = impl_witness_access constants.%I.lookup_impl_witness, element0 [symbolic_self = constants.%impl.elem0]
- // CHECK:STDOUT: %.loc6_26.1: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct]
- // CHECK:STDOUT: %.loc6_26.2: type = converted %.loc6_26.1, constants.%empty_struct_type [concrete = constants.%empty_struct_type]
- // CHECK:STDOUT: %.Self.ref.loc6_32: %I.type = name_ref .Self, %.Self [symbolic_self = constants.%.Self]
- // CHECK:STDOUT: %.Self.as_type.loc6_32: type = facet_access_type %.Self.ref.loc6_32 [symbolic_self = constants.%.Self.binding.as_type]
- // CHECK:STDOUT: %.loc6_32: type = converted %.Self.ref.loc6_32, %.Self.as_type.loc6_32 [symbolic_self = constants.%.Self.binding.as_type]
- // CHECK:STDOUT: %T.ref.loc6_32: %I.assoc_type = name_ref T, imports.%Main.import_ref.8ef [concrete = constants.%assoc0]
- // CHECK:STDOUT: %impl.elem0.loc6_32: type = impl_witness_access constants.%I.lookup_impl_witness, element0 [symbolic_self = constants.%impl.elem0]
- // CHECK:STDOUT: %impl.elem0.subst: type = impl_witness_access_substituted %impl.elem0.loc6_32, %.loc6_26.2 [concrete = constants.%empty_struct_type]
- // CHECK:STDOUT: %.loc6_38.1: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct]
- // CHECK:STDOUT: %.loc6_38.2: type = converted %.loc6_38.1, constants.%empty_struct_type [concrete = constants.%empty_struct_type]
- // CHECK:STDOUT: %.loc6_14: type = where_expr %.Self [concrete = constants.%I_where.type] {
- // CHECK:STDOUT: requirement_base_facet_type constants.%I.type
- // CHECK:STDOUT: requirement_rewrite %impl.elem0.loc6_20, %.loc6_26.2
- // CHECK:STDOUT: requirement_rewrite %impl.elem0.subst, %.loc6_38.2
- // CHECK:STDOUT: }
- // CHECK:STDOUT: }
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: interface @I [from "interface.carbon"] {
- // CHECK:STDOUT: !members:
- // CHECK:STDOUT: .Self = imports.%Main.import_ref.c82
- // CHECK:STDOUT: .T = imports.%Main.import_ref.8ef
- // CHECK:STDOUT: witness = (imports.%Main.T)
- // CHECK:STDOUT:
- // CHECK:STDOUT: !requires:
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: impl @CB.as.I.impl: %CB.ref as %.loc6_14 {
- // CHECK:STDOUT: %I.impl_witness_table = impl_witness_table (%impl_witness_assoc_constant), @CB.as.I.impl [concrete]
- // CHECK:STDOUT: %I.impl_witness: <witness> = impl_witness %I.impl_witness_table [concrete = constants.%I.impl_witness]
- // CHECK:STDOUT: %impl_witness_assoc_constant: type = impl_witness_assoc_constant constants.%empty_struct_type [concrete = constants.%empty_struct_type]
- // CHECK:STDOUT:
- // CHECK:STDOUT: !members:
- // CHECK:STDOUT: witness = %I.impl_witness
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: class @CB {
- // CHECK:STDOUT: %complete_type: <witness> = complete_type_witness constants.%empty_struct_type [concrete = constants.%complete_type]
- // CHECK:STDOUT: complete_type_witness = %complete_type
- // CHECK:STDOUT:
- // CHECK:STDOUT: !members:
- // CHECK:STDOUT: .Self = constants.%CB
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: specific @I.WithSelf(constants.%Self) {
- // CHECK:STDOUT: !definition:
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: specific @I.WithSelf(constants.%.Self) {
- // CHECK:STDOUT: !definition:
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: specific @I.WithSelf(constants.%I.facet) {
- // CHECK:STDOUT: !definition:
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: --- non-type.carbon
- // CHECK:STDOUT:
- // CHECK:STDOUT: constants {
- // CHECK:STDOUT: %CC: type = class_type @CC [concrete]
- // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete]
- // CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %empty_struct_type [concrete]
- // CHECK:STDOUT: %NonType.type: type = facet_type <@NonType> [concrete]
- // CHECK:STDOUT: %Self: %NonType.type = symbolic_binding Self, 0 [symbolic]
- // CHECK:STDOUT: %.Self: %NonType.type = symbolic_binding .Self [symbolic_self]
- // CHECK:STDOUT: %.Self.binding.as_type: type = symbolic_binding_type .Self, %.Self [symbolic_self]
- // CHECK:STDOUT: %NonType.assoc_type: type = assoc_entity_type @NonType [concrete]
- // CHECK:STDOUT: %assoc0: %NonType.assoc_type = assoc_entity element0, imports.%Main.import_ref.e29 [concrete]
- // CHECK:STDOUT: %NonType.lookup_impl_witness: <witness> = lookup_impl_witness %.Self, @NonType [symbolic_self]
- // CHECK:STDOUT: %struct_type.a.225: type = struct_type {.a: %empty_struct_type} [concrete]
- // CHECK:STDOUT: %impl.elem0: %struct_type.a.225 = impl_witness_access %NonType.lookup_impl_witness, element0 [symbolic_self]
- // CHECK:STDOUT: %empty_struct: %empty_struct_type = struct_value () [concrete]
- // CHECK:STDOUT: %struct: %struct_type.a.225 = struct_value (%empty_struct) [concrete]
- // CHECK:STDOUT: %NonType_where.type: type = facet_type <@NonType where %impl.elem0 = %struct> [concrete]
- // CHECK:STDOUT: %NonType.impl_witness: <witness> = impl_witness @CC.as.NonType.impl.%NonType.impl_witness_table [concrete]
- // CHECK:STDOUT: %NonType.facet: %NonType.type = facet_value %CC, (%NonType.impl_witness) [concrete]
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: imports {
- // CHECK:STDOUT: %Main.I = import_ref Main//interface, I, unloaded
- // CHECK:STDOUT: %Main.I3 = import_ref Main//interface, I3, unloaded
- // CHECK:STDOUT: %Main.NonType: type = import_ref Main//interface, NonType, loaded [concrete = constants.%NonType.type]
- // CHECK:STDOUT: %Main.import_ref.fe0: %NonType.assoc_type = import_ref Main//interface, loc12_8, loaded [concrete = constants.%assoc0]
- // CHECK:STDOUT: %Main.Y: %struct_type.a.225 = import_ref Main//interface, Y, loaded [concrete = %Y]
- // CHECK:STDOUT: %Main.import_ref.e7e = import_ref Main//interface, loc11_19, unloaded
- // CHECK:STDOUT: %Main.import_ref.e29: %struct_type.a.225 = import_ref Main//interface, loc12_8, loaded [concrete = %Y]
- // CHECK:STDOUT: %Y: %struct_type.a.225 = assoc_const_decl @Y [concrete] {}
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: file {
- // CHECK:STDOUT: package: <namespace> = namespace [concrete] {
- // CHECK:STDOUT: .I = imports.%Main.I
- // CHECK:STDOUT: .I3 = imports.%Main.I3
- // CHECK:STDOUT: .NonType = imports.%Main.NonType
- // CHECK:STDOUT: .CC = %CC.decl
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %default.import = import <none>
- // CHECK:STDOUT: %CC.decl: type = class_decl @CC [concrete = constants.%CC] {} {}
- // CHECK:STDOUT: impl_decl @CC.as.NonType.impl [concrete] {} {
- // CHECK:STDOUT: %CC.ref: type = name_ref CC, file.%CC.decl [concrete = constants.%CC]
- // CHECK:STDOUT: %NonType.ref: type = name_ref NonType, imports.%Main.NonType [concrete = constants.%NonType.type]
- // CHECK:STDOUT: %.Self: %NonType.type = symbolic_binding .Self [symbolic_self = constants.%.Self]
- // CHECK:STDOUT: %.Self.ref: %NonType.type = name_ref .Self, %.Self [symbolic_self = constants.%.Self]
- // CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self.ref [symbolic_self = constants.%.Self.binding.as_type]
- // CHECK:STDOUT: %.loc6_26: type = converted %.Self.ref, %.Self.as_type [symbolic_self = constants.%.Self.binding.as_type]
- // CHECK:STDOUT: %Y.ref: %NonType.assoc_type = name_ref Y, imports.%Main.import_ref.fe0 [concrete = constants.%assoc0]
- // CHECK:STDOUT: %impl.elem0: %struct_type.a.225 = impl_witness_access constants.%NonType.lookup_impl_witness, element0 [symbolic_self = constants.%impl.elem0]
- // CHECK:STDOUT: %.loc6_38: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct]
- // CHECK:STDOUT: %.loc6_39.1: %struct_type.a.225 = struct_literal (%.loc6_38) [concrete = constants.%struct]
- // CHECK:STDOUT: %empty_struct: %empty_struct_type = struct_value () [concrete = constants.%empty_struct]
- // CHECK:STDOUT: %.loc6_39.2: %empty_struct_type = converted %.loc6_38, %empty_struct [concrete = constants.%empty_struct]
- // CHECK:STDOUT: %struct: %struct_type.a.225 = struct_value (%.loc6_39.2) [concrete = constants.%struct]
- // CHECK:STDOUT: %.loc6_39.3: %struct_type.a.225 = converted %.loc6_39.1, %struct [concrete = constants.%struct]
- // CHECK:STDOUT: %.loc6_20: type = where_expr %.Self [concrete = constants.%NonType_where.type] {
- // CHECK:STDOUT: requirement_base_facet_type constants.%NonType.type
- // CHECK:STDOUT: requirement_rewrite %impl.elem0, %.loc6_39.3
- // CHECK:STDOUT: }
- // CHECK:STDOUT: }
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: interface @NonType [from "interface.carbon"] {
- // CHECK:STDOUT: !members:
- // CHECK:STDOUT: .Self = imports.%Main.import_ref.e7e
- // CHECK:STDOUT: .Y = imports.%Main.import_ref.fe0
- // CHECK:STDOUT: witness = (imports.%Main.Y)
- // CHECK:STDOUT:
- // CHECK:STDOUT: !requires:
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: impl @CC.as.NonType.impl: %CC.ref as %.loc6_20 {
- // CHECK:STDOUT: %NonType.impl_witness_table = impl_witness_table (%impl_witness_assoc_constant), @CC.as.NonType.impl [concrete]
- // CHECK:STDOUT: %NonType.impl_witness: <witness> = impl_witness %NonType.impl_witness_table [concrete = constants.%NonType.impl_witness]
- // CHECK:STDOUT: %impl_witness_assoc_constant: %struct_type.a.225 = impl_witness_assoc_constant constants.%struct [concrete = constants.%struct]
- // CHECK:STDOUT:
- // CHECK:STDOUT: !members:
- // CHECK:STDOUT: witness = %NonType.impl_witness
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: class @CC {
- // CHECK:STDOUT: %complete_type: <witness> = complete_type_witness constants.%empty_struct_type [concrete = constants.%complete_type]
- // CHECK:STDOUT: complete_type_witness = %complete_type
- // CHECK:STDOUT:
- // CHECK:STDOUT: !members:
- // CHECK:STDOUT: .Self = constants.%CC
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: specific @NonType.WithSelf(constants.%Self) {
- // CHECK:STDOUT: !definition:
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: specific @NonType.WithSelf(constants.%.Self) {
- // CHECK:STDOUT: !definition:
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: specific @NonType.WithSelf(constants.%NonType.facet) {
- // CHECK:STDOUT: !definition:
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: --- interface_with_function.carbon
- // CHECK:STDOUT:
- // CHECK:STDOUT: constants {
- // CHECK:STDOUT: %IF.type: type = facet_type <@IF> [concrete]
- // CHECK:STDOUT: %Self: %IF.type = symbolic_binding Self, 0 [symbolic]
- // CHECK:STDOUT: %IF.WithSelf.F.type: type = fn_type @IF.WithSelf.F, @IF.WithSelf(%Self) [symbolic]
- // CHECK:STDOUT: %IF.WithSelf.F: %IF.WithSelf.F.type = struct_value () [symbolic]
- // CHECK:STDOUT: %IF.assoc_type: type = assoc_entity_type @IF [concrete]
- // CHECK:STDOUT: %assoc0: %IF.assoc_type = assoc_entity element0, @IF.WithSelf.%IF.WithSelf.F.decl [concrete]
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: file {
- // CHECK:STDOUT: package: <namespace> = namespace [concrete] {
- // CHECK:STDOUT: .IF = %IF.decl
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %IF.decl: type = interface_decl @IF [concrete = constants.%IF.type] {} {}
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: interface @IF {
- // CHECK:STDOUT: %Self: %IF.type = symbolic_binding Self, 0 [symbolic = constants.%Self]
- // CHECK:STDOUT: %IF.WithSelf.decl = interface_with_self_decl @IF [concrete]
- // CHECK:STDOUT:
- // CHECK:STDOUT: !with Self:
- // CHECK:STDOUT: %IF.WithSelf.F.decl: @IF.WithSelf.%IF.WithSelf.F.type (%IF.WithSelf.F.type) = fn_decl @IF.WithSelf.F [symbolic = @IF.WithSelf.%IF.WithSelf.F (constants.%IF.WithSelf.F)] {} {}
- // CHECK:STDOUT: %assoc0: %IF.assoc_type = assoc_entity element0, %IF.WithSelf.F.decl [concrete = constants.%assoc0]
- // CHECK:STDOUT:
- // CHECK:STDOUT: !members:
- // CHECK:STDOUT: .Self = %Self
- // CHECK:STDOUT: .F = @IF.WithSelf.%assoc0
- // CHECK:STDOUT: witness = (@IF.WithSelf.%IF.WithSelf.F.decl)
- // CHECK:STDOUT:
- // CHECK:STDOUT: !requires:
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: generic fn @IF.WithSelf.F(@IF.%Self: %IF.type) {
- // CHECK:STDOUT: fn();
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: specific @IF.WithSelf(constants.%Self) {}
- // CHECK:STDOUT:
- // CHECK:STDOUT: specific @IF.WithSelf.F(constants.%Self) {}
- // CHECK:STDOUT:
- // CHECK:STDOUT: --- fail_where_rewrite_function.carbon
- // CHECK:STDOUT:
- // CHECK:STDOUT: constants {
- // CHECK:STDOUT: %CD: type = class_type @CD [concrete]
- // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete]
- // CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %empty_struct_type [concrete]
- // CHECK:STDOUT: %IF.type: type = facet_type <@IF> [concrete]
- // CHECK:STDOUT: %Self: %IF.type = symbolic_binding Self, 0 [symbolic]
- // CHECK:STDOUT: %IF.WithSelf.F.type.1d1: type = fn_type @IF.WithSelf.F, @IF.WithSelf(%Self) [symbolic]
- // CHECK:STDOUT: %IF.WithSelf.F.d78: %IF.WithSelf.F.type.1d1 = struct_value () [symbolic]
- // CHECK:STDOUT: %.Self: %IF.type = symbolic_binding .Self [symbolic_self]
- // CHECK:STDOUT: %IF.WithSelf.F.type.923: type = fn_type @IF.WithSelf.F, @IF.WithSelf(%.Self) [symbolic_self]
- // CHECK:STDOUT: %IF.WithSelf.F.7ce: %IF.WithSelf.F.type.923 = struct_value () [symbolic_self]
- // CHECK:STDOUT: %.Self.binding.as_type: type = symbolic_binding_type .Self, %.Self [symbolic_self]
- // CHECK:STDOUT: %IF.assoc_type: type = assoc_entity_type @IF [concrete]
- // CHECK:STDOUT: %assoc0: %IF.assoc_type = assoc_entity element0, imports.%Main.import_ref.ae5 [concrete]
- // CHECK:STDOUT: %IF.lookup_impl_witness: <witness> = lookup_impl_witness %.Self, @IF [symbolic_self]
- // CHECK:STDOUT: %.8a4: type = fn_type_with_self_type %IF.WithSelf.F.type.923, %.Self [symbolic_self]
- // CHECK:STDOUT: %impl.elem0: %.8a4 = impl_witness_access %IF.lookup_impl_witness, element0 [symbolic_self]
- // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete]
- // CHECK:STDOUT: %IF_where.type: type = facet_type <@IF where %impl.elem0 = %int_0> [concrete]
- // CHECK:STDOUT: %IF.impl_witness: <witness> = impl_witness @CD.as.IF.impl.%IF.impl_witness_table [concrete]
- // CHECK:STDOUT: %CD.as.IF.impl.F.type: type = fn_type @CD.as.IF.impl.F [concrete]
- // CHECK:STDOUT: %CD.as.IF.impl.F: %CD.as.IF.impl.F.type = struct_value () [concrete]
- // CHECK:STDOUT: %IF.facet: %IF.type = facet_value %CD, (%IF.impl_witness) [concrete]
- // CHECK:STDOUT: %IF.WithSelf.F.type.1b7: type = fn_type @IF.WithSelf.F, @IF.WithSelf(%IF.facet) [concrete]
- // CHECK:STDOUT: %IF.WithSelf.F.0bc: %IF.WithSelf.F.type.1b7 = struct_value () [concrete]
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: imports {
- // CHECK:STDOUT: %Main.IF: type = import_ref Main//interface_with_function, IF, loaded [concrete = constants.%IF.type]
- // CHECK:STDOUT: %Main.import_ref.82a: %IF.assoc_type = import_ref Main//interface_with_function, loc3_22, loaded [concrete = constants.%assoc0]
- // CHECK:STDOUT: %Main.F: @IF.WithSelf.%IF.WithSelf.F.type (%IF.WithSelf.F.type.1d1) = import_ref Main//interface_with_function, F, loaded [symbolic = @IF.WithSelf.%IF.WithSelf.F (constants.%IF.WithSelf.F.d78)]
- // CHECK:STDOUT: %Main.import_ref.e88a3c.2: %IF.type = import_ref Main//interface_with_function, loc3_14, loaded [symbolic = constants.%Self]
- // CHECK:STDOUT: %Main.import_ref.b9e = import_ref Main//interface_with_function, loc3_14, unloaded
- // CHECK:STDOUT: %Main.import_ref.ae5: @IF.WithSelf.%IF.WithSelf.F.type (%IF.WithSelf.F.type.1d1) = import_ref Main//interface_with_function, loc3_22, loaded [symbolic = @IF.WithSelf.%IF.WithSelf.F (constants.%IF.WithSelf.F.d78)]
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: file {
- // CHECK:STDOUT: package: <namespace> = namespace [concrete] {
- // CHECK:STDOUT: .IF = imports.%Main.IF
- // CHECK:STDOUT: .CD = %CD.decl
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %default.import = import <none>
- // CHECK:STDOUT: %CD.decl: type = class_decl @CD [concrete = constants.%CD] {} {}
- // CHECK:STDOUT: impl_decl @CD.as.IF.impl [concrete] {} {
- // CHECK:STDOUT: %CD.ref: type = name_ref CD, file.%CD.decl [concrete = constants.%CD]
- // CHECK:STDOUT: %IF.ref: type = name_ref IF, imports.%Main.IF [concrete = constants.%IF.type]
- // CHECK:STDOUT: %.Self: %IF.type = symbolic_binding .Self [symbolic_self = constants.%.Self]
- // CHECK:STDOUT: %.Self.ref: %IF.type = name_ref .Self, %.Self [symbolic_self = constants.%.Self]
- // CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self.ref [symbolic_self = constants.%.Self.binding.as_type]
- // CHECK:STDOUT: %.loc10_21: type = converted %.Self.ref, %.Self.as_type [symbolic_self = constants.%.Self.binding.as_type]
- // CHECK:STDOUT: %F.ref: %IF.assoc_type = name_ref F, imports.%Main.import_ref.82a [concrete = constants.%assoc0]
- // CHECK:STDOUT: %impl.elem0: %.8a4 = impl_witness_access constants.%IF.lookup_impl_witness, element0 [symbolic_self = constants.%impl.elem0]
- // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete = constants.%int_0]
- // CHECK:STDOUT: %.loc10_15: type = where_expr %.Self [concrete = constants.%IF_where.type] {
- // CHECK:STDOUT: requirement_base_facet_type constants.%IF.type
- // CHECK:STDOUT: requirement_rewrite %impl.elem0, %int_0
- // CHECK:STDOUT: }
- // CHECK:STDOUT: }
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: interface @IF [from "interface_with_function.carbon"] {
- // CHECK:STDOUT: !members:
- // CHECK:STDOUT: .Self = imports.%Main.import_ref.b9e
- // CHECK:STDOUT: .F = imports.%Main.import_ref.82a
- // CHECK:STDOUT: witness = (imports.%Main.F)
- // CHECK:STDOUT:
- // CHECK:STDOUT: !requires:
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: impl @CD.as.IF.impl: %CD.ref as %.loc10_15 {
- // CHECK:STDOUT: %CD.as.IF.impl.F.decl: %CD.as.IF.impl.F.type = fn_decl @CD.as.IF.impl.F [concrete = constants.%CD.as.IF.impl.F] {} {}
- // CHECK:STDOUT: %IF.impl_witness_table = impl_witness_table (%CD.as.IF.impl.F.decl), @CD.as.IF.impl [concrete]
- // CHECK:STDOUT: %IF.impl_witness: <witness> = impl_witness %IF.impl_witness_table [concrete = constants.%IF.impl_witness]
- // CHECK:STDOUT:
- // CHECK:STDOUT: !members:
- // CHECK:STDOUT: .F = %CD.as.IF.impl.F.decl
- // CHECK:STDOUT: witness = %IF.impl_witness
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: class @CD {
- // CHECK:STDOUT: %complete_type: <witness> = complete_type_witness constants.%empty_struct_type [concrete = constants.%complete_type]
- // CHECK:STDOUT: complete_type_witness = %complete_type
- // CHECK:STDOUT:
- // CHECK:STDOUT: !members:
- // CHECK:STDOUT: .Self = constants.%CD
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: generic fn @IF.WithSelf.F(imports.%Main.import_ref.e88a3c.2: %IF.type) [from "interface_with_function.carbon"] {
- // CHECK:STDOUT: fn;
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: fn @CD.as.IF.impl.F() {
- // CHECK:STDOUT: !entry:
- // CHECK:STDOUT: return
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: specific @IF.WithSelf(constants.%Self) {
- // CHECK:STDOUT: !definition:
- // CHECK:STDOUT: %Self => constants.%Self
- // CHECK:STDOUT: %IF.WithSelf.F.type => constants.%IF.WithSelf.F.type.1d1
- // CHECK:STDOUT: %IF.WithSelf.F => constants.%IF.WithSelf.F.d78
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: specific @IF.WithSelf.F(constants.%Self) {}
- // CHECK:STDOUT:
- // CHECK:STDOUT: specific @IF.WithSelf(constants.%.Self) {
- // CHECK:STDOUT: !definition:
- // CHECK:STDOUT: %Self => constants.%.Self
- // CHECK:STDOUT: %IF.WithSelf.F.type => constants.%IF.WithSelf.F.type.923
- // CHECK:STDOUT: %IF.WithSelf.F => constants.%IF.WithSelf.F.7ce
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: specific @IF.WithSelf(constants.%IF.facet) {
- // CHECK:STDOUT: !definition:
- // CHECK:STDOUT: %Self => constants.%IF.facet
- // CHECK:STDOUT: %IF.WithSelf.F.type => constants.%IF.WithSelf.F.type.1b7
- // CHECK:STDOUT: %IF.WithSelf.F => constants.%IF.WithSelf.F.0bc
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: specific @IF.WithSelf.F(constants.%IF.facet) {}
- // CHECK:STDOUT:
|