mirror of
https://github.com/nim-lang/Nim.git
synced 2025-12-30 01:44:37 +00:00
* testament: error instead of silently ignore invalid targets * s/target/targets/ * fix test; refs #16344 * address comments * Update testament/specs.nim Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
22 lines
298 B
Nim
22 lines
298 B
Nim
discard """
|
|
output: "1"
|
|
cmd: r"nim c --hints:on $options -d:release $file"
|
|
ccodecheck: "'NI volatile state;'"
|
|
targets: "c"
|
|
"""
|
|
|
|
# bug #1539
|
|
|
|
proc err() =
|
|
raise newException(Exception, "test")
|
|
|
|
proc main() =
|
|
var state: int
|
|
try:
|
|
state = 1
|
|
err()
|
|
except:
|
|
echo state
|
|
|
|
main()
|