| Index: compiler/javatests/com/google/dart/compiler/type/TypeAnalyzerTest.java
|
| diff --git a/compiler/javatests/com/google/dart/compiler/type/TypeAnalyzerTest.java b/compiler/javatests/com/google/dart/compiler/type/TypeAnalyzerTest.java
|
| index 576dee55cee8b4252feb732db0dd85d7778ec3d4..e22de0360df5cd278bf5a744c8f1e46729eaef07 100644
|
| --- a/compiler/javatests/com/google/dart/compiler/type/TypeAnalyzerTest.java
|
| +++ b/compiler/javatests/com/google/dart/compiler/type/TypeAnalyzerTest.java
|
| @@ -1346,4 +1346,21 @@ public class TypeAnalyzerTest extends TypeAnalyzerTestCase {
|
| analyzeFail("while ('') {}",
|
| TypeErrorCode.TYPE_NOT_ASSIGNMENT_COMPATIBLE);
|
| }
|
| +
|
| +
|
| + public void testValidateFactoryBounds() {
|
| + Map<String, ClassElement> source = loadSource(
|
| + "class Object {}",
|
| + "interface Foo {}",
|
| + "interface Bar extends Foo {}",
|
| + "interface IA<T> default A<T extends Foo> { IA(); }",
|
| + "class A<T extends Foo> implements IA<T> {",
|
| + " factory A() {}",
|
| + "}");
|
| + analyzeClasses(source);
|
| + // analyze("{ var val1 = new IA<Foo>(); }");
|
| + // analyze("{ var val1 = new IA<Bar>(); }");
|
| + analyzeFail("{ var val1 = new IA<String>(); }",TypeErrorCode.TYPE_NOT_ASSIGNMENT_COMPATIBLE);
|
| +
|
| + }
|
| }
|
|
|