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

Record ordering constraint between HK type variables #9733

Merged
merged 1 commit into from
Sep 18, 2020

Conversation

smarter
Copy link
Member

@smarter smarter commented Sep 5, 2020

If ?F <: [X] => ?G[X], then the ordering part of the constraint should
record ?F <: ?G, otherwise constraints won't be propagated correctly.

It's not clear to me if we should make a similar change in stripParams
but note that doing so would require being a bit careful: since we use
the upper bound of a type variable to determine its kind, we can't just
replace it by [X] => ?G[X] by AnyKind.

Fixes #9676.

@odersky odersky assigned smarter and unassigned odersky Sep 10, 2020
If `?F <: [X] => ?G[X]`, then the ordering part of the constraint should
record `?F <: ?G`, otherwise constraints won't be propagated correctly.

It's not clear to me if we should make a similar change in `stripParams`
but note that doing so would require being a bit careful: since we use
the upper bound of a type variable to determine its kind, we can't just
replace it by `[X] => ?G[X]` by `AnyKind`.

Fixes scala#9676.
@smarter
Copy link
Member Author

smarter commented Sep 18, 2020

(Merging, community build failure is due to flaky test and is being taken care of elsewhere: #9784)

@smarter smarter merged commit b980855 into scala:master Sep 18, 2020
@smarter smarter deleted the hk-ordering branch September 18, 2020 14:49
@Kordyjan Kordyjan added this to the 3.0.0 milestone Aug 2, 2023
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.

Regression: type inference involving higher-kinded types and upper-bounds
3 participants