Closed Bug 779682 Opened 13 years ago Closed 10 years ago

ES5 strict mode: no assignment to property of primitive (mostly)

Categories

(Core :: JavaScript Engine, defect)

Other Branch
defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 603201

People

(Reporter: jorendorff, Unassigned)

References

(Blocks 1 open bug)

Details

(Whiteboard: [js:t])

"use strict"; "s".x = 3; // should throw TypeError Instead, it passes silently. See http://people.mozilla.org/~jorendorff/es5.html#sec-8.7.2 Step 7 of the special [[Put]] internal method says: > 7. Else, this is a request to create an own property on the transient object O > a. If Throw is true, then throw a TypeError exception. Originally filed against JSCore, which gets it right :) https://bugs.webkit.org/show_bug.cgi?id=92817 See also bug 603201 in this general area.
Whiteboard: [js:t]
Assignee: general → nobody
bug 603201 will make this throw, sadly this is also the case that breaks b2g test.
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.