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

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

Issue 9802023: Correctly handle constness for list and map literals inside bodies. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Add TODOs. Created 8 years, 9 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/scanner/listener.dart » ('j') | no next file with comments »
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 94c98c5f9b08edbfd6af8cfd32eb8b6b882bee4e..4472547c9653d75cb8174a4c76d93c3a6a0c6b07 100644
--- a/lib/compiler/implementation/compile_time_constants.dart
+++ b/lib/compiler/implementation/compile_time_constants.dart
@@ -710,8 +710,7 @@ class CompileTimeConstantEvaluator extends AbstractVisitor {
}
Constant visitLiteralMap(LiteralMap node) {
- // TODO(floitsch): check for isConst, once the parser adds it into the node.
- // if (!node.isConst()) error(node);
+ if (!node.isConst()) error(node);
List<StringConstant> keys = <StringConstant>[];
List<Constant> values = <Constant>[];
bool hasProtoKey = false;
« no previous file with comments | « no previous file | lib/compiler/implementation/scanner/listener.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698