Closed Bug 757273 Opened 12 years ago Closed 9 years ago

|arguments| in a destructuring pattern in strict mode code should be a syntax error

Categories

(Core :: JavaScript Engine, defect)

defect
Not set
normal

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: Waldo, Unassigned)

References

(Blocks 1 open bug)

Details

(Whiteboard: [js:p2])

function f() { 'use strict'; [arguments] = [0]; }

This should be a syntax error at parse time, and it definitely shouldn't change the value of |arguments| at runtime as it does now.
Whiteboard: [js:p2]
Blocks: es6
Assignee: general → nobody
js> function f() { 'use strict'; [arguments] = [0]; }
typein:1:30 SyntaxError: can't assign to arguments in strict mode:
typein:1:30 function f() { 'use strict'; [arguments] = [0]; }
typein:1:30 ..............................^


Seems to be working like intended.
No longer reproducible - resolving as WFM.
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.