typed/untyped return type is invalid for everything except templates and macros (#10275)
This commit is contained in:
parent
c8ba9ffdba
commit
8922063bd8
3 changed files with 17 additions and 5 deletions
|
|
@ -1253,9 +1253,6 @@ proc semTypeSection(c: PContext, n: PNode): PNode =
|
|||
|
||||
proc semParamList(c: PContext, n, genericParams: PNode, s: PSym) =
|
||||
s.typ = semProcTypeNode(c, n, genericParams, nil, s.kind)
|
||||
if s.kind notin {skMacro, skTemplate}:
|
||||
if s.typ.sons[0] != nil and s.typ.sons[0].kind == tyStmt:
|
||||
localError(c.config, n.info, "invalid return type: 'stmt'")
|
||||
|
||||
proc addParams(c: PContext, n: PNode, kind: TSymKind) =
|
||||
for i in countup(1, sonsLen(n)-1):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue