summaryrefslogtreecommitdiff
path: root/testsuite/tests/typecheck/should_fail/T20043.hs
diff options
context:
space:
mode:
authorsheaf <sam.derbyshire@gmail.com>2021-10-04 14:32:35 +0200
committerMarge Bot <ben+marge-bot@smart-cactus.org>2021-10-04 23:46:58 -0400
commita14d0e6375d6b7163d98db8d32a2fc67434608b7 (patch)
tree072a3ed6eae0b9a37e6029fba09631b3e40ac204 /testsuite/tests/typecheck/should_fail/T20043.hs
parenta762933454f1dbecaa2048f810f6ab6bbfe3a93d (diff)
downloadhaskell-a14d0e6375d6b7163d98db8d32a2fc67434608b7.tar.gz
Bump TcLevel of failing kind equality implication
Not bumping the TcLevel meant that we could end up trying to add evidence terms for the implication constraint created to wrap failing kind equalities (to avoid their deferral). fixes #20043
Diffstat (limited to 'testsuite/tests/typecheck/should_fail/T20043.hs')
-rw-r--r--testsuite/tests/typecheck/should_fail/T20043.hs21
1 files changed, 21 insertions, 0 deletions
diff --git a/testsuite/tests/typecheck/should_fail/T20043.hs b/testsuite/tests/typecheck/should_fail/T20043.hs
new file mode 100644
index 0000000000..8494537c7c
--- /dev/null
+++ b/testsuite/tests/typecheck/should_fail/T20043.hs
@@ -0,0 +1,21 @@
+{-# LANGUAGE DataKinds #-}
+{-# LANGUAGE FlexibleContexts #-}
+{-# LANGUAGE MultiParamTypeClasses #-}
+{-# LANGUAGE PolyKinds #-}
+{-# LANGUAGE ScopedTypeVariables #-}
+{-# LANGUAGE TypeApplications #-}
+{-# LANGUAGE MonoLocalBinds #-}
+{-# LANGUAGE StandaloneKindSignatures #-}
+{-# LANGUAGE UndecidableSuperClasses #-}
+
+module T20043 where
+import Data.Kind
+data T1
+data T2
+
+type All :: Type -> Type -> Constraint
+class All T1 xs => All c xs
+repo :: forall (a :: Type). All T2 a => a -> a
+repo x =
+ let y = undefined @a
+ in x