Reports augmented assignment (+=) expressions on read-only Collection.

Augment assignment (+=) expression on read-only Collection doesn't modify the target collection, it creates a new one under the hood which can be misleading and lead to performance issues.

Change type to mutable quick-fix can be used to amend the code automatically.

Example:


  fun test() {
      var list = listOf(0)
      list += 42 // new list is created, variable 'list' still contains only '0'
  }

After the quick-fix is applied:


  fun test() {
      val list = mutableListOf(0)
      list += 42
  }