Commit 559f5eec authored by rossberg@chromium.org's avatar rossberg@chromium.org

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
parent 9da06ece
......@@ -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",
......
......@@ -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] + '; })()');
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment