| OLD | NEW |
| 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 import 'dart:async'; | 5 import 'dart:async'; |
| 6 | 6 |
| 7 import 'package:analysis_server/plugin/edit/fix/fix_core.dart'; | 7 import 'package:analysis_server/plugin/edit/fix/fix_core.dart'; |
| 8 import 'package:analysis_server/plugin/edit/fix/fix_dart.dart'; | 8 import 'package:analysis_server/plugin/edit/fix/fix_dart.dart'; |
| 9 import 'package:analysis_server/src/services/correction/fix.dart'; | 9 import 'package:analysis_server/src/services/correction/fix.dart'; |
| 10 import 'package:analysis_server/src/services/correction/fix_internal.dart'; | 10 import 'package:analysis_server/src/services/correction/fix_internal.dart'; |
| (...skipping 3412 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3423 library main; | 3423 library main; |
| 3424 int main() async { | 3424 int main() async { |
| 3425 } | 3425 } |
| 3426 '''); | 3426 '''); |
| 3427 await assertHasFix( | 3427 await assertHasFix( |
| 3428 DartFixKind.REPLACE_RETURN_TYPE_FUTURE, | 3428 DartFixKind.REPLACE_RETURN_TYPE_FUTURE, |
| 3429 ''' | 3429 ''' |
| 3430 library main; | 3430 library main; |
| 3431 | 3431 |
| 3432 import 'dart:async'; | 3432 import 'dart:async'; |
| 3433 |
| 3433 Future<int> main() async { | 3434 Future<int> main() async { |
| 3434 } | 3435 } |
| 3435 '''); | 3436 '''); |
| 3436 } | 3437 } |
| 3437 | 3438 |
| 3438 test_illegalAsyncReturnType_asyncLibrary_usePrefix() async { | 3439 test_illegalAsyncReturnType_asyncLibrary_usePrefix() async { |
| 3439 errorFilter = (AnalysisError error) { | 3440 errorFilter = (AnalysisError error) { |
| 3440 return error.errorCode == StaticTypeWarningCode.ILLEGAL_ASYNC_RETURN_TYPE; | 3441 return error.errorCode == StaticTypeWarningCode.ILLEGAL_ASYNC_RETURN_TYPE; |
| 3441 }; | 3442 }; |
| 3442 await resolveTestUnit(''' | 3443 await resolveTestUnit(''' |
| (...skipping 3459 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6902 @override | 6903 @override |
| 6903 final AnalysisError error; | 6904 final AnalysisError error; |
| 6904 | 6905 |
| 6905 _DartFixContextImpl(this.resourceProvider, this.analysisDriver, | 6906 _DartFixContextImpl(this.resourceProvider, this.analysisDriver, |
| 6906 this.astProvider, this.unit, this.error); | 6907 this.astProvider, this.unit, this.error); |
| 6907 | 6908 |
| 6908 @override | 6909 @override |
| 6909 GetTopLevelDeclarations get getTopLevelDeclarations => | 6910 GetTopLevelDeclarations get getTopLevelDeclarations => |
| 6910 analysisDriver.getTopLevelNameDeclarations; | 6911 analysisDriver.getTopLevelNameDeclarations; |
| 6911 } | 6912 } |
| OLD | NEW |