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

Unified Diff: pkg/analyzer/test/generated/hint_code_test.dart

Issue 2630023003: Report HintCode.MISSING_RETURN for async functions with return type that matters. (Closed)
Patch Set: Created 3 years, 11 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/analyzer/test/generated/hint_code_test.dart
diff --git a/pkg/analyzer/test/generated/hint_code_test.dart b/pkg/analyzer/test/generated/hint_code_test.dart
index 52b0febf25bf92c570fbce05e5e66a5dc5004015..07096ce70c973641298e86db84e2566f1924c2f1 100644
--- a/pkg/analyzer/test/generated/hint_code_test.dart
+++ b/pkg/analyzer/test/generated/hint_code_test.dart
@@ -168,6 +168,16 @@ n(int i) {}''');
verify([source]);
}
+ test_async_future_object_without_return() async {
+ Source source = addSource('''
+import 'dart:async';
+Future<Object> f() async {}
+''');
+ await computeAnalysisResult(source);
+ assertErrors(source, [HintCode.MISSING_RETURN]);
+ verify([source]);
+ }
+
test_canBeNullAfterNullAware_false_methodInvocation() async {
Source source = addSource(r'''
m(x) {

Powered by Google App Engine
This is Rietveld 408576698