2b4424b564
Any access to a function from a multi-file part needs to be replaced with the access to the corresponding public method (if it exists) from the facade class. Note that this has no immediate effect because we use KotlinTypeMapper for mapping calls, and it understands that a call to a function from the part must actually be generated into a call to the function from the facade in the bytecode. This commit merely changes the IR to better reflect what's generated in the final bytecode, and to be able to use simplified IR-based method signature mapping instead of the legacy KotlinTypeMapper in the future.
16 lines
287 B
Kotlin
Vendored
16 lines
287 B
Kotlin
Vendored
// TARGET_BACKEND: JVM
|
|
// WITH_RUNTIME
|
|
// FILE: 1.kt
|
|
|
|
@file:JvmName("Facade")
|
|
@file:JvmMultifileClass
|
|
|
|
inline fun foo(o: String, k: String = "K", body: (String) -> String): String =
|
|
o + bar(body(k))
|
|
|
|
fun bar(x: String): String = x
|
|
|
|
// FILE: 2.kt
|
|
|
|
fun box(): String = foo("O") { it }
|