mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-05 22:02:55 +01: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:
+2
-2
@@ -23,8 +23,8 @@ class Point {
|
||||
fn Scale[self: Point](v: i32) -> i32 {
|
||||
return 0;
|
||||
// CHECK:STDERR: COMPILATION ERROR: {{.*}}/explorer/testdata/interface/fail_impl_bad_member.carbon:[[@LINE+3]]: type error in member of implementation
|
||||
// CHECK:STDERR: expected: fn (i32) -> class Point
|
||||
// CHECK:STDERR: actual: fn (i32) -> i32
|
||||
// CHECK:STDERR: expected: fn (i32,) -> class Point
|
||||
// CHECK:STDERR: actual: fn (i32,) -> i32
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user