[FIR] Remove incorrect FirClassSymbol<*>.superConeTypes utility
Replace all usages with member `FirClassSymbol.resolvedSuperTypes`
This commit is contained in:
committed by
teamcity
parent
6ef3d1e573
commit
194741b96b
+1
-1
@@ -48,7 +48,7 @@ internal class KtFirExpressionTypeProvider(
|
||||
val containingClass =
|
||||
(fir.dispatchReceiver as? FirThisReceiverExpression)?.calleeReference?.boundSymbol as? FirClassSymbol<*>
|
||||
if (fir.calleeReference is FirSuperReference && fir.typeRef is FirErrorTypeRef && containingClass != null) {
|
||||
val superTypes = containingClass.superConeTypes
|
||||
val superTypes = containingClass.resolvedSuperTypes
|
||||
when (superTypes.size) {
|
||||
0 -> analysisSession.builtinTypes.ANY
|
||||
1 -> superTypes.single().asKtType()
|
||||
|
||||
+3
-4
@@ -26,7 +26,6 @@ import org.jetbrains.kotlin.fir.analysis.checkers.ConeTypeCompatibilityChecker.i
|
||||
import org.jetbrains.kotlin.fir.analysis.checkers.typeParameterSymbols
|
||||
import org.jetbrains.kotlin.fir.declarations.FirResolvePhase
|
||||
import org.jetbrains.kotlin.fir.declarations.fullyExpandedClass
|
||||
import org.jetbrains.kotlin.fir.declarations.utils.superConeTypes
|
||||
import org.jetbrains.kotlin.fir.expressions.FirCallableReferenceAccess
|
||||
import org.jetbrains.kotlin.fir.expressions.FirDelegatedConstructorCall
|
||||
import org.jetbrains.kotlin.fir.expressions.FirGetClassCall
|
||||
@@ -147,9 +146,9 @@ internal class KtFirTypeProvider(
|
||||
val session = analysisSession.firResolveSession.useSiteFirSession
|
||||
val symbol = lookupTag.toSymbol(session)
|
||||
val superTypes = when (symbol) {
|
||||
is FirAnonymousObjectSymbol -> symbol.superConeTypes
|
||||
is FirRegularClassSymbol -> symbol.superConeTypes
|
||||
is FirTypeAliasSymbol -> symbol.fullyExpandedClass(session)?.superConeTypes ?: return emptySequence()
|
||||
is FirAnonymousObjectSymbol -> symbol.resolvedSuperTypes
|
||||
is FirRegularClassSymbol -> symbol.resolvedSuperTypes
|
||||
is FirTypeAliasSymbol -> symbol.fullyExpandedClass(session)?.resolvedSuperTypes ?: return emptySequence()
|
||||
is FirTypeParameterSymbol -> symbol.resolvedBounds.map { it.type }
|
||||
else -> return emptySequence()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user