summaryrefslogtreecommitdiff
path: root/testsuite
diff options
context:
space:
mode:
authorMatthew Pickering <matthewtpickering@gmail.com>2021-12-15 12:05:33 +0000
committerMarge Bot <ben+marge-bot@smart-cactus.org>2021-12-17 21:23:58 -0500
commit1327c176ca33f3ac989b99d81d4b3e79106b9fd4 (patch)
tree9c60d07d1d44c3ef96ee4b9ceefd3399ebe682fc /testsuite
parente04878b01f0d3fe74b57ff89505daf2512b66941 (diff)
downloadhaskell-1327c176ca33f3ac989b99d81d4b3e79106b9fd4.tar.gz
Add regression test for T20189
Closes #20189
Diffstat (limited to 'testsuite')
-rw-r--r--testsuite/tests/typecheck/should_fail/T20189.hs7
-rw-r--r--testsuite/tests/typecheck/should_fail/T20189.stderr12
-rw-r--r--testsuite/tests/typecheck/should_fail/all.T1
3 files changed, 20 insertions, 0 deletions
diff --git a/testsuite/tests/typecheck/should_fail/T20189.hs b/testsuite/tests/typecheck/should_fail/T20189.hs
new file mode 100644
index 0000000000..9c7e7ceae8
--- /dev/null
+++ b/testsuite/tests/typecheck/should_fail/T20189.hs
@@ -0,0 +1,7 @@
+{-# LANGUAGE ImpredicativeTypes #-}
+{-# LANGUAGE TypeFamilies #-}
+module T20189 where
+
+y :: (t ~ (forall x . Show x => x -> IO ())) => t
+y = _
+
diff --git a/testsuite/tests/typecheck/should_fail/T20189.stderr b/testsuite/tests/typecheck/should_fail/T20189.stderr
new file mode 100644
index 0000000000..df67fa4066
--- /dev/null
+++ b/testsuite/tests/typecheck/should_fail/T20189.stderr
@@ -0,0 +1,12 @@
+
+T20189.hs:6:5: error:
+ • Found hole: _ :: t
+ Where: ‘t’ is a rigid type variable bound by
+ the type signature for:
+ y :: forall t. (t ~ (forall x. Show x => x -> IO ())) => t
+ at T20189.hs:5:1-49
+ • In an equation for ‘y’: y = _
+ • Relevant bindings include y :: t (bound at T20189.hs:6:1)
+ Constraints include
+ t ~ (forall x. Show x => x -> IO ()) (from T20189.hs:5:1-49)
+ Valid hole fits include y :: t (bound at T20189.hs:6:1)
diff --git a/testsuite/tests/typecheck/should_fail/all.T b/testsuite/tests/typecheck/should_fail/all.T
index 18b07edc87..908edcfe27 100644
--- a/testsuite/tests/typecheck/should_fail/all.T
+++ b/testsuite/tests/typecheck/should_fail/all.T
@@ -627,3 +627,4 @@ test('OrdErr', normal, compile_fail, [''])
test('T20542', normal, compile_fail, [''])
test('T20588', [extra_files(['T20588.hs', 'T20588.hs-boot', 'T20588_aux.hs'])], multimod_compile_fail, ['T20588_aux.hs', '-v0'])
test('T20588c', [extra_files(['T20588c.hs', 'T20588c.hs-boot', 'T20588c_aux.hs'])], multimod_compile_fail, ['T20588c_aux.hs', '-v0'])
+test('T20189', normal, compile_fail, [''])