fixes #21144; try expression will not match the less indent except
This commit is contained in:
parent
81d8ea95af
commit
d0721eadf8
2 changed files with 30 additions and 1 deletions
27
tests/parser/ttry.nim
Normal file
27
tests/parser/ttry.nim
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
# bug #21144
|
||||
block:
|
||||
try:
|
||||
let c = try:
|
||||
10
|
||||
except ValueError as exc:
|
||||
10
|
||||
except ValueError as exc:
|
||||
discard
|
||||
|
||||
if true:
|
||||
block:
|
||||
let c = try:
|
||||
10
|
||||
except ValueError as exc:
|
||||
10
|
||||
except OSError:
|
||||
99
|
||||
|
||||
|
||||
try:
|
||||
let c = try:
|
||||
10
|
||||
except ValueError as exc:
|
||||
10
|
||||
except ValueError as exc:
|
||||
discard
|
||||
Loading…
Add table
Add a link
Reference in a new issue