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

Unified Diff: src/parsing/pattern-rewriter.cc

Issue 2447143005: [parsing] When failing due to variable redeclaration, point at the variable. (Closed)
Patch Set: Address review comments. Created 4 years, 2 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/parser.cc ('k') | test/message/modules-import-redeclare3.out » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/parsing/pattern-rewriter.cc
diff --git a/src/parsing/pattern-rewriter.cc b/src/parsing/pattern-rewriter.cc
index 0faada1741e112462433ab04a57f071aee571447..21b1cec69655c092b3c4e822ed3d14dd6987ccb6 100644
--- a/src/parsing/pattern-rewriter.cc
+++ b/src/parsing/pattern-rewriter.cc
@@ -131,8 +131,8 @@ void Parser::PatternRewriter::VisitVariableProxy(VariableProxy* pattern) {
// an initial value in the declaration (because they are initialized upon
// entering the function).
const AstRawString* name = pattern->raw_name();
- VariableProxy* proxy = factory()->NewVariableProxy(
- name, NORMAL_VARIABLE, parser_->scanner()->location().beg_pos);
+ VariableProxy* proxy =
+ factory()->NewVariableProxy(name, NORMAL_VARIABLE, pattern->position());
Declaration* declaration = factory()->NewVariableDeclaration(
proxy, descriptor_->scope, descriptor_->declaration_pos);
Variable* var = parser_->Declare(
« no previous file with comments | « src/parsing/parser.cc ('k') | test/message/modules-import-redeclare3.out » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698