Bug 48689 - ES5 Strict mode: `arguments' identifier in strict mode is immutable
Summary: ES5 Strict mode: `arguments' identifier in strict mode is immutable
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC Linux
: P2 Normal
Assignee: Nobody
Depends on:
Reported: 2010-10-29 15:23 PDT by Asen Bozhilov
Modified: 2011-05-01 22:21 PDT (History)
1 user (show)

See Also:


Note You need to log in before you can comment on or make changes to this bug.
Description Asen Bozhilov 2010-10-29 15:23:58 PDT
 * For strict mode functions, if an arguments object is created the binding of the local identifier
 * arguments to the arguments object is immutable and hence may not be the target of an
 * assignment expression. (10.5).

var testDesc = 'In function body assigning value of arguments must produce an Error: ';

function F(arg, arg1, arg2) {
    'use strict';
    arguments = false;

try {
    F(1, 2, 3);
    util.printLine(testDesc + 'FALSE');
} catch (e) {
    util.printLine(testDesc + 'TRUE');
Comment 1 Asen Bozhilov 2010-11-01 07:56:23 PDT
Great work WebKit! I've made 53 tests. There is only one fail and one test which cannot be done with current state of WebKit. You can see the test cases: 

Comment 2 Asen Bozhilov 2010-11-01 07:58:00 PDT
The proper url is: http://github.com/abozhilov/strict-tester-/tree/
Comment 3 Oliver Hunt 2011-05-01 22:21:58 PDT
I fixed this some time ago due to another report