tinfiniterecursion.nim 259 B

12345678910
  1. proc foo(x: int) =
  2. if x < 0:
  3. echo "done"
  4. else:
  5. foo(x + 1) #[tt.Error
  6. ^ maximum call depth for the VM exceeded; if you are sure this is not a bug in your code, compile with `--maxCallDepthVM:number` (current value: 2000)]#
  7. static:
  8. foo(1)