Handling of annotations on delegated property in descriptor loader & stub builder
This commit is contained in:
+4
-2
@@ -138,9 +138,11 @@ class AnnotationLoaderForClassFileStubBuilder(
|
||||
return null
|
||||
}
|
||||
|
||||
override fun loadPropertyAnnotations(propertyAnnotations: List<ClassId>, fieldAnnotations: List<ClassId>): List<ClassIdWithTarget> {
|
||||
override fun loadPropertyAnnotations(
|
||||
propertyAnnotations: List<ClassId>, fieldAnnotations: List<ClassId>, fieldUseSiteTarget: AnnotationUseSiteTarget
|
||||
): List<ClassIdWithTarget> {
|
||||
return propertyAnnotations.map { ClassIdWithTarget(it, null) } +
|
||||
fieldAnnotations.map { ClassIdWithTarget(it, AnnotationUseSiteTarget.FIELD) }
|
||||
fieldAnnotations.map { ClassIdWithTarget(it, fieldUseSiteTarget ) }
|
||||
}
|
||||
|
||||
override fun transformAnnotations(annotations: List<ClassId>) = annotations.map { ClassIdWithTarget(it, null) }
|
||||
|
||||
@@ -501,6 +501,12 @@ public class ResolveByStubTestGenerated extends AbstractResolveByStubTest {
|
||||
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledKotlin/annotations/withUseSiteTarget"), Pattern.compile("^(.+)\\.kt$"), true);
|
||||
}
|
||||
|
||||
@TestMetadata("DelegateTarget.kt")
|
||||
public void testDelegateTarget() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/withUseSiteTarget/DelegateTarget.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("FieldTarget.kt")
|
||||
public void testFieldTarget() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/withUseSiteTarget/FieldTarget.kt");
|
||||
|
||||
Reference in New Issue
Block a user