fixes #1956
This commit is contained in:
parent
736a04c66b
commit
52e297c4e1
2 changed files with 5 additions and 3 deletions
|
|
@ -911,6 +911,8 @@ proc semProcTypeNode(c: PContext, n, genericParams: PNode,
|
|||
if not hasType and not hasDefault:
|
||||
if isType: localError(a.info, "':' expected")
|
||||
let tdef = if kind in {skTemplate, skMacro}: tyExpr else: tyAnything
|
||||
if tdef == tyAnything:
|
||||
message(a.info, warnTypelessParam, renderTree(n))
|
||||
typ = newTypeS(tdef, c)
|
||||
|
||||
if skipTypes(typ, {tyGenericInst}).kind == tyEmpty: continue
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue