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
34 lines
597 B
Kotlin
Vendored
34 lines
597 B
Kotlin
Vendored
// WITH_STDLIB
|
|
// TARGET_BACKEND: JVM_IR
|
|
|
|
|
|
// FILE: KotlinInterface.kt
|
|
|
|
public interface KotlinInterface {
|
|
fun foo(x: UInt): Int
|
|
}
|
|
|
|
// FILE: JavaInterface.java
|
|
|
|
import kotlin.UInt;
|
|
|
|
public interface JavaInterface {
|
|
int foo(UInt x);
|
|
}
|
|
|
|
// FILE: JavaInterfaceChildOfKotlin.java
|
|
|
|
public interface JavaInterfaceChildOfKotlin extends KotlinInterface {}
|
|
|
|
// FILE: KotlinChild.kt
|
|
|
|
class KotlinChild : JavaInterface, JavaInterfaceChildOfKotlin {
|
|
override fun foo(x: UInt) = 42
|
|
}
|
|
|
|
// FILE: box.kt
|
|
|
|
fun box(): String {
|
|
if (KotlinChild().foo(0.toUInt()) != 42) return "Fail"
|
|
return "OK"
|
|
} |