dave08
02/01/2023, 11:52 AMfun interface Foo { ... }
// this works:
data class Baz(val foo: Foo)
val baz = Baz({ ... })
// whereas this doesn't...
fun baz(foo: Foo = { ... })
// it needs to be:
fun baz(foo: Foo = Foo { })
why doesn't the compiler infer Foo as the lambda type in a default value of a function declaration?Sam
02/01/2023, 1:04 PMdave08
02/01/2023, 1:28 PMSam
02/01/2023, 1:53 PM+SamConversionPerArgument
that is enabled by default, but again, no documentation 😞