Closed
Bug 950547
(es6:let)
Opened 11 years ago
Closed 8 years ago
Make let and const ES6-compatible
Categories
(Core :: JavaScript Engine, defect, P1)
Core
JavaScript Engine
Tracking
()
RESOLVED
FIXED
People
(Reporter: musicdenotation, Assigned: shu)
References
(Blocks 2 open bugs)
Details
(Keywords: dev-doc-complete, feature, Whiteboard: [DocArea=JS])
According to the ECMAScript 6 support in Mozilla table, many features (let, const, yield,...) do not work as they do in ES6.
Reporter | ||
Updated•11 years ago
|
Severity: normal → major
Priority: -- → P3
Comment 1•11 years ago
|
||
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.
Updated•11 years ago
|
Status: UNCONFIRMED → NEW
Ever confirmed: true
Updated•11 years ago
|
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•11 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!!!! ;-)
Comment 3•11 years ago
|
||
(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
Comment 4•11 years ago
|
||
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•11 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•11 years ago
|
Comment 6•11 years ago
|
||
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
Updated•11 years ago
|
Keywords: dev-doc-needed
Comment 7•11 years ago
|
||
At the JS work week, Shu volunteered to work on ES6 let/const assignment. jorendorff says this bug blocks ES6 modules bug 568953.
Updated•10 years ago
|
Assignee | ||
Updated•10 years ago
|
Alias: es6:let
Updated•10 years ago
|
Depends on: es6destructuring
Comment 8•10 years ago
|
||
You could remove the mention of destructuring in favor of bug 1055984, if you like.
Updated•10 years ago
|
Whiteboard: [DocArea=JS]
Updated•9 years ago
|
Summary: Make let, const, destructuring assignment ES6-compatible → Make let and const ES6-compatible
Updated•9 years ago
|
No longer depends on: es6destructuring, 1167029
Updated•9 years ago
|
Blocks: harmony-classes
It seems that `const` is 100% spec compliant in Spidermonkey 44 now. Is that correct?
Comment 10•9 years ago
|
||
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•8 years ago
|
||
Fixed by bug 1263355.
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Comment 12•8 years ago
|
||
let and const pages no longer reference this bug for outstanding issues:
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/const
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/let
Compliance mentioned in developer release notes:
https://developer.mozilla.org/en-US/Firefox/Releases/51#JavaScript
Keywords: dev-doc-needed → dev-doc-complete
You need to log in
before you can comment on or make changes to this bug.
Description
•