mirror of
https://github.com/c3lang/c3c.git
synced 2026-02-27 20:11:17 +00:00
- Remove `[?]` syntax. - Change `int!` to `int?` syntax. - New `fault` declarations. - Enum associated values can reference the calling enum.
17 lines
629 B
Plaintext
17 lines
629 B
Plaintext
|
|
fn void test()
|
|
{
|
|
test()!; // #error: No optional to rethrow before '!' in the expression, please remove '!'
|
|
int i = 0;
|
|
if (i!) return; // #error: No optional to rethrow before '!' in the expression, please remove '!'
|
|
int? j = 0;
|
|
if (j!) return; // #error: This expression implicitly returns with an optional result, but the function
|
|
if ((j!)!) return; // #error: This expression implicitly returns with an optional result, but the function
|
|
}
|
|
|
|
fn void? test2()
|
|
{
|
|
int? j = 0;
|
|
if (j!) return;
|
|
if ((j!)!) return; // #error: No optional to rethrow before '!' in the expression, please remove '!'
|
|
} |