Quick question about type inference: ``` class Thi...
# announcements
r
Quick question about type inference:
Copy code
class Thing {
  var debugger: ((String) -> Unit)? = null
}
val receiver = StringBuilder()
val thing = Thing()
thing.debugger = receiver::appendln  // Fails
The marked line fails since it cannot figure out which overload of
println
to use. It doesn't work if I change
debugger
to accept
CharSequence
or
CharSequence?
either. Is this a bug or expected behaviour?