mirror of
https://github.com/nim-lang/Nim.git
synced 2025-12-30 09:54:49 +00:00
21 lines
283 B
Nim
21 lines
283 B
Nim
discard """
|
|
output: "1"
|
|
cmd: r"nim c --hints:on $options -d:release $file"
|
|
ccodecheck: "'NI volatile state;'"
|
|
"""
|
|
|
|
# bug #1539
|
|
|
|
proc err() =
|
|
raise newException(Exception, "test")
|
|
|
|
proc main() =
|
|
var state: int
|
|
try:
|
|
state = 1
|
|
err()
|
|
except:
|
|
echo state
|
|
|
|
main()
|