457837a255
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
37 lines
679 B
Kotlin
Vendored
37 lines
679 B
Kotlin
Vendored
// WITH_STDLIB
|
|
// TARGET_BACKEND: JVM_IR
|
|
// LANGUAGE: +ValueClasses
|
|
|
|
// FILE: Point.kt
|
|
|
|
@JvmInline
|
|
value class Point(val x: Int, val y: Int)
|
|
|
|
// FILE: KotlinInterface.kt
|
|
|
|
public interface KotlinInterface {
|
|
fun foo(x: Point): Int
|
|
}
|
|
|
|
// FILE: JavaInterface.java
|
|
|
|
public interface JavaInterface {
|
|
int foo(Point x);
|
|
}
|
|
|
|
// FILE: JavaInterfaceChildOfKotlin.java
|
|
|
|
public interface JavaInterfaceChildOfKotlin extends KotlinInterface {}
|
|
|
|
// FILE: KotlinChild.kt
|
|
|
|
class KotlinChild : JavaInterface, JavaInterfaceChildOfKotlin {
|
|
override fun foo(x: Point) = 42
|
|
}
|
|
|
|
// FILE: box.kt
|
|
|
|
fun box(): String {
|
|
if (KotlinChild().foo(Point(0, 0)) != 42) return "Fail"
|
|
return "OK"
|
|
} |