t9768.nim 347 B

12345678910111213141516171819202122232425262728293031
  1. discard """
  2. errmsg: "unhandled exception:"
  3. file: "system/fatal.nim"
  4. nimout: '''
  5. stack trace: (most recent call last)
  6. t9768.nim(28, 33) main
  7. t9768.nim(23, 11) foo1
  8. '''
  9. """
  10. ## line 20
  11. proc foo1(a: int): auto =
  12. doAssert a < 4
  13. result = a * 2
  14. proc main()=
  15. static:
  16. if foo1(1) > 0: discard foo1(foo1(2))
  17. main()