Test for #8306
authorAustin Seipp <austin@well-typed.com>
Mon, 16 Sep 2013 15:45:00 +0000 (10:45 -0500)
committerAustin Seipp <austin@well-typed.com>
Mon, 16 Sep 2013 15:45:00 +0000 (10:45 -0500)
Signed-off-by: Austin Seipp <austin@well-typed.com>
testsuite/tests/typecheck/should_fail/T8306.hs [new file with mode: 0644]
testsuite/tests/typecheck/should_fail/T8306.stderr [new file with mode: 0644]
testsuite/tests/typecheck/should_fail/all.T

diff --git a/testsuite/tests/typecheck/should_fail/T8306.hs b/testsuite/tests/typecheck/should_fail/T8306.hs
new file mode 100644 (file)
index 0000000..048f41a
--- /dev/null
@@ -0,0 +1,4 @@
+{-# LANGUAGE DataKinds #-}
+{-# LANGUAGE NegativeLiterals #-}
+
+type T = -1
diff --git a/testsuite/tests/typecheck/should_fail/T8306.stderr b/testsuite/tests/typecheck/should_fail/T8306.stderr
new file mode 100644 (file)
index 0000000..471da8d
--- /dev/null
@@ -0,0 +1,3 @@
+
+T8306.hs:4:10:
+    Illegal literal in type (type literals must not be negative): -1
index d76f943..1e7472d 100644 (file)
@@ -319,3 +319,4 @@ test('T8262', normal, compile_fail, [''])
 test('TcCoercibleFail', when(compiler_lt('ghc', '7.7'), skip), compile_fail, [''])
 test('TcCoercibleFailSafe', when(compiler_lt('ghc', '7.7'), skip), compile_fail, [''])
 test('TcCoercibleFail2', when(compiler_lt('ghc', '7.7'), skip), compile_fail, [''])
+test('T8306', normal, compile_fail, [''])