tuserpragma2.nim 272 B

12345678910111213
  1. discard """
  2. errormsg: "can raise an unlisted exception: ref Exception"
  3. file: "tuserpragma2.nim"
  4. line: 11
  5. """
  6. {.push warningAsError[Effect]: on.}
  7. # bug #7216
  8. {.pragma: my_pragma, raises: [].}
  9. proc test1 {.my_pragma.} =
  10. raise newException(Exception, "msg")
  11. {.pop.}