aboutsummaryrefslogtreecommitdiff
path: root/tests/conformance/6-ownership/back_link_glob.zc
diff options
context:
space:
mode:
Diffstat (limited to 'tests/conformance/6-ownership/back_link_glob.zc')
-rw-r--r--tests/conformance/6-ownership/back_link_glob.zc7
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/conformance/6-ownership/back_link_glob.zc b/tests/conformance/6-ownership/back_link_glob.zc
new file mode 100644
index 0000000..ecba2e5
--- /dev/null
+++ b/tests/conformance/6-ownership/back_link_glob.zc
@@ -0,0 +1,7 @@
+// expect error: b: is not an owner, so it can't be stored in a global
+// spec 6.6
+include rt;
+struct node { int value; node* prev; node* next; };
+node* keep;
+fn main() { node* a = rt.new(node); node* b = rt.new(node); a.next = b; b.prev = a; keep = b; }
+// zc0: skip