[Webkit-unassigned] [Bug 106176] Non-helpful SyntaxError message for duplicate parameters in strict mode

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Oct 13 20:33:03 PDT 2016


https://bugs.webkit.org/show_bug.cgi?id=106176

--- Comment #2 from Joseph Pecoraro <joepeck at webkit.org> ---
Compare to our error message for classes and arrow functions which force the stricter parsing, these are more helpful because they even note the duplicate parameter:

js> (class { f(a,a){} })
Cannot declare a parameter named 'a' in strict mode as it has already been declared.:1
js> (class { f(a,a){''} })
Cannot declare a parameter named 'a' in strict mode as it has already been declared.:1
js> (class { f(a,a){return a} })
Cannot declare a parameter named 'a' in strict mode as it has already been declared.:1
js> (a,a) => {}
Duplicate parameter 'a' not allowed in an arrow function.:1
js> (a,a) => {''}
Duplicate parameter 'a' not allowed in an arrow function.:1
js> (a,a) => {return a}
Duplicate parameter 'a' not allowed in an arrow function.:1

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


More information about the webkit-unassigned mailing list