compiler-design-eth/javali_tests/HW4_nop90/Array/ErrArrayIndex3.javali

10 lines
161 B
Text
Raw Permalink Normal View History

2020-01-15 22:34:57 +01:00
/* Test accessing arrays with invalid index*/
class Main {
void main() {
int[] x;
x = new int[5];
x[-1] = 5; //this should fail
}
}