summaryrefslogtreecommitdiff
path: root/test/files/neg/t6406-regextract.flags
diff options
context:
space:
mode:
authorSom Snytt <som.snytt@gmail.com>2012-09-19 01:01:15 -0700
committerSom Snytt <som.snytt@gmail.com>2012-09-20 17:47:03 -0700
commitce1bbfe5c6a06e7de69210fbedd5e4cae270510a (patch)
tree12263476e0efcfa76c2c3d095c6ca1944bc1c811 /test/files/neg/t6406-regextract.flags
parent4f026f0616231456e4fe8e7a4ee11520bfb27e95 (diff)
downloadscala-ce1bbfe5c6a06e7de69210fbedd5e4cae270510a.tar.gz
scala-ce1bbfe5c6a06e7de69210fbedd5e4cae270510a.tar.bz2
scala-ce1bbfe5c6a06e7de69210fbedd5e4cae270510a.zip
Regex.unapplySeq should not take Any (Fixes SI-6406)
This deprecates unapplySeq(Any) and adds overloaded unapplySeq(CharSequence) and unapplySeq(Match), with the putative advantage that you can't try to extract the unextractable. Regex is massaged so that the underlying Pattern is primary, rather than the String-valued expression. Regex and its unanchored companion (I almost wrote unmoored) share a Pattern object, so that unapplySeq(Match) can easily test whether the Match was generated by this Regex; in that case, the match result is used immediately, instead of reapplying the regex to the matched string. The documentation is massaged to reflect unanchored and also to align with the underlying terminology, e.g., "subgroup" really just means "group."
Diffstat (limited to 'test/files/neg/t6406-regextract.flags')
-rw-r--r--test/files/neg/t6406-regextract.flags1
1 files changed, 1 insertions, 0 deletions
diff --git a/test/files/neg/t6406-regextract.flags b/test/files/neg/t6406-regextract.flags
new file mode 100644
index 0000000000..85d8eb2ba2
--- /dev/null
+++ b/test/files/neg/t6406-regextract.flags
@@ -0,0 +1 @@
+-Xfatal-warnings