| 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 cb7fe3d1690ae827c91fd0fa4e1cf4188638e694..35daf4bb4fbe19c94cf674eea0b2b633c4d132e2 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
|
| @@ -40,15 +40,6 @@ public class CompileTimeErrorCodeTest extends ResolverTestCase {
|
| verify(source);
|
| }
|
|
|
| - public void fail_constWithTypeParameters() throws Exception {
|
| - Source source = addSource(createSource(//
|
| - // TODO
|
| - ));
|
| - resolve(source);
|
| - assertErrors(CompileTimeErrorCode.CONST_WITH_TYPE_PARAMETERS);
|
| - verify(source);
|
| - }
|
| -
|
| public void fail_duplicateDefinition() throws Exception {
|
| Source source = addSource(createSource(//
|
| "f() {",
|
| @@ -915,6 +906,28 @@ public class CompileTimeErrorCodeTest extends ResolverTestCase {
|
| verify(source);
|
| }
|
|
|
| + public void test_constWithTypeParameters_direct() throws Exception {
|
| + Source source = addSource(createSource(//
|
| + "class A<T> {",
|
| + " const V = const A<T>();",
|
| + " const A();",
|
| + "}"));
|
| + resolve(source);
|
| + assertErrors(CompileTimeErrorCode.CONST_WITH_TYPE_PARAMETERS);
|
| + verify(source);
|
| + }
|
| +
|
| + public void test_constWithTypeParameters_indirect() throws Exception {
|
| + Source source = addSource(createSource(//
|
| + "class A<T> {",
|
| + " const V = const A<List<T>>();",
|
| + " const A();",
|
| + "}"));
|
| + resolve(source);
|
| + assertErrors(CompileTimeErrorCode.CONST_WITH_TYPE_PARAMETERS);
|
| + verify(source);
|
| + }
|
| +
|
| public void test_constWithUndefinedConstructor() throws Exception {
|
| Source source = addSource(createSource(//
|
| "class A {",
|
|
|