Skip to content

Sema: Loosen the decl more available than enclosing diagnostic #78832

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

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