| 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 7c0c2bbcccd0307bd070b12f8e5c055123e28427..f9346531f5fbe672421b5b3694f79b869b9a30ee 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
|
| @@ -13,6 +13,7 @@
|
| */
|
| package com.google.dart.engine.resolver;
|
|
|
| +import com.google.dart.engine.error.StaticTypeWarningCode;
|
| import com.google.dart.engine.error.StaticWarningCode;
|
| import com.google.dart.engine.source.Source;
|
|
|
| @@ -423,6 +424,43 @@ public class StaticWarningCodeTest extends ResolverTestCase {
|
| verify(source);
|
| }
|
|
|
| + public void test_ambiguousImport_typeAnnotation() throws Exception {
|
| + Source source = addSource(createSource(//
|
| + "import 'lib1.dart';",
|
| + "import 'lib2.dart';",
|
| + "typedef N FT(N p);",
|
| + "N f(N p) {",
|
| + " N v;",
|
| + "}",
|
| + "class A {",
|
| + " N m() {}",
|
| + "}",
|
| + "class B<T extends N> {}"));
|
| + addSource("/lib1.dart", "class N {}");
|
| + addSource("/lib2.dart", "class N {}");
|
| + resolve(source);
|
| + assertErrors(
|
| + StaticTypeWarningCode.AMBIGUOUS_IMPORT,
|
| + StaticTypeWarningCode.AMBIGUOUS_IMPORT,
|
| + StaticTypeWarningCode.AMBIGUOUS_IMPORT,
|
| + StaticTypeWarningCode.AMBIGUOUS_IMPORT,
|
| + StaticTypeWarningCode.AMBIGUOUS_IMPORT,
|
| + StaticTypeWarningCode.AMBIGUOUS_IMPORT,
|
| + StaticTypeWarningCode.AMBIGUOUS_IMPORT);
|
| + }
|
| +
|
| + public void test_ambiguousImport_typeArgument_annotation() throws Exception {
|
| + Source source = addSource(createSource(//
|
| + "import 'lib1.dart';",
|
| + "import 'lib2.dart';",
|
| + "class A<T> {}",
|
| + "A<N> f() {}"));
|
| + addSource("/lib1.dart", "class N {}");
|
| + addSource("/lib2.dart", "class N {}");
|
| + resolve(source);
|
| + assertErrors(StaticTypeWarningCode.AMBIGUOUS_IMPORT);
|
| + }
|
| +
|
| public void test_assignmentToFinal_instanceVariable() throws Exception {
|
| Source source = addSource(createSource(//
|
| "class A {",
|
|
|