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); |