summary refs log blame commit diff stats
path: root/tests/accept/compile/tstrace.nim
blob: 3032a34a355e6340e3afd9a77e6bafa567d0c501 (plain) (tree)
1
2
3
4
5
6
7
8
9
10









                                                  
             




           
# 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)