Replace deprecated symbol usage: fix message in case of generic parameter
#KT-8958 Fixed
This commit is contained in:
committed by
Mikhail Glukhikh
parent
e8e457a16c
commit
0fad3fafa8
@@ -1,4 +1,4 @@
|
||||
// "Replace with 'B<N>'" "true"
|
||||
// "Replace with 'B<F<Int>>'" "true"
|
||||
// WITH_RUNTIME
|
||||
|
||||
@Deprecated(message = "renamed", replaceWith = ReplaceWith("B<N>"))
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
// "Replace with 'B<N>'" "true"
|
||||
// "Replace with 'B<F<Int>>'" "true"
|
||||
// WITH_RUNTIME
|
||||
|
||||
@Deprecated(message = "renamed", replaceWith = ReplaceWith("B<N>"))
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
// "Replace with 'B<E>'" "true"
|
||||
// "Replace with 'B<String>'" "true"
|
||||
// WITH_RUNTIME
|
||||
|
||||
@Deprecated(message = "renamed", replaceWith = ReplaceWith("B<E>"))
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
// "Replace with 'B<E>'" "true"
|
||||
// "Replace with 'B<String>'" "true"
|
||||
// WITH_RUNTIME
|
||||
|
||||
@Deprecated(message = "renamed", replaceWith = ReplaceWith("B<E>"))
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
// "Replace with 'String::class'" "true"
|
||||
|
||||
@Deprecated("Use class literal", ReplaceWith("T::class"))
|
||||
fun <T> foo() {
|
||||
}
|
||||
|
||||
val x = <caret>foo<String>()
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
// "Replace with 'String::class'" "true"
|
||||
|
||||
@Deprecated("Use class literal", ReplaceWith("T::class"))
|
||||
fun <T> foo() {
|
||||
}
|
||||
|
||||
val x = String::class
|
||||
@@ -0,0 +1,8 @@
|
||||
// "Replace with 'Int::class.java'" "true"
|
||||
// WITH_RUNTIME
|
||||
|
||||
@Deprecated("Use class literal", ReplaceWith("T::class.java"))
|
||||
fun <T> foo() {
|
||||
}
|
||||
|
||||
val x = <caret>foo<Int>()
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
// "Replace with 'Int::class.java'" "true"
|
||||
// WITH_RUNTIME
|
||||
|
||||
@Deprecated("Use class literal", ReplaceWith("T::class.java"))
|
||||
fun <T> foo() {
|
||||
}
|
||||
|
||||
val x = Int::class.java
|
||||
+13
@@ -0,0 +1,13 @@
|
||||
// "Replace usages of 'old(): Unit' in whole project" "true"
|
||||
|
||||
@Deprecated("Use new", ReplaceWith("new<T>()"))
|
||||
fun <T> old() {
|
||||
}
|
||||
|
||||
fun <T> new() {
|
||||
}
|
||||
|
||||
fun main() {
|
||||
<caret>old<String>()
|
||||
old<Int>()
|
||||
}
|
||||
+13
@@ -0,0 +1,13 @@
|
||||
// "Replace usages of 'old(): Unit' in whole project" "true"
|
||||
|
||||
@Deprecated("Use new", ReplaceWith("new<T>()"))
|
||||
fun <T> old() {
|
||||
}
|
||||
|
||||
fun <T> new() {
|
||||
}
|
||||
|
||||
fun main() {
|
||||
new<String>()
|
||||
new<Int>()
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
// "Replace with 'New<String, Int>'" "true"
|
||||
|
||||
@Deprecated("Use New", replaceWith = ReplaceWith("New<T, U>"))
|
||||
class Old<T, U>
|
||||
|
||||
class New<T, U>
|
||||
|
||||
fun foo(): <caret>Old<String, Int>? = null
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
// "Replace with 'New<String, Int>'" "true"
|
||||
|
||||
@Deprecated("Use New", replaceWith = ReplaceWith("New<T, U>"))
|
||||
class Old<T, U>
|
||||
|
||||
class New<T, U>
|
||||
|
||||
fun foo(): New<String, Int>? = null
|
||||
Reference in New Issue
Block a user