Bug 950547 (es6:let)

Make let and const ES6-compatible

RESOLVED FIXED

Status

()

defect
P1
normal
RESOLVED FIXED
6 years ago
3 years ago

People

(Reporter: musicdenotation, Assigned: shu)

Tracking

(Blocks 2 bugs, {dev-doc-complete, feature})

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [DocArea=JS])

Reporter

Description

6 years ago
According to the ECMAScript 6 support in Mozilla table, many features (let, const, yield,...) do not work as they do in ES6.
Reporter

Updated

6 years ago
Severity: normal → major
Priority: -- → P3
Since ES6 is nearing its completion it'd be worth it to make const and let implementation match the spec, especially that:

1) const/let are publicly available in Firefox so having them not following the spec can lead to bugs
2) IE11 has almost correct implementation, Chrome a little worse but still does most things right.

const is especially non-conforming with its incorrect function scope.
Status: UNCONFIRMED → NEW
Ever confirmed: true
Blocks: es6
Severity: major → normal
Summary: Many Mozilla extensions are not compatible to ES6 draft: let, const, destructuring assignment, yield → Make let, const, destructuring assignment, yield ES6-compatible

Comment 2

5 years ago
(In reply to Michał Gołębiowski from comment #1)
> 2) IE11 has almost correct implementation
HOW DARE YOU? According to http://samples.msdn.microsoft.com/ietestcenter/#javascript they are dark-green-100% compliant!!!! ;-)
(In reply to David Bruant from comment #2)
> (In reply to Michał Gołębiowski from comment #1)
> > 2) IE11 has almost correct implementation
> HOW DARE YOU? According to
> http://samples.msdn.microsoft.com/ietestcenter/#javascript they are
> dark-green-100% compliant!!!! ;-)

Haha, nice. Meanwhile, they're *investigating* the bug I reported:
https://connect.microsoft.com/IE/feedback/details/805843/there-shoild-be-fresh-let-bindings-created-for-every-loop-iteration
Actually, you're both right. The bug reported here: https://connect.microsoft.com/IE/feedback/details/805843/there-shoild-be-fresh-let-bindings-created-for-every-loop-iteration is a known issue that was thought to have been implemented correctly because the semantics for per-iteration let bindings had not been finalized. So when IE11 shipped, there was no definitive word on those semantics, so it was in compliant. Those semantics have been defined since then and the implementation is no longer 100%, but Brian Terlson (MS, Chakra team) has assured that it will be fixed.

That's the risk of implementing early, and we should definitely applaud the Chakra team for taking that risk :)

Comment 5

5 years ago
(In reply to Rick Waldron [:rwaldron] from comment #4)
> That's the risk of implementing early, and we should definitely applaud the
> Chakra team for taking that risk :)
I was too quick in making fun of them. You're right, I apologize. I do definitely applaud them for taking the risk!

Updated

5 years ago
See Also: → 736747
Yield in function* is ES6-compatible.  There may be bugs, but they don't merit this tracker.
Summary: Make let, const, destructuring assignment, yield ES6-compatible → Make let, const, destructuring assignment ES6-compatible
At the JS work week, Shu volunteered to work on ES6 let/const assignment. jorendorff says this bug blocks ES6 modules bug 568953.
Assignee: nobody → shu
Keywords: feature
Priority: P3 → P1
Depends on: 1001090
Depends on: 854037, 449811
Assignee

Updated

5 years ago
Depends on: 1022967
Assignee

Updated

5 years ago
Depends on: 1023609
Assignee

Updated

5 years ago
Alias: es6:let

Updated

5 years ago
Depends on: es6destructuring
You could remove the mention of destructuring in favor of bug 1055984, if you like.
Depends on: 1069480
Whiteboard: [DocArea=JS]

Updated

5 years ago
Depends on: 1089444
No longer depends on: 1089444
Depends on: 1095439
Depends on: 1101653
No longer depends on: 958949
Depends on: 1167029
Summary: Make let, const, destructuring assignment ES6-compatible → Make let and const ES6-compatible
No longer depends on: 932513
No longer depends on: 932517
No longer blocks: es6, 973463
No longer depends on: es6destructuring, 1167029
Depends on: 1032150

Comment 9

3 years ago
It seems that `const` is 100% spec compliant in Spidermonkey 44 now. Is that correct?
No.  Bug 449811, bug 1069480, and other for-in/of bugs are still relevant and require fixing for the cast of const, not just for the case of let.  (And in general see the full dependency tree to see what other things still need work.)
Assignee

Comment 11

3 years ago
Fixed by bug 1263355.
Status: NEW → RESOLVED
Last Resolved: 3 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.