diff options
Diffstat (limited to 'compiler')
-rw-r--r-- | compiler/vm.nim | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/compiler/vm.nim b/compiler/vm.nim index f9b143bce..2a80106a5 100644 --- a/compiler/vm.nim +++ b/compiler/vm.nim @@ -425,7 +425,9 @@ proc rawExecute(c: PCtx, start: int, tos: PStackFrame): TFullReg = decodeBC(rkNode) let src = regs[rb].node if src.kind notin {nkEmpty..nkNilLit}: - regs[ra].node = src.sons[rc] + let n = src.sons[rc] + regs[ra].node = if n.kind == nkExprColonExpr: n[1] + else: n else: stackTrace(c, tos, pc, errIndexOutOfBounds) of opcWrObj: |