summaryrefslogtreecommitdiff
path: root/testsuite/tests/pmcheck
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite/tests/pmcheck')
-rw-r--r--testsuite/tests/pmcheck/should_compile/T17234.hs8
-rw-r--r--testsuite/tests/pmcheck/should_compile/T17234.stderr4
-rw-r--r--testsuite/tests/pmcheck/should_compile/all.T2
3 files changed, 14 insertions, 0 deletions
diff --git a/testsuite/tests/pmcheck/should_compile/T17234.hs b/testsuite/tests/pmcheck/should_compile/T17234.hs
new file mode 100644
index 0000000000..27025d430a
--- /dev/null
+++ b/testsuite/tests/pmcheck/should_compile/T17234.hs
@@ -0,0 +1,8 @@
+{-# LANGUAGE BangPatterns #-}
+
+module Lib where
+
+import Data.Void
+
+f :: Void -> ()
+f !_ = ()
diff --git a/testsuite/tests/pmcheck/should_compile/T17234.stderr b/testsuite/tests/pmcheck/should_compile/T17234.stderr
new file mode 100644
index 0000000000..0a1912cfab
--- /dev/null
+++ b/testsuite/tests/pmcheck/should_compile/T17234.stderr
@@ -0,0 +1,4 @@
+
+T17234.hs:8:1: warning: [-Woverlapping-patterns (in -Wdefault)]
+ Pattern match has inaccessible right hand side
+ In an equation for ‘f’: f !_ = ...
diff --git a/testsuite/tests/pmcheck/should_compile/all.T b/testsuite/tests/pmcheck/should_compile/all.T
index e41d7f211c..19ae2c71b9 100644
--- a/testsuite/tests/pmcheck/should_compile/all.T
+++ b/testsuite/tests/pmcheck/should_compile/all.T
@@ -82,6 +82,8 @@ test('T17096', collect_compiler_stats('bytes allocated',10), compile,
['-fwarn-incomplete-patterns -fwarn-overlapping-patterns +RTS -M2G -RTS'])
test('T17112', normal, compile,
['-fwarn-incomplete-patterns -fwarn-overlapping-patterns'])
+test('T17234', normal, compile,
+ ['-fwarn-incomplete-patterns -fwarn-overlapping-patterns'])
# Other tests
test('pmc001', [], compile,