Removed oldIterTranf feature

This commit is contained in:
Yuriy Glukhov 2018-06-10 23:42:53 +03:00
commit 5c449c8cd1
5 changed files with 4 additions and 109 deletions

View file

@ -1556,8 +1556,6 @@ proc semYield(c: PContext, n: PNode): PNode =
checkSonsLen(n, 1, c.config)
if c.p.owner == nil or c.p.owner.kind != skIterator:
localError(c.config, n.info, errYieldNotAllowedHere)
elif oldIterTransf in c.features and c.p.inTryStmt > 0 and c.p.owner.typ.callConv != ccInline:
localError(c.config, n.info, errYieldNotAllowedInTryStmt)
elif n.sons[0].kind != nkEmpty:
n.sons[0] = semExprWithType(c, n.sons[0]) # check for type compatibility:
var iterType = c.p.owner.typ