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

Unified Diff: src/typing.cc

Issue 307453005: Fix check for empty type (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 7 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/typing.cc
diff --git a/src/typing.cc b/src/typing.cc
index f32f0eb393d7c6943146371aee5e2f5eca35391e..6a3c94c0f85e240609b28a8a989eab8a2c7832bb 100644
--- a/src/typing.cc
+++ b/src/typing.cc
@@ -675,7 +675,7 @@ void AstTyper::VisitBinaryOperation(BinaryOperation* expr) {
Bounds l = expr->left()->bounds();
Bounds r = expr->right()->bounds();
Type* lower =
- l.lower->Is(Type::None()) || r.lower->Is(Type::None()) ?
+ !l.lower->IsInhabited() || !r.lower->IsInhabited() ?
Type::None(zone()) :
l.lower->Is(Type::String()) || r.lower->Is(Type::String()) ?
Type::String(zone()) :
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698