mirror of
https://github.com/hanzoai/tsgo.git
synced 2026-10-30 19:37:15 +00:00
08cb84c68a
Co-authored-by: copilot-swe-agent[bot] <[email protected]> Co-authored-by: jakebailey <[email protected]>
43 lines
2.4 KiB
Plaintext
43 lines
2.4 KiB
Plaintext
awaitUsingDeclarations.17.ts(3,9): error TS1548: 'await using' declarations are not allowed in 'case' or 'default' clauses unless contained within a block.
|
|
awaitUsingDeclarations.17.ts(7,9): error TS1548: 'await using' declarations are not allowed in 'case' or 'default' clauses unless contained within a block.
|
|
awaitUsingDeclarations.17.ts(11,9): error TS1548: 'await using' declarations are not allowed in 'case' or 'default' clauses unless contained within a block.
|
|
awaitUsingDeclarations.17.ts(17,13): error TS1548: 'await using' declarations are not allowed in 'case' or 'default' clauses unless contained within a block.
|
|
awaitUsingDeclarations.17.ts(21,13): error TS1548: 'await using' declarations are not allowed in 'case' or 'default' clauses unless contained within a block.
|
|
|
|
|
|
==== awaitUsingDeclarations.17.ts (5 errors) ====
|
|
switch (Math.random()) {
|
|
case 0:
|
|
await using d20 = { async [Symbol.asyncDispose]() {} };
|
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
!!! error TS1548: 'await using' declarations are not allowed in 'case' or 'default' clauses unless contained within a block.
|
|
break;
|
|
|
|
case 1:
|
|
await using d21 = { async [Symbol.asyncDispose]() {} };
|
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
!!! error TS1548: 'await using' declarations are not allowed in 'case' or 'default' clauses unless contained within a block.
|
|
break;
|
|
|
|
default:
|
|
await using d22 = { async [Symbol.asyncDispose]() {} };
|
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
!!! error TS1548: 'await using' declarations are not allowed in 'case' or 'default' clauses unless contained within a block.
|
|
}
|
|
|
|
if (true)
|
|
switch (0) {
|
|
case 0:
|
|
await using d23 = { async [Symbol.asyncDispose]() {} };
|
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
!!! error TS1548: 'await using' declarations are not allowed in 'case' or 'default' clauses unless contained within a block.
|
|
break;
|
|
|
|
default:
|
|
await using d24 = { async [Symbol.asyncDispose]() {} };
|
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
!!! error TS1548: 'await using' declarations are not allowed in 'case' or 'default' clauses unless contained within a block.
|
|
}
|
|
|
|
export {};
|
|
|