Skip to content

Narrow @_originallyDefinedIn check in NominalTypeDecl::isResilient to protocols. #67979

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

Conversation

jckarter
Copy link
Contributor

And add a comment explaining why this check is only relevant to protocols, and shouldn't be copied to other similar-looking isResilient methods on other types. According to 2537602, which introduced the original @_originallyDefinedIn check, this check was necessary to maintain ABI compatibility when protocol declarations are moved, but in all other cases, we should treat declarations as resilient when they are defined in other library-evolution-enabled modules, even when the declaration was originally defined in the current module.

…to protocols.

And add a comment explaining why this check is only relevant to protocols, and shouldn't
be copied to other similar-looking isResilient methods on other types.
According to 2537602, which introduced the original
`@_originallyDefinedIn` check, this check was necessary to maintain ABI compatibility
when protocol declarations are moved, but in all other cases, we should treat declarations
as resilient when they are defined in other library-evolution-enabled modules, even when
the declaration was originally defined in the current module.
@jckarter
Copy link
Contributor Author

@swift-ci Please test

@jckarter jckarter merged commit ad6423f into swiftlang:main Aug 17, 2023
@nkcsgexi
Copy link
Contributor

Thank you for narrowing the check and the detailed comments, Joe!

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.

3 participants