summaryrefslogtreecommitdiff
path: root/testsuite
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite')
-rw-r--r--testsuite/tests/indexed-types/should_fail/T12867.hs10
-rw-r--r--testsuite/tests/indexed-types/should_fail/T12867.stderr12
-rw-r--r--testsuite/tests/indexed-types/should_fail/all.T1
3 files changed, 23 insertions, 0 deletions
diff --git a/testsuite/tests/indexed-types/should_fail/T12867.hs b/testsuite/tests/indexed-types/should_fail/T12867.hs
new file mode 100644
index 0000000000..e4a39ce56e
--- /dev/null
+++ b/testsuite/tests/indexed-types/should_fail/T12867.hs
@@ -0,0 +1,10 @@
+{-# LANGUAGE TypeFamilies #-}
+{-# LANGUAGE ConstraintKinds #-}
+{-# LANGUAGE FlexibleContexts #-}
+
+module T12866 where
+
+type Test2 a = (Eq (TestM a))
+
+class Test a where
+ type TestM :: *
diff --git a/testsuite/tests/indexed-types/should_fail/T12867.stderr b/testsuite/tests/indexed-types/should_fail/T12867.stderr
new file mode 100644
index 0000000000..e712c49c4f
--- /dev/null
+++ b/testsuite/tests/indexed-types/should_fail/T12867.stderr
@@ -0,0 +1,12 @@
+
+T12867.hs:7:21: error:
+ • Expecting one fewer arguments to ‘TestM’
+ Expected kind ‘k0 -> *’, but ‘TestM’ has kind ‘*’
+ • In the first argument of ‘Eq’, namely ‘TestM a’
+ In the type ‘Eq (TestM a)’
+ In the type declaration for ‘Test2’
+
+T12867.hs:9:1: error:
+ • The associated type ‘TestM’
+ mentions none of the type or kind variables of the class ‘Test a’
+ • In the class declaration for ‘Test’
diff --git a/testsuite/tests/indexed-types/should_fail/all.T b/testsuite/tests/indexed-types/should_fail/all.T
index 4b0e994610..8c243440dc 100644
--- a/testsuite/tests/indexed-types/should_fail/all.T
+++ b/testsuite/tests/indexed-types/should_fail/all.T
@@ -139,3 +139,4 @@ test('T7788', normal, compile_fail, [''])
test('T11450', normal, compile_fail, [''])
test('T12041', normal, compile_fail, [''])
test('T12522a', normal, compile_fail, [''])
+test('T12867', normal, compile_fail, [''])