Skip to content

Conversation

@nickolas-pohilets
Copy link
Contributor

See #80440 and #82732

@nickolas-pohilets nickolas-pohilets requested a review from a team as a code owner July 9, 2025 19:58
@nickolas-pohilets nickolas-pohilets changed the title [6.2] Cherry-pick SE-0481 with source-incompatible changes to closure capture semantics still wrapped into a feature Draft: [6.2] Cherry-pick SE-0481 with source-incompatible changes to closure capture semantics still wrapped into a feature Jul 9, 2025
@nickolas-pohilets nickolas-pohilets marked this pull request as draft July 9, 2025 20:03
@nickolas-pohilets nickolas-pohilets changed the title Draft: [6.2] Cherry-pick SE-0481 with source-incompatible changes to closure capture semantics still wrapped into a feature [6.2] Cherry-pick SE-0481 with source-incompatible changes to closure capture semantics still wrapped into a feature Jul 9, 2025
@nickolas-pohilets nickolas-pohilets marked this pull request as ready for review August 22, 2025 08:33
@nickolas-pohilets
Copy link
Contributor Author

@swift-ci Please smoke test

@nickolas-pohilets
Copy link
Contributor Author

@swift-ci Please test macOS platform

@nickolas-pohilets
Copy link
Contributor Author

@swift-ci Please test Linux platform

@rjmccall
Copy link
Contributor

rjmccall commented Sep 5, 2025

@swift-ci Please test

@rjmccall
Copy link
Contributor

rjmccall commented Sep 5, 2025

Description: Implements SE-0481, adding the ability to declare weak let (not gated behind a feature). Adds a diagnostic for a weak var that's never mutated. Adds an upcoming language feature that changes explicit weak captures to be immutable.
Scope: Make the decl checker more permissive. Touches some type-checker code paths for capture analysis, but maintains current behavior when upcoming feature is not enabled.
Risk: Low. All changes to non-diagnostic code paths that could affect existing code are gated by a feature check for a new feature that is not enabled by any existing configuration.
Reviewed by: John McCall
Testing: new tests; changes to existing tests

@rjmccall rjmccall merged commit f72fd5a into swiftlang:release/6.2 Sep 12, 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