summary refs log tree commit diff stats
path: root/tests
diff options
context:
space:
mode:
authorLemonBoy <thatlemon@gmail.com>2018-09-17 19:14:13 +0200
committerLemonBoy <thatlemon@gmail.com>2018-09-17 19:14:13 +0200
commitc2e5faf959f006af67d1a054a92096d63eae192a (patch)
treefc1fc8ba7256b527a3495da2334fa614951600b2 /tests
parent6dc6ea41468dc99c8826b03b512af8f9a46e660d (diff)
downloadNim-c2e5faf959f006af67d1a054a92096d63eae192a.tar.gz
The VM cannot call methods
Fixes #2574
Diffstat (limited to 'tests')
-rw-r--r--tests/vm/t2574.nim14
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/vm/t2574.nim b/tests/vm/t2574.nim
new file mode 100644
index 000000000..86602aeaf
--- /dev/null
+++ b/tests/vm/t2574.nim
@@ -0,0 +1,14 @@
+discard """
+  line: 14
+  errormsg: "cannot call method eval at compile time"
+"""
+
+type
+  PExpr = ref object of RootObj
+
+method eval(e: PExpr): int =
+  discard
+
+static:
+  let x = PExpr()
+  discard x.eval