Skip to content

[Sema]: fix @discardableResult interaction with implicit @Sendable conversions #83475

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 1 commit into from
Aug 4, 2025

Conversation

jamieQ
Copy link
Contributor

@jamieQ jamieQ commented Aug 1, 2025

Updates existing diagnostic handling to look through function conversions when suppressing diagnostics for unused functions that are return values from callees marked with @discardableResult.

Resolves #83463

@jamieQ
Copy link
Contributor Author

jamieQ commented Aug 1, 2025

@swift-ci please smoke test

@jamieQ jamieQ marked this pull request as ready for review August 1, 2025 10:52
@jamieQ
Copy link
Contributor Author

jamieQ commented Aug 1, 2025

cc @xedin – lmk what you think if/when you have a chance please!

Copy link
Contributor

@ktoso ktoso left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me -- unless @xedin has some better approach in mind for the fix

Copy link
Contributor

@xedin xedin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense to me!

…nversions

Updates existing diagnostic handling to look through function
conversions when suppressing diagnostics for unused functions that are
return values from callees marked with @discardableResult.
@jamieQ jamieQ force-pushed the fix-global-actor-discardable-result branch from 9adbc96 to cd3e96a Compare August 2, 2025 11:14
@jamieQ
Copy link
Contributor Author

jamieQ commented Aug 2, 2025

@swift-ci please smoke test

@jamieQ
Copy link
Contributor Author

jamieQ commented Aug 2, 2025

@ktoso @xedin thanks for the reviews! Would one of you please merge when you are able?

@ktoso ktoso merged commit e963206 into swiftlang:main Aug 4, 2025
3 checks passed
@ktoso
Copy link
Contributor

ktoso commented Aug 4, 2025

Merged, thanks for the fix and ping!

@jamieQ jamieQ deleted the fix-global-actor-discardable-result branch August 4, 2025 10:22
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.

@discardableResult on global actor-isolated function is ignored
3 participants