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 "Retry constraint.replace after constraint.updateEntry" to LTS #21111

Merged
merged 1 commit into from
Jul 8, 2024

Conversation

WojciechMazur
Copy link
Contributor

Backports #20399 to the LTS branch.

PR submitted by the release tooling.
[skip ci]

as an optimization

In #20120, we reach constraints with equal bounds that are intersection types,
they are formed from multiple successive calls to `addOneBound`.
We miss the `replace` optimization in this case because
the bounds only become equal progressively, and
we are only checking for equality with the constraint being added.

Additionally, we recheck for equal bounds after `constraint.updateEntry`
as checking `isSub` can have narrowed the bounds further.
#19955 is an example where this second optimization applies.

Fix #20120
Close #20208 the original implementation
[Cherry-picked c608177]
Base automatically changed from lts-20291 to lts-3.3 July 8, 2024 17:03
@WojciechMazur
Copy link
Contributor Author

No regressions detected in the community build up to lts-20411.

Reference

@WojciechMazur WojciechMazur merged commit 7a5f48a into lts-3.3 Jul 8, 2024
19 checks passed
@WojciechMazur WojciechMazur deleted the lts-20399 branch July 8, 2024 17:03
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