aboutsummaryrefslogtreecommitdiff
path: root/tests/errors/array_literal_global.zc
diff options
context:
space:
mode:
Diffstat (limited to 'tests/errors/array_literal_global.zc')
-rw-r--r--tests/errors/array_literal_global.zc5
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/errors/array_literal_global.zc b/tests/errors/array_literal_global.zc
new file mode 100644
index 0000000..58d3c13
--- /dev/null
+++ b/tests/errors/array_literal_global.zc
@@ -0,0 +1,5 @@
+namespace;
+
+// expect: an array literal cannot escape into a global or container
+int* saved;
+fn main() { saved = (int[]){1,2}; return 0; }