quick fix for SEALED_MIXIN_CLASS

Change-Id: I32e120d40301ac6fe7e3f239b29e0127815be69d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/368882
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Auto-Submit: Phil Quitslund <pquitslund@google.com>
This commit is contained in:
pq 2024-05-30 21:28:40 +00:00 committed by Commit Queue
parent 6694cae4d7
commit 65bcf1b0ab
3 changed files with 15 additions and 5 deletions

View file

@ -45,8 +45,8 @@
#
# Stats:
# - 42 "needsEvaluation"
# - 354 "needsFix"
# - 397 "hasFix"
# - 353 "needsFix"
# - 398 "hasFix"
# - 516 "noFix"
AnalysisOptionsErrorCode.INCLUDED_FILE_PARSE_ERROR:
@ -3237,9 +3237,7 @@ ParserErrorCode.SEALED_MIXIN:
notes: |-
Remove the `sealed` keyword.
ParserErrorCode.SEALED_MIXIN_CLASS:
status: needsFix
notes: |-
Remove the `sealed` keyword.
status: hasFix
ParserErrorCode.SETTER_CONSTRUCTOR:
status: needsFix
notes: |-

View file

@ -1415,6 +1415,9 @@ final _builtInNonLintProducers = <ErrorCode, List<ProducerGenerator>>{
ParserErrorCode.RECORD_TYPE_ONE_POSITIONAL_NO_TRAILING_COMMA: [
AddTrailingComma.new,
],
ParserErrorCode.SEALED_MIXIN_CLASS: [
RemoveExtraModifier.new,
],
ParserErrorCode.VAR_AND_TYPE: [
RemoveTypeAnnotation.fixVarAndType,
RemoveVar.new,

View file

@ -131,6 +131,15 @@ typedef F();
''');
}
Future<void> test_class_sealed_mixin() async {
await resolveTestCode('''
sealed mixin class A {}
''');
await assertHasFix('''
mixin class A {}
''');
}
Future<void> test_covariantTopLevelDeclaration_class() async {
await resolveTestCode(r'''
covariant class C {}