[FIR] Update return type of delegated callables in ReturnTypeCalculator
^KT-54654 Fixed
This commit is contained in:
committed by
Space Team
parent
f441151eab
commit
027b1f861c
@@ -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)
|
||||
}
|
||||
Reference in New Issue
Block a user