v8/test
vabr 454816f08f Report unexpected lexical decl also without destructuring
https://codereview.chromium.org/2694003002/ introduced
"SyntaxError: Lexical declaration cannot appear in a single-statement context"
for the case when let + desctructuring from a list happen.

As was pointed out in https://codereview.chromium.org/2694003002/#msg18, the
case without destructuring would also benefit from a better message: if a
single statement is expected and "let identifier = ..." is seen, the error is
indeed again that the lexical declaration is not a statement. However, the current
error is "Unexpected identifier", because the parser tries to accept "let" as
an identifier in an expression statement, and then gives up seeing the other
identifier after "let".

This CL ensures that the parser recognises the error properly and reports
accordingly. It also renames the existing test, which contains destructuring,
and adds the one with a non-destructuring lexical declaration.

BUG=v8:5686

Review-Url: https://codereview.chromium.org/2697193007
Cr-Commit-Position: refs/heads/master@{#43275}
2017-02-17 10:57:32 +00:00
..
benchmarks [gn] Move build to gypfiles 2016-04-29 10:11:11 +00:00
cctest Remove unused Box type 2017-02-17 10:06:22 +00:00
common [iwyu, wasm] Remove unallowed includes to objects-inl.h from wasm. 2017-02-13 15:05:37 +00:00
debugger [debug] Handle OOM events in debugger tests 2017-02-16 11:48:22 +00:00
fuzzer [wasm][fuzzer] Small fixes in the correctness fuzzer result comparison. 2017-02-16 11:23:29 +00:00
inspector [debugger] expose side-effect free evaluate to inspector. 2017-02-10 17:06:22 +00:00
intl NumberFormat: default mnsd value is 1 2017-02-14 17:12:49 +00:00
js-perf-test [tests] Add js-perf-test for %TypedArray%.prototype.sort 2017-02-15 14:48:42 +00:00
memory [snapshot] support multiple contexts in the same snapshot. 2016-06-15 15:39:06 +00:00
message Report unexpected lexical decl also without destructuring 2017-02-17 10:57:32 +00:00
mjsunit Implement new Function.prototype.toString --harmony-function-tostring 2017-02-16 20:19:24 +00:00
mozilla [regexp] Correct lastIndex behavior in RegExp.prototype[@@replace] 2017-02-16 09:21:37 +00:00
preparser [gn] Move build to gypfiles 2016-04-29 10:11:11 +00:00
promises-aplus Make test262 test runner check for which exception is thrown 2016-03-14 21:20:37 +00:00
test262 Implement new Function.prototype.toString --harmony-function-tostring 2017-02-16 20:19:24 +00:00
unittests Remove a few unnecssary scopers from unit tests. 2017-02-17 09:51:07 +00:00
webkit Unify TypeError messages 2017-02-13 10:27:03 +00:00
bot_default.gyp Add inspector tests to default tests to run locally. 2016-11-04 08:50:07 +00:00
bot_default.isolate [debugger] basic test infrastructure for new debugger test api. 2016-10-21 06:38:05 +00:00
BUILD.gn Remove SIMD.js from V8. 2017-02-14 06:57:25 +00:00
default.gyp Add inspector tests to default tests to run locally. 2016-11-04 08:50:07 +00:00
default.isolate Add inspector tests to default tests to run locally. 2016-11-04 08:50:07 +00:00
optimize_for_size.gyp [gn] Move build to gypfiles 2016-04-29 10:11:11 +00:00
optimize_for_size.isolate [debugger] basic test infrastructure for new debugger test api. 2016-10-21 06:38:05 +00:00
perf.gyp [gn] Move build to gypfiles 2016-04-29 10:11:11 +00:00
perf.isolate Remove SIMD.js from V8. 2017-02-14 06:57:25 +00:00