diff options
Diffstat (limited to 'testsuite/tests')
-rw-r--r-- | testsuite/tests/typecheck/should_fail/T7175.hs | 11 | ||||
-rw-r--r-- | testsuite/tests/typecheck/should_fail/T7175.stderr | 6 | ||||
-rw-r--r-- | testsuite/tests/typecheck/should_fail/all.T | 1 |
3 files changed, 18 insertions, 0 deletions
diff --git a/testsuite/tests/typecheck/should_fail/T7175.hs b/testsuite/tests/typecheck/should_fail/T7175.hs new file mode 100644 index 0000000000..909834c29d --- /dev/null +++ b/testsuite/tests/typecheck/should_fail/T7175.hs @@ -0,0 +1,11 @@ +{-# LANGUAGE TypeFamilies, GADTs #-} + +module T7175 where + +type family F a + +data G1 a where + G1C :: F Int + +data G2 a where + G2C :: F Int diff --git a/testsuite/tests/typecheck/should_fail/T7175.stderr b/testsuite/tests/typecheck/should_fail/T7175.stderr new file mode 100644 index 0000000000..92272b6b36 --- /dev/null +++ b/testsuite/tests/typecheck/should_fail/T7175.stderr @@ -0,0 +1,6 @@ + +T7175.hs:8:4: + Data constructor `G1C' returns type `F Int' + instead of an instance of its parent type `G1 a' + In the definition of data constructor `G1C' + In the data declaration for `G1' diff --git a/testsuite/tests/typecheck/should_fail/all.T b/testsuite/tests/typecheck/should_fail/all.T index c7e347404e..7e6f20893c 100644 --- a/testsuite/tests/typecheck/should_fail/all.T +++ b/testsuite/tests/typecheck/should_fail/all.T @@ -280,3 +280,4 @@ test('T7019a', normal, compile_fail,['']) test('T5978', normal, compile_fail, ['']) test('TcMultiWayIfFail', if_compiler_lt('ghc', '7.5', skip), compile_fail, ['']) test('T2534', normal, compile_fail, ['']) +test('T7175', normal, compile_fail, ['']) |