Add "Suspicious collection reassignment" inspection #KT-20626 Fixed
This commit is contained in:
+15
@@ -0,0 +1,15 @@
|
||||
// "Replace with assignment" "false"
|
||||
// TOOL: org.jetbrains.kotlin.idea.inspections.SuspiciousCollectionReassignmentInspection
|
||||
// ACTION: Change type to mutable
|
||||
// ACTION: Replace overloaded operator with function call
|
||||
// ACTION: Replace with ordinary assignment
|
||||
// WITH_RUNTIME
|
||||
fun test(otherList: List<Int>) {
|
||||
var list = listOf<Int>()
|
||||
foo(list)
|
||||
bar()
|
||||
list <caret>+= otherList
|
||||
}
|
||||
|
||||
fun foo(list: List<Int>) {}
|
||||
fun bar() {}
|
||||
Reference in New Issue
Block a user