t9768.nim 452 B

1234567891011121314151617181920212223242526272829303132
  1. discard """
  2. errormsg: "unhandled exception: t9768.nim(24, 3) `a < 4` [AssertionDefect]"
  3. file: "std/assertions.nim"
  4. matrix: "-d:nimPreviewSlimSystem"
  5. nimout: '''
  6. stack trace: (most recent call last)
  7. t9768.nim(29, 33) main
  8. t9768.nim(24, 11) foo1
  9. '''
  10. """
  11. import std/assertions
  12. ## line 20
  13. proc foo1(a: int): auto =
  14. doAssert a < 4
  15. result = a * 2
  16. proc main()=
  17. static:
  18. if foo1(1) > 0: discard foo1(foo1(2))
  19. main()