Files
kotlin/compiler/testData/codegen/box/defaultArguments/function/extentionFunctionWithOneDefArg.kt
2018-06-09 19:15:38 +03:00

10 lines
206 B
Kotlin
Vendored

// IGNORE_BACKEND: JS_IR
fun Int.foo(a: Int = 1, b: String): Int {
return a
}
fun box(): String {
if (1.foo(b = "b") != 1) return "fail"
if (1.foo(2, "b") != 2) return "fail"
return "OK"
}