Files
kotlin-fork/compiler/testData/codegen/customScript/providedPropsInLambda.kts
T
Ilya Chernikov 1bd6cc823c Fix provided properties access generation
The presense of accessors in the descriptor led to the wrong code
generation in some cases.
#KT-43176 fixed
2021-01-07 10:37:20 +01:00

11 lines
231 B
Kotlin
Vendored

// KOTLIN_SCRIPT_DEFINITION: org.jetbrains.kotlin.codegen.TestScriptWithSimpleEnvVars
// envVar: stringVar1=abracadabra
fun foo(body: () -> String): String = body()
val res = foo { stringVar1.drop(5) }
// expected: res=adabra