t9768.nim 396 B

1234567891011121314151617181920212223242526272829303132
  1. discard """
  2. errormsg: "unhandled exception: t9768.nim(24, 3) `a < 4` [AssertionDefect]"
  3. file: "std/assertions.nim"
  4. nimout: '''
  5. stack trace: (most recent call last)
  6. t9768.nim(29, 33) main
  7. t9768.nim(24, 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()