Test #8542
authorKrzysztof Gogolewski <krz.gogolewski@gmail.com>
Tue, 19 Nov 2013 15:08:16 +0000 (16:08 +0100)
committerSimon Peyton Jones <simonpj@microsoft.com>
Fri, 22 Nov 2013 15:50:53 +0000 (15:50 +0000)
testsuite/tests/numeric/should_compile/T8542.hs [new file with mode: 0644]
testsuite/tests/numeric/should_compile/T8542.stderr [new file with mode: 0644]
testsuite/tests/numeric/should_compile/all.T

diff --git a/testsuite/tests/numeric/should_compile/T8542.hs b/testsuite/tests/numeric/should_compile/T8542.hs
new file mode 100644 (file)
index 0000000..438072b
--- /dev/null
@@ -0,0 +1,9 @@
+module T8542 where
+
+import GHC.Int
+
+x :: Int8
+x = -128
+
+y :: Int8
+y = 128
diff --git a/testsuite/tests/numeric/should_compile/T8542.stderr b/testsuite/tests/numeric/should_compile/T8542.stderr
new file mode 100644 (file)
index 0000000..9037797
--- /dev/null
@@ -0,0 +1,8 @@
+
+T8542.hs:6:6: Warning:
+    Literal 128 of type Int8 overflows
+    If you are attempting to write a negative literal, use NegativeLiterals
+
+T8542.hs:9:5: Warning:
+    Literal 128 of type Int8 overflows
+    If you are attempting to write a negative literal, use NegativeLiterals
index 01071c9..246642f 100644 (file)
@@ -1,3 +1,4 @@
 test('T7116', normal, run_command, ['$MAKE -s --no-print-directory T7116'])
 test('T7895', normal, compile, [''])
 test('T7881', normal, compile, [''])
+test('T8542', normal, compile, [''])