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

[6.1] [Completion] Fix Sendable KeyPath dynamic member subscripts #77766

Open
wants to merge 2 commits into
base: release/6.1
Choose a base branch
from

Conversation

hamishknight
Copy link
Contributor

6.1 cherry-pick of #77691

  • Explanation: Fixes KeyPath dynamic member completion when the KeyPath parameter includes a Sendable protocol composition
  • Scope: Affects completion
  • Issue: rdar://138418296
  • Risk: Low, applies existing logic to a new case
  • Testing: Added tests to test suite
  • Reviewer: Alex Hoppen

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 hamishknight added 🍒 release cherry pick Flag: Release branch cherry picks swift 6.1 labels Nov 21, 2024
@hamishknight hamishknight requested a review from a team as a code owner November 21, 2024 12:41
@hamishknight
Copy link
Contributor Author

@swift-ci please test

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🍒 release cherry pick Flag: Release branch cherry picks swift 6.1
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant