[FIR] Replace FirExpression.typeRef.coneType (and variants) with FirExpression.coneType
#KT-59855
This commit is contained in:
committed by
Space Team
parent
1472b21993
commit
9ec814b7ad
+1
-1
@@ -176,7 +176,7 @@ class VariableStorageImpl(private val session: FirSession) : VariableStorage() {
|
||||
property.visibility == Visibilities.Private -> PropertyStability.STABLE_VALUE
|
||||
property.modality != Modality.FINAL -> {
|
||||
val dispatchReceiver = (originalFir.unwrapElement() as? FirQualifiedAccessExpression)?.dispatchReceiver ?: return null
|
||||
val receiverType = dispatchReceiver.typeRef.coneTypeSafe<ConeClassLikeType>()?.fullyExpandedType(session) ?: return null
|
||||
val receiverType = dispatchReceiver.coneTypeSafe<ConeClassLikeType>()?.fullyExpandedType(session) ?: return null
|
||||
val receiverSymbol = receiverType.lookupTag.toSymbol(session) ?: return null
|
||||
when (val receiverFir = receiverSymbol.fir) {
|
||||
is FirAnonymousObject -> PropertyStability.STABLE_VALUE
|
||||
|
||||
@@ -895,7 +895,7 @@ class FakeExpressionEnterNode(owner: ControlFlowGraph, level: Int) : CFGNode<Fir
|
||||
|
||||
class SmartCastExpressionExitNode(owner: ControlFlowGraph, override val fir: FirSmartCastExpression, level: Int) : CFGNode<FirSmartCastExpression>(owner, level) {
|
||||
override val canThrow: Boolean
|
||||
get() = fir.typeRef.coneType.isNothing
|
||||
get() = fir.coneType.isNothing
|
||||
|
||||
override fun <R, D> accept(visitor: ControlFlowGraphVisitor<R, D>, data: D): R {
|
||||
return visitor.visitSmartCastExpressionExitNode(this, data)
|
||||
|
||||
@@ -36,10 +36,6 @@ fun FirOperation.isEq(): Boolean {
|
||||
}
|
||||
}
|
||||
|
||||
@DfaInternals
|
||||
val FirExpression.coneType: ConeKotlinType
|
||||
get() = typeRef.coneType
|
||||
|
||||
@DfaInternals
|
||||
val FirElement.symbol: FirBasedSymbol<*>?
|
||||
get() = when (this) {
|
||||
|
||||
+2
-2
@@ -57,7 +57,7 @@ fun computePublishedApiEffectiveVisibility(
|
||||
session: FirSession,
|
||||
): EffectiveVisibility? {
|
||||
val hasPublishedApiAnnotation = annotations.any {
|
||||
it.typeRef.coneTypeSafe<ConeClassLikeType>()?.lookupTag?.classId == StandardClassIds.Annotations.PublishedApi
|
||||
it.coneTypeSafe<ConeClassLikeType>()?.lookupTag?.classId == StandardClassIds.Annotations.PublishedApi
|
||||
}
|
||||
|
||||
return computePublishedApiEffectiveVisibility(
|
||||
@@ -142,4 +142,4 @@ fun FirMemberDeclaration.setLazyPublishedVisibility(hasPublishedApi: Boolean, pa
|
||||
session = session,
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user