mirror of
https://github.com/dart-lang/sdk
synced 2024-09-16 05:26:57 +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:
|
# Stats:
|
||||||
# - 42 "needsEvaluation"
|
# - 42 "needsEvaluation"
|
||||||
# - 345 "needsFix"
|
# - 344 "needsFix"
|
||||||
# - 406 "hasFix"
|
# - 407 "hasFix"
|
||||||
# - 516 "noFix"
|
# - 516 "noFix"
|
||||||
|
|
||||||
AnalysisOptionsErrorCode.INCLUDED_FILE_PARSE_ERROR:
|
AnalysisOptionsErrorCode.INCLUDED_FILE_PARSE_ERROR:
|
||||||
|
@ -2831,9 +2831,7 @@ ParserErrorCode.EXTRANEOUS_MODIFIER_IN_EXTENSION_TYPE:
|
||||||
ParserErrorCode.EXTRANEOUS_MODIFIER_IN_PRIMARY_CONSTRUCTOR:
|
ParserErrorCode.EXTRANEOUS_MODIFIER_IN_PRIMARY_CONSTRUCTOR:
|
||||||
status: needsEvaluation
|
status: needsEvaluation
|
||||||
ParserErrorCode.FACTORY_TOP_LEVEL_DECLARATION:
|
ParserErrorCode.FACTORY_TOP_LEVEL_DECLARATION:
|
||||||
status: needsFix
|
status: hasFix
|
||||||
notes: |-
|
|
||||||
Remove the `factory` keyword.
|
|
||||||
ParserErrorCode.FACTORY_WITH_INITIALIZERS:
|
ParserErrorCode.FACTORY_WITH_INITIALIZERS:
|
||||||
status: needsFix
|
status: needsFix
|
||||||
notes: |-
|
notes: |-
|
||||||
|
|
|
@ -1382,6 +1382,9 @@ final _builtInNonLintProducers = <ErrorCode, List<ProducerGenerator>>{
|
||||||
ParserErrorCode.EXTRANEOUS_MODIFIER: [
|
ParserErrorCode.EXTRANEOUS_MODIFIER: [
|
||||||
RemoveExtraModifier.new,
|
RemoveExtraModifier.new,
|
||||||
],
|
],
|
||||||
|
ParserErrorCode.FACTORY_TOP_LEVEL_DECLARATION: [
|
||||||
|
RemoveExtraModifier.new,
|
||||||
|
],
|
||||||
ParserErrorCode.FINAL_ENUM: [
|
ParserErrorCode.FINAL_ENUM: [
|
||||||
RemoveExtraModifier.new,
|
RemoveExtraModifier.new,
|
||||||
],
|
],
|
||||||
|
|
|
@ -319,6 +319,15 @@ static enum E { v }
|
||||||
''');
|
''');
|
||||||
await assertHasFix('''
|
await assertHasFix('''
|
||||||
enum E { v }
|
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