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

Fix open let properties #1595

Merged
merged 2 commits into from
Jun 13, 2018
Merged

Conversation

rauhul
Copy link
Member

@rauhul rauhul commented Jun 12, 2018

fixes 'let' properties are implicitly 'final'; use 'public' instead of 'open' warnings

@spevans
Copy link
Contributor

spevans commented Jun 12, 2018

@swift-ci please test

Copy link
Contributor

@millenomi millenomi left a comment

Choose a reason for hiding this comment

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

While it’s incorrect to have open let properties, both open let and public let are wrong here — the interface for these on Darwin is open read only properties.

I think all of these need to be replaced with:

private let _property: Type
open var property: Type { return _property }

to match their Darwin signature.

@spevans
Copy link
Contributor

spevans commented Jun 12, 2018

Would open private(set) var be more correct? This avoids the hidden ivar.

@millenomi
Copy link
Contributor

That works as well!

@rauhul
Copy link
Member Author

rauhul commented Jun 13, 2018

@millenomi updated with spevans suggestion!

@millenomi
Copy link
Contributor

@swift-ci please test and merge

1 similar comment
@spevans
Copy link
Contributor

spevans commented Jun 13, 2018

@swift-ci please test and merge

@swift-ci swift-ci merged commit f20c62a into swiftlang:master Jun 13, 2018
@rauhul rauhul deleted the fix_open_let_properties branch June 13, 2018 16:50
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