summaryrefslogtreecommitdiff
path: root/testsuite/tests
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite/tests')
-rw-r--r--testsuite/tests/parser/should_fail/T19928.hs8
-rw-r--r--testsuite/tests/parser/should_fail/T19928.stderr12
-rw-r--r--testsuite/tests/parser/should_fail/all.T1
3 files changed, 21 insertions, 0 deletions
diff --git a/testsuite/tests/parser/should_fail/T19928.hs b/testsuite/tests/parser/should_fail/T19928.hs
new file mode 100644
index 0000000000..c6c2947577
--- /dev/null
+++ b/testsuite/tests/parser/should_fail/T19928.hs
@@ -0,0 +1,8 @@
+{-# LANGUAGE UnicodeSyntax, LinearTypes #-}
+
+module T19928 where
+
+data R where
+ D1 :: { d1 :: Int } %1 -> R
+ Dp :: { dp :: Int } %p -> R
+ Dl :: { dl :: Int } ⊸ R
diff --git a/testsuite/tests/parser/should_fail/T19928.stderr b/testsuite/tests/parser/should_fail/T19928.stderr
new file mode 100644
index 0000000000..342639a100
--- /dev/null
+++ b/testsuite/tests/parser/should_fail/T19928.stderr
@@ -0,0 +1,12 @@
+
+T19928.hs:6:9: error:
+ Parse error: ‘(%1 ->)’
+ Record constructors in GADTs must use an ordinary, non-linear arrow.
+
+T19928.hs:7:9: error:
+ Parse error: ‘(%p ->)’
+ Record constructors in GADTs must use an ordinary, non-linear arrow.
+
+T19928.hs:8:9: error:
+ Parse error: ‘(%1 ->)’
+ Record constructors in GADTs must use an ordinary, non-linear arrow.
diff --git a/testsuite/tests/parser/should_fail/all.T b/testsuite/tests/parser/should_fail/all.T
index 49a298c93f..9975f6c5d7 100644
--- a/testsuite/tests/parser/should_fail/all.T
+++ b/testsuite/tests/parser/should_fail/all.T
@@ -190,3 +190,4 @@ test('RecordDotSyntaxFail11', normal, compile_fail, [''])
test('RecordDotSyntaxFail12', normal, compile_fail, [''])
test('RecordDotSyntaxFail13', normal, compile_fail, [''])
test('T19504', normal, compile_fail, [''])
+test('T19928', normal, compile_fail, [''])