Skip to content

Only make the staged parts of a quote inlineable#14604

Merged
odersky merged 1 commit intoscala:mainfrom
dotty-staging:fix-14603
Mar 3, 2022
Merged

Only make the staged parts of a quote inlineable#14604
odersky merged 1 commit intoscala:mainfrom
dotty-staging:fix-14603

Conversation

@nicolasstucki
Copy link
Copy Markdown
Contributor

Contents of splices do not need to be transformed as they will be
evaluated before the code is inlined. Therefore we only want to make
code at staging level 1 or grater inlineable. If the quote is in an
inline method, we also need to make the contents of the splices
inlineable (i.e. for any level).

Fix #14603

@nicolasstucki
Copy link
Copy Markdown
Contributor Author

@dwijnand @griggt here is the fix to the issue we were discussing

Contents of splices do not need to be transformed as they will be
evaluated before the code is inlined. Therefore we only want to make
code at staging level 1 or grater inlineable. If the quote is in an
inline method, we also need to make the contents of the splices
inlineable (i.e. for any level).

Fix scala#14603
@nicolasstucki nicolasstucki marked this pull request as ready for review March 3, 2022 13:46
@nicolasstucki nicolasstucki requested a review from odersky March 3, 2022 13:46
Copy link
Copy Markdown
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.

LGTM

@odersky odersky merged commit b20f5f7 into scala:main Mar 3, 2022
@odersky odersky deleted the fix-14603 branch March 3, 2022 16:31
@Kordyjan Kordyjan added this to the 3.1.3 milestone 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

Development

Successfully merging this pull request may close these issues.

Prepare inlining of quotes transforms too much

4 participants