No, this is not a bug. Using the += operation with a mutable list has two possible interpretations - either to append an item to the existing list or to create a new list by appending the new value to the old list and to store the reference to the new list in the variable. Because the compiler can’t choose how to interpret this, it reports an ambiguity error.