Index: src/parsing/parser-base.h |
diff --git a/src/parsing/parser-base.h b/src/parsing/parser-base.h |
index acea162a003c06bbe58299b2bbdb3e079d46ecd0..09754487ca6fe1f626479a3cad81da4963c0de8b 100644 |
--- a/src/parsing/parser-base.h |
+++ b/src/parsing/parser-base.h |
@@ -4046,6 +4046,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; |