diff options
Diffstat (limited to 'tests/ccgbugs/t5296.nim')
-rw-r--r-- | tests/ccgbugs/t5296.nim | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/tests/ccgbugs/t5296.nim b/tests/ccgbugs/t5296.nim new file mode 100644 index 000000000..8fbed35c4 --- /dev/null +++ b/tests/ccgbugs/t5296.nim @@ -0,0 +1,21 @@ +discard """ +cmd: "nim c -d:release $file" +output: '''1 +-1''' +""" + +proc bug() : void = + var x = 0 + try: + inc x + raise new(Exception) + except Exception: + echo x + +bug() + +# bug #19051 +type GInt[T] = int + +var a = 1 +echo -a |