-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Fix #6263: Register needsStaging when creating a synthetic quoted type #6342
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
def quotedType(t: Type) = { | ||
if (StagingContext.level == 0) | ||
ctx.compilationUnit.needsStaging = true // We will need to run ReifyQuotes | ||
ref(defn.InternalQuoted_typeQuote).appliedToType(t) |
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.
I'm not sure if implicit search is the best place to put the logic --- what about put the logic in typer?
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.
We detect quotes and splices when we type. The issue here is that we will do not type this tree because we create it already typed.
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.
The concern I have here is about modularity. It seems the added code does not belong here. Is it due to concern about performance? Modularity could be sacrificed for performance.
0ff0a97
to
e8bf7c3
Compare
Now that these methods are not wrongly tagged as macros the top level quote needs to be reified. See tests/pos/quoted-inline-quote.scala
test performance please |
performance test scheduled: 2 job(s) in queue, 1 running. |
Performance test finished successfully: Visit http://dotty-bench.epfl.ch/6342/ to see the changes. Benchmarks is based on merging with master (2a033aa) |
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.
LGTM
No description provided.