JVM IR: fix VerifyError on annotated annotation properties
The problem was that we tried to generate an `$annotations` method for a property declared in an annotation class. That method is final and has a body, which is not allowed in annotation classes. Now we're generating this method in the separate `$DefaultImpls` class as for properties in interfaces. Note that the added test still doesn't find any annotations because the proper support is needed in reflection (KT-22463). Currently it only checks that no VerifyError happens.
This commit is contained in:
+5
@@ -61,6 +61,11 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes
|
||||
runTest("compiler/testData/codegen/box/annotations/annotatedObjectLiteral.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("annotationProperty.kt")
|
||||
public void testAnnotationProperty() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/annotations/annotationProperty.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("annotationWithKotlinProperty.kt")
|
||||
public void testAnnotationWithKotlinProperty() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/annotations/annotationWithKotlinProperty.kt");
|
||||
|
||||
Reference in New Issue
Block a user