summary refs log tree commit diff stats
path: root/tests/vm/tnilref.nim
diff options
context:
space:
mode:
Diffstat (limited to 'tests/vm/tnilref.nim')
-rw-r--r--tests/vm/tnilref.nim7
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/vm/tnilref.nim b/tests/vm/tnilref.nim
new file mode 100644
index 000000000..5e27cf0cb
--- /dev/null
+++ b/tests/vm/tnilref.nim
@@ -0,0 +1,7 @@
+discard """
+  errormsg: "attempt to access a nil address"
+"""
+
+static:
+    var s: ref int
+    s[] = 1
\ No newline at end of file