Debian Codegraph @

tests/auto/qml/ecmascripttests/test262/test/language/expressions/object/method-definition/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-method-definitions-static-semantics-early-errors
6 description: >
7 A SyntaxError is thrown if a method 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 FunctionBody is true and IsSimpleParameterList of StrictFormalParameters is false.
12 negative:
13 phase: parse
14 type: SyntaxError
15 ---*/
16
17 throw "Test262: This statement should not be evaluated.";
18
19 var o = {
20 m(a = 0) {
21 "use strict";
22 }
23 };