Files
kotlin-fork/compiler/testData/diagnostics/tests/delegatedProperty/inference/extensionProperty.fir.kt
T
Denis.Zharkov 2ecba6ac39 Remove WITH_NEW_INFERENCE directive from all tests
This directive anyway does not make test run twice with OI, and with NI
It only once run the test with specific settings (// LANGUAGE)
and ignores irrelevant (OI or NI tags)
2021-05-25 13:28:26 +03:00

22 lines
441 B
Kotlin
Vendored

package foo
import kotlin.reflect.KProperty
open class A {
val B.w: Int by <!DELEGATE_SPECIAL_FUNCTION_NONE_APPLICABLE!>MyProperty()<!>
}
val B.r: Int by <!DELEGATE_SPECIAL_FUNCTION_NONE_APPLICABLE!>MyProperty()<!>
val A.e: Int by MyProperty()
class B {
val A.f: Int by MyProperty()
}
class MyProperty<R : A, T> {
operator fun getValue(thisRef: R, desc: KProperty<*>): T {
throw Exception("$thisRef $desc")
}
}