tcallsitelineinfo.nim 330 B

123456789101112131415161718
  1. discard """
  2. nimout: '''
  3. tcallsitelineinfo.nim(17, 4) Warning: abc [User]
  4. '''
  5. exitcode: 1
  6. outputsub: '''
  7. tcallsitelineinfo.nim(17) tcallsitelineinfo
  8. Error: unhandled exception: def [ValueError]
  9. '''
  10. """
  11. template foo(): untyped {.callsite.} =
  12. {.warning: "abc".}
  13. raise newException(ValueError, "def")
  14. echo "hello"
  15. foo()