Files
kotlin-fork/compiler/testData/codegen/box/bridges/fakeOverrideWithSynthesizedImplementation.kt
T
2015-10-07 15:13:14 +03:00

17 lines
323 B
Kotlin
Vendored

open class A(val value: String) {
fun component1() = value
}
interface 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()
}