CodeInliner: fix KNPE

#KT-22733 Fixed
#KT-36225 Fixed
#EA-206694 Fixed
This commit is contained in:
Dmitry Gridin
2020-04-03 13:04:27 +07:00
parent 12379cb91c
commit de1fa40c7e
7 changed files with 70 additions and 2 deletions
@@ -0,0 +1,19 @@
// "Replace with 'foo(list)'" "true"
// WITH_RUNTIME
class Builder<Base : Any> {
@Deprecated(message = "", level = DeprecationLevel.WARNING, replaceWith = ReplaceWith("foo(list)"))
inline fun <reified T: Base> addFoo(list: List<T>) {
}
inline fun <reified T: Base> foo(list: List<T>) {
}
}
fun test() {
val b = Builder<Number>()
b.<caret>addFoo(listOf(1))
}
@@ -0,0 +1,19 @@
// "Replace with 'foo(list)'" "true"
// WITH_RUNTIME
class Builder<Base : Any> {
@Deprecated(message = "", level = DeprecationLevel.WARNING, replaceWith = ReplaceWith("foo(list)"))
inline fun <reified T: Base> addFoo(list: List<T>) {
}
inline fun <reified T: Base> foo(list: List<T>) {
}
}
fun test() {
val b = Builder<Number>()
b.<caret>foo(listOf(1))
}