Skip to content

Conversation

nox213
Copy link
Contributor

@nox213 nox213 commented Aug 17, 2025

fix #23369

This PR fixes an issue where path-dependent types were not resolved correctly when calculating the space of a scrutinee's children for exhaustiveness checking. The type checking was performed from the perspective of the child's definition-site (Module), which failed to account for type members refined at the use-site.

val parentPre = parent.normalizedPrefix
val defaultRef = if (child.isTerm) child.termRef else child.typeRef

if (parentSym.isClass && parentPre.isInstanceOf[TermRef]) {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

guard for match types and cases without prefix

@nox213
Copy link
Contributor Author

nox213 commented Aug 18, 2025

I will look into CI failure

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.

No warning about non-exhaustive pattern matching for constructor with type bound enclosing type member
2 participants