Skip to content

Commit 3f47c93

Browse files
pqCommit Queue
authored and
Commit Queue
committed
quick fix for EXTERNAL_TYPEDEF
See: #55917 Change-Id: I3826969b5f20b2140fb522ab1882e5f2330cab5e Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/369881 Commit-Queue: Brian Wilkerson <[email protected]> Reviewed-by: Brian Wilkerson <[email protected]> Auto-Submit: Phil Quitslund <[email protected]>
1 parent d31d0f9 commit 3f47c93

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-
# - 341 "needsFix"
49-
# - 410 "hasFix"
48+
# - 340 "needsFix"
49+
# - 411 "hasFix"
5050
# - 516 "noFix"
5151

5252
AnalysisOptionsErrorCode.INCLUDED_FILE_PARSE_ERROR:
@@ -2815,9 +2815,7 @@ ParserErrorCode.EXTERNAL_SETTER_WITH_BODY:
28152815
notes: |-
28162816
Remove the `external` keyword, or remove the body.
28172817
ParserErrorCode.EXTERNAL_TYPEDEF:
2818-
status: needsFix
2819-
notes: |-
2820-
Remove the `external` keyword.
2818+
status: hasFix
28212819
ParserErrorCode.EXTRANEOUS_MODIFIER:
28222820
status: hasFix
28232821
ParserErrorCode.EXTRANEOUS_MODIFIER_IN_EXTENSION_TYPE:

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1388,6 +1388,9 @@ final _builtInNonLintProducers = <ErrorCode, List<ProducerGenerator>>{
13881388
ParserErrorCode.EXTERNAL_ENUM: [
13891389
RemoveExtraModifier.new,
13901390
],
1391+
ParserErrorCode.EXTERNAL_TYPEDEF: [
1392+
RemoveExtraModifier.new,
1393+
],
13911394
ParserErrorCode.EXTRANEOUS_MODIFIER: [
13921395
RemoveExtraModifier.new,
13931396
],

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
@@ -213,6 +213,15 @@ enum E { o }
213213
''');
214214
}
215215

216+
Future<void> test_externalTypedef() async {
217+
await resolveTestCode('''
218+
external typedef T();
219+
''');
220+
await assertHasFix('''
221+
typedef T();
222+
''');
223+
}
224+
216225
Future<void> test_final_constructor() async {
217226
await resolveTestCode('''
218227
class C {

0 commit comments

Comments
 (0)