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

Fix isomorphism tests of AndOrTypes under non-empty BinderPairs #21017

Merged
merged 2 commits into from
Jul 4, 2024

Conversation

EugeneFlesselle
Copy link
Contributor

@EugeneFlesselle EugeneFlesselle commented Jul 4, 2024

Before the changes, when comparing two HKTypeLambda result types, the list of binding pairs was lost when entering comparison of AndOrTypes, which caused the equals to fail, and hence prevented hash-consing.

Even though M1 and M2 in pos/i20858-min should still conform to one-another, we entered a deep-subtype comparison because of the order in which the TypeComparer does dealiasing of AppliedTypes, and comparison of MatchCases and AndTypes.

Fix #20858

Before the changes, when comparing two `HKTypeLambda` result types,
the list of binding pairs was lost when entering comparison of `AndOrType`s,
which caused the `equals` to fail, and hence prevented `hash-consing`.

Even though, `M1` and `M2` in pos/i20858-min should still conform to one-another,
we entered a deep-subtype comparison because of the order in which the TypeComparer
does dealiasing of AppliedTypes, comparison of MatchCases, and AndTypes.
@EugeneFlesselle EugeneFlesselle requested a review from dwijnand July 4, 2024 15:05
Copy link
Member

@dwijnand dwijnand left a comment

Choose a reason for hiding this comment

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

LGTM, with that change

@EugeneFlesselle EugeneFlesselle enabled auto-merge (squash) July 4, 2024 15:26
@EugeneFlesselle EugeneFlesselle merged commit f2829c3 into scala:main Jul 4, 2024
21 checks passed
@EugeneFlesselle EugeneFlesselle deleted the fix-20858 branch July 4, 2024 17:16
WojciechMazur pushed a commit that referenced this pull request Aug 28, 2024
…21017)

Before the changes, when comparing two `HKTypeLambda` result types, the
list of binding pairs was lost when entering comparison of `AndOrType`s,
which caused the `equals` to fail, and hence prevented hash-consing.

Even though `M1` and `M2` in pos/i20858-min should still conform to
one-another, we entered a deep-subtype comparison because of the order
in which the TypeComparer does dealiasing of AppliedTypes, and
comparison of MatchCases and AndTypes.

Fix #20858
[Cherry-picked f2829c3]
WojciechMazur added a commit that referenced this pull request Aug 28, 2024
…erPairs`" to 3.5.2 (#21468)

Backports #21017 to the 3.5.2 branch.

PR submitted by the release tooling.
[skip ci]
@WojciechMazur WojciechMazur added this to the 3.5.2 milestone Oct 8, 2024
prolativ pushed a commit that referenced this pull request Nov 20, 2024
…21017)

Before the changes, when comparing two `HKTypeLambda` result types, the
list of binding pairs was lost when entering comparison of `AndOrType`s,
which caused the `equals` to fail, and hence prevented hash-consing.

Even though `M1` and `M2` in pos/i20858-min should still conform to
one-another, we entered a deep-subtype comparison because of the order
in which the TypeComparer does dealiasing of AppliedTypes, and
comparison of MatchCases and AndTypes.

Fix #20858
[Cherry-picked f2829c3]
prolativ pushed a commit that referenced this pull request Nov 21, 2024
…21017)

Before the changes, when comparing two `HKTypeLambda` result types, the
list of binding pairs was lost when entering comparison of `AndOrType`s,
which caused the `equals` to fail, and hence prevented hash-consing.

Even though `M1` and `M2` in pos/i20858-min should still conform to
one-another, we entered a deep-subtype comparison because of the order
in which the TypeComparer does dealiasing of AppliedTypes, and
comparison of MatchCases and AndTypes.

Fix #20858
[Cherry-picked f2829c3]
WojciechMazur added a commit that referenced this pull request Dec 2, 2024
…erPairs`" to LTS (#21986)

Backports #21017 to the LTS branch.

PR submitted by the release tooling.
[skip ci]
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.

Regression in alterationx10/opinionated-zio match types
3 participants