Chromium Code Reviews| 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..1bf0dfeb5363e52f8bf70c6bf2878916cd21518c 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,8 @@ class A { |
| Source source = addSource(r''' |
| class A { |
| int x; |
| - factory A(this.x) {} |
|
scheglov
2016/04/27 15:52:01
I think you could replace this with:
factory A(th
srawlins
2016/04/27 19:52:34
Great suggestion!
|
| + A.named() {} |
| + factory A(this.x) => new A.named(); |
| }'''); |
| computeLibrarySourceErrors(source); |
| assertErrors( |
| @@ -3201,7 +3202,8 @@ class A { |
| Source source = addSource(r''' |
| int B; |
| class A { |
| - factory B() {} |
| + A.named() {} |
| + factory B() => new A.named(); |
| }'''); |
| computeLibrarySourceErrors(source); |
| assertErrors( |
| @@ -3212,7 +3214,8 @@ class A { |
| void test_invalidFactoryNameNotAClass_notEnclosingClassName() { |
| Source source = addSource(r''' |
| class A { |
| - factory B() {} |
| + A.named() {} |
| + factory B() => new A.named(); |
| }'''); |
| computeLibrarySourceErrors(source); |
| assertErrors( |
| @@ -4736,7 +4739,8 @@ class B extends A { |
| void test_nonGenerativeConstructor_explicit() { |
| Source source = addSource(r''' |
| class A { |
| - factory A.named() {} |
| + A.named2() {} |
| + factory A.named() => new A.named2(); |
| } |
| class B extends A { |
| B() : super.named(); |
| @@ -4749,7 +4753,8 @@ class B extends A { |
| void test_nonGenerativeConstructor_implicit() { |
| Source source = addSource(r''' |
| class A { |
| - factory A() {} |
| + A.named() {} |
| + factory A() => new A.named(); |
| } |
| class B extends A { |
| B(); |
| @@ -4762,7 +4767,8 @@ class B extends A { |
| void test_nonGenerativeConstructor_implicit2() { |
| Source source = addSource(r''' |
| class A { |
| - factory A() {} |
| + A.named() {} |
| + factory A() => new A.named(); |
| } |
| class B extends A { |
| }'''); |
| @@ -5758,8 +5764,10 @@ class A { |
| m() {} |
| } |
| class B extends A { |
| + B.named() {} |
| factory B() { |
| super.m(); |
| + return new B.named(); |
| } |
| }'''); |
| computeLibrarySourceErrors(source); |