is there a compiler plugin in kotlin that can warn or error when passing a lambda to a `Any`/`Object` ?
seems to hoppen now and then and always takes some time to figure out that someone used the wrong overload
or maybe a plugin for IDEA and AS ?
g
gildor
12/21/2020, 1:29 PM
Passing lambda to Any?
🤷♂️ 1
l
LeoColman
12/21/2020, 4:25 PM
I think they meant like
Copy code
foo( { x -> x + 1 } )
fun foo(any: Any) {}
LeoColman
12/21/2020, 4:25 PM
It doesn't look like you want to call foo with a function, or else you'd written it as a high-level function