summaryrefslogtreecommitdiff
path: root/testsuite/tests/typecheck/should_fail/T19482.hs
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite/tests/typecheck/should_fail/T19482.hs')
-rw-r--r--testsuite/tests/typecheck/should_fail/T19482.hs23
1 files changed, 23 insertions, 0 deletions
diff --git a/testsuite/tests/typecheck/should_fail/T19482.hs b/testsuite/tests/typecheck/should_fail/T19482.hs
new file mode 100644
index 0000000000..fe2f026739
--- /dev/null
+++ b/testsuite/tests/typecheck/should_fail/T19482.hs
@@ -0,0 +1,23 @@
+{-# LANGUAGE DataKinds #-}
+{-# LANGUAGE TypeOperators #-}
+{-# LANGUAGE TypeApplications #-}
+{-# LANGUAGE PolyKinds #-}
+{-# LANGUAGE ScopedTypeVariables #-}
+{-# LANGUAGE AllowAmbiguousTypes #-}
+
+module T19482 where
+
+testF :: forall a (b :: [a]). ()
+testF = ()
+
+-- Both Test1 and Test2 led to "no skolem info" errors in GHC 9.0
+
+-- Test1
+class BugClass k where
+ bugList :: ()
+instance BugClass ((s : sx) :: [r]) where
+ bugList = testF @r @s
+
+-- Test2
+foo :: forall r (s::r). ()
+foo = testF @r @s