summary refs log tree commit diff stats
path: root/compiler/vm.nim
diff options
context:
space:
mode:
authorArne Döring <arne.doering@gmx.net>2019-05-21 21:31:40 +0200
committerAndreas Rumpf <rumpf_a@web.de>2019-05-21 21:31:40 +0200
commitf94ec363abf5b1393014a0bca7202c405512cddd (patch)
tree54f54dfe076dfa9e70af430521c574517edddb7d /compiler/vm.nim
parent68b5e3e3fe8c4bf314d31d18c147650db99b4f7d (diff)
downloadNim-f94ec363abf5b1393014a0bca7202c405512cddd.tar.gz
Allow void macro result (#11286)
* allow void macro result
* add test for void macro result type
Diffstat (limited to 'compiler/vm.nim')
-rw-r--r--compiler/vm.nim2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/vm.nim b/compiler/vm.nim
index 6fc2626f7..aa8203a92 100644
--- a/compiler/vm.nim
+++ b/compiler/vm.nim
@@ -1104,7 +1104,7 @@ proc rawExecute(c: PCtx, start: int, tos: PStackFrame): TFullReg =
         #echo "new pc ", newPc, " calling: ", prc.name.s
         var newFrame = PStackFrame(prc: prc, comesFrom: pc, next: tos)
         newSeq(newFrame.slots, prc.offset+ord(isClosure))
-        if not isEmptyType(prc.typ.sons[0]) or prc.kind == skMacro:
+        if not isEmptyType(prc.typ.sons[0]):
           putIntoReg(newFrame.slots[0], getNullValue(prc.typ.sons[0], prc.info, c.config))
         for i in 1 .. rc-1:
           newFrame.slots[i] = regs[rb+i]