Skip to content

SIL: Ignore AEIC on package declaration inside declarations without effective public access #73708

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

aschwaighofer
Copy link
Contributor

Quoting Slava:

"The AST-level access is allowed to be 'more public'. I honestly don't know why, but it's always worked this way and the 'lowered' access levels must always intersect the access levels of the parents but with @UIC, @aeic and @inlinable, that means just ignoring those attributes if some enclosing context is not @UIC"

rdar://128270848

…ffective public access

Quoting Slava:

"The AST-level access is allowed to be 'more public'. I honestly don't
know why, but it's always worked this way and the 'lowered' access
levels must always intersect the access levels of the parents but with
@UIC, @aeic and @inlinable, that means just ignoring those attributes if
some enclosing context is not @UIC"

rdar://128270848
@aschwaighofer
Copy link
Contributor Author

@swift-ci test

@aschwaighofer aschwaighofer requested a review from slavapestov May 17, 2024 15:40
@nkcsgexi
Copy link
Contributor

Shouldn't we diagnose the no-opness of AEIC at the AST level?

@aschwaighofer
Copy link
Contributor Author

No, apparently (and surprisingly) this is “expected” behavior. See Slava’s quote.

@aschwaighofer
Copy link
Contributor Author

The change here is to mirror the existing behavior of internal in the case of package accces.

@aschwaighofer aschwaighofer merged commit 2318b47 into swiftlang:main May 21, 2024
5 checks passed
@elsh elsh mentioned this pull request May 29, 2024
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