[Tests] Add box tests for #KT-59904
This commit is contained in:
committed by
Space Team
parent
843ded892d
commit
f47705f123
+18
@@ -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
|
||||
}
|
||||
Reference in New Issue
Block a user