Add Java Arrays.asList, Set.of, List.of to ReplaceJavaStaticMethodWithKotlinAnalogInspection
Relates to #KT-27782 #KT-21641
This commit is contained in:
Vendored
+6
@@ -0,0 +1,6 @@
|
||||
// WITH_RUNTIME
|
||||
import java.util.Arrays
|
||||
|
||||
fun test() {
|
||||
val a = Arrays.<caret>asList(1, 3, null)
|
||||
}
|
||||
Vendored
+6
@@ -0,0 +1,6 @@
|
||||
// WITH_RUNTIME
|
||||
import java.util.Arrays
|
||||
|
||||
fun test() {
|
||||
val a = listOf(1, 3, null)
|
||||
}
|
||||
Vendored
+6
@@ -0,0 +1,6 @@
|
||||
// WITH_RUNTIME
|
||||
// MIN_JAVA_VERSION: 9
|
||||
|
||||
fun test() {
|
||||
val a = java.util.Set.of<caret><String>()
|
||||
}
|
||||
Vendored
+6
@@ -0,0 +1,6 @@
|
||||
// WITH_RUNTIME
|
||||
// MIN_JAVA_VERSION: 9
|
||||
|
||||
fun test() {
|
||||
val a = setOf<String>()
|
||||
}
|
||||
Vendored
+6
@@ -0,0 +1,6 @@
|
||||
// WITH_RUNTIME
|
||||
// MIN_JAVA_VERSION: 9
|
||||
|
||||
fun test() {
|
||||
val a = java.util.Set.of<caret>("sfsf", 25)
|
||||
}
|
||||
Vendored
+6
@@ -0,0 +1,6 @@
|
||||
// WITH_RUNTIME
|
||||
// MIN_JAVA_VERSION: 9
|
||||
|
||||
fun test() {
|
||||
val a = setOf("sfsf", 25)
|
||||
}
|
||||
Reference in New Issue
Block a user