Commit Graph

2 Commits

Author SHA1 Message Date
Becca Royal-Gordon
b70ecfaf31 Support objcImpl + implementationOnly
Member implementations are never directly visible to clients of a module, even if they are formally public, but TypeCheckAvailability did not know this. As a result, it would incorrectly diagnose member implementations in an objcImpl extension as violating @_implementationOnly import rules or other, similar access checks. This commit excludes them from being considered as exported declarations.

Fixes rdar://121229058.
2024-02-19 17:13:51 -08:00
Becca Royal-Gordon
3e4ea43adf Don’t diagnose @_objcImpl conflicts with inherited inits
Previously, Swift would reject an `override public init(…)` in an `@_objcImplementation` because ClangImporter would have already synthesized inherited initializers that conflicted with the overrides. Ignore these spurious conflicts, and also move a check out of IsObjCRequest and into the conflict-handling code.

Additional work towards rdar://70730077.
2022-10-27 17:00:43 -07:00