Debugger: support stepping over inline function

This commit is contained in:
Natalia Ukhorskaya
2015-08-26 21:18:17 +03:00
parent ff4d557eac
commit 73946050c1
16 changed files with 384 additions and 39 deletions
@@ -0,0 +1,50 @@
package stepOverInlinedLambda
fun main(args: Array<String>) {
val a = A()
//Breakpoint!
foo { test(1) }
foo {
test(2)
}
a.foo { test(3) }.foo { test(4) }
a.foo {
test(5)
}.foo {
test(6)
}
a.foo { test(7) }
.foo { test(8) }
foo({ test(9) }) { test(10) }
foo({ test(11) }) {
test(12)
}
foo({
test(13)
}, {
test(14)
})
val b = foo { test(1) }
}
inline fun foo(f: () -> Unit) {
f()
}
inline fun foo(f1: () -> Unit, f2: () -> Unit) {
f1()
f2()
}
class A {
inline fun foo(f: () -> Unit): A {
f()
return this
}
}
fun test(i: Int) = 1
// STEP_OVER: 11
@@ -0,0 +1,18 @@
package stepOverInlinedLambdaStdlib
fun main(args: Array<String>) {
//Breakpoint!
val a = listOf(1, 2, 3)
a.filter { it > 1 }
a.filter { it > 1 }.map { it * 2 }
a.filter {
it > 1
}.map {
it * 2
}
}
// TRACING_FILTERS_ENABLED: false
// STEP_OVER: 4