[commit: ghc] master: testsuite: Add broken test for #15289 (7b8dcd9)
git at git.haskell.org
git at git.haskell.org
Wed Jun 20 00:16:10 UTC 2018
Repository : ssh://git@git.haskell.org/ghc
On branch : master
Link : http://ghc.haskell.org/trac/ghc/changeset/7b8dcd90c5a622146dfdd3b162a1f1b1d262d5cf/ghc
>---------------------------------------------------------------
commit 7b8dcd90c5a622146dfdd3b162a1f1b1d262d5cf
Author: Ben Gamari <ben at smart-cactus.org>
Date: Mon Jun 18 19:10:10 2018 -0400
testsuite: Add broken test for #15289
The stderr output is merely a guess at what we should expect, but currently this
is certainly broken.
>---------------------------------------------------------------
7b8dcd90c5a622146dfdd3b162a1f1b1d262d5cf
testsuite/tests/patsyn/should_fail/T15289.hs | 5 +++++
testsuite/tests/patsyn/should_fail/T15289.stderr | 8 ++++++++
testsuite/tests/patsyn/should_fail/all.T | 1 +
3 files changed, 14 insertions(+)
diff --git a/testsuite/tests/patsyn/should_fail/T15289.hs b/testsuite/tests/patsyn/should_fail/T15289.hs
new file mode 100644
index 0000000..bc9143a
--- /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 0000000..b19d7a0
--- /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 d3a0a9b..269dc8d 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, [''])
More information about the ghc-commits
mailing list