Augmented list assignment inspection: add "replace with ordinary" fix

Relates to KT-20626
This commit is contained in:
Mikhail Glukhikh
2018-12-04 13:18:21 +03:00
parent ed8305995e
commit aa9e48b9b6
26 changed files with 80 additions and 35 deletions
@@ -0,0 +1,10 @@
// "Replace with ordinary assignment" "true"
// TOOL: org.jetbrains.kotlin.idea.inspections.SuspiciousCollectionReassignmentInspection
// ACTION: Replace overloaded operator with function call
// WITH_RUNTIME
fun test(otherList: List<Int>, flag: Boolean) {
var list = otherList
if (flag) {
list <caret>+= 4
}
}