Add inspection: Java mutator method used on immutable Kotlin Collections
In particular, fill, reverse, shuffle, sort calls are reported So #KT-22011 Fixed
This commit is contained in:
committed by
Mikhail Glukhikh
parent
bec28c8388
commit
7d6cb7805c
@@ -0,0 +1,9 @@
|
||||
import java.util.Collections
|
||||
|
||||
fun test() {
|
||||
val immutableList = listOf(1, 2)
|
||||
Collections.reverse(immutableList)
|
||||
|
||||
val mutableList = mutableListOf(1)
|
||||
Collections.reverse(mutableList)
|
||||
}
|
||||
Reference in New Issue
Block a user