summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Peyton Jones <simon.peytonjones@gmail.com>2023-04-16 22:00:57 +0100
committerSimon Peyton Jones <simon.peytonjones@gmail.com>2023-04-16 22:00:57 +0100
commit49dc16fcbe8b3e6180bca714fa6f66eadf63dbec (patch)
treeeca42ab0a2f9c2543d8b41052a274565646a7cef
parent2c04024617f1ee4c76844cfe0a886bab87c23bd0 (diff)
downloadhaskell-wip/T23199.tar.gz
Add regression test for #23199wip/T23199
-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, [''])