Index: src/parser.cc |
diff --git a/src/parser.cc b/src/parser.cc |
index 887b272cd24a1f7f7dc4de9b17401737d727da6c..ad8850ec81bf9c79ef225e65e436f5e6965f36ee 100644 |
--- a/src/parser.cc |
+++ b/src/parser.cc |
@@ -1765,6 +1765,8 @@ Block* Parser::ParseVariableDeclarations(VariableDeclarationContext var_context, |
value->AsCall() == NULL && |
value->AsCallNew() == NULL) { |
fni_->Infer(); |
+ } else { |
+ fni_->RemoveLastFunction(); |
} |
} |
@@ -2515,6 +2517,8 @@ Expression* Parser::ParseAssignmentExpression(bool accept_IN, bool* ok) { |
|| op == Token::ASSIGN) |
&& (right->AsCall() == NULL && right->AsCallNew() == NULL)) { |
fni_->Infer(); |
+ } else { |
+ fni_->RemoveLastFunction(); |
} |
fni_->Leave(); |
} |