2017-04-08 00:19:58 +02:00
|
|
|
// Copyright (C) 2017 Mozilla Corporation. All rights reserved.
|
|
|
|
// This code is governed by the BSD license found in the LICENSE file.
|
|
|
|
|
|
|
|
/*---
|
|
|
|
author: Jeff Walden <jwalden+code@mit.edu>
|
|
|
|
esid: sec-let-and-const-declarations
|
|
|
|
description: >
|
2017-04-11 23:58:04 +02:00
|
|
|
`let await` does not permit ASI in between, as `await` is a BindingIdentifier
|
2018-01-05 18:26:51 +01:00
|
|
|
info: |
|
2017-04-11 23:58:04 +02:00
|
|
|
`await` is a perfectly cromulent binding name in any context grammatically, just
|
|
|
|
prohibited by static semantics in some contexts. Therefore ASI can never apply
|
|
|
|
between `let` (where a LexicalDeclaration is permitted) and `await`,
|
|
|
|
so a subsequent `0` where `=` was expected is a syntax error.
|
2017-04-08 00:19:58 +02:00
|
|
|
negative:
|
2017-12-03 06:06:42 +01:00
|
|
|
phase: parse
|
2017-04-08 00:19:58 +02:00
|
|
|
type: SyntaxError
|
|
|
|
---*/
|
|
|
|
|
2017-04-29 22:31:08 +02:00
|
|
|
throw "Test262: This statement should not be evaluated.";
|
|
|
|
|
2017-04-08 00:19:58 +02:00
|
|
|
function f() {
|
|
|
|
let
|
|
|
|
await 0;
|
|
|
|
}
|