[commit: testsuite] master: Test for #8306 (32e9017)

git at git.haskell.org git at git.haskell.org
Mon Sep 16 17:46:56 CEST 2013


Repository : ssh://git@git.haskell.org/testsuite

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/32e9017d87792455e15ce1cb232c8c9b4b20cede/testsuite

>---------------------------------------------------------------

commit 32e9017d87792455e15ce1cb232c8c9b4b20cede
Author: Austin Seipp <austin at well-typed.com>
Date:   Mon Sep 16 10:45:00 2013 -0500

    Test for #8306
    
    Signed-off-by: Austin Seipp <austin at well-typed.com>


>---------------------------------------------------------------

32e9017d87792455e15ce1cb232c8c9b4b20cede
 tests/typecheck/should_fail/T8306.hs     |    4 ++++
 tests/typecheck/should_fail/T8306.stderr |    3 +++
 tests/typecheck/should_fail/all.T        |    1 +
 3 files changed, 8 insertions(+)

diff --git a/tests/typecheck/should_fail/T8306.hs b/tests/typecheck/should_fail/T8306.hs
new file mode 100644
index 0000000..048f41a
--- /dev/null
+++ b/tests/typecheck/should_fail/T8306.hs
@@ -0,0 +1,4 @@
+{-# LANGUAGE DataKinds #-}
+{-# LANGUAGE NegativeLiterals #-}
+
+type T = -1
diff --git a/tests/typecheck/should_fail/T8306.stderr b/tests/typecheck/should_fail/T8306.stderr
new file mode 100644
index 0000000..471da8d
--- /dev/null
+++ b/tests/typecheck/should_fail/T8306.stderr
@@ -0,0 +1,3 @@
+
+T8306.hs:4:10:
+    Illegal literal in type (type literals must not be negative): -1
diff --git a/tests/typecheck/should_fail/all.T b/tests/typecheck/should_fail/all.T
index d76f943..1e7472d 100644
--- a/tests/typecheck/should_fail/all.T
+++ b/tests/typecheck/should_fail/all.T
@@ -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, [''])




More information about the ghc-commits mailing list