Files
kotlin-fork/compiler/testData/codegen/box/mixedNamedPosition/simple.kt
T
2020-02-14 17:53:28 +03:00

16 lines
368 B
Kotlin
Vendored

// !LANGUAGE: +NewInference +MixedNamedArgumentsInTheirOwnPosition
fun foo(
p1: Int,
p2: String,
p3: Double
) = "$p1 $p2 ${p3.toInt()}"
fun box(): String {
if (foo(p1 = 1, "2", 3.0) != "1 2 3") return "fail 1"
if (foo(1, "2", p3 = 3.0) != "1 2 3") return "fail 2"
if (foo(p1 = 1, p2 = "2", 3.0) != "1 2 3") return "fail 3"
return "OK"
}