Add a test for #7881
authorIan Lynagh <ian@well-typed.com>
Thu, 1 Aug 2013 17:11:23 +0000 (18:11 +0100)
committerIan Lynagh <ian@well-typed.com>
Thu, 1 Aug 2013 17:11:23 +0000 (18:11 +0100)
testsuite/tests/numeric/should_compile/T7881.hs [new file with mode: 0644]
testsuite/tests/numeric/should_compile/T7881.stderr [new file with mode: 0644]
testsuite/tests/numeric/should_compile/all.T

diff --git a/testsuite/tests/numeric/should_compile/T7881.hs b/testsuite/tests/numeric/should_compile/T7881.hs
new file mode 100644 (file)
index 0000000..73d8452
--- /dev/null
@@ -0,0 +1,34 @@
+
+module T7881 where
+
+import Data.Int
+
+x1 :: [Int8]
+x1 = [5 .. 3]
+
+x2 :: [Int8]
+x2 = [3 .. 5]
+
+x3 :: [Int8]
+x3 = [5, 3 .. 1]
+
+x4 :: [Int8]
+x4 = [5, (3+0) .. 1]
+
+x5 :: [Int8]
+x5 = [1, 3 .. 5]
+
+x6 :: [Int8]
+x6 = [1, (3+0) .. 5]
+
+x7 :: [Int8]
+x7 = [5, 7 .. 1]
+
+x8 :: [Int8]
+x8 = [5, (7+0) .. 1]
+
+x9 :: [Int8]
+x9 = [3, 1 .. 5]
+
+x10 :: [Int8]
+x10 = [3, (1+0) .. 5]
diff --git a/testsuite/tests/numeric/should_compile/T7881.stderr b/testsuite/tests/numeric/should_compile/T7881.stderr
new file mode 100644 (file)
index 0000000..db1dbed
--- /dev/null
@@ -0,0 +1,6 @@
+
+T7881.hs:7:6: Warning: Enumeration is empty
+
+T7881.hs:25:6: Warning: Enumeration is empty
+
+T7881.hs:31:6: Warning: Enumeration is empty
index 27a9242..01071c9 100644 (file)
@@ -1,2 +1,3 @@
 test('T7116', normal, run_command, ['$MAKE -s --no-print-directory T7116'])
 test('T7895', normal, compile, [''])
+test('T7881', normal, compile, [''])