Files
kotlin-fork/idea/testData/highlighter/deprecated/RangeTo.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

22 lines
394 B
Kotlin
Vendored

class MyClass {
val i = 1
}
@Deprecated("Use A instead") operator fun MyClass.rangeTo(i: MyClass): Iterable<Int> {
i.i
throw Exception()
}
fun test() {
val x1 = MyClass()
val x2 = MyClass()
for (i in x1<warning descr="[DEPRECATION] 'rangeTo(MyClass): Iterable<Int>' is deprecated. Use A instead">..</warning>x2) {
}
}
// NO_CHECK_INFOS
// NO_CHECK_WEAK_WARNINGS