[IR] Consider extension receivers during expect functions actualization
^KT-56199 Fixed
This commit is contained in:
committed by
Space Team
parent
0f9107c153
commit
c89770c450
+22
@@ -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()
|
||||
Reference in New Issue
Block a user