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.
22 lines
276 B
Plaintext
22 lines
276 B
Plaintext
module test;
|
|
|
|
fn void? test1()
|
|
{
|
|
double a;
|
|
switch (a)
|
|
{
|
|
case 1.3 .. 4.5: // #error: Ranges must be constant integers
|
|
default:
|
|
}
|
|
}
|
|
|
|
fn void? test2()
|
|
{
|
|
int a;
|
|
switch (a)
|
|
{
|
|
case 2 .. 3:
|
|
case a .. 3: // #error: Ranges must be constant integers
|
|
default:
|
|
}
|
|
} |