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

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

Issue 24191008: Report CTEC.CONST_NOT_INITIALIZED (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 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/NonErrorResolverTest.java
diff --git a/editor/tools/plugins/com.google.dart.engine_test/src/com/google/dart/engine/resolver/NonErrorResolverTest.java b/editor/tools/plugins/com.google.dart.engine_test/src/com/google/dart/engine/resolver/NonErrorResolverTest.java
index 837ae82131ac0afef01c3dcf1a1d06be3e36f412..1ebd85b2154a00191d470135bd87d31bedda0979 100644
--- a/editor/tools/plugins/com.google.dart.engine_test/src/com/google/dart/engine/resolver/NonErrorResolverTest.java
+++ b/editor/tools/plugins/com.google.dart.engine_test/src/com/google/dart/engine/resolver/NonErrorResolverTest.java
@@ -504,6 +504,26 @@ public class NonErrorResolverTest extends ResolverTestCase {
verify(source);
}
+ public void test_constNotInitialized_field() throws Exception {
+ Source source = addSource(createSource(//
+ "class A {",
+ " static const int x = 0;",
+ "}"));
+ resolve(source);
+ assertNoErrors(source);
+ verify(source);
+ }
+
+ public void test_constNotInitialized_local() throws Exception {
+ Source source = addSource(createSource(//
+ "main() {",
+ " const int x = 0;",
+ "}"));
+ resolve(source);
+ assertNoErrors(source);
+ verify(source);
+ }
+
public void test_constWithNonConstantArgument_literals() throws Exception {
Source source = addSource(createSource(//
"class A {",

Powered by Google App Engine
This is Rietveld 408576698