JVM_IR KT-47984 add test for argument reordering
This commit is contained in:
committed by
TeamCityServer
parent
edd2ca775b
commit
15c41b2610
+17
@@ -0,0 +1,17 @@
|
||||
// WITH_RUNTIME
|
||||
// NO_CHECK_LAMBDA_INLINING
|
||||
|
||||
// FILE: 1.kt
|
||||
var s = ""
|
||||
|
||||
@Suppress("INVISIBLE_REFERENCE", "INVISIBLE_MEMBER")
|
||||
@kotlin.internal.InlineOnly
|
||||
inline fun foo(s1: String, s2: String) = s1 + s2
|
||||
|
||||
// FILE: 2.kt
|
||||
fun box(): String {
|
||||
val t = foo(s2 = { s += "O"; "K" }(), s1 = { s += "K"; "O" }())
|
||||
if (t != "OK") return "Failed: t=$t"
|
||||
if (s != "OK") return "Failed: s=$s"
|
||||
return "OK"
|
||||
}
|
||||
Reference in New Issue
Block a user