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

Unified Diff: src/parser.cc

Issue 1468143004: [es6] Self-assignment in a default parameter initializer should throw (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 1 month 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 | test/message/default-parameter-tdz.js » ('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 354f1c33187a33196be7b7db2813f089baa507b3..fcc6b5bc0fb3949c0e5fc492264476ad7809daf5 100644
--- a/src/parser.cc
+++ b/src/parser.cc
@@ -4660,7 +4660,7 @@ Block* Parser::BuildParameterInitializationBlock(
{
BlockState block_state(&scope_, param_scope);
DeclarationParsingResult::Declaration decl(
- parameter.pattern, parameter.pattern->position(), initial_value);
+ parameter.pattern, descriptor.initialization_pos, initial_value);
Dan Ehrenberg 2015/11/24 00:37:35 I think you want the position to be the end of the
adamk 2015/11/24 01:08:51 Great catch. I made the test more complex and adde
PatternRewriter::DeclareAndInitializeVariables(param_block, &descriptor,
&decl, nullptr, CHECK_OK);
}
« no previous file with comments | « no previous file | test/message/default-parameter-tdz.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698