| 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 aa4601a705de012745c19e279fc319cc517d37b6..cb253ba08f9f7211600601cfbe1a4e73e48d102e 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
|
| @@ -2672,6 +2672,38 @@ public class StaticWarningCodeTest extends ResolverTestCase {
|
| verify(source);
|
| }
|
|
|
| + public void test_typeAnnotationDeferredClass_asExpression() throws Exception {
|
| + addNamedSource("/lib1.dart", createSource(//
|
| + "library lib1;",
|
| + "class A {}"));
|
| + Source source = addSource(createSource(//
|
| + "library root;",
|
| + "import 'lib1.dart' deferred as a;",
|
| + "f(var v) {",
|
| + " v as a.A;",
|
| + "}"));
|
| + resolve(source);
|
| + assertErrors(source, StaticWarningCode.TYPE_ANNOTATION_DEFERRED_CLASS);
|
| + verify(source);
|
| + }
|
| +
|
| + public void test_typeAnnotationDeferredClass_catchClause() throws Exception {
|
| + addNamedSource("/lib1.dart", createSource(//
|
| + "library lib1;",
|
| + "class A {}"));
|
| + Source source = addSource(createSource(//
|
| + "library root;",
|
| + "import 'lib1.dart' deferred as a;",
|
| + "f(var v) {",
|
| + " try {",
|
| + " } on a.A {",
|
| + " }",
|
| + "}"));
|
| + resolve(source);
|
| + assertErrors(source, StaticWarningCode.TYPE_ANNOTATION_DEFERRED_CLASS);
|
| + verify(source);
|
| + }
|
| +
|
| public void test_typeAnnotationDeferredClass_fieldFormalParameter() throws Exception {
|
| addNamedSource("/lib1.dart", createSource(//
|
| "library lib1;",
|
| @@ -2715,6 +2747,21 @@ public class StaticWarningCodeTest extends ResolverTestCase {
|
| verify(source);
|
| }
|
|
|
| + public void test_typeAnnotationDeferredClass_isExpression() throws Exception {
|
| + addNamedSource("/lib1.dart", createSource(//
|
| + "library lib1;",
|
| + "class A {}"));
|
| + Source source = addSource(createSource(//
|
| + "library root;",
|
| + "import 'lib1.dart' deferred as a;",
|
| + "f(var v) {",
|
| + " bool b = v is a.A;",
|
| + "}"));
|
| + resolve(source);
|
| + assertErrors(source, StaticWarningCode.TYPE_ANNOTATION_DEFERRED_CLASS);
|
| + verify(source);
|
| + }
|
| +
|
| public void test_typeAnnotationDeferredClass_methodDeclaration_returnType() throws Exception {
|
| addNamedSource("/lib1.dart", createSource(//
|
| "library lib1;",
|
|
|