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

Better infos for dependent class parameter references #15667

Merged
merged 1 commit into from
Jul 18, 2022

Conversation

odersky
Copy link
Contributor

@odersky odersky commented Jul 13, 2022

We sometimes create a dependent parameter reference p.X where
p is a path with a type that has a wildcard argument, e.g. P[X >: L <: H].
So far the denotation of p.X had as info the bounds with which X was
declared in P. Now it gets the actual parameter bounds >: L <: H instead.

Fixes #15652

#15652 started failing when tuple unpackings started to use vals instead of defs
in #14816. That caused dependent class parameter references to be created and uncovered
the problem.

We sometimes create a dependent parameter reference p.X where
`p` is a path with a type that has a wildcard argument, e.g. `P[X >: L <: H].`
So far the denotation of `p.X` had as info the bounds with which `X` was
declared in `P`. Now it gets the actual parameter bounds instead.

Fixes scala#15652

scala#15652 started failing when tuple unpackings started to use `val`s instead of `def`s
in scala#14816. That caused dependent class parameter references to be created and uncovered
the problem.
@odersky odersky requested a review from mbovel July 13, 2022 17:02
@mbovel mbovel merged commit 776bb11 into scala:main Jul 18, 2022
@mbovel mbovel deleted the fix-15652 branch July 18, 2022 12:18
@Kordyjan Kordyjan added the backport:accepted This PR needs to be backported, once it's been backported replace this tag by "backport:done" label Jul 26, 2022
@Kordyjan Kordyjan added this to the 3.2.0 backports milestone Jul 26, 2022
@Kordyjan Kordyjan added backport:done This PR was successfully backported. and removed backport:accepted This PR needs to be backported, once it's been backported replace this tag by "backport:done" labels Jul 26, 2022
Kordyjan added a commit that referenced this pull request Jul 27, 2022
Backport #15667: Better infos for dependent class parameter references
@Kordyjan Kordyjan modified the milestones: 3.2.0 backports, 3.2.1 Aug 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:done This PR was successfully backported.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Possible regression in type inference
3 participants