Correct handling of explicit variable type
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
// WITH_RUNTIME
|
||||
// INTENTION_TEXT: "Replace with '+='"
|
||||
// IS_APPLICABLE_2: false
|
||||
import java.util.ArrayList
|
||||
|
||||
fun foo(map: Map<Int, String>) {
|
||||
val result: ArrayList<String> = ArrayList()
|
||||
<caret>for (s in map.values) {
|
||||
result.add(s)
|
||||
}
|
||||
}
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
// WITH_RUNTIME
|
||||
// INTENTION_TEXT: "Replace with '+='"
|
||||
// IS_APPLICABLE_2: false
|
||||
import java.util.ArrayList
|
||||
|
||||
fun foo(map: Map<Int, String>) {
|
||||
val result: ArrayList<String> = ArrayList()
|
||||
result += map.values
|
||||
}
|
||||
Reference in New Issue
Block a user