@@ -3940,14 +3940,21 @@ Access control is discussed in detail in <doc:AccessControl>.
3940
3940
only by code within the declaration's immediate enclosing scope.
3941
3941
3942
3942
For the purpose of access control,
3943
- extensions to the same type that are in the same file
3944
- share an access-control scope.
3945
- If the type they extend is also in the same file,
3946
- they share the type's access-control scope.
3947
- Private members declared in the type's declaration
3948
- can be accessed from extensions,
3949
- and private members declared in one extension
3950
- can be accessed from other extensions and from the type's declaration.
3943
+ extensions behave as follows:
3944
+
3945
+ - If there are multiple extensions in the same file,
3946
+ and those extensions all extend the same type,
3947
+ then all of those extensions have the same access-control scope.
3948
+ The extensions and the type they extend can be in different files.
3949
+
3950
+ - If there are extensions in the same file as the type they extend,
3951
+ the extensions have the same access-control scope as the type they extend.
3952
+
3953
+ - Private members declared in a type's declaration
3954
+ can be accessed from extensions to that type.
3955
+ Private members declared in one extension
3956
+ can be accessed from other extensions
3957
+ and from the extended type's declaration.
3951
3958
3952
3959
Each access-level modifier above optionally accepts a single argument,
3953
3960
which consists of the ` set ` keyword enclosed in parentheses ---
0 commit comments