Closed Bug 1074571 Opened 10 years ago Closed 10 years ago

The delete operator should trigger TDZ

Categories

(Core :: JavaScript Engine, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla36

People

(Reporter: shu, Assigned: shu)

Details

(Keywords: dev-doc-complete, Whiteboard: [DocArea=JS])

Attachments

(1 file)

No description provided.
I missed this completely.
Attachment #8497194 - Flags: review?(jwalden+bmo)
Comment on attachment 8497194 [details] [diff] [review] Make the delete operator trigger TDZ. Review of attachment 8497194 [details] [diff] [review]: ----------------------------------------------------------------- ::: js/src/jit-test/tests/basic/letTDZDelete.js @@ +10,5 @@ > + > +assertThrowsReferenceError(function () { delete x; let x; }); > + > +// FIXME bug 611388 > +//assertThrowsReferenceError(function () { delete x; const x; }); Make this something like function constIsLexical() { try { (function() { parseInt(z); const z; })(); return false; } catch (e) { return true; } } // FIXME do this unconditionally when bug 611388 is fixt if (constIsLexical()) assertThrowsReferenceError(function () { delete x; const x; }); so that this test complains vocally and *forces* itself to be updated when const is made lexical.
Attachment #8497194 - Flags: review?(jwalden+bmo) → review+
Keywords: dev-doc-needed
Whiteboard: [DocArea=JS]
Assignee: nobody → shu
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla36
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: