head-lhs-async-parens.js (593B)
1 // Copyright (C) 2021 Stuart Cook. All rights reserved. 2 // This code is governed by the BSD license found in the LICENSE file. 3 4 /*--- 5 esid: sec-for-in-and-for-of-statements 6 description: > 7 The left-hand-side of a for-of loop may be the identifier `async` 8 surrounded by parentheses. 9 info: | 10 ForInOfStatement[Yield, Await, Return] : 11 for ( [lookahead ∉ { let, async of }] LeftHandSideExpression[?Yield, ?Await] of AssignmentExpression[+In, ?Yield, ?Await] ) Statement[?Yield, ?Await, ?Return] 12 ---*/ 13 14 let async; 15 16 for ((async) of [7]); 17 18 assert.sameValue(async, 7); 19 20 reportCompare(0, 0);