Files
Denis.Zharkov 033ff38fef K2: Adjust diagnostic test data after delegate inference is rewritten
In all tests, some red-code diagnostics have changed insignificantly
to some other combination or red-code diagnostics

^KT-61060 Related
2023-09-08 07:11:48 +00:00

22 lines
539 B
Kotlin
Vendored

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