Make ReplaceWith work for objects (KT-16211, KT-14929)
#KT-16211 Fixed
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
// "Replace with 'New'" "true"
|
||||
package some
|
||||
|
||||
object New {
|
||||
fun foo() {}
|
||||
}
|
||||
|
||||
@Deprecated("Use New", replaceWith = ReplaceWith("New"))
|
||||
object Old {
|
||||
fun foo() {}
|
||||
}
|
||||
|
||||
val test = <caret>Old.foo()
|
||||
@@ -0,0 +1,13 @@
|
||||
// "Replace with 'New'" "true"
|
||||
package some
|
||||
|
||||
object New {
|
||||
fun foo() {}
|
||||
}
|
||||
|
||||
@Deprecated("Use New", replaceWith = ReplaceWith("New"))
|
||||
object Old {
|
||||
fun foo() {}
|
||||
}
|
||||
|
||||
val test = <caret>New.foo()
|
||||
@@ -0,0 +1,13 @@
|
||||
// "Replace with 'New'" "true"
|
||||
package some
|
||||
|
||||
object New {
|
||||
fun foo() {}
|
||||
}
|
||||
|
||||
@Deprecated("Use New", replaceWith = ReplaceWith("New"))
|
||||
object Old {
|
||||
fun foo() {}
|
||||
}
|
||||
|
||||
val test = some.<caret>Old
|
||||
@@ -0,0 +1,13 @@
|
||||
// "Replace with 'New'" "true"
|
||||
package some
|
||||
|
||||
object New {
|
||||
fun foo() {}
|
||||
}
|
||||
|
||||
@Deprecated("Use New", replaceWith = ReplaceWith("New"))
|
||||
object Old {
|
||||
fun foo() {}
|
||||
}
|
||||
|
||||
val test = New
|
||||
@@ -0,0 +1,11 @@
|
||||
// "Replace with 'New'" "true"
|
||||
package ppp
|
||||
|
||||
object New
|
||||
|
||||
@Deprecated(message = "Deprecated, use New", replaceWith = ReplaceWith("New"))
|
||||
typealias Old = New
|
||||
|
||||
fun main(args: Array<String>) {
|
||||
val o = <caret>Old
|
||||
}
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
// "Replace with 'New'" "true"
|
||||
package ppp
|
||||
|
||||
object New
|
||||
|
||||
@Deprecated(message = "Deprecated, use New", replaceWith = ReplaceWith("New"))
|
||||
typealias Old = New
|
||||
|
||||
fun main(args: Array<String>) {
|
||||
val o = <caret>New
|
||||
}
|
||||
Reference in New Issue
Block a user