ReplaceWith intention could save generic type arguments
#KT-21195 Fixed
This commit is contained in:
Vendored
+11
@@ -0,0 +1,11 @@
|
||||
// "Replace with 'NewClass<T>'" "true"
|
||||
package ppp
|
||||
|
||||
@Deprecated("renamed", ReplaceWith("NewClass<T>"))
|
||||
class OldClass<T>
|
||||
|
||||
class NewClass<F>
|
||||
|
||||
fun foo() {
|
||||
<caret>OldClass<Int>()
|
||||
}
|
||||
Vendored
+11
@@ -0,0 +1,11 @@
|
||||
// "Replace with 'NewClass<T>'" "true"
|
||||
package ppp
|
||||
|
||||
@Deprecated("renamed", ReplaceWith("NewClass<T>"))
|
||||
class OldClass<T>
|
||||
|
||||
class NewClass<F>
|
||||
|
||||
fun foo() {
|
||||
<caret>NewClass<Int>()
|
||||
}
|
||||
Vendored
+11
@@ -0,0 +1,11 @@
|
||||
// "Replace with 'NewClass<Int>'" "true"
|
||||
package ppp
|
||||
|
||||
@Deprecated("", ReplaceWith("NewClass<Int>"))
|
||||
class OldClass<T, V>
|
||||
|
||||
class NewClass<F>
|
||||
|
||||
fun foo() {
|
||||
<caret>OldClass<Int, String>()
|
||||
}
|
||||
Vendored
+11
@@ -0,0 +1,11 @@
|
||||
// "Replace with 'NewClass<Int>'" "true"
|
||||
package ppp
|
||||
|
||||
@Deprecated("", ReplaceWith("NewClass<Int>"))
|
||||
class OldClass<T, V>
|
||||
|
||||
class NewClass<F>
|
||||
|
||||
fun foo() {
|
||||
<caret>NewClass<Int>()
|
||||
}
|
||||
Vendored
+11
@@ -0,0 +1,11 @@
|
||||
// "Replace with 'NewClass'" "true"
|
||||
package ppp
|
||||
|
||||
@Deprecated("", ReplaceWith("NewClass"))
|
||||
class OldClass<T, V>
|
||||
|
||||
class NewClass
|
||||
|
||||
fun foo() {
|
||||
<caret>OldClass<Int, String>()
|
||||
}
|
||||
Vendored
+11
@@ -0,0 +1,11 @@
|
||||
// "Replace with 'NewClass'" "true"
|
||||
package ppp
|
||||
|
||||
@Deprecated("", ReplaceWith("NewClass"))
|
||||
class OldClass<T, V>
|
||||
|
||||
class NewClass
|
||||
|
||||
fun foo() {
|
||||
<caret>NewClass()
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
// "Replace with 'B<N>'" "true"
|
||||
// WITH_RUNTIME
|
||||
|
||||
@Deprecated(message = "renamed", replaceWith = ReplaceWith("B<N>"))
|
||||
typealias A<E> = List<E>
|
||||
|
||||
abstract class B<T> : List<T>
|
||||
class F<G>
|
||||
|
||||
fun test() {
|
||||
var x: <caret>A<F<Int>>
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
// "Replace with 'B<N>'" "true"
|
||||
// WITH_RUNTIME
|
||||
|
||||
@Deprecated(message = "renamed", replaceWith = ReplaceWith("B<N>"))
|
||||
typealias A<E> = List<E>
|
||||
|
||||
abstract class B<T> : List<T>
|
||||
class F<G>
|
||||
|
||||
fun test() {
|
||||
var x: <caret>B<F<Int>>
|
||||
}
|
||||
+10
@@ -0,0 +1,10 @@
|
||||
// "Replace with 'B<Int>'" "true"
|
||||
|
||||
@Deprecated("", ReplaceWith("B<Int>"))
|
||||
class C<T, F>
|
||||
|
||||
class B<T>
|
||||
|
||||
fun foo() {
|
||||
var c: <caret>C<Int, String>
|
||||
}
|
||||
+10
@@ -0,0 +1,10 @@
|
||||
// "Replace with 'B<Int>'" "true"
|
||||
|
||||
@Deprecated("", ReplaceWith("B<Int>"))
|
||||
class C<T, F>
|
||||
|
||||
class B<T>
|
||||
|
||||
fun foo() {
|
||||
var c: <caret>B<Int>
|
||||
}
|
||||
+10
@@ -0,0 +1,10 @@
|
||||
// "Replace with 'B'" "true"
|
||||
|
||||
@Deprecated("", ReplaceWith("B"))
|
||||
class C<T, F>
|
||||
|
||||
class B
|
||||
|
||||
fun foo() {
|
||||
var c: <caret>C<Int, String>
|
||||
}
|
||||
+10
@@ -0,0 +1,10 @@
|
||||
// "Replace with 'B'" "true"
|
||||
|
||||
@Deprecated("", ReplaceWith("B"))
|
||||
class C<T, F>
|
||||
|
||||
class B
|
||||
|
||||
fun foo() {
|
||||
var c: <caret>B
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
// "Replace with 'B<E>'" "true"
|
||||
// WITH_RUNTIME
|
||||
|
||||
@Deprecated(message = "renamed", replaceWith = ReplaceWith("B<E>"))
|
||||
typealias A<E> = List<E>
|
||||
|
||||
typealias B<E> = List<E>
|
||||
|
||||
val x: <caret>A<String> = emptyList()
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
// "Replace with 'B<E>'" "true"
|
||||
// WITH_RUNTIME
|
||||
|
||||
@Deprecated(message = "renamed", replaceWith = ReplaceWith("B<E>"))
|
||||
typealias A<E> = List<E>
|
||||
|
||||
typealias B<E> = List<E>
|
||||
|
||||
val x: B<String> = emptyList()
|
||||
Reference in New Issue
Block a user