diff --git a/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/lower/FunctionInlining.kt b/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/lower/FunctionInlining.kt index c20ce131513..6663e0bec3d 100644 --- a/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/lower/FunctionInlining.kt +++ b/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/lower/FunctionInlining.kt @@ -275,6 +275,11 @@ private class Inliner(val globalSubstituteMap: MutableMap Unit) = action(x) + +fun box(): String { + var x = 23 + foo(x) { + log += "$it;" + x++ + log += "$it;" + } + + if (log != "23;23;") return "fail1: $log" + if (x != 24) return "fail2: $x" + + return "OK" +} + +@Test fun runTest() { + println(box()) +} \ No newline at end of file