mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-05 21:41:27 +01:00
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:
@@ -8,7 +8,7 @@
|
||||
// TIP: To dump output, run:
|
||||
// TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/check/testdata/array/fail_type_mismatch.carbon
|
||||
|
||||
// CHECK:STDERR: fail_type_mismatch.carbon:[[@LINE+7]]:24: error: cannot implicitly convert value of type `String` to `i32` [ConversionFailure]
|
||||
// CHECK:STDERR: fail_type_mismatch.carbon:[[@LINE+7]]:24: error: cannot implicitly convert expression of type `String` to `i32` [ConversionFailure]
|
||||
// CHECK:STDERR: var a: array(i32, 3) = (1, "Hello", "World");
|
||||
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~
|
||||
// CHECK:STDERR: fail_type_mismatch.carbon:[[@LINE+4]]:24: note: type `String` does not implement interface `Core.ImplicitAs(i32)` [MissingImplInMemberAccessNote]
|
||||
@@ -18,7 +18,7 @@
|
||||
var a: array(i32, 3) = (1, "Hello", "World");
|
||||
|
||||
var t1: (i32, String, String);
|
||||
// CHECK:STDERR: fail_type_mismatch.carbon:[[@LINE+7]]:24: error: cannot implicitly convert value of type `String` to `i32` [ConversionFailure]
|
||||
// CHECK:STDERR: fail_type_mismatch.carbon:[[@LINE+7]]:24: error: cannot implicitly convert expression of type `String` to `i32` [ConversionFailure]
|
||||
// CHECK:STDERR: var b: array(i32, 3) = t1;
|
||||
// CHECK:STDERR: ^~
|
||||
// CHECK:STDERR: fail_type_mismatch.carbon:[[@LINE+4]]:24: note: type `String` does not implement interface `Core.ImplicitAs(i32)` [MissingImplInMemberAccessNote]
|
||||
|
||||
Reference in New Issue
Block a user