Files
kotlin/compiler/testData/codegen/bytecodeText/coercionToUnitOptimization/nopInlineFuns.kt
Dmitry Petrov 84e54124a2 More aggressive DCE should honor debugger invariants
- A LINENUMEBER node is "dead" if the corresponding instruction interval
 contains at least one "dead" bytecode instruction
 and no live bytecode instructions

- Observable local variable lifetimes should be taken into account
 when determining if a NOP is required for debugger.
2017-05-16 17:28:43 +03:00

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()
}
// 5 NOP