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:
committed by
Space Team
parent
2d334c4e71
commit
184b5cebe7
@@ -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())
|
||||
}
|
||||
Reference in New Issue
Block a user