summaryrefslogtreecommitdiff
path: root/test/files/neg/t7623.scala
diff options
context:
space:
mode:
authorSom Snytt <som.snytt@gmail.com>2015-06-03 16:36:43 -0700
committerSom Snytt <som.snytt@gmail.com>2015-06-03 16:36:43 -0700
commit79436caa98ba46de644841a67ea9ff103831e574 (patch)
tree3c4f04bad8624e8ded8155ffd87d8028d5d5f9a7 /test/files/neg/t7623.scala
parent70f0b1ded880ec9b3a9478d02f1898fcfeee230c (diff)
downloadscala-79436caa98ba46de644841a67ea9ff103831e574.tar.gz
scala-79436caa98ba46de644841a67ea9ff103831e574.tar.bz2
scala-79436caa98ba46de644841a67ea9ff103831e574.zip
SI-9343 Xlint less strict on pattern sequences
-Xlint:stars-align warns only if elementarity > 0, that is, if an extracted sequence is not matched entirely by a pattern sequence, that is, in SLS 8.1.9 on pattern sequences, n = 1 and that pattern is a pattern sequence. This is still only triggered if productarity > 0, that is, a non-pattern-sequence pattern is required for the match. This is a sensitive area because it borders on exhaustiveness checking: it would be preferable to verify just that the match is exhaustive, and to emit this warning only if it is not.
Diffstat (limited to 'test/files/neg/t7623.scala')
-rw-r--r--test/files/neg/t7623.scala8
1 files changed, 4 insertions, 4 deletions
diff --git a/test/files/neg/t7623.scala b/test/files/neg/t7623.scala
index 5c40f37bc1..5334cc5f69 100644
--- a/test/files/neg/t7623.scala
+++ b/test/files/neg/t7623.scala
@@ -8,9 +8,9 @@ object X { def unapplySeq(a: Any): Option[(String, Seq[Int])] = Some("", List(1,
trait Ctest {
def f = C("") match { case C(s) => }
- def g = C("") match { case C(s, t) => }
+ def g = C("") match { case C(s, t) => } // warn
- def h = C("") match { case C(s, t, u @ _*) => }
+ def h = C("") match { case C(s, t, u @ _*) => } // warn
def ok = C("") match { case C(s, u @ _*) => }
}
@@ -18,9 +18,9 @@ trait Ctest {
trait Xtest {
def f = "" match { case X(s) => }
- def g = "" match { case X(s, t) => }
+ def g = "" match { case X(s, t) => } // warn
- def h = "" match { case X(s, t, u @ _*) => }
+ def h = "" match { case X(s, t, u @ _*) => } // warn
def ok = "" match { case X(s, u @ _*) => }
}