diff options
author | Som Snytt <som.snytt@gmail.com> | 2014-12-18 00:47:00 -0800 |
---|---|---|
committer | Som Snytt <som.snytt@gmail.com> | 2015-01-21 21:50:43 -0800 |
commit | 43818d4e5d8369387e7b315eafde01aae73acaa6 (patch) | |
tree | c03849d2caeeeb115a1b7b47d891d4459538612e /doc | |
parent | 4286e2df2effc4102f6ed5e576848d60bbc8dcb6 (diff) | |
download | scala-43818d4e5d8369387e7b315eafde01aae73acaa6.tar.gz scala-43818d4e5d8369387e7b315eafde01aae73acaa6.tar.bz2 scala-43818d4e5d8369387e7b315eafde01aae73acaa6.zip |
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.
Diffstat (limited to 'doc')
0 files changed, 0 insertions, 0 deletions