Skip to content

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