Cleaner error message when missing comma in struct initializer #1941.

This commit is contained in:
Christoffer Lerno
2025-02-08 19:54:44 +01:00
parent d3f2180330
commit 940874e349
5 changed files with 30 additions and 1 deletions

View File

@@ -0,0 +1,10 @@
module test;
struct Abc
{
int[2] a;
int b;
}
fn int main()
{
Abc a = { .a = {} .b = 3 }; // #error: A comma or '}' was expected here.
}