, but aside from that, intuitively this should work... weird.
m
Marc Knaup
02/02/2019, 6:15 PM
I guess
{ item1 -> println(item) }.someWrapper()
is evaluated first and then it's not clear what the lambda is supposed to take or return.
Because that's unknown
.someWrapper()
should also not resolve, but that's probably not indicated because it's a subsequent error, not the initial one.
Would
item
(item1) have a type then the result of the lambda can be inferred as
Unit
(from
println
with known parameter type) and then
.someWrapper()
should also work fine.
That everything is put into
addReceiver
in the end is probably not considered because that would require that the expression is evaluated in the completely opposite order (outside to inside).