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

Unified Diff: src/parsing/parser.cc

Issue 2365693004: Refine duplicate arrow function parameter location handling (Closed)
Patch Set: Make MSVC happy Created 4 years, 3 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 | « src/parsing/expression-classifier.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/parsing/parser.cc
diff --git a/src/parsing/parser.cc b/src/parsing/parser.cc
index 6c0b58e2b2d2808096fcafe0a40bf606117d84ed..d07bea10e1d5f3d66929bfeee9294cbbe9105073 100644
--- a/src/parsing/parser.cc
+++ b/src/parsing/parser.cc
@@ -2609,7 +2609,9 @@ void Parser::ParseArrowFunctionFormalParameterList(
for (int i = 0; i < parameters->Arity(); ++i) {
auto parameter = parameters->at(i);
DeclareFormalParameter(parameters->scope, parameter);
- if (!duplicate_loc->IsValid()) {
+ if (!this->classifier()
+ ->is_valid_formal_parameter_list_without_duplicates() &&
+ !duplicate_loc->IsValid()) {
*duplicate_loc =
this->classifier()->duplicate_formal_parameter_error().location;
}
« no previous file with comments | « src/parsing/expression-classifier.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698