tests/auto/qml/ecmascripttests/test262/test/language/expressions/await/early-errors-await-not-simple-assignment-target.js
raw| 1 | // Copyright 2016 Microsoft, Inc. All rights reserved. |
| 2 | // This code is governed by the BSD license found in the LICENSE file. |
| 3 | |
| 4 | /*--- |
| 5 | author: Brian Terlson <[email protected]> |
| 6 | esid: pending |
| 7 | description: > |
| 8 | await is not a simple assignment target and cannot be assigned to. |
| 9 | negative: |
| 10 | phase: parse |
| 11 | type: ReferenceError |
| 12 | ---*/ |
| 13 | |
| 14 | throw "Test262: This statement should not be evaluated."; |
| 15 | |
| 16 | async function foo() { |
| 17 | (await 1) = 1; |
| 18 | } |