Skip to content

Conversation

tshortli
Copy link
Contributor

Downgrade the cannot be more available than enclosing scope error to a warning when the attribute making the decl too available is specified for a less specific platform.

Resolves rdar://143423070.

Downgrade the `cannot be more available than enclosing scope` error to a
warning when the attribute making the decl too available is specified for a
less specific platform.

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

@swift-ci please test

@tshortli tshortli enabled auto-merge January 23, 2025 01:04
@tshortli
Copy link
Contributor Author

@swift-ci please test Linux

@tshortli tshortli merged commit 9796d1b into swiftlang:main Jan 23, 2025
4 of 5 checks passed
@tshortli tshortli deleted the downgrade-more-available-than-enclosing-for-different-domain branch January 23, 2025 16:27
tshortli added a commit to tshortli/swift that referenced this pull request Feb 3, 2025
When diagnosing a declaration that is more available than its context, to
preserve source compatibility we need to downgrade the diagnostic to a warning
when the outermost declaration is an extension. This logic regressed with
swiftlang#77950 and my earlier attempt to fix
this (swiftlang#78832) misidentified what had
regressed.

Really resolves rdar://143423070.
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