Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
// OverridenFromAnotherFile.kt
// Error: getAge() is not visible because is protected
val userAge = User().getAge()
// Error: getAge() is not visible because inherits the protected modifier
val moderatorAge = Moderator().getAge()
// getAge() is visible because the modifier is declared explicitly as public
val staffAge = Staff().getAge()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.