[Analysis API] add constructorSymbol to API of KtAnnotationApplicationWithArgumentsInfo

This is required for some checks on call site, and it seems that
this symbol can cover all cases.
One of the examples why this API was introduced is a request to
distinguish which vararg parameter is missed in arguments
of an annotation call from symbol light classes

^KT-62560
This commit is contained in:
Dmitrii Gridin
2023-11-01 15:59:50 +01:00
committed by Space Team
parent 3a6cdc83cf
commit 1173cc46e2
45 changed files with 192 additions and 228 deletions
@@ -471,6 +471,7 @@ internal fun ConstantValue<*>.toKtAnnotationValue(analysisContext: Fe10AnalysisC
useSiteTarget = null,
arguments = value.getKtNamedAnnotationArguments(analysisContext),
index = null,
constructorSymbolPointer = null,
)
)
}
@@ -618,13 +619,16 @@ internal fun createKtInitializerValue(
internal fun AnnotationDescriptor.toKtAnnotationApplication(
analysisContext: Fe10AnalysisContext,
index: Int,
): KtAnnotationApplicationWithArgumentsInfo = KtAnnotationApplicationWithArgumentsInfo(
classId = classIdForAnnotation,
psi = psi,
useSiteTarget = useSiteTarget,
arguments = getKtNamedAnnotationArguments(analysisContext),
index = index,
)
): KtAnnotationApplicationWithArgumentsInfo {
return KtAnnotationApplicationWithArgumentsInfo(
classId = classIdForAnnotation,
psi = psi,
useSiteTarget = useSiteTarget,
arguments = getKtNamedAnnotationArguments(analysisContext),
index = index,
constructorSymbolPointer = null,
)
}
internal fun AnnotationDescriptor.toKtAnnotationInfo(index: Int): KtAnnotationApplicationInfo = KtAnnotationApplicationInfo(
classId = classIdForAnnotation,