[Git][ghc/ghc][master] Add additional tests for #18172 (Followup MR 3543)

Marge Bot gitlab at gitlab.haskell.org
Tue Sep 1 03:00:34 UTC 2020



 Marge Bot pushed to branch master at Glasgow Haskell Compiler / GHC


Commits:
e5969fd0 by Roland Senn at 2020-08-31T23:00:27-04:00
Add additional tests for #18172 (Followup MR 3543)

There was still one active discussion [thread](https://gitlab.haskell.org/ghc/ghc/-/merge_requests/3543#note_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.

- - - - -


3 changed files:

- testsuite/tests/deSugar/should_run/T18172.script
- testsuite/tests/deSugar/should_run/T18172.stderr
- testsuite/tests/deSugar/should_run/T18172.stdout


Changes:

=====================================
testsuite/tests/deSugar/should_run/T18172.script
=====================================
@@ -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]


=====================================
testsuite/tests/deSugar/should_run/T18172.stderr
=====================================
@@ -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


=====================================
testsuite/tests/deSugar/should_run/T18172.stdout
=====================================
@@ -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]
+[]



View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/e5969fd06ad4b4c31a8bdce51d35f9aa05594b49

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/e5969fd06ad4b4c31a8bdce51d35f9aa05594b49
You're receiving this email because of your account on gitlab.haskell.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-commits/attachments/20200831/5f58668a/attachment-0001.html>


More information about the ghc-commits mailing list