aboutsummaryrefslogtreecommitdiff
path: root/tests/conformance
diff options
context:
space:
mode:
Diffstat (limited to 'tests/conformance')
-rw-r--r--tests/conformance/6-ownership/infer_owned_return_global_not_owned.zc7
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/conformance/6-ownership/infer_owned_return_global_not_owned.zc b/tests/conformance/6-ownership/infer_owned_return_global_not_owned.zc
new file mode 100644
index 0000000..5d7f793
--- /dev/null
+++ b/tests/conformance/6-ownership/infer_owned_return_global_not_owned.zc
@@ -0,0 +1,7 @@
+// expect: 3/
+// spec 6.8
+include rt;
+int* cache;
+int* refill() { cache = rt.new(int); *cache = 3; return cache; }
+fn main() { refill(); rt.put_n(*cache); rt.put_c(10); }
+// zc0: skip