summaryrefslogtreecommitdiffstats
path: root/js/src/tests/test262/language/module-code/top-level-await/early-errors-await-not-simple-assignment-target.js
blob: f55e199b46dc7bbe18e8da79ceae1b8de49a62bc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
// |reftest| error:SyntaxError module
// Copyright 2019 Leo Balter. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.

/*---
esid: prod-AwaitExpression
description: >
  await is not a simple assignment target and cannot be assigned to.
negative:
  phase: parse
  type: SyntaxError
flags: [module]
features: [top-level-await]
---*/

$DONOTEVALUATE();

(await 1) = 1;