FIR: Drop FirClassLikeDeclaration::supertypesComputationStatus
It became unused with rewritten supertype resolution
This commit is contained in:
@@ -11,7 +11,10 @@ import org.jetbrains.kotlin.descriptors.Visibility
|
|||||||
import org.jetbrains.kotlin.fir.FirPureAbstractElement
|
import org.jetbrains.kotlin.fir.FirPureAbstractElement
|
||||||
import org.jetbrains.kotlin.fir.FirSession
|
import org.jetbrains.kotlin.fir.FirSession
|
||||||
import org.jetbrains.kotlin.fir.FirSourceElement
|
import org.jetbrains.kotlin.fir.FirSourceElement
|
||||||
import org.jetbrains.kotlin.fir.declarations.*
|
import org.jetbrains.kotlin.fir.declarations.FirDeclaration
|
||||||
|
import org.jetbrains.kotlin.fir.declarations.FirRegularClass
|
||||||
|
import org.jetbrains.kotlin.fir.declarations.FirResolvePhase
|
||||||
|
import org.jetbrains.kotlin.fir.declarations.FirTypeParameter
|
||||||
import org.jetbrains.kotlin.fir.declarations.impl.FirDeclarationStatusImpl
|
import org.jetbrains.kotlin.fir.declarations.impl.FirDeclarationStatusImpl
|
||||||
import org.jetbrains.kotlin.fir.declarations.impl.FirModifiableClass
|
import org.jetbrains.kotlin.fir.declarations.impl.FirModifiableClass
|
||||||
import org.jetbrains.kotlin.fir.expressions.FirAnnotationCall
|
import org.jetbrains.kotlin.fir.expressions.FirAnnotationCall
|
||||||
@@ -62,12 +65,6 @@ class FirJavaClass internal constructor(
|
|||||||
superTypeRefs.addAll(newSuperTypeRefs)
|
superTypeRefs.addAll(newSuperTypeRefs)
|
||||||
}
|
}
|
||||||
|
|
||||||
override var supertypesComputationStatus = SupertypesComputationStatus.NOT_COMPUTED
|
|
||||||
|
|
||||||
override fun replaceSupertypesComputationStatus(newSupertypesComputationStatus: SupertypesComputationStatus) {
|
|
||||||
supertypesComputationStatus = newSupertypesComputationStatus
|
|
||||||
}
|
|
||||||
|
|
||||||
override fun replaceResolvePhase(newResolvePhase: FirResolvePhase) {
|
override fun replaceResolvePhase(newResolvePhase: FirResolvePhase) {
|
||||||
resolvePhase = newResolvePhase
|
resolvePhase = newResolvePhase
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -24,7 +24,6 @@ abstract class FirAnonymousObject : FirPureAbstractElement(), FirClass<FirAnonym
|
|||||||
abstract override val source: FirSourceElement?
|
abstract override val source: FirSourceElement?
|
||||||
abstract override val session: FirSession
|
abstract override val session: FirSession
|
||||||
abstract override val resolvePhase: FirResolvePhase
|
abstract override val resolvePhase: FirResolvePhase
|
||||||
abstract override val supertypesComputationStatus: SupertypesComputationStatus
|
|
||||||
abstract override val classKind: ClassKind
|
abstract override val classKind: ClassKind
|
||||||
abstract override val superTypeRefs: List<FirTypeRef>
|
abstract override val superTypeRefs: List<FirTypeRef>
|
||||||
abstract override val declarations: List<FirDeclaration>
|
abstract override val declarations: List<FirDeclaration>
|
||||||
|
|||||||
@@ -24,7 +24,6 @@ interface FirClass<F : FirClass<F>> : FirClassLikeDeclaration<F>, FirStatement,
|
|||||||
override val source: FirSourceElement?
|
override val source: FirSourceElement?
|
||||||
override val session: FirSession
|
override val session: FirSession
|
||||||
override val resolvePhase: FirResolvePhase
|
override val resolvePhase: FirResolvePhase
|
||||||
override val supertypesComputationStatus: SupertypesComputationStatus
|
|
||||||
override val symbol: FirClassSymbol<F>
|
override val symbol: FirClassSymbol<F>
|
||||||
val classKind: ClassKind
|
val classKind: ClassKind
|
||||||
val superTypeRefs: List<FirTypeRef>
|
val superTypeRefs: List<FirTypeRef>
|
||||||
|
|||||||
@@ -23,10 +23,7 @@ interface FirClassLikeDeclaration<F : FirClassLikeDeclaration<F>> : FirDeclarati
|
|||||||
override val session: FirSession
|
override val session: FirSession
|
||||||
override val resolvePhase: FirResolvePhase
|
override val resolvePhase: FirResolvePhase
|
||||||
override val annotations: List<FirAnnotationCall>
|
override val annotations: List<FirAnnotationCall>
|
||||||
val supertypesComputationStatus: SupertypesComputationStatus
|
|
||||||
override val symbol: FirClassLikeSymbol<F>
|
override val symbol: FirClassLikeSymbol<F>
|
||||||
|
|
||||||
override fun <R, D> accept(visitor: FirVisitor<R, D>, data: D): R = visitor.visitClassLikeDeclaration(this, data)
|
override fun <R, D> accept(visitor: FirVisitor<R, D>, data: D): R = visitor.visitClassLikeDeclaration(this, data)
|
||||||
|
|
||||||
fun replaceSupertypesComputationStatus(newSupertypesComputationStatus: SupertypesComputationStatus)
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -29,7 +29,6 @@ abstract class FirEnumEntry : FirPureAbstractElement(), FirRegularClass {
|
|||||||
abstract override val annotations: List<FirAnnotationCall>
|
abstract override val annotations: List<FirAnnotationCall>
|
||||||
abstract override val typeParameters: List<FirTypeParameter>
|
abstract override val typeParameters: List<FirTypeParameter>
|
||||||
abstract override val status: FirDeclarationStatus
|
abstract override val status: FirDeclarationStatus
|
||||||
abstract override val supertypesComputationStatus: SupertypesComputationStatus
|
|
||||||
abstract override val classKind: ClassKind
|
abstract override val classKind: ClassKind
|
||||||
abstract override val declarations: List<FirDeclaration>
|
abstract override val declarations: List<FirDeclaration>
|
||||||
abstract override val symbol: FirRegularClassSymbol
|
abstract override val symbol: FirRegularClassSymbol
|
||||||
|
|||||||
@@ -27,7 +27,6 @@ interface FirRegularClass : FirMemberDeclaration, FirTypeParametersOwner, FirCla
|
|||||||
override val annotations: List<FirAnnotationCall>
|
override val annotations: List<FirAnnotationCall>
|
||||||
override val typeParameters: List<FirTypeParameter>
|
override val typeParameters: List<FirTypeParameter>
|
||||||
override val status: FirDeclarationStatus
|
override val status: FirDeclarationStatus
|
||||||
override val supertypesComputationStatus: SupertypesComputationStatus
|
|
||||||
override val classKind: ClassKind
|
override val classKind: ClassKind
|
||||||
override val declarations: List<FirDeclaration>
|
override val declarations: List<FirDeclaration>
|
||||||
override val symbol: FirRegularClassSymbol
|
override val symbol: FirRegularClassSymbol
|
||||||
|
|||||||
@@ -29,7 +29,6 @@ abstract class FirSealedClass : FirPureAbstractElement(), FirRegularClass {
|
|||||||
abstract override val annotations: List<FirAnnotationCall>
|
abstract override val annotations: List<FirAnnotationCall>
|
||||||
abstract override val typeParameters: List<FirTypeParameter>
|
abstract override val typeParameters: List<FirTypeParameter>
|
||||||
abstract override val status: FirDeclarationStatus
|
abstract override val status: FirDeclarationStatus
|
||||||
abstract override val supertypesComputationStatus: SupertypesComputationStatus
|
|
||||||
abstract override val classKind: ClassKind
|
abstract override val classKind: ClassKind
|
||||||
abstract override val declarations: List<FirDeclaration>
|
abstract override val declarations: List<FirDeclaration>
|
||||||
abstract override val symbol: FirRegularClassSymbol
|
abstract override val symbol: FirRegularClassSymbol
|
||||||
|
|||||||
@@ -23,7 +23,6 @@ abstract class FirTypeAlias : FirPureAbstractElement(), FirClassLikeDeclaration<
|
|||||||
abstract override val source: FirSourceElement?
|
abstract override val source: FirSourceElement?
|
||||||
abstract override val session: FirSession
|
abstract override val session: FirSession
|
||||||
abstract override val resolvePhase: FirResolvePhase
|
abstract override val resolvePhase: FirResolvePhase
|
||||||
abstract override val supertypesComputationStatus: SupertypesComputationStatus
|
|
||||||
abstract override val name: Name
|
abstract override val name: Name
|
||||||
abstract override val typeParameters: List<FirTypeParameter>
|
abstract override val typeParameters: List<FirTypeParameter>
|
||||||
abstract override val status: FirDeclarationStatus
|
abstract override val status: FirDeclarationStatus
|
||||||
|
|||||||
-6
@@ -11,7 +11,6 @@ import org.jetbrains.kotlin.fir.FirSourceElement
|
|||||||
import org.jetbrains.kotlin.fir.declarations.FirAnonymousObject
|
import org.jetbrains.kotlin.fir.declarations.FirAnonymousObject
|
||||||
import org.jetbrains.kotlin.fir.declarations.FirDeclaration
|
import org.jetbrains.kotlin.fir.declarations.FirDeclaration
|
||||||
import org.jetbrains.kotlin.fir.declarations.FirResolvePhase
|
import org.jetbrains.kotlin.fir.declarations.FirResolvePhase
|
||||||
import org.jetbrains.kotlin.fir.declarations.SupertypesComputationStatus
|
|
||||||
import org.jetbrains.kotlin.fir.expressions.FirAnnotationCall
|
import org.jetbrains.kotlin.fir.expressions.FirAnnotationCall
|
||||||
import org.jetbrains.kotlin.fir.impl.FirAbstractAnnotatedElement
|
import org.jetbrains.kotlin.fir.impl.FirAbstractAnnotatedElement
|
||||||
import org.jetbrains.kotlin.fir.symbols.impl.FirAnonymousObjectSymbol
|
import org.jetbrains.kotlin.fir.symbols.impl.FirAnonymousObjectSymbol
|
||||||
@@ -30,7 +29,6 @@ class FirAnonymousObjectImpl(
|
|||||||
override val symbol: FirAnonymousObjectSymbol
|
override val symbol: FirAnonymousObjectSymbol
|
||||||
) : FirAnonymousObject(), FirModifiableClass<FirAnonymousObject>, FirAbstractAnnotatedElement {
|
) : FirAnonymousObject(), FirModifiableClass<FirAnonymousObject>, FirAbstractAnnotatedElement {
|
||||||
override var resolvePhase: FirResolvePhase = FirResolvePhase.RAW_FIR
|
override var resolvePhase: FirResolvePhase = FirResolvePhase.RAW_FIR
|
||||||
override var supertypesComputationStatus: SupertypesComputationStatus = SupertypesComputationStatus.NOT_COMPUTED
|
|
||||||
override val classKind: ClassKind get() = ClassKind.OBJECT
|
override val classKind: ClassKind get() = ClassKind.OBJECT
|
||||||
override val superTypeRefs: MutableList<FirTypeRef> = mutableListOf()
|
override val superTypeRefs: MutableList<FirTypeRef> = mutableListOf()
|
||||||
override val declarations: MutableList<FirDeclaration> = mutableListOf()
|
override val declarations: MutableList<FirDeclaration> = mutableListOf()
|
||||||
@@ -60,10 +58,6 @@ class FirAnonymousObjectImpl(
|
|||||||
resolvePhase = newResolvePhase
|
resolvePhase = newResolvePhase
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun replaceSupertypesComputationStatus(newSupertypesComputationStatus: SupertypesComputationStatus) {
|
|
||||||
supertypesComputationStatus = newSupertypesComputationStatus
|
|
||||||
}
|
|
||||||
|
|
||||||
override fun replaceSuperTypeRefs(newSuperTypeRefs: List<FirTypeRef>) {
|
override fun replaceSuperTypeRefs(newSuperTypeRefs: List<FirTypeRef>) {
|
||||||
superTypeRefs.clear()
|
superTypeRefs.clear()
|
||||||
superTypeRefs.addAll(newSuperTypeRefs)
|
superTypeRefs.addAll(newSuperTypeRefs)
|
||||||
|
|||||||
@@ -14,7 +14,6 @@ import org.jetbrains.kotlin.fir.declarations.FirDeclarationStatus
|
|||||||
import org.jetbrains.kotlin.fir.declarations.FirRegularClass
|
import org.jetbrains.kotlin.fir.declarations.FirRegularClass
|
||||||
import org.jetbrains.kotlin.fir.declarations.FirResolvePhase
|
import org.jetbrains.kotlin.fir.declarations.FirResolvePhase
|
||||||
import org.jetbrains.kotlin.fir.declarations.FirTypeParameter
|
import org.jetbrains.kotlin.fir.declarations.FirTypeParameter
|
||||||
import org.jetbrains.kotlin.fir.declarations.SupertypesComputationStatus
|
|
||||||
import org.jetbrains.kotlin.fir.expressions.FirAnnotationCall
|
import org.jetbrains.kotlin.fir.expressions.FirAnnotationCall
|
||||||
import org.jetbrains.kotlin.fir.impl.FirAbstractAnnotatedElement
|
import org.jetbrains.kotlin.fir.impl.FirAbstractAnnotatedElement
|
||||||
import org.jetbrains.kotlin.fir.symbols.impl.FirRegularClassSymbol
|
import org.jetbrains.kotlin.fir.symbols.impl.FirRegularClassSymbol
|
||||||
@@ -38,7 +37,6 @@ class FirClassImpl(
|
|||||||
override var resolvePhase: FirResolvePhase = FirResolvePhase.RAW_FIR
|
override var resolvePhase: FirResolvePhase = FirResolvePhase.RAW_FIR
|
||||||
override val annotations: MutableList<FirAnnotationCall> = mutableListOf()
|
override val annotations: MutableList<FirAnnotationCall> = mutableListOf()
|
||||||
override val typeParameters: MutableList<FirTypeParameter> = mutableListOf()
|
override val typeParameters: MutableList<FirTypeParameter> = mutableListOf()
|
||||||
override var supertypesComputationStatus: SupertypesComputationStatus = SupertypesComputationStatus.NOT_COMPUTED
|
|
||||||
override val declarations: MutableList<FirDeclaration> = mutableListOf()
|
override val declarations: MutableList<FirDeclaration> = mutableListOf()
|
||||||
override var companionObject: FirRegularClass? = null
|
override var companionObject: FirRegularClass? = null
|
||||||
override val superTypeRefs: MutableList<FirTypeRef> = mutableListOf()
|
override val superTypeRefs: MutableList<FirTypeRef> = mutableListOf()
|
||||||
@@ -76,10 +74,6 @@ class FirClassImpl(
|
|||||||
resolvePhase = newResolvePhase
|
resolvePhase = newResolvePhase
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun replaceSupertypesComputationStatus(newSupertypesComputationStatus: SupertypesComputationStatus) {
|
|
||||||
supertypesComputationStatus = newSupertypesComputationStatus
|
|
||||||
}
|
|
||||||
|
|
||||||
override fun replaceSuperTypeRefs(newSuperTypeRefs: List<FirTypeRef>) {
|
override fun replaceSuperTypeRefs(newSuperTypeRefs: List<FirTypeRef>) {
|
||||||
superTypeRefs.clear()
|
superTypeRefs.clear()
|
||||||
superTypeRefs.addAll(newSuperTypeRefs)
|
superTypeRefs.addAll(newSuperTypeRefs)
|
||||||
|
|||||||
@@ -16,7 +16,6 @@ import org.jetbrains.kotlin.fir.declarations.FirEnumEntry
|
|||||||
import org.jetbrains.kotlin.fir.declarations.FirRegularClass
|
import org.jetbrains.kotlin.fir.declarations.FirRegularClass
|
||||||
import org.jetbrains.kotlin.fir.declarations.FirResolvePhase
|
import org.jetbrains.kotlin.fir.declarations.FirResolvePhase
|
||||||
import org.jetbrains.kotlin.fir.declarations.FirTypeParameter
|
import org.jetbrains.kotlin.fir.declarations.FirTypeParameter
|
||||||
import org.jetbrains.kotlin.fir.declarations.SupertypesComputationStatus
|
|
||||||
import org.jetbrains.kotlin.fir.expressions.FirAnnotationCall
|
import org.jetbrains.kotlin.fir.expressions.FirAnnotationCall
|
||||||
import org.jetbrains.kotlin.fir.expressions.FirExpression
|
import org.jetbrains.kotlin.fir.expressions.FirExpression
|
||||||
import org.jetbrains.kotlin.fir.impl.FirAbstractAnnotatedElement
|
import org.jetbrains.kotlin.fir.impl.FirAbstractAnnotatedElement
|
||||||
@@ -40,7 +39,6 @@ class FirEnumEntryImpl(
|
|||||||
override val annotations: MutableList<FirAnnotationCall> = mutableListOf()
|
override val annotations: MutableList<FirAnnotationCall> = mutableListOf()
|
||||||
override val typeParameters: MutableList<FirTypeParameter> = mutableListOf()
|
override val typeParameters: MutableList<FirTypeParameter> = mutableListOf()
|
||||||
override var status: FirDeclarationStatus = FirDeclarationStatusImpl(Visibilities.UNKNOWN, Modality.FINAL)
|
override var status: FirDeclarationStatus = FirDeclarationStatusImpl(Visibilities.UNKNOWN, Modality.FINAL)
|
||||||
override var supertypesComputationStatus: SupertypesComputationStatus = SupertypesComputationStatus.NOT_COMPUTED
|
|
||||||
override val classKind: ClassKind get() = ClassKind.ENUM_ENTRY
|
override val classKind: ClassKind get() = ClassKind.ENUM_ENTRY
|
||||||
override val declarations: MutableList<FirDeclaration> = mutableListOf()
|
override val declarations: MutableList<FirDeclaration> = mutableListOf()
|
||||||
override val companionObject: FirRegularClass? get() = null
|
override val companionObject: FirRegularClass? get() = null
|
||||||
@@ -87,10 +85,6 @@ class FirEnumEntryImpl(
|
|||||||
resolvePhase = newResolvePhase
|
resolvePhase = newResolvePhase
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun replaceSupertypesComputationStatus(newSupertypesComputationStatus: SupertypesComputationStatus) {
|
|
||||||
supertypesComputationStatus = newSupertypesComputationStatus
|
|
||||||
}
|
|
||||||
|
|
||||||
override fun replaceSuperTypeRefs(newSuperTypeRefs: List<FirTypeRef>) {
|
override fun replaceSuperTypeRefs(newSuperTypeRefs: List<FirTypeRef>) {
|
||||||
superTypeRefs.clear()
|
superTypeRefs.clear()
|
||||||
superTypeRefs.addAll(newSuperTypeRefs)
|
superTypeRefs.addAll(newSuperTypeRefs)
|
||||||
|
|||||||
@@ -11,7 +11,6 @@ import org.jetbrains.kotlin.fir.FirSourceElement
|
|||||||
import org.jetbrains.kotlin.fir.declarations.FirClass
|
import org.jetbrains.kotlin.fir.declarations.FirClass
|
||||||
import org.jetbrains.kotlin.fir.declarations.FirDeclaration
|
import org.jetbrains.kotlin.fir.declarations.FirDeclaration
|
||||||
import org.jetbrains.kotlin.fir.declarations.FirResolvePhase
|
import org.jetbrains.kotlin.fir.declarations.FirResolvePhase
|
||||||
import org.jetbrains.kotlin.fir.declarations.SupertypesComputationStatus
|
|
||||||
import org.jetbrains.kotlin.fir.expressions.FirAnnotationCall
|
import org.jetbrains.kotlin.fir.expressions.FirAnnotationCall
|
||||||
import org.jetbrains.kotlin.fir.impl.FirAbstractAnnotatedElement
|
import org.jetbrains.kotlin.fir.impl.FirAbstractAnnotatedElement
|
||||||
import org.jetbrains.kotlin.fir.symbols.impl.FirClassSymbol
|
import org.jetbrains.kotlin.fir.symbols.impl.FirClassSymbol
|
||||||
@@ -27,7 +26,6 @@ interface FirModifiableClass<F : FirClass<F>> : FirClass<F>, FirAbstractAnnotat
|
|||||||
override val source: FirSourceElement?
|
override val source: FirSourceElement?
|
||||||
override val session: FirSession
|
override val session: FirSession
|
||||||
override var resolvePhase: FirResolvePhase
|
override var resolvePhase: FirResolvePhase
|
||||||
override var supertypesComputationStatus: SupertypesComputationStatus
|
|
||||||
override val symbol: FirClassSymbol<F>
|
override val symbol: FirClassSymbol<F>
|
||||||
override val classKind: ClassKind
|
override val classKind: ClassKind
|
||||||
override val superTypeRefs: MutableList<FirTypeRef>
|
override val superTypeRefs: MutableList<FirTypeRef>
|
||||||
@@ -37,7 +35,5 @@ interface FirModifiableClass<F : FirClass<F>> : FirClass<F>, FirAbstractAnnotat
|
|||||||
|
|
||||||
override fun replaceResolvePhase(newResolvePhase: FirResolvePhase)
|
override fun replaceResolvePhase(newResolvePhase: FirResolvePhase)
|
||||||
|
|
||||||
override fun replaceSupertypesComputationStatus(newSupertypesComputationStatus: SupertypesComputationStatus)
|
|
||||||
|
|
||||||
override fun replaceSuperTypeRefs(newSuperTypeRefs: List<FirTypeRef>)
|
override fun replaceSuperTypeRefs(newSuperTypeRefs: List<FirTypeRef>)
|
||||||
}
|
}
|
||||||
|
|||||||
-4
@@ -13,7 +13,6 @@ import org.jetbrains.kotlin.fir.declarations.FirDeclarationStatus
|
|||||||
import org.jetbrains.kotlin.fir.declarations.FirRegularClass
|
import org.jetbrains.kotlin.fir.declarations.FirRegularClass
|
||||||
import org.jetbrains.kotlin.fir.declarations.FirResolvePhase
|
import org.jetbrains.kotlin.fir.declarations.FirResolvePhase
|
||||||
import org.jetbrains.kotlin.fir.declarations.FirTypeParameter
|
import org.jetbrains.kotlin.fir.declarations.FirTypeParameter
|
||||||
import org.jetbrains.kotlin.fir.declarations.SupertypesComputationStatus
|
|
||||||
import org.jetbrains.kotlin.fir.expressions.FirAnnotationCall
|
import org.jetbrains.kotlin.fir.expressions.FirAnnotationCall
|
||||||
import org.jetbrains.kotlin.fir.impl.FirAbstractAnnotatedElement
|
import org.jetbrains.kotlin.fir.impl.FirAbstractAnnotatedElement
|
||||||
import org.jetbrains.kotlin.fir.symbols.impl.FirRegularClassSymbol
|
import org.jetbrains.kotlin.fir.symbols.impl.FirRegularClassSymbol
|
||||||
@@ -34,7 +33,6 @@ interface FirModifiableRegularClass : FirRegularClass, FirModifiableClass<FirReg
|
|||||||
override val annotations: MutableList<FirAnnotationCall>
|
override val annotations: MutableList<FirAnnotationCall>
|
||||||
override val typeParameters: MutableList<FirTypeParameter>
|
override val typeParameters: MutableList<FirTypeParameter>
|
||||||
override var status: FirDeclarationStatus
|
override var status: FirDeclarationStatus
|
||||||
override var supertypesComputationStatus: SupertypesComputationStatus
|
|
||||||
override val classKind: ClassKind
|
override val classKind: ClassKind
|
||||||
override val declarations: MutableList<FirDeclaration>
|
override val declarations: MutableList<FirDeclaration>
|
||||||
override val symbol: FirRegularClassSymbol
|
override val symbol: FirRegularClassSymbol
|
||||||
@@ -46,7 +44,5 @@ interface FirModifiableRegularClass : FirRegularClass, FirModifiableClass<FirReg
|
|||||||
|
|
||||||
override fun replaceResolvePhase(newResolvePhase: FirResolvePhase)
|
override fun replaceResolvePhase(newResolvePhase: FirResolvePhase)
|
||||||
|
|
||||||
override fun replaceSupertypesComputationStatus(newSupertypesComputationStatus: SupertypesComputationStatus)
|
|
||||||
|
|
||||||
override fun replaceSuperTypeRefs(newSuperTypeRefs: List<FirTypeRef>)
|
override fun replaceSuperTypeRefs(newSuperTypeRefs: List<FirTypeRef>)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -14,7 +14,6 @@ import org.jetbrains.kotlin.fir.declarations.FirRegularClass
|
|||||||
import org.jetbrains.kotlin.fir.declarations.FirResolvePhase
|
import org.jetbrains.kotlin.fir.declarations.FirResolvePhase
|
||||||
import org.jetbrains.kotlin.fir.declarations.FirSealedClass
|
import org.jetbrains.kotlin.fir.declarations.FirSealedClass
|
||||||
import org.jetbrains.kotlin.fir.declarations.FirTypeParameter
|
import org.jetbrains.kotlin.fir.declarations.FirTypeParameter
|
||||||
import org.jetbrains.kotlin.fir.declarations.SupertypesComputationStatus
|
|
||||||
import org.jetbrains.kotlin.fir.expressions.FirAnnotationCall
|
import org.jetbrains.kotlin.fir.expressions.FirAnnotationCall
|
||||||
import org.jetbrains.kotlin.fir.impl.FirAbstractAnnotatedElement
|
import org.jetbrains.kotlin.fir.impl.FirAbstractAnnotatedElement
|
||||||
import org.jetbrains.kotlin.fir.symbols.impl.FirRegularClassSymbol
|
import org.jetbrains.kotlin.fir.symbols.impl.FirRegularClassSymbol
|
||||||
@@ -39,7 +38,6 @@ class FirSealedClassImpl(
|
|||||||
override var resolvePhase: FirResolvePhase = FirResolvePhase.RAW_FIR
|
override var resolvePhase: FirResolvePhase = FirResolvePhase.RAW_FIR
|
||||||
override val annotations: MutableList<FirAnnotationCall> = mutableListOf()
|
override val annotations: MutableList<FirAnnotationCall> = mutableListOf()
|
||||||
override val typeParameters: MutableList<FirTypeParameter> = mutableListOf()
|
override val typeParameters: MutableList<FirTypeParameter> = mutableListOf()
|
||||||
override var supertypesComputationStatus: SupertypesComputationStatus = SupertypesComputationStatus.NOT_COMPUTED
|
|
||||||
override val declarations: MutableList<FirDeclaration> = mutableListOf()
|
override val declarations: MutableList<FirDeclaration> = mutableListOf()
|
||||||
override var companionObject: FirRegularClass? = null
|
override var companionObject: FirRegularClass? = null
|
||||||
override val superTypeRefs: MutableList<FirTypeRef> = mutableListOf()
|
override val superTypeRefs: MutableList<FirTypeRef> = mutableListOf()
|
||||||
@@ -78,10 +76,6 @@ class FirSealedClassImpl(
|
|||||||
resolvePhase = newResolvePhase
|
resolvePhase = newResolvePhase
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun replaceSupertypesComputationStatus(newSupertypesComputationStatus: SupertypesComputationStatus) {
|
|
||||||
supertypesComputationStatus = newSupertypesComputationStatus
|
|
||||||
}
|
|
||||||
|
|
||||||
override fun replaceSuperTypeRefs(newSuperTypeRefs: List<FirTypeRef>) {
|
override fun replaceSuperTypeRefs(newSuperTypeRefs: List<FirTypeRef>) {
|
||||||
superTypeRefs.clear()
|
superTypeRefs.clear()
|
||||||
superTypeRefs.addAll(newSuperTypeRefs)
|
superTypeRefs.addAll(newSuperTypeRefs)
|
||||||
|
|||||||
@@ -11,7 +11,6 @@ import org.jetbrains.kotlin.fir.declarations.FirDeclarationStatus
|
|||||||
import org.jetbrains.kotlin.fir.declarations.FirResolvePhase
|
import org.jetbrains.kotlin.fir.declarations.FirResolvePhase
|
||||||
import org.jetbrains.kotlin.fir.declarations.FirTypeAlias
|
import org.jetbrains.kotlin.fir.declarations.FirTypeAlias
|
||||||
import org.jetbrains.kotlin.fir.declarations.FirTypeParameter
|
import org.jetbrains.kotlin.fir.declarations.FirTypeParameter
|
||||||
import org.jetbrains.kotlin.fir.declarations.SupertypesComputationStatus
|
|
||||||
import org.jetbrains.kotlin.fir.expressions.FirAnnotationCall
|
import org.jetbrains.kotlin.fir.expressions.FirAnnotationCall
|
||||||
import org.jetbrains.kotlin.fir.impl.FirAbstractAnnotatedElement
|
import org.jetbrains.kotlin.fir.impl.FirAbstractAnnotatedElement
|
||||||
import org.jetbrains.kotlin.fir.symbols.impl.FirTypeAliasSymbol
|
import org.jetbrains.kotlin.fir.symbols.impl.FirTypeAliasSymbol
|
||||||
@@ -33,7 +32,6 @@ class FirTypeAliasImpl(
|
|||||||
override var expandedTypeRef: FirTypeRef
|
override var expandedTypeRef: FirTypeRef
|
||||||
) : FirTypeAlias(), FirModifiableTypeParametersOwner, FirAbstractAnnotatedElement {
|
) : FirTypeAlias(), FirModifiableTypeParametersOwner, FirAbstractAnnotatedElement {
|
||||||
override var resolvePhase: FirResolvePhase = FirResolvePhase.RAW_FIR
|
override var resolvePhase: FirResolvePhase = FirResolvePhase.RAW_FIR
|
||||||
override var supertypesComputationStatus: SupertypesComputationStatus = SupertypesComputationStatus.NOT_COMPUTED
|
|
||||||
override val typeParameters: MutableList<FirTypeParameter> = mutableListOf()
|
override val typeParameters: MutableList<FirTypeParameter> = mutableListOf()
|
||||||
override val annotations: MutableList<FirAnnotationCall> = mutableListOf()
|
override val annotations: MutableList<FirAnnotationCall> = mutableListOf()
|
||||||
|
|
||||||
@@ -65,10 +63,6 @@ class FirTypeAliasImpl(
|
|||||||
resolvePhase = newResolvePhase
|
resolvePhase = newResolvePhase
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun replaceSupertypesComputationStatus(newSupertypesComputationStatus: SupertypesComputationStatus) {
|
|
||||||
supertypesComputationStatus = newSupertypesComputationStatus
|
|
||||||
}
|
|
||||||
|
|
||||||
override fun replaceExpandedTypeRef(newExpandedTypeRef: FirTypeRef) {
|
override fun replaceExpandedTypeRef(newExpandedTypeRef: FirTypeRef) {
|
||||||
expandedTypeRef = newExpandedTypeRef
|
expandedTypeRef = newExpandedTypeRef
|
||||||
}
|
}
|
||||||
|
|||||||
-4
@@ -60,7 +60,6 @@ object ImplementationConfigurator : AbstractFirTreeImplementationConfigurator()
|
|||||||
val regularClassConfig: ImplementationContext.() -> Unit = {
|
val regularClassConfig: ImplementationContext.() -> Unit = {
|
||||||
parents += modifiableRegularClass
|
parents += modifiableRegularClass
|
||||||
defaultNull("companionObject")
|
defaultNull("companionObject")
|
||||||
defaultSupertypesComputationStatus()
|
|
||||||
}
|
}
|
||||||
impl(regularClass, "FirClassImpl", regularClassConfig)
|
impl(regularClass, "FirClassImpl", regularClassConfig)
|
||||||
|
|
||||||
@@ -72,7 +71,6 @@ object ImplementationConfigurator : AbstractFirTreeImplementationConfigurator()
|
|||||||
value = "ClassKind.OBJECT"
|
value = "ClassKind.OBJECT"
|
||||||
withGetter = true
|
withGetter = true
|
||||||
}
|
}
|
||||||
defaultSupertypesComputationStatus()
|
|
||||||
}
|
}
|
||||||
|
|
||||||
impl(enumEntry) {
|
impl(enumEntry) {
|
||||||
@@ -88,13 +86,11 @@ object ImplementationConfigurator : AbstractFirTreeImplementationConfigurator()
|
|||||||
withGetter = true
|
withGetter = true
|
||||||
}
|
}
|
||||||
default("typeRef", "session.builtinTypes.enumType")
|
default("typeRef", "session.builtinTypes.enumType")
|
||||||
defaultSupertypesComputationStatus()
|
|
||||||
useTypes(visibilitiesType, modalityType)
|
useTypes(visibilitiesType, modalityType)
|
||||||
}
|
}
|
||||||
|
|
||||||
impl(typeAlias) {
|
impl(typeAlias) {
|
||||||
parents += modifiableTypeParametersOwner
|
parents += modifiableTypeParametersOwner
|
||||||
defaultSupertypesComputationStatus()
|
|
||||||
}
|
}
|
||||||
|
|
||||||
impl(import)
|
impl(import)
|
||||||
|
|||||||
-1
@@ -205,7 +205,6 @@ object NodeConfigurator : AbstractFieldConfigurator() {
|
|||||||
classLikeDeclaration.configure {
|
classLikeDeclaration.configure {
|
||||||
withArg("F", "FirClassLikeDeclaration<F>")
|
withArg("F", "FirClassLikeDeclaration<F>")
|
||||||
parentArg(symbolOwner, "F", "F")
|
parentArg(symbolOwner, "F", "F")
|
||||||
+field("supertypesComputationStatus", type("fir.declarations", "SupertypesComputationStatus"), withReplace = true).apply { isMutable = true }
|
|
||||||
+symbol("FirClassLikeSymbol", "F")
|
+symbol("FirClassLikeSymbol", "F")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
-4
@@ -164,10 +164,6 @@ abstract class AbstractFirTreeImplementationConfigurator {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fun defaultSupertypesComputationStatus() {
|
|
||||||
default("supertypesComputationStatus", "SupertypesComputationStatus.NOT_COMPUTED")
|
|
||||||
}
|
|
||||||
|
|
||||||
fun default(field: String, init: DefaultValueContext.() -> Unit) {
|
fun default(field: String, init: DefaultValueContext.() -> Unit) {
|
||||||
DefaultValueContext(getField(field)).apply(init).applyConfiguration()
|
DefaultValueContext(getField(field)).apply(init).applyConfiguration()
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user