Skip to content

Sema: Associated type inference regressions, round 4 #71575

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

Merged
merged 4 commits into from
Feb 14, 2024

Conversation

slavapestov
Copy link
Contributor

@slavapestov slavapestov commented Feb 13, 2024

Fixes rdar://problem/122589094, rdar://problem/122596633, and rdar://problem/122810266.

There is a bunch of new code in AssociatedTypeInference.cpp conditionalized on the new flag. Also to minimize breakage with the flag off I restored some old code behind the negation of the flag. The file looks messy right now but the structure will become apparent once the old code is gone.

@slavapestov slavapestov force-pushed the assoc-type-regression-fixes-4 branch from 20d9838 to 2e72c9a Compare February 13, 2024 04:46
@slavapestov slavapestov changed the title Assoc type regression fixes 4 Sema: Associated type inference regressions, round 4 Feb 13, 2024
@slavapestov slavapestov force-pushed the assoc-type-regression-fixes-4 branch 2 times, most recently from c3f9dad to 9b01dad Compare February 13, 2024 04:50
@slavapestov slavapestov marked this pull request as ready for review February 13, 2024 04:55
@slavapestov slavapestov marked this pull request as draft February 13, 2024 05:47
@slavapestov slavapestov force-pushed the assoc-type-regression-fixes-4 branch from db8eb4f to ff50a95 Compare February 14, 2024 05:00
@slavapestov slavapestov marked this pull request as ready for review February 14, 2024 05:25
@slavapestov slavapestov force-pushed the assoc-type-regression-fixes-4 branch from ff50a95 to 80e8441 Compare February 14, 2024 05:57
@slavapestov
Copy link
Contributor Author

@swift-ci Please test source compatibility

…e-inference

This just brings back a bunch of old brittle logic conditionalized on the
negation of the flag.

Fixes rdar://problem/122810266.
…ental-associated-type-inference

The funny indentation will make the diff easier to read once we remove
the staging flag.
Instead of computing the reduced type of the witness upfront and
then checking for canonical equality in type matching, check for
reduced equality in type matching.

This restores the old behavior and prevents us from considering too
many protocol extension witnesses, while fixing the request cycle
that motivated the change to instead match against the reduced type
of the witness.

Fixes rdar://problem/122589094, rdar://problem/122596633.
@slavapestov slavapestov force-pushed the assoc-type-regression-fixes-4 branch from 80e8441 to c34a74c Compare February 14, 2024 11:46
@slavapestov
Copy link
Contributor Author

@swift-ci Please smoke test

@slavapestov slavapestov merged commit bca1dd7 into swiftlang:main Feb 14, 2024
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.

1 participant