apple:release/6.0
← tshortli:extension-import-visibility-6.0
opened 04:27AM - 11 Apr 24 UTC
- **Explanation:** If an extension isn't imported either directly or via a trans…itive (`@_exported`) import, its members should not be visible to name lookup. Implement this behavior behind the experimental flag `ExtensionImportVisibility`. This feature will be pitched on Swift Evolution as a potential source breaking change to make in a future language mode.
- **Scope:** This feature addresses a common pain point for Swift projects. Extension members declared in different modules can sometimes conflict, and without the control that this feature affords it can be difficult to resolve the conflict.
- **Issue/Radar:** rdar://16154294, https://github.com/apple/swift/issues/46493
- **Original PRs:** https://github.com/apple/swift/pull/72060, https://github.com/apple/swift/pull/72871, https://github.com/apple/swift/pull/72969
- **Risk:** Low. The new behavior is gated behind an experimental feature flag.
- **Testing:** New tests added that exercise behavior with the experimental feature enabled.
- **Reviewer:** @DougGregor