mirror of
https://github.com/dart-lang/sdk
synced 2024-09-06 00:59:09 +00:00
quick fix for FACTORY_TOP_LEVEL_DECLARATION
Change-Id: I77fad91ead543c7be5d532d0c2f5240ec5146635 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/369763 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:
parent
1c692c7b71
commit
1e6bc6697a
|
@ -45,8 +45,8 @@
|
|||
#
|
||||
# Stats:
|
||||
# - 42 "needsEvaluation"
|
||||
# - 345 "needsFix"
|
||||
# - 406 "hasFix"
|
||||
# - 344 "needsFix"
|
||||
# - 407 "hasFix"
|
||||
# - 516 "noFix"
|
||||
|
||||
AnalysisOptionsErrorCode.INCLUDED_FILE_PARSE_ERROR:
|
||||
|
@ -2831,9 +2831,7 @@ ParserErrorCode.EXTRANEOUS_MODIFIER_IN_EXTENSION_TYPE:
|
|||
ParserErrorCode.EXTRANEOUS_MODIFIER_IN_PRIMARY_CONSTRUCTOR:
|
||||
status: needsEvaluation
|
||||
ParserErrorCode.FACTORY_TOP_LEVEL_DECLARATION:
|
||||
status: needsFix
|
||||
notes: |-
|
||||
Remove the `factory` keyword.
|
||||
status: hasFix
|
||||
ParserErrorCode.FACTORY_WITH_INITIALIZERS:
|
||||
status: needsFix
|
||||
notes: |-
|
||||
|
|
|
@ -1382,6 +1382,9 @@ final _builtInNonLintProducers = <ErrorCode, List<ProducerGenerator>>{
|
|||
ParserErrorCode.EXTRANEOUS_MODIFIER: [
|
||||
RemoveExtraModifier.new,
|
||||
],
|
||||
ParserErrorCode.FACTORY_TOP_LEVEL_DECLARATION: [
|
||||
RemoveExtraModifier.new,
|
||||
],
|
||||
ParserErrorCode.FINAL_ENUM: [
|
||||
RemoveExtraModifier.new,
|
||||
],
|
||||
|
|
|
@ -319,6 +319,15 @@ static enum E { v }
|
|||
''');
|
||||
await assertHasFix('''
|
||||
enum E { v }
|
||||
''');
|
||||
}
|
||||
|
||||
Future<void> test_topLevel_factoryDeclaration() async {
|
||||
await resolveTestCode(r'''
|
||||
factory class C {}
|
||||
''');
|
||||
await assertHasFix('''
|
||||
class C {}
|
||||
''');
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue