Handle expected type more precisely in RemoveExplicitTypeArguments

So #KT-17623 Fixed
This commit is contained in:
Mikhail Glukhikh
2017-05-26 14:54:20 +03:00
parent c67f8c07d2
commit 38d6c597a3
11 changed files with 113 additions and 14 deletions
@@ -3,7 +3,7 @@ class Foo {
fun method(b: Boolean,
elementComputable: Computable<String>,
processingContext: Any): WeighingComparable<String, ProximityLocation> {
return WeighingComparable(elementComputable, ProximityLocation(), Array<Weigher<*, *>>(0) { null!! })
return WeighingComparable(elementComputable, ProximityLocation(), Array(0) { null!! })
}
companion object {
@@ -3,5 +3,5 @@ import java.util.ArrayList
fun f() {
val v : List<Int> = listOf()
val copy1: List<Int> = ArrayList(<caret>v)
val copy2: = ArrayList(v)
val copy2 = ArrayList(v)
}
@@ -2,5 +2,5 @@ import java.util.ArrayList
fun f() {
val copy1: List<Int> = ArrayList(listOf())
val copy2: = ArrayList(listOf<Int>())
val copy2 = ArrayList(listOf<Int>())
}