summaryrefslogtreecommitdiff
path: root/testsuite/tests
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite/tests')
-rw-r--r--testsuite/tests/typecheck/should_compile/T22647.hs21
-rw-r--r--testsuite/tests/typecheck/should_compile/all.T1
2 files changed, 22 insertions, 0 deletions
diff --git a/testsuite/tests/typecheck/should_compile/T22647.hs b/testsuite/tests/typecheck/should_compile/T22647.hs
new file mode 100644
index 0000000000..10cf5a98e8
--- /dev/null
+++ b/testsuite/tests/typecheck/should_compile/T22647.hs
@@ -0,0 +1,21 @@
+{-# LANGUAGE TypeApplications, KindSignatures, DataKinds, TypeFamilies, FlexibleInstances #-}
+
+module T22647 where
+
+import Data.Kind
+
+data D = D
+type family F :: D -> Type
+
+class C f where
+ meth :: f
+
+instance C (f (p :: D)) where -- f :: D -> Type
+ meth = error "urk1"
+
+instance C (g (q :: Type)) where -- g :: Type -> Type
+ meth = error "urk2"
+
+x = meth :: F 'D
+
+y = meth :: [Type]
diff --git a/testsuite/tests/typecheck/should_compile/all.T b/testsuite/tests/typecheck/should_compile/all.T
index 1f1e7d8d1f..577ce86d65 100644
--- a/testsuite/tests/typecheck/should_compile/all.T
+++ b/testsuite/tests/typecheck/should_compile/all.T
@@ -853,3 +853,4 @@ test('T21550', normal, compile, [''])
test('T22310', normal, compile, [''])
test('T22331', normal, compile, [''])
test('T22516', normal, compile, [''])
+test('T22647', normal, compile, [''])