diff --git a/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirLightTreeBlackBoxCodegenTestGenerated.java b/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirLightTreeBlackBoxCodegenTestGenerated.java index 0d50850e9d5..c0201387857 100644 --- a/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirLightTreeBlackBoxCodegenTestGenerated.java +++ b/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirLightTreeBlackBoxCodegenTestGenerated.java @@ -44212,6 +44212,12 @@ public class FirLightTreeBlackBoxCodegenTestGenerated extends AbstractFirLightTr runTest("compiler/testData/codegen/box/reflection/annotations/simpleValAnnotation.kt"); } + @Test + @TestMetadata("spread.kt") + public void testSpread() throws Exception { + runTest("compiler/testData/codegen/box/reflection/annotations/spread.kt"); + } + @Nested @TestMetadata("compiler/testData/codegen/box/reflection/annotations/onTypes") @TestDataPath("$PROJECT_ROOT") diff --git a/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirLightTreeBlackBoxCodegenWithIrFakeOverrideGeneratorTestGenerated.java b/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirLightTreeBlackBoxCodegenWithIrFakeOverrideGeneratorTestGenerated.java index af6f43612ce..b28f32f2d47 100644 --- a/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirLightTreeBlackBoxCodegenWithIrFakeOverrideGeneratorTestGenerated.java +++ b/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirLightTreeBlackBoxCodegenWithIrFakeOverrideGeneratorTestGenerated.java @@ -44212,6 +44212,12 @@ public class FirLightTreeBlackBoxCodegenWithIrFakeOverrideGeneratorTestGenerated runTest("compiler/testData/codegen/box/reflection/annotations/simpleValAnnotation.kt"); } + @Test + @TestMetadata("spread.kt") + public void testSpread() throws Exception { + runTest("compiler/testData/codegen/box/reflection/annotations/spread.kt"); + } + @Nested @TestMetadata("compiler/testData/codegen/box/reflection/annotations/onTypes") @TestDataPath("$PROJECT_ROOT") diff --git a/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirPsiBlackBoxCodegenTestGenerated.java b/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirPsiBlackBoxCodegenTestGenerated.java index 049e794c156..7320e591c69 100644 --- a/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirPsiBlackBoxCodegenTestGenerated.java +++ b/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirPsiBlackBoxCodegenTestGenerated.java @@ -44212,6 +44212,12 @@ public class FirPsiBlackBoxCodegenTestGenerated extends AbstractFirPsiBlackBoxCo runTest("compiler/testData/codegen/box/reflection/annotations/simpleValAnnotation.kt"); } + @Test + @TestMetadata("spread.kt") + public void testSpread() throws Exception { + runTest("compiler/testData/codegen/box/reflection/annotations/spread.kt"); + } + @Nested @TestMetadata("compiler/testData/codegen/box/reflection/annotations/onTypes") @TestDataPath("$PROJECT_ROOT") diff --git a/compiler/testData/codegen/box/reflection/annotations/spread.kt b/compiler/testData/codegen/box/reflection/annotations/spread.kt new file mode 100644 index 00000000000..c08d928dbba --- /dev/null +++ b/compiler/testData/codegen/box/reflection/annotations/spread.kt @@ -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()) +} \ No newline at end of file diff --git a/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/BlackBoxCodegenTestGenerated.java b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/BlackBoxCodegenTestGenerated.java index 5f6db8a0e8b..79b8de7a5b6 100644 --- a/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/BlackBoxCodegenTestGenerated.java +++ b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/BlackBoxCodegenTestGenerated.java @@ -41632,6 +41632,12 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { runTest("compiler/testData/codegen/box/reflection/annotations/simpleValAnnotation.kt"); } + @Test + @TestMetadata("spread.kt") + public void testSpread() throws Exception { + runTest("compiler/testData/codegen/box/reflection/annotations/spread.kt"); + } + @Nested @TestMetadata("compiler/testData/codegen/box/reflection/annotations/onTypes") @TestDataPath("$PROJECT_ROOT") diff --git a/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/IrBlackBoxCodegenTestGenerated.java b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/IrBlackBoxCodegenTestGenerated.java index 315eee97b3d..bab464c328f 100644 --- a/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/IrBlackBoxCodegenTestGenerated.java +++ b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/IrBlackBoxCodegenTestGenerated.java @@ -44212,6 +44212,12 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes runTest("compiler/testData/codegen/box/reflection/annotations/simpleValAnnotation.kt"); } + @Test + @TestMetadata("spread.kt") + public void testSpread() throws Exception { + runTest("compiler/testData/codegen/box/reflection/annotations/spread.kt"); + } + @Nested @TestMetadata("compiler/testData/codegen/box/reflection/annotations/onTypes") @TestDataPath("$PROJECT_ROOT") diff --git a/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/IrBlackBoxCodegenWithIrInlinerTestGenerated.java b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/IrBlackBoxCodegenWithIrInlinerTestGenerated.java index d2174df9da3..15535cf9cc1 100644 --- a/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/IrBlackBoxCodegenWithIrInlinerTestGenerated.java +++ b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/IrBlackBoxCodegenWithIrInlinerTestGenerated.java @@ -44212,6 +44212,12 @@ public class IrBlackBoxCodegenWithIrInlinerTestGenerated extends AbstractIrBlack runTest("compiler/testData/codegen/box/reflection/annotations/simpleValAnnotation.kt"); } + @Test + @TestMetadata("spread.kt") + public void testSpread() throws Exception { + runTest("compiler/testData/codegen/box/reflection/annotations/spread.kt"); + } + @Nested @TestMetadata("compiler/testData/codegen/box/reflection/annotations/onTypes") @TestDataPath("$PROJECT_ROOT") diff --git a/compiler/tests-gen/org/jetbrains/kotlin/codegen/LightAnalysisModeTestGenerated.java b/compiler/tests-gen/org/jetbrains/kotlin/codegen/LightAnalysisModeTestGenerated.java index 66c93fdba2c..220f9770df5 100644 --- a/compiler/tests-gen/org/jetbrains/kotlin/codegen/LightAnalysisModeTestGenerated.java +++ b/compiler/tests-gen/org/jetbrains/kotlin/codegen/LightAnalysisModeTestGenerated.java @@ -34930,6 +34930,11 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Annotations extends AbstractLightAnalysisModeTest { + @TestMetadata("spread.kt") + public void ignoreSpread() throws Exception { + runTest("compiler/testData/codegen/box/reflection/annotations/spread.kt"); + } + private void runTest(String testDataFilePath) throws Exception { KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_IR, testDataFilePath); }