Don't specify 'void' return type for setters in 'Encapsulate Field'.

R=brianwilkerson@google.com

Bug: https://github.com/flutter/flutter-intellij/issues/2104
Change-Id: Ib7fe60e27f37726be5131c8a2e915b7911773855
Reviewed-on: https://dart-review.googlesource.com/52180
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
This commit is contained in:
Konstantin Shcheglov
2018-04-20 17:40:39 +00:00
committed by commit-bot@chromium.org
parent 703a26a723
commit f755d9dc33
2 changed files with 3 additions and 3 deletions
@@ -1240,7 +1240,7 @@ class AssistProcessor {
: '';
String getterCode = '$eol2 ${typeNameCode}get $name => _$name;';
String setterCode = '$eol2'
' void set $name($typeNameCode$name) {$eol'
' set $name($typeNameCode$name) {$eol'
' _$name = $name;$eol'
' }';
builder.addSimpleInsertion(fieldDeclaration.end, getterCode + setterCode);
@@ -2578,7 +2578,7 @@ class A {
int get test => _test;
void set test(int test) {
set test(int test) {
_test = test;
}
A(this._test);
@@ -2604,7 +2604,7 @@ class A {
get test => _test;
void set test(test) {
set test(test) {
_test = test;
}
}