-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Make MapView#values preserve laziness
#9090
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
Conversation
|
|
julienrf
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good to me, thanks @NthPortal!
Do we have something to change in SortedMap as well?
no, it seems that |
Change`MapView#values` and `MapView#keys` to return `View`s instead of `AbstractIterable`s, so that further operations on the returned values remain lazy.
|
honestly, it would be nice if |
|
|
||
| // Fix for scala/bug#12059 | ||
| ProblemFilters.exclude[MissingClassProblem]("scala.collection.MapView$Keys"), | ||
| ProblemFilters.exclude[MissingClassProblem]("scala.collection.MapView$Values"), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wouldn't it be better to avoid making these jvm-public classes by creating anonymous inner classes?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't know. I see your point, but at the same time, I think it's cleaner the way it is. I'd love to know what others think cc @julienrf
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have a slight preference for having (private) named classes
dwijnand
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you'll squash, I'll merge
|
squashed |
MapView#values preserve laziness
[bug#12059] Make MapView#values return a View
[bug#12059] Make MapView#values return a View
Change
MapView#valuesto return aViewinsteadof an
AbstractIterable, so that further operations onthe returned value remain lazy.
Fixes scala/bug#12059