12 lines
143 B
Plaintext
12 lines
143 B
Plaintext
interface T {
|
|
fun foo(): Int
|
|
}
|
|
|
|
interface U: T
|
|
|
|
fun test(t: T): Int {
|
|
val i = t.foo()
|
|
return if (t is U)
|
|
i + 1
|
|
else i
|
|
} |