[FIR-TEST] Add new testdata generated after changes in previous commit

This commit is contained in:
Dmitriy Novozhilov
2019-12-11 16:16:22 +03:00
parent e9c02a1cca
commit 2536fa0cd5
4578 changed files with 104067 additions and 1 deletions
@@ -0,0 +1,51 @@
// !DIAGNOSTICS: -UNUSED_EXPRESSION
import kotlin.reflect.KProperty
class UsefulClass(val param: Int = 2) {
operator fun getValue(instance: Any, property: KProperty<*>) : Int = 1
operator fun setValue(instance: Any, property: KProperty<*>, value: Int) {}
@Deprecated("message")
fun member() {}
}
@Deprecated("message")
fun Obsolete(param: Int = 1): UsefulClass = UsefulClass(param)
class Invocable {
@Deprecated("message")
operator fun invoke() {}
}
object InvocableHolder {
val invocable = Invocable()
}
fun invoker() {
val invocable = Invocable()
invocable()
InvocableHolder.invocable()
}
fun block() {
Obsolete()
Obsolete(2)
}
fun expression() = Obsolete()
fun reflection() = ::Obsolete
fun reflection2() = UsefulClass::member
class Initializer {
val x = Obsolete()
}
@Deprecated("does nothing good")
fun Any.doNothing() = this.toString() // "this" should not be marked as deprecated despite it referes to deprecated function
class Delegation {
val x by Obsolete()
var y by Obsolete()
}