1+ disallowedBlockScopedInPresenceOfParseErrors1.ts(5,5): error TS1156: 'const' declarations can only be declared inside a block.
12disallowedBlockScopedInPresenceOfParseErrors1.ts(6,17): error TS2454: Variable 'e' is used before being assigned.
23disallowedBlockScopedInPresenceOfParseErrors1.ts(8,1): error TS1128: Declaration or statement expected.
4+ disallowedBlockScopedInPresenceOfParseErrors1.ts(12,5): error TS1156: 'let' declarations can only be declared inside a block.
35disallowedBlockScopedInPresenceOfParseErrors1.ts(13,17): error TS2454: Variable 'e' is used before being assigned.
46disallowedBlockScopedInPresenceOfParseErrors1.ts(15,1): error TS1128: Declaration or statement expected.
7+ disallowedBlockScopedInPresenceOfParseErrors1.ts(21,5): error TS1156: 'using' declarations can only be declared inside a block.
58disallowedBlockScopedInPresenceOfParseErrors1.ts(22,17): error TS2454: Variable 'e' is used before being assigned.
69disallowedBlockScopedInPresenceOfParseErrors1.ts(24,1): error TS1128: Declaration or statement expected.
10+ disallowedBlockScopedInPresenceOfParseErrors1.ts(30,5): error TS1156: 'await using' declarations can only be declared inside a block.
711disallowedBlockScopedInPresenceOfParseErrors1.ts(31,17): error TS2454: Variable 'e' is used before being assigned.
812disallowedBlockScopedInPresenceOfParseErrors1.ts(33,1): error TS1128: Declaration or statement expected.
913
1014
11- ==== disallowedBlockScopedInPresenceOfParseErrors1.ts (8 errors) ====
15+ ==== disallowedBlockScopedInPresenceOfParseErrors1.ts (12 errors) ====
1216 // https://github.com/microsoft/TypeScript/issues/61734
1317
1418 function f1() {
1519 if (1 > 0)
1620 const e = 3;
21+ ~~~~~~~~~~~~
22+ !!! error TS1156: 'const' declarations can only be declared inside a block.
1723 console.log(e);
1824 ~
1925!!! error TS2454: Variable 'e' is used before being assigned.
@@ -25,6 +31,8 @@ disallowedBlockScopedInPresenceOfParseErrors1.ts(33,1): error TS1128: Declaratio
2531 function f2() {
2632 if (1 > 0)
2733 let e = 3;
34+ ~~~~~~~~~~
35+ !!! error TS1156: 'let' declarations can only be declared inside a block.
2836 console.log(e);
2937 ~
3038!!! error TS2454: Variable 'e' is used before being assigned.
@@ -38,6 +46,8 @@ disallowedBlockScopedInPresenceOfParseErrors1.ts(33,1): error TS1128: Declaratio
3846 function f3() {
3947 if (1 > 0)
4048 using e = resource;
49+ ~~~~~~~~~~~~~~~~~~~
50+ !!! error TS1156: 'using' declarations can only be declared inside a block.
4151 console.log(e);
4252 ~
4353!!! error TS2454: Variable 'e' is used before being assigned.
@@ -51,6 +61,8 @@ disallowedBlockScopedInPresenceOfParseErrors1.ts(33,1): error TS1128: Declaratio
5161 async function f4() {
5262 if (1 > 0)
5363 await using e = asyncResource;
64+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
65+ !!! error TS1156: 'await using' declarations can only be declared inside a block.
5466 console.log(e);
5567 ~
5668!!! error TS2454: Variable 'e' is used before being assigned.
0 commit comments