Debian Codegraph @

tests/auto/qml/ecmascripttests/test262/test/language/statements/let/syntax/let-newline-yield-in-normal-function.js

raw
1 // Copyright (C) 2017 the V8 project authors. All rights reserved.
2 // This code is governed by the BSD license found in the LICENSE file.
3
4 /*---
5 esid: sec-let-and-const-declarations
6 description: >
7 `let yield` does not permit ASI in between, as `yield` is a BindingIdentifier
8 info: |
9 `yield` is a perfectly cromulent binding name in any context grammatically, just
10 prohibited by static semantics in some contexts. Therefore ASI can never apply
11 between `let` (where a LexicalDeclaration is permitted) and `yield`,
12 so a subsequent `0` where `=` was expected is a syntax error.
13 negative:
14 phase: parse
15 type: SyntaxError
16 ---*/
17
18 throw "Test262: This statement should not be evaluated.";
19
20 function f() {
21 let
22 yield 0;
23 }