mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-11-19 12:20:27 +00:00
Include the arguments for a generic class or interface in diagnostics. (#4511)
This can lead to us trying and failing to print certain kinds of constant value, but we can fix that in future changes. Note that `StringifyType` should probably be substantially refactored. For this change I'm trying to leave the overall structure relatively intact, but hopefully this additional formatting support will help guide future refactorings.
This commit is contained in:
1 parent
de9b7d282a
commit
0a6321f492
53 files changed
+583
-91
No files matched your search
@@ -20,7 +20,7 @@ var a: [i32; 39999999999999999993];
|
||||
// CHECK:STDERR: fail_bound_overflow.carbon:[[@LINE+10]]:9: error: cannot implicitly convert from `i32` to `type` [ImplicitAsConversionFailure]
|
||||
// CHECK:STDERR: var b: [1; 39999999999999999993];
|
||||
// CHECK:STDERR: ^
|
||||
// CHECK:STDERR: fail_bound_overflow.carbon:[[@LINE+7]]:9: note: type `i32` does not implement interface `ImplicitAs` [MissingImplInMemberAccessNote]
|
||||
// CHECK:STDERR: fail_bound_overflow.carbon:[[@LINE+7]]:9: note: type `i32` does not implement interface `ImplicitAs(type)` [MissingImplInMemberAccessNote]
|
||||
// CHECK:STDERR: var b: [1; 39999999999999999993];
|
||||
// CHECK:STDERR: ^
|
||||
// CHECK:STDERR:
|
||||
|
||||
+1
-1
@@ -11,7 +11,7 @@
|
||||
// CHECK:STDERR: fail_invalid_type.carbon:[[@LINE+6]]:9: error: cannot implicitly convert from `i32` to `type` [ImplicitAsConversionFailure]
|
||||
// CHECK:STDERR: var a: [1; 1];
|
||||
// CHECK:STDERR: ^
|
||||
// CHECK:STDERR: fail_invalid_type.carbon:[[@LINE+3]]:9: note: type `i32` does not implement interface `ImplicitAs` [MissingImplInMemberAccessNote]
|
||||
// CHECK:STDERR: fail_invalid_type.carbon:[[@LINE+3]]:9: note: type `i32` does not implement interface `ImplicitAs(type)` [MissingImplInMemberAccessNote]
|
||||
// CHECK:STDERR: var a: [1; 1];
|
||||
// CHECK:STDERR: ^
|
||||
var a: [1; 1];
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
// CHECK:STDERR: fail_type_mismatch.carbon:[[@LINE+7]]:19: error: cannot implicitly convert from `String` to `i32` [ImplicitAsConversionFailure]
|
||||
// CHECK:STDERR: var a: [i32; 3] = (1, "Hello", "World");
|
||||
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~
|
||||
// CHECK:STDERR: fail_type_mismatch.carbon:[[@LINE+4]]:19: note: type `String` does not implement interface `ImplicitAs` [MissingImplInMemberAccessNote]
|
||||
// CHECK:STDERR: fail_type_mismatch.carbon:[[@LINE+4]]:19: note: type `String` does not implement interface `ImplicitAs(i32)` [MissingImplInMemberAccessNote]
|
||||
// CHECK:STDERR: var a: [i32; 3] = (1, "Hello", "World");
|
||||
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~
|
||||
// CHECK:STDERR:
|
||||
@@ -21,7 +21,7 @@ var t1: (i32, String, String);
|
||||
// CHECK:STDERR: fail_type_mismatch.carbon:[[@LINE+7]]:19: error: cannot implicitly convert from `String` to `i32` [ImplicitAsConversionFailure]
|
||||
// CHECK:STDERR: var b: [i32; 3] = t1;
|
||||
// CHECK:STDERR: ^~
|
||||
// CHECK:STDERR: fail_type_mismatch.carbon:[[@LINE+4]]:19: note: type `String` does not implement interface `ImplicitAs` [MissingImplInMemberAccessNote]
|
||||
// CHECK:STDERR: fail_type_mismatch.carbon:[[@LINE+4]]:19: note: type `String` does not implement interface `ImplicitAs(i32)` [MissingImplInMemberAccessNote]
|
||||
// CHECK:STDERR: var b: [i32; 3] = t1;
|
||||
// CHECK:STDERR: ^~
|
||||
// CHECK:STDERR:
|
||||
|
||||
Reference in new issue
Block a user