| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005 |
- // Part of the Carbon Language project, under the Apache License v2.0 with LLVM
- // Exceptions. See /LICENSE for license information.
- // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
- //
- // AUTOUPDATE
- // TIP: To test this file alone, run:
- // TIP: bazel test //toolchain/testing:file_test --test_arg=--file_tests=toolchain/check/testdata/function/declaration/no_prelude/name_poisoning.carbon
- // TIP: To dump output, run:
- // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/check/testdata/function/declaration/no_prelude/name_poisoning.carbon
- // --- no_poison.carbon
- library "[[@TEST_NAME]]";
- class C {};
- // Both N.F1 and N.F2 use N.C and not C.
- namespace N;
- class N.C {}
- fn N.F1(x: C);
- fn N.F2(x: C) { N.F1(x); }
- // --- poison.carbon
- library "[[@TEST_NAME]]";
- class C {};
- namespace N;
- // Here we use C and poison N.C.
- fn N.F1(x: C);
- // --- fail_poison_class_without_usage.carbon
- // CHECK:STDERR: fail_poison_class_without_usage.carbon: error: name used before it was declared [NameUseBeforeDecl]
- library "[[@TEST_NAME]]";
- class C {};
- namespace N;
- // Here we use C and poison N.C.
- fn N.F1(x: C);
- // Should fail here since C was poisoned for namespace N when it was used in N
- // context without qualification.
- // CHECK:STDERR: fail_poison_class_without_usage.carbon:[[@LINE+4]]:1: note: declared here [NameUseBeforeDeclNote]
- // CHECK:STDERR: class N.C {}
- // CHECK:STDERR: ^~~~~~~~~~~
- // CHECK:STDERR:
- class N.C {}
- // --- fail_poison_interface_without_usage.carbon
- // CHECK:STDERR: fail_poison_interface_without_usage.carbon: error: name used before it was declared [NameUseBeforeDecl]
- library "[[@TEST_NAME]]";
- interface I {};
- namespace N;
- // Here we use I and poison N.I.
- fn N.F1(x: I);
- // Should fail here since I was poisoned for namespace N when it was used in N
- // context without qualification.
- // CHECK:STDERR: fail_poison_interface_without_usage.carbon:[[@LINE+4]]:1: note: declared here [NameUseBeforeDeclNote]
- // CHECK:STDERR: interface N.I {}
- // CHECK:STDERR: ^~~~~~~~~~~~~~~
- // CHECK:STDERR:
- interface N.I {}
- // --- fail_poison_namespace_without_usage.carbon
- // CHECK:STDERR: fail_poison_namespace_without_usage.carbon: error: name used before it was declared [NameUseBeforeDecl]
- library "[[@TEST_NAME]]";
- class C {};
- namespace N;
- // Here we use C and poison N.C.
- fn N.F1(x: C);
- // Should fail here since C was poisoned for namespace N when it was used in N
- // context without qualification.
- // CHECK:STDERR: fail_poison_namespace_without_usage.carbon:[[@LINE+4]]:1: note: declared here [NameUseBeforeDeclNote]
- // CHECK:STDERR: namespace N.C;
- // CHECK:STDERR: ^~~~~~~~~~~~~~
- // CHECK:STDERR:
- namespace N.C;
- // --- fail_poison_member_without_usage.carbon
- // CHECK:STDERR: fail_poison_member_without_usage.carbon: error: name used before it was declared [NameUseBeforeDecl]
- library "[[@TEST_NAME]]";
- class C1 {};
- class D {
- // Here we use C1 and poison D.C1.
- fn F1(x: C1);
- class C2 {};
- // Should fail here since C1 was poisoned for namespace class D when it was
- // used in D context without qualification.
- // CHECK:STDERR: fail_poison_member_without_usage.carbon:[[@LINE+4]]:7: note: declared here [NameUseBeforeDeclNote]
- // CHECK:STDERR: var C1: C2;
- // CHECK:STDERR: ^~~~~~
- // CHECK:STDERR:
- var C1: C2;
- }
- // --- fail_poison_function_without_usage.carbon
- // CHECK:STDERR: fail_poison_function_without_usage.carbon: error: name used before it was declared [NameUseBeforeDecl]
- library "[[@TEST_NAME]]";
- class C {};
- namespace N;
- // Here we use C and poison N.C.
- fn N.F1(x: C);
- // Should fail here since C was poisoned for namespace N when it was used in N
- // context without qualification.
- // CHECK:STDERR: fail_poison_function_without_usage.carbon:[[@LINE+4]]:1: note: declared here [NameUseBeforeDeclNote]
- // CHECK:STDERR: fn N.C();
- // CHECK:STDERR: ^~~~~~~~~
- // CHECK:STDERR:
- fn N.C();
- // --- fail_use_undefined_poisoned_name.carbon
- library "[[@TEST_NAME]]";
- class C {};
- namespace N;
- // Here we use C and poison N.C.
- fn N.F1() -> C;
- // Try to use N.C which was never defined and poisoned.
- // CHECK:STDERR: fail_use_undefined_poisoned_name.carbon:[[@LINE+4]]:14: error: member name `C` not found in `N` [MemberNameNotFoundInScope]
- // CHECK:STDERR: fn N.F2() -> N.C;
- // CHECK:STDERR: ^~~
- // CHECK:STDERR:
- fn N.F2() -> N.C;
- // --- fail_poison_with_usage.carbon
- // CHECK:STDERR: fail_poison_with_usage.carbon: error: name used before it was declared [NameUseBeforeDecl]
- library "[[@TEST_NAME]]";
- class C {};
- namespace N;
- // Here we use C and poison N.C.
- fn N.F1(x: C);
- // Should fail here since C was poisoned for namespace N when it was used in N
- // context without qualification.
- // CHECK:STDERR: fail_poison_with_usage.carbon:[[@LINE+4]]:1: note: declared here [NameUseBeforeDeclNote]
- // CHECK:STDERR: class N.C {}
- // CHECK:STDERR: ^~~~~~~~~~~
- // CHECK:STDERR:
- class N.C {}
- // Should not fail here since both N.F2() and N.F1() input is the class C and
- // not class N.C.
- fn N.F2(x: C) { N.F1(x); }
- // --- fail_poison_multiple_scopes.carbon
- // CHECK:STDERR: fail_poison_multiple_scopes.carbon: error: name used before it was declared [NameUseBeforeDecl]
- library "[[@TEST_NAME]]";
- class C {};
- namespace N1;
- namespace N1.N2;
- namespace N1.N2.N3;
- class N1.N2.N3.D1 {
- interface D2 {
- class D3 {
- // Here we use C and poison:
- // * N1.C
- // * N1.N2.C
- // * N1.N2.N3.C
- // * N1.N2.N3.D1.C
- // * N1.N2.N3.D1.D2.C
- // * N1.N2.N3.D1.D2.D3.C
- fn F(x: C);
- // CHECK:STDERR: fail_poison_multiple_scopes.carbon:[[@LINE+5]]:7: note: declared here [NameUseBeforeDeclNote]
- // CHECK:STDERR: class C {}
- // CHECK:STDERR: ^~~~~~~~~
- // CHECK:STDERR:
- // CHECK:STDERR: fail_poison_multiple_scopes.carbon: error: name used before it was declared [NameUseBeforeDecl]
- class C {}
- }
- // CHECK:STDERR: fail_poison_multiple_scopes.carbon:[[@LINE+5]]:5: note: declared here [NameUseBeforeDeclNote]
- // CHECK:STDERR: class C {}
- // CHECK:STDERR: ^~~~~~~~~
- // CHECK:STDERR:
- // CHECK:STDERR: fail_poison_multiple_scopes.carbon: error: name used before it was declared [NameUseBeforeDecl]
- class C {}
- }
- // CHECK:STDERR: fail_poison_multiple_scopes.carbon:[[@LINE+5]]:3: note: declared here [NameUseBeforeDeclNote]
- // CHECK:STDERR: class C {}
- // CHECK:STDERR: ^~~~~~~~~
- // CHECK:STDERR:
- // CHECK:STDERR: fail_poison_multiple_scopes.carbon: error: name used before it was declared [NameUseBeforeDecl]
- class C {}
- }
- // CHECK:STDERR: fail_poison_multiple_scopes.carbon:[[@LINE+5]]:1: note: declared here [NameUseBeforeDeclNote]
- // CHECK:STDERR: class N1.C {}
- // CHECK:STDERR: ^~~~~~~~~~~~
- // CHECK:STDERR:
- // CHECK:STDERR: fail_poison_multiple_scopes.carbon: error: name used before it was declared [NameUseBeforeDecl]
- class N1.C {}
- // CHECK:STDERR: fail_poison_multiple_scopes.carbon:[[@LINE+5]]:1: note: declared here [NameUseBeforeDeclNote]
- // CHECK:STDERR: interface N1.N2.C {}
- // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~
- // CHECK:STDERR:
- // CHECK:STDERR: fail_poison_multiple_scopes.carbon: error: name used before it was declared [NameUseBeforeDecl]
- interface N1.N2.C {}
- // CHECK:STDERR: fail_poison_multiple_scopes.carbon:[[@LINE+4]]:1: note: declared here [NameUseBeforeDeclNote]
- // CHECK:STDERR: class N1.N2.N3.C {}
- // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~
- // CHECK:STDERR:
- class N1.N2.N3.C {}
- // --- fail_alias.carbon
- // CHECK:STDERR: fail_alias.carbon: error: name used before it was declared [NameUseBeforeDecl]
- library "[[@TEST_NAME]]";
- class C {}
- namespace N;
- // CHECK:STDERR: fail_alias.carbon:[[@LINE+3]]:9: note: declared here [NameUseBeforeDeclNote]
- // CHECK:STDERR: alias N.C = C;
- // CHECK:STDERR: ^
- alias N.C = C;
- // --- ignored_poison_in_import.carbon
- library "[[@TEST_NAME]]";
- import library "poison";
- // This doesn't fail.
- class N.C {}
- // --- poison.impl.carbon
- impl library "[[@TEST_NAME]]";
- // TODO: This should fail since N.C was poisoned in the api.
- class N.C {}
- // CHECK:STDOUT: --- no_poison.carbon
- // CHECK:STDOUT:
- // CHECK:STDOUT: constants {
- // CHECK:STDOUT: %C.1: type = class_type @C.1 [template]
- // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template]
- // CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %empty_struct_type [template]
- // CHECK:STDOUT: %C.2: type = class_type @C.2 [template]
- // CHECK:STDOUT: %F1.type: type = fn_type @F1 [template]
- // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template]
- // CHECK:STDOUT: %F1: %F1.type = struct_value () [template]
- // CHECK:STDOUT: %F2.type: type = fn_type @F2 [template]
- // CHECK:STDOUT: %F2: %F2.type = struct_value () [template]
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: file {
- // CHECK:STDOUT: package: <namespace> = namespace [template] {
- // CHECK:STDOUT: .C = %C.decl.loc4
- // CHECK:STDOUT: .N = %N
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %C.decl.loc4: type = class_decl @C.1 [template = constants.%C.1] {} {}
- // CHECK:STDOUT: %N: <namespace> = namespace [template] {
- // CHECK:STDOUT: .C = %C.decl.loc8
- // CHECK:STDOUT: .F1 = %F1.decl
- // CHECK:STDOUT: .F2 = %F2.decl
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %C.decl.loc8: type = class_decl @C.2 [template = constants.%C.2] {} {}
- // CHECK:STDOUT: %F1.decl: %F1.type = fn_decl @F1 [template = constants.%F1] {
- // CHECK:STDOUT: %x.patt: %C.2 = binding_pattern x
- // CHECK:STDOUT: %x.param_patt: %C.2 = value_param_pattern %x.patt, runtime_param0
- // CHECK:STDOUT: } {
- // CHECK:STDOUT: %x.param: %C.2 = value_param runtime_param0
- // CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl.loc8 [template = constants.%C.2]
- // CHECK:STDOUT: %x: %C.2 = bind_name x, %x.param
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %F2.decl: %F2.type = fn_decl @F2 [template = constants.%F2] {
- // CHECK:STDOUT: %x.patt: %C.2 = binding_pattern x
- // CHECK:STDOUT: %x.param_patt: %C.2 = value_param_pattern %x.patt, runtime_param0
- // CHECK:STDOUT: } {
- // CHECK:STDOUT: %x.param: %C.2 = value_param runtime_param0
- // CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl.loc8 [template = constants.%C.2]
- // CHECK:STDOUT: %x: %C.2 = bind_name x, %x.param
- // CHECK:STDOUT: }
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: class @C.1 {
- // CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %empty_struct_type [template = constants.%complete_type]
- // CHECK:STDOUT:
- // CHECK:STDOUT: !members:
- // CHECK:STDOUT: .Self = constants.%C.1
- // CHECK:STDOUT: complete_type_witness = %complete_type
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: class @C.2 {
- // CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %empty_struct_type [template = constants.%complete_type]
- // CHECK:STDOUT:
- // CHECK:STDOUT: !members:
- // CHECK:STDOUT: .Self = constants.%C.2
- // CHECK:STDOUT: complete_type_witness = %complete_type
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: fn @F1(%x.param_patt: %C.2);
- // CHECK:STDOUT:
- // CHECK:STDOUT: fn @F2(%x.param_patt: %C.2) {
- // CHECK:STDOUT: !entry:
- // CHECK:STDOUT: %N.ref: <namespace> = name_ref N, file.%N [template = file.%N]
- // CHECK:STDOUT: %F1.ref: %F1.type = name_ref F1, file.%F1.decl [template = constants.%F1]
- // CHECK:STDOUT: %x.ref: %C.2 = name_ref x, %x
- // CHECK:STDOUT: %F1.call: init %empty_tuple.type = call %F1.ref(%x.ref)
- // CHECK:STDOUT: return
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: --- poison.carbon
- // CHECK:STDOUT:
- // CHECK:STDOUT: constants {
- // CHECK:STDOUT: %C: type = class_type @C [template]
- // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template]
- // CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %empty_struct_type [template]
- // CHECK:STDOUT: %F1.type: type = fn_type @F1 [template]
- // CHECK:STDOUT: %F1: %F1.type = struct_value () [template]
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: file {
- // CHECK:STDOUT: package: <namespace> = namespace [template] {
- // CHECK:STDOUT: .C = %C.decl
- // CHECK:STDOUT: .N = %N
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %C.decl: type = class_decl @C [template = constants.%C] {} {}
- // CHECK:STDOUT: %N: <namespace> = namespace [template] {
- // CHECK:STDOUT: .F1 = %F1.decl
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %F1.decl: %F1.type = fn_decl @F1 [template = constants.%F1] {
- // CHECK:STDOUT: %x.patt: %C = binding_pattern x
- // CHECK:STDOUT: %x.param_patt: %C = value_param_pattern %x.patt, runtime_param0
- // CHECK:STDOUT: } {
- // CHECK:STDOUT: %x.param: %C = value_param runtime_param0
- // CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [template = constants.%C]
- // CHECK:STDOUT: %x: %C = bind_name x, %x.param
- // CHECK:STDOUT: }
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: class @C {
- // CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %empty_struct_type [template = constants.%complete_type]
- // CHECK:STDOUT:
- // CHECK:STDOUT: !members:
- // CHECK:STDOUT: .Self = constants.%C
- // CHECK:STDOUT: complete_type_witness = %complete_type
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: fn @F1(%x.param_patt: %C);
- // CHECK:STDOUT:
- // CHECK:STDOUT: --- fail_poison_class_without_usage.carbon
- // CHECK:STDOUT:
- // CHECK:STDOUT: constants {
- // CHECK:STDOUT: %C: type = class_type @C [template]
- // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template]
- // CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %empty_struct_type [template]
- // CHECK:STDOUT: %F1.type: type = fn_type @F1 [template]
- // CHECK:STDOUT: %F1: %F1.type = struct_value () [template]
- // CHECK:STDOUT: %.1: type = class_type @.1 [template]
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: file {
- // CHECK:STDOUT: package: <namespace> = namespace [template] {
- // CHECK:STDOUT: .C = %C.decl
- // CHECK:STDOUT: .N = %N
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %C.decl: type = class_decl @C [template = constants.%C] {} {}
- // CHECK:STDOUT: %N: <namespace> = namespace [template] {
- // CHECK:STDOUT: .F1 = %F1.decl
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %F1.decl: %F1.type = fn_decl @F1 [template = constants.%F1] {
- // CHECK:STDOUT: %x.patt: %C = binding_pattern x
- // CHECK:STDOUT: %x.param_patt: %C = value_param_pattern %x.patt, runtime_param0
- // CHECK:STDOUT: } {
- // CHECK:STDOUT: %x.param: %C = value_param runtime_param0
- // CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [template = constants.%C]
- // CHECK:STDOUT: %x: %C = bind_name x, %x.param
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %.decl: type = class_decl @.1 [template = constants.%.1] {} {}
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: class @C {
- // CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %empty_struct_type [template = constants.%complete_type]
- // CHECK:STDOUT:
- // CHECK:STDOUT: !members:
- // CHECK:STDOUT: .Self = constants.%C
- // CHECK:STDOUT: complete_type_witness = %complete_type
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: class @.1 {
- // CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %empty_struct_type [template = constants.%complete_type]
- // CHECK:STDOUT:
- // CHECK:STDOUT: !members:
- // CHECK:STDOUT: .Self = constants.%.1
- // CHECK:STDOUT: complete_type_witness = %complete_type
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: fn @F1(%x.param_patt: %C);
- // CHECK:STDOUT:
- // CHECK:STDOUT: --- fail_poison_interface_without_usage.carbon
- // CHECK:STDOUT:
- // CHECK:STDOUT: constants {
- // CHECK:STDOUT: %I.type: type = facet_type <@I> [template]
- // CHECK:STDOUT: %Self.1: %I.type = bind_symbolic_name Self, 0 [symbolic]
- // CHECK:STDOUT: %F1.type: type = fn_type @F1 [template]
- // CHECK:STDOUT: %F1: %F1.type = struct_value () [template]
- // CHECK:STDOUT: %.type: type = facet_type <@.1> [template]
- // CHECK:STDOUT: %Self.2: %.type = bind_symbolic_name Self, 0 [symbolic]
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: file {
- // CHECK:STDOUT: package: <namespace> = namespace [template] {
- // CHECK:STDOUT: .I = %I.decl
- // CHECK:STDOUT: .N = %N
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %I.decl: type = interface_decl @I [template = constants.%I.type] {} {}
- // CHECK:STDOUT: %N: <namespace> = namespace [template] {
- // CHECK:STDOUT: .F1 = %F1.decl
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %F1.decl: %F1.type = fn_decl @F1 [template = constants.%F1] {
- // CHECK:STDOUT: %x.patt: %I.type = binding_pattern x
- // CHECK:STDOUT: %x.param_patt: %I.type = value_param_pattern %x.patt, runtime_param0
- // CHECK:STDOUT: } {
- // CHECK:STDOUT: %x.param: %I.type = value_param runtime_param0
- // CHECK:STDOUT: %I.ref: type = name_ref I, file.%I.decl [template = constants.%I.type]
- // CHECK:STDOUT: %x: %I.type = bind_name x, %x.param
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %.decl: type = interface_decl @.1 [template = constants.%.type] {} {}
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: interface @I {
- // CHECK:STDOUT: %Self: %I.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self.1]
- // CHECK:STDOUT:
- // CHECK:STDOUT: !members:
- // CHECK:STDOUT: .Self = %Self
- // CHECK:STDOUT: witness = ()
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: interface @.1 {
- // CHECK:STDOUT: %Self: %.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self.2]
- // CHECK:STDOUT:
- // CHECK:STDOUT: !members:
- // CHECK:STDOUT: .Self = %Self
- // CHECK:STDOUT: witness = ()
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: fn @F1(%x.param_patt: %I.type);
- // CHECK:STDOUT:
- // CHECK:STDOUT: --- fail_poison_namespace_without_usage.carbon
- // CHECK:STDOUT:
- // CHECK:STDOUT: constants {
- // CHECK:STDOUT: %C: type = class_type @C [template]
- // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template]
- // CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %empty_struct_type [template]
- // CHECK:STDOUT: %F1.type: type = fn_type @F1 [template]
- // CHECK:STDOUT: %F1: %F1.type = struct_value () [template]
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: file {
- // CHECK:STDOUT: package: <namespace> = namespace [template] {
- // CHECK:STDOUT: .C = %C.decl
- // CHECK:STDOUT: .N = %N
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %C.decl: type = class_decl @C [template = constants.%C] {} {}
- // CHECK:STDOUT: %N: <namespace> = namespace [template] {
- // CHECK:STDOUT: .F1 = %F1.decl
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %F1.decl: %F1.type = fn_decl @F1 [template = constants.%F1] {
- // CHECK:STDOUT: %x.patt: %C = binding_pattern x
- // CHECK:STDOUT: %x.param_patt: %C = value_param_pattern %x.patt, runtime_param0
- // CHECK:STDOUT: } {
- // CHECK:STDOUT: %x.param: %C = value_param runtime_param0
- // CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [template = constants.%C]
- // CHECK:STDOUT: %x: %C = bind_name x, %x.param
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %.loc17: <namespace> = namespace [template] {}
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: class @C {
- // CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %empty_struct_type [template = constants.%complete_type]
- // CHECK:STDOUT:
- // CHECK:STDOUT: !members:
- // CHECK:STDOUT: .Self = constants.%C
- // CHECK:STDOUT: complete_type_witness = %complete_type
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: fn @F1(%x.param_patt: %C);
- // CHECK:STDOUT:
- // CHECK:STDOUT: --- fail_poison_member_without_usage.carbon
- // CHECK:STDOUT:
- // CHECK:STDOUT: constants {
- // CHECK:STDOUT: %C1: type = class_type @C1 [template]
- // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template]
- // CHECK:STDOUT: %complete_type.1: <witness> = complete_type_witness %empty_struct_type [template]
- // CHECK:STDOUT: %D: type = class_type @D [template]
- // CHECK:STDOUT: %F1.type: type = fn_type @F1 [template]
- // CHECK:STDOUT: %F1: %F1.type = struct_value () [template]
- // CHECK:STDOUT: %C2: type = class_type @C2 [template]
- // CHECK:STDOUT: %D.elem: type = unbound_element_type %D, %C2 [template]
- // CHECK:STDOUT: %struct_type.C1: type = struct_type {.C1: %C2} [template]
- // CHECK:STDOUT: %complete_type.2: <witness> = complete_type_witness %struct_type.C1 [template]
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: file {
- // CHECK:STDOUT: package: <namespace> = namespace [template] {
- // CHECK:STDOUT: .C1 = %C1.decl
- // CHECK:STDOUT: .D = %D.decl
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %C1.decl: type = class_decl @C1 [template = constants.%C1] {} {}
- // CHECK:STDOUT: %D.decl: type = class_decl @D [template = constants.%D] {} {}
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: class @C1 {
- // CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %empty_struct_type [template = constants.%complete_type.1]
- // CHECK:STDOUT:
- // CHECK:STDOUT: !members:
- // CHECK:STDOUT: .Self = constants.%C1
- // CHECK:STDOUT: complete_type_witness = %complete_type
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: class @D {
- // CHECK:STDOUT: %F1.decl: %F1.type = fn_decl @F1 [template = constants.%F1] {
- // CHECK:STDOUT: %x.patt: %C1 = binding_pattern x
- // CHECK:STDOUT: %x.param_patt: %C1 = value_param_pattern %x.patt, runtime_param0
- // CHECK:STDOUT: } {
- // CHECK:STDOUT: %x.param: %C1 = value_param runtime_param0
- // CHECK:STDOUT: %C1.ref: type = name_ref C1, file.%C1.decl [template = constants.%C1]
- // CHECK:STDOUT: %x: %C1 = bind_name x, %x.param
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %C2.decl: type = class_decl @C2 [template = constants.%C2] {} {}
- // CHECK:STDOUT: %.loc18: %D.elem = field_decl C1, element0 [template]
- // CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %struct_type.C1 [template = constants.%complete_type.2]
- // CHECK:STDOUT:
- // CHECK:STDOUT: !members:
- // CHECK:STDOUT: .Self = constants.%D
- // CHECK:STDOUT: .F1 = %F1.decl
- // CHECK:STDOUT: .C2 = %C2.decl
- // CHECK:STDOUT: complete_type_witness = %complete_type
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: class @C2 {
- // CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %empty_struct_type [template = constants.%complete_type.1]
- // CHECK:STDOUT:
- // CHECK:STDOUT: !members:
- // CHECK:STDOUT: .Self = constants.%C2
- // CHECK:STDOUT: complete_type_witness = %complete_type
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: fn @F1(%x.param_patt: %C1);
- // CHECK:STDOUT:
- // CHECK:STDOUT: --- fail_poison_function_without_usage.carbon
- // CHECK:STDOUT:
- // CHECK:STDOUT: constants {
- // CHECK:STDOUT: %C: type = class_type @C [template]
- // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template]
- // CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %empty_struct_type [template]
- // CHECK:STDOUT: %F1.type: type = fn_type @F1 [template]
- // CHECK:STDOUT: %F1: %F1.type = struct_value () [template]
- // CHECK:STDOUT: %.type: type = fn_type @.1 [template]
- // CHECK:STDOUT: %.1: %.type = struct_value () [template]
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: file {
- // CHECK:STDOUT: package: <namespace> = namespace [template] {
- // CHECK:STDOUT: .C = %C.decl
- // CHECK:STDOUT: .N = %N
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %C.decl: type = class_decl @C [template = constants.%C] {} {}
- // CHECK:STDOUT: %N: <namespace> = namespace [template] {
- // CHECK:STDOUT: .F1 = %F1.decl
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %F1.decl: %F1.type = fn_decl @F1 [template = constants.%F1] {
- // CHECK:STDOUT: %x.patt: %C = binding_pattern x
- // CHECK:STDOUT: %x.param_patt: %C = value_param_pattern %x.patt, runtime_param0
- // CHECK:STDOUT: } {
- // CHECK:STDOUT: %x.param: %C = value_param runtime_param0
- // CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [template = constants.%C]
- // CHECK:STDOUT: %x: %C = bind_name x, %x.param
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %.decl: %.type = fn_decl @.1 [template = constants.%.1] {} {}
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: class @C {
- // CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %empty_struct_type [template = constants.%complete_type]
- // CHECK:STDOUT:
- // CHECK:STDOUT: !members:
- // CHECK:STDOUT: .Self = constants.%C
- // CHECK:STDOUT: complete_type_witness = %complete_type
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: fn @F1(%x.param_patt: %C);
- // CHECK:STDOUT:
- // CHECK:STDOUT: fn @.1();
- // CHECK:STDOUT:
- // CHECK:STDOUT: --- fail_use_undefined_poisoned_name.carbon
- // CHECK:STDOUT:
- // CHECK:STDOUT: constants {
- // CHECK:STDOUT: %C: type = class_type @C [template]
- // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template]
- // CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %empty_struct_type [template]
- // CHECK:STDOUT: %F1.type: type = fn_type @F1 [template]
- // CHECK:STDOUT: %F1: %F1.type = struct_value () [template]
- // CHECK:STDOUT: %F2.type: type = fn_type @F2 [template]
- // CHECK:STDOUT: %F2: %F2.type = struct_value () [template]
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: file {
- // CHECK:STDOUT: package: <namespace> = namespace [template] {
- // CHECK:STDOUT: .C = %C.decl
- // CHECK:STDOUT: .N = %N
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %C.decl: type = class_decl @C [template = constants.%C] {} {}
- // CHECK:STDOUT: %N: <namespace> = namespace [template] {
- // CHECK:STDOUT: .F1 = %F1.decl
- // CHECK:STDOUT: .F2 = %F2.decl
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %F1.decl: %F1.type = fn_decl @F1 [template = constants.%F1] {
- // CHECK:STDOUT: %return.patt: %C = return_slot_pattern
- // CHECK:STDOUT: %return.param_patt: %C = out_param_pattern %return.patt, runtime_param0
- // CHECK:STDOUT: } {
- // CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [template = constants.%C]
- // CHECK:STDOUT: %return.param: ref %C = out_param runtime_param0
- // CHECK:STDOUT: %return: ref %C = return_slot %return.param
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %F2.decl: %F2.type = fn_decl @F2 [template = constants.%F2] {
- // CHECK:STDOUT: %return.patt: <error> = return_slot_pattern
- // CHECK:STDOUT: %return.param_patt: <error> = out_param_pattern %return.patt, runtime_param0
- // CHECK:STDOUT: } {
- // CHECK:STDOUT: %N.ref: <namespace> = name_ref N, file.%N [template = file.%N]
- // CHECK:STDOUT: %C.ref: <error> = name_ref C, <error> [template = <error>]
- // CHECK:STDOUT: %return.param: ref <error> = out_param runtime_param0
- // CHECK:STDOUT: %return: ref <error> = return_slot %return.param
- // CHECK:STDOUT: }
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: class @C {
- // CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %empty_struct_type [template = constants.%complete_type]
- // CHECK:STDOUT:
- // CHECK:STDOUT: !members:
- // CHECK:STDOUT: .Self = constants.%C
- // CHECK:STDOUT: complete_type_witness = %complete_type
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: fn @F1() -> %C;
- // CHECK:STDOUT:
- // CHECK:STDOUT: fn @F2() -> <error>;
- // CHECK:STDOUT:
- // CHECK:STDOUT: --- fail_poison_with_usage.carbon
- // CHECK:STDOUT:
- // CHECK:STDOUT: constants {
- // CHECK:STDOUT: %C: type = class_type @C [template]
- // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template]
- // CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %empty_struct_type [template]
- // CHECK:STDOUT: %F1.type: type = fn_type @F1 [template]
- // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template]
- // CHECK:STDOUT: %F1: %F1.type = struct_value () [template]
- // CHECK:STDOUT: %.1: type = class_type @.1 [template]
- // CHECK:STDOUT: %F2.type: type = fn_type @F2 [template]
- // CHECK:STDOUT: %F2: %F2.type = struct_value () [template]
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: file {
- // CHECK:STDOUT: package: <namespace> = namespace [template] {
- // CHECK:STDOUT: .C = %C.decl
- // CHECK:STDOUT: .N = %N
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %C.decl: type = class_decl @C [template = constants.%C] {} {}
- // CHECK:STDOUT: %N: <namespace> = namespace [template] {
- // CHECK:STDOUT: .F1 = %F1.decl
- // CHECK:STDOUT: .F2 = %F2.decl
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %F1.decl: %F1.type = fn_decl @F1 [template = constants.%F1] {
- // CHECK:STDOUT: %x.patt: %C = binding_pattern x
- // CHECK:STDOUT: %x.param_patt: %C = value_param_pattern %x.patt, runtime_param0
- // CHECK:STDOUT: } {
- // CHECK:STDOUT: %x.param: %C = value_param runtime_param0
- // CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [template = constants.%C]
- // CHECK:STDOUT: %x: %C = bind_name x, %x.param
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %.decl: type = class_decl @.1 [template = constants.%.1] {} {}
- // CHECK:STDOUT: %F2.decl: %F2.type = fn_decl @F2 [template = constants.%F2] {
- // CHECK:STDOUT: %x.patt: %C = binding_pattern x
- // CHECK:STDOUT: %x.param_patt: %C = value_param_pattern %x.patt, runtime_param0
- // CHECK:STDOUT: } {
- // CHECK:STDOUT: %x.param: %C = value_param runtime_param0
- // CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [template = constants.%C]
- // CHECK:STDOUT: %x: %C = bind_name x, %x.param
- // CHECK:STDOUT: }
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: class @C {
- // CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %empty_struct_type [template = constants.%complete_type]
- // CHECK:STDOUT:
- // CHECK:STDOUT: !members:
- // CHECK:STDOUT: .Self = constants.%C
- // CHECK:STDOUT: complete_type_witness = %complete_type
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: class @.1 {
- // CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %empty_struct_type [template = constants.%complete_type]
- // CHECK:STDOUT:
- // CHECK:STDOUT: !members:
- // CHECK:STDOUT: .Self = constants.%.1
- // CHECK:STDOUT: complete_type_witness = %complete_type
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: fn @F1(%x.param_patt: %C);
- // CHECK:STDOUT:
- // CHECK:STDOUT: fn @F2(%x.param_patt: %C) {
- // CHECK:STDOUT: !entry:
- // CHECK:STDOUT: %N.ref: <namespace> = name_ref N, file.%N [template = file.%N]
- // CHECK:STDOUT: %F1.ref: %F1.type = name_ref F1, file.%F1.decl [template = constants.%F1]
- // CHECK:STDOUT: %x.ref: %C = name_ref x, %x
- // CHECK:STDOUT: %F1.call: init %empty_tuple.type = call %F1.ref(%x.ref)
- // CHECK:STDOUT: return
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: --- fail_poison_multiple_scopes.carbon
- // CHECK:STDOUT:
- // CHECK:STDOUT: constants {
- // CHECK:STDOUT: %C: type = class_type @C [template]
- // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template]
- // CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %empty_struct_type [template]
- // CHECK:STDOUT: %D1: type = class_type @D1 [template]
- // CHECK:STDOUT: %D2.type: type = facet_type <@D2> [template]
- // CHECK:STDOUT: %Self.1: %D2.type = bind_symbolic_name Self, 0 [symbolic]
- // CHECK:STDOUT: %D3.1: type = class_type @D3 [template]
- // CHECK:STDOUT: %D3.2: type = class_type @D3, @D3(%Self.1) [symbolic]
- // CHECK:STDOUT: %F.type: type = fn_type @F, @D3(%Self.1) [symbolic]
- // CHECK:STDOUT: %F: %F.type = struct_value () [symbolic]
- // CHECK:STDOUT: %.1: type = class_type @.1 [template]
- // CHECK:STDOUT: %.2: type = class_type @.1, @.1(%Self.1) [symbolic]
- // CHECK:STDOUT: %.3: type = class_type @.2 [template]
- // CHECK:STDOUT: %.4: type = class_type @.2, @.2(%Self.1) [symbolic]
- // CHECK:STDOUT: %.5: type = class_type @.3 [template]
- // CHECK:STDOUT: %.6: type = class_type @.4 [template]
- // CHECK:STDOUT: %.type: type = facet_type <@.6> [template]
- // CHECK:STDOUT: %Self.2: %.type = bind_symbolic_name Self, 0 [symbolic]
- // CHECK:STDOUT: %.7: type = class_type @.5 [template]
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: file {
- // CHECK:STDOUT: package: <namespace> = namespace [template] {
- // CHECK:STDOUT: .C = %C.decl
- // CHECK:STDOUT: .N1 = %N1
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %C.decl: type = class_decl @C [template = constants.%C] {} {}
- // CHECK:STDOUT: %N1: <namespace> = namespace [template] {
- // CHECK:STDOUT: .N2 = %N2
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %N2: <namespace> = namespace [template] {
- // CHECK:STDOUT: .N3 = %N3
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %N3: <namespace> = namespace [template] {
- // CHECK:STDOUT: .D1 = %D1.decl
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %D1.decl: type = class_decl @D1 [template = constants.%D1] {} {}
- // CHECK:STDOUT: %.decl.loc49: type = class_decl @.4 [template = constants.%.6] {} {}
- // CHECK:STDOUT: %.decl.loc56: type = interface_decl @.6 [template = constants.%.type] {} {}
- // CHECK:STDOUT: %.decl.loc62: type = class_decl @.5 [template = constants.%.7] {} {}
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: interface @D2 {
- // CHECK:STDOUT: %Self: %D2.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self.1]
- // CHECK:STDOUT: %D3.decl: type = class_decl @D3 [template = constants.%D3.1] {} {}
- // CHECK:STDOUT: %.decl: type = class_decl @.2 [template = constants.%.3] {} {}
- // CHECK:STDOUT:
- // CHECK:STDOUT: !members:
- // CHECK:STDOUT: .Self = %Self
- // CHECK:STDOUT: .D3 = %D3.decl
- // CHECK:STDOUT: witness = ()
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: interface @.6 {
- // CHECK:STDOUT: %Self: %.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self.2]
- // CHECK:STDOUT:
- // CHECK:STDOUT: !members:
- // CHECK:STDOUT: .Self = %Self
- // CHECK:STDOUT: witness = ()
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: class @C {
- // CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %empty_struct_type [template = constants.%complete_type]
- // CHECK:STDOUT:
- // CHECK:STDOUT: !members:
- // CHECK:STDOUT: .Self = constants.%C
- // CHECK:STDOUT: complete_type_witness = %complete_type
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: class @D1 {
- // CHECK:STDOUT: %D2.decl: type = interface_decl @D2 [template = constants.%D2.type] {} {}
- // CHECK:STDOUT: %.decl: type = class_decl @.3 [template = constants.%.5] {} {}
- // CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %empty_struct_type [template = constants.%complete_type]
- // CHECK:STDOUT:
- // CHECK:STDOUT: !members:
- // CHECK:STDOUT: .Self = constants.%D1
- // CHECK:STDOUT: .D2 = %D2.decl
- // CHECK:STDOUT: complete_type_witness = %complete_type
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: generic class @D3(@D2.%Self: %D2.type) {
- // CHECK:STDOUT: !definition:
- // CHECK:STDOUT: %Self: %D2.type = bind_symbolic_name Self, 0 [symbolic = %Self (constants.%Self.1)]
- // CHECK:STDOUT: %F.type: type = fn_type @F, @D3(%Self) [symbolic = %F.type (constants.%F.type)]
- // CHECK:STDOUT: %F: @D3.%F.type (%F.type) = struct_value () [symbolic = %F (constants.%F)]
- // CHECK:STDOUT:
- // CHECK:STDOUT: class {
- // CHECK:STDOUT: %F.decl: @D3.%F.type (%F.type) = fn_decl @F [symbolic = @D3.%F (constants.%F)] {
- // CHECK:STDOUT: %x.patt: %C = binding_pattern x
- // CHECK:STDOUT: %x.param_patt: %C = value_param_pattern %x.patt, runtime_param0
- // CHECK:STDOUT: } {
- // CHECK:STDOUT: %x.param: %C = value_param runtime_param0
- // CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [template = constants.%C]
- // CHECK:STDOUT: %x: %C = bind_name x, %x.param
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %.decl: type = class_decl @.1 [template = constants.%.1] {} {}
- // CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %empty_struct_type [template = constants.%complete_type]
- // CHECK:STDOUT:
- // CHECK:STDOUT: !members:
- // CHECK:STDOUT: .Self = constants.%D3.2
- // CHECK:STDOUT: .F = %F.decl
- // CHECK:STDOUT: complete_type_witness = %complete_type
- // CHECK:STDOUT: }
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: generic class @.1(@D2.%Self: %D2.type) {
- // CHECK:STDOUT: !definition:
- // CHECK:STDOUT:
- // CHECK:STDOUT: class {
- // CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %empty_struct_type [template = constants.%complete_type]
- // CHECK:STDOUT:
- // CHECK:STDOUT: !members:
- // CHECK:STDOUT: .Self = constants.%.2
- // CHECK:STDOUT: complete_type_witness = %complete_type
- // CHECK:STDOUT: }
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: generic class @.2(@D2.%Self: %D2.type) {
- // CHECK:STDOUT: !definition:
- // CHECK:STDOUT:
- // CHECK:STDOUT: class {
- // CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %empty_struct_type [template = constants.%complete_type]
- // CHECK:STDOUT:
- // CHECK:STDOUT: !members:
- // CHECK:STDOUT: .Self = constants.%.4
- // CHECK:STDOUT: complete_type_witness = %complete_type
- // CHECK:STDOUT: }
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: class @.3 {
- // CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %empty_struct_type [template = constants.%complete_type]
- // CHECK:STDOUT:
- // CHECK:STDOUT: !members:
- // CHECK:STDOUT: .Self = constants.%.5
- // CHECK:STDOUT: complete_type_witness = %complete_type
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: class @.4 {
- // CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %empty_struct_type [template = constants.%complete_type]
- // CHECK:STDOUT:
- // CHECK:STDOUT: !members:
- // CHECK:STDOUT: .Self = constants.%.6
- // CHECK:STDOUT: complete_type_witness = %complete_type
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: class @.5 {
- // CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %empty_struct_type [template = constants.%complete_type]
- // CHECK:STDOUT:
- // CHECK:STDOUT: !members:
- // CHECK:STDOUT: .Self = constants.%.7
- // CHECK:STDOUT: complete_type_witness = %complete_type
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: generic fn @F(@D2.%Self: %D2.type) {
- // CHECK:STDOUT:
- // CHECK:STDOUT: fn(%x.param_patt: %C);
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: specific @D3(constants.%Self.1) {}
- // CHECK:STDOUT:
- // CHECK:STDOUT: specific @F(constants.%Self.1) {}
- // CHECK:STDOUT:
- // CHECK:STDOUT: specific @.1(constants.%Self.1) {}
- // CHECK:STDOUT:
- // CHECK:STDOUT: specific @D3(%Self) {}
- // CHECK:STDOUT:
- // CHECK:STDOUT: specific @.2(constants.%Self.1) {}
- // CHECK:STDOUT:
- // CHECK:STDOUT: --- fail_alias.carbon
- // CHECK:STDOUT:
- // CHECK:STDOUT: constants {
- // CHECK:STDOUT: %C: type = class_type @C [template]
- // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template]
- // CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %empty_struct_type [template]
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: file {
- // CHECK:STDOUT: package: <namespace> = namespace [template] {
- // CHECK:STDOUT: .C = %C.decl
- // CHECK:STDOUT: .N = %N
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %C.decl: type = class_decl @C [template = constants.%C] {} {}
- // CHECK:STDOUT: %N: <namespace> = namespace [template] {}
- // CHECK:STDOUT: %C.ref: type = name_ref C, %C.decl [template = constants.%C]
- // CHECK:STDOUT: %.loc11: type = bind_alias <invalid>, %C.decl [template = constants.%C]
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: class @C {
- // CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %empty_struct_type [template = constants.%complete_type]
- // CHECK:STDOUT:
- // CHECK:STDOUT: !members:
- // CHECK:STDOUT: .Self = constants.%C
- // CHECK:STDOUT: complete_type_witness = %complete_type
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: --- ignored_poison_in_import.carbon
- // CHECK:STDOUT:
- // CHECK:STDOUT: constants {
- // CHECK:STDOUT: %C: type = class_type @C [template]
- // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template]
- // CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %empty_struct_type [template]
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: imports {
- // CHECK:STDOUT: %import_ref.1 = import_ref Main//poison, C, unloaded
- // CHECK:STDOUT: %import_ref.2: <namespace> = import_ref Main//poison, N, loaded
- // CHECK:STDOUT: %N: <namespace> = namespace %import_ref.2, [template] {
- // CHECK:STDOUT: .F1 = %import_ref.3
- // CHECK:STDOUT: .C = file.%C.decl
- // CHECK:STDOUT: }
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: file {
- // CHECK:STDOUT: package: <namespace> = namespace [template] {
- // CHECK:STDOUT: .C = imports.%import_ref.1
- // CHECK:STDOUT: .N = imports.%N
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %default.import = import <invalid>
- // CHECK:STDOUT: %C.decl: type = class_decl @C [template = constants.%C] {} {}
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: class @C {
- // CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %empty_struct_type [template = constants.%complete_type]
- // CHECK:STDOUT:
- // CHECK:STDOUT: !members:
- // CHECK:STDOUT: .Self = constants.%C
- // CHECK:STDOUT: complete_type_witness = %complete_type
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: --- poison.impl.carbon
- // CHECK:STDOUT:
- // CHECK:STDOUT: constants {
- // CHECK:STDOUT: %C: type = class_type @C [template]
- // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template]
- // CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %empty_struct_type [template]
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: imports {
- // CHECK:STDOUT: %import_ref.1 = import_ref Main//poison, C, unloaded
- // CHECK:STDOUT: %import_ref.2: <namespace> = import_ref Main//poison, N, loaded
- // CHECK:STDOUT: %N: <namespace> = namespace %import_ref.2, [template] {
- // CHECK:STDOUT: .F1 = %import_ref.3
- // CHECK:STDOUT: .C = file.%C.decl
- // CHECK:STDOUT: }
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: file {
- // CHECK:STDOUT: package: <namespace> = namespace [template] {
- // CHECK:STDOUT: .C = imports.%import_ref.1
- // CHECK:STDOUT: .N = imports.%N
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %default.import.loc2_6.1 = import <invalid>
- // CHECK:STDOUT: %default.import.loc2_6.2 = import <invalid>
- // CHECK:STDOUT: %C.decl: type = class_decl @C [template = constants.%C] {} {}
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: class @C {
- // CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %empty_struct_type [template = constants.%complete_type]
- // CHECK:STDOUT:
- // CHECK:STDOUT: !members:
- // CHECK:STDOUT: .Self = constants.%C
- // CHECK:STDOUT: complete_type_witness = %complete_type
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
|