Dariusz Kuc
02/16/2022, 4:27 AMclass Foo(val bar: () -> Bar)
// or
class Foo(val bar: suspend () -> Bar)
how to check whether bar
is actually a lambda.
I was hoping that simple KProperty.returnType is Function<*>
would do the trick, sadly that returns false...ephemient
02/16/2022, 4:29 AMephemient
02/16/2022, 4:35 AMreturnType.isSubtypeOf(typeOf<Function<*>>())
Dariusz Kuc
02/16/2022, 4:40 AMDariusz Kuc
02/16/2022, 4:40 AM