Skip to content

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
@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

Development

Successfully merging this pull request may close these issues.

Use knowledge of known subclasses of local classes more to enable more tailrec transforms

4 participants