-
Notifications
You must be signed in to change notification settings - Fork 10.5k
[Sema/ClangImporter] Improvements to witness matching #72277
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
[Sema/ClangImporter] Improvements to witness matching #72277
Conversation
@swift-ci please test |
@swift-ci please test source compatibility |
@swift-ci please test source compatibility release |
…t declaration Locators used to support only expressions which is no longer the case.
…with ObjC requirements Since importer ignored `swift_attr` that appeared in a type context until recently we need to maintain status quo with concurrency stripping from ObjC requirements in modes that don't have full concurrency checking enabled.
… down to a class `any C` where `C` is a class is not a well-formed type.
edf4065
to
5890de3
Compare
@swift-ci please test |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we replace the ObjC checks with a check for preconcurrency requirements? I think we want the same behavior for Swift requirements that are marked @preconcurrency
, and ObjC isn't special other than all imported declarations are treated as @preconcurrency
.
I want to investigate expanding this separately, main goal was to remove the workaround for ObjC requirements that got concurrency stripped always and thus had no path for witnesses to be updated... |
Fix locators for requirement-witness matching (modern locators can be anchored on declarations)
Warn about sendability mismatches associated with ObjC requirements
Instead of stripping concurrency, handle stripping gracefully during
repairFailures
and reflect that in the solution score.This way we can maintain source compatibility and allow adding concurrency annotations.
ClangImporter: Wrap compositions with Sendable protocol into existentials
Resolves: #65730