Skip to content

Commit e1bfc46

Browse files
authored
Merge pull request swiftlang#39003 from CodaFi/abitis
[Gardening] Document An ABI Breaking Case For Moving Extension Members
2 parents c916c0a + 4b826b7 commit e1bfc46

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

docs/LibraryEvolution.rst

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -845,6 +845,14 @@ Additionally, non-protocol extensions allow a few additional changes:
845845
protocol extensions that do *not* satisfy protocol requirements are not
846846
overridable, even when the conforming type is a class.
847847

848+
.. note::
849+
850+
It is an ABI incompatible change to move a member to an extension with
851+
different constraints. Similarly, it is an ABI incompatible change to move a member
852+
from a constrained extension back to its base type. Note that this is the case
853+
even if the constraints from the extension are restated as constraints in the
854+
where clause of e.g. a function or subscript member.
855+
848856

849857
Operators and Precedence Groups
850858
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

0 commit comments

Comments
 (0)