diff options
Diffstat (limited to 'compiler/vm.nim')
-rw-r--r-- | compiler/vm.nim | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/compiler/vm.nim b/compiler/vm.nim index cd36595ac..deca288b5 100644 --- a/compiler/vm.nim +++ b/compiler/vm.nim @@ -1057,6 +1057,7 @@ proc fixType(result, n: PNode) {.inline.} = # XXX do it deeply for complex values; there seems to be no simple # solution except to check it deeply here. #if result.typ.isNil: result.typ = n.typ + discard proc execute(c: PCtx, start: int): PNode = var tos = PStackFrame(prc: nil, comesFrom: 0, next: nil) @@ -1118,6 +1119,7 @@ proc evalConstExprAux(module, prc: PSym, n: PNode, mode: TEvalMode): PNode = var c = globalCtx c.mode = mode let start = genExpr(c, n, requiresValue = mode!=emStaticStmt) + if c.code[start].opcode == opcEof: return emptyNode assert c.code[start].opcode != opcEof var tos = PStackFrame(prc: prc, comesFrom: 0, next: nil) newSeq(tos.slots, c.prc.maxSlots) |