[FIR] Introduce & use FirTypeRef.coneType
This commit is contained in:
+2
-3
@@ -9,8 +9,7 @@ import org.jetbrains.kotlin.fir.declarations.*
|
||||
import org.jetbrains.kotlin.fir.resolve.calls.AbstractConeCallConflictResolver
|
||||
import org.jetbrains.kotlin.fir.resolve.calls.Candidate
|
||||
import org.jetbrains.kotlin.fir.resolve.inference.InferenceComponents
|
||||
import org.jetbrains.kotlin.fir.types.ConeKotlinType
|
||||
import org.jetbrains.kotlin.fir.types.coneTypeUnsafe
|
||||
import org.jetbrains.kotlin.fir.types.coneType
|
||||
import org.jetbrains.kotlin.resolve.calls.results.FlatSignature
|
||||
import org.jetbrains.kotlin.resolve.calls.results.TypeSpecificityComparator
|
||||
|
||||
@@ -55,7 +54,7 @@ class ConeEquivalentCallConflictResolver(
|
||||
): Boolean {
|
||||
if (first.symbol.callableId != second.symbol.callableId) return false
|
||||
if (first.isExpect != second.isExpect) return false
|
||||
if (first.receiverTypeRef?.coneTypeUnsafe<ConeKotlinType>() != second.receiverTypeRef?.coneTypeUnsafe()) {
|
||||
if (first.receiverTypeRef?.coneType != second.receiverTypeRef?.coneType) {
|
||||
return false
|
||||
}
|
||||
val firstSignature = createFlatSignature(firstCandidate, first)
|
||||
|
||||
@@ -108,7 +108,7 @@ private fun StringBuilder.appendConeType(coneType: ConeKotlinType) {
|
||||
}
|
||||
is ConeTypeParameterType -> {
|
||||
val representative = coneType.lookupTag.typeParameterSymbol.fir.bounds.firstOrNull {
|
||||
(it as? FirResolvedTypeRef)?.type is ConeClassLikeType
|
||||
it.coneType is ConeClassLikeType
|
||||
}
|
||||
if (representative == null || representative is FirImplicitNullableAnyTypeRef || representative is FirImplicitAnyTypeRef) {
|
||||
append("Ljava/lang/Object")
|
||||
|
||||
Reference in New Issue
Block a user