mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-02-20 10:29:36 -06:00
Remove ES2018 transforms for ES2018 target (#26315)
* rename esnext.ts as es2018.ts * remove ES2018 transforms for ES2018 target * change target from esnext to es2018 * rename tests
This commit is contained in:
parent
d9ee86723a
commit
6249b4c704
@ -3137,8 +3137,8 @@ namespace ts {
|
||||
|
||||
if (operatorTokenKind === SyntaxKind.EqualsToken && leftKind === SyntaxKind.ObjectLiteralExpression) {
|
||||
// Destructuring object assignments with are ES2015 syntax
|
||||
// and possibly ESNext if they contain rest
|
||||
transformFlags |= TransformFlags.AssertESNext | TransformFlags.AssertES2015 | TransformFlags.AssertDestructuringAssignment;
|
||||
// and possibly ES2018 if they contain rest
|
||||
transformFlags |= TransformFlags.AssertES2018 | TransformFlags.AssertES2015 | TransformFlags.AssertDestructuringAssignment;
|
||||
}
|
||||
else if (operatorTokenKind === SyntaxKind.EqualsToken && leftKind === SyntaxKind.ArrayLiteralExpression) {
|
||||
// Destructuring assignments are ES2015 syntax.
|
||||
@ -3174,9 +3174,9 @@ namespace ts {
|
||||
transformFlags |= TransformFlags.AssertTypeScript | TransformFlags.ContainsTypeScriptClassSyntax;
|
||||
}
|
||||
|
||||
// parameters with object rest destructuring are ES Next syntax
|
||||
// parameters with object rest destructuring are ES2018 syntax
|
||||
if (subtreeFlags & TransformFlags.ContainsObjectRestOrSpread) {
|
||||
transformFlags |= TransformFlags.AssertESNext;
|
||||
transformFlags |= TransformFlags.AssertES2018;
|
||||
}
|
||||
|
||||
// If a parameter has an initializer, a binding pattern or a dotDotDot token, then
|
||||
@ -3326,9 +3326,9 @@ namespace ts {
|
||||
transformFlags |= TransformFlags.AssertTypeScript;
|
||||
}
|
||||
|
||||
// function declarations with object rest destructuring are ES Next syntax
|
||||
// function declarations with object rest destructuring are ES2018 syntax
|
||||
if (subtreeFlags & TransformFlags.ContainsObjectRestOrSpread) {
|
||||
transformFlags |= TransformFlags.AssertESNext;
|
||||
transformFlags |= TransformFlags.AssertES2018;
|
||||
}
|
||||
|
||||
node.transformFlags = transformFlags | TransformFlags.HasComputedFlags;
|
||||
@ -3350,14 +3350,14 @@ namespace ts {
|
||||
transformFlags |= TransformFlags.AssertTypeScript;
|
||||
}
|
||||
|
||||
// function declarations with object rest destructuring are ES Next syntax
|
||||
// function declarations with object rest destructuring are ES2018 syntax
|
||||
if (subtreeFlags & TransformFlags.ContainsObjectRestOrSpread) {
|
||||
transformFlags |= TransformFlags.AssertESNext;
|
||||
transformFlags |= TransformFlags.AssertES2018;
|
||||
}
|
||||
|
||||
// An async method declaration is ES2017 syntax.
|
||||
if (hasModifier(node, ModifierFlags.Async)) {
|
||||
transformFlags |= node.asteriskToken ? TransformFlags.AssertESNext : TransformFlags.AssertES2017;
|
||||
transformFlags |= node.asteriskToken ? TransformFlags.AssertES2018 : TransformFlags.AssertES2017;
|
||||
}
|
||||
|
||||
if (node.asteriskToken) {
|
||||
@ -3381,9 +3381,9 @@ namespace ts {
|
||||
transformFlags |= TransformFlags.AssertTypeScript;
|
||||
}
|
||||
|
||||
// function declarations with object rest destructuring are ES Next syntax
|
||||
// function declarations with object rest destructuring are ES2018 syntax
|
||||
if (subtreeFlags & TransformFlags.ContainsObjectRestOrSpread) {
|
||||
transformFlags |= TransformFlags.AssertESNext;
|
||||
transformFlags |= TransformFlags.AssertES2018;
|
||||
}
|
||||
|
||||
node.transformFlags = transformFlags | TransformFlags.HasComputedFlags;
|
||||
@ -3427,12 +3427,12 @@ namespace ts {
|
||||
|
||||
// An async function declaration is ES2017 syntax.
|
||||
if (modifierFlags & ModifierFlags.Async) {
|
||||
transformFlags |= node.asteriskToken ? TransformFlags.AssertESNext : TransformFlags.AssertES2017;
|
||||
transformFlags |= node.asteriskToken ? TransformFlags.AssertES2018 : TransformFlags.AssertES2017;
|
||||
}
|
||||
|
||||
// function declarations with object rest destructuring are ES Next syntax
|
||||
// function declarations with object rest destructuring are ES2018 syntax
|
||||
if (subtreeFlags & TransformFlags.ContainsObjectRestOrSpread) {
|
||||
transformFlags |= TransformFlags.AssertESNext;
|
||||
transformFlags |= TransformFlags.AssertES2018;
|
||||
}
|
||||
|
||||
// If a FunctionDeclaration's subtree has marked the container as needing to capture the
|
||||
@ -3469,12 +3469,12 @@ namespace ts {
|
||||
|
||||
// An async function expression is ES2017 syntax.
|
||||
if (hasModifier(node, ModifierFlags.Async)) {
|
||||
transformFlags |= node.asteriskToken ? TransformFlags.AssertESNext : TransformFlags.AssertES2017;
|
||||
transformFlags |= node.asteriskToken ? TransformFlags.AssertES2018 : TransformFlags.AssertES2017;
|
||||
}
|
||||
|
||||
// function expressions with object rest destructuring are ES Next syntax
|
||||
// function expressions with object rest destructuring are ES2018 syntax
|
||||
if (subtreeFlags & TransformFlags.ContainsObjectRestOrSpread) {
|
||||
transformFlags |= TransformFlags.AssertESNext;
|
||||
transformFlags |= TransformFlags.AssertES2018;
|
||||
}
|
||||
|
||||
|
||||
@ -3513,9 +3513,9 @@ namespace ts {
|
||||
transformFlags |= TransformFlags.AssertES2017;
|
||||
}
|
||||
|
||||
// arrow functions with object rest destructuring are ES Next syntax
|
||||
// arrow functions with object rest destructuring are ES2018 syntax
|
||||
if (subtreeFlags & TransformFlags.ContainsObjectRestOrSpread) {
|
||||
transformFlags |= TransformFlags.AssertESNext;
|
||||
transformFlags |= TransformFlags.AssertES2018;
|
||||
}
|
||||
|
||||
// If an ArrowFunction contains a lexical this, its container must capture the lexical this.
|
||||
@ -3535,8 +3535,8 @@ namespace ts {
|
||||
if (transformFlags & TransformFlags.Super) {
|
||||
transformFlags ^= TransformFlags.Super;
|
||||
// super inside of an async function requires hoisting the super access (ES2017).
|
||||
// same for super inside of an async generator, which is ESNext.
|
||||
transformFlags |= TransformFlags.ContainsSuper | TransformFlags.ContainsES2017 | TransformFlags.ContainsESNext;
|
||||
// same for super inside of an async generator, which is ES2018.
|
||||
transformFlags |= TransformFlags.ContainsSuper | TransformFlags.ContainsES2017 | TransformFlags.ContainsES2018;
|
||||
}
|
||||
|
||||
node.transformFlags = transformFlags | TransformFlags.HasComputedFlags;
|
||||
@ -3553,8 +3553,8 @@ namespace ts {
|
||||
if (expressionFlags & TransformFlags.Super) {
|
||||
transformFlags &= ~TransformFlags.Super;
|
||||
// super inside of an async function requires hoisting the super access (ES2017).
|
||||
// same for super inside of an async generator, which is ESNext.
|
||||
transformFlags |= TransformFlags.ContainsSuper | TransformFlags.ContainsES2017 | TransformFlags.ContainsESNext;
|
||||
// same for super inside of an async generator, which is ES2018.
|
||||
transformFlags |= TransformFlags.ContainsSuper | TransformFlags.ContainsES2017 | TransformFlags.ContainsES2018;
|
||||
}
|
||||
|
||||
node.transformFlags = transformFlags | TransformFlags.HasComputedFlags;
|
||||
@ -3565,9 +3565,9 @@ namespace ts {
|
||||
let transformFlags = subtreeFlags;
|
||||
transformFlags |= TransformFlags.AssertES2015 | TransformFlags.ContainsBindingPattern;
|
||||
|
||||
// A VariableDeclaration containing ObjectRest is ESNext syntax
|
||||
// A VariableDeclaration containing ObjectRest is ES2018 syntax
|
||||
if (subtreeFlags & TransformFlags.ContainsObjectRestOrSpread) {
|
||||
transformFlags |= TransformFlags.AssertESNext;
|
||||
transformFlags |= TransformFlags.AssertES2018;
|
||||
}
|
||||
|
||||
// Type annotations are TypeScript syntax.
|
||||
@ -3674,8 +3674,8 @@ namespace ts {
|
||||
switch (kind) {
|
||||
case SyntaxKind.AsyncKeyword:
|
||||
case SyntaxKind.AwaitExpression:
|
||||
// async/await is ES2017 syntax, but may be ESNext syntax (for async generators)
|
||||
transformFlags |= TransformFlags.AssertESNext | TransformFlags.AssertES2017;
|
||||
// async/await is ES2017 syntax, but may be ES2018 syntax (for async generators)
|
||||
transformFlags |= TransformFlags.AssertES2018 | TransformFlags.AssertES2017;
|
||||
break;
|
||||
|
||||
case SyntaxKind.TypeAssertionExpression:
|
||||
@ -3747,7 +3747,7 @@ namespace ts {
|
||||
case SyntaxKind.ForOfStatement:
|
||||
// This node is either ES2015 syntax or ES2017 syntax (if it is a for-await-of).
|
||||
if ((<ForOfStatement>node).awaitModifier) {
|
||||
transformFlags |= TransformFlags.AssertESNext;
|
||||
transformFlags |= TransformFlags.AssertES2018;
|
||||
}
|
||||
transformFlags |= TransformFlags.AssertES2015;
|
||||
break;
|
||||
@ -3755,7 +3755,7 @@ namespace ts {
|
||||
case SyntaxKind.YieldExpression:
|
||||
// This node is either ES2015 syntax (in a generator) or ES2017 syntax (in an async
|
||||
// generator).
|
||||
transformFlags |= TransformFlags.AssertESNext | TransformFlags.AssertES2015 | TransformFlags.ContainsYield;
|
||||
transformFlags |= TransformFlags.AssertES2018 | TransformFlags.AssertES2015 | TransformFlags.ContainsYield;
|
||||
break;
|
||||
|
||||
case SyntaxKind.AnyKeyword:
|
||||
@ -3824,7 +3824,7 @@ namespace ts {
|
||||
break;
|
||||
|
||||
case SyntaxKind.SpreadAssignment:
|
||||
transformFlags |= TransformFlags.AssertESNext | TransformFlags.ContainsObjectRestOrSpread;
|
||||
transformFlags |= TransformFlags.AssertES2018 | TransformFlags.ContainsObjectRestOrSpread;
|
||||
break;
|
||||
|
||||
case SyntaxKind.SuperKeyword:
|
||||
@ -3841,7 +3841,7 @@ namespace ts {
|
||||
case SyntaxKind.ObjectBindingPattern:
|
||||
transformFlags |= TransformFlags.AssertES2015 | TransformFlags.ContainsBindingPattern;
|
||||
if (subtreeFlags & TransformFlags.ContainsRestOrSpread) {
|
||||
transformFlags |= TransformFlags.AssertESNext | TransformFlags.ContainsObjectRestOrSpread;
|
||||
transformFlags |= TransformFlags.AssertES2018 | TransformFlags.ContainsObjectRestOrSpread;
|
||||
}
|
||||
excludeFlags = TransformFlags.BindingPatternExcludes;
|
||||
break;
|
||||
@ -3879,8 +3879,8 @@ namespace ts {
|
||||
|
||||
if (subtreeFlags & TransformFlags.ContainsObjectRestOrSpread) {
|
||||
// If an ObjectLiteralExpression contains a spread element, then it
|
||||
// is an ES next node.
|
||||
transformFlags |= TransformFlags.AssertESNext;
|
||||
// is an ES2018 node.
|
||||
transformFlags |= TransformFlags.AssertES2018;
|
||||
}
|
||||
|
||||
break;
|
||||
@ -3915,8 +3915,8 @@ namespace ts {
|
||||
break;
|
||||
|
||||
case SyntaxKind.ReturnStatement:
|
||||
// Return statements may require an `await` in ESNext.
|
||||
transformFlags |= TransformFlags.ContainsHoistedDeclarationOrCompletion | TransformFlags.AssertESNext;
|
||||
// Return statements may require an `await` in ES2018.
|
||||
transformFlags |= TransformFlags.ContainsHoistedDeclarationOrCompletion | TransformFlags.AssertES2018;
|
||||
break;
|
||||
|
||||
case SyntaxKind.ContinueStatement:
|
||||
|
||||
@ -42,6 +42,10 @@ namespace ts {
|
||||
transformers.push(transformESNext);
|
||||
}
|
||||
|
||||
if (languageVersion < ScriptTarget.ES2018) {
|
||||
transformers.push(transformES2018);
|
||||
}
|
||||
|
||||
if (languageVersion < ScriptTarget.ES2017) {
|
||||
transformers.push(transformES2017);
|
||||
}
|
||||
|
||||
1046
src/compiler/transformers/es2018.ts
Normal file
1046
src/compiler/transformers/es2018.ts
Normal file
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -30,6 +30,7 @@
|
||||
"transformers/destructuring.ts",
|
||||
"transformers/ts.ts",
|
||||
"transformers/es2017.ts",
|
||||
"transformers/es2018.ts",
|
||||
"transformers/esnext.ts",
|
||||
"transformers/jsx.ts",
|
||||
"transformers/es2016.ts",
|
||||
|
||||
@ -5071,6 +5071,7 @@ namespace ts {
|
||||
ContainsDynamicImport = 1 << 24,
|
||||
Super = 1 << 25,
|
||||
ContainsSuper = 1 << 26,
|
||||
ContainsES2018 = 1 << 27,
|
||||
|
||||
// Please leave this as 1 << 29.
|
||||
// It is the maximum bit we can set before we outgrow the size of a v8 small integer (SMI) on an x86 system.
|
||||
@ -5082,6 +5083,7 @@ namespace ts {
|
||||
AssertTypeScript = TypeScript | ContainsTypeScript,
|
||||
AssertJsx = ContainsJsx,
|
||||
AssertESNext = ContainsESNext,
|
||||
AssertES2018 = ContainsES2018,
|
||||
AssertES2017 = ContainsES2017,
|
||||
AssertES2016 = ContainsES2016,
|
||||
AssertES2015 = ES2015 | ContainsES2015,
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
//// [tests/cases/conformance/emitter/esnext/asyncGenerators/emitter.asyncGenerators.classMethods.esnext.ts] ////
|
||||
//// [tests/cases/conformance/emitter/es2018/asyncGenerators/emitter.asyncGenerators.classMethods.es2018.ts] ////
|
||||
|
||||
//// [C1.ts]
|
||||
class C1 {
|
||||
@ -1,4 +1,4 @@
|
||||
=== tests/cases/conformance/emitter/esnext/asyncGenerators/C1.ts ===
|
||||
=== tests/cases/conformance/emitter/es2018/asyncGenerators/C1.ts ===
|
||||
class C1 {
|
||||
>C1 : Symbol(C1, Decl(C1.ts, 0, 0))
|
||||
|
||||
@ -6,7 +6,7 @@ class C1 {
|
||||
>f : Symbol(C1.f, Decl(C1.ts, 0, 10))
|
||||
}
|
||||
}
|
||||
=== tests/cases/conformance/emitter/esnext/asyncGenerators/C2.ts ===
|
||||
=== tests/cases/conformance/emitter/es2018/asyncGenerators/C2.ts ===
|
||||
class C2 {
|
||||
>C2 : Symbol(C2, Decl(C2.ts, 0, 0))
|
||||
|
||||
@ -17,7 +17,7 @@ class C2 {
|
||||
>x : Symbol(x, Decl(C2.ts, 2, 13))
|
||||
}
|
||||
}
|
||||
=== tests/cases/conformance/emitter/esnext/asyncGenerators/C3.ts ===
|
||||
=== tests/cases/conformance/emitter/es2018/asyncGenerators/C3.ts ===
|
||||
class C3 {
|
||||
>C3 : Symbol(C3, Decl(C3.ts, 0, 0))
|
||||
|
||||
@ -28,7 +28,7 @@ class C3 {
|
||||
>x : Symbol(x, Decl(C3.ts, 2, 13))
|
||||
}
|
||||
}
|
||||
=== tests/cases/conformance/emitter/esnext/asyncGenerators/C4.ts ===
|
||||
=== tests/cases/conformance/emitter/es2018/asyncGenerators/C4.ts ===
|
||||
class C4 {
|
||||
>C4 : Symbol(C4, Decl(C4.ts, 0, 0))
|
||||
|
||||
@ -39,7 +39,7 @@ class C4 {
|
||||
>x : Symbol(x, Decl(C4.ts, 2, 13))
|
||||
}
|
||||
}
|
||||
=== tests/cases/conformance/emitter/esnext/asyncGenerators/C5.ts ===
|
||||
=== tests/cases/conformance/emitter/es2018/asyncGenerators/C5.ts ===
|
||||
class C5 {
|
||||
>C5 : Symbol(C5, Decl(C5.ts, 0, 0))
|
||||
|
||||
@ -50,7 +50,7 @@ class C5 {
|
||||
>x : Symbol(x, Decl(C5.ts, 2, 13))
|
||||
}
|
||||
}
|
||||
=== tests/cases/conformance/emitter/esnext/asyncGenerators/C6.ts ===
|
||||
=== tests/cases/conformance/emitter/es2018/asyncGenerators/C6.ts ===
|
||||
class C6 {
|
||||
>C6 : Symbol(C6, Decl(C6.ts, 0, 0))
|
||||
|
||||
@ -61,7 +61,7 @@ class C6 {
|
||||
>x : Symbol(x, Decl(C6.ts, 2, 13))
|
||||
}
|
||||
}
|
||||
=== tests/cases/conformance/emitter/esnext/asyncGenerators/C7.ts ===
|
||||
=== tests/cases/conformance/emitter/es2018/asyncGenerators/C7.ts ===
|
||||
class C7 {
|
||||
>C7 : Symbol(C7, Decl(C7.ts, 0, 0))
|
||||
|
||||
@ -71,7 +71,7 @@ class C7 {
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
=== tests/cases/conformance/emitter/esnext/asyncGenerators/C8.ts ===
|
||||
=== tests/cases/conformance/emitter/es2018/asyncGenerators/C8.ts ===
|
||||
class C8 {
|
||||
>C8 : Symbol(C8, Decl(C8.ts, 0, 0))
|
||||
|
||||
@ -87,7 +87,7 @@ class C8 {
|
||||
>g : Symbol(C8.g, Decl(C8.ts, 0, 10))
|
||||
}
|
||||
}
|
||||
=== tests/cases/conformance/emitter/esnext/asyncGenerators/C9.ts ===
|
||||
=== tests/cases/conformance/emitter/es2018/asyncGenerators/C9.ts ===
|
||||
class B9 {
|
||||
>B9 : Symbol(B9, Decl(C9.ts, 0, 0))
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
=== tests/cases/conformance/emitter/esnext/asyncGenerators/C1.ts ===
|
||||
=== tests/cases/conformance/emitter/es2018/asyncGenerators/C1.ts ===
|
||||
class C1 {
|
||||
>C1 : C1
|
||||
|
||||
@ -6,7 +6,7 @@ class C1 {
|
||||
>f : () => AsyncIterableIterator<any>
|
||||
}
|
||||
}
|
||||
=== tests/cases/conformance/emitter/esnext/asyncGenerators/C2.ts ===
|
||||
=== tests/cases/conformance/emitter/es2018/asyncGenerators/C2.ts ===
|
||||
class C2 {
|
||||
>C2 : C2
|
||||
|
||||
@ -18,7 +18,7 @@ class C2 {
|
||||
>yield : any
|
||||
}
|
||||
}
|
||||
=== tests/cases/conformance/emitter/esnext/asyncGenerators/C3.ts ===
|
||||
=== tests/cases/conformance/emitter/es2018/asyncGenerators/C3.ts ===
|
||||
class C3 {
|
||||
>C3 : C3
|
||||
|
||||
@ -31,7 +31,7 @@ class C3 {
|
||||
>1 : 1
|
||||
}
|
||||
}
|
||||
=== tests/cases/conformance/emitter/esnext/asyncGenerators/C4.ts ===
|
||||
=== tests/cases/conformance/emitter/es2018/asyncGenerators/C4.ts ===
|
||||
class C4 {
|
||||
>C4 : C4
|
||||
|
||||
@ -45,7 +45,7 @@ class C4 {
|
||||
>1 : 1
|
||||
}
|
||||
}
|
||||
=== tests/cases/conformance/emitter/esnext/asyncGenerators/C5.ts ===
|
||||
=== tests/cases/conformance/emitter/es2018/asyncGenerators/C5.ts ===
|
||||
class C5 {
|
||||
>C5 : C5
|
||||
|
||||
@ -62,7 +62,7 @@ class C5 {
|
||||
>1 : 1
|
||||
}
|
||||
}
|
||||
=== tests/cases/conformance/emitter/esnext/asyncGenerators/C6.ts ===
|
||||
=== tests/cases/conformance/emitter/es2018/asyncGenerators/C6.ts ===
|
||||
class C6 {
|
||||
>C6 : C6
|
||||
|
||||
@ -75,7 +75,7 @@ class C6 {
|
||||
>1 : 1
|
||||
}
|
||||
}
|
||||
=== tests/cases/conformance/emitter/esnext/asyncGenerators/C7.ts ===
|
||||
=== tests/cases/conformance/emitter/es2018/asyncGenerators/C7.ts ===
|
||||
class C7 {
|
||||
>C7 : C7
|
||||
|
||||
@ -86,7 +86,7 @@ class C7 {
|
||||
>1 : 1
|
||||
}
|
||||
}
|
||||
=== tests/cases/conformance/emitter/esnext/asyncGenerators/C8.ts ===
|
||||
=== tests/cases/conformance/emitter/es2018/asyncGenerators/C8.ts ===
|
||||
class C8 {
|
||||
>C8 : C8
|
||||
|
||||
@ -103,7 +103,7 @@ class C8 {
|
||||
>g : () => void
|
||||
}
|
||||
}
|
||||
=== tests/cases/conformance/emitter/esnext/asyncGenerators/C9.ts ===
|
||||
=== tests/cases/conformance/emitter/es2018/asyncGenerators/C9.ts ===
|
||||
class B9 {
|
||||
>B9 : B9
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
//// [tests/cases/conformance/emitter/esnext/asyncGenerators/emitter.asyncGenerators.functionDeclarations.esnext.ts] ////
|
||||
//// [tests/cases/conformance/emitter/es2018/asyncGenerators/emitter.asyncGenerators.functionDeclarations.es2018.ts] ////
|
||||
|
||||
//// [F1.ts]
|
||||
async function * f1() {
|
||||
@ -1,43 +1,43 @@
|
||||
=== tests/cases/conformance/emitter/esnext/asyncGenerators/F1.ts ===
|
||||
=== tests/cases/conformance/emitter/es2018/asyncGenerators/F1.ts ===
|
||||
async function * f1() {
|
||||
>f1 : Symbol(f1, Decl(F1.ts, 0, 0))
|
||||
}
|
||||
=== tests/cases/conformance/emitter/esnext/asyncGenerators/F2.ts ===
|
||||
=== tests/cases/conformance/emitter/es2018/asyncGenerators/F2.ts ===
|
||||
async function * f2() {
|
||||
>f2 : Symbol(f2, Decl(F2.ts, 0, 0))
|
||||
|
||||
const x = yield;
|
||||
>x : Symbol(x, Decl(F2.ts, 1, 9))
|
||||
}
|
||||
=== tests/cases/conformance/emitter/esnext/asyncGenerators/F3.ts ===
|
||||
=== tests/cases/conformance/emitter/es2018/asyncGenerators/F3.ts ===
|
||||
async function * f3() {
|
||||
>f3 : Symbol(f3, Decl(F3.ts, 0, 0))
|
||||
|
||||
const x = yield 1;
|
||||
>x : Symbol(x, Decl(F3.ts, 1, 9))
|
||||
}
|
||||
=== tests/cases/conformance/emitter/esnext/asyncGenerators/F4.ts ===
|
||||
=== tests/cases/conformance/emitter/es2018/asyncGenerators/F4.ts ===
|
||||
async function * f4() {
|
||||
>f4 : Symbol(f4, Decl(F4.ts, 0, 0))
|
||||
|
||||
const x = yield* [1];
|
||||
>x : Symbol(x, Decl(F4.ts, 1, 9))
|
||||
}
|
||||
=== tests/cases/conformance/emitter/esnext/asyncGenerators/F5.ts ===
|
||||
=== tests/cases/conformance/emitter/es2018/asyncGenerators/F5.ts ===
|
||||
async function * f5() {
|
||||
>f5 : Symbol(f5, Decl(F5.ts, 0, 0))
|
||||
|
||||
const x = yield* (async function*() { yield 1; })();
|
||||
>x : Symbol(x, Decl(F5.ts, 1, 9))
|
||||
}
|
||||
=== tests/cases/conformance/emitter/esnext/asyncGenerators/F6.ts ===
|
||||
=== tests/cases/conformance/emitter/es2018/asyncGenerators/F6.ts ===
|
||||
async function * f6() {
|
||||
>f6 : Symbol(f6, Decl(F6.ts, 0, 0))
|
||||
|
||||
const x = await 1;
|
||||
>x : Symbol(x, Decl(F6.ts, 1, 9))
|
||||
}
|
||||
=== tests/cases/conformance/emitter/esnext/asyncGenerators/F7.ts ===
|
||||
=== tests/cases/conformance/emitter/es2018/asyncGenerators/F7.ts ===
|
||||
async function * f7() {
|
||||
>f7 : Symbol(f7, Decl(F7.ts, 0, 0))
|
||||
|
||||
@ -1,8 +1,8 @@
|
||||
=== tests/cases/conformance/emitter/esnext/asyncGenerators/F1.ts ===
|
||||
=== tests/cases/conformance/emitter/es2018/asyncGenerators/F1.ts ===
|
||||
async function * f1() {
|
||||
>f1 : () => AsyncIterableIterator<any>
|
||||
}
|
||||
=== tests/cases/conformance/emitter/esnext/asyncGenerators/F2.ts ===
|
||||
=== tests/cases/conformance/emitter/es2018/asyncGenerators/F2.ts ===
|
||||
async function * f2() {
|
||||
>f2 : () => AsyncIterableIterator<any>
|
||||
|
||||
@ -10,7 +10,7 @@ async function * f2() {
|
||||
>x : any
|
||||
>yield : any
|
||||
}
|
||||
=== tests/cases/conformance/emitter/esnext/asyncGenerators/F3.ts ===
|
||||
=== tests/cases/conformance/emitter/es2018/asyncGenerators/F3.ts ===
|
||||
async function * f3() {
|
||||
>f3 : () => AsyncIterableIterator<number>
|
||||
|
||||
@ -19,7 +19,7 @@ async function * f3() {
|
||||
>yield 1 : any
|
||||
>1 : 1
|
||||
}
|
||||
=== tests/cases/conformance/emitter/esnext/asyncGenerators/F4.ts ===
|
||||
=== tests/cases/conformance/emitter/es2018/asyncGenerators/F4.ts ===
|
||||
async function * f4() {
|
||||
>f4 : () => AsyncIterableIterator<number>
|
||||
|
||||
@ -29,7 +29,7 @@ async function * f4() {
|
||||
>[1] : number[]
|
||||
>1 : 1
|
||||
}
|
||||
=== tests/cases/conformance/emitter/esnext/asyncGenerators/F5.ts ===
|
||||
=== tests/cases/conformance/emitter/es2018/asyncGenerators/F5.ts ===
|
||||
async function * f5() {
|
||||
>f5 : () => AsyncIterableIterator<number>
|
||||
|
||||
@ -42,7 +42,7 @@ async function * f5() {
|
||||
>yield 1 : any
|
||||
>1 : 1
|
||||
}
|
||||
=== tests/cases/conformance/emitter/esnext/asyncGenerators/F6.ts ===
|
||||
=== tests/cases/conformance/emitter/es2018/asyncGenerators/F6.ts ===
|
||||
async function * f6() {
|
||||
>f6 : () => AsyncIterableIterator<any>
|
||||
|
||||
@ -51,7 +51,7 @@ async function * f6() {
|
||||
>await 1 : 1
|
||||
>1 : 1
|
||||
}
|
||||
=== tests/cases/conformance/emitter/esnext/asyncGenerators/F7.ts ===
|
||||
=== tests/cases/conformance/emitter/es2018/asyncGenerators/F7.ts ===
|
||||
async function * f7() {
|
||||
>f7 : () => AsyncIterableIterator<number>
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
//// [tests/cases/conformance/emitter/esnext/asyncGenerators/emitter.asyncGenerators.functionExpressions.esnext.ts] ////
|
||||
//// [tests/cases/conformance/emitter/es2018/asyncGenerators/emitter.asyncGenerators.functionExpressions.es2018.ts] ////
|
||||
|
||||
//// [F1.ts]
|
||||
const f1 = async function * () {
|
||||
@ -1,43 +1,43 @@
|
||||
=== tests/cases/conformance/emitter/esnext/asyncGenerators/F1.ts ===
|
||||
=== tests/cases/conformance/emitter/es2018/asyncGenerators/F1.ts ===
|
||||
const f1 = async function * () {
|
||||
>f1 : Symbol(f1, Decl(F1.ts, 0, 5))
|
||||
}
|
||||
=== tests/cases/conformance/emitter/esnext/asyncGenerators/F2.ts ===
|
||||
=== tests/cases/conformance/emitter/es2018/asyncGenerators/F2.ts ===
|
||||
const f2 = async function * () {
|
||||
>f2 : Symbol(f2, Decl(F2.ts, 0, 5))
|
||||
|
||||
const x = yield;
|
||||
>x : Symbol(x, Decl(F2.ts, 1, 9))
|
||||
}
|
||||
=== tests/cases/conformance/emitter/esnext/asyncGenerators/F3.ts ===
|
||||
=== tests/cases/conformance/emitter/es2018/asyncGenerators/F3.ts ===
|
||||
const f3 = async function * () {
|
||||
>f3 : Symbol(f3, Decl(F3.ts, 0, 5))
|
||||
|
||||
const x = yield 1;
|
||||
>x : Symbol(x, Decl(F3.ts, 1, 9))
|
||||
}
|
||||
=== tests/cases/conformance/emitter/esnext/asyncGenerators/F4.ts ===
|
||||
=== tests/cases/conformance/emitter/es2018/asyncGenerators/F4.ts ===
|
||||
const f4 = async function * () {
|
||||
>f4 : Symbol(f4, Decl(F4.ts, 0, 5))
|
||||
|
||||
const x = yield* [1];
|
||||
>x : Symbol(x, Decl(F4.ts, 1, 9))
|
||||
}
|
||||
=== tests/cases/conformance/emitter/esnext/asyncGenerators/F5.ts ===
|
||||
=== tests/cases/conformance/emitter/es2018/asyncGenerators/F5.ts ===
|
||||
const f5 = async function * () {
|
||||
>f5 : Symbol(f5, Decl(F5.ts, 0, 5))
|
||||
|
||||
const x = yield* (async function*() { yield 1; })();
|
||||
>x : Symbol(x, Decl(F5.ts, 1, 9))
|
||||
}
|
||||
=== tests/cases/conformance/emitter/esnext/asyncGenerators/F6.ts ===
|
||||
=== tests/cases/conformance/emitter/es2018/asyncGenerators/F6.ts ===
|
||||
const f6 = async function * () {
|
||||
>f6 : Symbol(f6, Decl(F6.ts, 0, 5))
|
||||
|
||||
const x = await 1;
|
||||
>x : Symbol(x, Decl(F6.ts, 1, 9))
|
||||
}
|
||||
=== tests/cases/conformance/emitter/esnext/asyncGenerators/F7.ts ===
|
||||
=== tests/cases/conformance/emitter/es2018/asyncGenerators/F7.ts ===
|
||||
const f7 = async function * () {
|
||||
>f7 : Symbol(f7, Decl(F7.ts, 0, 5))
|
||||
|
||||
@ -1,9 +1,9 @@
|
||||
=== tests/cases/conformance/emitter/esnext/asyncGenerators/F1.ts ===
|
||||
=== tests/cases/conformance/emitter/es2018/asyncGenerators/F1.ts ===
|
||||
const f1 = async function * () {
|
||||
>f1 : () => AsyncIterableIterator<any>
|
||||
>async function * () {} : () => AsyncIterableIterator<any>
|
||||
}
|
||||
=== tests/cases/conformance/emitter/esnext/asyncGenerators/F2.ts ===
|
||||
=== tests/cases/conformance/emitter/es2018/asyncGenerators/F2.ts ===
|
||||
const f2 = async function * () {
|
||||
>f2 : () => AsyncIterableIterator<any>
|
||||
>async function * () { const x = yield;} : () => AsyncIterableIterator<any>
|
||||
@ -12,7 +12,7 @@ const f2 = async function * () {
|
||||
>x : any
|
||||
>yield : any
|
||||
}
|
||||
=== tests/cases/conformance/emitter/esnext/asyncGenerators/F3.ts ===
|
||||
=== tests/cases/conformance/emitter/es2018/asyncGenerators/F3.ts ===
|
||||
const f3 = async function * () {
|
||||
>f3 : () => AsyncIterableIterator<number>
|
||||
>async function * () { const x = yield 1;} : () => AsyncIterableIterator<number>
|
||||
@ -22,7 +22,7 @@ const f3 = async function * () {
|
||||
>yield 1 : any
|
||||
>1 : 1
|
||||
}
|
||||
=== tests/cases/conformance/emitter/esnext/asyncGenerators/F4.ts ===
|
||||
=== tests/cases/conformance/emitter/es2018/asyncGenerators/F4.ts ===
|
||||
const f4 = async function * () {
|
||||
>f4 : () => AsyncIterableIterator<number>
|
||||
>async function * () { const x = yield* [1];} : () => AsyncIterableIterator<number>
|
||||
@ -33,7 +33,7 @@ const f4 = async function * () {
|
||||
>[1] : number[]
|
||||
>1 : 1
|
||||
}
|
||||
=== tests/cases/conformance/emitter/esnext/asyncGenerators/F5.ts ===
|
||||
=== tests/cases/conformance/emitter/es2018/asyncGenerators/F5.ts ===
|
||||
const f5 = async function * () {
|
||||
>f5 : () => AsyncIterableIterator<number>
|
||||
>async function * () { const x = yield* (async function*() { yield 1; })();} : () => AsyncIterableIterator<number>
|
||||
@ -47,7 +47,7 @@ const f5 = async function * () {
|
||||
>yield 1 : any
|
||||
>1 : 1
|
||||
}
|
||||
=== tests/cases/conformance/emitter/esnext/asyncGenerators/F6.ts ===
|
||||
=== tests/cases/conformance/emitter/es2018/asyncGenerators/F6.ts ===
|
||||
const f6 = async function * () {
|
||||
>f6 : () => AsyncIterableIterator<any>
|
||||
>async function * () { const x = await 1;} : () => AsyncIterableIterator<any>
|
||||
@ -57,7 +57,7 @@ const f6 = async function * () {
|
||||
>await 1 : 1
|
||||
>1 : 1
|
||||
}
|
||||
=== tests/cases/conformance/emitter/esnext/asyncGenerators/F7.ts ===
|
||||
=== tests/cases/conformance/emitter/es2018/asyncGenerators/F7.ts ===
|
||||
const f7 = async function * () {
|
||||
>f7 : () => AsyncIterableIterator<number>
|
||||
>async function * () { return 1;} : () => AsyncIterableIterator<number>
|
||||
@ -1,4 +1,4 @@
|
||||
//// [tests/cases/conformance/emitter/esnext/asyncGenerators/emitter.asyncGenerators.objectLiteralMethods.esnext.ts] ////
|
||||
//// [tests/cases/conformance/emitter/es2018/asyncGenerators/emitter.asyncGenerators.objectLiteralMethods.es2018.ts] ////
|
||||
|
||||
//// [O1.ts]
|
||||
const o1 = {
|
||||
@ -1,4 +1,4 @@
|
||||
=== tests/cases/conformance/emitter/esnext/asyncGenerators/O1.ts ===
|
||||
=== tests/cases/conformance/emitter/es2018/asyncGenerators/O1.ts ===
|
||||
const o1 = {
|
||||
>o1 : Symbol(o1, Decl(O1.ts, 0, 5))
|
||||
|
||||
@ -6,7 +6,7 @@ const o1 = {
|
||||
>f : Symbol(f, Decl(O1.ts, 0, 12))
|
||||
}
|
||||
}
|
||||
=== tests/cases/conformance/emitter/esnext/asyncGenerators/O2.ts ===
|
||||
=== tests/cases/conformance/emitter/es2018/asyncGenerators/O2.ts ===
|
||||
const o2 = {
|
||||
>o2 : Symbol(o2, Decl(O2.ts, 0, 5))
|
||||
|
||||
@ -17,7 +17,7 @@ const o2 = {
|
||||
>x : Symbol(x, Decl(O2.ts, 2, 13))
|
||||
}
|
||||
}
|
||||
=== tests/cases/conformance/emitter/esnext/asyncGenerators/O3.ts ===
|
||||
=== tests/cases/conformance/emitter/es2018/asyncGenerators/O3.ts ===
|
||||
const o3 = {
|
||||
>o3 : Symbol(o3, Decl(O3.ts, 0, 5))
|
||||
|
||||
@ -28,7 +28,7 @@ const o3 = {
|
||||
>x : Symbol(x, Decl(O3.ts, 2, 13))
|
||||
}
|
||||
}
|
||||
=== tests/cases/conformance/emitter/esnext/asyncGenerators/O4.ts ===
|
||||
=== tests/cases/conformance/emitter/es2018/asyncGenerators/O4.ts ===
|
||||
const o4 = {
|
||||
>o4 : Symbol(o4, Decl(O4.ts, 0, 5))
|
||||
|
||||
@ -39,7 +39,7 @@ const o4 = {
|
||||
>x : Symbol(x, Decl(O4.ts, 2, 13))
|
||||
}
|
||||
}
|
||||
=== tests/cases/conformance/emitter/esnext/asyncGenerators/O5.ts ===
|
||||
=== tests/cases/conformance/emitter/es2018/asyncGenerators/O5.ts ===
|
||||
const o5 = {
|
||||
>o5 : Symbol(o5, Decl(O5.ts, 0, 5))
|
||||
|
||||
@ -50,7 +50,7 @@ const o5 = {
|
||||
>x : Symbol(x, Decl(O5.ts, 2, 13))
|
||||
}
|
||||
}
|
||||
=== tests/cases/conformance/emitter/esnext/asyncGenerators/O6.ts ===
|
||||
=== tests/cases/conformance/emitter/es2018/asyncGenerators/O6.ts ===
|
||||
const o6 = {
|
||||
>o6 : Symbol(o6, Decl(O6.ts, 0, 5))
|
||||
|
||||
@ -61,7 +61,7 @@ const o6 = {
|
||||
>x : Symbol(x, Decl(O6.ts, 2, 13))
|
||||
}
|
||||
}
|
||||
=== tests/cases/conformance/emitter/esnext/asyncGenerators/O7.ts ===
|
||||
=== tests/cases/conformance/emitter/es2018/asyncGenerators/O7.ts ===
|
||||
const o7 = {
|
||||
>o7 : Symbol(o7, Decl(O7.ts, 0, 5))
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
=== tests/cases/conformance/emitter/esnext/asyncGenerators/O1.ts ===
|
||||
=== tests/cases/conformance/emitter/es2018/asyncGenerators/O1.ts ===
|
||||
const o1 = {
|
||||
>o1 : { f(): AsyncIterableIterator<any>; }
|
||||
>{ async * f() { }} : { f(): AsyncIterableIterator<any>; }
|
||||
@ -7,7 +7,7 @@ const o1 = {
|
||||
>f : () => AsyncIterableIterator<any>
|
||||
}
|
||||
}
|
||||
=== tests/cases/conformance/emitter/esnext/asyncGenerators/O2.ts ===
|
||||
=== tests/cases/conformance/emitter/es2018/asyncGenerators/O2.ts ===
|
||||
const o2 = {
|
||||
>o2 : { f(): AsyncIterableIterator<any>; }
|
||||
>{ async * f() { const x = yield; }} : { f(): AsyncIterableIterator<any>; }
|
||||
@ -20,7 +20,7 @@ const o2 = {
|
||||
>yield : any
|
||||
}
|
||||
}
|
||||
=== tests/cases/conformance/emitter/esnext/asyncGenerators/O3.ts ===
|
||||
=== tests/cases/conformance/emitter/es2018/asyncGenerators/O3.ts ===
|
||||
const o3 = {
|
||||
>o3 : { f(): AsyncIterableIterator<number>; }
|
||||
>{ async * f() { const x = yield 1; }} : { f(): AsyncIterableIterator<number>; }
|
||||
@ -34,7 +34,7 @@ const o3 = {
|
||||
>1 : 1
|
||||
}
|
||||
}
|
||||
=== tests/cases/conformance/emitter/esnext/asyncGenerators/O4.ts ===
|
||||
=== tests/cases/conformance/emitter/es2018/asyncGenerators/O4.ts ===
|
||||
const o4 = {
|
||||
>o4 : { f(): AsyncIterableIterator<number>; }
|
||||
>{ async * f() { const x = yield* [1]; }} : { f(): AsyncIterableIterator<number>; }
|
||||
@ -49,7 +49,7 @@ const o4 = {
|
||||
>1 : 1
|
||||
}
|
||||
}
|
||||
=== tests/cases/conformance/emitter/esnext/asyncGenerators/O5.ts ===
|
||||
=== tests/cases/conformance/emitter/es2018/asyncGenerators/O5.ts ===
|
||||
const o5 = {
|
||||
>o5 : { f(): AsyncIterableIterator<number>; }
|
||||
>{ async * f() { const x = yield* (async function*() { yield 1; })(); }} : { f(): AsyncIterableIterator<number>; }
|
||||
@ -67,7 +67,7 @@ const o5 = {
|
||||
>1 : 1
|
||||
}
|
||||
}
|
||||
=== tests/cases/conformance/emitter/esnext/asyncGenerators/O6.ts ===
|
||||
=== tests/cases/conformance/emitter/es2018/asyncGenerators/O6.ts ===
|
||||
const o6 = {
|
||||
>o6 : { f(): AsyncIterableIterator<any>; }
|
||||
>{ async * f() { const x = await 1; }} : { f(): AsyncIterableIterator<any>; }
|
||||
@ -81,7 +81,7 @@ const o6 = {
|
||||
>1 : 1
|
||||
}
|
||||
}
|
||||
=== tests/cases/conformance/emitter/esnext/asyncGenerators/O7.ts ===
|
||||
=== tests/cases/conformance/emitter/es2018/asyncGenerators/O7.ts ===
|
||||
const o7 = {
|
||||
>o7 : { f(): AsyncIterableIterator<number>; }
|
||||
>{ async * f() { return 1; }} : { f(): AsyncIterableIterator<number>; }
|
||||
@ -1,4 +1,4 @@
|
||||
//// [tests/cases/conformance/emitter/esnext/forAwait/emitter.forAwait.esnext.ts] ////
|
||||
//// [tests/cases/conformance/emitter/es2018/forAwait/emitter.forAwait.es2018.ts] ////
|
||||
|
||||
//// [file1.ts]
|
||||
async function f1() {
|
||||
@ -39,7 +39,8 @@ async function* f6() {
|
||||
outer: for await (const x of y) {
|
||||
continue outer;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//// [file1.js]
|
||||
async function f1() {
|
||||
@ -1,4 +1,4 @@
|
||||
=== tests/cases/conformance/emitter/esnext/forAwait/file1.ts ===
|
||||
=== tests/cases/conformance/emitter/es2018/forAwait/file1.ts ===
|
||||
async function f1() {
|
||||
>f1 : Symbol(f1, Decl(file1.ts, 0, 0))
|
||||
|
||||
@ -10,7 +10,7 @@ async function f1() {
|
||||
>y : Symbol(y, Decl(file1.ts, 1, 7))
|
||||
}
|
||||
}
|
||||
=== tests/cases/conformance/emitter/esnext/forAwait/file2.ts ===
|
||||
=== tests/cases/conformance/emitter/es2018/forAwait/file2.ts ===
|
||||
async function f2() {
|
||||
>f2 : Symbol(f2, Decl(file2.ts, 0, 0))
|
||||
|
||||
@ -23,7 +23,7 @@ async function f2() {
|
||||
>y : Symbol(y, Decl(file2.ts, 1, 15))
|
||||
}
|
||||
}
|
||||
=== tests/cases/conformance/emitter/esnext/forAwait/file3.ts ===
|
||||
=== tests/cases/conformance/emitter/es2018/forAwait/file3.ts ===
|
||||
async function* f3() {
|
||||
>f3 : Symbol(f3, Decl(file3.ts, 0, 0))
|
||||
|
||||
@ -35,7 +35,7 @@ async function* f3() {
|
||||
>y : Symbol(y, Decl(file3.ts, 1, 7))
|
||||
}
|
||||
}
|
||||
=== tests/cases/conformance/emitter/esnext/forAwait/file4.ts ===
|
||||
=== tests/cases/conformance/emitter/es2018/forAwait/file4.ts ===
|
||||
async function* f4() {
|
||||
>f4 : Symbol(f4, Decl(file4.ts, 0, 0))
|
||||
|
||||
@ -48,7 +48,7 @@ async function* f4() {
|
||||
>y : Symbol(y, Decl(file4.ts, 1, 15))
|
||||
}
|
||||
}
|
||||
=== tests/cases/conformance/emitter/esnext/forAwait/file5.ts ===
|
||||
=== tests/cases/conformance/emitter/es2018/forAwait/file5.ts ===
|
||||
// https://github.com/Microsoft/TypeScript/issues/21363
|
||||
async function f5() {
|
||||
>f5 : Symbol(f5, Decl(file5.ts, 0, 0))
|
||||
@ -63,7 +63,7 @@ async function f5() {
|
||||
continue outer;
|
||||
}
|
||||
}
|
||||
=== tests/cases/conformance/emitter/esnext/forAwait/file6.ts ===
|
||||
=== tests/cases/conformance/emitter/es2018/forAwait/file6.ts ===
|
||||
// https://github.com/Microsoft/TypeScript/issues/21363
|
||||
async function* f6() {
|
||||
>f6 : Symbol(f6, Decl(file6.ts, 0, 0))
|
||||
@ -78,3 +78,4 @@ async function* f6() {
|
||||
continue outer;
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
=== tests/cases/conformance/emitter/esnext/forAwait/file1.ts ===
|
||||
=== tests/cases/conformance/emitter/es2018/forAwait/file1.ts ===
|
||||
async function f1() {
|
||||
>f1 : () => Promise<void>
|
||||
|
||||
@ -10,7 +10,7 @@ async function f1() {
|
||||
>y : any
|
||||
}
|
||||
}
|
||||
=== tests/cases/conformance/emitter/esnext/forAwait/file2.ts ===
|
||||
=== tests/cases/conformance/emitter/es2018/forAwait/file2.ts ===
|
||||
async function f2() {
|
||||
>f2 : () => Promise<void>
|
||||
|
||||
@ -23,7 +23,7 @@ async function f2() {
|
||||
>y : any
|
||||
}
|
||||
}
|
||||
=== tests/cases/conformance/emitter/esnext/forAwait/file3.ts ===
|
||||
=== tests/cases/conformance/emitter/es2018/forAwait/file3.ts ===
|
||||
async function* f3() {
|
||||
>f3 : () => AsyncIterableIterator<any>
|
||||
|
||||
@ -35,7 +35,7 @@ async function* f3() {
|
||||
>y : any
|
||||
}
|
||||
}
|
||||
=== tests/cases/conformance/emitter/esnext/forAwait/file4.ts ===
|
||||
=== tests/cases/conformance/emitter/es2018/forAwait/file4.ts ===
|
||||
async function* f4() {
|
||||
>f4 : () => AsyncIterableIterator<any>
|
||||
|
||||
@ -48,7 +48,7 @@ async function* f4() {
|
||||
>y : any
|
||||
}
|
||||
}
|
||||
=== tests/cases/conformance/emitter/esnext/forAwait/file5.ts ===
|
||||
=== tests/cases/conformance/emitter/es2018/forAwait/file5.ts ===
|
||||
// https://github.com/Microsoft/TypeScript/issues/21363
|
||||
async function f5() {
|
||||
>f5 : () => Promise<void>
|
||||
@ -65,7 +65,7 @@ async function f5() {
|
||||
>outer : any
|
||||
}
|
||||
}
|
||||
=== tests/cases/conformance/emitter/esnext/forAwait/file6.ts ===
|
||||
=== tests/cases/conformance/emitter/es2018/forAwait/file6.ts ===
|
||||
// https://github.com/Microsoft/TypeScript/issues/21363
|
||||
async function* f6() {
|
||||
>f6 : () => AsyncIterableIterator<any>
|
||||
@ -82,3 +82,4 @@ async function* f6() {
|
||||
>outer : any
|
||||
}
|
||||
}
|
||||
|
||||
@ -2,7 +2,8 @@
|
||||
async function f<T>(source: Iterable<T> | AsyncIterable<T>) {
|
||||
for await (const x of source) {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//// [forAwaitForUnion.js]
|
||||
async function f(source) {
|
||||
|
||||
@ -13,3 +13,4 @@ async function f<T>(source: Iterable<T> | AsyncIterable<T>) {
|
||||
>source : Symbol(source, Decl(forAwaitForUnion.ts, 0, 20))
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -8,3 +8,4 @@ async function f<T>(source: Iterable<T> | AsyncIterable<T>) {
|
||||
>source : Iterable<T> | AsyncIterable<T>
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -1,50 +1,50 @@
|
||||
tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/asyncGeneratorGetAccessorIsError.ts(2,17): error TS1005: '(' expected.
|
||||
tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/asyncGeneratorPropertyIsError.ts(2,15): error TS1005: '(' expected.
|
||||
tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/asyncGeneratorSetAccessorIsError.ts(2,17): error TS1005: '(' expected.
|
||||
tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/awaitInParameterInitializerIsError.ts(2,19): error TS2524: 'await' expressions cannot be used in a parameter initializer.
|
||||
tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/awaitMissingValueIsError.ts(3,14): error TS1109: Expression expected.
|
||||
tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/awaitParameterIsError.ts(2,15): error TS1138: Parameter declaration expected.
|
||||
tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/awaitParameterIsError.ts(2,15): error TS2693: 'await' only refers to a type, but is being used as a value here.
|
||||
tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/awaitParameterIsError.ts(2,20): error TS1005: ';' expected.
|
||||
tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/awaitParameterIsError.ts(4,1): error TS1128: Declaration or statement expected.
|
||||
tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/nestedFunctionDeclarationNamedAwaitIsError.ts(3,18): error TS1003: Identifier expected.
|
||||
tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/nestedFunctionDeclarationNamedAwaitIsError.ts(3,24): error TS1109: Expression expected.
|
||||
tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/nestedFunctionDeclarationNamedAwaitIsError.ts(3,26): error TS1005: ';' expected.
|
||||
tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/nestedFunctionDeclarationNamedYieldIsError.ts(3,18): error TS1003: Identifier expected.
|
||||
tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/nestedFunctionDeclarationNamedYieldIsError.ts(3,26): error TS1005: '=>' expected.
|
||||
tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/nestedFunctionExpressionNamedAwaitIsError.ts(3,28): error TS1005: '(' expected.
|
||||
tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/nestedFunctionExpressionNamedAwaitIsError.ts(3,34): error TS1109: Expression expected.
|
||||
tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/nestedFunctionExpressionNamedAwaitIsError.ts(3,36): error TS1005: ';' expected.
|
||||
tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/nestedFunctionExpressionNamedYieldIsError.ts(3,28): error TS1005: '(' expected.
|
||||
tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/nestedFunctionExpressionNamedYieldIsError.ts(3,36): error TS1005: '=>' expected.
|
||||
tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/yieldAsTypeIsStrictError.ts(4,16): error TS1213: Identifier expected. 'yield' is a reserved word in strict mode. Class definitions are automatically in strict mode.
|
||||
tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/yieldInClassComputedPropertyIsError.ts(2,14): error TS1213: Identifier expected. 'yield' is a reserved word in strict mode. Class definitions are automatically in strict mode.
|
||||
tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/yieldInClassComputedPropertyIsError.ts(2,14): error TS2693: 'yield' only refers to a type, but is being used as a value here.
|
||||
tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/yieldInParameterInitializerIsError.ts(2,19): error TS1163: A 'yield' expression is only allowed in a generator body.
|
||||
tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/yieldInParameterInitializerIsError.ts(2,19): error TS2523: 'yield' expressions cannot be used in a parameter initializer.
|
||||
tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/yieldParameterIsError.ts(2,15): error TS1138: Parameter declaration expected.
|
||||
tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/yieldParameterIsError.ts(2,15): error TS2693: 'yield' only refers to a type, but is being used as a value here.
|
||||
tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/yieldParameterIsError.ts(2,20): error TS1005: ';' expected.
|
||||
tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/yieldParameterIsError.ts(4,1): error TS1128: Declaration or statement expected.
|
||||
tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/yieldStarMissingValueIsError.ts(3,16): error TS1109: Expression expected.
|
||||
tests/cases/conformance/parser/ecmascript2018/asyncGenerators/asyncGeneratorGetAccessorIsError.ts(2,17): error TS1005: '(' expected.
|
||||
tests/cases/conformance/parser/ecmascript2018/asyncGenerators/asyncGeneratorPropertyIsError.ts(2,15): error TS1005: '(' expected.
|
||||
tests/cases/conformance/parser/ecmascript2018/asyncGenerators/asyncGeneratorSetAccessorIsError.ts(2,17): error TS1005: '(' expected.
|
||||
tests/cases/conformance/parser/ecmascript2018/asyncGenerators/awaitInParameterInitializerIsError.ts(2,19): error TS2524: 'await' expressions cannot be used in a parameter initializer.
|
||||
tests/cases/conformance/parser/ecmascript2018/asyncGenerators/awaitMissingValueIsError.ts(3,14): error TS1109: Expression expected.
|
||||
tests/cases/conformance/parser/ecmascript2018/asyncGenerators/awaitParameterIsError.ts(2,15): error TS1138: Parameter declaration expected.
|
||||
tests/cases/conformance/parser/ecmascript2018/asyncGenerators/awaitParameterIsError.ts(2,15): error TS2693: 'await' only refers to a type, but is being used as a value here.
|
||||
tests/cases/conformance/parser/ecmascript2018/asyncGenerators/awaitParameterIsError.ts(2,20): error TS1005: ';' expected.
|
||||
tests/cases/conformance/parser/ecmascript2018/asyncGenerators/awaitParameterIsError.ts(4,1): error TS1128: Declaration or statement expected.
|
||||
tests/cases/conformance/parser/ecmascript2018/asyncGenerators/nestedFunctionDeclarationNamedAwaitIsError.ts(3,18): error TS1003: Identifier expected.
|
||||
tests/cases/conformance/parser/ecmascript2018/asyncGenerators/nestedFunctionDeclarationNamedAwaitIsError.ts(3,24): error TS1109: Expression expected.
|
||||
tests/cases/conformance/parser/ecmascript2018/asyncGenerators/nestedFunctionDeclarationNamedAwaitIsError.ts(3,26): error TS1005: ';' expected.
|
||||
tests/cases/conformance/parser/ecmascript2018/asyncGenerators/nestedFunctionDeclarationNamedYieldIsError.ts(3,18): error TS1003: Identifier expected.
|
||||
tests/cases/conformance/parser/ecmascript2018/asyncGenerators/nestedFunctionDeclarationNamedYieldIsError.ts(3,26): error TS1005: '=>' expected.
|
||||
tests/cases/conformance/parser/ecmascript2018/asyncGenerators/nestedFunctionExpressionNamedAwaitIsError.ts(3,28): error TS1005: '(' expected.
|
||||
tests/cases/conformance/parser/ecmascript2018/asyncGenerators/nestedFunctionExpressionNamedAwaitIsError.ts(3,34): error TS1109: Expression expected.
|
||||
tests/cases/conformance/parser/ecmascript2018/asyncGenerators/nestedFunctionExpressionNamedAwaitIsError.ts(3,36): error TS1005: ';' expected.
|
||||
tests/cases/conformance/parser/ecmascript2018/asyncGenerators/nestedFunctionExpressionNamedYieldIsError.ts(3,28): error TS1005: '(' expected.
|
||||
tests/cases/conformance/parser/ecmascript2018/asyncGenerators/nestedFunctionExpressionNamedYieldIsError.ts(3,36): error TS1005: '=>' expected.
|
||||
tests/cases/conformance/parser/ecmascript2018/asyncGenerators/yieldAsTypeIsStrictError.ts(4,16): error TS1213: Identifier expected. 'yield' is a reserved word in strict mode. Class definitions are automatically in strict mode.
|
||||
tests/cases/conformance/parser/ecmascript2018/asyncGenerators/yieldInClassComputedPropertyIsError.ts(2,14): error TS1213: Identifier expected. 'yield' is a reserved word in strict mode. Class definitions are automatically in strict mode.
|
||||
tests/cases/conformance/parser/ecmascript2018/asyncGenerators/yieldInClassComputedPropertyIsError.ts(2,14): error TS2693: 'yield' only refers to a type, but is being used as a value here.
|
||||
tests/cases/conformance/parser/ecmascript2018/asyncGenerators/yieldInParameterInitializerIsError.ts(2,19): error TS1163: A 'yield' expression is only allowed in a generator body.
|
||||
tests/cases/conformance/parser/ecmascript2018/asyncGenerators/yieldInParameterInitializerIsError.ts(2,19): error TS2523: 'yield' expressions cannot be used in a parameter initializer.
|
||||
tests/cases/conformance/parser/ecmascript2018/asyncGenerators/yieldParameterIsError.ts(2,15): error TS1138: Parameter declaration expected.
|
||||
tests/cases/conformance/parser/ecmascript2018/asyncGenerators/yieldParameterIsError.ts(2,15): error TS2693: 'yield' only refers to a type, but is being used as a value here.
|
||||
tests/cases/conformance/parser/ecmascript2018/asyncGenerators/yieldParameterIsError.ts(2,20): error TS1005: ';' expected.
|
||||
tests/cases/conformance/parser/ecmascript2018/asyncGenerators/yieldParameterIsError.ts(4,1): error TS1128: Declaration or statement expected.
|
||||
tests/cases/conformance/parser/ecmascript2018/asyncGenerators/yieldStarMissingValueIsError.ts(3,16): error TS1109: Expression expected.
|
||||
|
||||
|
||||
==== tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/methodIsOk.ts (0 errors) ====
|
||||
==== tests/cases/conformance/parser/ecmascript2018/asyncGenerators/methodIsOk.ts (0 errors) ====
|
||||
class C1 {
|
||||
async * f() {
|
||||
}
|
||||
}
|
||||
==== tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/awaitMethodNameIsOk.ts (0 errors) ====
|
||||
==== tests/cases/conformance/parser/ecmascript2018/asyncGenerators/awaitMethodNameIsOk.ts (0 errors) ====
|
||||
class C2 {
|
||||
async * await() {
|
||||
}
|
||||
}
|
||||
==== tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/yieldMethodNameIsOk.ts (0 errors) ====
|
||||
==== tests/cases/conformance/parser/ecmascript2018/asyncGenerators/yieldMethodNameIsOk.ts (0 errors) ====
|
||||
class C3 {
|
||||
async * yield() {
|
||||
}
|
||||
}
|
||||
==== tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/awaitParameterIsError.ts (4 errors) ====
|
||||
==== tests/cases/conformance/parser/ecmascript2018/asyncGenerators/awaitParameterIsError.ts (4 errors) ====
|
||||
class C4 {
|
||||
async * f(await) {
|
||||
~~~~~
|
||||
@ -57,7 +57,7 @@ tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/yieldStarMissingVa
|
||||
}
|
||||
~
|
||||
!!! error TS1128: Declaration or statement expected.
|
||||
==== tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/yieldParameterIsError.ts (4 errors) ====
|
||||
==== tests/cases/conformance/parser/ecmascript2018/asyncGenerators/yieldParameterIsError.ts (4 errors) ====
|
||||
class C5 {
|
||||
async * f(yield) {
|
||||
~~~~~
|
||||
@ -70,14 +70,14 @@ tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/yieldStarMissingVa
|
||||
}
|
||||
~
|
||||
!!! error TS1128: Declaration or statement expected.
|
||||
==== tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/awaitInParameterInitializerIsError.ts (1 errors) ====
|
||||
==== tests/cases/conformance/parser/ecmascript2018/asyncGenerators/awaitInParameterInitializerIsError.ts (1 errors) ====
|
||||
class C6 {
|
||||
async * f(a = await 1) {
|
||||
~~~~~~~
|
||||
!!! error TS2524: 'await' expressions cannot be used in a parameter initializer.
|
||||
}
|
||||
}
|
||||
==== tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/yieldInParameterInitializerIsError.ts (2 errors) ====
|
||||
==== tests/cases/conformance/parser/ecmascript2018/asyncGenerators/yieldInParameterInitializerIsError.ts (2 errors) ====
|
||||
class C7 {
|
||||
async * f(a = yield) {
|
||||
~~~~~
|
||||
@ -86,14 +86,14 @@ tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/yieldStarMissingVa
|
||||
!!! error TS2523: 'yield' expressions cannot be used in a parameter initializer.
|
||||
}
|
||||
}
|
||||
==== tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/nestedAsyncGeneratorIsOk.ts (0 errors) ====
|
||||
==== tests/cases/conformance/parser/ecmascript2018/asyncGenerators/nestedAsyncGeneratorIsOk.ts (0 errors) ====
|
||||
class C8 {
|
||||
async * f() {
|
||||
async function * g() {
|
||||
}
|
||||
}
|
||||
}
|
||||
==== tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/nestedFunctionDeclarationNamedYieldIsError.ts (2 errors) ====
|
||||
==== tests/cases/conformance/parser/ecmascript2018/asyncGenerators/nestedFunctionDeclarationNamedYieldIsError.ts (2 errors) ====
|
||||
class C9 {
|
||||
async * f() {
|
||||
function yield() {
|
||||
@ -104,7 +104,7 @@ tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/yieldStarMissingVa
|
||||
}
|
||||
}
|
||||
}
|
||||
==== tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/nestedFunctionExpressionNamedYieldIsError.ts (2 errors) ====
|
||||
==== tests/cases/conformance/parser/ecmascript2018/asyncGenerators/nestedFunctionExpressionNamedYieldIsError.ts (2 errors) ====
|
||||
class C10 {
|
||||
async * f() {
|
||||
const x = function yield() {
|
||||
@ -115,7 +115,7 @@ tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/yieldStarMissingVa
|
||||
};
|
||||
}
|
||||
}
|
||||
==== tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/nestedFunctionDeclarationNamedAwaitIsError.ts (3 errors) ====
|
||||
==== tests/cases/conformance/parser/ecmascript2018/asyncGenerators/nestedFunctionDeclarationNamedAwaitIsError.ts (3 errors) ====
|
||||
class C11 {
|
||||
async * f() {
|
||||
function await() {
|
||||
@ -128,7 +128,7 @@ tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/yieldStarMissingVa
|
||||
}
|
||||
}
|
||||
}
|
||||
==== tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/nestedFunctionExpressionNamedAwaitIsError.ts (3 errors) ====
|
||||
==== tests/cases/conformance/parser/ecmascript2018/asyncGenerators/nestedFunctionExpressionNamedAwaitIsError.ts (3 errors) ====
|
||||
class C12 {
|
||||
async * f() {
|
||||
const x = function await() {
|
||||
@ -141,19 +141,19 @@ tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/yieldStarMissingVa
|
||||
};
|
||||
}
|
||||
}
|
||||
==== tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/yieldIsOk.ts (0 errors) ====
|
||||
==== tests/cases/conformance/parser/ecmascript2018/asyncGenerators/yieldIsOk.ts (0 errors) ====
|
||||
class C13 {
|
||||
async * f() {
|
||||
yield;
|
||||
}
|
||||
}
|
||||
==== tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/yieldWithValueIsOk.ts (0 errors) ====
|
||||
==== tests/cases/conformance/parser/ecmascript2018/asyncGenerators/yieldWithValueIsOk.ts (0 errors) ====
|
||||
class C14 {
|
||||
async * f() {
|
||||
yield 1;
|
||||
}
|
||||
}
|
||||
==== tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/yieldStarMissingValueIsError.ts (1 errors) ====
|
||||
==== tests/cases/conformance/parser/ecmascript2018/asyncGenerators/yieldStarMissingValueIsError.ts (1 errors) ====
|
||||
class C15 {
|
||||
async * f() {
|
||||
yield *;
|
||||
@ -161,19 +161,19 @@ tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/yieldStarMissingVa
|
||||
!!! error TS1109: Expression expected.
|
||||
}
|
||||
}
|
||||
==== tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/yieldStarWithValueIsOk.ts (0 errors) ====
|
||||
==== tests/cases/conformance/parser/ecmascript2018/asyncGenerators/yieldStarWithValueIsOk.ts (0 errors) ====
|
||||
class C16 {
|
||||
async * f() {
|
||||
yield * [];
|
||||
}
|
||||
}
|
||||
==== tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/awaitWithValueIsOk.ts (0 errors) ====
|
||||
==== tests/cases/conformance/parser/ecmascript2018/asyncGenerators/awaitWithValueIsOk.ts (0 errors) ====
|
||||
class C17 {
|
||||
async * f() {
|
||||
await 1;
|
||||
}
|
||||
}
|
||||
==== tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/awaitMissingValueIsError.ts (1 errors) ====
|
||||
==== tests/cases/conformance/parser/ecmascript2018/asyncGenerators/awaitMissingValueIsError.ts (1 errors) ====
|
||||
class C18 {
|
||||
async * f() {
|
||||
await;
|
||||
@ -181,14 +181,14 @@ tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/yieldStarMissingVa
|
||||
!!! error TS1109: Expression expected.
|
||||
}
|
||||
}
|
||||
==== tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/awaitAsTypeIsOk.ts (0 errors) ====
|
||||
==== tests/cases/conformance/parser/ecmascript2018/asyncGenerators/awaitAsTypeIsOk.ts (0 errors) ====
|
||||
interface await {}
|
||||
class C19 {
|
||||
async * f() {
|
||||
let x: await;
|
||||
}
|
||||
}
|
||||
==== tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/yieldAsTypeIsStrictError.ts (1 errors) ====
|
||||
==== tests/cases/conformance/parser/ecmascript2018/asyncGenerators/yieldAsTypeIsStrictError.ts (1 errors) ====
|
||||
interface yield {}
|
||||
class C20 {
|
||||
async * f() {
|
||||
@ -197,7 +197,7 @@ tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/yieldStarMissingVa
|
||||
!!! error TS1213: Identifier expected. 'yield' is a reserved word in strict mode. Class definitions are automatically in strict mode.
|
||||
}
|
||||
}
|
||||
==== tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/yieldInClassComputedPropertyIsError.ts (2 errors) ====
|
||||
==== tests/cases/conformance/parser/ecmascript2018/asyncGenerators/yieldInClassComputedPropertyIsError.ts (2 errors) ====
|
||||
class C21 {
|
||||
async * [yield]() {
|
||||
~~~~~
|
||||
@ -206,13 +206,13 @@ tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/yieldStarMissingVa
|
||||
!!! error TS2693: 'yield' only refers to a type, but is being used as a value here.
|
||||
}
|
||||
}
|
||||
==== tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/yieldInNestedComputedPropertyIsOk.ts (0 errors) ====
|
||||
==== tests/cases/conformance/parser/ecmascript2018/asyncGenerators/yieldInNestedComputedPropertyIsOk.ts (0 errors) ====
|
||||
class C22 {
|
||||
async * f() {
|
||||
const x = { [yield]: 1 };
|
||||
}
|
||||
}
|
||||
==== tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/asyncGeneratorGetAccessorIsError.ts (1 errors) ====
|
||||
==== tests/cases/conformance/parser/ecmascript2018/asyncGenerators/asyncGeneratorGetAccessorIsError.ts (1 errors) ====
|
||||
class C23 {
|
||||
async * get x() {
|
||||
~
|
||||
@ -220,16 +220,17 @@ tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/yieldStarMissingVa
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
==== tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/asyncGeneratorSetAccessorIsError.ts (1 errors) ====
|
||||
==== tests/cases/conformance/parser/ecmascript2018/asyncGenerators/asyncGeneratorSetAccessorIsError.ts (1 errors) ====
|
||||
class C24 {
|
||||
async * set x(value: number) {
|
||||
~
|
||||
!!! error TS1005: '(' expected.
|
||||
}
|
||||
}
|
||||
==== tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/asyncGeneratorPropertyIsError.ts (1 errors) ====
|
||||
==== tests/cases/conformance/parser/ecmascript2018/asyncGenerators/asyncGeneratorPropertyIsError.ts (1 errors) ====
|
||||
class C25 {
|
||||
async * x = 1;
|
||||
~
|
||||
!!! error TS1005: '(' expected.
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
=== tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/methodIsOk.ts ===
|
||||
=== tests/cases/conformance/parser/ecmascript2018/asyncGenerators/methodIsOk.ts ===
|
||||
class C1 {
|
||||
>C1 : Symbol(C1, Decl(methodIsOk.ts, 0, 0))
|
||||
|
||||
@ -6,7 +6,7 @@ class C1 {
|
||||
>f : Symbol(C1.f, Decl(methodIsOk.ts, 0, 10))
|
||||
}
|
||||
}
|
||||
=== tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/awaitMethodNameIsOk.ts ===
|
||||
=== tests/cases/conformance/parser/ecmascript2018/asyncGenerators/awaitMethodNameIsOk.ts ===
|
||||
class C2 {
|
||||
>C2 : Symbol(C2, Decl(awaitMethodNameIsOk.ts, 0, 0))
|
||||
|
||||
@ -14,7 +14,7 @@ class C2 {
|
||||
>await : Symbol(C2.await, Decl(awaitMethodNameIsOk.ts, 0, 10))
|
||||
}
|
||||
}
|
||||
=== tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/yieldMethodNameIsOk.ts ===
|
||||
=== tests/cases/conformance/parser/ecmascript2018/asyncGenerators/yieldMethodNameIsOk.ts ===
|
||||
class C3 {
|
||||
>C3 : Symbol(C3, Decl(yieldMethodNameIsOk.ts, 0, 0))
|
||||
|
||||
@ -22,7 +22,7 @@ class C3 {
|
||||
>yield : Symbol(C3.yield, Decl(yieldMethodNameIsOk.ts, 0, 10))
|
||||
}
|
||||
}
|
||||
=== tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/awaitParameterIsError.ts ===
|
||||
=== tests/cases/conformance/parser/ecmascript2018/asyncGenerators/awaitParameterIsError.ts ===
|
||||
class C4 {
|
||||
>C4 : Symbol(C4, Decl(awaitParameterIsError.ts, 0, 0))
|
||||
|
||||
@ -30,7 +30,7 @@ class C4 {
|
||||
>f : Symbol(C4.f, Decl(awaitParameterIsError.ts, 0, 10))
|
||||
}
|
||||
}
|
||||
=== tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/yieldParameterIsError.ts ===
|
||||
=== tests/cases/conformance/parser/ecmascript2018/asyncGenerators/yieldParameterIsError.ts ===
|
||||
class C5 {
|
||||
>C5 : Symbol(C5, Decl(yieldParameterIsError.ts, 0, 0))
|
||||
|
||||
@ -38,7 +38,7 @@ class C5 {
|
||||
>f : Symbol(C5.f, Decl(yieldParameterIsError.ts, 0, 10))
|
||||
}
|
||||
}
|
||||
=== tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/awaitInParameterInitializerIsError.ts ===
|
||||
=== tests/cases/conformance/parser/ecmascript2018/asyncGenerators/awaitInParameterInitializerIsError.ts ===
|
||||
class C6 {
|
||||
>C6 : Symbol(C6, Decl(awaitInParameterInitializerIsError.ts, 0, 0))
|
||||
|
||||
@ -47,7 +47,7 @@ class C6 {
|
||||
>a : Symbol(a, Decl(awaitInParameterInitializerIsError.ts, 1, 14))
|
||||
}
|
||||
}
|
||||
=== tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/yieldInParameterInitializerIsError.ts ===
|
||||
=== tests/cases/conformance/parser/ecmascript2018/asyncGenerators/yieldInParameterInitializerIsError.ts ===
|
||||
class C7 {
|
||||
>C7 : Symbol(C7, Decl(yieldInParameterInitializerIsError.ts, 0, 0))
|
||||
|
||||
@ -56,7 +56,7 @@ class C7 {
|
||||
>a : Symbol(a, Decl(yieldInParameterInitializerIsError.ts, 1, 14))
|
||||
}
|
||||
}
|
||||
=== tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/nestedAsyncGeneratorIsOk.ts ===
|
||||
=== tests/cases/conformance/parser/ecmascript2018/asyncGenerators/nestedAsyncGeneratorIsOk.ts ===
|
||||
class C8 {
|
||||
>C8 : Symbol(C8, Decl(nestedAsyncGeneratorIsOk.ts, 0, 0))
|
||||
|
||||
@ -68,7 +68,7 @@ class C8 {
|
||||
}
|
||||
}
|
||||
}
|
||||
=== tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/nestedFunctionDeclarationNamedYieldIsError.ts ===
|
||||
=== tests/cases/conformance/parser/ecmascript2018/asyncGenerators/nestedFunctionDeclarationNamedYieldIsError.ts ===
|
||||
class C9 {
|
||||
>C9 : Symbol(C9, Decl(nestedFunctionDeclarationNamedYieldIsError.ts, 0, 0))
|
||||
|
||||
@ -80,7 +80,7 @@ class C9 {
|
||||
}
|
||||
}
|
||||
}
|
||||
=== tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/nestedFunctionExpressionNamedYieldIsError.ts ===
|
||||
=== tests/cases/conformance/parser/ecmascript2018/asyncGenerators/nestedFunctionExpressionNamedYieldIsError.ts ===
|
||||
class C10 {
|
||||
>C10 : Symbol(C10, Decl(nestedFunctionExpressionNamedYieldIsError.ts, 0, 0))
|
||||
|
||||
@ -93,7 +93,7 @@ class C10 {
|
||||
};
|
||||
}
|
||||
}
|
||||
=== tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/nestedFunctionDeclarationNamedAwaitIsError.ts ===
|
||||
=== tests/cases/conformance/parser/ecmascript2018/asyncGenerators/nestedFunctionDeclarationNamedAwaitIsError.ts ===
|
||||
class C11 {
|
||||
>C11 : Symbol(C11, Decl(nestedFunctionDeclarationNamedAwaitIsError.ts, 0, 0))
|
||||
|
||||
@ -105,7 +105,7 @@ class C11 {
|
||||
}
|
||||
}
|
||||
}
|
||||
=== tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/nestedFunctionExpressionNamedAwaitIsError.ts ===
|
||||
=== tests/cases/conformance/parser/ecmascript2018/asyncGenerators/nestedFunctionExpressionNamedAwaitIsError.ts ===
|
||||
class C12 {
|
||||
>C12 : Symbol(C12, Decl(nestedFunctionExpressionNamedAwaitIsError.ts, 0, 0))
|
||||
|
||||
@ -118,7 +118,7 @@ class C12 {
|
||||
};
|
||||
}
|
||||
}
|
||||
=== tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/yieldIsOk.ts ===
|
||||
=== tests/cases/conformance/parser/ecmascript2018/asyncGenerators/yieldIsOk.ts ===
|
||||
class C13 {
|
||||
>C13 : Symbol(C13, Decl(yieldIsOk.ts, 0, 0))
|
||||
|
||||
@ -128,7 +128,7 @@ class C13 {
|
||||
yield;
|
||||
}
|
||||
}
|
||||
=== tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/yieldWithValueIsOk.ts ===
|
||||
=== tests/cases/conformance/parser/ecmascript2018/asyncGenerators/yieldWithValueIsOk.ts ===
|
||||
class C14 {
|
||||
>C14 : Symbol(C14, Decl(yieldWithValueIsOk.ts, 0, 0))
|
||||
|
||||
@ -138,7 +138,7 @@ class C14 {
|
||||
yield 1;
|
||||
}
|
||||
}
|
||||
=== tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/yieldStarMissingValueIsError.ts ===
|
||||
=== tests/cases/conformance/parser/ecmascript2018/asyncGenerators/yieldStarMissingValueIsError.ts ===
|
||||
class C15 {
|
||||
>C15 : Symbol(C15, Decl(yieldStarMissingValueIsError.ts, 0, 0))
|
||||
|
||||
@ -148,7 +148,7 @@ class C15 {
|
||||
yield *;
|
||||
}
|
||||
}
|
||||
=== tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/yieldStarWithValueIsOk.ts ===
|
||||
=== tests/cases/conformance/parser/ecmascript2018/asyncGenerators/yieldStarWithValueIsOk.ts ===
|
||||
class C16 {
|
||||
>C16 : Symbol(C16, Decl(yieldStarWithValueIsOk.ts, 0, 0))
|
||||
|
||||
@ -158,7 +158,7 @@ class C16 {
|
||||
yield * [];
|
||||
}
|
||||
}
|
||||
=== tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/awaitWithValueIsOk.ts ===
|
||||
=== tests/cases/conformance/parser/ecmascript2018/asyncGenerators/awaitWithValueIsOk.ts ===
|
||||
class C17 {
|
||||
>C17 : Symbol(C17, Decl(awaitWithValueIsOk.ts, 0, 0))
|
||||
|
||||
@ -168,7 +168,7 @@ class C17 {
|
||||
await 1;
|
||||
}
|
||||
}
|
||||
=== tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/awaitMissingValueIsError.ts ===
|
||||
=== tests/cases/conformance/parser/ecmascript2018/asyncGenerators/awaitMissingValueIsError.ts ===
|
||||
class C18 {
|
||||
>C18 : Symbol(C18, Decl(awaitMissingValueIsError.ts, 0, 0))
|
||||
|
||||
@ -178,7 +178,7 @@ class C18 {
|
||||
await;
|
||||
}
|
||||
}
|
||||
=== tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/awaitAsTypeIsOk.ts ===
|
||||
=== tests/cases/conformance/parser/ecmascript2018/asyncGenerators/awaitAsTypeIsOk.ts ===
|
||||
interface await {}
|
||||
>await : Symbol(await, Decl(awaitAsTypeIsOk.ts, 0, 0))
|
||||
|
||||
@ -193,7 +193,7 @@ class C19 {
|
||||
>await : Symbol(await, Decl(awaitAsTypeIsOk.ts, 0, 0))
|
||||
}
|
||||
}
|
||||
=== tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/yieldAsTypeIsStrictError.ts ===
|
||||
=== tests/cases/conformance/parser/ecmascript2018/asyncGenerators/yieldAsTypeIsStrictError.ts ===
|
||||
interface yield {}
|
||||
>yield : Symbol(yield, Decl(yieldAsTypeIsStrictError.ts, 0, 0))
|
||||
|
||||
@ -208,7 +208,7 @@ class C20 {
|
||||
>yield : Symbol(yield, Decl(yieldAsTypeIsStrictError.ts, 0, 0))
|
||||
}
|
||||
}
|
||||
=== tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/yieldInClassComputedPropertyIsError.ts ===
|
||||
=== tests/cases/conformance/parser/ecmascript2018/asyncGenerators/yieldInClassComputedPropertyIsError.ts ===
|
||||
class C21 {
|
||||
>C21 : Symbol(C21, Decl(yieldInClassComputedPropertyIsError.ts, 0, 0))
|
||||
|
||||
@ -216,7 +216,7 @@ class C21 {
|
||||
>[yield] : Symbol(C21[yield], Decl(yieldInClassComputedPropertyIsError.ts, 0, 11))
|
||||
}
|
||||
}
|
||||
=== tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/yieldInNestedComputedPropertyIsOk.ts ===
|
||||
=== tests/cases/conformance/parser/ecmascript2018/asyncGenerators/yieldInNestedComputedPropertyIsOk.ts ===
|
||||
class C22 {
|
||||
>C22 : Symbol(C22, Decl(yieldInNestedComputedPropertyIsOk.ts, 0, 0))
|
||||
|
||||
@ -228,7 +228,7 @@ class C22 {
|
||||
>[yield] : Symbol([yield], Decl(yieldInNestedComputedPropertyIsOk.ts, 2, 19))
|
||||
}
|
||||
}
|
||||
=== tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/asyncGeneratorGetAccessorIsError.ts ===
|
||||
=== tests/cases/conformance/parser/ecmascript2018/asyncGenerators/asyncGeneratorGetAccessorIsError.ts ===
|
||||
class C23 {
|
||||
>C23 : Symbol(C23, Decl(asyncGeneratorGetAccessorIsError.ts, 0, 0))
|
||||
|
||||
@ -239,7 +239,7 @@ class C23 {
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
=== tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/asyncGeneratorSetAccessorIsError.ts ===
|
||||
=== tests/cases/conformance/parser/ecmascript2018/asyncGenerators/asyncGeneratorSetAccessorIsError.ts ===
|
||||
class C24 {
|
||||
>C24 : Symbol(C24, Decl(asyncGeneratorSetAccessorIsError.ts, 0, 0))
|
||||
|
||||
@ -249,7 +249,7 @@ class C24 {
|
||||
>value : Symbol(value, Decl(asyncGeneratorSetAccessorIsError.ts, 1, 18))
|
||||
}
|
||||
}
|
||||
=== tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/asyncGeneratorPropertyIsError.ts ===
|
||||
=== tests/cases/conformance/parser/ecmascript2018/asyncGenerators/asyncGeneratorPropertyIsError.ts ===
|
||||
class C25 {
|
||||
>C25 : Symbol(C25, Decl(asyncGeneratorPropertyIsError.ts, 0, 0))
|
||||
|
||||
@ -257,3 +257,4 @@ class C25 {
|
||||
>x : Symbol(C25.x, Decl(asyncGeneratorPropertyIsError.ts, 0, 11))
|
||||
>1 : Symbol(C25[1], Decl(asyncGeneratorPropertyIsError.ts, 1, 15))
|
||||
}
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
=== tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/methodIsOk.ts ===
|
||||
=== tests/cases/conformance/parser/ecmascript2018/asyncGenerators/methodIsOk.ts ===
|
||||
class C1 {
|
||||
>C1 : C1
|
||||
|
||||
@ -6,7 +6,7 @@ class C1 {
|
||||
>f : () => AsyncIterableIterator<any>
|
||||
}
|
||||
}
|
||||
=== tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/awaitMethodNameIsOk.ts ===
|
||||
=== tests/cases/conformance/parser/ecmascript2018/asyncGenerators/awaitMethodNameIsOk.ts ===
|
||||
class C2 {
|
||||
>C2 : C2
|
||||
|
||||
@ -14,7 +14,7 @@ class C2 {
|
||||
>await : () => AsyncIterableIterator<any>
|
||||
}
|
||||
}
|
||||
=== tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/yieldMethodNameIsOk.ts ===
|
||||
=== tests/cases/conformance/parser/ecmascript2018/asyncGenerators/yieldMethodNameIsOk.ts ===
|
||||
class C3 {
|
||||
>C3 : C3
|
||||
|
||||
@ -22,7 +22,7 @@ class C3 {
|
||||
>yield : () => AsyncIterableIterator<any>
|
||||
}
|
||||
}
|
||||
=== tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/awaitParameterIsError.ts ===
|
||||
=== tests/cases/conformance/parser/ecmascript2018/asyncGenerators/awaitParameterIsError.ts ===
|
||||
class C4 {
|
||||
>C4 : C4
|
||||
|
||||
@ -31,7 +31,7 @@ class C4 {
|
||||
>await : any
|
||||
}
|
||||
}
|
||||
=== tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/yieldParameterIsError.ts ===
|
||||
=== tests/cases/conformance/parser/ecmascript2018/asyncGenerators/yieldParameterIsError.ts ===
|
||||
class C5 {
|
||||
>C5 : C5
|
||||
|
||||
@ -40,7 +40,7 @@ class C5 {
|
||||
>yield : any
|
||||
}
|
||||
}
|
||||
=== tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/awaitInParameterInitializerIsError.ts ===
|
||||
=== tests/cases/conformance/parser/ecmascript2018/asyncGenerators/awaitInParameterInitializerIsError.ts ===
|
||||
class C6 {
|
||||
>C6 : C6
|
||||
|
||||
@ -51,7 +51,7 @@ class C6 {
|
||||
>1 : 1
|
||||
}
|
||||
}
|
||||
=== tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/yieldInParameterInitializerIsError.ts ===
|
||||
=== tests/cases/conformance/parser/ecmascript2018/asyncGenerators/yieldInParameterInitializerIsError.ts ===
|
||||
class C7 {
|
||||
>C7 : C7
|
||||
|
||||
@ -61,7 +61,7 @@ class C7 {
|
||||
>yield : any
|
||||
}
|
||||
}
|
||||
=== tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/nestedAsyncGeneratorIsOk.ts ===
|
||||
=== tests/cases/conformance/parser/ecmascript2018/asyncGenerators/nestedAsyncGeneratorIsOk.ts ===
|
||||
class C8 {
|
||||
>C8 : C8
|
||||
|
||||
@ -73,7 +73,7 @@ class C8 {
|
||||
}
|
||||
}
|
||||
}
|
||||
=== tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/nestedFunctionDeclarationNamedYieldIsError.ts ===
|
||||
=== tests/cases/conformance/parser/ecmascript2018/asyncGenerators/nestedFunctionDeclarationNamedYieldIsError.ts ===
|
||||
class C9 {
|
||||
>C9 : C9
|
||||
|
||||
@ -87,7 +87,7 @@ class C9 {
|
||||
}
|
||||
}
|
||||
}
|
||||
=== tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/nestedFunctionExpressionNamedYieldIsError.ts ===
|
||||
=== tests/cases/conformance/parser/ecmascript2018/asyncGenerators/nestedFunctionExpressionNamedYieldIsError.ts ===
|
||||
class C10 {
|
||||
>C10 : C10
|
||||
|
||||
@ -103,7 +103,7 @@ class C10 {
|
||||
};
|
||||
}
|
||||
}
|
||||
=== tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/nestedFunctionDeclarationNamedAwaitIsError.ts ===
|
||||
=== tests/cases/conformance/parser/ecmascript2018/asyncGenerators/nestedFunctionDeclarationNamedAwaitIsError.ts ===
|
||||
class C11 {
|
||||
>C11 : C11
|
||||
|
||||
@ -118,7 +118,7 @@ class C11 {
|
||||
}
|
||||
}
|
||||
}
|
||||
=== tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/nestedFunctionExpressionNamedAwaitIsError.ts ===
|
||||
=== tests/cases/conformance/parser/ecmascript2018/asyncGenerators/nestedFunctionExpressionNamedAwaitIsError.ts ===
|
||||
class C12 {
|
||||
>C12 : C12
|
||||
|
||||
@ -135,7 +135,7 @@ class C12 {
|
||||
};
|
||||
}
|
||||
}
|
||||
=== tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/yieldIsOk.ts ===
|
||||
=== tests/cases/conformance/parser/ecmascript2018/asyncGenerators/yieldIsOk.ts ===
|
||||
class C13 {
|
||||
>C13 : C13
|
||||
|
||||
@ -146,7 +146,7 @@ class C13 {
|
||||
>yield : any
|
||||
}
|
||||
}
|
||||
=== tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/yieldWithValueIsOk.ts ===
|
||||
=== tests/cases/conformance/parser/ecmascript2018/asyncGenerators/yieldWithValueIsOk.ts ===
|
||||
class C14 {
|
||||
>C14 : C14
|
||||
|
||||
@ -158,7 +158,7 @@ class C14 {
|
||||
>1 : 1
|
||||
}
|
||||
}
|
||||
=== tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/yieldStarMissingValueIsError.ts ===
|
||||
=== tests/cases/conformance/parser/ecmascript2018/asyncGenerators/yieldStarMissingValueIsError.ts ===
|
||||
class C15 {
|
||||
>C15 : C15
|
||||
|
||||
@ -170,7 +170,7 @@ class C15 {
|
||||
> : any
|
||||
}
|
||||
}
|
||||
=== tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/yieldStarWithValueIsOk.ts ===
|
||||
=== tests/cases/conformance/parser/ecmascript2018/asyncGenerators/yieldStarWithValueIsOk.ts ===
|
||||
class C16 {
|
||||
>C16 : C16
|
||||
|
||||
@ -182,7 +182,7 @@ class C16 {
|
||||
>[] : undefined[]
|
||||
}
|
||||
}
|
||||
=== tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/awaitWithValueIsOk.ts ===
|
||||
=== tests/cases/conformance/parser/ecmascript2018/asyncGenerators/awaitWithValueIsOk.ts ===
|
||||
class C17 {
|
||||
>C17 : C17
|
||||
|
||||
@ -194,7 +194,7 @@ class C17 {
|
||||
>1 : 1
|
||||
}
|
||||
}
|
||||
=== tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/awaitMissingValueIsError.ts ===
|
||||
=== tests/cases/conformance/parser/ecmascript2018/asyncGenerators/awaitMissingValueIsError.ts ===
|
||||
class C18 {
|
||||
>C18 : C18
|
||||
|
||||
@ -206,7 +206,7 @@ class C18 {
|
||||
> : any
|
||||
}
|
||||
}
|
||||
=== tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/awaitAsTypeIsOk.ts ===
|
||||
=== tests/cases/conformance/parser/ecmascript2018/asyncGenerators/awaitAsTypeIsOk.ts ===
|
||||
interface await {}
|
||||
class C19 {
|
||||
>C19 : C19
|
||||
@ -218,7 +218,7 @@ class C19 {
|
||||
>x : await
|
||||
}
|
||||
}
|
||||
=== tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/yieldAsTypeIsStrictError.ts ===
|
||||
=== tests/cases/conformance/parser/ecmascript2018/asyncGenerators/yieldAsTypeIsStrictError.ts ===
|
||||
interface yield {}
|
||||
class C20 {
|
||||
>C20 : C20
|
||||
@ -230,7 +230,7 @@ class C20 {
|
||||
>x : yield
|
||||
}
|
||||
}
|
||||
=== tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/yieldInClassComputedPropertyIsError.ts ===
|
||||
=== tests/cases/conformance/parser/ecmascript2018/asyncGenerators/yieldInClassComputedPropertyIsError.ts ===
|
||||
class C21 {
|
||||
>C21 : C21
|
||||
|
||||
@ -239,7 +239,7 @@ class C21 {
|
||||
>yield : any
|
||||
}
|
||||
}
|
||||
=== tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/yieldInNestedComputedPropertyIsOk.ts ===
|
||||
=== tests/cases/conformance/parser/ecmascript2018/asyncGenerators/yieldInNestedComputedPropertyIsOk.ts ===
|
||||
class C22 {
|
||||
>C22 : C22
|
||||
|
||||
@ -254,7 +254,7 @@ class C22 {
|
||||
>1 : 1
|
||||
}
|
||||
}
|
||||
=== tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/asyncGeneratorGetAccessorIsError.ts ===
|
||||
=== tests/cases/conformance/parser/ecmascript2018/asyncGenerators/asyncGeneratorGetAccessorIsError.ts ===
|
||||
class C23 {
|
||||
>C23 : C23
|
||||
|
||||
@ -266,7 +266,7 @@ class C23 {
|
||||
>1 : 1
|
||||
}
|
||||
}
|
||||
=== tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/asyncGeneratorSetAccessorIsError.ts ===
|
||||
=== tests/cases/conformance/parser/ecmascript2018/asyncGenerators/asyncGeneratorSetAccessorIsError.ts ===
|
||||
class C24 {
|
||||
>C24 : C24
|
||||
|
||||
@ -276,7 +276,7 @@ class C24 {
|
||||
>value : number
|
||||
}
|
||||
}
|
||||
=== tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/asyncGeneratorPropertyIsError.ts ===
|
||||
=== tests/cases/conformance/parser/ecmascript2018/asyncGenerators/asyncGeneratorPropertyIsError.ts ===
|
||||
class C25 {
|
||||
>C25 : C25
|
||||
|
||||
@ -284,3 +284,4 @@ class C25 {
|
||||
>x : () => any
|
||||
>1 : any
|
||||
}
|
||||
|
||||
@ -1,61 +1,61 @@
|
||||
tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/awaitInParameterInitializerIsError.ts(1,25): error TS2524: 'await' expressions cannot be used in a parameter initializer.
|
||||
tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/awaitMissingValueIsError.ts(2,10): error TS1109: Expression expected.
|
||||
tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/awaitParameterIsError.ts(1,21): error TS1138: Parameter declaration expected.
|
||||
tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/awaitParameterIsError.ts(1,26): error TS1005: ';' expected.
|
||||
tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/nestedFunctionDeclarationNamedAwaitIsError.ts(2,14): error TS1003: Identifier expected.
|
||||
tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/nestedFunctionDeclarationNamedAwaitIsError.ts(2,20): error TS1109: Expression expected.
|
||||
tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/nestedFunctionDeclarationNamedAwaitIsError.ts(2,22): error TS1005: ';' expected.
|
||||
tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/nestedFunctionDeclarationNamedYieldIsError.ts(2,14): error TS1003: Identifier expected.
|
||||
tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/nestedFunctionDeclarationNamedYieldIsError.ts(2,22): error TS1005: '=>' expected.
|
||||
tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/nestedFunctionExpressionNamedAwaitIsError.ts(2,24): error TS1005: '(' expected.
|
||||
tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/nestedFunctionExpressionNamedAwaitIsError.ts(2,32): error TS1005: '=>' expected.
|
||||
tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/nestedFunctionExpressionNamedYieldIsError.ts(2,24): error TS1005: '(' expected.
|
||||
tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/nestedFunctionExpressionNamedYieldIsError.ts(2,32): error TS1005: '=>' expected.
|
||||
tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/yieldInParameterInitializerIsError.ts(1,25): error TS2523: 'yield' expressions cannot be used in a parameter initializer.
|
||||
tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/yieldParameterIsError.ts(1,21): error TS1138: Parameter declaration expected.
|
||||
tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/yieldParameterIsError.ts(1,26): error TS1005: ';' expected.
|
||||
tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/yieldStarMissingValueIsError.ts(2,12): error TS1109: Expression expected.
|
||||
tests/cases/conformance/parser/ecmascript2018/asyncGenerators/awaitInParameterInitializerIsError.ts(1,25): error TS2524: 'await' expressions cannot be used in a parameter initializer.
|
||||
tests/cases/conformance/parser/ecmascript2018/asyncGenerators/awaitMissingValueIsError.ts(2,10): error TS1109: Expression expected.
|
||||
tests/cases/conformance/parser/ecmascript2018/asyncGenerators/awaitParameterIsError.ts(1,21): error TS1138: Parameter declaration expected.
|
||||
tests/cases/conformance/parser/ecmascript2018/asyncGenerators/awaitParameterIsError.ts(1,26): error TS1005: ';' expected.
|
||||
tests/cases/conformance/parser/ecmascript2018/asyncGenerators/nestedFunctionDeclarationNamedAwaitIsError.ts(2,14): error TS1003: Identifier expected.
|
||||
tests/cases/conformance/parser/ecmascript2018/asyncGenerators/nestedFunctionDeclarationNamedAwaitIsError.ts(2,20): error TS1109: Expression expected.
|
||||
tests/cases/conformance/parser/ecmascript2018/asyncGenerators/nestedFunctionDeclarationNamedAwaitIsError.ts(2,22): error TS1005: ';' expected.
|
||||
tests/cases/conformance/parser/ecmascript2018/asyncGenerators/nestedFunctionDeclarationNamedYieldIsError.ts(2,14): error TS1003: Identifier expected.
|
||||
tests/cases/conformance/parser/ecmascript2018/asyncGenerators/nestedFunctionDeclarationNamedYieldIsError.ts(2,22): error TS1005: '=>' expected.
|
||||
tests/cases/conformance/parser/ecmascript2018/asyncGenerators/nestedFunctionExpressionNamedAwaitIsError.ts(2,24): error TS1005: '(' expected.
|
||||
tests/cases/conformance/parser/ecmascript2018/asyncGenerators/nestedFunctionExpressionNamedAwaitIsError.ts(2,32): error TS1005: '=>' expected.
|
||||
tests/cases/conformance/parser/ecmascript2018/asyncGenerators/nestedFunctionExpressionNamedYieldIsError.ts(2,24): error TS1005: '(' expected.
|
||||
tests/cases/conformance/parser/ecmascript2018/asyncGenerators/nestedFunctionExpressionNamedYieldIsError.ts(2,32): error TS1005: '=>' expected.
|
||||
tests/cases/conformance/parser/ecmascript2018/asyncGenerators/yieldInParameterInitializerIsError.ts(1,25): error TS2523: 'yield' expressions cannot be used in a parameter initializer.
|
||||
tests/cases/conformance/parser/ecmascript2018/asyncGenerators/yieldParameterIsError.ts(1,21): error TS1138: Parameter declaration expected.
|
||||
tests/cases/conformance/parser/ecmascript2018/asyncGenerators/yieldParameterIsError.ts(1,26): error TS1005: ';' expected.
|
||||
tests/cases/conformance/parser/ecmascript2018/asyncGenerators/yieldStarMissingValueIsError.ts(2,12): error TS1109: Expression expected.
|
||||
|
||||
|
||||
==== tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/functionDeclarationIsOk.ts (0 errors) ====
|
||||
==== tests/cases/conformance/parser/ecmascript2018/asyncGenerators/functionDeclarationIsOk.ts (0 errors) ====
|
||||
async function * f1() {
|
||||
}
|
||||
==== tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/awaitNameIsOk.ts (0 errors) ====
|
||||
==== tests/cases/conformance/parser/ecmascript2018/asyncGenerators/awaitNameIsOk.ts (0 errors) ====
|
||||
async function * await() {
|
||||
}
|
||||
==== tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/yieldNameIsOk.ts (0 errors) ====
|
||||
==== tests/cases/conformance/parser/ecmascript2018/asyncGenerators/yieldNameIsOk.ts (0 errors) ====
|
||||
async function * yield() {
|
||||
}
|
||||
==== tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/awaitParameterIsError.ts (2 errors) ====
|
||||
==== tests/cases/conformance/parser/ecmascript2018/asyncGenerators/awaitParameterIsError.ts (2 errors) ====
|
||||
async function * f4(await) {
|
||||
~~~~~
|
||||
!!! error TS1138: Parameter declaration expected.
|
||||
~
|
||||
!!! error TS1005: ';' expected.
|
||||
}
|
||||
==== tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/yieldParameterIsError.ts (2 errors) ====
|
||||
==== tests/cases/conformance/parser/ecmascript2018/asyncGenerators/yieldParameterIsError.ts (2 errors) ====
|
||||
async function * f5(yield) {
|
||||
~~~~~
|
||||
!!! error TS1138: Parameter declaration expected.
|
||||
~
|
||||
!!! error TS1005: ';' expected.
|
||||
}
|
||||
==== tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/awaitInParameterInitializerIsError.ts (1 errors) ====
|
||||
==== tests/cases/conformance/parser/ecmascript2018/asyncGenerators/awaitInParameterInitializerIsError.ts (1 errors) ====
|
||||
async function * f6(a = await 1) {
|
||||
~~~~~~~
|
||||
!!! error TS2524: 'await' expressions cannot be used in a parameter initializer.
|
||||
}
|
||||
==== tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/yieldInParameterInitializerIsError.ts (1 errors) ====
|
||||
==== tests/cases/conformance/parser/ecmascript2018/asyncGenerators/yieldInParameterInitializerIsError.ts (1 errors) ====
|
||||
async function * f7(a = yield) {
|
||||
~~~~~
|
||||
!!! error TS2523: 'yield' expressions cannot be used in a parameter initializer.
|
||||
}
|
||||
==== tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/nestedAsyncGeneratorIsOk.ts (0 errors) ====
|
||||
==== tests/cases/conformance/parser/ecmascript2018/asyncGenerators/nestedAsyncGeneratorIsOk.ts (0 errors) ====
|
||||
async function * f8() {
|
||||
async function * g() {
|
||||
}
|
||||
}
|
||||
==== tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/nestedFunctionDeclarationNamedYieldIsError.ts (2 errors) ====
|
||||
==== tests/cases/conformance/parser/ecmascript2018/asyncGenerators/nestedFunctionDeclarationNamedYieldIsError.ts (2 errors) ====
|
||||
async function * f9() {
|
||||
function yield() {
|
||||
~~~~~
|
||||
@ -64,7 +64,7 @@ tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/yieldStarMissingVa
|
||||
!!! error TS1005: '=>' expected.
|
||||
}
|
||||
}
|
||||
==== tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/nestedFunctionExpressionNamedYieldIsError.ts (2 errors) ====
|
||||
==== tests/cases/conformance/parser/ecmascript2018/asyncGenerators/nestedFunctionExpressionNamedYieldIsError.ts (2 errors) ====
|
||||
async function * f10() {
|
||||
const x = function yield() {
|
||||
~~~~~
|
||||
@ -73,7 +73,7 @@ tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/yieldStarMissingVa
|
||||
!!! error TS1005: '=>' expected.
|
||||
};
|
||||
}
|
||||
==== tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/nestedFunctionDeclarationNamedAwaitIsError.ts (3 errors) ====
|
||||
==== tests/cases/conformance/parser/ecmascript2018/asyncGenerators/nestedFunctionDeclarationNamedAwaitIsError.ts (3 errors) ====
|
||||
async function * f11() {
|
||||
function await() {
|
||||
~~~~~
|
||||
@ -84,7 +84,7 @@ tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/yieldStarMissingVa
|
||||
!!! error TS1005: ';' expected.
|
||||
}
|
||||
}
|
||||
==== tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/nestedFunctionExpressionNamedAwaitIsError.ts (2 errors) ====
|
||||
==== tests/cases/conformance/parser/ecmascript2018/asyncGenerators/nestedFunctionExpressionNamedAwaitIsError.ts (2 errors) ====
|
||||
async function * f12() {
|
||||
const x = function yield() {
|
||||
~~~~~
|
||||
@ -93,45 +93,46 @@ tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/yieldStarMissingVa
|
||||
!!! error TS1005: '=>' expected.
|
||||
};
|
||||
}
|
||||
==== tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/yieldIsOk.ts (0 errors) ====
|
||||
==== tests/cases/conformance/parser/ecmascript2018/asyncGenerators/yieldIsOk.ts (0 errors) ====
|
||||
async function * f13() {
|
||||
yield;
|
||||
}
|
||||
==== tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/yieldWithValueIsOk.ts (0 errors) ====
|
||||
==== tests/cases/conformance/parser/ecmascript2018/asyncGenerators/yieldWithValueIsOk.ts (0 errors) ====
|
||||
async function * f14() {
|
||||
yield 1;
|
||||
}
|
||||
==== tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/yieldStarMissingValueIsError.ts (1 errors) ====
|
||||
==== tests/cases/conformance/parser/ecmascript2018/asyncGenerators/yieldStarMissingValueIsError.ts (1 errors) ====
|
||||
async function * f15() {
|
||||
yield *;
|
||||
~
|
||||
!!! error TS1109: Expression expected.
|
||||
}
|
||||
==== tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/yieldStarWithValueIsOk.ts (0 errors) ====
|
||||
==== tests/cases/conformance/parser/ecmascript2018/asyncGenerators/yieldStarWithValueIsOk.ts (0 errors) ====
|
||||
async function * f16() {
|
||||
yield * [];
|
||||
}
|
||||
==== tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/awaitWithValueIsOk.ts (0 errors) ====
|
||||
==== tests/cases/conformance/parser/ecmascript2018/asyncGenerators/awaitWithValueIsOk.ts (0 errors) ====
|
||||
async function * f17() {
|
||||
await 1;
|
||||
}
|
||||
==== tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/awaitMissingValueIsError.ts (1 errors) ====
|
||||
==== tests/cases/conformance/parser/ecmascript2018/asyncGenerators/awaitMissingValueIsError.ts (1 errors) ====
|
||||
async function * f18() {
|
||||
await;
|
||||
~
|
||||
!!! error TS1109: Expression expected.
|
||||
}
|
||||
==== tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/awaitAsTypeIsOk.ts (0 errors) ====
|
||||
==== tests/cases/conformance/parser/ecmascript2018/asyncGenerators/awaitAsTypeIsOk.ts (0 errors) ====
|
||||
interface await {}
|
||||
async function * f19() {
|
||||
let x: await;
|
||||
}
|
||||
==== tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/yieldAsTypeIsOk.ts (0 errors) ====
|
||||
==== tests/cases/conformance/parser/ecmascript2018/asyncGenerators/yieldAsTypeIsOk.ts (0 errors) ====
|
||||
interface yield {}
|
||||
async function * f20() {
|
||||
let x: yield;
|
||||
}
|
||||
==== tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/yieldInNestedComputedPropertyIsOk.ts (0 errors) ====
|
||||
==== tests/cases/conformance/parser/ecmascript2018/asyncGenerators/yieldInNestedComputedPropertyIsOk.ts (0 errors) ====
|
||||
async function * f21() {
|
||||
const x = { [yield]: 1 };
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,36 +1,36 @@
|
||||
=== tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/functionDeclarationIsOk.ts ===
|
||||
=== tests/cases/conformance/parser/ecmascript2018/asyncGenerators/functionDeclarationIsOk.ts ===
|
||||
async function * f1() {
|
||||
>f1 : Symbol(f1, Decl(functionDeclarationIsOk.ts, 0, 0))
|
||||
}
|
||||
=== tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/awaitNameIsOk.ts ===
|
||||
=== tests/cases/conformance/parser/ecmascript2018/asyncGenerators/awaitNameIsOk.ts ===
|
||||
async function * await() {
|
||||
>await : Symbol(await, Decl(awaitNameIsOk.ts, 0, 0), Decl(awaitAsTypeIsOk.ts, 0, 0))
|
||||
}
|
||||
=== tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/yieldNameIsOk.ts ===
|
||||
=== tests/cases/conformance/parser/ecmascript2018/asyncGenerators/yieldNameIsOk.ts ===
|
||||
async function * yield() {
|
||||
>yield : Symbol(yield, Decl(yieldNameIsOk.ts, 0, 0), Decl(yieldAsTypeIsOk.ts, 0, 0))
|
||||
}
|
||||
=== tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/awaitParameterIsError.ts ===
|
||||
=== tests/cases/conformance/parser/ecmascript2018/asyncGenerators/awaitParameterIsError.ts ===
|
||||
async function * f4(await) {
|
||||
>f4 : Symbol(f4, Decl(awaitParameterIsError.ts, 0, 0))
|
||||
>await : Symbol(await, Decl(awaitNameIsOk.ts, 0, 0), Decl(awaitAsTypeIsOk.ts, 0, 0))
|
||||
}
|
||||
=== tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/yieldParameterIsError.ts ===
|
||||
=== tests/cases/conformance/parser/ecmascript2018/asyncGenerators/yieldParameterIsError.ts ===
|
||||
async function * f5(yield) {
|
||||
>f5 : Symbol(f5, Decl(yieldParameterIsError.ts, 0, 0))
|
||||
>yield : Symbol(yield, Decl(yieldNameIsOk.ts, 0, 0), Decl(yieldAsTypeIsOk.ts, 0, 0))
|
||||
}
|
||||
=== tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/awaitInParameterInitializerIsError.ts ===
|
||||
=== tests/cases/conformance/parser/ecmascript2018/asyncGenerators/awaitInParameterInitializerIsError.ts ===
|
||||
async function * f6(a = await 1) {
|
||||
>f6 : Symbol(f6, Decl(awaitInParameterInitializerIsError.ts, 0, 0))
|
||||
>a : Symbol(a, Decl(awaitInParameterInitializerIsError.ts, 0, 20))
|
||||
}
|
||||
=== tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/yieldInParameterInitializerIsError.ts ===
|
||||
=== tests/cases/conformance/parser/ecmascript2018/asyncGenerators/yieldInParameterInitializerIsError.ts ===
|
||||
async function * f7(a = yield) {
|
||||
>f7 : Symbol(f7, Decl(yieldInParameterInitializerIsError.ts, 0, 0))
|
||||
>a : Symbol(a, Decl(yieldInParameterInitializerIsError.ts, 0, 20))
|
||||
}
|
||||
=== tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/nestedAsyncGeneratorIsOk.ts ===
|
||||
=== tests/cases/conformance/parser/ecmascript2018/asyncGenerators/nestedAsyncGeneratorIsOk.ts ===
|
||||
async function * f8() {
|
||||
>f8 : Symbol(f8, Decl(nestedAsyncGeneratorIsOk.ts, 0, 0))
|
||||
|
||||
@ -38,7 +38,7 @@ async function * f8() {
|
||||
>g : Symbol(g, Decl(nestedAsyncGeneratorIsOk.ts, 0, 23))
|
||||
}
|
||||
}
|
||||
=== tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/nestedFunctionDeclarationNamedYieldIsError.ts ===
|
||||
=== tests/cases/conformance/parser/ecmascript2018/asyncGenerators/nestedFunctionDeclarationNamedYieldIsError.ts ===
|
||||
async function * f9() {
|
||||
>f9 : Symbol(f9, Decl(nestedFunctionDeclarationNamedYieldIsError.ts, 0, 0))
|
||||
|
||||
@ -46,7 +46,7 @@ async function * f9() {
|
||||
> : Symbol((Missing), Decl(nestedFunctionDeclarationNamedYieldIsError.ts, 0, 23))
|
||||
}
|
||||
}
|
||||
=== tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/nestedFunctionExpressionNamedYieldIsError.ts ===
|
||||
=== tests/cases/conformance/parser/ecmascript2018/asyncGenerators/nestedFunctionExpressionNamedYieldIsError.ts ===
|
||||
async function * f10() {
|
||||
>f10 : Symbol(f10, Decl(nestedFunctionExpressionNamedYieldIsError.ts, 0, 0))
|
||||
|
||||
@ -55,7 +55,7 @@ async function * f10() {
|
||||
|
||||
};
|
||||
}
|
||||
=== tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/nestedFunctionDeclarationNamedAwaitIsError.ts ===
|
||||
=== tests/cases/conformance/parser/ecmascript2018/asyncGenerators/nestedFunctionDeclarationNamedAwaitIsError.ts ===
|
||||
async function * f11() {
|
||||
>f11 : Symbol(f11, Decl(nestedFunctionDeclarationNamedAwaitIsError.ts, 0, 0))
|
||||
|
||||
@ -63,7 +63,7 @@ async function * f11() {
|
||||
> : Symbol((Missing), Decl(nestedFunctionDeclarationNamedAwaitIsError.ts, 0, 24))
|
||||
}
|
||||
}
|
||||
=== tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/nestedFunctionExpressionNamedAwaitIsError.ts ===
|
||||
=== tests/cases/conformance/parser/ecmascript2018/asyncGenerators/nestedFunctionExpressionNamedAwaitIsError.ts ===
|
||||
async function * f12() {
|
||||
>f12 : Symbol(f12, Decl(nestedFunctionExpressionNamedAwaitIsError.ts, 0, 0))
|
||||
|
||||
@ -72,43 +72,43 @@ async function * f12() {
|
||||
|
||||
};
|
||||
}
|
||||
=== tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/yieldIsOk.ts ===
|
||||
=== tests/cases/conformance/parser/ecmascript2018/asyncGenerators/yieldIsOk.ts ===
|
||||
async function * f13() {
|
||||
>f13 : Symbol(f13, Decl(yieldIsOk.ts, 0, 0))
|
||||
|
||||
yield;
|
||||
}
|
||||
=== tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/yieldWithValueIsOk.ts ===
|
||||
=== tests/cases/conformance/parser/ecmascript2018/asyncGenerators/yieldWithValueIsOk.ts ===
|
||||
async function * f14() {
|
||||
>f14 : Symbol(f14, Decl(yieldWithValueIsOk.ts, 0, 0))
|
||||
|
||||
yield 1;
|
||||
}
|
||||
=== tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/yieldStarMissingValueIsError.ts ===
|
||||
=== tests/cases/conformance/parser/ecmascript2018/asyncGenerators/yieldStarMissingValueIsError.ts ===
|
||||
async function * f15() {
|
||||
>f15 : Symbol(f15, Decl(yieldStarMissingValueIsError.ts, 0, 0))
|
||||
|
||||
yield *;
|
||||
}
|
||||
=== tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/yieldStarWithValueIsOk.ts ===
|
||||
=== tests/cases/conformance/parser/ecmascript2018/asyncGenerators/yieldStarWithValueIsOk.ts ===
|
||||
async function * f16() {
|
||||
>f16 : Symbol(f16, Decl(yieldStarWithValueIsOk.ts, 0, 0))
|
||||
|
||||
yield * [];
|
||||
}
|
||||
=== tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/awaitWithValueIsOk.ts ===
|
||||
=== tests/cases/conformance/parser/ecmascript2018/asyncGenerators/awaitWithValueIsOk.ts ===
|
||||
async function * f17() {
|
||||
>f17 : Symbol(f17, Decl(awaitWithValueIsOk.ts, 0, 0))
|
||||
|
||||
await 1;
|
||||
}
|
||||
=== tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/awaitMissingValueIsError.ts ===
|
||||
=== tests/cases/conformance/parser/ecmascript2018/asyncGenerators/awaitMissingValueIsError.ts ===
|
||||
async function * f18() {
|
||||
>f18 : Symbol(f18, Decl(awaitMissingValueIsError.ts, 0, 0))
|
||||
|
||||
await;
|
||||
}
|
||||
=== tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/awaitAsTypeIsOk.ts ===
|
||||
=== tests/cases/conformance/parser/ecmascript2018/asyncGenerators/awaitAsTypeIsOk.ts ===
|
||||
interface await {}
|
||||
>await : Symbol(await, Decl(awaitNameIsOk.ts, 0, 0), Decl(awaitAsTypeIsOk.ts, 0, 0))
|
||||
|
||||
@ -119,7 +119,7 @@ async function * f19() {
|
||||
>x : Symbol(x, Decl(awaitAsTypeIsOk.ts, 2, 7))
|
||||
>await : Symbol(await, Decl(awaitNameIsOk.ts, 0, 0), Decl(awaitAsTypeIsOk.ts, 0, 0))
|
||||
}
|
||||
=== tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/yieldAsTypeIsOk.ts ===
|
||||
=== tests/cases/conformance/parser/ecmascript2018/asyncGenerators/yieldAsTypeIsOk.ts ===
|
||||
interface yield {}
|
||||
>yield : Symbol(yield, Decl(yieldNameIsOk.ts, 0, 0), Decl(yieldAsTypeIsOk.ts, 0, 0))
|
||||
|
||||
@ -130,7 +130,7 @@ async function * f20() {
|
||||
>x : Symbol(x, Decl(yieldAsTypeIsOk.ts, 2, 7))
|
||||
>yield : Symbol(yield, Decl(yieldNameIsOk.ts, 0, 0), Decl(yieldAsTypeIsOk.ts, 0, 0))
|
||||
}
|
||||
=== tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/yieldInNestedComputedPropertyIsOk.ts ===
|
||||
=== tests/cases/conformance/parser/ecmascript2018/asyncGenerators/yieldInNestedComputedPropertyIsOk.ts ===
|
||||
async function * f21() {
|
||||
>f21 : Symbol(f21, Decl(yieldInNestedComputedPropertyIsOk.ts, 0, 0))
|
||||
|
||||
@ -138,3 +138,4 @@ async function * f21() {
|
||||
>x : Symbol(x, Decl(yieldInNestedComputedPropertyIsOk.ts, 1, 9))
|
||||
>[yield] : Symbol([yield], Decl(yieldInNestedComputedPropertyIsOk.ts, 1, 15))
|
||||
}
|
||||
|
||||
@ -1,39 +1,39 @@
|
||||
=== tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/functionDeclarationIsOk.ts ===
|
||||
=== tests/cases/conformance/parser/ecmascript2018/asyncGenerators/functionDeclarationIsOk.ts ===
|
||||
async function * f1() {
|
||||
>f1 : () => AsyncIterableIterator<any>
|
||||
}
|
||||
=== tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/awaitNameIsOk.ts ===
|
||||
=== tests/cases/conformance/parser/ecmascript2018/asyncGenerators/awaitNameIsOk.ts ===
|
||||
async function * await() {
|
||||
>await : () => AsyncIterableIterator<any>
|
||||
}
|
||||
=== tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/yieldNameIsOk.ts ===
|
||||
=== tests/cases/conformance/parser/ecmascript2018/asyncGenerators/yieldNameIsOk.ts ===
|
||||
async function * yield() {
|
||||
>yield : () => AsyncIterableIterator<any>
|
||||
}
|
||||
=== tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/awaitParameterIsError.ts ===
|
||||
=== tests/cases/conformance/parser/ecmascript2018/asyncGenerators/awaitParameterIsError.ts ===
|
||||
async function * f4(await) {
|
||||
>f4 : () => any
|
||||
>await : () => AsyncIterableIterator<any>
|
||||
}
|
||||
=== tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/yieldParameterIsError.ts ===
|
||||
=== tests/cases/conformance/parser/ecmascript2018/asyncGenerators/yieldParameterIsError.ts ===
|
||||
async function * f5(yield) {
|
||||
>f5 : () => any
|
||||
>yield : () => AsyncIterableIterator<any>
|
||||
}
|
||||
=== tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/awaitInParameterInitializerIsError.ts ===
|
||||
=== tests/cases/conformance/parser/ecmascript2018/asyncGenerators/awaitInParameterInitializerIsError.ts ===
|
||||
async function * f6(a = await 1) {
|
||||
>f6 : (a?: number) => AsyncIterableIterator<any>
|
||||
>a : number
|
||||
>await 1 : 1
|
||||
>1 : 1
|
||||
}
|
||||
=== tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/yieldInParameterInitializerIsError.ts ===
|
||||
=== tests/cases/conformance/parser/ecmascript2018/asyncGenerators/yieldInParameterInitializerIsError.ts ===
|
||||
async function * f7(a = yield) {
|
||||
>f7 : (a?: any) => AsyncIterableIterator<any>
|
||||
>a : any
|
||||
>yield : any
|
||||
}
|
||||
=== tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/nestedAsyncGeneratorIsOk.ts ===
|
||||
=== tests/cases/conformance/parser/ecmascript2018/asyncGenerators/nestedAsyncGeneratorIsOk.ts ===
|
||||
async function * f8() {
|
||||
>f8 : () => AsyncIterableIterator<any>
|
||||
|
||||
@ -41,7 +41,7 @@ async function * f8() {
|
||||
>g : () => AsyncIterableIterator<any>
|
||||
}
|
||||
}
|
||||
=== tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/nestedFunctionDeclarationNamedYieldIsError.ts ===
|
||||
=== tests/cases/conformance/parser/ecmascript2018/asyncGenerators/nestedFunctionDeclarationNamedYieldIsError.ts ===
|
||||
async function * f9() {
|
||||
>f9 : () => AsyncIterableIterator<() => void>
|
||||
|
||||
@ -51,7 +51,7 @@ async function * f9() {
|
||||
>() { } : () => void
|
||||
}
|
||||
}
|
||||
=== tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/nestedFunctionExpressionNamedYieldIsError.ts ===
|
||||
=== tests/cases/conformance/parser/ecmascript2018/asyncGenerators/nestedFunctionExpressionNamedYieldIsError.ts ===
|
||||
async function * f10() {
|
||||
>f10 : () => AsyncIterableIterator<() => void>
|
||||
|
||||
@ -63,7 +63,7 @@ async function * f10() {
|
||||
|
||||
};
|
||||
}
|
||||
=== tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/nestedFunctionDeclarationNamedAwaitIsError.ts ===
|
||||
=== tests/cases/conformance/parser/ecmascript2018/asyncGenerators/nestedFunctionDeclarationNamedAwaitIsError.ts ===
|
||||
async function * f11() {
|
||||
>f11 : () => AsyncIterableIterator<any>
|
||||
|
||||
@ -74,7 +74,7 @@ async function * f11() {
|
||||
> : any
|
||||
}
|
||||
}
|
||||
=== tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/nestedFunctionExpressionNamedAwaitIsError.ts ===
|
||||
=== tests/cases/conformance/parser/ecmascript2018/asyncGenerators/nestedFunctionExpressionNamedAwaitIsError.ts ===
|
||||
async function * f12() {
|
||||
>f12 : () => AsyncIterableIterator<() => void>
|
||||
|
||||
@ -86,14 +86,14 @@ async function * f12() {
|
||||
|
||||
};
|
||||
}
|
||||
=== tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/yieldIsOk.ts ===
|
||||
=== tests/cases/conformance/parser/ecmascript2018/asyncGenerators/yieldIsOk.ts ===
|
||||
async function * f13() {
|
||||
>f13 : () => AsyncIterableIterator<any>
|
||||
|
||||
yield;
|
||||
>yield : any
|
||||
}
|
||||
=== tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/yieldWithValueIsOk.ts ===
|
||||
=== tests/cases/conformance/parser/ecmascript2018/asyncGenerators/yieldWithValueIsOk.ts ===
|
||||
async function * f14() {
|
||||
>f14 : () => AsyncIterableIterator<number>
|
||||
|
||||
@ -101,7 +101,7 @@ async function * f14() {
|
||||
>yield 1 : any
|
||||
>1 : 1
|
||||
}
|
||||
=== tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/yieldStarMissingValueIsError.ts ===
|
||||
=== tests/cases/conformance/parser/ecmascript2018/asyncGenerators/yieldStarMissingValueIsError.ts ===
|
||||
async function * f15() {
|
||||
>f15 : () => AsyncIterableIterator<any>
|
||||
|
||||
@ -109,7 +109,7 @@ async function * f15() {
|
||||
>yield * : any
|
||||
> : any
|
||||
}
|
||||
=== tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/yieldStarWithValueIsOk.ts ===
|
||||
=== tests/cases/conformance/parser/ecmascript2018/asyncGenerators/yieldStarWithValueIsOk.ts ===
|
||||
async function * f16() {
|
||||
>f16 : () => AsyncIterableIterator<any>
|
||||
|
||||
@ -117,7 +117,7 @@ async function * f16() {
|
||||
>yield * [] : any
|
||||
>[] : undefined[]
|
||||
}
|
||||
=== tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/awaitWithValueIsOk.ts ===
|
||||
=== tests/cases/conformance/parser/ecmascript2018/asyncGenerators/awaitWithValueIsOk.ts ===
|
||||
async function * f17() {
|
||||
>f17 : () => AsyncIterableIterator<any>
|
||||
|
||||
@ -125,7 +125,7 @@ async function * f17() {
|
||||
>await 1 : 1
|
||||
>1 : 1
|
||||
}
|
||||
=== tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/awaitMissingValueIsError.ts ===
|
||||
=== tests/cases/conformance/parser/ecmascript2018/asyncGenerators/awaitMissingValueIsError.ts ===
|
||||
async function * f18() {
|
||||
>f18 : () => AsyncIterableIterator<any>
|
||||
|
||||
@ -133,7 +133,7 @@ async function * f18() {
|
||||
>await : any
|
||||
> : any
|
||||
}
|
||||
=== tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/awaitAsTypeIsOk.ts ===
|
||||
=== tests/cases/conformance/parser/ecmascript2018/asyncGenerators/awaitAsTypeIsOk.ts ===
|
||||
interface await {}
|
||||
async function * f19() {
|
||||
>f19 : () => AsyncIterableIterator<any>
|
||||
@ -141,7 +141,7 @@ async function * f19() {
|
||||
let x: await;
|
||||
>x : await
|
||||
}
|
||||
=== tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/yieldAsTypeIsOk.ts ===
|
||||
=== tests/cases/conformance/parser/ecmascript2018/asyncGenerators/yieldAsTypeIsOk.ts ===
|
||||
interface yield {}
|
||||
async function * f20() {
|
||||
>f20 : () => AsyncIterableIterator<any>
|
||||
@ -149,7 +149,7 @@ async function * f20() {
|
||||
let x: yield;
|
||||
>x : yield
|
||||
}
|
||||
=== tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/yieldInNestedComputedPropertyIsOk.ts ===
|
||||
=== tests/cases/conformance/parser/ecmascript2018/asyncGenerators/yieldInNestedComputedPropertyIsOk.ts ===
|
||||
async function * f21() {
|
||||
>f21 : () => AsyncIterableIterator<any>
|
||||
|
||||
@ -160,3 +160,4 @@ async function * f21() {
|
||||
>yield : any
|
||||
>1 : 1
|
||||
}
|
||||
|
||||
@ -1,96 +1,96 @@
|
||||
tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/awaitInParameterInitializerIsError.ts(1,34): error TS2524: 'await' expressions cannot be used in a parameter initializer.
|
||||
tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/awaitMissingValueIsError.ts(2,10): error TS1109: Expression expected.
|
||||
tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/awaitNameIsError.ts(1,29): error TS1005: '(' expected.
|
||||
tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/awaitNameIsError.ts(1,29): error TS2451: Cannot redeclare block-scoped variable 'await'.
|
||||
tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/awaitNameIsError.ts(1,34): error TS1005: ',' expected.
|
||||
tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/awaitNameIsError.ts(1,37): error TS1005: '=>' expected.
|
||||
tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/awaitParameterIsError.ts(1,30): error TS1138: Parameter declaration expected.
|
||||
tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/awaitParameterIsError.ts(1,30): error TS2451: Cannot redeclare block-scoped variable 'await'.
|
||||
tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/awaitParameterIsError.ts(1,35): error TS1005: ',' expected.
|
||||
tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/nestedFunctionDeclarationNamedAwaitIsError.ts(2,14): error TS1003: Identifier expected.
|
||||
tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/nestedFunctionDeclarationNamedAwaitIsError.ts(2,20): error TS1109: Expression expected.
|
||||
tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/nestedFunctionDeclarationNamedAwaitIsError.ts(2,22): error TS1005: ';' expected.
|
||||
tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/nestedFunctionDeclarationNamedYieldIsError.ts(2,14): error TS1003: Identifier expected.
|
||||
tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/nestedFunctionDeclarationNamedYieldIsError.ts(2,22): error TS1005: '=>' expected.
|
||||
tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/nestedFunctionExpressionNamedAwaitIsError.ts(2,24): error TS1005: '(' expected.
|
||||
tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/nestedFunctionExpressionNamedAwaitIsError.ts(2,30): error TS1109: Expression expected.
|
||||
tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/nestedFunctionExpressionNamedAwaitIsError.ts(2,32): error TS1005: ';' expected.
|
||||
tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/nestedFunctionExpressionNamedYieldIsError.ts(2,24): error TS1005: '(' expected.
|
||||
tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/nestedFunctionExpressionNamedYieldIsError.ts(2,32): error TS1005: '=>' expected.
|
||||
tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/yieldInParameterInitializerIsError.ts(1,34): error TS2523: 'yield' expressions cannot be used in a parameter initializer.
|
||||
tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/yieldNameIsError.ts(1,29): error TS1005: '(' expected.
|
||||
tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/yieldNameIsError.ts(1,29): error TS2451: Cannot redeclare block-scoped variable 'yield'.
|
||||
tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/yieldNameIsError.ts(1,34): error TS1005: ',' expected.
|
||||
tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/yieldNameIsError.ts(1,37): error TS1005: '=>' expected.
|
||||
tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/yieldParameterIsError.ts(1,30): error TS1138: Parameter declaration expected.
|
||||
tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/yieldParameterIsError.ts(1,30): error TS2451: Cannot redeclare block-scoped variable 'yield'.
|
||||
tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/yieldParameterIsError.ts(1,35): error TS1005: ',' expected.
|
||||
tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/yieldStarMissingValueIsError.ts(2,12): error TS1109: Expression expected.
|
||||
tests/cases/conformance/parser/ecmascript2018/asyncGenerators/awaitInParameterInitializerIsError.ts(1,34): error TS2524: 'await' expressions cannot be used in a parameter initializer.
|
||||
tests/cases/conformance/parser/ecmascript2018/asyncGenerators/awaitMissingValueIsError.ts(2,10): error TS1109: Expression expected.
|
||||
tests/cases/conformance/parser/ecmascript2018/asyncGenerators/awaitNameIsError.ts(1,29): error TS1005: '(' expected.
|
||||
tests/cases/conformance/parser/ecmascript2018/asyncGenerators/awaitNameIsError.ts(1,29): error TS2451: Cannot redeclare block-scoped variable 'await'.
|
||||
tests/cases/conformance/parser/ecmascript2018/asyncGenerators/awaitNameIsError.ts(1,34): error TS1005: ',' expected.
|
||||
tests/cases/conformance/parser/ecmascript2018/asyncGenerators/awaitNameIsError.ts(1,37): error TS1005: '=>' expected.
|
||||
tests/cases/conformance/parser/ecmascript2018/asyncGenerators/awaitParameterIsError.ts(1,30): error TS1138: Parameter declaration expected.
|
||||
tests/cases/conformance/parser/ecmascript2018/asyncGenerators/awaitParameterIsError.ts(1,30): error TS2451: Cannot redeclare block-scoped variable 'await'.
|
||||
tests/cases/conformance/parser/ecmascript2018/asyncGenerators/awaitParameterIsError.ts(1,35): error TS1005: ',' expected.
|
||||
tests/cases/conformance/parser/ecmascript2018/asyncGenerators/nestedFunctionDeclarationNamedAwaitIsError.ts(2,14): error TS1003: Identifier expected.
|
||||
tests/cases/conformance/parser/ecmascript2018/asyncGenerators/nestedFunctionDeclarationNamedAwaitIsError.ts(2,20): error TS1109: Expression expected.
|
||||
tests/cases/conformance/parser/ecmascript2018/asyncGenerators/nestedFunctionDeclarationNamedAwaitIsError.ts(2,22): error TS1005: ';' expected.
|
||||
tests/cases/conformance/parser/ecmascript2018/asyncGenerators/nestedFunctionDeclarationNamedYieldIsError.ts(2,14): error TS1003: Identifier expected.
|
||||
tests/cases/conformance/parser/ecmascript2018/asyncGenerators/nestedFunctionDeclarationNamedYieldIsError.ts(2,22): error TS1005: '=>' expected.
|
||||
tests/cases/conformance/parser/ecmascript2018/asyncGenerators/nestedFunctionExpressionNamedAwaitIsError.ts(2,24): error TS1005: '(' expected.
|
||||
tests/cases/conformance/parser/ecmascript2018/asyncGenerators/nestedFunctionExpressionNamedAwaitIsError.ts(2,30): error TS1109: Expression expected.
|
||||
tests/cases/conformance/parser/ecmascript2018/asyncGenerators/nestedFunctionExpressionNamedAwaitIsError.ts(2,32): error TS1005: ';' expected.
|
||||
tests/cases/conformance/parser/ecmascript2018/asyncGenerators/nestedFunctionExpressionNamedYieldIsError.ts(2,24): error TS1005: '(' expected.
|
||||
tests/cases/conformance/parser/ecmascript2018/asyncGenerators/nestedFunctionExpressionNamedYieldIsError.ts(2,32): error TS1005: '=>' expected.
|
||||
tests/cases/conformance/parser/ecmascript2018/asyncGenerators/yieldInParameterInitializerIsError.ts(1,34): error TS2523: 'yield' expressions cannot be used in a parameter initializer.
|
||||
tests/cases/conformance/parser/ecmascript2018/asyncGenerators/yieldNameIsError.ts(1,29): error TS1005: '(' expected.
|
||||
tests/cases/conformance/parser/ecmascript2018/asyncGenerators/yieldNameIsError.ts(1,29): error TS2451: Cannot redeclare block-scoped variable 'yield'.
|
||||
tests/cases/conformance/parser/ecmascript2018/asyncGenerators/yieldNameIsError.ts(1,34): error TS1005: ',' expected.
|
||||
tests/cases/conformance/parser/ecmascript2018/asyncGenerators/yieldNameIsError.ts(1,37): error TS1005: '=>' expected.
|
||||
tests/cases/conformance/parser/ecmascript2018/asyncGenerators/yieldParameterIsError.ts(1,30): error TS1138: Parameter declaration expected.
|
||||
tests/cases/conformance/parser/ecmascript2018/asyncGenerators/yieldParameterIsError.ts(1,30): error TS2451: Cannot redeclare block-scoped variable 'yield'.
|
||||
tests/cases/conformance/parser/ecmascript2018/asyncGenerators/yieldParameterIsError.ts(1,35): error TS1005: ',' expected.
|
||||
tests/cases/conformance/parser/ecmascript2018/asyncGenerators/yieldStarMissingValueIsError.ts(2,12): error TS1109: Expression expected.
|
||||
|
||||
|
||||
==== tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/functionExpressionIsOk.ts (0 errors) ====
|
||||
==== tests/cases/conformance/parser/ecmascript2018/asyncGenerators/functionExpressionIsOk.ts (0 errors) ====
|
||||
const f1 = async function * f() {
|
||||
};
|
||||
==== tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/awaitNameIsError.ts (4 errors) ====
|
||||
==== tests/cases/conformance/parser/ecmascript2018/asyncGenerators/awaitNameIsError.ts (4 errors) ====
|
||||
const f2 = async function * await() {
|
||||
~~~~~
|
||||
!!! error TS1005: '(' expected.
|
||||
~~~~~
|
||||
!!! error TS2451: Cannot redeclare block-scoped variable 'await'.
|
||||
!!! related TS6203 tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/awaitParameterIsError.ts:1:30: 'await' was also declared here.
|
||||
!!! related TS6203 tests/cases/conformance/parser/ecmascript2018/asyncGenerators/awaitParameterIsError.ts:1:30: 'await' was also declared here.
|
||||
~
|
||||
!!! error TS1005: ',' expected.
|
||||
~
|
||||
!!! error TS1005: '=>' expected.
|
||||
};
|
||||
==== tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/yieldNameIsError.ts (4 errors) ====
|
||||
==== tests/cases/conformance/parser/ecmascript2018/asyncGenerators/yieldNameIsError.ts (4 errors) ====
|
||||
const f3 = async function * yield() {
|
||||
~~~~~
|
||||
!!! error TS1005: '(' expected.
|
||||
~~~~~
|
||||
!!! error TS2451: Cannot redeclare block-scoped variable 'yield'.
|
||||
!!! related TS6203 tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/yieldParameterIsError.ts:1:30: 'yield' was also declared here.
|
||||
!!! related TS6203 tests/cases/conformance/parser/ecmascript2018/asyncGenerators/yieldParameterIsError.ts:1:30: 'yield' was also declared here.
|
||||
~
|
||||
!!! error TS1005: ',' expected.
|
||||
~
|
||||
!!! error TS1005: '=>' expected.
|
||||
};
|
||||
==== tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/awaitParameterIsError.ts (3 errors) ====
|
||||
==== tests/cases/conformance/parser/ecmascript2018/asyncGenerators/awaitParameterIsError.ts (3 errors) ====
|
||||
const f4 = async function * (await) {
|
||||
~~~~~
|
||||
!!! error TS1138: Parameter declaration expected.
|
||||
~~~~~
|
||||
!!! error TS2451: Cannot redeclare block-scoped variable 'await'.
|
||||
!!! related TS6203 tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/awaitNameIsError.ts:1:29: 'await' was also declared here.
|
||||
!!! related TS6203 tests/cases/conformance/parser/ecmascript2018/asyncGenerators/awaitNameIsError.ts:1:29: 'await' was also declared here.
|
||||
~
|
||||
!!! error TS1005: ',' expected.
|
||||
};
|
||||
==== tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/yieldParameterIsError.ts (3 errors) ====
|
||||
==== tests/cases/conformance/parser/ecmascript2018/asyncGenerators/yieldParameterIsError.ts (3 errors) ====
|
||||
const f5 = async function * (yield) {
|
||||
~~~~~
|
||||
!!! error TS1138: Parameter declaration expected.
|
||||
~~~~~
|
||||
!!! error TS2451: Cannot redeclare block-scoped variable 'yield'.
|
||||
!!! related TS6203 tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/yieldNameIsError.ts:1:29: 'yield' was also declared here.
|
||||
!!! related TS6203 tests/cases/conformance/parser/ecmascript2018/asyncGenerators/yieldNameIsError.ts:1:29: 'yield' was also declared here.
|
||||
~
|
||||
!!! error TS1005: ',' expected.
|
||||
};
|
||||
==== tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/awaitInParameterInitializerIsError.ts (1 errors) ====
|
||||
==== tests/cases/conformance/parser/ecmascript2018/asyncGenerators/awaitInParameterInitializerIsError.ts (1 errors) ====
|
||||
const f6 = async function * (a = await 1) {
|
||||
~~~~~~~
|
||||
!!! error TS2524: 'await' expressions cannot be used in a parameter initializer.
|
||||
};
|
||||
==== tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/yieldInParameterInitializerIsError.ts (1 errors) ====
|
||||
==== tests/cases/conformance/parser/ecmascript2018/asyncGenerators/yieldInParameterInitializerIsError.ts (1 errors) ====
|
||||
const f7 = async function * (a = yield) {
|
||||
~~~~~
|
||||
!!! error TS2523: 'yield' expressions cannot be used in a parameter initializer.
|
||||
};
|
||||
==== tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/nestedAsyncGeneratorIsOk.ts (0 errors) ====
|
||||
==== tests/cases/conformance/parser/ecmascript2018/asyncGenerators/nestedAsyncGeneratorIsOk.ts (0 errors) ====
|
||||
const f8 = async function * () {
|
||||
async function * g() {
|
||||
}
|
||||
};
|
||||
==== tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/nestedFunctionDeclarationNamedYieldIsError.ts (2 errors) ====
|
||||
==== tests/cases/conformance/parser/ecmascript2018/asyncGenerators/nestedFunctionDeclarationNamedYieldIsError.ts (2 errors) ====
|
||||
const f9 = async function * () {
|
||||
function yield() {
|
||||
~~~~~
|
||||
@ -99,7 +99,7 @@ tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/yieldStarMissingVa
|
||||
!!! error TS1005: '=>' expected.
|
||||
}
|
||||
};
|
||||
==== tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/nestedFunctionExpressionNamedYieldIsError.ts (2 errors) ====
|
||||
==== tests/cases/conformance/parser/ecmascript2018/asyncGenerators/nestedFunctionExpressionNamedYieldIsError.ts (2 errors) ====
|
||||
const f10 = async function * () {
|
||||
const x = function yield() {
|
||||
~~~~~
|
||||
@ -108,7 +108,7 @@ tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/yieldStarMissingVa
|
||||
!!! error TS1005: '=>' expected.
|
||||
};
|
||||
};
|
||||
==== tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/nestedFunctionDeclarationNamedAwaitIsError.ts (3 errors) ====
|
||||
==== tests/cases/conformance/parser/ecmascript2018/asyncGenerators/nestedFunctionDeclarationNamedAwaitIsError.ts (3 errors) ====
|
||||
const f11 = async function * () {
|
||||
function await() {
|
||||
~~~~~
|
||||
@ -119,7 +119,7 @@ tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/yieldStarMissingVa
|
||||
!!! error TS1005: ';' expected.
|
||||
}
|
||||
};
|
||||
==== tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/nestedFunctionExpressionNamedAwaitIsError.ts (3 errors) ====
|
||||
==== tests/cases/conformance/parser/ecmascript2018/asyncGenerators/nestedFunctionExpressionNamedAwaitIsError.ts (3 errors) ====
|
||||
const f12 = async function * () {
|
||||
const x = function await() {
|
||||
~~~~~
|
||||
@ -130,45 +130,45 @@ tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/yieldStarMissingVa
|
||||
!!! error TS1005: ';' expected.
|
||||
};
|
||||
};
|
||||
==== tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/yieldIsOk.ts (0 errors) ====
|
||||
==== tests/cases/conformance/parser/ecmascript2018/asyncGenerators/yieldIsOk.ts (0 errors) ====
|
||||
const f13 = async function * () {
|
||||
yield;
|
||||
};
|
||||
==== tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/yieldWithValueIsOk.ts (0 errors) ====
|
||||
==== tests/cases/conformance/parser/ecmascript2018/asyncGenerators/yieldWithValueIsOk.ts (0 errors) ====
|
||||
const f14 = async function * () {
|
||||
yield 1;
|
||||
};
|
||||
==== tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/yieldStarMissingValueIsError.ts (1 errors) ====
|
||||
==== tests/cases/conformance/parser/ecmascript2018/asyncGenerators/yieldStarMissingValueIsError.ts (1 errors) ====
|
||||
const f15 = async function * () {
|
||||
yield *;
|
||||
~
|
||||
!!! error TS1109: Expression expected.
|
||||
};
|
||||
==== tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/yieldStarWithValueIsOk.ts (0 errors) ====
|
||||
==== tests/cases/conformance/parser/ecmascript2018/asyncGenerators/yieldStarWithValueIsOk.ts (0 errors) ====
|
||||
const f16 = async function * () {
|
||||
yield * [];
|
||||
};
|
||||
==== tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/awaitWithValueIsOk.ts (0 errors) ====
|
||||
==== tests/cases/conformance/parser/ecmascript2018/asyncGenerators/awaitWithValueIsOk.ts (0 errors) ====
|
||||
const f17 = async function * () {
|
||||
await 1;
|
||||
};
|
||||
==== tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/awaitMissingValueIsError.ts (1 errors) ====
|
||||
==== tests/cases/conformance/parser/ecmascript2018/asyncGenerators/awaitMissingValueIsError.ts (1 errors) ====
|
||||
const f18 = async function * () {
|
||||
await;
|
||||
~
|
||||
!!! error TS1109: Expression expected.
|
||||
};
|
||||
==== tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/awaitAsTypeIsOk.ts (0 errors) ====
|
||||
==== tests/cases/conformance/parser/ecmascript2018/asyncGenerators/awaitAsTypeIsOk.ts (0 errors) ====
|
||||
interface await {}
|
||||
const f19 = async function * () {
|
||||
let x: await;
|
||||
};
|
||||
==== tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/yieldAsTypeIsOk.ts (0 errors) ====
|
||||
==== tests/cases/conformance/parser/ecmascript2018/asyncGenerators/yieldAsTypeIsOk.ts (0 errors) ====
|
||||
interface yield {}
|
||||
const f20 = async function * () {
|
||||
let x: yield;
|
||||
};
|
||||
==== tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/yieldInNestedComputedPropertyIsOk.ts (0 errors) ====
|
||||
==== tests/cases/conformance/parser/ecmascript2018/asyncGenerators/yieldInNestedComputedPropertyIsOk.ts (0 errors) ====
|
||||
const f21 = async function *() {
|
||||
const x = { [yield]: 1 };
|
||||
};
|
||||
@ -1,46 +1,46 @@
|
||||
=== tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/functionExpressionIsOk.ts ===
|
||||
=== tests/cases/conformance/parser/ecmascript2018/asyncGenerators/functionExpressionIsOk.ts ===
|
||||
const f1 = async function * f() {
|
||||
>f1 : Symbol(f1, Decl(functionExpressionIsOk.ts, 0, 5))
|
||||
>f : Symbol(f, Decl(functionExpressionIsOk.ts, 0, 10))
|
||||
|
||||
};
|
||||
=== tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/awaitNameIsError.ts ===
|
||||
=== tests/cases/conformance/parser/ecmascript2018/asyncGenerators/awaitNameIsError.ts ===
|
||||
const f2 = async function * await() {
|
||||
>f2 : Symbol(f2, Decl(awaitNameIsError.ts, 0, 5))
|
||||
>await : Symbol(await, Decl(awaitNameIsError.ts, 0, 27), Decl(awaitAsTypeIsOk.ts, 0, 0))
|
||||
|
||||
};
|
||||
=== tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/yieldNameIsError.ts ===
|
||||
=== tests/cases/conformance/parser/ecmascript2018/asyncGenerators/yieldNameIsError.ts ===
|
||||
const f3 = async function * yield() {
|
||||
>f3 : Symbol(f3, Decl(yieldNameIsError.ts, 0, 5))
|
||||
>yield : Symbol(yield, Decl(yieldNameIsError.ts, 0, 27), Decl(yieldAsTypeIsOk.ts, 0, 0))
|
||||
|
||||
};
|
||||
=== tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/awaitParameterIsError.ts ===
|
||||
=== tests/cases/conformance/parser/ecmascript2018/asyncGenerators/awaitParameterIsError.ts ===
|
||||
const f4 = async function * (await) {
|
||||
>f4 : Symbol(f4, Decl(awaitParameterIsError.ts, 0, 5))
|
||||
>await : Symbol(await, Decl(awaitParameterIsError.ts, 0, 29))
|
||||
|
||||
};
|
||||
=== tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/yieldParameterIsError.ts ===
|
||||
=== tests/cases/conformance/parser/ecmascript2018/asyncGenerators/yieldParameterIsError.ts ===
|
||||
const f5 = async function * (yield) {
|
||||
>f5 : Symbol(f5, Decl(yieldParameterIsError.ts, 0, 5))
|
||||
>yield : Symbol(yield, Decl(yieldParameterIsError.ts, 0, 29))
|
||||
|
||||
};
|
||||
=== tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/awaitInParameterInitializerIsError.ts ===
|
||||
=== tests/cases/conformance/parser/ecmascript2018/asyncGenerators/awaitInParameterInitializerIsError.ts ===
|
||||
const f6 = async function * (a = await 1) {
|
||||
>f6 : Symbol(f6, Decl(awaitInParameterInitializerIsError.ts, 0, 5))
|
||||
>a : Symbol(a, Decl(awaitInParameterInitializerIsError.ts, 0, 29))
|
||||
|
||||
};
|
||||
=== tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/yieldInParameterInitializerIsError.ts ===
|
||||
=== tests/cases/conformance/parser/ecmascript2018/asyncGenerators/yieldInParameterInitializerIsError.ts ===
|
||||
const f7 = async function * (a = yield) {
|
||||
>f7 : Symbol(f7, Decl(yieldInParameterInitializerIsError.ts, 0, 5))
|
||||
>a : Symbol(a, Decl(yieldInParameterInitializerIsError.ts, 0, 29))
|
||||
|
||||
};
|
||||
=== tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/nestedAsyncGeneratorIsOk.ts ===
|
||||
=== tests/cases/conformance/parser/ecmascript2018/asyncGenerators/nestedAsyncGeneratorIsOk.ts ===
|
||||
const f8 = async function * () {
|
||||
>f8 : Symbol(f8, Decl(nestedAsyncGeneratorIsOk.ts, 0, 5))
|
||||
|
||||
@ -48,7 +48,7 @@ const f8 = async function * () {
|
||||
>g : Symbol(g, Decl(nestedAsyncGeneratorIsOk.ts, 0, 32))
|
||||
}
|
||||
};
|
||||
=== tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/nestedFunctionDeclarationNamedYieldIsError.ts ===
|
||||
=== tests/cases/conformance/parser/ecmascript2018/asyncGenerators/nestedFunctionDeclarationNamedYieldIsError.ts ===
|
||||
const f9 = async function * () {
|
||||
>f9 : Symbol(f9, Decl(nestedFunctionDeclarationNamedYieldIsError.ts, 0, 5))
|
||||
|
||||
@ -56,7 +56,7 @@ const f9 = async function * () {
|
||||
> : Symbol((Missing), Decl(nestedFunctionDeclarationNamedYieldIsError.ts, 0, 32))
|
||||
}
|
||||
};
|
||||
=== tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/nestedFunctionExpressionNamedYieldIsError.ts ===
|
||||
=== tests/cases/conformance/parser/ecmascript2018/asyncGenerators/nestedFunctionExpressionNamedYieldIsError.ts ===
|
||||
const f10 = async function * () {
|
||||
>f10 : Symbol(f10, Decl(nestedFunctionExpressionNamedYieldIsError.ts, 0, 5))
|
||||
|
||||
@ -65,7 +65,7 @@ const f10 = async function * () {
|
||||
|
||||
};
|
||||
};
|
||||
=== tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/nestedFunctionDeclarationNamedAwaitIsError.ts ===
|
||||
=== tests/cases/conformance/parser/ecmascript2018/asyncGenerators/nestedFunctionDeclarationNamedAwaitIsError.ts ===
|
||||
const f11 = async function * () {
|
||||
>f11 : Symbol(f11, Decl(nestedFunctionDeclarationNamedAwaitIsError.ts, 0, 5))
|
||||
|
||||
@ -73,7 +73,7 @@ const f11 = async function * () {
|
||||
> : Symbol((Missing), Decl(nestedFunctionDeclarationNamedAwaitIsError.ts, 0, 33))
|
||||
}
|
||||
};
|
||||
=== tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/nestedFunctionExpressionNamedAwaitIsError.ts ===
|
||||
=== tests/cases/conformance/parser/ecmascript2018/asyncGenerators/nestedFunctionExpressionNamedAwaitIsError.ts ===
|
||||
const f12 = async function * () {
|
||||
>f12 : Symbol(f12, Decl(nestedFunctionExpressionNamedAwaitIsError.ts, 0, 5))
|
||||
|
||||
@ -82,43 +82,43 @@ const f12 = async function * () {
|
||||
|
||||
};
|
||||
};
|
||||
=== tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/yieldIsOk.ts ===
|
||||
=== tests/cases/conformance/parser/ecmascript2018/asyncGenerators/yieldIsOk.ts ===
|
||||
const f13 = async function * () {
|
||||
>f13 : Symbol(f13, Decl(yieldIsOk.ts, 0, 5))
|
||||
|
||||
yield;
|
||||
};
|
||||
=== tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/yieldWithValueIsOk.ts ===
|
||||
=== tests/cases/conformance/parser/ecmascript2018/asyncGenerators/yieldWithValueIsOk.ts ===
|
||||
const f14 = async function * () {
|
||||
>f14 : Symbol(f14, Decl(yieldWithValueIsOk.ts, 0, 5))
|
||||
|
||||
yield 1;
|
||||
};
|
||||
=== tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/yieldStarMissingValueIsError.ts ===
|
||||
=== tests/cases/conformance/parser/ecmascript2018/asyncGenerators/yieldStarMissingValueIsError.ts ===
|
||||
const f15 = async function * () {
|
||||
>f15 : Symbol(f15, Decl(yieldStarMissingValueIsError.ts, 0, 5))
|
||||
|
||||
yield *;
|
||||
};
|
||||
=== tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/yieldStarWithValueIsOk.ts ===
|
||||
=== tests/cases/conformance/parser/ecmascript2018/asyncGenerators/yieldStarWithValueIsOk.ts ===
|
||||
const f16 = async function * () {
|
||||
>f16 : Symbol(f16, Decl(yieldStarWithValueIsOk.ts, 0, 5))
|
||||
|
||||
yield * [];
|
||||
};
|
||||
=== tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/awaitWithValueIsOk.ts ===
|
||||
=== tests/cases/conformance/parser/ecmascript2018/asyncGenerators/awaitWithValueIsOk.ts ===
|
||||
const f17 = async function * () {
|
||||
>f17 : Symbol(f17, Decl(awaitWithValueIsOk.ts, 0, 5))
|
||||
|
||||
await 1;
|
||||
};
|
||||
=== tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/awaitMissingValueIsError.ts ===
|
||||
=== tests/cases/conformance/parser/ecmascript2018/asyncGenerators/awaitMissingValueIsError.ts ===
|
||||
const f18 = async function * () {
|
||||
>f18 : Symbol(f18, Decl(awaitMissingValueIsError.ts, 0, 5))
|
||||
|
||||
await;
|
||||
};
|
||||
=== tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/awaitAsTypeIsOk.ts ===
|
||||
=== tests/cases/conformance/parser/ecmascript2018/asyncGenerators/awaitAsTypeIsOk.ts ===
|
||||
interface await {}
|
||||
>await : Symbol(await, Decl(awaitNameIsError.ts, 0, 27), Decl(awaitAsTypeIsOk.ts, 0, 0))
|
||||
|
||||
@ -130,7 +130,7 @@ const f19 = async function * () {
|
||||
>await : Symbol(await, Decl(awaitNameIsError.ts, 0, 27), Decl(awaitAsTypeIsOk.ts, 0, 0))
|
||||
|
||||
};
|
||||
=== tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/yieldAsTypeIsOk.ts ===
|
||||
=== tests/cases/conformance/parser/ecmascript2018/asyncGenerators/yieldAsTypeIsOk.ts ===
|
||||
interface yield {}
|
||||
>yield : Symbol(yield, Decl(yieldNameIsError.ts, 0, 27), Decl(yieldAsTypeIsOk.ts, 0, 0))
|
||||
|
||||
@ -142,7 +142,7 @@ const f20 = async function * () {
|
||||
>yield : Symbol(yield, Decl(yieldNameIsError.ts, 0, 27), Decl(yieldAsTypeIsOk.ts, 0, 0))
|
||||
|
||||
};
|
||||
=== tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/yieldInNestedComputedPropertyIsOk.ts ===
|
||||
=== tests/cases/conformance/parser/ecmascript2018/asyncGenerators/yieldInNestedComputedPropertyIsOk.ts ===
|
||||
const f21 = async function *() {
|
||||
>f21 : Symbol(f21, Decl(yieldInNestedComputedPropertyIsOk.ts, 0, 5))
|
||||
|
||||
@ -1,11 +1,11 @@
|
||||
=== tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/functionExpressionIsOk.ts ===
|
||||
=== tests/cases/conformance/parser/ecmascript2018/asyncGenerators/functionExpressionIsOk.ts ===
|
||||
const f1 = async function * f() {
|
||||
>f1 : () => AsyncIterableIterator<any>
|
||||
>async function * f() {} : () => AsyncIterableIterator<any>
|
||||
>f : () => AsyncIterableIterator<any>
|
||||
|
||||
};
|
||||
=== tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/awaitNameIsError.ts ===
|
||||
=== tests/cases/conformance/parser/ecmascript2018/asyncGenerators/awaitNameIsError.ts ===
|
||||
const f2 = async function * await() {
|
||||
>f2 : () => any
|
||||
>async function * : () => any
|
||||
@ -13,7 +13,7 @@ const f2 = async function * await() {
|
||||
>() {} : () => void
|
||||
|
||||
};
|
||||
=== tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/yieldNameIsError.ts ===
|
||||
=== tests/cases/conformance/parser/ecmascript2018/asyncGenerators/yieldNameIsError.ts ===
|
||||
const f3 = async function * yield() {
|
||||
>f3 : () => any
|
||||
>async function * : () => any
|
||||
@ -21,21 +21,21 @@ const f3 = async function * yield() {
|
||||
>() {} : () => void
|
||||
|
||||
};
|
||||
=== tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/awaitParameterIsError.ts ===
|
||||
=== tests/cases/conformance/parser/ecmascript2018/asyncGenerators/awaitParameterIsError.ts ===
|
||||
const f4 = async function * (await) {
|
||||
>f4 : () => any
|
||||
>async function * ( : () => any
|
||||
>await : any
|
||||
|
||||
};
|
||||
=== tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/yieldParameterIsError.ts ===
|
||||
=== tests/cases/conformance/parser/ecmascript2018/asyncGenerators/yieldParameterIsError.ts ===
|
||||
const f5 = async function * (yield) {
|
||||
>f5 : () => any
|
||||
>async function * ( : () => any
|
||||
>yield : any
|
||||
|
||||
};
|
||||
=== tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/awaitInParameterInitializerIsError.ts ===
|
||||
=== tests/cases/conformance/parser/ecmascript2018/asyncGenerators/awaitInParameterInitializerIsError.ts ===
|
||||
const f6 = async function * (a = await 1) {
|
||||
>f6 : (a?: number) => AsyncIterableIterator<any>
|
||||
>async function * (a = await 1) {} : (a?: number) => AsyncIterableIterator<any>
|
||||
@ -44,7 +44,7 @@ const f6 = async function * (a = await 1) {
|
||||
>1 : 1
|
||||
|
||||
};
|
||||
=== tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/yieldInParameterInitializerIsError.ts ===
|
||||
=== tests/cases/conformance/parser/ecmascript2018/asyncGenerators/yieldInParameterInitializerIsError.ts ===
|
||||
const f7 = async function * (a = yield) {
|
||||
>f7 : (a?: any) => AsyncIterableIterator<any>
|
||||
>async function * (a = yield) {} : (a?: any) => AsyncIterableIterator<any>
|
||||
@ -52,7 +52,7 @@ const f7 = async function * (a = yield) {
|
||||
>yield : any
|
||||
|
||||
};
|
||||
=== tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/nestedAsyncGeneratorIsOk.ts ===
|
||||
=== tests/cases/conformance/parser/ecmascript2018/asyncGenerators/nestedAsyncGeneratorIsOk.ts ===
|
||||
const f8 = async function * () {
|
||||
>f8 : () => AsyncIterableIterator<any>
|
||||
>async function * () { async function * g() { }} : () => AsyncIterableIterator<any>
|
||||
@ -61,7 +61,7 @@ const f8 = async function * () {
|
||||
>g : () => AsyncIterableIterator<any>
|
||||
}
|
||||
};
|
||||
=== tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/nestedFunctionDeclarationNamedYieldIsError.ts ===
|
||||
=== tests/cases/conformance/parser/ecmascript2018/asyncGenerators/nestedFunctionDeclarationNamedYieldIsError.ts ===
|
||||
const f9 = async function * () {
|
||||
>f9 : () => AsyncIterableIterator<() => void>
|
||||
>async function * () { function yield() { }} : () => AsyncIterableIterator<() => void>
|
||||
@ -72,7 +72,7 @@ const f9 = async function * () {
|
||||
>() { } : () => void
|
||||
}
|
||||
};
|
||||
=== tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/nestedFunctionExpressionNamedYieldIsError.ts ===
|
||||
=== tests/cases/conformance/parser/ecmascript2018/asyncGenerators/nestedFunctionExpressionNamedYieldIsError.ts ===
|
||||
const f10 = async function * () {
|
||||
>f10 : () => AsyncIterableIterator<() => void>
|
||||
>async function * () { const x = function yield() { };} : () => AsyncIterableIterator<() => void>
|
||||
@ -85,7 +85,7 @@ const f10 = async function * () {
|
||||
|
||||
};
|
||||
};
|
||||
=== tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/nestedFunctionDeclarationNamedAwaitIsError.ts ===
|
||||
=== tests/cases/conformance/parser/ecmascript2018/asyncGenerators/nestedFunctionDeclarationNamedAwaitIsError.ts ===
|
||||
const f11 = async function * () {
|
||||
>f11 : () => AsyncIterableIterator<any>
|
||||
>async function * () { function await() { }} : () => AsyncIterableIterator<any>
|
||||
@ -97,7 +97,7 @@ const f11 = async function * () {
|
||||
> : any
|
||||
}
|
||||
};
|
||||
=== tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/nestedFunctionExpressionNamedAwaitIsError.ts ===
|
||||
=== tests/cases/conformance/parser/ecmascript2018/asyncGenerators/nestedFunctionExpressionNamedAwaitIsError.ts ===
|
||||
const f12 = async function * () {
|
||||
>f12 : () => AsyncIterableIterator<any>
|
||||
>async function * () { const x = function await() { };} : () => AsyncIterableIterator<any>
|
||||
@ -111,7 +111,7 @@ const f12 = async function * () {
|
||||
|
||||
};
|
||||
};
|
||||
=== tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/yieldIsOk.ts ===
|
||||
=== tests/cases/conformance/parser/ecmascript2018/asyncGenerators/yieldIsOk.ts ===
|
||||
const f13 = async function * () {
|
||||
>f13 : () => AsyncIterableIterator<any>
|
||||
>async function * () { yield;} : () => AsyncIterableIterator<any>
|
||||
@ -120,7 +120,7 @@ const f13 = async function * () {
|
||||
>yield : any
|
||||
|
||||
};
|
||||
=== tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/yieldWithValueIsOk.ts ===
|
||||
=== tests/cases/conformance/parser/ecmascript2018/asyncGenerators/yieldWithValueIsOk.ts ===
|
||||
const f14 = async function * () {
|
||||
>f14 : () => AsyncIterableIterator<number>
|
||||
>async function * () { yield 1;} : () => AsyncIterableIterator<number>
|
||||
@ -130,7 +130,7 @@ const f14 = async function * () {
|
||||
>1 : 1
|
||||
|
||||
};
|
||||
=== tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/yieldStarMissingValueIsError.ts ===
|
||||
=== tests/cases/conformance/parser/ecmascript2018/asyncGenerators/yieldStarMissingValueIsError.ts ===
|
||||
const f15 = async function * () {
|
||||
>f15 : () => AsyncIterableIterator<any>
|
||||
>async function * () { yield *;} : () => AsyncIterableIterator<any>
|
||||
@ -140,7 +140,7 @@ const f15 = async function * () {
|
||||
> : any
|
||||
|
||||
};
|
||||
=== tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/yieldStarWithValueIsOk.ts ===
|
||||
=== tests/cases/conformance/parser/ecmascript2018/asyncGenerators/yieldStarWithValueIsOk.ts ===
|
||||
const f16 = async function * () {
|
||||
>f16 : () => AsyncIterableIterator<any>
|
||||
>async function * () { yield * [];} : () => AsyncIterableIterator<any>
|
||||
@ -150,7 +150,7 @@ const f16 = async function * () {
|
||||
>[] : undefined[]
|
||||
|
||||
};
|
||||
=== tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/awaitWithValueIsOk.ts ===
|
||||
=== tests/cases/conformance/parser/ecmascript2018/asyncGenerators/awaitWithValueIsOk.ts ===
|
||||
const f17 = async function * () {
|
||||
>f17 : () => AsyncIterableIterator<any>
|
||||
>async function * () { await 1;} : () => AsyncIterableIterator<any>
|
||||
@ -160,7 +160,7 @@ const f17 = async function * () {
|
||||
>1 : 1
|
||||
|
||||
};
|
||||
=== tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/awaitMissingValueIsError.ts ===
|
||||
=== tests/cases/conformance/parser/ecmascript2018/asyncGenerators/awaitMissingValueIsError.ts ===
|
||||
const f18 = async function * () {
|
||||
>f18 : () => AsyncIterableIterator<any>
|
||||
>async function * () { await;} : () => AsyncIterableIterator<any>
|
||||
@ -170,7 +170,7 @@ const f18 = async function * () {
|
||||
> : any
|
||||
|
||||
};
|
||||
=== tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/awaitAsTypeIsOk.ts ===
|
||||
=== tests/cases/conformance/parser/ecmascript2018/asyncGenerators/awaitAsTypeIsOk.ts ===
|
||||
interface await {}
|
||||
const f19 = async function * () {
|
||||
>f19 : () => AsyncIterableIterator<any>
|
||||
@ -180,7 +180,7 @@ const f19 = async function * () {
|
||||
>x : await
|
||||
|
||||
};
|
||||
=== tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/yieldAsTypeIsOk.ts ===
|
||||
=== tests/cases/conformance/parser/ecmascript2018/asyncGenerators/yieldAsTypeIsOk.ts ===
|
||||
interface yield {}
|
||||
const f20 = async function * () {
|
||||
>f20 : () => AsyncIterableIterator<any>
|
||||
@ -190,7 +190,7 @@ const f20 = async function * () {
|
||||
>x : yield
|
||||
|
||||
};
|
||||
=== tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/yieldInNestedComputedPropertyIsOk.ts ===
|
||||
=== tests/cases/conformance/parser/ecmascript2018/asyncGenerators/yieldInNestedComputedPropertyIsOk.ts ===
|
||||
const f21 = async function *() {
|
||||
>f21 : () => AsyncIterableIterator<any>
|
||||
>async function *() { const x = { [yield]: 1 };} : () => AsyncIterableIterator<any>
|
||||
@ -1,48 +1,48 @@
|
||||
tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/asyncGeneratorGetAccessorIsError.ts(2,17): error TS1005: '(' expected.
|
||||
tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/asyncGeneratorPropertyIsError.ts(2,14): error TS1005: '(' expected.
|
||||
tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/asyncGeneratorSetAccessorIsError.ts(2,17): error TS1005: '(' expected.
|
||||
tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/awaitInParameterInitializerIsError.ts(2,19): error TS2524: 'await' expressions cannot be used in a parameter initializer.
|
||||
tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/awaitMissingValueIsError.ts(3,14): error TS1109: Expression expected.
|
||||
tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/awaitParameterIsError.ts(2,15): error TS1138: Parameter declaration expected.
|
||||
tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/awaitParameterIsError.ts(2,15): error TS2693: 'await' only refers to a type, but is being used as a value here.
|
||||
tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/awaitParameterIsError.ts(2,20): error TS1005: ',' expected.
|
||||
tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/awaitParameterIsError.ts(2,22): error TS1136: Property assignment expected.
|
||||
tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/awaitParameterIsError.ts(4,1): error TS1128: Declaration or statement expected.
|
||||
tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/nestedFunctionDeclarationNamedAwaitIsError.ts(3,18): error TS1003: Identifier expected.
|
||||
tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/nestedFunctionDeclarationNamedAwaitIsError.ts(3,24): error TS1109: Expression expected.
|
||||
tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/nestedFunctionDeclarationNamedAwaitIsError.ts(3,26): error TS1005: ';' expected.
|
||||
tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/nestedFunctionDeclarationNamedYieldIsError.ts(3,18): error TS1003: Identifier expected.
|
||||
tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/nestedFunctionDeclarationNamedYieldIsError.ts(3,26): error TS1005: '=>' expected.
|
||||
tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/nestedFunctionExpressionNamedAwaitIsError.ts(3,28): error TS1005: '(' expected.
|
||||
tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/nestedFunctionExpressionNamedAwaitIsError.ts(3,34): error TS1109: Expression expected.
|
||||
tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/nestedFunctionExpressionNamedAwaitIsError.ts(3,36): error TS1005: ';' expected.
|
||||
tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/nestedFunctionExpressionNamedYieldIsError.ts(3,28): error TS1005: '(' expected.
|
||||
tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/nestedFunctionExpressionNamedYieldIsError.ts(3,36): error TS1005: '=>' expected.
|
||||
tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/yieldInParameterInitializerIsError.ts(2,19): error TS2523: 'yield' expressions cannot be used in a parameter initializer.
|
||||
tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/yieldParameterIsError.ts(2,15): error TS1138: Parameter declaration expected.
|
||||
tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/yieldParameterIsError.ts(2,15): error TS2693: 'yield' only refers to a type, but is being used as a value here.
|
||||
tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/yieldParameterIsError.ts(2,20): error TS1005: ',' expected.
|
||||
tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/yieldParameterIsError.ts(2,22): error TS1136: Property assignment expected.
|
||||
tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/yieldParameterIsError.ts(4,1): error TS1128: Declaration or statement expected.
|
||||
tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/yieldStarMissingValueIsError.ts(3,16): error TS1109: Expression expected.
|
||||
tests/cases/conformance/parser/ecmascript2018/asyncGenerators/asyncGeneratorGetAccessorIsError.ts(2,17): error TS1005: '(' expected.
|
||||
tests/cases/conformance/parser/ecmascript2018/asyncGenerators/asyncGeneratorPropertyIsError.ts(2,14): error TS1005: '(' expected.
|
||||
tests/cases/conformance/parser/ecmascript2018/asyncGenerators/asyncGeneratorSetAccessorIsError.ts(2,17): error TS1005: '(' expected.
|
||||
tests/cases/conformance/parser/ecmascript2018/asyncGenerators/awaitInParameterInitializerIsError.ts(2,19): error TS2524: 'await' expressions cannot be used in a parameter initializer.
|
||||
tests/cases/conformance/parser/ecmascript2018/asyncGenerators/awaitMissingValueIsError.ts(3,14): error TS1109: Expression expected.
|
||||
tests/cases/conformance/parser/ecmascript2018/asyncGenerators/awaitParameterIsError.ts(2,15): error TS1138: Parameter declaration expected.
|
||||
tests/cases/conformance/parser/ecmascript2018/asyncGenerators/awaitParameterIsError.ts(2,15): error TS2693: 'await' only refers to a type, but is being used as a value here.
|
||||
tests/cases/conformance/parser/ecmascript2018/asyncGenerators/awaitParameterIsError.ts(2,20): error TS1005: ',' expected.
|
||||
tests/cases/conformance/parser/ecmascript2018/asyncGenerators/awaitParameterIsError.ts(2,22): error TS1136: Property assignment expected.
|
||||
tests/cases/conformance/parser/ecmascript2018/asyncGenerators/awaitParameterIsError.ts(4,1): error TS1128: Declaration or statement expected.
|
||||
tests/cases/conformance/parser/ecmascript2018/asyncGenerators/nestedFunctionDeclarationNamedAwaitIsError.ts(3,18): error TS1003: Identifier expected.
|
||||
tests/cases/conformance/parser/ecmascript2018/asyncGenerators/nestedFunctionDeclarationNamedAwaitIsError.ts(3,24): error TS1109: Expression expected.
|
||||
tests/cases/conformance/parser/ecmascript2018/asyncGenerators/nestedFunctionDeclarationNamedAwaitIsError.ts(3,26): error TS1005: ';' expected.
|
||||
tests/cases/conformance/parser/ecmascript2018/asyncGenerators/nestedFunctionDeclarationNamedYieldIsError.ts(3,18): error TS1003: Identifier expected.
|
||||
tests/cases/conformance/parser/ecmascript2018/asyncGenerators/nestedFunctionDeclarationNamedYieldIsError.ts(3,26): error TS1005: '=>' expected.
|
||||
tests/cases/conformance/parser/ecmascript2018/asyncGenerators/nestedFunctionExpressionNamedAwaitIsError.ts(3,28): error TS1005: '(' expected.
|
||||
tests/cases/conformance/parser/ecmascript2018/asyncGenerators/nestedFunctionExpressionNamedAwaitIsError.ts(3,34): error TS1109: Expression expected.
|
||||
tests/cases/conformance/parser/ecmascript2018/asyncGenerators/nestedFunctionExpressionNamedAwaitIsError.ts(3,36): error TS1005: ';' expected.
|
||||
tests/cases/conformance/parser/ecmascript2018/asyncGenerators/nestedFunctionExpressionNamedYieldIsError.ts(3,28): error TS1005: '(' expected.
|
||||
tests/cases/conformance/parser/ecmascript2018/asyncGenerators/nestedFunctionExpressionNamedYieldIsError.ts(3,36): error TS1005: '=>' expected.
|
||||
tests/cases/conformance/parser/ecmascript2018/asyncGenerators/yieldInParameterInitializerIsError.ts(2,19): error TS2523: 'yield' expressions cannot be used in a parameter initializer.
|
||||
tests/cases/conformance/parser/ecmascript2018/asyncGenerators/yieldParameterIsError.ts(2,15): error TS1138: Parameter declaration expected.
|
||||
tests/cases/conformance/parser/ecmascript2018/asyncGenerators/yieldParameterIsError.ts(2,15): error TS2693: 'yield' only refers to a type, but is being used as a value here.
|
||||
tests/cases/conformance/parser/ecmascript2018/asyncGenerators/yieldParameterIsError.ts(2,20): error TS1005: ',' expected.
|
||||
tests/cases/conformance/parser/ecmascript2018/asyncGenerators/yieldParameterIsError.ts(2,22): error TS1136: Property assignment expected.
|
||||
tests/cases/conformance/parser/ecmascript2018/asyncGenerators/yieldParameterIsError.ts(4,1): error TS1128: Declaration or statement expected.
|
||||
tests/cases/conformance/parser/ecmascript2018/asyncGenerators/yieldStarMissingValueIsError.ts(3,16): error TS1109: Expression expected.
|
||||
|
||||
|
||||
==== tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/methodIsOk.ts (0 errors) ====
|
||||
==== tests/cases/conformance/parser/ecmascript2018/asyncGenerators/methodIsOk.ts (0 errors) ====
|
||||
const o1 = {
|
||||
async * f() {
|
||||
}
|
||||
};
|
||||
==== tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/awaitMethodNameIsOk.ts (0 errors) ====
|
||||
==== tests/cases/conformance/parser/ecmascript2018/asyncGenerators/awaitMethodNameIsOk.ts (0 errors) ====
|
||||
const o2 = {
|
||||
async * await() {
|
||||
}
|
||||
};
|
||||
==== tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/yieldMethodNameIsOk.ts (0 errors) ====
|
||||
==== tests/cases/conformance/parser/ecmascript2018/asyncGenerators/yieldMethodNameIsOk.ts (0 errors) ====
|
||||
const o3 = {
|
||||
async * yield() {
|
||||
}
|
||||
};
|
||||
==== tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/awaitParameterIsError.ts (5 errors) ====
|
||||
==== tests/cases/conformance/parser/ecmascript2018/asyncGenerators/awaitParameterIsError.ts (5 errors) ====
|
||||
const o4 = {
|
||||
async * f(await) {
|
||||
~~~~~
|
||||
@ -57,7 +57,7 @@ tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/yieldStarMissingVa
|
||||
};
|
||||
~
|
||||
!!! error TS1128: Declaration or statement expected.
|
||||
==== tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/yieldParameterIsError.ts (5 errors) ====
|
||||
==== tests/cases/conformance/parser/ecmascript2018/asyncGenerators/yieldParameterIsError.ts (5 errors) ====
|
||||
const o5 = {
|
||||
async * f(yield) {
|
||||
~~~~~
|
||||
@ -72,28 +72,28 @@ tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/yieldStarMissingVa
|
||||
};
|
||||
~
|
||||
!!! error TS1128: Declaration or statement expected.
|
||||
==== tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/awaitInParameterInitializerIsError.ts (1 errors) ====
|
||||
==== tests/cases/conformance/parser/ecmascript2018/asyncGenerators/awaitInParameterInitializerIsError.ts (1 errors) ====
|
||||
const o6 = {
|
||||
async * f(a = await 1) {
|
||||
~~~~~~~
|
||||
!!! error TS2524: 'await' expressions cannot be used in a parameter initializer.
|
||||
}
|
||||
};
|
||||
==== tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/yieldInParameterInitializerIsError.ts (1 errors) ====
|
||||
==== tests/cases/conformance/parser/ecmascript2018/asyncGenerators/yieldInParameterInitializerIsError.ts (1 errors) ====
|
||||
const o7 = {
|
||||
async * f(a = yield) {
|
||||
~~~~~
|
||||
!!! error TS2523: 'yield' expressions cannot be used in a parameter initializer.
|
||||
}
|
||||
};
|
||||
==== tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/nestedAsyncGeneratorIsOk.ts (0 errors) ====
|
||||
==== tests/cases/conformance/parser/ecmascript2018/asyncGenerators/nestedAsyncGeneratorIsOk.ts (0 errors) ====
|
||||
const o8 = {
|
||||
async * f() {
|
||||
async function * g() {
|
||||
}
|
||||
}
|
||||
};
|
||||
==== tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/nestedFunctionDeclarationNamedYieldIsError.ts (2 errors) ====
|
||||
==== tests/cases/conformance/parser/ecmascript2018/asyncGenerators/nestedFunctionDeclarationNamedYieldIsError.ts (2 errors) ====
|
||||
const o9 = {
|
||||
async * f() {
|
||||
function yield() {
|
||||
@ -104,7 +104,7 @@ tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/yieldStarMissingVa
|
||||
}
|
||||
}
|
||||
};
|
||||
==== tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/nestedFunctionExpressionNamedYieldIsError.ts (2 errors) ====
|
||||
==== tests/cases/conformance/parser/ecmascript2018/asyncGenerators/nestedFunctionExpressionNamedYieldIsError.ts (2 errors) ====
|
||||
const o10 = {
|
||||
async * f() {
|
||||
const x = function yield() {
|
||||
@ -115,7 +115,7 @@ tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/yieldStarMissingVa
|
||||
};
|
||||
}
|
||||
};
|
||||
==== tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/nestedFunctionDeclarationNamedAwaitIsError.ts (3 errors) ====
|
||||
==== tests/cases/conformance/parser/ecmascript2018/asyncGenerators/nestedFunctionDeclarationNamedAwaitIsError.ts (3 errors) ====
|
||||
const o11 = {
|
||||
async * f() {
|
||||
function await() {
|
||||
@ -128,7 +128,7 @@ tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/yieldStarMissingVa
|
||||
}
|
||||
}
|
||||
};
|
||||
==== tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/nestedFunctionExpressionNamedAwaitIsError.ts (3 errors) ====
|
||||
==== tests/cases/conformance/parser/ecmascript2018/asyncGenerators/nestedFunctionExpressionNamedAwaitIsError.ts (3 errors) ====
|
||||
const o12 = {
|
||||
async * f() {
|
||||
const x = function await() {
|
||||
@ -141,19 +141,19 @@ tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/yieldStarMissingVa
|
||||
};
|
||||
}
|
||||
};
|
||||
==== tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/yieldIsOk.ts (0 errors) ====
|
||||
==== tests/cases/conformance/parser/ecmascript2018/asyncGenerators/yieldIsOk.ts (0 errors) ====
|
||||
const o13 = {
|
||||
async * f() {
|
||||
yield;
|
||||
}
|
||||
};
|
||||
==== tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/yieldWithValueIsOk.ts (0 errors) ====
|
||||
==== tests/cases/conformance/parser/ecmascript2018/asyncGenerators/yieldWithValueIsOk.ts (0 errors) ====
|
||||
const o14 = {
|
||||
async * f() {
|
||||
yield 1;
|
||||
}
|
||||
};
|
||||
==== tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/yieldStarMissingValueIsError.ts (1 errors) ====
|
||||
==== tests/cases/conformance/parser/ecmascript2018/asyncGenerators/yieldStarMissingValueIsError.ts (1 errors) ====
|
||||
const o15 = {
|
||||
async * f() {
|
||||
yield *;
|
||||
@ -161,19 +161,19 @@ tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/yieldStarMissingVa
|
||||
!!! error TS1109: Expression expected.
|
||||
}
|
||||
};
|
||||
==== tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/yieldStarWithValueIsOk.ts (0 errors) ====
|
||||
==== tests/cases/conformance/parser/ecmascript2018/asyncGenerators/yieldStarWithValueIsOk.ts (0 errors) ====
|
||||
const o16 = {
|
||||
async * f() {
|
||||
yield * [];
|
||||
}
|
||||
};
|
||||
==== tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/awaitWithValueIsOk.ts (0 errors) ====
|
||||
==== tests/cases/conformance/parser/ecmascript2018/asyncGenerators/awaitWithValueIsOk.ts (0 errors) ====
|
||||
const o17 = {
|
||||
async * f() {
|
||||
await 1;
|
||||
}
|
||||
};
|
||||
==== tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/awaitMissingValueIsError.ts (1 errors) ====
|
||||
==== tests/cases/conformance/parser/ecmascript2018/asyncGenerators/awaitMissingValueIsError.ts (1 errors) ====
|
||||
const o18 = {
|
||||
async * f() {
|
||||
await;
|
||||
@ -181,27 +181,27 @@ tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/yieldStarMissingVa
|
||||
!!! error TS1109: Expression expected.
|
||||
}
|
||||
};
|
||||
==== tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/awaitAsTypeIsOk.ts (0 errors) ====
|
||||
==== tests/cases/conformance/parser/ecmascript2018/asyncGenerators/awaitAsTypeIsOk.ts (0 errors) ====
|
||||
interface await {}
|
||||
const o19 = {
|
||||
async * f() {
|
||||
let x: await;
|
||||
}
|
||||
};
|
||||
==== tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/yieldAsTypeIsOk.ts (0 errors) ====
|
||||
==== tests/cases/conformance/parser/ecmascript2018/asyncGenerators/yieldAsTypeIsOk.ts (0 errors) ====
|
||||
interface yield {}
|
||||
const o20 = {
|
||||
async * f() {
|
||||
let x: yield;
|
||||
}
|
||||
};
|
||||
==== tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/yieldInNestedComputedPropertyIsOk.ts (0 errors) ====
|
||||
==== tests/cases/conformance/parser/ecmascript2018/asyncGenerators/yieldInNestedComputedPropertyIsOk.ts (0 errors) ====
|
||||
const o21 = {
|
||||
async * f() {
|
||||
const x = { [yield]: 1 };
|
||||
}
|
||||
};
|
||||
==== tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/asyncGeneratorGetAccessorIsError.ts (1 errors) ====
|
||||
==== tests/cases/conformance/parser/ecmascript2018/asyncGenerators/asyncGeneratorGetAccessorIsError.ts (1 errors) ====
|
||||
const o22 = {
|
||||
async * get x() {
|
||||
~
|
||||
@ -209,16 +209,17 @@ tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/yieldStarMissingVa
|
||||
return 1;
|
||||
}
|
||||
};
|
||||
==== tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/asyncGeneratorSetAccessorIsError.ts (1 errors) ====
|
||||
==== tests/cases/conformance/parser/ecmascript2018/asyncGenerators/asyncGeneratorSetAccessorIsError.ts (1 errors) ====
|
||||
const o23 = {
|
||||
async * set x(value: number) {
|
||||
~
|
||||
!!! error TS1005: '(' expected.
|
||||
}
|
||||
};
|
||||
==== tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/asyncGeneratorPropertyIsError.ts (1 errors) ====
|
||||
==== tests/cases/conformance/parser/ecmascript2018/asyncGenerators/asyncGeneratorPropertyIsError.ts (1 errors) ====
|
||||
const o24 = {
|
||||
async * x: 1;
|
||||
~
|
||||
!!! error TS1005: '(' expected.
|
||||
};
|
||||
};
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
=== tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/methodIsOk.ts ===
|
||||
=== tests/cases/conformance/parser/ecmascript2018/asyncGenerators/methodIsOk.ts ===
|
||||
const o1 = {
|
||||
>o1 : Symbol(o1, Decl(methodIsOk.ts, 0, 5))
|
||||
|
||||
@ -6,7 +6,7 @@ const o1 = {
|
||||
>f : Symbol(f, Decl(methodIsOk.ts, 0, 12))
|
||||
}
|
||||
};
|
||||
=== tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/awaitMethodNameIsOk.ts ===
|
||||
=== tests/cases/conformance/parser/ecmascript2018/asyncGenerators/awaitMethodNameIsOk.ts ===
|
||||
const o2 = {
|
||||
>o2 : Symbol(o2, Decl(awaitMethodNameIsOk.ts, 0, 5))
|
||||
|
||||
@ -14,7 +14,7 @@ const o2 = {
|
||||
>await : Symbol(await, Decl(awaitMethodNameIsOk.ts, 0, 12))
|
||||
}
|
||||
};
|
||||
=== tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/yieldMethodNameIsOk.ts ===
|
||||
=== tests/cases/conformance/parser/ecmascript2018/asyncGenerators/yieldMethodNameIsOk.ts ===
|
||||
const o3 = {
|
||||
>o3 : Symbol(o3, Decl(yieldMethodNameIsOk.ts, 0, 5))
|
||||
|
||||
@ -22,7 +22,7 @@ const o3 = {
|
||||
>yield : Symbol(yield, Decl(yieldMethodNameIsOk.ts, 0, 12))
|
||||
}
|
||||
};
|
||||
=== tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/awaitParameterIsError.ts ===
|
||||
=== tests/cases/conformance/parser/ecmascript2018/asyncGenerators/awaitParameterIsError.ts ===
|
||||
const o4 = {
|
||||
>o4 : Symbol(o4, Decl(awaitParameterIsError.ts, 0, 5))
|
||||
|
||||
@ -31,7 +31,7 @@ const o4 = {
|
||||
>await : Symbol(await, Decl(awaitParameterIsError.ts, 1, 14))
|
||||
}
|
||||
};
|
||||
=== tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/yieldParameterIsError.ts ===
|
||||
=== tests/cases/conformance/parser/ecmascript2018/asyncGenerators/yieldParameterIsError.ts ===
|
||||
const o5 = {
|
||||
>o5 : Symbol(o5, Decl(yieldParameterIsError.ts, 0, 5))
|
||||
|
||||
@ -40,7 +40,7 @@ const o5 = {
|
||||
>yield : Symbol(yield, Decl(yieldParameterIsError.ts, 1, 14))
|
||||
}
|
||||
};
|
||||
=== tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/awaitInParameterInitializerIsError.ts ===
|
||||
=== tests/cases/conformance/parser/ecmascript2018/asyncGenerators/awaitInParameterInitializerIsError.ts ===
|
||||
const o6 = {
|
||||
>o6 : Symbol(o6, Decl(awaitInParameterInitializerIsError.ts, 0, 5))
|
||||
|
||||
@ -49,7 +49,7 @@ const o6 = {
|
||||
>a : Symbol(a, Decl(awaitInParameterInitializerIsError.ts, 1, 14))
|
||||
}
|
||||
};
|
||||
=== tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/yieldInParameterInitializerIsError.ts ===
|
||||
=== tests/cases/conformance/parser/ecmascript2018/asyncGenerators/yieldInParameterInitializerIsError.ts ===
|
||||
const o7 = {
|
||||
>o7 : Symbol(o7, Decl(yieldInParameterInitializerIsError.ts, 0, 5))
|
||||
|
||||
@ -58,7 +58,7 @@ const o7 = {
|
||||
>a : Symbol(a, Decl(yieldInParameterInitializerIsError.ts, 1, 14))
|
||||
}
|
||||
};
|
||||
=== tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/nestedAsyncGeneratorIsOk.ts ===
|
||||
=== tests/cases/conformance/parser/ecmascript2018/asyncGenerators/nestedAsyncGeneratorIsOk.ts ===
|
||||
const o8 = {
|
||||
>o8 : Symbol(o8, Decl(nestedAsyncGeneratorIsOk.ts, 0, 5))
|
||||
|
||||
@ -70,7 +70,7 @@ const o8 = {
|
||||
}
|
||||
}
|
||||
};
|
||||
=== tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/nestedFunctionDeclarationNamedYieldIsError.ts ===
|
||||
=== tests/cases/conformance/parser/ecmascript2018/asyncGenerators/nestedFunctionDeclarationNamedYieldIsError.ts ===
|
||||
const o9 = {
|
||||
>o9 : Symbol(o9, Decl(nestedFunctionDeclarationNamedYieldIsError.ts, 0, 5))
|
||||
|
||||
@ -82,7 +82,7 @@ const o9 = {
|
||||
}
|
||||
}
|
||||
};
|
||||
=== tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/nestedFunctionExpressionNamedYieldIsError.ts ===
|
||||
=== tests/cases/conformance/parser/ecmascript2018/asyncGenerators/nestedFunctionExpressionNamedYieldIsError.ts ===
|
||||
const o10 = {
|
||||
>o10 : Symbol(o10, Decl(nestedFunctionExpressionNamedYieldIsError.ts, 0, 5))
|
||||
|
||||
@ -95,7 +95,7 @@ const o10 = {
|
||||
};
|
||||
}
|
||||
};
|
||||
=== tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/nestedFunctionDeclarationNamedAwaitIsError.ts ===
|
||||
=== tests/cases/conformance/parser/ecmascript2018/asyncGenerators/nestedFunctionDeclarationNamedAwaitIsError.ts ===
|
||||
const o11 = {
|
||||
>o11 : Symbol(o11, Decl(nestedFunctionDeclarationNamedAwaitIsError.ts, 0, 5))
|
||||
|
||||
@ -107,7 +107,7 @@ const o11 = {
|
||||
}
|
||||
}
|
||||
};
|
||||
=== tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/nestedFunctionExpressionNamedAwaitIsError.ts ===
|
||||
=== tests/cases/conformance/parser/ecmascript2018/asyncGenerators/nestedFunctionExpressionNamedAwaitIsError.ts ===
|
||||
const o12 = {
|
||||
>o12 : Symbol(o12, Decl(nestedFunctionExpressionNamedAwaitIsError.ts, 0, 5))
|
||||
|
||||
@ -120,7 +120,7 @@ const o12 = {
|
||||
};
|
||||
}
|
||||
};
|
||||
=== tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/yieldIsOk.ts ===
|
||||
=== tests/cases/conformance/parser/ecmascript2018/asyncGenerators/yieldIsOk.ts ===
|
||||
const o13 = {
|
||||
>o13 : Symbol(o13, Decl(yieldIsOk.ts, 0, 5))
|
||||
|
||||
@ -130,7 +130,7 @@ const o13 = {
|
||||
yield;
|
||||
}
|
||||
};
|
||||
=== tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/yieldWithValueIsOk.ts ===
|
||||
=== tests/cases/conformance/parser/ecmascript2018/asyncGenerators/yieldWithValueIsOk.ts ===
|
||||
const o14 = {
|
||||
>o14 : Symbol(o14, Decl(yieldWithValueIsOk.ts, 0, 5))
|
||||
|
||||
@ -140,7 +140,7 @@ const o14 = {
|
||||
yield 1;
|
||||
}
|
||||
};
|
||||
=== tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/yieldStarMissingValueIsError.ts ===
|
||||
=== tests/cases/conformance/parser/ecmascript2018/asyncGenerators/yieldStarMissingValueIsError.ts ===
|
||||
const o15 = {
|
||||
>o15 : Symbol(o15, Decl(yieldStarMissingValueIsError.ts, 0, 5))
|
||||
|
||||
@ -150,7 +150,7 @@ const o15 = {
|
||||
yield *;
|
||||
}
|
||||
};
|
||||
=== tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/yieldStarWithValueIsOk.ts ===
|
||||
=== tests/cases/conformance/parser/ecmascript2018/asyncGenerators/yieldStarWithValueIsOk.ts ===
|
||||
const o16 = {
|
||||
>o16 : Symbol(o16, Decl(yieldStarWithValueIsOk.ts, 0, 5))
|
||||
|
||||
@ -160,7 +160,7 @@ const o16 = {
|
||||
yield * [];
|
||||
}
|
||||
};
|
||||
=== tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/awaitWithValueIsOk.ts ===
|
||||
=== tests/cases/conformance/parser/ecmascript2018/asyncGenerators/awaitWithValueIsOk.ts ===
|
||||
const o17 = {
|
||||
>o17 : Symbol(o17, Decl(awaitWithValueIsOk.ts, 0, 5))
|
||||
|
||||
@ -170,7 +170,7 @@ const o17 = {
|
||||
await 1;
|
||||
}
|
||||
};
|
||||
=== tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/awaitMissingValueIsError.ts ===
|
||||
=== tests/cases/conformance/parser/ecmascript2018/asyncGenerators/awaitMissingValueIsError.ts ===
|
||||
const o18 = {
|
||||
>o18 : Symbol(o18, Decl(awaitMissingValueIsError.ts, 0, 5))
|
||||
|
||||
@ -180,7 +180,7 @@ const o18 = {
|
||||
await;
|
||||
}
|
||||
};
|
||||
=== tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/awaitAsTypeIsOk.ts ===
|
||||
=== tests/cases/conformance/parser/ecmascript2018/asyncGenerators/awaitAsTypeIsOk.ts ===
|
||||
interface await {}
|
||||
>await : Symbol(await, Decl(awaitAsTypeIsOk.ts, 0, 0))
|
||||
|
||||
@ -195,7 +195,7 @@ const o19 = {
|
||||
>await : Symbol(await, Decl(awaitAsTypeIsOk.ts, 0, 0))
|
||||
}
|
||||
};
|
||||
=== tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/yieldAsTypeIsOk.ts ===
|
||||
=== tests/cases/conformance/parser/ecmascript2018/asyncGenerators/yieldAsTypeIsOk.ts ===
|
||||
interface yield {}
|
||||
>yield : Symbol(yield, Decl(yieldAsTypeIsOk.ts, 0, 0))
|
||||
|
||||
@ -210,7 +210,7 @@ const o20 = {
|
||||
>yield : Symbol(yield, Decl(yieldAsTypeIsOk.ts, 0, 0))
|
||||
}
|
||||
};
|
||||
=== tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/yieldInNestedComputedPropertyIsOk.ts ===
|
||||
=== tests/cases/conformance/parser/ecmascript2018/asyncGenerators/yieldInNestedComputedPropertyIsOk.ts ===
|
||||
const o21 = {
|
||||
>o21 : Symbol(o21, Decl(yieldInNestedComputedPropertyIsOk.ts, 0, 5))
|
||||
|
||||
@ -222,7 +222,7 @@ const o21 = {
|
||||
>[yield] : Symbol([yield], Decl(yieldInNestedComputedPropertyIsOk.ts, 2, 19))
|
||||
}
|
||||
};
|
||||
=== tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/asyncGeneratorGetAccessorIsError.ts ===
|
||||
=== tests/cases/conformance/parser/ecmascript2018/asyncGenerators/asyncGeneratorGetAccessorIsError.ts ===
|
||||
const o22 = {
|
||||
>o22 : Symbol(o22, Decl(asyncGeneratorGetAccessorIsError.ts, 0, 5))
|
||||
|
||||
@ -233,7 +233,7 @@ const o22 = {
|
||||
return 1;
|
||||
}
|
||||
};
|
||||
=== tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/asyncGeneratorSetAccessorIsError.ts ===
|
||||
=== tests/cases/conformance/parser/ecmascript2018/asyncGenerators/asyncGeneratorSetAccessorIsError.ts ===
|
||||
const o23 = {
|
||||
>o23 : Symbol(o23, Decl(asyncGeneratorSetAccessorIsError.ts, 0, 5))
|
||||
|
||||
@ -243,7 +243,7 @@ const o23 = {
|
||||
>value : Symbol(value, Decl(asyncGeneratorSetAccessorIsError.ts, 1, 18))
|
||||
}
|
||||
};
|
||||
=== tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/asyncGeneratorPropertyIsError.ts ===
|
||||
=== tests/cases/conformance/parser/ecmascript2018/asyncGenerators/asyncGeneratorPropertyIsError.ts ===
|
||||
const o24 = {
|
||||
>o24 : Symbol(o24, Decl(asyncGeneratorPropertyIsError.ts, 0, 5))
|
||||
|
||||
@ -251,3 +251,4 @@ const o24 = {
|
||||
>x : Symbol(x, Decl(asyncGeneratorPropertyIsError.ts, 0, 13))
|
||||
|
||||
};
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
=== tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/methodIsOk.ts ===
|
||||
=== tests/cases/conformance/parser/ecmascript2018/asyncGenerators/methodIsOk.ts ===
|
||||
const o1 = {
|
||||
>o1 : { f(): AsyncIterableIterator<any>; }
|
||||
>{ async * f() { }} : { f(): AsyncIterableIterator<any>; }
|
||||
@ -7,7 +7,7 @@ const o1 = {
|
||||
>f : () => AsyncIterableIterator<any>
|
||||
}
|
||||
};
|
||||
=== tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/awaitMethodNameIsOk.ts ===
|
||||
=== tests/cases/conformance/parser/ecmascript2018/asyncGenerators/awaitMethodNameIsOk.ts ===
|
||||
const o2 = {
|
||||
>o2 : { await(): AsyncIterableIterator<any>; }
|
||||
>{ async * await() { }} : { await(): AsyncIterableIterator<any>; }
|
||||
@ -16,7 +16,7 @@ const o2 = {
|
||||
>await : () => AsyncIterableIterator<any>
|
||||
}
|
||||
};
|
||||
=== tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/yieldMethodNameIsOk.ts ===
|
||||
=== tests/cases/conformance/parser/ecmascript2018/asyncGenerators/yieldMethodNameIsOk.ts ===
|
||||
const o3 = {
|
||||
>o3 : { yield(): AsyncIterableIterator<any>; }
|
||||
>{ async * yield() { }} : { yield(): AsyncIterableIterator<any>; }
|
||||
@ -25,7 +25,7 @@ const o3 = {
|
||||
>yield : () => AsyncIterableIterator<any>
|
||||
}
|
||||
};
|
||||
=== tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/awaitParameterIsError.ts ===
|
||||
=== tests/cases/conformance/parser/ecmascript2018/asyncGenerators/awaitParameterIsError.ts ===
|
||||
const o4 = {
|
||||
>o4 : { f(): any; await: any; }
|
||||
>{ async * f(await) : { f(): any; await: any; }
|
||||
@ -35,7 +35,7 @@ const o4 = {
|
||||
>await : any
|
||||
}
|
||||
};
|
||||
=== tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/yieldParameterIsError.ts ===
|
||||
=== tests/cases/conformance/parser/ecmascript2018/asyncGenerators/yieldParameterIsError.ts ===
|
||||
const o5 = {
|
||||
>o5 : { f(): any; yield: any; }
|
||||
>{ async * f(yield) : { f(): any; yield: any; }
|
||||
@ -45,7 +45,7 @@ const o5 = {
|
||||
>yield : any
|
||||
}
|
||||
};
|
||||
=== tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/awaitInParameterInitializerIsError.ts ===
|
||||
=== tests/cases/conformance/parser/ecmascript2018/asyncGenerators/awaitInParameterInitializerIsError.ts ===
|
||||
const o6 = {
|
||||
>o6 : { f(a?: number): AsyncIterableIterator<any>; }
|
||||
>{ async * f(a = await 1) { }} : { f(a?: number): AsyncIterableIterator<any>; }
|
||||
@ -57,7 +57,7 @@ const o6 = {
|
||||
>1 : 1
|
||||
}
|
||||
};
|
||||
=== tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/yieldInParameterInitializerIsError.ts ===
|
||||
=== tests/cases/conformance/parser/ecmascript2018/asyncGenerators/yieldInParameterInitializerIsError.ts ===
|
||||
const o7 = {
|
||||
>o7 : { f(a?: any): AsyncIterableIterator<any>; }
|
||||
>{ async * f(a = yield) { }} : { f(a?: any): AsyncIterableIterator<any>; }
|
||||
@ -68,7 +68,7 @@ const o7 = {
|
||||
>yield : any
|
||||
}
|
||||
};
|
||||
=== tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/nestedAsyncGeneratorIsOk.ts ===
|
||||
=== tests/cases/conformance/parser/ecmascript2018/asyncGenerators/nestedAsyncGeneratorIsOk.ts ===
|
||||
const o8 = {
|
||||
>o8 : { f(): AsyncIterableIterator<any>; }
|
||||
>{ async * f() { async function * g() { } }} : { f(): AsyncIterableIterator<any>; }
|
||||
@ -81,7 +81,7 @@ const o8 = {
|
||||
}
|
||||
}
|
||||
};
|
||||
=== tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/nestedFunctionDeclarationNamedYieldIsError.ts ===
|
||||
=== tests/cases/conformance/parser/ecmascript2018/asyncGenerators/nestedFunctionDeclarationNamedYieldIsError.ts ===
|
||||
const o9 = {
|
||||
>o9 : { f(): AsyncIterableIterator<() => void>; }
|
||||
>{ async * f() { function yield() { } }} : { f(): AsyncIterableIterator<() => void>; }
|
||||
@ -96,7 +96,7 @@ const o9 = {
|
||||
}
|
||||
}
|
||||
};
|
||||
=== tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/nestedFunctionExpressionNamedYieldIsError.ts ===
|
||||
=== tests/cases/conformance/parser/ecmascript2018/asyncGenerators/nestedFunctionExpressionNamedYieldIsError.ts ===
|
||||
const o10 = {
|
||||
>o10 : { f(): AsyncIterableIterator<() => void>; }
|
||||
>{ async * f() { const x = function yield() { }; }} : { f(): AsyncIterableIterator<() => void>; }
|
||||
@ -113,7 +113,7 @@ const o10 = {
|
||||
};
|
||||
}
|
||||
};
|
||||
=== tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/nestedFunctionDeclarationNamedAwaitIsError.ts ===
|
||||
=== tests/cases/conformance/parser/ecmascript2018/asyncGenerators/nestedFunctionDeclarationNamedAwaitIsError.ts ===
|
||||
const o11 = {
|
||||
>o11 : { f(): AsyncIterableIterator<any>; }
|
||||
>{ async * f() { function await() { } }} : { f(): AsyncIterableIterator<any>; }
|
||||
@ -129,7 +129,7 @@ const o11 = {
|
||||
}
|
||||
}
|
||||
};
|
||||
=== tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/nestedFunctionExpressionNamedAwaitIsError.ts ===
|
||||
=== tests/cases/conformance/parser/ecmascript2018/asyncGenerators/nestedFunctionExpressionNamedAwaitIsError.ts ===
|
||||
const o12 = {
|
||||
>o12 : { f(): AsyncIterableIterator<any>; }
|
||||
>{ async * f() { const x = function await() { }; }} : { f(): AsyncIterableIterator<any>; }
|
||||
@ -147,7 +147,7 @@ const o12 = {
|
||||
};
|
||||
}
|
||||
};
|
||||
=== tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/yieldIsOk.ts ===
|
||||
=== tests/cases/conformance/parser/ecmascript2018/asyncGenerators/yieldIsOk.ts ===
|
||||
const o13 = {
|
||||
>o13 : { f(): AsyncIterableIterator<any>; }
|
||||
>{ async * f() { yield; }} : { f(): AsyncIterableIterator<any>; }
|
||||
@ -159,7 +159,7 @@ const o13 = {
|
||||
>yield : any
|
||||
}
|
||||
};
|
||||
=== tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/yieldWithValueIsOk.ts ===
|
||||
=== tests/cases/conformance/parser/ecmascript2018/asyncGenerators/yieldWithValueIsOk.ts ===
|
||||
const o14 = {
|
||||
>o14 : { f(): AsyncIterableIterator<number>; }
|
||||
>{ async * f() { yield 1; }} : { f(): AsyncIterableIterator<number>; }
|
||||
@ -172,7 +172,7 @@ const o14 = {
|
||||
>1 : 1
|
||||
}
|
||||
};
|
||||
=== tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/yieldStarMissingValueIsError.ts ===
|
||||
=== tests/cases/conformance/parser/ecmascript2018/asyncGenerators/yieldStarMissingValueIsError.ts ===
|
||||
const o15 = {
|
||||
>o15 : { f(): AsyncIterableIterator<any>; }
|
||||
>{ async * f() { yield *; }} : { f(): AsyncIterableIterator<any>; }
|
||||
@ -185,7 +185,7 @@ const o15 = {
|
||||
> : any
|
||||
}
|
||||
};
|
||||
=== tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/yieldStarWithValueIsOk.ts ===
|
||||
=== tests/cases/conformance/parser/ecmascript2018/asyncGenerators/yieldStarWithValueIsOk.ts ===
|
||||
const o16 = {
|
||||
>o16 : { f(): AsyncIterableIterator<any>; }
|
||||
>{ async * f() { yield * []; }} : { f(): AsyncIterableIterator<any>; }
|
||||
@ -198,7 +198,7 @@ const o16 = {
|
||||
>[] : undefined[]
|
||||
}
|
||||
};
|
||||
=== tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/awaitWithValueIsOk.ts ===
|
||||
=== tests/cases/conformance/parser/ecmascript2018/asyncGenerators/awaitWithValueIsOk.ts ===
|
||||
const o17 = {
|
||||
>o17 : { f(): AsyncIterableIterator<any>; }
|
||||
>{ async * f() { await 1; }} : { f(): AsyncIterableIterator<any>; }
|
||||
@ -211,7 +211,7 @@ const o17 = {
|
||||
>1 : 1
|
||||
}
|
||||
};
|
||||
=== tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/awaitMissingValueIsError.ts ===
|
||||
=== tests/cases/conformance/parser/ecmascript2018/asyncGenerators/awaitMissingValueIsError.ts ===
|
||||
const o18 = {
|
||||
>o18 : { f(): AsyncIterableIterator<any>; }
|
||||
>{ async * f() { await; }} : { f(): AsyncIterableIterator<any>; }
|
||||
@ -224,7 +224,7 @@ const o18 = {
|
||||
> : any
|
||||
}
|
||||
};
|
||||
=== tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/awaitAsTypeIsOk.ts ===
|
||||
=== tests/cases/conformance/parser/ecmascript2018/asyncGenerators/awaitAsTypeIsOk.ts ===
|
||||
interface await {}
|
||||
const o19 = {
|
||||
>o19 : { f(): AsyncIterableIterator<any>; }
|
||||
@ -237,7 +237,7 @@ const o19 = {
|
||||
>x : await
|
||||
}
|
||||
};
|
||||
=== tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/yieldAsTypeIsOk.ts ===
|
||||
=== tests/cases/conformance/parser/ecmascript2018/asyncGenerators/yieldAsTypeIsOk.ts ===
|
||||
interface yield {}
|
||||
const o20 = {
|
||||
>o20 : { f(): AsyncIterableIterator<any>; }
|
||||
@ -250,7 +250,7 @@ const o20 = {
|
||||
>x : yield
|
||||
}
|
||||
};
|
||||
=== tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/yieldInNestedComputedPropertyIsOk.ts ===
|
||||
=== tests/cases/conformance/parser/ecmascript2018/asyncGenerators/yieldInNestedComputedPropertyIsOk.ts ===
|
||||
const o21 = {
|
||||
>o21 : { f(): AsyncIterableIterator<any>; }
|
||||
>{ async * f() { const x = { [yield]: 1 }; }} : { f(): AsyncIterableIterator<any>; }
|
||||
@ -266,7 +266,7 @@ const o21 = {
|
||||
>1 : 1
|
||||
}
|
||||
};
|
||||
=== tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/asyncGeneratorGetAccessorIsError.ts ===
|
||||
=== tests/cases/conformance/parser/ecmascript2018/asyncGenerators/asyncGeneratorGetAccessorIsError.ts ===
|
||||
const o22 = {
|
||||
>o22 : { get(): any; x(): number; }
|
||||
>{ async * get x() { return 1; }} : { get(): any; x(): number; }
|
||||
@ -279,7 +279,7 @@ const o22 = {
|
||||
>1 : 1
|
||||
}
|
||||
};
|
||||
=== tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/asyncGeneratorSetAccessorIsError.ts ===
|
||||
=== tests/cases/conformance/parser/ecmascript2018/asyncGenerators/asyncGeneratorSetAccessorIsError.ts ===
|
||||
const o23 = {
|
||||
>o23 : { set(): any; x(value: number): void; }
|
||||
>{ async * set x(value: number) { }} : { set(): any; x(value: number): void; }
|
||||
@ -290,7 +290,7 @@ const o23 = {
|
||||
>value : number
|
||||
}
|
||||
};
|
||||
=== tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/asyncGeneratorPropertyIsError.ts ===
|
||||
=== tests/cases/conformance/parser/ecmascript2018/asyncGenerators/asyncGeneratorPropertyIsError.ts ===
|
||||
const o24 = {
|
||||
>o24 : { x(): 1; }
|
||||
>{ async * x: 1;} : { x(): 1; }
|
||||
@ -299,3 +299,4 @@ const o24 = {
|
||||
>x : () => 1
|
||||
|
||||
};
|
||||
|
||||
@ -1,27 +1,27 @@
|
||||
tests/cases/conformance/parser/ecmascriptnext/forAwait/forAwaitInWithDeclIsError.ts(1,20): error TS1005: 'of' expected.
|
||||
tests/cases/conformance/parser/ecmascriptnext/forAwait/forAwaitInWithDeclIsError.ts(1,23): error TS2304: Cannot find name 'y'.
|
||||
tests/cases/conformance/parser/ecmascriptnext/forAwait/forAwaitInWithExprIsError.ts(1,12): error TS2304: Cannot find name 'x'.
|
||||
tests/cases/conformance/parser/ecmascriptnext/forAwait/forAwaitInWithExprIsError.ts(1,14): error TS1005: 'of' expected.
|
||||
tests/cases/conformance/parser/ecmascriptnext/forAwait/forAwaitInWithExprIsError.ts(1,17): error TS2304: Cannot find name 'y'.
|
||||
tests/cases/conformance/parser/ecmascriptnext/forAwait/inFunctionDeclWithDeclIsError.ts(3,9): error TS1103: A 'for-await-of' statement is only allowed within an async function or async generator.
|
||||
tests/cases/conformance/parser/ecmascriptnext/forAwait/inFunctionDeclWithExprIsError.ts(3,9): error TS1103: A 'for-await-of' statement is only allowed within an async function or async generator.
|
||||
tests/cases/conformance/parser/ecmascriptnext/forAwait/inGeneratorWithDeclIsError.ts(3,9): error TS1103: A 'for-await-of' statement is only allowed within an async function or async generator.
|
||||
tests/cases/conformance/parser/ecmascriptnext/forAwait/inGeneratorWithExprIsError.ts(3,9): error TS1103: A 'for-await-of' statement is only allowed within an async function or async generator.
|
||||
tests/cases/conformance/parser/ecmascriptnext/forAwait/topLevelWithDeclIsError.ts(1,5): error TS1103: A 'for-await-of' statement is only allowed within an async function or async generator.
|
||||
tests/cases/conformance/parser/ecmascriptnext/forAwait/topLevelWithDeclIsError.ts(1,23): error TS2304: Cannot find name 'y'.
|
||||
tests/cases/conformance/parser/ecmascriptnext/forAwait/topLevelWithExprIsError.ts(1,5): error TS1103: A 'for-await-of' statement is only allowed within an async function or async generator.
|
||||
tests/cases/conformance/parser/ecmascriptnext/forAwait/topLevelWithExprIsError.ts(1,12): error TS2304: Cannot find name 'x'.
|
||||
tests/cases/conformance/parser/ecmascriptnext/forAwait/topLevelWithExprIsError.ts(1,17): error TS2304: Cannot find name 'y'.
|
||||
tests/cases/conformance/parser/ecmascript2018/forAwait/forAwaitInWithDeclIsError.ts(1,20): error TS1005: 'of' expected.
|
||||
tests/cases/conformance/parser/ecmascript2018/forAwait/forAwaitInWithDeclIsError.ts(1,23): error TS2304: Cannot find name 'y'.
|
||||
tests/cases/conformance/parser/ecmascript2018/forAwait/forAwaitInWithExprIsError.ts(1,12): error TS2304: Cannot find name 'x'.
|
||||
tests/cases/conformance/parser/ecmascript2018/forAwait/forAwaitInWithExprIsError.ts(1,14): error TS1005: 'of' expected.
|
||||
tests/cases/conformance/parser/ecmascript2018/forAwait/forAwaitInWithExprIsError.ts(1,17): error TS2304: Cannot find name 'y'.
|
||||
tests/cases/conformance/parser/ecmascript2018/forAwait/inFunctionDeclWithDeclIsError.ts(3,9): error TS1103: A 'for-await-of' statement is only allowed within an async function or async generator.
|
||||
tests/cases/conformance/parser/ecmascript2018/forAwait/inFunctionDeclWithExprIsError.ts(3,9): error TS1103: A 'for-await-of' statement is only allowed within an async function or async generator.
|
||||
tests/cases/conformance/parser/ecmascript2018/forAwait/inGeneratorWithDeclIsError.ts(3,9): error TS1103: A 'for-await-of' statement is only allowed within an async function or async generator.
|
||||
tests/cases/conformance/parser/ecmascript2018/forAwait/inGeneratorWithExprIsError.ts(3,9): error TS1103: A 'for-await-of' statement is only allowed within an async function or async generator.
|
||||
tests/cases/conformance/parser/ecmascript2018/forAwait/topLevelWithDeclIsError.ts(1,5): error TS1103: A 'for-await-of' statement is only allowed within an async function or async generator.
|
||||
tests/cases/conformance/parser/ecmascript2018/forAwait/topLevelWithDeclIsError.ts(1,23): error TS2304: Cannot find name 'y'.
|
||||
tests/cases/conformance/parser/ecmascript2018/forAwait/topLevelWithExprIsError.ts(1,5): error TS1103: A 'for-await-of' statement is only allowed within an async function or async generator.
|
||||
tests/cases/conformance/parser/ecmascript2018/forAwait/topLevelWithExprIsError.ts(1,12): error TS2304: Cannot find name 'x'.
|
||||
tests/cases/conformance/parser/ecmascript2018/forAwait/topLevelWithExprIsError.ts(1,17): error TS2304: Cannot find name 'y'.
|
||||
|
||||
|
||||
==== tests/cases/conformance/parser/ecmascriptnext/forAwait/topLevelWithDeclIsError.ts (2 errors) ====
|
||||
==== tests/cases/conformance/parser/ecmascript2018/forAwait/topLevelWithDeclIsError.ts (2 errors) ====
|
||||
for await (const x of y) {
|
||||
~~~~~
|
||||
!!! error TS1103: A 'for-await-of' statement is only allowed within an async function or async generator.
|
||||
~
|
||||
!!! error TS2304: Cannot find name 'y'.
|
||||
}
|
||||
==== tests/cases/conformance/parser/ecmascriptnext/forAwait/topLevelWithExprIsError.ts (3 errors) ====
|
||||
==== tests/cases/conformance/parser/ecmascript2018/forAwait/topLevelWithExprIsError.ts (3 errors) ====
|
||||
for await (x of y) {
|
||||
~~~~~
|
||||
!!! error TS1103: A 'for-await-of' statement is only allowed within an async function or async generator.
|
||||
@ -30,14 +30,14 @@ tests/cases/conformance/parser/ecmascriptnext/forAwait/topLevelWithExprIsError.t
|
||||
~
|
||||
!!! error TS2304: Cannot find name 'y'.
|
||||
}
|
||||
==== tests/cases/conformance/parser/ecmascriptnext/forAwait/forAwaitInWithDeclIsError.ts (2 errors) ====
|
||||
==== tests/cases/conformance/parser/ecmascript2018/forAwait/forAwaitInWithDeclIsError.ts (2 errors) ====
|
||||
for await (const x in y) {
|
||||
~~
|
||||
!!! error TS1005: 'of' expected.
|
||||
~
|
||||
!!! error TS2304: Cannot find name 'y'.
|
||||
}
|
||||
==== tests/cases/conformance/parser/ecmascriptnext/forAwait/forAwaitInWithExprIsError.ts (3 errors) ====
|
||||
==== tests/cases/conformance/parser/ecmascript2018/forAwait/forAwaitInWithExprIsError.ts (3 errors) ====
|
||||
for await (x in y) {
|
||||
~
|
||||
!!! error TS2304: Cannot find name 'x'.
|
||||
@ -46,7 +46,7 @@ tests/cases/conformance/parser/ecmascriptnext/forAwait/topLevelWithExprIsError.t
|
||||
~
|
||||
!!! error TS2304: Cannot find name 'y'.
|
||||
}
|
||||
==== tests/cases/conformance/parser/ecmascriptnext/forAwait/inFunctionDeclWithDeclIsError.ts (1 errors) ====
|
||||
==== tests/cases/conformance/parser/ecmascript2018/forAwait/inFunctionDeclWithDeclIsError.ts (1 errors) ====
|
||||
function f5() {
|
||||
let y: any;
|
||||
for await (const x of y) {
|
||||
@ -54,7 +54,7 @@ tests/cases/conformance/parser/ecmascriptnext/forAwait/topLevelWithExprIsError.t
|
||||
!!! error TS1103: A 'for-await-of' statement is only allowed within an async function or async generator.
|
||||
}
|
||||
}
|
||||
==== tests/cases/conformance/parser/ecmascriptnext/forAwait/inFunctionDeclWithExprIsError.ts (1 errors) ====
|
||||
==== tests/cases/conformance/parser/ecmascript2018/forAwait/inFunctionDeclWithExprIsError.ts (1 errors) ====
|
||||
function f6() {
|
||||
let x: any, y: any;
|
||||
for await (x of y) {
|
||||
@ -62,31 +62,31 @@ tests/cases/conformance/parser/ecmascriptnext/forAwait/topLevelWithExprIsError.t
|
||||
!!! error TS1103: A 'for-await-of' statement is only allowed within an async function or async generator.
|
||||
}
|
||||
}
|
||||
==== tests/cases/conformance/parser/ecmascriptnext/forAwait/inAsyncFunctionWithDeclIsOk.ts (0 errors) ====
|
||||
==== tests/cases/conformance/parser/ecmascript2018/forAwait/inAsyncFunctionWithDeclIsOk.ts (0 errors) ====
|
||||
async function f7() {
|
||||
let y: any;
|
||||
for await (const x of y) {
|
||||
}
|
||||
}
|
||||
==== tests/cases/conformance/parser/ecmascriptnext/forAwait/inAsyncFunctionWithExprIsOk.ts (0 errors) ====
|
||||
==== tests/cases/conformance/parser/ecmascript2018/forAwait/inAsyncFunctionWithExprIsOk.ts (0 errors) ====
|
||||
async function f8() {
|
||||
let x: any, y: any;
|
||||
for await (x of y) {
|
||||
}
|
||||
}
|
||||
==== tests/cases/conformance/parser/ecmascriptnext/forAwait/inAsyncGeneratorWithDeclIsOk.ts (0 errors) ====
|
||||
==== tests/cases/conformance/parser/ecmascript2018/forAwait/inAsyncGeneratorWithDeclIsOk.ts (0 errors) ====
|
||||
async function* f9() {
|
||||
let y: any;
|
||||
for await (const x of y) {
|
||||
}
|
||||
}
|
||||
==== tests/cases/conformance/parser/ecmascriptnext/forAwait/inAsyncGeneratorWithExpressionIsOk.ts (0 errors) ====
|
||||
==== tests/cases/conformance/parser/ecmascript2018/forAwait/inAsyncGeneratorWithExpressionIsOk.ts (0 errors) ====
|
||||
async function* f10() {
|
||||
let x: any, y: any;
|
||||
for await (x of y) {
|
||||
}
|
||||
}
|
||||
==== tests/cases/conformance/parser/ecmascriptnext/forAwait/inGeneratorWithDeclIsError.ts (1 errors) ====
|
||||
==== tests/cases/conformance/parser/ecmascript2018/forAwait/inGeneratorWithDeclIsError.ts (1 errors) ====
|
||||
function* f11() {
|
||||
let y: any;
|
||||
for await (const x of y) {
|
||||
@ -94,11 +94,12 @@ tests/cases/conformance/parser/ecmascriptnext/forAwait/topLevelWithExprIsError.t
|
||||
!!! error TS1103: A 'for-await-of' statement is only allowed within an async function or async generator.
|
||||
}
|
||||
}
|
||||
==== tests/cases/conformance/parser/ecmascriptnext/forAwait/inGeneratorWithExprIsError.ts (1 errors) ====
|
||||
==== tests/cases/conformance/parser/ecmascript2018/forAwait/inGeneratorWithExprIsError.ts (1 errors) ====
|
||||
function* f12() {
|
||||
let x: any, y: any;
|
||||
for await (x of y) {
|
||||
~~~~~
|
||||
!!! error TS1103: A 'for-await-of' statement is only allowed within an async function or async generator.
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,18 +1,18 @@
|
||||
=== tests/cases/conformance/parser/ecmascriptnext/forAwait/topLevelWithDeclIsError.ts ===
|
||||
=== tests/cases/conformance/parser/ecmascript2018/forAwait/topLevelWithDeclIsError.ts ===
|
||||
for await (const x of y) {
|
||||
>x : Symbol(x, Decl(topLevelWithDeclIsError.ts, 0, 16))
|
||||
}
|
||||
=== tests/cases/conformance/parser/ecmascriptnext/forAwait/topLevelWithExprIsError.ts ===
|
||||
=== tests/cases/conformance/parser/ecmascript2018/forAwait/topLevelWithExprIsError.ts ===
|
||||
for await (x of y) {
|
||||
No type information for this code.}
|
||||
No type information for this code.=== tests/cases/conformance/parser/ecmascriptnext/forAwait/forAwaitInWithDeclIsError.ts ===
|
||||
No type information for this code.=== tests/cases/conformance/parser/ecmascript2018/forAwait/forAwaitInWithDeclIsError.ts ===
|
||||
for await (const x in y) {
|
||||
>x : Symbol(x, Decl(forAwaitInWithDeclIsError.ts, 0, 16))
|
||||
}
|
||||
=== tests/cases/conformance/parser/ecmascriptnext/forAwait/forAwaitInWithExprIsError.ts ===
|
||||
=== tests/cases/conformance/parser/ecmascript2018/forAwait/forAwaitInWithExprIsError.ts ===
|
||||
for await (x in y) {
|
||||
No type information for this code.}
|
||||
No type information for this code.=== tests/cases/conformance/parser/ecmascriptnext/forAwait/inFunctionDeclWithDeclIsError.ts ===
|
||||
No type information for this code.=== tests/cases/conformance/parser/ecmascript2018/forAwait/inFunctionDeclWithDeclIsError.ts ===
|
||||
function f5() {
|
||||
>f5 : Symbol(f5, Decl(inFunctionDeclWithDeclIsError.ts, 0, 0))
|
||||
|
||||
@ -24,7 +24,7 @@ function f5() {
|
||||
>y : Symbol(y, Decl(inFunctionDeclWithDeclIsError.ts, 1, 7))
|
||||
}
|
||||
}
|
||||
=== tests/cases/conformance/parser/ecmascriptnext/forAwait/inFunctionDeclWithExprIsError.ts ===
|
||||
=== tests/cases/conformance/parser/ecmascript2018/forAwait/inFunctionDeclWithExprIsError.ts ===
|
||||
function f6() {
|
||||
>f6 : Symbol(f6, Decl(inFunctionDeclWithExprIsError.ts, 0, 0))
|
||||
|
||||
@ -37,7 +37,7 @@ function f6() {
|
||||
>y : Symbol(y, Decl(inFunctionDeclWithExprIsError.ts, 1, 15))
|
||||
}
|
||||
}
|
||||
=== tests/cases/conformance/parser/ecmascriptnext/forAwait/inAsyncFunctionWithDeclIsOk.ts ===
|
||||
=== tests/cases/conformance/parser/ecmascript2018/forAwait/inAsyncFunctionWithDeclIsOk.ts ===
|
||||
async function f7() {
|
||||
>f7 : Symbol(f7, Decl(inAsyncFunctionWithDeclIsOk.ts, 0, 0))
|
||||
|
||||
@ -49,7 +49,7 @@ async function f7() {
|
||||
>y : Symbol(y, Decl(inAsyncFunctionWithDeclIsOk.ts, 1, 7))
|
||||
}
|
||||
}
|
||||
=== tests/cases/conformance/parser/ecmascriptnext/forAwait/inAsyncFunctionWithExprIsOk.ts ===
|
||||
=== tests/cases/conformance/parser/ecmascript2018/forAwait/inAsyncFunctionWithExprIsOk.ts ===
|
||||
async function f8() {
|
||||
>f8 : Symbol(f8, Decl(inAsyncFunctionWithExprIsOk.ts, 0, 0))
|
||||
|
||||
@ -62,7 +62,7 @@ async function f8() {
|
||||
>y : Symbol(y, Decl(inAsyncFunctionWithExprIsOk.ts, 1, 15))
|
||||
}
|
||||
}
|
||||
=== tests/cases/conformance/parser/ecmascriptnext/forAwait/inAsyncGeneratorWithDeclIsOk.ts ===
|
||||
=== tests/cases/conformance/parser/ecmascript2018/forAwait/inAsyncGeneratorWithDeclIsOk.ts ===
|
||||
async function* f9() {
|
||||
>f9 : Symbol(f9, Decl(inAsyncGeneratorWithDeclIsOk.ts, 0, 0))
|
||||
|
||||
@ -74,7 +74,7 @@ async function* f9() {
|
||||
>y : Symbol(y, Decl(inAsyncGeneratorWithDeclIsOk.ts, 1, 7))
|
||||
}
|
||||
}
|
||||
=== tests/cases/conformance/parser/ecmascriptnext/forAwait/inAsyncGeneratorWithExpressionIsOk.ts ===
|
||||
=== tests/cases/conformance/parser/ecmascript2018/forAwait/inAsyncGeneratorWithExpressionIsOk.ts ===
|
||||
async function* f10() {
|
||||
>f10 : Symbol(f10, Decl(inAsyncGeneratorWithExpressionIsOk.ts, 0, 0))
|
||||
|
||||
@ -87,7 +87,7 @@ async function* f10() {
|
||||
>y : Symbol(y, Decl(inAsyncGeneratorWithExpressionIsOk.ts, 1, 15))
|
||||
}
|
||||
}
|
||||
=== tests/cases/conformance/parser/ecmascriptnext/forAwait/inGeneratorWithDeclIsError.ts ===
|
||||
=== tests/cases/conformance/parser/ecmascript2018/forAwait/inGeneratorWithDeclIsError.ts ===
|
||||
function* f11() {
|
||||
>f11 : Symbol(f11, Decl(inGeneratorWithDeclIsError.ts, 0, 0))
|
||||
|
||||
@ -99,7 +99,7 @@ function* f11() {
|
||||
>y : Symbol(y, Decl(inGeneratorWithDeclIsError.ts, 1, 7))
|
||||
}
|
||||
}
|
||||
=== tests/cases/conformance/parser/ecmascriptnext/forAwait/inGeneratorWithExprIsError.ts ===
|
||||
=== tests/cases/conformance/parser/ecmascript2018/forAwait/inGeneratorWithExprIsError.ts ===
|
||||
function* f12() {
|
||||
>f12 : Symbol(f12, Decl(inGeneratorWithExprIsError.ts, 0, 0))
|
||||
|
||||
@ -112,3 +112,4 @@ function* f12() {
|
||||
>y : Symbol(y, Decl(inGeneratorWithExprIsError.ts, 1, 15))
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,24 +1,24 @@
|
||||
=== tests/cases/conformance/parser/ecmascriptnext/forAwait/topLevelWithDeclIsError.ts ===
|
||||
=== tests/cases/conformance/parser/ecmascript2018/forAwait/topLevelWithDeclIsError.ts ===
|
||||
for await (const x of y) {
|
||||
>x : any
|
||||
>y : any
|
||||
}
|
||||
=== tests/cases/conformance/parser/ecmascriptnext/forAwait/topLevelWithExprIsError.ts ===
|
||||
=== tests/cases/conformance/parser/ecmascript2018/forAwait/topLevelWithExprIsError.ts ===
|
||||
for await (x of y) {
|
||||
>x : any
|
||||
>y : any
|
||||
}
|
||||
=== tests/cases/conformance/parser/ecmascriptnext/forAwait/forAwaitInWithDeclIsError.ts ===
|
||||
=== tests/cases/conformance/parser/ecmascript2018/forAwait/forAwaitInWithDeclIsError.ts ===
|
||||
for await (const x in y) {
|
||||
>x : string
|
||||
>y : any
|
||||
}
|
||||
=== tests/cases/conformance/parser/ecmascriptnext/forAwait/forAwaitInWithExprIsError.ts ===
|
||||
=== tests/cases/conformance/parser/ecmascript2018/forAwait/forAwaitInWithExprIsError.ts ===
|
||||
for await (x in y) {
|
||||
>x : any
|
||||
>y : any
|
||||
}
|
||||
=== tests/cases/conformance/parser/ecmascriptnext/forAwait/inFunctionDeclWithDeclIsError.ts ===
|
||||
=== tests/cases/conformance/parser/ecmascript2018/forAwait/inFunctionDeclWithDeclIsError.ts ===
|
||||
function f5() {
|
||||
>f5 : () => void
|
||||
|
||||
@ -30,7 +30,7 @@ function f5() {
|
||||
>y : any
|
||||
}
|
||||
}
|
||||
=== tests/cases/conformance/parser/ecmascriptnext/forAwait/inFunctionDeclWithExprIsError.ts ===
|
||||
=== tests/cases/conformance/parser/ecmascript2018/forAwait/inFunctionDeclWithExprIsError.ts ===
|
||||
function f6() {
|
||||
>f6 : () => void
|
||||
|
||||
@ -43,7 +43,7 @@ function f6() {
|
||||
>y : any
|
||||
}
|
||||
}
|
||||
=== tests/cases/conformance/parser/ecmascriptnext/forAwait/inAsyncFunctionWithDeclIsOk.ts ===
|
||||
=== tests/cases/conformance/parser/ecmascript2018/forAwait/inAsyncFunctionWithDeclIsOk.ts ===
|
||||
async function f7() {
|
||||
>f7 : () => Promise<void>
|
||||
|
||||
@ -55,7 +55,7 @@ async function f7() {
|
||||
>y : any
|
||||
}
|
||||
}
|
||||
=== tests/cases/conformance/parser/ecmascriptnext/forAwait/inAsyncFunctionWithExprIsOk.ts ===
|
||||
=== tests/cases/conformance/parser/ecmascript2018/forAwait/inAsyncFunctionWithExprIsOk.ts ===
|
||||
async function f8() {
|
||||
>f8 : () => Promise<void>
|
||||
|
||||
@ -68,7 +68,7 @@ async function f8() {
|
||||
>y : any
|
||||
}
|
||||
}
|
||||
=== tests/cases/conformance/parser/ecmascriptnext/forAwait/inAsyncGeneratorWithDeclIsOk.ts ===
|
||||
=== tests/cases/conformance/parser/ecmascript2018/forAwait/inAsyncGeneratorWithDeclIsOk.ts ===
|
||||
async function* f9() {
|
||||
>f9 : () => AsyncIterableIterator<any>
|
||||
|
||||
@ -80,7 +80,7 @@ async function* f9() {
|
||||
>y : any
|
||||
}
|
||||
}
|
||||
=== tests/cases/conformance/parser/ecmascriptnext/forAwait/inAsyncGeneratorWithExpressionIsOk.ts ===
|
||||
=== tests/cases/conformance/parser/ecmascript2018/forAwait/inAsyncGeneratorWithExpressionIsOk.ts ===
|
||||
async function* f10() {
|
||||
>f10 : () => AsyncIterableIterator<any>
|
||||
|
||||
@ -93,7 +93,7 @@ async function* f10() {
|
||||
>y : any
|
||||
}
|
||||
}
|
||||
=== tests/cases/conformance/parser/ecmascriptnext/forAwait/inGeneratorWithDeclIsError.ts ===
|
||||
=== tests/cases/conformance/parser/ecmascript2018/forAwait/inGeneratorWithDeclIsError.ts ===
|
||||
function* f11() {
|
||||
>f11 : () => IterableIterator<any>
|
||||
|
||||
@ -105,7 +105,7 @@ function* f11() {
|
||||
>y : any
|
||||
}
|
||||
}
|
||||
=== tests/cases/conformance/parser/ecmascriptnext/forAwait/inGeneratorWithExprIsError.ts ===
|
||||
=== tests/cases/conformance/parser/ecmascript2018/forAwait/inGeneratorWithExprIsError.ts ===
|
||||
function* f12() {
|
||||
>f12 : () => IterableIterator<any>
|
||||
|
||||
@ -118,3 +118,4 @@ function* f12() {
|
||||
>y : any
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,19 +1,19 @@
|
||||
=== tests/cases/conformance/types/asyncGenerators/types.asyncGenerators.esnext.1.ts ===
|
||||
=== tests/cases/conformance/types/asyncGenerators/types.asyncGenerators.es2018.1.ts ===
|
||||
async function * inferReturnType1() {
|
||||
>inferReturnType1 : Symbol(inferReturnType1, Decl(types.asyncGenerators.esnext.1.ts, 0, 0))
|
||||
>inferReturnType1 : Symbol(inferReturnType1, Decl(types.asyncGenerators.es2018.1.ts, 0, 0))
|
||||
}
|
||||
async function * inferReturnType2() {
|
||||
>inferReturnType2 : Symbol(inferReturnType2, Decl(types.asyncGenerators.esnext.1.ts, 1, 1))
|
||||
>inferReturnType2 : Symbol(inferReturnType2, Decl(types.asyncGenerators.es2018.1.ts, 1, 1))
|
||||
|
||||
yield;
|
||||
}
|
||||
async function * inferReturnType3() {
|
||||
>inferReturnType3 : Symbol(inferReturnType3, Decl(types.asyncGenerators.esnext.1.ts, 4, 1))
|
||||
>inferReturnType3 : Symbol(inferReturnType3, Decl(types.asyncGenerators.es2018.1.ts, 4, 1))
|
||||
|
||||
yield 1;
|
||||
}
|
||||
async function * inferReturnType4() {
|
||||
>inferReturnType4 : Symbol(inferReturnType4, Decl(types.asyncGenerators.esnext.1.ts, 7, 1))
|
||||
>inferReturnType4 : Symbol(inferReturnType4, Decl(types.asyncGenerators.es2018.1.ts, 7, 1))
|
||||
|
||||
yield Promise.resolve(1);
|
||||
>Promise.resolve : Symbol(PromiseConstructor.resolve, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --))
|
||||
@ -21,7 +21,7 @@ async function * inferReturnType4() {
|
||||
>resolve : Symbol(PromiseConstructor.resolve, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --))
|
||||
}
|
||||
async function * inferReturnType5() {
|
||||
>inferReturnType5 : Symbol(inferReturnType5, Decl(types.asyncGenerators.esnext.1.ts, 10, 1))
|
||||
>inferReturnType5 : Symbol(inferReturnType5, Decl(types.asyncGenerators.es2018.1.ts, 10, 1))
|
||||
|
||||
yield 1;
|
||||
yield Promise.resolve(2);
|
||||
@ -30,12 +30,12 @@ async function * inferReturnType5() {
|
||||
>resolve : Symbol(PromiseConstructor.resolve, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --))
|
||||
}
|
||||
async function * inferReturnType6() {
|
||||
>inferReturnType6 : Symbol(inferReturnType6, Decl(types.asyncGenerators.esnext.1.ts, 14, 1))
|
||||
>inferReturnType6 : Symbol(inferReturnType6, Decl(types.asyncGenerators.es2018.1.ts, 14, 1))
|
||||
|
||||
yield* [1, 2];
|
||||
}
|
||||
async function * inferReturnType7() {
|
||||
>inferReturnType7 : Symbol(inferReturnType7, Decl(types.asyncGenerators.esnext.1.ts, 17, 1))
|
||||
>inferReturnType7 : Symbol(inferReturnType7, Decl(types.asyncGenerators.es2018.1.ts, 17, 1))
|
||||
|
||||
yield* [Promise.resolve(1)];
|
||||
>Promise.resolve : Symbol(PromiseConstructor.resolve, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --))
|
||||
@ -43,18 +43,18 @@ async function * inferReturnType7() {
|
||||
>resolve : Symbol(PromiseConstructor.resolve, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --))
|
||||
}
|
||||
async function * inferReturnType8() {
|
||||
>inferReturnType8 : Symbol(inferReturnType8, Decl(types.asyncGenerators.esnext.1.ts, 20, 1))
|
||||
>inferReturnType8 : Symbol(inferReturnType8, Decl(types.asyncGenerators.es2018.1.ts, 20, 1))
|
||||
|
||||
yield* (async function * () { yield 1; })();
|
||||
}
|
||||
const assignability1: () => AsyncIterableIterator<number> = async function * () {
|
||||
>assignability1 : Symbol(assignability1, Decl(types.asyncGenerators.esnext.1.ts, 24, 5))
|
||||
>assignability1 : Symbol(assignability1, Decl(types.asyncGenerators.es2018.1.ts, 24, 5))
|
||||
>AsyncIterableIterator : Symbol(AsyncIterableIterator, Decl(lib.esnext.asynciterable.d.ts, --, --))
|
||||
|
||||
yield 1;
|
||||
};
|
||||
const assignability2: () => AsyncIterableIterator<number> = async function * () {
|
||||
>assignability2 : Symbol(assignability2, Decl(types.asyncGenerators.esnext.1.ts, 27, 5))
|
||||
>assignability2 : Symbol(assignability2, Decl(types.asyncGenerators.es2018.1.ts, 27, 5))
|
||||
>AsyncIterableIterator : Symbol(AsyncIterableIterator, Decl(lib.esnext.asynciterable.d.ts, --, --))
|
||||
|
||||
yield Promise.resolve(1);
|
||||
@ -64,13 +64,13 @@ const assignability2: () => AsyncIterableIterator<number> = async function * ()
|
||||
|
||||
};
|
||||
const assignability3: () => AsyncIterableIterator<number> = async function * () {
|
||||
>assignability3 : Symbol(assignability3, Decl(types.asyncGenerators.esnext.1.ts, 30, 5))
|
||||
>assignability3 : Symbol(assignability3, Decl(types.asyncGenerators.es2018.1.ts, 30, 5))
|
||||
>AsyncIterableIterator : Symbol(AsyncIterableIterator, Decl(lib.esnext.asynciterable.d.ts, --, --))
|
||||
|
||||
yield* [1, 2];
|
||||
};
|
||||
const assignability4: () => AsyncIterableIterator<number> = async function * () {
|
||||
>assignability4 : Symbol(assignability4, Decl(types.asyncGenerators.esnext.1.ts, 33, 5))
|
||||
>assignability4 : Symbol(assignability4, Decl(types.asyncGenerators.es2018.1.ts, 33, 5))
|
||||
>AsyncIterableIterator : Symbol(AsyncIterableIterator, Decl(lib.esnext.asynciterable.d.ts, --, --))
|
||||
|
||||
yield* [Promise.resolve(1)];
|
||||
@ -80,19 +80,19 @@ const assignability4: () => AsyncIterableIterator<number> = async function * ()
|
||||
|
||||
};
|
||||
const assignability5: () => AsyncIterableIterator<number> = async function * () {
|
||||
>assignability5 : Symbol(assignability5, Decl(types.asyncGenerators.esnext.1.ts, 36, 5))
|
||||
>assignability5 : Symbol(assignability5, Decl(types.asyncGenerators.es2018.1.ts, 36, 5))
|
||||
>AsyncIterableIterator : Symbol(AsyncIterableIterator, Decl(lib.esnext.asynciterable.d.ts, --, --))
|
||||
|
||||
yield* (async function * () { yield 1; })();
|
||||
};
|
||||
const assignability6: () => AsyncIterable<number> = async function * () {
|
||||
>assignability6 : Symbol(assignability6, Decl(types.asyncGenerators.esnext.1.ts, 39, 5))
|
||||
>assignability6 : Symbol(assignability6, Decl(types.asyncGenerators.es2018.1.ts, 39, 5))
|
||||
>AsyncIterable : Symbol(AsyncIterable, Decl(lib.esnext.asynciterable.d.ts, --, --))
|
||||
|
||||
yield 1;
|
||||
};
|
||||
const assignability7: () => AsyncIterable<number> = async function * () {
|
||||
>assignability7 : Symbol(assignability7, Decl(types.asyncGenerators.esnext.1.ts, 42, 5))
|
||||
>assignability7 : Symbol(assignability7, Decl(types.asyncGenerators.es2018.1.ts, 42, 5))
|
||||
>AsyncIterable : Symbol(AsyncIterable, Decl(lib.esnext.asynciterable.d.ts, --, --))
|
||||
|
||||
yield Promise.resolve(1);
|
||||
@ -102,13 +102,13 @@ const assignability7: () => AsyncIterable<number> = async function * () {
|
||||
|
||||
};
|
||||
const assignability8: () => AsyncIterable<number> = async function * () {
|
||||
>assignability8 : Symbol(assignability8, Decl(types.asyncGenerators.esnext.1.ts, 45, 5))
|
||||
>assignability8 : Symbol(assignability8, Decl(types.asyncGenerators.es2018.1.ts, 45, 5))
|
||||
>AsyncIterable : Symbol(AsyncIterable, Decl(lib.esnext.asynciterable.d.ts, --, --))
|
||||
|
||||
yield* [1, 2];
|
||||
};
|
||||
const assignability9: () => AsyncIterable<number> = async function * () {
|
||||
>assignability9 : Symbol(assignability9, Decl(types.asyncGenerators.esnext.1.ts, 48, 5))
|
||||
>assignability9 : Symbol(assignability9, Decl(types.asyncGenerators.es2018.1.ts, 48, 5))
|
||||
>AsyncIterable : Symbol(AsyncIterable, Decl(lib.esnext.asynciterable.d.ts, --, --))
|
||||
|
||||
yield* [Promise.resolve(1)];
|
||||
@ -118,19 +118,19 @@ const assignability9: () => AsyncIterable<number> = async function * () {
|
||||
|
||||
};
|
||||
const assignability10: () => AsyncIterable<number> = async function * () {
|
||||
>assignability10 : Symbol(assignability10, Decl(types.asyncGenerators.esnext.1.ts, 51, 5))
|
||||
>assignability10 : Symbol(assignability10, Decl(types.asyncGenerators.es2018.1.ts, 51, 5))
|
||||
>AsyncIterable : Symbol(AsyncIterable, Decl(lib.esnext.asynciterable.d.ts, --, --))
|
||||
|
||||
yield* (async function * () { yield 1; })();
|
||||
};
|
||||
const assignability11: () => AsyncIterator<number> = async function * () {
|
||||
>assignability11 : Symbol(assignability11, Decl(types.asyncGenerators.esnext.1.ts, 54, 5))
|
||||
>assignability11 : Symbol(assignability11, Decl(types.asyncGenerators.es2018.1.ts, 54, 5))
|
||||
>AsyncIterator : Symbol(AsyncIterator, Decl(lib.esnext.asynciterable.d.ts, --, --))
|
||||
|
||||
yield 1;
|
||||
};
|
||||
const assignability12: () => AsyncIterator<number> = async function * () {
|
||||
>assignability12 : Symbol(assignability12, Decl(types.asyncGenerators.esnext.1.ts, 57, 5))
|
||||
>assignability12 : Symbol(assignability12, Decl(types.asyncGenerators.es2018.1.ts, 57, 5))
|
||||
>AsyncIterator : Symbol(AsyncIterator, Decl(lib.esnext.asynciterable.d.ts, --, --))
|
||||
|
||||
yield Promise.resolve(1);
|
||||
@ -140,13 +140,13 @@ const assignability12: () => AsyncIterator<number> = async function * () {
|
||||
|
||||
};
|
||||
const assignability13: () => AsyncIterator<number> = async function * () {
|
||||
>assignability13 : Symbol(assignability13, Decl(types.asyncGenerators.esnext.1.ts, 60, 5))
|
||||
>assignability13 : Symbol(assignability13, Decl(types.asyncGenerators.es2018.1.ts, 60, 5))
|
||||
>AsyncIterator : Symbol(AsyncIterator, Decl(lib.esnext.asynciterable.d.ts, --, --))
|
||||
|
||||
yield* [1, 2];
|
||||
};
|
||||
const assignability14: () => AsyncIterator<number> = async function * () {
|
||||
>assignability14 : Symbol(assignability14, Decl(types.asyncGenerators.esnext.1.ts, 63, 5))
|
||||
>assignability14 : Symbol(assignability14, Decl(types.asyncGenerators.es2018.1.ts, 63, 5))
|
||||
>AsyncIterator : Symbol(AsyncIterator, Decl(lib.esnext.asynciterable.d.ts, --, --))
|
||||
|
||||
yield* [Promise.resolve(1)];
|
||||
@ -156,19 +156,19 @@ const assignability14: () => AsyncIterator<number> = async function * () {
|
||||
|
||||
};
|
||||
const assignability15: () => AsyncIterator<number> = async function * () {
|
||||
>assignability15 : Symbol(assignability15, Decl(types.asyncGenerators.esnext.1.ts, 66, 5))
|
||||
>assignability15 : Symbol(assignability15, Decl(types.asyncGenerators.es2018.1.ts, 66, 5))
|
||||
>AsyncIterator : Symbol(AsyncIterator, Decl(lib.esnext.asynciterable.d.ts, --, --))
|
||||
|
||||
yield* (async function * () { yield 1; })();
|
||||
};
|
||||
async function * explicitReturnType1(): AsyncIterableIterator<number> {
|
||||
>explicitReturnType1 : Symbol(explicitReturnType1, Decl(types.asyncGenerators.esnext.1.ts, 68, 2))
|
||||
>explicitReturnType1 : Symbol(explicitReturnType1, Decl(types.asyncGenerators.es2018.1.ts, 68, 2))
|
||||
>AsyncIterableIterator : Symbol(AsyncIterableIterator, Decl(lib.esnext.asynciterable.d.ts, --, --))
|
||||
|
||||
yield 1;
|
||||
}
|
||||
async function * explicitReturnType2(): AsyncIterableIterator<number> {
|
||||
>explicitReturnType2 : Symbol(explicitReturnType2, Decl(types.asyncGenerators.esnext.1.ts, 71, 1))
|
||||
>explicitReturnType2 : Symbol(explicitReturnType2, Decl(types.asyncGenerators.es2018.1.ts, 71, 1))
|
||||
>AsyncIterableIterator : Symbol(AsyncIterableIterator, Decl(lib.esnext.asynciterable.d.ts, --, --))
|
||||
|
||||
yield Promise.resolve(1);
|
||||
@ -177,13 +177,13 @@ async function * explicitReturnType2(): AsyncIterableIterator<number> {
|
||||
>resolve : Symbol(PromiseConstructor.resolve, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --))
|
||||
}
|
||||
async function * explicitReturnType3(): AsyncIterableIterator<number> {
|
||||
>explicitReturnType3 : Symbol(explicitReturnType3, Decl(types.asyncGenerators.esnext.1.ts, 74, 1))
|
||||
>explicitReturnType3 : Symbol(explicitReturnType3, Decl(types.asyncGenerators.es2018.1.ts, 74, 1))
|
||||
>AsyncIterableIterator : Symbol(AsyncIterableIterator, Decl(lib.esnext.asynciterable.d.ts, --, --))
|
||||
|
||||
yield* [1, 2];
|
||||
}
|
||||
async function * explicitReturnType4(): AsyncIterableIterator<number> {
|
||||
>explicitReturnType4 : Symbol(explicitReturnType4, Decl(types.asyncGenerators.esnext.1.ts, 77, 1))
|
||||
>explicitReturnType4 : Symbol(explicitReturnType4, Decl(types.asyncGenerators.es2018.1.ts, 77, 1))
|
||||
>AsyncIterableIterator : Symbol(AsyncIterableIterator, Decl(lib.esnext.asynciterable.d.ts, --, --))
|
||||
|
||||
yield* [Promise.resolve(1)];
|
||||
@ -192,19 +192,19 @@ async function * explicitReturnType4(): AsyncIterableIterator<number> {
|
||||
>resolve : Symbol(PromiseConstructor.resolve, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --))
|
||||
}
|
||||
async function * explicitReturnType5(): AsyncIterableIterator<number> {
|
||||
>explicitReturnType5 : Symbol(explicitReturnType5, Decl(types.asyncGenerators.esnext.1.ts, 80, 1))
|
||||
>explicitReturnType5 : Symbol(explicitReturnType5, Decl(types.asyncGenerators.es2018.1.ts, 80, 1))
|
||||
>AsyncIterableIterator : Symbol(AsyncIterableIterator, Decl(lib.esnext.asynciterable.d.ts, --, --))
|
||||
|
||||
yield* (async function * () { yield 1; })();
|
||||
}
|
||||
async function * explicitReturnType6(): AsyncIterable<number> {
|
||||
>explicitReturnType6 : Symbol(explicitReturnType6, Decl(types.asyncGenerators.esnext.1.ts, 83, 1))
|
||||
>explicitReturnType6 : Symbol(explicitReturnType6, Decl(types.asyncGenerators.es2018.1.ts, 83, 1))
|
||||
>AsyncIterable : Symbol(AsyncIterable, Decl(lib.esnext.asynciterable.d.ts, --, --))
|
||||
|
||||
yield 1;
|
||||
}
|
||||
async function * explicitReturnType7(): AsyncIterable<number> {
|
||||
>explicitReturnType7 : Symbol(explicitReturnType7, Decl(types.asyncGenerators.esnext.1.ts, 86, 1))
|
||||
>explicitReturnType7 : Symbol(explicitReturnType7, Decl(types.asyncGenerators.es2018.1.ts, 86, 1))
|
||||
>AsyncIterable : Symbol(AsyncIterable, Decl(lib.esnext.asynciterable.d.ts, --, --))
|
||||
|
||||
yield Promise.resolve(1);
|
||||
@ -213,13 +213,13 @@ async function * explicitReturnType7(): AsyncIterable<number> {
|
||||
>resolve : Symbol(PromiseConstructor.resolve, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --))
|
||||
}
|
||||
async function * explicitReturnType8(): AsyncIterable<number> {
|
||||
>explicitReturnType8 : Symbol(explicitReturnType8, Decl(types.asyncGenerators.esnext.1.ts, 89, 1))
|
||||
>explicitReturnType8 : Symbol(explicitReturnType8, Decl(types.asyncGenerators.es2018.1.ts, 89, 1))
|
||||
>AsyncIterable : Symbol(AsyncIterable, Decl(lib.esnext.asynciterable.d.ts, --, --))
|
||||
|
||||
yield* [1, 2];
|
||||
}
|
||||
async function * explicitReturnType9(): AsyncIterable<number> {
|
||||
>explicitReturnType9 : Symbol(explicitReturnType9, Decl(types.asyncGenerators.esnext.1.ts, 92, 1))
|
||||
>explicitReturnType9 : Symbol(explicitReturnType9, Decl(types.asyncGenerators.es2018.1.ts, 92, 1))
|
||||
>AsyncIterable : Symbol(AsyncIterable, Decl(lib.esnext.asynciterable.d.ts, --, --))
|
||||
|
||||
yield* [Promise.resolve(1)];
|
||||
@ -228,19 +228,19 @@ async function * explicitReturnType9(): AsyncIterable<number> {
|
||||
>resolve : Symbol(PromiseConstructor.resolve, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --))
|
||||
}
|
||||
async function * explicitReturnType10(): AsyncIterable<number> {
|
||||
>explicitReturnType10 : Symbol(explicitReturnType10, Decl(types.asyncGenerators.esnext.1.ts, 95, 1))
|
||||
>explicitReturnType10 : Symbol(explicitReturnType10, Decl(types.asyncGenerators.es2018.1.ts, 95, 1))
|
||||
>AsyncIterable : Symbol(AsyncIterable, Decl(lib.esnext.asynciterable.d.ts, --, --))
|
||||
|
||||
yield* (async function * () { yield 1; })();
|
||||
}
|
||||
async function * explicitReturnType11(): AsyncIterator<number> {
|
||||
>explicitReturnType11 : Symbol(explicitReturnType11, Decl(types.asyncGenerators.esnext.1.ts, 98, 1))
|
||||
>explicitReturnType11 : Symbol(explicitReturnType11, Decl(types.asyncGenerators.es2018.1.ts, 98, 1))
|
||||
>AsyncIterator : Symbol(AsyncIterator, Decl(lib.esnext.asynciterable.d.ts, --, --))
|
||||
|
||||
yield 1;
|
||||
}
|
||||
async function * explicitReturnType12(): AsyncIterator<number> {
|
||||
>explicitReturnType12 : Symbol(explicitReturnType12, Decl(types.asyncGenerators.esnext.1.ts, 101, 1))
|
||||
>explicitReturnType12 : Symbol(explicitReturnType12, Decl(types.asyncGenerators.es2018.1.ts, 101, 1))
|
||||
>AsyncIterator : Symbol(AsyncIterator, Decl(lib.esnext.asynciterable.d.ts, --, --))
|
||||
|
||||
yield Promise.resolve(1);
|
||||
@ -249,13 +249,13 @@ async function * explicitReturnType12(): AsyncIterator<number> {
|
||||
>resolve : Symbol(PromiseConstructor.resolve, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --))
|
||||
}
|
||||
async function * explicitReturnType13(): AsyncIterator<number> {
|
||||
>explicitReturnType13 : Symbol(explicitReturnType13, Decl(types.asyncGenerators.esnext.1.ts, 104, 1))
|
||||
>explicitReturnType13 : Symbol(explicitReturnType13, Decl(types.asyncGenerators.es2018.1.ts, 104, 1))
|
||||
>AsyncIterator : Symbol(AsyncIterator, Decl(lib.esnext.asynciterable.d.ts, --, --))
|
||||
|
||||
yield* [1, 2];
|
||||
}
|
||||
async function * explicitReturnType14(): AsyncIterator<number> {
|
||||
>explicitReturnType14 : Symbol(explicitReturnType14, Decl(types.asyncGenerators.esnext.1.ts, 107, 1))
|
||||
>explicitReturnType14 : Symbol(explicitReturnType14, Decl(types.asyncGenerators.es2018.1.ts, 107, 1))
|
||||
>AsyncIterator : Symbol(AsyncIterator, Decl(lib.esnext.asynciterable.d.ts, --, --))
|
||||
|
||||
yield* [Promise.resolve(1)];
|
||||
@ -264,28 +264,29 @@ async function * explicitReturnType14(): AsyncIterator<number> {
|
||||
>resolve : Symbol(PromiseConstructor.resolve, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --))
|
||||
}
|
||||
async function * explicitReturnType15(): AsyncIterator<number> {
|
||||
>explicitReturnType15 : Symbol(explicitReturnType15, Decl(types.asyncGenerators.esnext.1.ts, 110, 1))
|
||||
>explicitReturnType15 : Symbol(explicitReturnType15, Decl(types.asyncGenerators.es2018.1.ts, 110, 1))
|
||||
>AsyncIterator : Symbol(AsyncIterator, Decl(lib.esnext.asynciterable.d.ts, --, --))
|
||||
|
||||
yield* (async function * () { yield 1; })();
|
||||
}
|
||||
async function * explicitReturnType16(): {} {
|
||||
>explicitReturnType16 : Symbol(explicitReturnType16, Decl(types.asyncGenerators.esnext.1.ts, 113, 1))
|
||||
>explicitReturnType16 : Symbol(explicitReturnType16, Decl(types.asyncGenerators.es2018.1.ts, 113, 1))
|
||||
|
||||
yield 1;
|
||||
}
|
||||
async function * awaitedType1() {
|
||||
>awaitedType1 : Symbol(awaitedType1, Decl(types.asyncGenerators.esnext.1.ts, 116, 1))
|
||||
>awaitedType1 : Symbol(awaitedType1, Decl(types.asyncGenerators.es2018.1.ts, 116, 1))
|
||||
|
||||
const x = await 1;
|
||||
>x : Symbol(x, Decl(types.asyncGenerators.esnext.1.ts, 118, 9))
|
||||
>x : Symbol(x, Decl(types.asyncGenerators.es2018.1.ts, 118, 9))
|
||||
}
|
||||
async function * awaitedType2() {
|
||||
>awaitedType2 : Symbol(awaitedType2, Decl(types.asyncGenerators.esnext.1.ts, 119, 1))
|
||||
>awaitedType2 : Symbol(awaitedType2, Decl(types.asyncGenerators.es2018.1.ts, 119, 1))
|
||||
|
||||
const x = await Promise.resolve(1);
|
||||
>x : Symbol(x, Decl(types.asyncGenerators.esnext.1.ts, 121, 9))
|
||||
>x : Symbol(x, Decl(types.asyncGenerators.es2018.1.ts, 121, 9))
|
||||
>Promise.resolve : Symbol(PromiseConstructor.resolve, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --))
|
||||
>Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2018.promise.d.ts, --, --))
|
||||
>resolve : Symbol(PromiseConstructor.resolve, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --))
|
||||
}
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
=== tests/cases/conformance/types/asyncGenerators/types.asyncGenerators.esnext.1.ts ===
|
||||
=== tests/cases/conformance/types/asyncGenerators/types.asyncGenerators.es2018.1.ts ===
|
||||
async function * inferReturnType1() {
|
||||
>inferReturnType1 : () => AsyncIterableIterator<any>
|
||||
}
|
||||
@ -430,3 +430,4 @@ async function * awaitedType2() {
|
||||
>resolve : { <T>(value: T | PromiseLike<T>): Promise<T>; (): Promise<void>; }
|
||||
>1 : 1
|
||||
}
|
||||
|
||||
@ -1,13 +1,13 @@
|
||||
tests/cases/conformance/types/asyncGenerators/types.asyncGenerators.esnext.2.ts(2,12): error TS2504: Type '{}' must have a '[Symbol.asyncIterator]()' method that returns an async iterator.
|
||||
tests/cases/conformance/types/asyncGenerators/types.asyncGenerators.esnext.2.ts(8,12): error TS2504: Type 'Promise<number[]>' must have a '[Symbol.asyncIterator]()' method that returns an async iterator.
|
||||
tests/cases/conformance/types/asyncGenerators/types.asyncGenerators.esnext.2.ts(10,7): error TS2322: Type '() => AsyncIterableIterator<string>' is not assignable to type '() => AsyncIterableIterator<number>'.
|
||||
tests/cases/conformance/types/asyncGenerators/types.asyncGenerators.es2018.2.ts(2,12): error TS2504: Type '{}' must have a '[Symbol.asyncIterator]()' method that returns an async iterator.
|
||||
tests/cases/conformance/types/asyncGenerators/types.asyncGenerators.es2018.2.ts(8,12): error TS2504: Type 'Promise<number[]>' must have a '[Symbol.asyncIterator]()' method that returns an async iterator.
|
||||
tests/cases/conformance/types/asyncGenerators/types.asyncGenerators.es2018.2.ts(10,7): error TS2322: Type '() => AsyncIterableIterator<string>' is not assignable to type '() => AsyncIterableIterator<number>'.
|
||||
Type 'AsyncIterableIterator<string>' is not assignable to type 'AsyncIterableIterator<number>'.
|
||||
Type 'string' is not assignable to type 'number'.
|
||||
tests/cases/conformance/types/asyncGenerators/types.asyncGenerators.esnext.2.ts(13,7): error TS2322: Type '() => AsyncIterableIterator<string>' is not assignable to type '() => AsyncIterableIterator<number>'.
|
||||
tests/cases/conformance/types/asyncGenerators/types.asyncGenerators.es2018.2.ts(13,7): error TS2322: Type '() => AsyncIterableIterator<string>' is not assignable to type '() => AsyncIterableIterator<number>'.
|
||||
Type 'AsyncIterableIterator<string>' is not assignable to type 'AsyncIterableIterator<number>'.
|
||||
tests/cases/conformance/types/asyncGenerators/types.asyncGenerators.esnext.2.ts(16,7): error TS2322: Type '() => AsyncIterableIterator<string>' is not assignable to type '() => AsyncIterableIterator<number>'.
|
||||
tests/cases/conformance/types/asyncGenerators/types.asyncGenerators.es2018.2.ts(16,7): error TS2322: Type '() => AsyncIterableIterator<string>' is not assignable to type '() => AsyncIterableIterator<number>'.
|
||||
Type 'AsyncIterableIterator<string>' is not assignable to type 'AsyncIterableIterator<number>'.
|
||||
tests/cases/conformance/types/asyncGenerators/types.asyncGenerators.esnext.2.ts(19,7): error TS2322: Type '() => AsyncIterableIterator<string>' is not assignable to type '() => AsyncIterable<number>'.
|
||||
tests/cases/conformance/types/asyncGenerators/types.asyncGenerators.es2018.2.ts(19,7): error TS2322: Type '() => AsyncIterableIterator<string>' is not assignable to type '() => AsyncIterable<number>'.
|
||||
Type 'AsyncIterableIterator<string>' is not assignable to type 'AsyncIterable<number>'.
|
||||
Types of property '[Symbol.asyncIterator]' are incompatible.
|
||||
Type '() => AsyncIterableIterator<string>' is not assignable to type '() => AsyncIterator<number>'.
|
||||
@ -17,35 +17,35 @@ tests/cases/conformance/types/asyncGenerators/types.asyncGenerators.esnext.2.ts(
|
||||
Type 'Promise<IteratorResult<string>>' is not assignable to type 'Promise<IteratorResult<number>>'.
|
||||
Type 'IteratorResult<string>' is not assignable to type 'IteratorResult<number>'.
|
||||
Type 'string' is not assignable to type 'number'.
|
||||
tests/cases/conformance/types/asyncGenerators/types.asyncGenerators.esnext.2.ts(22,7): error TS2322: Type '() => AsyncIterableIterator<string>' is not assignable to type '() => AsyncIterable<number>'.
|
||||
tests/cases/conformance/types/asyncGenerators/types.asyncGenerators.es2018.2.ts(22,7): error TS2322: Type '() => AsyncIterableIterator<string>' is not assignable to type '() => AsyncIterable<number>'.
|
||||
Type 'AsyncIterableIterator<string>' is not assignable to type 'AsyncIterable<number>'.
|
||||
tests/cases/conformance/types/asyncGenerators/types.asyncGenerators.esnext.2.ts(25,7): error TS2322: Type '() => AsyncIterableIterator<string>' is not assignable to type '() => AsyncIterable<number>'.
|
||||
tests/cases/conformance/types/asyncGenerators/types.asyncGenerators.es2018.2.ts(25,7): error TS2322: Type '() => AsyncIterableIterator<string>' is not assignable to type '() => AsyncIterable<number>'.
|
||||
Type 'AsyncIterableIterator<string>' is not assignable to type 'AsyncIterable<number>'.
|
||||
tests/cases/conformance/types/asyncGenerators/types.asyncGenerators.esnext.2.ts(28,7): error TS2322: Type '() => AsyncIterableIterator<string>' is not assignable to type '() => AsyncIterator<number>'.
|
||||
tests/cases/conformance/types/asyncGenerators/types.asyncGenerators.es2018.2.ts(28,7): error TS2322: Type '() => AsyncIterableIterator<string>' is not assignable to type '() => AsyncIterator<number>'.
|
||||
Type 'AsyncIterableIterator<string>' is not assignable to type 'AsyncIterator<number>'.
|
||||
tests/cases/conformance/types/asyncGenerators/types.asyncGenerators.esnext.2.ts(31,7): error TS2322: Type '() => AsyncIterableIterator<string>' is not assignable to type '() => AsyncIterator<number>'.
|
||||
tests/cases/conformance/types/asyncGenerators/types.asyncGenerators.es2018.2.ts(31,7): error TS2322: Type '() => AsyncIterableIterator<string>' is not assignable to type '() => AsyncIterator<number>'.
|
||||
Type 'AsyncIterableIterator<string>' is not assignable to type 'AsyncIterator<number>'.
|
||||
tests/cases/conformance/types/asyncGenerators/types.asyncGenerators.esnext.2.ts(34,7): error TS2322: Type '() => AsyncIterableIterator<string>' is not assignable to type '() => AsyncIterator<number>'.
|
||||
tests/cases/conformance/types/asyncGenerators/types.asyncGenerators.es2018.2.ts(34,7): error TS2322: Type '() => AsyncIterableIterator<string>' is not assignable to type '() => AsyncIterator<number>'.
|
||||
Type 'AsyncIterableIterator<string>' is not assignable to type 'AsyncIterator<number>'.
|
||||
tests/cases/conformance/types/asyncGenerators/types.asyncGenerators.esnext.2.ts(38,11): error TS2322: Type '"a"' is not assignable to type 'number'.
|
||||
tests/cases/conformance/types/asyncGenerators/types.asyncGenerators.esnext.2.ts(41,12): error TS2322: Type 'string' is not assignable to type 'number'.
|
||||
tests/cases/conformance/types/asyncGenerators/types.asyncGenerators.esnext.2.ts(44,12): error TS2322: Type 'string' is not assignable to type 'number'.
|
||||
tests/cases/conformance/types/asyncGenerators/types.asyncGenerators.esnext.2.ts(47,11): error TS2322: Type '"a"' is not assignable to type 'number'.
|
||||
tests/cases/conformance/types/asyncGenerators/types.asyncGenerators.esnext.2.ts(50,12): error TS2322: Type 'string' is not assignable to type 'number'.
|
||||
tests/cases/conformance/types/asyncGenerators/types.asyncGenerators.esnext.2.ts(53,12): error TS2322: Type 'string' is not assignable to type 'number'.
|
||||
tests/cases/conformance/types/asyncGenerators/types.asyncGenerators.esnext.2.ts(56,11): error TS2322: Type '"a"' is not assignable to type 'number'.
|
||||
tests/cases/conformance/types/asyncGenerators/types.asyncGenerators.esnext.2.ts(59,12): error TS2322: Type 'string' is not assignable to type 'number'.
|
||||
tests/cases/conformance/types/asyncGenerators/types.asyncGenerators.esnext.2.ts(62,12): error TS2322: Type 'string' is not assignable to type 'number'.
|
||||
tests/cases/conformance/types/asyncGenerators/types.asyncGenerators.esnext.2.ts(64,42): error TS2741: Property '[Symbol.iterator]' is missing in type 'AsyncIterableIterator<any>' but required in type 'IterableIterator<number>'.
|
||||
tests/cases/conformance/types/asyncGenerators/types.asyncGenerators.esnext.2.ts(67,42): error TS2741: Property '[Symbol.iterator]' is missing in type 'AsyncIterableIterator<any>' but required in type 'Iterable<number>'.
|
||||
tests/cases/conformance/types/asyncGenerators/types.asyncGenerators.esnext.2.ts(70,42): error TS2322: Type 'AsyncIterableIterator<any>' is not assignable to type 'Iterator<number>'.
|
||||
tests/cases/conformance/types/asyncGenerators/types.asyncGenerators.es2018.2.ts(38,11): error TS2322: Type '"a"' is not assignable to type 'number'.
|
||||
tests/cases/conformance/types/asyncGenerators/types.asyncGenerators.es2018.2.ts(41,12): error TS2322: Type 'string' is not assignable to type 'number'.
|
||||
tests/cases/conformance/types/asyncGenerators/types.asyncGenerators.es2018.2.ts(44,12): error TS2322: Type 'string' is not assignable to type 'number'.
|
||||
tests/cases/conformance/types/asyncGenerators/types.asyncGenerators.es2018.2.ts(47,11): error TS2322: Type '"a"' is not assignable to type 'number'.
|
||||
tests/cases/conformance/types/asyncGenerators/types.asyncGenerators.es2018.2.ts(50,12): error TS2322: Type 'string' is not assignable to type 'number'.
|
||||
tests/cases/conformance/types/asyncGenerators/types.asyncGenerators.es2018.2.ts(53,12): error TS2322: Type 'string' is not assignable to type 'number'.
|
||||
tests/cases/conformance/types/asyncGenerators/types.asyncGenerators.es2018.2.ts(56,11): error TS2322: Type '"a"' is not assignable to type 'number'.
|
||||
tests/cases/conformance/types/asyncGenerators/types.asyncGenerators.es2018.2.ts(59,12): error TS2322: Type 'string' is not assignable to type 'number'.
|
||||
tests/cases/conformance/types/asyncGenerators/types.asyncGenerators.es2018.2.ts(62,12): error TS2322: Type 'string' is not assignable to type 'number'.
|
||||
tests/cases/conformance/types/asyncGenerators/types.asyncGenerators.es2018.2.ts(64,42): error TS2741: Property '[Symbol.iterator]' is missing in type 'AsyncIterableIterator<any>' but required in type 'IterableIterator<number>'.
|
||||
tests/cases/conformance/types/asyncGenerators/types.asyncGenerators.es2018.2.ts(67,42): error TS2741: Property '[Symbol.iterator]' is missing in type 'AsyncIterableIterator<any>' but required in type 'Iterable<number>'.
|
||||
tests/cases/conformance/types/asyncGenerators/types.asyncGenerators.es2018.2.ts(70,42): error TS2322: Type 'AsyncIterableIterator<any>' is not assignable to type 'Iterator<number>'.
|
||||
Types of property 'next' are incompatible.
|
||||
Type '(value?: any) => Promise<IteratorResult<any>>' is not assignable to type '(value?: any) => IteratorResult<number>'.
|
||||
Type 'Promise<IteratorResult<any>>' is missing the following properties from type 'IteratorResult<number>': done, value
|
||||
tests/cases/conformance/types/asyncGenerators/types.asyncGenerators.esnext.2.ts(74,12): error TS2504: Type '{}' must have a '[Symbol.asyncIterator]()' method that returns an async iterator.
|
||||
tests/cases/conformance/types/asyncGenerators/types.asyncGenerators.es2018.2.ts(74,12): error TS2504: Type '{}' must have a '[Symbol.asyncIterator]()' method that returns an async iterator.
|
||||
|
||||
|
||||
==== tests/cases/conformance/types/asyncGenerators/types.asyncGenerators.esnext.2.ts (24 errors) ====
|
||||
==== tests/cases/conformance/types/asyncGenerators/types.asyncGenerators.es2018.2.ts (24 errors) ====
|
||||
async function * inferReturnType1() {
|
||||
yield* {};
|
||||
~~
|
||||
@ -191,4 +191,5 @@ tests/cases/conformance/types/asyncGenerators/types.asyncGenerators.esnext.2.ts(
|
||||
yield* {};
|
||||
~~
|
||||
!!! error TS2504: Type '{}' must have a '[Symbol.asyncIterator]()' method that returns an async iterator.
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,17 +1,17 @@
|
||||
=== tests/cases/conformance/types/asyncGenerators/types.asyncGenerators.esnext.2.ts ===
|
||||
=== tests/cases/conformance/types/asyncGenerators/types.asyncGenerators.es2018.2.ts ===
|
||||
async function * inferReturnType1() {
|
||||
>inferReturnType1 : Symbol(inferReturnType1, Decl(types.asyncGenerators.esnext.2.ts, 0, 0))
|
||||
>inferReturnType1 : Symbol(inferReturnType1, Decl(types.asyncGenerators.es2018.2.ts, 0, 0))
|
||||
|
||||
yield* {};
|
||||
}
|
||||
async function * inferReturnType2() {
|
||||
>inferReturnType2 : Symbol(inferReturnType2, Decl(types.asyncGenerators.esnext.2.ts, 2, 1))
|
||||
>inferReturnType2 : Symbol(inferReturnType2, Decl(types.asyncGenerators.es2018.2.ts, 2, 1))
|
||||
|
||||
yield* inferReturnType2();
|
||||
>inferReturnType2 : Symbol(inferReturnType2, Decl(types.asyncGenerators.esnext.2.ts, 2, 1))
|
||||
>inferReturnType2 : Symbol(inferReturnType2, Decl(types.asyncGenerators.es2018.2.ts, 2, 1))
|
||||
}
|
||||
async function * inferReturnType3() {
|
||||
>inferReturnType3 : Symbol(inferReturnType3, Decl(types.asyncGenerators.esnext.2.ts, 5, 1))
|
||||
>inferReturnType3 : Symbol(inferReturnType3, Decl(types.asyncGenerators.es2018.2.ts, 5, 1))
|
||||
|
||||
yield* Promise.resolve([1, 2]);
|
||||
>Promise.resolve : Symbol(PromiseConstructor.resolve, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --))
|
||||
@ -19,133 +19,134 @@ async function * inferReturnType3() {
|
||||
>resolve : Symbol(PromiseConstructor.resolve, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --))
|
||||
}
|
||||
const assignability1: () => AsyncIterableIterator<number> = async function * () {
|
||||
>assignability1 : Symbol(assignability1, Decl(types.asyncGenerators.esnext.2.ts, 9, 5))
|
||||
>assignability1 : Symbol(assignability1, Decl(types.asyncGenerators.es2018.2.ts, 9, 5))
|
||||
>AsyncIterableIterator : Symbol(AsyncIterableIterator, Decl(lib.esnext.asynciterable.d.ts, --, --))
|
||||
|
||||
yield "a";
|
||||
};
|
||||
const assignability2: () => AsyncIterableIterator<number> = async function * () {
|
||||
>assignability2 : Symbol(assignability2, Decl(types.asyncGenerators.esnext.2.ts, 12, 5))
|
||||
>assignability2 : Symbol(assignability2, Decl(types.asyncGenerators.es2018.2.ts, 12, 5))
|
||||
>AsyncIterableIterator : Symbol(AsyncIterableIterator, Decl(lib.esnext.asynciterable.d.ts, --, --))
|
||||
|
||||
yield* ["a", "b"];
|
||||
};
|
||||
const assignability3: () => AsyncIterableIterator<number> = async function * () {
|
||||
>assignability3 : Symbol(assignability3, Decl(types.asyncGenerators.esnext.2.ts, 15, 5))
|
||||
>assignability3 : Symbol(assignability3, Decl(types.asyncGenerators.es2018.2.ts, 15, 5))
|
||||
>AsyncIterableIterator : Symbol(AsyncIterableIterator, Decl(lib.esnext.asynciterable.d.ts, --, --))
|
||||
|
||||
yield* (async function * () { yield "a"; })();
|
||||
};
|
||||
const assignability4: () => AsyncIterable<number> = async function * () {
|
||||
>assignability4 : Symbol(assignability4, Decl(types.asyncGenerators.esnext.2.ts, 18, 5))
|
||||
>assignability4 : Symbol(assignability4, Decl(types.asyncGenerators.es2018.2.ts, 18, 5))
|
||||
>AsyncIterable : Symbol(AsyncIterable, Decl(lib.esnext.asynciterable.d.ts, --, --))
|
||||
|
||||
yield "a";
|
||||
};
|
||||
const assignability5: () => AsyncIterable<number> = async function * () {
|
||||
>assignability5 : Symbol(assignability5, Decl(types.asyncGenerators.esnext.2.ts, 21, 5))
|
||||
>assignability5 : Symbol(assignability5, Decl(types.asyncGenerators.es2018.2.ts, 21, 5))
|
||||
>AsyncIterable : Symbol(AsyncIterable, Decl(lib.esnext.asynciterable.d.ts, --, --))
|
||||
|
||||
yield* ["a", "b"];
|
||||
};
|
||||
const assignability6: () => AsyncIterable<number> = async function * () {
|
||||
>assignability6 : Symbol(assignability6, Decl(types.asyncGenerators.esnext.2.ts, 24, 5))
|
||||
>assignability6 : Symbol(assignability6, Decl(types.asyncGenerators.es2018.2.ts, 24, 5))
|
||||
>AsyncIterable : Symbol(AsyncIterable, Decl(lib.esnext.asynciterable.d.ts, --, --))
|
||||
|
||||
yield* (async function * () { yield "a"; })();
|
||||
};
|
||||
const assignability7: () => AsyncIterator<number> = async function * () {
|
||||
>assignability7 : Symbol(assignability7, Decl(types.asyncGenerators.esnext.2.ts, 27, 5))
|
||||
>assignability7 : Symbol(assignability7, Decl(types.asyncGenerators.es2018.2.ts, 27, 5))
|
||||
>AsyncIterator : Symbol(AsyncIterator, Decl(lib.esnext.asynciterable.d.ts, --, --))
|
||||
|
||||
yield "a";
|
||||
};
|
||||
const assignability8: () => AsyncIterator<number> = async function * () {
|
||||
>assignability8 : Symbol(assignability8, Decl(types.asyncGenerators.esnext.2.ts, 30, 5))
|
||||
>assignability8 : Symbol(assignability8, Decl(types.asyncGenerators.es2018.2.ts, 30, 5))
|
||||
>AsyncIterator : Symbol(AsyncIterator, Decl(lib.esnext.asynciterable.d.ts, --, --))
|
||||
|
||||
yield* ["a", "b"];
|
||||
};
|
||||
const assignability9: () => AsyncIterator<number> = async function * () {
|
||||
>assignability9 : Symbol(assignability9, Decl(types.asyncGenerators.esnext.2.ts, 33, 5))
|
||||
>assignability9 : Symbol(assignability9, Decl(types.asyncGenerators.es2018.2.ts, 33, 5))
|
||||
>AsyncIterator : Symbol(AsyncIterator, Decl(lib.esnext.asynciterable.d.ts, --, --))
|
||||
|
||||
yield* (async function * () { yield "a"; })();
|
||||
};
|
||||
async function * explicitReturnType1(): AsyncIterableIterator<number> {
|
||||
>explicitReturnType1 : Symbol(explicitReturnType1, Decl(types.asyncGenerators.esnext.2.ts, 35, 2))
|
||||
>explicitReturnType1 : Symbol(explicitReturnType1, Decl(types.asyncGenerators.es2018.2.ts, 35, 2))
|
||||
>AsyncIterableIterator : Symbol(AsyncIterableIterator, Decl(lib.esnext.asynciterable.d.ts, --, --))
|
||||
|
||||
yield "a";
|
||||
}
|
||||
async function * explicitReturnType2(): AsyncIterableIterator<number> {
|
||||
>explicitReturnType2 : Symbol(explicitReturnType2, Decl(types.asyncGenerators.esnext.2.ts, 38, 1))
|
||||
>explicitReturnType2 : Symbol(explicitReturnType2, Decl(types.asyncGenerators.es2018.2.ts, 38, 1))
|
||||
>AsyncIterableIterator : Symbol(AsyncIterableIterator, Decl(lib.esnext.asynciterable.d.ts, --, --))
|
||||
|
||||
yield* ["a", "b"];
|
||||
}
|
||||
async function * explicitReturnType3(): AsyncIterableIterator<number> {
|
||||
>explicitReturnType3 : Symbol(explicitReturnType3, Decl(types.asyncGenerators.esnext.2.ts, 41, 1))
|
||||
>explicitReturnType3 : Symbol(explicitReturnType3, Decl(types.asyncGenerators.es2018.2.ts, 41, 1))
|
||||
>AsyncIterableIterator : Symbol(AsyncIterableIterator, Decl(lib.esnext.asynciterable.d.ts, --, --))
|
||||
|
||||
yield* (async function * () { yield "a"; })();
|
||||
}
|
||||
async function * explicitReturnType4(): AsyncIterable<number> {
|
||||
>explicitReturnType4 : Symbol(explicitReturnType4, Decl(types.asyncGenerators.esnext.2.ts, 44, 1))
|
||||
>explicitReturnType4 : Symbol(explicitReturnType4, Decl(types.asyncGenerators.es2018.2.ts, 44, 1))
|
||||
>AsyncIterable : Symbol(AsyncIterable, Decl(lib.esnext.asynciterable.d.ts, --, --))
|
||||
|
||||
yield "a";
|
||||
}
|
||||
async function * explicitReturnType5(): AsyncIterable<number> {
|
||||
>explicitReturnType5 : Symbol(explicitReturnType5, Decl(types.asyncGenerators.esnext.2.ts, 47, 1))
|
||||
>explicitReturnType5 : Symbol(explicitReturnType5, Decl(types.asyncGenerators.es2018.2.ts, 47, 1))
|
||||
>AsyncIterable : Symbol(AsyncIterable, Decl(lib.esnext.asynciterable.d.ts, --, --))
|
||||
|
||||
yield* ["a", "b"];
|
||||
}
|
||||
async function * explicitReturnType6(): AsyncIterable<number> {
|
||||
>explicitReturnType6 : Symbol(explicitReturnType6, Decl(types.asyncGenerators.esnext.2.ts, 50, 1))
|
||||
>explicitReturnType6 : Symbol(explicitReturnType6, Decl(types.asyncGenerators.es2018.2.ts, 50, 1))
|
||||
>AsyncIterable : Symbol(AsyncIterable, Decl(lib.esnext.asynciterable.d.ts, --, --))
|
||||
|
||||
yield* (async function * () { yield "a"; })();
|
||||
}
|
||||
async function * explicitReturnType7(): AsyncIterator<number> {
|
||||
>explicitReturnType7 : Symbol(explicitReturnType7, Decl(types.asyncGenerators.esnext.2.ts, 53, 1))
|
||||
>explicitReturnType7 : Symbol(explicitReturnType7, Decl(types.asyncGenerators.es2018.2.ts, 53, 1))
|
||||
>AsyncIterator : Symbol(AsyncIterator, Decl(lib.esnext.asynciterable.d.ts, --, --))
|
||||
|
||||
yield "a";
|
||||
}
|
||||
async function * explicitReturnType8(): AsyncIterator<number> {
|
||||
>explicitReturnType8 : Symbol(explicitReturnType8, Decl(types.asyncGenerators.esnext.2.ts, 56, 1))
|
||||
>explicitReturnType8 : Symbol(explicitReturnType8, Decl(types.asyncGenerators.es2018.2.ts, 56, 1))
|
||||
>AsyncIterator : Symbol(AsyncIterator, Decl(lib.esnext.asynciterable.d.ts, --, --))
|
||||
|
||||
yield* ["a", "b"];
|
||||
}
|
||||
async function * explicitReturnType9(): AsyncIterator<number> {
|
||||
>explicitReturnType9 : Symbol(explicitReturnType9, Decl(types.asyncGenerators.esnext.2.ts, 59, 1))
|
||||
>explicitReturnType9 : Symbol(explicitReturnType9, Decl(types.asyncGenerators.es2018.2.ts, 59, 1))
|
||||
>AsyncIterator : Symbol(AsyncIterator, Decl(lib.esnext.asynciterable.d.ts, --, --))
|
||||
|
||||
yield* (async function * () { yield "a"; })();
|
||||
}
|
||||
async function * explicitReturnType10(): IterableIterator<number> {
|
||||
>explicitReturnType10 : Symbol(explicitReturnType10, Decl(types.asyncGenerators.esnext.2.ts, 62, 1))
|
||||
>explicitReturnType10 : Symbol(explicitReturnType10, Decl(types.asyncGenerators.es2018.2.ts, 62, 1))
|
||||
>IterableIterator : Symbol(IterableIterator, Decl(lib.es2015.iterable.d.ts, --, --))
|
||||
|
||||
yield 1;
|
||||
}
|
||||
async function * explicitReturnType11(): Iterable<number> {
|
||||
>explicitReturnType11 : Symbol(explicitReturnType11, Decl(types.asyncGenerators.esnext.2.ts, 65, 1))
|
||||
>explicitReturnType11 : Symbol(explicitReturnType11, Decl(types.asyncGenerators.es2018.2.ts, 65, 1))
|
||||
>Iterable : Symbol(Iterable, Decl(lib.es2015.iterable.d.ts, --, --))
|
||||
|
||||
yield 1;
|
||||
}
|
||||
async function * explicitReturnType12(): Iterator<number> {
|
||||
>explicitReturnType12 : Symbol(explicitReturnType12, Decl(types.asyncGenerators.esnext.2.ts, 68, 1))
|
||||
>explicitReturnType12 : Symbol(explicitReturnType12, Decl(types.asyncGenerators.es2018.2.ts, 68, 1))
|
||||
>Iterator : Symbol(Iterator, Decl(lib.es2015.iterable.d.ts, --, --))
|
||||
|
||||
yield 1;
|
||||
}
|
||||
async function * yieldStar() {
|
||||
>yieldStar : Symbol(yieldStar, Decl(types.asyncGenerators.esnext.2.ts, 71, 1))
|
||||
>yieldStar : Symbol(yieldStar, Decl(types.asyncGenerators.es2018.2.ts, 71, 1))
|
||||
|
||||
yield* {};
|
||||
}
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
=== tests/cases/conformance/types/asyncGenerators/types.asyncGenerators.esnext.2.ts ===
|
||||
=== tests/cases/conformance/types/asyncGenerators/types.asyncGenerators.es2018.2.ts ===
|
||||
async function * inferReturnType1() {
|
||||
>inferReturnType1 : () => AsyncIterableIterator<any>
|
||||
|
||||
@ -235,3 +235,4 @@ async function * yieldStar() {
|
||||
>yield* {} : any
|
||||
>{} : {}
|
||||
}
|
||||
|
||||
77
tests/baselines/reference/types.forAwait.es2018.1.symbols
Normal file
77
tests/baselines/reference/types.forAwait.es2018.1.symbols
Normal file
@ -0,0 +1,77 @@
|
||||
=== tests/cases/conformance/types/forAwait/types.forAwait.es2018.1.ts ===
|
||||
declare const asyncIterable: AsyncIterable<number>;
|
||||
>asyncIterable : Symbol(asyncIterable, Decl(types.forAwait.es2018.1.ts, 0, 13))
|
||||
>AsyncIterable : Symbol(AsyncIterable, Decl(lib.esnext.asynciterable.d.ts, --, --))
|
||||
|
||||
declare const iterable: Iterable<number>;
|
||||
>iterable : Symbol(iterable, Decl(types.forAwait.es2018.1.ts, 1, 13))
|
||||
>Iterable : Symbol(Iterable, Decl(lib.es2015.iterable.d.ts, --, --))
|
||||
|
||||
declare const iterableOfPromise: Iterable<Promise<number>>;
|
||||
>iterableOfPromise : Symbol(iterableOfPromise, Decl(types.forAwait.es2018.1.ts, 2, 13))
|
||||
>Iterable : Symbol(Iterable, Decl(lib.es2015.iterable.d.ts, --, --))
|
||||
>Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2018.promise.d.ts, --, --))
|
||||
|
||||
async function f1() {
|
||||
>f1 : Symbol(f1, Decl(types.forAwait.es2018.1.ts, 2, 59))
|
||||
|
||||
let y: number;
|
||||
>y : Symbol(y, Decl(types.forAwait.es2018.1.ts, 4, 7))
|
||||
|
||||
for await (const x of asyncIterable) {
|
||||
>x : Symbol(x, Decl(types.forAwait.es2018.1.ts, 5, 20))
|
||||
>asyncIterable : Symbol(asyncIterable, Decl(types.forAwait.es2018.1.ts, 0, 13))
|
||||
}
|
||||
for await (const x of iterable) {
|
||||
>x : Symbol(x, Decl(types.forAwait.es2018.1.ts, 7, 20))
|
||||
>iterable : Symbol(iterable, Decl(types.forAwait.es2018.1.ts, 1, 13))
|
||||
}
|
||||
for await (const x of iterableOfPromise) {
|
||||
>x : Symbol(x, Decl(types.forAwait.es2018.1.ts, 9, 20))
|
||||
>iterableOfPromise : Symbol(iterableOfPromise, Decl(types.forAwait.es2018.1.ts, 2, 13))
|
||||
}
|
||||
for await (y of asyncIterable) {
|
||||
>y : Symbol(y, Decl(types.forAwait.es2018.1.ts, 4, 7))
|
||||
>asyncIterable : Symbol(asyncIterable, Decl(types.forAwait.es2018.1.ts, 0, 13))
|
||||
}
|
||||
for await (y of iterable) {
|
||||
>y : Symbol(y, Decl(types.forAwait.es2018.1.ts, 4, 7))
|
||||
>iterable : Symbol(iterable, Decl(types.forAwait.es2018.1.ts, 1, 13))
|
||||
}
|
||||
for await (y of iterableOfPromise) {
|
||||
>y : Symbol(y, Decl(types.forAwait.es2018.1.ts, 4, 7))
|
||||
>iterableOfPromise : Symbol(iterableOfPromise, Decl(types.forAwait.es2018.1.ts, 2, 13))
|
||||
}
|
||||
}
|
||||
async function * f2() {
|
||||
>f2 : Symbol(f2, Decl(types.forAwait.es2018.1.ts, 17, 1))
|
||||
|
||||
let y: number;
|
||||
>y : Symbol(y, Decl(types.forAwait.es2018.1.ts, 19, 7))
|
||||
|
||||
for await (const x of asyncIterable) {
|
||||
>x : Symbol(x, Decl(types.forAwait.es2018.1.ts, 20, 20))
|
||||
>asyncIterable : Symbol(asyncIterable, Decl(types.forAwait.es2018.1.ts, 0, 13))
|
||||
}
|
||||
for await (const x of iterable) {
|
||||
>x : Symbol(x, Decl(types.forAwait.es2018.1.ts, 22, 20))
|
||||
>iterable : Symbol(iterable, Decl(types.forAwait.es2018.1.ts, 1, 13))
|
||||
}
|
||||
for await (const x of iterableOfPromise) {
|
||||
>x : Symbol(x, Decl(types.forAwait.es2018.1.ts, 24, 20))
|
||||
>iterableOfPromise : Symbol(iterableOfPromise, Decl(types.forAwait.es2018.1.ts, 2, 13))
|
||||
}
|
||||
for await (y of asyncIterable) {
|
||||
>y : Symbol(y, Decl(types.forAwait.es2018.1.ts, 19, 7))
|
||||
>asyncIterable : Symbol(asyncIterable, Decl(types.forAwait.es2018.1.ts, 0, 13))
|
||||
}
|
||||
for await (y of iterable) {
|
||||
>y : Symbol(y, Decl(types.forAwait.es2018.1.ts, 19, 7))
|
||||
>iterable : Symbol(iterable, Decl(types.forAwait.es2018.1.ts, 1, 13))
|
||||
}
|
||||
for await (y of iterableOfPromise) {
|
||||
>y : Symbol(y, Decl(types.forAwait.es2018.1.ts, 19, 7))
|
||||
>iterableOfPromise : Symbol(iterableOfPromise, Decl(types.forAwait.es2018.1.ts, 2, 13))
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
=== tests/cases/conformance/types/forAwait/types.forAwait.esnext.1.ts ===
|
||||
=== tests/cases/conformance/types/forAwait/types.forAwait.es2018.1.ts ===
|
||||
declare const asyncIterable: AsyncIterable<number>;
|
||||
>asyncIterable : AsyncIterable<number>
|
||||
|
||||
@ -70,3 +70,4 @@ async function * f2() {
|
||||
>iterableOfPromise : Iterable<Promise<number>>
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,12 +1,12 @@
|
||||
tests/cases/conformance/types/forAwait/types.forAwait.esnext.2.ts(6,27): error TS2504: Type '{}' must have a '[Symbol.asyncIterator]()' method that returns an async iterator.
|
||||
tests/cases/conformance/types/forAwait/types.forAwait.esnext.2.ts(8,21): error TS2504: Type '{}' must have a '[Symbol.asyncIterator]()' method that returns an async iterator.
|
||||
tests/cases/conformance/types/forAwait/types.forAwait.esnext.2.ts(10,16): error TS2322: Type 'number' is not assignable to type 'string'.
|
||||
tests/cases/conformance/types/forAwait/types.forAwait.esnext.2.ts(12,16): error TS2322: Type 'number' is not assignable to type 'string'.
|
||||
tests/cases/conformance/types/forAwait/types.forAwait.esnext.2.ts(14,21): error TS2488: Type 'AsyncIterable<number>' must have a '[Symbol.iterator]()' method that returns an iterator.
|
||||
tests/cases/conformance/types/forAwait/types.forAwait.esnext.2.ts(16,15): error TS2488: Type 'AsyncIterable<number>' must have a '[Symbol.iterator]()' method that returns an iterator.
|
||||
tests/cases/conformance/types/forAwait/types.forAwait.es2018.2.ts(6,27): error TS2504: Type '{}' must have a '[Symbol.asyncIterator]()' method that returns an async iterator.
|
||||
tests/cases/conformance/types/forAwait/types.forAwait.es2018.2.ts(8,21): error TS2504: Type '{}' must have a '[Symbol.asyncIterator]()' method that returns an async iterator.
|
||||
tests/cases/conformance/types/forAwait/types.forAwait.es2018.2.ts(10,16): error TS2322: Type 'number' is not assignable to type 'string'.
|
||||
tests/cases/conformance/types/forAwait/types.forAwait.es2018.2.ts(12,16): error TS2322: Type 'number' is not assignable to type 'string'.
|
||||
tests/cases/conformance/types/forAwait/types.forAwait.es2018.2.ts(14,21): error TS2488: Type 'AsyncIterable<number>' must have a '[Symbol.iterator]()' method that returns an iterator.
|
||||
tests/cases/conformance/types/forAwait/types.forAwait.es2018.2.ts(16,15): error TS2488: Type 'AsyncIterable<number>' must have a '[Symbol.iterator]()' method that returns an iterator.
|
||||
|
||||
|
||||
==== tests/cases/conformance/types/forAwait/types.forAwait.esnext.2.ts (6 errors) ====
|
||||
==== tests/cases/conformance/types/forAwait/types.forAwait.es2018.2.ts (6 errors) ====
|
||||
declare const asyncIterable: AsyncIterable<number>;
|
||||
declare const iterable: Iterable<number>;
|
||||
async function f() {
|
||||
@ -36,4 +36,5 @@ tests/cases/conformance/types/forAwait/types.forAwait.esnext.2.ts(16,15): error
|
||||
~~~~~~~~~~~~~
|
||||
!!! error TS2488: Type 'AsyncIterable<number>' must have a '[Symbol.iterator]()' method that returns an iterator.
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
42
tests/baselines/reference/types.forAwait.es2018.2.symbols
Normal file
42
tests/baselines/reference/types.forAwait.es2018.2.symbols
Normal file
@ -0,0 +1,42 @@
|
||||
=== tests/cases/conformance/types/forAwait/types.forAwait.es2018.2.ts ===
|
||||
declare const asyncIterable: AsyncIterable<number>;
|
||||
>asyncIterable : Symbol(asyncIterable, Decl(types.forAwait.es2018.2.ts, 0, 13))
|
||||
>AsyncIterable : Symbol(AsyncIterable, Decl(lib.esnext.asynciterable.d.ts, --, --))
|
||||
|
||||
declare const iterable: Iterable<number>;
|
||||
>iterable : Symbol(iterable, Decl(types.forAwait.es2018.2.ts, 1, 13))
|
||||
>Iterable : Symbol(Iterable, Decl(lib.es2015.iterable.d.ts, --, --))
|
||||
|
||||
async function f() {
|
||||
>f : Symbol(f, Decl(types.forAwait.es2018.2.ts, 1, 41))
|
||||
|
||||
let y: number;
|
||||
>y : Symbol(y, Decl(types.forAwait.es2018.2.ts, 3, 7))
|
||||
|
||||
let z: string;
|
||||
>z : Symbol(z, Decl(types.forAwait.es2018.2.ts, 4, 7))
|
||||
|
||||
for await (const x of {}) {
|
||||
>x : Symbol(x, Decl(types.forAwait.es2018.2.ts, 5, 20))
|
||||
}
|
||||
for await (y of {}) {
|
||||
>y : Symbol(y, Decl(types.forAwait.es2018.2.ts, 3, 7))
|
||||
}
|
||||
for await (z of asyncIterable) {
|
||||
>z : Symbol(z, Decl(types.forAwait.es2018.2.ts, 4, 7))
|
||||
>asyncIterable : Symbol(asyncIterable, Decl(types.forAwait.es2018.2.ts, 0, 13))
|
||||
}
|
||||
for await (z of iterable) {
|
||||
>z : Symbol(z, Decl(types.forAwait.es2018.2.ts, 4, 7))
|
||||
>iterable : Symbol(iterable, Decl(types.forAwait.es2018.2.ts, 1, 13))
|
||||
}
|
||||
for (const x of asyncIterable) {
|
||||
>x : Symbol(x, Decl(types.forAwait.es2018.2.ts, 13, 14))
|
||||
>asyncIterable : Symbol(asyncIterable, Decl(types.forAwait.es2018.2.ts, 0, 13))
|
||||
}
|
||||
for (y of asyncIterable) {
|
||||
>y : Symbol(y, Decl(types.forAwait.es2018.2.ts, 3, 7))
|
||||
>asyncIterable : Symbol(asyncIterable, Decl(types.forAwait.es2018.2.ts, 0, 13))
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
=== tests/cases/conformance/types/forAwait/types.forAwait.esnext.2.ts ===
|
||||
=== tests/cases/conformance/types/forAwait/types.forAwait.es2018.2.ts ===
|
||||
declare const asyncIterable: AsyncIterable<number>;
|
||||
>asyncIterable : AsyncIterable<number>
|
||||
|
||||
@ -39,3 +39,4 @@ async function f() {
|
||||
>asyncIterable : AsyncIterable<number>
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,12 +1,12 @@
|
||||
error TS2318: Cannot find global type 'AsyncIterableIterator'.
|
||||
tests/cases/conformance/types/forAwait/types.forAwait.esnext.3.ts(3,27): error TS2504: Type '{}' must have a '[Symbol.asyncIterator]()' method that returns an async iterator.
|
||||
tests/cases/conformance/types/forAwait/types.forAwait.esnext.3.ts(5,21): error TS2504: Type '{}' must have a '[Symbol.asyncIterator]()' method that returns an async iterator.
|
||||
tests/cases/conformance/types/forAwait/types.forAwait.esnext.3.ts(10,27): error TS2504: Type '{}' must have a '[Symbol.asyncIterator]()' method that returns an async iterator.
|
||||
tests/cases/conformance/types/forAwait/types.forAwait.esnext.3.ts(12,21): error TS2504: Type '{}' must have a '[Symbol.asyncIterator]()' method that returns an async iterator.
|
||||
tests/cases/conformance/types/forAwait/types.forAwait.es2018.3.ts(3,27): error TS2504: Type '{}' must have a '[Symbol.asyncIterator]()' method that returns an async iterator.
|
||||
tests/cases/conformance/types/forAwait/types.forAwait.es2018.3.ts(5,21): error TS2504: Type '{}' must have a '[Symbol.asyncIterator]()' method that returns an async iterator.
|
||||
tests/cases/conformance/types/forAwait/types.forAwait.es2018.3.ts(10,27): error TS2504: Type '{}' must have a '[Symbol.asyncIterator]()' method that returns an async iterator.
|
||||
tests/cases/conformance/types/forAwait/types.forAwait.es2018.3.ts(12,21): error TS2504: Type '{}' must have a '[Symbol.asyncIterator]()' method that returns an async iterator.
|
||||
|
||||
|
||||
!!! error TS2318: Cannot find global type 'AsyncIterableIterator'.
|
||||
==== tests/cases/conformance/types/forAwait/types.forAwait.esnext.3.ts (4 errors) ====
|
||||
==== tests/cases/conformance/types/forAwait/types.forAwait.es2018.3.ts (4 errors) ====
|
||||
async function f1() {
|
||||
let y: number;
|
||||
for await (const x of {}) {
|
||||
@ -28,4 +28,5 @@ tests/cases/conformance/types/forAwait/types.forAwait.esnext.3.ts(12,21): error
|
||||
~~
|
||||
!!! error TS2504: Type '{}' must have a '[Symbol.asyncIterator]()' method that returns an async iterator.
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
28
tests/baselines/reference/types.forAwait.es2018.3.symbols
Normal file
28
tests/baselines/reference/types.forAwait.es2018.3.symbols
Normal file
@ -0,0 +1,28 @@
|
||||
=== tests/cases/conformance/types/forAwait/types.forAwait.es2018.3.ts ===
|
||||
async function f1() {
|
||||
>f1 : Symbol(f1, Decl(types.forAwait.es2018.3.ts, 0, 0))
|
||||
|
||||
let y: number;
|
||||
>y : Symbol(y, Decl(types.forAwait.es2018.3.ts, 1, 7))
|
||||
|
||||
for await (const x of {}) {
|
||||
>x : Symbol(x, Decl(types.forAwait.es2018.3.ts, 2, 20))
|
||||
}
|
||||
for await (y of {}) {
|
||||
>y : Symbol(y, Decl(types.forAwait.es2018.3.ts, 1, 7))
|
||||
}
|
||||
}
|
||||
async function* f2() {
|
||||
>f2 : Symbol(f2, Decl(types.forAwait.es2018.3.ts, 6, 1))
|
||||
|
||||
let y: number;
|
||||
>y : Symbol(y, Decl(types.forAwait.es2018.3.ts, 8, 7))
|
||||
|
||||
for await (const x of {}) {
|
||||
>x : Symbol(x, Decl(types.forAwait.es2018.3.ts, 9, 20))
|
||||
}
|
||||
for await (y of {}) {
|
||||
>y : Symbol(y, Decl(types.forAwait.es2018.3.ts, 8, 7))
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
=== tests/cases/conformance/types/forAwait/types.forAwait.esnext.3.ts ===
|
||||
=== tests/cases/conformance/types/forAwait/types.forAwait.es2018.3.ts ===
|
||||
async function f1() {
|
||||
>f1 : () => Promise<void>
|
||||
|
||||
@ -29,3 +29,4 @@ async function* f2() {
|
||||
>{} : {}
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,76 +0,0 @@
|
||||
=== tests/cases/conformance/types/forAwait/types.forAwait.esnext.1.ts ===
|
||||
declare const asyncIterable: AsyncIterable<number>;
|
||||
>asyncIterable : Symbol(asyncIterable, Decl(types.forAwait.esnext.1.ts, 0, 13))
|
||||
>AsyncIterable : Symbol(AsyncIterable, Decl(lib.esnext.asynciterable.d.ts, --, --))
|
||||
|
||||
declare const iterable: Iterable<number>;
|
||||
>iterable : Symbol(iterable, Decl(types.forAwait.esnext.1.ts, 1, 13))
|
||||
>Iterable : Symbol(Iterable, Decl(lib.es2015.iterable.d.ts, --, --))
|
||||
|
||||
declare const iterableOfPromise: Iterable<Promise<number>>;
|
||||
>iterableOfPromise : Symbol(iterableOfPromise, Decl(types.forAwait.esnext.1.ts, 2, 13))
|
||||
>Iterable : Symbol(Iterable, Decl(lib.es2015.iterable.d.ts, --, --))
|
||||
>Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2018.promise.d.ts, --, --))
|
||||
|
||||
async function f1() {
|
||||
>f1 : Symbol(f1, Decl(types.forAwait.esnext.1.ts, 2, 59))
|
||||
|
||||
let y: number;
|
||||
>y : Symbol(y, Decl(types.forAwait.esnext.1.ts, 4, 7))
|
||||
|
||||
for await (const x of asyncIterable) {
|
||||
>x : Symbol(x, Decl(types.forAwait.esnext.1.ts, 5, 20))
|
||||
>asyncIterable : Symbol(asyncIterable, Decl(types.forAwait.esnext.1.ts, 0, 13))
|
||||
}
|
||||
for await (const x of iterable) {
|
||||
>x : Symbol(x, Decl(types.forAwait.esnext.1.ts, 7, 20))
|
||||
>iterable : Symbol(iterable, Decl(types.forAwait.esnext.1.ts, 1, 13))
|
||||
}
|
||||
for await (const x of iterableOfPromise) {
|
||||
>x : Symbol(x, Decl(types.forAwait.esnext.1.ts, 9, 20))
|
||||
>iterableOfPromise : Symbol(iterableOfPromise, Decl(types.forAwait.esnext.1.ts, 2, 13))
|
||||
}
|
||||
for await (y of asyncIterable) {
|
||||
>y : Symbol(y, Decl(types.forAwait.esnext.1.ts, 4, 7))
|
||||
>asyncIterable : Symbol(asyncIterable, Decl(types.forAwait.esnext.1.ts, 0, 13))
|
||||
}
|
||||
for await (y of iterable) {
|
||||
>y : Symbol(y, Decl(types.forAwait.esnext.1.ts, 4, 7))
|
||||
>iterable : Symbol(iterable, Decl(types.forAwait.esnext.1.ts, 1, 13))
|
||||
}
|
||||
for await (y of iterableOfPromise) {
|
||||
>y : Symbol(y, Decl(types.forAwait.esnext.1.ts, 4, 7))
|
||||
>iterableOfPromise : Symbol(iterableOfPromise, Decl(types.forAwait.esnext.1.ts, 2, 13))
|
||||
}
|
||||
}
|
||||
async function * f2() {
|
||||
>f2 : Symbol(f2, Decl(types.forAwait.esnext.1.ts, 17, 1))
|
||||
|
||||
let y: number;
|
||||
>y : Symbol(y, Decl(types.forAwait.esnext.1.ts, 19, 7))
|
||||
|
||||
for await (const x of asyncIterable) {
|
||||
>x : Symbol(x, Decl(types.forAwait.esnext.1.ts, 20, 20))
|
||||
>asyncIterable : Symbol(asyncIterable, Decl(types.forAwait.esnext.1.ts, 0, 13))
|
||||
}
|
||||
for await (const x of iterable) {
|
||||
>x : Symbol(x, Decl(types.forAwait.esnext.1.ts, 22, 20))
|
||||
>iterable : Symbol(iterable, Decl(types.forAwait.esnext.1.ts, 1, 13))
|
||||
}
|
||||
for await (const x of iterableOfPromise) {
|
||||
>x : Symbol(x, Decl(types.forAwait.esnext.1.ts, 24, 20))
|
||||
>iterableOfPromise : Symbol(iterableOfPromise, Decl(types.forAwait.esnext.1.ts, 2, 13))
|
||||
}
|
||||
for await (y of asyncIterable) {
|
||||
>y : Symbol(y, Decl(types.forAwait.esnext.1.ts, 19, 7))
|
||||
>asyncIterable : Symbol(asyncIterable, Decl(types.forAwait.esnext.1.ts, 0, 13))
|
||||
}
|
||||
for await (y of iterable) {
|
||||
>y : Symbol(y, Decl(types.forAwait.esnext.1.ts, 19, 7))
|
||||
>iterable : Symbol(iterable, Decl(types.forAwait.esnext.1.ts, 1, 13))
|
||||
}
|
||||
for await (y of iterableOfPromise) {
|
||||
>y : Symbol(y, Decl(types.forAwait.esnext.1.ts, 19, 7))
|
||||
>iterableOfPromise : Symbol(iterableOfPromise, Decl(types.forAwait.esnext.1.ts, 2, 13))
|
||||
}
|
||||
}
|
||||
@ -1,41 +0,0 @@
|
||||
=== tests/cases/conformance/types/forAwait/types.forAwait.esnext.2.ts ===
|
||||
declare const asyncIterable: AsyncIterable<number>;
|
||||
>asyncIterable : Symbol(asyncIterable, Decl(types.forAwait.esnext.2.ts, 0, 13))
|
||||
>AsyncIterable : Symbol(AsyncIterable, Decl(lib.esnext.asynciterable.d.ts, --, --))
|
||||
|
||||
declare const iterable: Iterable<number>;
|
||||
>iterable : Symbol(iterable, Decl(types.forAwait.esnext.2.ts, 1, 13))
|
||||
>Iterable : Symbol(Iterable, Decl(lib.es2015.iterable.d.ts, --, --))
|
||||
|
||||
async function f() {
|
||||
>f : Symbol(f, Decl(types.forAwait.esnext.2.ts, 1, 41))
|
||||
|
||||
let y: number;
|
||||
>y : Symbol(y, Decl(types.forAwait.esnext.2.ts, 3, 7))
|
||||
|
||||
let z: string;
|
||||
>z : Symbol(z, Decl(types.forAwait.esnext.2.ts, 4, 7))
|
||||
|
||||
for await (const x of {}) {
|
||||
>x : Symbol(x, Decl(types.forAwait.esnext.2.ts, 5, 20))
|
||||
}
|
||||
for await (y of {}) {
|
||||
>y : Symbol(y, Decl(types.forAwait.esnext.2.ts, 3, 7))
|
||||
}
|
||||
for await (z of asyncIterable) {
|
||||
>z : Symbol(z, Decl(types.forAwait.esnext.2.ts, 4, 7))
|
||||
>asyncIterable : Symbol(asyncIterable, Decl(types.forAwait.esnext.2.ts, 0, 13))
|
||||
}
|
||||
for await (z of iterable) {
|
||||
>z : Symbol(z, Decl(types.forAwait.esnext.2.ts, 4, 7))
|
||||
>iterable : Symbol(iterable, Decl(types.forAwait.esnext.2.ts, 1, 13))
|
||||
}
|
||||
for (const x of asyncIterable) {
|
||||
>x : Symbol(x, Decl(types.forAwait.esnext.2.ts, 13, 14))
|
||||
>asyncIterable : Symbol(asyncIterable, Decl(types.forAwait.esnext.2.ts, 0, 13))
|
||||
}
|
||||
for (y of asyncIterable) {
|
||||
>y : Symbol(y, Decl(types.forAwait.esnext.2.ts, 3, 7))
|
||||
>asyncIterable : Symbol(asyncIterable, Decl(types.forAwait.esnext.2.ts, 0, 13))
|
||||
}
|
||||
}
|
||||
@ -1,27 +0,0 @@
|
||||
=== tests/cases/conformance/types/forAwait/types.forAwait.esnext.3.ts ===
|
||||
async function f1() {
|
||||
>f1 : Symbol(f1, Decl(types.forAwait.esnext.3.ts, 0, 0))
|
||||
|
||||
let y: number;
|
||||
>y : Symbol(y, Decl(types.forAwait.esnext.3.ts, 1, 7))
|
||||
|
||||
for await (const x of {}) {
|
||||
>x : Symbol(x, Decl(types.forAwait.esnext.3.ts, 2, 20))
|
||||
}
|
||||
for await (y of {}) {
|
||||
>y : Symbol(y, Decl(types.forAwait.esnext.3.ts, 1, 7))
|
||||
}
|
||||
}
|
||||
async function* f2() {
|
||||
>f2 : Symbol(f2, Decl(types.forAwait.esnext.3.ts, 6, 1))
|
||||
|
||||
let y: number;
|
||||
>y : Symbol(y, Decl(types.forAwait.esnext.3.ts, 8, 7))
|
||||
|
||||
for await (const x of {}) {
|
||||
>x : Symbol(x, Decl(types.forAwait.esnext.3.ts, 9, 20))
|
||||
}
|
||||
for await (y of {}) {
|
||||
>y : Symbol(y, Decl(types.forAwait.esnext.3.ts, 8, 7))
|
||||
}
|
||||
}
|
||||
@ -1,6 +1,6 @@
|
||||
// @target: esnext
|
||||
// @target: es2018
|
||||
// @lib: esnext
|
||||
async function f<T>(source: Iterable<T> | AsyncIterable<T>) {
|
||||
for await (const x of source) {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
// @target: esnext
|
||||
// @target: es2018
|
||||
// @lib: esnext
|
||||
// @filename: C1.ts
|
||||
class C1 {
|
||||
@ -1,4 +1,4 @@
|
||||
// @target: esnext
|
||||
// @target: es2018
|
||||
// @lib: esnext
|
||||
// @filename: F1.ts
|
||||
async function * f1() {
|
||||
@ -1,4 +1,4 @@
|
||||
// @target: esnext
|
||||
// @target: es2018
|
||||
// @lib: esnext
|
||||
// @filename: F1.ts
|
||||
const f1 = async function * () {
|
||||
@ -1,4 +1,4 @@
|
||||
// @target: esnext
|
||||
// @target: es2018
|
||||
// @lib: esnext
|
||||
// @filename: O1.ts
|
||||
const o1 = {
|
||||
@ -1,4 +1,4 @@
|
||||
// @target: esnext
|
||||
// @target: es2018
|
||||
// @lib: esnext
|
||||
// @filename: file1.ts
|
||||
async function f1() {
|
||||
@ -39,4 +39,4 @@ async function* f6() {
|
||||
outer: for await (const x of y) {
|
||||
continue outer;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1,4 +1,4 @@
|
||||
// @target: esnext
|
||||
// @target: es2018
|
||||
// @lib: esnext
|
||||
// @noEmit: true
|
||||
// @filename: methodIsOk.ts
|
||||
@ -146,4 +146,4 @@ class C24 {
|
||||
// @filename: asyncGeneratorPropertyIsError.ts
|
||||
class C25 {
|
||||
async * x = 1;
|
||||
}
|
||||
}
|
||||
@ -1,4 +1,4 @@
|
||||
// @target: esnext
|
||||
// @target: es2018
|
||||
// @lib: esnext
|
||||
// @noEmit: true
|
||||
// @filename: functionDeclarationIsOk.ts
|
||||
@ -84,4 +84,4 @@ async function * f20() {
|
||||
// @filename: yieldInNestedComputedPropertyIsOk.ts
|
||||
async function * f21() {
|
||||
const x = { [yield]: 1 };
|
||||
}
|
||||
}
|
||||
@ -1,4 +1,4 @@
|
||||
// @target: esnext
|
||||
// @target: es2018
|
||||
// @lib: esnext
|
||||
// @noEmit: true
|
||||
// @filename: functionExpressionIsOk.ts
|
||||
@ -1,4 +1,4 @@
|
||||
// @target: esnext
|
||||
// @target: es2018
|
||||
// @skipLibCheck: true
|
||||
// @lib: esnext
|
||||
// @noEmit: true
|
||||
@ -142,4 +142,4 @@ const o23 = {
|
||||
// @filename: asyncGeneratorPropertyIsError.ts
|
||||
const o24 = {
|
||||
async * x: 1;
|
||||
};
|
||||
};
|
||||
@ -1,4 +1,4 @@
|
||||
// @target: esnext
|
||||
// @target: es2018
|
||||
// @lib: esnext
|
||||
// @noEmit: true
|
||||
// @filename: topLevelWithDeclIsError.ts
|
||||
@ -60,4 +60,4 @@ function* f12() {
|
||||
let x: any, y: any;
|
||||
for await (x of y) {
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1,4 +1,4 @@
|
||||
// @target: esnext
|
||||
// @target: es2018
|
||||
// @lib: esnext
|
||||
// @noEmit: true
|
||||
async function * inferReturnType1() {
|
||||
@ -123,4 +123,4 @@ async function * awaitedType1() {
|
||||
}
|
||||
async function * awaitedType2() {
|
||||
const x = await Promise.resolve(1);
|
||||
}
|
||||
}
|
||||
@ -1,4 +1,4 @@
|
||||
// @target: esnext
|
||||
// @target: es2018
|
||||
// @lib: esnext
|
||||
// @noEmit: true
|
||||
async function * inferReturnType1() {
|
||||
@ -75,4 +75,4 @@ async function * explicitReturnType12(): Iterator<number> {
|
||||
}
|
||||
async function * yieldStar() {
|
||||
yield* {};
|
||||
}
|
||||
}
|
||||
@ -1,4 +1,4 @@
|
||||
// @target: esnext
|
||||
// @target: es2018
|
||||
// @lib: esnext
|
||||
// @noEmit: true
|
||||
declare const asyncIterable: AsyncIterable<number>;
|
||||
@ -33,4 +33,4 @@ async function * f2() {
|
||||
}
|
||||
for await (y of iterableOfPromise) {
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1,4 +1,4 @@
|
||||
// @target: esnext
|
||||
// @target: es2018
|
||||
// @lib: esnext
|
||||
// @noEmit: true
|
||||
declare const asyncIterable: AsyncIterable<number>;
|
||||
@ -18,4 +18,4 @@ async function f() {
|
||||
}
|
||||
for (y of asyncIterable) {
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1,4 +1,4 @@
|
||||
// @target: esnext
|
||||
// @target: es2018
|
||||
// @lib: es5
|
||||
// @noEmit: true
|
||||
async function f1() {
|
||||
@ -14,4 +14,4 @@ async function* f2() {
|
||||
}
|
||||
for await (y of {}) {
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user