added system.finished for first class iterators
This commit is contained in:
parent
7a2c11d3cf
commit
7f6633a06f
8 changed files with 55 additions and 12 deletions
|
|
@ -1173,6 +1173,8 @@ proc SemYield(c: PContext, n: PNode): PNode =
|
|||
SemYieldVarResult(c, n, restype)
|
||||
else:
|
||||
localError(n.info, errCannotReturnExpr)
|
||||
elif c.p.owner.typ.sons[0] != nil:
|
||||
localError(n.info, errGenerated, "yield statement must yield a value")
|
||||
|
||||
proc lookUpForDefined(c: PContext, i: PIdent, onlyCurrentScope: bool): PSym =
|
||||
if onlyCurrentScope:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue