Debian Codegraph @

tests/auto/qml/ecmascripttests/test262/test/language/expressions/generators/use-strict-with-non-simple-param.js

raw
1 // Copyright (C) 2015 André Bargull. All rights reserved.
2 // This code is governed by the BSD license found in the LICENSE file.
3
4 /*---
5 esid: sec-generator-function-definitions-static-semantics-early-errors
6 description: >
7 A SyntaxError is thrown if a generator contains a non-simple parameter list and a UseStrict directive.
8 info: |
9 Static Semantics: Early Errors
10
11 It is a Syntax Error if ContainsUseStrict of GeneratorBody is true and IsSimpleParameterList of FormalParameters is false.
12 negative:
13 phase: parse
14 type: SyntaxError
15 features: [generators]
16 ---*/
17
18 throw "Test262: This statement should not be evaluated.";
19
20 var f = function*(a = 0) {
21 "use strict";
22 }