Files
Nim/tests/misc/tstrace.nim
Andreas Rumpf a690e7b267 Merge pull request #1075 from flaviut/inlinedocs
Add some documentations and code examples in system
2014-04-09 22:56:18 +02:00

17 lines
260 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)