Debian Codegraph @

js/src/tests/test262/language/expressions/optional-chaining/update-expression-prefix.js

raw
1 // |reftest| error:SyntaxError
2 // Copyright 2019 Google, Inc. All rights reserved.
3 // This code is governed by the BSD license found in the LICENSE file.
4 /*---
5 esid: prod-OptionalExpression
6 description: >
7 optional chaining is forbidden in write contexts
8 info: |
9 UpdateExpression[Yield, Await]:
10 LeftHandSideExpression++
11 LeftHandSideExpression--
12 ++UnaryExpression
13 --UnaryExpression
14 features: [optional-chaining]
15 negative:
16 phase: parse
17 type: SyntaxError
18 ---*/
19
20 $DONOTEVALUATE();
21
22 // --UnaryExpression
23 const a = {};
24 --a?.b;