diff options
author | Andreas Rumpf <rumpf_a@web.de> | 2016-08-26 13:02:52 +0200 |
---|---|---|
committer | Andreas Rumpf <rumpf_a@web.de> | 2016-08-26 13:02:52 +0200 |
commit | 89f3e21fc876e589de62f81aa1aa67e36eacc22e (patch) | |
tree | 2e153dc9c898ab1d7888c71dadf55cabb7d4b9f4 /compiler | |
parent | b9322010e935e0f42894e3b69127f1e19a4a5a62 (diff) | |
download | Nim-89f3e21fc876e589de62f81aa1aa67e36eacc22e.tar.gz |
fixes #4658
Diffstat (limited to 'compiler')
-rw-r--r-- | compiler/semstmts.nim | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/compiler/semstmts.nim b/compiler/semstmts.nim index f836d1803..f1f863924 100644 --- a/compiler/semstmts.nim +++ b/compiler/semstmts.nim @@ -1396,6 +1396,11 @@ proc semMacroDef(c: PContext, n: PNode): PNode = if namePos >= result.safeLen: return result var s = result.sons[namePos].sym var t = s.typ + var allUntyped = true + for i in 1 .. t.n.len-1: + let param = t.n.sons[i].sym + if param.typ.kind != tyExpr: allUntyped = false + if allUntyped: incl(s.flags, sfAllUntyped) if t.sons[0] == nil: localError(n.info, errXNeedsReturnType, "macro") if n.sons[bodyPos].kind == nkEmpty: localError(n.info, errImplOfXexpected, s.name.s) |