When calling Java functions that have multiple par...
# language-proposals
a
When calling Java functions that have multiple parameteres eligible for SAM conversion, from Kotlin we can either pass lambdas for all those parameters or none of them. See for example https://stackoverflow.com/q/46542037/1916449 This makes sense, because otherwise Kotlin would have to generate 2^k synthetic functions for a Java function with k SAM-typed parameters. Instead it just generates the two extreme ones. Given the convention that if the last argument of a function is a lambda, you can place it after parentheses, wouldn't it make sense to also generate a special third synthetic variant, that accepts a lambda for the last argument if it's a SAM type?