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

Unified Diff: lib/compiler/implementation/compile_time_constants.dart

Issue 10879003: Const variables handled as final (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Comment shortened 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
« no previous file with comments | « no previous file | lib/compiler/implementation/elements/elements.dart » ('j') | tests/co19/co19-dart2js.status » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/compiler/implementation/compile_time_constants.dart
diff --git a/lib/compiler/implementation/compile_time_constants.dart b/lib/compiler/implementation/compile_time_constants.dart
index f2110bbd05a4b1ddc72766cfa5f3638d03c9e3ad..4b57f4e3447e8f84c49189e058066b9117c3853a 100644
--- a/lib/compiler/implementation/compile_time_constants.dart
+++ b/lib/compiler/implementation/compile_time_constants.dart
@@ -839,7 +839,8 @@ class CompileTimeConstantEvaluator extends AbstractVisitor {
Element element = elements[send];
if (Elements.isStaticOrTopLevelField(element)) {
if (element.modifiers === null ||
- !element.modifiers.isFinal()) {
+ // TODO(johnniwinther): This should eventually be [isConst].
+ !element.modifiers.isFinalOrConst()) {
error(send);
}
return compiler.compileVariable(element);
« no previous file with comments | « no previous file | lib/compiler/implementation/elements/elements.dart » ('j') | tests/co19/co19-dart2js.status » ('J')

Powered by Google App Engine
This is Rietveld 408576698