fix existing tests to accept new behavior
This commit is contained in:
parent
246b66c714
commit
8e9556a860
|
@ -11,35 +11,41 @@ tests/cases/compiler/awaitLiteralValues.ts(22,5): error TS1308: 'await' expressi
|
|||
await 'literal';
|
||||
~~~~~
|
||||
!!! error TS1308: 'await' expression is only allowed within an async function.
|
||||
!!! related TS1356 tests/cases/compiler/awaitLiteralValues.ts:1:10: Did you mean to mark this function as 'async'?
|
||||
}
|
||||
|
||||
function awaitNumber() {
|
||||
await 1;
|
||||
~~~~~
|
||||
!!! error TS1308: 'await' expression is only allowed within an async function.
|
||||
!!! related TS1356 tests/cases/compiler/awaitLiteralValues.ts:5:10: Did you mean to mark this function as 'async'?
|
||||
}
|
||||
|
||||
function awaitTrue() {
|
||||
await true;
|
||||
~~~~~
|
||||
!!! error TS1308: 'await' expression is only allowed within an async function.
|
||||
!!! related TS1356 tests/cases/compiler/awaitLiteralValues.ts:9:10: Did you mean to mark this function as 'async'?
|
||||
}
|
||||
|
||||
function awaitFalse() {
|
||||
await false;
|
||||
~~~~~
|
||||
!!! error TS1308: 'await' expression is only allowed within an async function.
|
||||
!!! related TS1356 tests/cases/compiler/awaitLiteralValues.ts:13:10: Did you mean to mark this function as 'async'?
|
||||
}
|
||||
|
||||
function awaitNull() {
|
||||
await null;
|
||||
~~~~~
|
||||
!!! error TS1308: 'await' expression is only allowed within an async function.
|
||||
!!! related TS1356 tests/cases/compiler/awaitLiteralValues.ts:17:10: Did you mean to mark this function as 'async'?
|
||||
}
|
||||
|
||||
function awaitUndefined() {
|
||||
await undefined;
|
||||
~~~~~
|
||||
!!! error TS1308: 'await' expression is only allowed within an async function.
|
||||
!!! related TS1356 tests/cases/compiler/awaitLiteralValues.ts:21:10: Did you mean to mark this function as 'async'?
|
||||
}
|
||||
|
|
@ -52,6 +52,7 @@ tests/cases/conformance/parser/ecmascript2018/forAwait/topLevelWithExprIsError.t
|
|||
for await (const x of y) {
|
||||
~~~~~
|
||||
!!! error TS1103: A 'for-await-of' statement is only allowed within an async function or async generator.
|
||||
!!! related TS1356 tests/cases/conformance/parser/ecmascript2018/forAwait/inFunctionDeclWithDeclIsError.ts:1:10: Did you mean to mark this function as 'async'?
|
||||
}
|
||||
}
|
||||
==== tests/cases/conformance/parser/ecmascript2018/forAwait/inFunctionDeclWithExprIsError.ts (1 errors) ====
|
||||
|
@ -60,6 +61,7 @@ tests/cases/conformance/parser/ecmascript2018/forAwait/topLevelWithExprIsError.t
|
|||
for await (x of y) {
|
||||
~~~~~
|
||||
!!! error TS1103: A 'for-await-of' statement is only allowed within an async function or async generator.
|
||||
!!! related TS1356 tests/cases/conformance/parser/ecmascript2018/forAwait/inFunctionDeclWithExprIsError.ts:1:10: Did you mean to mark this function as 'async'?
|
||||
}
|
||||
}
|
||||
==== tests/cases/conformance/parser/ecmascript2018/forAwait/inAsyncFunctionWithDeclIsOk.ts (0 errors) ====
|
||||
|
@ -92,6 +94,7 @@ tests/cases/conformance/parser/ecmascript2018/forAwait/topLevelWithExprIsError.t
|
|||
for await (const x of y) {
|
||||
~~~~~
|
||||
!!! error TS1103: A 'for-await-of' statement is only allowed within an async function or async generator.
|
||||
!!! related TS1356 tests/cases/conformance/parser/ecmascript2018/forAwait/inGeneratorWithDeclIsError.ts:1:11: Did you mean to mark this function as 'async'?
|
||||
}
|
||||
}
|
||||
==== tests/cases/conformance/parser/ecmascript2018/forAwait/inGeneratorWithExprIsError.ts (1 errors) ====
|
||||
|
@ -100,6 +103,7 @@ tests/cases/conformance/parser/ecmascript2018/forAwait/topLevelWithExprIsError.t
|
|||
for await (x of y) {
|
||||
~~~~~
|
||||
!!! error TS1103: A 'for-await-of' statement is only allowed within an async function or async generator.
|
||||
!!! related TS1356 tests/cases/conformance/parser/ecmascript2018/forAwait/inGeneratorWithExprIsError.ts:1:11: Did you mean to mark this function as 'async'?
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in a new issue