Is this type inference bug? `list` is `MutableLis...
# announcements
m
Is this type inference bug?
list
is
MutableList<Bucket>
r
No, it means
list
is a
var
, so it's ambiguous if it should be interpreted as
list = list.plus(bucket)
or
list.plusAsign(bucket)
https://kotlinlang.org/docs/reference/operator-overloading.html#assignments
If the corresponding binary function (i.e. plus() for plusAssign()) is available too, report error (ambiguity)
👍 1
m
thanks, I wasn't aware of special rules for
+=
operator