mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-08 08:31:26 +00:00
8 lines
141 B
Kotlin
Vendored
8 lines
141 B
Kotlin
Vendored
interface A {
|
|
fun foo(x: Int, y: Int = x + 20, z: Int = y * 2) = z
|
|
}
|
|
|
|
class B : A {}
|
|
|
|
fun box() = if (B().foo(1) == 42) "OK" else "Fail"
|