mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-12 00:21:32 +00:00
15 lines
227 B
Plaintext
15 lines
227 B
Plaintext
import java.lang.Integer
|
|
|
|
open class C {
|
|
open fun f(): Any = "C f"
|
|
}
|
|
|
|
class D() : C() {
|
|
override fun f(): String = "D f"
|
|
}
|
|
|
|
fun box(): String{
|
|
val d : C = D()
|
|
if(d.f() != "D f") return "fail f"
|
|
return "OK"
|
|
} |