Fix stepping for inline function inside while statement

This commit is contained in:
Natalia Ukhorskaya
2015-10-13 12:57:29 +03:00
parent 258790cc2f
commit cdcafb8199
4 changed files with 72 additions and 0 deletions
@@ -0,0 +1,36 @@
package stepOverWhileWithInline
fun main(args: Array<String>) {
//Breakpoint!
var prop = 0
// inline on last line of while
while(prop < 1) {
prop++
foo { test(1) }
}
// inline call inside while
while(prop < 2) {
foo { test(1) }
prop++
}
do {
prop++
foo { test(1) }
} while(prop < 3)
do {
foo { test(1) }
prop++
} while(prop < 4)
}
inline fun foo(f: () -> Int): Int {
val a = 1
return f()
}
fun test(i: Int) = i
// STEP_OVER: 41