Skip to content

Fix #4846: Allow transparent parameters at any stage #4856

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

Merged
merged 2 commits into from
Jul 31, 2018

Conversation

nicolasstucki
Copy link
Contributor

@nicolasstucki nicolasstucki commented Jul 27, 2018

Based on #4823

  • Stop checking and using capture transformation for transparent parameters
  • Keep transparent parameters as they are. Allow them to be inlined and replaced directly.

@nicolasstucki
Copy link
Contributor Author

Rebased on master

Stop checking and using capture tranformation for transparent parameters
case _=>
val (body1, splices) = nested(isQuote = true).split(body)
if (level >= 0) pickledQuote(body1, splices, body.tpe, isType).withPos(quote.pos)
if (level == 0 && !ctx.inTransparentMethod) pickledQuote(body1, splices, body.tpe, isType).withPos(quote.pos)
Copy link
Contributor

Choose a reason for hiding this comment

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

Small question. We don't split if we are in a transparent method but the level is above or equal zero?
If yes, we can move splitting inside the if now.

Copy link
Contributor Author

@nicolasstucki nicolasstucki Jul 31, 2018

Choose a reason for hiding this comment

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

We do not split, but we still need to perform the checks that split does. We should be able to improve the performance by calling transform directly in another branch. I will try that later, nice catch :)

@biboudis biboudis assigned nicolasstucki and unassigned biboudis Jul 31, 2018
@nicolasstucki nicolasstucki merged commit 02ee000 into scala:master Jul 31, 2018
@allanrenucci allanrenucci deleted the fix-#4846 branch July 31, 2018 15:18
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