Version 2.14.0-2.0.dev
Merge commit 'fc03431d441cd960cd37bc362446ba2f37bf79d0' into 'dev'
diff --git a/.dart_tool/package_config.json b/.dart_tool/package_config.json
index 39f52b3..1224444 100644
--- a/.dart_tool/package_config.json
+++ b/.dart_tool/package_config.json
@@ -11,7 +11,7 @@
"constraint, update this by running tools/generate_package_config.dart."
],
"configVersion": 2,
- "generated": "2021-04-12T16:42:43.931842",
+ "generated": "2021-04-13T11:00:55.084091",
"generator": "tools/generate_package_config.dart",
"packages": [
{
diff --git a/CHANGELOG.md b/CHANGELOG.md
index d627fa9..7c2e449 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -8,6 +8,21 @@
daylight saving changes that are not precisely one hour.
(No change on the Web which uses the JavaScript `Date` object.)
+
+### Tools
+
+#### Linter
+
+Updated the Linter to `1.3.0`, which includes:
+
+- updated `non_constant_identifier_names` to check local variables, for-loop
+ initializers and catch clauses.
+- updated error range of `lines_longer_than_80_chars` to start at 80 to make
+ splitting easier.
+- new lint: `require_trailing_commas`.
+- new lint: `prefer_null_aware_method_calls`.
+
+
## 2.13.0
### Language
diff --git a/DEPS b/DEPS
index 9408e60..86b73eb 100644
--- a/DEPS
+++ b/DEPS
@@ -112,14 +112,14 @@
"http_multi_server_rev" : "7aca9e87d4a68374b685334f20359320054b8d7b",
"http_parser_rev": "5dd4d16693242049dfb43b5efa429fedbf932e98",
"http_retry_rev": "845771af7bb5ab38ab740ce4a31f3b0c7680302b",
- "http_rev": "615380db687d0649057ed8dba9d933d7d5f5051b",
+ "http_rev": "69d6064dd92470ed7ccd50a808fc789ee7716fe8",
"http_throttle_tag" : "1.0.2",
"icu_rev" : "81d656878ec611cb0b42d52c82e9dae93920d9ba",
"idl_parser_rev": "5fb1ebf49d235b5a70c9f49047e83b0654031eb7",
"intl_tag": "0.17.0-nullsafety",
"jinja2_rev": "2222b31554f03e62600cd7e383376a7c187967a1",
"json_rpc_2_rev": "b8dfe403fd8528fd14399dee3a6527b55802dd4d",
- "linter_tag": "1.2.1",
+ "linter_tag": "1.3.0",
"logging_rev": "e2f633b543ef89c54688554b15ca3d7e425b86a2",
"markupsafe_rev": "8f45f5cfa0009d2a70589bcda0349b8cb2b72783",
"markdown_rev": "9c4beaac96d8f008078e00b027915f81b665d2de",
diff --git a/pkg/analysis_server/test/src/cider/test_all.dart b/pkg/analysis_server/test/src/cider/test_all.dart
index 05483ca..524383b 100644
--- a/pkg/analysis_server/test/src/cider/test_all.dart
+++ b/pkg/analysis_server/test/src/cider/test_all.dart
@@ -2,8 +2,6 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
-// @dart = 2.9
-
import 'package:test_reflective_loader/test_reflective_loader.dart';
import 'assists_test.dart' as assists;
diff --git a/pkg/analysis_server/test/src/services/correction/fix/bulk/add_await_test.dart b/pkg/analysis_server/test/src/services/correction/fix/bulk/add_await_test.dart
index 66f6bdc..dc61da4 100644
--- a/pkg/analysis_server/test/src/services/correction/fix/bulk/add_await_test.dart
+++ b/pkg/analysis_server/test/src/services/correction/fix/bulk/add_await_test.dart
@@ -2,8 +2,6 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
-// @dart = 2.9
-
import 'package:analysis_server/src/services/linter/lint_names.dart';
import 'package:test_reflective_loader/test_reflective_loader.dart';
diff --git a/pkg/analysis_server/test/src/services/correction/fix/bulk/add_const_test.dart b/pkg/analysis_server/test/src/services/correction/fix/bulk/add_const_test.dart
index 0801465..d20eaf8 100644
--- a/pkg/analysis_server/test/src/services/correction/fix/bulk/add_const_test.dart
+++ b/pkg/analysis_server/test/src/services/correction/fix/bulk/add_const_test.dart
@@ -2,8 +2,6 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
-// @dart = 2.9
-
import 'package:analysis_server/src/services/linter/lint_names.dart';
import 'package:test_reflective_loader/test_reflective_loader.dart';
diff --git a/pkg/analysis_server/test/src/services/correction/fix/bulk/add_diagnostic_property_reference_test.dart b/pkg/analysis_server/test/src/services/correction/fix/bulk/add_diagnostic_property_reference_test.dart
index c0e7ad4..0fead9f 100644
--- a/pkg/analysis_server/test/src/services/correction/fix/bulk/add_diagnostic_property_reference_test.dart
+++ b/pkg/analysis_server/test/src/services/correction/fix/bulk/add_diagnostic_property_reference_test.dart
@@ -2,8 +2,6 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
-// @dart = 2.9
-
import 'package:analysis_server/src/services/linter/lint_names.dart';
import 'package:test_reflective_loader/test_reflective_loader.dart';
diff --git a/pkg/analysis_server/test/src/services/correction/fix/bulk/add_override_test.dart b/pkg/analysis_server/test/src/services/correction/fix/bulk/add_override_test.dart
index bbd1463..b62d97e 100644
--- a/pkg/analysis_server/test/src/services/correction/fix/bulk/add_override_test.dart
+++ b/pkg/analysis_server/test/src/services/correction/fix/bulk/add_override_test.dart
@@ -2,8 +2,6 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
-// @dart = 2.9
-
import 'package:analysis_server/src/services/linter/lint_names.dart';
import 'package:test_reflective_loader/test_reflective_loader.dart';
diff --git a/pkg/analysis_server/test/src/services/correction/fix/bulk/add_required_test.dart b/pkg/analysis_server/test/src/services/correction/fix/bulk/add_required_test.dart
index ba1b000..0be6d18 100644
--- a/pkg/analysis_server/test/src/services/correction/fix/bulk/add_required_test.dart
+++ b/pkg/analysis_server/test/src/services/correction/fix/bulk/add_required_test.dart
@@ -2,8 +2,6 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
-// @dart = 2.9
-
import 'package:analysis_server/src/services/linter/lint_names.dart';
import 'package:test_reflective_loader/test_reflective_loader.dart';
diff --git a/pkg/analysis_server/test/src/services/correction/fix/bulk/bulk_fix_processor.dart b/pkg/analysis_server/test/src/services/correction/fix/bulk/bulk_fix_processor.dart
index 82b04e2..6edfd24 100644
--- a/pkg/analysis_server/test/src/services/correction/fix/bulk/bulk_fix_processor.dart
+++ b/pkg/analysis_server/test/src/services/correction/fix/bulk/bulk_fix_processor.dart
@@ -2,14 +2,11 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
-// @dart = 2.9
-
import 'package:analysis_server/src/services/correction/bulk_fix_processor.dart';
import 'package:analysis_server/src/services/correction/change_workspace.dart';
import 'package:analyzer/src/dart/analysis/byte_store.dart';
import 'package:analyzer/src/services/available_declarations.dart';
import 'package:analyzer_plugin/protocol/protocol_common.dart';
-import 'package:analyzer_plugin/utilities/change_builder/change_workspace.dart';
import 'package:test/test.dart';
import '../../../../../abstract_single_unit.dart';
@@ -19,24 +16,24 @@
abstract class BulkFixProcessorTest extends AbstractSingleUnitTest {
/// The source change associated with the fix that was found, or `null` if
/// neither [assertHasFix] nor [assertHasFixAllFix] has been invoked.
- SourceChange change;
+ late SourceChange change;
/// The result of applying the [change] to the file content, or `null` if
/// neither [assertHasFix] nor [assertHasFixAllFix] has been invoked.
- String resultCode;
+ late String resultCode;
/// Return a list of the experiments that are to be enabled for tests in this
/// class, or `null` if there are no experiments that should be enabled.
- List<String> get experiments => null;
+ List<String>? get experiments => null;
/// Return the lint code being tested.
- String get lintCode => null;
+ String? get lintCode => null;
/// Return `true` if this test uses config files.
bool get useConfigFiles => false;
/// The workspace in which fixes contributor operates.
- ChangeWorkspace get workspace {
+ DartChangeWorkspace get workspace {
return DartChangeWorkspace([session]);
}
diff --git a/pkg/analysis_server/test/src/services/correction/fix/bulk/bulk_fix_processor_test.dart b/pkg/analysis_server/test/src/services/correction/fix/bulk/bulk_fix_processor_test.dart
index 991651f..09b2da5 100644
--- a/pkg/analysis_server/test/src/services/correction/fix/bulk/bulk_fix_processor_test.dart
+++ b/pkg/analysis_server/test/src/services/correction/fix/bulk/bulk_fix_processor_test.dart
@@ -2,8 +2,6 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
-// @dart = 2.9
-
import 'package:analysis_server/src/services/linter/lint_names.dart';
import 'package:test/test.dart';
import 'package:test_reflective_loader/test_reflective_loader.dart';
@@ -34,7 +32,7 @@
var processor = await computeFixes();
var changeMap = processor.changeMap;
- var errors = changeMap.libraryMap[testFile];
+ var errors = changeMap.libraryMap[testFile]!;
expect(errors, hasLength(1));
expect(errors[LintNames.unnecessary_new], 2);
}
diff --git a/pkg/analysis_server/test/src/services/correction/fix/bulk/convert_documentation_into_line_test.dart b/pkg/analysis_server/test/src/services/correction/fix/bulk/convert_documentation_into_line_test.dart
index 7773740..2094c37 100644
--- a/pkg/analysis_server/test/src/services/correction/fix/bulk/convert_documentation_into_line_test.dart
+++ b/pkg/analysis_server/test/src/services/correction/fix/bulk/convert_documentation_into_line_test.dart
@@ -2,8 +2,6 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
-// @dart = 2.9
-
import 'package:analysis_server/src/services/linter/lint_names.dart';
import 'package:test_reflective_loader/test_reflective_loader.dart';
diff --git a/pkg/analysis_server/test/src/services/correction/fix/bulk/convert_map_from_iterable_to_for_literal_test.dart b/pkg/analysis_server/test/src/services/correction/fix/bulk/convert_map_from_iterable_to_for_literal_test.dart
index 51d99c2..d9e3834 100644
--- a/pkg/analysis_server/test/src/services/correction/fix/bulk/convert_map_from_iterable_to_for_literal_test.dart
+++ b/pkg/analysis_server/test/src/services/correction/fix/bulk/convert_map_from_iterable_to_for_literal_test.dart
@@ -2,8 +2,6 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
-// @dart = 2.9
-
import 'package:analysis_server/src/services/linter/lint_names.dart';
import 'package:test_reflective_loader/test_reflective_loader.dart';
diff --git a/pkg/analysis_server/test/src/services/correction/fix/bulk/convert_to_contains_test.dart b/pkg/analysis_server/test/src/services/correction/fix/bulk/convert_to_contains_test.dart
index 65b9139..eacb1cc 100644
--- a/pkg/analysis_server/test/src/services/correction/fix/bulk/convert_to_contains_test.dart
+++ b/pkg/analysis_server/test/src/services/correction/fix/bulk/convert_to_contains_test.dart
@@ -2,8 +2,6 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
-// @dart = 2.9
-
import 'package:analysis_server/src/services/linter/lint_names.dart';
import 'package:test_reflective_loader/test_reflective_loader.dart';
diff --git a/pkg/analysis_server/test/src/services/correction/fix/bulk/convert_to_generic_function_syntax_test.dart b/pkg/analysis_server/test/src/services/correction/fix/bulk/convert_to_generic_function_syntax_test.dart
index dccf8b9..e279e12 100644
--- a/pkg/analysis_server/test/src/services/correction/fix/bulk/convert_to_generic_function_syntax_test.dart
+++ b/pkg/analysis_server/test/src/services/correction/fix/bulk/convert_to_generic_function_syntax_test.dart
@@ -2,8 +2,6 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
-// @dart = 2.9
-
import 'package:analysis_server/src/services/linter/lint_names.dart';
import 'package:test_reflective_loader/test_reflective_loader.dart';
diff --git a/pkg/analysis_server/test/src/services/correction/fix/bulk/convert_to_if_element_test.dart b/pkg/analysis_server/test/src/services/correction/fix/bulk/convert_to_if_element_test.dart
index 64cfc42..e965e54 100644
--- a/pkg/analysis_server/test/src/services/correction/fix/bulk/convert_to_if_element_test.dart
+++ b/pkg/analysis_server/test/src/services/correction/fix/bulk/convert_to_if_element_test.dart
@@ -2,8 +2,6 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
-// @dart = 2.9
-
import 'package:analysis_server/src/services/linter/lint_names.dart';
import 'package:test_reflective_loader/test_reflective_loader.dart';
diff --git a/pkg/analysis_server/test/src/services/correction/fix/bulk/convert_to_if_null_test.dart b/pkg/analysis_server/test/src/services/correction/fix/bulk/convert_to_if_null_test.dart
index 8c7b83f..5bca56c 100644
--- a/pkg/analysis_server/test/src/services/correction/fix/bulk/convert_to_if_null_test.dart
+++ b/pkg/analysis_server/test/src/services/correction/fix/bulk/convert_to_if_null_test.dart
@@ -2,8 +2,6 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
-// @dart = 2.9
-
import 'package:analysis_server/src/services/linter/lint_names.dart';
import 'package:test_reflective_loader/test_reflective_loader.dart';
diff --git a/pkg/analysis_server/test/src/services/correction/fix/bulk/convert_to_int_literal_test.dart b/pkg/analysis_server/test/src/services/correction/fix/bulk/convert_to_int_literal_test.dart
index b154097..32b17ce 100644
--- a/pkg/analysis_server/test/src/services/correction/fix/bulk/convert_to_int_literal_test.dart
+++ b/pkg/analysis_server/test/src/services/correction/fix/bulk/convert_to_int_literal_test.dart
@@ -2,8 +2,6 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
-// @dart = 2.9
-
import 'package:analysis_server/src/services/linter/lint_names.dart';
import 'package:test_reflective_loader/test_reflective_loader.dart';
diff --git a/pkg/analysis_server/test/src/services/correction/fix/bulk/convert_to_is_not_test.dart b/pkg/analysis_server/test/src/services/correction/fix/bulk/convert_to_is_not_test.dart
index 3fe2ff6..42a907d 100644
--- a/pkg/analysis_server/test/src/services/correction/fix/bulk/convert_to_is_not_test.dart
+++ b/pkg/analysis_server/test/src/services/correction/fix/bulk/convert_to_is_not_test.dart
@@ -2,8 +2,6 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
-// @dart = 2.9
-
import 'package:analysis_server/src/services/linter/lint_names.dart';
import 'package:test_reflective_loader/test_reflective_loader.dart';
diff --git a/pkg/analysis_server/test/src/services/correction/fix/bulk/convert_to_list_literal_test.dart b/pkg/analysis_server/test/src/services/correction/fix/bulk/convert_to_list_literal_test.dart
index c130c0b..af7f3cb 100644
--- a/pkg/analysis_server/test/src/services/correction/fix/bulk/convert_to_list_literal_test.dart
+++ b/pkg/analysis_server/test/src/services/correction/fix/bulk/convert_to_list_literal_test.dart
@@ -2,8 +2,6 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
-// @dart = 2.9
-
import 'package:analysis_server/src/services/linter/lint_names.dart';
import 'package:test_reflective_loader/test_reflective_loader.dart';
diff --git a/pkg/analysis_server/test/src/services/correction/fix/bulk/convert_to_map_literal_test.dart b/pkg/analysis_server/test/src/services/correction/fix/bulk/convert_to_map_literal_test.dart
index b018ce0..cb02894 100644
--- a/pkg/analysis_server/test/src/services/correction/fix/bulk/convert_to_map_literal_test.dart
+++ b/pkg/analysis_server/test/src/services/correction/fix/bulk/convert_to_map_literal_test.dart
@@ -2,8 +2,6 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
-// @dart = 2.9
-
import 'package:analysis_server/src/services/linter/lint_names.dart';
import 'package:test_reflective_loader/test_reflective_loader.dart';
diff --git a/pkg/analysis_server/test/src/services/correction/fix/bulk/convert_to_null_aware_test.dart b/pkg/analysis_server/test/src/services/correction/fix/bulk/convert_to_null_aware_test.dart
index 45b117a..e30e7d7 100644
--- a/pkg/analysis_server/test/src/services/correction/fix/bulk/convert_to_null_aware_test.dart
+++ b/pkg/analysis_server/test/src/services/correction/fix/bulk/convert_to_null_aware_test.dart
@@ -2,8 +2,6 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
-// @dart = 2.9
-
import 'package:analysis_server/src/services/linter/lint_names.dart';
import 'package:test_reflective_loader/test_reflective_loader.dart';
diff --git a/pkg/analysis_server/test/src/services/correction/fix/bulk/convert_to_package_import_test.dart b/pkg/analysis_server/test/src/services/correction/fix/bulk/convert_to_package_import_test.dart
index 8bec06f..3c8cf2b 100644
--- a/pkg/analysis_server/test/src/services/correction/fix/bulk/convert_to_package_import_test.dart
+++ b/pkg/analysis_server/test/src/services/correction/fix/bulk/convert_to_package_import_test.dart
@@ -2,8 +2,6 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
-// @dart = 2.9
-
import 'package:analysis_server/src/services/linter/lint_names.dart';
import 'package:test_reflective_loader/test_reflective_loader.dart';
diff --git a/pkg/analysis_server/test/src/services/correction/fix/bulk/convert_to_relative_import_test.dart b/pkg/analysis_server/test/src/services/correction/fix/bulk/convert_to_relative_import_test.dart
index 78f50bf..40b022f 100644
--- a/pkg/analysis_server/test/src/services/correction/fix/bulk/convert_to_relative_import_test.dart
+++ b/pkg/analysis_server/test/src/services/correction/fix/bulk/convert_to_relative_import_test.dart
@@ -2,8 +2,6 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
-// @dart = 2.9
-
import 'package:analysis_server/src/services/linter/lint_names.dart';
import 'package:test_reflective_loader/test_reflective_loader.dart';
diff --git a/pkg/analysis_server/test/src/services/correction/fix/bulk/convert_to_set_literal_test.dart b/pkg/analysis_server/test/src/services/correction/fix/bulk/convert_to_set_literal_test.dart
index 0ee4a40..bfcaf1c 100644
--- a/pkg/analysis_server/test/src/services/correction/fix/bulk/convert_to_set_literal_test.dart
+++ b/pkg/analysis_server/test/src/services/correction/fix/bulk/convert_to_set_literal_test.dart
@@ -2,8 +2,6 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
-// @dart = 2.9
-
import 'package:analysis_server/src/services/linter/lint_names.dart';
import 'package:test_reflective_loader/test_reflective_loader.dart';
diff --git a/pkg/analysis_server/test/src/services/correction/fix/bulk/convert_to_single_quoted_strings_test.dart b/pkg/analysis_server/test/src/services/correction/fix/bulk/convert_to_single_quoted_strings_test.dart
index 92d1d10..68a54c0 100644
--- a/pkg/analysis_server/test/src/services/correction/fix/bulk/convert_to_single_quoted_strings_test.dart
+++ b/pkg/analysis_server/test/src/services/correction/fix/bulk/convert_to_single_quoted_strings_test.dart
@@ -2,8 +2,6 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
-// @dart = 2.9
-
import 'package:analysis_server/src/services/linter/lint_names.dart';
import 'package:test_reflective_loader/test_reflective_loader.dart';
diff --git a/pkg/analysis_server/test/src/services/correction/fix/bulk/convert_to_spread_test.dart b/pkg/analysis_server/test/src/services/correction/fix/bulk/convert_to_spread_test.dart
index 6219446..ddbdc0a 100644
--- a/pkg/analysis_server/test/src/services/correction/fix/bulk/convert_to_spread_test.dart
+++ b/pkg/analysis_server/test/src/services/correction/fix/bulk/convert_to_spread_test.dart
@@ -2,8 +2,6 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
-// @dart = 2.9
-
import 'package:analysis_server/src/services/linter/lint_names.dart';
import 'package:test_reflective_loader/test_reflective_loader.dart';
diff --git a/pkg/analysis_server/test/src/services/correction/fix/bulk/convert_to_where_type_test.dart b/pkg/analysis_server/test/src/services/correction/fix/bulk/convert_to_where_type_test.dart
index c0a382f2..62788ef 100644
--- a/pkg/analysis_server/test/src/services/correction/fix/bulk/convert_to_where_type_test.dart
+++ b/pkg/analysis_server/test/src/services/correction/fix/bulk/convert_to_where_type_test.dart
@@ -2,8 +2,6 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
-// @dart = 2.9
-
import 'package:analysis_server/src/services/linter/lint_names.dart';
import 'package:test_reflective_loader/test_reflective_loader.dart';
diff --git a/pkg/analysis_server/test/src/services/correction/fix/bulk/create_method_test.dart b/pkg/analysis_server/test/src/services/correction/fix/bulk/create_method_test.dart
index c111c46..cf17881 100644
--- a/pkg/analysis_server/test/src/services/correction/fix/bulk/create_method_test.dart
+++ b/pkg/analysis_server/test/src/services/correction/fix/bulk/create_method_test.dart
@@ -2,8 +2,6 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
-// @dart = 2.9
-
import 'package:analysis_server/src/services/linter/lint_names.dart';
import 'package:test_reflective_loader/test_reflective_loader.dart';
diff --git a/pkg/analysis_server/test/src/services/correction/fix/bulk/data_driven_test.dart b/pkg/analysis_server/test/src/services/correction/fix/bulk/data_driven_test.dart
index 0c50eda..f7ff8af 100644
--- a/pkg/analysis_server/test/src/services/correction/fix/bulk/data_driven_test.dart
+++ b/pkg/analysis_server/test/src/services/correction/fix/bulk/data_driven_test.dart
@@ -2,8 +2,6 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
-// @dart = 2.9
-
import 'package:analysis_server/src/services/correction/bulk_fix_processor.dart';
import 'package:analysis_server/src/services/correction/dart/data_driven.dart';
import 'package:analysis_server/src/services/correction/fix/data_driven/transform_set_manager.dart';
@@ -518,9 +516,9 @@
.map((e) => e.key.uniqueName),
};
- for (final code in BulkFixProcessor.nonLintMultiProducerMap.keys) {
- for (final producerFunc
- in BulkFixProcessor.nonLintMultiProducerMap[code]) {
+ for (final entry in BulkFixProcessor.nonLintMultiProducerMap.entries) {
+ var code = entry.key;
+ for (final producerFunc in entry.value) {
final producer = producerFunc();
if (producer is DataDriven) {
dataDrivenCodes.add(code.uniqueName);
diff --git a/pkg/analysis_server/test/src/services/correction/fix/bulk/inline_invocation_test.dart b/pkg/analysis_server/test/src/services/correction/fix/bulk/inline_invocation_test.dart
index 8ec7bb0..b34d124 100644
--- a/pkg/analysis_server/test/src/services/correction/fix/bulk/inline_invocation_test.dart
+++ b/pkg/analysis_server/test/src/services/correction/fix/bulk/inline_invocation_test.dart
@@ -2,8 +2,6 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
-// @dart = 2.9
-
import 'package:analysis_server/src/services/linter/lint_names.dart';
import 'package:test_reflective_loader/test_reflective_loader.dart';
diff --git a/pkg/analysis_server/test/src/services/correction/fix/bulk/inline_typedef_test.dart b/pkg/analysis_server/test/src/services/correction/fix/bulk/inline_typedef_test.dart
index 0673ac0..c2612f9 100644
--- a/pkg/analysis_server/test/src/services/correction/fix/bulk/inline_typedef_test.dart
+++ b/pkg/analysis_server/test/src/services/correction/fix/bulk/inline_typedef_test.dart
@@ -2,8 +2,6 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
-// @dart = 2.9
-
import 'package:analysis_server/src/services/linter/lint_names.dart';
import 'package:test_reflective_loader/test_reflective_loader.dart';
diff --git a/pkg/analysis_server/test/src/services/correction/fix/bulk/make_final_test.dart b/pkg/analysis_server/test/src/services/correction/fix/bulk/make_final_test.dart
index 4af5171..21724f2 100644
--- a/pkg/analysis_server/test/src/services/correction/fix/bulk/make_final_test.dart
+++ b/pkg/analysis_server/test/src/services/correction/fix/bulk/make_final_test.dart
@@ -2,8 +2,6 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
-// @dart = 2.9
-
import 'package:analysis_server/src/services/linter/lint_names.dart';
import 'package:test_reflective_loader/test_reflective_loader.dart';
diff --git a/pkg/analysis_server/test/src/services/correction/fix/bulk/remove_argument_test.dart b/pkg/analysis_server/test/src/services/correction/fix/bulk/remove_argument_test.dart
index 613c373..7d87ea4 100644
--- a/pkg/analysis_server/test/src/services/correction/fix/bulk/remove_argument_test.dart
+++ b/pkg/analysis_server/test/src/services/correction/fix/bulk/remove_argument_test.dart
@@ -2,8 +2,6 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
-// @dart = 2.9
-
import 'package:analysis_server/src/services/linter/lint_names.dart';
import 'package:test_reflective_loader/test_reflective_loader.dart';
diff --git a/pkg/analysis_server/test/src/services/correction/fix/bulk/remove_await_test.dart b/pkg/analysis_server/test/src/services/correction/fix/bulk/remove_await_test.dart
index 85c8868..b1c9f97 100644
--- a/pkg/analysis_server/test/src/services/correction/fix/bulk/remove_await_test.dart
+++ b/pkg/analysis_server/test/src/services/correction/fix/bulk/remove_await_test.dart
@@ -2,8 +2,6 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
-// @dart = 2.9
-
import 'package:analysis_server/src/services/linter/lint_names.dart';
import 'package:test_reflective_loader/test_reflective_loader.dart';
diff --git a/pkg/analysis_server/test/src/services/correction/fix/bulk/remove_duplicate_case_test.dart b/pkg/analysis_server/test/src/services/correction/fix/bulk/remove_duplicate_case_test.dart
index 350c861..76d7a91 100644
--- a/pkg/analysis_server/test/src/services/correction/fix/bulk/remove_duplicate_case_test.dart
+++ b/pkg/analysis_server/test/src/services/correction/fix/bulk/remove_duplicate_case_test.dart
@@ -2,8 +2,6 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
-// @dart = 2.9
-
import 'package:analysis_server/src/services/linter/lint_names.dart';
import 'package:test_reflective_loader/test_reflective_loader.dart';
diff --git a/pkg/analysis_server/test/src/services/correction/fix/bulk/remove_empty_catch_test.dart b/pkg/analysis_server/test/src/services/correction/fix/bulk/remove_empty_catch_test.dart
index c23610f..a6a0897d 100644
--- a/pkg/analysis_server/test/src/services/correction/fix/bulk/remove_empty_catch_test.dart
+++ b/pkg/analysis_server/test/src/services/correction/fix/bulk/remove_empty_catch_test.dart
@@ -2,8 +2,6 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
-// @dart = 2.9
-
import 'package:analysis_server/src/services/linter/lint_names.dart';
import 'package:test_reflective_loader/test_reflective_loader.dart';
diff --git a/pkg/analysis_server/test/src/services/correction/fix/bulk/remove_empty_constructor_body_test.dart b/pkg/analysis_server/test/src/services/correction/fix/bulk/remove_empty_constructor_body_test.dart
index b1def09..9469973 100644
--- a/pkg/analysis_server/test/src/services/correction/fix/bulk/remove_empty_constructor_body_test.dart
+++ b/pkg/analysis_server/test/src/services/correction/fix/bulk/remove_empty_constructor_body_test.dart
@@ -2,8 +2,6 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
-// @dart = 2.9
-
import 'package:analysis_server/src/services/linter/lint_names.dart';
import 'package:test_reflective_loader/test_reflective_loader.dart';
diff --git a/pkg/analysis_server/test/src/services/correction/fix/bulk/remove_empty_else_test.dart b/pkg/analysis_server/test/src/services/correction/fix/bulk/remove_empty_else_test.dart
index e184a79..5c967e2 100644
--- a/pkg/analysis_server/test/src/services/correction/fix/bulk/remove_empty_else_test.dart
+++ b/pkg/analysis_server/test/src/services/correction/fix/bulk/remove_empty_else_test.dart
@@ -2,8 +2,6 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
-// @dart = 2.9
-
import 'package:analysis_server/src/services/linter/lint_names.dart';
import 'package:test_reflective_loader/test_reflective_loader.dart';
diff --git a/pkg/analysis_server/test/src/services/correction/fix/bulk/remove_empty_statement_test.dart b/pkg/analysis_server/test/src/services/correction/fix/bulk/remove_empty_statement_test.dart
index 87bf05a..fbf7b39 100644
--- a/pkg/analysis_server/test/src/services/correction/fix/bulk/remove_empty_statement_test.dart
+++ b/pkg/analysis_server/test/src/services/correction/fix/bulk/remove_empty_statement_test.dart
@@ -2,8 +2,6 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
-// @dart = 2.9
-
import 'package:analysis_server/src/services/linter/lint_names.dart';
import 'package:test_reflective_loader/test_reflective_loader.dart';
diff --git a/pkg/analysis_server/test/src/services/correction/fix/bulk/remove_if_null_operator_test.dart b/pkg/analysis_server/test/src/services/correction/fix/bulk/remove_if_null_operator_test.dart
index b73ecb5..0003079 100644
--- a/pkg/analysis_server/test/src/services/correction/fix/bulk/remove_if_null_operator_test.dart
+++ b/pkg/analysis_server/test/src/services/correction/fix/bulk/remove_if_null_operator_test.dart
@@ -2,8 +2,6 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
-// @dart = 2.9
-
import 'package:analysis_server/src/services/linter/lint_names.dart';
import 'package:test_reflective_loader/test_reflective_loader.dart';
diff --git a/pkg/analysis_server/test/src/services/correction/fix/bulk/remove_initializer_test.dart b/pkg/analysis_server/test/src/services/correction/fix/bulk/remove_initializer_test.dart
index a8c3614..c95ede1 100644
--- a/pkg/analysis_server/test/src/services/correction/fix/bulk/remove_initializer_test.dart
+++ b/pkg/analysis_server/test/src/services/correction/fix/bulk/remove_initializer_test.dart
@@ -2,8 +2,6 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
-// @dart = 2.9
-
import 'package:analysis_server/src/services/linter/lint_names.dart';
import 'package:test_reflective_loader/test_reflective_loader.dart';
diff --git a/pkg/analysis_server/test/src/services/correction/fix/bulk/remove_interpolation_braces_test.dart b/pkg/analysis_server/test/src/services/correction/fix/bulk/remove_interpolation_braces_test.dart
index 51fb561..a291bf1 100644
--- a/pkg/analysis_server/test/src/services/correction/fix/bulk/remove_interpolation_braces_test.dart
+++ b/pkg/analysis_server/test/src/services/correction/fix/bulk/remove_interpolation_braces_test.dart
@@ -2,8 +2,6 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
-// @dart = 2.9
-
import 'package:analysis_server/src/services/linter/lint_names.dart';
import 'package:test_reflective_loader/test_reflective_loader.dart';
diff --git a/pkg/analysis_server/test/src/services/correction/fix/bulk/remove_method_declaration_test.dart b/pkg/analysis_server/test/src/services/correction/fix/bulk/remove_method_declaration_test.dart
index e6b5a9b..65f7918 100644
--- a/pkg/analysis_server/test/src/services/correction/fix/bulk/remove_method_declaration_test.dart
+++ b/pkg/analysis_server/test/src/services/correction/fix/bulk/remove_method_declaration_test.dart
@@ -2,8 +2,6 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
-// @dart = 2.9
-
import 'package:analysis_server/src/services/linter/lint_names.dart';
import 'package:test_reflective_loader/test_reflective_loader.dart';
diff --git a/pkg/analysis_server/test/src/services/correction/fix/bulk/remove_non_null_assertion_test.dart b/pkg/analysis_server/test/src/services/correction/fix/bulk/remove_non_null_assertion_test.dart
index 46e164e..eeacfbc 100644
--- a/pkg/analysis_server/test/src/services/correction/fix/bulk/remove_non_null_assertion_test.dart
+++ b/pkg/analysis_server/test/src/services/correction/fix/bulk/remove_non_null_assertion_test.dart
@@ -2,8 +2,6 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
-// @dart = 2.9
-
import 'package:test_reflective_loader/test_reflective_loader.dart';
import '../../../../../abstract_context.dart';
diff --git a/pkg/analysis_server/test/src/services/correction/fix/bulk/remove_operator_test.dart b/pkg/analysis_server/test/src/services/correction/fix/bulk/remove_operator_test.dart
index a80779a..f876196 100644
--- a/pkg/analysis_server/test/src/services/correction/fix/bulk/remove_operator_test.dart
+++ b/pkg/analysis_server/test/src/services/correction/fix/bulk/remove_operator_test.dart
@@ -2,8 +2,6 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
-// @dart = 2.9
-
import 'package:analysis_server/src/services/linter/lint_names.dart';
import 'package:test_reflective_loader/test_reflective_loader.dart';
diff --git a/pkg/analysis_server/test/src/services/correction/fix/bulk/remove_question_mark_test.dart b/pkg/analysis_server/test/src/services/correction/fix/bulk/remove_question_mark_test.dart
index a87d83c..48706e9 100644
--- a/pkg/analysis_server/test/src/services/correction/fix/bulk/remove_question_mark_test.dart
+++ b/pkg/analysis_server/test/src/services/correction/fix/bulk/remove_question_mark_test.dart
@@ -2,8 +2,6 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
-// @dart = 2.9
-
import 'package:analysis_server/src/services/linter/lint_names.dart';
import 'package:test_reflective_loader/test_reflective_loader.dart';
diff --git a/pkg/analysis_server/test/src/services/correction/fix/bulk/remove_this_expression_test.dart b/pkg/analysis_server/test/src/services/correction/fix/bulk/remove_this_expression_test.dart
index fd30b02..eb9eb5c 100644
--- a/pkg/analysis_server/test/src/services/correction/fix/bulk/remove_this_expression_test.dart
+++ b/pkg/analysis_server/test/src/services/correction/fix/bulk/remove_this_expression_test.dart
@@ -2,8 +2,6 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
-// @dart = 2.9
-
import 'package:analysis_server/src/services/linter/lint_names.dart';
import 'package:test_reflective_loader/test_reflective_loader.dart';
diff --git a/pkg/analysis_server/test/src/services/correction/fix/bulk/remove_type_annotation_test.dart b/pkg/analysis_server/test/src/services/correction/fix/bulk/remove_type_annotation_test.dart
index 018fd3d..600d12d 100644
--- a/pkg/analysis_server/test/src/services/correction/fix/bulk/remove_type_annotation_test.dart
+++ b/pkg/analysis_server/test/src/services/correction/fix/bulk/remove_type_annotation_test.dart
@@ -2,8 +2,6 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
-// @dart = 2.9
-
import 'package:analysis_server/src/services/linter/lint_names.dart';
import 'package:test_reflective_loader/test_reflective_loader.dart';
diff --git a/pkg/analysis_server/test/src/services/correction/fix/bulk/remove_unnecessary_const_test.dart b/pkg/analysis_server/test/src/services/correction/fix/bulk/remove_unnecessary_const_test.dart
index 2bbcf70..eb112f7 100644
--- a/pkg/analysis_server/test/src/services/correction/fix/bulk/remove_unnecessary_const_test.dart
+++ b/pkg/analysis_server/test/src/services/correction/fix/bulk/remove_unnecessary_const_test.dart
@@ -2,8 +2,6 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
-// @dart = 2.9
-
import 'package:analysis_server/src/services/linter/lint_names.dart';
import 'package:test_reflective_loader/test_reflective_loader.dart';
diff --git a/pkg/analysis_server/test/src/services/correction/fix/bulk/remove_unnecessary_new_test.dart b/pkg/analysis_server/test/src/services/correction/fix/bulk/remove_unnecessary_new_test.dart
index 39d2110..88670c3 100644
--- a/pkg/analysis_server/test/src/services/correction/fix/bulk/remove_unnecessary_new_test.dart
+++ b/pkg/analysis_server/test/src/services/correction/fix/bulk/remove_unnecessary_new_test.dart
@@ -2,8 +2,6 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
-// @dart = 2.9
-
import 'package:analysis_server/src/services/linter/lint_names.dart';
import 'package:test_reflective_loader/test_reflective_loader.dart';
diff --git a/pkg/analysis_server/test/src/services/correction/fix/bulk/remove_unnecessary_string_interpolation_test.dart b/pkg/analysis_server/test/src/services/correction/fix/bulk/remove_unnecessary_string_interpolation_test.dart
index bd639ad..1ae3d1d 100644
--- a/pkg/analysis_server/test/src/services/correction/fix/bulk/remove_unnecessary_string_interpolation_test.dart
+++ b/pkg/analysis_server/test/src/services/correction/fix/bulk/remove_unnecessary_string_interpolation_test.dart
@@ -2,8 +2,6 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
-// @dart = 2.9
-
import 'package:analysis_server/src/services/linter/lint_names.dart';
import 'package:test_reflective_loader/test_reflective_loader.dart';
diff --git a/pkg/analysis_server/test/src/services/correction/fix/bulk/rename_to_camel_case_test.dart b/pkg/analysis_server/test/src/services/correction/fix/bulk/rename_to_camel_case_test.dart
index 9c35121..5248e32 100644
--- a/pkg/analysis_server/test/src/services/correction/fix/bulk/rename_to_camel_case_test.dart
+++ b/pkg/analysis_server/test/src/services/correction/fix/bulk/rename_to_camel_case_test.dart
@@ -2,8 +2,6 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
-// @dart = 2.9
-
import 'package:analysis_server/src/services/linter/lint_names.dart';
import 'package:test_reflective_loader/test_reflective_loader.dart';
diff --git a/pkg/analysis_server/test/src/services/correction/fix/bulk/replace_colon_with_equals_test.dart b/pkg/analysis_server/test/src/services/correction/fix/bulk/replace_colon_with_equals_test.dart
index b74ba21..f057c74 100644
--- a/pkg/analysis_server/test/src/services/correction/fix/bulk/replace_colon_with_equals_test.dart
+++ b/pkg/analysis_server/test/src/services/correction/fix/bulk/replace_colon_with_equals_test.dart
@@ -2,8 +2,6 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
-// @dart = 2.9
-
import 'package:analysis_server/src/services/linter/lint_names.dart';
import 'package:test_reflective_loader/test_reflective_loader.dart';
diff --git a/pkg/analysis_server/test/src/services/correction/fix/bulk/replace_final_with_const_test.dart b/pkg/analysis_server/test/src/services/correction/fix/bulk/replace_final_with_const_test.dart
index d5d91f3..d886f78 100644
--- a/pkg/analysis_server/test/src/services/correction/fix/bulk/replace_final_with_const_test.dart
+++ b/pkg/analysis_server/test/src/services/correction/fix/bulk/replace_final_with_const_test.dart
@@ -2,8 +2,6 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
-// @dart = 2.9
-
import 'package:analysis_server/src/services/linter/lint_names.dart';
import 'package:test_reflective_loader/test_reflective_loader.dart';
diff --git a/pkg/analysis_server/test/src/services/correction/fix/bulk/replace_new_with_const_test.dart b/pkg/analysis_server/test/src/services/correction/fix/bulk/replace_new_with_const_test.dart
index 982c596..f8ba7bd 100644
--- a/pkg/analysis_server/test/src/services/correction/fix/bulk/replace_new_with_const_test.dart
+++ b/pkg/analysis_server/test/src/services/correction/fix/bulk/replace_new_with_const_test.dart
@@ -2,8 +2,6 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
-// @dart = 2.9
-
import 'package:analysis_server/src/services/linter/lint_names.dart';
import 'package:test_reflective_loader/test_reflective_loader.dart';
diff --git a/pkg/analysis_server/test/src/services/correction/fix/bulk/replace_null_with_closure_test.dart b/pkg/analysis_server/test/src/services/correction/fix/bulk/replace_null_with_closure_test.dart
index a82c882..9a686bf 100644
--- a/pkg/analysis_server/test/src/services/correction/fix/bulk/replace_null_with_closure_test.dart
+++ b/pkg/analysis_server/test/src/services/correction/fix/bulk/replace_null_with_closure_test.dart
@@ -2,8 +2,6 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
-// @dart = 2.9
-
import 'package:analysis_server/src/services/linter/lint_names.dart';
import 'package:test_reflective_loader/test_reflective_loader.dart';
diff --git a/pkg/analysis_server/test/src/services/correction/fix/bulk/replace_with_conditional_assignment_test.dart b/pkg/analysis_server/test/src/services/correction/fix/bulk/replace_with_conditional_assignment_test.dart
index bab21ca..77c9615 100644
--- a/pkg/analysis_server/test/src/services/correction/fix/bulk/replace_with_conditional_assignment_test.dart
+++ b/pkg/analysis_server/test/src/services/correction/fix/bulk/replace_with_conditional_assignment_test.dart
@@ -2,8 +2,6 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
-// @dart = 2.9
-
import 'package:analysis_server/src/services/linter/lint_names.dart';
import 'package:test_reflective_loader/test_reflective_loader.dart';
diff --git a/pkg/analysis_server/test/src/services/correction/fix/bulk/replace_with_is_empty_test.dart b/pkg/analysis_server/test/src/services/correction/fix/bulk/replace_with_is_empty_test.dart
index 13b9776..b61ffd7 100644
--- a/pkg/analysis_server/test/src/services/correction/fix/bulk/replace_with_is_empty_test.dart
+++ b/pkg/analysis_server/test/src/services/correction/fix/bulk/replace_with_is_empty_test.dart
@@ -2,8 +2,6 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
-// @dart = 2.9
-
import 'package:analysis_server/src/services/linter/lint_names.dart';
import 'package:test_reflective_loader/test_reflective_loader.dart';
diff --git a/pkg/analysis_server/test/src/services/correction/fix/bulk/replace_with_tear_off_test.dart b/pkg/analysis_server/test/src/services/correction/fix/bulk/replace_with_tear_off_test.dart
index 777ac6e..eef575b 100644
--- a/pkg/analysis_server/test/src/services/correction/fix/bulk/replace_with_tear_off_test.dart
+++ b/pkg/analysis_server/test/src/services/correction/fix/bulk/replace_with_tear_off_test.dart
@@ -2,8 +2,6 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
-// @dart = 2.9
-
import 'package:analysis_server/src/services/linter/lint_names.dart';
import 'package:test_reflective_loader/test_reflective_loader.dart';
diff --git a/pkg/analysis_server/test/src/services/correction/fix/bulk/replace_with_var_test.dart b/pkg/analysis_server/test/src/services/correction/fix/bulk/replace_with_var_test.dart
index ac0bf55..27367dc 100644
--- a/pkg/analysis_server/test/src/services/correction/fix/bulk/replace_with_var_test.dart
+++ b/pkg/analysis_server/test/src/services/correction/fix/bulk/replace_with_var_test.dart
@@ -2,8 +2,6 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
-// @dart = 2.9
-
import 'package:analysis_server/src/services/linter/lint_names.dart';
import 'package:test_reflective_loader/test_reflective_loader.dart';
diff --git a/pkg/analysis_server/test/src/services/correction/fix/bulk/sort_child_properties_last_test.dart b/pkg/analysis_server/test/src/services/correction/fix/bulk/sort_child_properties_last_test.dart
index 89b30db..3cc5338 100644
--- a/pkg/analysis_server/test/src/services/correction/fix/bulk/sort_child_properties_last_test.dart
+++ b/pkg/analysis_server/test/src/services/correction/fix/bulk/sort_child_properties_last_test.dart
@@ -2,8 +2,6 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
-// @dart = 2.9
-
import 'package:analysis_server/src/services/linter/lint_names.dart';
import 'package:test_reflective_loader/test_reflective_loader.dart';
diff --git a/pkg/analysis_server/test/src/services/correction/fix/bulk/test_all.dart b/pkg/analysis_server/test/src/services/correction/fix/bulk/test_all.dart
index 33acd38..6b8bb68 100644
--- a/pkg/analysis_server/test/src/services/correction/fix/bulk/test_all.dart
+++ b/pkg/analysis_server/test/src/services/correction/fix/bulk/test_all.dart
@@ -2,8 +2,6 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
-// @dart = 2.9
-
import 'package:test_reflective_loader/test_reflective_loader.dart';
import 'add_await_test.dart' as add_await;
diff --git a/pkg/analysis_server/test/src/services/correction/fix/bulk/use_curly_braces_test.dart b/pkg/analysis_server/test/src/services/correction/fix/bulk/use_curly_braces_test.dart
index 9bbbeea..8e1f19a 100644
--- a/pkg/analysis_server/test/src/services/correction/fix/bulk/use_curly_braces_test.dart
+++ b/pkg/analysis_server/test/src/services/correction/fix/bulk/use_curly_braces_test.dart
@@ -2,8 +2,6 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
-// @dart = 2.9
-
import 'package:analysis_server/src/services/linter/lint_names.dart';
import 'package:test_reflective_loader/test_reflective_loader.dart';
diff --git a/pkg/analysis_server/test/src/services/correction/fix/bulk/use_is_not_empty_test.dart b/pkg/analysis_server/test/src/services/correction/fix/bulk/use_is_not_empty_test.dart
index 1d1268b..1f337b8 100644
--- a/pkg/analysis_server/test/src/services/correction/fix/bulk/use_is_not_empty_test.dart
+++ b/pkg/analysis_server/test/src/services/correction/fix/bulk/use_is_not_empty_test.dart
@@ -2,8 +2,6 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
-// @dart = 2.9
-
import 'package:analysis_server/src/services/linter/lint_names.dart';
import 'package:test_reflective_loader/test_reflective_loader.dart';
diff --git a/pkg/analysis_server/test/src/services/correction/fix/bulk/use_rethrow_test.dart b/pkg/analysis_server/test/src/services/correction/fix/bulk/use_rethrow_test.dart
index cdd797d..9d4678b 100644
--- a/pkg/analysis_server/test/src/services/correction/fix/bulk/use_rethrow_test.dart
+++ b/pkg/analysis_server/test/src/services/correction/fix/bulk/use_rethrow_test.dart
@@ -2,8 +2,6 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
-// @dart = 2.9
-
import 'package:analysis_server/src/services/linter/lint_names.dart';
import 'package:test_reflective_loader/test_reflective_loader.dart';
diff --git a/pkg/analysis_server/test/src/services/correction/fix/data_driven/add_type_parameter_test.dart b/pkg/analysis_server/test/src/services/correction/fix/data_driven/add_type_parameter_test.dart
index 9deceb5..fab212b 100644
--- a/pkg/analysis_server/test/src/services/correction/fix/data_driven/add_type_parameter_test.dart
+++ b/pkg/analysis_server/test/src/services/correction/fix/data_driven/add_type_parameter_test.dart
@@ -2,8 +2,6 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
-// @dart = 2.9
-
import 'package:analysis_server/src/services/correction/fix/data_driven/add_type_parameter.dart';
import 'package:analysis_server/src/services/correction/fix/data_driven/changes_selector.dart';
import 'package:analysis_server/src/services/correction/fix/data_driven/element_descriptor.dart';
@@ -479,13 +477,13 @@
/// Return the kind of element whose parameters are being modified.
String get _kind;
- Transform _add(int index, {List<String> components, String extendedType}) =>
+ Transform _add(int index, {List<String>? components, String? extendedType}) =>
Transform(
title: 'title',
date: DateTime.now(),
element: ElementDescriptor(
libraryUris: [Uri.parse(importUri)],
- kind: ElementKindUtilities.fromName(_kind),
+ kind: ElementKindUtilities.fromName(_kind)!,
components: components ?? ['m', 'C']),
bulkApply: false,
changesSelector: UnconditionalChangesSelector([
diff --git a/pkg/analysis_server/test/src/services/correction/fix/data_driven/code_template_test.dart b/pkg/analysis_server/test/src/services/correction/fix/data_driven/code_template_test.dart
index 6a20dd1..5103661 100644
--- a/pkg/analysis_server/test/src/services/correction/fix/data_driven/code_template_test.dart
+++ b/pkg/analysis_server/test/src/services/correction/fix/data_driven/code_template_test.dart
@@ -2,8 +2,6 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
-// @dart = 2.9
-
import 'package:analysis_server/src/services/correction/fix/data_driven/accessor.dart';
import 'package:analysis_server/src/services/correction/fix/data_driven/code_template.dart';
import 'package:analysis_server/src/services/correction/fix/data_driven/parameter_reference.dart';
@@ -74,7 +72,7 @@
}
void g(int x, int y) {}
''');
- var unit = testAnalysisResult.unit;
+ var unit = testAnalysisResult.unit!;
var function = unit.declarations[0] as FunctionDeclaration;
var body = function.functionExpression.body as BlockFunctionBody;
var statement = body.block.statements[0] as ExpressionStatement;
diff --git a/pkg/analysis_server/test/src/services/correction/fix/data_driven/data_driven_test_support.dart b/pkg/analysis_server/test/src/services/correction/fix/data_driven/data_driven_test_support.dart
index 6149d77..e26e0061 100644
--- a/pkg/analysis_server/test/src/services/correction/fix/data_driven/data_driven_test_support.dart
+++ b/pkg/analysis_server/test/src/services/correction/fix/data_driven/data_driven_test_support.dart
@@ -2,8 +2,6 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
-// @dart = 2.9
-
import 'package:analysis_server/src/services/correction/dart/data_driven.dart';
import 'package:analysis_server/src/services/correction/fix.dart';
import 'package:analysis_server/src/services/correction/fix/data_driven/code_template.dart';
diff --git a/pkg/analysis_server/test/src/services/correction/fix/data_driven/element_matcher_test.dart b/pkg/analysis_server/test/src/services/correction/fix/data_driven/element_matcher_test.dart
index aa9695e..e9e0363 100644
--- a/pkg/analysis_server/test/src/services/correction/fix/data_driven/element_matcher_test.dart
+++ b/pkg/analysis_server/test/src/services/correction/fix/data_driven/element_matcher_test.dart
@@ -2,8 +2,6 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
-// @dart = 2.9
-
import 'package:analysis_server/src/services/correction/fix/data_driven/element_kind.dart';
import 'package:analysis_server/src/services/correction/fix/data_driven/element_matcher.dart';
import 'package:analyzer/src/test_utilities/package_config_file_builder.dart';
@@ -21,11 +19,11 @@
abstract class AbstractElementMatcherTest extends DataDrivenFixProcessorTest {
void _assertMatcher(String search,
- {List<String> expectedComponents,
- List<ElementKind> expectedKinds,
- List<String> expectedUris}) {
+ {List<String>? expectedComponents,
+ List<ElementKind>? expectedKinds,
+ List<String>? expectedUris}) {
var node = findNode.any(search);
- var matcher = ElementMatcher.forNode(node);
+ var matcher = ElementMatcher.forNode(node)!;
if (expectedUris != null) {
expect(matcher.importedUris,
unorderedEquals(expectedUris.map((uri) => Uri.parse(uri))));
diff --git a/pkg/analysis_server/test/src/services/correction/fix/data_driven/end_to_end_test.dart b/pkg/analysis_server/test/src/services/correction/fix/data_driven/end_to_end_test.dart
index dbabac1..eb13dcf 100644
--- a/pkg/analysis_server/test/src/services/correction/fix/data_driven/end_to_end_test.dart
+++ b/pkg/analysis_server/test/src/services/correction/fix/data_driven/end_to_end_test.dart
@@ -2,8 +2,6 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
-// @dart = 2.9
-
import 'package:test_reflective_loader/test_reflective_loader.dart';
import 'data_driven_test_support.dart';
diff --git a/pkg/analysis_server/test/src/services/correction/fix/data_driven/flutter_use_case_test.dart b/pkg/analysis_server/test/src/services/correction/fix/data_driven/flutter_use_case_test.dart
index 327fe3a..e8d6d1b 100644
--- a/pkg/analysis_server/test/src/services/correction/fix/data_driven/flutter_use_case_test.dart
+++ b/pkg/analysis_server/test/src/services/correction/fix/data_driven/flutter_use_case_test.dart
@@ -2,8 +2,6 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
-// @dart = 2.9
-
import 'package:test_reflective_loader/test_reflective_loader.dart';
import 'data_driven_test_support.dart';
diff --git a/pkg/analysis_server/test/src/services/correction/fix/data_driven/modify_parameters_test.dart b/pkg/analysis_server/test/src/services/correction/fix/data_driven/modify_parameters_test.dart
index 3c72b70..535320f 100644
--- a/pkg/analysis_server/test/src/services/correction/fix/data_driven/modify_parameters_test.dart
+++ b/pkg/analysis_server/test/src/services/correction/fix/data_driven/modify_parameters_test.dart
@@ -2,8 +2,6 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
-// @dart = 2.9
-
import 'package:analysis_server/src/services/correction/fix/data_driven/changes_selector.dart';
import 'package:analysis_server/src/services/correction/fix/data_driven/element_descriptor.dart';
import 'package:analysis_server/src/services/correction/fix/data_driven/element_kind.dart';
@@ -1008,13 +1006,13 @@
String get _kind;
Transform _modify(List<String> originalComponents,
- List<ParameterModification> modifications, {String newName}) =>
+ List<ParameterModification> modifications, {String? newName}) =>
Transform(
title: 'title',
date: DateTime.now(),
element: ElementDescriptor(
libraryUris: [Uri.parse(importUri)],
- kind: ElementKindUtilities.fromName(_kind),
+ kind: ElementKindUtilities.fromName(_kind)!,
components: originalComponents),
bulkApply: false,
changesSelector: UnconditionalChangesSelector([
diff --git a/pkg/analysis_server/test/src/services/correction/fix/data_driven/rename_parameter_test.dart b/pkg/analysis_server/test/src/services/correction/fix/data_driven/rename_parameter_test.dart
index e846a6a..a578270 100644
--- a/pkg/analysis_server/test/src/services/correction/fix/data_driven/rename_parameter_test.dart
+++ b/pkg/analysis_server/test/src/services/correction/fix/data_driven/rename_parameter_test.dart
@@ -2,8 +2,6 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
-// @dart = 2.9
-
import 'package:analysis_server/src/services/correction/fix/data_driven/changes_selector.dart';
import 'package:analysis_server/src/services/correction/fix/data_driven/element_descriptor.dart';
import 'package:analysis_server/src/services/correction/fix/data_driven/element_kind.dart';
@@ -336,7 +334,7 @@
date: DateTime.now(),
element: ElementDescriptor(
libraryUris: [Uri.parse(importUri)],
- kind: ElementKindUtilities.fromName(_kind),
+ kind: ElementKindUtilities.fromName(_kind)!,
components: components),
bulkApply: false,
changesSelector: UnconditionalChangesSelector([
diff --git a/pkg/analysis_server/test/src/services/correction/fix/data_driven/rename_test.dart b/pkg/analysis_server/test/src/services/correction/fix/data_driven/rename_test.dart
index ecf0e66..9022e5d 100644
--- a/pkg/analysis_server/test/src/services/correction/fix/data_driven/rename_test.dart
+++ b/pkg/analysis_server/test/src/services/correction/fix/data_driven/rename_test.dart
@@ -2,8 +2,6 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
-// @dart = 2.9
-
import 'package:analysis_server/src/services/correction/fix/data_driven/changes_selector.dart';
import 'package:analysis_server/src/services/correction/fix/data_driven/element_descriptor.dart';
import 'package:analysis_server/src/services/correction/fix/data_driven/element_kind.dart';
@@ -1238,7 +1236,7 @@
date: DateTime.now(),
element: ElementDescriptor(
libraryUris: [Uri.parse(importUri)],
- kind: ElementKindUtilities.fromName(_kind),
+ kind: ElementKindUtilities.fromName(_kind)!,
components: components),
bulkApply: false,
changesSelector: UnconditionalChangesSelector([
diff --git a/pkg/analysis_server/test/src/services/correction/fix/data_driven/sdk_fix_test.dart b/pkg/analysis_server/test/src/services/correction/fix/data_driven/sdk_fix_test.dart
index 2dfa7b4..a154782 100644
--- a/pkg/analysis_server/test/src/services/correction/fix/data_driven/sdk_fix_test.dart
+++ b/pkg/analysis_server/test/src/services/correction/fix/data_driven/sdk_fix_test.dart
@@ -2,8 +2,6 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
-// @dart = 2.9
-
import 'package:analysis_server/src/services/correction/fix/data_driven/transform_set_manager.dart';
import 'package:analyzer/src/test_utilities/mock_sdk.dart';
import 'package:test_reflective_loader/test_reflective_loader.dart';
diff --git a/pkg/analysis_server/test/src/services/correction/fix/remove_unnecessary_parentheses_test.dart b/pkg/analysis_server/test/src/services/correction/fix/remove_unnecessary_parentheses_test.dart
index f482d47..166007e 100644
--- a/pkg/analysis_server/test/src/services/correction/fix/remove_unnecessary_parentheses_test.dart
+++ b/pkg/analysis_server/test/src/services/correction/fix/remove_unnecessary_parentheses_test.dart
@@ -2,8 +2,6 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
-// @dart = 2.9
-
import 'package:analysis_server/src/services/correction/fix.dart';
import 'package:analysis_server/src/services/linter/lint_names.dart';
import 'package:analyzer_plugin/utilities/fixes/fixes.dart';
diff --git a/pkg/analysis_server/test/src/services/correction/fix/replace_final_with_var_test.dart b/pkg/analysis_server/test/src/services/correction/fix/replace_final_with_var_test.dart
index 142e6a2..e13d52a 100644
--- a/pkg/analysis_server/test/src/services/correction/fix/replace_final_with_var_test.dart
+++ b/pkg/analysis_server/test/src/services/correction/fix/replace_final_with_var_test.dart
@@ -2,8 +2,6 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
-// @dart = 2.9
-
import 'package:analysis_server/src/services/correction/fix.dart';
import 'package:analysis_server/src/services/linter/lint_names.dart';
import 'package:analyzer_plugin/utilities/fixes/fixes.dart';
diff --git a/pkg/dev_compiler/lib/src/kernel/compiler.dart b/pkg/dev_compiler/lib/src/kernel/compiler.dart
index cf0461a..88ec1fb 100644
--- a/pkg/dev_compiler/lib/src/kernel/compiler.dart
+++ b/pkg/dev_compiler/lib/src/kernel/compiler.dart
@@ -3585,8 +3585,30 @@
js_ast.Statement _visitStatement(Statement s) {
if (s == null) return null;
var result = s.accept(this);
+
+ // In most cases, a Dart expression statement with a child expression
+ // compile to a JS expression statement with a child expression.
+ //
+ // ExpressionStatement js_ast.ExpressionStatement
+ // | --> compiles to --> |
+ // Expression js_ast.Expression
+ //
+ // Both the expression statement and child expression nodes contain their
+ // own source location information.
+ //
+ // In the case of a debugger() call, the code compiles to a single node.
+ //
+ // ExpressionStatement js_ast.DebuggerStatement
+ // | --> compiles to -->
+ // Expression
+ //
+ // The js_ast.DebuggerStatement already has the correct source information
+ // attached so we avoid overwriting with the incorrect source location from
+ // [s].
// TODO(jmesserly): is the `is! Block` still necessary?
- if (s is! Block) result.sourceInformation = _nodeStart(s);
+ if (!(s is Block || result is js_ast.DebuggerStatement)) {
+ result.sourceInformation = _nodeStart(s);
+ }
// The statement might be the target of a break or continue with a label.
var name = _labelNames[s];
@@ -5290,13 +5312,14 @@
js_ast.Node _emitDebuggerCall(StaticInvocation node) {
var args = node.arguments.named;
var isStatement = node.parent is ExpressionStatement;
+ var debuggerStatement =
+ js_ast.DebuggerStatement().withSourceInformation(_nodeStart(node));
if (args.isEmpty) {
// Inline `debugger()` with no arguments, as a statement if possible,
// otherwise as an immediately invoked function.
return isStatement
- ? js_ast.DebuggerStatement()
- : js.call(
- '(() => { #; return true})()', [js_ast.DebuggerStatement()]);
+ ? debuggerStatement
+ : js.call('(() => { #; return true})()', [debuggerStatement]);
}
// The signature of `debugger()` is:
@@ -5321,8 +5344,9 @@
// order, then extract the `when` argument.
: js.call('#.when', js_ast.ObjectInitializer(jsArgs));
return isStatement
- ? js.statement('if (#) debugger;', when)
- : js.call('# && (() => { debugger; return true })()', when);
+ ? js.statement('if (#) #;', [when, debuggerStatement])
+ : js.call(
+ '# && (() => { #; return true })()', [when, debuggerStatement]);
}
/// Emits the target of a [StaticInvocation], [StaticGet], or [StaticSet].
diff --git a/pkg/dev_compiler/test/sourcemap/testfiles/multiple_debugger_calls.dart b/pkg/dev_compiler/test/sourcemap/testfiles/multiple_debugger_calls.dart
index 4a82e37..f976b63 100644
--- a/pkg/dev_compiler/test/sourcemap/testfiles/multiple_debugger_calls.dart
+++ b/pkg/dev_compiler/test/sourcemap/testfiles/multiple_debugger_calls.dart
@@ -6,19 +6,28 @@
import 'dart:developer';
+// Regression test: https://github.com/dart-lang/sdk/issues/45544
+
+var b = true;
void main() {
+ // Ensure multiple debugger calls of different varieties map to different
+ // unique locations.
print('1');
- /*sl:1*/ debugger();
+ /*s:1*/ debugger();
print('2');
- /*sl:2*/ debugger();
+ /*s:2*/ debugger(when: b);
print('3');
foo(/*s:3*/ debugger());
print('4');
- /*sl:4*/ debugger();
+ /*s:4*/ debugger(when: b);
print('5');
- foo(/*s:5*/ debugger());
+ foo(/*s:5*/ debugger(when: b));
print('6');
- foo(/*s:6*/ debugger());
+ /*s:6*/ debugger();
+ print('7');
+ foo(/*s:7*/ debugger(when: b));
+ print('8');
+ foo(/*s:8*/ debugger());
}
void foo(bool _) => null;
diff --git a/runtime/vm/compiler/backend/il.cc b/runtime/vm/compiler/backend/il.cc
index 5b0fc05..449eeaf 100644
--- a/runtime/vm/compiler/backend/il.cc
+++ b/runtime/vm/compiler/backend/il.cc
@@ -1133,7 +1133,6 @@
bool LoadStaticFieldInstr::AttributesEqual(Instruction* other) const {
ASSERT(AllowsCSE());
- ASSERT(!field().is_late() || calls_initializer());
return field().ptr() == other->AsLoadStaticField()->field().ptr();
}
@@ -6190,7 +6189,7 @@
if (idx == 0) return kNoRepresentation; // Flexible input representation.
if (idx == 1) {
if (index_unboxed_) {
-#if defined(TARGET_ARCH_X64)
+#if defined(TARGET_ARCH_IS_64_BIT)
return kUnboxedInt64;
#else
// TODO(dartbug.com/39432): kUnboxedInt32 || kUnboxedUint32 on 32-bit
diff --git a/runtime/vm/compiler/backend/il.h b/runtime/vm/compiler/backend/il.h
index b4d5f3a..3516f74 100644
--- a/runtime/vm/compiler/backend/il.h
+++ b/runtime/vm/compiler/backend/il.h
@@ -5536,9 +5536,10 @@
// the dominating load.
//
// Though if the field is final-late there can be stores into it via
- // load/compare-with-sentinel/store. Those loads have `!calls_initializer()`
- // and we won't allow CSE for them.
- return field().is_final() && (!field().is_late() || calls_initializer());
+ // load/compare-with-sentinel/store. Those loads have
+ // `!field().has_initializer()` and we won't allow CSE for them.
+ return field().is_final() &&
+ (!field().is_late() || field().has_initializer());
}
virtual bool ComputeCanDeoptimize() const {
diff --git a/tools/VERSION b/tools/VERSION
index 3999231..baa7861 100644
--- a/tools/VERSION
+++ b/tools/VERSION
@@ -27,5 +27,5 @@
MAJOR 2
MINOR 14
PATCH 0
-PRERELEASE 1
+PRERELEASE 2
PRERELEASE_PATCH 0
\ No newline at end of file