summaryrefslogtreecommitdiff
path: root/testsuite
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite')
-rw-r--r--testsuite/tests/typecheck/should_compile/T17202.hs20
-rw-r--r--testsuite/tests/typecheck/should_compile/all.T1
2 files changed, 21 insertions, 0 deletions
diff --git a/testsuite/tests/typecheck/should_compile/T17202.hs b/testsuite/tests/typecheck/should_compile/T17202.hs
new file mode 100644
index 0000000000..d9d6ec281f
--- /dev/null
+++ b/testsuite/tests/typecheck/should_compile/T17202.hs
@@ -0,0 +1,20 @@
+{-# LANGUAGE GADTs #-}
+{-# LANGUAGE QuantifiedConstraints #-}
+{-# LANGUAGE TypeFamilies #-}
+
+module T17202 where
+
+type family F a
+
+class C1 a
+class (forall c. C1 c) => C2 a
+class (forall b. (b ~ F a) => C2 a) => C3 a
+
+data Dict c = c => Dict
+
+foo :: forall a. C3 a => Dict (C1 a)
+foo = Dict
+
+bar :: forall a. C3 a => Dict (C1 a)
+bar = Dict :: C2 a => Dict (C1 a)
+
diff --git a/testsuite/tests/typecheck/should_compile/all.T b/testsuite/tests/typecheck/should_compile/all.T
index bb01a02dd3..e359f8db6b 100644
--- a/testsuite/tests/typecheck/should_compile/all.T
+++ b/testsuite/tests/typecheck/should_compile/all.T
@@ -688,3 +688,4 @@ test('T16832', normal, ghci_script, ['T16832.script'])
test('T16946', normal, compile, [''])
test('T17007', normal, compile, [''])
test('T17067', normal, compile, [''])
+test('T17202', expect_broken(17202), compile, [''])