Skip to content

Commit d91f05c

Browse files
pqCommit Queue
authored and
Commit Queue
committed
quick fix for EXTERNAL_ENUM
See: #55917 Change-Id: I0f60078bfcb3ae5ab6d559a9e2314abe209726bf Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/369880 Reviewed-by: Brian Wilkerson <[email protected]> Commit-Queue: Phil Quitslund <[email protected]> Auto-Submit: Phil Quitslund <[email protected]>
1 parent 46ea7ad commit d91f05c

File tree

3 files changed

+15
-5
lines changed

3 files changed

+15
-5
lines changed

pkg/analysis_server/lib/src/services/correction/error_fix_status.yaml

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,8 @@
4545
#
4646
# Stats:
4747
# - 42 "needsEvaluation"
48-
# - 342 "needsFix"
49-
# - 409 "hasFix"
48+
# - 341 "needsFix"
49+
# - 410 "hasFix"
5050
# - 516 "noFix"
5151

5252
AnalysisOptionsErrorCode.INCLUDED_FILE_PARSE_ERROR:
@@ -2781,9 +2781,7 @@ ParserErrorCode.EXTERNAL_CONSTRUCTOR_WITH_INITIALIZER:
27812781
notes: |-
27822782
Remove the `external` keyword or remove the initializers.
27832783
ParserErrorCode.EXTERNAL_ENUM:
2784-
status: needsFix
2785-
notes: |-
2786-
Remove the `external` keyword.
2784+
status: hasFix
27872785
ParserErrorCode.EXTERNAL_FACTORY_REDIRECTION:
27882786
status: needsFix
27892787
notes: |-

pkg/analysis_server/lib/src/services/correction/fix_internal.dart

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1385,6 +1385,9 @@ final _builtInNonLintProducers = <ErrorCode, List<ProducerGenerator>>{
13851385
ParserErrorCode.EXTERNAL_CLASS: [
13861386
RemoveExtraModifier.new,
13871387
],
1388+
ParserErrorCode.EXTERNAL_ENUM: [
1389+
RemoveExtraModifier.new,
1390+
],
13881391
ParserErrorCode.EXTRANEOUS_MODIFIER: [
13891392
RemoveExtraModifier.new,
13901393
],

pkg/analysis_server/test/src/services/correction/fix/remove_extra_modifier_test.dart

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -204,6 +204,15 @@ class C {}
204204
''');
205205
}
206206

207+
Future<void> test_externalEnum() async {
208+
await resolveTestCode(r'''
209+
external enum E { o }
210+
''');
211+
await assertHasFix('''
212+
enum E { o }
213+
''');
214+
}
215+
207216
Future<void> test_final_constructor() async {
208217
await resolveTestCode('''
209218
class C {

0 commit comments

Comments
 (0)