I wrote this code:
@Deprecated("Old stuff", ReplaceWith("test2"))
fun test1(i: Int) {
println("old Int = $i")
}
fun test2(i: Int) {
println("new Int = $i")
}
fun main(args: Array<String>) {
test1(3)
}
and for some reason when I press Alt+Enter and click "Replace with test2", the method test1 disappears and doesn't get replaced, what am I doing wrong?
Edit:
It does work for classes though:
@Deprecated("Old stuff", ReplaceWith("Test2"))
class Test1
class Test2
fun main(args: Array<String>) {
val a = Test1()
}