Skip to content
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

Optimize captured type in splice hole #17070

Merged

Conversation

nicolasstucki
Copy link
Contributor

If we have a quote that defined a type T and use it in the contents of the splice we want to pass a Type[T] to the hole.

This improves a case where we had a List[T] and the hole could end up with a Type[T] and Type[List[T]]. We should only pass the Type[T].

@nicolasstucki nicolasstucki force-pushed the optimize-captured-type-in-splice-hole branch 2 times, most recently from 3c21401 to 2ef2f58 Compare March 8, 2023 20:14
If we have a quote that defined a type `T` and use it in the contents of
the splice we want to pass a `Type[T]` to the hole.

This improves a case where we had a `List[T]` and the hole could end up
with a `Type[T]` and `Type[List[T]]`. We should only pass the `Type[T]`.
Copy link
Contributor

@natsukagami natsukagami left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Played around with the test a bit, LGTM!

@nicolasstucki nicolasstucki merged commit 528d931 into scala:main Mar 10, 2023
@nicolasstucki nicolasstucki deleted the optimize-captured-type-in-splice-hole branch March 10, 2023 16:43
@Kordyjan Kordyjan added this to the 3.3.1 milestone Aug 1, 2023
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.

3 participants