Change conversion diagnostic from saying "value" to "expression" (#5221)

Avoids TODO to make the message change based on the expression category.

Co-authored-by: Josh L <josh11b@users.noreply.github.com>
This commit is contained in:
josh11b
2025-03-31 15:45:58 +00:00
committed by GitHub
co-authored by Josh L
parent 97b234358e
commit 384be1dbe3
42 changed files with 62 additions and 64 deletions
@@ -11,7 +11,7 @@
fn G(a: i32) {}
fn F() {
// CHECK:STDERR: fail_param_type.carbon:[[@LINE+10]]:5: error: cannot implicitly convert value of type `f64` to `i32` [ConversionFailure]
// CHECK:STDERR: fail_param_type.carbon:[[@LINE+10]]:5: error: cannot implicitly convert expression of type `f64` to `i32` [ConversionFailure]
// CHECK:STDERR: G(1.0);
// CHECK:STDERR: ^~~
// CHECK:STDERR: fail_param_type.carbon:[[@LINE+7]]:5: note: type `f64` does not implement interface `Core.ImplicitAs(i32)` [MissingImplInMemberAccessNote]
@@ -11,7 +11,7 @@
fn Foo() -> f64 { return 1.0; }
fn Run() {
// CHECK:STDERR: fail_return_type_mismatch.carbon:[[@LINE+7]]:3: error: cannot implicitly convert value of type `f64` to `i32` [ConversionFailure]
// CHECK:STDERR: fail_return_type_mismatch.carbon:[[@LINE+7]]:3: error: cannot implicitly convert expression of type `f64` to `i32` [ConversionFailure]
// CHECK:STDERR: var x: i32 = Foo();
// CHECK:STDERR: ^~~~~~~~~~
// CHECK:STDERR: fail_return_type_mismatch.carbon:[[@LINE+4]]:3: note: type `f64` does not implement interface `Core.ImplicitAs(i32)` [MissingImplInMemberAccessNote]