Reputation: 527
In Swift 3, what exactly is the difference in access control between
private class Foo { }
and
fileprivate class Bar { }
assuming both are top-level classes, that is, they are placed directly into a file rather than nested in some other construct?
Upvotes: 2
Views: 1138
Reputation: 2766
There is no difference in your case. The only time that fileprivate
differs from private
is inside a class, struct, or protocol.
Upvotes: 4