library, and I found this case:
The read operation need a
BiConsumer
value, With Java we can send Setter method but in Kotlin throws compiler error.
Some Kotlin expert, can explain to me: Why I can't send the setter method directly and equivalent short-syntax for Kotlin.Method Signature:
// With Java:
wire.read("name").text(this, Data::setName) // Works
// With Kotlin:
wire.read("name").text(this) { obj, name -> obj.name = name } // Works
wire.read("name").text(this, this::setName) // Compile Error: Type mismatch.
wire.read("name").text(this, this::name) // Compile Error: Type mismatch.