[K2, MPP] Build expect-actual map for type parameters from functions
^KT-57181 Fixed
This commit is contained in:
committed by
Space Team
parent
3a60b30dae
commit
beaeb405d2
+27
@@ -0,0 +1,27 @@
|
||||
// IGNORE_BACKEND_K1: JS, JS_IR, JS_IR_ES6, NATIVE
|
||||
// !LANGUAGE: +MultiPlatformProjects
|
||||
|
||||
// MODULE: common
|
||||
// TARGET_PLATFORM: Common
|
||||
// FILE: common.kt
|
||||
|
||||
expect class A<B, C> {
|
||||
fun o(b: B): C
|
||||
}
|
||||
|
||||
expect val <D> D.k: D
|
||||
|
||||
fun k(): String {
|
||||
return "K".k
|
||||
}
|
||||
|
||||
// MODULE: platform()()(common)
|
||||
// FILE: platform.kt
|
||||
|
||||
actual class A<C, B> {
|
||||
actual fun o(b: C): B = "O" as B
|
||||
}
|
||||
|
||||
actual val <D> D.k: D get() = this as D
|
||||
|
||||
fun box() = A<Int, String>().o(42) + k()
|
||||
+2
-5
@@ -1,9 +1,6 @@
|
||||
// !LANGUAGE: +MultiPlatformProjects
|
||||
// IGNORE_BACKEND: WASM
|
||||
// IGNORE_BACKEND_K1: JVM, JVM_IR, JS, JS_IR, JS_IR_ES6, NATIVE
|
||||
// IGNORE_BACKEND_K2: JS_IR
|
||||
// KT-57181
|
||||
// IGNORE_BACKEND_K2: NATIVE
|
||||
// IGNORE_BACKEND_K1: JVM, JVM_IR, JS, JS_IR, JS_IR_ES6, NATIVE, WASM
|
||||
// ISSUE: KT-57181
|
||||
// WITH_STDLIB
|
||||
|
||||
// MODULE: common
|
||||
|
||||
Reference in New Issue
Block a user