Comment #4 on issue 4395 by [email protected]: assignments in default
parameter initializers
https://code.google.com/p/v8/issues/detail?id=4395
Adam: The scoping thing is well-known I think. When a comma expression
turns out to be an arrow function parameter list, simple parameters are
removed from their outer scopes via:
if (expr->IsVariableProxy()) {
// When the formal parameter was originally seen, it was parsed as a
// VariableProxy and recorded as unresolved in the scope. Here we undo
that
// parse-time side-effect for parameters that are single-names (not
// patterns; for patterns that happens uniformly in
// PatternRewriter::VisitVariableProxy).
parser_->scope_->RemoveUnresolved(expr->AsVariableProxy());
}
in ParseArrowFunctionFormalParameters. Complex expressions (destructuring
etc) are re--scoped in the pattern rewriter. It could simply be that
Andreas forgot to add code to re-scope initializers there.
--
You received this message because this project is configured to send all
issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings
--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.