Skip to content

[6.2] SILGen: Establish an addressability scope for closure captures. #81905

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

Conversation

jckarter
Copy link
Contributor

@jckarter jckarter commented Jun 2, 2025

Explanation: Fixes a bug when invoking a Span-returning API on a value captured inside of a closure.

Scope: Bug fix.

Issue: rdar://150479326

Original PR: #81878

Risk: Low, corrects an oversight where closure captures did not get a scope set for their @_addressable dependency.

Testing: Swift CI, test case from issue

Reviewers: @atrick

This allows a captured variable to serve as the root of an addressable dependency.
Fixes the compiler crash in rdar://150479326.
@jckarter jckarter requested a review from a team as a code owner June 2, 2025 16:42
@jckarter
Copy link
Contributor Author

jckarter commented Jun 2, 2025

@swift-ci Please test

Copy link
Contributor

@atrick atrick left a comment

Choose a reason for hiding this comment

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

LGTM

@jckarter jckarter merged commit d220be4 into swiftlang:release/6.2 Jun 3, 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.

3 participants