Fixed inline call arguments evaluation + test
This commit is contained in:
committed by
Igor Chevdar
parent
cf5e6dac80
commit
295f71a29c
@@ -2096,6 +2096,11 @@ task inline_localFunctionInInitializerBlock(type: RunKonanTest) {
|
||||
source = "codegen/inline/localFunctionInInitializerBlock.kt"
|
||||
}
|
||||
|
||||
task inline_lambdaInDefaultValue(type: RunKonanTest) {
|
||||
goldValue = "OK\n"
|
||||
source = "codegen/inline/lambdaInDefaultValue.kt"
|
||||
}
|
||||
|
||||
task deserialized_inline0(type: RunKonanTest) {
|
||||
source = "serialization/deserialized_inline0.kt"
|
||||
}
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
package codegen.inline.lambdaInDefaultValue
|
||||
|
||||
import kotlin.test.*
|
||||
|
||||
inline fun inlineFun(param: String, lambda: (String) -> String = { it }): String {
|
||||
return lambda(param)
|
||||
}
|
||||
|
||||
fun box(): String {
|
||||
return inlineFun("OK")
|
||||
}
|
||||
|
||||
@Test fun runTest() {
|
||||
println(box())
|
||||
}
|
||||
Reference in New Issue
Block a user