Files
kotlin-fork/compiler/testData/compileKotlinAgainstKotlin/inlineClassFakeOverrideMangling.kt
T
Ilmir Usmanov d8d30263d3 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.
2020-12-09 07:34:29 +01:00

23 lines
314 B
Kotlin
Vendored

// !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
}