Interface delegate in object
Hello everyone, at my new workplace, I have encountered a lot of refactoring of the old code(java and kotlin).
In the course of work, I found that it would be convenient for me to use the following construction
interface Base {
val field1: String
}
class ImplGetter : Base {
override val field1: String
get() = ""
}
object Singleton : Base by instance {
lateinit var instance: Base
}
iam try call some’s like that in Application#onCreate method -...