Skip to content

Me too #194

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
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
10 changes: 5 additions & 5 deletions docs/AccessControl.rst
Original file line number Diff line number Diff line change
Expand Up @@ -70,15 +70,15 @@ type), with a few additional rules:

- A member may be overridden whenever it is accessible.

The implicit memberwise initializer for a struct has the minimum access level
The implicit member-wise initializer for a struct has the minimum access level
of all of the struct's stored properties, except that if all properties are
``public`` the initializer is ``internal``. The implicit no-argument
initializer for structs and classes follows the default access level for the
type.

Currently, enum cases always have the same access level as the enclosing enum.

Deinitializers are only invoked by the runtime and do not nominally have access.
De-initializers are only invoked by the runtime and do not nominally have access.
Internally, the compiler represents them as having the same access level as the
enclosing type.

Expand Down Expand Up @@ -153,8 +153,8 @@ A tuple type's access level is the minimum of the access levels of its
elements. A function type's access level is the minimum of the access levels of
its input and return types.

A typealias may have any access level up to the access level of the type it
aliases. That is, a ``private`` typealias can refer to an ``public`` type, but
A type-alias may have any access level up to the access level of the type it
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Isn't typealias (one word) already a Swift keyword? I think this makes sense to leave as-is.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Apples own documentation breaks it into two words https://developer.apple.com/library/prerelease/ios/documentation/Swift/Conceptual/Swift_Programming_Language/Declarations.html

So if anything the hyphen should be removed.

aliases. That is, a ``private`` type-alias can refer to an ``public`` type, but
not the other way around. This includes associated types used to satisfy
protocol conformances.

Expand All @@ -167,7 +167,7 @@ or other extensions from outside the module. Therefore, members of a subclass
or extension will not conflict with or inadvertently be considered to override
non-accessible members of the superclass.

Both ``private`` and ``internal`` increase opportunities for devirtualization,
Both ``private`` and ``internal`` increase opportunities for de-virtualization,
though it is still possible to put a subclass of a ``private`` class within the
same file.

Expand Down