Add s plural format to IntAsSelect (#4423)

Per discussion on #toolchain, add "s" as a special-case for the common
plural format.

Note this removes periods from a few diagnostics; the periods shouldn't
be there per message style. Also, while I'm ignoring llvm::StringLiteral
uses, those should be addressed as #4416 -- this'll probably conflict
and make me clean up one or the other.
This commit is contained in:
Jon Ross-Perkins
2024-10-17 19:51:52 +00:00
committed by GitHub
parent 780dd3addc
commit 7c22348461
26 changed files with 81 additions and 62 deletions
+1 -1
View File
@@ -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_out_of_bound.carbon
// CHECK:STDERR: fail_out_of_bound.carbon:[[@LINE+3]]:19: error: cannot initialize array of 1 element(s) from 3 initializer(s)
// CHECK:STDERR: fail_out_of_bound.carbon:[[@LINE+3]]:19: error: cannot initialize array of 1 element from 3 initializers
// CHECK:STDERR: var a: [i32; 1] = (1, 2, 3);
// CHECK:STDERR: ^~~~~~~~~
var a: [i32; 1] = (1, 2, 3);
+2 -2
View File
@@ -27,14 +27,14 @@ var t1: (i32, String, String);
// CHECK:STDERR:
var b: [i32; 3] = t1;
// CHECK:STDERR: fail_type_mismatch.carbon:[[@LINE+4]]:19: error: cannot initialize array of 3 element(s) from 2 initializer(s)
// CHECK:STDERR: fail_type_mismatch.carbon:[[@LINE+4]]:19: error: cannot initialize array of 3 elements from 2 initializers
// CHECK:STDERR: var c: [i32; 3] = (1, 2);
// CHECK:STDERR: ^~~~~~
// CHECK:STDERR:
var c: [i32; 3] = (1, 2);
var t2: (i32, i32);
// CHECK:STDERR: fail_type_mismatch.carbon:[[@LINE+3]]:19: error: cannot initialize array of 3 element(s) from tuple with 2 element(s).
// CHECK:STDERR: fail_type_mismatch.carbon:[[@LINE+3]]:19: error: cannot initialize array of 3 elements from tuple with 2 elements
// CHECK:STDERR: var d: [i32; 3] = t2;
// CHECK:STDERR: ^~
var d: [i32; 3] = t2;