1ee827bfc8
#KT-28049 Fixed
51 lines
841 B
Plaintext
Vendored
51 lines
841 B
Plaintext
Vendored
// FILE: first.before.kt
|
|
// "Import" "true"
|
|
// ERROR: Type 'A' has no method 'getValue(MyUI, KProperty<*>)' and thus it cannot serve as a delegate
|
|
|
|
package bs
|
|
|
|
import some.A
|
|
|
|
class MyUI {
|
|
fun <T> bindResource(id: Int): A = A()
|
|
|
|
val image by <caret>bindResource<Int>(42)
|
|
}
|
|
|
|
|
|
|
|
// FILE: second.kt
|
|
package some
|
|
|
|
import bs.MyUI
|
|
import kotlin.properties.ReadOnlyProperty
|
|
import kotlin.reflect.KProperty
|
|
|
|
class A
|
|
|
|
operator fun A.provideDelegate(
|
|
thisRef: MyUI,
|
|
prop: KProperty<*>
|
|
): ReadOnlyProperty<MyUI, A> = TODO()
|
|
|
|
|
|
|
|
|
|
// FILE: first.after.kt
|
|
// "Import" "true"
|
|
// ERROR: Type 'A' has no method 'getValue(MyUI, KProperty<*>)' and thus it cannot serve as a delegate
|
|
|
|
package bs
|
|
|
|
import some.A
|
|
import some.provideDelegate
|
|
|
|
class MyUI {
|
|
fun <T> bindResource(id: Int): A = A()
|
|
|
|
val image by <caret>bindResource<Int>(42)
|
|
}
|
|
|
|
|
|
|