25 lines
360 B
Kotlin
Vendored
25 lines
360 B
Kotlin
Vendored
interface I<T> {
|
|
<expr>fun i(t: T): Int</expr>
|
|
}
|
|
|
|
class C<T>(val x: Int): I<T> {
|
|
companion object {
|
|
val K: Int = 58
|
|
}
|
|
|
|
fun test(): Int {
|
|
return 45 * K
|
|
}
|
|
|
|
fun count(xs: List<T>): Int {
|
|
return xs.size
|
|
}
|
|
|
|
override fun i(t: T): Int {
|
|
return test() + t.hashCode()
|
|
}
|
|
|
|
inner class B() {
|
|
|
|
}
|
|
} |