diff options
author | Andreas Rumpf <rumpf_a@web.de> | 2018-06-05 19:58:00 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-06-05 19:58:00 +0200 |
commit | 3cbc07ac7877b03c605498760fe198e3200cc197 (patch) | |
tree | 627af3020528cb916b3174bd94304307ca875c77 /compiler/semexprs.nim | |
parent | b1f483c897bb2a881c059dc473c81ec66b3a32fb (diff) | |
parent | cfe40a3e6e920ed0c105af0012af739794c10b55 (diff) | |
download | Nim-3cbc07ac7877b03c605498760fe198e3200cc197.tar.gz |
Merge pull request #7770 from yglukhov/yield-in-try
Yield in try
Diffstat (limited to 'compiler/semexprs.nim')
-rw-r--r-- | compiler/semexprs.nim | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/semexprs.nim b/compiler/semexprs.nim index 6b32fa66c..92b9c365a 100644 --- a/compiler/semexprs.nim +++ b/compiler/semexprs.nim @@ -1556,7 +1556,7 @@ 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 c.p.inTryStmt > 0 and c.p.owner.typ.callConv != ccInline: + 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: |