I want to check the lateinit propery initialized or not inside an extension method. I want to execute simple function call to lateinit property safely inside an extenstion method.
I can use this::property.isInitialized
.
Want to write some extension like:
fun <T> T?.executeSafety(func: T.() -> (Unit)) { this?.func() }
Then we can easily execute simple methods on lateinit property. Please help on this