| Index: editor/tools/plugins/com.google.dart.engine_test/src/com/google/dart/engine/resolver/StaticWarningCodeTest.java
|
| diff --git a/editor/tools/plugins/com.google.dart.engine_test/src/com/google/dart/engine/resolver/StaticWarningCodeTest.java b/editor/tools/plugins/com.google.dart.engine_test/src/com/google/dart/engine/resolver/StaticWarningCodeTest.java
|
| index c5ae1f62acbdb4746b09bbaa286f1ca4e0d5f47a..0cd65ec4dd2903ef128eed1bdfdd651472506cc2 100644
|
| --- a/editor/tools/plugins/com.google.dart.engine_test/src/com/google/dart/engine/resolver/StaticWarningCodeTest.java
|
| +++ b/editor/tools/plugins/com.google.dart.engine_test/src/com/google/dart/engine/resolver/StaticWarningCodeTest.java
|
| @@ -386,6 +386,32 @@ public class StaticWarningCodeTest extends ResolverTestCase {
|
| verify(source);
|
| }
|
|
|
| + public void test_argumentTypeNotAssignable_const() throws Exception {
|
| + Source source = addSource(createSource(//
|
| + "class A {",
|
| + " const A(String p);",
|
| + "}",
|
| + "main() {",
|
| + " const A(42);",
|
| + "}"));
|
| + resolve(source);
|
| + assertErrors(source, StaticWarningCode.ARGUMENT_TYPE_NOT_ASSIGNABLE);
|
| + verify(source);
|
| + }
|
| +
|
| + public void test_argumentTypeNotAssignable_const_super() throws Exception {
|
| + Source source = addSource(createSource(//
|
| + "class A {",
|
| + " const A(String p);",
|
| + "}",
|
| + "class B extends A {",
|
| + " const B() : super(42);",
|
| + "}"));
|
| + resolve(source);
|
| + assertErrors(source, StaticWarningCode.ARGUMENT_TYPE_NOT_ASSIGNABLE);
|
| + verify(source);
|
| + }
|
| +
|
| public void test_argumentTypeNotAssignable_index() throws Exception {
|
| Source source = addSource(createSource(//
|
| "class A {",
|
|
|