JVM IR: Mangle interface implementation methods in inline classes

This commit is contained in:
Steven Schäfer
2020-03-11 11:50:34 +01:00
committed by Alexander Udalov
parent d21be3b665
commit 6a1e35389c
6 changed files with 48 additions and 15 deletions

View File

@@ -0,0 +1,18 @@
// !LANGUAGE: +InlineClasses
interface A<T> {
fun foo(a: T): String
}
inline class Foo(val x: Long) : A<Foo> {
override fun foo(a: Foo): String = if (x != a.x) "OK" else "FAIL"
}
fun box(): String {
return Foo(0L).foo(Foo(1L))
}
// 1 public foo-GWb7d6U\(J\)Ljava/lang/String;
// 1 public synthetic bridge foo\(Ljava/lang/Object;\)Ljava/lang/String;
// 1 public static foo-GWb7d6U\(JJ\)Ljava/lang/String;
// 0 foo\(J