| Index: pkg/analysis_server/test/services/refactoring/extract_method_test.dart
|
| diff --git a/pkg/analysis_server/test/services/refactoring/extract_method_test.dart b/pkg/analysis_server/test/services/refactoring/extract_method_test.dart
|
| index 6dd4e10e09f9ee9239fde2a96611506c570448fd..ba6a7d61b79e091ae7051327081157e072baec1c 100644
|
| --- a/pkg/analysis_server/test/services/refactoring/extract_method_test.dart
|
| +++ b/pkg/analysis_server/test/services/refactoring/extract_method_test.dart
|
| @@ -1306,6 +1306,29 @@ main() {
|
| ''');
|
| }
|
|
|
| + test_singleExpression_occurrences_incompatibleTypes() {
|
| + indexTestUnit('''
|
| +main() {
|
| + int x = 1;
|
| + String y = 'foo';
|
| + print(x.toString());
|
| + print(y.toString());
|
| +}
|
| +''');
|
| + _createRefactoringForString('x.toString()');
|
| + // apply refactoring
|
| + return _assertSuccessfulRefactoring('''
|
| +main() {
|
| + int x = 1;
|
| + String y = 'foo';
|
| + print(res(x));
|
| + print(y.toString());
|
| +}
|
| +
|
| +String res(int x) => x.toString();
|
| +''');
|
| + }
|
| +
|
| test_singleExpression_occurrences_inWholeUnit() {
|
| indexTestUnit('''
|
| main() {
|
|
|