aboutsummaryrefslogtreecommitdiff
path: root/tests/hold/reject/outside.zc
diff options
context:
space:
mode:
Diffstat (limited to 'tests/hold/reject/outside.zc')
-rw-r--r--tests/hold/reject/outside.zc5
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/hold/reject/outside.zc b/tests/hold/reject/outside.zc
new file mode 100644
index 0000000..a202898
--- /dev/null
+++ b/tests/hold/reject/outside.zc
@@ -0,0 +1,5 @@
+// error: c: is shared in a hold block; only the functions written inside that block can use it
+namespace;
+include rt;
+hold { shared let c; fn a() { c++; return c; } }
+fn main() { c = 3; return a(); }