Commit 146d22fc authored by Simon Peyton Jones's avatar Simon Peyton Jones
Browse files

Add test for overlapping pattern warnings for lazy patterns

parent 73b32a6d
......@@ -61,3 +61,4 @@ test('ds054', normal, compile, [''])
test('ds055', only_compiler_types(['ghc']), compile, [''])
test('ds056', normal, compile, ['-Wall'])
test('ds057', normal, compile, [''])
test('ds058', normal, compile, ['-W'])
-- Test overlapping pattern warnings
module ShouldCompile where
f x = case x of
Just (~1) -> 0
Just _ -> 1 -- This one cannot match
Nothing -> 2
Warning: Pattern match(es) are overlapped
In a case alternative: Just _ -> ...
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