summary refs log tree commit diff stats
path: root/tests/effects/teffects8.nim
blob: 359b3a1df6d1c068b19d014f238d6960dbae5871 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
discard """
  errormsg: "can raise an unlisted exception: Exception"
  line: 10
"""
{.push warningAsError[Effect]: on.}
proc foo() {.raises: [].} =
  try:
    discard
  except ValueError:
    raise

foo()
{.pop.}