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

Unified Diff: pkg/analyzer/test/generated/compile_time_error_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
« no previous file with comments | « pkg/analyzer/lib/src/generated/resolver.dart ('k') | pkg/analyzer/test/generated/hint_code_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/test/generated/compile_time_error_code_test.dart
diff --git a/pkg/analyzer/test/generated/compile_time_error_code_test.dart b/pkg/analyzer/test/generated/compile_time_error_code_test.dart
index 34dd9b9745d9de998da40caa7779eae36799ea8d..5bd95e5bb264d7692d3ae7daaa746aa539cf67a8 100644
--- a/pkg/analyzer/test/generated/compile_time_error_code_test.dart
+++ b/pkg/analyzer/test/generated/compile_time_error_code_test.dart
@@ -2209,7 +2209,7 @@ class A {
Source source = addSource(r'''
class A {
int x;
- factory A(this.x) {}
+ factory A(this.x) => null;
}''');
computeLibrarySourceErrors(source);
assertErrors(
@@ -3201,7 +3201,7 @@ class A {
Source source = addSource(r'''
int B;
class A {
- factory B() {}
+ factory B() => null;
}''');
computeLibrarySourceErrors(source);
assertErrors(
@@ -3212,7 +3212,7 @@ class A {
void test_invalidFactoryNameNotAClass_notEnclosingClassName() {
Source source = addSource(r'''
class A {
- factory B() {}
+ factory B() => null;
}''');
computeLibrarySourceErrors(source);
assertErrors(
@@ -4736,7 +4736,7 @@ class B extends A {
void test_nonGenerativeConstructor_explicit() {
Source source = addSource(r'''
class A {
- factory A.named() {}
+ factory A.named() => null;
}
class B extends A {
B() : super.named();
@@ -4749,7 +4749,7 @@ class B extends A {
void test_nonGenerativeConstructor_implicit() {
Source source = addSource(r'''
class A {
- factory A() {}
+ factory A() => null;
}
class B extends A {
B();
@@ -4762,7 +4762,7 @@ class B extends A {
void test_nonGenerativeConstructor_implicit2() {
Source source = addSource(r'''
class A {
- factory A() {}
+ factory A() => null;
}
class B extends A {
}''');
@@ -5760,6 +5760,7 @@ class A {
class B extends A {
factory B() {
super.m();
+ return null;
}
}''');
computeLibrarySourceErrors(source);
« no previous file with comments | « pkg/analyzer/lib/src/generated/resolver.dart ('k') | pkg/analyzer/test/generated/hint_code_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698