test262/src/dstr-assignment-for-await/array-elem-init-yield-ident...

22 lines
504 B
Plaintext

// Copyright (C) 2017 the V8 project authors. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
desc: >
When a `yield` token appears within the Initializer of an AssignmentElement
outside of a generator function body, it behaves as an IdentifierReference.
template: error-async-function-syntax
es6id: 12.14.5.4
flags: [onlyStrict]
negative:
phase: parse
type: SyntaxError
---*/
//- setup
$DONOTEVALUATE();
//- elems
[ x = yield ]
//- vals
[]