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:
Toshiaki Kameyama
2018-02-19 09:56:28 +03:00
committed by Mikhail Glukhikh
parent bec28c8388
commit 7d6cb7805c
8 changed files with 113 additions and 27 deletions
@@ -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)
}