Index: src/parser.cc |
diff --git a/src/parser.cc b/src/parser.cc |
index 72967d6df43fd064f0a82943c61df55f7945656a..62eb76a793ed26c473b95fea4f7d98cfca652c6e 100644 |
--- a/src/parser.cc |
+++ b/src/parser.cc |
@@ -4365,7 +4365,7 @@ Block* Parser::BuildParameterInitializationBlock( |
Scope* param_scope = scope_; |
Block* param_block = init_block; |
- if (parameter.initializer != nullptr && scope_->calls_sloppy_eval()) { |
+ if (!parameter.is_simple() && scope_->calls_sloppy_eval()) { |
param_scope = NewScope(scope_, BLOCK_SCOPE); |
param_scope->set_is_declaration_scope(); |
param_scope->set_start_position(parameter.pattern->position()); |
@@ -4384,7 +4384,7 @@ Block* Parser::BuildParameterInitializationBlock( |
&decl, nullptr, CHECK_OK); |
} |
- if (parameter.initializer != nullptr && scope_->calls_sloppy_eval()) { |
+ if (!parameter.is_simple() && scope_->calls_sloppy_eval()) { |
param_scope = param_scope->FinalizeBlockScope(); |
if (param_scope != nullptr) { |
CheckConflictingVarDeclarations(param_scope, CHECK_OK); |
Dan Ehrenberg
2015/08/25 20:18:12
Not new in this patch, but I'm wondering why we ch
rossberg
2015/08/25 21:58:40
Indeed, I did this with do-expressions in mind. Se
|