[FIR] Create checker for simple enum entries with missing overrides
Complex enum entries (those with bodies) with missing overrides are covered by an existing checker that checks all types of classes. But simple enum entries (those without bodies) were not covered and require a separate checker for missing overrides. #KT-58637 Fixed
This commit is contained in:
@@ -5,6 +5,7 @@
|
||||
|
||||
package org.jetbrains.kotlin.fir.scopes
|
||||
|
||||
import org.jetbrains.kotlin.fir.symbols.impl.FirCallableSymbol
|
||||
import org.jetbrains.kotlin.fir.symbols.impl.FirNamedFunctionSymbol
|
||||
import org.jetbrains.kotlin.fir.symbols.impl.FirVariableSymbol
|
||||
import org.jetbrains.kotlin.name.Name
|
||||
@@ -27,6 +28,13 @@ fun FirContainingNamesAwareScope.processAllProperties(processor: (FirVariableSym
|
||||
}
|
||||
}
|
||||
|
||||
fun FirContainingNamesAwareScope.processAllCallables(processor: (FirCallableSymbol<*>) -> Unit) {
|
||||
for (name in getCallableNames()) {
|
||||
processFunctionsByName(name, processor)
|
||||
processPropertiesByName(name, processor)
|
||||
}
|
||||
}
|
||||
|
||||
fun FirContainingNamesAwareScope.collectAllProperties(): Collection<FirVariableSymbol<*>> {
|
||||
return mutableListOf<FirVariableSymbol<*>>().apply {
|
||||
processAllProperties(this::add)
|
||||
|
||||
Reference in New Issue
Block a user