mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-08 15:53:19 +00:00
Dex ignores subsequent line numbers for same instructions and interprets instruction after inline as if they were inlined. This makes debugger behaves as if there's nowhere to stop on line with breakpoint. This also makes stepping through inline function consistent with non-inline analog. In both context debugger now stops on '}'. #KT-18949 Fixed #KT-17120 Fixed
27 lines
441 B
Kotlin
Vendored
27 lines
441 B
Kotlin
Vendored
fun test() {
|
|
val a = inlineFunInt { 1 }
|
|
val b = simpleFunInt { 1 }
|
|
val c = inlineFunVoid { val aa = 1 }
|
|
val d = simpleFunVoid { val aa = 1 }
|
|
}
|
|
|
|
inline fun inlineFunInt(f: () -> Int): Int {
|
|
val a = 1
|
|
return f()
|
|
}
|
|
|
|
inline fun inlineFunVoid(f: () -> Unit): Unit {
|
|
val a = 1
|
|
return f()
|
|
}
|
|
|
|
fun simpleFunInt(f: () -> Int): Int {
|
|
return f()
|
|
}
|
|
|
|
fun simpleFunVoid(f: () -> Unit): Unit {
|
|
return f()
|
|
}
|
|
|
|
// 7 NOP
|