Fix check for empty type
authorrossberg@chromium.org <rossberg@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Tue, 27 May 2014 17:07:39 +0000 (17:07 +0000)
committerrossberg@chromium.org <rossberg@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Tue, 27 May 2014 17:07:39 +0000 (17:07 +0000)
R=mstarzinger@chromium.org
BUG=

Review URL: https://codereview.chromium.org/307453005

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@21538 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

src/typing.cc

index f32f0eb393d7c6943146371aee5e2f5eca35391e..6a3c94c0f85e240609b28a8a989eab8a2c7832bb 100644 (file)
@@ -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()) :