[Tests] Add box tests for #KT-59904

This commit is contained in:
Kirill Rakhman
2023-12-20 17:15:51 +01:00
committed by Space Team
parent 843ded892d
commit f47705f123
21 changed files with 263 additions and 0 deletions
@@ -0,0 +1,18 @@
// IGNORE_BACKEND_K1: ANY
lateinit var result: String
fun foo(x: Int, y: Any): Int {
result = "OK"
return x
}
fun foo(x: Any, y: Int): Int {
result = "FAIL"
return y
}
fun box(): String {
val fooRef: (Int, Any) -> Unit = ::foo
fooRef(1, "")
return result
}