Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(53)

Unified Diff: src/scopes.cc

Issue 1371333004: [es6] Scoping & initialization for var shadowing non-simple parameters (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Comments Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/parser.cc ('k') | test/mjsunit/harmony/destructuring.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/scopes.cc
diff --git a/src/scopes.cc b/src/scopes.cc
index 19466e40a0d85def78cbf23551d84585752f7794..ee4c7b478b1d168fce5b784dc1fb16950fc02625 100644
--- a/src/scopes.cc
+++ b/src/scopes.cc
@@ -601,10 +601,6 @@ Declaration* Scope::CheckConflictingVarDeclarations() {
const AstRawString* name = decl->proxy()->raw_name();
// Iterate through all scopes until and including the declaration scope.
- // If the declaration scope is a (declaration) block scope, also continue
- // (that is to handle the special inner scope of functions with
- // destructuring parameters, which may not shadow any variables from
- // the surrounding function scope).
Scope* previous = NULL;
Scope* current = decl->scope();
// Lexical vs lexical conflicts within the same scope have already been
@@ -620,7 +616,7 @@ Declaration* Scope::CheckConflictingVarDeclarations() {
}
previous = current;
current = current->outer_scope_;
- } while (!previous->is_declaration_scope() || previous->is_block_scope());
+ } while (!previous->is_declaration_scope());
}
return NULL;
}
« no previous file with comments | « src/parser.cc ('k') | test/mjsunit/harmony/destructuring.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698