Join Slack
Powered by
How do I type a lambda if they compiler is giving ...
# announcements
m
Michael
10/17/2019, 6:52 PM
How do I type a lambda if they compiler is giving me an “`Overload resolution ambiguity`” ? I’m doing a thing like
.processor { it }
where processor can take a
Function
or a Functional Interface.
Michael
10/17/2019, 6:57 PM
.procoessor( ItemProcessor { ... })
worked. 🙂
r
Ruckus
10/17/2019, 6:57 PM
Indeed. It's explained in the docs here:
https://kotlinlang.org/docs/reference/java-interop.html#sam-conversions
👍🏼 1
m
Michael
10/17/2019, 7:11 PM
SAM conversion is the term I couldn’t remember and was causing my search to fail. Thanks!
👍 1
Open in Slack
Previous
Next