tnilclosurecallstacktrace.nim 462 B

123456789101112131415161718192021222324
  1. discard """
  2. action: reject
  3. nimout: '''
  4. stack trace: (most recent call last)
  5. tnilclosurecallstacktrace.nim(23, 6) tnilclosurecallstacktrace
  6. tnilclosurecallstacktrace.nim(20, 6) baz
  7. tnilclosurecallstacktrace.nim(17, 6) bar
  8. tnilclosurecallstacktrace.nim(14, 4) foo
  9. tnilclosurecallstacktrace.nim(14, 4) Error: attempt to call nil closure
  10. '''
  11. """
  12. proc foo(x: proc ()) =
  13. x()
  14. proc bar(x: proc ()) =
  15. foo(x)
  16. proc baz(x: proc ()) =
  17. bar(x)
  18. static:
  19. baz(nil)