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 1abe25c80aa..3fdf5148a40 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 @@ -18379,6 +18379,12 @@ public class FirLightTreeBlackBoxCodegenTestGenerated extends AbstractFirLightTr runTest("compiler/testData/codegen/box/fir/emptyIntersectionWarning.kt"); } + @Test + @TestMetadata("enumEntryInTypeJavaAnnotation.kt") + public void testEnumEntryInTypeJavaAnnotation() throws Exception { + runTest("compiler/testData/codegen/box/fir/enumEntryInTypeJavaAnnotation.kt"); + } + @Test @TestMetadata("ExtensionAlias.kt") public void testExtensionAlias() throws Exception { 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 2433363e74a..cb11a05d23e 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 @@ -18379,6 +18379,12 @@ public class FirPsiBlackBoxCodegenTestGenerated extends AbstractFirPsiBlackBoxCo runTest("compiler/testData/codegen/box/fir/emptyIntersectionWarning.kt"); } + @Test + @TestMetadata("enumEntryInTypeJavaAnnotation.kt") + public void testEnumEntryInTypeJavaAnnotation() throws Exception { + runTest("compiler/testData/codegen/box/fir/enumEntryInTypeJavaAnnotation.kt"); + } + @Test @TestMetadata("ExtensionAlias.kt") public void testExtensionAlias() throws Exception { diff --git a/compiler/testData/codegen/box/fir/enumEntryInTypeJavaAnnotation.kt b/compiler/testData/codegen/box/fir/enumEntryInTypeJavaAnnotation.kt new file mode 100644 index 00000000000..f6d777f1ac4 --- /dev/null +++ b/compiler/testData/codegen/box/fir/enumEntryInTypeJavaAnnotation.kt @@ -0,0 +1,27 @@ +// ISSUE: KT-58002 + +// TARGET_BACKEND: JVM_IR +// IGNORE_BACKEND_K2: JVM_IR + +// FILE: NLS.java +import java.lang.annotation.*; + +@Target(ElementType.TYPE_USE) +public @interface NLS { + enum Capitalization { NotSpecified, Specified } + Capitalization capitalization() default Capitalization.NotSpecified; +} + +// FILE: BaseInspection.java + +public class BaseInspection { + @NLS(capitalization = NLS.Capitalization.Specified) + public static String fetchProbableBugs() { + return "OK"; + } +} + +// FILE: main.kt + +fun getGroupDisplayName() = BaseInspection.fetchProbableBugs() +fun box(): String = getGroupDisplayName() 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 1d2a12abe08..99fbd8b3daf 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 @@ -18379,6 +18379,12 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes runTest("compiler/testData/codegen/box/fir/emptyIntersectionWarning.kt"); } + @Test + @TestMetadata("enumEntryInTypeJavaAnnotation.kt") + public void testEnumEntryInTypeJavaAnnotation() throws Exception { + runTest("compiler/testData/codegen/box/fir/enumEntryInTypeJavaAnnotation.kt"); + } + @Test @TestMetadata("ExtensionAlias.kt") public void testExtensionAlias() throws Exception { 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 a96d2ac0338..718054c2281 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 @@ -18379,6 +18379,12 @@ public class IrBlackBoxCodegenWithIrInlinerTestGenerated extends AbstractIrBlack runTest("compiler/testData/codegen/box/fir/emptyIntersectionWarning.kt"); } + @Test + @TestMetadata("enumEntryInTypeJavaAnnotation.kt") + public void testEnumEntryInTypeJavaAnnotation() throws Exception { + runTest("compiler/testData/codegen/box/fir/enumEntryInTypeJavaAnnotation.kt"); + } + @Test @TestMetadata("ExtensionAlias.kt") public void testExtensionAlias() throws Exception {