Skip to content

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

Merged
aschwaighofer merged 1 commit intoswiftlang:mainfrom
aschwaighofer:ignore_aeic_in_package_context_without_ufi
May 21, 2024
Merged

SIL: Ignore AEIC on package declaration inside declarations without effective public access#73708
aschwaighofer merged 1 commit intoswiftlang:mainfrom
aschwaighofer:ignore_aeic_in_package_context_without_ufi

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.

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