| Index: editor/tools/plugins/com.google.dart.engine_test/src/com/google/dart/engine/resolver/StaticTypeWarningCodeTest.java
|
| diff --git a/editor/tools/plugins/com.google.dart.engine_test/src/com/google/dart/engine/resolver/StaticTypeWarningCodeTest.java b/editor/tools/plugins/com.google.dart.engine_test/src/com/google/dart/engine/resolver/StaticTypeWarningCodeTest.java
|
| index e8502b10166ad386b3ca4de906a6893aa6c81e45..de00d2a56318eea2f0b298d1ff0d94b3dd5110ae 100644
|
| --- a/editor/tools/plugins/com.google.dart.engine_test/src/com/google/dart/engine/resolver/StaticTypeWarningCodeTest.java
|
| +++ b/editor/tools/plugins/com.google.dart.engine_test/src/com/google/dart/engine/resolver/StaticTypeWarningCodeTest.java
|
| @@ -26,16 +26,6 @@ public class StaticTypeWarningCodeTest extends ResolverTestCase {
|
| verify(source);
|
| }
|
|
|
| - public void fail_nonTypeAsTypeArgument() throws Exception {
|
| - Source source = addSource(createSource(//
|
| - "int A;",
|
| - "class B<E> {}",
|
| - "f(B<A> b) {}"));
|
| - resolve(source);
|
| - assertErrors(StaticTypeWarningCode.NON_TYPE_AS_TYPE_ARGUMENT);
|
| - verify(source);
|
| - }
|
| -
|
| public void fail_redirectWithInvalidTypeParameters() throws Exception {
|
| Source source = addSource(createSource(//
|
| // TODO
|
| @@ -268,6 +258,25 @@ public class StaticTypeWarningCodeTest extends ResolverTestCase {
|
| verify(source);
|
| }
|
|
|
| + public void test_nonTypeAsTypeArgument_notAType() throws Exception {
|
| + Source source = addSource(createSource(//
|
| + "int A;",
|
| + "class B<E> {}",
|
| + "f(B<A> b) {}"));
|
| + resolve(source);
|
| + assertErrors(StaticTypeWarningCode.NON_TYPE_AS_TYPE_ARGUMENT);
|
| + verify(source);
|
| + }
|
| +
|
| + public void test_nonTypeAsTypeArgument_undefinedIdentifier() throws Exception {
|
| + Source source = addSource(createSource(//
|
| + "class B<E> {}",
|
| + "f(B<A> b) {}"));
|
| + resolve(source);
|
| + assertErrors(StaticTypeWarningCode.NON_TYPE_AS_TYPE_ARGUMENT);
|
| + verify(source);
|
| + }
|
| +
|
| public void test_returnOfInvalidType_expressionFunctionBody_function() throws Exception {
|
| Source source = addSource(createSource(//
|
| "int f() => '0';"));
|
|
|