Index: src/parsing/parser.cc |
diff --git a/src/parsing/parser.cc b/src/parsing/parser.cc |
index ff9d9fe7e2e50b581cf96c7a93aae3376c931fb8..f411f641f97403b662204373f26f9e9d1679372b 100644 |
--- a/src/parsing/parser.cc |
+++ b/src/parsing/parser.cc |
@@ -4770,16 +4770,14 @@ Block* Parser::BuildParameterInitializationBlock( |
param_scope); |
} |
- { |
- BlockState block_state(&scope_state_, param_scope); |
- DeclarationParsingResult::Declaration decl( |
- parameter.pattern, initializer_position, initial_value); |
- PatternRewriter::DeclareAndInitializeVariables(param_block, &descriptor, |
- &decl, nullptr, CHECK_OK); |
- } |
- |
- if (!parameter.is_simple() && scope()->calls_sloppy_eval()) { |
- param_scope = param_scope->FinalizeBlockScope(); |
+ BlockState block_state(&scope_state_, param_scope); |
+ DeclarationParsingResult::Declaration decl( |
+ parameter.pattern, initializer_position, initial_value); |
+ PatternRewriter::DeclareAndInitializeVariables(param_block, &descriptor, |
+ &decl, nullptr, CHECK_OK); |
+ |
+ if (param_block != init_block) { |
+ param_scope = block_state.FinalizedBlockScope(); |
if (param_scope != nullptr) { |
CheckConflictingVarDeclarations(param_scope, CHECK_OK); |
} |