diff --git a/compiler/fir/java/src/org/jetbrains/kotlin/fir/java/declarations/FirJavaClass.kt b/compiler/fir/java/src/org/jetbrains/kotlin/fir/java/declarations/FirJavaClass.kt index abbe06bd774..1b113537190 100644 --- a/compiler/fir/java/src/org/jetbrains/kotlin/fir/java/declarations/FirJavaClass.kt +++ b/compiler/fir/java/src/org/jetbrains/kotlin/fir/java/declarations/FirJavaClass.kt @@ -59,8 +59,5 @@ class FirJavaClass internal constructor( 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 } diff --git a/compiler/fir/tree/src/org/jetbrains/kotlin/fir/declarations/FirRegularClass.kt b/compiler/fir/tree/src/org/jetbrains/kotlin/fir/declarations/FirRegularClass.kt index c94ec0690f0..13b6185a5cc 100644 --- a/compiler/fir/tree/src/org/jetbrains/kotlin/fir/declarations/FirRegularClass.kt +++ b/compiler/fir/tree/src/org/jetbrains/kotlin/fir/declarations/FirRegularClass.kt @@ -37,7 +37,6 @@ interface FirRegularClass : FirClass, @VisitedSupertype FirClassLikeDeclaration< fun replaceSupertypes(newSupertypes: List): FirRegularClass - fun setCallbackOnSupertypesComputed(callback: () -> Unit) } val FirRegularClass.classId get() = symbol.classId diff --git a/compiler/fir/tree/src/org/jetbrains/kotlin/fir/declarations/impl/FirClassImpl.kt b/compiler/fir/tree/src/org/jetbrains/kotlin/fir/declarations/impl/FirClassImpl.kt index 3cfa88a7ede..86ead4a94ce 100644 --- a/compiler/fir/tree/src/org/jetbrains/kotlin/fir/declarations/impl/FirClassImpl.kt +++ b/compiler/fir/tree/src/org/jetbrains/kotlin/fir/declarations/impl/FirClassImpl.kt @@ -64,8 +64,6 @@ open class FirClassImpl( override fun replaceSupertypes(newSupertypes: List): FirRegularClass { superTypeRefs.clear() superTypeRefs.addAll(newSupertypes) - callbackOnSupertypesComputed?.invoke() - callbackOnSupertypesComputed = null return this } @@ -80,11 +78,5 @@ open class FirClassImpl( return result } - private var callbackOnSupertypesComputed: (() -> Unit)? = null - - override fun setCallbackOnSupertypesComputed(callback: () -> Unit) { - callbackOnSupertypesComputed = callback - } - override var supertypesComputationStatus = FirClassLikeDeclaration.SupertypesComputationStatus.NOT_COMPUTED } diff --git a/compiler/fir/tree/src/org/jetbrains/kotlin/fir/declarations/impl/FirEnumEntryImpl.kt b/compiler/fir/tree/src/org/jetbrains/kotlin/fir/declarations/impl/FirEnumEntryImpl.kt index 6df62866a42..900be137105 100644 --- a/compiler/fir/tree/src/org/jetbrains/kotlin/fir/declarations/impl/FirEnumEntryImpl.kt +++ b/compiler/fir/tree/src/org/jetbrains/kotlin/fir/declarations/impl/FirEnumEntryImpl.kt @@ -54,17 +54,9 @@ class FirEnumEntryImpl( override fun replaceSupertypes(newSupertypes: List): FirRegularClass { superTypeRefs.clear() superTypeRefs.addAll(newSupertypes) - callbackOnSupertypesComputed?.invoke() - callbackOnSupertypesComputed = null return this } - private var callbackOnSupertypesComputed: (() -> Unit)? = null - - override fun setCallbackOnSupertypesComputed(callback: () -> Unit) { - callbackOnSupertypesComputed = callback - } - override fun replaceTypeRef(newTypeRef: FirTypeRef) { typeRef = newTypeRef }