Version 2.16.0-47.0.dev
Merge commit 'e1a8269ab9c6e325d556d423ebd48ad2790cecf7' into 'dev'
diff --git a/CHANGELOG.md b/CHANGELOG.md
index b65a8fe..f39f8d8 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -25,6 +25,17 @@
[an issue]: https://github.com/dart-lang/sdk/issues/new
+#### Linter
+
+Updated the Linter to `1.15.0`, which includes changes that
+- adds new lint: `use_decorated_box`.
+- adds new lint: `no_leading_underscores_for_library_prefixes`.
+- adds new lint: `no_leading_underscores_for_local_identifiers`.
+- adds new lint: `secure_pubspec_urls`.
+- adds new lint: `sized_box_shrink_expand`.
+- adds new lint: `avoid_final_parameters`.
+- improves docs for `omit_local_variable_types`.
+
## 2.15.0
### Language
@@ -415,14 +426,7 @@
#### Linter
-Updated the Linter to `1.15.0`, which includes changes that
-- adds new lint: `use_decorated_box`.
-- adds new lint: `no_leading_underscores_for_library_prefixes`.
-- adds new lint: `no_leading_underscores_for_local_identifiers`.
-- adds new lint: `secure_pubspec_urls`.
-- adds new lint: `sized_box_shrink_expand`.
-- adds new lint: `avoid_final_parameters`.
-- improves docs for `omit_local_variable_types`.
+Updated the Linter to `1.14.0`, which includes changes that
- fix `omit_local_variable_types` to not flag a local type that is
required for inference.
- allow `while (true) { ... }` in `literal_only_boolean_expressions`.
diff --git a/pkg/analysis_server/test/src/services/correction/fix/remove_argument_test.dart b/pkg/analysis_server/test/src/services/correction/fix/remove_argument_test.dart
index 736da8c..2bfbc3e 100644
--- a/pkg/analysis_server/test/src/services/correction/fix/remove_argument_test.dart
+++ b/pkg/analysis_server/test/src/services/correction/fix/remove_argument_test.dart
@@ -21,7 +21,7 @@
@override
String get lintCode => LintNames.avoid_redundant_argument_values;
- Future<void> test_singleFile() async {
+ Future<void> test_independentInvocations() async {
await resolveTestCode('''
void f({bool valWithDefault = true, bool val}) {}
void f2({bool valWithDefault = true, bool val}) {}
@@ -41,6 +41,45 @@
}
''');
}
+
+ Future<void> test_multipleInSingleInvocation_actual() async {
+ await resolveTestCode('''
+void f() {
+ g(a: 0, b: 1, c: 2);
+}
+
+void g({int a = 0, int b = 1, int c = 2}) {}
+''');
+ await assertHasFix('''
+void f() {
+ g(b: 1);
+}
+
+void g({int a = 0, int b = 1, int c = 2}) {}
+''');
+ }
+
+ @failingTest
+ Future<void> test_multipleInSingleInvocation_ideal() async {
+ // The edits currently conflict with each other because they're overlapping,
+ // so one of them isn't applied. This only impacts the fix-all-in-file case
+ // because the bulk-fix case catches the remaining argument on the second
+ // pass.
+ await resolveTestCode('''
+void f() {
+ g(a: 0, b: 1, c: 2);
+}
+
+void g({int a = 0, int b = 1, int c = 2}) {}
+''');
+ await assertHasFix('''
+void f() {
+ g();
+}
+
+void g({int a = 0, int b = 1, int c = 2}) {}
+''');
+ }
}
@reflectiveTest
diff --git a/tools/VERSION b/tools/VERSION
index 6be6313..bb8f0f0 100644
--- a/tools/VERSION
+++ b/tools/VERSION
@@ -27,5 +27,5 @@
MAJOR 2
MINOR 16
PATCH 0
-PRERELEASE 46
+PRERELEASE 47
PRERELEASE_PATCH 0
\ No newline at end of file