Skip to content

Conversation

nicolasstucki
Copy link
Contributor

@nicolasstucki nicolasstucki commented Jul 23, 2018

Based on #4822.

Allow top-level ~ in and non static transparent method:

  • Class methods (including inner and anonymous classes)
  • Methods in def/val/var

Followed by #4826.

@nicolasstucki nicolasstucki self-assigned this Jul 23, 2018
@nicolasstucki nicolasstucki added this to the 0.10 Tech Preview milestone Jul 24, 2018
@nicolasstucki nicolasstucki force-pushed the fix-#4803 branch 2 times, most recently from e11b714 to 16a463f Compare July 26, 2018 18:42
@nicolasstucki nicolasstucki changed the title Enable macros in any inline def Enable macros in any transparent def Jul 26, 2018
@nicolasstucki nicolasstucki force-pushed the fix-#4803 branch 2 times, most recently from dea5b08 to c27ca82 Compare July 27, 2018 08:47
@nicolasstucki nicolasstucki requested a review from biboudis July 27, 2018 11:06
Now all levels are relative to the definition site.
0 is the level of all non-staged definitions, -1 is the level of
the contents of a top level splice (in an inline method) and positive
levels are (as before) staging levels.
Allow top-level ~ in and non static transparent method:
* Class methods (including inner and anonymous classes)
* Methods in def/val/var
@nicolasstucki
Copy link
Contributor Author

Rebased on master

Copy link
Contributor

@biboudis biboudis left a comment

Choose a reason for hiding this comment

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

Looks good

* @param outer the next outer reifier, null is this is the topmost transformer
* @param level the current level, where quotes add one and splices subtract one level
* @param level the current level, where quotes add one and splices subtract one level.
* The initial level is 0, a level `l` where `l > 0` implies code has been quotes `l` times
Copy link
Contributor

Choose a reason for hiding this comment

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

"Quoted"

* @param level the current level, where quotes add one and splices subtract one level
* @param level the current level, where quotes add one and splices subtract one level.
* The initial level is 0, a level `l` where `l > 0` implies code has been quotes `l` times
* and `l == -1` is code inside a top level splice (in an transparent method).
Copy link
Contributor

Choose a reason for hiding this comment

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

"in a"

@nicolasstucki nicolasstucki merged commit 05c5ba1 into scala:master Jul 30, 2018
@Blaisorblade Blaisorblade deleted the fix-#4803 branch July 30, 2018 12:15
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