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

Evaluate 'static final Companion' visibility in the outer class to th… #59

Merged
merged 4 commits into from
Jun 7, 2021

Conversation

qwwdfsad
Copy link
Collaborator

@qwwdfsad qwwdfsad commented Jun 2, 2021

…e visibility of the companion class itself

Fixes #53

…e visibility of the companion class itself

Fixes #53
@qwwdfsad qwwdfsad requested a review from ilya-g June 2, 2021 16:47
@qwwdfsad qwwdfsad requested a review from ilya-g June 7, 2021 10:32

// Internal companion is not part of public API
// neither should be outer static final companion field
class Companion {
Copy link
Member

Choose a reason for hiding this comment

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

Since they share package with the other test declarations, better to name them more specifically, e.g. PublicClassInternalCompanion. Or does it named so to ensure that the object Companion name is not confused with the class Companion name?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

does it named so to ensure that the object Companion name is not confused with the class Companion name?

Right, dropped a comment, renamed non-relevant companions

src/test/kotlin/cases/internal/internal.txt Outdated Show resolved Hide resolved
@qwwdfsad qwwdfsad merged commit d5affe0 into master Jun 7, 2021
@qwwdfsad qwwdfsad deleted the internal-companions branch June 7, 2021 16:27
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.

The Companion field corresponding to an internal companion object is not part of the public API
2 participants