summaryrefslogtreecommitdiff
path: root/testsuite
diff options
context:
space:
mode:
authorBen Gamari <ben@smart-cactus.org>2018-06-18 19:10:10 -0400
committerBen Gamari <ben@smart-cactus.org>2018-06-19 20:15:46 -0400
commit7b8dcd90c5a622146dfdd3b162a1f1b1d262d5cf (patch)
treead8baaf3982cd4fbbc05e74fd02a44581509a689 /testsuite
parentf0179e3adf6677243f587a05307a4a42833aa8d1 (diff)
downloadhaskell-7b8dcd90c5a622146dfdd3b162a1f1b1d262d5cf.tar.gz
testsuite: Add broken test for #15289
The stderr output is merely a guess at what we should expect, but currently this is certainly broken.
Diffstat (limited to 'testsuite')
-rw-r--r--testsuite/tests/patsyn/should_fail/T15289.hs5
-rw-r--r--testsuite/tests/patsyn/should_fail/T15289.stderr8
-rw-r--r--testsuite/tests/patsyn/should_fail/all.T1
3 files changed, 14 insertions, 0 deletions
diff --git a/testsuite/tests/patsyn/should_fail/T15289.hs b/testsuite/tests/patsyn/should_fail/T15289.hs
new file mode 100644
index 0000000000..bc9143a392
--- /dev/null
+++ b/testsuite/tests/patsyn/should_fail/T15289.hs
@@ -0,0 +1,5 @@
+{-# LANGUAGE PatternSynonyms #-}
+{-# LANGUAGE ScopedTypeVariables #-}
+module Oops where
+
+pattern What = True :: Maybe
diff --git a/testsuite/tests/patsyn/should_fail/T15289.stderr b/testsuite/tests/patsyn/should_fail/T15289.stderr
new file mode 100644
index 0000000000..b19d7a0d6b
--- /dev/null
+++ b/testsuite/tests/patsyn/should_fail/T15289.stderr
@@ -0,0 +1,8 @@
+ T15289.hs:5:16: error:
+ • Couldn't match expected type ‘Maybe’ with actual type ‘Bool’
+ • In the pattern: True
+ In the pattern: True :: Maybe
+ In the declaration for pattern synonym ‘What’
+ |
+ 5 | pattern What = True :: Maybe
+ | ^^^^
diff --git a/testsuite/tests/patsyn/should_fail/all.T b/testsuite/tests/patsyn/should_fail/all.T
index d3a0a9b771..269dc8d844 100644
--- a/testsuite/tests/patsyn/should_fail/all.T
+++ b/testsuite/tests/patsyn/should_fail/all.T
@@ -42,3 +42,4 @@ test('T14380', normal, compile_fail, [''])
test('T14498', normal, compile_fail, [''])
test('T14552', normal, compile_fail, [''])
test('T14507', normal, compile_fail, ['-dsuppress-uniques'])
+test('T15289', expect_broken(15289), compile_fail, [''])