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 <75637004+zielinsky@users.noreply.github.com>
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 <75637004+zielinsky@users.noreply.github.com>
[Cherry-picked 520668f][modified]
Base automatically changed from backport-lts-3.3-23968 to lts-3.3 November 15, 2025 19:02
@tgodzik
Copy link
Author

tgodzik commented Nov 15, 2025

No regressions detected in the community build up to backport-lts-3.3-24277.

Reference

@tgodzik tgodzik merged commit ab10e41 into lts-3.3 Nov 15, 2025
21 of 22 checks passed
@tgodzik tgodzik deleted the backport-lts-3.3-23909 branch November 15, 2025 19:02
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