From c2e5faf959f006af67d1a054a92096d63eae192a Mon Sep 17 00:00:00 2001 From: LemonBoy Date: Mon, 17 Sep 2018 19:14:13 +0200 Subject: The VM cannot call methods Fixes #2574 --- tests/vm/t2574.nim | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 tests/vm/t2574.nim (limited to 'tests/vm') 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 -- cgit 1.4.1-2-gfad0