[Webkit-unassigned] [Bug 171041] Cannot declare a let variable twice: 'e'

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Apr 21 15:04:24 PDT 2017


--- Comment #1 from Saam Barati <sbarati at apple.com> ---
(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.

You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20170421/f1bd4a79/attachment.html>

More information about the webkit-unassigned mailing list