Fix presence of Deprecated hidden annotation for reference arguments

#KT-40234 Fixed
This commit is contained in:
Mikhail Zarechenskiy
2020-07-13 01:42:19 +03:00
parent c2e0cd60d7
commit 678b76cab1
16 changed files with 217 additions and 13 deletions
@@ -0,0 +1,23 @@
// !DIAGNOSTICS: -UNUSED_PARAMETER -UNUSED_EXPRESSION
object Scope {
fun foo(): Int = 0
object Nested {
@Deprecated("err", level = DeprecationLevel.HIDDEN)
fun foo(): String = ""
fun <T> take(f: () -> T): T = f()
fun test() {
val r1 = take(::foo)
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String")!>r1<!>
val r2 = ::foo
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.reflect.KFunction0<kotlin.String>")!>r2<!>
val r3 = foo()
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String")!>r3<!>
}
}
}