KT-15030 Remove redundant calls of conversion methods: false positive for 'toList()'

#KT-15030 Fixed
This commit is contained in:
shiraji
2016-12-05 22:27:10 +09:00
committed by Mikhail Glukhikh
parent 268702e0cc
commit 2815b5e62b
19 changed files with 5 additions and 116 deletions
@@ -1,2 +0,0 @@
// WITH_RUNTIME
val foo = listOf(1, 2, 3).toList()<caret>
@@ -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>
@@ -1,2 +0,0 @@
// WITH_RUNTIME
val foo = listOf(1, 2, 3).map(Int::toString)
@@ -1,2 +0,0 @@
// WITH_RUNTIME
val foo = mutableListOf(1, 2, 3).toMutableList()<caret>
@@ -1,2 +0,0 @@
// WITH_RUNTIME
val foo = mutableListOf(1, 2, 3)
@@ -1,2 +0,0 @@
// WITH_RUNTIME
val foo = mutableSetOf(1, 2, 3).toMutableSet()<caret>
@@ -1,2 +0,0 @@
// WITH_RUNTIME
val foo = mutableSetOf(1, 2, 3)
@@ -1,5 +0,0 @@
// WITH_RUNTIME
// IS_APPLICABLE: false
import java.util.Collections
val foo = Collections.unmodifiableList(listOf(1)).toMutableList()<caret>
@@ -1,8 +0,0 @@
// WITH_RUNTIME
import java.util.SortedMap
fun test() {
val foo: SortedMap<String, String>? = null
foo?.toSortedMap()<caret>
}
@@ -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>
@@ -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>
@@ -1,3 +0,0 @@
// WITH_RUNTIME
// sortedSetOf returns TreeSet not SortedSet
val foo = sortedSetOf(1, 2, 3).toSortedSet()