Skip to content

Split quoted.Expr casting from sealing #6189

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 1 commit into from
Apr 2, 2019

Conversation

nicolasstucki
Copy link
Contributor

Previously seal always casted the quoted.Expr[T] for some given T. Now, seal and cast can be used independently. If we need to seal to an Expr[Any] there is no need to check the that the type conforms. This use-case is common enough to deserve the optimization.

Additionally, due to bootstrapping issues, it is not practical to seal to a quoted.Expr[Any] within the library as we cannot create a quoted.Type[Any].

This is needed #6042

@nicolasstucki nicolasstucki self-assigned this Mar 28, 2019
@nicolasstucki nicolasstucki requested a review from biboudis March 28, 2019 19:34
@nicolasstucki nicolasstucki marked this pull request as ready for review March 28, 2019 20:29
@nicolasstucki nicolasstucki force-pushed the split-unseal-and-cast branch from 50c4f3f to 347bb33 Compare April 1, 2019 18:38
@nicolasstucki
Copy link
Contributor Author

Rebased

Previously `seal` always casted the `quoted.Expr[T]` for some given `T`. Now, `seal` and `cast` can be used independently. If we need to seal to an `Expr[Any]` there is no need to check the that the type conforms. This use-case is common enough to deserve the optimization.

Additionally, due to bootstrapping issues, it is not practical to seal to a `quoted.Expr[Any]` within the library as we cannot create a `quoted.Type[Any]`.
@biboudis biboudis merged commit b07cf89 into scala:master Apr 2, 2019
@biboudis biboudis deleted the split-unseal-and-cast branch April 2, 2019 09:00
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