aboutsummaryrefslogtreecommitdiff
path: root/tests/programs/o3_bounds.zc
diff options
context:
space:
mode:
Diffstat (limited to 'tests/programs/o3_bounds.zc')
-rw-r--r--tests/programs/o3_bounds.zc2
1 files changed, 2 insertions, 0 deletions
diff --git a/tests/programs/o3_bounds.zc b/tests/programs/o3_bounds.zc
new file mode 100644
index 0000000..fb347c0
--- /dev/null
+++ b/tests/programs/o3_bounds.zc
@@ -0,0 +1,2 @@
+// an index outside a []T inside o3 code: caught by the inline check
+fn main() { []int a = new([]int, 5); o3 { int i = 7; a[i] = 1; } free(d*a); return 0; }