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

Add IterableOnce operations to IterableOnceOps #8330

Closed

Conversation

@julienrf
Copy link
Contributor

commented 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].

Add IterableOnce operations to IterableOnceOps
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]`.

@scala-jenkins scala-jenkins added this to the 2.13.1 milestone Aug 12, 2019

@smarter

This comment has been minimized.

Copy link
Contributor

commented Aug 12, 2019

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].

Not sure that this is enough for foward compatibility. If with this change you can get the compiler to emit something like:

invokeinterface scala/collection/IterableOnceOps.iterable:()Lscala/collection/Iterable;

Then if this classfile is run with the 2.13.0 library jar, you'll probably get a runtime exception since there's no iterable method on the IterableOnceOps interface.

@julienrf julienrf closed this Aug 19, 2019

@julienrf

This comment has been minimized.

Copy link
Contributor Author

commented Aug 19, 2019

I’m closing the PR because it breaks binary compatibility, as explained by @smarter.

@SethTisue SethTisue removed this from the 2.13.1 milestone Aug 19, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
5 participants
You can’t perform that action at this time.