ReplaceWith: don't keep class literal & callable reference in inlining

#KT-30197 Fixed
This commit is contained in:
Mikhail Glukhikh
2019-07-09 18:15:37 +03:00
parent 615aa265f5
commit 5afa5de1d7
4 changed files with 25 additions and 0 deletions
@@ -0,0 +1,9 @@
// "Replace with 'bar(y)'" "true"
@Deprecated("", replaceWith = ReplaceWith("bar(y)"))
fun foo(x: Any, y: Any, z: Any) {
}
fun bar(y: Any) {}
fun main() {
<caret>foo(4::class, 42::dec, ::bar)
}
@@ -0,0 +1,9 @@
// "Replace with 'bar(y)'" "true"
@Deprecated("", replaceWith = ReplaceWith("bar(y)"))
fun foo(x: Any, y: Any, z: Any) {
}
fun bar(y: Any) {}
fun main() {
bar(42::dec)
}