Use Formal Access To Compute Override Elision Check #32638
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The effective access of an overridden declaration is subject to
escalation by -enable-testing. When this flag is enabled, an
interface containing an internal-overriding-public declaration will
still print
override
. This is because the effective access of the baseof the override is formally internal but effectively public.
Instead, use the formal access scope of the overridden declaration to
compute its access relative to the override. While I'm here, catch the
case where the base declaration is
@usableFromInline
and thereforewill be printed in the interface. We treat these declarations as
effectively public for the purpose of printing
override
.Resolves rdar://64969741