Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions TSPL.docc/LanguageGuide/AccessControl.md
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,14 @@ the default access level of the type's members will be internal.
> and avoids presenting the internal workings of a type as public API by mistake.

```swift
open class SomeOpenClass { // explicitly open class
open var someOpenProperty = 0 // explicitly open class member
public var somePublicProperty = 0 // explicitly public class member
var someInternalProperty = 0 // implicitly internal class member
fileprivate func someFilePrivateMethod() {} // explicitly file-private class member
private func somePrivateMethod() {} // explicitly private class member
}

public class SomePublicClass { // explicitly public class
public var somePublicProperty = 0 // explicitly public class member
var someInternalProperty = 0 // implicitly internal class member
Expand Down