Skip to content

[CSApply] Key path dynamic member lookup argument is Sendable only if its captures are #83348

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 2 commits into from
Jul 28, 2025

Conversation

xedin
Copy link
Contributor

@xedin xedin commented Jul 25, 2025

Previously dynamic member subscript wasn't allowed to use & Sendable,
since this restriction was lifted the argument cannot simply assume
the parameter type any longer, the key path captures have to be checked
to determine whether it could be marked as Sendable or not.

Resolves: #77105
Resolves: rdar://138227393

We missed this before because the argument/parameter types are equal.
@xedin xedin requested review from ktoso and hborla as code owners July 25, 2025 23:26
@xedin
Copy link
Contributor Author

xedin commented Jul 25, 2025

@swift-ci please test

… its captures are

Previously dynamic member subscript wasn't allowed to use `& Sendable`,
since this restriction was lifted the argument cannot simply assume
the parameter type any longer, the key path captures have to be checked
to determine whether it could be marked as Sendable or not.

Resolves: swiftlang#77105
Resolves: rdar://138227393
@xedin
Copy link
Contributor Author

xedin commented Jul 28, 2025

@swift-ci please smoke test

@xedin xedin merged commit 436a279 into swiftlang:main Jul 28, 2025
3 checks passed
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 does not honor sendability of key paths
2 participants