mirror of
https://github.com/dart-lang/sdk
synced 2024-10-14 14:53:37 +00:00
quick fix for EXTERNAL_ENUM
See: https://github.com/dart-lang/sdk/issues/55917 Change-Id: I0f60078bfcb3ae5ab6d559a9e2314abe209726bf Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/369880 Reviewed-by: Brian Wilkerson <brianwilkerson@google.com> Commit-Queue: Phil Quitslund <pquitslund@google.com> Auto-Submit: Phil Quitslund <pquitslund@google.com>
This commit is contained in:
parent
46ea7ade07
commit
d91f05c1c7
|
@ -45,8 +45,8 @@
|
|||
#
|
||||
# Stats:
|
||||
# - 42 "needsEvaluation"
|
||||
# - 342 "needsFix"
|
||||
# - 409 "hasFix"
|
||||
# - 341 "needsFix"
|
||||
# - 410 "hasFix"
|
||||
# - 516 "noFix"
|
||||
|
||||
AnalysisOptionsErrorCode.INCLUDED_FILE_PARSE_ERROR:
|
||||
|
@ -2781,9 +2781,7 @@ ParserErrorCode.EXTERNAL_CONSTRUCTOR_WITH_INITIALIZER:
|
|||
notes: |-
|
||||
Remove the `external` keyword or remove the initializers.
|
||||
ParserErrorCode.EXTERNAL_ENUM:
|
||||
status: needsFix
|
||||
notes: |-
|
||||
Remove the `external` keyword.
|
||||
status: hasFix
|
||||
ParserErrorCode.EXTERNAL_FACTORY_REDIRECTION:
|
||||
status: needsFix
|
||||
notes: |-
|
||||
|
|
|
@ -1385,6 +1385,9 @@ final _builtInNonLintProducers = <ErrorCode, List<ProducerGenerator>>{
|
|||
ParserErrorCode.EXTERNAL_CLASS: [
|
||||
RemoveExtraModifier.new,
|
||||
],
|
||||
ParserErrorCode.EXTERNAL_ENUM: [
|
||||
RemoveExtraModifier.new,
|
||||
],
|
||||
ParserErrorCode.EXTRANEOUS_MODIFIER: [
|
||||
RemoveExtraModifier.new,
|
||||
],
|
||||
|
|
|
@ -204,6 +204,15 @@ class C {}
|
|||
''');
|
||||
}
|
||||
|
||||
Future<void> test_externalEnum() async {
|
||||
await resolveTestCode(r'''
|
||||
external enum E { o }
|
||||
''');
|
||||
await assertHasFix('''
|
||||
enum E { o }
|
||||
''');
|
||||
}
|
||||
|
||||
Future<void> test_final_constructor() async {
|
||||
await resolveTestCode('''
|
||||
class C {
|
||||
|
|
Loading…
Reference in a new issue