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

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

Issue 1923593002: provide MISSING_RETURN on factory constructors (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Addressing feedback Created 4 years, 8 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 79cb436237721a895b190310f5e9ae64d77c75bc..9ed41933b10fadac80210e51955437d4ee8aea2e 100644
--- a/pkg/analyzer/test/generated/hint_code_test.dart
+++ b/pkg/analyzer/test/generated/hint_code_test.dart
@@ -1323,6 +1323,17 @@ Future<int> f() async {}
verify([source]);
}
+ void test_missingReturn_factory() {
+ Source source = addSource(r'''
+class A {
+ factory A() {}
+}
+''');
+ computeLibrarySourceErrors(source);
+ assertErrors(source, [HintCode.MISSING_RETURN]);
+ verify([source]);
+ }
+
void test_missingReturn_method() {
Source source = addSource(r'''
class A {

Powered by Google App Engine
This is Rietveld 408576698