Minor. Add regression test for KT-60136

Spread operator works incorrectly in K1, but correctly in K2.
 #KT-60136 Fixed
This commit is contained in:
Ilmir Usmanov
2023-09-04 20:18:33 +02:00
committed by Space Team
parent 2d334c4e71
commit 184b5cebe7
8 changed files with 60 additions and 0 deletions
@@ -0,0 +1,19 @@
// TARGET_BACKEND: JVM
// WITH_REFLECT
// IGNORE_BACKEND_K1: JVM, JVM_IR
@Retention(AnnotationRetention.RUNTIME)
annotation class A(vararg val xs: String)
@A(*arrayOf("a"), *arrayOf("b"))
fun test() {}
fun box(): String {
val annotation = ::test.annotations.single() as A
if (!annotation.xs.contentEquals(arrayOf("a", "b"))) return annotation.toString()
return "OK"
}
fun main() {
println(box())
}