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 47ba93ffb04391980b3157fb2302a892a2b772d9..b323aa745ea19ac9a7f57a6d3274573914aa7802 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 |
@@ -252,6 +252,17 @@ public class StaticTypeWarningCodeTest extends ResolverTestCase { |
verify(source); |
} |
+ public void test_invalidAssignment_regressionInR35501() throws Exception { |
jwren
2014/08/27 06:59:39
Change R35501 to issue number.
karlklose
2014/08/28 06:59:54
Shouldn't we add these as language tests? Every to
Nathan Collins
2014/08/28 22:23:17
Sounds good. How do I add a "language test"?
karlklose
2014/08/29 08:01:09
Add a test in tests/language. To test warnings you
Nathan Collins
2014/08/29 20:13:37
Thanks! I added the tests here: https://codereview
karlklose
2014/09/01 07:35:23
Writing tests for the VM and dart2js is a bit tric
|
+ // https://code.google.com/p/dart/issues/detail?id=18628 |
+ Source source = addSource(createSource(// |
+ "class C<T> {", |
+ " T t = int;", |
+ "}")); |
+ resolve(source); |
+ assertErrors(source, StaticTypeWarningCode.INVALID_ASSIGNMENT); |
+ verify(source); |
+ } |
+ |
public void test_invalidAssignment_staticVariable() throws Exception { |
Source source = addSource(createSource(// |
"class A {", |
@@ -617,6 +628,16 @@ public class StaticTypeWarningCodeTest extends ResolverTestCase { |
verify(source); |
} |
+ public void test_typeArgumentNotMatchingBounds_extends_regressionInR35501() throws Exception { |
jwren
2014/08/27 06:59:39
Same here.
|
+ // https://code.google.com/p/dart/issues/detail?id=18628 |
+ Source source = addSource(createSource(// |
+ "class X<T extends Type> {}", |
+ "class Y<U> extends X<U> {}")); |
+ resolve(source); |
+ assertErrors(source, StaticTypeWarningCode.TYPE_ARGUMENT_NOT_MATCHING_BOUNDS); |
+ verify(source); |
+ } |
+ |
public void test_typeArgumentNotMatchingBounds_fieldFormalParameter() throws Exception { |
Source source = addSource(createSource(// |
"class A {}", |