v8/test/message/await-non-async.out
Sathya Gunasekaran 62a7c080d5 [parser] Provide better error when incorrectly using await
Before we try to do ASI and fail with a generic error, we special case
for the await token in the failure case.

Bug: v8:6572, v8:6513
Change-Id: Ia050c98b5a5b20bc326f429a367635b8553e4112
Reviewed-on: https://chromium-review.googlesource.com/582210
Reviewed-by: Daniel Ehrenberg <littledan@chromium.org>
Commit-Queue: Sathya Gunasekaran <gsathya@chromium.org>
Cr-Commit-Position: refs/heads/master@{#46885}
2017-07-25 22:53:58 +00:00

5 lines
182 B
Plaintext

*%(basename)s:5: SyntaxError: await is only valid in async function
function f() { await Promise.resolve(); }
^^^^^
SyntaxError: await is only valid in async function