[commit: testsuite] master: Add a test for #984 (cf16aa6)

Ian Lynagh igloo at earth.li
Fri Feb 1 17:20:31 CET 2013


Repository : ssh://darcs.haskell.org//srv/darcs/testsuite

On branch  : master

http://hackage.haskell.org/trac/ghc/changeset/cf16aa686760d2a4170c9a5033257668f802f02c

>---------------------------------------------------------------

commit cf16aa686760d2a4170c9a5033257668f802f02c
Author: Ian Lynagh <ian at well-typed.com>
Date:   Fri Feb 1 15:26:06 2013 +0000

    Add a test for #984

>---------------------------------------------------------------

 tests/parser/should_fail/T984.hs     |    9 +++++++++
 tests/parser/should_fail/T984.stderr |    4 ++++
 tests/parser/should_fail/all.T       |    1 +
 3 files changed, 14 insertions(+), 0 deletions(-)

diff --git a/tests/parser/should_fail/T984.hs b/tests/parser/should_fail/T984.hs
new file mode 100644
index 0000000..ba2e282
--- /dev/null
+++ b/tests/parser/should_fail/T984.hs
@@ -0,0 +1,9 @@
+
+module T984 where
+
+f _ = do
+        x <- computation
+        case () of
+                _ ->
+                        result <- computation
+                        case () of () -> undefined
diff --git a/tests/parser/should_fail/T984.stderr b/tests/parser/should_fail/T984.stderr
new file mode 100644
index 0000000..4c723a7
--- /dev/null
+++ b/tests/parser/should_fail/T984.stderr
@@ -0,0 +1,4 @@
+
+T984.hs:6:9:
+    Parse error in pattern: case () of { _ -> result }
+    Possibly caused by a missing 'do'?
diff --git a/tests/parser/should_fail/all.T b/tests/parser/should_fail/all.T
index 355961d..114524a 100644
--- a/tests/parser/should_fail/all.T
+++ b/tests/parser/should_fail/all.T
@@ -76,3 +76,4 @@ test('ParserNoLambdaCase', if_compiler_lt('ghc', '7.5', skip), compile_fail, [''
 test('ParserNoMultiWayIf', if_compiler_lt('ghc', '7.5', skip), compile_fail, [''])
 
 test('T5425', normal, compile_fail, [''])
+test('T984', normal, compile_fail, [''])





More information about the ghc-commits mailing list