FirConstPropertyChecker: add some TODOs
This commit is contained in:
+9
-1
@@ -18,7 +18,15 @@ object FirConstPropertyChecker : FirPropertyChecker() {
|
||||
override fun check(declaration: FirProperty, context: CheckerContext, reporter: DiagnosticReporter) {
|
||||
if (!declaration.isConst) return
|
||||
val classKind = (context.containingDeclarations.lastOrNull() as? FirRegularClass)?.classKind
|
||||
if (classKind != ClassKind.OBJECT && context.containingDeclarations.size > 1)
|
||||
if (classKind != ClassKind.OBJECT && context.containingDeclarations.size > 1) {
|
||||
reporter.reportOn(declaration.source, FirErrors.CONST_VAL_NOT_TOP_LEVEL_OR_OBJECT, context)
|
||||
}
|
||||
|
||||
// TODO: Implement checkers for these errors (see ConstModifierChecker in FE1.0):
|
||||
// - CONST_VAL_WITH_DELEGATE
|
||||
// - CONST_VAL_WITH_GETTER
|
||||
// - TYPE_CANT_BE_USED_FOR_CONST_VAL
|
||||
// - CONST_VAL_WITHOUT_INITIALIZER
|
||||
// - CONST_VAL_WITH_NON_CONST_INITIALIZER
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user