Files
kotlin-fork/compiler/testData/codegen/box/bridges/fakeOverrideWithSynthesizedImplementation.kt
T
Alexander Udalov 478766815d Consider all real functions, not only declarations in bridge codegen
There should be bridges to all of the functions present in bytecode
2014-04-11 21:57:45 +04:00

15 lines
291 B
Kotlin

open data class A(val value: String)
trait B {
fun component1(): Any
}
class C(value: String) : A(value), B
fun box(): String {
val c = C("OK")
if ((c : B).component1() != "OK") return "Fail 1"
if ((c : A).component1() != "OK") return "Fail 2"
return c.component1()
}