summaryrefslogtreecommitdiff
path: root/testsuite
diff options
context:
space:
mode:
authorSimon Peyton Jones <simonpj@microsoft.com>2016-05-16 13:41:06 +0100
committerSimon Peyton Jones <simonpj@microsoft.com>2016-05-19 10:44:47 +0100
commit72b677d31e39f417e4403b1b151f02913f483d32 (patch)
tree183aa724bfbdb94f8e3a8a547826210f37152048 /testsuite
parent13e40f998e15a626a4212bde0987ddbc98b3f56f (diff)
downloadhaskell-72b677d31e39f417e4403b1b151f02913f483d32.tar.gz
Fix Trac #12051
A minor parser issue, allowing a mal-formed data constructor through.
Diffstat (limited to 'testsuite')
-rw-r--r--testsuite/tests/parser/should_fail/T12051.hs3
-rw-r--r--testsuite/tests/parser/should_fail/T12051.stderr2
-rw-r--r--testsuite/tests/parser/should_fail/all.T1
3 files changed, 6 insertions, 0 deletions
diff --git a/testsuite/tests/parser/should_fail/T12051.hs b/testsuite/tests/parser/should_fail/T12051.hs
new file mode 100644
index 0000000000..3744f77061
--- /dev/null
+++ b/testsuite/tests/parser/should_fail/T12051.hs
@@ -0,0 +1,3 @@
+module T12051 where
+
+data T = (+++) Int
diff --git a/testsuite/tests/parser/should_fail/T12051.stderr b/testsuite/tests/parser/should_fail/T12051.stderr
new file mode 100644
index 0000000000..ae65eaea6e
--- /dev/null
+++ b/testsuite/tests/parser/should_fail/T12051.stderr
@@ -0,0 +1,2 @@
+
+T12051.hs:3:10: error: Not a data constructor: ‘+++’
diff --git a/testsuite/tests/parser/should_fail/all.T b/testsuite/tests/parser/should_fail/all.T
index e6c6f41db7..ca23d3b5b6 100644
--- a/testsuite/tests/parser/should_fail/all.T
+++ b/testsuite/tests/parser/should_fail/all.T
@@ -93,3 +93,4 @@ test('T10196Fail1', normal, compile_fail, [''])
test('T10196Fail2', normal, compile_fail, [''])
test('T10498a', normal, compile_fail, [''])
test('T10498b', normal, compile_fail, [''])
+test('T12051', normal, compile_fail, [''])