KT 13962: Intention to replace Java collection constructor calls with function calls from stdlib (ArrayList() → arrayListOf())
This commit is contained in:
committed by
Mikhail Glukhikh
parent
bbeb65905e
commit
0e716fd528
@@ -0,0 +1 @@
|
||||
org.jetbrains.kotlin.idea.intentions.ConvertCollectionConstructorToFunction
|
||||
Vendored
+5
@@ -0,0 +1,5 @@
|
||||
// WITH_RUNTIME
|
||||
// IS_APPLICABLE: false
|
||||
fun foo() {
|
||||
var list: ArrayList<Int> = <caret>ArrayList(3)
|
||||
}
|
||||
+4
@@ -0,0 +1,4 @@
|
||||
// WITH_RUNTIME
|
||||
fun foo() {
|
||||
var list: ArrayList<Int> = <caret>ArrayList()
|
||||
}
|
||||
Vendored
+4
@@ -0,0 +1,4 @@
|
||||
// WITH_RUNTIME
|
||||
fun foo() {
|
||||
var list: ArrayList<Int> = arrayListOf()
|
||||
}
|
||||
Vendored
+4
@@ -0,0 +1,4 @@
|
||||
// WITH_RUNTIME
|
||||
fun foo() {
|
||||
var list = <caret>ArrayList<Int>()
|
||||
}
|
||||
+4
@@ -0,0 +1,4 @@
|
||||
// WITH_RUNTIME
|
||||
fun foo() {
|
||||
var list = arrayListOf<Int>()
|
||||
}
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
// WITH_RUNTIME
|
||||
import java.util.HashMap
|
||||
|
||||
fun foo() {
|
||||
var list: HashMap<Int, Int> = <caret>HashMap()
|
||||
}
|
||||
Vendored
+6
@@ -0,0 +1,6 @@
|
||||
// WITH_RUNTIME
|
||||
import java.util.HashMap
|
||||
|
||||
fun foo() {
|
||||
var list: HashMap<Int, Int> = hashMapOf()
|
||||
}
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
// WITH_RUNTIME
|
||||
import java.util.HashSet
|
||||
|
||||
fun foo() {
|
||||
var list: HashSet<Int> = <caret>HashSet()
|
||||
}
|
||||
Vendored
+6
@@ -0,0 +1,6 @@
|
||||
// WITH_RUNTIME
|
||||
import java.util.HashSet
|
||||
|
||||
fun foo() {
|
||||
var list: HashSet<Int> = hashSetOf()
|
||||
}
|
||||
Vendored
+7
@@ -0,0 +1,7 @@
|
||||
// WITH_RUNTIME
|
||||
|
||||
import java.util.LinkedHashSet
|
||||
|
||||
fun foo() {
|
||||
var list: LinkedHashSet<Int> = <caret>LinkedHashSet()
|
||||
}
|
||||
Vendored
+7
@@ -0,0 +1,7 @@
|
||||
// WITH_RUNTIME
|
||||
|
||||
import java.util.LinkedHashSet
|
||||
|
||||
fun foo() {
|
||||
var list: LinkedHashSet<Int> = linkedSetOf()
|
||||
}
|
||||
Reference in New Issue
Block a user