Skip to content

Conversation

@dwijnand
Copy link
Member

Ideally I'd want to not be destructive with this widen, but it seems to
already being done on the other side: in signature where the
components of the unapply result type are obtained the call to:

mt.instantiate(scrutineeTp :: Nil).finalResultType 

removes the more precise blub.type that was present in the signature.

So now, by widening the pattern the spaces cancel each other out,
thus the match is deemed exhaustive.

Fixes #13110

Ideally I'd want to not be destructive with this widen, but it seems to already being done on the other side: in `signature` where the components of the unapply result type are obtained the call to: mt.instantiate(scrutineeTp :: Nil).finalResultType removes the more precise `blub.type` that was present in the signature. So now, by widening the pattern the spaces cancel each other out, thus the match is deemed exhaustive.
Copy link
Contributor

@abgruszecki abgruszecki left a comment

Choose a reason for hiding this comment

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

LGTM.

@abgruszecki abgruszecki merged commit b830af3 into scala:master Aug 26, 2021
@dwijnand dwijnand deleted the patmat-dep branch August 26, 2021 20:24
@Kordyjan Kordyjan added this to the 3.1.0 milestone Aug 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

3 participants