Merge ReplaceJavaIntegerToStringWithMemberInspection and ReplaceJavaStaticMethodWithTopLevelFunctionInspection
Relates to #KT-12721
This commit is contained in:
+7
@@ -0,0 +1,7 @@
|
||||
// WITH_RUNTIME
|
||||
// PROBLEM: none
|
||||
// ERROR: None of the following functions can be called with the arguments supplied: <br>public open fun toString(i: Int): String! defined in java.lang.Integer<br>public open fun toString(i: Int, radix: Int): String! defined in java.lang.Integer
|
||||
|
||||
fun main() {
|
||||
println(Integer.toString(<caret>))
|
||||
}
|
||||
Vendored
+5
@@ -0,0 +1,5 @@
|
||||
// WITH_RUNTIME
|
||||
|
||||
fun foo() {
|
||||
val t = Integer.<caret>toString(5) + 7
|
||||
}
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
// WITH_RUNTIME
|
||||
|
||||
fun foo() {
|
||||
val t = 5.toString() + 7
|
||||
}
|
||||
Vendored
+6
@@ -0,0 +1,6 @@
|
||||
// WITH_RUNTIME
|
||||
|
||||
fun foo() {
|
||||
val b = listOf(42, 10)
|
||||
println(Integer<caret>.toString(b.first(), b.last()).let{it} + 1)
|
||||
}
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
// WITH_RUNTIME
|
||||
|
||||
fun foo() {
|
||||
val b = listOf(42, 10)
|
||||
println(b.first().toString(b.last()).let{it} + 1)
|
||||
}
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
// WITH_RUNTIME
|
||||
|
||||
fun foo() {
|
||||
Integer.<caret>toString(5)
|
||||
}
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
// WITH_RUNTIME
|
||||
|
||||
fun foo() {
|
||||
5.toString()
|
||||
}
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
// WITH_RUNTIME
|
||||
|
||||
fun foo() {
|
||||
val list = arrayListOf<Int>()
|
||||
list.add(5)
|
||||
Integer.<caret>toString(list[0])
|
||||
}
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
// WITH_RUNTIME
|
||||
|
||||
fun foo() {
|
||||
val list = arrayListOf<Int>()
|
||||
list.add(5)
|
||||
list[0].toString()
|
||||
}
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
// WITH_RUNTIME
|
||||
|
||||
fun foo() {
|
||||
var number = 5
|
||||
val numberString = Integer.<caret>toString(number)
|
||||
}
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
// WITH_RUNTIME
|
||||
|
||||
fun foo() {
|
||||
var number = 5
|
||||
val numberString = number.toString()
|
||||
}
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
// WITH_RUNTIME
|
||||
|
||||
fun foo() {
|
||||
var number = 5
|
||||
val numberString = Integer.<caret>toString(number, 2)
|
||||
}
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
// WITH_RUNTIME
|
||||
|
||||
fun foo() {
|
||||
var number = 5
|
||||
val numberString = number.toString(2)
|
||||
}
|
||||
Reference in New Issue
Block a user