[FIR] Update return type of delegated callables in ReturnTypeCalculator

^KT-54654 Fixed
This commit is contained in:
Dmitriy Novozhilov
2022-10-24 18:10:51 +03:00
committed by Space Team
parent f441151eab
commit 027b1f861c
4 changed files with 39 additions and 1 deletions
+22
View File
@@ -0,0 +1,22 @@
// TARGET_BACKEND: JVM_IR
// ISSUE: KT-54654
fun accessProperty(b: B) = b.property
fun accessFunction(b: B) = b.function()
fun getString_1(): String = "O"
fun getString_2(): String = "K"
interface A {
val property get() = getString_1()
fun function() = getString_2()
}
class B(val a: A) : A by a
class C : A
fun box(): String {
val b = B(C())
return accessProperty(b) + accessFunction(b)
}