quick fix for SEALED_MIXIN

Change-Id: Ib0c2cbe337d1b5acc7e3b341d57ded83b6957cdf
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/368961
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Auto-Submit: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
This commit is contained in:
pq 2024-05-31 17:26:30 +00:00 committed by Commit Queue
parent 43791032fc
commit 8cb19d85f0
3 changed files with 15 additions and 5 deletions

View file

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

View file

@ -1415,6 +1415,9 @@ final _builtInNonLintProducers = {
ParserErrorCode.RECORD_TYPE_ONE_POSITIONAL_NO_TRAILING_COMMA: [
AddTrailingComma.new,
],
ParserErrorCode.SEALED_MIXIN: [
RemoveExtraModifier.new,
],
ParserErrorCode.SEALED_MIXIN_CLASS: [
RemoveExtraModifier.new,
],

View file

@ -237,6 +237,15 @@ class C {
''');
}
Future<void> test_sealed_mixin() async {
await resolveTestCode('''
sealed mixin M {}
''');
await assertHasFix('''
mixin M {}
''');
}
Future<void> test_staticTopLevelDeclaration_enum() async {
await resolveTestCode(r'''
static enum E { v }