| Index: src/scopes.cc
|
| diff --git a/src/scopes.cc b/src/scopes.cc
|
| index 57dcb3a9fc8647539cfe66bf17e85825678a649e..6a6b8ad45c7e74a092a716b715eafe33918dcb5c 100644
|
| --- a/src/scopes.cc
|
| +++ b/src/scopes.cc
|
| @@ -610,11 +610,7 @@
|
| int length = decls_.length();
|
| for (int i = 0; i < length; i++) {
|
| Declaration* decl = decls_[i];
|
| - // We don't create a separate scope to hold the function name of a function
|
| - // expression, so we have to make sure not to consider it when checking for
|
| - // conflicts (since it's conceptually "outside" the declaration scope).
|
| - if (is_function_scope() && decl == function()) continue;
|
| - if (IsLexicalVariableMode(decl->mode()) && !is_block_scope()) continue;
|
| + if (decl->mode() != VAR && !is_block_scope()) continue;
|
| const AstRawString* name = decl->proxy()->raw_name();
|
|
|
| // Iterate through all scopes until and including the declaration scope.
|
| @@ -624,11 +620,11 @@
|
| // captured in Parser::Declare. The only conflicts we still need to check
|
| // are lexical vs VAR, or any declarations within a declaration block scope
|
| // vs lexical declarations in its surrounding (function) scope.
|
| - if (IsLexicalVariableMode(decl->mode())) current = current->outer_scope_;
|
| + if (decl->mode() != VAR) current = current->outer_scope_;
|
| do {
|
| // There is a conflict if there exists a non-VAR binding.
|
| Variable* other_var = current->variables_.Lookup(name);
|
| - if (other_var != NULL && IsLexicalVariableMode(other_var->mode())) {
|
| + if (other_var != NULL && other_var->mode() != VAR) {
|
| return decl;
|
| }
|
| previous = current;
|
|
|