with

inline fun <SRV : Any> with(noinline instance: () -> SRV)
fun <SRV : Any, IMPL : SRV> with(srv: KClass<SRV>, instance: () -> IMPL)