Index: src/ast/scopes.cc |
diff --git a/src/ast/scopes.cc b/src/ast/scopes.cc |
index 40c2648befadd946bba6b4b58ec6f6cd59b0fbfa..5e29af727d24fc7a624de948d05671c00a17674a 100644 |
--- a/src/ast/scopes.cc |
+++ b/src/ast/scopes.cc |
@@ -1037,11 +1037,10 @@ void Scope::DeclareVariableName(const AstRawString* name, VariableMode mode) { |
DCHECK(!is_eval_scope()); |
DCHECK(is_declaration_scope() || |
(IsLexicalVariableMode(mode) && is_block_scope())); |
+ DCHECK(scope_info_.is_null()); |
// Declare the variable in the declaration scope. |
- if (LookupLocal(name) == nullptr) { |
- variables_.DeclareName(zone(), name); |
- } |
+ variables_.DeclareName(zone(), name); |
} |
VariableProxy* Scope::NewUnresolved(AstNodeFactory* factory, |