summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--testsuite/tests/indexed-types/should_fail/T10141.hs8
-rw-r--r--testsuite/tests/indexed-types/should_fail/T10141.stderr6
-rw-r--r--testsuite/tests/indexed-types/should_fail/all.T1
3 files changed, 15 insertions, 0 deletions
diff --git a/testsuite/tests/indexed-types/should_fail/T10141.hs b/testsuite/tests/indexed-types/should_fail/T10141.hs
new file mode 100644
index 0000000000..a2b3931d28
--- /dev/null
+++ b/testsuite/tests/indexed-types/should_fail/T10141.hs
@@ -0,0 +1,8 @@
+{-# LANGUAGE TypeFamilies, PolyKinds #-}
+
+module T10141 where
+
+type family G (a :: k) where
+ G Int = Bool
+ G Bool = Int
+ G a = a
diff --git a/testsuite/tests/indexed-types/should_fail/T10141.stderr b/testsuite/tests/indexed-types/should_fail/T10141.stderr
new file mode 100644
index 0000000000..2cb2652388
--- /dev/null
+++ b/testsuite/tests/indexed-types/should_fail/T10141.stderr
@@ -0,0 +1,6 @@
+
+T10141.hs:6:6: error:
+ The first argument of ‘G’ should have kind ‘k’,
+ but ‘Int’ has kind ‘*’
+ In the type ‘Int’
+ In the type family declaration for ‘G’
diff --git a/testsuite/tests/indexed-types/should_fail/all.T b/testsuite/tests/indexed-types/should_fail/all.T
index 2954458780..6615c02198 100644
--- a/testsuite/tests/indexed-types/should_fail/all.T
+++ b/testsuite/tests/indexed-types/should_fail/all.T
@@ -136,3 +136,4 @@ test('T6088', normal, compile_fail, [''])
test('T7788', normal, compile_fail, [''])
test('T8550', normal, compile_fail, [''])
test('T9554', normal, compile_fail, [''])
+test('T10141', normal, compile_fail, [''])