Commit 70eefbc2 authored by Simon Peyton Jones's avatar Simon Peyton Jones

Test Trac #11245

parent 5ba3caa2
module T11245 where
foo x = do
let a | Just i <- x
, odd i
= True
| Nothing <- x
= False
print x
print a
T11245.hs:5:7: warning:
Pattern match(es) are non-exhaustive
In an equation for ‘a’: Guards do not cover entire pattern space
......@@ -32,3 +32,4 @@ test('pmc004', only_compiler_types(['ghc']), compile, ['-fwarn-incomplete-patter
test('pmc005', only_compiler_types(['ghc']), compile, ['-fwarn-incomplete-patterns -fwarn-overlapping-patterns'])
test('pmc006', only_compiler_types(['ghc']), compile, ['-fwarn-incomplete-patterns -fwarn-overlapping-patterns'])
test('pmc007', only_compiler_types(['ghc']), compile, ['-fwarn-incomplete-patterns -fwarn-overlapping-patterns'])
test('T11245', only_compiler_types(['ghc']), compile, ['-fwarn-incomplete-patterns -fwarn-overlapping-patterns'])
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment