breandan
01/05/2019, 3:57 AMKotlin should automatically choose lambda expressions with a single argument over multiple arguments for the implicit case. You should not need to specify an explicit lambda signature in order to usehttps://github.com/kotlintest/kotlintest/pull/506#issuecomment-451624300when competing overloads all have higher arity.it
Andreas Sinz
01/05/2019, 9:34 AMbreandan
01/06/2019, 5:39 PMit
, otherwise the language should prefer to use the function type with the fewest arguments.ilya.gorbunov
01/06/2019, 10:02 PMit
is used, the compiler would have to analyze a lot of code.
And analyzing lambda bodies before completing overload resolution can hit exponential complexity in case of nested lambdas.breandan
01/07/2019, 2:44 PMAndreas Sinz
01/07/2019, 5:40 PM