Skip to content

Commit 211e405

Browse files
authored
Add 'open' to access control examples (#149)
2 parents 3ee4a90 + a66420e commit 211e405

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

TSPL.docc/LanguageGuide/AccessControl.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -153,11 +153,13 @@ one of the `open`, `public`, `internal`, `fileprivate`, or `private` modifiers
153153
at the beginning of the entity's declaration.
154154

155155
```swift
156+
open class SomeOpenClass {}
156157
public class SomePublicClass {}
157158
internal class SomeInternalClass {}
158159
fileprivate class SomeFilePrivateClass {}
159160
private class SomePrivateClass {}
160161

162+
open var someOpenVariable = 0
161163
public var somePublicVariable = 0
162164
internal let someInternalConstant = 0
163165
fileprivate func someFilePrivateFunction() {}
@@ -168,11 +170,13 @@ private func somePrivateFunction() {}
168170
- test: `accessControlSyntax`
169171
170172
```swifttest
173+
-> open class SomeOpenClass {}
171174
-> public class SomePublicClass {}
172175
-> internal class SomeInternalClass {}
173176
-> fileprivate class SomeFilePrivateClass {}
174177
-> private class SomePrivateClass {}
175178
---
179+
-> open var someOpenVariable = 0
176180
-> public var somePublicVariable = 0
177181
-> internal let someInternalConstant = 0
178182
-> fileprivate func someFilePrivateFunction() {}

0 commit comments

Comments
 (0)