blob: 587faa3758e74fe7ddac4dec00c64ebeb4f4f423 [file]
// See KT-64726
// FILE: test.kt
inline fun String.switchMapOnce(crossinline mapper: (String) -> String): String {
return { mapper(this) }.let { it() }
}
fun box() {
"O".switchMapOnce {
"K".switchMapOnce {
"OK"
} // Should be present
}
}
// EXPECTATIONS JVM
// test.kt:10 box
// test.kt:6 box
// fake.kt:1 box
// test.kt:6 box
// test.kt:6 invoke
// test.kt:12 invoke
// test.kt:6 invoke
// fake.kt:1 invoke
// test.kt:6 invoke
// test.kt:6 invoke
// test.kt:13 invoke
// test.kt:6 invoke
// test.kt:6 invoke
// test.kt:14 invoke
// test.kt:6 invoke
// test.kt:6 box
// test.kt:16 box
// EXPECTATIONS NATIVE
// test.kt:10 box
// test.kt:6 box
// test.kt:6 box
// test.kt:6 invoke
// test.kt:12 invoke
// test.kt:6 invoke
// test.kt:6 invoke
// test.kt:6 invoke
// test.kt:13 invoke
// test.kt:6 invoke
// test.kt:6 invoke
// test.kt:6 invoke
// test.kt:14 invoke
// test.kt:6 invoke
// test.kt:6 box
// test.kt:6 box
// test.kt:16 box
// EXPECTATIONS JS_IR
// test.kt:6 box
// test.kt:6 box
// test.kt:6 box$lambda$lambda
// test.kt:6 box$lambda$lambda
// test.kt:6 box$lambda$lambda$lambda
// test.kt:16 box
// EXPECTATIONS WASM
// test.kt:10 $box (4, 8)
// test.kt:6 $box (11, 28, 34)
// test.kt:6 $box$lambda.invoke (11, 20, 13)
// test.kt:12 $box$lambda.invoke (8, 12)
// test.kt:6 $box$lambda.invoke (11, 28, 34)
// test.kt:6 $box$lambda$lambda.invoke (11, 20, 13)
// test.kt:13 $box$lambda$lambda.invoke (12, 16)
// test.kt:6 $box$lambda$lambda.invoke (25)
// test.kt:6 $box$lambda.invoke (34, 38, 4)
// test.kt:14 $box$lambda.invoke (9)
// test.kt:6 $box$lambda.invoke (25)
// test.kt:6 $box (34, 38, 4)
// test.kt:16 $box (1)