Files
kotlin/compiler/testData/codegen/functions/defaultargs7.kt
2012-08-06 16:32:36 +04:00

6 lines
148 B
Kotlin

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"