is there a compiler plugin in kotlin that can warn...
# announcements
n
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
Passing lambda to Any?
🤷‍♂️ 1
l
I think they meant like
Copy code
foo( { x -> x + 1 } )

fun foo(any: Any) {}
It doesn't look like you want to call foo with a function, or else you'd written it as a high-level function
n
and there is a few java apis that have
Object...
as last arguments