Files
kotlin-fork/compiler/testData/codegen/box/traits/traitImplDelegationWithCovariantOverride.kt
T
Roman Artemev f3758771c9 Update tests
2019-01-25 17:17:16 +03:00

19 lines
258 B
Kotlin
Vendored

interface A {
fun foo(): Number {
return 42
}
}
interface B : A
class C : B {
override fun foo(): Int {
return super.foo() as Int
}
}
fun box(): String {
val x = C().foo()
return if (x == 42) "OK" else "Fail: $x"
}