Skip to content

Conversation

@nicolasstucki
Copy link
Contributor

Fixes #13422

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