summaryrefslogtreecommitdiff
path: root/testsuite/tests/typecheck/should_fail/FunDepOrigin1b.hs
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite/tests/typecheck/should_fail/FunDepOrigin1b.hs')
-rw-r--r--testsuite/tests/typecheck/should_fail/FunDepOrigin1b.hs11
1 files changed, 11 insertions, 0 deletions
diff --git a/testsuite/tests/typecheck/should_fail/FunDepOrigin1b.hs b/testsuite/tests/typecheck/should_fail/FunDepOrigin1b.hs
new file mode 100644
index 0000000000..dfd807d463
--- /dev/null
+++ b/testsuite/tests/typecheck/should_fail/FunDepOrigin1b.hs
@@ -0,0 +1,11 @@
+{-# LANGUAGE MultiParamTypeClasses, FunctionalDependencies, FlexibleContexts #-}
+
+module FunDepOrigin1b where
+
+class C a b | a -> b where
+ op :: a -> b -> b
+
+-- foo :: (C Bool (Maybe a), C Bool [b]) => x -> (Maybe a, [b])
+foo _ = (op True Nothing, op False [])
+
+-- See Note [Suppressing confusing errors] in GHC.Tc.Errors