Summary: | We incorrectly throw a syntax error when declaring a top level for-loop iteration variable the same as a parameter | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Rob Stutton <rob> | ||||||
Component: | JavaScriptCore | Assignee: | Saam Barati <sbarati> | ||||||
Status: | RESOLVED FIXED | ||||||||
Severity: | Normal | CC: | ashwinkumar9944, benjamin, buildbot, commit-queue, fpizlo, ggaren, gskachkov, jfbastien, joepeck, keith_miller, lasalep928, mark.lam, msaboff, pkoszulinski, sbarati, ticaiolima, webkit-bug-importer, ysuzuki | ||||||
Priority: | P2 | Keywords: | InRadar | ||||||
Version: | Safari Technology Preview | ||||||||
Hardware: | Unspecified | ||||||||
OS: | macOS 10.12 | ||||||||
Attachments: |
|
Description
Rob Stutton
2017-04-19 22:17:54 PDT
(In reply to Rob Stutton from comment #0) > I wouldn't write code like this (below) myself, but it was emitted by the > minifier and so my app doesn't work in Safari, or Safari TP. > The code looks legal to me ... > > let e = e => { > console.log(e); > for (let e of [1, 2, 3]) // Cannot declare a let variable twice: 'e'. > console.log(e); > }; Yeah this looks like it should not be a syntax error, however, I think this should be: ``` let x = (e) => { let e; } ``` I bet the code that ensures that the above is a syntax error is kicking in when it shouldn't be. Created attachment 310818 [details]
patch
Attachment 310818 [details] did not pass style-queue:
ERROR: Source/JavaScriptCore/ChangeLog:13: Line contains tab character. [whitespace/tab] [5]
ERROR: Source/JavaScriptCore/ChangeLog:20: Line contains tab character. [whitespace/tab] [5]
Total errors found: 2 in 7 files
If any of these errors are false positives, please file a bug against check-webkit-style.
Created attachment 310819 [details]
patch
Comment on attachment 310819 [details]
patch
r=me
Comment on attachment 310819 [details] patch Clearing flags on attachment: 310819 Committed r217200: <http://trac.webkit.org/changeset/217200> All reviewed patches have been landed. Closing bug. How can this patch be not released yet (in a stable channel)? Since May? It will cause most of apps written in minified ES6 to fail. I notice an error while getting mystic messenger answers online</a>, can anybody check it and solve it for me. It would be really helpful! Ref: https://mysticmessengeremail.org/ |