Skip to content

Commit 8e9556a

Browse files
committed
fix existing tests to accept new behavior
1 parent 246b66c commit 8e9556a

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

tests/baselines/reference/awaitLiteralValues.errors.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,35 +11,41 @@ tests/cases/compiler/awaitLiteralValues.ts(22,5): error TS1308: 'await' expressi
1111
await 'literal';
1212
~~~~~
1313
!!! error TS1308: 'await' expression is only allowed within an async function.
14+
!!! related TS1356 tests/cases/compiler/awaitLiteralValues.ts:1:10: Did you mean to mark this function as 'async'?
1415
}
1516

1617
function awaitNumber() {
1718
await 1;
1819
~~~~~
1920
!!! error TS1308: 'await' expression is only allowed within an async function.
21+
!!! related TS1356 tests/cases/compiler/awaitLiteralValues.ts:5:10: Did you mean to mark this function as 'async'?
2022
}
2123

2224
function awaitTrue() {
2325
await true;
2426
~~~~~
2527
!!! error TS1308: 'await' expression is only allowed within an async function.
28+
!!! related TS1356 tests/cases/compiler/awaitLiteralValues.ts:9:10: Did you mean to mark this function as 'async'?
2629
}
2730

2831
function awaitFalse() {
2932
await false;
3033
~~~~~
3134
!!! error TS1308: 'await' expression is only allowed within an async function.
35+
!!! related TS1356 tests/cases/compiler/awaitLiteralValues.ts:13:10: Did you mean to mark this function as 'async'?
3236
}
3337

3438
function awaitNull() {
3539
await null;
3640
~~~~~
3741
!!! error TS1308: 'await' expression is only allowed within an async function.
42+
!!! related TS1356 tests/cases/compiler/awaitLiteralValues.ts:17:10: Did you mean to mark this function as 'async'?
3843
}
3944

4045
function awaitUndefined() {
4146
await undefined;
4247
~~~~~
4348
!!! error TS1308: 'await' expression is only allowed within an async function.
49+
!!! related TS1356 tests/cases/compiler/awaitLiteralValues.ts:21:10: Did you mean to mark this function as 'async'?
4450
}
4551

tests/baselines/reference/parser.forAwait.es2018.errors.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ tests/cases/conformance/parser/ecmascript2018/forAwait/topLevelWithExprIsError.t
5252
for await (const x of y) {
5353
~~~~~
5454
!!! error TS1103: A 'for-await-of' statement is only allowed within an async function or async generator.
55+
!!! related TS1356 tests/cases/conformance/parser/ecmascript2018/forAwait/inFunctionDeclWithDeclIsError.ts:1:10: Did you mean to mark this function as 'async'?
5556
}
5657
}
5758
==== tests/cases/conformance/parser/ecmascript2018/forAwait/inFunctionDeclWithExprIsError.ts (1 errors) ====
@@ -60,6 +61,7 @@ tests/cases/conformance/parser/ecmascript2018/forAwait/topLevelWithExprIsError.t
6061
for await (x of y) {
6162
~~~~~
6263
!!! error TS1103: A 'for-await-of' statement is only allowed within an async function or async generator.
64+
!!! related TS1356 tests/cases/conformance/parser/ecmascript2018/forAwait/inFunctionDeclWithExprIsError.ts:1:10: Did you mean to mark this function as 'async'?
6365
}
6466
}
6567
==== tests/cases/conformance/parser/ecmascript2018/forAwait/inAsyncFunctionWithDeclIsOk.ts (0 errors) ====
@@ -92,6 +94,7 @@ tests/cases/conformance/parser/ecmascript2018/forAwait/topLevelWithExprIsError.t
9294
for await (const x of y) {
9395
~~~~~
9496
!!! error TS1103: A 'for-await-of' statement is only allowed within an async function or async generator.
97+
!!! related TS1356 tests/cases/conformance/parser/ecmascript2018/forAwait/inGeneratorWithDeclIsError.ts:1:11: Did you mean to mark this function as 'async'?
9598
}
9699
}
97100
==== tests/cases/conformance/parser/ecmascript2018/forAwait/inGeneratorWithExprIsError.ts (1 errors) ====
@@ -100,6 +103,7 @@ tests/cases/conformance/parser/ecmascript2018/forAwait/topLevelWithExprIsError.t
100103
for await (x of y) {
101104
~~~~~
102105
!!! error TS1103: A 'for-await-of' statement is only allowed within an async function or async generator.
106+
!!! related TS1356 tests/cases/conformance/parser/ecmascript2018/forAwait/inGeneratorWithExprIsError.ts:1:11: Did you mean to mark this function as 'async'?
103107
}
104108
}
105109

0 commit comments

Comments
 (0)