summaryrefslogtreecommitdiff
path: root/testsuite
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite')
-rw-r--r--testsuite/tests/typecheck/should_compile/T23199.hs10
-rw-r--r--testsuite/tests/typecheck/should_compile/all.T1
2 files changed, 11 insertions, 0 deletions
diff --git a/testsuite/tests/typecheck/should_compile/T23199.hs b/testsuite/tests/typecheck/should_compile/T23199.hs
new file mode 100644
index 0000000000..8613c7b51d
--- /dev/null
+++ b/testsuite/tests/typecheck/should_compile/T23199.hs
@@ -0,0 +1,10 @@
+{-# LANGUAGE MultiParamTypeClasses, FunctionalDependencies #-}
+module Foo where
+
+class C a b c | b -> c where
+ op :: a -> b -> c
+
+bar1 :: C a Int Char => a -> Char
+bar1 x = op x (3 :: Int) :: Char
+
+bar2 x = op x (3 :: Int) :: Char
diff --git a/testsuite/tests/typecheck/should_compile/all.T b/testsuite/tests/typecheck/should_compile/all.T
index b3a24ba4bf..4ffb6f6a5c 100644
--- a/testsuite/tests/typecheck/should_compile/all.T
+++ b/testsuite/tests/typecheck/should_compile/all.T
@@ -872,3 +872,4 @@ test('QualifiedRecordUpdate',
[ extra_files(['QualifiedRecordUpdate_aux.hs']) ]
, multimod_compile, ['QualifiedRecordUpdate', '-v0'])
test('T23192', normal, compile, [''])
+test('T23199', normal, compile, [''])