Skip to content

Commit 410c394

Browse files
parloughCommit Queue
authored and
Commit Queue
committed
[analyzer] Mark DEFAULT_LIST_CONSTRUCTOR as removed
Follow-up to https://dart-review.googlesource.com/c/sdk/+/276770 Change-Id: I583d19e3fab99594a12083381cc98cd1e453efcf Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/319641 Commit-Queue: Brian Wilkerson <[email protected]> Reviewed-by: Brian Wilkerson <[email protected]>
1 parent 0360930 commit 410c394

File tree

5 files changed

+1
-21
lines changed

5 files changed

+1
-21
lines changed

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

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -457,10 +457,6 @@ CompileTimeErrorCode.CONTINUE_LABEL_INVALID:
457457
status: noFix
458458
CompileTimeErrorCode.COULD_NOT_INFER:
459459
status: noFix
460-
CompileTimeErrorCode.DEFAULT_LIST_CONSTRUCTOR:
461-
status: noFix
462-
notes: |-
463-
Removed in Dart 3.0.
464460
CompileTimeErrorCode.DEFAULT_VALUE_IN_REDIRECTING_FACTORY_CONSTRUCTOR:
465461
status: needsFix
466462
notes: |-

pkg/analyzer/lib/src/error/codes.g.dart

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1115,17 +1115,6 @@ class CompileTimeErrorCode extends AnalyzerErrorCode {
11151115
"Couldn't infer type parameter '{0}'.{1}",
11161116
);
11171117

1118-
/// No parameters.
1119-
static const CompileTimeErrorCode DEFAULT_LIST_CONSTRUCTOR =
1120-
CompileTimeErrorCode(
1121-
'DEFAULT_LIST_CONSTRUCTOR',
1122-
"The default 'List' constructor isn't available when null safety is "
1123-
"enabled.",
1124-
correctionMessage:
1125-
"Try using a list literal, 'List.filled' or 'List.generate'.",
1126-
hasPublishedDocs: true,
1127-
);
1128-
11291118
/// No parameters.
11301119
static const CompileTimeErrorCode
11311120
DEFAULT_VALUE_IN_REDIRECTING_FACTORY_CONSTRUCTOR = CompileTimeErrorCode(

pkg/analyzer/lib/src/error/error_code_values.g.dart

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,6 @@ const List<ErrorCode> errorCodeValues = [
143143
CompileTimeErrorCode.CONST_WITH_UNDEFINED_CONSTRUCTOR_DEFAULT,
144144
CompileTimeErrorCode.CONTINUE_LABEL_INVALID,
145145
CompileTimeErrorCode.COULD_NOT_INFER,
146-
CompileTimeErrorCode.DEFAULT_LIST_CONSTRUCTOR,
147146
CompileTimeErrorCode.DEFAULT_VALUE_IN_REDIRECTING_FACTORY_CONSTRUCTOR,
148147
CompileTimeErrorCode.DEFAULT_VALUE_ON_REQUIRED_PARAMETER,
149148
CompileTimeErrorCode.DEFERRED_IMPORT_OF_EXTENSION,

pkg/analyzer/messages.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3296,6 +3296,7 @@ CompileTimeErrorCode:
32963296
Parameters:
32973297
0: the name of the non-type element
32983298
DEFAULT_LIST_CONSTRUCTOR:
3299+
removedIn: "3.2"
32993300
problemMessage: "The default 'List' constructor isn't available when null safety is enabled."
33003301
correctionMessage: "Try using a list literal, 'List.filled' or 'List.generate'."
33013302
hasPublishedDocs: true

pkg/analyzer/test/verify_diagnostics_test.dart

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -38,11 +38,6 @@ class DocumentationValidator {
3838
'CompileTimeErrorCode.CONST_CONSTRUCTOR_PARAM_TYPE_MISMATCH',
3939
// Produces two diagnostics when it should only produce one.
4040
'CompileTimeErrorCode.CONST_DEFERRED_CLASS',
41-
// These docs need to be published until there are few enough users that
42-
// are on a pre-3.0 SDK that we're OK with the possibility of them
43-
// encountering a broken link.
44-
// todo(pq): remove (some time) post 3.0
45-
'CompileTimeErrorCode.DEFAULT_LIST_CONSTRUCTOR',
4641
// The mock SDK doesn't define any internal libraries.
4742
'CompileTimeErrorCode.EXPORT_INTERNAL_LIBRARY',
4843
// Also reports CompileTimeErrorCode.SUBTYPE_OF_BASE_OR_FINAL_IS_NOT_BASE_FINAL_OR_SEALED

0 commit comments

Comments
 (0)