Files
kotlin-fork/backend.native/tests/codegen/inline/inline26.kt
T
Konstantin Anisimov 53b243c9f8 1) Do not inline in function declared as "inline"
2) Evaluate all arguments except lambdas
2017-12-16 08:08:40 +03:00

14 lines
239 B
Kotlin

package codegen.inline.inline26
import kotlin.test.*
inline fun call(block1: () -> Unit, noinline block2: () -> Int): Int {
block1()
return block2()
}
@Test fun runTest() {
var x = 5
println(call({ x = 7 }, x::toInt))
}