aboutsummaryrefslogtreecommitdiff
path: root/tests/conformance/8-runtime/index_out_of_range.zc
blob: 76938b5be2f576c87bc3f739c2c16025706db31a (plain) (blame)
1
2
3
4
5
6
// expect error: zy: index 5 out of range (length 3)
// spec 8.4
include rt;
void pn(int x) { rt.put_n(x); rt.put_c(10); }
fn main() { int[?] a = rt.new(int[?], 3); int i = 5; pn(a[i]); return 0; }
// zc0: skip