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

Unified Diff: pkg/analysis_server/test/services/correction/fix_test.dart

Issue 1487683006: Fix for exception in FixProcessor._addFix_illegalAsyncReturnType. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years 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
« no previous file with comments | « pkg/analysis_server/lib/src/services/correction/fix_internal.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analysis_server/test/services/correction/fix_test.dart
diff --git a/pkg/analysis_server/test/services/correction/fix_test.dart b/pkg/analysis_server/test/services/correction/fix_test.dart
index 72134291fc46b05df19c6a8bd569a98adb30ed31..b9b68572ed932a35be08a129674d021e1d615ce1 100644
--- a/pkg/analysis_server/test/services/correction/fix_test.dart
+++ b/pkg/analysis_server/test/services/correction/fix_test.dart
@@ -2600,6 +2600,22 @@ main() {
''');
}
+ test_illegalAsyncReturnType_adjacentNodes() async {
+ errorFilter = (AnalysisError error) {
+ return error.errorCode == StaticTypeWarningCode.ILLEGAL_ASYNC_RETURN_TYPE;
+ };
+ resolveTestUnit('''
+import 'dart:async';
+var v;int main() async => 0;
+''');
+ await assertHasFix(
+ DartFixKind.REPLACE_RETURN_TYPE_FUTURE,
+ '''
+import 'dart:async';
+var v;Future<int> main() async => 0;
+''');
+ }
+
test_illegalAsyncReturnType_asyncLibrary_import() async {
errorFilter = (AnalysisError error) {
return error.errorCode == StaticTypeWarningCode.ILLEGAL_ASYNC_RETURN_TYPE;
« no previous file with comments | « pkg/analysis_server/lib/src/services/correction/fix_internal.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698