Commit 3fd85907 authored by Roland Senn's avatar Roland Senn

Add additional tests for #18172 (Followup MR 3543)

There was still one active discussion [thread](ghc/ghc!3543 (comment 284325)) when MR !3543 got merged.

This MR adds the requested tests exercising the changes in
`compiler/GHC/HsToCore/Match/Literal.hs:warnAboutEmptyEnumerations` and its sub-functions.
parent f2d1accf
Pipeline #22970 passed with stages
in 484 minutes and 14 seconds
......@@ -20,3 +20,10 @@ ZipList [259] :: ZipList Word8
:l T18172.hs
Wombat [4, 264, 10]
[1..5]::[Int]
[5..2]::[Int]
[6..9]::[Integer]
[9..6]::[Integer]
[10..15]::[Word8]
[15..10]::[Word8]
......@@ -45,3 +45,12 @@
<interactive>:22:12: warning: [-Woverflowed-literals (in -Wdefault)]
Literal 264 is out of the Word8 range 0..255
<interactive>:25:1: warning: [-Wempty-enumerations (in -Wdefault)]
Enumeration is empty
<interactive>:27:1: warning: [-Wempty-enumerations (in -Wdefault)]
Enumeration is empty
<interactive>:29:1: warning: [-Wempty-enumerations (in -Wdefault)]
Enumeration is empty
......@@ -12,3 +12,9 @@ ZipList {getZipList = [3]}
[]
[]
Wombat [4,8,10]
[1,2,3,4,5]
[]
[6,7,8,9]
[]
[10,11,12,13,14,15]
[]
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