Skip to content

Instantly share code, notes, and snippets.

@shiraji
Created January 26, 2017 08:18
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 shiraji/32ef5645823efa4632f7c66d42ca2610 to your computer and use it in GitHub Desktop.
Save shiraji/32ef5645823efa4632f7c66d42ca2610 to your computer and use it in GitHub Desktop.
interface I {
fun foo()
}
object O : I {
override fun foo() {
println("Foo!!!")
}
}
class C : I by O
fun main(args: Array<String>) {
C().foo() // Foo!!!と表示される。
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment