Fix provided properties access generation

The presense of accessors in the descriptor led to the wrong code
generation in some cases.
#KT-43176 fixed
This commit is contained in:
Ilya Chernikov
2020-12-10 15:36:40 +01:00
parent ffdcda8914
commit 1bd6cc823c
4 changed files with 48 additions and 57 deletions
@@ -0,0 +1,10 @@
// 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