Improve error message for duplicate parameters
authorlittledan <littledan@chromium.org>
Tue, 14 Jul 2015 21:58:49 +0000 (14:58 -0700)
committerCommit bot <commit-bot@chromium.org>
Tue, 14 Jul 2015 21:59:03 +0000 (21:59 +0000)
commit5c036cd7729d6cfaa6c390bfc070fdc02a8d800d
tree4b7763bf446eb96e757694d84a5f6d551dccda21
parent9d6ab46aefdd2fac057e443ff5dd8ee81f570e39
Improve error message for duplicate parameters

Duplicate parameters are banned both overall in strict mode and also
in arrow functions. Our error message for both cases blamed strict
mode, which is confusing. This patch fixes the message to point to
arrow functions as a possible source as well.

R=wingo, adamk
LOG=N

Review URL: https://codereview.chromium.org/1236863008

Cr-Commit-Position: refs/heads/master@{#29662}
src/expression-classifier.h
src/messages.h
src/parser.cc
test/message/arrow-formal-parameters.js [new file with mode: 0644]
test/message/arrow-formal-parameters.out [new file with mode: 0644]
test/message/strict-formal-parameters.out
test/webkit/fast/js/basic-strict-mode-expected.txt