aboutsummaryrefslogtreecommitdiff
path: root/tests/errors/unchecked_touch.zc
diff options
context:
space:
mode:
Diffstat (limited to 'tests/errors/unchecked_touch.zc')
-rw-r--r--tests/errors/unchecked_touch.zc2
1 files changed, 2 insertions, 0 deletions
diff --git a/tests/errors/unchecked_touch.zc b/tests/errors/unchecked_touch.zc
new file mode 100644
index 0000000..141639d
--- /dev/null
+++ b/tests/errors/unchecked_touch.zc
@@ -0,0 +1,2 @@
+// expect: x: is tracked by the analyzer and can't be used in unchecked code
+fn main() { let x = new(1); unchecked { x[0] = 1; } return 0; }