fixes #23355; pop optionStack when exiting scopes (#24926)

fixes #23355
This commit is contained in:
ringabout
2025-05-04 09:29:59 +08:00
committed by GitHub
parent f56568d851
commit 98ec87d65e
3 changed files with 16 additions and 1 deletions

11
tests/errmsgs/t23355.nim Normal file
View File

@@ -0,0 +1,11 @@
discard """
errormsg: "{.pop.} without a corresponding {.push.}"
"""
block:
{.push raises: [].}
proc f() =
{.pop.}
proc g() = raise newException(ValueError, "")