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

Unified Diff: src/parser.cc

Issue 885243002: Implement parsing of ES6 Rest Parameters (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: [parsing]: eval/arguments parameter names are ok in sloppy mode Created 5 years, 10 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 | src/preparser.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/parser.cc
diff --git a/src/parser.cc b/src/parser.cc
index 2e2eea7fcd439efaae1a2599ac6c4a2b6201e7cb..08941f501f333511f612603e597e627327fc9373 100644
--- a/src/parser.cc
+++ b/src/parser.cc
@@ -3702,7 +3702,8 @@ FunctionLiteral* Parser::ParseFunctionLiteral(
if (!reserved_error_loc.IsValid() && is_strict_reserved) {
reserved_error_loc = scanner()->location();
}
- if (!dupe_error_loc.IsValid() && scope_->IsDeclared(param_name)) {
+ if (!dupe_error_loc.IsValid() &&
+ scope_->IsDeclaredParameter(param_name)) {
duplicate_parameters = FunctionLiteral::kHasDuplicateParameters;
dupe_error_loc = scanner()->location();
}
« no previous file with comments | « no previous file | src/preparser.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698