Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Backport "Fix #21295: Restrict provablyDisjoint with Nothings in invariant type params." to 3.6.2 #21906

Merged
merged 1 commit into from
Nov 8, 2024

Conversation

WojciechMazur
Copy link
Contributor

Backports #21891 to the 3.6.2 branch.

PR submitted by the release tooling.

…type params.

If `Foo[T]` is invariant in `T`, we previously concluded that
`Foo[A] ⋔ Foo[B]` from `A ⋔ B`. That is however wrong if both `A`
and `B` can be (instantiated to) `Nothing`.

We now rule out these occurrences in two ways:

* either we show that `T` corresponds to a field, like we do in the
  covariant case, or
* we show that `A` or `B` cannot possibly be `Nothing`.

The second condition is shaky at best. I would have preferred not
to include it. However, introducing the former without the fallback
on the latter breaks too many existing test cases.

[Cherry-picked 0dceb7f]
Base automatically changed from release-3.6.2-backport-21834 to release-3.6.2 November 8, 2024 12:04
@WojciechMazur
Copy link
Contributor Author

No regressions detected in the community build up to release-3.6.2-backport-21891.

Reference

@WojciechMazur WojciechMazur merged commit 8ceb324 into release-3.6.2 Nov 8, 2024
32 checks passed
@WojciechMazur WojciechMazur deleted the release-3.6.2-backport-21891 branch November 8, 2024 12:04
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.

2 participants