[FIR] Fix loading of classId for nested enums in java annotation arguments
^KT-55887 Fixed ^KT-55976
This commit is contained in:
committed by
Space Team
parent
da0dd519d0
commit
259303ca50
@@ -0,0 +1,30 @@
|
||||
// WITH_STDLIB
|
||||
// ISSUE: KT-55887
|
||||
|
||||
// MODULE: lib
|
||||
// FILE: NoArg.kt
|
||||
annotation class NoArg
|
||||
|
||||
// FILE: Api.java
|
||||
@NoArg
|
||||
public @interface Api {
|
||||
Status status();
|
||||
|
||||
enum Status {
|
||||
Ok, Error;
|
||||
}
|
||||
}
|
||||
|
||||
// FILE: ExtendWith.java
|
||||
@Api(status = Api.Status.Ok)
|
||||
public @interface ExtendWith {}
|
||||
|
||||
// MODULE: main(lib)
|
||||
// FILE: main.kt
|
||||
@ExtendWith
|
||||
class Test(val x: Int)
|
||||
|
||||
fun box(): String {
|
||||
Test::class.java.newInstance()
|
||||
return "OK"
|
||||
}
|
||||
Generated
+6
@@ -37,6 +37,12 @@ public class BlackBoxCodegenTestForNoArgGenerated extends AbstractBlackBoxCodege
|
||||
runTest("plugins/noarg/testData/box/initializersWithoutInvokeInitializers.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("javaAnnotationWithInnerEnum.kt")
|
||||
public void testJavaAnnotationWithInnerEnum() throws Exception {
|
||||
runTest("plugins/noarg/testData/box/javaAnnotationWithInnerEnum.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("kt18245.kt")
|
||||
public void testKt18245() throws Exception {
|
||||
|
||||
Generated
+6
@@ -37,6 +37,12 @@ public class FirBlackBoxCodegenTestForNoArgGenerated extends AbstractFirBlackBox
|
||||
runTest("plugins/noarg/testData/box/initializersWithoutInvokeInitializers.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("javaAnnotationWithInnerEnum.kt")
|
||||
public void testJavaAnnotationWithInnerEnum() throws Exception {
|
||||
runTest("plugins/noarg/testData/box/javaAnnotationWithInnerEnum.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("kt18245.kt")
|
||||
public void testKt18245() throws Exception {
|
||||
|
||||
Generated
+6
@@ -37,6 +37,12 @@ public class IrBlackBoxCodegenTestForNoArgGenerated extends AbstractIrBlackBoxCo
|
||||
runTest("plugins/noarg/testData/box/initializersWithoutInvokeInitializers.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("javaAnnotationWithInnerEnum.kt")
|
||||
public void testJavaAnnotationWithInnerEnum() throws Exception {
|
||||
runTest("plugins/noarg/testData/box/javaAnnotationWithInnerEnum.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("kt18245.kt")
|
||||
public void testKt18245() throws Exception {
|
||||
|
||||
Reference in New Issue
Block a user