mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-05 22:02:55 +01:00
Move diagnostic kind name to the end of the diagnostic. (#4437)
Also surround it in square brackets rather than parentheses. This matches the format used by Clang and GCC, and means diagnostics will still match the `file:line:col: error: ` pattern used by some IDE tools. Before: ```console fail_builtins.carbon:11:11: error(AliasRequiresNameRef): alias initializer must be a name reference ``` After: ```console fail_builtins.carbon:11:11: error: alias initializer must be a name reference [AliasRequiresNameRef] ``` Also tighten up test regex to only match on `STDERR` lines that list a file name.
This commit is contained in:
@@ -9,10 +9,10 @@
|
||||
// TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/check/testdata/interface/fail_assoc_const_bad_default.carbon
|
||||
|
||||
interface I {
|
||||
// CHECK:STDERR: fail_assoc_const_bad_default.carbon:[[@LINE+6]]:3: error(ImplicitAsConversionFailure): cannot implicitly convert from `i32` to `type`
|
||||
// CHECK:STDERR: fail_assoc_const_bad_default.carbon:[[@LINE+6]]:3: error: cannot implicitly convert from `i32` to `type` [ImplicitAsConversionFailure]
|
||||
// CHECK:STDERR: let T:! type = 42;
|
||||
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~
|
||||
// CHECK:STDERR: fail_assoc_const_bad_default.carbon:[[@LINE+3]]:3: note(MissingImplInMemberAccessNote): type `i32` does not implement interface `ImplicitAs`
|
||||
// CHECK:STDERR: fail_assoc_const_bad_default.carbon:[[@LINE+3]]:3: note: type `i32` does not implement interface `ImplicitAs` [MissingImplInMemberAccessNote]
|
||||
// CHECK:STDERR: let T:! type = 42;
|
||||
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~
|
||||
let T:! type = 42;
|
||||
|
||||
@@ -9,12 +9,12 @@
|
||||
// TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/check/testdata/interface/fail_todo_assoc_const_default.carbon
|
||||
|
||||
interface I {
|
||||
// CHECK:STDERR: fail_todo_assoc_const_default.carbon:[[@LINE+4]]:3: error(SemanticsTodo): semantics TODO: `interface modifier`
|
||||
// CHECK:STDERR: fail_todo_assoc_const_default.carbon:[[@LINE+4]]:3: error: semantics TODO: `interface modifier` [SemanticsTodo]
|
||||
// CHECK:STDERR: default let T:! type = (i32, i32);
|
||||
// CHECK:STDERR: ^~~~~~~
|
||||
// CHECK:STDERR:
|
||||
default let T:! type = (i32, i32);
|
||||
// CHECK:STDERR: fail_todo_assoc_const_default.carbon:[[@LINE+3]]:3: error(SemanticsTodo): semantics TODO: `interface modifier`
|
||||
// CHECK:STDERR: fail_todo_assoc_const_default.carbon:[[@LINE+3]]:3: error: semantics TODO: `interface modifier` [SemanticsTodo]
|
||||
// CHECK:STDERR: default let N:! i32 = 42;
|
||||
// CHECK:STDERR: ^~~~~~~
|
||||
default let N:! i32 = 42;
|
||||
|
||||
+2
-2
@@ -9,13 +9,13 @@
|
||||
// TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/check/testdata/interface/fail_todo_define_default_fn_inline.carbon
|
||||
|
||||
interface Interface {
|
||||
// CHECK:STDERR: fail_todo_define_default_fn_inline.carbon:[[@LINE+4]]:3: error(SemanticsTodo): semantics TODO: `interface modifier`
|
||||
// CHECK:STDERR: fail_todo_define_default_fn_inline.carbon:[[@LINE+4]]:3: error: semantics TODO: `interface modifier` [SemanticsTodo]
|
||||
// CHECK:STDERR: default fn F() {}
|
||||
// CHECK:STDERR: ^~~~~~~
|
||||
// CHECK:STDERR:
|
||||
default fn F() {}
|
||||
|
||||
// CHECK:STDERR: fail_todo_define_default_fn_inline.carbon:[[@LINE+3]]:3: error(SemanticsTodo): semantics TODO: `interface modifier`
|
||||
// CHECK:STDERR: fail_todo_define_default_fn_inline.carbon:[[@LINE+3]]:3: error: semantics TODO: `interface modifier` [SemanticsTodo]
|
||||
// CHECK:STDERR: default fn G(a: i32, b: i32) -> i32 = "int.sadd";
|
||||
// CHECK:STDERR: ^~~~~~~
|
||||
default fn G(a: i32, b: i32) -> i32 = "int.sadd";
|
||||
|
||||
+6
-6
@@ -11,32 +11,32 @@
|
||||
// --- fail_todo_define_default_fn_out_of_line.carbon
|
||||
|
||||
interface Interface {
|
||||
// CHECK:STDERR: fail_todo_define_default_fn_out_of_line.carbon:[[@LINE+4]]:3: error(SemanticsTodo): semantics TODO: `interface modifier`
|
||||
// CHECK:STDERR: fail_todo_define_default_fn_out_of_line.carbon:[[@LINE+4]]:3: error: semantics TODO: `interface modifier` [SemanticsTodo]
|
||||
// CHECK:STDERR: default fn F();
|
||||
// CHECK:STDERR: ^~~~~~~
|
||||
// CHECK:STDERR:
|
||||
default fn F();
|
||||
|
||||
// CHECK:STDERR: fail_todo_define_default_fn_out_of_line.carbon:[[@LINE+4]]:3: error(SemanticsTodo): semantics TODO: `interface modifier`
|
||||
// CHECK:STDERR: fail_todo_define_default_fn_out_of_line.carbon:[[@LINE+4]]:3: error: semantics TODO: `interface modifier` [SemanticsTodo]
|
||||
// CHECK:STDERR: default fn G(a: i32, b: i32) -> i32;
|
||||
// CHECK:STDERR: ^~~~~~~
|
||||
// CHECK:STDERR:
|
||||
default fn G(a: i32, b: i32) -> i32;
|
||||
}
|
||||
|
||||
// CHECK:STDERR: fail_todo_define_default_fn_out_of_line.carbon:[[@LINE+7]]:1: error(NameDeclDuplicate): duplicate name being declared in the same scope
|
||||
// CHECK:STDERR: fail_todo_define_default_fn_out_of_line.carbon:[[@LINE+7]]:1: error: duplicate name being declared in the same scope [NameDeclDuplicate]
|
||||
// CHECK:STDERR: fn Interface.F() {}
|
||||
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~
|
||||
// CHECK:STDERR: fail_todo_define_default_fn_out_of_line.carbon:[[@LINE-12]]:3: note(NameDeclPrevious): name is previously declared here
|
||||
// CHECK:STDERR: fail_todo_define_default_fn_out_of_line.carbon:[[@LINE-12]]:3: note: name is previously declared here [NameDeclPrevious]
|
||||
// CHECK:STDERR: default fn F();
|
||||
// CHECK:STDERR: ^~~~~~~~~~~~~~~
|
||||
// CHECK:STDERR:
|
||||
fn Interface.F() {}
|
||||
|
||||
// CHECK:STDERR: fail_todo_define_default_fn_out_of_line.carbon:[[@LINE+6]]:1: error(NameDeclDuplicate): duplicate name being declared in the same scope
|
||||
// CHECK:STDERR: fail_todo_define_default_fn_out_of_line.carbon:[[@LINE+6]]:1: error: duplicate name being declared in the same scope [NameDeclDuplicate]
|
||||
// CHECK:STDERR: fn Interface.G(a: i32, b: i32) -> i32 = "int.sadd";
|
||||
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// CHECK:STDERR: fail_todo_define_default_fn_out_of_line.carbon:[[@LINE-15]]:3: note(NameDeclPrevious): name is previously declared here
|
||||
// CHECK:STDERR: fail_todo_define_default_fn_out_of_line.carbon:[[@LINE-15]]:3: note: name is previously declared here [NameDeclPrevious]
|
||||
// CHECK:STDERR: default fn G(a: i32, b: i32) -> i32;
|
||||
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
fn Interface.G(a: i32, b: i32) -> i32 = "int.sadd";
|
||||
|
||||
+3
-3
@@ -10,7 +10,7 @@
|
||||
|
||||
interface Interface { }
|
||||
|
||||
// CHECK:STDERR: fail_add_member_outside_definition.carbon:[[@LINE+4]]:14: error(QualifiedDeclOutsideScopeEntity): out-of-line declaration requires a declaration in scoped entity
|
||||
// CHECK:STDERR: fail_add_member_outside_definition.carbon:[[@LINE+4]]:14: error: out-of-line declaration requires a declaration in scoped entity [QualifiedDeclOutsideScopeEntity]
|
||||
// CHECK:STDERR: fn Interface.F() {}
|
||||
// CHECK:STDERR: ^
|
||||
// CHECK:STDERR:
|
||||
@@ -19,13 +19,13 @@ fn Interface.F() {}
|
||||
// Nesting interfaces like this is not valid, but make sure we don't crash.
|
||||
interface Outer {
|
||||
interface Inner {
|
||||
// CHECK:STDERR: fail_add_member_outside_definition.carbon:[[@LINE+4]]:8: error(NameNotFound): name `Outer` not found
|
||||
// CHECK:STDERR: fail_add_member_outside_definition.carbon:[[@LINE+4]]:8: error: name `Outer` not found [NameNotFound]
|
||||
// CHECK:STDERR: fn Outer.F();
|
||||
// CHECK:STDERR: ^~~~~
|
||||
// CHECK:STDERR:
|
||||
fn Outer.F();
|
||||
}
|
||||
// CHECK:STDERR: fail_add_member_outside_definition.carbon:[[@LINE+3]]:12: error(QualifiedDeclOutsideScopeEntity): out-of-line declaration requires a declaration in scoped entity
|
||||
// CHECK:STDERR: fail_add_member_outside_definition.carbon:[[@LINE+3]]:12: error: out-of-line declaration requires a declaration in scoped entity [QualifiedDeclOutsideScopeEntity]
|
||||
// CHECK:STDERR: fn Inner.F();
|
||||
// CHECK:STDERR: ^
|
||||
fn Inner.F();
|
||||
|
||||
+1
-1
@@ -9,7 +9,7 @@
|
||||
// TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/check/testdata/interface/no_prelude/fail_assoc_const_not_binding.carbon
|
||||
|
||||
interface I {
|
||||
// CHECK:STDERR: fail_assoc_const_not_binding.carbon:[[@LINE+3]]:3: error(SemanticsTodo): semantics TODO: `tuple pattern in let/var`
|
||||
// CHECK:STDERR: fail_assoc_const_not_binding.carbon:[[@LINE+3]]:3: error: semantics TODO: `tuple pattern in let/var` [SemanticsTodo]
|
||||
// CHECK:STDERR: let (T:! type, U:! type);
|
||||
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
let (T:! type, U:! type);
|
||||
|
||||
+2
-2
@@ -9,11 +9,11 @@
|
||||
// TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/check/testdata/interface/no_prelude/fail_assoc_const_not_constant.carbon
|
||||
|
||||
interface I {
|
||||
// CHECK:STDERR: fail_assoc_const_not_constant.carbon:[[@LINE+7]]:7: error(ExpectedSymbolicBindingInAssociatedConstant): pattern in associated constant declaration must be a single `:!` binding
|
||||
// CHECK:STDERR: fail_assoc_const_not_constant.carbon:[[@LINE+7]]:7: error: pattern in associated constant declaration must be a single `:!` binding [ExpectedSymbolicBindingInAssociatedConstant]
|
||||
// CHECK:STDERR: let a: i32;
|
||||
// CHECK:STDERR: ^
|
||||
// CHECK:STDERR:
|
||||
// CHECK:STDERR: fail_assoc_const_not_constant.carbon:[[@LINE+3]]:10: error(CoreNotFound): package `Core` implicitly referenced here, but not found
|
||||
// CHECK:STDERR: fail_assoc_const_not_constant.carbon:[[@LINE+3]]:10: error: package `Core` implicitly referenced here, but not found [CoreNotFound]
|
||||
// CHECK:STDERR: let a: i32;
|
||||
// CHECK:STDERR: ^~~
|
||||
let a: i32;
|
||||
|
||||
+1
-1
@@ -9,7 +9,7 @@
|
||||
// TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/check/testdata/interface/no_prelude/fail_assoc_const_template.carbon
|
||||
|
||||
interface I {
|
||||
// CHECK:STDERR: fail_assoc_const_template.carbon:[[@LINE+3]]:7: error(SemanticsTodo): semantics TODO: `HandleTemplate`
|
||||
// CHECK:STDERR: fail_assoc_const_template.carbon:[[@LINE+3]]:7: error: semantics TODO: `HandleTemplate` [SemanticsTodo]
|
||||
// CHECK:STDERR: let template T:! type;
|
||||
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~
|
||||
let template T:! type;
|
||||
|
||||
+3
-3
@@ -19,11 +19,11 @@ interface I;
|
||||
library "[[@TEST_NAME]]";
|
||||
import library "a";
|
||||
|
||||
// CHECK:STDERR: fail_b.carbon:[[@LINE+7]]:1: error(NameDeclDuplicate): duplicate name being declared in the same scope
|
||||
// CHECK:STDERR: fail_b.carbon:[[@LINE+7]]:1: error: duplicate name being declared in the same scope [NameDeclDuplicate]
|
||||
// CHECK:STDERR: interface I {}
|
||||
// CHECK:STDERR: ^~~~~~~~~~~~~
|
||||
// CHECK:STDERR: fail_b.carbon:[[@LINE-5]]:1(InImport): in import
|
||||
// CHECK:STDERR: a.carbon:4:1: note(NameDeclPrevious): name is previously declared here
|
||||
// CHECK:STDERR: fail_b.carbon:[[@LINE-5]]:1: in import [InImport]
|
||||
// CHECK:STDERR: a.carbon:4:1: note: name is previously declared here [NameDeclPrevious]
|
||||
// CHECK:STDERR: interface I;
|
||||
// CHECK:STDERR: ^~~~~~~~~~~~
|
||||
interface I {}
|
||||
|
||||
@@ -14,10 +14,10 @@ library "[[@TEST_NAME]]";
|
||||
|
||||
interface Interface { }
|
||||
|
||||
// CHECK:STDERR: fail_redefine_without_dependents.carbon:[[@LINE+7]]:1: error(RedeclRedef): redefinition of `interface Interface`
|
||||
// CHECK:STDERR: fail_redefine_without_dependents.carbon:[[@LINE+7]]:1: error: redefinition of `interface Interface` [RedeclRedef]
|
||||
// CHECK:STDERR: interface Interface {
|
||||
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~
|
||||
// CHECK:STDERR: fail_redefine_without_dependents.carbon:[[@LINE-5]]:1: note(RedeclPrevDef): previously defined here
|
||||
// CHECK:STDERR: fail_redefine_without_dependents.carbon:[[@LINE-5]]:1: note: previously defined here [RedeclPrevDef]
|
||||
// CHECK:STDERR: interface Interface { }
|
||||
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~
|
||||
// CHECK:STDERR:
|
||||
@@ -31,10 +31,10 @@ library "[[@TEST_NAME]]";
|
||||
|
||||
interface Interface {}
|
||||
|
||||
// CHECK:STDERR: fail_redefine_with_dependents.carbon:[[@LINE+7]]:1: error(RedeclRedef): redefinition of `interface Interface`
|
||||
// CHECK:STDERR: fail_redefine_with_dependents.carbon:[[@LINE+7]]:1: error: redefinition of `interface Interface` [RedeclRedef]
|
||||
// CHECK:STDERR: interface Interface {
|
||||
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~
|
||||
// CHECK:STDERR: fail_redefine_with_dependents.carbon:[[@LINE-5]]:1: note(RedeclPrevDef): previously defined here
|
||||
// CHECK:STDERR: fail_redefine_with_dependents.carbon:[[@LINE-5]]:1: note: previously defined here [RedeclPrevDef]
|
||||
// CHECK:STDERR: interface Interface {}
|
||||
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~
|
||||
// CHECK:STDERR:
|
||||
@@ -48,10 +48,10 @@ library "[[@TEST_NAME]]";
|
||||
|
||||
fn Function();
|
||||
|
||||
// CHECK:STDERR: fail_name_conflict_with_fn.carbon:[[@LINE+7]]:1: error(NameDeclDuplicate): duplicate name being declared in the same scope
|
||||
// CHECK:STDERR: fail_name_conflict_with_fn.carbon:[[@LINE+7]]:1: error: duplicate name being declared in the same scope [NameDeclDuplicate]
|
||||
// CHECK:STDERR: interface Function;
|
||||
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~
|
||||
// CHECK:STDERR: fail_name_conflict_with_fn.carbon:[[@LINE-5]]:1: note(NameDeclPrevious): name is previously declared here
|
||||
// CHECK:STDERR: fail_name_conflict_with_fn.carbon:[[@LINE-5]]:1: note: name is previously declared here [NameDeclPrevious]
|
||||
// CHECK:STDERR: fn Function();
|
||||
// CHECK:STDERR: ^~~~~~~~~~~~~~
|
||||
// CHECK:STDERR:
|
||||
@@ -61,10 +61,10 @@ interface Function;
|
||||
|
||||
class Class;
|
||||
|
||||
// CHECK:STDERR: fail_name_conflict_with_class.carbon:[[@LINE+6]]:1: error(NameDeclDuplicate): duplicate name being declared in the same scope
|
||||
// CHECK:STDERR: fail_name_conflict_with_class.carbon:[[@LINE+6]]:1: error: duplicate name being declared in the same scope [NameDeclDuplicate]
|
||||
// CHECK:STDERR: interface Class { }
|
||||
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~
|
||||
// CHECK:STDERR: fail_name_conflict_with_class.carbon:[[@LINE-5]]:1: note(NameDeclPrevious): name is previously declared here
|
||||
// CHECK:STDERR: fail_name_conflict_with_class.carbon:[[@LINE-5]]:1: note: name is previously declared here [NameDeclPrevious]
|
||||
// CHECK:STDERR: class Class;
|
||||
// CHECK:STDERR: ^~~~~~~~~~~~
|
||||
interface Class { }
|
||||
|
||||
+6
-6
@@ -9,30 +9,30 @@
|
||||
// TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/check/testdata/interface/no_prelude/fail_generic_redeclaration.carbon
|
||||
|
||||
interface NotGeneric;
|
||||
// CHECK:STDERR: fail_generic_redeclaration.carbon:[[@LINE+7]]:1: error(RedeclParamListDiffers): redeclaration differs because of parameter list
|
||||
// CHECK:STDERR: fail_generic_redeclaration.carbon:[[@LINE+7]]:1: error: redeclaration differs because of parameter list [RedeclParamListDiffers]
|
||||
// CHECK:STDERR: interface NotGeneric(T:! type) {}
|
||||
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// CHECK:STDERR: fail_generic_redeclaration.carbon:[[@LINE-4]]:1: note(RedeclParamListPrevious): previously declared without parameter list
|
||||
// CHECK:STDERR: fail_generic_redeclaration.carbon:[[@LINE-4]]:1: note: previously declared without parameter list [RedeclParamListPrevious]
|
||||
// CHECK:STDERR: interface NotGeneric;
|
||||
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~
|
||||
// CHECK:STDERR:
|
||||
interface NotGeneric(T:! type) {}
|
||||
|
||||
interface Generic(T:! type);
|
||||
// CHECK:STDERR: fail_generic_redeclaration.carbon:[[@LINE+7]]:1: error(RedeclParamListDiffers): redeclaration differs because of missing parameter list
|
||||
// CHECK:STDERR: fail_generic_redeclaration.carbon:[[@LINE+7]]:1: error: redeclaration differs because of missing parameter list [RedeclParamListDiffers]
|
||||
// CHECK:STDERR: interface Generic {}
|
||||
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~
|
||||
// CHECK:STDERR: fail_generic_redeclaration.carbon:[[@LINE-4]]:1: note(RedeclParamListPrevious): previously declared with parameter list
|
||||
// CHECK:STDERR: fail_generic_redeclaration.carbon:[[@LINE-4]]:1: note: previously declared with parameter list [RedeclParamListPrevious]
|
||||
// CHECK:STDERR: interface Generic(T:! type);
|
||||
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// CHECK:STDERR:
|
||||
interface Generic {}
|
||||
|
||||
interface DifferentParams(T:! type);
|
||||
// CHECK:STDERR: fail_generic_redeclaration.carbon:[[@LINE+6]]:27: error(RedeclParamDiffers): redeclaration differs at parameter 1
|
||||
// CHECK:STDERR: fail_generic_redeclaration.carbon:[[@LINE+6]]:27: error: redeclaration differs at parameter 1 [RedeclParamDiffers]
|
||||
// CHECK:STDERR: interface DifferentParams(T:! ()) {}
|
||||
// CHECK:STDERR: ^~~~~~
|
||||
// CHECK:STDERR: fail_generic_redeclaration.carbon:[[@LINE-4]]:27: note(RedeclParamPrevious): previous declaration's corresponding parameter here
|
||||
// CHECK:STDERR: fail_generic_redeclaration.carbon:[[@LINE-4]]:27: note: previous declaration's corresponding parameter here [RedeclParamPrevious]
|
||||
// CHECK:STDERR: interface DifferentParams(T:! type);
|
||||
// CHECK:STDERR: ^~~~~~~~
|
||||
interface DifferentParams(T:! ()) {}
|
||||
|
||||
@@ -10,20 +10,20 @@
|
||||
|
||||
interface Undefined;
|
||||
|
||||
// CHECK:STDERR: fail_lookup_undefined.carbon:[[@LINE+7]]:4: error(QualifiedDeclInUndefinedInterfaceScope): cannot declare a member of undefined interface `Undefined`
|
||||
// CHECK:STDERR: fail_lookup_undefined.carbon:[[@LINE+7]]:4: error: cannot declare a member of undefined interface `Undefined` [QualifiedDeclInUndefinedInterfaceScope]
|
||||
// CHECK:STDERR: fn Undefined.F();
|
||||
// CHECK:STDERR: ^~~~~~~~~
|
||||
// CHECK:STDERR: fail_lookup_undefined.carbon:[[@LINE-5]]:1: note(InterfaceForwardDeclaredHere): interface was forward declared here
|
||||
// CHECK:STDERR: fail_lookup_undefined.carbon:[[@LINE-5]]:1: note: interface was forward declared here [InterfaceForwardDeclaredHere]
|
||||
// CHECK:STDERR: interface Undefined;
|
||||
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~
|
||||
// CHECK:STDERR:
|
||||
fn Undefined.F();
|
||||
|
||||
fn Test() {
|
||||
// CHECK:STDERR: fail_lookup_undefined.carbon:[[@LINE+7]]:3: error(QualifiedExprInUndefinedInterfaceScope): member access into undefined interface `Undefined`
|
||||
// CHECK:STDERR: fail_lookup_undefined.carbon:[[@LINE+7]]:3: error: member access into undefined interface `Undefined` [QualifiedExprInUndefinedInterfaceScope]
|
||||
// CHECK:STDERR: Undefined.G();
|
||||
// CHECK:STDERR: ^~~~~~~~~~~
|
||||
// CHECK:STDERR: fail_lookup_undefined.carbon:[[@LINE-15]]:1: note(InterfaceForwardDeclaredHere): interface was forward declared here
|
||||
// CHECK:STDERR: fail_lookup_undefined.carbon:[[@LINE-15]]:1: note: interface was forward declared here [InterfaceForwardDeclaredHere]
|
||||
// CHECK:STDERR: interface Undefined;
|
||||
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~
|
||||
// CHECK:STDERR:
|
||||
@@ -31,19 +31,19 @@ fn Test() {
|
||||
}
|
||||
|
||||
interface BeingDefined {
|
||||
// CHECK:STDERR: fail_lookup_undefined.carbon:[[@LINE+11]]:13: error(QualifiedExprInUndefinedInterfaceScope): member access into undefined interface `BeingDefined`
|
||||
// CHECK:STDERR: fail_lookup_undefined.carbon:[[@LINE+11]]:13: error: member access into undefined interface `BeingDefined` [QualifiedExprInUndefinedInterfaceScope]
|
||||
// CHECK:STDERR: fn H() -> BeingDefined.T;
|
||||
// CHECK:STDERR: ^~~~~~~~~~~~~~
|
||||
// CHECK:STDERR: fail_lookup_undefined.carbon:[[@LINE-4]]:1: note(InterfaceUndefinedWithinDefinition): interface is currently being defined
|
||||
// CHECK:STDERR: fail_lookup_undefined.carbon:[[@LINE-4]]:1: note: interface is currently being defined [InterfaceUndefinedWithinDefinition]
|
||||
// CHECK:STDERR: interface BeingDefined {
|
||||
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// CHECK:STDERR:
|
||||
// CHECK:STDERR: fail_lookup_undefined.carbon:[[@LINE+4]]:13: error(NameNotFound): name `T` not found
|
||||
// CHECK:STDERR: fail_lookup_undefined.carbon:[[@LINE+4]]:13: error: name `T` not found [NameNotFound]
|
||||
// CHECK:STDERR: fn H() -> BeingDefined.T;
|
||||
// CHECK:STDERR: ^~~~~~~~~~~~~~
|
||||
// CHECK:STDERR:
|
||||
fn H() -> BeingDefined.T;
|
||||
// CHECK:STDERR: fail_lookup_undefined.carbon:[[@LINE+3]]:6: error(NameNotFound): name `BeingDefined` not found
|
||||
// CHECK:STDERR: fail_lookup_undefined.carbon:[[@LINE+3]]:6: error: name `BeingDefined` not found [NameNotFound]
|
||||
// CHECK:STDERR: fn BeingDefined.I();
|
||||
// CHECK:STDERR: ^~~~~~~~~~~~
|
||||
fn BeingDefined.I();
|
||||
|
||||
@@ -15,13 +15,13 @@ interface Interface {
|
||||
}
|
||||
|
||||
fn F() {
|
||||
// CHECK:STDERR: fail_member_lookup.carbon:[[@LINE+4]]:3: error(CallToNonCallable): value of type `<associated <type of F> in Interface>` is not callable
|
||||
// CHECK:STDERR: fail_member_lookup.carbon:[[@LINE+4]]:3: error: value of type `<associated <type of F> in Interface>` is not callable [CallToNonCallable]
|
||||
// CHECK:STDERR: Interface.F();
|
||||
// CHECK:STDERR: ^~~~~~~~~~~~
|
||||
// CHECK:STDERR:
|
||||
Interface.F();
|
||||
|
||||
// CHECK:STDERR: fail_member_lookup.carbon:[[@LINE+3]]:10: error(CoreNotFound): package `Core` implicitly referenced here, but not found
|
||||
// CHECK:STDERR: fail_member_lookup.carbon:[[@LINE+3]]:10: error: package `Core` implicitly referenced here, but not found [CoreNotFound]
|
||||
// CHECK:STDERR: var v: Interface.T;
|
||||
// CHECK:STDERR: ^~~~~~~~~~~
|
||||
var v: Interface.T;
|
||||
|
||||
@@ -8,27 +8,27 @@
|
||||
// TIP: To dump output, run:
|
||||
// TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/check/testdata/interface/no_prelude/fail_modifiers.carbon
|
||||
|
||||
// CHECK:STDERR: fail_modifiers.carbon:[[@LINE+4]]:1: error(ModifierNotAllowedOnDeclaration): `abstract` not allowed on `interface` declaration
|
||||
// CHECK:STDERR: fail_modifiers.carbon:[[@LINE+4]]:1: error: `abstract` not allowed on `interface` declaration [ModifierNotAllowedOnDeclaration]
|
||||
// CHECK:STDERR: abstract interface Abstract {
|
||||
// CHECK:STDERR: ^~~~~~~~
|
||||
// CHECK:STDERR:
|
||||
abstract interface Abstract {
|
||||
}
|
||||
|
||||
// CHECK:STDERR: fail_modifiers.carbon:[[@LINE+4]]:1: error(ModifierNotAllowedOnDeclaration): `default` not allowed on `interface` declaration
|
||||
// CHECK:STDERR: fail_modifiers.carbon:[[@LINE+4]]:1: error: `default` not allowed on `interface` declaration [ModifierNotAllowedOnDeclaration]
|
||||
// CHECK:STDERR: default interface Default;
|
||||
// CHECK:STDERR: ^~~~~~~
|
||||
// CHECK:STDERR:
|
||||
default interface Default;
|
||||
|
||||
// CHECK:STDERR: fail_modifiers.carbon:[[@LINE+4]]:1: error(ModifierNotAllowedOnDeclaration): `virtual` not allowed on `interface` declaration
|
||||
// CHECK:STDERR: fail_modifiers.carbon:[[@LINE+4]]:1: error: `virtual` not allowed on `interface` declaration [ModifierNotAllowedOnDeclaration]
|
||||
// CHECK:STDERR: virtual interface Virtual {
|
||||
// CHECK:STDERR: ^~~~~~~
|
||||
// CHECK:STDERR:
|
||||
virtual interface Virtual {
|
||||
}
|
||||
|
||||
// CHECK:STDERR: fail_modifiers.carbon:[[@LINE+3]]:1: error(ModifierProtectedNotAllowed): `protected` not allowed; requires class scope
|
||||
// CHECK:STDERR: fail_modifiers.carbon:[[@LINE+3]]:1: error: `protected` not allowed; requires class scope [ModifierProtectedNotAllowed]
|
||||
// CHECK:STDERR: protected interface Protected;
|
||||
// CHECK:STDERR: ^~~~~~~~~
|
||||
protected interface Protected;
|
||||
|
||||
@@ -10,10 +10,10 @@
|
||||
|
||||
interface Interface {
|
||||
fn F();
|
||||
// CHECK:STDERR: fail_redeclare_member.carbon:[[@LINE+6]]:3: error(NameDeclDuplicate): duplicate name being declared in the same scope
|
||||
// CHECK:STDERR: fail_redeclare_member.carbon:[[@LINE+6]]:3: error: duplicate name being declared in the same scope [NameDeclDuplicate]
|
||||
// CHECK:STDERR: fn F();
|
||||
// CHECK:STDERR: ^~~~~~~
|
||||
// CHECK:STDERR: fail_redeclare_member.carbon:[[@LINE-4]]:3: note(NameDeclPrevious): name is previously declared here
|
||||
// CHECK:STDERR: fail_redeclare_member.carbon:[[@LINE-4]]:3: note: name is previously declared here [NameDeclPrevious]
|
||||
// CHECK:STDERR: fn F();
|
||||
// CHECK:STDERR: ^~~~~~~
|
||||
fn F();
|
||||
|
||||
+2
-2
@@ -11,7 +11,7 @@
|
||||
interface Interface { fn F(); }
|
||||
|
||||
fn CallStatic(T:! Interface) {
|
||||
// CHECK:STDERR: fail_todo_facet_lookup.carbon:[[@LINE+4]]:3: error(CallToNonCallable): value of type `<associated <type of F> in Interface>` is not callable
|
||||
// CHECK:STDERR: fail_todo_facet_lookup.carbon:[[@LINE+4]]:3: error: value of type `<associated <type of F> in Interface>` is not callable [CallToNonCallable]
|
||||
// CHECK:STDERR: T.F();
|
||||
// CHECK:STDERR: ^~~~
|
||||
// CHECK:STDERR:
|
||||
@@ -19,7 +19,7 @@ fn CallStatic(T:! Interface) {
|
||||
}
|
||||
|
||||
fn CallFacet(T:! Interface, x: T) {
|
||||
// CHECK:STDERR: fail_todo_facet_lookup.carbon:[[@LINE+3]]:3: error(QualifiedExprUnsupported): type `T` does not support qualified expressions
|
||||
// CHECK:STDERR: fail_todo_facet_lookup.carbon:[[@LINE+3]]:3: error: type `T` does not support qualified expressions [QualifiedExprUnsupported]
|
||||
// CHECK:STDERR: x.F();
|
||||
// CHECK:STDERR: ^~~
|
||||
x.F();
|
||||
|
||||
+2
-2
@@ -13,10 +13,10 @@ interface I(T:! type) {
|
||||
fn F[self: Self]() -> Self;
|
||||
}
|
||||
|
||||
// CHECK:STDERR: fail_todo_generic_default_fn.carbon:[[@LINE+6]]:1: error(NameDeclDuplicate): duplicate name being declared in the same scope
|
||||
// CHECK:STDERR: fail_todo_generic_default_fn.carbon:[[@LINE+6]]:1: error: duplicate name being declared in the same scope [NameDeclDuplicate]
|
||||
// CHECK:STDERR: fn I(T:! type).F[self: Self]() -> Self { return self; }
|
||||
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// CHECK:STDERR: fail_todo_generic_default_fn.carbon:[[@LINE-6]]:3: note(NameDeclPrevious): name is previously declared here
|
||||
// CHECK:STDERR: fail_todo_generic_default_fn.carbon:[[@LINE-6]]:3: note: name is previously declared here [NameDeclPrevious]
|
||||
// CHECK:STDERR: fn F[self: Self]() -> Self;
|
||||
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
fn I(T:! type).F[self: Self]() -> Self { return self; }
|
||||
|
||||
@@ -9,12 +9,12 @@
|
||||
// TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/check/testdata/interface/no_prelude/fail_todo_modifiers.carbon
|
||||
|
||||
interface Modifiers {
|
||||
// CHECK:STDERR: fail_todo_modifiers.carbon:[[@LINE+4]]:3: error(SemanticsTodo): semantics TODO: `interface modifier`
|
||||
// CHECK:STDERR: fail_todo_modifiers.carbon:[[@LINE+4]]:3: error: semantics TODO: `interface modifier` [SemanticsTodo]
|
||||
// CHECK:STDERR: final fn Final() { }
|
||||
// CHECK:STDERR: ^~~~~
|
||||
// CHECK:STDERR:
|
||||
final fn Final() { }
|
||||
// CHECK:STDERR: fail_todo_modifiers.carbon:[[@LINE+3]]:3: error(SemanticsTodo): semantics TODO: `interface modifier`
|
||||
// CHECK:STDERR: fail_todo_modifiers.carbon:[[@LINE+3]]:3: error: semantics TODO: `interface modifier` [SemanticsTodo]
|
||||
// CHECK:STDERR: default fn Default() { }
|
||||
// CHECK:STDERR: ^~~~~~~
|
||||
default fn Default() { }
|
||||
|
||||
@@ -49,10 +49,10 @@ class B {}
|
||||
fn F(T:! Generic(A));
|
||||
fn G(T:! Generic(B)) {
|
||||
// TODO: Include generic arguments in the type name.
|
||||
// CHECK:STDERR: fail_mismatched_args.carbon:[[@LINE+6]]:3: error(CoreNotFound): package `Core` implicitly referenced here, but not found
|
||||
// CHECK:STDERR: fail_mismatched_args.carbon:[[@LINE+6]]:3: error: package `Core` implicitly referenced here, but not found [CoreNotFound]
|
||||
// CHECK:STDERR: F(T);
|
||||
// CHECK:STDERR: ^~
|
||||
// CHECK:STDERR: fail_mismatched_args.carbon:[[@LINE-6]]:1: note(DeductionGenericHere): while deducing parameters of generic declared here
|
||||
// CHECK:STDERR: fail_mismatched_args.carbon:[[@LINE-6]]:1: note: while deducing parameters of generic declared here [DeductionGenericHere]
|
||||
// CHECK:STDERR: fn F(T:! Generic(A));
|
||||
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~
|
||||
F(T);
|
||||
|
||||
@@ -32,7 +32,7 @@ impl X as C(X).GenericAndParams(X) {}
|
||||
|
||||
library "[[@TEST_NAME]]";
|
||||
|
||||
// CHECK:STDERR: fail_non_generic_implicit_params.carbon:[[@LINE+4]]:13: error(GenericParamMustBeConstant): parameters of generic types must be constant
|
||||
// CHECK:STDERR: fail_non_generic_implicit_params.carbon:[[@LINE+4]]:13: error: parameters of generic types must be constant [GenericParamMustBeConstant]
|
||||
// CHECK:STDERR: interface A[T: type]() {}
|
||||
// CHECK:STDERR: ^~~~~~~
|
||||
// CHECK:STDERR:
|
||||
@@ -42,7 +42,7 @@ interface A[T: type]() {}
|
||||
|
||||
library "[[@TEST_NAME]]";
|
||||
|
||||
// CHECK:STDERR: fail_non_generic_params.carbon:[[@LINE+3]]:13: error(GenericParamMustBeConstant): parameters of generic types must be constant
|
||||
// CHECK:STDERR: fail_non_generic_params.carbon:[[@LINE+3]]:13: error: parameters of generic types must be constant [GenericParamMustBeConstant]
|
||||
// CHECK:STDERR: interface A(T: type) {}
|
||||
// CHECK:STDERR: ^~~~~~~
|
||||
interface A(T: type) {}
|
||||
|
||||
@@ -49,7 +49,7 @@ package Test library "[[@TEST_NAME]]";
|
||||
|
||||
import library "def";
|
||||
|
||||
// CHECK:STDERR: fail_local_def.carbon:[[@LINE+4]]:9: error(NameNotFound): name `Def` not found
|
||||
// CHECK:STDERR: fail_local_def.carbon:[[@LINE+4]]:9: error: name `Def` not found [NameNotFound]
|
||||
// CHECK:STDERR: fn F(i: Def) {}
|
||||
// CHECK:STDERR: ^~~
|
||||
// CHECK:STDERR:
|
||||
@@ -61,7 +61,7 @@ package Other library "[[@TEST_NAME]]";
|
||||
|
||||
import Test library "def";
|
||||
|
||||
// CHECK:STDERR: fail_other_def.carbon:[[@LINE+4]]:9: error(NameNotFound): name `Def` not found
|
||||
// CHECK:STDERR: fail_other_def.carbon:[[@LINE+4]]:9: error: name `Def` not found [NameNotFound]
|
||||
// CHECK:STDERR: fn F(i: Test.Def) {}
|
||||
// CHECK:STDERR: ^~~~~~~~
|
||||
// CHECK:STDERR:
|
||||
@@ -79,7 +79,7 @@ package Test library "[[@TEST_NAME]]";
|
||||
|
||||
import library "forward_with_def";
|
||||
|
||||
// CHECK:STDERR: fail_local_forward_with_def.carbon:[[@LINE+4]]:9: error(NameNotFound): name `ForwardWithDef` not found
|
||||
// CHECK:STDERR: fail_local_forward_with_def.carbon:[[@LINE+4]]:9: error: name `ForwardWithDef` not found [NameNotFound]
|
||||
// CHECK:STDERR: fn F(i: ForwardWithDef) {}
|
||||
// CHECK:STDERR: ^~~~~~~~~~~~~~
|
||||
// CHECK:STDERR:
|
||||
@@ -91,7 +91,7 @@ package Other library "[[@TEST_NAME]]";
|
||||
|
||||
import Test library "forward_with_def";
|
||||
|
||||
// CHECK:STDERR: fail_other_forward_with_def.carbon:[[@LINE+4]]:9: error(NameNotFound): name `ForwardWithDef` not found
|
||||
// CHECK:STDERR: fail_other_forward_with_def.carbon:[[@LINE+4]]:9: error: name `ForwardWithDef` not found [NameNotFound]
|
||||
// CHECK:STDERR: fn F(i: Test.ForwardWithDef) {}
|
||||
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~
|
||||
// CHECK:STDERR:
|
||||
@@ -101,7 +101,7 @@ fn F(i: Test.ForwardWithDef) {}
|
||||
|
||||
impl package Test library "[[@TEST_NAME]]";
|
||||
|
||||
// CHECK:STDERR: fail_todo_forward.impl.carbon:[[@LINE+4]]:9: error(NameNotFound): name `Forward` not found
|
||||
// CHECK:STDERR: fail_todo_forward.impl.carbon:[[@LINE+4]]:9: error: name `Forward` not found [NameNotFound]
|
||||
// CHECK:STDERR: fn F(i: Forward*) {}
|
||||
// CHECK:STDERR: ^~~~~~~
|
||||
// CHECK:STDERR:
|
||||
@@ -115,7 +115,7 @@ package Test library "[[@TEST_NAME]]";
|
||||
|
||||
import library "forward";
|
||||
|
||||
// CHECK:STDERR: fail_local_forward.carbon:[[@LINE+4]]:9: error(NameNotFound): name `Forward` not found
|
||||
// CHECK:STDERR: fail_local_forward.carbon:[[@LINE+4]]:9: error: name `Forward` not found [NameNotFound]
|
||||
// CHECK:STDERR: fn F(i: Forward*) {}
|
||||
// CHECK:STDERR: ^~~~~~~
|
||||
// CHECK:STDERR:
|
||||
@@ -127,7 +127,7 @@ package Other library "[[@TEST_NAME]]";
|
||||
|
||||
import Test library "forward";
|
||||
|
||||
// CHECK:STDERR: fail_other_forward.carbon:[[@LINE+3]]:9: error(NameNotFound): name `Forward` not found
|
||||
// CHECK:STDERR: fail_other_forward.carbon:[[@LINE+3]]:9: error: name `Forward` not found [NameNotFound]
|
||||
// CHECK:STDERR: fn F(i: Forward*) {}
|
||||
// CHECK:STDERR: ^~~~~~~
|
||||
fn F(i: Forward*) {}
|
||||
|
||||
@@ -37,10 +37,10 @@ library "[[@TEST_NAME]]";
|
||||
class C {}
|
||||
|
||||
interface Foo(a:! C);
|
||||
// CHECK:STDERR: fail_parens.carbon:[[@LINE+7]]:19: error(RedeclParamSyntaxDiffers): redeclaration syntax differs here
|
||||
// CHECK:STDERR: fail_parens.carbon:[[@LINE+7]]:19: error: redeclaration syntax differs here [RedeclParamSyntaxDiffers]
|
||||
// CHECK:STDERR: interface Foo(a:! (C)) {}
|
||||
// CHECK:STDERR: ^
|
||||
// CHECK:STDERR: fail_parens.carbon:[[@LINE-4]]:19: note(RedeclParamSyntaxPrevious): comparing with previous declaration here
|
||||
// CHECK:STDERR: fail_parens.carbon:[[@LINE-4]]:19: note: comparing with previous declaration here [RedeclParamSyntaxPrevious]
|
||||
// CHECK:STDERR: interface Foo(a:! C);
|
||||
// CHECK:STDERR: ^
|
||||
// CHECK:STDERR:
|
||||
@@ -69,20 +69,20 @@ interface Bar(a:! D);
|
||||
|
||||
impl library "[[@TEST_NAME]]";
|
||||
|
||||
// CHECK:STDERR: fail_todo_two_file.impl.carbon:[[@LINE+8]]:1: error(NameDeclDuplicate): duplicate name being declared in the same scope
|
||||
// CHECK:STDERR: fail_todo_two_file.impl.carbon:[[@LINE+8]]:1: error: duplicate name being declared in the same scope [NameDeclDuplicate]
|
||||
// CHECK:STDERR: interface Foo(a:! C) {}
|
||||
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~
|
||||
// CHECK:STDERR: fail_todo_two_file.impl.carbon:[[@LINE-5]]:6(InImport): in import
|
||||
// CHECK:STDERR: two_file.carbon:7:1: note(NameDeclPrevious): name is previously declared here
|
||||
// CHECK:STDERR: fail_todo_two_file.impl.carbon:[[@LINE-5]]:6: in import [InImport]
|
||||
// CHECK:STDERR: two_file.carbon:7:1: note: name is previously declared here [NameDeclPrevious]
|
||||
// CHECK:STDERR: interface Foo(a:! C);
|
||||
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~
|
||||
// CHECK:STDERR:
|
||||
interface Foo(a:! C) {}
|
||||
// CHECK:STDERR: fail_todo_two_file.impl.carbon:[[@LINE+8]]:1: error(NameDeclDuplicate): duplicate name being declared in the same scope
|
||||
// CHECK:STDERR: fail_todo_two_file.impl.carbon:[[@LINE+8]]:1: error: duplicate name being declared in the same scope [NameDeclDuplicate]
|
||||
// CHECK:STDERR: interface Bar(a:! D) {}
|
||||
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~
|
||||
// CHECK:STDERR: fail_todo_two_file.impl.carbon:[[@LINE-14]]:6(InImport): in import
|
||||
// CHECK:STDERR: two_file.carbon:8:1: note(NameDeclPrevious): name is previously declared here
|
||||
// CHECK:STDERR: fail_todo_two_file.impl.carbon:[[@LINE-14]]:6: in import [InImport]
|
||||
// CHECK:STDERR: two_file.carbon:8:1: note: name is previously declared here [NameDeclPrevious]
|
||||
// CHECK:STDERR: interface Bar(a:! D);
|
||||
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~
|
||||
// CHECK:STDERR:
|
||||
@@ -96,10 +96,10 @@ class C {}
|
||||
alias D = C;
|
||||
|
||||
interface Foo(a:! C);
|
||||
// CHECK:STDERR: fail_name_mismatch.carbon:[[@LINE+7]]:15: error(RedeclParamDiffers): redeclaration differs at parameter 1
|
||||
// CHECK:STDERR: fail_name_mismatch.carbon:[[@LINE+7]]:15: error: redeclaration differs at parameter 1 [RedeclParamDiffers]
|
||||
// CHECK:STDERR: interface Foo(b:! D) {}
|
||||
// CHECK:STDERR: ^~~~~
|
||||
// CHECK:STDERR: fail_name_mismatch.carbon:[[@LINE-4]]:15: note(RedeclParamPrevious): previous declaration's corresponding parameter here
|
||||
// CHECK:STDERR: fail_name_mismatch.carbon:[[@LINE-4]]:15: note: previous declaration's corresponding parameter here [RedeclParamPrevious]
|
||||
// CHECK:STDERR: interface Foo(a:! C);
|
||||
// CHECK:STDERR: ^~~~~
|
||||
// CHECK:STDERR:
|
||||
@@ -113,10 +113,10 @@ class C {}
|
||||
alias D = C;
|
||||
|
||||
interface Foo(a:! C);
|
||||
// CHECK:STDERR: fail_alias.carbon:[[@LINE+7]]:19: error(RedeclParamSyntaxDiffers): redeclaration syntax differs here
|
||||
// CHECK:STDERR: fail_alias.carbon:[[@LINE+7]]:19: error: redeclaration syntax differs here [RedeclParamSyntaxDiffers]
|
||||
// CHECK:STDERR: interface Foo(a:! D) {}
|
||||
// CHECK:STDERR: ^
|
||||
// CHECK:STDERR: fail_alias.carbon:[[@LINE-4]]:19: note(RedeclParamSyntaxPrevious): comparing with previous declaration here
|
||||
// CHECK:STDERR: fail_alias.carbon:[[@LINE-4]]:19: note: comparing with previous declaration here [RedeclParamSyntaxPrevious]
|
||||
// CHECK:STDERR: interface Foo(a:! C);
|
||||
// CHECK:STDERR: ^
|
||||
// CHECK:STDERR:
|
||||
@@ -130,10 +130,10 @@ class C {}
|
||||
alias D = C;
|
||||
|
||||
interface Foo[a:! C]();
|
||||
// CHECK:STDERR: fail_deduced_alias.carbon:[[@LINE+7]]:19: error(RedeclParamSyntaxDiffers): redeclaration syntax differs here
|
||||
// CHECK:STDERR: fail_deduced_alias.carbon:[[@LINE+7]]:19: error: redeclaration syntax differs here [RedeclParamSyntaxDiffers]
|
||||
// CHECK:STDERR: interface Foo[a:! D]() {}
|
||||
// CHECK:STDERR: ^
|
||||
// CHECK:STDERR: fail_deduced_alias.carbon:[[@LINE-4]]:19: note(RedeclParamSyntaxPrevious): comparing with previous declaration here
|
||||
// CHECK:STDERR: fail_deduced_alias.carbon:[[@LINE-4]]:19: note: comparing with previous declaration here [RedeclParamSyntaxPrevious]
|
||||
// CHECK:STDERR: interface Foo[a:! C]();
|
||||
// CHECK:STDERR: ^
|
||||
// CHECK:STDERR:
|
||||
@@ -156,11 +156,11 @@ alias D = C;
|
||||
// TODO: This fails because importing interfaces doesn't work well. It should
|
||||
// fail due to `C` versus `D`, but may succeed if importing interfaces is fixed
|
||||
// before syntax matching on imports is supported.
|
||||
// CHECK:STDERR: fail_alias_two_file.impl.carbon:[[@LINE+8]]:1: error(NameDeclDuplicate): duplicate name being declared in the same scope
|
||||
// CHECK:STDERR: fail_alias_two_file.impl.carbon:[[@LINE+8]]:1: error: duplicate name being declared in the same scope [NameDeclDuplicate]
|
||||
// CHECK:STDERR: interface Foo(a:! D) {}
|
||||
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~
|
||||
// CHECK:STDERR: fail_alias_two_file.impl.carbon:[[@LINE-10]]:6(InImport): in import
|
||||
// CHECK:STDERR: alias_two_file.carbon:6:1: note(NameDeclPrevious): name is previously declared here
|
||||
// CHECK:STDERR: fail_alias_two_file.impl.carbon:[[@LINE-10]]:6: in import [InImport]
|
||||
// CHECK:STDERR: alias_two_file.carbon:6:1: note: name is previously declared here [NameDeclPrevious]
|
||||
// CHECK:STDERR: interface Foo(a:! C);
|
||||
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~
|
||||
// CHECK:STDERR:
|
||||
@@ -173,14 +173,14 @@ library "[[@TEST_NAME]]";
|
||||
class C {}
|
||||
|
||||
interface Foo(a:! const C);
|
||||
// CHECK:STDERR: fail_repeat_const.carbon:[[@LINE+10]]:19: warning(RepeatedConst): `const` applied repeatedly to the same type has no additional effect
|
||||
// CHECK:STDERR: fail_repeat_const.carbon:[[@LINE+10]]:19: warning: `const` applied repeatedly to the same type has no additional effect [RepeatedConst]
|
||||
// CHECK:STDERR: interface Foo(a:! const (const C)) {}
|
||||
// CHECK:STDERR: ^~~~~~~~~~~~~~~
|
||||
// CHECK:STDERR:
|
||||
// CHECK:STDERR: fail_repeat_const.carbon:[[@LINE+6]]:25: error(RedeclParamSyntaxDiffers): redeclaration syntax differs here
|
||||
// CHECK:STDERR: fail_repeat_const.carbon:[[@LINE+6]]:25: error: redeclaration syntax differs here [RedeclParamSyntaxDiffers]
|
||||
// CHECK:STDERR: interface Foo(a:! const (const C)) {}
|
||||
// CHECK:STDERR: ^
|
||||
// CHECK:STDERR: fail_repeat_const.carbon:[[@LINE-8]]:25: note(RedeclParamSyntaxPrevious): comparing with previous declaration here
|
||||
// CHECK:STDERR: fail_repeat_const.carbon:[[@LINE-8]]:25: note: comparing with previous declaration here [RedeclParamSyntaxPrevious]
|
||||
// CHECK:STDERR: interface Foo(a:! const C);
|
||||
// CHECK:STDERR: ^
|
||||
interface Foo(a:! const (const C)) {}
|
||||
|
||||
Reference in New Issue
Block a user