Index: src/parsing/pattern-rewriter.cc |
diff --git a/src/parsing/pattern-rewriter.cc b/src/parsing/pattern-rewriter.cc |
index 97517747083e9831438996d5eeaa112cb8a07551..02d6de513fe9ce5ec8cd8f0895d4358af88a45ea 100644 |
--- a/src/parsing/pattern-rewriter.cc |
+++ b/src/parsing/pattern-rewriter.cc |
@@ -266,7 +266,7 @@ void Parser::PatternRewriter::VisitVariableProxy(VariableProxy* pattern) { |
if (initialize != NULL) { |
block_->statements()->Add( |
- factory()->NewExpressionStatement(initialize, RelocInfo::kNoPosition), |
+ factory()->NewExpressionStatement(initialize, initialize->position()), |
zone()); |
} |
} else if (value != nullptr && (descriptor_->mode == CONST_LEGACY || |
@@ -282,7 +282,8 @@ void Parser::PatternRewriter::VisitVariableProxy(VariableProxy* pattern) { |
DCHECK_NOT_NULL(proxy->var()); |
DCHECK_NOT_NULL(value); |
// Add break location for destructured sub-pattern. |
- int pos = IsSubPattern() ? pattern->position() : RelocInfo::kNoPosition; |
+ int pos = |
+ IsSubPattern() ? pattern->position() : descriptor_->initialization_pos; |
Assignment* assignment = |
factory()->NewAssignment(Token::INIT, proxy, value, pos); |
block_->statements()->Add( |
@@ -299,7 +300,8 @@ void Parser::PatternRewriter::VisitVariableProxy(VariableProxy* pattern) { |
// property). |
VariableProxy* proxy = initialization_scope->NewUnresolved(factory(), name); |
// Add break location for destructured sub-pattern. |
- int pos = IsSubPattern() ? pattern->position() : RelocInfo::kNoPosition; |
+ int pos = |
+ IsSubPattern() ? pattern->position() : descriptor_->initialization_pos; |
Assignment* assignment = |
factory()->NewAssignment(Token::INIT, proxy, value, pos); |
block_->statements()->Add( |