How does Deprecated ReplaceWith work for Kotlin in intellij? : <p>I wrote this code:</p>

<pre><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&lt;String&gt;) {
    test1(3)
}
</code></pre>

<p>and for some reason when I press Alt+Enter and click "Replace with <code>test2</code>", the method <code>test1</code> disappears and doesn't get replaced, what am I doing wrong?</p>

<p><strong>Edit:</strong></p>

<p>It does work for classes though:</p>

<pre><code>@Deprecated("Old stuff", ReplaceWith("Test2"))
class Test1
class Test2

fun main(args: Array&lt;String&gt;) {
    val a = Test1()
}
</code></pre>
