summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorAndreas Rumpf <rumpf_a@web.de>2017-07-22 17:07:59 +0200
committerAndreas Rumpf <rumpf_a@web.de>2017-07-22 17:07:59 +0200
commit4e3bdcc84b5c703bb484e32da9c8419699019a0c (patch)
treef5da4ff30dabe41f6d7a68bcd09c5ae7a5c3e0bf
parent3862651d4423e0419067f4cb036f37eee7948b29 (diff)
downloadNim-4e3bdcc84b5c703bb484e32da9c8419699019a0c.tar.gz
fixes #6127
-rw-r--r--compiler/semexprs.nim8
1 files changed, 3 insertions, 5 deletions
diff --git a/compiler/semexprs.nim b/compiler/semexprs.nim
index 76d4be766..9322b0873 100644
--- a/compiler/semexprs.nim
+++ b/compiler/semexprs.nim
@@ -47,11 +47,9 @@ proc semExprWithType(c: PContext, n: PNode, flags: TExprFlags = {}): PNode =
     #raiseRecoverableError("")
     result = errorNode(c, n)
   if result.typ == nil or result.typ == enforceVoidContext:
-    if n.kind != nkStmtList:
-      # we cannot check for 'void' in macros ...
-      localError(n.info, errExprXHasNoType,
-                 renderTree(result, {renderNoComments}))
-      result.typ = errorType(c)
+    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)
6' href='#n136'>136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185