-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Fix #4044: Change quote pickled representation #4081
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
test performance please |
performance test scheduled: 1 job(s) in queue, 0 running. |
Performance test finished successfully: Visit http://dotty-bench.epfl.ch/4081/ to see the changes. Benchmarks is based on merging with master (bdfe740) |
0892ce9
to
2e52a0c
Compare
if (inQuote) { | ||
val (body1, quotes) = nested(isQuote = false).split(body) | ||
makeHole(body1, quotes, splice.tpe) | ||
private def splice(splice: Select)(implicit ctx: Context): Tree = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
splice
could handle the case of a TypeTree
before. 🤔
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Otherwise LGTM
@@ -162,7 +184,6 @@ class ReifyQuotes extends MacroTransformWithImplicits { | |||
def tryHeal(tp: Type, pos: Position)(implicit ctx: Context): Option[String] = tp match { | |||
case tp: TypeRef => | |||
if (level == 0) { | |||
assert(ctx.owner.is(Macro)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why was the assert dropped?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In one case where the macro contained an anonymous function inside and the tryHeal
saw that function as ctx.owner
. Now the assert is
assert(ctx.owner.ownersIterator.exists(_.is(Macro)))
} | ||
} | ||
|
||
/** Transforms the contents of a splice nested |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"splice nested" -> "nested splice"?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add here: Assuming
* val y = ??? | ||
* { ... '{ ... x .. y ... } ... }.unary_~ | ||
* } | ||
* |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add: "Then the spliced subexpression"
654eb71
to
b74c723
Compare
No description provided.