Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(430)

Unified Diff: editor/tools/plugins/com.google.dart.engine_test/src/com/google/dart/engine/resolver/StaticWarningCodeTest.java

Issue 18473006: Report LIST_ELEMENT_TYPE_NOT_ASSIGNABLE warning/error. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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 fbe417b7e70d9fdfce63bbb4a66684c898ebc7e1..c2b58071ea75d6745021748e5e460d44e69d7259 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
@@ -1197,6 +1197,14 @@ public class StaticWarningCodeTest extends ResolverTestCase {
verify(source);
}
+ public void test_listElementTypeNotAssignable() throws Exception {
+ Source source = addSource(createSource(//
+ "var v = <String> [42];"));
+ resolve(source);
+ assertErrors(StaticWarningCode.LIST_ELEMENT_TYPE_NOT_ASSIGNABLE);
+ verify(source);
+ }
+
public void test_mismatchedAccessorTypes_class() throws Exception {
Source source = addSource(createSource(//
"class A {",

Powered by Google App Engine
This is Rietveld 408576698