FIR: Get rid of FirRegularClass::setCallbackOnSupertypesComputed
This commit is contained in:
@@ -59,8 +59,5 @@ class FirJavaClass internal constructor(
|
|||||||
return this
|
return this
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun setCallbackOnSupertypesComputed(callback: () -> Unit) =
|
|
||||||
error("Supertypes computation should happen just before the instance is published")
|
|
||||||
|
|
||||||
override var supertypesComputationStatus = FirClassLikeDeclaration.SupertypesComputationStatus.NOT_COMPUTED
|
override var supertypesComputationStatus = FirClassLikeDeclaration.SupertypesComputationStatus.NOT_COMPUTED
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -37,7 +37,6 @@ interface FirRegularClass : FirClass, @VisitedSupertype FirClassLikeDeclaration<
|
|||||||
|
|
||||||
fun replaceSupertypes(newSupertypes: List<FirTypeRef>): FirRegularClass
|
fun replaceSupertypes(newSupertypes: List<FirTypeRef>): FirRegularClass
|
||||||
|
|
||||||
fun setCallbackOnSupertypesComputed(callback: () -> Unit)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
val FirRegularClass.classId get() = symbol.classId
|
val FirRegularClass.classId get() = symbol.classId
|
||||||
|
|||||||
@@ -64,8 +64,6 @@ open class FirClassImpl(
|
|||||||
override fun replaceSupertypes(newSupertypes: List<FirTypeRef>): FirRegularClass {
|
override fun replaceSupertypes(newSupertypes: List<FirTypeRef>): FirRegularClass {
|
||||||
superTypeRefs.clear()
|
superTypeRefs.clear()
|
||||||
superTypeRefs.addAll(newSupertypes)
|
superTypeRefs.addAll(newSupertypes)
|
||||||
callbackOnSupertypesComputed?.invoke()
|
|
||||||
callbackOnSupertypesComputed = null
|
|
||||||
return this
|
return this
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -80,11 +78,5 @@ open class FirClassImpl(
|
|||||||
return result
|
return result
|
||||||
}
|
}
|
||||||
|
|
||||||
private var callbackOnSupertypesComputed: (() -> Unit)? = null
|
|
||||||
|
|
||||||
override fun setCallbackOnSupertypesComputed(callback: () -> Unit) {
|
|
||||||
callbackOnSupertypesComputed = callback
|
|
||||||
}
|
|
||||||
|
|
||||||
override var supertypesComputationStatus = FirClassLikeDeclaration.SupertypesComputationStatus.NOT_COMPUTED
|
override var supertypesComputationStatus = FirClassLikeDeclaration.SupertypesComputationStatus.NOT_COMPUTED
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -54,17 +54,9 @@ class FirEnumEntryImpl(
|
|||||||
override fun replaceSupertypes(newSupertypes: List<FirTypeRef>): FirRegularClass {
|
override fun replaceSupertypes(newSupertypes: List<FirTypeRef>): FirRegularClass {
|
||||||
superTypeRefs.clear()
|
superTypeRefs.clear()
|
||||||
superTypeRefs.addAll(newSupertypes)
|
superTypeRefs.addAll(newSupertypes)
|
||||||
callbackOnSupertypesComputed?.invoke()
|
|
||||||
callbackOnSupertypesComputed = null
|
|
||||||
return this
|
return this
|
||||||
}
|
}
|
||||||
|
|
||||||
private var callbackOnSupertypesComputed: (() -> Unit)? = null
|
|
||||||
|
|
||||||
override fun setCallbackOnSupertypesComputed(callback: () -> Unit) {
|
|
||||||
callbackOnSupertypesComputed = callback
|
|
||||||
}
|
|
||||||
|
|
||||||
override fun replaceTypeRef(newTypeRef: FirTypeRef) {
|
override fun replaceTypeRef(newTypeRef: FirTypeRef) {
|
||||||
typeRef = newTypeRef
|
typeRef = newTypeRef
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user