Skip to content

Commit fc3079a

Browse files
committed
Add 'for(using of=' test
1 parent 21b5577 commit fc3079a

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
// Copyright (C) 2011 the V8 project authors. All rights reserved.
2+
// This code is governed by the BSD license found in the LICENSE file.
3+
/*---
4+
esid: sec-for-statement
5+
description: >
6+
using: 'for (using x = ' and 'for (using of =' are interpreted as for loop
7+
features: [explicit-resource-management]
8+
---*/
9+
10+
for (using x = null;;) break;
11+
12+
// 'using of' lookahead restriction only applies to 'for-of'/'for-await-of'. In 'for' statement it is
13+
// handled similar to `for (let of = null;;)`:
14+
for (using of = null;;) break;

0 commit comments

Comments
 (0)