提交 83688124 编写于 作者: J Jinseong Jeon 提交者: Dmitriy Novozhilov

Minor cleanup: avoid vague util names

上级 8b24f4b5
...@@ -75,19 +75,7 @@ internal fun checkExpectDeclarationVisibilityAndBody( ...@@ -75,19 +75,7 @@ internal fun checkExpectDeclarationVisibilityAndBody(
} }
} }
internal fun checkProperty( internal fun checkPropertyInitializer(
containingClass: FirRegularClass?,
property: FirProperty,
modifierList: FirModifierList?,
isInitialized: Boolean,
reporter: DiagnosticReporter,
context: CheckerContext
) {
checkPropertyInitializer(containingClass, property, modifierList, isInitialized, reporter, context)
checkPropertyAccessors(property, reporter, context)
}
private fun checkPropertyInitializer(
containingClass: FirRegularClass?, containingClass: FirRegularClass?,
property: FirProperty, property: FirProperty,
modifierList: FirModifierList?, modifierList: FirModifierList?,
...@@ -166,7 +154,7 @@ private fun checkPropertyInitializer( ...@@ -166,7 +154,7 @@ private fun checkPropertyInitializer(
} }
} }
private fun checkPropertyAccessors( internal fun checkPropertyAccessors(
property: FirProperty, property: FirProperty,
reporter: DiagnosticReporter, reporter: DiagnosticReporter,
context: CheckerContext context: CheckerContext
......
...@@ -148,7 +148,8 @@ object FirMemberPropertiesChecker : FirRegularClassChecker() { ...@@ -148,7 +148,8 @@ object FirMemberPropertiesChecker : FirRegularClassChecker() {
// So, our source of truth should be the full modifier list retrieved from the source. // So, our source of truth should be the full modifier list retrieved from the source.
val modifierList = with(FirModifierList) { property.source.getModifierList() } val modifierList = with(FirModifierList) { property.source.getModifierList() }
checkProperty(containingDeclaration, property, modifierList, isInitialized, reporter, context) checkPropertyInitializer(containingDeclaration, property, modifierList, isInitialized, reporter, context)
checkPropertyAccessors(property, reporter, context)
checkExpectDeclarationVisibilityAndBody(property, source, reporter, context) checkExpectDeclarationVisibilityAndBody(property, source, reporter, context)
val hasAbstractModifier = modifierList?.modifiers?.any { it.token == KtTokens.ABSTRACT_KEYWORD } == true val hasAbstractModifier = modifierList?.modifiers?.any { it.token == KtTokens.ABSTRACT_KEYWORD } == true
......
...@@ -28,7 +28,8 @@ object FirTopLevelPropertiesChecker : FirFileChecker() { ...@@ -28,7 +28,8 @@ object FirTopLevelPropertiesChecker : FirFileChecker() {
// So, our source of truth should be the full modifier list retrieved from the source. // So, our source of truth should be the full modifier list retrieved from the source.
val modifierList = with(FirModifierList) { source.getModifierList() } val modifierList = with(FirModifierList) { source.getModifierList() }
checkProperty(null, property, modifierList, property.initializer != null, reporter, context) checkPropertyInitializer(null, property, modifierList, property.initializer != null, reporter, context)
checkPropertyAccessors(property, reporter, context)
checkExpectDeclarationVisibilityAndBody(property, source, reporter, context) checkExpectDeclarationVisibilityAndBody(property, source, reporter, context)
} }
} }
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册