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

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

Issue 18051016: Do report StaticWarningCode.FINAL_NOT_INITIALIZED (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Don't report for native classes 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 c5496cc75ac2d801bc4a59727758a6a39f16c528..6df94d3076b99ba998e20338b1c405fc18dd7fc8 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
@@ -76,17 +76,6 @@ public class StaticWarningCodeTest extends ResolverTestCase {
verify(source);
}
- public void fail_finalNotInitialized_inConstructor() throws Exception {
- Source source = addSource(createSource(//
- "class A {",
- " final int x;",
- " A() {}",
- "}"));
- resolve(source);
- assertErrors(StaticWarningCode.FINAL_NOT_INITIALIZED);
- verify(source);
- }
-
public void fail_invalidFactoryName() throws Exception {
Source source = addSource(createSource(//
// TODO
@@ -804,6 +793,17 @@ public class StaticWarningCodeTest extends ResolverTestCase {
verify(source);
}
+ public void test_finalNotInitialized_inConstructor() throws Exception {
+ Source source = addSource(createSource(//
+ "class A {",
+ " final int x;",
+ " A() {}",
+ "}"));
+ resolve(source);
+ assertErrors(StaticWarningCode.FINAL_NOT_INITIALIZED);
+ verify(source);
+ }
+
public void test_finalNotInitialized_instanceField_const_static() throws Exception {
Source source = addSource(createSource(//
"class A {",

Powered by Google App Engine
This is Rietveld 408576698