Skip to content

Conversation

@odersky
Copy link
Contributor

@odersky odersky commented Apr 20, 2020

Strip opaque refinements when checking that a class is instantiatable

Strip opaque refinements when checking that a class is instantiatable
val stp = SkolemType(tp)
val selfType = cls.asClass.givenSelfType.asSeenFrom(stp, cls)
val selfType =
cls.asClass.givenSelfType.stripOpaques.asSeenFrom(stp, cls)
Copy link
Member

Choose a reason for hiding this comment

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

Maybe stripOpaque should be a boolean parameter of givenSelfTypes ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think it's safer to keep givenSelfType as is. It's really just when checking that we need to strip the refinements.

@odersky odersky merged commit b3f2aee into scala:master Apr 20, 2020
@odersky odersky deleted the fix-#8750 branch April 20, 2020 09:50
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