KT-15030 Remove redundant calls of conversion methods: false positive for 'toList()'
#KT-15030 Fixed
This commit is contained in:
committed by
Mikhail Glukhikh
parent
268702e0cc
commit
2815b5e62b
@@ -1,2 +0,0 @@
|
||||
// WITH_RUNTIME
|
||||
val foo = listOf(1, 2, 3).toList()<caret>
|
||||
-2
@@ -1,2 +0,0 @@
|
||||
// WITH_RUNTIME
|
||||
val foo = listOf(1, 2, 3)
|
||||
@@ -1,2 +0,0 @@
|
||||
// WITH_RUNTIME
|
||||
val foo = listOf(1, 2, 3).map(Int::toString).toList()<caret>
|
||||
-2
@@ -1,2 +0,0 @@
|
||||
// WITH_RUNTIME
|
||||
val foo = listOf(1, 2, 3).map(Int::toString)
|
||||
-2
@@ -1,2 +0,0 @@
|
||||
// WITH_RUNTIME
|
||||
val foo = mutableListOf(1, 2, 3).toMutableList()<caret>
|
||||
-2
@@ -1,2 +0,0 @@
|
||||
// WITH_RUNTIME
|
||||
val foo = mutableListOf(1, 2, 3)
|
||||
-2
@@ -1,2 +0,0 @@
|
||||
// WITH_RUNTIME
|
||||
val foo = mutableSetOf(1, 2, 3).toMutableSet()<caret>
|
||||
-2
@@ -1,2 +0,0 @@
|
||||
// WITH_RUNTIME
|
||||
val foo = mutableSetOf(1, 2, 3)
|
||||
-5
@@ -1,5 +0,0 @@
|
||||
// WITH_RUNTIME
|
||||
// IS_APPLICABLE: false
|
||||
import java.util.Collections
|
||||
|
||||
val foo = Collections.unmodifiableList(listOf(1)).toMutableList()<caret>
|
||||
-8
@@ -1,8 +0,0 @@
|
||||
// WITH_RUNTIME
|
||||
|
||||
import java.util.SortedMap
|
||||
|
||||
fun test() {
|
||||
val foo: SortedMap<String, String>? = null
|
||||
foo?.toSortedMap()<caret>
|
||||
}
|
||||
-8
@@ -1,8 +0,0 @@
|
||||
// WITH_RUNTIME
|
||||
|
||||
import java.util.SortedMap
|
||||
|
||||
fun test() {
|
||||
val foo: SortedMap<String, String>? = null
|
||||
foo
|
||||
}
|
||||
@@ -1,2 +0,0 @@
|
||||
// WITH_RUNTIME
|
||||
val foo = setOf(1, 2, 3).toSet()<caret>
|
||||
@@ -1,2 +0,0 @@
|
||||
// WITH_RUNTIME
|
||||
val foo = setOf(1, 2, 3)
|
||||
@@ -1,2 +0,0 @@
|
||||
// WITH_RUNTIME
|
||||
val foo = sortedMapOf(1 to 1).toSortedMap()<caret>
|
||||
-2
@@ -1,2 +0,0 @@
|
||||
// WITH_RUNTIME
|
||||
val foo = sortedMapOf(1 to 1)
|
||||
@@ -1,3 +0,0 @@
|
||||
// WITH_RUNTIME
|
||||
// sortedSetOf returns TreeSet not SortedSet
|
||||
val foo = sortedSetOf(1, 2, 3).toSortedSet().toSortedSet()<caret>
|
||||
-3
@@ -1,3 +0,0 @@
|
||||
// WITH_RUNTIME
|
||||
// sortedSetOf returns TreeSet not SortedSet
|
||||
val foo = sortedSetOf(1, 2, 3).toSortedSet()
|
||||
Reference in New Issue
Block a user