mirror of
https://github.com/nim-lang/Nim.git
synced 2026-01-03 03:32:32 +00:00
22 lines
310 B
Nim
22 lines
310 B
Nim
discard """
|
|
output: "1"
|
|
cmd: r"nim c --hints:on $options --mm:refc -d:release $file"
|
|
ccodecheck: "'NI volatile state_1;'"
|
|
targets: "c"
|
|
"""
|
|
|
|
# bug #1539
|
|
|
|
proc err() =
|
|
raise newException(Exception, "test")
|
|
|
|
proc main() =
|
|
var state: int
|
|
try:
|
|
state = 1
|
|
err()
|
|
except:
|
|
echo state
|
|
|
|
main()
|