summary refs log tree commit diff stats
path: root/tests/template/tcallsitelineinfo.nim
blob: 5fed9336306fc622c9e6ce85d29b397472803f59 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
discard """
  nimout: '''
tcallsitelineinfo.nim(17, 4) Warning: abc [User]
'''
  exitcode: 1
  outputsub: '''
tcallsitelineinfo.nim(17) tcallsitelineinfo
Error: unhandled exception: def [ValueError]
'''
"""

template foo(): untyped {.callsite.} =
  {.warning: "abc".}
  raise newException(ValueError, "def")
  echo "hello"

foo()