Version 2.12.0-210.0.dev
Merge commit 'b29d36c55952528007b12422f9c0fd1a37d3ffd2' into 'dev'
diff --git a/pkg/analysis_server/lib/src/services/correction/bulk_fix_processor.dart b/pkg/analysis_server/lib/src/services/correction/bulk_fix_processor.dart
index 8cbef0b..61d79bc 100644
--- a/pkg/analysis_server/lib/src/services/correction/bulk_fix_processor.dart
+++ b/pkg/analysis_server/lib/src/services/correction/bulk_fix_processor.dart
@@ -257,6 +257,9 @@
LintNames.unnecessary_this: [
RemoveThisExpression.newInstance,
],
+ LintNames.use_function_type_syntax_for_parameters: [
+ ConvertToGenericFunctionSyntax.newInstance,
+ ],
LintNames.use_rethrow_when_possible: [
UseRethrow.newInstance,
],
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 af826e2..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
@@ -10,6 +10,7 @@
void main() {
defineReflectiveSuite(() {
defineReflectiveTests(PreferGenericFunctionTypeAliasesTest);
+ defineReflectiveTests(UseFunctionTypeSyntaxForParametersTest);
});
}
@@ -29,3 +30,29 @@
''');
}
}
+
+@reflectiveTest
+class UseFunctionTypeSyntaxForParametersTest extends BulkFixProcessorTest {
+ @override
+ String get lintCode => LintNames.use_function_type_syntax_for_parameters;
+
+ Future<void> test_singleFile() async {
+ await resolveTestCode('''
+g(String f(int x), int h()) {}
+''');
+ await assertHasFix('''
+g(String Function(int x) f, int Function() h) {}
+''');
+ }
+
+ @failingTest
+ Future<void> test_singleFile_nested() async {
+ // Only the outer function gets converted.
+ await resolveTestCode('''
+g(String f(int h())) {}
+''');
+ await assertHasFix('''
+g(String Function(int Function() h) f) {}
+''');
+ }
+}
diff --git a/tools/VERSION b/tools/VERSION
index a8f8d40..ea33b59 100644
--- a/tools/VERSION
+++ b/tools/VERSION
@@ -27,5 +27,5 @@
MAJOR 2
MINOR 12
PATCH 0
-PRERELEASE 209
+PRERELEASE 210
PRERELEASE_PATCH 0
\ No newline at end of file