mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-08 15:53:19 +00:00
16 lines
261 B
Plaintext
16 lines
261 B
Plaintext
import java.util.ArrayList
|
|
|
|
trait Tr {
|
|
fun extra() : String = "_"
|
|
}
|
|
|
|
class N() : Tr {
|
|
override fun extra() : String = super<Tr>.extra() + super<Tr>.extra()
|
|
}
|
|
|
|
fun box(): String {
|
|
val n = N()
|
|
if (n.extra() == "__") return "OK"
|
|
return "fail";
|
|
}
|