diff --git a/compiler/sempass2.nim b/compiler/sempass2.nim index 397a710cef..88890921cd 100644 --- a/compiler/sempass2.nim +++ b/compiler/sempass2.nim @@ -751,7 +751,9 @@ proc track(tracked: PEffects, n: PNode) = discard else: message(tracked.config, arg.info, warnProveInit, $arg) - createTypeBoundOps(tracked.graph, tracked.c, n[1].typ.lastSon, n.info) + # check required for 'nim check': + if n[1].typ.len > 0: + createTypeBoundOps(tracked.graph, tracked.c, n[1].typ.lastSon, n.info) for i in 0 ..< safeLen(n): track(tracked, n.sons[i]) of nkDotExpr: diff --git a/compiler/vm.nim b/compiler/vm.nim index 6be4cbdba4..dc83c756c1 100644 --- a/compiler/vm.nim +++ b/compiler/vm.nim @@ -1567,19 +1567,20 @@ proc rawExecute(c: PCtx, start: int, tos: PStackFrame): TFullReg = regs[ra].node.strVal = opSlurp(regs[rb].node.strVal, c.debug[pc], c.module, c.config) of opcGorge: + decodeBC(rkNode) + inc pc + let rd = c.code[pc].regA + createStr regs[ra] if defined(nimsuggest) or c.config.cmd == cmdCheck: discard "don't run staticExec for 'nim suggest'" + regs[ra].node.strVal = "" else: when defined(nimcore): - decodeBC(rkNode) - inc pc - let rd = c.code[pc].regA - - createStr regs[ra] regs[ra].node.strVal = opGorge(regs[rb].node.strVal, regs[rc].node.strVal, regs[rd].node.strVal, c.debug[pc], c.config)[0] else: + regs[ra].node.strVal = "" globalError(c.config, c.debug[pc], "VM is not built with 'gorge' support") of opcNError, opcNWarning, opcNHint: decodeB(rkNode)