scala/scala — pull request #4216 by som-snytt (2014-12-18 09:00:10+00:00)
Title: SI-7623 Trailing sequence wildcard warning

An -Xlint:stars-align warning for the case of patterns
with at least one "fixed" component and a varargs component.

Warn if the fixed patterns don't exactly align with the fixed
value components, such that a sequence wildcard aligns exactly
with the varargs component (either a T* parameter in a case class
or a Seq[T] in an extractor result).

This addresses the case of the xml.Elem extractor, which does
not correspond to the Elem class constructor. One can be fooled
into supplying an extra field for extraction.

Vanilla extractors of type `Option[Seq[_]]` are unaffected by
this flag. It's OK to ask for `case X(a, b, c)` in the expectation
that three results are forthcoming. There is no semantic confusion
over where the varargs begin.