Skip to content

[Completion] Fix Sendable KeyPath dynamic member subscripts #77691

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

Conversation

hamishknight
Copy link
Contributor

Introduce getKeyPathTypeForDynamicMemberLookup which returns the KeyPath type, and can be used from both RootAndResultTypeOfKeypathDynamicMemberRequest and isValidKeyPathDynamicMemberLookup. This ensures we look to the superclass for e.g protocol compositions with Sendable for completion. This also means we now return an interface type, which is what the client of RootAndResultTypeOfKeypathDynamicMemberRequest wanted anyway.

rdar://138418296
Resolves #77035

Introduce `getKeyPathTypeForDynamicMemberLookup`
which returns the KeyPath type, and can be used
from both `RootAndResultTypeOfKeypathDynamicMemberRequest`
and `isValidKeyPathDynamicMemberLookup`. This ensures
we look to the superclass for e.g protocol compositions
with `Sendable`. This also means we now return an
interface type, which is what the client of
`RootAndResultTypeOfKeypathDynamicMemberRequest`
wanted anyway.

rdar://138418296
@hamishknight
Copy link
Contributor Author

@swift-ci please test

@hamishknight hamishknight merged commit 51dadb0 into swiftlang:main Nov 19, 2024
5 checks passed
@hamishknight hamishknight deleted the fix-sendable-keypath-dynamic-member branch November 19, 2024 09:11
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.

Dynamic member lookup fails to autocomplete sendable key path
2 participants