Files
kotlin-fork/compiler/testData/codegen/box/inlineClasses/javaInterop/kt55945.kt
T
vladislav.grechko 457837a255 Fix function invocation mangling rule
Mangle invocations of functions with value classes in signature which
override (directly or indirectly) a method declared in Kotlin code.
Otherwise, NoSuchMethodError is being thrown.

^KT-55945: Fixed
2023-06-15 09:34:21 +00:00

22 lines
435 B
Kotlin
Vendored

// WITH_STDLIB
// TARGET_BACKEND: JVM_IR
// LANGUAGE: +MangleCallsToJavaMethodsWithValueClasses
// FILE: KotlinParent.kt
open class KotlinParent {
fun foo(type: InlineType) = 42
@JvmInline
value class InlineType(val id: Int)
}
// FILE: JavaChild.java
class JavaChild extends KotlinParent {}
// FILE: box.kt
fun box(): String {
if (JavaChild().foo(KotlinParent.InlineType(1)) != 42) return "Fail"
return "OK"
}