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

Unified Diff: editor/tools/plugins/com.google.dart.engine_test/src/com/google/dart/engine/resolver/CompileTimeErrorCodeTest.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/CompileTimeErrorCodeTest.java
diff --git a/editor/tools/plugins/com.google.dart.engine_test/src/com/google/dart/engine/resolver/CompileTimeErrorCodeTest.java b/editor/tools/plugins/com.google.dart.engine_test/src/com/google/dart/engine/resolver/CompileTimeErrorCodeTest.java
index 6c164c8c8f174d6b63f38838297bcf7e9f40f21c..8e98db7bb3d653c68397c7fa226dec6458c7d2a2 100644
--- a/editor/tools/plugins/com.google.dart.engine_test/src/com/google/dart/engine/resolver/CompileTimeErrorCodeTest.java
+++ b/editor/tools/plugins/com.google.dart.engine_test/src/com/google/dart/engine/resolver/CompileTimeErrorCodeTest.java
@@ -2047,6 +2047,14 @@ public class CompileTimeErrorCodeTest extends ResolverTestCase {
// We cannot verify resolution with undefined labels
}
+ public void test_listElementTypeNotAssignable() throws Exception {
+ Source source = addSource(createSource(//
+ "var v = const <String> [42];"));
+ resolve(source);
+ assertErrors(CompileTimeErrorCode.LIST_ELEMENT_TYPE_NOT_ASSIGNABLE);
+ verify(source);
+ }
+
public void test_memberWithClassName_field() throws Exception {
Source source = addSource(createSource(//
"class A {",

Powered by Google App Engine
This is Rietveld 408576698