Skip to content

Instantly share code, notes, and snippets.

@Sottti
Last active December 3, 2018 07:20
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/a79667b6d06bf337864b86906ff29e93 to your computer and use it in GitHub Desktop.
Save Sottti/a79667b6d06bf337864b86906ff29e93 to your computer and use it in GitHub Desktop.
// Public.kt file
// Visible everywhere
public const val numberThree = 3
// Visible everywhere
public open class User() {
// Visible to everyone with visibility on the User class
public val numberEight = numberThree.plus(5)
}
// Visible everywhere
public class Moderator() {
// numberEleven is visible to everyone with visibility on the Moderator class
// numberEight is visible because User is public and numberEight is public
public val numberEleven = numberThree + User2().numberEight
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment