Confusing error message when forgetting a comma before `..` in struct
Open
bug
dslx
- Dominant language
- C++
- Stars
- 1.9k
- Forks
- 283
- Avg merge
- 2d 10h
- Merged PRs (30d)
- 135
Description
Example:
```
struct S {
y: u32
}
struct T {
s: S,
x: u32,
}
fn foo(t: T) -> T {
T { s: S { y: u32:1 }
..t }
}
```
Note missing comma after ` s: S { y: u32:1 }`.
Error message:
```
0009:
0010: fn foo(t: T) -> T {
0011: T { s: S { y: u32:1 }
____________^
0012: | ..t }
|_________^ XlsTypeError: struct 'S' structure: S { y: uN[32] } vs struct 'T' structure: T { s: S { y: uN[32] }, x: uN[32] }: Range start and end types didn't match.
0013: }
0014: // #[test]
```
A better message would suggest adding a comma
Contributor guide
Assessment
This issue has not been assessed yet.