Files
kotlin-fork/js/js.translator/testData/box/expression/function/namedArguments.kt
T
2018-04-19 13:17:28 +03:00

18 lines
327 B
Kotlin
Vendored

// IGNORE_BACKEND: JS_IR
// EXPECTED_REACHABLE_NODES: 1111
package foo
fun test(x: Int, y: Int) = y - x
fun box(): String {
if (test(1, 2) != 1) {
return "fail1"
}
if (test(x = 1, y = 2) != 1) {
return "fail2"
}
if (test(y = 2, x = 1) != 1) {
return "fail3"
}
return "OK"
}