quick fix for INTERFACE_MIXIN_CLASS

Change-Id: I43c57f27f17a0867beaa16db3f74bb20d2579629
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/369508
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Auto-Submit: Phil Quitslund <pquitslund@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
This commit is contained in:
pq 2024-06-04 14:29:48 +00:00 committed by Commit Queue
parent 320f367378
commit 4eaefacaaa
3 changed files with 15 additions and 5 deletions

View file

@ -45,8 +45,8 @@
#
# Stats:
# - 42 "needsEvaluation"
# - 347 "needsFix"
# - 404 "hasFix"
# - 346 "needsFix"
# - 405 "hasFix"
# - 516 "noFix"
AnalysisOptionsErrorCode.INCLUDED_FILE_PARSE_ERROR:
@ -2915,9 +2915,7 @@ ParserErrorCode.INTERFACE_ENUM:
ParserErrorCode.INTERFACE_MIXIN:
status: hasFix
ParserErrorCode.INTERFACE_MIXIN_CLASS:
status: needsFix
notes: |-
Remove the `interface` keyword.
status: hasFix
ParserErrorCode.INVALID_AWAIT_IN_FOR:
status: noFix
notes: |-

View file

@ -1400,6 +1400,9 @@ final _builtInNonLintProducers = <ErrorCode, List<ProducerGenerator>>{
ParserErrorCode.INTERFACE_MIXIN: [
RemoveExtraModifier.new,
],
ParserErrorCode.INTERFACE_MIXIN_CLASS: [
RemoveExtraModifier.new,
],
ParserErrorCode.INVALID_CONSTANT_PATTERN_BINARY: [
AddConst.new,
],

View file

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