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

Fix use of class terms in match analysis #21848

Merged
merged 1 commit into from
Nov 4, 2024

Conversation

dwijnand
Copy link
Member

When instantiating a subclass Outer.this.Bar, such that it's a subtype
of Test.this.outer.Foo[X], make sure to infer the term outer (even if
it's not a parameter). Also make sure to use those singletons when
approximating the parent (to fix Outer.this.Qux instantiating).

Fixes #21845

When instantiating a subclass Outer.this.Bar, such that it's a subtype
of Test.this.outer.Foo[X], make sure to infer the term `outer` (even if
it's not a parameter).  Also make sure to use those singletons when
approximating the parent (to fix Outer.this.Qux instantiating).
@dwijnand dwijnand marked this pull request as ready for review October 30, 2024 11:08
Copy link
Member

@noti0na1 noti0na1 left a comment

Choose a reason for hiding this comment

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

LGTM

@dwijnand dwijnand merged commit 8ab7ebe into scala:main Nov 4, 2024
29 checks passed
@dwijnand dwijnand deleted the patmat-dep-sealed-traits branch November 4, 2024 15:07
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 for pattern match over dependant sealed traits
2 participants