[FIR] Don't use called declaration as source for call typeRef

Otherwise, we end up with sources pointing to different files.

#KT-60760 Fixed
This commit is contained in:
Kirill Rakhman
2023-07-31 17:09:25 +02:00
committed by Space Team
parent 82c18ff26b
commit 1472b21993
@@ -350,7 +350,7 @@ private fun BodyResolveComponents.typeFromSymbol(symbol: FirBasedSymbol<*>): Fir
return when (symbol) {
is FirCallableSymbol<*> -> {
val returnTypeRef = returnTypeCalculator.tryCalculateReturnType(symbol.fir)
returnTypeRef.copyWithNewSourceKind(KtFakeSourceElementKind.ImplicitTypeRef)
returnTypeRef.copyWithNewSource(null)
}
is FirClassifierSymbol<*> -> {
buildResolvedTypeRef {