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

[SR-14308] Missing documentation for optional wrapped property default value and default initializer interaction #56667

Open
swift-ci opened this issue Mar 5, 2021 · 1 comment

Comments

@swift-ci
Copy link
Collaborator

swift-ci commented Mar 5, 2021

Previous ID SR-14308
Radar rdar://problem/75116546
Original Reporter andyhill (JIRA User)
Type Improvement
Additional Detail from JIRA
Votes 0
Component/s
Labels Improvement, Documentation
Assignee None
Priority Medium

md5: 359bb4c8a379c09af74128fd957e76c2

Issue Description:

As explored in this "Using Swift" forum thread, the prioritization of default initializer over default `nil` assignment of optional wrapped property is not documented in the Swift Language Guide, neither in the "Properties" section nor in the "Initialization" section.

Holly Borla: An optional wrapped property only gets a default `= nil` if the property wrapper does not use default initialization via `init()` .

@typesanitizer
Copy link

@swift-ci create

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants