Files
kotlin-fork/compiler/testData/diagnostics/tests/UnusedParameters.fir.kt
T
Dmitrii Gridin 9a4a3d1f49 [LL FIR] introduce test with reversed resolve order
^KT-56543

Merge-request: KT-MR-9299
Merged-by: Dmitrii Gridin <dmitry.gridin@jetbrains.com>
2023-03-22 17:34:07 +00:00

46 lines
835 B
Kotlin
Vendored

// IGNORE_REVERSED_RESOLVE
// !DIAGNOSTICS: +UNUSED_PARAMETER
import kotlin.reflect.KProperty
class C(a: Int, b: Int, c: Int, d: Int, e: Int = d, val f: String) {
init {
a + a
}
val g = b
init {
c + c
}
}
fun f(a: Int, b: Int, c: Int = b) {
a + a
}
fun Any.getValue(thisRef: Any?, prop: KProperty<*>): String = ":)"
fun Any.setValue(thisRef: Any?, prop: KProperty<*>, value: String) {
}
fun Any.provideDelegate(thisRef: Any?, prop: KProperty<*>) {
}
operator fun Int.getValue(thisRef: Any?, prop: KProperty<*>): String = ":)"
operator fun Int.setValue(thisRef: Any?, prop: KProperty<*>, value: String) {
}
operator fun Int.provideDelegate(thisRef: Any?, prop: KProperty<*>) {
}
fun get(p: Any) {
}
fun set(p: Any) {
}
fun foo(s: String) {
s.<!UNRESOLVED_REFERENCE!>xxx<!> = 1
}