| 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 2c1df0d1e4f350b7a4c86b8475ace39b545a6ad5..a9b6111562cbbcfe1eead756dd813dc5c05a362d 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
|
| @@ -936,7 +936,7 @@ public class CompileTimeErrorCodeTest extends ResolverTestCase {
|
| resolve(source);
|
| assertErrors(
|
| CompileTimeErrorCode.EXTENDS_DISALLOWED_CLASS,
|
| - StaticWarningCode.NO_DEFAULT_SUPER_CONSTRUCTOR_IMPLICIT);
|
| + CompileTimeErrorCode.NO_DEFAULT_SUPER_CONSTRUCTOR_IMPLICIT);
|
| verify(source);
|
| }
|
|
|
| @@ -946,7 +946,7 @@ public class CompileTimeErrorCodeTest extends ResolverTestCase {
|
| resolve(source);
|
| assertErrors(
|
| CompileTimeErrorCode.EXTENDS_DISALLOWED_CLASS,
|
| - StaticWarningCode.NO_DEFAULT_SUPER_CONSTRUCTOR_IMPLICIT);
|
| + CompileTimeErrorCode.NO_DEFAULT_SUPER_CONSTRUCTOR_IMPLICIT);
|
| verify(source);
|
| }
|
|
|
| @@ -956,7 +956,7 @@ public class CompileTimeErrorCodeTest extends ResolverTestCase {
|
| resolve(source);
|
| assertErrors(
|
| CompileTimeErrorCode.EXTENDS_DISALLOWED_CLASS,
|
| - StaticWarningCode.NO_DEFAULT_SUPER_CONSTRUCTOR_IMPLICIT);
|
| + CompileTimeErrorCode.NO_DEFAULT_SUPER_CONSTRUCTOR_IMPLICIT);
|
| verify(source);
|
| }
|
|
|
| @@ -966,7 +966,7 @@ public class CompileTimeErrorCodeTest extends ResolverTestCase {
|
| resolve(source);
|
| assertErrors(
|
| CompileTimeErrorCode.EXTENDS_DISALLOWED_CLASS,
|
| - StaticWarningCode.NO_DEFAULT_SUPER_CONSTRUCTOR_IMPLICIT);
|
| + CompileTimeErrorCode.NO_DEFAULT_SUPER_CONSTRUCTOR_IMPLICIT);
|
| verify(source);
|
| }
|
|
|
| @@ -976,7 +976,7 @@ public class CompileTimeErrorCodeTest extends ResolverTestCase {
|
| resolve(source);
|
| assertErrors(
|
| CompileTimeErrorCode.EXTENDS_DISALLOWED_CLASS,
|
| - StaticWarningCode.NO_DEFAULT_SUPER_CONSTRUCTOR_IMPLICIT);
|
| + CompileTimeErrorCode.NO_DEFAULT_SUPER_CONSTRUCTOR_IMPLICIT);
|
| verify(source);
|
| }
|
|
|
| @@ -1970,6 +1970,40 @@ public class CompileTimeErrorCodeTest extends ResolverTestCase {
|
| verify(source);
|
| }
|
|
|
| + public void test_noDefaultSuperConstructorExplicit() throws Exception {
|
| + Source source = addSource(createSource(//
|
| + "class A {",
|
| + " A(p);",
|
| + "}",
|
| + "class B extends A {",
|
| + " B() {}",
|
| + "}"));
|
| + resolve(source);
|
| + assertErrors(CompileTimeErrorCode.NO_DEFAULT_SUPER_CONSTRUCTOR_EXPLICIT);
|
| + verify(source);
|
| + }
|
| +
|
| + public void test_noDefaultSuperConstructorImplicit_superHasParameters() throws Exception {
|
| + Source source = addSource(createSource(//
|
| + "class A {",
|
| + " A(p);",
|
| + "}",
|
| + "class B extends A {",
|
| + "}"));
|
| + resolve(source);
|
| + assertErrors(CompileTimeErrorCode.NO_DEFAULT_SUPER_CONSTRUCTOR_IMPLICIT);
|
| + verify(source);
|
| + }
|
| +
|
| + public void test_noDefaultSuperConstructorImplicit_superOnlyNamed() throws Exception {
|
| + Source source = addSource(createSource(//
|
| + "class A { A.named() {} }",
|
| + "class B extends A {}"));
|
| + resolve(source);
|
| + assertErrors(CompileTimeErrorCode.NO_DEFAULT_SUPER_CONSTRUCTOR_IMPLICIT);
|
| + verify(source);
|
| + }
|
| +
|
| public void test_nonConstantDefaultValue_function_named() throws Exception {
|
| Source source = addSource(createSource(//
|
| "int y;",
|
| @@ -2207,6 +2241,18 @@ public class CompileTimeErrorCodeTest extends ResolverTestCase {
|
| verify(source);
|
| }
|
|
|
| + public void test_nonGenerativeConstructor_implicit2() throws Exception {
|
| + Source source = addSource(createSource(//
|
| + "class A {",
|
| + " factory A() {}",
|
| + "}",
|
| + "class B extends A {",
|
| + "}"));
|
| + resolve(source);
|
| + assertErrors(CompileTimeErrorCode.NON_GENERATIVE_CONSTRUCTOR);
|
| + verify(source);
|
| + }
|
| +
|
| public void test_notEnoughRequiredArguments_const() throws Exception {
|
| Source source = addSource(createSource(//
|
| "class A {",
|
|
|