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

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

Issue 10857041: Fix for issue 3550 (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 4 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: compiler/java/com/google/dart/compiler/resolver/CompileTimeConstantAnalyzer.java
===================================================================
--- compiler/java/com/google/dart/compiler/resolver/CompileTimeConstantAnalyzer.java (revision 10845)
+++ compiler/java/com/google/dart/compiler/resolver/CompileTimeConstantAnalyzer.java (working copy)
@@ -720,7 +720,7 @@
@Override
public Void visitVariableStatement(DartVariableStatement node) {
Modifiers modifiers = node.getModifiers();
- if (modifiers.isStatic() && modifiers.isFinal()) {
+ if (modifiers.isConstant() || (modifiers.isStatic() && modifiers.isFinal())) {
for (DartVariable variable : node.getVariables()) {
if (variable.getValue() != null) {
checkConstantExpression(variable.getValue());

Powered by Google App Engine
This is Rietveld 408576698