Skip to content

Instantly share code, notes, and snippets.

@HugoMatilla
Last active May 17, 2018 13:33
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 HugoMatilla/bffdfeb16461ded9bc7873331e6eea31 to your computer and use it in GitHub Desktop.
Save HugoMatilla/bffdfeb16461ded9bc7873331e6eea31 to your computer and use it in GitHub Desktop.
open class Button {
open fun click() = print("Click")
fun doubleClick() = print("Double Click")
}
class SpecificButton() : Button { // Inheritance is now possible
override fun click() = print("Specific Click") // Now it works
override fun doubleClick() = print("Specific Double Click") // Error
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment