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

Added apply methods to import selectors in Quotes #21225 #22457

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

ghik
Copy link

@ghik ghik commented Jan 26, 2025

Fixes #21225

@@ -2621,6 +2624,7 @@ trait Quotes { self: runtime.QuoteUnpickler & runtime.QuoteMatching =>

/** Methods of the module object `val GivenSelector` */
trait GivenSelectorModule { this: GivenSelector.type =>
@experimental def apply(bound: Option[TypeTree]): GivenSelector
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
@experimental def apply(bound: Option[TypeTree]): GivenSelector
@experimental def apply(bound: Option[TypeRepr]): GivenSelector

I would suggest internally wrapping the type in TypeTree with the default span

Copy link
Author

Choose a reason for hiding this comment

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

That would be inconsistent with unapply and the .bound accessor method. Is that a problem?

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.

There is no way to create Selectors in macros
2 participants