Skip to content

Update for SE-0025 ('private' and 'fileprivate') #476

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
Jul 11, 2016

Conversation

jrose-apple
Copy link
Contributor

SE-0025 makes private restrict access to a lexical scope; the Swift 2 behavior is now named fileprivate. At the time of this pull request, the compiler treats both private and fileprivate as having fileprivate semantics, but that will soon change.

Supersedes #410; the latest amendment to SE-0025 permits some accesses that the original model (or at least our interpretation of it) would have forbidden. I made my changes by hand without compiler aid, though, so it's possible I missed a case.

@ddunbar
Copy link
Contributor

ddunbar commented Jul 11, 2016

@swift-ci please test

@ddunbar ddunbar mentioned this pull request Jul 11, 2016
private var array: [Element]
private var set: Set<Element>
fileprivate var array: [Element]
fileprivate var set: Set<Element>
Copy link
Contributor

Choose a reason for hiding this comment

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

These probably shouldn't be required, but I will fix once this lands.

@ddunbar
Copy link
Contributor

ddunbar commented Jul 11, 2016

LGTM

@ddunbar ddunbar merged commit b295acb into swiftlang:master Jul 11, 2016
@jrose-apple jrose-apple deleted the fileprivate branch July 11, 2016 22:43
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