Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Narrow Regex.unapplySeq to take either CharSeq or Match #6406

Closed
scabug opened this issue Sep 19, 2012 · 3 comments
Closed

Narrow Regex.unapplySeq to take either CharSeq or Match #6406

scabug opened this issue Sep 19, 2012 · 3 comments

Comments

@scabug
Copy link

scabug commented Sep 19, 2012

It was requested to disallow at compile time:

val r = "(\\d+)".r; List(1) collect { case r(i) => i }

Regex.unapplySeq silently ignores anything that is not CharSequence or Match.

Discussion:
https://groups.google.com/forum/?fromgroups=#!topic/scala-user/F2vuVhxo_X8

Regex has always unapplied Any, so there may be a countervailing use case.

@scabug
Copy link
Author

scabug commented Sep 19, 2012

Imported From: https://issues.scala-lang.org/browse/SI-6406?orig=1
Reporter: @som-snytt
Affected Versions: 2.11.0-M1
See #8022

@scabug
Copy link
Author

scabug commented Oct 14, 2012

@som-snytt said:
scala/scala#1369

@scabug scabug closed this as completed Oct 14, 2012
@scabug
Copy link
Author

scabug commented May 17, 2013

@adriaanm said:
method brought back with correct deprecation version in scala/scala#2519

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants