summaryrefslogtreecommitdiff
path: root/testsuite/tests/parser
diff options
context:
space:
mode:
authornineonine <mail4chemik@gmail.com>2019-02-09 00:20:19 -0800
committerMarge Bot <ben+marge-bot@smart-cactus.org>2019-02-12 19:48:38 -0500
commita08f463bcc9727d91cec4c6e952ad0f5bbc3fbf9 (patch)
treed4b87146166e5fdb41068fd1c57ac307de7e6758 /testsuite/tests/parser
parent8b476d822e97cfe4cebe6e74924d9a79148d608c (diff)
downloadhaskell-a08f463bcc9727d91cec4c6e952ad0f5bbc3fbf9.tar.gz
Fix #15849 by checking whether there's a do block
Diffstat (limited to 'testsuite/tests/parser')
-rw-r--r--testsuite/tests/parser/should_fail/T15849.hs4
-rw-r--r--testsuite/tests/parser/should_fail/T15849.stderr3
-rw-r--r--testsuite/tests/parser/should_fail/all.T1
-rw-r--r--testsuite/tests/parser/should_fail/readFail011.stderr2
-rw-r--r--testsuite/tests/parser/should_fail/readFail034.stderr2
5 files changed, 8 insertions, 4 deletions
diff --git a/testsuite/tests/parser/should_fail/T15849.hs b/testsuite/tests/parser/should_fail/T15849.hs
new file mode 100644
index 0000000000..eea8e4f9c1
--- /dev/null
+++ b/testsuite/tests/parser/should_fail/T15849.hs
@@ -0,0 +1,4 @@
+module T15849 where
+
+main = return ()
+ foo = return ()
diff --git a/testsuite/tests/parser/should_fail/T15849.stderr b/testsuite/tests/parser/should_fail/T15849.stderr
new file mode 100644
index 0000000000..e974dbde02
--- /dev/null
+++ b/testsuite/tests/parser/should_fail/T15849.stderr
@@ -0,0 +1,3 @@
+
+T15849.hs:4:6: error:
+ parse error on input ‘=’
diff --git a/testsuite/tests/parser/should_fail/all.T b/testsuite/tests/parser/should_fail/all.T
index ad23574358..7976c17a14 100644
--- a/testsuite/tests/parser/should_fail/all.T
+++ b/testsuite/tests/parser/should_fail/all.T
@@ -133,6 +133,7 @@ test('typeops_C', normal, compile_fail, [''])
test('typeops_D', normal, compile_fail, [''])
test('T15053', normal, compile_fail, [''])
test('T15233', normal, compile_fail, [''])
+test('T15849', normal, compile_fail, [''])
test('typeopsDataCon_A', normal, compile_fail, [''])
test('typeopsDataCon_B', normal, compile_fail, [''])
test('strictnessDataCon_A', normal, compile_fail, [''])
diff --git a/testsuite/tests/parser/should_fail/readFail011.stderr b/testsuite/tests/parser/should_fail/readFail011.stderr
index 25accd2a19..08388e5d21 100644
--- a/testsuite/tests/parser/should_fail/readFail011.stderr
+++ b/testsuite/tests/parser/should_fail/readFail011.stderr
@@ -1,5 +1,3 @@
readFail011.hs:7:10: error:
parse error on input ‘=’
- Perhaps you need a 'let' in a 'do' block?
- e.g. 'let x = 5' instead of 'x = 5'
diff --git a/testsuite/tests/parser/should_fail/readFail034.stderr b/testsuite/tests/parser/should_fail/readFail034.stderr
index 75156c9ae4..ad2fb000af 100644
--- a/testsuite/tests/parser/should_fail/readFail034.stderr
+++ b/testsuite/tests/parser/should_fail/readFail034.stderr
@@ -1,5 +1,3 @@
readFail034.hs:4:6: error:
parse error on input ‘=’
- Perhaps you need a 'let' in a 'do' block?
- e.g. 'let x = 5' instead of 'x = 5'