Skip to content

Commit 3165f51

Browse files
dimonchik0036Space Team
authored and
Space Team
committed
[LL FIR] LLFirDiagnosticVisitor: drop unused useRegularComponents
^KT-68021
1 parent b274d81 commit 3165f51

File tree

1 file changed

+7
-9
lines changed

1 file changed

+7
-9
lines changed

analysis/low-level-api-fir/src/org/jetbrains/kotlin/analysis/low/level/api/fir/diagnostics/LLFirDiagnosticVisitor.kt

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2010-2023 JetBrains s.r.o. and Kotlin Programming Language contributors.
2+
* Copyright 2010-2024 JetBrains s.r.o. and Kotlin Programming Language contributors.
33
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
44
*/
55

@@ -30,23 +30,21 @@ internal open class LLFirDiagnosticVisitor(
3030
) : CheckerRunningDiagnosticCollectorVisitor(context, components) {
3131
private val beforeElementDiagnosticCollectionHandler = context.session.beforeElementDiagnosticCollectionHandler
3232

33-
protected var useRegularComponents = true
34-
3533
override fun visitNestedElements(element: FirElement) {
3634
if (element is FirDeclaration) {
3735
beforeElementDiagnosticCollectionHandler?.beforeGoingNestedDeclaration(element, context)
3836
}
37+
3938
super.visitNestedElements(element)
4039
}
4140

4241
override fun checkElement(element: FirElement) {
43-
if (useRegularComponents) {
44-
beforeElementDiagnosticCollectionHandler?.beforeCollectingForElement(element)
45-
components.regularComponents.forEach {
46-
checkCanceled()
47-
element.accept(it, context)
48-
}
42+
beforeElementDiagnosticCollectionHandler?.beforeCollectingForElement(element)
43+
components.regularComponents.forEach {
44+
checkCanceled()
45+
element.accept(it, context)
4946
}
47+
5048
checkCanceled()
5149
element.accept(components.reportCommitter, context)
5250

0 commit comments

Comments
 (0)