mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-12 00:21:32 +00:00
Different bytecode can be generated for delegated property and for non-delegated one. Backend inspects DELEGATED_PROPERTY_CALL to understand the property type, and expects that this information had been already recorded into context. Frontend writes DELEGATED_PROPERTY_CALL into context during body resolve or type inference if type is not present. Either way in debugger context it may happen that the DELEGATED_PROPERTY_CALL won't be written into context. #KT-12678
12 lines
217 B
Kotlin
Vendored
12 lines
217 B
Kotlin
Vendored
package delegatedPropertyInOtherFileOther
|
|
|
|
import kotlin.reflect.KProperty
|
|
|
|
class WithDelegate {
|
|
val a: Int by Id(12)
|
|
}
|
|
|
|
class Id(val v: Int) {
|
|
operator fun getValue(o: Any, property: KProperty<*>): Int = v
|
|
}
|