[LL API] Fix vararg parameter matching in PSI-FIR comparison

This commit is contained in:
Yan Zhulanow
2023-02-27 20:04:50 +09:00
committed by Space Team
parent 8b1be89507
commit 2d8c3c5aaf
@@ -182,8 +182,11 @@ object KtDeclarationAndFirDeclarationEqualityChecker {
psiTypeReference: KtTypeReference,
coneTypeReference: FirTypeRef,
isVararg: Boolean
): Boolean =
psiTypeReference.toKotlinTypReference().renderTypeAsKotlinType(isVararg) == coneTypeReference.renderTypeAsKotlinType()
): Boolean {
val psiText = psiTypeReference.toKotlinTypReference().renderTypeAsKotlinType(isVararg)
val firText = coneTypeReference.renderTypeAsKotlinType(isVararg)
return psiText == firText
}
@Suppress("DEPRECATION_ERROR")
private fun KtTypeReference.toKotlinTypReference(): FirTypeRef {