| Index: editor/tools/plugins/com.google.dart.engine_test/src/com/google/dart/engine/resolver/CompileTimeErrorCodeTest.java
|
| diff --git a/editor/tools/plugins/com.google.dart.engine_test/src/com/google/dart/engine/resolver/CompileTimeErrorCodeTest.java b/editor/tools/plugins/com.google.dart.engine_test/src/com/google/dart/engine/resolver/CompileTimeErrorCodeTest.java
|
| index a95c2e042fc48e9e79fd3e542899ba764d3e36f8..c48c77a958f1d60c6769823d713e436eb36ea5fd 100644
|
| --- a/editor/tools/plugins/com.google.dart.engine_test/src/com/google/dart/engine/resolver/CompileTimeErrorCodeTest.java
|
| +++ b/editor/tools/plugins/com.google.dart.engine_test/src/com/google/dart/engine/resolver/CompileTimeErrorCodeTest.java
|
| @@ -2136,6 +2136,29 @@ public class CompileTimeErrorCodeTest extends ResolverTestCase {
|
| verify(source);
|
| }
|
|
|
| + public void test_recursiveConstructorRedirect() throws Exception {
|
| + Source source = addSource(createSource(//
|
| + "class A {",
|
| + " A.a() : this.b();",
|
| + " A.b() : this.a();",
|
| + "}"));
|
| + resolve(source);
|
| + assertErrors(
|
| + CompileTimeErrorCode.RECURSIVE_CONSTRUCTOR_REDIRECT,
|
| + CompileTimeErrorCode.RECURSIVE_CONSTRUCTOR_REDIRECT);
|
| + verify(source);
|
| + }
|
| +
|
| + public void test_recursiveConstructorRedirect_directSelfReference() throws Exception {
|
| + Source source = addSource(createSource(//
|
| + "class A {",
|
| + " A() : this();",
|
| + "}"));
|
| + resolve(source);
|
| + assertErrors(CompileTimeErrorCode.RECURSIVE_CONSTRUCTOR_REDIRECT);
|
| + verify(source);
|
| + }
|
| +
|
| public void test_recursiveFactoryRedirect() throws Exception {
|
| Source source = addSource(createSource(//
|
| "class A implements B {",
|
|
|