Skip to content

[Property Wrappers] Always make sure the storage for a wrapped parameter is immutable. #37143

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 1 commit into from
Apr 30, 2021

Conversation

hborla
Copy link
Member

@hborla hborla commented Apr 29, 2021

This is a missing detail from SE-0293. The mutability of implementation-detail property wrappers is specified here:

A local let-constant representing the backing storage will be synthesized with the name of the parameter prefixed with an underscore. The backing storage is initialized by passing the parameter to init(wrappedValue:).

Resolves: rdar://77337477

…ail,

make the backing stroage a let-constant.
@hborla hborla requested a review from xedin April 29, 2021 19:37
@hborla
Copy link
Member Author

hborla commented Apr 29, 2021

@swift-ci please smoke test

@hborla
Copy link
Member Author

hborla commented Apr 29, 2021

@swift-ci please smoke test Linux platform

@hborla hborla merged commit af649e7 into swiftlang:main Apr 30, 2021
@hborla hborla deleted the wrapped-parameter-mutability branch April 30, 2021 02:32
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