mirror of
https://github.com/github/codeql.git
synced 2025-12-17 17:23:36 +01:00
29 lines
490 B
JavaScript
29 lines
490 B
JavaScript
function g() {
|
|
using stream = getResource();
|
|
|
|
let (test = 20); // <- I didn't know this was a thing
|
|
|
|
for (using stream2 = getResource(); ; ) {
|
|
// ...
|
|
break;
|
|
}
|
|
}
|
|
|
|
async function h() {
|
|
await using stream = getResource();
|
|
|
|
for (await using stream2 = getResource(); ; ) {
|
|
// ...
|
|
break;
|
|
}
|
|
|
|
console.log("end");
|
|
}
|
|
|
|
function usesUsing() {
|
|
using("foo");
|
|
function using(foo) {
|
|
// ...
|
|
}
|
|
using(using);
|
|
} |