aboutsummaryrefslogtreecommitdiff
path: root/tests/programs/borrowmove.zc
diff options
context:
space:
mode:
Diffstat (limited to 'tests/programs/borrowmove.zc')
-rw-r--r--tests/programs/borrowmove.zc2
1 files changed, 2 insertions, 0 deletions
diff --git a/tests/programs/borrowmove.zc b/tests/programs/borrowmove.zc
new file mode 100644
index 0000000..b0f0e42
--- /dev/null
+++ b/tests/programs/borrowmove.zc
@@ -0,0 +1,2 @@
+fn put(.m box, int v) { int* c = new(int); *c = v; box[0] = c; return 0; }
+fn main() { let b = new(1); put(b, 6); put_n(*(b[0] as int*)); put_c(10); return 0; }