Implementing interface by delegation: creating delegates in class.

This commit is contained in:
Dmitry Petrov
2016-09-01 19:08:37 +03:00
committed by Dmitry Petrov
parent 264c8afc78
commit 2438876173
6 changed files with 105 additions and 11 deletions
@@ -0,0 +1,9 @@
interface IBase
object BaseImpl : IBase
interface IOther
fun otherImpl(): IOther = object : IOther {}
class Test1 : IBase by BaseImpl
class Test2 : IBase by BaseImpl, IOther by otherImpl()