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

Widen qualifier skolems #13748

Merged
merged 1 commit into from Oct 20, 2021
Merged

Conversation

nicolasstucki
Copy link
Contributor

Fixes #13422

@@ -1777,7 +1777,7 @@ class QuotesImpl private (using val ctx: Context) extends Quotes, QuoteUnpickler

given NamedTypeMethods: NamedTypeMethods with
extension (self: NamedType)
def qualifier: TypeRepr = self.prefix
def qualifier: TypeRepr = self.prefix.widenSkolem
Copy link
Member

@smarter smarter Oct 18, 2021

Choose a reason for hiding this comment

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

Should all reflection APIs that return possible skolems be changed to call widenSkolem? For example, x.prefix in TermRef.unapply and TypeRef.unapply could both return skolems. IMO, this is too easy to get wrong and we should instead handle skolems by exposing their parent trait SingletonType in the reflection API.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Not sure if that would be a backwards compatible change.

@anatoliykmetyuk anatoliykmetyuk merged commit afaac17 into scala:master Oct 20, 2021
@anatoliykmetyuk anatoliykmetyuk deleted the fix-#i13422 branch October 20, 2021 14:54
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.

Crasher in Term.show for Skolem type
3 participants