diff options
-rw-r--r-- | testsuite/tests/ghc-regress/typecheck/should_compile/all.T | 1 | ||||
-rw-r--r-- | testsuite/tests/ghc-regress/typecheck/should_compile/tc129.hs | 15 |
2 files changed, 16 insertions, 0 deletions
diff --git a/testsuite/tests/ghc-regress/typecheck/should_compile/all.T b/testsuite/tests/ghc-regress/typecheck/should_compile/all.T index 722baa2e92..983a0bb325 100644 --- a/testsuite/tests/ghc-regress/typecheck/should_compile/all.T +++ b/testsuite/tests/ghc-regress/typecheck/should_compile/all.T @@ -132,3 +132,4 @@ test "tc125" { myvtc("") } test "tc126" { myvtc("") } test "tc127" { myvtc("") } test "tc128" { myvtc("") } +test "tc129" { myvtc("") } diff --git a/testsuite/tests/ghc-regress/typecheck/should_compile/tc129.hs b/testsuite/tests/ghc-regress/typecheck/should_compile/tc129.hs new file mode 100644 index 0000000000..0fb623daaf --- /dev/null +++ b/testsuite/tests/ghc-regress/typecheck/should_compile/tc129.hs @@ -0,0 +1,15 @@ +-- !!! Test inheritance of implicit parameters. +-- GHC 5.00.2 fails this test + +-- The thing is to do with whether an implicit parameter +-- constraint can be "inherited". See notes in TcSimplify.lhs + +module ShouldCompile where + +data R = R {f :: Int} + +foo :: (?x :: Int) => R -> R +foo r = r {f = ?x} + +baz = (?x +1) :: Int + |