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

Revert "Allow return in tailrec position" #14067 #14736

Merged
merged 1 commit into from Mar 22, 2022

Conversation

Kordyjan
Copy link
Contributor

This reverts #14067.

That PR allowed code that was using explicit returns in tailrec positions. This was rejected by all compilers older than 3.1.2-RC1. If a tailrec function with explicit returns was defined inside of an inline function, compilers up to version 3.1.1 wouldn't be able to perform the inlining. This means that the change is breaking binary compatibility between two patch releases in the 3.1 versioning line.

This pr needs to be backported to release-3.1.2 branch, then 3.1.2-RC3 needs to be released.
We can re-merge #14067 before releasing the next minor version (3.2).

This reverts commit 4368847.
This reverts commit a349775.
@Kordyjan Kordyjan added prio:blocker backport:nominated If we agree to backport this PR, replace this tag with "backport:accepted", otherwise delete it. labels Mar 21, 2022
@Kordyjan Kordyjan added this to the 3.1.2 milestone Mar 21, 2022
This was referenced Mar 21, 2022
@Kordyjan Kordyjan enabled auto-merge March 21, 2022 22:06
Copy link
Member

@smarter smarter left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This means that the change is breaking binary compatibility

If I understand this correctly, the change is breaking tasty-compatibility (a .tasty produced by the new compiler would fail to compile to .class using the old compiler, because the old compiler TailRec phase would emit an error), but not binary-compatibility (a .class produced by the new compiler can be on the runtime classpath of a project compiled with the old compiler).

@Kordyjan Kordyjan merged commit ab885bf into scala:main Mar 22, 2022
@Kordyjan Kordyjan deleted the revert-14067 branch March 22, 2022 11:26
@Kordyjan Kordyjan added backport:accepted This PR needs to be backported, once it's been backported replace this tag by "backport:done" and removed backport:nominated If we agree to backport this PR, replace this tag with "backport:accepted", otherwise delete it. labels Mar 22, 2022
@Kordyjan Kordyjan mentioned this pull request Apr 14, 2022
@smarter smarter added backport:done This PR was successfully backported. and removed backport:accepted This PR needs to be backported, once it's been backported replace this tag by "backport:done" labels Jul 14, 2022
@Kordyjan Kordyjan modified the milestones: 3.1.2, 3.1.3 Aug 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:done This PR was successfully backported. prio:blocker
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants