K2: fix annotation search on supertypes in assignment plugin
Current implementation checks only immediate supertype, while in case of gradle build scripts DSL, the annotated superclass is located deeper in the hierarchy. The fix implements a recursive supertype check. #KT-65983 fixed
This commit is contained in:
committed by
Space Team
parent
eab5164993
commit
0c5b700523
+1
-1
@@ -43,7 +43,7 @@ internal class FirAssignAnnotationMatchingService(
|
||||
if (this.annotations.any { it.toAnnotationClassId(session)?.asSingleFqName() in annotationClassIds }) return true
|
||||
return resolvedSuperTypeRefs.any { superTypeRef ->
|
||||
val symbol = superTypeRef.type.fullyExpandedType(session).toRegularClassSymbol(session) ?: return@any false
|
||||
symbol.annotations.any { it.toAnnotationClassId(session)?.asSingleFqName() in annotationClassIds }
|
||||
symbol.annotated()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user