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

Enable macros in any transparent def #4823

Merged
merged 3 commits into from Jul 30, 2018

Conversation

Projects
None yet
2 participants
@nicolasstucki
Copy link
Contributor

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 removed the stat:wip label Jul 23, 2018

@nicolasstucki nicolasstucki added this to the 0.10 Tech Preview milestone Jul 24, 2018

@nicolasstucki nicolasstucki force-pushed the dotty-staging:fix-#4803 branch 2 times, most recently from e11b714 to 16a463f Jul 26, 2018

@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 dotty-staging:fix-#4803 branch 2 times, most recently from dea5b08 to c27ca82 Jul 27, 2018

@nicolasstucki nicolasstucki requested a review from biboudis Jul 27, 2018

@nicolasstucki nicolasstucki force-pushed the dotty-staging:fix-#4803 branch from c27ca82 to 6dd6a45 Jul 27, 2018

nicolasstucki added some commits Jul 23, 2018

Shift level of top-level splice
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.
Fix #4803: Remove restriction
Allow top-level ~ in and non static transparent method:
* Class methods (including inner and anonymous classes)
* Methods in def/val/var

@nicolasstucki nicolasstucki force-pushed the dotty-staging:fix-#4803 branch from 6dd6a45 to 47e2a17 Jul 30, 2018

@nicolasstucki

This comment has been minimized.

Copy link
Contributor Author

commented Jul 30, 2018

Rebased on master

@biboudis
Copy link
Contributor

left a comment

Looks good

@@ -103,14 +103,16 @@ class ReifyQuotes extends MacroTransformWithImplicits {
/** The main transformer class
* @param inQuote we are within a `'(...)` context that is not shadowed by a nested `~(...)`
* @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

This comment has been minimized.

Copy link
@biboudis

biboudis Jul 30, 2018

Contributor

"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).

This comment has been minimized.

Copy link
@biboudis

biboudis Jul 30, 2018

Contributor

"in a"

@nicolasstucki nicolasstucki merged commit 05c5ba1 into lampepfl:master Jul 30, 2018

2 checks passed

CLA User signed CLA
Details
continuous-integration/drone/pr the build was successful
Details

@Blaisorblade Blaisorblade deleted the dotty-staging:fix-#4803 branch Jul 30, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.