IC Mangling: search parents for method if descriptor is fake override

Otherwise, the compiler generates call using old mangling scheme
because classfile does not contain the method.
This commit is contained in:
Ilmir Usmanov
2020-12-08 15:25:33 +01:00
parent e089e3606f
commit d8d30263d3
7 changed files with 52 additions and 4 deletions
@@ -0,0 +1,22 @@
// !LANGUAGE: +InlineClasses
// FILE: 1.kt
inline class IC(val s: String)
abstract class A {
fun foo(s: String) = IC(s)
}
open class C : A()
class D: C()
// FILE: 2.kt
fun box(): String {
var res = C().foo("OK").s
if (res != "OK") return "FAIL 1 $res"
res = D().foo("OK").s
return res
}