[FE 1.0] Always create return value for CallInstruction

This fixes missing `USED_AS_EXPRESSION` recordings
^KT-47527 Fixed
This commit is contained in:
Dmitriy Novozhilov
2021-06-30 16:40:55 +03:00
committed by TeamCityServer
parent b2372ff0b9
commit ae608ea67f
50 changed files with 496 additions and 204 deletions
+14
View File
@@ -0,0 +1,14 @@
// ISSUE: KT-47527
// WITH_STDLIB
fun test_1(value: Any?): String? = value?.let { return "O" }
fun test_2(value: Any?): String? = run {
value?.let { return "K" }
}
fun box(): String {
var result = ""
result += test_1(1) ?: return "fail 1"
result += test_2(1) ?: return "fail 2"
return result
}