aboutsummaryrefslogtreecommitdiff
path: root/tests/conformance/3-expressions/dyn_array_index_negative.zc
blob: c87e786d102f0503c7d65de155d91a3466f1590c (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
// expect: zy: index -1 out of range (length 2)/
include rt;
void pn(int x) { rt.put_n(x); rt.put_c(10); }
fn main() {
	int[?] a = {1, 2};
	int i = 0 - 1;
	pn(a[i]);
	pn(99);
	return 0;
}
// zc0: skip