fixes #121
This commit is contained in:
parent
6c0425d574
commit
635469ec45
1 changed files with 3 additions and 0 deletions
|
|
@ -766,6 +766,9 @@ proc SemTypeSection(c: PContext, n: PNode): PNode =
|
||||||
|
|
||||||
proc semParamList(c: PContext, n, genericParams: PNode, s: PSym) =
|
proc semParamList(c: PContext, n, genericParams: PNode, s: PSym) =
|
||||||
s.typ = semProcTypeNode(c, n, genericParams, nil, s.kind)
|
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(n.info, errGenerated, "invalid return type: 'stmt'")
|
||||||
|
|
||||||
proc addParams(c: PContext, n: PNode, kind: TSymKind) =
|
proc addParams(c: PContext, n: PNode, kind: TSymKind) =
|
||||||
for i in countup(1, sonsLen(n)-1):
|
for i in countup(1, sonsLen(n)-1):
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue