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

Unified Diff: runtime/vm/ast.cc

Issue 10828053: Support const modifier in fields, variables (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 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 | runtime/vm/object.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/ast.cc
===================================================================
--- runtime/vm/ast.cc (revision 9982)
+++ runtime/vm/ast.cc (working copy)
@@ -129,7 +129,8 @@
case Token::kGT:
case Token::kLTE:
case Token::kGTE:
- if (left_val->IsNumber() && right_val->IsNumber()) {
+ if ((left_val->IsNumber() || left_val->IsNull()) &&
+ (right_val->IsNumber() || right_val->IsNull())) {
return &Bool::ZoneHandle(Bool::False());
}
return NULL;
@@ -141,10 +142,12 @@
// number, string, or boolean value (but not necessarily the same type).
if ((left_val->IsNumber() ||
left_val->IsString() ||
- left_val->IsBool()) &&
+ left_val->IsBool() ||
+ left_val->IsNull()) &&
(right_val->IsNumber() ||
right_val->IsString() ||
- right_val->IsBool())) {
+ right_val->IsBool() ||
+ right_val->IsNull())) {
return &Bool::ZoneHandle(Bool::False());
}
return NULL;
« no previous file with comments | « no previous file | runtime/vm/object.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698