From: sof Date: Sat, 6 Feb 1999 16:10:25 +0000 (+0000) Subject: [project @ 1999-02-06 16:10:18 by sof] X-Git-Tag: Approximately_9120_patches~6587 X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=69add38d17e7d296d47b03b87ac4badf40d050a8;p=ghc-hetmet.git [project @ 1999-02-06 16:10:18 by sof] New regression test - overlapped patterns involving labelled fields. --- diff --git a/ghc/tests/deSugar/should_compile/ds002.stderr b/ghc/tests/deSugar/should_compile/ds002.stderr index beaeb33..a5435e8 100644 --- a/ghc/tests/deSugar/should_compile/ds002.stderr +++ b/ghc/tests/deSugar/should_compile/ds002.stderr @@ -1,3 +1,4 @@ + ds002.hs:7: Pattern match(es) are overlapped in the definition of function `f': f y = ... f z = ... diff --git a/ghc/tests/deSugar/should_compile/ds003.stderr b/ghc/tests/deSugar/should_compile/ds003.stderr index 188cae5..c7a52de 100644 --- a/ghc/tests/deSugar/should_compile/ds003.stderr +++ b/ghc/tests/deSugar/should_compile/ds003.stderr @@ -1,3 +1,4 @@ + ds003.hs:5: Pattern match(es) are overlapped in the definition of function `f': f (x : (x1 : (x2 : x3))) ~(y, ys) z = ... f x y True = ... diff --git a/ghc/tests/deSugar/should_compile/ds019.stderr b/ghc/tests/deSugar/should_compile/ds019.stderr index 874b393..318885b 100644 --- a/ghc/tests/deSugar/should_compile/ds019.stderr +++ b/ghc/tests/deSugar/should_compile/ds019.stderr @@ -1,3 +1,4 @@ + ds019.hs:5: Pattern match(es) are overlapped in the definition of function `f': f d (j, k) p = ... f (e, f, g) l q = ... diff --git a/ghc/tests/deSugar/should_compile/ds020.stderr b/ghc/tests/deSugar/should_compile/ds020.stderr index 909af82..d75568c 100644 --- a/ghc/tests/deSugar/should_compile/ds020.stderr +++ b/ghc/tests/deSugar/should_compile/ds020.stderr @@ -1,3 +1,4 @@ + ds020.hs:5: Pattern match(es) are overlapped in the definition of function `a': a ~(~[], ~[], ~[]) = ... diff --git a/ghc/tests/deSugar/should_compile/ds022.stderr b/ghc/tests/deSugar/should_compile/ds022.stderr index 380086f..d935cb4 100644 --- a/ghc/tests/deSugar/should_compile/ds022.stderr +++ b/ghc/tests/deSugar/should_compile/ds022.stderr @@ -1,3 +1,4 @@ + ds022.hs:20: Pattern match(es) are overlapped in the definition of function `i': i 1 1.1 = ... i 2 2.2 = ... diff --git a/ghc/tests/deSugar/should_compile/ds040.stderr b/ghc/tests/deSugar/should_compile/ds040.stderr index c20c84f..f420d6a 100644 --- a/ghc/tests/deSugar/should_compile/ds040.stderr +++ b/ghc/tests/deSugar/should_compile/ds040.stderr @@ -1,3 +1,4 @@ + ds040.hs:7: Pattern match(es) are overlapped in the definition of function `^^^^': ^^^^ _ _ = ... diff --git a/ghc/tests/deSugar/should_compile/ds043.hs b/ghc/tests/deSugar/should_compile/ds043.hs new file mode 100644 index 0000000..5c7d746 --- /dev/null +++ b/ghc/tests/deSugar/should_compile/ds043.hs @@ -0,0 +1,11 @@ +-- !!! Checking the exhaustiveness of constructor +-- !!! with labelled fields. +module ShouldCompile where + +data E = B { a,b,c,d,e,f :: Bool } + +bug x = + case x of + B _ _ _ _ True False -> undefined + B {e=True, f=False} -> undefined + B {a=a,f=False,e=False} -> undefined diff --git a/ghc/tests/deSugar/should_compile/ds043.stderr b/ghc/tests/deSugar/should_compile/ds043.stderr new file mode 100644 index 0000000..4ffb3fb --- /dev/null +++ b/ghc/tests/deSugar/should_compile/ds043.stderr @@ -0,0 +1,6 @@ + +ds043.hs:8: Pattern match(es) are overlapped in a group of case alternatives beginning + (B _ _ _ _ True False): + B {e = True, f = False} -> ... + +