Skip to content

Instantly share code, notes, and snippets.

@Sottti
Last active December 15, 2018 09:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Sottti/9351b67fd43a233d0dc1fc7151aec8d5 to your computer and use it in GitHub Desktop.
Save Sottti/9351b67fd43a233d0dc1fc7151aec8d5 to your computer and use it in GitHub Desktop.
// 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