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(otherList: Set<Int>) {
|
||||
var list = emptySet<Int>()
|
||||
foo()
|
||||
bar()
|
||||
list <caret>+= otherList
|
||||
}
|
||||
|
||||
fun foo() {}
|
||||
fun bar() {}
|
||||
Reference in New Issue
Block a user