Skip to content

Commit 65155cb

Browse files
committed
[docs] LibraryEvolution: Member typealiases affect ABI.
Thanks, Dmitri!
1 parent 0f6765b commit 65155cb

File tree

1 file changed

+14
-4
lines changed

1 file changed

+14
-4
lines changed

docs/LibraryEvolution.rst

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -885,10 +885,20 @@ Operator declarations are not versioned.
885885
Typealiases
886886
~~~~~~~~~~~
887887

888-
Like operators, typealiases only exist at compile-time, so changing them
889-
affects source compatibility but not binary compatibility. Since a typealias
890-
is only made up of its name and its type, it is recommended that it is never
891-
changed at all after being published. Typealiases are not versioned.
888+
Typealiases only exist at compile-time, so changing a top-level typealias
889+
affects source compatibility but not binary compatibility. Since a typealias is
890+
only made up of its name and its type, it is recommended that a public
891+
top-level typealias is never changed at all after being published.
892+
893+
Public typealiases within structs, enums, and protocols may be used for
894+
protocol conformances (to satisfy associated type requirements), not only
895+
within the library but within client modules as well. Therefore, changing a
896+
member typealias in any way is not permitted.
897+
898+
It is always permitted to change the *use* of a public typealias to its
899+
underlying type, and vice versa, at any location in the program.
900+
901+
Neither top-level nor member typealiases are versioned.
892902

893903

894904
A Unifying Theme

0 commit comments

Comments
 (0)