Skip to content

Commit aaec275

Browse files
committed
Add 'package(set)' to the list
1 parent 1d50797 commit aaec275

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

TSPL.docc/LanguageGuide/AccessControl.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -807,14 +807,15 @@ the constant, variable, property, or subscript they belong to.
807807
You can give a setter a *lower* access level than its corresponding getter,
808808
to restrict the read-write scope of that variable, property, or subscript.
809809
You assign a lower access level by writing
810-
`fileprivate(set)`, `private(set)`, or `internal(set)`
810+
`fileprivate(set)`, `private(set)`, `internal(set)`, or `package(set)`
811811
before the `var` or `subscript` introducer.
812812

813813
> Note: This rule applies to stored properties as well as computed properties.
814814
> Even though you don't write an explicit getter and setter for a stored property,
815815
> Swift still synthesizes an implicit getter and setter for you
816816
> to provide access to the stored property's backing storage.
817-
> Use `fileprivate(set)`, `private(set)`, and `internal(set)` to change the access level
817+
> Use `fileprivate(set)`, `private(set)`, `internal(set)`, and `package(set)`
818+
> to change the access level
818819
> of this synthesized setter in exactly the same way as for an explicit setter
819820
> in a computed property.
820821

0 commit comments

Comments
 (0)