Skip to content

Conversation

@xymus
Copy link
Contributor

@xymus xymus commented Dec 9, 2025

We now report properties referencing types imported from implementation-only dependencies in non-library-evolution mode as the memory layouts of structs and enums may be exposed to clients. Here we exempt non-open classes from this check as clients hold pointers to classes which hides the class internal memory layouts. Keep forbidding it for open classes in order to error early, a client trying to subclass an open class with such a reference from their property would already see an error about members not deserializable.

…asses

We now report properties referencing types imported from
implementation-only dependencies in non-library-evolution mode as the
memory layouts of structs and enums may be exposed to clients. Here we
exempt non-open classes from this check as clients hold pointers to
classes which hides the class internal memory layouts. Keep forbidding
it for open classes in order to error early, a client trying to subclass
an open class with such a reference from their property would already
see an error about members not deserializable.
@xymus
Copy link
Contributor Author

xymus commented Dec 9, 2025

@swift-ci Please smoke test

@xymus xymus merged commit 85d522e into swiftlang:main Dec 9, 2025
3 checks passed
@xymus xymus deleted the exportability-nle-classes branch December 9, 2025 21:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant