polserver/testsuite/escript/switch/switch16-negative-case.src
Eric Swanson d8ad58f64f
Update test suite for new compiler (#299)
* Update test suite:
- run test suite with both OG compiler and new compiler
- run compiler parity test against testsuite/escript
2020-09-11 01:38:39 -07:00

12 lines
No EOL
400 B
Text

// reported here: https://forums.polserver.com/viewtopic.php?f=7&t=6333
// This can't be fixed in the new compiler without breaking compatibility
// with the old one, so leaving it so it does not compile for now.
var a := -1;
case (a)
0: print("zero");
1: print("one");
-1: print("this is fine");
2: print("two");
endcase
force_compile_failure(); // OG compiler errors out