2016-07-06 00:20:56 +02:00
|
|
|
// Copyright (C) 2016 the V8 project authors. All rights reserved.
|
|
|
|
// This code is governed by the BSD license found in the LICENSE file.
|
|
|
|
/*---
|
2019-05-03 08:56:41 +02:00
|
|
|
esid: sec-update-expressions-static-semantics-early-errors
|
2016-07-06 00:20:56 +02:00
|
|
|
description: Applied to a "covered" new.target
|
|
|
|
info: |
|
2019-05-03 08:56:41 +02:00
|
|
|
UpdateExpression :
|
2016-07-06 00:20:56 +02:00
|
|
|
LeftHandSideExpression ++
|
|
|
|
LeftHandSideExpression --
|
|
|
|
|
2019-05-03 08:56:41 +02:00
|
|
|
- It is an early Syntax Error if AssignmentTargetType of
|
|
|
|
LeftHandSideExpression is invalid or strict.
|
2016-07-06 00:20:56 +02:00
|
|
|
|
2019-05-03 08:56:41 +02:00
|
|
|
12.3.1.6 Static Semantics: AssignmentTargetType
|
2016-07-06 00:20:56 +02:00
|
|
|
|
|
|
|
NewTarget:
|
|
|
|
|
|
|
|
new.target
|
|
|
|
|
2019-05-03 08:56:41 +02:00
|
|
|
1. Return invalid.
|
2016-01-31 00:50:36 +01:00
|
|
|
negative:
|
2017-12-03 06:06:42 +01:00
|
|
|
phase: parse
|
2019-05-03 08:56:41 +02:00
|
|
|
type: SyntaxError
|
2018-07-24 21:25:22 +02:00
|
|
|
features: [new.target]
|
2016-07-06 00:20:56 +02:00
|
|
|
---*/
|
|
|
|
|
2018-10-11 16:59:24 +02:00
|
|
|
$DONOTEVALUATE();
|
2017-04-29 22:31:08 +02:00
|
|
|
|
2016-07-06 00:20:56 +02:00
|
|
|
function f() {
|
|
|
|
(new.target)--;
|
|
|
|
}
|