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

Prepare bodies of inline forwarders eagerly #16757

Merged
merged 1 commit into from
Feb 12, 2023

Conversation

nicolasstucki
Copy link
Contributor

@nicolasstucki nicolasstucki commented Jan 24, 2023

  • Fix context owner of PrepareInlineable.registerInlineInfo. It should have as owner the inline method (forwarder in this case).
  • Eagerly compute the inlinable RHS. Because we create the forwarder already typed, we do not evaluate/force in typer the LazyBodyAnnotation which is what triggers the computation of the inline accessors. This happened in posttyper which was too late. There might be a cleaner solution to this problem, maybe forcing the annotation explicitly.

Fixes #14131
Fixes #16469

@nicolasstucki nicolasstucki self-assigned this Jan 24, 2023
@nicolasstucki nicolasstucki marked this pull request as ready for review January 25, 2023 07:50
@nicolasstucki nicolasstucki marked this pull request as draft January 25, 2023 07:50
@nicolasstucki nicolasstucki removed their assignment Feb 1, 2023
@nicolasstucki nicolasstucki marked this pull request as ready for review February 1, 2023 09:18
@nicolasstucki nicolasstucki added this to the 3.4.0 milestone Feb 7, 2023
Copy link
Contributor

@odersky odersky left a comment

Choose a reason for hiding this comment

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

I like the clear explanation of the fix.

@odersky odersky merged commit 6c241d3 into scala:main Feb 12, 2023
@odersky odersky deleted the fix-16469 branch February 12, 2023 09:44
@julienrf julienrf modified the milestones: 3.4.0, 3.3.2 Jul 10, 2023
@Kordyjan Kordyjan modified the milestones: 3.3.2, 3.3.1 Aug 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants