Skip to content

Conversation

@tgodzik
Copy link

@tgodzik tgodzik commented Nov 10, 2025

Backports scala#23909 to the 3.3.7.

PR submitted by the release tooling.
[skip ci]

nox213 and others added 2 commits November 10, 2025 15:02
closes scala#23620,
scala#24246

If the upper bound of an abstract type is not `sealed` but is
effectively sealed, it is not handled correctly, since classSym could
return a type that is not `sealed` (Object in the issue above).
If the type were not abstract, it would pass the logic that checks
whether it is an Or, And, etc., and would be handled properly.
This PR makes exhaustivity checking use the upper bound of abstract
types that are effectively sealed.

---------

Co-authored-by: Zieliński Patryk <[email protected]>
closes scala#23620,
scala#24246

If the upper bound of an abstract type is not `sealed` but is
effectively sealed, it is not handled correctly, since classSym could
return a type that is not `sealed` (Object in the issue above).
If the type were not abstract, it would pass the logic that checks
whether it is an Or, And, etc., and would be handled properly.
This PR makes exhaustivity checking use the upper bound of abstract
types that are effectively sealed.

---------

Co-authored-by: Zieliński Patryk <[email protected]>
[Cherry-picked 520668f][modified]
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.

3 participants