JVM IR: Fix value class mangling in SAM wrappers from different modules

KT-49659
This commit is contained in:
Steven Schäfer
2021-11-11 13:47:26 +01:00
committed by Alexander Udalov
parent 771b79d045
commit a6dae0b37b
12 changed files with 68 additions and 6 deletions
@@ -0,0 +1,20 @@
// See KT-49659
// WITH_RUNTIME
// MODULE: lib
// FILE: lib.kt
@Suppress("OPTIONAL_DECLARATION_USAGE_IN_NON_COMMON_SOURCE")
@kotlin.jvm.JvmInline
value class A(val value: String)
fun interface B {
fun f(a: A): String
}
// MODULE: main(lib)
// FILE: test.kt
fun get(b: B) = b.f(A("OK"))
fun box(): String {
val l = { a: A -> a.value }
return get(l)
}