Skip to content

AST: Filter out some Obj-C overrides when MemberImportVisibility is enabled #80563

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

tshortli
Copy link
Contributor

@tshortli tshortli commented Apr 6, 2025

Unlike in Swift, Obj-C allows method overrides to be declared in extensions (categories), even outside of the module that defines the type that is being extended. When MemberImportVisibility is enabled, these overrides must be filtered out to prevent them from hijacking name lookup and causing the compiler to insist that the module that defines the extension be imported.

Resolves rdar://145329988.

…nabled.

Unlike in Swift, Obj-C allows method overrides to be declared in extensions
(categories), even outside of the module that defines the type that is being
extended. When MemberImportVisibility is enabled, these overrides must be
filtered out to prevent them from hijacking name lookup and causing the
compiler to insist that the module that defines the extension be imported.

Resolves rdar://145329988.
@tshortli
Copy link
Contributor Author

tshortli commented Apr 6, 2025

@swift-ci please smoke test

@tshortli
Copy link
Contributor Author

tshortli commented Apr 6, 2025

@swift-ci please smoke test Linux

@tshortli tshortli enabled auto-merge April 6, 2025 06:59
@tshortli tshortli merged commit 374fc90 into swiftlang:main Apr 6, 2025
3 checks passed
@tshortli tshortli deleted the member-import-visibility-objc-overloads-in-extensions branch April 6, 2025 15:30
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