Skip to content

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

Merged
merged 3 commits into from
May 13, 2018

Conversation

nicolasstucki
Copy link
Contributor

No description provided.

@@ -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 */
Copy link
Contributor

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)
Copy link
Contributor

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.

Copy link
Contributor

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.

@@ -37,7 +37,8 @@ object Exprs {
}

/** An Expr backed by a tree. Only the current compiler trees are allowed. */
Copy link
Contributor

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"?

@biboudis
Copy link
Contributor

biboudis commented May 7, 2018

LGTM. We need to update the documentation and describe the FreeVariableError exceptional case.

@nicolasstucki nicolasstucki removed their assignment May 8, 2018
@nicolasstucki
Copy link
Contributor Author

@biboudis check if this added documentation is clear enough

@biboudis
Copy link
Contributor

biboudis commented May 8, 2018

The description of the exception is exceptional 👍 😄

@nicolasstucki nicolasstucki merged commit 7ca5a2c into scala:master May 13, 2018
@Blaisorblade Blaisorblade deleted the fix-#4456 branch May 13, 2018 18:36
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