Skip to content

Conversation

j-hui
Copy link
Contributor

@j-hui j-hui commented Sep 25, 2025

This patch relaxes the access check for members of imported inherited nested enums. Without it, those members become impossible to inherit, which largely defeats the purpose of importing them in the first place.

rdar://160803362

…parent

This patch relaxes the access check for members of imported inherited
nested enums. Without it, those members become impossible to inherit,
which largely defeats the purpose of importing them in the first place.

rdar://160803362
@j-hui
Copy link
Contributor Author

j-hui commented Sep 25, 2025

@swift-ci please test

@j-hui
Copy link
Contributor Author

j-hui commented Sep 26, 2025

@swift-ci please test


AccessInversionTestSuite.test("usePrivateEnum") {
let e = Leaky.AliasToPrivateEnum(rawValue: 0)!
let e = Leaky.AliasToPrivateEnum(rawValue: 0)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm not actually sure why this changed/had to be written like this before. But this seems like the right behavior to me, since the initializer does not return an optional.

Copy link
Contributor

@egorzhdan egorzhdan left a comment

Choose a reason for hiding this comment

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

LGTM, this seems like a path of the least resistance

@hnrklssn hnrklssn requested a review from yln September 26, 2025 20:39
@j-hui
Copy link
Contributor Author

j-hui commented Sep 26, 2025

@swift-ci please test

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.

3 participants