Skip to content

[6.2] Add a "lazy" lifetime inference for mutating interface methods #80646

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
Apr 9, 2025

Conversation

atrick
Copy link
Contributor

@atrick atrick commented Apr 8, 2025

When type checking a .swiftinterface file, Assume that a mutating methods does not depend on its parameters. This is unsafe but needed because some MutableSpan APIs snuck into the standard library interface without specifying dependencies.

Fixes rdar://148697444 error: a mutating method with a ~Escapable 'self' requires '@Lifetime(self: ...)'

main PR: #80621

When type checking a .swiftinterface file, Assume that a mutating methods does
not depend on its parameters.  This is unsafe but needed because some
MutableSpan APIs snuck into the standard library interface without specifying
dependencies.

Fixes rdar://148697444 error: a mutating method with a ~Escapable 'self' requires '@Lifetime(self:
...)'

(cherry picked from commit a86fe4f)
@atrick atrick requested a review from meg-gupta April 8, 2025 18:54
@atrick atrick requested a review from a team as a code owner April 8, 2025 18:54
@atrick atrick changed the title Add a "lazy" lifetime inference for mutating interface methods [6.2] Add a "lazy" lifetime inference for mutating interface methods Apr 8, 2025
@atrick
Copy link
Contributor Author

atrick commented Apr 8, 2025

@swift-ci test

@atrick atrick added swift 6.2 🍒 release cherry pick Flag: Release branch cherry picks labels Apr 8, 2025
@atrick atrick force-pushed the 62-infer-mutating branch from ff34896 to 939faa3 Compare April 8, 2025 20:29
@atrick
Copy link
Contributor Author

atrick commented Apr 8, 2025

@swift-ci test

@atrick atrick enabled auto-merge April 8, 2025 20:30
@atrick atrick requested a review from tbkka April 8, 2025 21:08
@atrick atrick merged commit e88265d into swiftlang:release/6.2 Apr 9, 2025
5 checks passed
@atrick atrick deleted the 62-infer-mutating branch April 9, 2025 15:58
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.2
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants