Index: src/ast/ast.cc |
diff --git a/src/ast/ast.cc b/src/ast/ast.cc |
index 43670ad8a5a2c87c134e41e84bc0384f0d417eb9..c055545c4ef4e715fb33cd4fe731cbe03fdc7cf4 100644 |
--- a/src/ast/ast.cc |
+++ b/src/ast/ast.cc |
@@ -64,6 +64,10 @@ bool Expression::IsNullLiteral() const { |
bool Expression::IsUndefinedLiteral(Isolate* isolate) const { |
+ if (IsLiteral() && AsLiteral()->value()->IsUndefined()) { |
+ return true; |
+ } |
+ |
const VariableProxy* var_proxy = AsVariableProxy(); |
if (var_proxy == NULL) return false; |
Variable* var = var_proxy->var(); |