Skip to content

Make sure that inline val can be inlined #8724

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

Conversation

nicolasstucki
Copy link
Contributor

Inline vals are inlined based on their literal type. We only checked that the RHS
had a literal type that could be inlined, but we did not check if the type of the val
was also a literal. When it is not, the value will not be inlined.

This fixes one of the issues in #8714

Inline vals are inlined based on their literal type. We only checked that the RHS
had a literal type that could be inlined, but we did not check if the type of the val
was also a literal. When it is not, the value will not be inlined.
@nicolasstucki nicolasstucki marked this pull request as ready for review April 15, 2020 07:27
Copy link
Contributor

@liufengyun liufengyun left a comment

Choose a reason for hiding this comment

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

LGTM

@nicolasstucki nicolasstucki merged commit 2e983a6 into scala:master Apr 15, 2020
@nicolasstucki nicolasstucki deleted the make-sure-that-inline-val-can-be-inlined branch April 15, 2020 11:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants