summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoshua Price <elderephemera@gmail.com>2021-09-12 15:10:35 -0400
committerMarge Bot <ben+marge-bot@smart-cactus.org>2021-09-13 09:37:31 -0400
commit64923cf295ea914db458547432237a5ed1eff571 (patch)
tree2359f3fc4ec8555d797464041e870c0625b4b331
parenta2a16e4cee5104f03cabcdd229dd64735c7dad31 (diff)
downloadhaskell-64923cf295ea914db458547432237a5ed1eff571.tar.gz
Add test for #17865
-rw-r--r--testsuite/tests/parser/should_fail/T17865.hs3
-rw-r--r--testsuite/tests/parser/should_fail/T17865.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/T17865.hs b/testsuite/tests/parser/should_fail/T17865.hs
new file mode 100644
index 0000000000..b278ec09ae
--- /dev/null
+++ b/testsuite/tests/parser/should_fail/T17865.hs
@@ -0,0 +1,3 @@
+module T17865 where
+
+data T = 'MkT
diff --git a/testsuite/tests/parser/should_fail/T17865.stderr b/testsuite/tests/parser/should_fail/T17865.stderr
new file mode 100644
index 0000000000..786196c3a8
--- /dev/null
+++ b/testsuite/tests/parser/should_fail/T17865.stderr
@@ -0,0 +1,2 @@
+T17865.hs:3:10:
+ Cannot parse data constructor in a data/newtype declaration: 'MkT
diff --git a/testsuite/tests/parser/should_fail/all.T b/testsuite/tests/parser/should_fail/all.T
index 5198d2151d..d75e82c032 100644
--- a/testsuite/tests/parser/should_fail/all.T
+++ b/testsuite/tests/parser/should_fail/all.T
@@ -198,3 +198,4 @@ test('RecordWildCardsFail', normal, compile_fail, [''])
test('ViewPatternsFail', normal, compile_fail, [''])
test('ParserNoTH1', normal, compile_fail, [''])
test('ParserNoTH2', normal, compile_fail, [''])
+test('T17865', normal, compile_fail, [''])