-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Fix #4456: Pickle quote before compiling #4457
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
@@ -22,7 +22,26 @@ import scala.reflect.ClassTag | |||
object PickledQuotes { | |||
import tpd._ | |||
|
|||
/** Pickle the quote into strings */ | |||
/** Pickle the tree of the a quoted.Expr */ |
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.
remove the a
:P
} | ||
}.traverse(tree) | ||
val pickled = pickleQuote(tree) | ||
scala.runtime.quoted.Unpickler.unpickleExpr(pickled, Nil) |
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 Nil
there makes me wonder what if this fix applies to non-inline functions.
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.
// ignore, I have just went through the second unit test and you do what I had in mind.
library/src/scala/quoted/Expr.scala
Outdated
@@ -37,7 +37,8 @@ object Exprs { | |||
} | |||
|
|||
/** An Expr backed by a tree. Only the current compiler trees are allowed. */ |
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.
Clarify what we mean by "current compiler"?
LGTM. We need to update the documentation and describe the |
@biboudis check if this added documentation is clear enough |
The description of the exception is exceptional 👍 😄 |
No description provided.