Debian Codegraph @

js/src/tests/test262/language/future-reserved-words/yield-strict-strict.js

raw
1 // |reftest| error:SyntaxError
2 'use strict';
3 // Copyright (c) 2012 Ecma International. All rights reserved.
4 // This code is governed by the BSD license found in the LICENSE file.
5
6 /*---
7 esid: sec-identifiers-static-semantics-early-errors
8 es5id: 7.6.1.2-5-s
9 description: >
10 Strict Mode - SyntaxError is thrown when ReservedWord
11 'yield' occurs in strict mode code
12 info: |
13 BindingIdentifier : yield
14
15 It is a Syntax Error if the code matched by this production is contained in strict mode code.
16 negative:
17 phase: parse
18 type: SyntaxError
19 flags: [onlyStrict]
20 ---*/
21
22 $DONOTEVALUATE();
23
24 var yield = 1;