Commit 4e4a968e authored by adamk's avatar adamk Committed by Commit bot

[parser] Clear scope for inner block in function with complex parameters

The parser was finalizing the inner block scope, but not clearing the
inner block's scope pointer. This doesn't (yet) have any behavioral
difference, but makes it easier to make assumptions about the structure
of the AST vs the scope chain.

R=neis@chromium.org

Review-Url: https://codereview.chromium.org/2696233003
Cr-Commit-Position: refs/heads/master@{#43233}
parent 34663b42
......@@ -4045,6 +4045,8 @@ void ParserBase<Impl>::ParseFunctionBody(
if (inner_scope->FinalizeBlockScope() != nullptr) {
impl()->CheckConflictingVarDeclarations(inner_scope, CHECK_OK_VOID);
impl()->InsertShadowingVarBindingInitializers(inner_block);
} else {
inner_block->set_scope(nullptr);
}
inner_scope = nullptr;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment