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
This commit is contained in:
committed by
Space Team
parent
f80ed4592d
commit
457837a255
+24
@@ -0,0 +1,24 @@
|
||||
// WITH_STDLIB
|
||||
// TARGET_BACKEND: JVM_IR
|
||||
// LANGUAGE: -MangleCallsToJavaMethodsWithValueClasses
|
||||
|
||||
// FILE: KotlinParent.kt
|
||||
|
||||
open class KotlinParent {
|
||||
fun foo(x: UInt) = x.toInt()
|
||||
}
|
||||
|
||||
// FILE: JavaChild.java
|
||||
|
||||
public class JavaChild extends KotlinParent {
|
||||
public int foo(int x) {
|
||||
return 42;
|
||||
}
|
||||
}
|
||||
|
||||
// FILE: box.kt
|
||||
|
||||
fun box(): String {
|
||||
if (JavaChild().foo(0.toUInt()) != 42) return "Fail"
|
||||
return "OK"
|
||||
}
|
||||
Reference in New Issue
Block a user