Implement 'Skip simple getters' for debugger

This commit is contained in:
Natalia Ukhorskaya
2015-12-09 16:05:02 +03:00
parent b950bf0e6e
commit ea8de883ac
12 changed files with 283 additions and 72 deletions
@@ -0,0 +1,12 @@
package onGetter
fun main(args: Array<String>) {
val a = A(1)
// EXPRESSION: prop
// RESULT: 1: I
// STEP_INTO: 1
//Breakpoint!
a.prop
}
class A(val prop: Int)
@@ -0,0 +1,25 @@
package skipSimpleGetter
fun main(args: Array<String>) {
val a = A(1)
//Breakpoint!
a.a1 + a.a2 + a.a3 + a.a4
}
class A(val a4: Int) {
// only init
val a1 = 1
// simple get, expression body
val a2: Int = 1
get() = field
// simple get, block body
val a3: Int = 1
get() {
return field
}
}
// STEP_INTO: 21
// SKIP_GETTERS: true