FIR: Get rid of FirRegularClass::setCallbackOnSupertypesComputed

This commit is contained in:
Denis Zharkov
2019-08-27 20:12:27 +03:00
parent 122c229a8b
commit 106b6c901d
4 changed files with 0 additions and 20 deletions
@@ -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
}
@@ -37,7 +37,6 @@ interface FirRegularClass : FirClass, @VisitedSupertype FirClassLikeDeclaration<
fun replaceSupertypes(newSupertypes: List<FirTypeRef>): FirRegularClass
fun setCallbackOnSupertypesComputed(callback: () -> Unit)
}
val FirRegularClass.classId get() = symbol.classId
@@ -64,8 +64,6 @@ open class FirClassImpl(
override fun replaceSupertypes(newSupertypes: List<FirTypeRef>): 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
}
@@ -54,17 +54,9 @@ class FirEnumEntryImpl(
override fun replaceSupertypes(newSupertypes: List<FirTypeRef>): 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
}