mirror of
https://github.com/c3lang/c3c.git
synced 2026-02-27 12:01:16 +00:00
- Remove `[?]` syntax. - Change `int!` to `int?` syntax. - New `fault` declarations. - Enum associated values can reference the calling enum.
16 lines
275 B
Plaintext
16 lines
275 B
Plaintext
fn void test1()
|
|
{
|
|
|
|
int? a;
|
|
int b;
|
|
int*? x;
|
|
if (try int 1 = a) {} // #error: A new variable was expected.
|
|
}
|
|
|
|
fn void test2()
|
|
{
|
|
int? a;
|
|
int b;
|
|
int*? x;
|
|
if (try foo::z = a, b += 1) {} // #error: The 'try' must be placed last, can you change it?
|
|
} |