[IR] Consider extension receivers during expect functions actualization

^KT-56199 Fixed
This commit is contained in:
Ivan Kochurkin
2023-01-27 16:54:05 +01:00
committed by Space Team
parent 0f9107c153
commit c89770c450
6 changed files with 67 additions and 2 deletions
@@ -0,0 +1,22 @@
// TARGET_BACKEND: JVM
// !LANGUAGE: +MultiPlatformProjects
// MODULE: common
// TARGET_PLATFORM: Common
// FILE: common.kt
expect fun <T> Array<T>.getChecked(index: Int): T
expect fun BooleanArray.getChecked(index: Int): Boolean
fun ok() = if (!BooleanArray(1).getChecked(0)) "OK" else "FAIL"
// MODULE: jvm()()(common)
// TARGET_PLATFORM: JVM
// FILE: main.kt
actual fun <T> Array<T>.getChecked(index: Int) = get(index)
actual fun BooleanArray.getChecked(index: Int) = get(index)
fun box() = ok()