quick fix for INTERFACE_MIXIN

See: https://github.com/dart-lang/sdk/issues/55917

Change-Id: I536eb9bf75ad1c7df3e697c75874954f4a882905
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/369503
Commit-Queue: Phil Quitslund <pquitslund@google.com>
Auto-Submit: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
This commit is contained in:
pq 2024-06-03 22:41:59 +00:00 committed by Commit Queue
parent e832d98448
commit 3971aa9e4c
3 changed files with 15 additions and 5 deletions

View file

@ -45,8 +45,8 @@
#
# Stats:
# - 42 "needsEvaluation"
# - 349 "needsFix"
# - 402 "hasFix"
# - 348 "needsFix"
# - 403 "hasFix"
# - 516 "noFix"
AnalysisOptionsErrorCode.INCLUDED_FILE_PARSE_ERROR:
@ -2915,9 +2915,7 @@ ParserErrorCode.INITIALIZED_VARIABLE_IN_FOR_EACH:
ParserErrorCode.INTERFACE_ENUM:
status: needsEvaluation
ParserErrorCode.INTERFACE_MIXIN:
status: needsFix
notes: |-
Remove the `interface` keyword.
status: hasFix
ParserErrorCode.INTERFACE_MIXIN_CLASS:
status: needsFix
notes: |-

View file

@ -1394,6 +1394,9 @@ final _builtInNonLintProducers = {
ParserErrorCode.GETTER_WITH_PARAMETERS: [
RemoveParametersInGetterDeclaration.new,
],
ParserErrorCode.INTERFACE_MIXIN: [
RemoveExtraModifier.new,
],
ParserErrorCode.INVALID_CONSTANT_PATTERN_BINARY: [
AddConst.new,
],

View file

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