Files
kotlin-fork/idea/jvm-debugger/jvm-debugger-test/testData/evaluation/singleBreakpoint/delegatedPropertyInOtherFile.kt
T
Yan Zhulanow 472ec72eb9 Refactor debugger tests
1. Move tests to their own module
2. Avoid sharing the 'tinyApp' project between tests
3. Clean up option directive handling
2019-10-08 19:13:56 +09:00

28 lines
534 B
Kotlin
Vendored

// FILE: delegatedPropertyInOtherFile.kt
package delegatedPropertyInOtherFile
import delegatedPropertyInOtherFileOther.*
fun main(a: Array<String>) {
val t = WithDelegate()
//Breakpoint!
t.a
}
// EXPRESSION: t.a
// RESULT: 12: I
// FILE: delegatedPropertyInOtherFile/delegatedPropertyInOtherFile2.kt
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
}