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