mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-11-23 13:12:37 +00:00
fix printing for single element tuple values (#2786)
adds trailing comma to single element tuple
example:
```carbon
package ExplorerTest api;
fn Main() -> i32
{
var a: (i32,) = (1, 2);
return 0;
}
```
change in error message:
```diff
-type error in initializer of variable: '(i32, i32)' is not implicitly convertible to '(i32)'
+type error in initializer of variable: '(i32, i32)' is not implicitly convertible to '(i32,)'
```
This commit is contained in:
1 parent
7eabd0a64a
commit
f310316ef4
5 files changed
+11
-7
No files matched your search
@@ -8,7 +8,7 @@
|
||||
|
||||
package ExplorerTest api;
|
||||
|
||||
// CHECK:STDERR: COMPILATION ERROR: {{.*}}/explorer/testdata/basic_syntax/fail_alternative_not_type.carbon:[[@LINE+1]]: type error in type expression: '(i32)' is not implicitly convertible to 'type'
|
||||
// CHECK:STDERR: COMPILATION ERROR: {{.*}}/explorer/testdata/basic_syntax/fail_alternative_not_type.carbon:[[@LINE+1]]: type error in type expression: '(i32,)' is not implicitly convertible to 'type'
|
||||
choice C { X(42) }
|
||||
|
||||
fn Main() -> i32 {
|
||||
|
||||
Reference in new issue
Block a user