Files
Nim/tests/tstrace.nim
2010-02-14 00:29:35 +01:00

17 lines
259 B
Nim

# Test the new stacktraces (great for debugging!)
{.push stack_trace: on.}
proc recTest(i: int) =
# enter
if i < 10:
recTest(i+1)
else: # should printStackTrace()
var p: ptr int = nil
p^ = 12
# leave
{.pop.}
recTest(0)