[LL] do not build fir in a non-cancelable section

find by classId might require indices which will throw PCE when not up-to-date
which is prohibited in non-cancelable section
This commit is contained in:
Anna Kozlova
2022-11-24 16:15:24 +01:00
committed by Space Team
parent d585f068dd
commit cd0b1c2fff
@@ -117,9 +117,7 @@ var KtFile.originalKtFile by UserDataProperty(ORIGINAL_KT_FILE_KEY)
private fun KtClassLikeDeclaration.findFir(provider: FirProvider): FirClassLikeDeclaration? {
val classId = getClassId() ?: return null
return executeWithoutPCE {
provider.getFirClassifierByFqName(classId) as? FirRegularClass
}
return provider.getFirClassifierByFqName(classId) as? FirRegularClass
}