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

Unified Diff: runtime/vm/parser.cc

Issue 1243263003: Fix bad assert in constant evaluation. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 5 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 | tests/language/indirect_const_null_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/parser.cc
diff --git a/runtime/vm/parser.cc b/runtime/vm/parser.cc
index ce6dec46202873d52a54b104ee486b62f2b08928..ee41192a02ee984dc7f60f0bbad54cd0fdf63001 100644
--- a/runtime/vm/parser.cc
+++ b/runtime/vm/parser.cc
@@ -13455,7 +13455,7 @@ const Instance& Parser::EvaluateConstExpr(intptr_t expr_pos, AstNode* expr) {
script_, expr_pos,
"error evaluating constant expression");
}
- ASSERT(result.IsInstance());
+ ASSERT(result.IsInstance() || result.IsNull());
Instance& value = Instance::ZoneHandle(Z);
value ^= result.raw();
value = TryCanonicalize(value, TokenPos());
« no previous file with comments | « no previous file | tests/language/indirect_const_null_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698