tests/auto/qml/ecmascripttests/test262/test/language/expressions/postfix-decrement/target-cover-newtarget.js
raw symbols SCIP| 1 | // Copyright (C) 2016 the V8 project authors. All rights reserved. |
| 2 | // This code is governed by the BSD license found in the LICENSE file. |
| 3 | /*--- |
| 4 | esid: sec-postfix-expressions-static-semantics-early-errors |
| 5 | es6id: 12.4.1 |
| 6 | description: Applied to a "covered" new.target |
| 7 | info: | |
| 8 | PostfixExpression : |
| 9 | LeftHandSideExpression ++ |
| 10 | LeftHandSideExpression -- |
| 11 | |
| 12 | - It is an early Reference Error if IsValidSimpleAssignmentTarget of |
| 13 | LeftHandSideExpression is false. |
| 14 | |
| 15 | 12.3.1.5 Static Semantics: IsValidSimpleAssignmentTarget |
| 16 | |
| 17 | NewTarget: |
| 18 | |
| 19 | new.target |
| 20 | |
| 21 | 1. Return false. |
| 22 | negative: |
| 23 | phase: parse |
| 24 | type: ReferenceError |
| 25 | ---*/ |
| 26 | |
| 27 | throw "Test262: This statement should not be evaluated."; |
| 28 | |
| 29 | function f() { |
| 30 | (new.target)--; |
| 31 | } |