Skip to content

[6.1] ClangImporter: Ignore missing imports in SwiftDeclConverter::recordObjCOverride() #78266

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 Dec 18, 2024

  • Explanation: recordObjCOverride() records semantic overrides for imported Obj-C methods. Since these methods are imported from a different language, it doesn't make sense to enforce Swift's member import visibility rules when performing lookups to find overridden methods. Doing so caused the Constraint Solver to lack important information needed to eliminate overloads, resulting in erroneous ambiguities.
  • Scope: Affects projects adopting -enable-upcoming-feature MemberImportVisibility.
  • Issue/Radar: rdar://141636723
  • Original PR: ClangImporter: Ignore missing imports in SwiftDeclConverter::recordObjCOverride() #78265
  • Risk: Low. The change in behavior only affects adopters of MemberImportVisibility, which hasn't been included in a released toolchain yet.
  • Testing: A new test in the compiler test suite.
  • Reviewer: @DougGregor

@tshortli tshortli requested a review from a team as a code owner December 18, 2024 02:54
…jCOverride().

`recordObjCOverride()` records semantic overrides for imported Obj-C methods.
Since these methods are imported from a different language, it doesn't make
sense to enforce Swift's member import visibility rules when performing lookups
to find overridden methods. Doing so caused the Constrain Solver to lack
important information needed to eliminate overloads, resulting in erroneous
ambiguities.

Resolves rdar://141636723.
@tshortli tshortli force-pushed the member-import-visibility-imported-objc-overrides-6.1 branch from ea8b1c1 to 57cb93a Compare December 18, 2024 03:02
@tshortli
Copy link
Contributor Author

@swift-ci please test

@tshortli tshortli merged commit 67bfa61 into swiftlang:release/6.1 Dec 18, 2024
5 checks passed
@tshortli tshortli deleted the member-import-visibility-imported-objc-overrides-6.1 branch December 18, 2024 18:12
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.

2 participants