mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-05 12:21:06 +01: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:
@@ -14,7 +14,7 @@ fn F() {
|
||||
// CHECK:STDERR: fail_param_type.carbon:[[@LINE+9]]:5: error: cannot implicitly convert from `f64` to `i32` [ImplicitAsConversionFailure]
|
||||
// CHECK:STDERR: G(1.0);
|
||||
// CHECK:STDERR: ^~~
|
||||
// CHECK:STDERR: fail_param_type.carbon:[[@LINE+6]]:5: note: type `f64` does not implement interface `ImplicitAs` [MissingImplInMemberAccessNote]
|
||||
// CHECK:STDERR: fail_param_type.carbon:[[@LINE+6]]:5: note: type `f64` does not implement interface `ImplicitAs(i32)` [MissingImplInMemberAccessNote]
|
||||
// CHECK:STDERR: G(1.0);
|
||||
// CHECK:STDERR: ^~~
|
||||
// CHECK:STDERR: fail_param_type.carbon:[[@LINE-9]]:6: note: initializing function parameter [InCallToFunctionParam]
|
||||
|
||||
@@ -14,7 +14,7 @@ fn Run() {
|
||||
// CHECK:STDERR: fail_return_type_mismatch.carbon:[[@LINE+6]]:3: error: cannot implicitly convert from `f64` to `i32` [ImplicitAsConversionFailure]
|
||||
// CHECK:STDERR: var x: i32 = Foo();
|
||||
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~
|
||||
// CHECK:STDERR: fail_return_type_mismatch.carbon:[[@LINE+3]]:3: note: type `f64` does not implement interface `ImplicitAs` [MissingImplInMemberAccessNote]
|
||||
// CHECK:STDERR: fail_return_type_mismatch.carbon:[[@LINE+3]]:3: note: type `f64` does not implement interface `ImplicitAs(i32)` [MissingImplInMemberAccessNote]
|
||||
// CHECK:STDERR: var x: i32 = Foo();
|
||||
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~
|
||||
var x: i32 = Foo();
|
||||
|
||||
@@ -26,7 +26,7 @@ fn CallNegative() {
|
||||
// CHECK:STDERR: fail_todo_call_monomorphization_error.carbon:[[@LINE+9]]:3: error: cannot implicitly convert from `i32` to `Core.IntLiteral` [ImplicitAsConversionFailure]
|
||||
// CHECK:STDERR: ErrorIfNIsZero(0);
|
||||
// CHECK:STDERR: ^~~~~~~~~~~~~~~
|
||||
// CHECK:STDERR: fail_todo_call_monomorphization_error.carbon:[[@LINE+6]]:3: note: type `i32` does not implement interface `ImplicitAs` [MissingImplInMemberAccessNote]
|
||||
// CHECK:STDERR: fail_todo_call_monomorphization_error.carbon:[[@LINE+6]]:3: note: type `i32` does not implement interface `ImplicitAs(Core.IntLiteral)` [MissingImplInMemberAccessNote]
|
||||
// CHECK:STDERR: ErrorIfNIsZero(0);
|
||||
// CHECK:STDERR: ^~~~~~~~~~~~~~~
|
||||
// CHECK:STDERR: fail_todo_call_monomorphization_error.carbon:[[@LINE-17]]:1: note: while deducing parameters of generic declared here [DeductionGenericHere]
|
||||
|
||||
Reference in New Issue
Block a user