Add "Suspicious collection reassignment" inspection #KT-20626 Fixed
This commit is contained in:
+12
@@ -0,0 +1,12 @@
|
||||
// "Replace with assignment" "true"
|
||||
// TOOL: org.jetbrains.kotlin.idea.inspections.SuspiciousCollectionReassignmentInspection
|
||||
// WITH_RUNTIME
|
||||
fun test(otherMap: Map<Int, Int>) {
|
||||
var list = emptyMap<Int, Int>()
|
||||
foo()
|
||||
bar()
|
||||
list <caret>+= otherMap
|
||||
}
|
||||
|
||||
fun foo() {}
|
||||
fun bar() {}
|
||||
Reference in New Issue
Block a user