summaryrefslogtreecommitdiff
path: root/testsuite/tests/typecheck/should_fail/T5236.hs
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite/tests/typecheck/should_fail/T5236.hs')
-rw-r--r--testsuite/tests/typecheck/should_fail/T5236.hs21
1 files changed, 21 insertions, 0 deletions
diff --git a/testsuite/tests/typecheck/should_fail/T5236.hs b/testsuite/tests/typecheck/should_fail/T5236.hs
new file mode 100644
index 0000000000..07b31c3218
--- /dev/null
+++ b/testsuite/tests/typecheck/should_fail/T5236.hs
@@ -0,0 +1,21 @@
+{-# LANGUAGE MultiParamTypeClasses, FunctionalDependencies, FlexibleContexts #-}
+
+module Main where
+
+data A
+data B
+
+class Id a b | a -> b, b -> a
+
+instance Id A A
+instance Id B B
+
+loop :: Id A B => Bool
+loop = True
+
+f :: Bool
+f = loop
+
+
+main :: IO ()
+main = return () \ No newline at end of file