New faults and syntax (#2034)

- Remove `[?]` syntax.
- Change `int!` to `int?` syntax.
- New `fault` declarations.
- Enum associated values can reference the calling enum.
This commit is contained in:
Christoffer Lerno
2025-03-10 00:11:35 +01:00
committed by GitHub
parent fefce25081
commit 25bccf4883
392 changed files with 3129 additions and 3658 deletions

View File

@@ -1,19 +1,19 @@
struct Foo
{
int x;
int[?] y; // #error: flexible array member must be the last element
int[*] y; // #error: flexible array member must be the last element
int z;
}
struct Bar
{
int[?] y; // #error: flexible array member cannot be the only element
int[*] y; // #error: flexible array member cannot be the only element
}
struct Baz
{
int y;
int[?] z;
int[*] z;
}
struct BazContainerOk