diff options
author | zah <zahary@gmail.com> | 2017-03-12 10:33:49 +0200 |
---|---|---|
committer | Andreas Rumpf <rumpf_a@web.de> | 2017-03-12 09:33:49 +0100 |
commit | 1be0022e7c6a8d168918998fd27412901432075d (patch) | |
tree | 64be855cb15ffb466098e33b526799a6aa49a9c7 /compiler/semexprs.nim | |
parent | 6e358e318747ecd6bea66911d6144cb7eff9d172 (diff) | |
download | Nim-1be0022e7c6a8d168918998fd27412901432075d.tar.gz |
Fixes #5167 and related problems (#5475)
This commit returns to a bit less strict checking of the number of macro arguments, because some old immediate macros rely on a behavior where even the arity of the macro is not being checked. It may be better if such macros are just declared to use varargs[expr], but this remains for another day.
Diffstat (limited to 'compiler/semexprs.nim')
-rw-r--r-- | compiler/semexprs.nim | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/compiler/semexprs.nim b/compiler/semexprs.nim index 755d44448..f1bf5d864 100644 --- a/compiler/semexprs.nim +++ b/compiler/semexprs.nim @@ -30,6 +30,8 @@ proc semOperand(c: PContext, n: PNode, flags: TExprFlags = {}): PNode = # result = errorNode(c, n) if result.typ != nil: # XXX tyGenericInst here? + if result.typ.kind == tyProc and tfUnresolved in result.typ.flags: + localError(n.info, errProcHasNoConcreteType, n.renderTree) if result.typ.kind == tyVar: result = newDeref(result) elif {efWantStmt, efAllowStmt} * flags != {}: result.typ = newTypeS(tyVoid, c) |