Repository : ssh://darcs.haskell.org//srv/darcs/testsuite On branch : master
http://hackage.haskell.org/trac/ghc/changeset/2e7a10aca80d8d43eef9cb001dbabbd59f932e37 >--------------------------------------------------------------- commit 2e7a10aca80d8d43eef9cb001dbabbd59f932e37 Author: Simon Peyton Jones <[email protected]> Date: Thu Jun 9 20:04:17 2011 +0100 Test Trac #5246 >--------------------------------------------------------------- tests/ghc-regress/typecheck/should_fail/T5246.hs | 11 +++++++++++ .../ghc-regress/typecheck/should_fail/T5246.stderr | 6 ++++++ tests/ghc-regress/typecheck/should_fail/all.T | 3 ++- 3 files changed, 19 insertions(+), 1 deletions(-) diff --git a/tests/ghc-regress/typecheck/should_fail/T5246.hs b/tests/ghc-regress/typecheck/should_fail/T5246.hs new file mode 100644 index 0000000..c7b41c0 --- /dev/null +++ b/tests/ghc-regress/typecheck/should_fail/T5246.hs @@ -0,0 +1,11 @@ +{-# LANGUAGE ImplicitParams #-} + +-- Produced a duplicated error message in 7.0 + +module T5246 where + +foo :: (?x :: Int) => a +foo = undefined + +bar = let ?x = "hello" + in foo diff --git a/tests/ghc-regress/typecheck/should_fail/T5246.stderr b/tests/ghc-regress/typecheck/should_fail/T5246.stderr new file mode 100644 index 0000000..3886cde --- /dev/null +++ b/tests/ghc-regress/typecheck/should_fail/T5246.stderr @@ -0,0 +1,6 @@ + +T5246.hs:11:10: + Couldn't match type `Int' with `[Char]' + In the expression: foo + In the expression: let ?x = "hello" in foo + In an equation for `bar': bar = let ?x = "hello" in foo diff --git a/tests/ghc-regress/typecheck/should_fail/all.T b/tests/ghc-regress/typecheck/should_fail/all.T index 1d81185..42ec611 100644 --- a/tests/ghc-regress/typecheck/should_fail/all.T +++ b/tests/ghc-regress/typecheck/should_fail/all.T @@ -239,4 +239,5 @@ test('tcfail208', normal, compile_fail, ['']) test('FailDueToGivenOverlapping', normal, compile_fail, ['']) test('LongWayOverlapping', normal, compile_fail, ['']) -test('T5236',normal,compile_fail,['']) \ No newline at end of file +test('T5236',normal,compile_fail,['']) +test('T5246',normal,compile_fail,['']) _______________________________________________ Cvs-ghc mailing list [email protected] http://www.haskell.org/mailman/listinfo/cvs-ghc
