summaryrefslogtreecommitdiff
path: root/test/files/neg/t7623.flags
diff options
context:
space:
mode:
authorSom Snytt <som.snytt@gmail.com>2014-12-18 00:47:00 -0800
committerSom Snytt <som.snytt@gmail.com>2015-01-21 21:50:43 -0800
commit43818d4e5d8369387e7b315eafde01aae73acaa6 (patch)
treec03849d2caeeeb115a1b7b47d891d4459538612e /test/files/neg/t7623.flags
parent4286e2df2effc4102f6ed5e576848d60bbc8dcb6 (diff)
downloadscala-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 'test/files/neg/t7623.flags')
-rw-r--r--test/files/neg/t7623.flags1
1 files changed, 1 insertions, 0 deletions
diff --git a/test/files/neg/t7623.flags b/test/files/neg/t7623.flags
new file mode 100644
index 0000000000..74c9e38323
--- /dev/null
+++ b/test/files/neg/t7623.flags
@@ -0,0 +1 @@
+-Xlint:stars-align -Xfatal-warnings