Commit 56db641f authored by Simon Peyton Jones's avatar Simon Peyton Jones
Browse files

Test Trac #5117

parent 857405ec
{-# LANGUAGE OverloadedStrings #-}
module BadWarning where
data MyString = MyString String
f1 (MyString "a") = undefined
f1 (MyString "bb") = undefined
f1 _ = undefined
f2 (MyString "aa") = undefined
f2 (MyString "bb") = undefined
f2 _ = undefined
-- Genuine overlap here!
f3(MyString ('a':_)) = undefined
f3 (MyString "a") = undefined
f3 _ = undefined
T5117.hs:15:1:
Warning: Pattern match(es) are overlapped
In an equation for `f3': f3 (MyString "a") = ...
......@@ -83,3 +83,4 @@ test('T4870',
extra_clean(['T4870a.hi', 'T4870a.o'])],
multimod_compile,
['T4870', '-v0'])
test('T5117', normal, compile, [''])
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