summary refs log tree commit diff stats
path: root/tests/overflow/toverflow2.nim
diff options
context:
space:
mode:
Diffstat (limited to 'tests/overflow/toverflow2.nim')
-rw-r--r--tests/overflow/toverflow2.nim7
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/overflow/toverflow2.nim b/tests/overflow/toverflow2.nim
new file mode 100644
index 000000000..c06b35c6d
--- /dev/null
+++ b/tests/overflow/toverflow2.nim
@@ -0,0 +1,7 @@
+discard """
+  outputsub: "Error: unhandled exception: over- or underflow [OverflowDefect]"
+  exitcode: "1"
+"""
+var a : int32 = 2147483647
+var b : int32 = 2147483647
+var c = a + b