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

Unified Diff: pkg/analysis_server/lib/src/services/refactoring/extract_method.dart

Issue 970063002: When a closure is extracted as a method, it does not have any return type. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 years, 10 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
Index: pkg/analysis_server/lib/src/services/refactoring/extract_method.dart
diff --git a/pkg/analysis_server/lib/src/services/refactoring/extract_method.dart b/pkg/analysis_server/lib/src/services/refactoring/extract_method.dart
index 361d537c14e27bc73630659971c4b66f02ba8b7d..d40545c4927cf61c588c68455119cc9825150e2a 100644
--- a/pkg/analysis_server/lib/src/services/refactoring/extract_method.dart
+++ b/pkg/analysis_server/lib/src/services/refactoring/extract_method.dart
@@ -615,7 +615,9 @@ class ExtractMethodRefactoringImpl extends RefactoringImpl
}
void _initializeReturnType() {
- if (_returnType == null) {
+ if (_selectionFunctionExpression != null) {
+ returnType = '';
+ } else if (_returnType == null) {
returnType = 'void';
} else {
returnType = _getTypeCode(_returnType);

Powered by Google App Engine
This is Rietveld 408576698