Files
kotlin-fork/idea/jvm-debugger/jvm-debugger-test/testData/evaluation/singleBreakpoint/frame/delegatedPropertyInClassKotlinVariables.kt
T
2019-10-08 19:13:55 +09:00

31 lines
619 B
Kotlin
Vendored

package delegatedPropertyInClassKotlinVariables
import kotlin.properties.Delegates
import kotlin.reflect.KProperty
fun main(args: Array<String>) {
val a = A()
//Breakpoint!
args.size
}
class A {
val prop by MyDelegate()
val propEx by MyDelegateThrowsException()
}
class MyDelegate {
operator fun getValue(t: Any?, p: KProperty<*>): Int = 1
}
class MyDelegateThrowsException {
operator fun getValue(t: Any?, p: KProperty<*>): Int = throw IllegalStateException()
}
// SHOW_KOTLIN_VARIABLES
// PRINT_FRAME
// RENDER_DELEGATED_PROPERTIES
// SKIP: suppressedExceptions
// SKIP: stackTrace