aboutsummaryrefslogtreecommitdiff
path: root/tests/errors/leak_overwrite.zc
diff options
context:
space:
mode:
Diffstat (limited to 'tests/errors/leak_overwrite.zc')
-rw-r--r--tests/errors/leak_overwrite.zc2
1 files changed, 2 insertions, 0 deletions
diff --git a/tests/errors/leak_overwrite.zc b/tests/errors/leak_overwrite.zc
new file mode 100644
index 0000000..d19b5fd
--- /dev/null
+++ b/tests/errors/leak_overwrite.zc
@@ -0,0 +1,2 @@
+// expect: x: still owns an object
+fn main() { let x = new(1); x = new(2); return x[0]; }