diff options
author | Som Snytt <som.snytt@gmail.com> | 2012-09-19 01:01:15 -0700 |
---|---|---|
committer | Som Snytt <som.snytt@gmail.com> | 2012-09-20 17:47:03 -0700 |
commit | ce1bbfe5c6a06e7de69210fbedd5e4cae270510a (patch) | |
tree | 12263476e0efcfa76c2c3d095c6ca1944bc1c811 /test/files/neg/t0513.scala | |
parent | 4f026f0616231456e4fe8e7a4ee11520bfb27e95 (diff) | |
download | scala-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/t0513.scala')
0 files changed, 0 insertions, 0 deletions