diff options
author | Simon Peyton Jones <simon.peytonjones@gmail.com> | 2023-04-16 22:00:57 +0100 |
---|---|---|
committer | Simon Peyton Jones <simon.peytonjones@gmail.com> | 2023-04-16 22:00:57 +0100 |
commit | 49dc16fcbe8b3e6180bca714fa6f66eadf63dbec (patch) | |
tree | eca42ab0a2f9c2543d8b41052a274565646a7cef | |
parent | 2c04024617f1ee4c76844cfe0a886bab87c23bd0 (diff) | |
download | haskell-wip/T23199.tar.gz |
Add regression test for #23199wip/T23199
-rw-r--r-- | testsuite/tests/typecheck/should_compile/T23199.hs | 10 | ||||
-rw-r--r-- | testsuite/tests/typecheck/should_compile/all.T | 1 |
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, ['']) |