summary refs log tree commit diff stats
path: root/compiler
diff options
context:
space:
mode:
authorZahary Karadjov <zahary@gmail.com>2017-04-11 00:48:52 +0300
committerZahary Karadjov <zahary@gmail.com>2017-04-11 00:48:52 +0300
commit54a1d9c16a9589dc60919311588a77e99fa83de5 (patch)
tree29be6d0c1b64e5c6ad1c10af22161f933db401c2 /compiler
parenta3f19c87fb2134db25543f1e15b96144df5638dc (diff)
downloadNim-54a1d9c16a9589dc60919311588a77e99fa83de5.tar.gz
wip
Diffstat (limited to 'compiler')
-rw-r--r--compiler/semexprs.nim9
1 files changed, 5 insertions, 4 deletions
diff --git a/compiler/semexprs.nim b/compiler/semexprs.nim
index 7c3adf824..4baef5385 100644
--- a/compiler/semexprs.nim
+++ b/compiler/semexprs.nim
@@ -47,10 +47,11 @@ proc semExprWithType(c: PContext, n: PNode, flags: TExprFlags = {}): PNode =
     #raiseRecoverableError("")
     result = errorNode(c, n)
   if result.typ == nil or result.typ == enforceVoidContext:
-    # we cannot check for 'void' in macros ...
-    localError(n.info, errExprXHasNoType,
-               renderTree(result, {renderNoComments}))
-    result.typ = errorType(c)
+    if n.kind != nkStmtList:
+      # we cannot check for 'void' in macros ...
+      localError(n.info, errExprXHasNoType,
+                 renderTree(result, {renderNoComments}))
+      result.typ = errorType(c)
   else:
     if efNoProcvarCheck notin flags: semProcvarCheck(c, result)
     if result.typ.kind == tyVar: result = newDeref(result)