-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Selectable + opaque types cause crash #15448
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
Labels
Milestone
Comments
I managed to minimize it quite a bit. Turns out that it doesn't require opaque types nor Selectable. type Pointer[S <: Int] <: S
type Break = Int {
def boom: Unit
}
def test = {
val ptrBreak: Pointer[Break] = ???
ptrBreak.boom // boom crashes the compiler
} |
odersky
added a commit
to dotty-staging/dotty
that referenced
this issue
Jun 15, 2022
When looking at AppliedTypes, we want to go to the supertype (which is the dealiased type or upper bound), not the underlying type (which is the type constructor). This is the second bug in a week caused by a confusion of unerlying and supertype for AppliedTypes. We should do an audit of the codebase to see whether there are more cases like this. Fixes scala#15448
@KacperFKorban Good minimization. I verified that it gets rejected with 80364f8. |
odersky
added a commit
to dotty-staging/dotty
that referenced
this issue
Jun 15, 2022
When looking at AppliedTypes, we want to go to the supertype (which is the dealiased type or upper bound), not the underlying type (which is the type constructor). This is the second bug in a week caused by a confusion of unerlying and supertype for AppliedTypes. We should do an audit of the codebase to see whether there are more cases like this. Fixes scala#15448
odersky
added a commit
to dotty-staging/dotty
that referenced
this issue
Jun 15, 2022
When looking at AppliedTypes, we want to go to the supertype (which is the dealiased type or upper bound), not the underlying type (which is the type constructor). This is the second bug in a week caused by a confusion of unerlying and supertype for AppliedTypes. We should do an audit of the codebase to see whether there are more cases like this. Fixes scala#15448
odersky
added a commit
to dotty-staging/dotty
that referenced
this issue
Jun 15, 2022
When looking at AppliedTypes, we want to go to the supertype (which is the dealiased type or upper bound), not the underlying type (which is the type constructor). This is the second bug in a week caused by a confusion of unerlying and supertype for AppliedTypes. We should do an audit of the codebase to see whether there are more cases like this. Fixes scala#15448
bishabosha
pushed a commit
to dotty-staging/dotty
that referenced
this issue
Oct 18, 2022
When looking at AppliedTypes, we want to go to the supertype (which is the dealiased type or upper bound), not the underlying type (which is the type constructor). This is the second bug in a week caused by a confusion of unerlying and supertype for AppliedTypes. We should do an audit of the codebase to see whether there are more cases like this. Fixes scala#15448
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Compiler version
3.1.3 as well as 3.2-nightly
Minimized code
Output (click arrow to expand)
Note: both options, with the implicit class or with extension methods (which is commented out) cause the same crash.
The text was updated successfully, but these errors were encountered: