Don't treat function parameters as let-bound variables in Harmony mode.

R=ulan@chromium.org
BUG=v8:1942
TEST=

Review URL: https://chromiumcodereview.appspot.com/9365054

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10698 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
This commit is contained in:
rossberg@chromium.org 2012-02-14 13:47:54 +00:00
parent 9da06ece99
commit 559f5eecad
2 changed files with 2 additions and 2 deletions

View File

@ -4048,7 +4048,7 @@ FunctionLiteral* Parser::ParseFunctionLiteral(Handle<String> function_name,
reserved_loc = scanner().location();
}
top_scope_->DeclareParameter(param_name, is_extended_mode() ? LET : VAR);
top_scope_->DeclareParameter(param_name, VAR);
num_parameters++;
if (num_parameters > kMaxNumFunctionParameters) {
ReportMessageAt(scanner().location(), "too_many_parameters",

View File

@ -130,5 +130,5 @@ for (var v = 0; v < varbinds.length; ++v) {
// Test conflicting parameter/var bindings.
for (var v = 0; v < varbinds.length; ++v) {
TestConflict('(function (x) { ' + varbinds[v] + '; })()');
TestNoConflict('(function (x) { ' + varbinds[v] + '; })()');
}