Skip to content

Unable to call .iterator on an IterableOnceOps value #9

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

Open
julienrf opened this issue Aug 12, 2019 · 1 comment
Open

Unable to call .iterator on an IterableOnceOps value #9

julienrf opened this issue Aug 12, 2019 · 1 comment
Labels
bug Something isn't working library:collections

Comments

@julienrf
Copy link
Contributor

See this contributors discussion for the motivation.

In summary, using IterableOnceOps would make it possible to write code polymorphic to Iterable or Iterator, but methods defined by IterableOnce (such as iterator) are not available on IterableOnceOps values.

We should add abstract definitions of the methods declared in IterableOnce, to the IterableOnceOps type.

julienrf referenced this issue in julienrf/scala Aug 12, 2019
Fixes scala/bug#11675

This change is backward compatible, because nothing is removed.
It should also be forward compatible, because `IterableOnceOps[A]` had
`IterableOnce[A]` as a self-type on 2.13.0, meaning that code relying on the
newly introduced methods also worked on 2.13.0 because any `IterableOnceOps[A]`
instance was also effectively an `IterableOnce[A]`.
julienrf referenced this issue in julienrf/scala Aug 19, 2019
Fixes scala/bug#11675

This change is backward compatible, because nothing is removed.
It should also be forward compatible, because `IterableOnceOps[A]` had
`IterableOnce[A]` as a self-type on 2.13.0, meaning that code relying on the
newly introduced methods also worked on 2.13.0 because any `IterableOnceOps[A]`
instance was also effectively an `IterableOnce[A]`.
julienrf referenced this issue in julienrf/scala Aug 19, 2019
Fixes scala/bug#11675

This change is backward compatible, because nothing is removed.
It should also be forward compatible, because `IterableOnceOps[A]` had
`IterableOnce[A]` as a self-type on 2.13.0, meaning that code relying on the
newly introduced methods also worked on 2.13.0 because any `IterableOnceOps[A]`
instance was also effectively an `IterableOnce[A]`.
@NthPortal
Copy link
Contributor

this is a good candidate for scala/scala-library-next

@NthPortal NthPortal transferred this issue from scala/bug Oct 22, 2020
@NthPortal NthPortal mentioned this issue Oct 22, 2020
13 tasks
@NthPortal NthPortal added the bug Something isn't working label Nov 20, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working library:collections
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants