[FIR] Refactor val FirElement.calleeReference utility

1. Convert it to `toReference()` function to make it consistent with other
   similar utilities
2. Provide the proper implementation

^KT-64975
This commit is contained in:
Dmitriy Novozhilov
2024-01-17 16:17:42 +02:00
committed by Space Team
parent 36958d585f
commit bd9cb2b7e0
21 changed files with 42 additions and 35 deletions
@@ -39,7 +39,7 @@ object FirJvmProtectedInSuperClassCompanionCallChecker : FirBasicExpressionCheck
} ?: return
val dispatchClassSymbol = dispatchReceiver.resolvedType.toRegularClassSymbol(context.session) ?: return
val calleeReference = expression.calleeReference
val calleeReference = expression.toReference()
val resolvedSymbol = calleeReference?.toResolvedCallableSymbol() ?: return
val visibility = if (resolvedSymbol is FirPropertySymbol) {