summary refs log tree commit diff stats
path: root/tests/vm
diff options
context:
space:
mode:
Diffstat (limited to 'tests/vm')
-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