<Kotlin - Companion Object with Receiver Function>...
# stackoverflow
u
Kotlin - Companion Object with Receiver Function I guess it's an outright "NO", but here is my class class KotlinReceiverFunction { val multiplyBy = fun Int.(value: Int) = this*value companion object { fun printMultiplicationResult(a: Int, b: Int) = a.multiplyBy(b) // error } } My question - is Receiver Function only allowed within a specific scope i.e. same as Lambdas? Or, can I get to work somehow in a companion object? Regards