Boaz Brickner
2025-03-03 19:25:55 +00:00
committed by GitHub
parent c44e688e5d
commit 28de6c9b7d
6 changed files with 12 additions and 2143 deletions
@@ -2,6 +2,8 @@
// Exceptions. See /LICENSE for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
// EXTRA-ARGS: --no-dump-sem-ir
//
// AUTOUPDATE
// TIP: To test this file alone, run:
// TIP: bazel test //toolchain/testing:file_test --test_arg=--file_tests=toolchain/check/testdata/class/no_prelude/name_poisoning.carbon
@@ -263,599 +265,3 @@ class C {
// CHECK:STDERR:
fn B();
}
// CHECK:STDOUT: --- no_poison.carbon
// CHECK:STDOUT:
// CHECK:STDOUT: constants {
// CHECK:STDOUT: %C.f79: type = class_type @C.1 [concrete]
// CHECK:STDOUT: %C.9f4: type = class_type @C.2 [concrete]
// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete]
// CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %empty_struct_type [concrete]
// CHECK:STDOUT: %F.type: type = fn_type @F [concrete]
// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete]
// CHECK:STDOUT: %F: %F.type = struct_value () [concrete]
// CHECK:STDOUT: %TestCall.type: type = fn_type @TestCall [concrete]
// CHECK:STDOUT: %TestCall: %TestCall.type = struct_value () [concrete]
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: file {
// CHECK:STDOUT: package: <namespace> = namespace [concrete] {
// CHECK:STDOUT: .C = %C.decl.loc4
// CHECK:STDOUT: .N = %N
// CHECK:STDOUT: .TestCall = %TestCall.decl
// CHECK:STDOUT: }
// CHECK:STDOUT: %C.decl.loc4: type = class_decl @C.1 [concrete = constants.%C.f79] {} {}
// CHECK:STDOUT: %N: <namespace> = namespace [concrete] {
// CHECK:STDOUT: .C = %C.decl.loc8
// CHECK:STDOUT: .F = %F.decl
// CHECK:STDOUT: }
// CHECK:STDOUT: %C.decl.loc8: type = class_decl @C.2 [concrete = constants.%C.9f4] {} {}
// CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [concrete = constants.%F] {
// CHECK:STDOUT: %x.patt: %C.9f4 = binding_pattern x
// CHECK:STDOUT: %x.param_patt: %C.9f4 = value_param_pattern %x.patt, runtime_param0
// CHECK:STDOUT: } {
// CHECK:STDOUT: %x.param: %C.9f4 = value_param runtime_param0
// CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl.loc8 [concrete = constants.%C.9f4]
// CHECK:STDOUT: %x: %C.9f4 = bind_name x, %x.param
// CHECK:STDOUT: }
// CHECK:STDOUT: %TestCall.decl: %TestCall.type = fn_decl @TestCall [concrete = constants.%TestCall] {
// CHECK:STDOUT: %x.patt: %C.9f4 = binding_pattern x
// CHECK:STDOUT: %x.param_patt: %C.9f4 = value_param_pattern %x.patt, runtime_param0
// CHECK:STDOUT: } {
// CHECK:STDOUT: %x.param: %C.9f4 = value_param runtime_param0
// CHECK:STDOUT: %.loc11: type = splice_block %C.ref [concrete = constants.%C.9f4] {
// CHECK:STDOUT: %N.ref.loc11: <namespace> = name_ref N, file.%N [concrete = file.%N]
// CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl.loc8 [concrete = constants.%C.9f4]
// CHECK:STDOUT: }
// CHECK:STDOUT: %x: %C.9f4 = bind_name x, %x.param
// CHECK:STDOUT: }
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: class @C.1;
// CHECK:STDOUT:
// CHECK:STDOUT: class @C.2 {
// CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %empty_struct_type [concrete = constants.%complete_type]
// CHECK:STDOUT: complete_type_witness = %complete_type
// CHECK:STDOUT:
// CHECK:STDOUT: !members:
// CHECK:STDOUT: .Self = constants.%C.9f4
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: fn @F(%x.param_patt: %C.9f4);
// CHECK:STDOUT:
// CHECK:STDOUT: fn @TestCall(%x.param_patt: %C.9f4) {
// CHECK:STDOUT: !entry:
// CHECK:STDOUT: %N.ref.loc13: <namespace> = name_ref N, file.%N [concrete = file.%N]
// CHECK:STDOUT: %F.ref: %F.type = name_ref F, file.%F.decl [concrete = constants.%F]
// CHECK:STDOUT: %x.ref: %C.9f4 = name_ref x, %x
// CHECK:STDOUT: %F.call: init %empty_tuple.type = call %F.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 [concrete]
// CHECK:STDOUT: %F.type: type = fn_type @F [concrete]
// CHECK:STDOUT: %F: %F.type = struct_value () [concrete]
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: file {
// CHECK:STDOUT: package: <namespace> = namespace [concrete] {
// CHECK:STDOUT: .C = %C.decl
// CHECK:STDOUT: .N = %N
// CHECK:STDOUT: }
// CHECK:STDOUT: %C.decl: type = class_decl @C [concrete = constants.%C] {} {}
// CHECK:STDOUT: %N: <namespace> = namespace [concrete] {
// CHECK:STDOUT: .C = <poisoned>
// CHECK:STDOUT: .F = %F.decl
// CHECK:STDOUT: }
// CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [concrete = 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 [concrete = constants.%C]
// CHECK:STDOUT: %x: %C = bind_name x, %x.param
// CHECK:STDOUT: }
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: class @C;
// CHECK:STDOUT:
// CHECK:STDOUT: fn @F(%x.param_patt: %C);
// CHECK:STDOUT:
// CHECK:STDOUT: --- fail_declare_after_poison.carbon
// CHECK:STDOUT:
// CHECK:STDOUT: constants {
// CHECK:STDOUT: %C.f79: type = class_type @C.1 [concrete]
// CHECK:STDOUT: %F.type: type = fn_type @F [concrete]
// CHECK:STDOUT: %F: %F.type = struct_value () [concrete]
// CHECK:STDOUT: %C.9f4: type = class_type @C.2 [concrete]
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: file {
// CHECK:STDOUT: package: <namespace> = namespace [concrete] {
// CHECK:STDOUT: .C = %C.decl.loc4
// CHECK:STDOUT: .N = %N
// CHECK:STDOUT: }
// CHECK:STDOUT: %C.decl.loc4: type = class_decl @C.1 [concrete = constants.%C.f79] {} {}
// CHECK:STDOUT: %N: <namespace> = namespace [concrete] {
// CHECK:STDOUT: .C = <poisoned>
// CHECK:STDOUT: .F = %F.decl
// CHECK:STDOUT: }
// CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [concrete = constants.%F] {
// CHECK:STDOUT: %x.patt: %C.f79 = binding_pattern x
// CHECK:STDOUT: %x.param_patt: %C.f79 = value_param_pattern %x.patt, runtime_param0
// CHECK:STDOUT: } {
// CHECK:STDOUT: %x.param: %C.f79 = value_param runtime_param0
// CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl.loc4 [concrete = constants.%C.f79]
// CHECK:STDOUT: %x: %C.f79 = bind_name x, %x.param
// CHECK:STDOUT: }
// CHECK:STDOUT: %C.decl.loc18: type = class_decl @C.2 [concrete = constants.%C.9f4] {} {}
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: class @C.1;
// CHECK:STDOUT:
// CHECK:STDOUT: class @C.2;
// CHECK:STDOUT:
// CHECK:STDOUT: fn @F(%x.param_patt: %C.f79);
// CHECK:STDOUT:
// CHECK:STDOUT: --- fail_use_poison.carbon
// CHECK:STDOUT:
// CHECK:STDOUT: constants {
// CHECK:STDOUT: %C: type = class_type @C [concrete]
// CHECK:STDOUT: %F1.type: type = fn_type @F1 [concrete]
// CHECK:STDOUT: %F1: %F1.type = struct_value () [concrete]
// CHECK:STDOUT: %F2.type: type = fn_type @F2 [concrete]
// CHECK:STDOUT: %F2: %F2.type = struct_value () [concrete]
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: file {
// CHECK:STDOUT: package: <namespace> = namespace [concrete] {
// CHECK:STDOUT: .C = %C.decl
// CHECK:STDOUT: .N = %N
// CHECK:STDOUT: }
// CHECK:STDOUT: %C.decl: type = class_decl @C [concrete = constants.%C] {} {}
// CHECK:STDOUT: %N: <namespace> = namespace [concrete] {
// CHECK:STDOUT: .C = <poisoned>
// CHECK:STDOUT: .F1 = %F1.decl
// CHECK:STDOUT: .N = <poisoned>
// CHECK:STDOUT: .F2 = %F2.decl
// CHECK:STDOUT: }
// CHECK:STDOUT: %F1.decl: %F1.type = fn_decl @F1 [concrete = 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 [concrete = 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 [concrete = 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 [concrete = file.%N]
// CHECK:STDOUT: %C.ref: <error> = name_ref C, <error> [concrete = <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:
// CHECK:STDOUT: fn @F1() -> %C;
// CHECK:STDOUT:
// CHECK:STDOUT: fn @F2() -> <error>;
// CHECK:STDOUT:
// CHECK:STDOUT: --- fail_use_declaration_after_poison.carbon
// CHECK:STDOUT:
// CHECK:STDOUT: constants {
// CHECK:STDOUT: %C.f79: type = class_type @C.1 [concrete]
// CHECK:STDOUT: %F1.type: type = fn_type @F1 [concrete]
// CHECK:STDOUT: %F1: %F1.type = struct_value () [concrete]
// CHECK:STDOUT: %C.9f4: type = class_type @C.2 [concrete]
// CHECK:STDOUT: %F2.type: type = fn_type @F2 [concrete]
// CHECK:STDOUT: %F2: %F2.type = struct_value () [concrete]
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: file {
// CHECK:STDOUT: package: <namespace> = namespace [concrete] {
// CHECK:STDOUT: .C = %C.decl.loc4
// CHECK:STDOUT: .N = %N
// CHECK:STDOUT: }
// CHECK:STDOUT: %C.decl.loc4: type = class_decl @C.1 [concrete = constants.%C.f79] {} {}
// CHECK:STDOUT: %N: <namespace> = namespace [concrete] {
// CHECK:STDOUT: .C = <poisoned>
// CHECK:STDOUT: .F1 = %F1.decl
// CHECK:STDOUT: .N = <poisoned>
// CHECK:STDOUT: .F2 = %F2.decl
// CHECK:STDOUT: }
// CHECK:STDOUT: %F1.decl: %F1.type = fn_decl @F1 [concrete = constants.%F1] {
// CHECK:STDOUT: %x.patt: %C.f79 = binding_pattern x
// CHECK:STDOUT: %x.param_patt: %C.f79 = value_param_pattern %x.patt, runtime_param0
// CHECK:STDOUT: } {
// CHECK:STDOUT: %x.param: %C.f79 = value_param runtime_param0
// CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl.loc4 [concrete = constants.%C.f79]
// CHECK:STDOUT: %x: %C.f79 = bind_name x, %x.param
// CHECK:STDOUT: }
// CHECK:STDOUT: %C.decl.loc18: type = class_decl @C.2 [concrete = constants.%C.9f4] {} {}
// CHECK:STDOUT: %F2.decl: %F2.type = fn_decl @F2 [concrete = constants.%F2] {
// CHECK:STDOUT: %x.patt: <error> = binding_pattern x
// CHECK:STDOUT: %x.param_patt: <error> = value_param_pattern %x.patt, runtime_param0 [concrete = <error>]
// CHECK:STDOUT: } {
// CHECK:STDOUT: %x.param: <error> = value_param runtime_param0
// CHECK:STDOUT: %.1: <error> = splice_block <error> [concrete = <error>] {
// CHECK:STDOUT: %N.ref: <namespace> = name_ref N, file.%N [concrete = file.%N]
// CHECK:STDOUT: %C.ref: <error> = name_ref C, <error> [concrete = <error>]
// CHECK:STDOUT: }
// CHECK:STDOUT: %x: <error> = bind_name x, %x.param
// CHECK:STDOUT: }
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: class @C.1;
// CHECK:STDOUT:
// CHECK:STDOUT: class @C.2;
// CHECK:STDOUT:
// CHECK:STDOUT: fn @F1(%x.param_patt: %C.f79);
// CHECK:STDOUT:
// CHECK:STDOUT: fn @F2(%x.param_patt: <error>);
// CHECK:STDOUT:
// CHECK:STDOUT: --- fail_alias.carbon
// CHECK:STDOUT:
// CHECK:STDOUT: constants {
// CHECK:STDOUT: %C: type = class_type @C [concrete]
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: file {
// CHECK:STDOUT: package: <namespace> = namespace [concrete] {
// CHECK:STDOUT: .C = %C.decl
// CHECK:STDOUT: .N = %N
// CHECK:STDOUT: }
// CHECK:STDOUT: %C.decl: type = class_decl @C [concrete = constants.%C] {} {}
// CHECK:STDOUT: %N: <namespace> = namespace [concrete] {
// CHECK:STDOUT: .C = <poisoned>
// CHECK:STDOUT: }
// CHECK:STDOUT: %C.ref: type = name_ref C, %C.decl [concrete = constants.%C]
// CHECK:STDOUT: %C: type = bind_alias C, %C.decl [concrete = constants.%C]
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: class @C;
// CHECK:STDOUT:
// CHECK:STDOUT: --- fail_poison_multiple_scopes.carbon
// CHECK:STDOUT:
// CHECK:STDOUT: constants {
// CHECK:STDOUT: %C1.26b: type = class_type @C1.1 [concrete]
// CHECK:STDOUT: %C2: type = class_type @C2 [concrete]
// CHECK:STDOUT: %C3: type = class_type @C3 [concrete]
// CHECK:STDOUT: %C4: type = class_type @C4 [concrete]
// CHECK:STDOUT: %F.type: type = fn_type @F [concrete]
// CHECK:STDOUT: %F: %F.type = struct_value () [concrete]
// CHECK:STDOUT: %C1.d8b: type = class_type @C1.2 [concrete]
// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete]
// CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %empty_struct_type [concrete]
// CHECK:STDOUT: %C1.a31: type = class_type @C1.3 [concrete]
// CHECK:STDOUT: %C1.f31: type = class_type @C1.4 [concrete]
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: file {
// CHECK:STDOUT: package: <namespace> = namespace [concrete] {
// CHECK:STDOUT: .C1 = %C1.decl
// CHECK:STDOUT: .C2 = %C2.decl
// CHECK:STDOUT: }
// CHECK:STDOUT: %C1.decl: type = class_decl @C1.1 [concrete = constants.%C1.26b] {} {}
// CHECK:STDOUT: %C2.decl: type = class_decl @C2 [concrete = constants.%C2] {} {}
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: class @C1.1;
// CHECK:STDOUT:
// CHECK:STDOUT: class @C2 {
// CHECK:STDOUT: %C3.decl: type = class_decl @C3 [concrete = constants.%C3] {} {}
// CHECK:STDOUT: %C1.decl: type = class_decl @C1.4 [concrete = constants.%C1.f31] {} {}
// CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %empty_struct_type [concrete = constants.%complete_type]
// CHECK:STDOUT: complete_type_witness = %complete_type
// CHECK:STDOUT:
// CHECK:STDOUT: !members:
// CHECK:STDOUT: .Self = constants.%C2
// CHECK:STDOUT: .C3 = %C3.decl
// CHECK:STDOUT: .C1 = <poisoned>
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: class @C3 {
// CHECK:STDOUT: %C4.decl: type = class_decl @C4 [concrete = constants.%C4] {} {}
// CHECK:STDOUT: %C1.decl: type = class_decl @C1.3 [concrete = constants.%C1.a31] {} {}
// CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %empty_struct_type [concrete = constants.%complete_type]
// CHECK:STDOUT: complete_type_witness = %complete_type
// CHECK:STDOUT:
// CHECK:STDOUT: !members:
// CHECK:STDOUT: .Self = constants.%C3
// CHECK:STDOUT: .C4 = %C4.decl
// CHECK:STDOUT: .C1 = <poisoned>
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: class @C4 {
// CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [concrete = constants.%F] {
// CHECK:STDOUT: %x.patt: %C1.26b = binding_pattern x
// CHECK:STDOUT: %x.param_patt: %C1.26b = value_param_pattern %x.patt, runtime_param0
// CHECK:STDOUT: } {
// CHECK:STDOUT: %x.param: %C1.26b = value_param runtime_param0
// CHECK:STDOUT: %C1.ref: type = name_ref C1, file.%C1.decl [concrete = constants.%C1.26b]
// CHECK:STDOUT: %x: %C1.26b = bind_name x, %x.param
// CHECK:STDOUT: }
// CHECK:STDOUT: %C1.decl: type = class_decl @C1.2 [concrete = constants.%C1.d8b] {} {}
// CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %empty_struct_type [concrete = constants.%complete_type]
// CHECK:STDOUT: complete_type_witness = %complete_type
// CHECK:STDOUT:
// CHECK:STDOUT: !members:
// CHECK:STDOUT: .Self = constants.%C4
// CHECK:STDOUT: .C1 = <poisoned>
// CHECK:STDOUT: .F = %F.decl
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: class @C1.2;
// CHECK:STDOUT:
// CHECK:STDOUT: class @C1.3;
// CHECK:STDOUT:
// CHECK:STDOUT: class @C1.4;
// CHECK:STDOUT:
// CHECK:STDOUT: fn @F(%x.param_patt: %C1.26b);
// CHECK:STDOUT:
// CHECK:STDOUT: --- ignored_poison_in_import.carbon
// CHECK:STDOUT:
// CHECK:STDOUT: constants {
// CHECK:STDOUT: %C: type = class_type @C [concrete]
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: imports {
// CHECK:STDOUT: %Main.C = import_ref Main//poison, C, unloaded
// CHECK:STDOUT: %Main.N: <namespace> = import_ref Main//poison, N, loaded
// CHECK:STDOUT: %N: <namespace> = namespace %Main.N, [concrete] {
// CHECK:STDOUT: .F = %Main.F
// CHECK:STDOUT: .C = file.%C.decl
// CHECK:STDOUT: }
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: file {
// CHECK:STDOUT: package: <namespace> = namespace [concrete] {
// CHECK:STDOUT: .C = imports.%Main.C
// CHECK:STDOUT: .N = imports.%N
// CHECK:STDOUT: }
// CHECK:STDOUT: %default.import = import <none>
// CHECK:STDOUT: %C.decl: type = class_decl @C [concrete = constants.%C] {} {}
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: class @C;
// CHECK:STDOUT:
// CHECK:STDOUT: --- poison.impl.carbon
// CHECK:STDOUT:
// CHECK:STDOUT: constants {
// CHECK:STDOUT: %C: type = class_type @C [concrete]
// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete]
// CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %empty_struct_type [concrete]
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: imports {
// CHECK:STDOUT: %Main.C = import_ref Main//poison, C, unloaded
// CHECK:STDOUT: %Main.N: <namespace> = import_ref Main//poison, N, loaded
// CHECK:STDOUT: %N: <namespace> = namespace %Main.N, [concrete] {
// CHECK:STDOUT: .F = %Main.F
// CHECK:STDOUT: .C = file.%C.decl
// CHECK:STDOUT: }
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: file {
// CHECK:STDOUT: package: <namespace> = namespace [concrete] {
// CHECK:STDOUT: .C = imports.%Main.C
// CHECK:STDOUT: .N = imports.%N
// CHECK:STDOUT: }
// CHECK:STDOUT: %default.import.loc2_6.1 = import <none>
// CHECK:STDOUT: %default.import.loc2_6.2 = import <none>
// CHECK:STDOUT: %C.decl: type = class_decl @C [concrete = constants.%C] {} {}
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: class @C {
// CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %empty_struct_type [concrete = constants.%complete_type]
// CHECK:STDOUT: complete_type_witness = %complete_type
// CHECK:STDOUT:
// CHECK:STDOUT: !members:
// CHECK:STDOUT: .Self = constants.%C
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: --- fail_poison_when_lookup_fails.carbon
// CHECK:STDOUT:
// CHECK:STDOUT: constants {
// CHECK:STDOUT: %F.type: type = fn_type @F [concrete]
// CHECK:STDOUT: %F: %F.type = struct_value () [concrete]
// CHECK:STDOUT: %C.f79: type = class_type @C.1 [concrete]
// CHECK:STDOUT: %C.9f4: type = class_type @C.2 [concrete]
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: file {
// CHECK:STDOUT: package: <namespace> = namespace [concrete] {
// CHECK:STDOUT: .N = %N
// CHECK:STDOUT: .C = <poisoned>
// CHECK:STDOUT: }
// CHECK:STDOUT: %N: <namespace> = namespace [concrete] {
// CHECK:STDOUT: .C = <poisoned>
// CHECK:STDOUT: .F = %F.decl
// CHECK:STDOUT: }
// CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [concrete = constants.%F] {
// CHECK:STDOUT: %x.patt: <error> = binding_pattern x
// CHECK:STDOUT: %x.param_patt: <error> = value_param_pattern %x.patt, runtime_param0 [concrete = <error>]
// CHECK:STDOUT: } {
// CHECK:STDOUT: %x.param: <error> = value_param runtime_param0
// CHECK:STDOUT: %C.ref: <error> = name_ref C, <error> [concrete = <error>]
// CHECK:STDOUT: %x: <error> = bind_name x, %x.param
// CHECK:STDOUT: }
// CHECK:STDOUT: %C.decl.loc23: type = class_decl @C.1 [concrete = constants.%C.f79] {} {}
// CHECK:STDOUT: %C.decl.loc28: type = class_decl @C.2 [concrete = constants.%C.9f4] {} {}
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: class @C.1;
// CHECK:STDOUT:
// CHECK:STDOUT: class @C.2;
// CHECK:STDOUT:
// CHECK:STDOUT: fn @F(%x.param_patt: <error>);
// CHECK:STDOUT:
// CHECK:STDOUT: --- fail_poison_with_lexical_result.carbon
// CHECK:STDOUT:
// CHECK:STDOUT: constants {
// CHECK:STDOUT: %F.type: type = fn_type @F [concrete]
// CHECK:STDOUT: %F: %F.type = struct_value () [concrete]
// CHECK:STDOUT: %C1.138: type = class_type @C1.1 [concrete]
// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete]
// CHECK:STDOUT: %complete_type.357: <witness> = complete_type_witness %empty_struct_type [concrete]
// CHECK:STDOUT: %C2: type = class_type @C2 [concrete]
// CHECK:STDOUT: %C2.elem: type = unbound_element_type %C2, %C1.138 [concrete]
// CHECK:STDOUT: %C1.46c: type = class_type @C1.2 [concrete]
// CHECK:STDOUT: %struct_type.v: type = struct_type {.v: %C1.138} [concrete]
// CHECK:STDOUT: %complete_type.fb7: <witness> = complete_type_witness %struct_type.v [concrete]
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: file {
// CHECK:STDOUT: package: <namespace> = namespace [concrete] {
// CHECK:STDOUT: .F = %F.decl
// CHECK:STDOUT: }
// CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [concrete = constants.%F] {} {}
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: class @C1.1 {
// CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %empty_struct_type [concrete = constants.%complete_type.357]
// CHECK:STDOUT: complete_type_witness = %complete_type
// CHECK:STDOUT:
// CHECK:STDOUT: !members:
// CHECK:STDOUT: .Self = constants.%C1.138
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: class @C2 {
// CHECK:STDOUT: %.loc11_10: %C2.elem = field_decl v, element0 [concrete]
// CHECK:STDOUT: name_binding_decl {
// CHECK:STDOUT: %.loc11_5: %C2.elem = var_pattern %.loc11_10
// CHECK:STDOUT: }
// CHECK:STDOUT: %.var: ref %C2.elem = var <none>
// CHECK:STDOUT: %C1.decl: type = class_decl @C1.2 [concrete = constants.%C1.46c] {} {}
// CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %struct_type.v [concrete = constants.%complete_type.fb7]
// CHECK:STDOUT: complete_type_witness = %complete_type
// CHECK:STDOUT:
// CHECK:STDOUT: !members:
// CHECK:STDOUT: .Self = constants.%C2
// CHECK:STDOUT: .C1 = <poisoned>
// CHECK:STDOUT: .v = %.loc11_10
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: class @C1.2;
// CHECK:STDOUT:
// CHECK:STDOUT: fn @F() {
// CHECK:STDOUT: !entry:
// CHECK:STDOUT: %C1.decl: type = class_decl @C1.1 [concrete = constants.%C1.138] {} {}
// CHECK:STDOUT: %C2.decl: type = class_decl @C2 [concrete = constants.%C2] {} {}
// CHECK:STDOUT: return
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: --- fail_declare_data_member_after_poison.carbon
// CHECK:STDOUT:
// CHECK:STDOUT: constants {
// CHECK:STDOUT: %C1: type = class_type @C1 [concrete]
// CHECK:STDOUT: %C2.311: type = class_type @C2.1 [concrete]
// CHECK:STDOUT: %F.type: type = fn_type @F [concrete]
// CHECK:STDOUT: %F: %F.type = struct_value () [concrete]
// CHECK:STDOUT: %C2.0a0: type = class_type @C2.2 [concrete]
// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete]
// CHECK:STDOUT: %complete_type.357: <witness> = complete_type_witness %empty_struct_type [concrete]
// CHECK:STDOUT: %C2.elem: type = unbound_element_type %C2.311, %C2.0a0 [concrete]
// CHECK:STDOUT: %struct_type.C1: type = struct_type {.C1: %C2.0a0} [concrete]
// CHECK:STDOUT: %complete_type.979: <witness> = complete_type_witness %struct_type.C1 [concrete]
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: file {
// CHECK:STDOUT: package: <namespace> = namespace [concrete] {
// CHECK:STDOUT: .C1 = %C1.decl
// CHECK:STDOUT: .C2 = %C2.decl
// CHECK:STDOUT: }
// CHECK:STDOUT: %C1.decl: type = class_decl @C1 [concrete = constants.%C1] {} {}
// CHECK:STDOUT: %C2.decl: type = class_decl @C2.1 [concrete = constants.%C2.311] {} {}
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: class @C1;
// CHECK:STDOUT:
// CHECK:STDOUT: class @C2.1 {
// CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [concrete = constants.%F] {
// 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 [concrete = constants.%C1]
// CHECK:STDOUT: %x: %C1 = bind_name x, %x.param
// CHECK:STDOUT: }
// CHECK:STDOUT: %C2.decl: type = class_decl @C2.2 [concrete = constants.%C2.0a0] {} {}
// CHECK:STDOUT: %.loc19_9: %C2.elem = field_decl C1, element0 [concrete]
// CHECK:STDOUT: name_binding_decl {
// CHECK:STDOUT: %.loc19_3: %C2.elem = var_pattern %.loc19_9
// CHECK:STDOUT: }
// CHECK:STDOUT: %.var: ref %C2.elem = var <none>
// CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %struct_type.C1 [concrete = constants.%complete_type.979]
// CHECK:STDOUT: complete_type_witness = %complete_type
// CHECK:STDOUT:
// CHECK:STDOUT: !members:
// CHECK:STDOUT: .Self = constants.%C2.311
// CHECK:STDOUT: .C1 = <poisoned>
// CHECK:STDOUT: .F = %F.decl
// CHECK:STDOUT: .C2 = %C2.decl
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: class @C2.2 {
// CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %empty_struct_type [concrete = constants.%complete_type.357]
// CHECK:STDOUT: complete_type_witness = %complete_type
// CHECK:STDOUT:
// CHECK:STDOUT: !members:
// CHECK:STDOUT: .Self = constants.%C2.0a0
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: fn @F(%x.param_patt: %C1);
// CHECK:STDOUT:
// CHECK:STDOUT: --- fail_extend_poison_class_members.carbon
// CHECK:STDOUT:
// CHECK:STDOUT: constants {
// CHECK:STDOUT: %B.fa3: type = class_type @B.2 [concrete]
// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete]
// CHECK:STDOUT: %complete_type.357: <witness> = complete_type_witness %empty_struct_type [concrete]
// CHECK:STDOUT: %C: type = class_type @C [concrete]
// CHECK:STDOUT: %C.elem: type = unbound_element_type %C, %B.fa3 [concrete]
// CHECK:STDOUT: %B.type: type = fn_type @B.1 [concrete]
// CHECK:STDOUT: %B.489: %B.type = struct_value () [concrete]
// CHECK:STDOUT: %struct_type.base: type = struct_type {.base: %B.fa3} [concrete]
// CHECK:STDOUT: %complete_type.98e: <witness> = complete_type_witness %struct_type.base [concrete]
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: file {
// CHECK:STDOUT: package: <namespace> = namespace [concrete] {
// CHECK:STDOUT: .B = %B.decl
// CHECK:STDOUT: .C = %C.decl
// CHECK:STDOUT: }
// CHECK:STDOUT: %B.decl: type = class_decl @B.2 [concrete = constants.%B.fa3] {} {}
// CHECK:STDOUT: %C.decl: type = class_decl @C [concrete = constants.%C] {} {}
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: class @B.2 {
// CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %empty_struct_type [concrete = constants.%complete_type.357]
// CHECK:STDOUT: complete_type_witness = %complete_type
// CHECK:STDOUT:
// CHECK:STDOUT: !members:
// CHECK:STDOUT: .Self = constants.%B.fa3
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: class @C {
// CHECK:STDOUT: %B.ref: type = name_ref B, file.%B.decl [concrete = constants.%B.fa3]
// CHECK:STDOUT: %.loc10: %C.elem = base_decl %B.ref, element0 [concrete]
// CHECK:STDOUT: %B.decl: %B.type = fn_decl @B.1 [concrete = constants.%B.489] {} {}
// CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %struct_type.base [concrete = constants.%complete_type.98e]
// CHECK:STDOUT: complete_type_witness = %complete_type
// CHECK:STDOUT:
// CHECK:STDOUT: !members:
// CHECK:STDOUT: .Self = constants.%C
// CHECK:STDOUT: .B = <poisoned>
// CHECK:STDOUT: .base = %.loc10
// CHECK:STDOUT: extend %B.ref
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: fn @B.1();
// CHECK:STDOUT:
@@ -2,6 +2,8 @@
// Exceptions. See /LICENSE for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
// EXTRA-ARGS: --no-dump-sem-ir
//
// 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
@@ -222,403 +224,3 @@ fn F1() {
fn F2();
}
}
// CHECK:STDOUT: --- no_poison.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: %C2: type = class_type @C2 [concrete]
// CHECK:STDOUT: %F1.type.75d: type = fn_type @F1.1 [concrete]
// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete]
// CHECK:STDOUT: %F1.afe: %F1.type.75d = struct_value () [concrete]
// CHECK:STDOUT: %F1.type.fe6: type = fn_type @F1.2 [concrete]
// CHECK:STDOUT: %F1.cc1: %F1.type.fe6 = struct_value () [concrete]
// CHECK:STDOUT: %TestCall.type: type = fn_type @TestCall [concrete]
// CHECK:STDOUT: %TestCall: %TestCall.type = struct_value () [concrete]
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: file {
// CHECK:STDOUT: package: <namespace> = namespace [concrete] {
// CHECK:STDOUT: .C1 = %C1.decl
// CHECK:STDOUT: .C2 = %C2.decl
// CHECK:STDOUT: .F1 = %F1.decl.loc7
// CHECK:STDOUT: .N = %N
// CHECK:STDOUT: .TestCall = %TestCall.decl
// CHECK:STDOUT: }
// CHECK:STDOUT: %C1.decl: type = class_decl @C1 [concrete = constants.%C1] {} {}
// CHECK:STDOUT: %C2.decl: type = class_decl @C2 [concrete = constants.%C2] {} {}
// CHECK:STDOUT: %F1.decl.loc7: %F1.type.75d = fn_decl @F1.1 [concrete = constants.%F1.afe] {
// 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 [concrete = constants.%C1]
// CHECK:STDOUT: %x: %C1 = bind_name x, %x.param
// CHECK:STDOUT: }
// CHECK:STDOUT: %N: <namespace> = namespace [concrete] {
// CHECK:STDOUT: .C2 = <poisoned>
// CHECK:STDOUT: .F1 = %F1.decl.loc11
// CHECK:STDOUT: .F2 = %F2
// CHECK:STDOUT: }
// CHECK:STDOUT: %F1.decl.loc11: %F1.type.fe6 = fn_decl @F1.2 [concrete = constants.%F1.cc1] {
// CHECK:STDOUT: %x.patt: %C2 = binding_pattern x
// CHECK:STDOUT: %x.param_patt: %C2 = value_param_pattern %x.patt, runtime_param0
// CHECK:STDOUT: } {
// CHECK:STDOUT: %x.param: %C2 = value_param runtime_param0
// CHECK:STDOUT: %C2.ref: type = name_ref C2, file.%C2.decl [concrete = constants.%C2]
// CHECK:STDOUT: %x: %C2 = bind_name x, %x.param
// CHECK:STDOUT: }
// CHECK:STDOUT: %F1.ref: %F1.type.fe6 = name_ref F1, %F1.decl.loc11 [concrete = constants.%F1.cc1]
// CHECK:STDOUT: %F2: %F1.type.fe6 = bind_alias F2, %F1.decl.loc11 [concrete = constants.%F1.cc1]
// CHECK:STDOUT: %TestCall.decl: %TestCall.type = fn_decl @TestCall [concrete = constants.%TestCall] {
// CHECK:STDOUT: %x.patt: %C2 = binding_pattern x
// CHECK:STDOUT: %x.param_patt: %C2 = value_param_pattern %x.patt, runtime_param0
// CHECK:STDOUT: } {
// CHECK:STDOUT: %x.param: %C2 = value_param runtime_param0
// CHECK:STDOUT: %C2.ref: type = name_ref C2, file.%C2.decl [concrete = constants.%C2]
// CHECK:STDOUT: %x: %C2 = bind_name x, %x.param
// CHECK:STDOUT: }
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: class @C1 {
// CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %empty_struct_type [concrete = constants.%complete_type]
// CHECK:STDOUT: complete_type_witness = %complete_type
// CHECK:STDOUT:
// CHECK:STDOUT: !members:
// CHECK:STDOUT: .Self = constants.%C1
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: class @C2 {
// CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %empty_struct_type [concrete = constants.%complete_type]
// CHECK:STDOUT: complete_type_witness = %complete_type
// CHECK:STDOUT:
// CHECK:STDOUT: !members:
// CHECK:STDOUT: .Self = constants.%C2
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: fn @F1.1(%x.param_patt: %C1);
// CHECK:STDOUT:
// CHECK:STDOUT: fn @F1.2(%x.param_patt: %C2);
// CHECK:STDOUT:
// CHECK:STDOUT: fn @TestCall(%x.param_patt: %C2) {
// CHECK:STDOUT: !entry:
// CHECK:STDOUT: %N.ref: <namespace> = name_ref N, file.%N [concrete = file.%N]
// CHECK:STDOUT: %F2.ref: %F1.type.fe6 = name_ref F2, file.%F2 [concrete = constants.%F1.cc1]
// CHECK:STDOUT: %x.ref: %C2 = name_ref x, %x
// CHECK:STDOUT: %F1.call: init %empty_tuple.type = call %F2.ref(%x.ref)
// CHECK:STDOUT: return
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: --- poison.carbon
// CHECK:STDOUT:
// CHECK:STDOUT: constants {
// CHECK:STDOUT: %F1.type: type = fn_type @F1 [concrete]
// CHECK:STDOUT: %F1: %F1.type = struct_value () [concrete]
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: file {
// CHECK:STDOUT: package: <namespace> = namespace [concrete] {
// CHECK:STDOUT: .F1 = %F1.decl
// CHECK:STDOUT: .N = %N
// CHECK:STDOUT: }
// CHECK:STDOUT: %F1.decl: %F1.type = fn_decl @F1 [concrete = constants.%F1] {} {}
// CHECK:STDOUT: %N: <namespace> = namespace [concrete] {
// CHECK:STDOUT: .F1 = <poisoned>
// CHECK:STDOUT: .F2 = %F2
// CHECK:STDOUT: }
// CHECK:STDOUT: %F1.ref: %F1.type = name_ref F1, %F1.decl [concrete = constants.%F1]
// CHECK:STDOUT: %F2: %F1.type = bind_alias F2, %F1.decl [concrete = constants.%F1]
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: fn @F1();
// CHECK:STDOUT:
// CHECK:STDOUT: --- fail_declare_after_poison.carbon
// CHECK:STDOUT:
// CHECK:STDOUT: constants {
// CHECK:STDOUT: %F1.type.75d: type = fn_type @F1.1 [concrete]
// CHECK:STDOUT: %F1.afe: %F1.type.75d = struct_value () [concrete]
// CHECK:STDOUT: %F1.type.fe6: type = fn_type @F1.2 [concrete]
// CHECK:STDOUT: %F1.cc1: %F1.type.fe6 = struct_value () [concrete]
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: file {
// CHECK:STDOUT: package: <namespace> = namespace [concrete] {
// CHECK:STDOUT: .F1 = %F1.decl.loc4
// CHECK:STDOUT: .N = %N
// CHECK:STDOUT: }
// CHECK:STDOUT: %F1.decl.loc4: %F1.type.75d = fn_decl @F1.1 [concrete = constants.%F1.afe] {} {}
// CHECK:STDOUT: %N: <namespace> = namespace [concrete] {
// CHECK:STDOUT: .F1 = <poisoned>
// CHECK:STDOUT: .F2 = %F2
// CHECK:STDOUT: }
// CHECK:STDOUT: %F1.ref: %F1.type.75d = name_ref F1, %F1.decl.loc4 [concrete = constants.%F1.afe]
// CHECK:STDOUT: %F2: %F1.type.75d = bind_alias F2, %F1.decl.loc4 [concrete = constants.%F1.afe]
// CHECK:STDOUT: %F1.decl.loc18: %F1.type.fe6 = fn_decl @F1.2 [concrete = constants.%F1.cc1] {} {}
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: fn @F1.1();
// CHECK:STDOUT:
// CHECK:STDOUT: fn @F1.2();
// CHECK:STDOUT:
// CHECK:STDOUT: --- fail_use_poison.carbon
// CHECK:STDOUT:
// CHECK:STDOUT: constants {
// CHECK:STDOUT: %F1.type: type = fn_type @F1 [concrete]
// CHECK:STDOUT: %F1: %F1.type = struct_value () [concrete]
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: file {
// CHECK:STDOUT: package: <namespace> = namespace [concrete] {
// CHECK:STDOUT: .F1 = %F1.decl
// CHECK:STDOUT: .N = %N
// CHECK:STDOUT: }
// CHECK:STDOUT: %F1.decl: %F1.type = fn_decl @F1 [concrete = constants.%F1] {} {}
// CHECK:STDOUT: %N: <namespace> = namespace [concrete] {
// CHECK:STDOUT: .F1 = <poisoned>
// CHECK:STDOUT: .F2 = %F2
// CHECK:STDOUT: .N = <poisoned>
// CHECK:STDOUT: .F3 = %F3
// CHECK:STDOUT: }
// CHECK:STDOUT: %F1.ref.loc8: %F1.type = name_ref F1, %F1.decl [concrete = constants.%F1]
// CHECK:STDOUT: %F2: %F1.type = bind_alias F2, %F1.decl [concrete = constants.%F1]
// CHECK:STDOUT: %N.ref: <namespace> = name_ref N, %N [concrete = %N]
// CHECK:STDOUT: %F1.ref.loc14: <error> = name_ref F1, <error> [concrete = <error>]
// CHECK:STDOUT: %F3: <error> = bind_alias F3, <error> [concrete = <error>]
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: fn @F1();
// CHECK:STDOUT:
// CHECK:STDOUT: --- fail_use_declaration_after_poison.carbon
// CHECK:STDOUT:
// CHECK:STDOUT: constants {
// CHECK:STDOUT: %F1.type.75d: type = fn_type @F1.1 [concrete]
// CHECK:STDOUT: %F1.afe: %F1.type.75d = struct_value () [concrete]
// CHECK:STDOUT: %F1.type.fe6: type = fn_type @F1.2 [concrete]
// CHECK:STDOUT: %F1.cc1: %F1.type.fe6 = struct_value () [concrete]
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: file {
// CHECK:STDOUT: package: <namespace> = namespace [concrete] {
// CHECK:STDOUT: .F1 = %F1.decl.loc4
// CHECK:STDOUT: .N = %N
// CHECK:STDOUT: }
// CHECK:STDOUT: %F1.decl.loc4: %F1.type.75d = fn_decl @F1.1 [concrete = constants.%F1.afe] {} {}
// CHECK:STDOUT: %N: <namespace> = namespace [concrete] {
// CHECK:STDOUT: .F1 = <poisoned>
// CHECK:STDOUT: .F2 = %F2
// CHECK:STDOUT: .N = <poisoned>
// CHECK:STDOUT: .F3 = %F3
// CHECK:STDOUT: }
// CHECK:STDOUT: %F1.ref.loc11: %F1.type.75d = name_ref F1, %F1.decl.loc4 [concrete = constants.%F1.afe]
// CHECK:STDOUT: %F2: %F1.type.75d = bind_alias F2, %F1.decl.loc4 [concrete = constants.%F1.afe]
// CHECK:STDOUT: %F1.decl.loc18: %F1.type.fe6 = fn_decl @F1.2 [concrete = constants.%F1.cc1] {} {}
// CHECK:STDOUT: %N.ref: <namespace> = name_ref N, %N [concrete = %N]
// CHECK:STDOUT: %F1.ref.loc26: <error> = name_ref F1, <error> [concrete = <error>]
// CHECK:STDOUT: %F3: <error> = bind_alias F3, <error> [concrete = <error>]
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: fn @F1.1();
// CHECK:STDOUT:
// CHECK:STDOUT: fn @F1.2();
// CHECK:STDOUT:
// CHECK:STDOUT: --- fail_poison_multiple_scopes.carbon
// CHECK:STDOUT:
// CHECK:STDOUT: constants {
// CHECK:STDOUT: %F1.type.75d: type = fn_type @F1.1 [concrete]
// CHECK:STDOUT: %F1.afe: %F1.type.75d = struct_value () [concrete]
// CHECK:STDOUT: %F1.type.1f8: type = fn_type @F1.2 [concrete]
// CHECK:STDOUT: %F1.19a: %F1.type.1f8 = struct_value () [concrete]
// CHECK:STDOUT: %F1.type.73a: type = fn_type @F1.3 [concrete]
// CHECK:STDOUT: %F1.727: %F1.type.73a = struct_value () [concrete]
// CHECK:STDOUT: %F1.type.fe3: type = fn_type @F1.4 [concrete]
// CHECK:STDOUT: %F1.6a8: %F1.type.fe3 = struct_value () [concrete]
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: file {
// CHECK:STDOUT: package: <namespace> = namespace [concrete] {
// CHECK:STDOUT: .F1 = %F1.decl.loc4
// CHECK:STDOUT: .N1 = %N1
// CHECK:STDOUT: }
// CHECK:STDOUT: %F1.decl.loc4: %F1.type.75d = fn_decl @F1.1 [concrete = constants.%F1.afe] {} {}
// CHECK:STDOUT: %N1: <namespace> = namespace [concrete] {
// CHECK:STDOUT: .N2 = %N2
// CHECK:STDOUT: .F1 = <poisoned>
// CHECK:STDOUT: }
// CHECK:STDOUT: %N2: <namespace> = namespace [concrete] {
// CHECK:STDOUT: .N3 = %N3
// CHECK:STDOUT: .F1 = <poisoned>
// CHECK:STDOUT: }
// CHECK:STDOUT: %N3: <namespace> = namespace [concrete] {
// CHECK:STDOUT: .F1 = <poisoned>
// CHECK:STDOUT: .F2 = %F2
// CHECK:STDOUT: }
// CHECK:STDOUT: %F1.ref: %F1.type.75d = name_ref F1, %F1.decl.loc4 [concrete = constants.%F1.afe]
// CHECK:STDOUT: %F2: %F1.type.75d = bind_alias F2, %F1.decl.loc4 [concrete = constants.%F1.afe]
// CHECK:STDOUT: %F1.decl.loc25: %F1.type.1f8 = fn_decl @F1.2 [concrete = constants.%F1.19a] {} {}
// CHECK:STDOUT: %F1.decl.loc33: %F1.type.73a = fn_decl @F1.3 [concrete = constants.%F1.727] {} {}
// CHECK:STDOUT: %F1.decl.loc38: %F1.type.fe3 = fn_decl @F1.4 [concrete = constants.%F1.6a8] {} {}
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: fn @F1.1();
// CHECK:STDOUT:
// CHECK:STDOUT: fn @F1.2();
// CHECK:STDOUT:
// CHECK:STDOUT: fn @F1.3();
// CHECK:STDOUT:
// CHECK:STDOUT: fn @F1.4();
// CHECK:STDOUT:
// CHECK:STDOUT: --- fail_alias.carbon
// CHECK:STDOUT:
// CHECK:STDOUT: constants {
// CHECK:STDOUT: %F.type: type = fn_type @F [concrete]
// CHECK:STDOUT: %F: %F.type = struct_value () [concrete]
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: file {
// CHECK:STDOUT: package: <namespace> = namespace [concrete] {
// CHECK:STDOUT: .F = %F.decl
// CHECK:STDOUT: .N = %N
// CHECK:STDOUT: }
// CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [concrete = constants.%F] {} {}
// CHECK:STDOUT: %N: <namespace> = namespace [concrete] {
// CHECK:STDOUT: .F = <poisoned>
// CHECK:STDOUT: }
// CHECK:STDOUT: %F.ref: %F.type = name_ref F, %F.decl [concrete = constants.%F]
// CHECK:STDOUT: %F: %F.type = bind_alias F, %F.decl [concrete = constants.%F]
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: fn @F();
// CHECK:STDOUT:
// CHECK:STDOUT: --- ignored_poison_in_import.carbon
// CHECK:STDOUT:
// CHECK:STDOUT: constants {
// CHECK:STDOUT: %F1.type: type = fn_type @F1 [concrete]
// CHECK:STDOUT: %F1: %F1.type = struct_value () [concrete]
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: imports {
// CHECK:STDOUT: %Main.F1 = import_ref Main//poison, F1, unloaded
// CHECK:STDOUT: %Main.N: <namespace> = import_ref Main//poison, N, loaded
// CHECK:STDOUT: %N: <namespace> = namespace %Main.N, [concrete] {
// CHECK:STDOUT: .F2 = %Main.F2
// CHECK:STDOUT: .F1 = file.%F1.decl
// CHECK:STDOUT: }
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: file {
// CHECK:STDOUT: package: <namespace> = namespace [concrete] {
// CHECK:STDOUT: .F1 = imports.%Main.F1
// CHECK:STDOUT: .N = imports.%N
// CHECK:STDOUT: }
// CHECK:STDOUT: %default.import = import <none>
// CHECK:STDOUT: %F1.decl: %F1.type = fn_decl @F1 [concrete = constants.%F1] {} {}
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: fn @F1();
// CHECK:STDOUT:
// CHECK:STDOUT: --- poison.impl.carbon
// CHECK:STDOUT:
// CHECK:STDOUT: constants {
// CHECK:STDOUT: %F1.type: type = fn_type @F1 [concrete]
// CHECK:STDOUT: %F1: %F1.type = struct_value () [concrete]
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: imports {
// CHECK:STDOUT: %Main.F1 = import_ref Main//poison, F1, unloaded
// CHECK:STDOUT: %Main.N: <namespace> = import_ref Main//poison, N, loaded
// CHECK:STDOUT: %N: <namespace> = namespace %Main.N, [concrete] {
// CHECK:STDOUT: .F2 = %Main.F2
// CHECK:STDOUT: .F1 = file.%F1.decl
// CHECK:STDOUT: }
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: file {
// CHECK:STDOUT: package: <namespace> = namespace [concrete] {
// CHECK:STDOUT: .F1 = imports.%Main.F1
// CHECK:STDOUT: .N = imports.%N
// CHECK:STDOUT: }
// CHECK:STDOUT: %default.import.loc2_6.1 = import <none>
// CHECK:STDOUT: %default.import.loc2_6.2 = import <none>
// CHECK:STDOUT: %F1.decl: %F1.type = fn_decl @F1 [concrete = constants.%F1] {} {}
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: fn @F1() {
// CHECK:STDOUT: !entry:
// CHECK:STDOUT: return
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: --- fail_poison_when_lookup_fails.carbon
// CHECK:STDOUT:
// CHECK:STDOUT: constants {
// CHECK:STDOUT: %F1.type.75d: type = fn_type @F1.1 [concrete]
// CHECK:STDOUT: %F1.afe: %F1.type.75d = struct_value () [concrete]
// CHECK:STDOUT: %F1.type.fe6: type = fn_type @F1.2 [concrete]
// CHECK:STDOUT: %F1.cc1: %F1.type.fe6 = struct_value () [concrete]
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: file {
// CHECK:STDOUT: package: <namespace> = namespace [concrete] {
// CHECK:STDOUT: .N = %N
// CHECK:STDOUT: .F1 = <poisoned>
// CHECK:STDOUT: }
// CHECK:STDOUT: %N: <namespace> = namespace [concrete] {
// CHECK:STDOUT: .F1 = <poisoned>
// CHECK:STDOUT: .F2 = %F2
// CHECK:STDOUT: }
// CHECK:STDOUT: %F1.ref: <error> = name_ref F1, <error> [concrete = <error>]
// CHECK:STDOUT: %F2: <error> = bind_alias F2, <error> [concrete = <error>]
// CHECK:STDOUT: %F1.decl.loc23: %F1.type.75d = fn_decl @F1.1 [concrete = constants.%F1.afe] {} {}
// CHECK:STDOUT: %F1.decl.loc28: %F1.type.fe6 = fn_decl @F1.2 [concrete = constants.%F1.cc1] {} {}
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: fn @F1.1();
// CHECK:STDOUT:
// CHECK:STDOUT: fn @F1.2();
// CHECK:STDOUT:
// CHECK:STDOUT: --- fail_poison_with_lexical_result.carbon
// CHECK:STDOUT:
// CHECK:STDOUT: constants {
// CHECK:STDOUT: %F1.type: type = fn_type @F1 [concrete]
// CHECK:STDOUT: %F1: %F1.type = struct_value () [concrete]
// CHECK:STDOUT: %F2.type.028: type = fn_type @F2.1 [concrete]
// CHECK:STDOUT: %F2.18a: %F2.type.028 = struct_value () [concrete]
// CHECK:STDOUT: %C: type = class_type @C [concrete]
// CHECK:STDOUT: %F2.type.c9e: type = fn_type @F2.2 [concrete]
// CHECK:STDOUT: %F2.c1c: %F2.type.c9e = struct_value () [concrete]
// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete]
// CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %empty_struct_type [concrete]
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: file {
// CHECK:STDOUT: package: <namespace> = namespace [concrete] {
// CHECK:STDOUT: .F1 = %F1.decl
// CHECK:STDOUT: }
// CHECK:STDOUT: %F1.decl: %F1.type = fn_decl @F1 [concrete = constants.%F1] {} {}
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: class @C {
// CHECK:STDOUT: %F2.ref: %F2.type.028 = name_ref F2, @F1.%F2.decl [concrete = constants.%F2.18a]
// CHECK:STDOUT: %F3: %F2.type.028 = bind_alias F3, @F1.%F2.decl [concrete = constants.%F2.18a]
// CHECK:STDOUT: %F2.decl: %F2.type.c9e = fn_decl @F2.2 [concrete = constants.%F2.c1c] {} {}
// CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %empty_struct_type [concrete = constants.%complete_type]
// CHECK:STDOUT: complete_type_witness = %complete_type
// CHECK:STDOUT:
// CHECK:STDOUT: !members:
// CHECK:STDOUT: .Self = constants.%C
// CHECK:STDOUT: .F2 = <poisoned>
// CHECK:STDOUT: .F3 = %F3
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: fn @F1() {
// CHECK:STDOUT: !entry:
// CHECK:STDOUT: %F2.decl: %F2.type.028 = fn_decl @F2.1 [concrete = constants.%F2.18a] {} {}
// CHECK:STDOUT: %C.decl: type = class_decl @C [concrete = constants.%C] {} {}
// CHECK:STDOUT: return
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: fn @F2.1();
// CHECK:STDOUT:
// CHECK:STDOUT: fn @F2.2();
// CHECK:STDOUT:
@@ -2,6 +2,8 @@
// Exceptions. See /LICENSE for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
// EXTRA-ARGS: --no-dump-sem-ir
//
// AUTOUPDATE
// TIP: To test this file alone, run:
// TIP: bazel test //toolchain/testing:file_test --test_arg=--file_tests=toolchain/check/testdata/impl/no_prelude/name_poisoning.carbon
@@ -53,198 +55,3 @@ class B {
fn B();
}
}
// CHECK:STDOUT: --- using_poisoned_name_in_impl.carbon
// CHECK:STDOUT:
// CHECK:STDOUT: constants {
// CHECK:STDOUT: %I.type: type = facet_type <@I> [concrete]
// CHECK:STDOUT: %Self: %I.type = bind_symbolic_name Self, 0 [symbolic]
// CHECK:STDOUT: %x: %I.type = bind_symbolic_name x, 0 [symbolic]
// CHECK:STDOUT: %x.patt: %I.type = symbolic_binding_pattern x, 0 [symbolic]
// CHECK:STDOUT: %F1.type: type = fn_type @F1 [concrete]
// CHECK:STDOUT: %F1: %F1.type = struct_value () [concrete]
// CHECK:STDOUT: %C: type = class_type @C [concrete]
// CHECK:STDOUT: %impl_witness: <witness> = impl_witness () [concrete]
// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete]
// CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %empty_struct_type [concrete]
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: file {
// CHECK:STDOUT: package: <namespace> = namespace [concrete] {
// CHECK:STDOUT: .I = %I.decl
// CHECK:STDOUT: .N = %N
// CHECK:STDOUT: }
// CHECK:STDOUT: %I.decl: type = interface_decl @I [concrete = constants.%I.type] {} {}
// CHECK:STDOUT: %N: <namespace> = namespace [concrete] {
// CHECK:STDOUT: .I = <poisoned>
// CHECK:STDOUT: .F1 = %F1.decl
// CHECK:STDOUT: .C = %C.decl
// CHECK:STDOUT: }
// CHECK:STDOUT: %F1.decl: %F1.type = fn_decl @F1 [concrete = constants.%F1] {
// CHECK:STDOUT: %x.patt.loc8_9.1: %I.type = symbolic_binding_pattern x, 0 [symbolic = %x.patt.loc8_9.2 (constants.%x.patt)]
// CHECK:STDOUT: %x.param_patt: %I.type = value_param_pattern %x.patt.loc8_9.1, runtime_param<none> [symbolic = %x.patt.loc8_9.2 (constants.%x.patt)]
// CHECK:STDOUT: } {
// CHECK:STDOUT: %x.param: %I.type = value_param runtime_param<none>
// CHECK:STDOUT: %I.ref: type = name_ref I, file.%I.decl [concrete = constants.%I.type]
// CHECK:STDOUT: %x.loc8_9.1: %I.type = bind_symbolic_name x, 0, %x.param [symbolic = %x.loc8_9.2 (constants.%x)]
// CHECK:STDOUT: }
// CHECK:STDOUT: %C.decl: type = class_decl @C [concrete = constants.%C] {} {}
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: interface @I {
// CHECK:STDOUT: %Self: %I.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self]
// CHECK:STDOUT:
// CHECK:STDOUT: !members:
// CHECK:STDOUT: .Self = %Self
// CHECK:STDOUT: witness = ()
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: impl @impl: %Self.ref as %I.ref {
// CHECK:STDOUT: !members:
// CHECK:STDOUT: witness = @C.%impl_witness
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: class @C {
// CHECK:STDOUT: impl_decl @impl [concrete] {} {
// CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%C [concrete = constants.%C]
// CHECK:STDOUT: %I.ref: type = name_ref I, file.%I.decl [concrete = constants.%I.type]
// CHECK:STDOUT: }
// CHECK:STDOUT: %impl_witness: <witness> = impl_witness () [concrete = constants.%impl_witness]
// CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %empty_struct_type [concrete = constants.%complete_type]
// CHECK:STDOUT: complete_type_witness = %complete_type
// CHECK:STDOUT:
// CHECK:STDOUT: !members:
// CHECK:STDOUT: .Self = constants.%C
// CHECK:STDOUT: .I = <poisoned>
// CHECK:STDOUT: extend @impl.%I.ref
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: generic fn @F1(%x.loc8_9.1: %I.type) {
// CHECK:STDOUT: %x.loc8_9.2: %I.type = bind_symbolic_name x, 0 [symbolic = %x.loc8_9.2 (constants.%x)]
// CHECK:STDOUT: %x.patt.loc8_9.2: %I.type = symbolic_binding_pattern x, 0 [symbolic = %x.patt.loc8_9.2 (constants.%x.patt)]
// CHECK:STDOUT:
// CHECK:STDOUT: fn(%x.param_patt: %I.type);
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: specific @F1(constants.%x) {
// CHECK:STDOUT: %x.loc8_9.2 => constants.%x
// CHECK:STDOUT: %x.patt.loc8_9.2 => constants.%x
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: --- fail_impl_function_poisoned.carbon
// CHECK:STDOUT:
// CHECK:STDOUT: constants {
// CHECK:STDOUT: %I.type: type = facet_type <@I> [concrete]
// CHECK:STDOUT: %Self: %I.type = bind_symbolic_name Self, 0 [symbolic]
// CHECK:STDOUT: %Self.as_type: type = facet_access_type %Self [symbolic]
// CHECK:STDOUT: %A.type.edf: type = fn_type @A.1 [concrete]
// CHECK:STDOUT: %A.ab0: %A.type.edf = struct_value () [concrete]
// CHECK:STDOUT: %I.assoc_type: type = assoc_entity_type %I.type [concrete]
// CHECK:STDOUT: %assoc0: %I.assoc_type = assoc_entity element0, @I.%A.decl [concrete]
// CHECK:STDOUT: %B.type.785: type = fn_type @B.1 [concrete]
// CHECK:STDOUT: %B.6d4: %B.type.785 = struct_value () [concrete]
// CHECK:STDOUT: %assoc1: %I.assoc_type = assoc_entity element1, @I.%B.decl [concrete]
// CHECK:STDOUT: %B.fa3: type = class_type @B.3 [concrete]
// CHECK:STDOUT: %impl_witness: <witness> = impl_witness (@impl.%A.decl, <error>) [concrete]
// CHECK:STDOUT: %A.type.9b9: type = fn_type @A.2 [concrete]
// CHECK:STDOUT: %A.71f: %A.type.9b9 = struct_value () [concrete]
// CHECK:STDOUT: %B.type.52d: type = fn_type @B.2 [concrete]
// CHECK:STDOUT: %B.30a: %B.type.52d = struct_value () [concrete]
// CHECK:STDOUT: %I.facet: %I.type = facet_value %B.fa3, %impl_witness [concrete]
// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete]
// CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %empty_struct_type [concrete]
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: file {
// CHECK:STDOUT: package: <namespace> = namespace [concrete] {
// CHECK:STDOUT: .I = %I.decl
// CHECK:STDOUT: .B = %B.decl
// CHECK:STDOUT: }
// CHECK:STDOUT: %I.decl: type = interface_decl @I [concrete = constants.%I.type] {} {}
// CHECK:STDOUT: %B.decl: type = class_decl @B.3 [concrete = constants.%B.fa3] {} {}
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: interface @I {
// CHECK:STDOUT: %Self: %I.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self]
// CHECK:STDOUT: %A.decl: %A.type.edf = fn_decl @A.1 [concrete = constants.%A.ab0] {
// CHECK:STDOUT: %x.patt: @A.1.%Self.as_type.loc5_11.1 (%Self.as_type) = binding_pattern x
// CHECK:STDOUT: %x.param_patt: @A.1.%Self.as_type.loc5_11.1 (%Self.as_type) = value_param_pattern %x.patt, runtime_param0
// CHECK:STDOUT: } {
// CHECK:STDOUT: %x.param: @A.1.%Self.as_type.loc5_11.1 (%Self.as_type) = value_param runtime_param0
// CHECK:STDOUT: %.loc5_11.1: type = splice_block %.loc5_11.2 [symbolic = %Self.as_type.loc5_11.1 (constants.%Self.as_type)] {
// CHECK:STDOUT: %Self.ref: %I.type = name_ref Self, @I.%Self [symbolic = %Self (constants.%Self)]
// CHECK:STDOUT: %Self.as_type.loc5_11.2: type = facet_access_type %Self.ref [symbolic = %Self.as_type.loc5_11.1 (constants.%Self.as_type)]
// CHECK:STDOUT: %.loc5_11.2: type = converted %Self.ref, %Self.as_type.loc5_11.2 [symbolic = %Self.as_type.loc5_11.1 (constants.%Self.as_type)]
// CHECK:STDOUT: }
// CHECK:STDOUT: %x: @A.1.%Self.as_type.loc5_11.1 (%Self.as_type) = bind_name x, %x.param
// CHECK:STDOUT: }
// CHECK:STDOUT: %assoc0: %I.assoc_type = assoc_entity element0, %A.decl [concrete = constants.%assoc0]
// CHECK:STDOUT: %B.decl: %B.type.785 = fn_decl @B.1 [concrete = constants.%B.6d4] {} {}
// CHECK:STDOUT: %assoc1: %I.assoc_type = assoc_entity element1, %B.decl [concrete = constants.%assoc1]
// CHECK:STDOUT:
// CHECK:STDOUT: !members:
// CHECK:STDOUT: .Self = %Self
// CHECK:STDOUT: .A = %assoc0
// CHECK:STDOUT: .B = %assoc1
// CHECK:STDOUT: witness = (%A.decl, %B.decl)
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: impl @impl: %Self.ref as %I.ref {
// CHECK:STDOUT: %A.decl: %A.type.9b9 = fn_decl @A.2 [concrete = constants.%A.71f] {
// CHECK:STDOUT: %x.patt: %B.fa3 = binding_pattern x
// CHECK:STDOUT: %x.param_patt: %B.fa3 = value_param_pattern %x.patt, runtime_param0
// CHECK:STDOUT: } {
// CHECK:STDOUT: %x.param: %B.fa3 = value_param runtime_param0
// CHECK:STDOUT: %B.ref: type = name_ref B, file.%B.decl [concrete = constants.%B.fa3]
// CHECK:STDOUT: %x: %B.fa3 = bind_name x, %x.param
// CHECK:STDOUT: }
// CHECK:STDOUT: %B.decl: %B.type.52d = fn_decl @B.2 [concrete = constants.%B.30a] {} {}
// CHECK:STDOUT:
// CHECK:STDOUT: !members:
// CHECK:STDOUT: .B = <poisoned>
// CHECK:STDOUT: .A = %A.decl
// CHECK:STDOUT: witness = @B.3.%impl_witness
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: class @B.3 {
// CHECK:STDOUT: impl_decl @impl [concrete] {} {
// CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%B.fa3 [concrete = constants.%B.fa3]
// CHECK:STDOUT: %I.ref: type = name_ref I, file.%I.decl [concrete = constants.%I.type]
// CHECK:STDOUT: }
// CHECK:STDOUT: %impl_witness: <witness> = impl_witness (@impl.%A.decl, <error>) [concrete = constants.%impl_witness]
// CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %empty_struct_type [concrete = constants.%complete_type]
// CHECK:STDOUT: complete_type_witness = %complete_type
// CHECK:STDOUT:
// CHECK:STDOUT: !members:
// CHECK:STDOUT: .Self = constants.%B.fa3
// CHECK:STDOUT: .I = <poisoned>
// CHECK:STDOUT: .B = <poisoned>
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: generic fn @A.1(@I.%Self: %I.type) {
// CHECK:STDOUT: %Self: %I.type = bind_symbolic_name Self, 0 [symbolic = %Self (constants.%Self)]
// CHECK:STDOUT: %Self.as_type.loc5_11.1: type = facet_access_type %Self [symbolic = %Self.as_type.loc5_11.1 (constants.%Self.as_type)]
// CHECK:STDOUT:
// CHECK:STDOUT: fn(%x.param_patt: @A.1.%Self.as_type.loc5_11.1 (%Self.as_type));
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: generic fn @B.1(@I.%Self: %I.type) {
// CHECK:STDOUT: fn();
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: fn @A.2(%x.param_patt: %B.fa3);
// CHECK:STDOUT:
// CHECK:STDOUT: fn @B.2();
// CHECK:STDOUT:
// CHECK:STDOUT: specific @A.1(constants.%Self) {
// CHECK:STDOUT: %Self => constants.%Self
// CHECK:STDOUT: %Self.as_type.loc5_11.1 => constants.%Self.as_type
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: specific @B.1(constants.%Self) {}
// CHECK:STDOUT:
// CHECK:STDOUT: specific @A.1(constants.%I.facet) {
// CHECK:STDOUT: %Self => constants.%I.facet
// CHECK:STDOUT: %Self.as_type.loc5_11.1 => constants.%B.fa3
// CHECK:STDOUT: }
// CHECK:STDOUT:
@@ -2,6 +2,8 @@
// Exceptions. See /LICENSE for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
// EXTRA-ARGS: --no-dump-sem-ir
//
// AUTOUPDATE
// TIP: To test this file alone, run:
// TIP: bazel test //toolchain/testing:file_test --test_arg=--file_tests=toolchain/check/testdata/interface/no_prelude/name_poisoning.carbon
@@ -219,658 +221,3 @@ fn F() {
interface I1;
}
}
// CHECK:STDOUT: --- no_poison.carbon
// CHECK:STDOUT:
// CHECK:STDOUT: constants {
// CHECK:STDOUT: %I.type.733: type = facet_type <@I.1> [concrete]
// CHECK:STDOUT: %I.type.4da: type = facet_type <@I.2> [concrete]
// CHECK:STDOUT: %Self: %I.type.4da = bind_symbolic_name Self, 0 [symbolic]
// CHECK:STDOUT: %x: %I.type.4da = bind_symbolic_name x, 0 [symbolic]
// CHECK:STDOUT: %x.patt: %I.type.4da = symbolic_binding_pattern x, 0 [symbolic]
// CHECK:STDOUT: %F.type: type = fn_type @F [concrete]
// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete]
// CHECK:STDOUT: %F: %F.type = struct_value () [concrete]
// CHECK:STDOUT: %TestCall.type: type = fn_type @TestCall [concrete]
// CHECK:STDOUT: %TestCall: %TestCall.type = struct_value () [concrete]
// CHECK:STDOUT: %F.specific_fn: <specific function> = specific_function %F, @F(%x) [symbolic]
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: file {
// CHECK:STDOUT: package: <namespace> = namespace [concrete] {
// CHECK:STDOUT: .I = %I.decl.loc4
// CHECK:STDOUT: .N = %N
// CHECK:STDOUT: .TestCall = %TestCall.decl
// CHECK:STDOUT: }
// CHECK:STDOUT: %I.decl.loc4: type = interface_decl @I.1 [concrete = constants.%I.type.733] {} {}
// CHECK:STDOUT: %N: <namespace> = namespace [concrete] {
// CHECK:STDOUT: .I = %I.decl.loc8
// CHECK:STDOUT: .F = %F.decl
// CHECK:STDOUT: }
// CHECK:STDOUT: %I.decl.loc8: type = interface_decl @I.2 [concrete = constants.%I.type.4da] {} {}
// CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [concrete = constants.%F] {
// CHECK:STDOUT: %x.patt.loc9_8.1: %I.type.4da = symbolic_binding_pattern x, 0 [symbolic = %x.patt.loc9_8.2 (constants.%x.patt)]
// CHECK:STDOUT: %x.param_patt: %I.type.4da = value_param_pattern %x.patt.loc9_8.1, runtime_param<none> [symbolic = %x.patt.loc9_8.2 (constants.%x.patt)]
// CHECK:STDOUT: } {
// CHECK:STDOUT: %x.param: %I.type.4da = value_param runtime_param<none>
// CHECK:STDOUT: %I.ref: type = name_ref I, file.%I.decl.loc8 [concrete = constants.%I.type.4da]
// CHECK:STDOUT: %x.loc9_8.1: %I.type.4da = bind_symbolic_name x, 0, %x.param [symbolic = %x.loc9_8.2 (constants.%x)]
// CHECK:STDOUT: }
// CHECK:STDOUT: %TestCall.decl: %TestCall.type = fn_decl @TestCall [concrete = constants.%TestCall] {
// CHECK:STDOUT: %x.patt.loc11_13.1: %I.type.4da = symbolic_binding_pattern x, 0 [symbolic = %x.patt.loc11_13.2 (constants.%x.patt)]
// CHECK:STDOUT: %x.param_patt: %I.type.4da = value_param_pattern %x.patt.loc11_13.1, runtime_param<none> [symbolic = %x.patt.loc11_13.2 (constants.%x.patt)]
// CHECK:STDOUT: } {
// CHECK:STDOUT: %x.param: %I.type.4da = value_param runtime_param<none>
// CHECK:STDOUT: %.loc11: type = splice_block %I.ref [concrete = constants.%I.type.4da] {
// CHECK:STDOUT: %N.ref.loc11: <namespace> = name_ref N, file.%N [concrete = file.%N]
// CHECK:STDOUT: %I.ref: type = name_ref I, file.%I.decl.loc8 [concrete = constants.%I.type.4da]
// CHECK:STDOUT: }
// CHECK:STDOUT: %x.loc11_13.1: %I.type.4da = bind_symbolic_name x, 0, %x.param [symbolic = %x.loc11_13.2 (constants.%x)]
// CHECK:STDOUT: }
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: interface @I.1;
// CHECK:STDOUT:
// CHECK:STDOUT: interface @I.2 {
// CHECK:STDOUT: %Self: %I.type.4da = bind_symbolic_name Self, 0 [symbolic = constants.%Self]
// CHECK:STDOUT:
// CHECK:STDOUT: !members:
// CHECK:STDOUT: .Self = %Self
// CHECK:STDOUT: witness = ()
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: generic fn @F(%x.loc9_8.1: %I.type.4da) {
// CHECK:STDOUT: %x.loc9_8.2: %I.type.4da = bind_symbolic_name x, 0 [symbolic = %x.loc9_8.2 (constants.%x)]
// CHECK:STDOUT: %x.patt.loc9_8.2: %I.type.4da = symbolic_binding_pattern x, 0 [symbolic = %x.patt.loc9_8.2 (constants.%x.patt)]
// CHECK:STDOUT:
// CHECK:STDOUT: !definition:
// CHECK:STDOUT:
// CHECK:STDOUT: fn(%x.param_patt: %I.type.4da) {
// CHECK:STDOUT: !entry:
// CHECK:STDOUT: return
// CHECK:STDOUT: }
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: generic fn @TestCall(%x.loc11_13.1: %I.type.4da) {
// CHECK:STDOUT: %x.loc11_13.2: %I.type.4da = bind_symbolic_name x, 0 [symbolic = %x.loc11_13.2 (constants.%x)]
// CHECK:STDOUT: %x.patt.loc11_13.2: %I.type.4da = symbolic_binding_pattern x, 0 [symbolic = %x.patt.loc11_13.2 (constants.%x.patt)]
// CHECK:STDOUT:
// CHECK:STDOUT: !definition:
// CHECK:STDOUT: %F.specific_fn.loc13_4.2: <specific function> = specific_function constants.%F, @F(%x.loc11_13.2) [symbolic = %F.specific_fn.loc13_4.2 (constants.%F.specific_fn)]
// CHECK:STDOUT:
// CHECK:STDOUT: fn(%x.param_patt: %I.type.4da) {
// CHECK:STDOUT: !entry:
// CHECK:STDOUT: %N.ref.loc13: <namespace> = name_ref N, file.%N [concrete = file.%N]
// CHECK:STDOUT: %F.ref: %F.type = name_ref F, file.%F.decl [concrete = constants.%F]
// CHECK:STDOUT: %x.ref: %I.type.4da = name_ref x, %x.loc11_13.1 [symbolic = %x.loc11_13.2 (constants.%x)]
// CHECK:STDOUT: %F.specific_fn.loc13_4.1: <specific function> = specific_function %F.ref, @F(constants.%x) [symbolic = %F.specific_fn.loc13_4.2 (constants.%F.specific_fn)]
// CHECK:STDOUT: %F.call: init %empty_tuple.type = call %F.specific_fn.loc13_4.1()
// CHECK:STDOUT: return
// CHECK:STDOUT: }
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: specific @F(constants.%x) {
// CHECK:STDOUT: %x.loc9_8.2 => constants.%x
// CHECK:STDOUT: %x.patt.loc9_8.2 => constants.%x
// CHECK:STDOUT:
// CHECK:STDOUT: !definition:
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: specific @TestCall(constants.%x) {
// CHECK:STDOUT: %x.loc11_13.2 => constants.%x
// CHECK:STDOUT: %x.patt.loc11_13.2 => constants.%x
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: specific @F(@TestCall.%x.loc11_13.2) {}
// CHECK:STDOUT:
// CHECK:STDOUT: --- poison.carbon
// CHECK:STDOUT:
// CHECK:STDOUT: constants {
// CHECK:STDOUT: %I.type: type = facet_type <@I> [concrete]
// CHECK:STDOUT: %x: %I.type = bind_symbolic_name x, 0 [symbolic]
// CHECK:STDOUT: %x.patt: %I.type = symbolic_binding_pattern x, 0 [symbolic]
// CHECK:STDOUT: %F.type: type = fn_type @F [concrete]
// CHECK:STDOUT: %F: %F.type = struct_value () [concrete]
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: file {
// CHECK:STDOUT: package: <namespace> = namespace [concrete] {
// CHECK:STDOUT: .I = %I.decl
// CHECK:STDOUT: .N = %N
// CHECK:STDOUT: }
// CHECK:STDOUT: %I.decl: type = interface_decl @I [concrete = constants.%I.type] {} {}
// CHECK:STDOUT: %N: <namespace> = namespace [concrete] {
// CHECK:STDOUT: .I = <poisoned>
// CHECK:STDOUT: .F = %F.decl
// CHECK:STDOUT: }
// CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [concrete = constants.%F] {
// CHECK:STDOUT: %x.patt.loc8_8.1: %I.type = symbolic_binding_pattern x, 0 [symbolic = %x.patt.loc8_8.2 (constants.%x.patt)]
// CHECK:STDOUT: %x.param_patt: %I.type = value_param_pattern %x.patt.loc8_8.1, runtime_param<none> [symbolic = %x.patt.loc8_8.2 (constants.%x.patt)]
// CHECK:STDOUT: } {
// CHECK:STDOUT: %x.param: %I.type = value_param runtime_param<none>
// CHECK:STDOUT: %I.ref: type = name_ref I, file.%I.decl [concrete = constants.%I.type]
// CHECK:STDOUT: %x.loc8_8.1: %I.type = bind_symbolic_name x, 0, %x.param [symbolic = %x.loc8_8.2 (constants.%x)]
// CHECK:STDOUT: }
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: interface @I;
// CHECK:STDOUT:
// CHECK:STDOUT: generic fn @F(%x.loc8_8.1: %I.type) {
// CHECK:STDOUT: %x.loc8_8.2: %I.type = bind_symbolic_name x, 0 [symbolic = %x.loc8_8.2 (constants.%x)]
// CHECK:STDOUT: %x.patt.loc8_8.2: %I.type = symbolic_binding_pattern x, 0 [symbolic = %x.patt.loc8_8.2 (constants.%x.patt)]
// CHECK:STDOUT:
// CHECK:STDOUT: fn(%x.param_patt: %I.type);
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: specific @F(constants.%x) {
// CHECK:STDOUT: %x.loc8_8.2 => constants.%x
// CHECK:STDOUT: %x.patt.loc8_8.2 => constants.%x
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: --- fail_declare_after_poison.carbon
// CHECK:STDOUT:
// CHECK:STDOUT: constants {
// CHECK:STDOUT: %I.type.733: type = facet_type <@I.1> [concrete]
// CHECK:STDOUT: %x: %I.type.733 = bind_symbolic_name x, 0 [symbolic]
// CHECK:STDOUT: %x.patt: %I.type.733 = symbolic_binding_pattern x, 0 [symbolic]
// CHECK:STDOUT: %F.type: type = fn_type @F [concrete]
// CHECK:STDOUT: %F: %F.type = struct_value () [concrete]
// CHECK:STDOUT: %I.type.4da: type = facet_type <@I.2> [concrete]
// CHECK:STDOUT: %Self: %I.type.4da = bind_symbolic_name Self, 0 [symbolic]
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: file {
// CHECK:STDOUT: package: <namespace> = namespace [concrete] {
// CHECK:STDOUT: .I = %I.decl.loc4
// CHECK:STDOUT: .N = %N
// CHECK:STDOUT: }
// CHECK:STDOUT: %I.decl.loc4: type = interface_decl @I.1 [concrete = constants.%I.type.733] {} {}
// CHECK:STDOUT: %N: <namespace> = namespace [concrete] {
// CHECK:STDOUT: .I = <poisoned>
// CHECK:STDOUT: .F = %F.decl
// CHECK:STDOUT: }
// CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [concrete = constants.%F] {
// CHECK:STDOUT: %x.patt.loc11_8.1: %I.type.733 = symbolic_binding_pattern x, 0 [symbolic = %x.patt.loc11_8.2 (constants.%x.patt)]
// CHECK:STDOUT: %x.param_patt: %I.type.733 = value_param_pattern %x.patt.loc11_8.1, runtime_param<none> [symbolic = %x.patt.loc11_8.2 (constants.%x.patt)]
// CHECK:STDOUT: } {
// CHECK:STDOUT: %x.param: %I.type.733 = value_param runtime_param<none>
// CHECK:STDOUT: %I.ref: type = name_ref I, file.%I.decl.loc4 [concrete = constants.%I.type.733]
// CHECK:STDOUT: %x.loc11_8.1: %I.type.733 = bind_symbolic_name x, 0, %x.param [symbolic = %x.loc11_8.2 (constants.%x)]
// CHECK:STDOUT: }
// CHECK:STDOUT: %I.decl.loc18: type = interface_decl @I.2 [concrete = constants.%I.type.4da] {} {}
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: interface @I.1;
// CHECK:STDOUT:
// CHECK:STDOUT: interface @I.2 {
// CHECK:STDOUT: %Self: %I.type.4da = bind_symbolic_name Self, 0 [symbolic = constants.%Self]
// CHECK:STDOUT:
// CHECK:STDOUT: !members:
// CHECK:STDOUT: .Self = %Self
// CHECK:STDOUT: witness = ()
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: generic fn @F(%x.loc11_8.1: %I.type.733) {
// CHECK:STDOUT: %x.loc11_8.2: %I.type.733 = bind_symbolic_name x, 0 [symbolic = %x.loc11_8.2 (constants.%x)]
// CHECK:STDOUT: %x.patt.loc11_8.2: %I.type.733 = symbolic_binding_pattern x, 0 [symbolic = %x.patt.loc11_8.2 (constants.%x.patt)]
// CHECK:STDOUT:
// CHECK:STDOUT: fn(%x.param_patt: %I.type.733);
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: specific @F(constants.%x) {
// CHECK:STDOUT: %x.loc11_8.2 => constants.%x
// CHECK:STDOUT: %x.patt.loc11_8.2 => constants.%x
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: --- fail_use_poison.carbon
// CHECK:STDOUT:
// CHECK:STDOUT: constants {
// CHECK:STDOUT: %I.type: type = facet_type <@I> [concrete]
// CHECK:STDOUT: %x: %I.type = bind_symbolic_name x, 0 [symbolic]
// CHECK:STDOUT: %x.patt.3ad: %I.type = symbolic_binding_pattern x, 0 [symbolic]
// CHECK:STDOUT: %F1.type: type = fn_type @F1 [concrete]
// CHECK:STDOUT: %F1: %F1.type = struct_value () [concrete]
// CHECK:STDOUT: %x.patt.e01: <error> = symbolic_binding_pattern x, 0 [symbolic]
// CHECK:STDOUT: %F2.type: type = fn_type @F2 [concrete]
// CHECK:STDOUT: %F2: %F2.type = struct_value () [concrete]
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: file {
// CHECK:STDOUT: package: <namespace> = namespace [concrete] {
// CHECK:STDOUT: .I = %I.decl
// CHECK:STDOUT: .N = %N
// CHECK:STDOUT: }
// CHECK:STDOUT: %I.decl: type = interface_decl @I [concrete = constants.%I.type] {} {}
// CHECK:STDOUT: %N: <namespace> = namespace [concrete] {
// CHECK:STDOUT: .I = <poisoned>
// CHECK:STDOUT: .F1 = %F1.decl
// CHECK:STDOUT: .N = <poisoned>
// CHECK:STDOUT: .F2 = %F2.decl
// CHECK:STDOUT: }
// CHECK:STDOUT: %F1.decl: %F1.type = fn_decl @F1 [concrete = constants.%F1] {
// CHECK:STDOUT: %x.patt.loc8_9.1: %I.type = symbolic_binding_pattern x, 0 [symbolic = %x.patt.loc8_9.2 (constants.%x.patt.3ad)]
// CHECK:STDOUT: %x.param_patt: %I.type = value_param_pattern %x.patt.loc8_9.1, runtime_param<none> [symbolic = %x.patt.loc8_9.2 (constants.%x.patt.3ad)]
// CHECK:STDOUT: } {
// CHECK:STDOUT: %x.param: %I.type = value_param runtime_param<none>
// CHECK:STDOUT: %I.ref: type = name_ref I, file.%I.decl [concrete = constants.%I.type]
// CHECK:STDOUT: %x.loc8_9.1: %I.type = bind_symbolic_name x, 0, %x.param [symbolic = %x.loc8_9.2 (constants.%x)]
// CHECK:STDOUT: }
// CHECK:STDOUT: %F2.decl: %F2.type = fn_decl @F2 [concrete = constants.%F2] {
// CHECK:STDOUT: %x.patt.loc14_9.1: <error> = symbolic_binding_pattern x, 0 [symbolic = %x.patt.loc14_9.2 (constants.%x.patt.e01)]
// CHECK:STDOUT: %x.param_patt: <error> = value_param_pattern %x.patt.loc14_9.1, runtime_param<none> [concrete = <error>]
// CHECK:STDOUT: } {
// CHECK:STDOUT: %x.param: <error> = value_param runtime_param<none>
// CHECK:STDOUT: %.1: <error> = splice_block <error> [concrete = <error>] {
// CHECK:STDOUT: %N.ref: <namespace> = name_ref N, file.%N [concrete = file.%N]
// CHECK:STDOUT: %I.ref: <error> = name_ref I, <error> [concrete = <error>]
// CHECK:STDOUT: }
// CHECK:STDOUT: %x: <error> = bind_symbolic_name x, 0, %x.param [concrete = <error>]
// CHECK:STDOUT: }
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: interface @I;
// CHECK:STDOUT:
// CHECK:STDOUT: generic fn @F1(%x.loc8_9.1: %I.type) {
// CHECK:STDOUT: %x.loc8_9.2: %I.type = bind_symbolic_name x, 0 [symbolic = %x.loc8_9.2 (constants.%x)]
// CHECK:STDOUT: %x.patt.loc8_9.2: %I.type = symbolic_binding_pattern x, 0 [symbolic = %x.patt.loc8_9.2 (constants.%x.patt.3ad)]
// CHECK:STDOUT:
// CHECK:STDOUT: fn(%x.param_patt: %I.type);
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: generic fn @F2(%x: <error>) {
// CHECK:STDOUT: %x.patt.loc14_9.2: <error> = symbolic_binding_pattern x, 0 [symbolic = %x.patt.loc14_9.2 (constants.%x.patt.e01)]
// CHECK:STDOUT:
// CHECK:STDOUT: fn(%x.param_patt: <error>);
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: specific @F1(constants.%x) {
// CHECK:STDOUT: %x.loc8_9.2 => constants.%x
// CHECK:STDOUT: %x.patt.loc8_9.2 => constants.%x
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: specific @F2(<error>) {
// CHECK:STDOUT: %x.patt.loc14_9.2 => <error>
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: --- fail_use_declaration_after_poison.carbon
// CHECK:STDOUT:
// CHECK:STDOUT: constants {
// CHECK:STDOUT: %I.type.733: type = facet_type <@I.1> [concrete]
// CHECK:STDOUT: %x: %I.type.733 = bind_symbolic_name x, 0 [symbolic]
// CHECK:STDOUT: %x.patt.3ad: %I.type.733 = symbolic_binding_pattern x, 0 [symbolic]
// CHECK:STDOUT: %F1.type: type = fn_type @F1 [concrete]
// CHECK:STDOUT: %F1: %F1.type = struct_value () [concrete]
// CHECK:STDOUT: %I.type.4da: type = facet_type <@I.2> [concrete]
// CHECK:STDOUT: %x.patt.e01: <error> = symbolic_binding_pattern x, 0 [symbolic]
// CHECK:STDOUT: %F2.type: type = fn_type @F2 [concrete]
// CHECK:STDOUT: %F2: %F2.type = struct_value () [concrete]
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: file {
// CHECK:STDOUT: package: <namespace> = namespace [concrete] {
// CHECK:STDOUT: .I = %I.decl.loc4
// CHECK:STDOUT: .N = %N
// CHECK:STDOUT: }
// CHECK:STDOUT: %I.decl.loc4: type = interface_decl @I.1 [concrete = constants.%I.type.733] {} {}
// CHECK:STDOUT: %N: <namespace> = namespace [concrete] {
// CHECK:STDOUT: .I = <poisoned>
// CHECK:STDOUT: .F1 = %F1.decl
// CHECK:STDOUT: .N = <poisoned>
// CHECK:STDOUT: .F2 = %F2.decl
// CHECK:STDOUT: }
// CHECK:STDOUT: %F1.decl: %F1.type = fn_decl @F1 [concrete = constants.%F1] {
// CHECK:STDOUT: %x.patt.loc11_9.1: %I.type.733 = symbolic_binding_pattern x, 0 [symbolic = %x.patt.loc11_9.2 (constants.%x.patt.3ad)]
// CHECK:STDOUT: %x.param_patt: %I.type.733 = value_param_pattern %x.patt.loc11_9.1, runtime_param<none> [symbolic = %x.patt.loc11_9.2 (constants.%x.patt.3ad)]
// CHECK:STDOUT: } {
// CHECK:STDOUT: %x.param: %I.type.733 = value_param runtime_param<none>
// CHECK:STDOUT: %I.ref: type = name_ref I, file.%I.decl.loc4 [concrete = constants.%I.type.733]
// CHECK:STDOUT: %x.loc11_9.1: %I.type.733 = bind_symbolic_name x, 0, %x.param [symbolic = %x.loc11_9.2 (constants.%x)]
// CHECK:STDOUT: }
// CHECK:STDOUT: %I.decl.loc17: type = interface_decl @I.2 [concrete = constants.%I.type.4da] {} {}
// CHECK:STDOUT: %F2.decl: %F2.type = fn_decl @F2 [concrete = constants.%F2] {
// CHECK:STDOUT: %x.patt.loc23_9.1: <error> = symbolic_binding_pattern x, 0 [symbolic = %x.patt.loc23_9.2 (constants.%x.patt.e01)]
// CHECK:STDOUT: %x.param_patt: <error> = value_param_pattern %x.patt.loc23_9.1, runtime_param<none> [concrete = <error>]
// CHECK:STDOUT: } {
// CHECK:STDOUT: %x.param: <error> = value_param runtime_param<none>
// CHECK:STDOUT: %.1: <error> = splice_block <error> [concrete = <error>] {
// CHECK:STDOUT: %N.ref: <namespace> = name_ref N, file.%N [concrete = file.%N]
// CHECK:STDOUT: %I.ref: <error> = name_ref I, <error> [concrete = <error>]
// CHECK:STDOUT: }
// CHECK:STDOUT: %x: <error> = bind_symbolic_name x, 0, %x.param [concrete = <error>]
// CHECK:STDOUT: }
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: interface @I.1;
// CHECK:STDOUT:
// CHECK:STDOUT: interface @I.2;
// CHECK:STDOUT:
// CHECK:STDOUT: generic fn @F1(%x.loc11_9.1: %I.type.733) {
// CHECK:STDOUT: %x.loc11_9.2: %I.type.733 = bind_symbolic_name x, 0 [symbolic = %x.loc11_9.2 (constants.%x)]
// CHECK:STDOUT: %x.patt.loc11_9.2: %I.type.733 = symbolic_binding_pattern x, 0 [symbolic = %x.patt.loc11_9.2 (constants.%x.patt.3ad)]
// CHECK:STDOUT:
// CHECK:STDOUT: fn(%x.param_patt: %I.type.733);
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: generic fn @F2(%x: <error>) {
// CHECK:STDOUT: %x.patt.loc23_9.2: <error> = symbolic_binding_pattern x, 0 [symbolic = %x.patt.loc23_9.2 (constants.%x.patt.e01)]
// CHECK:STDOUT:
// CHECK:STDOUT: fn(%x.param_patt: <error>);
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: specific @F1(constants.%x) {
// CHECK:STDOUT: %x.loc11_9.2 => constants.%x
// CHECK:STDOUT: %x.patt.loc11_9.2 => constants.%x
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: specific @F2(<error>) {
// CHECK:STDOUT: %x.patt.loc23_9.2 => <error>
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: --- fail_alias.carbon
// CHECK:STDOUT:
// CHECK:STDOUT: constants {
// CHECK:STDOUT: %I.type: type = facet_type <@I> [concrete]
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: file {
// CHECK:STDOUT: package: <namespace> = namespace [concrete] {
// CHECK:STDOUT: .I = %I.decl
// CHECK:STDOUT: .N = %N
// CHECK:STDOUT: }
// CHECK:STDOUT: %I.decl: type = interface_decl @I [concrete = constants.%I.type] {} {}
// CHECK:STDOUT: %N: <namespace> = namespace [concrete] {
// CHECK:STDOUT: .I = <poisoned>
// CHECK:STDOUT: }
// CHECK:STDOUT: %I.ref: type = name_ref I, %I.decl [concrete = constants.%I.type]
// CHECK:STDOUT: %I: type = bind_alias I, %I.decl [concrete = constants.%I.type]
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: interface @I;
// CHECK:STDOUT:
// CHECK:STDOUT: --- fail_poison_multiple_scopes.carbon
// CHECK:STDOUT:
// CHECK:STDOUT: constants {
// CHECK:STDOUT: %I1.type.80c: type = facet_type <@I1.1> [concrete]
// CHECK:STDOUT: %I2.type: type = facet_type <@I2> [concrete]
// CHECK:STDOUT: %Self.c7b: %I2.type = bind_symbolic_name Self, 0 [symbolic]
// CHECK:STDOUT: %I3.type.07a: type = facet_type <@I3> [concrete]
// CHECK:STDOUT: %I3.type.b2f: type = facet_type <@I3, @I3(%Self.c7b)> [symbolic]
// CHECK:STDOUT: %Self.60c: %I3.type.b2f = bind_symbolic_name Self, 1 [symbolic]
// CHECK:STDOUT: %I4.type.451: type = facet_type <@I4> [concrete]
// CHECK:STDOUT: %I4.type.78e: type = facet_type <@I4, @I4(%Self.c7b, %Self.60c)> [symbolic]
// CHECK:STDOUT: %Self.a4d: %I4.type.78e = bind_symbolic_name Self, 2 [symbolic]
// CHECK:STDOUT: %x: %I1.type.80c = bind_symbolic_name x, 3 [symbolic]
// CHECK:STDOUT: %x.patt: %I1.type.80c = symbolic_binding_pattern x, 3 [symbolic]
// CHECK:STDOUT: %F.type: type = fn_type @F, @I4(%Self.c7b, %Self.60c) [symbolic]
// CHECK:STDOUT: %F: %F.type = struct_value () [symbolic]
// CHECK:STDOUT: %I4.assoc_type: type = assoc_entity_type %I4.type.78e [symbolic]
// CHECK:STDOUT: %assoc0: %I4.assoc_type = assoc_entity element0, @I4.%F.decl [symbolic]
// CHECK:STDOUT: %I1.type.f4e: type = facet_type <@I1.2> [concrete]
// CHECK:STDOUT: %I1.type.575: type = facet_type <@I1.3> [concrete]
// CHECK:STDOUT: %I1.type.e5b: type = facet_type <@I1.4> [concrete]
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: file {
// CHECK:STDOUT: package: <namespace> = namespace [concrete] {
// CHECK:STDOUT: .I1 = %I1.decl
// CHECK:STDOUT: .I2 = %I2.decl
// CHECK:STDOUT: }
// CHECK:STDOUT: %I1.decl: type = interface_decl @I1.1 [concrete = constants.%I1.type.80c] {} {}
// CHECK:STDOUT: %I2.decl: type = interface_decl @I2 [concrete = constants.%I2.type] {} {}
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: interface @I1.1;
// CHECK:STDOUT:
// CHECK:STDOUT: interface @I2 {
// CHECK:STDOUT: %Self: %I2.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self.c7b]
// CHECK:STDOUT: %I3.decl: type = interface_decl @I3 [concrete = constants.%I3.type.07a] {} {}
// CHECK:STDOUT: %I1.decl: type = interface_decl @I1.4 [concrete = constants.%I1.type.e5b] {} {}
// CHECK:STDOUT:
// CHECK:STDOUT: !members:
// CHECK:STDOUT: .Self = %Self
// CHECK:STDOUT: .I3 = %I3.decl
// CHECK:STDOUT: .I1 = <poisoned>
// CHECK:STDOUT: witness = ()
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: generic interface @I3(@I2.%Self: %I2.type) {
// CHECK:STDOUT: !definition:
// CHECK:STDOUT: %Self.2: %I2.type = bind_symbolic_name Self, 0 [symbolic = %Self.2 (constants.%Self.c7b)]
// CHECK:STDOUT: %I3.type: type = facet_type <@I3, @I3(%Self.2)> [symbolic = %I3.type (constants.%I3.type.b2f)]
// CHECK:STDOUT: %Self.3: %I3.type.b2f = bind_symbolic_name Self, 1 [symbolic = %Self.3 (constants.%Self.60c)]
// CHECK:STDOUT:
// CHECK:STDOUT: interface {
// CHECK:STDOUT: %Self.1: @I3.%I3.type (%I3.type.b2f) = bind_symbolic_name Self, 1 [symbolic = %Self.3 (constants.%Self.60c)]
// CHECK:STDOUT: %I4.decl: type = interface_decl @I4 [concrete = constants.%I4.type.451] {} {}
// CHECK:STDOUT: %I1.decl: type = interface_decl @I1.3 [concrete = constants.%I1.type.575] {} {}
// CHECK:STDOUT:
// CHECK:STDOUT: !members:
// CHECK:STDOUT: .Self = %Self.1
// CHECK:STDOUT: .I4 = %I4.decl
// CHECK:STDOUT: .I1 = <poisoned>
// CHECK:STDOUT: witness = ()
// CHECK:STDOUT: }
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: generic interface @I4(@I2.%Self: %I2.type, @I3.%Self.1: @I3.%I3.type (%I3.type.b2f)) {
// CHECK:STDOUT: !definition:
// CHECK:STDOUT: %Self.2: %I2.type = bind_symbolic_name Self, 0 [symbolic = %Self.2 (constants.%Self.c7b)]
// CHECK:STDOUT: %Self.3: %I3.type.b2f = bind_symbolic_name Self, 1 [symbolic = %Self.3 (constants.%Self.60c)]
// CHECK:STDOUT: %I4.type: type = facet_type <@I4, @I4(%Self.2, %Self.3)> [symbolic = %I4.type (constants.%I4.type.78e)]
// CHECK:STDOUT: %Self.4: %I4.type.78e = bind_symbolic_name Self, 2 [symbolic = %Self.4 (constants.%Self.a4d)]
// CHECK:STDOUT: %F.type: type = fn_type @F, @I4(%Self.2, %Self.3) [symbolic = %F.type (constants.%F.type)]
// CHECK:STDOUT: %F: @I4.%F.type (%F.type) = struct_value () [symbolic = %F (constants.%F)]
// CHECK:STDOUT: %I4.assoc_type: type = assoc_entity_type @I4.%I4.type (%I4.type.78e) [symbolic = %I4.assoc_type (constants.%I4.assoc_type)]
// CHECK:STDOUT: %assoc0.loc16_19.2: @I4.%I4.assoc_type (%I4.assoc_type) = assoc_entity element0, %F.decl [symbolic = %assoc0.loc16_19.2 (constants.%assoc0)]
// CHECK:STDOUT:
// CHECK:STDOUT: interface {
// CHECK:STDOUT: %Self.1: @I4.%I4.type (%I4.type.78e) = bind_symbolic_name Self, 2 [symbolic = %Self.4 (constants.%Self.a4d)]
// CHECK:STDOUT: %F.decl: @I4.%F.type (%F.type) = fn_decl @F [symbolic = @I4.%F (constants.%F)] {
// CHECK:STDOUT: %x.patt.loc16_12.2: %I1.type.80c = symbolic_binding_pattern x, 3 [symbolic = %x.patt.loc16_12.1 (constants.%x.patt)]
// CHECK:STDOUT: %x.param_patt: %I1.type.80c = value_param_pattern %x.patt.loc16_12.2, runtime_param<none> [symbolic = %x.patt.loc16_12.1 (constants.%x.patt)]
// CHECK:STDOUT: } {
// CHECK:STDOUT: %x.param: %I1.type.80c = value_param runtime_param<none>
// CHECK:STDOUT: %I1.ref: type = name_ref I1, file.%I1.decl [concrete = constants.%I1.type.80c]
// CHECK:STDOUT: %x.loc16_12.2: %I1.type.80c = bind_symbolic_name x, 3, %x.param [symbolic = %x.loc16_12.1 (constants.%x)]
// CHECK:STDOUT: }
// CHECK:STDOUT: %assoc0.loc16_19.1: @I4.%I4.assoc_type (%I4.assoc_type) = assoc_entity element0, %F.decl [symbolic = %assoc0.loc16_19.2 (constants.%assoc0)]
// CHECK:STDOUT: %I1.decl: type = interface_decl @I1.2 [concrete = constants.%I1.type.f4e] {} {}
// CHECK:STDOUT:
// CHECK:STDOUT: !members:
// CHECK:STDOUT: .Self = %Self.1
// CHECK:STDOUT: .I1 = <poisoned>
// CHECK:STDOUT: .F = %assoc0.loc16_19.1
// CHECK:STDOUT: witness = (%F.decl)
// CHECK:STDOUT: }
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: generic interface @I1.2(@I2.%Self: %I2.type, @I3.%Self.1: @I3.%I3.type (%I3.type.b2f), @I4.%Self.1: @I4.%I4.type (%I4.type.78e)) {
// CHECK:STDOUT: interface;
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: generic interface @I1.3(@I2.%Self: %I2.type, @I3.%Self.1: @I3.%I3.type (%I3.type.b2f)) {
// CHECK:STDOUT: interface;
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: generic interface @I1.4(@I2.%Self: %I2.type) {
// CHECK:STDOUT: interface;
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: generic fn @F(@I2.%Self: %I2.type, @I3.%Self.1: @I3.%I3.type (%I3.type.b2f), @I4.%Self.1: @I4.%I4.type (%I4.type.78e), %x.loc16_12.2: %I1.type.80c) {
// CHECK:STDOUT: %x.loc16_12.1: %I1.type.80c = bind_symbolic_name x, 3 [symbolic = %x.loc16_12.1 (constants.%x)]
// CHECK:STDOUT: %x.patt.loc16_12.1: %I1.type.80c = symbolic_binding_pattern x, 3 [symbolic = %x.patt.loc16_12.1 (constants.%x.patt)]
// CHECK:STDOUT:
// CHECK:STDOUT: fn(%x.param_patt: %I1.type.80c);
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: specific @I3(constants.%Self.c7b) {}
// CHECK:STDOUT:
// CHECK:STDOUT: specific @I4(constants.%Self.c7b, constants.%Self.60c) {}
// CHECK:STDOUT:
// CHECK:STDOUT: specific @F(constants.%Self.c7b, constants.%Self.60c, constants.%Self.a4d, constants.%x) {
// CHECK:STDOUT: %x.loc16_12.1 => constants.%x
// CHECK:STDOUT: %x.patt.loc16_12.1 => constants.%x
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: specific @I1.2(constants.%Self.c7b, constants.%Self.60c, constants.%Self.a4d) {}
// CHECK:STDOUT:
// CHECK:STDOUT: specific @I4(%Self.2, %Self.3) {}
// CHECK:STDOUT:
// CHECK:STDOUT: specific @I1.3(constants.%Self.c7b, constants.%Self.60c) {}
// CHECK:STDOUT:
// CHECK:STDOUT: specific @I3(%Self.2) {}
// CHECK:STDOUT:
// CHECK:STDOUT: specific @I1.4(constants.%Self.c7b) {}
// CHECK:STDOUT:
// CHECK:STDOUT: --- ignored_poison_in_import.carbon
// CHECK:STDOUT:
// CHECK:STDOUT: constants {
// CHECK:STDOUT: %I.type: type = facet_type <@I> [concrete]
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: imports {
// CHECK:STDOUT: %Main.I = import_ref Main//poison, I, unloaded
// CHECK:STDOUT: %Main.N: <namespace> = import_ref Main//poison, N, loaded
// CHECK:STDOUT: %N: <namespace> = namespace %Main.N, [concrete] {
// CHECK:STDOUT: .F = %Main.F
// CHECK:STDOUT: .I = file.%I.decl
// CHECK:STDOUT: }
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: file {
// CHECK:STDOUT: package: <namespace> = namespace [concrete] {
// CHECK:STDOUT: .I = imports.%Main.I
// CHECK:STDOUT: .N = imports.%N
// CHECK:STDOUT: }
// CHECK:STDOUT: %default.import = import <none>
// CHECK:STDOUT: %I.decl: type = interface_decl @I [concrete = constants.%I.type] {} {}
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: interface @I;
// CHECK:STDOUT:
// CHECK:STDOUT: --- poison.impl.carbon
// CHECK:STDOUT:
// CHECK:STDOUT: constants {
// CHECK:STDOUT: %I.type: type = facet_type <@I> [concrete]
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: imports {
// CHECK:STDOUT: %Main.I = import_ref Main//poison, I, unloaded
// CHECK:STDOUT: %Main.N: <namespace> = import_ref Main//poison, N, loaded
// CHECK:STDOUT: %N: <namespace> = namespace %Main.N, [concrete] {
// CHECK:STDOUT: .F = %Main.F
// CHECK:STDOUT: .I = file.%I.decl
// CHECK:STDOUT: }
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: file {
// CHECK:STDOUT: package: <namespace> = namespace [concrete] {
// CHECK:STDOUT: .I = imports.%Main.I
// CHECK:STDOUT: .N = imports.%N
// CHECK:STDOUT: }
// CHECK:STDOUT: %default.import.loc2_6.1 = import <none>
// CHECK:STDOUT: %default.import.loc2_6.2 = import <none>
// CHECK:STDOUT: %I.decl: type = interface_decl @I [concrete = constants.%I.type] {} {}
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: interface @I;
// CHECK:STDOUT:
// CHECK:STDOUT: --- fail_poison_when_lookup_fails.carbon
// CHECK:STDOUT:
// CHECK:STDOUT: constants {
// CHECK:STDOUT: %x.patt: <error> = symbolic_binding_pattern x, 0 [symbolic]
// CHECK:STDOUT: %F.type: type = fn_type @F [concrete]
// CHECK:STDOUT: %F: %F.type = struct_value () [concrete]
// CHECK:STDOUT: %I.type.733: type = facet_type <@I.1> [concrete]
// CHECK:STDOUT: %I.type.4da: type = facet_type <@I.2> [concrete]
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: file {
// CHECK:STDOUT: package: <namespace> = namespace [concrete] {
// CHECK:STDOUT: .N = %N
// CHECK:STDOUT: .I = <poisoned>
// CHECK:STDOUT: }
// CHECK:STDOUT: %N: <namespace> = namespace [concrete] {
// CHECK:STDOUT: .I = <poisoned>
// CHECK:STDOUT: .F = %F.decl
// CHECK:STDOUT: }
// CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [concrete = constants.%F] {
// CHECK:STDOUT: %x.patt.loc13_8.1: <error> = symbolic_binding_pattern x, 0 [symbolic = %x.patt.loc13_8.2 (constants.%x.patt)]
// CHECK:STDOUT: %x.param_patt: <error> = value_param_pattern %x.patt.loc13_8.1, runtime_param<none> [concrete = <error>]
// CHECK:STDOUT: } {
// CHECK:STDOUT: %x.param: <error> = value_param runtime_param<none>
// CHECK:STDOUT: %I.ref: <error> = name_ref I, <error> [concrete = <error>]
// CHECK:STDOUT: %x: <error> = bind_symbolic_name x, 0, %x.param [concrete = <error>]
// CHECK:STDOUT: }
// CHECK:STDOUT: %I.decl.loc23: type = interface_decl @I.1 [concrete = constants.%I.type.733] {} {}
// CHECK:STDOUT: %I.decl.loc28: type = interface_decl @I.2 [concrete = constants.%I.type.4da] {} {}
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: interface @I.1;
// CHECK:STDOUT:
// CHECK:STDOUT: interface @I.2;
// CHECK:STDOUT:
// CHECK:STDOUT: generic fn @F(%x: <error>) {
// CHECK:STDOUT: %x.patt.loc13_8.2: <error> = symbolic_binding_pattern x, 0 [symbolic = %x.patt.loc13_8.2 (constants.%x.patt)]
// CHECK:STDOUT:
// CHECK:STDOUT: fn(%x.param_patt: <error>);
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: specific @F(<error>) {
// CHECK:STDOUT: %x.patt.loc13_8.2 => <error>
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: --- fail_poison_with_lexical_result.carbon
// CHECK:STDOUT:
// CHECK:STDOUT: constants {
// CHECK:STDOUT: %F.type: type = fn_type @F [concrete]
// CHECK:STDOUT: %F: %F.type = struct_value () [concrete]
// CHECK:STDOUT: %I1.type.06a: type = facet_type <@I1.1> [concrete]
// CHECK:STDOUT: %Self: %I1.type.06a = bind_symbolic_name Self, 0 [symbolic]
// CHECK:STDOUT: %C: type = class_type @C [concrete]
// CHECK:STDOUT: %C.elem: type = unbound_element_type %C, %I1.type.06a [concrete]
// CHECK:STDOUT: %I1.type.8ea: type = facet_type <@I1.2> [concrete]
// CHECK:STDOUT: %struct_type.v: type = struct_type {.v: %I1.type.06a} [concrete]
// CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %struct_type.v [concrete]
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: file {
// CHECK:STDOUT: package: <namespace> = namespace [concrete] {
// CHECK:STDOUT: .F = %F.decl
// CHECK:STDOUT: }
// CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [concrete = constants.%F] {} {}
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: interface @I1.1 {
// CHECK:STDOUT: %Self: %I1.type.06a = bind_symbolic_name Self, 0 [symbolic = constants.%Self]
// CHECK:STDOUT:
// CHECK:STDOUT: !members:
// CHECK:STDOUT: .Self = %Self
// CHECK:STDOUT: witness = ()
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: interface @I1.2;
// CHECK:STDOUT:
// CHECK:STDOUT: class @C {
// CHECK:STDOUT: %.loc11_10: %C.elem = field_decl v, element0 [concrete]
// CHECK:STDOUT: name_binding_decl {
// CHECK:STDOUT: %.loc11_5: %C.elem = var_pattern %.loc11_10
// CHECK:STDOUT: }
// CHECK:STDOUT: %.var: ref %C.elem = var <none>
// CHECK:STDOUT: %I1.decl: type = interface_decl @I1.2 [concrete = constants.%I1.type.8ea] {} {}
// CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %struct_type.v [concrete = constants.%complete_type]
// CHECK:STDOUT: complete_type_witness = %complete_type
// CHECK:STDOUT:
// CHECK:STDOUT: !members:
// CHECK:STDOUT: .Self = constants.%C
// CHECK:STDOUT: .I1 = <poisoned>
// CHECK:STDOUT: .v = %.loc11_10
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: fn @F() {
// CHECK:STDOUT: !entry:
// CHECK:STDOUT: %I1.decl: type = interface_decl @I1.1 [concrete = constants.%I1.type.06a] {} {}
// CHECK:STDOUT: %C.decl: type = class_decl @C [concrete = constants.%C] {} {}
// CHECK:STDOUT: return
// CHECK:STDOUT: }
// CHECK:STDOUT:
@@ -2,6 +2,8 @@
// Exceptions. See /LICENSE for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
// EXTRA-ARGS: --no-dump-sem-ir
//
// AUTOUPDATE
// TIP: To test this file alone, run:
// TIP: bazel test //toolchain/testing:file_test --test_arg=--file_tests=toolchain/check/testdata/namespace/no_prelude/name_poisoning.carbon
@@ -195,264 +197,3 @@ namespace N3;
// CHECK:STDERR: ^~
// CHECK:STDERR:
namespace N1.N3;
// CHECK:STDOUT: --- no_poison.carbon
// CHECK:STDOUT:
// CHECK:STDOUT: constants {
// CHECK:STDOUT: %C.2a3: type = class_type @C.1 [concrete]
// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete]
// CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %empty_struct_type [concrete]
// CHECK:STDOUT: %C.0b8: type = class_type @C.2 [concrete]
// CHECK:STDOUT: %TestNamespaces.type: type = fn_type @TestNamespaces [concrete]
// CHECK:STDOUT: %TestNamespaces: %TestNamespaces.type = struct_value () [concrete]
// CHECK:STDOUT: %ptr.33b: type = ptr_type %C.2a3 [concrete]
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: file {
// CHECK:STDOUT: package: <namespace> = namespace [concrete] {
// CHECK:STDOUT: .N1 = %N1.loc4
// CHECK:STDOUT: .N2 = %N2
// CHECK:STDOUT: .TestNamespaces = %TestNamespaces.decl
// CHECK:STDOUT: }
// CHECK:STDOUT: %N1.loc4: <namespace> = namespace [concrete] {
// CHECK:STDOUT: .C = %C.decl.loc12
// CHECK:STDOUT: }
// CHECK:STDOUT: %N2: <namespace> = namespace [concrete] {
// CHECK:STDOUT: .N1 = %N1.loc8
// CHECK:STDOUT: .N3 = %N3
// CHECK:STDOUT: }
// CHECK:STDOUT: %N1.loc8: <namespace> = namespace [concrete] {
// CHECK:STDOUT: .C = %C.decl.loc11
// CHECK:STDOUT: }
// CHECK:STDOUT: %N1.ref: <namespace> = name_ref N1, %N1.loc8 [concrete = %N1.loc8]
// CHECK:STDOUT: %N3: <namespace> = bind_alias N3, %N1.loc8 [concrete = %N1.loc8]
// CHECK:STDOUT: %C.decl.loc11: type = class_decl @C.1 [concrete = constants.%C.2a3] {} {}
// CHECK:STDOUT: %C.decl.loc12: type = class_decl @C.2 [concrete = constants.%C.0b8] {} {}
// CHECK:STDOUT: %TestNamespaces.decl: %TestNamespaces.type = fn_decl @TestNamespaces [concrete = constants.%TestNamespaces] {} {}
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: class @C.1 {
// CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %empty_struct_type [concrete = constants.%complete_type]
// CHECK:STDOUT: complete_type_witness = %complete_type
// CHECK:STDOUT:
// CHECK:STDOUT: !members:
// CHECK:STDOUT: .Self = constants.%C.2a3
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: class @C.2 {
// CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %empty_struct_type [concrete = constants.%complete_type]
// CHECK:STDOUT: complete_type_witness = %complete_type
// CHECK:STDOUT:
// CHECK:STDOUT: !members:
// CHECK:STDOUT: .Self = constants.%C.0b8
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: fn @TestNamespaces() {
// CHECK:STDOUT: !entry:
// CHECK:STDOUT: name_binding_decl {
// CHECK:STDOUT: %x.patt: %C.2a3 = binding_pattern x
// CHECK:STDOUT: %.loc14_3: %C.2a3 = var_pattern %x.patt
// CHECK:STDOUT: }
// CHECK:STDOUT: %x.var: ref %C.2a3 = var x
// CHECK:STDOUT: %.loc14_15: type = splice_block %C.ref.loc14 [concrete = constants.%C.2a3] {
// CHECK:STDOUT: %N2.ref.loc14: <namespace> = name_ref N2, file.%N2 [concrete = file.%N2]
// CHECK:STDOUT: %N1.ref: <namespace> = name_ref N1, file.%N1.loc8 [concrete = file.%N1.loc8]
// CHECK:STDOUT: %C.ref.loc14: type = name_ref C, file.%C.decl.loc11 [concrete = constants.%C.2a3]
// CHECK:STDOUT: }
// CHECK:STDOUT: %x: ref %C.2a3 = bind_name x, %x.var
// CHECK:STDOUT: name_binding_decl {
// CHECK:STDOUT: %y.patt: %ptr.33b = binding_pattern y
// CHECK:STDOUT: %.loc15_3: %ptr.33b = var_pattern %y.patt
// CHECK:STDOUT: }
// CHECK:STDOUT: %y.var: ref %ptr.33b = var y
// CHECK:STDOUT: %x.ref: ref %C.2a3 = name_ref x, %x
// CHECK:STDOUT: %addr: %ptr.33b = addr_of %x.ref
// CHECK:STDOUT: assign %y.var, %addr
// CHECK:STDOUT: %.loc15_17: type = splice_block %ptr [concrete = constants.%ptr.33b] {
// CHECK:STDOUT: %N2.ref.loc15: <namespace> = name_ref N2, file.%N2 [concrete = file.%N2]
// CHECK:STDOUT: %N3.ref: <namespace> = name_ref N3, file.%N3 [concrete = file.%N1.loc8]
// CHECK:STDOUT: %C.ref.loc15: type = name_ref C, file.%C.decl.loc11 [concrete = constants.%C.2a3]
// CHECK:STDOUT: %ptr: type = ptr_type %C.2a3 [concrete = constants.%ptr.33b]
// CHECK:STDOUT: }
// CHECK:STDOUT: %y: ref %ptr.33b = bind_name y, %y.var
// CHECK:STDOUT: return
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: --- poison.carbon
// CHECK:STDOUT:
// CHECK:STDOUT: file {
// CHECK:STDOUT: package: <namespace> = namespace [concrete] {
// CHECK:STDOUT: .N1 = %N1
// CHECK:STDOUT: .N2 = %N2
// CHECK:STDOUT: }
// CHECK:STDOUT: %N1: <namespace> = namespace [concrete] {}
// CHECK:STDOUT: %N2: <namespace> = namespace [concrete] {
// CHECK:STDOUT: .N1 = <poisoned>
// CHECK:STDOUT: .N3 = %N3
// CHECK:STDOUT: }
// CHECK:STDOUT: %N1.ref: <namespace> = name_ref N1, %N1 [concrete = %N1]
// CHECK:STDOUT: %N3: <namespace> = bind_alias N3, %N1 [concrete = %N1]
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: --- fail_declare_after_poison.carbon
// CHECK:STDOUT:
// CHECK:STDOUT: file {
// CHECK:STDOUT: package: <namespace> = namespace [concrete] {
// CHECK:STDOUT: .N1 = %N1.loc4
// CHECK:STDOUT: .N2 = %N2
// CHECK:STDOUT: }
// CHECK:STDOUT: %N1.loc4: <namespace> = namespace [concrete] {}
// CHECK:STDOUT: %N2: <namespace> = namespace [concrete] {
// CHECK:STDOUT: .N1 = <poisoned>
// CHECK:STDOUT: .N3 = %N3
// CHECK:STDOUT: }
// CHECK:STDOUT: %N1.ref: <namespace> = name_ref N1, %N1.loc4 [concrete = %N1.loc4]
// CHECK:STDOUT: %N3: <namespace> = bind_alias N3, %N1.loc4 [concrete = %N1.loc4]
// CHECK:STDOUT: %N1.loc18: <namespace> = namespace [concrete] {}
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: --- fail_use_poison.carbon
// CHECK:STDOUT:
// CHECK:STDOUT: file {
// CHECK:STDOUT: package: <namespace> = namespace [concrete] {
// CHECK:STDOUT: .N1 = %N1
// CHECK:STDOUT: .N2 = %N2
// CHECK:STDOUT: }
// CHECK:STDOUT: %N1: <namespace> = namespace [concrete] {}
// CHECK:STDOUT: %N2: <namespace> = namespace [concrete] {
// CHECK:STDOUT: .N1 = <poisoned>
// CHECK:STDOUT: .N3 = %N3
// CHECK:STDOUT: .N2 = <poisoned>
// CHECK:STDOUT: .N4 = %N4
// CHECK:STDOUT: }
// CHECK:STDOUT: %N1.ref.loc8: <namespace> = name_ref N1, %N1 [concrete = %N1]
// CHECK:STDOUT: %N3: <namespace> = bind_alias N3, %N1 [concrete = %N1]
// CHECK:STDOUT: %N2.ref: <namespace> = name_ref N2, %N2 [concrete = %N2]
// CHECK:STDOUT: %N1.ref.loc14: <error> = name_ref N1, <error> [concrete = <error>]
// CHECK:STDOUT: %N4: <error> = bind_alias N4, <error> [concrete = <error>]
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: --- fail_use_declaration_after_poison.carbon
// CHECK:STDOUT:
// CHECK:STDOUT: file {
// CHECK:STDOUT: package: <namespace> = namespace [concrete] {
// CHECK:STDOUT: .N1 = %N1.loc4
// CHECK:STDOUT: .N2 = %N2
// CHECK:STDOUT: }
// CHECK:STDOUT: %N1.loc4: <namespace> = namespace [concrete] {}
// CHECK:STDOUT: %N2: <namespace> = namespace [concrete] {
// CHECK:STDOUT: .N1 = <poisoned>
// CHECK:STDOUT: .N3 = %N3
// CHECK:STDOUT: .N2 = <poisoned>
// CHECK:STDOUT: .N4 = %N4
// CHECK:STDOUT: }
// CHECK:STDOUT: %N1.ref.loc11: <namespace> = name_ref N1, %N1.loc4 [concrete = %N1.loc4]
// CHECK:STDOUT: %N3: <namespace> = bind_alias N3, %N1.loc4 [concrete = %N1.loc4]
// CHECK:STDOUT: %N1.loc18: <namespace> = namespace [concrete] {}
// CHECK:STDOUT: %N2.ref: <namespace> = name_ref N2, %N2 [concrete = %N2]
// CHECK:STDOUT: %N1.ref.loc24: <error> = name_ref N1, <error> [concrete = <error>]
// CHECK:STDOUT: %N4: <error> = bind_alias N4, <error> [concrete = <error>]
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: --- fail_alias.carbon
// CHECK:STDOUT:
// CHECK:STDOUT: file {
// CHECK:STDOUT: package: <namespace> = namespace [concrete] {
// CHECK:STDOUT: .N1 = %N1.loc2
// CHECK:STDOUT: .N2 = %N2
// CHECK:STDOUT: }
// CHECK:STDOUT: %N1.loc2: <namespace> = namespace [concrete] {}
// CHECK:STDOUT: %N2: <namespace> = namespace [concrete] {
// CHECK:STDOUT: .N1 = <poisoned>
// CHECK:STDOUT: }
// CHECK:STDOUT: %N1.ref: <namespace> = name_ref N1, %N1.loc2 [concrete = %N1.loc2]
// CHECK:STDOUT: %N1.loc12: <namespace> = bind_alias N1, %N1.loc2 [concrete = %N1.loc2]
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: --- fail_poison_multiple_scopes.carbon
// CHECK:STDOUT:
// CHECK:STDOUT: file {
// CHECK:STDOUT: package: <namespace> = namespace [concrete] {
// CHECK:STDOUT: .N1 = %N1.loc4
// CHECK:STDOUT: .N2 = %N2
// CHECK:STDOUT: }
// CHECK:STDOUT: %N1.loc4: <namespace> = namespace [concrete] {}
// CHECK:STDOUT: %N2: <namespace> = namespace [concrete] {
// CHECK:STDOUT: .N3 = %N3
// CHECK:STDOUT: .N1 = <poisoned>
// CHECK:STDOUT: }
// CHECK:STDOUT: %N3: <namespace> = namespace [concrete] {
// CHECK:STDOUT: .N4 = %N4
// CHECK:STDOUT: .N1 = <poisoned>
// CHECK:STDOUT: }
// CHECK:STDOUT: %N4: <namespace> = namespace [concrete] {
// CHECK:STDOUT: .N1 = <poisoned>
// CHECK:STDOUT: .N5 = %N5
// CHECK:STDOUT: }
// CHECK:STDOUT: %N1.ref: <namespace> = name_ref N1, %N1.loc4 [concrete = %N1.loc4]
// CHECK:STDOUT: %N5: <namespace> = bind_alias N5, %N1.loc4 [concrete = %N1.loc4]
// CHECK:STDOUT: %N1.loc24: <namespace> = namespace [concrete] {}
// CHECK:STDOUT: %N1.loc32: <namespace> = namespace [concrete] {}
// CHECK:STDOUT: %N1.loc37: <namespace> = namespace [concrete] {}
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: --- ignored_poison_in_import.carbon
// CHECK:STDOUT:
// CHECK:STDOUT: imports {
// CHECK:STDOUT: %Main.N1: <namespace> = import_ref Main//poison, N1, loaded
// CHECK:STDOUT: %N1: <namespace> = namespace %Main.N1, [concrete] {}
// CHECK:STDOUT: %Main.N2: <namespace> = import_ref Main//poison, N2, loaded
// CHECK:STDOUT: %N2: <namespace> = namespace %Main.N2, [concrete] {
// CHECK:STDOUT: .N3 = %Main.N3
// CHECK:STDOUT: .N1 = file.%N1
// CHECK:STDOUT: }
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: file {
// CHECK:STDOUT: package: <namespace> = namespace [concrete] {
// CHECK:STDOUT: .N1 = imports.%N1
// CHECK:STDOUT: .N2 = imports.%N2
// CHECK:STDOUT: }
// CHECK:STDOUT: %default.import = import <none>
// CHECK:STDOUT: %N1: <namespace> = namespace [concrete] {}
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: --- poison.impl.carbon
// CHECK:STDOUT:
// CHECK:STDOUT: imports {
// CHECK:STDOUT: %Main.N2: <namespace> = import_ref Main//poison, N2, loaded
// CHECK:STDOUT: %N2: <namespace> = namespace %Main.N2, [concrete] {
// CHECK:STDOUT: .N3 = %Main.N3
// CHECK:STDOUT: .N1 = file.%N1
// CHECK:STDOUT: }
// CHECK:STDOUT: %Main.N1: <namespace> = import_ref Main//poison, N1, loaded
// CHECK:STDOUT: %N1: <namespace> = namespace %Main.N1, [concrete] {}
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: file {
// CHECK:STDOUT: package: <namespace> = namespace [concrete] {
// CHECK:STDOUT: .N2 = imports.%N2
// CHECK:STDOUT: .N1 = imports.%N1
// CHECK:STDOUT: }
// CHECK:STDOUT: %default.import.loc2_6.1 = import <none>
// CHECK:STDOUT: %default.import.loc2_6.2 = import <none>
// CHECK:STDOUT: %N1: <namespace> = namespace [concrete] {}
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: --- fail_poison_when_lookup_fails.carbon
// CHECK:STDOUT:
// CHECK:STDOUT: file {
// CHECK:STDOUT: package: <namespace> = namespace [concrete] {
// CHECK:STDOUT: .N1 = %N1
// CHECK:STDOUT: .N3 = <poisoned>
// CHECK:STDOUT: }
// CHECK:STDOUT: %N1: <namespace> = namespace [concrete] {
// CHECK:STDOUT: .N3 = <poisoned>
// CHECK:STDOUT: .N2 = %N2
// CHECK:STDOUT: }
// CHECK:STDOUT: %N3.ref: <error> = name_ref N3, <error> [concrete = <error>]
// CHECK:STDOUT: %N2: <error> = bind_alias N2, <error> [concrete = <error>]
// CHECK:STDOUT: %N3.loc23: <namespace> = namespace [concrete] {}
// CHECK:STDOUT: %N3.loc28: <namespace> = namespace [concrete] {}
// CHECK:STDOUT: }
// CHECK:STDOUT:
@@ -2,6 +2,8 @@
// Exceptions. See /LICENSE for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
// EXTRA-ARGS: --no-dump-sem-ir
//
// AUTOUPDATE
// TIP: To test this file alone, run:
// TIP: bazel test //toolchain/testing:file_test --test_arg=--file_tests=toolchain/check/testdata/packages/no_prelude/core_name_poisoning.carbon
@@ -17,39 +19,3 @@
fn F(x: bool);
class r#Core {}
// CHECK:STDOUT: --- fail_implicitly_poison_core.carbon
// CHECK:STDOUT:
// CHECK:STDOUT: constants {
// CHECK:STDOUT: %F.type: type = fn_type @F [concrete]
// CHECK:STDOUT: %F: %F.type = struct_value () [concrete]
// CHECK:STDOUT: %Core: type = class_type @Core [concrete]
// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete]
// CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %empty_struct_type [concrete]
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: file {
// CHECK:STDOUT: package: <namespace> = namespace [concrete] {
// CHECK:STDOUT: .F = %F.decl
// CHECK:STDOUT: .r#Core = %Core.decl
// CHECK:STDOUT: }
// CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [concrete = constants.%F] {
// CHECK:STDOUT: %x.patt: <error> = binding_pattern x
// CHECK:STDOUT: %x.param_patt: <error> = value_param_pattern %x.patt, runtime_param0 [concrete = <error>]
// CHECK:STDOUT: } {
// CHECK:STDOUT: %x.param: <error> = value_param runtime_param0
// CHECK:STDOUT: %x: <error> = bind_name x, %x.param
// CHECK:STDOUT: }
// CHECK:STDOUT: %Core.decl: type = class_decl @Core [concrete = constants.%Core] {} {}
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: class @Core {
// CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %empty_struct_type [concrete = constants.%complete_type]
// CHECK:STDOUT: complete_type_witness = %complete_type
// CHECK:STDOUT:
// CHECK:STDOUT: !members:
// CHECK:STDOUT: .Self = constants.%Core
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: fn @F(%x.param_patt: <error>);
// CHECK:STDOUT: