t5296.nim 248 B

12345678910111213141516171819202122
  1. discard """
  2. cmd: "nim c -d:release $file"
  3. output: '''1
  4. -1'''
  5. """
  6. proc bug() : void =
  7. var x = 0
  8. try:
  9. inc x
  10. raise new(Exception)
  11. except Exception:
  12. echo x
  13. bug()
  14. # bug #19051
  15. type GInt[T] = int
  16. var a = 1
  17. echo -a