The default bug view has changed. See this FAQ.
Bug 950547 (es6:let)

Make let and const ES6-compatible

RESOLVED FIXED

Status

()

Core
JavaScript Engine
P1
normal
RESOLVED FIXED
3 years ago
6 months 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

3 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

3 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

Updated

3 years ago
Blocks: 694100
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

3 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

3 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

3 years ago
See Also: → bug 736747

Comment 6

3 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
Blocks: 973463
Keywords: dev-doc-needed
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
Blocks: 568953
Keywords: feature
Priority: P3 → P1
Depends on: 1001090
Depends on: 854037, 449811
(Assignee)

Updated

3 years ago
Depends on: 1022967
(Assignee)

Updated

3 years ago
Depends on: 1023609
(Assignee)

Updated

3 years ago
Alias: es6:let

Updated

3 years ago
Depends on: 1055984

Comment 8

3 years ago
You could remove the mention of destructuring in favor of bug 1055984, if you like.

Updated

3 years ago
Depends on: 1069480
Whiteboard: [DocArea=JS]

Updated

2 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: 694100, 973463
No longer depends on: 1055984, 1167029
Blocks: 932513
Blocks: 837314
Depends on: 1032150

Comment 9

a year 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

7 months ago
Fixed by bug 1263355.
Status: NEW → RESOLVED
Last Resolved: 7 months ago
Resolution: --- → FIXED
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.