summaryrefslogtreecommitdiff
path: root/testsuite/tests/deSugar/should_compile/T5455.hs
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite/tests/deSugar/should_compile/T5455.hs')
-rw-r--r--testsuite/tests/deSugar/should_compile/T5455.hs13
1 files changed, 13 insertions, 0 deletions
diff --git a/testsuite/tests/deSugar/should_compile/T5455.hs b/testsuite/tests/deSugar/should_compile/T5455.hs
new file mode 100644
index 0000000000..b6d44b8bcb
--- /dev/null
+++ b/testsuite/tests/deSugar/should_compile/T5455.hs
@@ -0,0 +1,13 @@
+{-# OPTIONS_GHC -fwarn-incomplete-uni-patterns #-}
+module T5455 where
+
+-- No error message for this one:
+-- the pattern will never be demanded
+
+w :: String -> String
+w x = let (_:_) = x in "1"
+
+-- We should get just one error message here
+
+w2 :: String -> String
+w2 x2 = let (a:as) = x2 in (a:a:as)