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

Add a "lazy" lifetime inference for mutating interface methods #80621

Merged
merged 2 commits into from
Apr 8, 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: ...)'

atrick added 2 commits April 7, 2025 18:06
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:
...)'
@atrick atrick requested a review from meg-gupta April 8, 2025 01:13
@atrick
Copy link
Contributor Author

atrick commented Apr 8, 2025

@swift-ci test

Copy link
Contributor

@meg-gupta meg-gupta left a comment

Choose a reason for hiding this comment

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

lgtm

@atrick atrick merged commit 6235b28 into swiftlang:main Apr 8, 2025
5 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.

2 participants