FIR: fix FirAnnotationChecker for FirProperty
This change is necessary for testTypeAliasExpansionRepeatedAnnotations to work properly (otherwise we don't check a property at all). Before current changes, the test worked thanks to accessors analysis which is now OFF because of source kind check.
This commit is contained in:
committed by
Space Team
parent
5a08d8da8d
commit
57dda3bf92
+5
-3
@@ -68,9 +68,11 @@ object FirAnnotationChecker : FirBasicDeclarationChecker() {
|
||||
|
||||
checkRepeatedAnnotations(declaration, context, reporter)
|
||||
|
||||
if (declaration is FirProperty) {
|
||||
checkRepeatedAnnotationsInProperty(declaration, context, reporter)
|
||||
} else if (declaration is FirCallableDeclaration) {
|
||||
if (declaration is FirCallableDeclaration) {
|
||||
if (declaration is FirProperty) {
|
||||
checkRepeatedAnnotationsInProperty(declaration, context, reporter)
|
||||
}
|
||||
|
||||
if (declaration.source?.kind is KtRealSourceElementKind && declaration.returnTypeRef.source?.kind is KtRealSourceElementKind) {
|
||||
checkRepeatedAnnotations(declaration.returnTypeRef.coneTypeSafe(), context, reporter)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user