fixes #19575 (#19596) [backport]

* fixes #19575

* better bugfix
This commit is contained in:
Andreas Rumpf 2022-03-09 11:42:09 +01:00 • committed by GitHub
commit 2beefb9aa0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 27 additions and 2 deletions

View file

@ -251,3 +251,26 @@ block:
for x in ff(@[1, 2], @[1, 2, 3]):
echo x
# bug #19575
iterator bb() {.closure.} =
while true:
try: discard
except: break
finally: break
var a = bb
iterator cc() {.closure.} =
while true:
try: discard
except:
if true:
break
finally:
if true:
break
var a2 = cc