// 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 bindResource(id: Int): A = A() val image by bindResource(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 = 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 bindResource(id: Int): A = A() val image by bindResource(42) }