FIR: remove beforeRunningAllComponentsOnElement/beforeRunningSingleComponentOnElement from AbstractDiagnosticCollectorVisitor

This commit is contained in:
Ilya Kirillov
2021-04-16 18:03:20 +02:00
parent 41e822e8cb
commit eed143d17b
3 changed files with 5 additions and 10 deletions
@@ -29,9 +29,6 @@ abstract class AbstractDiagnosticCollectorVisitor(
protected val components: List<AbstractDiagnosticCollectorComponent>,
) : FirDefaultVisitor<Unit, Nothing?>() {
protected open fun beforeRunningAllComponentsOnElement(element: FirElement) {}
protected open fun beforeRunningSingleComponentOnElement(element: FirElement) {}
protected open fun shouldVisitDeclaration(declaration: FirDeclaration) = true
protected open fun onDeclarationExit(declaration: FirDeclaration) {}
@@ -19,9 +19,7 @@ open class CheckerRunningDiagnosticCollectorVisitor(
}
override fun runComponents(element: FirElement) {
beforeRunningAllComponentsOnElement(element)
components.forEach {
beforeRunningSingleComponentOnElement(element)
element.accept(it, context)
}
}