await-using-valid-for-await-using-of-of.js (678B)
1 // |reftest| shell-option(--enable-explicit-resource-management) skip-if(!(this.hasOwnProperty('getBuildConfiguration')&&getBuildConfiguration('explicit-resource-management'))||!xulRuntime.shell) -- explicit-resource-management is not enabled unconditionally, requires shell-options 2 // Copyright (C) 2011 the V8 project authors. All rights reserved. 3 // This code is governed by the BSD license found in the LICENSE file. 4 /*--- 5 esid: sec-for-in-and-for-of-statements 6 description: > 7 await using: 'for (await using of of' interpreted as 'await using' 8 features: [explicit-resource-management] 9 ---*/ 10 11 async function f() { 12 for (await using of of []) { } 13 } 14 15 reportCompare(0, 0);