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 1cb713a1b293973ffe99b32346d24783c54a7e62..b2223d0d542afc2b0fd3eed5bf40397b25dccbfb 100644 |
--- a/pkg/analysis_server/lib/src/services/refactoring/extract_method.dart |
+++ b/pkg/analysis_server/lib/src/services/refactoring/extract_method.dart |
@@ -667,7 +667,7 @@ class ExtractMethodRefactoringImpl extends RefactoringImpl |
variableType = _getTypeCode(_returnType); |
if (_hasAwait) { |
if (_returnType.element != futureType.element) { |
- returnType = _getTypeCode(futureType.substitute4([_returnType])); |
+ returnType = _getTypeCode(futureType.instantiate([_returnType])); |
} |
} else { |
returnType = variableType; |