Skip to content

Conversation

nox213
Copy link
Contributor

@nox213 nox213 commented Sep 12, 2025

closes #23620

If opaques type have upper bounds, use it for exhaustivity and reachability checks

classSym.is(Case) ||
(tpw.isInstanceOf[TypeRef] && {
val tref = tpw.asInstanceOf[TypeRef]
tref.symbol.isOpaqueAlias && !tref.info.hiBound.isNothingType
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Should I extract this logic into a separate function? If so, where would be a good place to put it?

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.

False pattern match not exhaustive for union types + opaque types
1 participant