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

Unified Diff: compiler/java/com/google/dart/compiler/resolver/CompileTimeConstantAnalyzer.java

Issue 10907215: Issue 3553. Stop treating static final variables as constants (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Tweaks for tests Created 8 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
« no previous file with comments | « no previous file | compiler/java/com/google/dart/compiler/resolver/Elements.java » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: compiler/java/com/google/dart/compiler/resolver/CompileTimeConstantAnalyzer.java
diff --git a/compiler/java/com/google/dart/compiler/resolver/CompileTimeConstantAnalyzer.java b/compiler/java/com/google/dart/compiler/resolver/CompileTimeConstantAnalyzer.java
index 19c06f3bbc387e4ce88a4f0ead23a4d31d94bc12..fa16775977e64ef93b2f98b2b4d729f015dbcbb8 100644
--- a/compiler/java/com/google/dart/compiler/resolver/CompileTimeConstantAnalyzer.java
+++ b/compiler/java/com/google/dart/compiler/resolver/CompileTimeConstantAnalyzer.java
@@ -385,9 +385,7 @@ public class CompileTimeConstantAnalyzer {
visitedElements.add(element);
// Should be declared as constant.
- // TODO(brianwilkerson) Remove the second condition when final variables are no longer
- // treated like constants
- if (!element.getModifiers().isConstant() && !element.getModifiers().isFinal()) {
+ if (!element.getModifiers().isConstant()) {
expectedConstant(x);
}
« no previous file with comments | « no previous file | compiler/java/com/google/dart/compiler/resolver/Elements.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698