Files
kotlin-fork/idea/testData/highlighter/deprecated/Class.kt
T
Alexander Udalov 34267e436e Merge two deprecation diagnostics into one DEPRECATION
This also fixes weird suppressions in user code: instead of
«@Suppress("DEPRECATED_SYMBOL_WITH_MESSAGE")» you should now use
«@Suppress("DEPRECATION")»
2015-10-13 01:44:45 +03:00

21 lines
797 B
Kotlin
Vendored

package test
import java.util.ArrayList
@Deprecated("Use A instead") open class MyClass {}
fun test() {
val a : <warning descr="[DEPRECATION] 'MyClass' is deprecated. Use A instead">MyClass</warning>? = null
val b = <warning descr="[DEPRECATION] 'MyClass' is deprecated. Use A instead">MyClass</warning>()
val c = ArrayList<<warning descr="[DEPRECATION] 'MyClass' is deprecated. Use A instead">MyClass</warning>>()
a == b && a == c
}
class Test(): <warning descr="[DEPRECATION] 'MyClass' is deprecated. Use A instead">MyClass</warning>() {}
class Test2(<warning descr="[UNUSED_PARAMETER] Parameter 'param' is never used">param</warning>: <warning descr="[DEPRECATION] 'MyClass' is deprecated. Use A instead">MyClass</warning>) {}
// NO_CHECK_INFOS
// NO_CHECK_WEAK_WARNINGS