diff options
author | Araq <rumpf_a@web.de> | 2015-08-07 20:29:38 +0200 |
---|---|---|
committer | Araq <rumpf_a@web.de> | 2015-08-07 20:29:38 +0200 |
commit | 2e4b59f3d3fc1ac99601988a482bad86a7ef7f53 (patch) | |
tree | 4dfcbac5a592dfd6b757863ac5b3b4c346dea89f /compiler | |
parent | 94e504113edfb93ac4eaf59cc78213323fa8a4c0 (diff) | |
download | Nim-2e4b59f3d3fc1ac99601988a482bad86a7ef7f53.tar.gz |
fixes #3192
Diffstat (limited to 'compiler')
-rw-r--r-- | compiler/lambdalifting.nim | 2 | ||||
-rw-r--r-- | compiler/vm.nim | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/compiler/lambdalifting.nim b/compiler/lambdalifting.nim index d11776cf6..c669fc745 100644 --- a/compiler/lambdalifting.nim +++ b/compiler/lambdalifting.nim @@ -184,7 +184,7 @@ proc addHiddenParam(routine: PSym, param: PSym) = var params = routine.ast.sons[paramsPos] # -1 is correct here as param.position is 0 based but we have at position 0 # some nkEffect node: - param.position = params.len-1 + param.position = routine.typ.n.len-1 addSon(params, newSymNode(param)) incl(routine.typ.flags, tfCapturesEnv) assert sfFromGeneric in param.flags diff --git a/compiler/vm.nim b/compiler/vm.nim index d7495d77f..e381af97f 100644 --- a/compiler/vm.nim +++ b/compiler/vm.nim @@ -432,7 +432,7 @@ proc rawExecute(c: PCtx, start: int, tos: PStackFrame): TFullReg = assert regs[rb].kind == rkNode let nb = regs[rb].node case nb.kind - of nkCharLit..nkInt64Lit: + of nkCharLit..nkUInt64Lit: ensureKind(rkInt) regs[ra].intVal = nb.intVal of nkFloatLit..nkFloat64Lit: |