summaryrefslogtreecommitdiff
path: root/testsuite/tests/deSugar/should_compile/ds063.hs
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite/tests/deSugar/should_compile/ds063.hs')
-rw-r--r--testsuite/tests/deSugar/should_compile/ds063.hs11
1 files changed, 11 insertions, 0 deletions
diff --git a/testsuite/tests/deSugar/should_compile/ds063.hs b/testsuite/tests/deSugar/should_compile/ds063.hs
new file mode 100644
index 0000000000..74bde90887
--- /dev/null
+++ b/testsuite/tests/deSugar/should_compile/ds063.hs
@@ -0,0 +1,11 @@
+{-# OPTIONS_GHC -Wall #-}
+{-# LANGUAGE ViewPatterns #-}
+
+module ShouldCompile where
+
+f :: Int -> Int
+f ((+1) -> 1) = 5
+f _ = 3
+
+-- Should not give an overlapping-patterns or non-exhaustive-patterns error
+-- See Trac #2395