summary refs log tree commit diff stats
path: root/tests/vm/tnilclosurecall.nim
diff options
context:
space:
mode:
Diffstat (limited to 'tests/vm/tnilclosurecall.nim')
-rw-r--r--tests/vm/tnilclosurecall.nim8
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/vm/tnilclosurecall.nim b/tests/vm/tnilclosurecall.nim
new file mode 100644
index 000000000..449865b9c
--- /dev/null
+++ b/tests/vm/tnilclosurecall.nim
@@ -0,0 +1,8 @@
+discard """
+  errormsg: "attempt to call nil closure"
+  line: 8
+"""
+
+static:
+  let x: proc () = nil
+  x()