summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Peyton Jones <simon.peytonjones@gmail.com>2023-04-16 22:00:57 +0100
committerMarge Bot <ben+marge-bot@smart-cactus.org>2023-04-17 08:09:24 -0400
commit1532a8b2b222fee73959a0760ac8867be7f19ce6 (patch)
treeb7538dcd35d99119a2328d7eb492a3e0318de760
parent51479ceb31b8bfef15b966de7cfd64d1fdb22257 (diff)
downloadhaskell-1532a8b2b222fee73959a0760ac8867be7f19ce6.tar.gz
Add regression test for #23199
-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, [''])