[FIR] Rename SyntheticPropertySymbol to FirSyntheticPropertySymbol

This commit is contained in:
Dmitriy Novozhilov
2021-03-19 15:40:53 +03:00
parent 714871e4a5
commit b0969f626e
3 changed files with 7 additions and 7 deletions
@@ -22,7 +22,7 @@ import org.jetbrains.kotlin.fir.references.FirResolvedNamedReference
import org.jetbrains.kotlin.fir.references.FirThisReference
import org.jetbrains.kotlin.fir.references.impl.FirPropertyFromParameterResolvedNamedReference
import org.jetbrains.kotlin.fir.resolve.*
import org.jetbrains.kotlin.fir.resolve.calls.SyntheticPropertySymbol
import org.jetbrains.kotlin.fir.resolve.calls.FirSyntheticPropertySymbol
import org.jetbrains.kotlin.fir.resolve.calls.originalConstructorIfTypeAlias
import org.jetbrains.kotlin.fir.resolve.providers.FirProvider
import org.jetbrains.kotlin.fir.scopes.*
@@ -176,7 +176,7 @@ fun FirReference.toSymbolForCall(
private fun FirCallableSymbol<*>.toSymbolForCall(declarationStorage: Fir2IrDeclarationStorage, preferGetter: Boolean): IrSymbol? =
when (this) {
is FirFunctionSymbol<*> -> declarationStorage.getIrFunctionSymbol(this)
is SyntheticPropertySymbol -> {
is FirSyntheticPropertySymbol -> {
(fir as? FirSyntheticProperty)?.let { syntheticProperty ->
val delegateSymbol = if (preferGetter) {
syntheticProperty.getter.delegate.symbol
@@ -393,7 +393,7 @@ internal fun FirReference.statementOrigin(): IrStatementOrigin? {
return when (this) {
is FirPropertyFromParameterResolvedNamedReference -> IrStatementOrigin.INITIALIZE_PROPERTY_FROM_PARAMETER
is FirResolvedNamedReference -> when (val symbol = resolvedSymbol) {
is AccessorSymbol, is SyntheticPropertySymbol -> IrStatementOrigin.GET_PROPERTY
is AccessorSymbol, is FirSyntheticPropertySymbol -> IrStatementOrigin.GET_PROPERTY
is FirNamedFunctionSymbol -> when {
symbol.callableId.isInvoke() ->
IrStatementOrigin.INVOKE
@@ -23,7 +23,7 @@ import org.jetbrains.kotlin.fir.unwrapFakeOverrides
import org.jetbrains.kotlin.name.Name
import org.jetbrains.kotlin.types.AbstractTypeChecker
class SyntheticPropertySymbol(
class FirSyntheticPropertySymbol(
callableId: CallableId,
override val accessorId: CallableId
) : FirAccessorSymbol(callableId, accessorId), SyntheticSymbol
@@ -109,7 +109,7 @@ class FirSyntheticPropertiesScope(
val property = buildSyntheticProperty {
session = this@FirSyntheticPropertiesScope.session
name = propertyName
symbol = SyntheticPropertySymbol(
symbol = FirSyntheticPropertySymbol(
accessorId = getterSymbol.callableId,
callableId = CallableId(packageName, className, propertyName)
)
@@ -14,7 +14,7 @@ import org.jetbrains.kotlin.fir.declarations.synthetic.FirSyntheticProperty
import org.jetbrains.kotlin.fir.expressions.*
import org.jetbrains.kotlin.fir.psi
import org.jetbrains.kotlin.fir.references.*
import org.jetbrains.kotlin.fir.resolve.calls.SyntheticPropertySymbol
import org.jetbrains.kotlin.fir.resolve.calls.FirSyntheticPropertySymbol
import org.jetbrains.kotlin.fir.resolve.diagnostics.ConeAmbiguityError
import org.jetbrains.kotlin.fir.resolve.diagnostics.ConeInapplicableCandidateError
import org.jetbrains.kotlin.fir.resolve.diagnostics.ConeOperatorAmbiguityError
@@ -86,7 +86,7 @@ internal object FirReferenceResolveHelper {
}
is FirResolvedNamedReference -> {
val fir = when (val symbol = resolvedSymbol) {
is SyntheticPropertySymbol -> {
is FirSyntheticPropertySymbol -> {
val syntheticProperty = symbol.fir as FirSyntheticProperty
if (syntheticProperty.getter.delegate.symbol.callableId == symbol.accessorId) {
syntheticProperty.getter.delegate