diff options
Diffstat (limited to 'compiler/vmgen.nim')
-rw-r--r-- | compiler/vmgen.nim | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/compiler/vmgen.nim b/compiler/vmgen.nim index e87347ec8..b6b5bf4f2 100644 --- a/compiler/vmgen.nim +++ b/compiler/vmgen.nim @@ -1842,6 +1842,9 @@ proc gen(c: PCtx; n: PNode; dest: var TDest; flags: TGenFlags = {}) = let s = n.sons[0].sym if s.magic != mNone: genMagic(c, n, dest, s.magic) + elif s.kind == skMethod: + localError(c.config, n.info, "cannot call method " & s.name.s & + " at compile time") elif matches(s, "stdlib", "marshal", "to"): # XXX marshal load&store should not be opcodes, but use the # general callback mechanisms. |