summaryrefslogtreecommitdiff
path: root/testsuite/tests
diff options
context:
space:
mode:
authorIan Lynagh <ian@well-typed.com>2013-02-01 15:26:06 +0000
committerIan Lynagh <ian@well-typed.com>2013-02-01 15:26:06 +0000
commit7361acf4f7c6e3e07c57cd6d59ea1e6b81884616 (patch)
treef299460ab90456daed1ad9e978831586fb65970a /testsuite/tests
parent1c81f61e131b33596de7c272af16550d34155e92 (diff)
downloadhaskell-7361acf4f7c6e3e07c57cd6d59ea1e6b81884616.tar.gz
Add a test for #984
Diffstat (limited to 'testsuite/tests')
-rw-r--r--testsuite/tests/parser/should_fail/T984.hs9
-rw-r--r--testsuite/tests/parser/should_fail/T984.stderr4
-rw-r--r--testsuite/tests/parser/should_fail/all.T1
3 files changed, 14 insertions, 0 deletions
diff --git a/testsuite/tests/parser/should_fail/T984.hs b/testsuite/tests/parser/should_fail/T984.hs
new file mode 100644
index 0000000000..ba2e282d5a
--- /dev/null
+++ b/testsuite/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/testsuite/tests/parser/should_fail/T984.stderr b/testsuite/tests/parser/should_fail/T984.stderr
new file mode 100644
index 0000000000..4c723a7869
--- /dev/null
+++ b/testsuite/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/testsuite/tests/parser/should_fail/all.T b/testsuite/tests/parser/should_fail/all.T
index 355961dd4f..114524affa 100644
--- a/testsuite/tests/parser/should_fail/all.T
+++ b/testsuite/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, [''])