Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(9)

Unified Diff: pkg/analysis_server/lib/src/services/correction/fix_internal.dart

Issue 2123333002: Issue 26821. Don't add 'void' return type for setters when lint 'avoid_return_types_on_setters' is … (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Never generate 'void' return type for setters. Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | pkg/analysis_server/test/services/correction/fix_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analysis_server/lib/src/services/correction/fix_internal.dart
diff --git a/pkg/analysis_server/lib/src/services/correction/fix_internal.dart b/pkg/analysis_server/lib/src/services/correction/fix_internal.dart
index 117884d2ca5bd8b9605c3a21b0b1c99559675891..763642ac103a87a4eef13fb578d5a8a4ce149bf7 100644
--- a/pkg/analysis_server/lib/src/services/correction/fix_internal.dart
+++ b/pkg/analysis_server/lib/src/services/correction/fix_internal.dart
@@ -1349,7 +1349,10 @@ class FixProcessor {
sb.append(prefix);
}
// return type
- _appendType(sb, element.type.returnType);
+ if (!isSetter) {
+ _appendType(sb, element.type.returnType);
+ }
+ // keyword
if (isGetter) {
sb.append('get ');
} else if (isSetter) {
« no previous file with comments | « no previous file | pkg/analysis_server/test/services/correction/fix_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698