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

Optimize tail recursion on effectively final methods even when final keyword is absent #10629

Merged
merged 1 commit into from Dec 14, 2023

Conversation

som-snytt
Copy link
Contributor

Infer finality by consulting sealed/local hierarchy for overrides.

This permits more tailrec in the absence of final.

Fixes scala/bug#9414

Pursues the retronym branch.

@scala-jenkins scala-jenkins added this to the 2.13.14 milestone Dec 12, 2023
@lrytz lrytz force-pushed the issue/9414-known-subclasses branch from ea341fa to 8df9830 Compare December 14, 2023 08:33
@lrytz lrytz enabled auto-merge December 14, 2023 08:33
@lrytz lrytz modified the milestones: 2.13.14, 2.13.13 Dec 14, 2023
@lrytz lrytz merged commit 61d31ab into scala:2.13.x Dec 14, 2023
2 of 3 checks passed
@som-snytt som-snytt deleted the issue/9414-known-subclasses branch December 14, 2023 17:17
@som-snytt

This comment was marked as resolved.

@lrytz

This comment was marked as resolved.

@SethTisue SethTisue added the release-notes worth highlighting in next release notes label Dec 15, 2023
@SethTisue
Copy link
Member

@som-snytt Does Scala 3 already do this same thing?

@som-snytt
Copy link
Contributor Author

I believe I tried it and no.

Footnote there are also Scala 3 tailrec behaviors to backport IIRC.

@SethTisue SethTisue changed the title Infer more final to permit tailrec Optimize tail recursion on effectively final methods even when final keyword is absent Feb 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release-notes worth highlighting in next release notes
Projects
None yet
4 participants