Index: src/parsing/parser-base.h |
diff --git a/src/parsing/parser-base.h b/src/parsing/parser-base.h |
index 57e37c4fdf6617de73f69ca1c53f498858ec0985..a844fc0f21d500c866f289e0e16726adc5effdfa 100644 |
--- a/src/parsing/parser-base.h |
+++ b/src/parsing/parser-base.h |
@@ -2294,6 +2294,8 @@ ParserBase<Traits>::ParseAssignmentExpression(bool accept_IN, |
ExpressionClassifier arrow_formals_classifier(this, |
classifier->duplicate_finder()); |
+ Scope::Snapshot scope_snapshot(scope()); |
+ |
bool is_async = allow_harmony_async_await() && peek() == Token::ASYNC && |
!scanner()->HasAnyLineTerminatorAfterNext() && |
IsValidArrowFormalParametersStart(PeekAhead()); |
@@ -2343,8 +2345,8 @@ ParserBase<Traits>::ParseAssignmentExpression(bool accept_IN, |
scope->set_start_position(lhs_beg_pos); |
Scanner::Location duplicate_loc = Scanner::Location::invalid(); |
- this->ParseArrowFunctionFormalParameterList(¶meters, expression, loc, |
- &duplicate_loc, CHECK_OK); |
+ this->ParseArrowFunctionFormalParameterList( |
+ ¶meters, expression, loc, &duplicate_loc, scope_snapshot, CHECK_OK); |
if (duplicate_loc.IsValid()) { |
arrow_formals_classifier.RecordDuplicateFormalParameterError( |
duplicate_loc); |