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

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

Issue 610863004: Start implementing checked mode compile time errors in analyzer. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 3 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 63a94cf288588bcfa1d16483d056c3b99b310dff..2d2de16a6aa7a5c979dbf75aa0654b3ea442a0d3 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
@@ -1172,6 +1172,17 @@ public class StaticWarningCodeTest extends ResolverTestCase {
verify(source);
}
+ public void test_fieldInitializerNotAssignable_const_unchecked() throws Exception {
+ Source source = addSource(createSource(//
+ "class A {",
+ " final int x;",
+ " const A() : x = '';",
+ "}"));
+ resolve(source);
+ assertErrors(source, StaticWarningCode.FIELD_INITIALIZER_NOT_ASSIGNABLE);
+ verify(source);
+ }
+
public void test_fieldInitializingFormalNotAssignable() throws Exception {
Source source = addSource(createSource(//
"class A {",

Powered by Google App Engine
This is Rietveld 408576698