quick fix for FINAL_MIXIN_CLASS

Change-Id: Ief41674c064116a6152f413bf42a2d23b404eda2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/369504
Auto-Submit: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
This commit is contained in:
pq 2024-06-04 00:44:41 +00:00 committed by Commit Queue
parent feea19e376
commit a35de7937c
3 changed files with 15 additions and 5 deletions

View file

@ -45,8 +45,8 @@
#
# Stats:
# - 42 "needsEvaluation"
# - 348 "needsFix"
# - 403 "hasFix"
# - 347 "needsFix"
# - 404 "hasFix"
# - 516 "noFix"
AnalysisOptionsErrorCode.INCLUDED_FILE_PARSE_ERROR:
@ -2869,9 +2869,7 @@ ParserErrorCode.FINAL_METHOD:
ParserErrorCode.FINAL_MIXIN:
status: hasFix
ParserErrorCode.FINAL_MIXIN_CLASS:
status: needsFix
notes: |-
Remove the `final` keyword.
status: hasFix
ParserErrorCode.FUNCTION_TYPED_PARAMETER_VAR:
status: noFix
ParserErrorCode.GETTER_CONSTRUCTOR:

View file

@ -1391,6 +1391,9 @@ final _builtInNonLintProducers = <ErrorCode, List<ProducerGenerator>>{
ParserErrorCode.FINAL_MIXIN: [
RemoveExtraModifier.new,
],
ParserErrorCode.FINAL_MIXIN_CLASS: [
RemoveExtraModifier.new,
],
ParserErrorCode.GETTER_WITH_PARAMETERS: [
RemoveParametersInGetterDeclaration.new,
],

View file

@ -217,6 +217,15 @@ mixin M {}
''');
}
Future<void> test_finalMixinClass() async {
await resolveTestCode('''
final mixin class A {}
''');
await assertHasFix('''
mixin class A {}
''');
}
Future<void> test_interfaceMixin() async {
await resolveTestCode('''
interface mixin M {}