mirror of
https://github.com/c3lang/c3c.git
synced 2026-02-27 12:01:16 +00:00
- Second value in switch range not checked properly, causing an error on non-const values. #2777
This commit is contained in:
@@ -0,0 +1,10 @@
|
||||
fn void main()
|
||||
{
|
||||
for (int i = 0; ; )
|
||||
{
|
||||
switch (i)
|
||||
{
|
||||
case 4 .. i: // #error: Ranges must be constant integers or enum values, but this is not an integer
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user