| Index: editor/tools/plugins/com.google.dart.engine_test/src/com/google/dart/engine/resolver/DeferredLoadingTest.java
|
| diff --git a/editor/tools/plugins/com.google.dart.engine_test/src/com/google/dart/engine/resolver/DeferredLoadingTest.java b/editor/tools/plugins/com.google.dart.engine_test/src/com/google/dart/engine/resolver/DeferredLoadingTest.java
|
| index 03d5ed09e3125199799b77b049e5ca082e379de5..d3928557a2cdf33d59948053660cc4fd1afc4abc 100644
|
| --- a/editor/tools/plugins/com.google.dart.engine_test/src/com/google/dart/engine/resolver/DeferredLoadingTest.java
|
| +++ b/editor/tools/plugins/com.google.dart.engine_test/src/com/google/dart/engine/resolver/DeferredLoadingTest.java
|
| @@ -531,6 +531,38 @@ public class DeferredLoadingTest 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;",
|
| @@ -574,6 +606,21 @@ public class DeferredLoadingTest 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;",
|
|
|