Files
kotlin-fork/compiler/testData/diagnostics/tests/delegatedProperty/inference/extensionProperty.kt
T
Dmitriy Novozhilov e83941a98e [NI] Don't resolve delegates twice
#KT-31219 Fixed
#KT-31679 Fixed
#KT-32249 Fixed
2019-12-26 10:54:06 +03:00

23 lines
560 B
Kotlin
Vendored

// !WITH_NEW_INFERENCE
package foo
import kotlin.reflect.KProperty
open class A {
val B.w: Int by <!NI;DELEGATE_SPECIAL_FUNCTION_NONE_APPLICABLE!><!OI;TYPE_INFERENCE_UPPER_BOUND_VIOLATED!>MyProperty<!>()<!>
}
val B.r: Int by <!NI;DELEGATE_SPECIAL_FUNCTION_NONE_APPLICABLE!><!OI;TYPE_INFERENCE_UPPER_BOUND_VIOLATED!>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")
}
}