await-using-invalid-arraybindingpattern-after-bindingidentifier.js (784B)
1 // |reftest| shell-option(--enable-explicit-resource-management) skip-if(!(this.hasOwnProperty('getBuildConfiguration')&&getBuildConfiguration('explicit-resource-management'))||!xulRuntime.shell) error:SyntaxError -- explicit-resource-management is not enabled unconditionally, requires shell-options 2 // Copyright (C) 2023 Ron Buckton. All rights reserved. 3 // This code is governed by the BSD license found in the LICENSE file. 4 5 /*--- 6 esid: sec-let-const-using-and-await-using-declarations 7 description: > 8 'await using' does not allow ArrayBindingPattern in lexical bindings, even after a valid lexical binding 9 negative: 10 phase: parse 11 type: SyntaxError 12 features: [explicit-resource-management] 13 ---*/ 14 15 $DONOTEVALUATE(); 16 17 async function f() { 18 await using x = null, [] = null; 19 }