summary refs log tree commit diff stats
path: root/tests/ccgbugs/t5296.nim
diff options
context:
space:
mode:
authorzah <zahary@gmail.com>2017-03-19 21:33:21 +0200
committerAndreas Rumpf <rumpf_a@web.de>2017-03-19 20:33:21 +0100
commit1d6018726eea88b8cd7bf9a9bc975525f083e4d1 (patch)
treedf54fd2645535f5cb84aa91395da4c58365e1c57 /tests/ccgbugs/t5296.nim
parente20af5cec68520a7ed96a6fd130af2fa56f6709b (diff)
downloadNim-1d6018726eea88b8cd7bf9a9bc975525f083e4d1.tar.gz
fix #5296 (#5565)
Diffstat (limited to 'tests/ccgbugs/t5296.nim')
-rw-r--r--tests/ccgbugs/t5296.nim14
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/ccgbugs/t5296.nim b/tests/ccgbugs/t5296.nim
new file mode 100644
index 000000000..990b4bee2
--- /dev/null
+++ b/tests/ccgbugs/t5296.nim
@@ -0,0 +1,14 @@
+discard """
+cmd: "nim c -d:release $file"
+output: 1
+"""
+
+proc bug() : void =
+    var x = 0
+    try:
+        inc x
+        raise new(Exception)
+    except Exception:
+        echo x
+
+bug()