Test Trac #5246
authorSimon Peyton Jones <simonpj@microsoft.com>
Thu, 9 Jun 2011 19:04:17 +0000 (20:04 +0100)
committerSimon Peyton Jones <simonpj@microsoft.com>
Thu, 9 Jun 2011 19:04:17 +0000 (20:04 +0100)
testsuite/tests/ghc-regress/typecheck/should_fail/T5246.hs [new file with mode: 0644]
testsuite/tests/ghc-regress/typecheck/should_fail/T5246.stderr [new file with mode: 0644]
testsuite/tests/ghc-regress/typecheck/should_fail/all.T

diff --git a/testsuite/tests/ghc-regress/typecheck/should_fail/T5246.hs b/testsuite/tests/ghc-regress/typecheck/should_fail/T5246.hs
new file mode 100644 (file)
index 0000000..c7b41c0
--- /dev/null
@@ -0,0 +1,11 @@
+{-# LANGUAGE ImplicitParams #-}\r
+\r
+-- Produced a duplicated error message in 7.0\r
+\r
+module T5246 where\r
+\r
+foo :: (?x :: Int) => a\r
+foo = undefined\r
+\r
+bar = let ?x = "hello"\r
+      in foo\r
diff --git a/testsuite/tests/ghc-regress/typecheck/should_fail/T5246.stderr b/testsuite/tests/ghc-regress/typecheck/should_fail/T5246.stderr
new file mode 100644 (file)
index 0000000..3886cde
--- /dev/null
@@ -0,0 +1,6 @@
+\r
+T5246.hs:11:10:\r
+    Couldn't match type `Int' with `[Char]'\r
+    In the expression: foo\r
+    In the expression: let ?x = "hello" in foo\r
+    In an equation for `bar': bar = let ?x = "hello" in foo\r
index 1d81185..42ec611 100644 (file)
@@ -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,[''])