-
jwolfe authored
Reland of https://codereview.chromium.org/2048703002/ Code like `let a; eval("var a;");` should throw a SyntaxError, not a TypeError (this caused a test262 failure.). However, the code `eval("function NaN() {}");` should actually throw a TypeError. This patch changes most cases of redeclaration errors from TypeError to SyntaxError. See the test mjsunit/regress/redeclaration-error-types for a thorough analysis with spec references. The relevant sections of the spec are ES#sec-globaldeclarationinstantiation and ES#sec-evaldeclarationinstantiation BUG=v8:4955 LOG=y CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel R=adamk Review-Url: https://codereview.chromium.org/2086063002 Cr-Commit-Position: refs/heads/master@{#37156}
d8147eb9
Name |
Last commit
|
Last update |
---|---|---|
.. | ||
BUILD.gn | ||
README | ||
archive.py | ||
detachArrayBuffer.js | ||
harness-adapt.js | ||
list.py | ||
test262.gyp | ||
test262.isolate | ||
test262.status | ||
testcfg.py |