groostav
08/08/2016, 6:18 PMval aStupidInstance = NullInstance() as AStupidInterface;
val usefulInstance = object: AStupidInterface by aStupidInstance {
override fun usefulMethod(intersting: Interesting): AnotherInteresting {
//...
}
}
worth noting, assuming performance isn't an issue, this becomes fairly trivial to do given the right semantics of dynamic
, if that ever makes it into the JVM side kotlin compiler.