mirror of
https://github.com/nim-lang/Nim.git
synced 2026-08-02 13:39:03 +00:00
fixes #25903
fixes #25904
`nkExceptBranch` can have variable structure depending on the exception
types and it should handle the last node of the `nkExceptBranch`
(cherry picked from commit 0f751695e4)
This commit is contained in:
@@ -80,3 +80,20 @@ block tissue7104:
|
||||
sp do ():
|
||||
inc i
|
||||
echo "ok ", i
|
||||
|
||||
block: # bug #25903
|
||||
iterator g: int {.closure.} =
|
||||
discard try:
|
||||
yield 0
|
||||
0
|
||||
except IOError, OSError:
|
||||
0
|
||||
let _ = g
|
||||
|
||||
block: # bug #25904
|
||||
iterator w: int {.closure.} =
|
||||
discard try: 0
|
||||
except IOError, OSError:
|
||||
yield 0
|
||||
0
|
||||
let _ = w
|
||||
|
||||
Reference in New Issue
Block a user