Skip to content

Commit 4ecea4b

Browse files
pqCommit Queue
authored and
Commit Queue
committed
quick fix for EXTERNAL_CLASS
See: #55917 Change-Id: I330f1c571de0ecc4b2cef390ee98dd008dec9afc Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/369785 Reviewed-by: Brian Wilkerson <[email protected]> Commit-Queue: Brian Wilkerson <[email protected]> Commit-Queue: Phil Quitslund <[email protected]> Auto-Submit: Phil Quitslund <[email protected]>
1 parent 8716461 commit 4ecea4b

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-
# - 343 "needsFix"
49-
# - 408 "hasFix"
48+
# - 342 "needsFix"
49+
# - 409 "hasFix"
5050
# - 516 "noFix"
5151

5252
AnalysisOptionsErrorCode.INCLUDED_FILE_PARSE_ERROR:
@@ -2767,9 +2767,7 @@ ParserErrorCode.EXTENSION_TYPE_EXTENDS:
27672767
ParserErrorCode.EXTENSION_TYPE_WITH:
27682768
status: needsEvaluation
27692769
ParserErrorCode.EXTERNAL_CLASS:
2770-
status: needsFix
2771-
notes: |-
2772-
Remove the `external` keyword.
2770+
status: hasFix
27732771
ParserErrorCode.EXTERNAL_CONSTRUCTOR_WITH_BODY:
27742772
status: needsFix
27752773
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
@@ -1382,6 +1382,9 @@ final _builtInNonLintProducers = <ErrorCode, List<ProducerGenerator>>{
13821382
ParserErrorCode.EXTENSION_DECLARES_CONSTRUCTOR: [
13831383
RemoveConstructor.new,
13841384
],
1385+
ParserErrorCode.EXTERNAL_CLASS: [
1386+
RemoveExtraModifier.new,
1387+
],
13851388
ParserErrorCode.EXTRANEOUS_MODIFIER: [
13861389
RemoveExtraModifier.new,
13871390
],

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
@@ -195,6 +195,15 @@ f() {
195195
''');
196196
}
197197

198+
Future<void> test_externalClass() async {
199+
await resolveTestCode(r'''
200+
external class C {}
201+
''');
202+
await assertHasFix('''
203+
class C {}
204+
''');
205+
}
206+
198207
Future<void> test_final_constructor() async {
199208
await resolveTestCode('''
200209
class C {

0 commit comments

Comments
 (0)