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

Stop rewriting withFilter to filter #4602

Merged

Conversation

Blaisorblade
Copy link
Contributor

@Blaisorblade Blaisorblade commented May 30, 2018

This was dropped for Scala 2 in scala/scala#5252 for 2.12.0-RC1, as discussed for instance in scala/bug#6455 and scala/bug#8339.

Beyond this code, also remove MaybeFilter attachment and attending code
introduced in fcea3d5.

A caveat is that, unexpectedly, this code was added in 2016-08-24, after
scala/scala#5252 was merged, as if the decision was reversed; but #1461 says:

Also, I went through tests in pending/pos and reclassified as far as possible.

So I assume this just happened because the Scala 2 PR (of course) didn't remove our pending test.

This was dropped for Scala 2 in scala/scala#5252 for 2.12.0-RC1, as discussed
for instance in scala/bug#6455 and scala/bug#8339.

Beyond this code, also remove `MaybeFilter` attachment and attending code
introduced in fcea3d5.

A caveat is that, unexpectedly, this code was added in 2016-08-24, after
scala/scala#5252 was merged, as if the decision was reversed; but scala#1461 says:

> Also, I went through tests in pending/pos and reclassified as far as possible.

So I assume this just happened because the Scala 2 PR didn't remove our pending
test.
@Blaisorblade Blaisorblade force-pushed the drop-withFilter-filter-rewrite branch from b2b7a4f to 7b9853a Compare May 30, 2018 15:20
@Blaisorblade Blaisorblade requested a review from allanrenucci May 30, 2018 21:38
@odersky
Copy link
Contributor

odersky commented May 31, 2018

Also related: #2573

It would be great of we could drop withFilter and filter altogether and use a zero element instead. This would solve several problems where irrefutable patterns are recognized too late, would interact better with = bindings in for and would generally be more efficient. Also, it would
get rid of the complexity of correctly modelling the type of withFilter in the collections.

@Blaisorblade Blaisorblade merged commit 76363fb into scala:master May 31, 2018
@Blaisorblade Blaisorblade deleted the drop-withFilter-filter-rewrite branch May 31, 2018 07:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants