Skip to content
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

Use Formal Access To Compute Override Elision Check #32638

Merged
merged 1 commit into from
Jul 1, 2020

Conversation

CodaFi
Copy link
Contributor

@CodaFi CodaFi commented Jul 1, 2020

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 base
of 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 therefore
will be printed in the interface. We treat these declarations as
effectively public for the purpose of printing override.

Resolves rdar://64969741

The effective access of an overridden declaration is subject to
escalation by -enable-testing. When this is flag is enabled, an
interface containing an internal-overriding-public declaration will
still print `override`. This is because the effective access of the base
of 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 therefore
*will* be printed in the interface. We treat these declarations as
effectively public for the purpose of printing `override`.

Resolves rdar://64969741
@CodaFi
Copy link
Contributor Author

CodaFi commented Jul 1, 2020

@swift-ci test

@CodaFi
Copy link
Contributor Author

CodaFi commented Jul 1, 2020

@swift-ci test source compatibility

Copy link
Contributor

@nkcsgexi nkcsgexi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@CodaFi
Copy link
Contributor Author

CodaFi commented Jul 1, 2020

This pull request was closed.
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.

2 participants