8000 [SE-0481] Allow weak let and make weak captures immutable by nickolas-pohilets · Pull Request #80440 · swiftlang/swift · GitHub
[go: up one dir, main page]

Skip to content

[SE-0481] Allow weak let and make weak captures immutable #80440

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

Open
wants to merge 15 commits into
base: main
Choose a base branch
from

Conversation

nickolas-pohilets
Copy link
Contributor
@nickolas-pohilets nickolas-pohilets commented Apr 1, 2025

Changes were originally wrapped into experimental feature, but after proposal was approved, feature was removed and PR applies changes unconditionally.

@rjmccall
Copy link
Contributor

@swift-ci Please build toolchain

@rjmccall
Copy link
Contributor
rjmccall commented May 1, 2025

@swift-ci Please build macOS toolchain

@nickolas-pohilets
Copy link
Contributor Author

@swift-ci Please smoke test

Remaining failures:

DebugInfo/guard-let-scope4.swift
expr/closure/closures.swift
SILGen/capture-transitive.swift
SILGen/dynamic_self.swift
SILGen/unowned-class-bound-generic-parameter.swift
…le weak capture (minor source-breaking change)
Remaining failures:

SILGen/unowned-class-bound-generic-parameter.swift
@nickolas-pohilets
Copy link
Contributor Author

@swift-ci Please clean smoke test macOS platform

@nickolas-pohilets
Copy link
Contributor Author

@swift-ci Please smoke test Linux platform

@nickolas-pohilets
Copy link
Contributor Author

@swift-ci Please smoke test Windows platform

@nickolas-pohilets
Copy link
Contributor Author

@swift-ci Please test macOS platform

@nickolas-pohilets
Copy link
Contributor Author

@swift-ci Please smoke test macOS platform

1 similar comment
@nickolas-pohilets
Copy link
Contributor Author

@swift-ci Please smoke test macOS platform

@nickolas-pohilets
Copy link
Contributor Author

@swift-ci Please smoke test Windows platform

@nickolas-pohilets
Copy link
Contributor Author

Tests fail on Windows in fails because some of the error messages differ in diagnostic spelling non-sendable vs non-Sendable:

# | C:\Users\swift-ci\jenkins\workspace\swift-PR-windows\swift\test\Concurrency\weak_ref_sendability.swift:52:26: error: incorrect message found
# |   // expected-error@+1 {{stored property 'x' of 'Sendable'-conforming class 'CheckSendability4' has non-sendable type 'NS?'}}
# |                          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |                          stored property 'x' of 'Sendable'-conforming class 'CheckSendability4' has non-Sendable type 'NS?'

@nickolas-pohilets
Copy link
Contributor Author

@swift-ci Please smoke test

Copy link
Contributor
@rjmccall rjmccall left a comment

Choose a reason for hiding this comment

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

The PR title is wrong, since you're not adding an experimental feature anymore. It should probably refer to SE-0481.

@nickolas-pohilets nickolas-pohilets changed the title Added experimental feature to allow weak let and immutable weak captures [SE-0481] Allow weak let and make weak captures immutable May 28, 2025
Copy link
Contributor
@hamishknight hamishknight left a comment

Choose a reason for hiding this comment

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

Implicit self diagnostic changes LGTM!

@nickolas-pohilets
Copy link
Contributor Author

@swift-ci Please smoke test

@nickolas-pohilets
Copy link
Contributor Author

@swift-ci Please smoke test macOS platform

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.

4 participants
0