[K2, MPP] Handle overloaded properties

^KT-57532 Fixed
This commit is contained in:
Ivan Kochurkin
2023-03-23 19:46:40 +01:00
committed by Space Team
parent 43dd8571d3
commit 9a09565cf6
4 changed files with 56 additions and 19 deletions
@@ -11,8 +11,18 @@ expect fun foo(s: S): S
expect fun foo(i: Int): Int
expect val Int.k: Int
expect val String.k: String
expect var Int.l: Int
expect var String.l: String
fun test(s: S) = foo(s)
fun k() = "K".k + "".l
// MODULE: platform()()(common)
// FILE: platform.kt
@@ -20,6 +30,18 @@ actual fun foo(i: Int) = i
actual fun foo(s: String) = s
actual val Int.k: Int get() = 42
actual val String.k: String get() = this
actual var Int.l: Int
get() = 48
set(value) {}
actual var String.l: String
get() = this
set(value) {}
actual typealias S = String
fun box() = test("OK")
fun box() = test("O") + k()