JVM_IR KT-47984 add test for argument reordering

This commit is contained in:
Dmitry Petrov
2021-08-10 15:02:35 +03:00
committed by TeamCityServer
parent edd2ca775b
commit 15c41b2610
12 changed files with 199 additions and 0 deletions
@@ -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"
}