Files
c3c/test/test_suite/switch/bad_ranges.c3
Christoffer Lerno 25bccf4883 New faults and syntax (#2034)
- Remove `[?]` syntax.
- Change `int!` to `int?` syntax.
- New `fault` declarations.
- Enum associated values can reference the calling enum.
2025-03-10 00:11:35 +01:00

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:
}
}