5e27d9b089
The JVM BE inlines calls to the underlying function in a $default stub verbatim, e.g., without renaming LVT entries or regenerating anonymous objects. This commit introduces the same behavior in the JVM IR BE. Fixes KT-36769.
30 lines
452 B
Kotlin
Vendored
30 lines
452 B
Kotlin
Vendored
|
|
// FILE: test.kt
|
|
inline fun foo(stringMaker: () -> String = { "OK" }): String {
|
|
return stringMaker()
|
|
}
|
|
|
|
inline fun foo2(stringMaker: () -> String = {
|
|
"OK"
|
|
// Comment
|
|
}): String {
|
|
return stringMaker()
|
|
}
|
|
|
|
fun box(): String {
|
|
foo()
|
|
foo2()
|
|
return "OK"
|
|
}
|
|
|
|
// LINENUMBERS
|
|
// test.kt:15 box
|
|
// test.kt:3 box
|
|
// test.kt:4 box
|
|
// test.kt:3 box
|
|
// test.kt:16 box
|
|
// test.kt:7 box
|
|
// test.kt:11 box
|
|
// test.kt:8 box
|
|
// test.kt:17 box
|