From d19a200750ab16720d0a383b3cc1c85d3c38ddb4 Mon Sep 17 00:00:00 2001 From: Ron Buckton Date: Tue, 5 May 2015 17:57:21 -0700 Subject: [PATCH 01/35] Added types, scan, parse, and check for async functions --- src/compiler/checker.ts | 447 +++++++++++++++++- .../diagnosticInformationMap.generated.ts | 29 +- src/compiler/diagnosticMessages.json | 101 +++- src/compiler/parser.ts | 425 +++++++++++------ src/compiler/scanner.ts | 2 + src/compiler/types.ts | 52 +- src/compiler/utilities.ts | 19 + src/lib/core.d.ts | 12 + src/lib/es6.d.ts | 10 - 9 files changed, 905 insertions(+), 192 deletions(-) diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index 04766f22c4ecf..13f527bd9f8ca 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -89,7 +89,7 @@ module ts { let nullType = createIntrinsicType(TypeFlags.Null | TypeFlags.ContainsUndefinedOrNull, "null"); let unknownType = createIntrinsicType(TypeFlags.Any, "unknown"); let resolvingType = createIntrinsicType(TypeFlags.Any, "__resolving__"); - + let emptyObjectType = createAnonymousType(undefined, emptySymbols, emptyArray, emptyArray, undefined, undefined); let anyFunctionType = createAnonymousType(undefined, emptySymbols, emptyArray, emptyArray, undefined, undefined); let noConstraintType = createAnonymousType(undefined, emptySymbols, emptyArray, emptyArray, undefined, undefined); @@ -101,6 +101,8 @@ module ts { let globalArraySymbol: Symbol; let globalESSymbolConstructorSymbol: Symbol; + + let getGlobalPromiseSymbol: () => Symbol; let globalObjectType: ObjectType; let globalFunctionType: ObjectType; @@ -118,6 +120,11 @@ module ts { let getGlobalParameterDecoratorType: () => ObjectType; let getGlobalPropertyDecoratorType: () => ObjectType; let getGlobalMethodDecoratorType: () => ObjectType; + let getGlobalPromiseType: () => ObjectType; + let getGlobalPromiseLikeType: () => ObjectType; + let getInstantiatedGlobalPromiseLikeType: () => ObjectType; + let getGlobalPromiseConstructorLikeType: () => ObjectType; + let getGlobalThenableType: () => ObjectType; let tupleTypes: Map = {}; let unionTypes: Map = {}; @@ -125,11 +132,14 @@ module ts { let emitExtends = false; let emitDecorate = false; let emitParam = false; + let emitAwaiter = false; + let emitGenerator = false; let mergedSymbols: Symbol[] = []; let symbolLinks: SymbolLinks[] = []; let nodeLinks: NodeLinks[] = []; let potentialThisCollisions: Node[] = []; + var potentialArgumentsCollisions: Node[] = []; let diagnostics = createDiagnosticCollection(); @@ -5146,9 +5156,11 @@ module ts { case SyntaxKind.ParenthesizedExpression: case SyntaxKind.PrefixUnaryExpression: case SyntaxKind.DeleteExpression: + case SyntaxKind.AwaitExpression: case SyntaxKind.TypeOfExpression: case SyntaxKind.VoidExpression: case SyntaxKind.PostfixUnaryExpression: + case SyntaxKind.YieldExpression: case SyntaxKind.ConditionalExpression: case SyntaxKind.SpreadElementExpression: case SyntaxKind.Block: @@ -5406,8 +5418,14 @@ module ts { // will be bound to non-arrow function that contain this arrow function. This results in inconsistent behavior. // To avoid that we will give an error to users if they use arguments objects in arrow function so that they // can explicitly bound arguments objects - if (symbol === argumentsSymbol && getContainingFunction(node).kind === SyntaxKind.ArrowFunction && languageVersion < ScriptTarget.ES6) { - error(node, Diagnostics.The_arguments_object_cannot_be_referenced_in_an_arrow_function_in_ES3_and_ES5_Consider_using_a_standard_function_expression); + let container = getContainingFunction(node); + if (symbol === argumentsSymbol) { + if (container.kind === SyntaxKind.ArrowFunction && languageVersion < ScriptTarget.ES6) { + error(node, Diagnostics.The_arguments_object_cannot_be_referenced_in_an_arrow_function_in_ES3_and_ES5_Consider_using_a_standard_function_expression); + } + else if (node.parserContextFlags & ParserContextFlags.Await) { + captureLexicalArguments(node, container); + } } if (symbol.flags & SymbolFlags.Alias && !isInTypeQuery(node) && !isConstEnumOrConstEnumOnlyModule(resolveAlias(symbol))) { @@ -5416,6 +5434,7 @@ module ts { checkCollisionWithCapturedSuperVariable(node, node); checkCollisionWithCapturedThisVariable(node, node); + checkCollisionWithCapturedArgumentsVariable(node, node); checkBlockScopedBindingCapturedInLoop(node, symbol); return getNarrowedTypeOfSymbol(getExportSymbolOfValueSymbolIfExported(symbol), node); @@ -5497,6 +5516,11 @@ module ts { // When targeting es6, arrow function lexically bind "this" so we do not need to do the work of binding "this" in emitted code needToCaptureLexicalThis = (languageVersion < ScriptTarget.ES6); } + + if (node.parserContextFlags & ParserContextFlags.Await) { + // if 'this' is part of an async function, we will need to capture 'this' + needToCaptureLexicalThis = true; + } switch (container.kind) { case SyntaxKind.ModuleDeclaration: @@ -5537,6 +5561,14 @@ module ts { return anyType; } + function captureLexicalArguments(node: Node, container: Node): void { + if (node.parent.kind !== SyntaxKind.Parameter) { + getNodeLinks(node).flags |= NodeCheckFlags.LexicalArguments; + } + + getNodeLinks(container).flags |= NodeCheckFlags.CaptureArguments; + } + function isInConstructorArgumentInitializer(node: Node, constructorDecl: Node): boolean { for (let n = node; n && n !== constructorDecl; n = n.parent) { if (n.kind === SyntaxKind.Parameter) { @@ -7220,22 +7252,42 @@ module ts { links.type = instantiateType(getTypeOfSymbol(lastOrUndefined(context.parameters)), mapper); } } + + function createPromiseType(promisedType: Type, location: Node): Type { + // creates a `Promise` type where `T` is the promisedType argument + let globalPromiseType = getGlobalPromiseType(); + if (globalPromiseType !== emptyObjectType) { + // if the promised type is itself a promise, get the underlying type; otherwise, fallback to the promised type + promisedType = getAwaitedType(promisedType); + return createTypeReference(globalPromiseType, [promisedType]); + } + + error(location, Diagnostics.An_async_function_or_method_must_have_a_valid_awaitable_return_type); + return unknownType; + } function getReturnTypeFromBody(func: FunctionLikeDeclaration, contextualMapper?: TypeMapper): Type { let contextualSignature = getContextualSignatureForFunctionLikeDeclaration(func); if (!func.body) { return unknownType; } + + let isAsync = isAsyncFunctionLike(func); let type: Type; if (func.body.kind !== SyntaxKind.Block) { - type = checkExpressionCached(func.body, contextualMapper); + type = isAsync + ? checkAwaitedExpressionCached(func.body, contextualMapper) + : checkExpressionCached(func.body, contextualMapper); } else { // Aggregate the types of expressions within all the return statements. let types = checkAndAggregateReturnExpressionTypes(func.body, contextualMapper); if (types.length === 0) { - return voidType; + return isAsync + ? createPromiseType(voidType, func) + : voidType; } + // When return statements are contextually typed we allow the return type to be a union type. Otherwise we require the // return expressions to have a best common supertype. type = contextualSignature ? getUnionType(types) : getCommonSupertype(types); @@ -7247,17 +7299,23 @@ module ts { if (!contextualSignature) { reportErrorsFromWidening(func, type); } - return getWidenedType(type); + + let widenedType = getWidenedType(type); + return isAsync + ? createPromiseType(widenedType, func) + : type; } /// Returns a set of types relating to every return expression relating to a function block. - function checkAndAggregateReturnExpressionTypes(body: Block, contextualMapper?: TypeMapper): Type[] { + function checkAndAggregateReturnExpressionTypes(body: Block, contextualMapper?: TypeMapper, isAsync?: boolean): Type[] { let aggregatedTypes: Type[] = []; forEachReturnStatement(body, returnStatement => { let expr = returnStatement.expression; if (expr) { - let type = checkExpressionCached(expr, contextualMapper); + let type = isAsync + ? checkAwaitedExpressionCached(expr, contextualMapper) + : checkExpressionCached(expr, contextualMapper); if (!contains(aggregatedTypes, type)) { aggregatedTypes.push(type); } @@ -7327,6 +7385,12 @@ module ts { if (contextualMapper === identityMapper && isContextSensitive(node)) { return anyFunctionType; } + + let isAsync = isAsyncFunctionLike(node); + if (isAsync) { + emitAwaiter = true; + } + let links = getNodeLinks(node); let type = getTypeOfSymbol(node.symbol); // Check if function expression is contextually typed and assign parameter types if so @@ -7357,6 +7421,7 @@ module ts { if (produceDiagnostics && node.kind !== SyntaxKind.MethodDeclaration && node.kind !== SyntaxKind.MethodSignature) { checkCollisionWithCapturedSuperVariable(node, (node).name); checkCollisionWithCapturedThisVariable(node, (node).name); + checkCollisionWithCapturedArgumentsVariable(node, (node).name); } return type; @@ -7364,8 +7429,21 @@ module ts { function checkFunctionExpressionOrObjectLiteralMethodBody(node: FunctionExpression | MethodDeclaration) { Debug.assert(node.kind !== SyntaxKind.MethodDeclaration || isObjectLiteralMethod(node)); - if (node.type && !node.asteriskToken) { - checkIfNonVoidFunctionHasReturnExpressionsOrSingleThrowStatment(node, getTypeFromTypeNode(node.type)); + + let isAsync = isAsyncFunctionLike(node); + let returnType = node.type && getTypeFromTypeNode(node.type); + let promisedType: Type; + if (returnType && isAsync) { + // From within an async function you can return either a non-promise value or a promise. Any + // Promise/A+ compatible implementation will always assimilate any foreign promise, so we + // should not be checking assignability of a promise to the return type. Instead, we need to + // check assignability of the awaited type of the concise body against the promised type of + // its return type annotation. + promisedType = checkAsyncFunctionReturnType(node, returnType); + } + + if (returnType && !node.asteriskToken) { + checkIfNonVoidFunctionHasReturnExpressionsOrSingleThrowStatment(node, isAsync ? promisedType : returnType); } if (node.body) { @@ -7374,8 +7452,11 @@ module ts { } else { let exprType = checkExpression(node.body); - if (node.type) { - checkTypeAssignableTo(exprType, getTypeFromTypeNode(node.type), node.body, /*headMessage*/ undefined); + if (returnType) { + checkTypeAssignableTo( + isAsync ? getAwaitedType(exprType) : exprType, + isAsync ? promisedType : returnType, + node.body); } checkFunctionExpressionBodies(node.body); } @@ -7490,6 +7571,22 @@ module ts { return undefinedType; } + function checkAwaitExpression(node: AwaitExpression): Type { + // Grammar checking + if (!(node.parserContextFlags & ParserContextFlags.Await)) { + var parameter = getContainingParameter(node); + if (parameter && parameter.parserContextFlags & ParserContextFlags.Await) { + grammarErrorAfterFirstToken(node, Diagnostics._0_expression_is_not_allowed_in_an_initializer, "await"); + } + else { + grammarErrorOnFirstToken(node, Diagnostics.await_expression_must_be_contained_within_an_async_function); + } + } + + var operandType = checkExpression(node.expression); + return getAwaitedType(operandType); + } + function checkPrefixUnaryExpression(node: PrefixUnaryExpression): Type { // Grammar checking // The identifier eval or arguments may not appear as the LeftHandSideExpression of an @@ -7897,7 +7994,13 @@ module ts { function checkYieldExpression(node: YieldExpression): void { // Grammar checking if (!(node.parserContextFlags & ParserContextFlags.Yield)) { - grammarErrorOnFirstToken(node, Diagnostics.yield_expression_must_be_contained_within_a_generator_declaration); + let parameter = getContainingParameter(node); + if (parameter && (parameter.parserContextFlags & ParserContextFlags.GeneratorParameter)) { + grammarErrorAfterFirstToken(node, Diagnostics._0_expression_is_not_allowed_in_an_initializer, "yield"); + } + else { + grammarErrorOnFirstToken(node, Diagnostics.yield_expression_must_be_contained_within_a_generator_declaration); + } } else { grammarErrorOnFirstToken(node, Diagnostics.yield_expressions_are_not_currently_supported); @@ -7931,6 +8034,15 @@ module ts { node.contextualType = saveContextualType; return result; } + + function checkAwaitedExpressionCached(node: Expression, contextualMapper?: TypeMapper): Type { + let links = getNodeLinks(node); + if (!links.resolvedAwaitedType) { + links.resolvedAwaitedType = getAwaitedType(checkExpressionCached(node, contextualMapper)); + } + + return links.resolvedAwaitedType; + } function checkExpressionCached(node: Expression, contextualMapper?: TypeMapper): Type { let links = getNodeLinks(node); @@ -8078,6 +8190,8 @@ module ts { return checkDeleteExpression(node); case SyntaxKind.VoidExpression: return checkVoidExpression(node); + case SyntaxKind.AwaitExpression: + return checkAwaitExpression(node); case SyntaxKind.PrefixUnaryExpression: return checkPrefixUnaryExpression(node); case SyntaxKind.PostfixUnaryExpression: @@ -8166,6 +8280,7 @@ module ts { } if (produceDiagnostics) { + checkCollisionWithAwaiterVariablesInGeneratedCode(node, node.name); checkCollisionWithArgumentsInGeneratedCode(node); if (compilerOptions.noImplicitAny && !node.type) { switch (node.kind) { @@ -8177,6 +8292,22 @@ module ts { break; } } + if (isAsyncFunctionLike(node)) { + var promiseConstructor = getPromiseConstructor(node); + if (promiseConstructor) { + var promiseIdentifier = getFirstIdentifier(promiseConstructor); + var promiseName = promiseIdentifier.text; + var typeSymbol = resolveName(node, promiseName, SymbolFlags.Type | SymbolFlags.Module, undefined, undefined); + var valueSymbol = resolveName(node, promiseName, SymbolFlags.Value, undefined, undefined); + if (typeSymbol !== valueSymbol) { + var valueLinks = getNodeLinks(valueSymbol.valueDeclaration); + if (!(valueLinks.flags & NodeCheckFlags.PromiseCollision)) { + valueLinks.flags |= NodeCheckFlags.PromiseCollision; + error(valueSymbol.valueDeclaration, Diagnostics.Duplicate_identifier_0_Compiler_uses_declaration_1_to_support_async_functions, promiseName, getTextOfNode(promiseConstructor)); + } + } + } + } } checkSpecializedSignatureDeclaration(node); @@ -8772,6 +8903,113 @@ module ts { } } + function getPromisedType(type: Type): Type { + // the "promised type" of a type is the type of the "value" argument of the "onfulfilled" callback. + let globalPromiseLikeType = getInstantiatedGlobalPromiseLikeType(); + if (globalPromiseLikeType !== emptyObjectType && isTypeAssignableTo(type, globalPromiseLikeType)) { + let awaitedTypes: Type[] = []; + let thenProp = getPropertyOfType(type, "then"); + let thenType = getTypeOfSymbol(thenProp); + let thenSignatures = getSignaturesOfType(thenType, SignatureKind.Call); + for (let thenSignature of thenSignatures) { + thenSignature = getErasedSignature(thenSignature); + let onfulfilledParameterType = getTypeAtPosition(thenSignature, 0); + let onfulfilledParameterSignatures = getSignaturesOfType(onfulfilledParameterType, SignatureKind.Call); + for (let onfulfilledParameterSignature of onfulfilledParameterSignatures) { + let valueParameterType = getTypeAtPosition(onfulfilledParameterSignature, 0); + if (valueParameterType !== type) { + awaitedTypes.push(valueParameterType); + } + } + } + + return getUnionType(awaitedTypes); + } + + return emptyObjectType; + } + + function getAwaitedType(type: Type): Type { + // The "awaited type" of an expression is its "promised type" if the expression is a `Promise`; otherwise, it is the type of the expression. + + let promisedType = getPromisedType(type); + if (promisedType === emptyObjectType) { + return type; + } + + // if we have a bad actor in the form of a promise whose promised type is the same promise, return the empty type. + // if this were the actual case in the JavaScript, this Promise would never resolve. + if (promisedType === type) { + return emptyObjectType; + } + + // unwrap any nested promises + let seen: boolean[]; + while (true) { + let nestedPromisedType = getPromisedType(promisedType); + if (nestedPromisedType === emptyObjectType) { + // if this could not be unwrapped further, return the promised type + return promisedType; + } + + if (!seen) { + // `seen` keeps track of types we've tried to await to avoid cycles + seen = []; + seen[type.id] = true; + seen[promisedType.id] = true; + } + else if (seen[nestedPromisedType.id]) { + // if we've already seen this type, this is a promise that would never resolve. As above, we return the empty type. + return emptyObjectType; + } + + seen[nestedPromisedType.id] = true; + promisedType = nestedPromisedType; + } + + return promisedType; + + // if we didn't get a promised type, check the type does not have a callable then member. + if (isTypeAssignableTo(type, getGlobalThenableType())) { + error(null, Diagnostics.Type_for_await_does_not_have_a_valid_callable_then_member); + return emptyObjectType; + } + + // if the type was not a "promise" or a "thenable", return the type. + return type; + } + + function checkAsyncFunctionReturnType(node: SignatureDeclaration, returnType: Type): Type { + // This checks that an async function has a valid Promise-compatible return type, and returns the *awaited type* of the promise. + // An async function has a valid Promise-compatible return type if the resolved value of the return type has a construct + // signature that takes in an `initializer` function that in turn supplies a `resolve` function as one of its arguments + // and results in an object with a callable `then` signature. + let globalPromiseConstructorLikeType = getGlobalPromiseConstructorLikeType(); + if (globalPromiseConstructorLikeType !== emptyObjectType) { + if (!returnType) { + returnType = getReturnTypeOfSignature(getSignatureFromDeclaration(node)); + } + + // get the constructor type of the return type + var declaredType = returnType.symbol ? getTypeOfSymbol(returnType.symbol) : emptyObjectType; + if (isTypeAssignableTo(declaredType, globalPromiseConstructorLikeType)) { + var promisedType = getPromisedType(returnType); + if (promisedType !== emptyObjectType) { + // unwrap the promised type + var promiseConstructor = getPromiseConstructor(node); + if (promiseConstructor) { + emitAwaiter = true; + checkExpressionOrQualifiedName(promiseConstructor); + return getAwaitedType(promisedType); + } + } + } + } + + error(node, ts.Diagnostics.An_async_function_or_method_must_have_a_valid_awaitable_return_type); + return emptyObjectType; + } + /** Check a decorator */ function checkDecorator(node: Decorator): void { let expression: Expression = node.expression; @@ -8904,6 +9142,7 @@ module ts { checkCollisionWithCapturedSuperVariable(node, node.name); checkCollisionWithCapturedThisVariable(node, node.name); + checkCollisionWithCapturedArgumentsVariable(node, node.name); checkCollisionWithRequireExportsInGeneratedCode(node, node.name); } } @@ -8946,7 +9185,14 @@ module ts { checkSourceElement(node.body); if (node.type && !isAccessor(node.kind) && !node.asteriskToken) { - checkIfNonVoidFunctionHasReturnExpressionsOrSingleThrowStatment(node, getTypeFromTypeNode(node.type)); + let returnType = getTypeFromTypeNode(node.type); + let isAsync = isAsyncFunctionLike(node); + let promisedType: Type; + if (isAsync) { + promisedType = checkAsyncFunctionReturnType(node, returnType); + } + + checkIfNonVoidFunctionHasReturnExpressionsOrSingleThrowStatment(node, isAsync ? promisedType : returnType); } // Report an implicit any error if there is no body, no explicit return type, and node is not a private method @@ -9016,6 +9262,12 @@ module ts { } } + function checkCollisionWithCapturedArgumentsVariable(node: Node, name: Identifier): void { + if (needCollisionCheckForIdentifier(node, name, "_arguments")) { + potentialArgumentsCollisions.push(node); + } + } + // this function will run after checking the source file so 'CaptureThis' is correct for all nodes function checkIfThisIsCapturedInEnclosingScope(node: Node): void { let current = node; @@ -9034,6 +9286,25 @@ module ts { } } + function checkIfArgumentsIsCapturedInEnclosingScope(node: Node): void { + let current = node; + while (current) { + if (getNodeCheckFlags(current) & NodeCheckFlags.CaptureArguments) { + let isDeclaration = node.kind !== SyntaxKind.Identifier; + if (isDeclaration) { + error((node).name, Diagnostics.Duplicate_identifier_arguments_Compiler_uses_variable_declaration_arguments_to_capture_arguments_reference); + } + else { + error(node, Diagnostics.Expression_resolves_to_variable_declaration_arguments_that_compiler_uses_to_capture_arguments_reference); + } + + return; + } + + current = current.parent; + } + } + function checkCollisionWithCapturedSuperVariable(node: Node, name: Identifier) { if (!needCollisionCheckForIdentifier(node, name, "_super")) { return; @@ -9149,6 +9420,34 @@ module ts { } } + function getPromiseConstructor(node: SignatureDeclaration): EntityName { + if (node.type && node.type.kind === SyntaxKind.TypeReference) { + return (node.type).typeName; + } + + let globalPromiseSymbol = getGlobalPromiseSymbol(); + if (globalPromiseSymbol && globalPromiseSymbol === resolveName(node, "Promise", SymbolFlags.Value, undefined, undefined)) { + return globalPromiseSymbol.valueDeclaration.name; + } + + return undefined; + } + + function checkCollisionWithAwaiterVariablesInGeneratedCode(node: Node, name: DeclarationName): void { + if (!name || name.kind !== SyntaxKind.Identifier || isTypeNode(name)) { + return; + } + + let identifier = name; + let container = getContainingFunction(name); + if (container && isAsyncFunctionLike(container) && node.kind !== SyntaxKind.Identifier) { + var promiseConstructor = getPromiseConstructor(container); + if (promiseConstructor && promiseConstructor.kind === SyntaxKind.Identifier && (promiseConstructor).text === identifier.text) { + error(node, Diagnostics.Duplicate_identifier_0_Compiler_uses_declaration_1_to_support_async_functions, identifier.text, getTextOfNode(promiseConstructor)); + } + } + } + function isParameterDeclaration(node: VariableLikeDeclaration) { while (node.kind === SyntaxKind.BindingElement) { node = node.parent.parent; @@ -9251,8 +9550,14 @@ module ts { } checkCollisionWithCapturedSuperVariable(node, node.name); checkCollisionWithCapturedThisVariable(node, node.name); + checkCollisionWithCapturedArgumentsVariable(node, node.name); checkCollisionWithRequireExportsInGeneratedCode(node, node.name); } + + if (symbol === argumentsSymbol && (node.parserContextFlags & ParserContextFlags.Await)) { + let container = getContainingFunction(node); + captureLexicalArguments(node.name, container); + } } function checkVariableDeclaration(node: VariableDeclaration) { @@ -9275,7 +9580,10 @@ module ts { function checkGrammarDisallowedModifiersInBlockOrObjectLiteralExpression(node: Node) { if (node.modifiers) { if (inBlockOrObjectLiteralExpression(node)) { - return grammarErrorOnFirstToken(node, Diagnostics.Modifiers_cannot_appear_here); + // disallow all but the `async` modifier here + if (isAccessor(node.kind) || !isFunctionLike(node) || (node.modifiers.flags & ~NodeFlags.Async)) { + return grammarErrorOnFirstToken(node, Diagnostics.Modifiers_cannot_appear_here); + } } } } @@ -9288,6 +9596,8 @@ module ts { node = node.parent; } + + return false; } function checkExpressionStatement(node: ExpressionStatement) { @@ -9667,8 +9977,11 @@ module ts { error(node.expression, Diagnostics.Return_type_of_constructor_signature_must_be_assignable_to_the_instance_type_of_the_class); } } + else if (func.type && !isAccessor(func.kind) && isAsyncFunctionLike(func)) { + checkTypeAssignableTo(getAwaitedType(exprType), getPromisedType(returnType), node.expression); + } else if (func.type || isGetAccessorWithAnnotatatedSetAccessor(func)) { - checkTypeAssignableTo(exprType, returnType, node.expression, /*headMessage*/ undefined); + checkTypeAssignableTo(exprType, returnType, node.expression); } } } @@ -9943,6 +10256,7 @@ module ts { checkTypeNameIsReserved(node.name, Diagnostics.Class_name_cannot_be_0); checkCollisionWithCapturedThisVariable(node, node.name); checkCollisionWithRequireExportsInGeneratedCode(node, node.name); + checkCollisionWithAwaiterVariablesInGeneratedCode(node, node.name); } checkTypeParameters(node.typeParameters); checkExportsOnMergedDeclarations(node); @@ -10386,6 +10700,7 @@ module ts { checkTypeNameIsReserved(node.name, Diagnostics.Enum_name_cannot_be_0); checkCollisionWithCapturedThisVariable(node, node.name); checkCollisionWithRequireExportsInGeneratedCode(node, node.name); + checkCollisionWithAwaiterVariablesInGeneratedCode(node, node.name); checkExportsOnMergedDeclarations(node); computeEnumMemberValues(node); @@ -10885,12 +11200,14 @@ module ts { case SyntaxKind.ParenthesizedExpression: case SyntaxKind.TypeOfExpression: case SyntaxKind.VoidExpression: + case SyntaxKind.AwaitExpression: case SyntaxKind.DeleteExpression: case SyntaxKind.PrefixUnaryExpression: case SyntaxKind.PostfixUnaryExpression: case SyntaxKind.BinaryExpression: case SyntaxKind.ConditionalExpression: case SyntaxKind.SpreadElementExpression: + case SyntaxKind.YieldExpression: case SyntaxKind.Block: case SyntaxKind.ModuleBlock: case SyntaxKind.VariableStatement: @@ -10941,6 +11258,7 @@ module ts { emitDecorate = false; emitParam = false; potentialThisCollisions.length = 0; + potentialArgumentsCollisions.length = 0; forEach(node.statements, checkSourceElement); checkFunctionExpressionBodies(node); @@ -10953,6 +11271,11 @@ module ts { forEach(potentialThisCollisions, checkIfThisIsCapturedInEnclosingScope); potentialThisCollisions.length = 0; } + + if (potentialArgumentsCollisions.length) { + forEach(potentialArgumentsCollisions, checkIfArgumentsIsCapturedInEnclosingScope); + potentialArgumentsCollisions.length = 0; + } if (emitExtends) { links.flags |= NodeCheckFlags.EmitExtends; @@ -10965,6 +11288,14 @@ module ts { if (emitParam) { links.flags |= NodeCheckFlags.EmitParam; } + + if (emitAwaiter) { + links.flags |= NodeCheckFlags.EmitAwaiter; + } + + if (emitGenerator || (emitAwaiter && languageVersion < ScriptTarget.ES6)) { + links.flags |= NodeCheckFlags.EmitGenerator; + } links.flags |= NodeCheckFlags.TypeChecked; } @@ -11982,6 +12313,12 @@ module ts { getGlobalPropertyDecoratorType = memoize(() => getGlobalType("PropertyDecorator")); getGlobalMethodDecoratorType = memoize(() => getGlobalType("MethodDecorator")); getGlobalParameterDecoratorType = memoize(() => getGlobalType("ParameterDecorator")); + getGlobalPromiseSymbol = memoize(() => getGlobalTypeSymbol("Promise")); + getGlobalPromiseType = memoize(() => getTypeOfGlobalSymbol(getGlobalPromiseSymbol(), /*arity*/ 1)); + getGlobalPromiseLikeType = memoize(() => getGlobalType("PromiseLike", /*arity*/ 1)); + getInstantiatedGlobalPromiseLikeType = memoize(createInstantiatedPromiseLikeType); + getGlobalPromiseConstructorLikeType = memoize(() => getGlobalType("PromiseConstructorLike")); + getGlobalThenableType = memoize(createThenableType); // If we're in ES6 mode, load the TemplateStringsArray. // Otherwise, default to 'unknown' for the purposes of type checking in LS scenarios. @@ -12003,6 +12340,26 @@ module ts { anyArrayType = createArrayType(anyType); } + + function createInstantiatedPromiseLikeType(): ObjectType { + let promiseLikeType = getGlobalPromiseLikeType(); + if (promiseLikeType !== emptyObjectType) { + return createTypeReference(promiseLikeType, [anyType]); + } + + return emptyObjectType; + } + + function createThenableType() { + // build the thenable type that is used to verify against a non-promise "thenable" operand to `await`. + let thenPropertySymbol = createSymbol(SymbolFlags.Transient | SymbolFlags.Property, "then"); + getSymbolLinks(thenPropertySymbol).type = globalFunctionType; + + let thenableType = createObjectType(TypeFlags.ObjectType); + thenableType.properties = [thenPropertySymbol]; + thenableType.members = createSymbolTable(thenableType.properties); + return thenableType; + } // GRAMMAR CHECKING function isReservedWordInStrictMode(node: Identifier): boolean { @@ -12203,7 +12560,7 @@ module ts { return; } - let lastStatic: Node, lastPrivate: Node, lastProtected: Node, lastDeclare: Node; + let lastStatic: Node, lastPrivate: Node, lastProtected: Node, lastDeclare: Node, lastAsync: Node; let flags = 0; for (let modifier of node.modifiers) { switch (modifier.kind) { @@ -12229,6 +12586,9 @@ module ts { else if (flags & NodeFlags.Static) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_must_precede_1_modifier, text, "static"); } + else if (flags & NodeFlags.Async) { + return grammarErrorOnNode(modifier, Diagnostics._0_modifier_must_precede_1_modifier, text, "async"); + } else if (node.parent.kind === SyntaxKind.ModuleBlock || node.parent.kind === SyntaxKind.SourceFile) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_appear_on_a_module_element, text); } @@ -12239,6 +12599,9 @@ module ts { if (flags & NodeFlags.Static) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_already_seen, "static"); } + else if (flags & NodeFlags.Async) { + return grammarErrorOnNode(modifier, Diagnostics._0_modifier_must_precede_1_modifier, "static", "async"); + } else if (node.parent.kind === SyntaxKind.ModuleBlock || node.parent.kind === SyntaxKind.SourceFile) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_appear_on_a_module_element, "static"); } @@ -12256,6 +12619,9 @@ module ts { else if (flags & NodeFlags.Ambient) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_must_precede_1_modifier, "export", "declare"); } + else if (flags & NodeFlags.Async) { + return grammarErrorOnNode(modifier, Diagnostics._0_modifier_must_precede_1_modifier, "export", "async"); + } else if (node.parent.kind === SyntaxKind.ClassDeclaration) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_appear_on_a_class_element, "export"); } @@ -12269,6 +12635,9 @@ module ts { if (flags & NodeFlags.Ambient) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_already_seen, "declare"); } + else if (flags & NodeFlags.Async) { + return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_be_used_in_an_ambient_context, "async"); + } else if (node.parent.kind === SyntaxKind.ClassDeclaration) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_appear_on_a_class_element, "declare"); } @@ -12281,6 +12650,20 @@ module ts { flags |= NodeFlags.Ambient; lastDeclare = modifier break; + + case SyntaxKind.AsyncKeyword: + if (flags & NodeFlags.Async) { + return grammarErrorOnNode(modifier, Diagnostics._0_modifier_already_seen, "async"); + } + else if (flags & NodeFlags.Ambient || isInAmbientContext(node.parent)) { + return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_be_used_in_an_ambient_context, "async"); + } + else if (node.kind === SyntaxKind.Parameter) { + return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_appear_on_a_parameter, "async"); + } + flags |= NodeFlags.Async; + lastAsync = modifier; + break; } } @@ -12294,16 +12677,42 @@ module ts { else if (flags & NodeFlags.Private) { return grammarErrorOnNode(lastPrivate, Diagnostics._0_modifier_cannot_appear_on_a_constructor_declaration, "private"); } + else if (flags & NodeFlags.Async) { + return grammarErrorOnNode(lastAsync, Diagnostics._0_modifier_cannot_appear_on_a_constructor_declaration, "async"); + } + return; } else if ((node.kind === SyntaxKind.ImportDeclaration || node.kind === SyntaxKind.ImportEqualsDeclaration) && flags & NodeFlags.Ambient) { - return grammarErrorOnNode(lastDeclare, Diagnostics.A_declare_modifier_cannot_be_used_with_an_import_declaration, "declare"); + return grammarErrorOnNode(lastDeclare, Diagnostics.A_0_modifier_cannot_be_used_with_an_import_declaration, "declare"); } else if (node.kind === SyntaxKind.InterfaceDeclaration && flags & NodeFlags.Ambient) { - return grammarErrorOnNode(lastDeclare, Diagnostics.A_declare_modifier_cannot_be_used_with_an_interface_declaration, "declare"); + return grammarErrorOnNode(lastDeclare, Diagnostics.A_0_modifier_cannot_be_used_with_an_interface_declaration, "declare"); } else if (node.kind === SyntaxKind.Parameter && (flags & NodeFlags.AccessibilityModifier) && isBindingPattern((node).name)) { return grammarErrorOnNode(node, Diagnostics.A_parameter_property_may_not_be_a_binding_pattern); } + if (flags & NodeFlags.Async) { + return checkGrammarAsyncModifier(node, lastAsync); + } + } + + function checkGrammarAsyncModifier(node: Node, asyncModifier: Node): boolean { + if (languageVersion < ScriptTarget.ES6) { + return grammarErrorOnNode(asyncModifier, Diagnostics.Async_functions_are_only_available_when_targeting_ECMAScript_6_and_higher); + } + + switch (node.kind) { + case SyntaxKind.MethodDeclaration: + case SyntaxKind.FunctionDeclaration: + case SyntaxKind.FunctionExpression: + case SyntaxKind.ArrowFunction: + if (!(node).asteriskToken) { + return false; + } + break; + } + + return grammarErrorOnNode(asyncModifier, Diagnostics._0_modifier_cannot_be_used_here, "async"); } function checkGrammarForDisallowedTrailingComma(list: NodeArray): boolean { diff --git a/src/compiler/diagnosticInformationMap.generated.ts b/src/compiler/diagnosticInformationMap.generated.ts index 14163e81195be..091cabb448027 100644 --- a/src/compiler/diagnosticInformationMap.generated.ts +++ b/src/compiler/diagnosticInformationMap.generated.ts @@ -34,8 +34,12 @@ module ts { Statements_are_not_allowed_in_ambient_contexts: { code: 1036, category: DiagnosticCategory.Error, key: "Statements are not allowed in ambient contexts." }, A_declare_modifier_cannot_be_used_in_an_already_ambient_context: { code: 1038, category: DiagnosticCategory.Error, key: "A 'declare' modifier cannot be used in an already ambient context." }, Initializers_are_not_allowed_in_ambient_contexts: { code: 1039, category: DiagnosticCategory.Error, key: "Initializers are not allowed in ambient contexts." }, + _0_modifier_cannot_be_used_in_an_ambient_context: { code: 1040, category: DiagnosticCategory.Error, key: "'{0}' modifier cannot be used in an ambient context." }, + _0_modifier_cannot_be_used_with_a_class_declaration: { code: 1041, category: DiagnosticCategory.Error, key: "'{0}' modifier cannot be used with a class declaration." }, + _0_modifier_cannot_be_used_here: { code: 1042, category: DiagnosticCategory.Error, key: "'{0}' modifier cannot be used here." }, + _0_modifier_cannot_appear_on_a_data_property: { code: 1043, category: DiagnosticCategory.Error, key: "'{0}' modifier cannot appear on a data property." }, _0_modifier_cannot_appear_on_a_module_element: { code: 1044, category: DiagnosticCategory.Error, key: "'{0}' modifier cannot appear on a module element." }, - A_declare_modifier_cannot_be_used_with_an_interface_declaration: { code: 1045, category: DiagnosticCategory.Error, key: "A 'declare' modifier cannot be used with an interface declaration." }, + A_0_modifier_cannot_be_used_with_an_interface_declaration: { code: 1045, category: DiagnosticCategory.Error, key: "A '{0}' modifier cannot be used with an interface declaration." }, A_declare_modifier_is_required_for_a_top_level_declaration_in_a_d_ts_file: { code: 1046, category: DiagnosticCategory.Error, key: "A 'declare' modifier is required for a top level declaration in a .d.ts file." }, A_rest_parameter_cannot_be_optional: { code: 1047, category: DiagnosticCategory.Error, key: "A rest parameter cannot be optional." }, A_rest_parameter_cannot_have_an_initializer: { code: 1048, category: DiagnosticCategory.Error, key: "A rest parameter cannot have an initializer." }, @@ -45,11 +49,13 @@ module ts { A_set_accessor_cannot_have_rest_parameter: { code: 1053, category: DiagnosticCategory.Error, key: "A 'set' accessor cannot have rest parameter." }, A_get_accessor_cannot_have_parameters: { code: 1054, category: DiagnosticCategory.Error, key: "A 'get' accessor cannot have parameters." }, Accessors_are_only_available_when_targeting_ECMAScript_5_and_higher: { code: 1056, category: DiagnosticCategory.Error, key: "Accessors are only available when targeting ECMAScript 5 and higher." }, + An_async_function_or_method_must_have_a_valid_awaitable_return_type: { code: 1057, category: DiagnosticCategory.Error, key: "An async function or method must have a valid awaitable return type." }, + Type_for_await_does_not_have_a_valid_callable_then_member: { code: 1058, category: DiagnosticCategory.Error, key: "Type for 'await' does not have a valid callable 'then' member." }, Enum_member_must_have_initializer: { code: 1061, category: DiagnosticCategory.Error, key: "Enum member must have initializer." }, An_export_assignment_cannot_be_used_in_a_namespace: { code: 1063, category: DiagnosticCategory.Error, key: "An export assignment cannot be used in a namespace." }, Ambient_enum_elements_can_only_have_integer_literal_initializers: { code: 1066, category: DiagnosticCategory.Error, key: "Ambient enum elements can only have integer literal initializers." }, Unexpected_token_A_constructor_method_accessor_or_property_was_expected: { code: 1068, category: DiagnosticCategory.Error, key: "Unexpected token. A constructor, method, accessor, or property was expected." }, - A_declare_modifier_cannot_be_used_with_an_import_declaration: { code: 1079, category: DiagnosticCategory.Error, key: "A 'declare' modifier cannot be used with an import declaration." }, + A_0_modifier_cannot_be_used_with_an_import_declaration: { code: 1079, category: DiagnosticCategory.Error, key: "A '{0}' modifier cannot be used with an import declaration." }, Invalid_reference_directive_syntax: { code: 1084, category: DiagnosticCategory.Error, key: "Invalid 'reference' directive syntax." }, Octal_literals_are_not_available_when_targeting_ECMAScript_5_and_higher: { code: 1085, category: DiagnosticCategory.Error, key: "Octal literals are not available when targeting ECMAScript 5 and higher." }, An_accessor_cannot_be_declared_in_an_ambient_context: { code: 1086, category: DiagnosticCategory.Error, key: "An accessor cannot be declared in an ambient context." }, @@ -120,7 +126,7 @@ module ts { Unterminated_template_literal: { code: 1160, category: DiagnosticCategory.Error, key: "Unterminated template literal." }, Unterminated_regular_expression_literal: { code: 1161, category: DiagnosticCategory.Error, key: "Unterminated regular expression literal." }, An_object_member_cannot_be_declared_optional: { code: 1162, category: DiagnosticCategory.Error, key: "An object member cannot be declared optional." }, - yield_expression_must_be_contained_within_a_generator_declaration: { code: 1163, category: DiagnosticCategory.Error, key: "'yield' expression must be contained_within a generator declaration." }, + yield_expression_must_be_contained_within_a_generator_declaration: { code: 1163, category: DiagnosticCategory.Error, key: "'yield' expression must be contained within a generator declaration." }, Computed_property_names_are_not_allowed_in_enums: { code: 1164, category: DiagnosticCategory.Error, key: "Computed property names are not allowed in enums." }, A_computed_property_name_in_an_ambient_context_must_directly_refer_to_a_built_in_symbol: { code: 1165, category: DiagnosticCategory.Error, key: "A computed property name in an ambient context must directly refer to a built-in symbol." }, A_computed_property_name_in_a_class_property_declaration_must_directly_refer_to_a_built_in_symbol: { code: 1166, category: DiagnosticCategory.Error, key: "A computed property name in a class property declaration must directly refer to a built-in symbol." }, @@ -174,6 +180,18 @@ module ts { Type_expected_0_is_a_reserved_word_in_strict_mode: { code: 1215, category: DiagnosticCategory.Error, key: "Type expected. '{0}' is a reserved word in strict mode" }, Type_expected_0_is_a_reserved_word_in_strict_mode_Class_definitions_are_automatically_in_strict_mode: { code: 1216, category: DiagnosticCategory.Error, key: "Type expected. '{0}' is a reserved word in strict mode. Class definitions are automatically in strict mode." }, Export_assignment_is_not_supported_when_module_flag_is_system: { code: 1218, category: DiagnosticCategory.Error, key: "Export assignment is not supported when '--module' flag is 'system'." }, + with_statements_are_not_allowed_in_an_async_function_block: { code: 1300, category: DiagnosticCategory.Error, key: "'with' statements are not allowed in an async function block." }, + _0_modifier_cannot_be_used_with_a_generator: { code: 1301, category: DiagnosticCategory.Error, key: "'{0}' modifier cannot be used with a generator." }, + _0_modifier_cannot_be_used_with_a_module_declaration: { code: 1302, category: DiagnosticCategory.Error, key: "'{0}' modifier cannot be used with a module declaration." }, + _0_modifier_cannot_be_used_with_an_enum_declaration: { code: 1303, category: DiagnosticCategory.Error, key: "'{0}' modifier cannot be used with an enum declaration." }, + _0_modifier_cannot_be_used_with_an_export_assignment_declaration: { code: 1304, category: DiagnosticCategory.Error, key: "'{0}' modifier cannot be used with an export assignment declaration." }, + _0_modifier_cannot_be_used_on_a_variable_statement: { code: 1305, category: DiagnosticCategory.Error, key: "'{0}' modifier cannot be used on a variable statement." }, + _0_modifier_cannot_be_used_with_a_type_declaration: { code: 1306, category: DiagnosticCategory.Error, key: "'{0}' modifier cannot be used with a type declaration." }, + _0_modifier_cannot_be_used_with_a_parameter_declaration: { code: 1307, category: DiagnosticCategory.Error, key: "'{0}' modifier cannot be used with a parameter declaration." }, + await_expression_must_be_contained_within_an_async_function: { code: 1308, category: DiagnosticCategory.Error, key: "'await' expression must be contained within an async function." }, + _0_modifier_cannot_be_used_on_an_object_literal_element: { code: 1309, category: DiagnosticCategory.Error, key: "'{0}' modifier cannot be used on an object literal element." }, + _0_expression_is_not_allowed_in_an_initializer: { code: 1310, category: DiagnosticCategory.Error, key: "'{0}' expression is not allowed in an initializer." }, + Async_functions_are_only_available_when_targeting_ECMAScript_6_and_higher: { code: 1311, category: DiagnosticCategory.Error, key: "Async functions are only available when targeting ECMAScript 6 and higher." }, Duplicate_identifier_0: { code: 2300, category: DiagnosticCategory.Error, key: "Duplicate identifier '{0}'." }, Initializer_of_instance_member_variable_0_cannot_reference_identifier_1_declared_in_the_constructor: { code: 2301, category: DiagnosticCategory.Error, key: "Initializer of instance member variable '{0}' cannot reference identifier '{1}' declared in the constructor." }, Static_members_cannot_reference_class_type_parameters: { code: 2302, category: DiagnosticCategory.Error, key: "Static members cannot reference class type parameters." }, @@ -363,6 +381,10 @@ module ts { An_interface_can_only_extend_an_identifier_Slashqualified_name_with_optional_type_arguments: { code: 2499, category: DiagnosticCategory.Error, key: "An interface can only extend an identifier/qualified-name with optional type arguments." }, A_class_can_only_implement_an_identifier_Slashqualified_name_with_optional_type_arguments: { code: 2500, category: DiagnosticCategory.Error, key: "A class can only implement an identifier/qualified-name with optional type arguments." }, A_rest_element_cannot_contain_a_binding_pattern: { code: 2501, category: DiagnosticCategory.Error, key: "A rest element cannot contain a binding pattern." }, + Duplicate_identifier_0_Compiler_uses_declaration_1_to_support_async_functions: { code: 2520, category: DiagnosticCategory.Error, key: "Duplicate identifier '{0}'. Compiler uses declaration '{1}' to support async functions." }, + Expression_resolves_to_variable_declaration_0_that_compiler_uses_to_support_async_functions: { code: 2521, category: DiagnosticCategory.Error, key: "Expression resolves to variable declaration '{0}' that compiler uses to support async functions." }, + Duplicate_identifier_arguments_Compiler_uses_variable_declaration_arguments_to_capture_arguments_reference: { code: 2522, category: DiagnosticCategory.Error, key: "Duplicate identifier '_arguments'. Compiler uses variable declaration '_arguments' to capture 'arguments' reference." }, + Expression_resolves_to_variable_declaration_arguments_that_compiler_uses_to_capture_arguments_reference: { code: 2523, category: DiagnosticCategory.Error, key: "Expression resolves to variable declaration '_arguments' that compiler uses to capture 'arguments' reference." }, Import_declaration_0_is_using_private_name_1: { code: 4000, category: DiagnosticCategory.Error, key: "Import declaration '{0}' is using private name '{1}'." }, Type_parameter_0_of_exported_class_has_or_is_using_private_name_1: { code: 4002, category: DiagnosticCategory.Error, key: "Type parameter '{0}' of exported class has or is using private name '{1}'." }, Type_parameter_0_of_exported_interface_has_or_is_using_private_name_1: { code: 4004, category: DiagnosticCategory.Error, key: "Type parameter '{0}' of exported interface has or is using private name '{1}'." }, @@ -505,6 +527,7 @@ module ts { Specifies_the_end_of_line_sequence_to_be_used_when_emitting_files_Colon_CRLF_dos_or_LF_unix: { code: 6060, category: DiagnosticCategory.Message, key: "Specifies the end of line sequence to be used when emitting files: 'CRLF' (dos) or 'LF' (unix)." }, NEWLINE: { code: 6061, category: DiagnosticCategory.Message, key: "NEWLINE" }, Argument_for_newLine_option_must_be_CRLF_or_LF: { code: 6062, category: DiagnosticCategory.Error, key: "Argument for '--newLine' option must be 'CRLF' or 'LF'." }, + Emit_async_functions_when_ECMAScript_target_version_is_lower_than_ES6: { code: 6063, category: DiagnosticCategory.Message, key: "Emit async functions when ECMAScript target version is lower than 'ES6'." }, Variable_0_implicitly_has_an_1_type: { code: 7005, category: DiagnosticCategory.Error, key: "Variable '{0}' implicitly has an '{1}' type." }, Parameter_0_implicitly_has_an_1_type: { code: 7006, category: DiagnosticCategory.Error, key: "Parameter '{0}' implicitly has an '{1}' type." }, Member_0_implicitly_has_an_1_type: { code: 7008, category: DiagnosticCategory.Error, key: "Member '{0}' implicitly has an '{1}' type." }, diff --git a/src/compiler/diagnosticMessages.json b/src/compiler/diagnosticMessages.json index 18c98928dda4c..431aec3f5316d 100644 --- a/src/compiler/diagnosticMessages.json +++ b/src/compiler/diagnosticMessages.json @@ -123,11 +123,27 @@ "category": "Error", "code": 1039 }, + "'{0}' modifier cannot be used in an ambient context.": { + "category": "Error", + "code": 1040 + }, + "'{0}' modifier cannot be used with a class declaration.": { + "category": "Error", + "code": 1041 + }, + "'{0}' modifier cannot be used here.": { + "category": "Error", + "code": 1042 + }, + "'{0}' modifier cannot appear on a data property.": { + "category": "Error", + "code": 1043 + }, "'{0}' modifier cannot appear on a module element.": { "category": "Error", "code": 1044 }, - "A 'declare' modifier cannot be used with an interface declaration.": { + "A '{0}' modifier cannot be used with an interface declaration.": { "category": "Error", "code": 1045 }, @@ -167,6 +183,14 @@ "category": "Error", "code": 1056 }, + "An async function or method must have a valid awaitable return type.": { + "category": "Error", + "code": 1057 + }, + "Type for 'await' does not have a valid callable 'then' member.": { + "category": "Error", + "code": 1058 + }, "Enum member must have initializer.": { "category": "Error", "code": 1061 @@ -183,7 +207,7 @@ "category": "Error", "code": 1068 }, - "A 'declare' modifier cannot be used with an import declaration.": { + "A '{0}' modifier cannot be used with an import declaration.": { "category": "Error", "code": 1079 }, @@ -467,7 +491,7 @@ "category": "Error", "code": 1162 }, - "'yield' expression must be contained_within a generator declaration.": { + "'yield' expression must be contained within a generator declaration.": { "category": "Error", "code": 1163 }, @@ -684,6 +708,55 @@ "code": 1218 }, + "'with' statements are not allowed in an async function block.": { + "category": "Error", + "code": 1300 + }, + "'{0}' modifier cannot be used with a generator.": { + "category": "Error", + "code": 1301 + }, + "'{0}' modifier cannot be used with a module declaration.": { + "category": "Error", + "code": 1302 + }, + "'{0}' modifier cannot be used with an enum declaration.": { + "category": "Error", + "code": 1303 + }, + "'{0}' modifier cannot be used with an export assignment declaration.": { + "category": "Error", + "code": 1304 + }, + "'{0}' modifier cannot be used on a variable statement.": { + "category": "Error", + "code": 1305 + }, + "'{0}' modifier cannot be used with a type declaration.": { + "category": "Error", + "code": 1306 + }, + "'{0}' modifier cannot be used with a parameter declaration.": { + "category": "Error", + "code": 1307 + }, + "'await' expression must be contained within an async function.": { + "category": "Error", + "code": 1308 + }, + "'{0}' modifier cannot be used on an object literal element.": { + "category": "Error", + "code": 1309 + }, + "'{0}' expression is not allowed in an initializer.": { + "category": "Error", + "code": 1310 + }, + "Async functions are only available when targeting ECMAScript 6 and higher.": { + "category": "Error", + "code": 1311 + }, + "Duplicate identifier '{0}'.": { "category": "Error", "code": 2300 @@ -1441,6 +1514,23 @@ "code": 2501 }, + "Duplicate identifier '{0}'. Compiler uses declaration '{1}' to support async functions.": { + "category": "Error", + "code": 2520 + }, + "Expression resolves to variable declaration '{0}' that compiler uses to support async functions.": { + "category": "Error", + "code": 2521 + }, + "Duplicate identifier '_arguments'. Compiler uses variable declaration '_arguments' to capture 'arguments' reference.": { + "category": "Error", + "code": 2522 + }, + "Expression resolves to variable declaration '_arguments' that compiler uses to capture 'arguments' reference.": { + "category": "Error", + "code": 2523 + }, + "Import declaration '{0}' is using private name '{1}'.": { "category": "Error", "code": 4000 @@ -2010,7 +2100,10 @@ "category": "Error", "code": 6062 }, - + "Emit async functions when ECMAScript target version is lower than 'ES6'.": { + "category": "Message", + "code": 6063 + }, "Variable '{0}' implicitly has an '{1}' type.": { "category": "Error", diff --git a/src/compiler/parser.ts b/src/compiler/parser.ts index 055fc1b6f7465..db9580871788f 100644 --- a/src/compiler/parser.ts +++ b/src/compiler/parser.ts @@ -153,6 +153,8 @@ module ts { case SyntaxKind.YieldExpression: return visitNode(cbNode, (node).asteriskToken) || visitNode(cbNode, (node).expression); + case SyntaxKind.AwaitExpression: + return visitNode(cbNode, (node).expression); case SyntaxKind.PostfixUnaryExpression: return visitNode(cbNode, (node).operand); case SyntaxKind.BinaryExpression: @@ -556,9 +558,17 @@ module ts { function setDecoratorContext(val: boolean) { setContextFlag(val, ParserContextFlags.Decorator); } - - function doOutsideOfContext(flags: ParserContextFlags, func: () => T): T { - let currentContextFlags = contextFlags & flags; + + function setAwaitContext(val: boolean) { + setContextFlag(val, ParserContextFlags.Await); + } + + function setAsyncParameterContext(val: boolean) { + setContextFlag(val, ParserContextFlags.AsyncParameter); + } + + function doOutsideOfContext(context: ParserContextFlags, func: () => T): T { + let currentContextFlags = contextFlags & context; if (currentContextFlags) { setContextFlag(false, currentContextFlags); let result = func(); @@ -569,85 +579,86 @@ module ts { // no need to do anything special as we are not in any of the requested contexts return func(); } - - function allowInAnd(func: () => T): T { - if (contextFlags & ParserContextFlags.DisallowIn) { - setDisallowInContext(false); + + function doInsideOfContext(context: ParserContextFlags, func: () => T): T { + let unsetContextFlags = context & ~contextFlags; + if (!unsetContextFlags) { + setContextFlag(true, unsetContextFlags); let result = func(); - setDisallowInContext(true); + setContextFlag(false, unsetContextFlags); return result; } - - // no need to do anything special if 'in' is already allowed. + + // no need to do anything special as we are already in all of the requested contexts return func(); } - function disallowInAnd(func: () => T): T { - if (contextFlags & ParserContextFlags.DisallowIn) { - // no need to do anything special if 'in' is already disallowed. - return func(); - } - - setDisallowInContext(true); - let result = func(); - setDisallowInContext(false); - return result; + function allowInAnd(func: () => T): T { + return doInsideOfContext(ParserContextFlags.DisallowIn, func); } + function disallowInAnd(func: () => T): T { + return doOutsideOfContext(ParserContextFlags.DisallowIn, func); + } + function doInYieldContext(func: () => T): T { - if (contextFlags & ParserContextFlags.Yield) { - // no need to do anything special if we're already in the [Yield] context. - return func(); - } - - setYieldContext(true); - let result = func(); - setYieldContext(false); - return result; + return doInsideOfContext(ParserContextFlags.Yield, func); } function doOutsideOfYieldContext(func: () => T): T { - if (contextFlags & ParserContextFlags.Yield) { - setYieldContext(false); - let result = func(); - setYieldContext(true); - return result; - } - - // no need to do anything special if we're not in the [Yield] context. - return func(); + return doOutsideOfContext(ParserContextFlags.Yield, func); } function doInDecoratorContext(func: () => T): T { - if (contextFlags & ParserContextFlags.Decorator) { - // no need to do anything special if we're already in the [Decorator] context. - return func(); - } - - setDecoratorContext(true); - let result = func(); - setDecoratorContext(false); - return result; + return doInsideOfContext(ParserContextFlags.Decorator, func); + } + + function doInAwaitContext(func: () => T): T { + return doInsideOfContext(ParserContextFlags.Await, func); + } + + function doOutsideOfAwaitContext(func: () => T): T { + return doOutsideOfContext(ParserContextFlags.Await, func); + } + + function doOutsideOfYieldAndAwaitContext(func: () => T): T { + return doOutsideOfContext(ParserContextFlags.Yield | ParserContextFlags.Await, func); + } + + function inContext(flags: ParserContextFlags) { + return (contextFlags & flags) === flags; } function inYieldContext() { - return (contextFlags & ParserContextFlags.Yield) !== 0; + return inContext(ParserContextFlags.Yield); } function inStrictModeContext() { - return (contextFlags & ParserContextFlags.StrictMode) !== 0; + return inContext(ParserContextFlags.StrictMode); } function inGeneratorParameterContext() { - return (contextFlags & ParserContextFlags.GeneratorParameter) !== 0; + return inContext(ParserContextFlags.GeneratorParameter); } function inDisallowInContext() { - return (contextFlags & ParserContextFlags.DisallowIn) !== 0; + return inContext(ParserContextFlags.DisallowIn); } function inDecoratorContext() { - return (contextFlags & ParserContextFlags.Decorator) !== 0; + return inContext(ParserContextFlags.Decorator); + } + + function inAwaitContext() { + return inContext(ParserContextFlags.Await); + } + + function inAsyncParameterContext() { + return inContext(ParserContextFlags.AsyncParameter); + } + + function inGeneratorParameterOrAsyncParameterContext() { + return inContext(ParserContextFlags.GeneratorParameter | ParserContextFlags.AsyncParameter); } function parseErrorAtCurrentToken(message: DiagnosticMessage, arg0?: any): void { @@ -927,7 +938,8 @@ module ts { // PropertyName[Yield,GeneratorParameter] : // LiteralPropertyName // [+GeneratorParameter] ComputedPropertyName - // [~GeneratorParameter] ComputedPropertyName[?Yield] + // [+AsyncParameter] ComputedPropertyName + // [~GeneratorParameter,~AsyncParameter] ComputedPropertyName[?Yield,?Await] // // ComputedPropertyName[Yield] : // [ AssignmentExpression[In, ?Yield] ] @@ -938,34 +950,40 @@ module ts { // We parse any expression (including a comma expression). But the grammar // says that only an assignment expression is allowed, so the grammar checker // will error if it sees a comma expression. - let yieldContext = inYieldContext(); - if (inGeneratorParameterContext()) { - setYieldContext(false); - } - - node.expression = allowInAnd(parseExpression); - if (inGeneratorParameterContext()) { - setYieldContext(yieldContext); - } + node.expression = inGeneratorParameterOrAsyncParameterContext() + ? doOutsideOfYieldAndAwaitContext(parseExpression) + : parseExpression(); parseExpected(SyntaxKind.CloseBracketToken); return finishNode(node); } - function parseContextualModifier(t: SyntaxKind): boolean { - return token === t && tryParse(nextTokenCanFollowModifier); + function parseContextualModifier(t: SyntaxKind, isArrowFunction?: boolean): boolean { + return token === t && tryParse(isArrowFunction + ? nextTokenCanFollowModifierForArrowFunction + : nextTokenCanFollowModifier); + } + + function nextTokenCanFollowModifierForArrowFunction() { + return nextTokenCanFollowModifier(/*isArrowFunction*/ true); } - function nextTokenCanFollowModifier() { + function nextTokenCanFollowModifier(isArrowFunction?: boolean) { nextToken(); - return canFollowModifier(); + return canFollowModifier(isArrowFunction); } - function parseAnyContextualModifier(): boolean { - return isModifier(token) && tryParse(nextTokenCanFollowContextualModifier); + function parseAnyContextualModifier(isArrowFunction?: boolean): boolean { + return isModifier(token) && tryParse(isArrowFunction + ? nextTokenCanFollowContextualModifierForArrowFunction + : nextTokenCanFollowContextualModifier); + } + + function nextTokenCanFollowContextualModifierForArrowFunction() { + return nextTokenCanFollowContextualModifier(/*isArrowFunction*/ true); } - function nextTokenCanFollowContextualModifier() { + function nextTokenCanFollowContextualModifier(isArrowFunction?: boolean) { if (token === SyntaxKind.ConstKeyword) { // 'const' is only a modifier if followed by 'enum'. return nextToken() === SyntaxKind.EnumKeyword; @@ -981,10 +999,19 @@ module ts { return nextTokenIsClassOrFunction(); } nextToken(); - return canFollowModifier(); + return canFollowModifier(isArrowFunction); } - function canFollowModifier(): boolean { + function canFollowModifier(isArrowFunction?: boolean): boolean { + if (isArrowFunction) { + if (scanner.hasPrecedingLineBreak()) { + return false; + } + + return token === SyntaxKind.OpenParenToken + || token === SyntaxKind.LessThanToken; + } + return token === SyntaxKind.OpenBracketToken || token === SyntaxKind.OpenBraceToken || token === SyntaxKind.AsteriskToken @@ -1827,11 +1854,10 @@ module ts { setModifiers(node, parseModifiers()); node.dotDotDotToken = parseOptionalToken(SyntaxKind.DotDotDotToken); - // SingleNameBinding[Yield,GeneratorParameter] : See 13.2.3 - // [+GeneratorParameter]BindingIdentifier[Yield]Initializer[In]opt - // [~GeneratorParameter]BindingIdentifier[?Yield]Initializer[In, ?Yield]opt + // FormalParameter[Yield,GeneratorParameter,Await,AsyncParameter] : (Modified) See 14.1 + // BindingElement[?Yield,?GeneratorParameter,?Await,?AsyncParameter] - node.name = inGeneratorParameterContext() ? doInYieldContext(parseIdentifierOrPattern) : parseIdentifierOrPattern(); + node.name = parseIdentifierOrPattern(); if (getFullWidth(node.name) === 0 && node.flags === 0 && isModifier(token)) { // in cases like @@ -1847,7 +1873,7 @@ module ts { node.questionToken = parseOptionalToken(SyntaxKind.QuestionToken); node.type = parseParameterType(); - node.initializer = inGeneratorParameterContext() ? doOutsideOfYieldContext(parseParameterInitializer) : parseParameterInitializer(); + node.initializer = parseBindingElementInitializer(/*inParameter*/ true); // Do not check for initializers in an ambient context for parameters. This is not // a grammar error because the grammar allows arbitrary call signatures in @@ -1859,19 +1885,36 @@ module ts { // ambient contexts. return finishNode(node); } + + function parseBindingElementInitializer(inParameter: boolean) { + // BindingElement[Yield,GeneratorParameter,Await,AsyncParameter] : + // [+GeneratorParameter] BindingPattern[?Yield,?Await,GeneratorParameter] Initializer[In]opt + // [+AsyncParameter] BindingPattern[?Yield,?Await,AsyncParameter] Initializer[In]opt + // [~GeneratorParameter,~AsyncParameter] BindingPattern[?Yield,?Await] Initializer[In,?Yield,?Await]opt + // SingleNameBinding[Yield,GeneratorParameter,Await,AsyncParameter] : + // [+GeneratorParameter] BindingIdentifier[Yield] Initializer[In]opt + // [+AsyncParameter] BindingIdentifier[Await] Initializer[In]opt + // [~GeneratorParameter,~AsyncParameter] BindingIdentifier[?Yield,?Await] Initializer[In,?Yield,?Await]opt + + let parseInitializer = inParameter ? parseParameterInitializer : parseNonParameterInitializer; + return inGeneratorParameterOrAsyncParameterContext() + ? doOutsideOfYieldAndAwaitContext(parseInitializer) + : parseInitializer(); + } function parseParameterInitializer() { return parseInitializer(/*inParameter*/ true); } - + function fillSignature( returnToken: SyntaxKind, yieldAndGeneratorParameterContext: boolean, + awaitAndAsyncParameterContext: boolean, requireCompleteParameterList: boolean, signature: SignatureDeclaration): void { let returnTokenRequired = returnToken === SyntaxKind.EqualsGreaterThanToken; signature.typeParameters = parseTypeParameters(); - signature.parameters = parseParameterList(yieldAndGeneratorParameterContext, requireCompleteParameterList); + signature.parameters = parseParameterList(yieldAndGeneratorParameterContext, awaitAndAsyncParameterContext, requireCompleteParameterList); if (returnTokenRequired) { parseExpected(returnToken); @@ -1886,32 +1929,48 @@ module ts { // have 'Yield' And 'GeneratorParameter' not in sync. i.e. any production calling // this FormalParameters production either always sets both to true, or always sets // both to false. As such we only have a single parameter to represent both. - function parseParameterList(yieldAndGeneratorParameterContext: boolean, requireCompleteParameterList: boolean) { - // FormalParameters[Yield,GeneratorParameter] : + function parseParameterList(yieldAndGeneratorParameterContext: boolean, awaitAndAsyncParameterContext: boolean, requireCompleteParameterList: boolean) { + // FormalParameters[Yield,GeneratorParameter,Await,AsyncParameter] : (Modified) // ... // - // FormalParameter[Yield,GeneratorParameter] : - // BindingElement[?Yield, ?GeneratorParameter] + // FormalParameter[Yield,GeneratorParameter,Await,AsyncParameter] : (Modified) + // BindingElement[?Yield,?GeneratorParameter,?Await,?AsyncParameter] // - // BindingElement[Yield, GeneratorParameter ] : See 13.2.3 - // SingleNameBinding[?Yield, ?GeneratorParameter] - // [+GeneratorParameter]BindingPattern[?Yield, GeneratorParameter]Initializer[In]opt - // [~GeneratorParameter]BindingPattern[?Yield]Initializer[In, ?Yield]opt + // BindingElement[Yield,GeneratorParameter,Await,AsyncParameter] : (Modified) See 13.2.3 + // SingleNameBinding[?Yield,?GeneratorParameter,?Await,?AsyncParameter] + // [+GeneratorParameter]BindingPattern[?Yield,?Await,?AsyncParameter,GeneratorParameter] Initializer[In]opt + // [+AsyncParameter]BindingPattern[?Yield,?Await,?GeneratorParameter,AsyncParameter] Initializer[In]opt + // [~GeneratorParameter,~AsyncParameter]BindingPattern[?Yield,?Await]Initializer[In,?Yield,?Await]opt // - // SingleNameBinding[Yield, GeneratorParameter] : See 13.2.3 + // SingleNameBinding[Yield,GeneratorParameter,Await,AsyncParameter] : (Modified) See 13.2.3 // [+GeneratorParameter]BindingIdentifier[Yield]Initializer[In]opt - // [~GeneratorParameter]BindingIdentifier[?Yield]Initializer[In, ?Yield]opt + // [+AsyncParameter]BindingIdentifier[Await]Initializer[In]opt + // [~GeneratorParameter,~AsyncParameter]BindingIdentifier[?Yield,?Await]Initializer[In,?Yield,?Await]opt if (parseExpected(SyntaxKind.OpenParenToken)) { let savedYieldContext = inYieldContext(); let savedGeneratorParameterContext = inGeneratorParameterContext(); + let savedAwaitContext = inAwaitContext(); + let savedAsyncParameterContext = inAsyncParameterContext(); - setYieldContext(yieldAndGeneratorParameterContext); + if (yieldAndGeneratorParameterContext) { + setYieldContext(true); + } + setGeneratorParameterContext(yieldAndGeneratorParameterContext); + + if (awaitAndAsyncParameterContext) { + setAwaitContext(true); + } + + setAsyncParameterContext(awaitAndAsyncParameterContext); let result = parseDelimitedList(ParsingContext.Parameters, parseParameter); setYieldContext(savedYieldContext); setGeneratorParameterContext(savedGeneratorParameterContext); + + setAwaitContext(savedAwaitContext); + setAsyncParameterContext(savedAsyncParameterContext); if (!parseExpected(SyntaxKind.CloseParenToken) && requireCompleteParameterList) { // Caller insisted that we had to end with a ) We didn't. So just return @@ -1944,7 +2003,7 @@ module ts { if (kind === SyntaxKind.ConstructSignature) { parseExpected(SyntaxKind.NewKeyword); } - fillSignature(SyntaxKind.ColonToken, /*yieldAndGeneratorParameterContext:*/ false, /*requireCompleteParameterList:*/ false, node); + fillSignature(SyntaxKind.ColonToken, /*yieldAndGeneratorParameterContext:*/ false, /*awaitAndAsyncParameterContext*/ false, /*requireCompleteParameterList:*/ false, node); parseTypeMemberSemicolon(); return finishNode(node); } @@ -2034,7 +2093,7 @@ module ts { // Method signatues don't exist in expression contexts. So they have neither // [Yield] nor [GeneratorParameter] - fillSignature(SyntaxKind.ColonToken, /*yieldAndGeneratorParameterContext:*/ false, /*requireCompleteParameterList:*/ false, method); + fillSignature(SyntaxKind.ColonToken, /*yieldAndGeneratorParameterContext:*/ false, /*awaitAndAsyncParameterContext*/ false, /*requireCompleteParameterList:*/ false, method); parseTypeMemberSemicolon(); return finishNode(method); } @@ -2173,7 +2232,7 @@ module ts { if (kind === SyntaxKind.ConstructorType) { parseExpected(SyntaxKind.NewKeyword); } - fillSignature(SyntaxKind.EqualsGreaterThanToken, /*yieldAndGeneratorParameterContext:*/ false, /*requireCompleteParameterList:*/ false, node); + fillSignature(SyntaxKind.EqualsGreaterThanToken, /*yieldAndGeneratorParameterContext:*/ false, /*awaitAndAsyncParameterContext*/ false, /*requireCompleteParameterList:*/ false, node); return finishNode(node); } @@ -2302,19 +2361,8 @@ module ts { function parseType(): TypeNode { // The rules about 'yield' only apply to actual code/expression contexts. They don't - // apply to 'type' contexts. So we disable these parameters here before moving on. - let savedYieldContext = inYieldContext(); - let savedGeneratorParameterContext = inGeneratorParameterContext(); - - setYieldContext(false); - setGeneratorParameterContext(false); - - let result = parseTypeWorker(); - - setYieldContext(savedYieldContext); - setGeneratorParameterContext(savedGeneratorParameterContext); - - return result; + // apply to 'type' contexts. So we disable these parameters here before moving on. + return doOutsideOfContext(ParserContextFlags.ContextParameterFlags, parseTypeWorker); } function parseTypeWorker(): TypeNode { @@ -2374,6 +2422,7 @@ module ts { case SyntaxKind.PlusPlusToken: case SyntaxKind.MinusMinusToken: case SyntaxKind.LessThanToken: + case SyntaxKind.AwaitKeyword: case SyntaxKind.YieldKeyword: // Yield always starts an expression. Either it is an identifier (in which case // it is definitely an expression). Or it's a keyword (either because we're in @@ -2586,7 +2635,7 @@ module ts { node.parameters.end = parameter.end; node.equalsGreaterThanToken = parseExpectedToken(SyntaxKind.EqualsGreaterThanToken, false, Diagnostics._0_expected, "=>"); - node.body = parseArrowFunctionExpressionBody(); + node.body = parseArrowFunctionExpressionBody(/*isAsync*/ false); return finishNode(node); } @@ -2617,7 +2666,7 @@ module ts { var lastToken = token; arrowFunction.equalsGreaterThanToken = parseExpectedToken(SyntaxKind.EqualsGreaterThanToken, /*reportAtCurrentPosition:*/false, Diagnostics._0_expected, "=>"); arrowFunction.body = (lastToken === SyntaxKind.EqualsGreaterThanToken || lastToken === SyntaxKind.OpenBraceToken) - ? parseArrowFunctionExpressionBody() + ? parseArrowFunctionExpressionBody(/*isAsync*/ isAsyncFunctionLike(arrowFunction)) : parseIdentifier(); return finishNode(arrowFunction); @@ -2628,7 +2677,7 @@ module ts { // Unknown -> There *might* be a parenthesized arrow function here. // Speculatively look ahead to be sure, and rollback if not. function isParenthesizedArrowFunctionExpression(): Tristate { - if (token === SyntaxKind.OpenParenToken || token === SyntaxKind.LessThanToken) { + if (token === SyntaxKind.OpenParenToken || token === SyntaxKind.LessThanToken || token === SyntaxKind.AsyncKeyword) { return lookAhead(isParenthesizedArrowFunctionExpressionWorker); } @@ -2643,6 +2692,10 @@ module ts { } function isParenthesizedArrowFunctionExpressionWorker() { + if (token === SyntaxKind.AsyncKeyword && !parseContextualModifier(SyntaxKind.AsyncKeyword, /*isArrowFunction*/ true)) { + return Tristate.False; + } + let first = token; let second = nextToken(); @@ -2718,6 +2771,9 @@ module ts { function parseParenthesizedArrowFunctionExpressionHead(allowAmbiguity: boolean): ArrowFunction { let node = createNode(SyntaxKind.ArrowFunction); + setModifiers(node, parseModifiers(/*isArrowFunction*/ true)); + let isAsync = isAsyncFunctionLike(node); + // Arrow functions are never generators. // // If we're speculatively parsing a signature for a parenthesized arrow function, then @@ -2725,7 +2781,7 @@ module ts { // a => (b => c) // And think that "(b =>" was actually a parenthesized arrow function with a missing // close paren. - fillSignature(SyntaxKind.ColonToken, /*yieldAndGeneratorParameterContext:*/ false, /*requireCompleteParameterList:*/ !allowAmbiguity, node); + fillSignature(SyntaxKind.ColonToken, /*yieldAndGeneratorParameterContext:*/ false, /*awaitAndAsyncParameterContext*/ isAsync, /*requireCompleteParameterList:*/ !allowAmbiguity, node); // If we couldn't get parameters, we definitely could not parse out an arrow function. if (!node.parameters) { @@ -2748,9 +2804,9 @@ module ts { return node; } - function parseArrowFunctionExpressionBody(): Block | Expression { + function parseArrowFunctionExpressionBody(isAsync: boolean): Block | Expression { if (token === SyntaxKind.OpenBraceToken) { - return parseFunctionBlock(/*allowYield:*/ false, /* ignoreMissingOpenBrace */ false); + return parseFunctionBlock(/*allowYield*/ false, /*allowAwait*/ isAsync, /*ignoreMissingOpenBrace*/ false); } if (isStartOfStatement(/*inErrorRecovery:*/ true) && @@ -2772,10 +2828,12 @@ module ts { // up preemptively closing the containing construct. // // Note: even when 'ignoreMissingOpenBrace' is passed as true, parseBody will still error. - return parseFunctionBlock(/*allowYield:*/ false, /* ignoreMissingOpenBrace */ true); + return parseFunctionBlock(/*allowYield*/ false, /*allowAwait*/ isAsync, /*ignoreMissingOpenBrace*/ true); } - - return parseAssignmentExpressionOrHigher(); + + return isAsync + ? doInAwaitContext(parseAssignmentExpressionOrHigher) + : doOutsideOfAwaitContext(parseAssignmentExpressionOrHigher); } function parseConditionalExpressionRest(leftOperand: Expression): Expression { @@ -2915,8 +2973,32 @@ module ts { node.expression = parseUnaryExpressionOrHigher(); return finishNode(node); } + + function isAwaitExpression(): boolean { + if (token === SyntaxKind.AwaitKeyword) { + if (inAwaitContext()) { + return true; + } + + // here we are using similar heuristics as 'isYieldExpression' + return lookAhead(nextTokenIsIdentifierOnSameLine); + } + + return false; + } + + function parseAwaitExpression() { + var node = createNode(SyntaxKind.AwaitExpression); + nextToken(); + node.expression = parseUnaryExpressionOrHigher(); + return finishNode(node); + } function parseUnaryExpressionOrHigher(): UnaryExpression { + if (isAwaitExpression()) { + return parseAwaitExpression(); + } + switch (token) { case SyntaxKind.PlusToken: case SyntaxKind.MinusToken: @@ -3230,6 +3312,11 @@ module ts { return parseArrayLiteralExpression(); case SyntaxKind.OpenBraceToken: return parseObjectLiteralExpression(); + case SyntaxKind.AsyncKeyword: + if (!lookAhead(nextTokenIsFunctionKeywordOnSameLine)) { + break; + } + return parseFunctionExpression(); case SyntaxKind.ClassKeyword: return parseClassExpression(); case SyntaxKind.FunctionKeyword: @@ -3353,15 +3440,32 @@ module ts { if (saveDecoratorContext) { setDecoratorContext(false); } + let node = createNode(SyntaxKind.FunctionExpression); + setModifiers(node, parseModifiers()); parseExpected(SyntaxKind.FunctionKeyword); - node.asteriskToken = parseOptionalToken(SyntaxKind.AsteriskToken); - node.name = node.asteriskToken ? doInYieldContext(parseOptionalIdentifier) : parseOptionalIdentifier(); - fillSignature(SyntaxKind.ColonToken, /*yieldAndGeneratorParameterContext:*/ !!node.asteriskToken, /*requireCompleteParameterList:*/ false, node); - node.body = parseFunctionBlock(/*allowYield:*/ !!node.asteriskToken, /* ignoreMissingOpenBrace */ false); + node.asteriskToken = parseOptionalToken(SyntaxKind.AsteriskToken); + + let savedYieldContext = inYieldContext(); + let isGenerator = node.asteriskToken != undefined; + setYieldContext(isGenerator); + + let savedAwaitContext = inAwaitContext(); + let isAsync = isAsyncFunctionLike(node); + setAwaitContext(isAsync); + + node.name = parseOptionalIdentifier(); + + setYieldContext(savedYieldContext); + setAwaitContext(savedAwaitContext); + + fillSignature(SyntaxKind.ColonToken, /*yieldAndGeneratorParameterContext*/ isGenerator, /*awaitAndAsyncParameterContext*/ isAsync, /*requireCompleteParameterList*/ false, node); + node.body = parseFunctionBlock(/*allowYield*/ isGenerator, /*allowAwait*/ isAsync, /*ignoreMissingOpenBrace*/ false); + if (saveDecoratorContext) { setDecoratorContext(true); } + return finishNode(node); } @@ -3394,9 +3498,12 @@ module ts { return finishNode(node); } - function parseFunctionBlock(allowYield: boolean, ignoreMissingOpenBrace: boolean, diagnosticMessage?: DiagnosticMessage): Block { + function parseFunctionBlock(allowYield: boolean, allowAwait: boolean, ignoreMissingOpenBrace: boolean, diagnosticMessage?: DiagnosticMessage): Block { let savedYieldContext = inYieldContext(); setYieldContext(allowYield); + + let savedAwaitContext = inAwaitContext(); + setAwaitContext(allowAwait); // We may be in a [Decorator] context when parsing a function expression or // arrow function. The body of the function is not in [Decorator] context. @@ -3412,6 +3519,7 @@ module ts { } setYieldContext(savedYieldContext); + setAwaitContext(savedAwaitContext); return block; } @@ -3702,6 +3810,15 @@ module ts { // In ES 6 'enum' is a future reserved keyword, so it should not be used as identifier let isConstEnum = lookAhead(nextTokenIsEnumKeyword); return !isConstEnum; + + case SyntaxKind.AsyncKeyword: + // When followed by the function keyword on the same line, this is a statement + if (lookAhead(nextTokenIsFunctionKeywordOnSameLine)) { + return true; + } + + return isStartOfExpression(); + case SyntaxKind.InterfaceKeyword: case SyntaxKind.ModuleKeyword: case SyntaxKind.NamespaceKeyword: @@ -3835,13 +3952,13 @@ module ts { return undefined; } - function parseFunctionBlockOrSemicolon(isGenerator: boolean, diagnosticMessage?: DiagnosticMessage): Block { + function parseFunctionBlockOrSemicolon(isGenerator: boolean, isAsync: boolean, diagnosticMessage?: DiagnosticMessage): Block { if (token !== SyntaxKind.OpenBraceToken && canParseSemicolon()) { parseSemicolon(); return; } - return parseFunctionBlock(isGenerator, /*ignoreMissingOpenBrace:*/ false, diagnosticMessage); + return parseFunctionBlock(isGenerator, isAsync, /*ignoreMissingOpenBrace:*/ false, diagnosticMessage); } // DECLARATIONS @@ -3853,7 +3970,7 @@ module ts { let node = createNode(SyntaxKind.BindingElement); node.dotDotDotToken = parseOptionalToken(SyntaxKind.DotDotDotToken); node.name = parseIdentifierOrPattern(); - node.initializer = parseInitializer(/*inParameter*/ false); + node.initializer = parseBindingElementInitializer(/*inParameter*/ false); return finishNode(node); } @@ -3870,7 +3987,7 @@ module ts { node.propertyName = propertyName; node.name = parseIdentifierOrPattern(); } - node.initializer = parseInitializer(/*inParameter*/ false); + node.initializer = parseBindingElementInitializer(/*inParameter*/ false); return finishNode(node); } @@ -3976,8 +4093,10 @@ module ts { parseExpected(SyntaxKind.FunctionKeyword); node.asteriskToken = parseOptionalToken(SyntaxKind.AsteriskToken); node.name = node.flags & NodeFlags.Default ? parseOptionalIdentifier() : parseIdentifier(); - fillSignature(SyntaxKind.ColonToken, /*yieldAndGeneratorParameterContext:*/ !!node.asteriskToken, /*requireCompleteParameterList:*/ false, node); - node.body = parseFunctionBlockOrSemicolon(!!node.asteriskToken, Diagnostics.or_expected); + let isGenerator = node.asteriskToken != undefined; + let isAsync = isAsyncFunctionLike(node); + fillSignature(SyntaxKind.ColonToken, /*yieldAndGeneratorParameterContext*/ isGenerator, /*awaitAndAsyncParameterContext*/ isAsync, /*requireCompleteParameterList:*/ false, node); + node.body = parseFunctionBlockOrSemicolon(isGenerator, isAsync, Diagnostics.or_expected); return finishNode(node); } @@ -3986,8 +4105,8 @@ module ts { node.decorators = decorators; setModifiers(node, modifiers); parseExpected(SyntaxKind.ConstructorKeyword); - fillSignature(SyntaxKind.ColonToken, /*yieldAndGeneratorParameterContext:*/ false, /*requireCompleteParameterList:*/ false, node); - node.body = parseFunctionBlockOrSemicolon(/*isGenerator:*/ false, Diagnostics.or_expected); + fillSignature(SyntaxKind.ColonToken, /*yieldAndGeneratorParameterContext*/ false, /*awaitAndAsyncParameterContext*/ false, /*requireCompleteParameterList*/ false, node); + node.body = parseFunctionBlockOrSemicolon(/*isGenerator*/ false, /*isAsync*/ false, Diagnostics.or_expected); return finishNode(node); } @@ -3998,8 +4117,10 @@ module ts { method.asteriskToken = asteriskToken; method.name = name; method.questionToken = questionToken; - fillSignature(SyntaxKind.ColonToken, /*yieldAndGeneratorParameterContext:*/ !!asteriskToken, /*requireCompleteParameterList:*/ false, method); - method.body = parseFunctionBlockOrSemicolon(!!asteriskToken, diagnosticMessage); + let isGenerator = asteriskToken != undefined; + let isAsync = isAsyncFunctionLike(method); + fillSignature(SyntaxKind.ColonToken, /*yieldAndGeneratorParameterContext:*/ isGenerator, /*awaitAndAsyncParameterContext*/ isAsync, /*requireCompleteParameterList:*/ false, method); + method.body = parseFunctionBlockOrSemicolon(isGenerator, isAsync, diagnosticMessage); return finishNode(method); } @@ -4039,8 +4160,8 @@ module ts { node.decorators = decorators; setModifiers(node, modifiers); node.name = parsePropertyName(); - fillSignature(SyntaxKind.ColonToken, /*yieldAndGeneratorParameterContext:*/ false, /*requireCompleteParameterList:*/ false, node); - node.body = parseFunctionBlockOrSemicolon(/*isGenerator:*/ false); + fillSignature(SyntaxKind.ColonToken, /*yieldAndGeneratorParameterContext*/ false, /*awaitAndAsyncParameterContext*/ false, /*requireCompleteParameterList*/ false, node); + node.body = parseFunctionBlockOrSemicolon(/*isGenerator*/ false, /*isAsync*/ false); return finishNode(node); } @@ -4147,14 +4268,14 @@ module ts { return decorators; } - function parseModifiers(): ModifiersArray { + function parseModifiers(isArrowFunction?: boolean): ModifiersArray { let flags = 0; let modifiers: ModifiersArray; while (true) { let modifierStart = scanner.getStartPos(); let modifierKind = token; - if (!parseAnyContextualModifier()) { + if (!parseAnyContextualModifier(isArrowFunction)) { break; } @@ -4228,7 +4349,7 @@ module ts { function parseClassDeclaration(fullStart: number, decorators: NodeArray, modifiers: ModifiersArray): ClassDeclaration { return parseClassDeclarationOrExpression(fullStart, decorators, modifiers, SyntaxKind.ClassDeclaration); } - + function parseClassDeclarationOrExpression(fullStart: number, decorators: NodeArray, modifiers: ModifiersArray, kind: SyntaxKind): ClassLikeDeclaration { // In ES6 specification, All parts of a ClassDeclaration or a ClassExpression are strict mode code let savedStrictModeContext = inStrictModeContext(); @@ -4243,13 +4364,15 @@ module ts { node.heritageClauses = parseHeritageClauses(/*isClassHeritageClause:*/ true); if (parseExpected(SyntaxKind.OpenBraceToken)) { - // ClassTail[Yield,GeneratorParameter] : See 14.5 - // [~GeneratorParameter]ClassHeritage[?Yield]opt { ClassBody[?Yield]opt } + // ClassTail[Yield,GeneratorParameter,Await,AsyncParameter] : (Modified) See 14.5 + // [~GeneratorParameter,~AsyncParameter]ClassHeritage[?Yield,?Await]opt { ClassBody[?Yield,?Await]opt } // [+GeneratorParameter] ClassHeritageopt { ClassBodyopt } - - node.members = inGeneratorParameterContext() - ? doOutsideOfYieldContext(parseClassMembers) + // [+AsyncParameter] ClassHeritageopt { ClassBodyopt } + + node.members = inGeneratorParameterOrAsyncParameterContext() + ? doOutsideOfYieldAndAwaitContext(parseClassMembers) : parseClassMembers(); + parseExpected(SyntaxKind.CloseBraceToken); } else { @@ -4262,13 +4385,14 @@ module ts { } function parseHeritageClauses(isClassHeritageClause: boolean): NodeArray { - // ClassTail[Yield,GeneratorParameter] : See 14.5 - // [~GeneratorParameter]ClassHeritage[?Yield]opt { ClassBody[?Yield]opt } + // ClassTail[Yield,GeneratorParameter,Await,AsyncParameter] : (Modified) See 14.5 + // [~GeneratorParameter,~AsyncParameter]ClassHeritage[?Yield,?Await]opt { ClassBody[?Yield,?Await]opt } // [+GeneratorParameter] ClassHeritageopt { ClassBodyopt } + // [+AsyncParameter] ClassHeritageopt { ClassBodyopt } if (isHeritageClause()) { - return isClassHeritageClause && inGeneratorParameterContext() - ? doOutsideOfYieldContext(parseHeritageClausesWorker) + return isClassHeritageClause && inGeneratorParameterOrAsyncParameterContext() + ? doOutsideOfYieldAndAwaitContext(parseHeritageClausesWorker) : parseHeritageClausesWorker(); } @@ -4652,6 +4776,11 @@ module ts { case SyntaxKind.StaticKeyword: // Check for modifier on source element return lookAhead(nextTokenIsDeclarationStart); + + case SyntaxKind.AsyncKeyword: + // Check for modifier on source element + return lookAhead(nextTokenIsDeclarationStartOnSameLine); + case SyntaxKind.AtToken: // a lookahead here is too costly, and decorators are only valid on a declaration. // We will assume we are parsing a declaration here and report an error later @@ -4690,6 +4819,16 @@ module ts { return isDeclarationStart(/*followsModifier*/ true); } + function nextTokenIsDeclarationStartOnSameLine() { + nextToken(); + return !scanner.hasPrecedingLineBreak() && isDeclarationStart(); + } + + function nextTokenIsFunctionKeywordOnSameLine() { + nextToken(); + return !scanner.hasPrecedingLineBreak() && token === SyntaxKind.FunctionKeyword; + } + function nextTokenIsAsKeyword() { return nextToken() === SyntaxKind.AsKeyword; } diff --git a/src/compiler/scanner.ts b/src/compiler/scanner.ts index 1fc8bff92e677..2dc85174cd913 100644 --- a/src/compiler/scanner.ts +++ b/src/compiler/scanner.ts @@ -101,6 +101,8 @@ module ts { "while": SyntaxKind.WhileKeyword, "with": SyntaxKind.WithKeyword, "yield": SyntaxKind.YieldKeyword, + "async": SyntaxKind.AsyncKeyword, + "await": SyntaxKind.AwaitKeyword, "of": SyntaxKind.OfKeyword, "{": SyntaxKind.OpenBraceToken, "}": SyntaxKind.CloseBraceToken, diff --git a/src/compiler/types.ts b/src/compiler/types.ts index 86e680ca8b047..b23b46bc9bddf 100644 --- a/src/compiler/types.ts +++ b/src/compiler/types.ts @@ -133,6 +133,8 @@ module ts { // Contextual keywords AsKeyword, AnyKeyword, + AsyncKeyword, + AwaitKeyword, BooleanKeyword, ConstructorKeyword, DeclareKeyword, @@ -197,6 +199,7 @@ module ts { DeleteExpression, TypeOfExpression, VoidExpression, + AwaitExpression, PrefixUnaryExpression, PostfixUnaryExpression, BinaryExpression, @@ -316,8 +319,9 @@ module ts { OctalLiteral = 0x00004000, // Octal numeric literal Namespace = 0x00008000, // Namespace declaration ExportContext = 0x00010000, // Export context (initialized by binding) + Async = 0x00020000, // Property/Method/Function - Modifier = Export | Ambient | Public | Private | Protected | Static | Default, + Modifier = Export | Ambient | Public | Private | Protected | Static | Default | Async, AccessibilityModifier = Public | Private | Protected, BlockScoped = Let | Const } @@ -345,17 +349,29 @@ module ts { // error. ThisNodeHasError = 1 << 5, + // If this node was parsed in the parameters of an async function. + AsyncParameter = 1 << 6, + + // If this node was parsed in the 'await' context created when parsing an async function. + Await = 1 << 7, + // Context flags set directly by the parser. - ParserGeneratedFlags = StrictMode | DisallowIn | Yield | GeneratorParameter | Decorator | ThisNodeHasError, + ParserGeneratedFlags = StrictMode | DisallowIn | Yield | GeneratorParameter | Decorator | ThisNodeHasError | AsyncParameter | Await, + // Context flags passed as part of the modified ES6 grammar. + ContextParameterFlags = Yield | GeneratorParameter | AsyncParameter | Await, + // Context flags computed by aggregating child flags upwards. // Used during incremental parsing to determine if this node or any of its children had an // error. Computed only once and then cached. - ThisNodeOrAnySubNodesHasError = 1 << 6, + ThisNodeOrAnySubNodesHasError = 1 << 8, + + // Used to know if we've computed whether any children of this node are or contain an 'await' or 'yield' expression. + ThisNodeOrAnySubNodesHasAwaitOrYield = 1 << 9, // Used to know if we've computed data from children and cached it in this node. - HasAggregatedChildData = 1 << 7 + HasAggregatedChildData = 1 << 10 } /* @internal */ @@ -658,6 +674,10 @@ module ts { expression: UnaryExpression; } + export interface AwaitExpression extends UnaryExpression { + expression: UnaryExpression; + } + export interface YieldExpression extends Expression { asteriskToken?: Node; expression: Expression; @@ -1403,22 +1423,28 @@ module ts { TypeChecked = 0x00000001, // Node has been type checked LexicalThis = 0x00000002, // Lexical 'this' reference CaptureThis = 0x00000004, // Lexical 'this' used in body - EmitExtends = 0x00000008, // Emit __extends - SuperInstance = 0x00000010, // Instance 'super' reference - SuperStatic = 0x00000020, // Static 'super' reference - ContextChecked = 0x00000040, // Contextual types have been assigned + LexicalArguments = 0x00000008, // Lexical 'arguments' reference + CaptureArguments = 0x00000010, // Lexical 'arguments' used in body + EmitExtends = 0x00000020, // Emit __extends + EmitDecorate = 0x00000040, // Emit __decorate + EmitParam = 0x00000080, // Emit __param helper for decorators + EmitAwaiter = 0x00000100, // Emit __awaiter + EmitGenerator = 0x00000200, // Emit __generator + SuperInstance = 0x00000400, // Instance 'super' reference + SuperStatic = 0x00000800, // Static 'super' reference + ContextChecked = 0x00001000, // Contextual types have been assigned + PromiseCollision = 0x00002000, // Declaration collides with the global 'Promise' // Values for enum members have been computed, and any errors have been reported for them. - EnumValuesComputed = 0x00000080, - BlockScopedBindingInLoop = 0x00000100, - EmitDecorate = 0x00000200, // Emit __decorate - EmitParam = 0x00000400, // Emit __param helper for decorators - LexicalModuleMergesWithClass = 0x00000800, // Instantiated lexical module declaration is merged with a previous class declaration. + EnumValuesComputed = 0x00004000, + BlockScopedBindingInLoop = 0x00008000, + LexicalModuleMergesWithClass= 0x00010000, // Instantiated lexical module declaration is merged with a previous class declaration. } /* @internal */ export interface NodeLinks { resolvedType?: Type; // Cached type of type node + resolvedAwaitedType?: Type; // Cached awaited type of type node resolvedSignature?: Signature; // Cached signature of signature node or call expression resolvedSymbol?: Symbol; // Cached name resolution result flags?: NodeCheckFlags; // Set of flags specific to Node diff --git a/src/compiler/utilities.ts b/src/compiler/utilities.ts index 3e825c6802c79..e5856077edcea 100644 --- a/src/compiler/utilities.ts +++ b/src/compiler/utilities.ts @@ -511,6 +511,19 @@ module ts { } } + export function getContainingParameter(node: Node): ParameterDeclaration { + while (true) { + node = node.parent; + if (!node || isFunctionLike(node)) { + return undefined; + } + + if (node.kind === SyntaxKind.Parameter) { + return node; + } + } + } + export function getThisContainer(node: Node, includeArrowFunctions: boolean): Node { while (true) { node = node.parent; @@ -1087,6 +1100,10 @@ module ts { return SyntaxKind.FirstTriviaToken <= token && token <= SyntaxKind.LastTriviaToken; } + export function isAsyncFunctionLike(node: Node): boolean { + return isFunctionLike(node) && !isAccessor(node) && (node.flags & NodeFlags.Async) === NodeFlags.Async; + } + /** * A declaration has a dynamic name if both of the following are true: * 1. The declaration has a computed property name @@ -1145,6 +1162,7 @@ module ts { case SyntaxKind.DeclareKeyword: case SyntaxKind.ConstKeyword: case SyntaxKind.DefaultKeyword: + case SyntaxKind.AsyncKeyword: return true; } return false; @@ -1630,6 +1648,7 @@ module ts { case SyntaxKind.DeclareKeyword: return NodeFlags.Ambient; case SyntaxKind.ConstKeyword: return NodeFlags.Const; case SyntaxKind.DefaultKeyword: return NodeFlags.Default; + case SyntaxKind.AsyncKeyword: return NodeFlags.Async; } return 0; } diff --git a/src/lib/core.d.ts b/src/lib/core.d.ts index c03ab344ab2fe..0405774d99d52 100644 --- a/src/lib/core.d.ts +++ b/src/lib/core.d.ts @@ -1169,3 +1169,15 @@ declare type ClassDecorator = (target: TFunction) => declare type PropertyDecorator = (target: Object, propertyKey: string | symbol) => void; declare type MethodDecorator = (target: Object, propertyKey: string | symbol, descriptor: TypedPropertyDescriptor) => TypedPropertyDescriptor | void; declare type ParameterDecorator = (target: Object, propertyKey: string | symbol, parameterIndex: number) => void; + +declare type PromiseConstructorLike = new (executor: (resolve: (value?: T | PromiseLike) => void, reject: (reason?: any) => void) => void) => PromiseLike; + +interface PromiseLike { + /** + * Attaches callbacks for the resolution and/or rejection of the Promise. + * @param onfulfilled The callback to execute when the Promise is resolved. + * @param onrejected The callback to execute when the Promise is rejected. + * @returns A Promise for the completion of which ever callback is executed. + */ + then(onfulfilled?: (value: T) => TResult | PromiseLike, onrejected?: (reason: any) => TResult | PromiseLike): PromiseLike; +} \ No newline at end of file diff --git a/src/lib/es6.d.ts b/src/lib/es6.d.ts index fb0c64f849522..ff3c517fe4599 100644 --- a/src/lib/es6.d.ts +++ b/src/lib/es6.d.ts @@ -3572,16 +3572,6 @@ declare module Reflect { function setPrototypeOf(target: any, proto: any): boolean; } -interface PromiseLike { - /** - * Attaches callbacks for the resolution and/or rejection of the Promise. - * @param onfulfilled The callback to execute when the Promise is resolved. - * @param onrejected The callback to execute when the Promise is rejected. - * @returns A Promise for the completion of which ever callback is executed. - */ - then(onfulfilled?: (value: T) => TResult | PromiseLike, onrejected?: (reason: any) => TResult | PromiseLike): PromiseLike; -} - /** * Represents the completion of an asynchronous operation */ From e82e8419c275325fab6e6e40abce980a5b4fcfca Mon Sep 17 00:00:00 2001 From: Ron Buckton Date: Wed, 6 May 2015 17:33:58 -0700 Subject: [PATCH 02/35] Added emit for async functions in ES6 --- src/compiler/checker.ts | 139 +++----- .../diagnosticInformationMap.generated.ts | 3 +- src/compiler/diagnosticMessages.json | 6 +- src/compiler/emitter.ts | 144 +++++++- src/compiler/parser.ts | 23 +- src/compiler/types.ts | 28 +- src/compiler/utilities.ts | 2 +- .../FunctionDeclaration10_es6.errors.txt | 20 +- .../FunctionDeclaration6_es6.errors.txt | 4 +- .../FunctionDeclaration7_es6.errors.txt | 4 +- .../YieldExpression12_es6.errors.txt | 4 +- .../YieldExpression14_es6.errors.txt | 4 +- .../YieldExpression15_es6.errors.txt | 4 +- .../YieldExpression16_es6.errors.txt | 4 +- .../YieldExpression17_es6.errors.txt | 4 +- .../YieldExpression18_es6.errors.txt | 4 +- .../reference/YieldExpression2_es6.errors.txt | 4 +- .../reference/arrayLiterals2ES6.symbols | 6 +- .../asyncArrowFunction10_es6.errors.txt | 24 ++ .../reference/asyncArrowFunction10_es6.js | 13 + .../reference/asyncArrowFunction1_es6.js | 8 + .../reference/asyncArrowFunction1_es6.symbols | 7 + .../reference/asyncArrowFunction1_es6.types | 8 + .../reference/asyncArrowFunction2_es6.js | 7 + .../reference/asyncArrowFunction2_es6.symbols | 5 + .../reference/asyncArrowFunction2_es6.types | 6 + .../asyncArrowFunction3_es6.errors.txt | 8 + .../reference/asyncArrowFunction3_es6.js | 7 + .../reference/asyncArrowFunction4_es6.js | 7 + .../reference/asyncArrowFunction4_es6.symbols | 4 + .../reference/asyncArrowFunction4_es6.types | 5 + .../asyncArrowFunction5_es6.errors.txt | 24 ++ .../reference/asyncArrowFunction5_es6.js | 9 + .../asyncArrowFunction6_es6.errors.txt | 9 + .../reference/asyncArrowFunction6_es6.js | 8 + .../asyncArrowFunction7_es6.errors.txt | 12 + .../reference/asyncArrowFunction7_es6.js | 14 + .../asyncArrowFunction8_es6.errors.txt | 10 + .../reference/asyncArrowFunction8_es6.js | 10 + .../asyncArrowFunction9_es6.errors.txt | 23 ++ .../reference/asyncArrowFunction9_es6.js | 8 + ...owFunctionCapturesArguments_es6.errors.txt | 13 + ...asyncArrowFunctionCapturesArguments_es6.js | 16 + .../asyncArrowFunctionCapturesThis_es6.js | 14 + ...asyncArrowFunctionCapturesThis_es6.symbols | 13 + .../asyncArrowFunctionCapturesThis_es6.types | 14 + .../reference/asyncClass_es6.errors.txt | 8 + tests/baselines/reference/asyncClass_es6.js | 7 + .../reference/asyncConstructor_es6.errors.txt | 10 + .../reference/asyncConstructor_es6.js | 11 + .../reference/asyncDeclare_es6.errors.txt | 7 + tests/baselines/reference/asyncDeclare_es6.js | 4 + .../reference/asyncEnum_es6.errors.txt | 9 + tests/baselines/reference/asyncEnum_es6.js | 10 + .../asyncFunctionDeclaration10_es6.errors.txt | 26 ++ .../asyncFunctionDeclaration10_es6.js | 7 + .../asyncFunctionDeclaration11_es6.js | 9 + .../asyncFunctionDeclaration11_es6.symbols | 5 + .../asyncFunctionDeclaration11_es6.types | 5 + .../asyncFunctionDeclaration12_es6.errors.txt | 16 + .../asyncFunctionDeclaration12_es6.js | 5 + .../asyncFunctionDeclaration13_es6.errors.txt | 11 + .../asyncFunctionDeclaration13_es6.js | 14 + .../asyncFunctionDeclaration14_es6.js | 11 + .../asyncFunctionDeclaration14_es6.symbols | 7 + .../asyncFunctionDeclaration14_es6.types | 7 + .../asyncFunctionDeclaration1_es6.js | 9 + .../asyncFunctionDeclaration1_es6.symbols | 5 + .../asyncFunctionDeclaration1_es6.types | 5 + .../asyncFunctionDeclaration2_es6.js | 7 + .../asyncFunctionDeclaration2_es6.symbols | 5 + .../asyncFunctionDeclaration2_es6.types | 5 + .../asyncFunctionDeclaration3_es6.errors.txt | 8 + .../asyncFunctionDeclaration3_es6.js | 7 + .../asyncFunctionDeclaration4_es6.js | 7 + .../asyncFunctionDeclaration4_es6.symbols | 4 + .../asyncFunctionDeclaration4_es6.types | 4 + .../asyncFunctionDeclaration5_es6.errors.txt | 20 ++ .../asyncFunctionDeclaration5_es6.js | 7 + .../asyncFunctionDeclaration6_es6.errors.txt | 8 + .../asyncFunctionDeclaration6_es6.js | 9 + .../asyncFunctionDeclaration7_es6.errors.txt | 11 + .../asyncFunctionDeclaration7_es6.js | 17 + .../asyncFunctionDeclaration8_es6.errors.txt | 10 + .../asyncFunctionDeclaration8_es6.js | 5 + .../asyncFunctionDeclaration9_es6.errors.txt | 9 + .../asyncFunctionDeclaration9_es6.js | 11 + .../reference/asyncGetter_es6.errors.txt | 13 + tests/baselines/reference/asyncGetter_es6.js | 11 + .../reference/asyncInterface_es6.errors.txt | 8 + .../baselines/reference/asyncInterface_es6.js | 5 + .../reference/asyncModule_es6.errors.txt | 8 + tests/baselines/reference/asyncModule_es6.js | 5 + .../reference/asyncSetter_es6.errors.txt | 10 + tests/baselines/reference/asyncSetter_es6.js | 11 + .../reference/awaitBinaryExpression1_es6.js | 17 + .../awaitBinaryExpression1_es6.symbols | 19 + .../awaitBinaryExpression1_es6.types | 24 ++ .../reference/awaitBinaryExpression2_es6.js | 17 + .../awaitBinaryExpression2_es6.symbols | 19 + .../awaitBinaryExpression2_es6.types | 24 ++ .../reference/awaitBinaryExpression3_es6.js | 17 + .../awaitBinaryExpression3_es6.symbols | 19 + .../awaitBinaryExpression3_es6.types | 24 ++ .../reference/awaitBinaryExpression4_es6.js | 17 + .../awaitBinaryExpression4_es6.symbols | 19 + .../awaitBinaryExpression4_es6.types | 23 ++ .../reference/awaitBinaryExpression5_es6.js | 19 + .../awaitBinaryExpression5_es6.symbols | 24 ++ .../awaitBinaryExpression5_es6.types | 29 ++ .../reference/awaitCallExpression1_es6.js | 21 ++ .../awaitCallExpression1_es6.symbols | 50 +++ .../reference/awaitCallExpression1_es6.types | 54 +++ .../reference/awaitCallExpression2_es6.js | 21 ++ .../awaitCallExpression2_es6.symbols | 49 +++ .../reference/awaitCallExpression2_es6.types | 54 +++ .../reference/awaitCallExpression3_es6.js | 21 ++ .../awaitCallExpression3_es6.symbols | 49 +++ .../reference/awaitCallExpression3_es6.types | 54 +++ .../reference/awaitCallExpression4_es6.js | 21 ++ .../awaitCallExpression4_es6.symbols | 49 +++ .../reference/awaitCallExpression4_es6.types | 55 +++ .../reference/awaitCallExpression5_es6.js | 21 ++ .../awaitCallExpression5_es6.symbols | 52 +++ .../reference/awaitCallExpression5_es6.types | 56 +++ .../reference/awaitCallExpression6_es6.js | 21 ++ .../awaitCallExpression6_es6.symbols | 51 +++ .../reference/awaitCallExpression6_es6.types | 56 +++ .../reference/awaitCallExpression7_es6.js | 21 ++ .../awaitCallExpression7_es6.symbols | 51 +++ .../reference/awaitCallExpression7_es6.types | 56 +++ .../reference/awaitCallExpression8_es6.js | 21 ++ .../awaitCallExpression8_es6.symbols | 51 +++ .../reference/awaitCallExpression8_es6.types | 57 +++ .../reference/callWithSpreadES6.symbols | 2 +- ...tructuringParameterDeclaration3ES5.symbols | 16 +- ...tructuringParameterDeclaration3ES6.symbols | 16 +- ...owFunctionWhenUsingArguments14_ES6.symbols | 2 +- ...owFunctionWhenUsingArguments15_ES6.symbols | 2 +- ...owFunctionWhenUsingArguments16_ES6.symbols | 2 +- ...owFunctionWhenUsingArguments17_ES6.symbols | 2 +- ...owFunctionWhenUsingArguments18_ES6.symbols | 2 +- tests/baselines/reference/for-of13.symbols | 4 +- tests/baselines/reference/for-of18.symbols | 6 +- tests/baselines/reference/for-of19.symbols | 6 +- tests/baselines/reference/for-of20.symbols | 6 +- tests/baselines/reference/for-of21.symbols | 6 +- tests/baselines/reference/for-of22.symbols | 6 +- tests/baselines/reference/for-of23.symbols | 6 +- tests/baselines/reference/for-of25.symbols | 6 +- tests/baselines/reference/for-of26.symbols | 6 +- tests/baselines/reference/for-of27.symbols | 6 +- tests/baselines/reference/for-of28.symbols | 6 +- tests/baselines/reference/for-of37.symbols | 2 +- tests/baselines/reference/for-of38.symbols | 2 +- tests/baselines/reference/for-of40.symbols | 2 +- tests/baselines/reference/for-of44.symbols | 2 +- tests/baselines/reference/for-of45.symbols | 2 +- tests/baselines/reference/for-of50.symbols | 2 +- tests/baselines/reference/for-of57.symbols | 2 +- .../reference/iterableArrayPattern1.symbols | 8 +- .../reference/iterableArrayPattern11.symbols | 6 +- .../reference/iterableArrayPattern12.symbols | 6 +- .../reference/iterableArrayPattern13.symbols | 6 +- .../reference/iterableArrayPattern2.symbols | 8 +- .../reference/iterableArrayPattern3.symbols | 6 +- .../reference/iterableArrayPattern30.symbols | 2 +- .../reference/iterableArrayPattern4.symbols | 6 +- .../reference/iterableArrayPattern9.symbols | 6 +- .../iterableContextualTyping1.symbols | 2 +- .../reference/iteratorSpreadInArray.symbols | 8 +- .../reference/iteratorSpreadInArray11.symbols | 2 +- .../reference/iteratorSpreadInArray2.symbols | 14 +- .../reference/iteratorSpreadInArray3.symbols | 8 +- .../reference/iteratorSpreadInArray4.symbols | 8 +- .../reference/iteratorSpreadInArray7.symbols | 8 +- .../reference/iteratorSpreadInCall11.symbols | 8 +- .../reference/iteratorSpreadInCall12.symbols | 14 +- .../reference/iteratorSpreadInCall3.symbols | 8 +- .../reference/iteratorSpreadInCall5.symbols | 14 +- .../reference/parserSymbolProperty1.symbols | 6 +- .../reference/parserSymbolProperty2.symbols | 6 +- .../reference/parserSymbolProperty3.symbols | 6 +- .../reference/parserSymbolProperty4.symbols | 6 +- .../reference/parserSymbolProperty5.symbols | 6 +- .../reference/parserSymbolProperty6.symbols | 6 +- .../reference/parserSymbolProperty7.symbols | 6 +- .../reference/parserSymbolProperty8.symbols | 6 +- .../reference/parserSymbolProperty9.symbols | 6 +- .../reference/symbolDeclarationEmit1.symbols | 6 +- .../reference/symbolDeclarationEmit10.symbols | 12 +- .../reference/symbolDeclarationEmit11.symbols | 24 +- .../reference/symbolDeclarationEmit13.symbols | 12 +- .../reference/symbolDeclarationEmit14.symbols | 12 +- .../reference/symbolDeclarationEmit2.symbols | 6 +- .../reference/symbolDeclarationEmit3.symbols | 18 +- .../reference/symbolDeclarationEmit4.symbols | 12 +- .../reference/symbolDeclarationEmit5.symbols | 6 +- .../reference/symbolDeclarationEmit6.symbols | 6 +- .../reference/symbolDeclarationEmit7.symbols | 6 +- .../reference/symbolDeclarationEmit8.symbols | 6 +- .../reference/symbolDeclarationEmit9.symbols | 6 +- .../reference/symbolProperty11.symbols | 6 +- .../reference/symbolProperty13.symbols | 12 +- .../reference/symbolProperty14.symbols | 12 +- .../reference/symbolProperty15.symbols | 6 +- .../reference/symbolProperty16.symbols | 12 +- .../reference/symbolProperty18.symbols | 36 +- .../reference/symbolProperty19.symbols | 24 +- .../reference/symbolProperty2.symbols | 2 +- .../reference/symbolProperty20.symbols | 24 +- .../reference/symbolProperty21.symbols | 30 +- .../reference/symbolProperty22.symbols | 12 +- .../reference/symbolProperty23.symbols | 12 +- .../reference/symbolProperty26.symbols | 12 +- .../reference/symbolProperty27.symbols | 12 +- .../reference/symbolProperty28.symbols | 12 +- .../reference/symbolProperty4.symbols | 6 +- .../reference/symbolProperty40.symbols | 30 +- .../reference/symbolProperty41.symbols | 30 +- .../reference/symbolProperty45.symbols | 12 +- .../reference/symbolProperty5.symbols | 18 +- .../reference/symbolProperty50.symbols | 6 +- .../reference/symbolProperty51.symbols | 6 +- .../reference/symbolProperty55.symbols | 12 +- .../reference/symbolProperty56.symbols | 6 +- .../reference/symbolProperty57.symbols | 8 +- .../reference/symbolProperty6.symbols | 24 +- .../reference/symbolProperty8.symbols | 12 +- .../baselines/reference/symbolType11.symbols | 6 +- .../baselines/reference/symbolType16.symbols | 2 +- ...teStringWithEmbeddedNewOperatorES6.symbols | 2 +- tests/baselines/reference/typedArrays.symbols | 330 +++++++++--------- .../asyncArrowFunction10_es6.ts | 7 + .../asyncArrowFunction1_es6.ts | 5 + .../asyncArrowFunction2_es6.ts | 4 + .../asyncArrowFunction3_es6.ts | 4 + .../asyncArrowFunction4_es6.ts | 4 + .../asyncArrowFunction5_es6.ts | 5 + .../asyncArrowFunction6_es6.ts | 5 + .../asyncArrowFunction7_es6.ts | 8 + .../asyncArrowFunction8_es6.ts | 6 + .../asyncArrowFunction9_es6.ts | 4 + ...asyncArrowFunctionCapturesArguments_es6.ts | 8 + .../asyncArrowFunctionCapturesThis_es6.ts | 7 + .../conformance/async/es6/asyncClass_es6.ts | 4 + .../async/es6/asyncConstructor_es6.ts | 6 + .../conformance/async/es6/asyncDeclare_es6.ts | 3 + .../conformance/async/es6/asyncEnum_es6.ts | 5 + .../conformance/async/es6/asyncGetter_es6.ts | 6 + .../async/es6/asyncInterface_es6.ts | 4 + .../conformance/async/es6/asyncModule_es6.ts | 4 + .../conformance/async/es6/asyncSetter_es6.ts | 6 + .../awaitBinaryExpression1_es6.ts | 9 + .../awaitBinaryExpression2_es6.ts | 9 + .../awaitBinaryExpression3_es6.ts | 9 + .../awaitBinaryExpression4_es6.ts | 9 + .../awaitBinaryExpression5_es6.ts | 10 + .../awaitCallExpression1_es6.ts | 13 + .../awaitCallExpression2_es6.ts | 13 + .../awaitCallExpression3_es6.ts | 13 + .../awaitCallExpression4_es6.ts | 13 + .../awaitCallExpression5_es6.ts | 13 + .../awaitCallExpression6_es6.ts | 13 + .../awaitCallExpression7_es6.ts | 13 + .../awaitCallExpression8_es6.ts | 13 + .../asyncFunctionDeclaration10_es6.ts | 4 + .../asyncFunctionDeclaration11_es6.ts | 4 + .../asyncFunctionDeclaration12_es6.ts | 3 + .../asyncFunctionDeclaration13_es6.ts | 6 + .../asyncFunctionDeclaration14_es6.ts | 5 + .../asyncFunctionDeclaration1_es6.ts | 4 + .../asyncFunctionDeclaration2_es6.ts | 4 + .../asyncFunctionDeclaration3_es6.ts | 4 + .../asyncFunctionDeclaration4_es6.ts | 4 + .../asyncFunctionDeclaration5_es6.ts | 4 + .../asyncFunctionDeclaration6_es6.ts | 4 + .../asyncFunctionDeclaration7_es6.ts | 7 + .../asyncFunctionDeclaration8_es6.ts | 3 + .../asyncFunctionDeclaration9_es6.ts | 5 + 280 files changed, 3208 insertions(+), 767 deletions(-) create mode 100644 tests/baselines/reference/asyncArrowFunction10_es6.errors.txt create mode 100644 tests/baselines/reference/asyncArrowFunction10_es6.js create mode 100644 tests/baselines/reference/asyncArrowFunction1_es6.js create mode 100644 tests/baselines/reference/asyncArrowFunction1_es6.symbols create mode 100644 tests/baselines/reference/asyncArrowFunction1_es6.types create mode 100644 tests/baselines/reference/asyncArrowFunction2_es6.js create mode 100644 tests/baselines/reference/asyncArrowFunction2_es6.symbols create mode 100644 tests/baselines/reference/asyncArrowFunction2_es6.types create mode 100644 tests/baselines/reference/asyncArrowFunction3_es6.errors.txt create mode 100644 tests/baselines/reference/asyncArrowFunction3_es6.js create mode 100644 tests/baselines/reference/asyncArrowFunction4_es6.js create mode 100644 tests/baselines/reference/asyncArrowFunction4_es6.symbols create mode 100644 tests/baselines/reference/asyncArrowFunction4_es6.types create mode 100644 tests/baselines/reference/asyncArrowFunction5_es6.errors.txt create mode 100644 tests/baselines/reference/asyncArrowFunction5_es6.js create mode 100644 tests/baselines/reference/asyncArrowFunction6_es6.errors.txt create mode 100644 tests/baselines/reference/asyncArrowFunction6_es6.js create mode 100644 tests/baselines/reference/asyncArrowFunction7_es6.errors.txt create mode 100644 tests/baselines/reference/asyncArrowFunction7_es6.js create mode 100644 tests/baselines/reference/asyncArrowFunction8_es6.errors.txt create mode 100644 tests/baselines/reference/asyncArrowFunction8_es6.js create mode 100644 tests/baselines/reference/asyncArrowFunction9_es6.errors.txt create mode 100644 tests/baselines/reference/asyncArrowFunction9_es6.js create mode 100644 tests/baselines/reference/asyncArrowFunctionCapturesArguments_es6.errors.txt create mode 100644 tests/baselines/reference/asyncArrowFunctionCapturesArguments_es6.js create mode 100644 tests/baselines/reference/asyncArrowFunctionCapturesThis_es6.js create mode 100644 tests/baselines/reference/asyncArrowFunctionCapturesThis_es6.symbols create mode 100644 tests/baselines/reference/asyncArrowFunctionCapturesThis_es6.types create mode 100644 tests/baselines/reference/asyncClass_es6.errors.txt create mode 100644 tests/baselines/reference/asyncClass_es6.js create mode 100644 tests/baselines/reference/asyncConstructor_es6.errors.txt create mode 100644 tests/baselines/reference/asyncConstructor_es6.js create mode 100644 tests/baselines/reference/asyncDeclare_es6.errors.txt create mode 100644 tests/baselines/reference/asyncDeclare_es6.js create mode 100644 tests/baselines/reference/asyncEnum_es6.errors.txt create mode 100644 tests/baselines/reference/asyncEnum_es6.js create mode 100644 tests/baselines/reference/asyncFunctionDeclaration10_es6.errors.txt create mode 100644 tests/baselines/reference/asyncFunctionDeclaration10_es6.js create mode 100644 tests/baselines/reference/asyncFunctionDeclaration11_es6.js create mode 100644 tests/baselines/reference/asyncFunctionDeclaration11_es6.symbols create mode 100644 tests/baselines/reference/asyncFunctionDeclaration11_es6.types create mode 100644 tests/baselines/reference/asyncFunctionDeclaration12_es6.errors.txt create mode 100644 tests/baselines/reference/asyncFunctionDeclaration12_es6.js create mode 100644 tests/baselines/reference/asyncFunctionDeclaration13_es6.errors.txt create mode 100644 tests/baselines/reference/asyncFunctionDeclaration13_es6.js create mode 100644 tests/baselines/reference/asyncFunctionDeclaration14_es6.js create mode 100644 tests/baselines/reference/asyncFunctionDeclaration14_es6.symbols create mode 100644 tests/baselines/reference/asyncFunctionDeclaration14_es6.types create mode 100644 tests/baselines/reference/asyncFunctionDeclaration1_es6.js create mode 100644 tests/baselines/reference/asyncFunctionDeclaration1_es6.symbols create mode 100644 tests/baselines/reference/asyncFunctionDeclaration1_es6.types create mode 100644 tests/baselines/reference/asyncFunctionDeclaration2_es6.js create mode 100644 tests/baselines/reference/asyncFunctionDeclaration2_es6.symbols create mode 100644 tests/baselines/reference/asyncFunctionDeclaration2_es6.types create mode 100644 tests/baselines/reference/asyncFunctionDeclaration3_es6.errors.txt create mode 100644 tests/baselines/reference/asyncFunctionDeclaration3_es6.js create mode 100644 tests/baselines/reference/asyncFunctionDeclaration4_es6.js create mode 100644 tests/baselines/reference/asyncFunctionDeclaration4_es6.symbols create mode 100644 tests/baselines/reference/asyncFunctionDeclaration4_es6.types create mode 100644 tests/baselines/reference/asyncFunctionDeclaration5_es6.errors.txt create mode 100644 tests/baselines/reference/asyncFunctionDeclaration5_es6.js create mode 100644 tests/baselines/reference/asyncFunctionDeclaration6_es6.errors.txt create mode 100644 tests/baselines/reference/asyncFunctionDeclaration6_es6.js create mode 100644 tests/baselines/reference/asyncFunctionDeclaration7_es6.errors.txt create mode 100644 tests/baselines/reference/asyncFunctionDeclaration7_es6.js create mode 100644 tests/baselines/reference/asyncFunctionDeclaration8_es6.errors.txt create mode 100644 tests/baselines/reference/asyncFunctionDeclaration8_es6.js create mode 100644 tests/baselines/reference/asyncFunctionDeclaration9_es6.errors.txt create mode 100644 tests/baselines/reference/asyncFunctionDeclaration9_es6.js create mode 100644 tests/baselines/reference/asyncGetter_es6.errors.txt create mode 100644 tests/baselines/reference/asyncGetter_es6.js create mode 100644 tests/baselines/reference/asyncInterface_es6.errors.txt create mode 100644 tests/baselines/reference/asyncInterface_es6.js create mode 100644 tests/baselines/reference/asyncModule_es6.errors.txt create mode 100644 tests/baselines/reference/asyncModule_es6.js create mode 100644 tests/baselines/reference/asyncSetter_es6.errors.txt create mode 100644 tests/baselines/reference/asyncSetter_es6.js create mode 100644 tests/baselines/reference/awaitBinaryExpression1_es6.js create mode 100644 tests/baselines/reference/awaitBinaryExpression1_es6.symbols create mode 100644 tests/baselines/reference/awaitBinaryExpression1_es6.types create mode 100644 tests/baselines/reference/awaitBinaryExpression2_es6.js create mode 100644 tests/baselines/reference/awaitBinaryExpression2_es6.symbols create mode 100644 tests/baselines/reference/awaitBinaryExpression2_es6.types create mode 100644 tests/baselines/reference/awaitBinaryExpression3_es6.js create mode 100644 tests/baselines/reference/awaitBinaryExpression3_es6.symbols create mode 100644 tests/baselines/reference/awaitBinaryExpression3_es6.types create mode 100644 tests/baselines/reference/awaitBinaryExpression4_es6.js create mode 100644 tests/baselines/reference/awaitBinaryExpression4_es6.symbols create mode 100644 tests/baselines/reference/awaitBinaryExpression4_es6.types create mode 100644 tests/baselines/reference/awaitBinaryExpression5_es6.js create mode 100644 tests/baselines/reference/awaitBinaryExpression5_es6.symbols create mode 100644 tests/baselines/reference/awaitBinaryExpression5_es6.types create mode 100644 tests/baselines/reference/awaitCallExpression1_es6.js create mode 100644 tests/baselines/reference/awaitCallExpression1_es6.symbols create mode 100644 tests/baselines/reference/awaitCallExpression1_es6.types create mode 100644 tests/baselines/reference/awaitCallExpression2_es6.js create mode 100644 tests/baselines/reference/awaitCallExpression2_es6.symbols create mode 100644 tests/baselines/reference/awaitCallExpression2_es6.types create mode 100644 tests/baselines/reference/awaitCallExpression3_es6.js create mode 100644 tests/baselines/reference/awaitCallExpression3_es6.symbols create mode 100644 tests/baselines/reference/awaitCallExpression3_es6.types create mode 100644 tests/baselines/reference/awaitCallExpression4_es6.js create mode 100644 tests/baselines/reference/awaitCallExpression4_es6.symbols create mode 100644 tests/baselines/reference/awaitCallExpression4_es6.types create mode 100644 tests/baselines/reference/awaitCallExpression5_es6.js create mode 100644 tests/baselines/reference/awaitCallExpression5_es6.symbols create mode 100644 tests/baselines/reference/awaitCallExpression5_es6.types create mode 100644 tests/baselines/reference/awaitCallExpression6_es6.js create mode 100644 tests/baselines/reference/awaitCallExpression6_es6.symbols create mode 100644 tests/baselines/reference/awaitCallExpression6_es6.types create mode 100644 tests/baselines/reference/awaitCallExpression7_es6.js create mode 100644 tests/baselines/reference/awaitCallExpression7_es6.symbols create mode 100644 tests/baselines/reference/awaitCallExpression7_es6.types create mode 100644 tests/baselines/reference/awaitCallExpression8_es6.js create mode 100644 tests/baselines/reference/awaitCallExpression8_es6.symbols create mode 100644 tests/baselines/reference/awaitCallExpression8_es6.types create mode 100644 tests/cases/conformance/async/es6/asyncArrowFunction/asyncArrowFunction10_es6.ts create mode 100644 tests/cases/conformance/async/es6/asyncArrowFunction/asyncArrowFunction1_es6.ts create mode 100644 tests/cases/conformance/async/es6/asyncArrowFunction/asyncArrowFunction2_es6.ts create mode 100644 tests/cases/conformance/async/es6/asyncArrowFunction/asyncArrowFunction3_es6.ts create mode 100644 tests/cases/conformance/async/es6/asyncArrowFunction/asyncArrowFunction4_es6.ts create mode 100644 tests/cases/conformance/async/es6/asyncArrowFunction/asyncArrowFunction5_es6.ts create mode 100644 tests/cases/conformance/async/es6/asyncArrowFunction/asyncArrowFunction6_es6.ts create mode 100644 tests/cases/conformance/async/es6/asyncArrowFunction/asyncArrowFunction7_es6.ts create mode 100644 tests/cases/conformance/async/es6/asyncArrowFunction/asyncArrowFunction8_es6.ts create mode 100644 tests/cases/conformance/async/es6/asyncArrowFunction/asyncArrowFunction9_es6.ts create mode 100644 tests/cases/conformance/async/es6/asyncArrowFunction/asyncArrowFunctionCapturesArguments_es6.ts create mode 100644 tests/cases/conformance/async/es6/asyncArrowFunction/asyncArrowFunctionCapturesThis_es6.ts create mode 100644 tests/cases/conformance/async/es6/asyncClass_es6.ts create mode 100644 tests/cases/conformance/async/es6/asyncConstructor_es6.ts create mode 100644 tests/cases/conformance/async/es6/asyncDeclare_es6.ts create mode 100644 tests/cases/conformance/async/es6/asyncEnum_es6.ts create mode 100644 tests/cases/conformance/async/es6/asyncGetter_es6.ts create mode 100644 tests/cases/conformance/async/es6/asyncInterface_es6.ts create mode 100644 tests/cases/conformance/async/es6/asyncModule_es6.ts create mode 100644 tests/cases/conformance/async/es6/asyncSetter_es6.ts create mode 100644 tests/cases/conformance/async/es6/awaitBinaryExpression/awaitBinaryExpression1_es6.ts create mode 100644 tests/cases/conformance/async/es6/awaitBinaryExpression/awaitBinaryExpression2_es6.ts create mode 100644 tests/cases/conformance/async/es6/awaitBinaryExpression/awaitBinaryExpression3_es6.ts create mode 100644 tests/cases/conformance/async/es6/awaitBinaryExpression/awaitBinaryExpression4_es6.ts create mode 100644 tests/cases/conformance/async/es6/awaitBinaryExpression/awaitBinaryExpression5_es6.ts create mode 100644 tests/cases/conformance/async/es6/awaitCallExpression/awaitCallExpression1_es6.ts create mode 100644 tests/cases/conformance/async/es6/awaitCallExpression/awaitCallExpression2_es6.ts create mode 100644 tests/cases/conformance/async/es6/awaitCallExpression/awaitCallExpression3_es6.ts create mode 100644 tests/cases/conformance/async/es6/awaitCallExpression/awaitCallExpression4_es6.ts create mode 100644 tests/cases/conformance/async/es6/awaitCallExpression/awaitCallExpression5_es6.ts create mode 100644 tests/cases/conformance/async/es6/awaitCallExpression/awaitCallExpression6_es6.ts create mode 100644 tests/cases/conformance/async/es6/awaitCallExpression/awaitCallExpression7_es6.ts create mode 100644 tests/cases/conformance/async/es6/awaitCallExpression/awaitCallExpression8_es6.ts create mode 100644 tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration10_es6.ts create mode 100644 tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration11_es6.ts create mode 100644 tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration12_es6.ts create mode 100644 tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration13_es6.ts create mode 100644 tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration14_es6.ts create mode 100644 tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration1_es6.ts create mode 100644 tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration2_es6.ts create mode 100644 tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration3_es6.ts create mode 100644 tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration4_es6.ts create mode 100644 tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration5_es6.ts create mode 100644 tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration6_es6.ts create mode 100644 tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration7_es6.ts create mode 100644 tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration8_es6.ts create mode 100644 tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration9_es6.ts diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index 13f527bd9f8ca..3532c778dd1fd 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -102,7 +102,7 @@ module ts { let globalArraySymbol: Symbol; let globalESSymbolConstructorSymbol: Symbol; - let getGlobalPromiseSymbol: () => Symbol; + let getGlobalPromiseConstructorSymbol: () => Symbol; let globalObjectType: ObjectType; let globalFunctionType: ObjectType; @@ -139,7 +139,6 @@ module ts { let symbolLinks: SymbolLinks[] = []; let nodeLinks: NodeLinks[] = []; let potentialThisCollisions: Node[] = []; - var potentialArgumentsCollisions: Node[] = []; let diagnostics = createDiagnosticCollection(); @@ -5420,11 +5419,13 @@ module ts { // can explicitly bound arguments objects let container = getContainingFunction(node); if (symbol === argumentsSymbol) { - if (container.kind === SyntaxKind.ArrowFunction && languageVersion < ScriptTarget.ES6) { - error(node, Diagnostics.The_arguments_object_cannot_be_referenced_in_an_arrow_function_in_ES3_and_ES5_Consider_using_a_standard_function_expression); - } - else if (node.parserContextFlags & ParserContextFlags.Await) { - captureLexicalArguments(node, container); + if (container.kind === SyntaxKind.ArrowFunction) { + if (languageVersion < ScriptTarget.ES6) { + error(node, Diagnostics.The_arguments_object_cannot_be_referenced_in_an_arrow_function_in_ES3_and_ES5_Consider_using_a_standard_function_expression); + } + else if (node.parserContextFlags & ParserContextFlags.Await) { + error(node, Diagnostics.The_arguments_object_cannot_be_referenced_in_an_async_arrow_function_Consider_using_a_standard_async_function_expression); + } } } @@ -5434,7 +5435,6 @@ module ts { checkCollisionWithCapturedSuperVariable(node, node); checkCollisionWithCapturedThisVariable(node, node); - checkCollisionWithCapturedArgumentsVariable(node, node); checkBlockScopedBindingCapturedInLoop(node, symbol); return getNarrowedTypeOfSymbol(getExportSymbolOfValueSymbolIfExported(symbol), node); @@ -5516,10 +5516,9 @@ module ts { // When targeting es6, arrow function lexically bind "this" so we do not need to do the work of binding "this" in emitted code needToCaptureLexicalThis = (languageVersion < ScriptTarget.ES6); } - - if (node.parserContextFlags & ParserContextFlags.Await) { + else if (node.parserContextFlags & ParserContextFlags.Await) { // if 'this' is part of an async function, we will need to capture 'this' - needToCaptureLexicalThis = true; + needToCaptureLexicalThis = (languageVersion < ScriptTarget.ES6); } switch (container.kind) { @@ -5561,14 +5560,6 @@ module ts { return anyType; } - function captureLexicalArguments(node: Node, container: Node): void { - if (node.parent.kind !== SyntaxKind.Parameter) { - getNodeLinks(node).flags |= NodeCheckFlags.LexicalArguments; - } - - getNodeLinks(container).flags |= NodeCheckFlags.CaptureArguments; - } - function isInConstructorArgumentInitializer(node: Node, constructorDecl: Node): boolean { for (let n = node; n && n !== constructorDecl; n = n.parent) { if (n.kind === SyntaxKind.Parameter) { @@ -7303,7 +7294,7 @@ module ts { let widenedType = getWidenedType(type); return isAsync ? createPromiseType(widenedType, func) - : type; + : widenedType; } /// Returns a set of types relating to every return expression relating to a function block. @@ -7421,7 +7412,6 @@ module ts { if (produceDiagnostics && node.kind !== SyntaxKind.MethodDeclaration && node.kind !== SyntaxKind.MethodSignature) { checkCollisionWithCapturedSuperVariable(node, (node).name); checkCollisionWithCapturedThisVariable(node, (node).name); - checkCollisionWithCapturedArgumentsVariable(node, (node).name); } return type; @@ -7574,13 +7564,7 @@ module ts { function checkAwaitExpression(node: AwaitExpression): Type { // Grammar checking if (!(node.parserContextFlags & ParserContextFlags.Await)) { - var parameter = getContainingParameter(node); - if (parameter && parameter.parserContextFlags & ParserContextFlags.Await) { - grammarErrorAfterFirstToken(node, Diagnostics._0_expression_is_not_allowed_in_an_initializer, "await"); - } - else { - grammarErrorOnFirstToken(node, Diagnostics.await_expression_must_be_contained_within_an_async_function); - } + grammarErrorOnFirstToken(node, Diagnostics.await_expression_must_be_contained_within_an_async_function); } var operandType = checkExpression(node.expression); @@ -7994,13 +7978,7 @@ module ts { function checkYieldExpression(node: YieldExpression): void { // Grammar checking if (!(node.parserContextFlags & ParserContextFlags.Yield)) { - let parameter = getContainingParameter(node); - if (parameter && (parameter.parserContextFlags & ParserContextFlags.GeneratorParameter)) { - grammarErrorAfterFirstToken(node, Diagnostics._0_expression_is_not_allowed_in_an_initializer, "yield"); - } - else { - grammarErrorOnFirstToken(node, Diagnostics.yield_expression_must_be_contained_within_a_generator_declaration); - } + grammarErrorOnFirstToken(node, Diagnostics.yield_expression_must_be_contained_within_a_generator_declaration); } else { grammarErrorOnFirstToken(node, Diagnostics.yield_expressions_are_not_currently_supported); @@ -8907,23 +8885,25 @@ module ts { // the "promised type" of a type is the type of the "value" argument of the "onfulfilled" callback. let globalPromiseLikeType = getInstantiatedGlobalPromiseLikeType(); if (globalPromiseLikeType !== emptyObjectType && isTypeAssignableTo(type, globalPromiseLikeType)) { - let awaitedTypes: Type[] = []; let thenProp = getPropertyOfType(type, "then"); - let thenType = getTypeOfSymbol(thenProp); - let thenSignatures = getSignaturesOfType(thenType, SignatureKind.Call); - for (let thenSignature of thenSignatures) { - thenSignature = getErasedSignature(thenSignature); - let onfulfilledParameterType = getTypeAtPosition(thenSignature, 0); - let onfulfilledParameterSignatures = getSignaturesOfType(onfulfilledParameterType, SignatureKind.Call); - for (let onfulfilledParameterSignature of onfulfilledParameterSignatures) { - let valueParameterType = getTypeAtPosition(onfulfilledParameterSignature, 0); - if (valueParameterType !== type) { - awaitedTypes.push(valueParameterType); + if (thenProp) { + let awaitedTypes: Type[] = []; + let thenType = getTypeOfSymbol(thenProp); + let thenSignatures = getSignaturesOfType(thenType, SignatureKind.Call); + for (let thenSignature of thenSignatures) { + thenSignature = getErasedSignature(thenSignature); + let onfulfilledParameterType = getTypeAtPosition(thenSignature, 0); + let onfulfilledParameterSignatures = getSignaturesOfType(onfulfilledParameterType, SignatureKind.Call); + for (let onfulfilledParameterSignature of onfulfilledParameterSignatures) { + let valueParameterType = getTypeAtPosition(onfulfilledParameterSignature, 0); + if (valueParameterType !== type) { + awaitedTypes.push(valueParameterType); + } } } - } - - return getUnionType(awaitedTypes); + + return getUnionType(awaitedTypes); + } } return emptyObjectType; @@ -9142,7 +9122,6 @@ module ts { checkCollisionWithCapturedSuperVariable(node, node.name); checkCollisionWithCapturedThisVariable(node, node.name); - checkCollisionWithCapturedArgumentsVariable(node, node.name); checkCollisionWithRequireExportsInGeneratedCode(node, node.name); } } @@ -9262,12 +9241,6 @@ module ts { } } - function checkCollisionWithCapturedArgumentsVariable(node: Node, name: Identifier): void { - if (needCollisionCheckForIdentifier(node, name, "_arguments")) { - potentialArgumentsCollisions.push(node); - } - } - // this function will run after checking the source file so 'CaptureThis' is correct for all nodes function checkIfThisIsCapturedInEnclosingScope(node: Node): void { let current = node; @@ -9286,25 +9259,6 @@ module ts { } } - function checkIfArgumentsIsCapturedInEnclosingScope(node: Node): void { - let current = node; - while (current) { - if (getNodeCheckFlags(current) & NodeCheckFlags.CaptureArguments) { - let isDeclaration = node.kind !== SyntaxKind.Identifier; - if (isDeclaration) { - error((node).name, Diagnostics.Duplicate_identifier_arguments_Compiler_uses_variable_declaration_arguments_to_capture_arguments_reference); - } - else { - error(node, Diagnostics.Expression_resolves_to_variable_declaration_arguments_that_compiler_uses_to_capture_arguments_reference); - } - - return; - } - - current = current.parent; - } - } - function checkCollisionWithCapturedSuperVariable(node: Node, name: Identifier) { if (!needCollisionCheckForIdentifier(node, name, "_super")) { return; @@ -9421,15 +9375,17 @@ module ts { } function getPromiseConstructor(node: SignatureDeclaration): EntityName { - if (node.type && node.type.kind === SyntaxKind.TypeReference) { - return (node.type).typeName; - } - - let globalPromiseSymbol = getGlobalPromiseSymbol(); - if (globalPromiseSymbol && globalPromiseSymbol === resolveName(node, "Promise", SymbolFlags.Value, undefined, undefined)) { - return globalPromiseSymbol.valueDeclaration.name; + if (isAsyncFunctionLike(node)) { + let links = getNodeLinks(node); + if (!links.promiseConstructor) { + if (node.type && node.type.kind === SyntaxKind.TypeReference) { + links.promiseConstructor = (node.type).typeName; + } + } + + return links.promiseConstructor; } - + return undefined; } @@ -9550,14 +9506,8 @@ module ts { } checkCollisionWithCapturedSuperVariable(node, node.name); checkCollisionWithCapturedThisVariable(node, node.name); - checkCollisionWithCapturedArgumentsVariable(node, node.name); checkCollisionWithRequireExportsInGeneratedCode(node, node.name); } - - if (symbol === argumentsSymbol && (node.parserContextFlags & ParserContextFlags.Await)) { - let container = getContainingFunction(node); - captureLexicalArguments(node.name, container); - } } function checkVariableDeclaration(node: VariableDeclaration) { @@ -11258,7 +11208,6 @@ module ts { emitDecorate = false; emitParam = false; potentialThisCollisions.length = 0; - potentialArgumentsCollisions.length = 0; forEach(node.statements, checkSourceElement); checkFunctionExpressionBodies(node); @@ -11272,11 +11221,6 @@ module ts { potentialThisCollisions.length = 0; } - if (potentialArgumentsCollisions.length) { - forEach(potentialArgumentsCollisions, checkIfArgumentsIsCapturedInEnclosingScope); - potentialArgumentsCollisions.length = 0; - } - if (emitExtends) { links.flags |= NodeCheckFlags.EmitExtends; } @@ -12279,6 +12223,7 @@ module ts { serializeTypeOfNode, serializeParameterTypesOfNode, serializeReturnTypeOfNode, + getPromiseConstructor, }; } @@ -12313,10 +12258,10 @@ module ts { getGlobalPropertyDecoratorType = memoize(() => getGlobalType("PropertyDecorator")); getGlobalMethodDecoratorType = memoize(() => getGlobalType("MethodDecorator")); getGlobalParameterDecoratorType = memoize(() => getGlobalType("ParameterDecorator")); - getGlobalPromiseSymbol = memoize(() => getGlobalTypeSymbol("Promise")); - getGlobalPromiseType = memoize(() => getTypeOfGlobalSymbol(getGlobalPromiseSymbol(), /*arity*/ 1)); + getGlobalPromiseType = memoize(() => getGlobalType("Promise", /*arity*/ 1)); getGlobalPromiseLikeType = memoize(() => getGlobalType("PromiseLike", /*arity*/ 1)); getInstantiatedGlobalPromiseLikeType = memoize(createInstantiatedPromiseLikeType); + getGlobalPromiseConstructorSymbol = memoize(() => getGlobalValueSymbol("Promise")); getGlobalPromiseConstructorLikeType = memoize(() => getGlobalType("PromiseConstructorLike")); getGlobalThenableType = memoize(createThenableType); diff --git a/src/compiler/diagnosticInformationMap.generated.ts b/src/compiler/diagnosticInformationMap.generated.ts index 091cabb448027..39492ac534486 100644 --- a/src/compiler/diagnosticInformationMap.generated.ts +++ b/src/compiler/diagnosticInformationMap.generated.ts @@ -383,8 +383,7 @@ module ts { A_rest_element_cannot_contain_a_binding_pattern: { code: 2501, category: DiagnosticCategory.Error, key: "A rest element cannot contain a binding pattern." }, Duplicate_identifier_0_Compiler_uses_declaration_1_to_support_async_functions: { code: 2520, category: DiagnosticCategory.Error, key: "Duplicate identifier '{0}'. Compiler uses declaration '{1}' to support async functions." }, Expression_resolves_to_variable_declaration_0_that_compiler_uses_to_support_async_functions: { code: 2521, category: DiagnosticCategory.Error, key: "Expression resolves to variable declaration '{0}' that compiler uses to support async functions." }, - Duplicate_identifier_arguments_Compiler_uses_variable_declaration_arguments_to_capture_arguments_reference: { code: 2522, category: DiagnosticCategory.Error, key: "Duplicate identifier '_arguments'. Compiler uses variable declaration '_arguments' to capture 'arguments' reference." }, - Expression_resolves_to_variable_declaration_arguments_that_compiler_uses_to_capture_arguments_reference: { code: 2523, category: DiagnosticCategory.Error, key: "Expression resolves to variable declaration '_arguments' that compiler uses to capture 'arguments' reference." }, + The_arguments_object_cannot_be_referenced_in_an_async_arrow_function_Consider_using_a_standard_async_function_expression: { code: 2522, category: DiagnosticCategory.Error, key: "The 'arguments' object cannot be referenced in an async arrow function Consider using a standard async function expression." }, Import_declaration_0_is_using_private_name_1: { code: 4000, category: DiagnosticCategory.Error, key: "Import declaration '{0}' is using private name '{1}'." }, Type_parameter_0_of_exported_class_has_or_is_using_private_name_1: { code: 4002, category: DiagnosticCategory.Error, key: "Type parameter '{0}' of exported class has or is using private name '{1}'." }, Type_parameter_0_of_exported_interface_has_or_is_using_private_name_1: { code: 4004, category: DiagnosticCategory.Error, key: "Type parameter '{0}' of exported interface has or is using private name '{1}'." }, diff --git a/src/compiler/diagnosticMessages.json b/src/compiler/diagnosticMessages.json index 431aec3f5316d..874c259a3b616 100644 --- a/src/compiler/diagnosticMessages.json +++ b/src/compiler/diagnosticMessages.json @@ -1522,14 +1522,10 @@ "category": "Error", "code": 2521 }, - "Duplicate identifier '_arguments'. Compiler uses variable declaration '_arguments' to capture 'arguments' reference.": { + "The 'arguments' object cannot be referenced in an async arrow function Consider using a standard async function expression.": { "category": "Error", "code": 2522 }, - "Expression resolves to variable declaration '_arguments' that compiler uses to capture 'arguments' reference.": { - "category": "Error", - "code": 2523 - }, "Import declaration '{0}' is using private name '{1}'.": { "category": "Error", diff --git a/src/compiler/emitter.ts b/src/compiler/emitter.ts index 5a9a654ce60a7..e31989e672688 100644 --- a/src/compiler/emitter.ts +++ b/src/compiler/emitter.ts @@ -48,6 +48,21 @@ var __param = (this && this.__param) || function (paramIndex, decorator) { return function (target, key) { decorator(target, key, paramIndex); } };`; + const awaiterHelper = ` +var __awaiter = (this && this.__awaiter) || function (generator, ctor) { + function resolve(value) { return step(generator.next(value)); } + function reject(reason) { return step(generator["throw"](reason)); } + function step(result) { + while (true) { + var done = result.done, value = result.value, then; + if (done) return value; + if (value && typeof (then = value.then) === "function") return then.call(value, resolve, reject); + result = generator.next(value); + } + } + return new (ctor || Promise)(function (resolver) { resolver(resolve(undefined)); }); +}`; + let compilerOptions = host.getCompilerOptions(); let languageVersion = compilerOptions.target || ScriptTarget.ES3; let sourceMapDataList: SourceMapData[] = compilerOptions.sourceMap || compilerOptions.inlineSourceMap ? [] : undefined; @@ -131,6 +146,7 @@ var __param = (this && this.__param) || function (paramIndex, decorator) { let extendsEmitted = false; let decorateEmitted = false; let paramEmitted = false; + let awaiterEmitted = false; let tempFlags = 0; let tempVariables: Identifier[]; let tempParameters: Identifier[]; @@ -1350,6 +1366,31 @@ var __param = (this && this.__param) || function (paramIndex, decorator) { emit(node.expression); } } + + function emitAwaitExpression(node: AwaitExpression) { + let needsParenthesis = needsParenthesisForAwaitExpressionAsYield(node); + if (needsParenthesis) { + write("("); + } + write(tokenToString(SyntaxKind.YieldKeyword)); + write(" "); + emit(node.expression); + if (needsParenthesis) { + write(")"); + } + } + + function needsParenthesisForAwaitExpressionAsYield(node: AwaitExpression) { + for (let current: Node = node; isExpression(current.parent); current = current.parent) { + if (current.parent.kind === SyntaxKind.BinaryExpression) { + if ((current.parent).left === current) { + return true; + } + } + } + + return false; + } function needsParenthesisForPropertyAccessOrInvocation(node: Expression) { switch (node.kind) { @@ -3280,38 +3321,96 @@ var __param = (this && this.__param) || function (paramIndex, decorator) { emit(node.parameters[0]); return; } + emitSignatureParameters(node); } - function emitSignatureAndBody(node: FunctionLikeDeclaration) { - let saveTempFlags = tempFlags; - let saveTempVariables = tempVariables; - let saveTempParameters = tempParameters; - tempFlags = 0; - tempVariables = undefined; - tempParameters = undefined; - - // When targeting ES6, emit arrow function natively in ES6 - if (shouldEmitAsArrowFunction(node)) { - emitSignatureParametersForArrow(node); - write(" =>"); + function emitAsyncSignatureAndBodyForES6(node: FunctionLikeDeclaration) { + let promiseConstructor = resolver.getPromiseConstructor(node); + let resolve = makeUniqueName("resolve"); + let isArrowFunction = node.kind === SyntaxKind.ArrowFunction; + let args: string; + if (isArrowFunction) { + if (node.parameters.length) { + args = makeUniqueName("arguments"); + write(`(...${args}) => `); + } + else { + write("() => "); + } } else { - emitSignatureParameters(node); + args = "arguments"; + write("() {"); + increaseIndent(); + writeLine(); + write("return "); } - + + write("__awaiter(function *"); + + emitSignatureParameters(node); + emitFunctionBody(node); + write(".apply(this"); + if (args) { + write(`, ${args}`); + } + write(")"); + if (promiseConstructor) { + write(", "); + emit(promiseConstructor); + } + write(")"); + + if (!isArrowFunction) { + write(";"); + decreaseIndent(); + writeLine(); + write("}"); + } + } + + function emitFunctionBody(node: FunctionLikeDeclaration) { if (!node.body) { // There can be no body when there are parse errors. Just emit an empty block // in that case. write(" { }"); } - else if (node.body.kind === SyntaxKind.Block) { - emitBlockFunctionBody(node, node.body); + else { + if (node.body.kind === SyntaxKind.Block) { + emitBlockFunctionBody(node, node.body); + } + else { + emitExpressionFunctionBody(node, node.body); + } + } + } + + function emitSignatureAndBody(node: FunctionLikeDeclaration) { + let saveTempFlags = tempFlags; + let saveTempVariables = tempVariables; + let saveTempParameters = tempParameters; + tempFlags = 0; + tempVariables = undefined; + tempParameters = undefined; + + let isAsync = isAsyncFunctionLike(node); + if (isAsync && languageVersion === ScriptTarget.ES6) { + emitAsyncSignatureAndBodyForES6(node); } else { - emitExpressionFunctionBody(node, node.body); + // When targeting ES6, emit arrow function natively in ES6 + if (shouldEmitAsArrowFunction(node)) { + emitSignatureParametersForArrow(node); + write(" =>"); + } + else { + emitSignatureParameters(node); + } + + emitFunctionBody(node); } - + if (!isES6ExportedDeclaration(node)) { emitExportMemberAssignment(node); } @@ -3329,7 +3428,7 @@ var __param = (this && this.__param) || function (paramIndex, decorator) { } function emitExpressionFunctionBody(node: FunctionLikeDeclaration, body: Expression) { - if (languageVersion < ScriptTarget.ES6) { + if (languageVersion < ScriptTarget.ES6 || node.flags & NodeFlags.Async) { emitDownLevelExpressionFunctionBody(node, body); return; } @@ -5636,6 +5735,11 @@ var __param = (this && this.__param) || function (paramIndex, decorator) { writeLines(paramHelper); paramEmitted = true; } + + if (!awaiterEmitted && resolver.getNodeCheckFlags(node) & NodeCheckFlags.EmitAwaiter) { + writeLines(awaiterHelper); + awaiterEmitted = true; + } } if (isExternalModule(node) || compilerOptions.separateCompilation) { @@ -5806,6 +5910,8 @@ var __param = (this && this.__param) || function (paramIndex, decorator) { return emitTypeOfExpression(node); case SyntaxKind.VoidExpression: return emitVoidExpression(node); + case SyntaxKind.AwaitExpression: + return emitAwaitExpression(node); case SyntaxKind.PrefixUnaryExpression: return emitPrefixUnaryExpression(node); case SyntaxKind.PostfixUnaryExpression: diff --git a/src/compiler/parser.ts b/src/compiler/parser.ts index db9580871788f..a22ec28ecbcb7 100644 --- a/src/compiler/parser.ts +++ b/src/compiler/parser.ts @@ -568,11 +568,11 @@ module ts { } function doOutsideOfContext(context: ParserContextFlags, func: () => T): T { - let currentContextFlags = contextFlags & context; - if (currentContextFlags) { - setContextFlag(false, currentContextFlags); + let setContextFlags = context & contextFlags; + if (setContextFlags) { + setContextFlag(false, setContextFlags); let result = func(); - setContextFlag(true, currentContextFlags); + setContextFlag(true, setContextFlags); return result; } @@ -582,7 +582,7 @@ module ts { function doInsideOfContext(context: ParserContextFlags, func: () => T): T { let unsetContextFlags = context & ~contextFlags; - if (!unsetContextFlags) { + if (unsetContextFlags) { setContextFlag(true, unsetContextFlags); let result = func(); setContextFlag(false, unsetContextFlags); @@ -594,11 +594,11 @@ module ts { } function allowInAnd(func: () => T): T { - return doInsideOfContext(ParserContextFlags.DisallowIn, func); + return doOutsideOfContext(ParserContextFlags.DisallowIn, func); } function disallowInAnd(func: () => T): T { - return doOutsideOfContext(ParserContextFlags.DisallowIn, func); + return doInsideOfContext(ParserContextFlags.DisallowIn, func); } function doInYieldContext(func: () => T): T { @@ -772,6 +772,12 @@ module ts { if (token === SyntaxKind.YieldKeyword && inYieldContext()) { return false; } + + // If we have a 'await' keyword, and we're in the [Await] context, then 'await' is + // considered a keyword and is not an identifier. + if (token === SyntaxKind.AwaitKeyword && inAwaitContext()) { + return false; + } return token > SyntaxKind.LastReservedWord; } @@ -2642,12 +2648,11 @@ module ts { function tryParseParenthesizedArrowFunctionExpression(): Expression { let triState = isParenthesizedArrowFunctionExpression(); - if (triState === Tristate.False) { // It's definitely not a parenthesized arrow function expression. return undefined; } - + // If we definitely have an arrow function, then we can just parse one, not requiring a // following => or { token. Otherwise, we *might* have an arrow function. Try to parse // it out, but don't allow any ambiguity, and return 'undefined' if this could be an diff --git a/src/compiler/types.ts b/src/compiler/types.ts index b23b46bc9bddf..f256c63056f4b 100644 --- a/src/compiler/types.ts +++ b/src/compiler/types.ts @@ -1304,6 +1304,7 @@ module ts { serializeTypeOfNode(node: Node, getGeneratedNameForNode: (Node: Node) => string): string | string[]; serializeParameterTypesOfNode(node: Node, getGeneratedNameForNode: (Node: Node) => string): (string | string[])[]; serializeReturnTypeOfNode(node: Node, getGeneratedNameForNode: (Node: Node) => string): string | string[]; + getPromiseConstructor(node: SignatureDeclaration): EntityName; } export const enum SymbolFlags { @@ -1423,22 +1424,20 @@ module ts { TypeChecked = 0x00000001, // Node has been type checked LexicalThis = 0x00000002, // Lexical 'this' reference CaptureThis = 0x00000004, // Lexical 'this' used in body - LexicalArguments = 0x00000008, // Lexical 'arguments' reference - CaptureArguments = 0x00000010, // Lexical 'arguments' used in body - EmitExtends = 0x00000020, // Emit __extends - EmitDecorate = 0x00000040, // Emit __decorate - EmitParam = 0x00000080, // Emit __param helper for decorators - EmitAwaiter = 0x00000100, // Emit __awaiter - EmitGenerator = 0x00000200, // Emit __generator - SuperInstance = 0x00000400, // Instance 'super' reference - SuperStatic = 0x00000800, // Static 'super' reference - ContextChecked = 0x00001000, // Contextual types have been assigned - PromiseCollision = 0x00002000, // Declaration collides with the global 'Promise' + EmitExtends = 0x00000008, // Emit __extends + EmitDecorate = 0x00000010, // Emit __decorate + EmitParam = 0x00000020, // Emit __param helper for decorators + EmitAwaiter = 0x00000040, // Emit __awaiter + EmitGenerator = 0x00000080, // Emit __generator + SuperInstance = 0x00000100, // Instance 'super' reference + SuperStatic = 0x00000200, // Static 'super' reference + ContextChecked = 0x00000400, // Contextual types have been assigned + PromiseCollision = 0x00000800, // Declaration collides with the global 'Promise' // Values for enum members have been computed, and any errors have been reported for them. - EnumValuesComputed = 0x00004000, - BlockScopedBindingInLoop = 0x00008000, - LexicalModuleMergesWithClass= 0x00010000, // Instantiated lexical module declaration is merged with a previous class declaration. + EnumValuesComputed = 0x00001000, + BlockScopedBindingInLoop = 0x00002000, + LexicalModuleMergesWithClass= 0x00004000, // Instantiated lexical module declaration is merged with a previous class declaration. } /* @internal */ @@ -1456,6 +1455,7 @@ module ts { assignmentChecks?: Map; // Cache of assignment checks hasReportedStatementInAmbientContext?: boolean; // Cache boolean if we report statements in ambient context importOnRightSide?: Symbol; // for import declarations - import that appear on the right side + promiseConstructor?: EntityName; } export const enum TypeFlags { diff --git a/src/compiler/utilities.ts b/src/compiler/utilities.ts index e5856077edcea..3536315853b45 100644 --- a/src/compiler/utilities.ts +++ b/src/compiler/utilities.ts @@ -1705,7 +1705,7 @@ module ts { return false; } } - + export function isRightSideOfQualifiedNameOrPropertyAccess(node: Node) { return (node.parent.kind === SyntaxKind.QualifiedName && (node.parent).right === node) || (node.parent.kind === SyntaxKind.PropertyAccessExpression && (node.parent).name === node); diff --git a/tests/baselines/reference/FunctionDeclaration10_es6.errors.txt b/tests/baselines/reference/FunctionDeclaration10_es6.errors.txt index 8c6b09c82d6bd..6efd10dce099f 100644 --- a/tests/baselines/reference/FunctionDeclaration10_es6.errors.txt +++ b/tests/baselines/reference/FunctionDeclaration10_es6.errors.txt @@ -1,8 +1,20 @@ -tests/cases/conformance/es6/functionDeclarations/FunctionDeclaration10_es6.ts(1,10): error TS9001: Generators are not currently supported. +tests/cases/conformance/es6/functionDeclarations/FunctionDeclaration10_es6.ts(1,16): error TS2371: A parameter initializer is only allowed in a function or constructor implementation. +tests/cases/conformance/es6/functionDeclarations/FunctionDeclaration10_es6.ts(1,26): error TS1005: ',' expected. +tests/cases/conformance/es6/functionDeclarations/FunctionDeclaration10_es6.ts(1,29): error TS1138: Parameter declaration expected. +tests/cases/conformance/es6/functionDeclarations/FunctionDeclaration10_es6.ts(1,29): error TS2304: Cannot find name 'yield'. +tests/cases/conformance/es6/functionDeclarations/FunctionDeclaration10_es6.ts(1,34): error TS1005: ';' expected. -==== tests/cases/conformance/es6/functionDeclarations/FunctionDeclaration10_es6.ts (1 errors) ==== +==== tests/cases/conformance/es6/functionDeclarations/FunctionDeclaration10_es6.ts (5 errors) ==== function * foo(a = yield => yield) { - ~ -!!! error TS9001: Generators are not currently supported. + ~~~~~~~~~ +!!! error TS2371: A parameter initializer is only allowed in a function or constructor implementation. + ~~ +!!! error TS1005: ',' expected. + ~~~~~ +!!! error TS1138: Parameter declaration expected. + ~~~~~ +!!! error TS2304: Cannot find name 'yield'. + ~ +!!! error TS1005: ';' expected. } \ No newline at end of file diff --git a/tests/baselines/reference/FunctionDeclaration6_es6.errors.txt b/tests/baselines/reference/FunctionDeclaration6_es6.errors.txt index b5ea3f494a74b..13f69a47653b1 100644 --- a/tests/baselines/reference/FunctionDeclaration6_es6.errors.txt +++ b/tests/baselines/reference/FunctionDeclaration6_es6.errors.txt @@ -1,5 +1,5 @@ tests/cases/conformance/es6/functionDeclarations/FunctionDeclaration6_es6.ts(1,9): error TS9001: Generators are not currently supported. -tests/cases/conformance/es6/functionDeclarations/FunctionDeclaration6_es6.ts(1,18): error TS2304: Cannot find name 'yield'. +tests/cases/conformance/es6/functionDeclarations/FunctionDeclaration6_es6.ts(1,18): error TS9000: 'yield' expressions are not currently supported. ==== tests/cases/conformance/es6/functionDeclarations/FunctionDeclaration6_es6.ts (2 errors) ==== @@ -7,5 +7,5 @@ tests/cases/conformance/es6/functionDeclarations/FunctionDeclaration6_es6.ts(1,1 ~ !!! error TS9001: Generators are not currently supported. ~~~~~ -!!! error TS2304: Cannot find name 'yield'. +!!! error TS9000: 'yield' expressions are not currently supported. } \ No newline at end of file diff --git a/tests/baselines/reference/FunctionDeclaration7_es6.errors.txt b/tests/baselines/reference/FunctionDeclaration7_es6.errors.txt index f129d3fa30b45..8b15522b136c1 100644 --- a/tests/baselines/reference/FunctionDeclaration7_es6.errors.txt +++ b/tests/baselines/reference/FunctionDeclaration7_es6.errors.txt @@ -1,6 +1,6 @@ tests/cases/conformance/es6/functionDeclarations/FunctionDeclaration7_es6.ts(1,9): error TS9001: Generators are not currently supported. tests/cases/conformance/es6/functionDeclarations/FunctionDeclaration7_es6.ts(3,11): error TS9001: Generators are not currently supported. -tests/cases/conformance/es6/functionDeclarations/FunctionDeclaration7_es6.ts(3,20): error TS2304: Cannot find name 'yield'. +tests/cases/conformance/es6/functionDeclarations/FunctionDeclaration7_es6.ts(3,20): error TS9000: 'yield' expressions are not currently supported. ==== tests/cases/conformance/es6/functionDeclarations/FunctionDeclaration7_es6.ts (3 errors) ==== @@ -12,6 +12,6 @@ tests/cases/conformance/es6/functionDeclarations/FunctionDeclaration7_es6.ts(3,2 ~ !!! error TS9001: Generators are not currently supported. ~~~~~ -!!! error TS2304: Cannot find name 'yield'. +!!! error TS9000: 'yield' expressions are not currently supported. } } \ No newline at end of file diff --git a/tests/baselines/reference/YieldExpression12_es6.errors.txt b/tests/baselines/reference/YieldExpression12_es6.errors.txt index 10843421a3f4a..04c50ca2c3497 100644 --- a/tests/baselines/reference/YieldExpression12_es6.errors.txt +++ b/tests/baselines/reference/YieldExpression12_es6.errors.txt @@ -1,4 +1,4 @@ -tests/cases/conformance/es6/yieldExpressions/YieldExpression12_es6.ts(3,6): error TS1163: 'yield' expression must be contained_within a generator declaration. +tests/cases/conformance/es6/yieldExpressions/YieldExpression12_es6.ts(3,6): error TS1163: 'yield' expression must be contained within a generator declaration. ==== tests/cases/conformance/es6/yieldExpressions/YieldExpression12_es6.ts (1 errors) ==== @@ -6,6 +6,6 @@ tests/cases/conformance/es6/yieldExpressions/YieldExpression12_es6.ts(3,6): erro constructor() { yield foo ~~~~~ -!!! error TS1163: 'yield' expression must be contained_within a generator declaration. +!!! error TS1163: 'yield' expression must be contained within a generator declaration. } } \ No newline at end of file diff --git a/tests/baselines/reference/YieldExpression14_es6.errors.txt b/tests/baselines/reference/YieldExpression14_es6.errors.txt index baeaf3ba30ed3..ddc427bacbe48 100644 --- a/tests/baselines/reference/YieldExpression14_es6.errors.txt +++ b/tests/baselines/reference/YieldExpression14_es6.errors.txt @@ -1,4 +1,4 @@ -tests/cases/conformance/es6/yieldExpressions/YieldExpression14_es6.ts(3,6): error TS1163: 'yield' expression must be contained_within a generator declaration. +tests/cases/conformance/es6/yieldExpressions/YieldExpression14_es6.ts(3,6): error TS1163: 'yield' expression must be contained within a generator declaration. ==== tests/cases/conformance/es6/yieldExpressions/YieldExpression14_es6.ts (1 errors) ==== @@ -6,6 +6,6 @@ tests/cases/conformance/es6/yieldExpressions/YieldExpression14_es6.ts(3,6): erro foo() { yield foo ~~~~~ -!!! error TS1163: 'yield' expression must be contained_within a generator declaration. +!!! error TS1163: 'yield' expression must be contained within a generator declaration. } } \ No newline at end of file diff --git a/tests/baselines/reference/YieldExpression15_es6.errors.txt b/tests/baselines/reference/YieldExpression15_es6.errors.txt index 5e548799f5d5b..12d16a52d0a96 100644 --- a/tests/baselines/reference/YieldExpression15_es6.errors.txt +++ b/tests/baselines/reference/YieldExpression15_es6.errors.txt @@ -1,9 +1,9 @@ -tests/cases/conformance/es6/yieldExpressions/YieldExpression15_es6.ts(2,6): error TS1163: 'yield' expression must be contained_within a generator declaration. +tests/cases/conformance/es6/yieldExpressions/YieldExpression15_es6.ts(2,6): error TS1163: 'yield' expression must be contained within a generator declaration. ==== tests/cases/conformance/es6/yieldExpressions/YieldExpression15_es6.ts (1 errors) ==== var v = () => { yield foo ~~~~~ -!!! error TS1163: 'yield' expression must be contained_within a generator declaration. +!!! error TS1163: 'yield' expression must be contained within a generator declaration. } \ No newline at end of file diff --git a/tests/baselines/reference/YieldExpression16_es6.errors.txt b/tests/baselines/reference/YieldExpression16_es6.errors.txt index c0d2e4c8fc8c3..0b3d71c6ae4bf 100644 --- a/tests/baselines/reference/YieldExpression16_es6.errors.txt +++ b/tests/baselines/reference/YieldExpression16_es6.errors.txt @@ -1,5 +1,5 @@ tests/cases/conformance/es6/yieldExpressions/YieldExpression16_es6.ts(1,9): error TS9001: Generators are not currently supported. -tests/cases/conformance/es6/yieldExpressions/YieldExpression16_es6.ts(3,5): error TS1163: 'yield' expression must be contained_within a generator declaration. +tests/cases/conformance/es6/yieldExpressions/YieldExpression16_es6.ts(3,5): error TS1163: 'yield' expression must be contained within a generator declaration. ==== tests/cases/conformance/es6/yieldExpressions/YieldExpression16_es6.ts (2 errors) ==== @@ -9,6 +9,6 @@ tests/cases/conformance/es6/yieldExpressions/YieldExpression16_es6.ts(3,5): erro function bar() { yield foo; ~~~~~ -!!! error TS1163: 'yield' expression must be contained_within a generator declaration. +!!! error TS1163: 'yield' expression must be contained within a generator declaration. } } \ No newline at end of file diff --git a/tests/baselines/reference/YieldExpression17_es6.errors.txt b/tests/baselines/reference/YieldExpression17_es6.errors.txt index b39f47b07f946..0bcefebede23a 100644 --- a/tests/baselines/reference/YieldExpression17_es6.errors.txt +++ b/tests/baselines/reference/YieldExpression17_es6.errors.txt @@ -1,6 +1,6 @@ tests/cases/conformance/es6/yieldExpressions/YieldExpression17_es6.ts(1,15): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. tests/cases/conformance/es6/yieldExpressions/YieldExpression17_es6.ts(1,15): error TS2378: A 'get' accessor must return a value or consist of a single 'throw' statement. -tests/cases/conformance/es6/yieldExpressions/YieldExpression17_es6.ts(1,23): error TS1163: 'yield' expression must be contained_within a generator declaration. +tests/cases/conformance/es6/yieldExpressions/YieldExpression17_es6.ts(1,23): error TS1163: 'yield' expression must be contained within a generator declaration. ==== tests/cases/conformance/es6/yieldExpressions/YieldExpression17_es6.ts (3 errors) ==== @@ -10,4 +10,4 @@ tests/cases/conformance/es6/yieldExpressions/YieldExpression17_es6.ts(1,23): err ~~~ !!! error TS2378: A 'get' accessor must return a value or consist of a single 'throw' statement. ~~~~~ -!!! error TS1163: 'yield' expression must be contained_within a generator declaration. \ No newline at end of file +!!! error TS1163: 'yield' expression must be contained within a generator declaration. \ No newline at end of file diff --git a/tests/baselines/reference/YieldExpression18_es6.errors.txt b/tests/baselines/reference/YieldExpression18_es6.errors.txt index 3a67acdebcdff..1fae530e44beb 100644 --- a/tests/baselines/reference/YieldExpression18_es6.errors.txt +++ b/tests/baselines/reference/YieldExpression18_es6.errors.txt @@ -1,8 +1,8 @@ -tests/cases/conformance/es6/yieldExpressions/YieldExpression18_es6.ts(2,1): error TS1163: 'yield' expression must be contained_within a generator declaration. +tests/cases/conformance/es6/yieldExpressions/YieldExpression18_es6.ts(2,1): error TS1163: 'yield' expression must be contained within a generator declaration. ==== tests/cases/conformance/es6/yieldExpressions/YieldExpression18_es6.ts (1 errors) ==== "use strict"; yield(foo); ~~~~~ -!!! error TS1163: 'yield' expression must be contained_within a generator declaration. \ No newline at end of file +!!! error TS1163: 'yield' expression must be contained within a generator declaration. \ No newline at end of file diff --git a/tests/baselines/reference/YieldExpression2_es6.errors.txt b/tests/baselines/reference/YieldExpression2_es6.errors.txt index 553dab51fc20f..9a3a4d69facd9 100644 --- a/tests/baselines/reference/YieldExpression2_es6.errors.txt +++ b/tests/baselines/reference/YieldExpression2_es6.errors.txt @@ -1,7 +1,7 @@ -tests/cases/conformance/es6/yieldExpressions/YieldExpression2_es6.ts(1,1): error TS1163: 'yield' expression must be contained_within a generator declaration. +tests/cases/conformance/es6/yieldExpressions/YieldExpression2_es6.ts(1,1): error TS1163: 'yield' expression must be contained within a generator declaration. ==== tests/cases/conformance/es6/yieldExpressions/YieldExpression2_es6.ts (1 errors) ==== yield foo; ~~~~~ -!!! error TS1163: 'yield' expression must be contained_within a generator declaration. \ No newline at end of file +!!! error TS1163: 'yield' expression must be contained within a generator declaration. \ No newline at end of file diff --git a/tests/baselines/reference/arrayLiterals2ES6.symbols b/tests/baselines/reference/arrayLiterals2ES6.symbols index 3b435de2e51be..30f541751a151 100644 --- a/tests/baselines/reference/arrayLiterals2ES6.symbols +++ b/tests/baselines/reference/arrayLiterals2ES6.symbols @@ -72,14 +72,14 @@ var temp2: [number[], string[]] = [[1, 2, 3], ["hello", "string"]]; interface myArray extends Array { } >myArray : Symbol(myArray, Decl(arrayLiterals2ES6.ts, 40, 67)) ->Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11), Decl(lib.d.ts, 1439, 1)) +>Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11), Decl(lib.d.ts, 1450, 1)) >Number : Symbol(Number, Decl(lib.d.ts, 456, 40), Decl(lib.d.ts, 518, 11)) interface myArray2 extends Array { } >myArray2 : Symbol(myArray2, Decl(arrayLiterals2ES6.ts, 42, 43)) ->Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11), Decl(lib.d.ts, 1439, 1)) +>Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11), Decl(lib.d.ts, 1450, 1)) >Number : Symbol(Number, Decl(lib.d.ts, 456, 40), Decl(lib.d.ts, 518, 11)) ->String : Symbol(String, Decl(lib.d.ts, 275, 1), Decl(lib.d.ts, 443, 11), Decl(lib.d.ts, 1538, 1)) +>String : Symbol(String, Decl(lib.d.ts, 275, 1), Decl(lib.d.ts, 443, 11), Decl(lib.d.ts, 1549, 1)) var d0 = [1, true, ...temp, ]; // has type (string|number|boolean)[] >d0 : Symbol(d0, Decl(arrayLiterals2ES6.ts, 44, 3)) diff --git a/tests/baselines/reference/asyncArrowFunction10_es6.errors.txt b/tests/baselines/reference/asyncArrowFunction10_es6.errors.txt new file mode 100644 index 0000000000000..2476eaec6e360 --- /dev/null +++ b/tests/baselines/reference/asyncArrowFunction10_es6.errors.txt @@ -0,0 +1,24 @@ +tests/cases/conformance/async/es6/asyncArrowFunction/asyncArrowFunction10_es6.ts(2,11): error TS2304: Cannot find name 'async'. +tests/cases/conformance/async/es6/asyncArrowFunction/asyncArrowFunction10_es6.ts(2,17): error TS1005: ',' expected. +tests/cases/conformance/async/es6/asyncArrowFunction/asyncArrowFunction10_es6.ts(2,20): error TS1005: '=' expected. +tests/cases/conformance/async/es6/asyncArrowFunction/asyncArrowFunction10_es6.ts(2,24): error TS2355: A function whose declared type is neither 'void' nor 'any' must return a value or consist of a single 'throw' statement. +tests/cases/conformance/async/es6/asyncArrowFunction/asyncArrowFunction10_es6.ts(4,11): error TS2304: Cannot find name 'await'. + + +==== tests/cases/conformance/async/es6/asyncArrowFunction/asyncArrowFunction10_es6.ts (5 errors) ==== + + var foo = async foo(): Promise => { + ~~~~~ +!!! error TS2304: Cannot find name 'async'. + ~~~ +!!! error TS1005: ',' expected. + ~ +!!! error TS1005: '=' expected. + ~~~~~~~~~~~~~ +!!! error TS2355: A function whose declared type is neither 'void' nor 'any' must return a value or consist of a single 'throw' statement. + // Legal to use 'await' in a type context. + var v: await; + ~~~~~ +!!! error TS2304: Cannot find name 'await'. + } + \ No newline at end of file diff --git a/tests/baselines/reference/asyncArrowFunction10_es6.js b/tests/baselines/reference/asyncArrowFunction10_es6.js new file mode 100644 index 0000000000000..23b2c3af80edd --- /dev/null +++ b/tests/baselines/reference/asyncArrowFunction10_es6.js @@ -0,0 +1,13 @@ +//// [asyncArrowFunction10_es6.ts] + +var foo = async foo(): Promise => { + // Legal to use 'await' in a type context. + var v: await; +} + + +//// [asyncArrowFunction10_es6.js] +var foo = async, foo = () => { + // Legal to use 'await' in a type context. + var v; +}; diff --git a/tests/baselines/reference/asyncArrowFunction1_es6.js b/tests/baselines/reference/asyncArrowFunction1_es6.js new file mode 100644 index 0000000000000..78a2899d056e3 --- /dev/null +++ b/tests/baselines/reference/asyncArrowFunction1_es6.js @@ -0,0 +1,8 @@ +//// [asyncArrowFunction1_es6.ts] + +var foo = async (): Promise => { +}; + +//// [asyncArrowFunction1_es6.js] +var foo = () => __awaiter(function *() { +}.apply(this), Promise); diff --git a/tests/baselines/reference/asyncArrowFunction1_es6.symbols b/tests/baselines/reference/asyncArrowFunction1_es6.symbols new file mode 100644 index 0000000000000..dc2ed671c464b --- /dev/null +++ b/tests/baselines/reference/asyncArrowFunction1_es6.symbols @@ -0,0 +1,7 @@ +=== tests/cases/conformance/async/es6/asyncArrowFunction/asyncArrowFunction1_es6.ts === + +var foo = async (): Promise => { +>foo : Symbol(foo, Decl(asyncArrowFunction1_es6.ts, 1, 3)) +>Promise : Symbol(Promise, Decl(lib.d.ts, 4769, 1), Decl(lib.d.ts, 4853, 11)) + +}; diff --git a/tests/baselines/reference/asyncArrowFunction1_es6.types b/tests/baselines/reference/asyncArrowFunction1_es6.types new file mode 100644 index 0000000000000..3ecfdeb79191a --- /dev/null +++ b/tests/baselines/reference/asyncArrowFunction1_es6.types @@ -0,0 +1,8 @@ +=== tests/cases/conformance/async/es6/asyncArrowFunction/asyncArrowFunction1_es6.ts === + +var foo = async (): Promise => { +>foo : () => Promise +>async (): Promise => {} : () => Promise +>Promise : Promise + +}; diff --git a/tests/baselines/reference/asyncArrowFunction2_es6.js b/tests/baselines/reference/asyncArrowFunction2_es6.js new file mode 100644 index 0000000000000..9d7f1d10ea65a --- /dev/null +++ b/tests/baselines/reference/asyncArrowFunction2_es6.js @@ -0,0 +1,7 @@ +//// [asyncArrowFunction2_es6.ts] +var f = (await) => { +} + +//// [asyncArrowFunction2_es6.js] +var f = (await) => { +}; diff --git a/tests/baselines/reference/asyncArrowFunction2_es6.symbols b/tests/baselines/reference/asyncArrowFunction2_es6.symbols new file mode 100644 index 0000000000000..dd8b4ea23908b --- /dev/null +++ b/tests/baselines/reference/asyncArrowFunction2_es6.symbols @@ -0,0 +1,5 @@ +=== tests/cases/conformance/async/es6/asyncArrowFunction/asyncArrowFunction2_es6.ts === +var f = (await) => { +>f : Symbol(f, Decl(asyncArrowFunction2_es6.ts, 0, 3)) +>await : Symbol(await, Decl(asyncArrowFunction2_es6.ts, 0, 9)) +} diff --git a/tests/baselines/reference/asyncArrowFunction2_es6.types b/tests/baselines/reference/asyncArrowFunction2_es6.types new file mode 100644 index 0000000000000..98808d175f868 --- /dev/null +++ b/tests/baselines/reference/asyncArrowFunction2_es6.types @@ -0,0 +1,6 @@ +=== tests/cases/conformance/async/es6/asyncArrowFunction/asyncArrowFunction2_es6.ts === +var f = (await) => { +>f : (await: any) => void +>(await) => {} : (await: any) => void +>await : any +} diff --git a/tests/baselines/reference/asyncArrowFunction3_es6.errors.txt b/tests/baselines/reference/asyncArrowFunction3_es6.errors.txt new file mode 100644 index 0000000000000..d0f56df51dab3 --- /dev/null +++ b/tests/baselines/reference/asyncArrowFunction3_es6.errors.txt @@ -0,0 +1,8 @@ +tests/cases/conformance/async/es6/asyncArrowFunction/asyncArrowFunction3_es6.ts(1,20): error TS2372: Parameter 'await' cannot be referenced in its initializer. + + +==== tests/cases/conformance/async/es6/asyncArrowFunction/asyncArrowFunction3_es6.ts (1 errors) ==== + function f(await = await) { + ~~~~~ +!!! error TS2372: Parameter 'await' cannot be referenced in its initializer. + } \ No newline at end of file diff --git a/tests/baselines/reference/asyncArrowFunction3_es6.js b/tests/baselines/reference/asyncArrowFunction3_es6.js new file mode 100644 index 0000000000000..9616336d76a82 --- /dev/null +++ b/tests/baselines/reference/asyncArrowFunction3_es6.js @@ -0,0 +1,7 @@ +//// [asyncArrowFunction3_es6.ts] +function f(await = await) { +} + +//// [asyncArrowFunction3_es6.js] +function f(await = await) { +} diff --git a/tests/baselines/reference/asyncArrowFunction4_es6.js b/tests/baselines/reference/asyncArrowFunction4_es6.js new file mode 100644 index 0000000000000..eb89d98bbeb80 --- /dev/null +++ b/tests/baselines/reference/asyncArrowFunction4_es6.js @@ -0,0 +1,7 @@ +//// [asyncArrowFunction4_es6.ts] +var await = () => { +} + +//// [asyncArrowFunction4_es6.js] +var await = () => { +}; diff --git a/tests/baselines/reference/asyncArrowFunction4_es6.symbols b/tests/baselines/reference/asyncArrowFunction4_es6.symbols new file mode 100644 index 0000000000000..1c0010407209e --- /dev/null +++ b/tests/baselines/reference/asyncArrowFunction4_es6.symbols @@ -0,0 +1,4 @@ +=== tests/cases/conformance/async/es6/asyncArrowFunction/asyncArrowFunction4_es6.ts === +var await = () => { +>await : Symbol(await, Decl(asyncArrowFunction4_es6.ts, 0, 3)) +} diff --git a/tests/baselines/reference/asyncArrowFunction4_es6.types b/tests/baselines/reference/asyncArrowFunction4_es6.types new file mode 100644 index 0000000000000..e23ff7861055a --- /dev/null +++ b/tests/baselines/reference/asyncArrowFunction4_es6.types @@ -0,0 +1,5 @@ +=== tests/cases/conformance/async/es6/asyncArrowFunction/asyncArrowFunction4_es6.ts === +var await = () => { +>await : () => void +>() => {} : () => void +} diff --git a/tests/baselines/reference/asyncArrowFunction5_es6.errors.txt b/tests/baselines/reference/asyncArrowFunction5_es6.errors.txt new file mode 100644 index 0000000000000..fed2962053245 --- /dev/null +++ b/tests/baselines/reference/asyncArrowFunction5_es6.errors.txt @@ -0,0 +1,24 @@ +tests/cases/conformance/async/es6/asyncArrowFunction/asyncArrowFunction5_es6.ts(2,11): error TS2304: Cannot find name 'async'. +tests/cases/conformance/async/es6/asyncArrowFunction/asyncArrowFunction5_es6.ts(2,18): error TS2304: Cannot find name 'await'. +tests/cases/conformance/async/es6/asyncArrowFunction/asyncArrowFunction5_es6.ts(2,24): error TS1005: ',' expected. +tests/cases/conformance/async/es6/asyncArrowFunction/asyncArrowFunction5_es6.ts(2,26): error TS2403: Subsequent variable declarations must have the same type. Variable 'Promise' must be of type 'PromiseConstructor', but here has type 'void'. +tests/cases/conformance/async/es6/asyncArrowFunction/asyncArrowFunction5_es6.ts(2,33): error TS1005: '=' expected. +tests/cases/conformance/async/es6/asyncArrowFunction/asyncArrowFunction5_es6.ts(2,40): error TS1109: Expression expected. + + +==== tests/cases/conformance/async/es6/asyncArrowFunction/asyncArrowFunction5_es6.ts (6 errors) ==== + + var foo = async (await): Promise => { + ~~~~~ +!!! error TS2304: Cannot find name 'async'. + ~~~~~ +!!! error TS2304: Cannot find name 'await'. + ~ +!!! error TS1005: ',' expected. + ~~~~~~~ +!!! error TS2403: Subsequent variable declarations must have the same type. Variable 'Promise' must be of type 'PromiseConstructor', but here has type 'void'. + ~ +!!! error TS1005: '=' expected. + ~~ +!!! error TS1109: Expression expected. + } \ No newline at end of file diff --git a/tests/baselines/reference/asyncArrowFunction5_es6.js b/tests/baselines/reference/asyncArrowFunction5_es6.js new file mode 100644 index 0000000000000..ed4035e61754c --- /dev/null +++ b/tests/baselines/reference/asyncArrowFunction5_es6.js @@ -0,0 +1,9 @@ +//// [asyncArrowFunction5_es6.ts] + +var foo = async (await): Promise => { +} + +//// [asyncArrowFunction5_es6.js] +var foo = async(await), Promise = ; +{ +} diff --git a/tests/baselines/reference/asyncArrowFunction6_es6.errors.txt b/tests/baselines/reference/asyncArrowFunction6_es6.errors.txt new file mode 100644 index 0000000000000..3afce3a812759 --- /dev/null +++ b/tests/baselines/reference/asyncArrowFunction6_es6.errors.txt @@ -0,0 +1,9 @@ +tests/cases/conformance/async/es6/asyncArrowFunction/asyncArrowFunction6_es6.ts(2,27): error TS1109: Expression expected. + + +==== tests/cases/conformance/async/es6/asyncArrowFunction/asyncArrowFunction6_es6.ts (1 errors) ==== + + var foo = async (a = await): Promise => { + ~ +!!! error TS1109: Expression expected. + } \ No newline at end of file diff --git a/tests/baselines/reference/asyncArrowFunction6_es6.js b/tests/baselines/reference/asyncArrowFunction6_es6.js new file mode 100644 index 0000000000000..186ecc4cf19ec --- /dev/null +++ b/tests/baselines/reference/asyncArrowFunction6_es6.js @@ -0,0 +1,8 @@ +//// [asyncArrowFunction6_es6.ts] + +var foo = async (a = await): Promise => { +} + +//// [asyncArrowFunction6_es6.js] +var foo = (...arguments_1) => __awaiter(function *(a = yield ) { +}.apply(this, arguments_1), Promise); diff --git a/tests/baselines/reference/asyncArrowFunction7_es6.errors.txt b/tests/baselines/reference/asyncArrowFunction7_es6.errors.txt new file mode 100644 index 0000000000000..db7e634b47986 --- /dev/null +++ b/tests/baselines/reference/asyncArrowFunction7_es6.errors.txt @@ -0,0 +1,12 @@ +tests/cases/conformance/async/es6/asyncArrowFunction/asyncArrowFunction7_es6.ts(4,29): error TS1109: Expression expected. + + +==== tests/cases/conformance/async/es6/asyncArrowFunction/asyncArrowFunction7_es6.ts (1 errors) ==== + + var bar = async (): Promise => { + // 'await' here is an identifier, and not an await expression. + var foo = async (a = await): Promise => { + ~ +!!! error TS1109: Expression expected. + } + } \ No newline at end of file diff --git a/tests/baselines/reference/asyncArrowFunction7_es6.js b/tests/baselines/reference/asyncArrowFunction7_es6.js new file mode 100644 index 0000000000000..b1859159c92c5 --- /dev/null +++ b/tests/baselines/reference/asyncArrowFunction7_es6.js @@ -0,0 +1,14 @@ +//// [asyncArrowFunction7_es6.ts] + +var bar = async (): Promise => { + // 'await' here is an identifier, and not an await expression. + var foo = async (a = await): Promise => { + } +} + +//// [asyncArrowFunction7_es6.js] +var bar = () => __awaiter(function *() { + // 'await' here is an identifier, and not an await expression. + var foo = (...arguments_1) => __awaiter(function *(a = yield ) { + }.apply(this, arguments_1), Promise); +}.apply(this), Promise); diff --git a/tests/baselines/reference/asyncArrowFunction8_es6.errors.txt b/tests/baselines/reference/asyncArrowFunction8_es6.errors.txt new file mode 100644 index 0000000000000..7252805cdcac7 --- /dev/null +++ b/tests/baselines/reference/asyncArrowFunction8_es6.errors.txt @@ -0,0 +1,10 @@ +tests/cases/conformance/async/es6/asyncArrowFunction/asyncArrowFunction8_es6.ts(3,19): error TS1109: Expression expected. + + +==== tests/cases/conformance/async/es6/asyncArrowFunction/asyncArrowFunction8_es6.ts (1 errors) ==== + + var foo = async (): Promise => { + var v = { [await]: foo } + ~ +!!! error TS1109: Expression expected. + } \ No newline at end of file diff --git a/tests/baselines/reference/asyncArrowFunction8_es6.js b/tests/baselines/reference/asyncArrowFunction8_es6.js new file mode 100644 index 0000000000000..3f98f3a4f63c2 --- /dev/null +++ b/tests/baselines/reference/asyncArrowFunction8_es6.js @@ -0,0 +1,10 @@ +//// [asyncArrowFunction8_es6.ts] + +var foo = async (): Promise => { + var v = { [await]: foo } +} + +//// [asyncArrowFunction8_es6.js] +var foo = () => __awaiter(function *() { + var v = { [yield ]: foo }; +}.apply(this), Promise); diff --git a/tests/baselines/reference/asyncArrowFunction9_es6.errors.txt b/tests/baselines/reference/asyncArrowFunction9_es6.errors.txt new file mode 100644 index 0000000000000..623095e8a5e33 --- /dev/null +++ b/tests/baselines/reference/asyncArrowFunction9_es6.errors.txt @@ -0,0 +1,23 @@ +tests/cases/conformance/async/es6/asyncArrowFunction/asyncArrowFunction9_es6.ts(1,11): error TS2304: Cannot find name 'async'. +tests/cases/conformance/async/es6/asyncArrowFunction/asyncArrowFunction9_es6.ts(1,18): error TS2304: Cannot find name 'a'. +tests/cases/conformance/async/es6/asyncArrowFunction/asyncArrowFunction9_es6.ts(1,37): error TS1005: ',' expected. +tests/cases/conformance/async/es6/asyncArrowFunction/asyncArrowFunction9_es6.ts(1,39): error TS2403: Subsequent variable declarations must have the same type. Variable 'Promise' must be of type 'PromiseConstructor', but here has type 'void'. +tests/cases/conformance/async/es6/asyncArrowFunction/asyncArrowFunction9_es6.ts(1,46): error TS1005: '=' expected. +tests/cases/conformance/async/es6/asyncArrowFunction/asyncArrowFunction9_es6.ts(1,53): error TS1109: Expression expected. + + +==== tests/cases/conformance/async/es6/asyncArrowFunction/asyncArrowFunction9_es6.ts (6 errors) ==== + var foo = async (a = await => await): Promise => { + ~~~~~ +!!! error TS2304: Cannot find name 'async'. + ~ +!!! error TS2304: Cannot find name 'a'. + ~ +!!! error TS1005: ',' expected. + ~~~~~~~ +!!! error TS2403: Subsequent variable declarations must have the same type. Variable 'Promise' must be of type 'PromiseConstructor', but here has type 'void'. + ~ +!!! error TS1005: '=' expected. + ~~ +!!! error TS1109: Expression expected. + } \ No newline at end of file diff --git a/tests/baselines/reference/asyncArrowFunction9_es6.js b/tests/baselines/reference/asyncArrowFunction9_es6.js new file mode 100644 index 0000000000000..fb2f9d28a17c4 --- /dev/null +++ b/tests/baselines/reference/asyncArrowFunction9_es6.js @@ -0,0 +1,8 @@ +//// [asyncArrowFunction9_es6.ts] +var foo = async (a = await => await): Promise => { +} + +//// [asyncArrowFunction9_es6.js] +var foo = async(a = await => await), Promise = ; +{ +} diff --git a/tests/baselines/reference/asyncArrowFunctionCapturesArguments_es6.errors.txt b/tests/baselines/reference/asyncArrowFunctionCapturesArguments_es6.errors.txt new file mode 100644 index 0000000000000..6b80a53f5293e --- /dev/null +++ b/tests/baselines/reference/asyncArrowFunctionCapturesArguments_es6.errors.txt @@ -0,0 +1,13 @@ +tests/cases/conformance/async/es6/asyncArrowFunction/asyncArrowFunctionCapturesArguments_es6.ts(4,52): error TS2522: The 'arguments' object cannot be referenced in an async arrow function Consider using a standard async function expression. + + +==== tests/cases/conformance/async/es6/asyncArrowFunction/asyncArrowFunctionCapturesArguments_es6.ts (1 errors) ==== + class C { + method() { + function other() {} + var fn = async () => await other.apply(this, arguments); + ~~~~~~~~~ +!!! error TS2522: The 'arguments' object cannot be referenced in an async arrow function Consider using a standard async function expression. + } + } + \ No newline at end of file diff --git a/tests/baselines/reference/asyncArrowFunctionCapturesArguments_es6.js b/tests/baselines/reference/asyncArrowFunctionCapturesArguments_es6.js new file mode 100644 index 0000000000000..96926ba8f41b3 --- /dev/null +++ b/tests/baselines/reference/asyncArrowFunctionCapturesArguments_es6.js @@ -0,0 +1,16 @@ +//// [asyncArrowFunctionCapturesArguments_es6.ts] +class C { + method() { + function other() {} + var fn = async () => await other.apply(this, arguments); + } +} + + +//// [asyncArrowFunctionCapturesArguments_es6.js] +class C { + method() { + function other() { } + var fn = () => __awaiter(function *() { return yield other.apply(this, arguments); }.apply(this)); + } +} diff --git a/tests/baselines/reference/asyncArrowFunctionCapturesThis_es6.js b/tests/baselines/reference/asyncArrowFunctionCapturesThis_es6.js new file mode 100644 index 0000000000000..572c5fbe04668 --- /dev/null +++ b/tests/baselines/reference/asyncArrowFunctionCapturesThis_es6.js @@ -0,0 +1,14 @@ +//// [asyncArrowFunctionCapturesThis_es6.ts] +class C { + method() { + var fn = async () => await this; + } +} + + +//// [asyncArrowFunctionCapturesThis_es6.js] +class C { + method() { + var fn = () => __awaiter(function *() { return yield this; }.apply(this)); + } +} diff --git a/tests/baselines/reference/asyncArrowFunctionCapturesThis_es6.symbols b/tests/baselines/reference/asyncArrowFunctionCapturesThis_es6.symbols new file mode 100644 index 0000000000000..ae516bb7fe3be --- /dev/null +++ b/tests/baselines/reference/asyncArrowFunctionCapturesThis_es6.symbols @@ -0,0 +1,13 @@ +=== tests/cases/conformance/async/es6/asyncArrowFunction/asyncArrowFunctionCapturesThis_es6.ts === +class C { +>C : Symbol(C, Decl(asyncArrowFunctionCapturesThis_es6.ts, 0, 0)) + + method() { +>method : Symbol(method, Decl(asyncArrowFunctionCapturesThis_es6.ts, 0, 9)) + + var fn = async () => await this; +>fn : Symbol(fn, Decl(asyncArrowFunctionCapturesThis_es6.ts, 2, 9)) +>this : Symbol(C, Decl(asyncArrowFunctionCapturesThis_es6.ts, 0, 0)) + } +} + diff --git a/tests/baselines/reference/asyncArrowFunctionCapturesThis_es6.types b/tests/baselines/reference/asyncArrowFunctionCapturesThis_es6.types new file mode 100644 index 0000000000000..f3cd0f2d2dea2 --- /dev/null +++ b/tests/baselines/reference/asyncArrowFunctionCapturesThis_es6.types @@ -0,0 +1,14 @@ +=== tests/cases/conformance/async/es6/asyncArrowFunction/asyncArrowFunctionCapturesThis_es6.ts === +class C { +>C : C + + method() { +>method : () => void + + var fn = async () => await this; +>fn : () => Promise +>async () => await this : () => Promise +>this : C + } +} + diff --git a/tests/baselines/reference/asyncClass_es6.errors.txt b/tests/baselines/reference/asyncClass_es6.errors.txt new file mode 100644 index 0000000000000..ee8a3a85dbc80 --- /dev/null +++ b/tests/baselines/reference/asyncClass_es6.errors.txt @@ -0,0 +1,8 @@ +tests/cases/conformance/async/es6/asyncClass_es6.ts(1,1): error TS1042: 'async' modifier cannot be used here. + + +==== tests/cases/conformance/async/es6/asyncClass_es6.ts (1 errors) ==== + async class C { + ~~~~~ +!!! error TS1042: 'async' modifier cannot be used here. + } \ No newline at end of file diff --git a/tests/baselines/reference/asyncClass_es6.js b/tests/baselines/reference/asyncClass_es6.js new file mode 100644 index 0000000000000..b5e1498f70c3f --- /dev/null +++ b/tests/baselines/reference/asyncClass_es6.js @@ -0,0 +1,7 @@ +//// [asyncClass_es6.ts] +async class C { +} + +//// [asyncClass_es6.js] +class C { +} diff --git a/tests/baselines/reference/asyncConstructor_es6.errors.txt b/tests/baselines/reference/asyncConstructor_es6.errors.txt new file mode 100644 index 0000000000000..6eb18cf41a199 --- /dev/null +++ b/tests/baselines/reference/asyncConstructor_es6.errors.txt @@ -0,0 +1,10 @@ +tests/cases/conformance/async/es6/asyncConstructor_es6.ts(2,3): error TS1089: 'async' modifier cannot appear on a constructor declaration. + + +==== tests/cases/conformance/async/es6/asyncConstructor_es6.ts (1 errors) ==== + class C { + async constructor() { + ~~~~~ +!!! error TS1089: 'async' modifier cannot appear on a constructor declaration. + } + } \ No newline at end of file diff --git a/tests/baselines/reference/asyncConstructor_es6.js b/tests/baselines/reference/asyncConstructor_es6.js new file mode 100644 index 0000000000000..a0cfa7709dfa4 --- /dev/null +++ b/tests/baselines/reference/asyncConstructor_es6.js @@ -0,0 +1,11 @@ +//// [asyncConstructor_es6.ts] +class C { + async constructor() { + } +} + +//// [asyncConstructor_es6.js] +class C { + constructor() { + } +} diff --git a/tests/baselines/reference/asyncDeclare_es6.errors.txt b/tests/baselines/reference/asyncDeclare_es6.errors.txt new file mode 100644 index 0000000000000..65a4068e140e7 --- /dev/null +++ b/tests/baselines/reference/asyncDeclare_es6.errors.txt @@ -0,0 +1,7 @@ +tests/cases/conformance/async/es6/asyncDeclare_es6.ts(1,9): error TS1040: 'async' modifier cannot be used in an ambient context. + + +==== tests/cases/conformance/async/es6/asyncDeclare_es6.ts (1 errors) ==== + declare async function foo(): Promise; + ~~~~~ +!!! error TS1040: 'async' modifier cannot be used in an ambient context. \ No newline at end of file diff --git a/tests/baselines/reference/asyncDeclare_es6.js b/tests/baselines/reference/asyncDeclare_es6.js new file mode 100644 index 0000000000000..096f43a248a16 --- /dev/null +++ b/tests/baselines/reference/asyncDeclare_es6.js @@ -0,0 +1,4 @@ +//// [asyncDeclare_es6.ts] +declare async function foo(): Promise; + +//// [asyncDeclare_es6.js] diff --git a/tests/baselines/reference/asyncEnum_es6.errors.txt b/tests/baselines/reference/asyncEnum_es6.errors.txt new file mode 100644 index 0000000000000..a50853fd8ea43 --- /dev/null +++ b/tests/baselines/reference/asyncEnum_es6.errors.txt @@ -0,0 +1,9 @@ +tests/cases/conformance/async/es6/asyncEnum_es6.ts(1,1): error TS1042: 'async' modifier cannot be used here. + + +==== tests/cases/conformance/async/es6/asyncEnum_es6.ts (1 errors) ==== + async enum E { + ~~~~~ +!!! error TS1042: 'async' modifier cannot be used here. + Value + } \ No newline at end of file diff --git a/tests/baselines/reference/asyncEnum_es6.js b/tests/baselines/reference/asyncEnum_es6.js new file mode 100644 index 0000000000000..074de3dd0aee1 --- /dev/null +++ b/tests/baselines/reference/asyncEnum_es6.js @@ -0,0 +1,10 @@ +//// [asyncEnum_es6.ts] +async enum E { + Value +} + +//// [asyncEnum_es6.js] +var E; +(function (E) { + E[E["Value"] = 0] = "Value"; +})(E || (E = {})); diff --git a/tests/baselines/reference/asyncFunctionDeclaration10_es6.errors.txt b/tests/baselines/reference/asyncFunctionDeclaration10_es6.errors.txt new file mode 100644 index 0000000000000..15ceb3e60c763 --- /dev/null +++ b/tests/baselines/reference/asyncFunctionDeclaration10_es6.errors.txt @@ -0,0 +1,26 @@ +tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration10_es6.ts(1,20): error TS2371: A parameter initializer is only allowed in a function or constructor implementation. +tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration10_es6.ts(1,30): error TS1109: Expression expected. +tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration10_es6.ts(1,33): error TS1138: Parameter declaration expected. +tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration10_es6.ts(1,33): error TS2304: Cannot find name 'await'. +tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration10_es6.ts(1,38): error TS1005: ';' expected. +tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration10_es6.ts(1,39): error TS1128: Declaration or statement expected. +tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration10_es6.ts(1,53): error TS1109: Expression expected. + + +==== tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration10_es6.ts (7 errors) ==== + async function foo(a = await => await): Promise { + ~~~~~~~~~ +!!! error TS2371: A parameter initializer is only allowed in a function or constructor implementation. + ~~ +!!! error TS1109: Expression expected. + ~~~~~ +!!! error TS1138: Parameter declaration expected. + ~~~~~ +!!! error TS2304: Cannot find name 'await'. + ~ +!!! error TS1005: ';' expected. + ~ +!!! error TS1128: Declaration or statement expected. + ~ +!!! error TS1109: Expression expected. + } \ No newline at end of file diff --git a/tests/baselines/reference/asyncFunctionDeclaration10_es6.js b/tests/baselines/reference/asyncFunctionDeclaration10_es6.js new file mode 100644 index 0000000000000..141c0cbab55cd --- /dev/null +++ b/tests/baselines/reference/asyncFunctionDeclaration10_es6.js @@ -0,0 +1,7 @@ +//// [asyncFunctionDeclaration10_es6.ts] +async function foo(a = await => await): Promise { +} + +//// [asyncFunctionDeclaration10_es6.js] +await; +Promise < void > {}; diff --git a/tests/baselines/reference/asyncFunctionDeclaration11_es6.js b/tests/baselines/reference/asyncFunctionDeclaration11_es6.js new file mode 100644 index 0000000000000..39bf2c20e7956 --- /dev/null +++ b/tests/baselines/reference/asyncFunctionDeclaration11_es6.js @@ -0,0 +1,9 @@ +//// [asyncFunctionDeclaration11_es6.ts] +async function await(): Promise { +} + +//// [asyncFunctionDeclaration11_es6.js] +function await() { + return __awaiter(function *() { + }.apply(this, arguments), Promise); +} diff --git a/tests/baselines/reference/asyncFunctionDeclaration11_es6.symbols b/tests/baselines/reference/asyncFunctionDeclaration11_es6.symbols new file mode 100644 index 0000000000000..b432029637399 --- /dev/null +++ b/tests/baselines/reference/asyncFunctionDeclaration11_es6.symbols @@ -0,0 +1,5 @@ +=== tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration11_es6.ts === +async function await(): Promise { +>await : Symbol(await, Decl(asyncFunctionDeclaration11_es6.ts, 0, 0)) +>Promise : Symbol(Promise, Decl(lib.d.ts, 4769, 1), Decl(lib.d.ts, 4853, 11)) +} diff --git a/tests/baselines/reference/asyncFunctionDeclaration11_es6.types b/tests/baselines/reference/asyncFunctionDeclaration11_es6.types new file mode 100644 index 0000000000000..65896e7b3b5fd --- /dev/null +++ b/tests/baselines/reference/asyncFunctionDeclaration11_es6.types @@ -0,0 +1,5 @@ +=== tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration11_es6.ts === +async function await(): Promise { +>await : () => Promise +>Promise : Promise +} diff --git a/tests/baselines/reference/asyncFunctionDeclaration12_es6.errors.txt b/tests/baselines/reference/asyncFunctionDeclaration12_es6.errors.txt new file mode 100644 index 0000000000000..978492f0744c8 --- /dev/null +++ b/tests/baselines/reference/asyncFunctionDeclaration12_es6.errors.txt @@ -0,0 +1,16 @@ +tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration12_es6.ts(1,24): error TS1005: '(' expected. +tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration12_es6.ts(1,29): error TS1005: '=' expected. +tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration12_es6.ts(1,33): error TS2355: A function whose declared type is neither 'void' nor 'any' must return a value or consist of a single 'throw' statement. +tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration12_es6.ts(1,47): error TS1005: '=>' expected. + + +==== tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration12_es6.ts (4 errors) ==== + var v = async function await(): Promise { } + ~~~~~ +!!! error TS1005: '(' expected. + ~ +!!! error TS1005: '=' expected. + ~~~~~~~~~~~~~ +!!! error TS2355: A function whose declared type is neither 'void' nor 'any' must return a value or consist of a single 'throw' statement. + ~ +!!! error TS1005: '=>' expected. \ No newline at end of file diff --git a/tests/baselines/reference/asyncFunctionDeclaration12_es6.js b/tests/baselines/reference/asyncFunctionDeclaration12_es6.js new file mode 100644 index 0000000000000..dae33682ce6ae --- /dev/null +++ b/tests/baselines/reference/asyncFunctionDeclaration12_es6.js @@ -0,0 +1,5 @@ +//// [asyncFunctionDeclaration12_es6.ts] +var v = async function await(): Promise { } + +//// [asyncFunctionDeclaration12_es6.js] +var v = , await = () => { }; diff --git a/tests/baselines/reference/asyncFunctionDeclaration13_es6.errors.txt b/tests/baselines/reference/asyncFunctionDeclaration13_es6.errors.txt new file mode 100644 index 0000000000000..6cf65ca4e3a6f --- /dev/null +++ b/tests/baselines/reference/asyncFunctionDeclaration13_es6.errors.txt @@ -0,0 +1,11 @@ +tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration13_es6.ts(3,11): error TS2304: Cannot find name 'await'. + + +==== tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration13_es6.ts (1 errors) ==== + async function foo(): Promise { + // Legal to use 'await' in a type context. + var v: await; + ~~~~~ +!!! error TS2304: Cannot find name 'await'. + } + \ No newline at end of file diff --git a/tests/baselines/reference/asyncFunctionDeclaration13_es6.js b/tests/baselines/reference/asyncFunctionDeclaration13_es6.js new file mode 100644 index 0000000000000..9666fb5d7c4fb --- /dev/null +++ b/tests/baselines/reference/asyncFunctionDeclaration13_es6.js @@ -0,0 +1,14 @@ +//// [asyncFunctionDeclaration13_es6.ts] +async function foo(): Promise { + // Legal to use 'await' in a type context. + var v: await; +} + + +//// [asyncFunctionDeclaration13_es6.js] +function foo() { + return __awaiter(function *() { + // Legal to use 'await' in a type context. + var v; + }.apply(this, arguments), Promise); +} diff --git a/tests/baselines/reference/asyncFunctionDeclaration14_es6.js b/tests/baselines/reference/asyncFunctionDeclaration14_es6.js new file mode 100644 index 0000000000000..2f694f0269686 --- /dev/null +++ b/tests/baselines/reference/asyncFunctionDeclaration14_es6.js @@ -0,0 +1,11 @@ +//// [asyncFunctionDeclaration14_es6.ts] +async function foo(): Promise { + return; +} + +//// [asyncFunctionDeclaration14_es6.js] +function foo() { + return __awaiter(function *() { + return; + }.apply(this, arguments), Promise); +} diff --git a/tests/baselines/reference/asyncFunctionDeclaration14_es6.symbols b/tests/baselines/reference/asyncFunctionDeclaration14_es6.symbols new file mode 100644 index 0000000000000..5354c67a195f0 --- /dev/null +++ b/tests/baselines/reference/asyncFunctionDeclaration14_es6.symbols @@ -0,0 +1,7 @@ +=== tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration14_es6.ts === +async function foo(): Promise { +>foo : Symbol(foo, Decl(asyncFunctionDeclaration14_es6.ts, 0, 0)) +>Promise : Symbol(Promise, Decl(lib.d.ts, 4769, 1), Decl(lib.d.ts, 4853, 11)) + + return; +} diff --git a/tests/baselines/reference/asyncFunctionDeclaration14_es6.types b/tests/baselines/reference/asyncFunctionDeclaration14_es6.types new file mode 100644 index 0000000000000..7727ffafaeb59 --- /dev/null +++ b/tests/baselines/reference/asyncFunctionDeclaration14_es6.types @@ -0,0 +1,7 @@ +=== tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration14_es6.ts === +async function foo(): Promise { +>foo : () => Promise +>Promise : Promise + + return; +} diff --git a/tests/baselines/reference/asyncFunctionDeclaration1_es6.js b/tests/baselines/reference/asyncFunctionDeclaration1_es6.js new file mode 100644 index 0000000000000..75cb74a68a53e --- /dev/null +++ b/tests/baselines/reference/asyncFunctionDeclaration1_es6.js @@ -0,0 +1,9 @@ +//// [asyncFunctionDeclaration1_es6.ts] +async function foo(): Promise { +} + +//// [asyncFunctionDeclaration1_es6.js] +function foo() { + return __awaiter(function *() { + }.apply(this, arguments), Promise); +} diff --git a/tests/baselines/reference/asyncFunctionDeclaration1_es6.symbols b/tests/baselines/reference/asyncFunctionDeclaration1_es6.symbols new file mode 100644 index 0000000000000..241290a489999 --- /dev/null +++ b/tests/baselines/reference/asyncFunctionDeclaration1_es6.symbols @@ -0,0 +1,5 @@ +=== tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration1_es6.ts === +async function foo(): Promise { +>foo : Symbol(foo, Decl(asyncFunctionDeclaration1_es6.ts, 0, 0)) +>Promise : Symbol(Promise, Decl(lib.d.ts, 4769, 1), Decl(lib.d.ts, 4853, 11)) +} diff --git a/tests/baselines/reference/asyncFunctionDeclaration1_es6.types b/tests/baselines/reference/asyncFunctionDeclaration1_es6.types new file mode 100644 index 0000000000000..5cba25724f071 --- /dev/null +++ b/tests/baselines/reference/asyncFunctionDeclaration1_es6.types @@ -0,0 +1,5 @@ +=== tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration1_es6.ts === +async function foo(): Promise { +>foo : () => Promise +>Promise : Promise +} diff --git a/tests/baselines/reference/asyncFunctionDeclaration2_es6.js b/tests/baselines/reference/asyncFunctionDeclaration2_es6.js new file mode 100644 index 0000000000000..1c54b9bc056f4 --- /dev/null +++ b/tests/baselines/reference/asyncFunctionDeclaration2_es6.js @@ -0,0 +1,7 @@ +//// [asyncFunctionDeclaration2_es6.ts] +function f(await) { +} + +//// [asyncFunctionDeclaration2_es6.js] +function f(await) { +} diff --git a/tests/baselines/reference/asyncFunctionDeclaration2_es6.symbols b/tests/baselines/reference/asyncFunctionDeclaration2_es6.symbols new file mode 100644 index 0000000000000..c709d7f7386de --- /dev/null +++ b/tests/baselines/reference/asyncFunctionDeclaration2_es6.symbols @@ -0,0 +1,5 @@ +=== tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration2_es6.ts === +function f(await) { +>f : Symbol(f, Decl(asyncFunctionDeclaration2_es6.ts, 0, 0)) +>await : Symbol(await, Decl(asyncFunctionDeclaration2_es6.ts, 0, 11)) +} diff --git a/tests/baselines/reference/asyncFunctionDeclaration2_es6.types b/tests/baselines/reference/asyncFunctionDeclaration2_es6.types new file mode 100644 index 0000000000000..9c9a19f3e763f --- /dev/null +++ b/tests/baselines/reference/asyncFunctionDeclaration2_es6.types @@ -0,0 +1,5 @@ +=== tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration2_es6.ts === +function f(await) { +>f : (await: any) => void +>await : any +} diff --git a/tests/baselines/reference/asyncFunctionDeclaration3_es6.errors.txt b/tests/baselines/reference/asyncFunctionDeclaration3_es6.errors.txt new file mode 100644 index 0000000000000..a480bf3d2b8be --- /dev/null +++ b/tests/baselines/reference/asyncFunctionDeclaration3_es6.errors.txt @@ -0,0 +1,8 @@ +tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration3_es6.ts(1,20): error TS2372: Parameter 'await' cannot be referenced in its initializer. + + +==== tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration3_es6.ts (1 errors) ==== + function f(await = await) { + ~~~~~ +!!! error TS2372: Parameter 'await' cannot be referenced in its initializer. + } \ No newline at end of file diff --git a/tests/baselines/reference/asyncFunctionDeclaration3_es6.js b/tests/baselines/reference/asyncFunctionDeclaration3_es6.js new file mode 100644 index 0000000000000..7038858d2c8cd --- /dev/null +++ b/tests/baselines/reference/asyncFunctionDeclaration3_es6.js @@ -0,0 +1,7 @@ +//// [asyncFunctionDeclaration3_es6.ts] +function f(await = await) { +} + +//// [asyncFunctionDeclaration3_es6.js] +function f(await = await) { +} diff --git a/tests/baselines/reference/asyncFunctionDeclaration4_es6.js b/tests/baselines/reference/asyncFunctionDeclaration4_es6.js new file mode 100644 index 0000000000000..8bfb7bf642f91 --- /dev/null +++ b/tests/baselines/reference/asyncFunctionDeclaration4_es6.js @@ -0,0 +1,7 @@ +//// [asyncFunctionDeclaration4_es6.ts] +function await() { +} + +//// [asyncFunctionDeclaration4_es6.js] +function await() { +} diff --git a/tests/baselines/reference/asyncFunctionDeclaration4_es6.symbols b/tests/baselines/reference/asyncFunctionDeclaration4_es6.symbols new file mode 100644 index 0000000000000..cdbe1f5a8db9e --- /dev/null +++ b/tests/baselines/reference/asyncFunctionDeclaration4_es6.symbols @@ -0,0 +1,4 @@ +=== tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration4_es6.ts === +function await() { +>await : Symbol(await, Decl(asyncFunctionDeclaration4_es6.ts, 0, 0)) +} diff --git a/tests/baselines/reference/asyncFunctionDeclaration4_es6.types b/tests/baselines/reference/asyncFunctionDeclaration4_es6.types new file mode 100644 index 0000000000000..537661e2c661e --- /dev/null +++ b/tests/baselines/reference/asyncFunctionDeclaration4_es6.types @@ -0,0 +1,4 @@ +=== tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration4_es6.ts === +function await() { +>await : () => void +} diff --git a/tests/baselines/reference/asyncFunctionDeclaration5_es6.errors.txt b/tests/baselines/reference/asyncFunctionDeclaration5_es6.errors.txt new file mode 100644 index 0000000000000..a6944e0c6e665 --- /dev/null +++ b/tests/baselines/reference/asyncFunctionDeclaration5_es6.errors.txt @@ -0,0 +1,20 @@ +tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration5_es6.ts(1,20): error TS1138: Parameter declaration expected. +tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration5_es6.ts(1,20): error TS2304: Cannot find name 'await'. +tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration5_es6.ts(1,25): error TS1005: ';' expected. +tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration5_es6.ts(1,26): error TS1128: Declaration or statement expected. +tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration5_es6.ts(1,40): error TS1109: Expression expected. + + +==== tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration5_es6.ts (5 errors) ==== + async function foo(await): Promise { + ~~~~~ +!!! error TS1138: Parameter declaration expected. + ~~~~~ +!!! error TS2304: Cannot find name 'await'. + ~ +!!! error TS1005: ';' expected. + ~ +!!! error TS1128: Declaration or statement expected. + ~ +!!! error TS1109: Expression expected. + } \ No newline at end of file diff --git a/tests/baselines/reference/asyncFunctionDeclaration5_es6.js b/tests/baselines/reference/asyncFunctionDeclaration5_es6.js new file mode 100644 index 0000000000000..8d28c371465f8 --- /dev/null +++ b/tests/baselines/reference/asyncFunctionDeclaration5_es6.js @@ -0,0 +1,7 @@ +//// [asyncFunctionDeclaration5_es6.ts] +async function foo(await): Promise { +} + +//// [asyncFunctionDeclaration5_es6.js] +await; +Promise < void > {}; diff --git a/tests/baselines/reference/asyncFunctionDeclaration6_es6.errors.txt b/tests/baselines/reference/asyncFunctionDeclaration6_es6.errors.txt new file mode 100644 index 0000000000000..e719ed801e614 --- /dev/null +++ b/tests/baselines/reference/asyncFunctionDeclaration6_es6.errors.txt @@ -0,0 +1,8 @@ +tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration6_es6.ts(1,29): error TS1109: Expression expected. + + +==== tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration6_es6.ts (1 errors) ==== + async function foo(a = await): Promise { + ~ +!!! error TS1109: Expression expected. + } \ No newline at end of file diff --git a/tests/baselines/reference/asyncFunctionDeclaration6_es6.js b/tests/baselines/reference/asyncFunctionDeclaration6_es6.js new file mode 100644 index 0000000000000..2a3ffaa94dd70 --- /dev/null +++ b/tests/baselines/reference/asyncFunctionDeclaration6_es6.js @@ -0,0 +1,9 @@ +//// [asyncFunctionDeclaration6_es6.ts] +async function foo(a = await): Promise { +} + +//// [asyncFunctionDeclaration6_es6.js] +function foo() { + return __awaiter(function *(a = yield ) { + }.apply(this, arguments), Promise); +} diff --git a/tests/baselines/reference/asyncFunctionDeclaration7_es6.errors.txt b/tests/baselines/reference/asyncFunctionDeclaration7_es6.errors.txt new file mode 100644 index 0000000000000..01643ffcdbb2f --- /dev/null +++ b/tests/baselines/reference/asyncFunctionDeclaration7_es6.errors.txt @@ -0,0 +1,11 @@ +tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration7_es6.ts(3,31): error TS1109: Expression expected. + + +==== tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration7_es6.ts (1 errors) ==== + async function bar(): Promise { + // 'await' here is an identifier, and not a yield expression. + async function foo(a = await): Promise { + ~ +!!! error TS1109: Expression expected. + } + } \ No newline at end of file diff --git a/tests/baselines/reference/asyncFunctionDeclaration7_es6.js b/tests/baselines/reference/asyncFunctionDeclaration7_es6.js new file mode 100644 index 0000000000000..c22870b08fef0 --- /dev/null +++ b/tests/baselines/reference/asyncFunctionDeclaration7_es6.js @@ -0,0 +1,17 @@ +//// [asyncFunctionDeclaration7_es6.ts] +async function bar(): Promise { + // 'await' here is an identifier, and not a yield expression. + async function foo(a = await): Promise { + } +} + +//// [asyncFunctionDeclaration7_es6.js] +function bar() { + return __awaiter(function *() { + // 'await' here is an identifier, and not a yield expression. + function foo() { + return __awaiter(function *(a = yield ) { + }.apply(this, arguments), Promise); + } + }.apply(this, arguments), Promise); +} diff --git a/tests/baselines/reference/asyncFunctionDeclaration8_es6.errors.txt b/tests/baselines/reference/asyncFunctionDeclaration8_es6.errors.txt new file mode 100644 index 0000000000000..c785ae41b170c --- /dev/null +++ b/tests/baselines/reference/asyncFunctionDeclaration8_es6.errors.txt @@ -0,0 +1,10 @@ +tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration8_es6.ts(1,12): error TS2304: Cannot find name 'await'. +tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration8_es6.ts(1,20): error TS2304: Cannot find name 'foo'. + + +==== tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration8_es6.ts (2 errors) ==== + var v = { [await]: foo } + ~~~~~ +!!! error TS2304: Cannot find name 'await'. + ~~~ +!!! error TS2304: Cannot find name 'foo'. \ No newline at end of file diff --git a/tests/baselines/reference/asyncFunctionDeclaration8_es6.js b/tests/baselines/reference/asyncFunctionDeclaration8_es6.js new file mode 100644 index 0000000000000..a363015f8abc8 --- /dev/null +++ b/tests/baselines/reference/asyncFunctionDeclaration8_es6.js @@ -0,0 +1,5 @@ +//// [asyncFunctionDeclaration8_es6.ts] +var v = { [await]: foo } + +//// [asyncFunctionDeclaration8_es6.js] +var v = { [await]: foo }; diff --git a/tests/baselines/reference/asyncFunctionDeclaration9_es6.errors.txt b/tests/baselines/reference/asyncFunctionDeclaration9_es6.errors.txt new file mode 100644 index 0000000000000..235ef165bed2e --- /dev/null +++ b/tests/baselines/reference/asyncFunctionDeclaration9_es6.errors.txt @@ -0,0 +1,9 @@ +tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration9_es6.ts(2,19): error TS1109: Expression expected. + + +==== tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration9_es6.ts (1 errors) ==== + async function foo(): Promise { + var v = { [await]: foo } + ~ +!!! error TS1109: Expression expected. + } \ No newline at end of file diff --git a/tests/baselines/reference/asyncFunctionDeclaration9_es6.js b/tests/baselines/reference/asyncFunctionDeclaration9_es6.js new file mode 100644 index 0000000000000..8b5ea4c4b5c4b --- /dev/null +++ b/tests/baselines/reference/asyncFunctionDeclaration9_es6.js @@ -0,0 +1,11 @@ +//// [asyncFunctionDeclaration9_es6.ts] +async function foo(): Promise { + var v = { [await]: foo } +} + +//// [asyncFunctionDeclaration9_es6.js] +function foo() { + return __awaiter(function *() { + var v = { [yield ]: foo }; + }.apply(this, arguments), Promise); +} diff --git a/tests/baselines/reference/asyncGetter_es6.errors.txt b/tests/baselines/reference/asyncGetter_es6.errors.txt new file mode 100644 index 0000000000000..5f5a9f6b1d7f9 --- /dev/null +++ b/tests/baselines/reference/asyncGetter_es6.errors.txt @@ -0,0 +1,13 @@ +tests/cases/conformance/async/es6/asyncGetter_es6.ts(2,3): error TS1042: 'async' modifier cannot be used here. +tests/cases/conformance/async/es6/asyncGetter_es6.ts(2,13): error TS2378: A 'get' accessor must return a value or consist of a single 'throw' statement. + + +==== tests/cases/conformance/async/es6/asyncGetter_es6.ts (2 errors) ==== + class C { + async get foo() { + ~~~~~ +!!! error TS1042: 'async' modifier cannot be used here. + ~~~ +!!! error TS2378: A 'get' accessor must return a value or consist of a single 'throw' statement. + } + } \ No newline at end of file diff --git a/tests/baselines/reference/asyncGetter_es6.js b/tests/baselines/reference/asyncGetter_es6.js new file mode 100644 index 0000000000000..606f4d95dc7f6 --- /dev/null +++ b/tests/baselines/reference/asyncGetter_es6.js @@ -0,0 +1,11 @@ +//// [asyncGetter_es6.ts] +class C { + async get foo() { + } +} + +//// [asyncGetter_es6.js] +class C { + get foo() { + } +} diff --git a/tests/baselines/reference/asyncInterface_es6.errors.txt b/tests/baselines/reference/asyncInterface_es6.errors.txt new file mode 100644 index 0000000000000..c7519ba040e17 --- /dev/null +++ b/tests/baselines/reference/asyncInterface_es6.errors.txt @@ -0,0 +1,8 @@ +tests/cases/conformance/async/es6/asyncInterface_es6.ts(1,1): error TS1042: 'async' modifier cannot be used here. + + +==== tests/cases/conformance/async/es6/asyncInterface_es6.ts (1 errors) ==== + async interface I { + ~~~~~ +!!! error TS1042: 'async' modifier cannot be used here. + } \ No newline at end of file diff --git a/tests/baselines/reference/asyncInterface_es6.js b/tests/baselines/reference/asyncInterface_es6.js new file mode 100644 index 0000000000000..36314fa2141a7 --- /dev/null +++ b/tests/baselines/reference/asyncInterface_es6.js @@ -0,0 +1,5 @@ +//// [asyncInterface_es6.ts] +async interface I { +} + +//// [asyncInterface_es6.js] diff --git a/tests/baselines/reference/asyncModule_es6.errors.txt b/tests/baselines/reference/asyncModule_es6.errors.txt new file mode 100644 index 0000000000000..91e5e8ccdd3c5 --- /dev/null +++ b/tests/baselines/reference/asyncModule_es6.errors.txt @@ -0,0 +1,8 @@ +tests/cases/conformance/async/es6/asyncModule_es6.ts(1,1): error TS1042: 'async' modifier cannot be used here. + + +==== tests/cases/conformance/async/es6/asyncModule_es6.ts (1 errors) ==== + async module M { + ~~~~~ +!!! error TS1042: 'async' modifier cannot be used here. + } \ No newline at end of file diff --git a/tests/baselines/reference/asyncModule_es6.js b/tests/baselines/reference/asyncModule_es6.js new file mode 100644 index 0000000000000..e3e9306dbcbe6 --- /dev/null +++ b/tests/baselines/reference/asyncModule_es6.js @@ -0,0 +1,5 @@ +//// [asyncModule_es6.ts] +async module M { +} + +//// [asyncModule_es6.js] diff --git a/tests/baselines/reference/asyncSetter_es6.errors.txt b/tests/baselines/reference/asyncSetter_es6.errors.txt new file mode 100644 index 0000000000000..e60e05cbc550e --- /dev/null +++ b/tests/baselines/reference/asyncSetter_es6.errors.txt @@ -0,0 +1,10 @@ +tests/cases/conformance/async/es6/asyncSetter_es6.ts(2,3): error TS1042: 'async' modifier cannot be used here. + + +==== tests/cases/conformance/async/es6/asyncSetter_es6.ts (1 errors) ==== + class C { + async set foo(value) { + ~~~~~ +!!! error TS1042: 'async' modifier cannot be used here. + } + } \ No newline at end of file diff --git a/tests/baselines/reference/asyncSetter_es6.js b/tests/baselines/reference/asyncSetter_es6.js new file mode 100644 index 0000000000000..303e483f9a96c --- /dev/null +++ b/tests/baselines/reference/asyncSetter_es6.js @@ -0,0 +1,11 @@ +//// [asyncSetter_es6.ts] +class C { + async set foo(value) { + } +} + +//// [asyncSetter_es6.js] +class C { + set foo(value) { + } +} diff --git a/tests/baselines/reference/awaitBinaryExpression1_es6.js b/tests/baselines/reference/awaitBinaryExpression1_es6.js new file mode 100644 index 0000000000000..f92324dcdacbc --- /dev/null +++ b/tests/baselines/reference/awaitBinaryExpression1_es6.js @@ -0,0 +1,17 @@ +//// [awaitBinaryExpression1_es6.ts] +declare var a: boolean; +declare var p: Promise; +async function func(): Promise { + "before"; + var b = await p || a; + "after"; +} + +//// [awaitBinaryExpression1_es6.js] +function func() { + return __awaiter(function *() { + "before"; + var b = (yield p) || a; + "after"; + }.apply(this, arguments), Promise); +} diff --git a/tests/baselines/reference/awaitBinaryExpression1_es6.symbols b/tests/baselines/reference/awaitBinaryExpression1_es6.symbols new file mode 100644 index 0000000000000..373086ecbac5f --- /dev/null +++ b/tests/baselines/reference/awaitBinaryExpression1_es6.symbols @@ -0,0 +1,19 @@ +=== tests/cases/conformance/async/es6/awaitBinaryExpression/awaitBinaryExpression1_es6.ts === +declare var a: boolean; +>a : Symbol(a, Decl(awaitBinaryExpression1_es6.ts, 0, 11)) + +declare var p: Promise; +>p : Symbol(p, Decl(awaitBinaryExpression1_es6.ts, 1, 11)) +>Promise : Symbol(Promise, Decl(lib.d.ts, 4769, 1), Decl(lib.d.ts, 4853, 11)) + +async function func(): Promise { +>func : Symbol(func, Decl(awaitBinaryExpression1_es6.ts, 1, 32)) +>Promise : Symbol(Promise, Decl(lib.d.ts, 4769, 1), Decl(lib.d.ts, 4853, 11)) + + "before"; + var b = await p || a; +>b : Symbol(b, Decl(awaitBinaryExpression1_es6.ts, 4, 7)) +>a : Symbol(a, Decl(awaitBinaryExpression1_es6.ts, 0, 11)) + + "after"; +} diff --git a/tests/baselines/reference/awaitBinaryExpression1_es6.types b/tests/baselines/reference/awaitBinaryExpression1_es6.types new file mode 100644 index 0000000000000..59370dda14b6e --- /dev/null +++ b/tests/baselines/reference/awaitBinaryExpression1_es6.types @@ -0,0 +1,24 @@ +=== tests/cases/conformance/async/es6/awaitBinaryExpression/awaitBinaryExpression1_es6.ts === +declare var a: boolean; +>a : boolean + +declare var p: Promise; +>p : Promise +>Promise : Promise + +async function func(): Promise { +>func : () => Promise +>Promise : Promise + + "before"; +>"before" : string + + var b = await p || a; +>b : boolean +>await p || a : boolean +>p : any +>a : boolean + + "after"; +>"after" : string +} diff --git a/tests/baselines/reference/awaitBinaryExpression2_es6.js b/tests/baselines/reference/awaitBinaryExpression2_es6.js new file mode 100644 index 0000000000000..e2d3b3ba46f4f --- /dev/null +++ b/tests/baselines/reference/awaitBinaryExpression2_es6.js @@ -0,0 +1,17 @@ +//// [awaitBinaryExpression2_es6.ts] +declare var a: boolean; +declare var p: Promise; +async function func(): Promise { + "before"; + var b = await p && a; + "after"; +} + +//// [awaitBinaryExpression2_es6.js] +function func() { + return __awaiter(function *() { + "before"; + var b = (yield p) && a; + "after"; + }.apply(this, arguments), Promise); +} diff --git a/tests/baselines/reference/awaitBinaryExpression2_es6.symbols b/tests/baselines/reference/awaitBinaryExpression2_es6.symbols new file mode 100644 index 0000000000000..9331ad13ce58f --- /dev/null +++ b/tests/baselines/reference/awaitBinaryExpression2_es6.symbols @@ -0,0 +1,19 @@ +=== tests/cases/conformance/async/es6/awaitBinaryExpression/awaitBinaryExpression2_es6.ts === +declare var a: boolean; +>a : Symbol(a, Decl(awaitBinaryExpression2_es6.ts, 0, 11)) + +declare var p: Promise; +>p : Symbol(p, Decl(awaitBinaryExpression2_es6.ts, 1, 11)) +>Promise : Symbol(Promise, Decl(lib.d.ts, 4769, 1), Decl(lib.d.ts, 4853, 11)) + +async function func(): Promise { +>func : Symbol(func, Decl(awaitBinaryExpression2_es6.ts, 1, 32)) +>Promise : Symbol(Promise, Decl(lib.d.ts, 4769, 1), Decl(lib.d.ts, 4853, 11)) + + "before"; + var b = await p && a; +>b : Symbol(b, Decl(awaitBinaryExpression2_es6.ts, 4, 7)) +>a : Symbol(a, Decl(awaitBinaryExpression2_es6.ts, 0, 11)) + + "after"; +} diff --git a/tests/baselines/reference/awaitBinaryExpression2_es6.types b/tests/baselines/reference/awaitBinaryExpression2_es6.types new file mode 100644 index 0000000000000..c3f33bca2fafe --- /dev/null +++ b/tests/baselines/reference/awaitBinaryExpression2_es6.types @@ -0,0 +1,24 @@ +=== tests/cases/conformance/async/es6/awaitBinaryExpression/awaitBinaryExpression2_es6.ts === +declare var a: boolean; +>a : boolean + +declare var p: Promise; +>p : Promise +>Promise : Promise + +async function func(): Promise { +>func : () => Promise +>Promise : Promise + + "before"; +>"before" : string + + var b = await p && a; +>b : boolean +>await p && a : boolean +>p : any +>a : boolean + + "after"; +>"after" : string +} diff --git a/tests/baselines/reference/awaitBinaryExpression3_es6.js b/tests/baselines/reference/awaitBinaryExpression3_es6.js new file mode 100644 index 0000000000000..08e98d5dafee0 --- /dev/null +++ b/tests/baselines/reference/awaitBinaryExpression3_es6.js @@ -0,0 +1,17 @@ +//// [awaitBinaryExpression3_es6.ts] +declare var a: number; +declare var p: Promise; +async function func(): Promise { + "before"; + var b = await p + a; + "after"; +} + +//// [awaitBinaryExpression3_es6.js] +function func() { + return __awaiter(function *() { + "before"; + var b = (yield p) + a; + "after"; + }.apply(this, arguments), Promise); +} diff --git a/tests/baselines/reference/awaitBinaryExpression3_es6.symbols b/tests/baselines/reference/awaitBinaryExpression3_es6.symbols new file mode 100644 index 0000000000000..b1acda7013630 --- /dev/null +++ b/tests/baselines/reference/awaitBinaryExpression3_es6.symbols @@ -0,0 +1,19 @@ +=== tests/cases/conformance/async/es6/awaitBinaryExpression/awaitBinaryExpression3_es6.ts === +declare var a: number; +>a : Symbol(a, Decl(awaitBinaryExpression3_es6.ts, 0, 11)) + +declare var p: Promise; +>p : Symbol(p, Decl(awaitBinaryExpression3_es6.ts, 1, 11)) +>Promise : Symbol(Promise, Decl(lib.d.ts, 4769, 1), Decl(lib.d.ts, 4853, 11)) + +async function func(): Promise { +>func : Symbol(func, Decl(awaitBinaryExpression3_es6.ts, 1, 31)) +>Promise : Symbol(Promise, Decl(lib.d.ts, 4769, 1), Decl(lib.d.ts, 4853, 11)) + + "before"; + var b = await p + a; +>b : Symbol(b, Decl(awaitBinaryExpression3_es6.ts, 4, 7)) +>a : Symbol(a, Decl(awaitBinaryExpression3_es6.ts, 0, 11)) + + "after"; +} diff --git a/tests/baselines/reference/awaitBinaryExpression3_es6.types b/tests/baselines/reference/awaitBinaryExpression3_es6.types new file mode 100644 index 0000000000000..786eabadae47f --- /dev/null +++ b/tests/baselines/reference/awaitBinaryExpression3_es6.types @@ -0,0 +1,24 @@ +=== tests/cases/conformance/async/es6/awaitBinaryExpression/awaitBinaryExpression3_es6.ts === +declare var a: number; +>a : number + +declare var p: Promise; +>p : Promise +>Promise : Promise + +async function func(): Promise { +>func : () => Promise +>Promise : Promise + + "before"; +>"before" : string + + var b = await p + a; +>b : number +>await p + a : number +>p : any +>a : number + + "after"; +>"after" : string +} diff --git a/tests/baselines/reference/awaitBinaryExpression4_es6.js b/tests/baselines/reference/awaitBinaryExpression4_es6.js new file mode 100644 index 0000000000000..0eec5e990a544 --- /dev/null +++ b/tests/baselines/reference/awaitBinaryExpression4_es6.js @@ -0,0 +1,17 @@ +//// [awaitBinaryExpression4_es6.ts] +declare var a: boolean; +declare var p: Promise; +async function func(): Promise { + "before"; + var b = await p, a; + "after"; +} + +//// [awaitBinaryExpression4_es6.js] +function func() { + return __awaiter(function *() { + "before"; + var b = yield p, a; + "after"; + }.apply(this, arguments), Promise); +} diff --git a/tests/baselines/reference/awaitBinaryExpression4_es6.symbols b/tests/baselines/reference/awaitBinaryExpression4_es6.symbols new file mode 100644 index 0000000000000..c1a3bd903f4de --- /dev/null +++ b/tests/baselines/reference/awaitBinaryExpression4_es6.symbols @@ -0,0 +1,19 @@ +=== tests/cases/conformance/async/es6/awaitBinaryExpression/awaitBinaryExpression4_es6.ts === +declare var a: boolean; +>a : Symbol(a, Decl(awaitBinaryExpression4_es6.ts, 0, 11)) + +declare var p: Promise; +>p : Symbol(p, Decl(awaitBinaryExpression4_es6.ts, 1, 11)) +>Promise : Symbol(Promise, Decl(lib.d.ts, 4769, 1), Decl(lib.d.ts, 4853, 11)) + +async function func(): Promise { +>func : Symbol(func, Decl(awaitBinaryExpression4_es6.ts, 1, 32)) +>Promise : Symbol(Promise, Decl(lib.d.ts, 4769, 1), Decl(lib.d.ts, 4853, 11)) + + "before"; + var b = await p, a; +>b : Symbol(b, Decl(awaitBinaryExpression4_es6.ts, 4, 7)) +>a : Symbol(a, Decl(awaitBinaryExpression4_es6.ts, 4, 20)) + + "after"; +} diff --git a/tests/baselines/reference/awaitBinaryExpression4_es6.types b/tests/baselines/reference/awaitBinaryExpression4_es6.types new file mode 100644 index 0000000000000..73126b7797d75 --- /dev/null +++ b/tests/baselines/reference/awaitBinaryExpression4_es6.types @@ -0,0 +1,23 @@ +=== tests/cases/conformance/async/es6/awaitBinaryExpression/awaitBinaryExpression4_es6.ts === +declare var a: boolean; +>a : boolean + +declare var p: Promise; +>p : Promise +>Promise : Promise + +async function func(): Promise { +>func : () => Promise +>Promise : Promise + + "before"; +>"before" : string + + var b = await p, a; +>b : boolean +>p : any +>a : any + + "after"; +>"after" : string +} diff --git a/tests/baselines/reference/awaitBinaryExpression5_es6.js b/tests/baselines/reference/awaitBinaryExpression5_es6.js new file mode 100644 index 0000000000000..d725d55404add --- /dev/null +++ b/tests/baselines/reference/awaitBinaryExpression5_es6.js @@ -0,0 +1,19 @@ +//// [awaitBinaryExpression5_es6.ts] +declare var a: boolean; +declare var p: Promise; +async function func(): Promise { + "before"; + var o: { a: boolean; }; + o.a = await p; + "after"; +} + +//// [awaitBinaryExpression5_es6.js] +function func() { + return __awaiter(function *() { + "before"; + var o; + o.a = yield p; + "after"; + }.apply(this, arguments), Promise); +} diff --git a/tests/baselines/reference/awaitBinaryExpression5_es6.symbols b/tests/baselines/reference/awaitBinaryExpression5_es6.symbols new file mode 100644 index 0000000000000..cb74dcff7f62e --- /dev/null +++ b/tests/baselines/reference/awaitBinaryExpression5_es6.symbols @@ -0,0 +1,24 @@ +=== tests/cases/conformance/async/es6/awaitBinaryExpression/awaitBinaryExpression5_es6.ts === +declare var a: boolean; +>a : Symbol(a, Decl(awaitBinaryExpression5_es6.ts, 0, 11)) + +declare var p: Promise; +>p : Symbol(p, Decl(awaitBinaryExpression5_es6.ts, 1, 11)) +>Promise : Symbol(Promise, Decl(lib.d.ts, 4769, 1), Decl(lib.d.ts, 4853, 11)) + +async function func(): Promise { +>func : Symbol(func, Decl(awaitBinaryExpression5_es6.ts, 1, 32)) +>Promise : Symbol(Promise, Decl(lib.d.ts, 4769, 1), Decl(lib.d.ts, 4853, 11)) + + "before"; + var o: { a: boolean; }; +>o : Symbol(o, Decl(awaitBinaryExpression5_es6.ts, 4, 7)) +>a : Symbol(a, Decl(awaitBinaryExpression5_es6.ts, 4, 12)) + + o.a = await p; +>o.a : Symbol(a, Decl(awaitBinaryExpression5_es6.ts, 4, 12)) +>o : Symbol(o, Decl(awaitBinaryExpression5_es6.ts, 4, 7)) +>a : Symbol(a, Decl(awaitBinaryExpression5_es6.ts, 4, 12)) + + "after"; +} diff --git a/tests/baselines/reference/awaitBinaryExpression5_es6.types b/tests/baselines/reference/awaitBinaryExpression5_es6.types new file mode 100644 index 0000000000000..922e5887a770a --- /dev/null +++ b/tests/baselines/reference/awaitBinaryExpression5_es6.types @@ -0,0 +1,29 @@ +=== tests/cases/conformance/async/es6/awaitBinaryExpression/awaitBinaryExpression5_es6.ts === +declare var a: boolean; +>a : boolean + +declare var p: Promise; +>p : Promise +>Promise : Promise + +async function func(): Promise { +>func : () => Promise +>Promise : Promise + + "before"; +>"before" : string + + var o: { a: boolean; }; +>o : { a: boolean; } +>a : boolean + + o.a = await p; +>o.a = await p : boolean +>o.a : boolean +>o : { a: boolean; } +>a : boolean +>p : any + + "after"; +>"after" : string +} diff --git a/tests/baselines/reference/awaitCallExpression1_es6.js b/tests/baselines/reference/awaitCallExpression1_es6.js new file mode 100644 index 0000000000000..3391274ae7a5d --- /dev/null +++ b/tests/baselines/reference/awaitCallExpression1_es6.js @@ -0,0 +1,21 @@ +//// [awaitCallExpression1_es6.ts] +declare var a: boolean; +declare var p: Promise; +declare function fn(arg0: boolean, arg1: boolean, arg2: boolean): void; +declare var o: { fn(arg0: boolean, arg1: boolean, arg2: boolean): void; }; +declare var pfn: Promise<{ (arg0: boolean, arg1: boolean, arg2: boolean): void; }>; +declare var po: Promise<{ fn(arg0: boolean, arg1: boolean, arg2: boolean): void; }>; +async function func(): Promise { + "before"; + var b = fn(a, a, a); + "after"; +} + +//// [awaitCallExpression1_es6.js] +function func() { + return __awaiter(function *() { + "before"; + var b = fn(a, a, a); + "after"; + }.apply(this, arguments), Promise); +} diff --git a/tests/baselines/reference/awaitCallExpression1_es6.symbols b/tests/baselines/reference/awaitCallExpression1_es6.symbols new file mode 100644 index 0000000000000..f9756da1768e3 --- /dev/null +++ b/tests/baselines/reference/awaitCallExpression1_es6.symbols @@ -0,0 +1,50 @@ +=== tests/cases/conformance/async/es6/awaitCallExpression/awaitCallExpression1_es6.ts === +declare var a: boolean; +>a : Symbol(a, Decl(awaitCallExpression1_es6.ts, 0, 11)) + +declare var p: Promise; +>p : Symbol(p, Decl(awaitCallExpression1_es6.ts, 1, 11)) +>Promise : Symbol(Promise, Decl(lib.d.ts, 4769, 1), Decl(lib.d.ts, 4853, 11)) + +declare function fn(arg0: boolean, arg1: boolean, arg2: boolean): void; +>fn : Symbol(fn, Decl(awaitCallExpression1_es6.ts, 1, 32)) +>arg0 : Symbol(arg0, Decl(awaitCallExpression1_es6.ts, 2, 20)) +>arg1 : Symbol(arg1, Decl(awaitCallExpression1_es6.ts, 2, 34)) +>arg2 : Symbol(arg2, Decl(awaitCallExpression1_es6.ts, 2, 49)) + +declare var o: { fn(arg0: boolean, arg1: boolean, arg2: boolean): void; }; +>o : Symbol(o, Decl(awaitCallExpression1_es6.ts, 3, 11)) +>fn : Symbol(fn, Decl(awaitCallExpression1_es6.ts, 3, 16)) +>arg0 : Symbol(arg0, Decl(awaitCallExpression1_es6.ts, 3, 20)) +>arg1 : Symbol(arg1, Decl(awaitCallExpression1_es6.ts, 3, 34)) +>arg2 : Symbol(arg2, Decl(awaitCallExpression1_es6.ts, 3, 49)) + +declare var pfn: Promise<{ (arg0: boolean, arg1: boolean, arg2: boolean): void; }>; +>pfn : Symbol(pfn, Decl(awaitCallExpression1_es6.ts, 4, 11)) +>Promise : Symbol(Promise, Decl(lib.d.ts, 4769, 1), Decl(lib.d.ts, 4853, 11)) +>arg0 : Symbol(arg0, Decl(awaitCallExpression1_es6.ts, 4, 28)) +>arg1 : Symbol(arg1, Decl(awaitCallExpression1_es6.ts, 4, 42)) +>arg2 : Symbol(arg2, Decl(awaitCallExpression1_es6.ts, 4, 57)) + +declare var po: Promise<{ fn(arg0: boolean, arg1: boolean, arg2: boolean): void; }>; +>po : Symbol(po, Decl(awaitCallExpression1_es6.ts, 5, 11)) +>Promise : Symbol(Promise, Decl(lib.d.ts, 4769, 1), Decl(lib.d.ts, 4853, 11)) +>fn : Symbol(fn, Decl(awaitCallExpression1_es6.ts, 5, 25)) +>arg0 : Symbol(arg0, Decl(awaitCallExpression1_es6.ts, 5, 29)) +>arg1 : Symbol(arg1, Decl(awaitCallExpression1_es6.ts, 5, 43)) +>arg2 : Symbol(arg2, Decl(awaitCallExpression1_es6.ts, 5, 58)) + +async function func(): Promise { +>func : Symbol(func, Decl(awaitCallExpression1_es6.ts, 5, 84)) +>Promise : Symbol(Promise, Decl(lib.d.ts, 4769, 1), Decl(lib.d.ts, 4853, 11)) + + "before"; + var b = fn(a, a, a); +>b : Symbol(b, Decl(awaitCallExpression1_es6.ts, 8, 7)) +>fn : Symbol(fn, Decl(awaitCallExpression1_es6.ts, 1, 32)) +>a : Symbol(a, Decl(awaitCallExpression1_es6.ts, 0, 11)) +>a : Symbol(a, Decl(awaitCallExpression1_es6.ts, 0, 11)) +>a : Symbol(a, Decl(awaitCallExpression1_es6.ts, 0, 11)) + + "after"; +} diff --git a/tests/baselines/reference/awaitCallExpression1_es6.types b/tests/baselines/reference/awaitCallExpression1_es6.types new file mode 100644 index 0000000000000..334175b7edbcd --- /dev/null +++ b/tests/baselines/reference/awaitCallExpression1_es6.types @@ -0,0 +1,54 @@ +=== tests/cases/conformance/async/es6/awaitCallExpression/awaitCallExpression1_es6.ts === +declare var a: boolean; +>a : boolean + +declare var p: Promise; +>p : Promise +>Promise : Promise + +declare function fn(arg0: boolean, arg1: boolean, arg2: boolean): void; +>fn : (arg0: boolean, arg1: boolean, arg2: boolean) => void +>arg0 : boolean +>arg1 : boolean +>arg2 : boolean + +declare var o: { fn(arg0: boolean, arg1: boolean, arg2: boolean): void; }; +>o : { fn(arg0: boolean, arg1: boolean, arg2: boolean): void; } +>fn : (arg0: boolean, arg1: boolean, arg2: boolean) => void +>arg0 : boolean +>arg1 : boolean +>arg2 : boolean + +declare var pfn: Promise<{ (arg0: boolean, arg1: boolean, arg2: boolean): void; }>; +>pfn : Promise<(arg0: boolean, arg1: boolean, arg2: boolean) => void> +>Promise : Promise +>arg0 : boolean +>arg1 : boolean +>arg2 : boolean + +declare var po: Promise<{ fn(arg0: boolean, arg1: boolean, arg2: boolean): void; }>; +>po : Promise<{ fn(arg0: boolean, arg1: boolean, arg2: boolean): void; }> +>Promise : Promise +>fn : (arg0: boolean, arg1: boolean, arg2: boolean) => void +>arg0 : boolean +>arg1 : boolean +>arg2 : boolean + +async function func(): Promise { +>func : () => Promise +>Promise : Promise + + "before"; +>"before" : string + + var b = fn(a, a, a); +>b : void +>fn(a, a, a) : void +>fn : (arg0: boolean, arg1: boolean, arg2: boolean) => void +>a : boolean +>a : boolean +>a : boolean + + "after"; +>"after" : string +} diff --git a/tests/baselines/reference/awaitCallExpression2_es6.js b/tests/baselines/reference/awaitCallExpression2_es6.js new file mode 100644 index 0000000000000..fd7129e84182e --- /dev/null +++ b/tests/baselines/reference/awaitCallExpression2_es6.js @@ -0,0 +1,21 @@ +//// [awaitCallExpression2_es6.ts] +declare var a: boolean; +declare var p: Promise; +declare function fn(arg0: boolean, arg1: boolean, arg2: boolean): void; +declare var o: { fn(arg0: boolean, arg1: boolean, arg2: boolean): void; }; +declare var pfn: Promise<{ (arg0: boolean, arg1: boolean, arg2: boolean): void; }>; +declare var po: Promise<{ fn(arg0: boolean, arg1: boolean, arg2: boolean): void; }>; +async function func(): Promise { + "before"; + var b = fn(await p, a, a); + "after"; +} + +//// [awaitCallExpression2_es6.js] +function func() { + return __awaiter(function *() { + "before"; + var b = fn(yield p, a, a); + "after"; + }.apply(this, arguments), Promise); +} diff --git a/tests/baselines/reference/awaitCallExpression2_es6.symbols b/tests/baselines/reference/awaitCallExpression2_es6.symbols new file mode 100644 index 0000000000000..2e5b8761163be --- /dev/null +++ b/tests/baselines/reference/awaitCallExpression2_es6.symbols @@ -0,0 +1,49 @@ +=== tests/cases/conformance/async/es6/awaitCallExpression/awaitCallExpression2_es6.ts === +declare var a: boolean; +>a : Symbol(a, Decl(awaitCallExpression2_es6.ts, 0, 11)) + +declare var p: Promise; +>p : Symbol(p, Decl(awaitCallExpression2_es6.ts, 1, 11)) +>Promise : Symbol(Promise, Decl(lib.d.ts, 4769, 1), Decl(lib.d.ts, 4853, 11)) + +declare function fn(arg0: boolean, arg1: boolean, arg2: boolean): void; +>fn : Symbol(fn, Decl(awaitCallExpression2_es6.ts, 1, 32)) +>arg0 : Symbol(arg0, Decl(awaitCallExpression2_es6.ts, 2, 20)) +>arg1 : Symbol(arg1, Decl(awaitCallExpression2_es6.ts, 2, 34)) +>arg2 : Symbol(arg2, Decl(awaitCallExpression2_es6.ts, 2, 49)) + +declare var o: { fn(arg0: boolean, arg1: boolean, arg2: boolean): void; }; +>o : Symbol(o, Decl(awaitCallExpression2_es6.ts, 3, 11)) +>fn : Symbol(fn, Decl(awaitCallExpression2_es6.ts, 3, 16)) +>arg0 : Symbol(arg0, Decl(awaitCallExpression2_es6.ts, 3, 20)) +>arg1 : Symbol(arg1, Decl(awaitCallExpression2_es6.ts, 3, 34)) +>arg2 : Symbol(arg2, Decl(awaitCallExpression2_es6.ts, 3, 49)) + +declare var pfn: Promise<{ (arg0: boolean, arg1: boolean, arg2: boolean): void; }>; +>pfn : Symbol(pfn, Decl(awaitCallExpression2_es6.ts, 4, 11)) +>Promise : Symbol(Promise, Decl(lib.d.ts, 4769, 1), Decl(lib.d.ts, 4853, 11)) +>arg0 : Symbol(arg0, Decl(awaitCallExpression2_es6.ts, 4, 28)) +>arg1 : Symbol(arg1, Decl(awaitCallExpression2_es6.ts, 4, 42)) +>arg2 : Symbol(arg2, Decl(awaitCallExpression2_es6.ts, 4, 57)) + +declare var po: Promise<{ fn(arg0: boolean, arg1: boolean, arg2: boolean): void; }>; +>po : Symbol(po, Decl(awaitCallExpression2_es6.ts, 5, 11)) +>Promise : Symbol(Promise, Decl(lib.d.ts, 4769, 1), Decl(lib.d.ts, 4853, 11)) +>fn : Symbol(fn, Decl(awaitCallExpression2_es6.ts, 5, 25)) +>arg0 : Symbol(arg0, Decl(awaitCallExpression2_es6.ts, 5, 29)) +>arg1 : Symbol(arg1, Decl(awaitCallExpression2_es6.ts, 5, 43)) +>arg2 : Symbol(arg2, Decl(awaitCallExpression2_es6.ts, 5, 58)) + +async function func(): Promise { +>func : Symbol(func, Decl(awaitCallExpression2_es6.ts, 5, 84)) +>Promise : Symbol(Promise, Decl(lib.d.ts, 4769, 1), Decl(lib.d.ts, 4853, 11)) + + "before"; + var b = fn(await p, a, a); +>b : Symbol(b, Decl(awaitCallExpression2_es6.ts, 8, 7)) +>fn : Symbol(fn, Decl(awaitCallExpression2_es6.ts, 1, 32)) +>a : Symbol(a, Decl(awaitCallExpression2_es6.ts, 0, 11)) +>a : Symbol(a, Decl(awaitCallExpression2_es6.ts, 0, 11)) + + "after"; +} diff --git a/tests/baselines/reference/awaitCallExpression2_es6.types b/tests/baselines/reference/awaitCallExpression2_es6.types new file mode 100644 index 0000000000000..6c7f02a578a0e --- /dev/null +++ b/tests/baselines/reference/awaitCallExpression2_es6.types @@ -0,0 +1,54 @@ +=== tests/cases/conformance/async/es6/awaitCallExpression/awaitCallExpression2_es6.ts === +declare var a: boolean; +>a : boolean + +declare var p: Promise; +>p : Promise +>Promise : Promise + +declare function fn(arg0: boolean, arg1: boolean, arg2: boolean): void; +>fn : (arg0: boolean, arg1: boolean, arg2: boolean) => void +>arg0 : boolean +>arg1 : boolean +>arg2 : boolean + +declare var o: { fn(arg0: boolean, arg1: boolean, arg2: boolean): void; }; +>o : { fn(arg0: boolean, arg1: boolean, arg2: boolean): void; } +>fn : (arg0: boolean, arg1: boolean, arg2: boolean) => void +>arg0 : boolean +>arg1 : boolean +>arg2 : boolean + +declare var pfn: Promise<{ (arg0: boolean, arg1: boolean, arg2: boolean): void; }>; +>pfn : Promise<(arg0: boolean, arg1: boolean, arg2: boolean) => void> +>Promise : Promise +>arg0 : boolean +>arg1 : boolean +>arg2 : boolean + +declare var po: Promise<{ fn(arg0: boolean, arg1: boolean, arg2: boolean): void; }>; +>po : Promise<{ fn(arg0: boolean, arg1: boolean, arg2: boolean): void; }> +>Promise : Promise +>fn : (arg0: boolean, arg1: boolean, arg2: boolean) => void +>arg0 : boolean +>arg1 : boolean +>arg2 : boolean + +async function func(): Promise { +>func : () => Promise +>Promise : Promise + + "before"; +>"before" : string + + var b = fn(await p, a, a); +>b : void +>fn(await p, a, a) : void +>fn : (arg0: boolean, arg1: boolean, arg2: boolean) => void +>p : any +>a : boolean +>a : boolean + + "after"; +>"after" : string +} diff --git a/tests/baselines/reference/awaitCallExpression3_es6.js b/tests/baselines/reference/awaitCallExpression3_es6.js new file mode 100644 index 0000000000000..4f0d55185e2d4 --- /dev/null +++ b/tests/baselines/reference/awaitCallExpression3_es6.js @@ -0,0 +1,21 @@ +//// [awaitCallExpression3_es6.ts] +declare var a: boolean; +declare var p: Promise; +declare function fn(arg0: boolean, arg1: boolean, arg2: boolean): void; +declare var o: { fn(arg0: boolean, arg1: boolean, arg2: boolean): void; }; +declare var pfn: Promise<{ (arg0: boolean, arg1: boolean, arg2: boolean): void; }>; +declare var po: Promise<{ fn(arg0: boolean, arg1: boolean, arg2: boolean): void; }>; +async function func(): Promise { + "before"; + var b = fn(a, await p, a); + "after"; +} + +//// [awaitCallExpression3_es6.js] +function func() { + return __awaiter(function *() { + "before"; + var b = fn(a, yield p, a); + "after"; + }.apply(this, arguments), Promise); +} diff --git a/tests/baselines/reference/awaitCallExpression3_es6.symbols b/tests/baselines/reference/awaitCallExpression3_es6.symbols new file mode 100644 index 0000000000000..331fbeb8e6eed --- /dev/null +++ b/tests/baselines/reference/awaitCallExpression3_es6.symbols @@ -0,0 +1,49 @@ +=== tests/cases/conformance/async/es6/awaitCallExpression/awaitCallExpression3_es6.ts === +declare var a: boolean; +>a : Symbol(a, Decl(awaitCallExpression3_es6.ts, 0, 11)) + +declare var p: Promise; +>p : Symbol(p, Decl(awaitCallExpression3_es6.ts, 1, 11)) +>Promise : Symbol(Promise, Decl(lib.d.ts, 4769, 1), Decl(lib.d.ts, 4853, 11)) + +declare function fn(arg0: boolean, arg1: boolean, arg2: boolean): void; +>fn : Symbol(fn, Decl(awaitCallExpression3_es6.ts, 1, 32)) +>arg0 : Symbol(arg0, Decl(awaitCallExpression3_es6.ts, 2, 20)) +>arg1 : Symbol(arg1, Decl(awaitCallExpression3_es6.ts, 2, 34)) +>arg2 : Symbol(arg2, Decl(awaitCallExpression3_es6.ts, 2, 49)) + +declare var o: { fn(arg0: boolean, arg1: boolean, arg2: boolean): void; }; +>o : Symbol(o, Decl(awaitCallExpression3_es6.ts, 3, 11)) +>fn : Symbol(fn, Decl(awaitCallExpression3_es6.ts, 3, 16)) +>arg0 : Symbol(arg0, Decl(awaitCallExpression3_es6.ts, 3, 20)) +>arg1 : Symbol(arg1, Decl(awaitCallExpression3_es6.ts, 3, 34)) +>arg2 : Symbol(arg2, Decl(awaitCallExpression3_es6.ts, 3, 49)) + +declare var pfn: Promise<{ (arg0: boolean, arg1: boolean, arg2: boolean): void; }>; +>pfn : Symbol(pfn, Decl(awaitCallExpression3_es6.ts, 4, 11)) +>Promise : Symbol(Promise, Decl(lib.d.ts, 4769, 1), Decl(lib.d.ts, 4853, 11)) +>arg0 : Symbol(arg0, Decl(awaitCallExpression3_es6.ts, 4, 28)) +>arg1 : Symbol(arg1, Decl(awaitCallExpression3_es6.ts, 4, 42)) +>arg2 : Symbol(arg2, Decl(awaitCallExpression3_es6.ts, 4, 57)) + +declare var po: Promise<{ fn(arg0: boolean, arg1: boolean, arg2: boolean): void; }>; +>po : Symbol(po, Decl(awaitCallExpression3_es6.ts, 5, 11)) +>Promise : Symbol(Promise, Decl(lib.d.ts, 4769, 1), Decl(lib.d.ts, 4853, 11)) +>fn : Symbol(fn, Decl(awaitCallExpression3_es6.ts, 5, 25)) +>arg0 : Symbol(arg0, Decl(awaitCallExpression3_es6.ts, 5, 29)) +>arg1 : Symbol(arg1, Decl(awaitCallExpression3_es6.ts, 5, 43)) +>arg2 : Symbol(arg2, Decl(awaitCallExpression3_es6.ts, 5, 58)) + +async function func(): Promise { +>func : Symbol(func, Decl(awaitCallExpression3_es6.ts, 5, 84)) +>Promise : Symbol(Promise, Decl(lib.d.ts, 4769, 1), Decl(lib.d.ts, 4853, 11)) + + "before"; + var b = fn(a, await p, a); +>b : Symbol(b, Decl(awaitCallExpression3_es6.ts, 8, 7)) +>fn : Symbol(fn, Decl(awaitCallExpression3_es6.ts, 1, 32)) +>a : Symbol(a, Decl(awaitCallExpression3_es6.ts, 0, 11)) +>a : Symbol(a, Decl(awaitCallExpression3_es6.ts, 0, 11)) + + "after"; +} diff --git a/tests/baselines/reference/awaitCallExpression3_es6.types b/tests/baselines/reference/awaitCallExpression3_es6.types new file mode 100644 index 0000000000000..24d22db3c8c8f --- /dev/null +++ b/tests/baselines/reference/awaitCallExpression3_es6.types @@ -0,0 +1,54 @@ +=== tests/cases/conformance/async/es6/awaitCallExpression/awaitCallExpression3_es6.ts === +declare var a: boolean; +>a : boolean + +declare var p: Promise; +>p : Promise +>Promise : Promise + +declare function fn(arg0: boolean, arg1: boolean, arg2: boolean): void; +>fn : (arg0: boolean, arg1: boolean, arg2: boolean) => void +>arg0 : boolean +>arg1 : boolean +>arg2 : boolean + +declare var o: { fn(arg0: boolean, arg1: boolean, arg2: boolean): void; }; +>o : { fn(arg0: boolean, arg1: boolean, arg2: boolean): void; } +>fn : (arg0: boolean, arg1: boolean, arg2: boolean) => void +>arg0 : boolean +>arg1 : boolean +>arg2 : boolean + +declare var pfn: Promise<{ (arg0: boolean, arg1: boolean, arg2: boolean): void; }>; +>pfn : Promise<(arg0: boolean, arg1: boolean, arg2: boolean) => void> +>Promise : Promise +>arg0 : boolean +>arg1 : boolean +>arg2 : boolean + +declare var po: Promise<{ fn(arg0: boolean, arg1: boolean, arg2: boolean): void; }>; +>po : Promise<{ fn(arg0: boolean, arg1: boolean, arg2: boolean): void; }> +>Promise : Promise +>fn : (arg0: boolean, arg1: boolean, arg2: boolean) => void +>arg0 : boolean +>arg1 : boolean +>arg2 : boolean + +async function func(): Promise { +>func : () => Promise +>Promise : Promise + + "before"; +>"before" : string + + var b = fn(a, await p, a); +>b : void +>fn(a, await p, a) : void +>fn : (arg0: boolean, arg1: boolean, arg2: boolean) => void +>a : boolean +>p : any +>a : boolean + + "after"; +>"after" : string +} diff --git a/tests/baselines/reference/awaitCallExpression4_es6.js b/tests/baselines/reference/awaitCallExpression4_es6.js new file mode 100644 index 0000000000000..7ec6c6ff90e27 --- /dev/null +++ b/tests/baselines/reference/awaitCallExpression4_es6.js @@ -0,0 +1,21 @@ +//// [awaitCallExpression4_es6.ts] +declare var a: boolean; +declare var p: Promise; +declare function fn(arg0: boolean, arg1: boolean, arg2: boolean): void; +declare var o: { fn(arg0: boolean, arg1: boolean, arg2: boolean): void; }; +declare var pfn: Promise<{ (arg0: boolean, arg1: boolean, arg2: boolean): void; }>; +declare var po: Promise<{ fn(arg0: boolean, arg1: boolean, arg2: boolean): void; }>; +async function func(): Promise { + "before"; + var b = (await pfn)(a, a, a); + "after"; +} + +//// [awaitCallExpression4_es6.js] +function func() { + return __awaiter(function *() { + "before"; + var b = (yield pfn)(a, a, a); + "after"; + }.apply(this, arguments), Promise); +} diff --git a/tests/baselines/reference/awaitCallExpression4_es6.symbols b/tests/baselines/reference/awaitCallExpression4_es6.symbols new file mode 100644 index 0000000000000..cc3407610b78f --- /dev/null +++ b/tests/baselines/reference/awaitCallExpression4_es6.symbols @@ -0,0 +1,49 @@ +=== tests/cases/conformance/async/es6/awaitCallExpression/awaitCallExpression4_es6.ts === +declare var a: boolean; +>a : Symbol(a, Decl(awaitCallExpression4_es6.ts, 0, 11)) + +declare var p: Promise; +>p : Symbol(p, Decl(awaitCallExpression4_es6.ts, 1, 11)) +>Promise : Symbol(Promise, Decl(lib.d.ts, 4769, 1), Decl(lib.d.ts, 4853, 11)) + +declare function fn(arg0: boolean, arg1: boolean, arg2: boolean): void; +>fn : Symbol(fn, Decl(awaitCallExpression4_es6.ts, 1, 32)) +>arg0 : Symbol(arg0, Decl(awaitCallExpression4_es6.ts, 2, 20)) +>arg1 : Symbol(arg1, Decl(awaitCallExpression4_es6.ts, 2, 34)) +>arg2 : Symbol(arg2, Decl(awaitCallExpression4_es6.ts, 2, 49)) + +declare var o: { fn(arg0: boolean, arg1: boolean, arg2: boolean): void; }; +>o : Symbol(o, Decl(awaitCallExpression4_es6.ts, 3, 11)) +>fn : Symbol(fn, Decl(awaitCallExpression4_es6.ts, 3, 16)) +>arg0 : Symbol(arg0, Decl(awaitCallExpression4_es6.ts, 3, 20)) +>arg1 : Symbol(arg1, Decl(awaitCallExpression4_es6.ts, 3, 34)) +>arg2 : Symbol(arg2, Decl(awaitCallExpression4_es6.ts, 3, 49)) + +declare var pfn: Promise<{ (arg0: boolean, arg1: boolean, arg2: boolean): void; }>; +>pfn : Symbol(pfn, Decl(awaitCallExpression4_es6.ts, 4, 11)) +>Promise : Symbol(Promise, Decl(lib.d.ts, 4769, 1), Decl(lib.d.ts, 4853, 11)) +>arg0 : Symbol(arg0, Decl(awaitCallExpression4_es6.ts, 4, 28)) +>arg1 : Symbol(arg1, Decl(awaitCallExpression4_es6.ts, 4, 42)) +>arg2 : Symbol(arg2, Decl(awaitCallExpression4_es6.ts, 4, 57)) + +declare var po: Promise<{ fn(arg0: boolean, arg1: boolean, arg2: boolean): void; }>; +>po : Symbol(po, Decl(awaitCallExpression4_es6.ts, 5, 11)) +>Promise : Symbol(Promise, Decl(lib.d.ts, 4769, 1), Decl(lib.d.ts, 4853, 11)) +>fn : Symbol(fn, Decl(awaitCallExpression4_es6.ts, 5, 25)) +>arg0 : Symbol(arg0, Decl(awaitCallExpression4_es6.ts, 5, 29)) +>arg1 : Symbol(arg1, Decl(awaitCallExpression4_es6.ts, 5, 43)) +>arg2 : Symbol(arg2, Decl(awaitCallExpression4_es6.ts, 5, 58)) + +async function func(): Promise { +>func : Symbol(func, Decl(awaitCallExpression4_es6.ts, 5, 84)) +>Promise : Symbol(Promise, Decl(lib.d.ts, 4769, 1), Decl(lib.d.ts, 4853, 11)) + + "before"; + var b = (await pfn)(a, a, a); +>b : Symbol(b, Decl(awaitCallExpression4_es6.ts, 8, 7)) +>a : Symbol(a, Decl(awaitCallExpression4_es6.ts, 0, 11)) +>a : Symbol(a, Decl(awaitCallExpression4_es6.ts, 0, 11)) +>a : Symbol(a, Decl(awaitCallExpression4_es6.ts, 0, 11)) + + "after"; +} diff --git a/tests/baselines/reference/awaitCallExpression4_es6.types b/tests/baselines/reference/awaitCallExpression4_es6.types new file mode 100644 index 0000000000000..0411546642796 --- /dev/null +++ b/tests/baselines/reference/awaitCallExpression4_es6.types @@ -0,0 +1,55 @@ +=== tests/cases/conformance/async/es6/awaitCallExpression/awaitCallExpression4_es6.ts === +declare var a: boolean; +>a : boolean + +declare var p: Promise; +>p : Promise +>Promise : Promise + +declare function fn(arg0: boolean, arg1: boolean, arg2: boolean): void; +>fn : (arg0: boolean, arg1: boolean, arg2: boolean) => void +>arg0 : boolean +>arg1 : boolean +>arg2 : boolean + +declare var o: { fn(arg0: boolean, arg1: boolean, arg2: boolean): void; }; +>o : { fn(arg0: boolean, arg1: boolean, arg2: boolean): void; } +>fn : (arg0: boolean, arg1: boolean, arg2: boolean) => void +>arg0 : boolean +>arg1 : boolean +>arg2 : boolean + +declare var pfn: Promise<{ (arg0: boolean, arg1: boolean, arg2: boolean): void; }>; +>pfn : Promise<(arg0: boolean, arg1: boolean, arg2: boolean) => void> +>Promise : Promise +>arg0 : boolean +>arg1 : boolean +>arg2 : boolean + +declare var po: Promise<{ fn(arg0: boolean, arg1: boolean, arg2: boolean): void; }>; +>po : Promise<{ fn(arg0: boolean, arg1: boolean, arg2: boolean): void; }> +>Promise : Promise +>fn : (arg0: boolean, arg1: boolean, arg2: boolean) => void +>arg0 : boolean +>arg1 : boolean +>arg2 : boolean + +async function func(): Promise { +>func : () => Promise +>Promise : Promise + + "before"; +>"before" : string + + var b = (await pfn)(a, a, a); +>b : void +>(await pfn)(a, a, a) : void +>(await pfn) : (arg0: boolean, arg1: boolean, arg2: boolean) => void +>pfn : any +>a : boolean +>a : boolean +>a : boolean + + "after"; +>"after" : string +} diff --git a/tests/baselines/reference/awaitCallExpression5_es6.js b/tests/baselines/reference/awaitCallExpression5_es6.js new file mode 100644 index 0000000000000..f41d0ae994fdc --- /dev/null +++ b/tests/baselines/reference/awaitCallExpression5_es6.js @@ -0,0 +1,21 @@ +//// [awaitCallExpression5_es6.ts] +declare var a: boolean; +declare var p: Promise; +declare function fn(arg0: boolean, arg1: boolean, arg2: boolean): void; +declare var o: { fn(arg0: boolean, arg1: boolean, arg2: boolean): void; }; +declare var pfn: Promise<{ (arg0: boolean, arg1: boolean, arg2: boolean): void; }>; +declare var po: Promise<{ fn(arg0: boolean, arg1: boolean, arg2: boolean): void; }>; +async function func(): Promise { + "before"; + var b = o.fn(a, a, a); + "after"; +} + +//// [awaitCallExpression5_es6.js] +function func() { + return __awaiter(function *() { + "before"; + var b = o.fn(a, a, a); + "after"; + }.apply(this, arguments), Promise); +} diff --git a/tests/baselines/reference/awaitCallExpression5_es6.symbols b/tests/baselines/reference/awaitCallExpression5_es6.symbols new file mode 100644 index 0000000000000..0063434d0fb0e --- /dev/null +++ b/tests/baselines/reference/awaitCallExpression5_es6.symbols @@ -0,0 +1,52 @@ +=== tests/cases/conformance/async/es6/awaitCallExpression/awaitCallExpression5_es6.ts === +declare var a: boolean; +>a : Symbol(a, Decl(awaitCallExpression5_es6.ts, 0, 11)) + +declare var p: Promise; +>p : Symbol(p, Decl(awaitCallExpression5_es6.ts, 1, 11)) +>Promise : Symbol(Promise, Decl(lib.d.ts, 4769, 1), Decl(lib.d.ts, 4853, 11)) + +declare function fn(arg0: boolean, arg1: boolean, arg2: boolean): void; +>fn : Symbol(fn, Decl(awaitCallExpression5_es6.ts, 1, 32)) +>arg0 : Symbol(arg0, Decl(awaitCallExpression5_es6.ts, 2, 20)) +>arg1 : Symbol(arg1, Decl(awaitCallExpression5_es6.ts, 2, 34)) +>arg2 : Symbol(arg2, Decl(awaitCallExpression5_es6.ts, 2, 49)) + +declare var o: { fn(arg0: boolean, arg1: boolean, arg2: boolean): void; }; +>o : Symbol(o, Decl(awaitCallExpression5_es6.ts, 3, 11)) +>fn : Symbol(fn, Decl(awaitCallExpression5_es6.ts, 3, 16)) +>arg0 : Symbol(arg0, Decl(awaitCallExpression5_es6.ts, 3, 20)) +>arg1 : Symbol(arg1, Decl(awaitCallExpression5_es6.ts, 3, 34)) +>arg2 : Symbol(arg2, Decl(awaitCallExpression5_es6.ts, 3, 49)) + +declare var pfn: Promise<{ (arg0: boolean, arg1: boolean, arg2: boolean): void; }>; +>pfn : Symbol(pfn, Decl(awaitCallExpression5_es6.ts, 4, 11)) +>Promise : Symbol(Promise, Decl(lib.d.ts, 4769, 1), Decl(lib.d.ts, 4853, 11)) +>arg0 : Symbol(arg0, Decl(awaitCallExpression5_es6.ts, 4, 28)) +>arg1 : Symbol(arg1, Decl(awaitCallExpression5_es6.ts, 4, 42)) +>arg2 : Symbol(arg2, Decl(awaitCallExpression5_es6.ts, 4, 57)) + +declare var po: Promise<{ fn(arg0: boolean, arg1: boolean, arg2: boolean): void; }>; +>po : Symbol(po, Decl(awaitCallExpression5_es6.ts, 5, 11)) +>Promise : Symbol(Promise, Decl(lib.d.ts, 4769, 1), Decl(lib.d.ts, 4853, 11)) +>fn : Symbol(fn, Decl(awaitCallExpression5_es6.ts, 5, 25)) +>arg0 : Symbol(arg0, Decl(awaitCallExpression5_es6.ts, 5, 29)) +>arg1 : Symbol(arg1, Decl(awaitCallExpression5_es6.ts, 5, 43)) +>arg2 : Symbol(arg2, Decl(awaitCallExpression5_es6.ts, 5, 58)) + +async function func(): Promise { +>func : Symbol(func, Decl(awaitCallExpression5_es6.ts, 5, 84)) +>Promise : Symbol(Promise, Decl(lib.d.ts, 4769, 1), Decl(lib.d.ts, 4853, 11)) + + "before"; + var b = o.fn(a, a, a); +>b : Symbol(b, Decl(awaitCallExpression5_es6.ts, 8, 7)) +>o.fn : Symbol(fn, Decl(awaitCallExpression5_es6.ts, 3, 16)) +>o : Symbol(o, Decl(awaitCallExpression5_es6.ts, 3, 11)) +>fn : Symbol(fn, Decl(awaitCallExpression5_es6.ts, 3, 16)) +>a : Symbol(a, Decl(awaitCallExpression5_es6.ts, 0, 11)) +>a : Symbol(a, Decl(awaitCallExpression5_es6.ts, 0, 11)) +>a : Symbol(a, Decl(awaitCallExpression5_es6.ts, 0, 11)) + + "after"; +} diff --git a/tests/baselines/reference/awaitCallExpression5_es6.types b/tests/baselines/reference/awaitCallExpression5_es6.types new file mode 100644 index 0000000000000..5074c007743c3 --- /dev/null +++ b/tests/baselines/reference/awaitCallExpression5_es6.types @@ -0,0 +1,56 @@ +=== tests/cases/conformance/async/es6/awaitCallExpression/awaitCallExpression5_es6.ts === +declare var a: boolean; +>a : boolean + +declare var p: Promise; +>p : Promise +>Promise : Promise + +declare function fn(arg0: boolean, arg1: boolean, arg2: boolean): void; +>fn : (arg0: boolean, arg1: boolean, arg2: boolean) => void +>arg0 : boolean +>arg1 : boolean +>arg2 : boolean + +declare var o: { fn(arg0: boolean, arg1: boolean, arg2: boolean): void; }; +>o : { fn(arg0: boolean, arg1: boolean, arg2: boolean): void; } +>fn : (arg0: boolean, arg1: boolean, arg2: boolean) => void +>arg0 : boolean +>arg1 : boolean +>arg2 : boolean + +declare var pfn: Promise<{ (arg0: boolean, arg1: boolean, arg2: boolean): void; }>; +>pfn : Promise<(arg0: boolean, arg1: boolean, arg2: boolean) => void> +>Promise : Promise +>arg0 : boolean +>arg1 : boolean +>arg2 : boolean + +declare var po: Promise<{ fn(arg0: boolean, arg1: boolean, arg2: boolean): void; }>; +>po : Promise<{ fn(arg0: boolean, arg1: boolean, arg2: boolean): void; }> +>Promise : Promise +>fn : (arg0: boolean, arg1: boolean, arg2: boolean) => void +>arg0 : boolean +>arg1 : boolean +>arg2 : boolean + +async function func(): Promise { +>func : () => Promise +>Promise : Promise + + "before"; +>"before" : string + + var b = o.fn(a, a, a); +>b : void +>o.fn(a, a, a) : void +>o.fn : (arg0: boolean, arg1: boolean, arg2: boolean) => void +>o : { fn(arg0: boolean, arg1: boolean, arg2: boolean): void; } +>fn : (arg0: boolean, arg1: boolean, arg2: boolean) => void +>a : boolean +>a : boolean +>a : boolean + + "after"; +>"after" : string +} diff --git a/tests/baselines/reference/awaitCallExpression6_es6.js b/tests/baselines/reference/awaitCallExpression6_es6.js new file mode 100644 index 0000000000000..d6c0e3707483d --- /dev/null +++ b/tests/baselines/reference/awaitCallExpression6_es6.js @@ -0,0 +1,21 @@ +//// [awaitCallExpression6_es6.ts] +declare var a: boolean; +declare var p: Promise; +declare function fn(arg0: boolean, arg1: boolean, arg2: boolean): void; +declare var o: { fn(arg0: boolean, arg1: boolean, arg2: boolean): void; }; +declare var pfn: Promise<{ (arg0: boolean, arg1: boolean, arg2: boolean): void; }>; +declare var po: Promise<{ fn(arg0: boolean, arg1: boolean, arg2: boolean): void; }>; +async function func(): Promise { + "before"; + var b = o.fn(await p, a, a); + "after"; +} + +//// [awaitCallExpression6_es6.js] +function func() { + return __awaiter(function *() { + "before"; + var b = o.fn(yield p, a, a); + "after"; + }.apply(this, arguments), Promise); +} diff --git a/tests/baselines/reference/awaitCallExpression6_es6.symbols b/tests/baselines/reference/awaitCallExpression6_es6.symbols new file mode 100644 index 0000000000000..9f99f55f26c6b --- /dev/null +++ b/tests/baselines/reference/awaitCallExpression6_es6.symbols @@ -0,0 +1,51 @@ +=== tests/cases/conformance/async/es6/awaitCallExpression/awaitCallExpression6_es6.ts === +declare var a: boolean; +>a : Symbol(a, Decl(awaitCallExpression6_es6.ts, 0, 11)) + +declare var p: Promise; +>p : Symbol(p, Decl(awaitCallExpression6_es6.ts, 1, 11)) +>Promise : Symbol(Promise, Decl(lib.d.ts, 4769, 1), Decl(lib.d.ts, 4853, 11)) + +declare function fn(arg0: boolean, arg1: boolean, arg2: boolean): void; +>fn : Symbol(fn, Decl(awaitCallExpression6_es6.ts, 1, 32)) +>arg0 : Symbol(arg0, Decl(awaitCallExpression6_es6.ts, 2, 20)) +>arg1 : Symbol(arg1, Decl(awaitCallExpression6_es6.ts, 2, 34)) +>arg2 : Symbol(arg2, Decl(awaitCallExpression6_es6.ts, 2, 49)) + +declare var o: { fn(arg0: boolean, arg1: boolean, arg2: boolean): void; }; +>o : Symbol(o, Decl(awaitCallExpression6_es6.ts, 3, 11)) +>fn : Symbol(fn, Decl(awaitCallExpression6_es6.ts, 3, 16)) +>arg0 : Symbol(arg0, Decl(awaitCallExpression6_es6.ts, 3, 20)) +>arg1 : Symbol(arg1, Decl(awaitCallExpression6_es6.ts, 3, 34)) +>arg2 : Symbol(arg2, Decl(awaitCallExpression6_es6.ts, 3, 49)) + +declare var pfn: Promise<{ (arg0: boolean, arg1: boolean, arg2: boolean): void; }>; +>pfn : Symbol(pfn, Decl(awaitCallExpression6_es6.ts, 4, 11)) +>Promise : Symbol(Promise, Decl(lib.d.ts, 4769, 1), Decl(lib.d.ts, 4853, 11)) +>arg0 : Symbol(arg0, Decl(awaitCallExpression6_es6.ts, 4, 28)) +>arg1 : Symbol(arg1, Decl(awaitCallExpression6_es6.ts, 4, 42)) +>arg2 : Symbol(arg2, Decl(awaitCallExpression6_es6.ts, 4, 57)) + +declare var po: Promise<{ fn(arg0: boolean, arg1: boolean, arg2: boolean): void; }>; +>po : Symbol(po, Decl(awaitCallExpression6_es6.ts, 5, 11)) +>Promise : Symbol(Promise, Decl(lib.d.ts, 4769, 1), Decl(lib.d.ts, 4853, 11)) +>fn : Symbol(fn, Decl(awaitCallExpression6_es6.ts, 5, 25)) +>arg0 : Symbol(arg0, Decl(awaitCallExpression6_es6.ts, 5, 29)) +>arg1 : Symbol(arg1, Decl(awaitCallExpression6_es6.ts, 5, 43)) +>arg2 : Symbol(arg2, Decl(awaitCallExpression6_es6.ts, 5, 58)) + +async function func(): Promise { +>func : Symbol(func, Decl(awaitCallExpression6_es6.ts, 5, 84)) +>Promise : Symbol(Promise, Decl(lib.d.ts, 4769, 1), Decl(lib.d.ts, 4853, 11)) + + "before"; + var b = o.fn(await p, a, a); +>b : Symbol(b, Decl(awaitCallExpression6_es6.ts, 8, 7)) +>o.fn : Symbol(fn, Decl(awaitCallExpression6_es6.ts, 3, 16)) +>o : Symbol(o, Decl(awaitCallExpression6_es6.ts, 3, 11)) +>fn : Symbol(fn, Decl(awaitCallExpression6_es6.ts, 3, 16)) +>a : Symbol(a, Decl(awaitCallExpression6_es6.ts, 0, 11)) +>a : Symbol(a, Decl(awaitCallExpression6_es6.ts, 0, 11)) + + "after"; +} diff --git a/tests/baselines/reference/awaitCallExpression6_es6.types b/tests/baselines/reference/awaitCallExpression6_es6.types new file mode 100644 index 0000000000000..d18377cebbbc4 --- /dev/null +++ b/tests/baselines/reference/awaitCallExpression6_es6.types @@ -0,0 +1,56 @@ +=== tests/cases/conformance/async/es6/awaitCallExpression/awaitCallExpression6_es6.ts === +declare var a: boolean; +>a : boolean + +declare var p: Promise; +>p : Promise +>Promise : Promise + +declare function fn(arg0: boolean, arg1: boolean, arg2: boolean): void; +>fn : (arg0: boolean, arg1: boolean, arg2: boolean) => void +>arg0 : boolean +>arg1 : boolean +>arg2 : boolean + +declare var o: { fn(arg0: boolean, arg1: boolean, arg2: boolean): void; }; +>o : { fn(arg0: boolean, arg1: boolean, arg2: boolean): void; } +>fn : (arg0: boolean, arg1: boolean, arg2: boolean) => void +>arg0 : boolean +>arg1 : boolean +>arg2 : boolean + +declare var pfn: Promise<{ (arg0: boolean, arg1: boolean, arg2: boolean): void; }>; +>pfn : Promise<(arg0: boolean, arg1: boolean, arg2: boolean) => void> +>Promise : Promise +>arg0 : boolean +>arg1 : boolean +>arg2 : boolean + +declare var po: Promise<{ fn(arg0: boolean, arg1: boolean, arg2: boolean): void; }>; +>po : Promise<{ fn(arg0: boolean, arg1: boolean, arg2: boolean): void; }> +>Promise : Promise +>fn : (arg0: boolean, arg1: boolean, arg2: boolean) => void +>arg0 : boolean +>arg1 : boolean +>arg2 : boolean + +async function func(): Promise { +>func : () => Promise +>Promise : Promise + + "before"; +>"before" : string + + var b = o.fn(await p, a, a); +>b : void +>o.fn(await p, a, a) : void +>o.fn : (arg0: boolean, arg1: boolean, arg2: boolean) => void +>o : { fn(arg0: boolean, arg1: boolean, arg2: boolean): void; } +>fn : (arg0: boolean, arg1: boolean, arg2: boolean) => void +>p : any +>a : boolean +>a : boolean + + "after"; +>"after" : string +} diff --git a/tests/baselines/reference/awaitCallExpression7_es6.js b/tests/baselines/reference/awaitCallExpression7_es6.js new file mode 100644 index 0000000000000..45e8a9fa64679 --- /dev/null +++ b/tests/baselines/reference/awaitCallExpression7_es6.js @@ -0,0 +1,21 @@ +//// [awaitCallExpression7_es6.ts] +declare var a: boolean; +declare var p: Promise; +declare function fn(arg0: boolean, arg1: boolean, arg2: boolean): void; +declare var o: { fn(arg0: boolean, arg1: boolean, arg2: boolean): void; }; +declare var pfn: Promise<{ (arg0: boolean, arg1: boolean, arg2: boolean): void; }>; +declare var po: Promise<{ fn(arg0: boolean, arg1: boolean, arg2: boolean): void; }>; +async function func(): Promise { + "before"; + var b = o.fn(a, await p, a); + "after"; +} + +//// [awaitCallExpression7_es6.js] +function func() { + return __awaiter(function *() { + "before"; + var b = o.fn(a, yield p, a); + "after"; + }.apply(this, arguments), Promise); +} diff --git a/tests/baselines/reference/awaitCallExpression7_es6.symbols b/tests/baselines/reference/awaitCallExpression7_es6.symbols new file mode 100644 index 0000000000000..d9dd6535bc292 --- /dev/null +++ b/tests/baselines/reference/awaitCallExpression7_es6.symbols @@ -0,0 +1,51 @@ +=== tests/cases/conformance/async/es6/awaitCallExpression/awaitCallExpression7_es6.ts === +declare var a: boolean; +>a : Symbol(a, Decl(awaitCallExpression7_es6.ts, 0, 11)) + +declare var p: Promise; +>p : Symbol(p, Decl(awaitCallExpression7_es6.ts, 1, 11)) +>Promise : Symbol(Promise, Decl(lib.d.ts, 4769, 1), Decl(lib.d.ts, 4853, 11)) + +declare function fn(arg0: boolean, arg1: boolean, arg2: boolean): void; +>fn : Symbol(fn, Decl(awaitCallExpression7_es6.ts, 1, 32)) +>arg0 : Symbol(arg0, Decl(awaitCallExpression7_es6.ts, 2, 20)) +>arg1 : Symbol(arg1, Decl(awaitCallExpression7_es6.ts, 2, 34)) +>arg2 : Symbol(arg2, Decl(awaitCallExpression7_es6.ts, 2, 49)) + +declare var o: { fn(arg0: boolean, arg1: boolean, arg2: boolean): void; }; +>o : Symbol(o, Decl(awaitCallExpression7_es6.ts, 3, 11)) +>fn : Symbol(fn, Decl(awaitCallExpression7_es6.ts, 3, 16)) +>arg0 : Symbol(arg0, Decl(awaitCallExpression7_es6.ts, 3, 20)) +>arg1 : Symbol(arg1, Decl(awaitCallExpression7_es6.ts, 3, 34)) +>arg2 : Symbol(arg2, Decl(awaitCallExpression7_es6.ts, 3, 49)) + +declare var pfn: Promise<{ (arg0: boolean, arg1: boolean, arg2: boolean): void; }>; +>pfn : Symbol(pfn, Decl(awaitCallExpression7_es6.ts, 4, 11)) +>Promise : Symbol(Promise, Decl(lib.d.ts, 4769, 1), Decl(lib.d.ts, 4853, 11)) +>arg0 : Symbol(arg0, Decl(awaitCallExpression7_es6.ts, 4, 28)) +>arg1 : Symbol(arg1, Decl(awaitCallExpression7_es6.ts, 4, 42)) +>arg2 : Symbol(arg2, Decl(awaitCallExpression7_es6.ts, 4, 57)) + +declare var po: Promise<{ fn(arg0: boolean, arg1: boolean, arg2: boolean): void; }>; +>po : Symbol(po, Decl(awaitCallExpression7_es6.ts, 5, 11)) +>Promise : Symbol(Promise, Decl(lib.d.ts, 4769, 1), Decl(lib.d.ts, 4853, 11)) +>fn : Symbol(fn, Decl(awaitCallExpression7_es6.ts, 5, 25)) +>arg0 : Symbol(arg0, Decl(awaitCallExpression7_es6.ts, 5, 29)) +>arg1 : Symbol(arg1, Decl(awaitCallExpression7_es6.ts, 5, 43)) +>arg2 : Symbol(arg2, Decl(awaitCallExpression7_es6.ts, 5, 58)) + +async function func(): Promise { +>func : Symbol(func, Decl(awaitCallExpression7_es6.ts, 5, 84)) +>Promise : Symbol(Promise, Decl(lib.d.ts, 4769, 1), Decl(lib.d.ts, 4853, 11)) + + "before"; + var b = o.fn(a, await p, a); +>b : Symbol(b, Decl(awaitCallExpression7_es6.ts, 8, 7)) +>o.fn : Symbol(fn, Decl(awaitCallExpression7_es6.ts, 3, 16)) +>o : Symbol(o, Decl(awaitCallExpression7_es6.ts, 3, 11)) +>fn : Symbol(fn, Decl(awaitCallExpression7_es6.ts, 3, 16)) +>a : Symbol(a, Decl(awaitCallExpression7_es6.ts, 0, 11)) +>a : Symbol(a, Decl(awaitCallExpression7_es6.ts, 0, 11)) + + "after"; +} diff --git a/tests/baselines/reference/awaitCallExpression7_es6.types b/tests/baselines/reference/awaitCallExpression7_es6.types new file mode 100644 index 0000000000000..b213a75dcd6a2 --- /dev/null +++ b/tests/baselines/reference/awaitCallExpression7_es6.types @@ -0,0 +1,56 @@ +=== tests/cases/conformance/async/es6/awaitCallExpression/awaitCallExpression7_es6.ts === +declare var a: boolean; +>a : boolean + +declare var p: Promise; +>p : Promise +>Promise : Promise + +declare function fn(arg0: boolean, arg1: boolean, arg2: boolean): void; +>fn : (arg0: boolean, arg1: boolean, arg2: boolean) => void +>arg0 : boolean +>arg1 : boolean +>arg2 : boolean + +declare var o: { fn(arg0: boolean, arg1: boolean, arg2: boolean): void; }; +>o : { fn(arg0: boolean, arg1: boolean, arg2: boolean): void; } +>fn : (arg0: boolean, arg1: boolean, arg2: boolean) => void +>arg0 : boolean +>arg1 : boolean +>arg2 : boolean + +declare var pfn: Promise<{ (arg0: boolean, arg1: boolean, arg2: boolean): void; }>; +>pfn : Promise<(arg0: boolean, arg1: boolean, arg2: boolean) => void> +>Promise : Promise +>arg0 : boolean +>arg1 : boolean +>arg2 : boolean + +declare var po: Promise<{ fn(arg0: boolean, arg1: boolean, arg2: boolean): void; }>; +>po : Promise<{ fn(arg0: boolean, arg1: boolean, arg2: boolean): void; }> +>Promise : Promise +>fn : (arg0: boolean, arg1: boolean, arg2: boolean) => void +>arg0 : boolean +>arg1 : boolean +>arg2 : boolean + +async function func(): Promise { +>func : () => Promise +>Promise : Promise + + "before"; +>"before" : string + + var b = o.fn(a, await p, a); +>b : void +>o.fn(a, await p, a) : void +>o.fn : (arg0: boolean, arg1: boolean, arg2: boolean) => void +>o : { fn(arg0: boolean, arg1: boolean, arg2: boolean): void; } +>fn : (arg0: boolean, arg1: boolean, arg2: boolean) => void +>a : boolean +>p : any +>a : boolean + + "after"; +>"after" : string +} diff --git a/tests/baselines/reference/awaitCallExpression8_es6.js b/tests/baselines/reference/awaitCallExpression8_es6.js new file mode 100644 index 0000000000000..3ffac0006aecb --- /dev/null +++ b/tests/baselines/reference/awaitCallExpression8_es6.js @@ -0,0 +1,21 @@ +//// [awaitCallExpression8_es6.ts] +declare var a: boolean; +declare var p: Promise; +declare function fn(arg0: boolean, arg1: boolean, arg2: boolean): void; +declare var o: { fn(arg0: boolean, arg1: boolean, arg2: boolean): void; }; +declare var pfn: Promise<{ (arg0: boolean, arg1: boolean, arg2: boolean): void; }>; +declare var po: Promise<{ fn(arg0: boolean, arg1: boolean, arg2: boolean): void; }>; +async function func(): Promise { + "before"; + var b = (await po).fn(a, a, a); + "after"; +} + +//// [awaitCallExpression8_es6.js] +function func() { + return __awaiter(function *() { + "before"; + var b = (yield po).fn(a, a, a); + "after"; + }.apply(this, arguments), Promise); +} diff --git a/tests/baselines/reference/awaitCallExpression8_es6.symbols b/tests/baselines/reference/awaitCallExpression8_es6.symbols new file mode 100644 index 0000000000000..1a2097d041d84 --- /dev/null +++ b/tests/baselines/reference/awaitCallExpression8_es6.symbols @@ -0,0 +1,51 @@ +=== tests/cases/conformance/async/es6/awaitCallExpression/awaitCallExpression8_es6.ts === +declare var a: boolean; +>a : Symbol(a, Decl(awaitCallExpression8_es6.ts, 0, 11)) + +declare var p: Promise; +>p : Symbol(p, Decl(awaitCallExpression8_es6.ts, 1, 11)) +>Promise : Symbol(Promise, Decl(lib.d.ts, 4769, 1), Decl(lib.d.ts, 4853, 11)) + +declare function fn(arg0: boolean, arg1: boolean, arg2: boolean): void; +>fn : Symbol(fn, Decl(awaitCallExpression8_es6.ts, 1, 32)) +>arg0 : Symbol(arg0, Decl(awaitCallExpression8_es6.ts, 2, 20)) +>arg1 : Symbol(arg1, Decl(awaitCallExpression8_es6.ts, 2, 34)) +>arg2 : Symbol(arg2, Decl(awaitCallExpression8_es6.ts, 2, 49)) + +declare var o: { fn(arg0: boolean, arg1: boolean, arg2: boolean): void; }; +>o : Symbol(o, Decl(awaitCallExpression8_es6.ts, 3, 11)) +>fn : Symbol(fn, Decl(awaitCallExpression8_es6.ts, 3, 16)) +>arg0 : Symbol(arg0, Decl(awaitCallExpression8_es6.ts, 3, 20)) +>arg1 : Symbol(arg1, Decl(awaitCallExpression8_es6.ts, 3, 34)) +>arg2 : Symbol(arg2, Decl(awaitCallExpression8_es6.ts, 3, 49)) + +declare var pfn: Promise<{ (arg0: boolean, arg1: boolean, arg2: boolean): void; }>; +>pfn : Symbol(pfn, Decl(awaitCallExpression8_es6.ts, 4, 11)) +>Promise : Symbol(Promise, Decl(lib.d.ts, 4769, 1), Decl(lib.d.ts, 4853, 11)) +>arg0 : Symbol(arg0, Decl(awaitCallExpression8_es6.ts, 4, 28)) +>arg1 : Symbol(arg1, Decl(awaitCallExpression8_es6.ts, 4, 42)) +>arg2 : Symbol(arg2, Decl(awaitCallExpression8_es6.ts, 4, 57)) + +declare var po: Promise<{ fn(arg0: boolean, arg1: boolean, arg2: boolean): void; }>; +>po : Symbol(po, Decl(awaitCallExpression8_es6.ts, 5, 11)) +>Promise : Symbol(Promise, Decl(lib.d.ts, 4769, 1), Decl(lib.d.ts, 4853, 11)) +>fn : Symbol(fn, Decl(awaitCallExpression8_es6.ts, 5, 25)) +>arg0 : Symbol(arg0, Decl(awaitCallExpression8_es6.ts, 5, 29)) +>arg1 : Symbol(arg1, Decl(awaitCallExpression8_es6.ts, 5, 43)) +>arg2 : Symbol(arg2, Decl(awaitCallExpression8_es6.ts, 5, 58)) + +async function func(): Promise { +>func : Symbol(func, Decl(awaitCallExpression8_es6.ts, 5, 84)) +>Promise : Symbol(Promise, Decl(lib.d.ts, 4769, 1), Decl(lib.d.ts, 4853, 11)) + + "before"; + var b = (await po).fn(a, a, a); +>b : Symbol(b, Decl(awaitCallExpression8_es6.ts, 8, 7)) +>(await po).fn : Symbol(fn, Decl(awaitCallExpression8_es6.ts, 5, 25)) +>fn : Symbol(fn, Decl(awaitCallExpression8_es6.ts, 5, 25)) +>a : Symbol(a, Decl(awaitCallExpression8_es6.ts, 0, 11)) +>a : Symbol(a, Decl(awaitCallExpression8_es6.ts, 0, 11)) +>a : Symbol(a, Decl(awaitCallExpression8_es6.ts, 0, 11)) + + "after"; +} diff --git a/tests/baselines/reference/awaitCallExpression8_es6.types b/tests/baselines/reference/awaitCallExpression8_es6.types new file mode 100644 index 0000000000000..37511a7e3d790 --- /dev/null +++ b/tests/baselines/reference/awaitCallExpression8_es6.types @@ -0,0 +1,57 @@ +=== tests/cases/conformance/async/es6/awaitCallExpression/awaitCallExpression8_es6.ts === +declare var a: boolean; +>a : boolean + +declare var p: Promise; +>p : Promise +>Promise : Promise + +declare function fn(arg0: boolean, arg1: boolean, arg2: boolean): void; +>fn : (arg0: boolean, arg1: boolean, arg2: boolean) => void +>arg0 : boolean +>arg1 : boolean +>arg2 : boolean + +declare var o: { fn(arg0: boolean, arg1: boolean, arg2: boolean): void; }; +>o : { fn(arg0: boolean, arg1: boolean, arg2: boolean): void; } +>fn : (arg0: boolean, arg1: boolean, arg2: boolean) => void +>arg0 : boolean +>arg1 : boolean +>arg2 : boolean + +declare var pfn: Promise<{ (arg0: boolean, arg1: boolean, arg2: boolean): void; }>; +>pfn : Promise<(arg0: boolean, arg1: boolean, arg2: boolean) => void> +>Promise : Promise +>arg0 : boolean +>arg1 : boolean +>arg2 : boolean + +declare var po: Promise<{ fn(arg0: boolean, arg1: boolean, arg2: boolean): void; }>; +>po : Promise<{ fn(arg0: boolean, arg1: boolean, arg2: boolean): void; }> +>Promise : Promise +>fn : (arg0: boolean, arg1: boolean, arg2: boolean) => void +>arg0 : boolean +>arg1 : boolean +>arg2 : boolean + +async function func(): Promise { +>func : () => Promise +>Promise : Promise + + "before"; +>"before" : string + + var b = (await po).fn(a, a, a); +>b : void +>(await po).fn(a, a, a) : void +>(await po).fn : (arg0: boolean, arg1: boolean, arg2: boolean) => void +>(await po) : { fn(arg0: boolean, arg1: boolean, arg2: boolean): void; } +>po : any +>fn : (arg0: boolean, arg1: boolean, arg2: boolean) => void +>a : boolean +>a : boolean +>a : boolean + + "after"; +>"after" : string +} diff --git a/tests/baselines/reference/callWithSpreadES6.symbols b/tests/baselines/reference/callWithSpreadES6.symbols index 94e0b94b002be..c29c41bff20f9 100644 --- a/tests/baselines/reference/callWithSpreadES6.symbols +++ b/tests/baselines/reference/callWithSpreadES6.symbols @@ -94,7 +94,7 @@ xa[1].foo(1, 2, ...a, "abc"); >a : Symbol(a, Decl(callWithSpreadES6.ts, 8, 3)) (xa[1].foo)(...[1, 2, "abc"]); ->Function : Symbol(Function, Decl(lib.d.ts, 223, 38), Decl(lib.d.ts, 269, 11), Decl(lib.d.ts, 1355, 1)) +>Function : Symbol(Function, Decl(lib.d.ts, 223, 38), Decl(lib.d.ts, 269, 11), Decl(lib.d.ts, 1366, 1)) >xa[1].foo : Symbol(X.foo, Decl(callWithSpreadES6.ts, 1, 13)) >xa : Symbol(xa, Decl(callWithSpreadES6.ts, 11, 3)) >foo : Symbol(X.foo, Decl(callWithSpreadES6.ts, 1, 13)) diff --git a/tests/baselines/reference/destructuringParameterDeclaration3ES5.symbols b/tests/baselines/reference/destructuringParameterDeclaration3ES5.symbols index 033ad46ece1b8..6a4eb82af97e9 100644 --- a/tests/baselines/reference/destructuringParameterDeclaration3ES5.symbols +++ b/tests/baselines/reference/destructuringParameterDeclaration3ES5.symbols @@ -8,18 +8,18 @@ type arrayString = Array >arrayString : Symbol(arrayString, Decl(destructuringParameterDeclaration3ES5.ts, 0, 0)) ->Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11), Decl(lib.d.ts, 1439, 1)) ->String : Symbol(String, Decl(lib.d.ts, 275, 1), Decl(lib.d.ts, 443, 11), Decl(lib.d.ts, 1538, 1)) +>Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11), Decl(lib.d.ts, 1450, 1)) +>String : Symbol(String, Decl(lib.d.ts, 275, 1), Decl(lib.d.ts, 443, 11), Decl(lib.d.ts, 1549, 1)) type someArray = Array | number[]; >someArray : Symbol(someArray, Decl(destructuringParameterDeclaration3ES5.ts, 7, 32)) ->Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11), Decl(lib.d.ts, 1439, 1)) ->String : Symbol(String, Decl(lib.d.ts, 275, 1), Decl(lib.d.ts, 443, 11), Decl(lib.d.ts, 1538, 1)) +>Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11), Decl(lib.d.ts, 1450, 1)) +>String : Symbol(String, Decl(lib.d.ts, 275, 1), Decl(lib.d.ts, 443, 11), Decl(lib.d.ts, 1549, 1)) type stringOrNumArray = Array; >stringOrNumArray : Symbol(stringOrNumArray, Decl(destructuringParameterDeclaration3ES5.ts, 8, 42)) ->Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11), Decl(lib.d.ts, 1439, 1)) ->String : Symbol(String, Decl(lib.d.ts, 275, 1), Decl(lib.d.ts, 443, 11), Decl(lib.d.ts, 1538, 1)) +>Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11), Decl(lib.d.ts, 1450, 1)) +>String : Symbol(String, Decl(lib.d.ts, 275, 1), Decl(lib.d.ts, 443, 11), Decl(lib.d.ts, 1549, 1)) >Number : Symbol(Number, Decl(lib.d.ts, 456, 40), Decl(lib.d.ts, 518, 11)) function a1(...x: (number|string)[]) { } @@ -33,8 +33,8 @@ function a2(...a) { } function a3(...a: Array) { } >a3 : Symbol(a3, Decl(destructuringParameterDeclaration3ES5.ts, 12, 21)) >a : Symbol(a, Decl(destructuringParameterDeclaration3ES5.ts, 13, 12)) ->Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11), Decl(lib.d.ts, 1439, 1)) ->String : Symbol(String, Decl(lib.d.ts, 275, 1), Decl(lib.d.ts, 443, 11), Decl(lib.d.ts, 1538, 1)) +>Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11), Decl(lib.d.ts, 1450, 1)) +>String : Symbol(String, Decl(lib.d.ts, 275, 1), Decl(lib.d.ts, 443, 11), Decl(lib.d.ts, 1549, 1)) function a4(...a: arrayString) { } >a4 : Symbol(a4, Decl(destructuringParameterDeclaration3ES5.ts, 13, 36)) diff --git a/tests/baselines/reference/destructuringParameterDeclaration3ES6.symbols b/tests/baselines/reference/destructuringParameterDeclaration3ES6.symbols index d23b624a023f5..22340c6aa60d3 100644 --- a/tests/baselines/reference/destructuringParameterDeclaration3ES6.symbols +++ b/tests/baselines/reference/destructuringParameterDeclaration3ES6.symbols @@ -8,18 +8,18 @@ type arrayString = Array >arrayString : Symbol(arrayString, Decl(destructuringParameterDeclaration3ES6.ts, 0, 0)) ->Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11), Decl(lib.d.ts, 1439, 1)) ->String : Symbol(String, Decl(lib.d.ts, 275, 1), Decl(lib.d.ts, 443, 11), Decl(lib.d.ts, 1538, 1)) +>Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11), Decl(lib.d.ts, 1450, 1)) +>String : Symbol(String, Decl(lib.d.ts, 275, 1), Decl(lib.d.ts, 443, 11), Decl(lib.d.ts, 1549, 1)) type someArray = Array | number[]; >someArray : Symbol(someArray, Decl(destructuringParameterDeclaration3ES6.ts, 7, 32)) ->Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11), Decl(lib.d.ts, 1439, 1)) ->String : Symbol(String, Decl(lib.d.ts, 275, 1), Decl(lib.d.ts, 443, 11), Decl(lib.d.ts, 1538, 1)) +>Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11), Decl(lib.d.ts, 1450, 1)) +>String : Symbol(String, Decl(lib.d.ts, 275, 1), Decl(lib.d.ts, 443, 11), Decl(lib.d.ts, 1549, 1)) type stringOrNumArray = Array; >stringOrNumArray : Symbol(stringOrNumArray, Decl(destructuringParameterDeclaration3ES6.ts, 8, 42)) ->Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11), Decl(lib.d.ts, 1439, 1)) ->String : Symbol(String, Decl(lib.d.ts, 275, 1), Decl(lib.d.ts, 443, 11), Decl(lib.d.ts, 1538, 1)) +>Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11), Decl(lib.d.ts, 1450, 1)) +>String : Symbol(String, Decl(lib.d.ts, 275, 1), Decl(lib.d.ts, 443, 11), Decl(lib.d.ts, 1549, 1)) >Number : Symbol(Number, Decl(lib.d.ts, 456, 40), Decl(lib.d.ts, 518, 11)) function a1(...x: (number|string)[]) { } @@ -33,8 +33,8 @@ function a2(...a) { } function a3(...a: Array) { } >a3 : Symbol(a3, Decl(destructuringParameterDeclaration3ES6.ts, 12, 21)) >a : Symbol(a, Decl(destructuringParameterDeclaration3ES6.ts, 13, 12)) ->Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11), Decl(lib.d.ts, 1439, 1)) ->String : Symbol(String, Decl(lib.d.ts, 275, 1), Decl(lib.d.ts, 443, 11), Decl(lib.d.ts, 1538, 1)) +>Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11), Decl(lib.d.ts, 1450, 1)) +>String : Symbol(String, Decl(lib.d.ts, 275, 1), Decl(lib.d.ts, 443, 11), Decl(lib.d.ts, 1549, 1)) function a4(...a: arrayString) { } >a4 : Symbol(a4, Decl(destructuringParameterDeclaration3ES6.ts, 13, 36)) diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments14_ES6.symbols b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments14_ES6.symbols index 18e1063f1e639..611db6485b906 100644 --- a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments14_ES6.symbols +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments14_ES6.symbols @@ -5,7 +5,7 @@ function f() { if (Math.random()) { >Math.random : Symbol(Math.random, Decl(lib.d.ts, 608, 38)) ->Math : Symbol(Math, Decl(lib.d.ts, 522, 1), Decl(lib.d.ts, 633, 11), Decl(lib.d.ts, 1694, 1)) +>Math : Symbol(Math, Decl(lib.d.ts, 522, 1), Decl(lib.d.ts, 633, 11), Decl(lib.d.ts, 1705, 1)) >random : Symbol(Math.random, Decl(lib.d.ts, 608, 38)) let arguments = 100; diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments15_ES6.symbols b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments15_ES6.symbols index 6885b359416aa..7a3c26204242a 100644 --- a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments15_ES6.symbols +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments15_ES6.symbols @@ -8,7 +8,7 @@ function f() { if (Math.random()) { >Math.random : Symbol(Math.random, Decl(lib.d.ts, 608, 38)) ->Math : Symbol(Math, Decl(lib.d.ts, 522, 1), Decl(lib.d.ts, 633, 11), Decl(lib.d.ts, 1694, 1)) +>Math : Symbol(Math, Decl(lib.d.ts, 522, 1), Decl(lib.d.ts, 633, 11), Decl(lib.d.ts, 1705, 1)) >random : Symbol(Math.random, Decl(lib.d.ts, 608, 38)) const arguments = 100; diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments16_ES6.symbols b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments16_ES6.symbols index ae6be6f7951f7..c9658b4d90d83 100644 --- a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments16_ES6.symbols +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments16_ES6.symbols @@ -8,7 +8,7 @@ function f() { if (Math.random()) { >Math.random : Symbol(Math.random, Decl(lib.d.ts, 608, 38)) ->Math : Symbol(Math, Decl(lib.d.ts, 522, 1), Decl(lib.d.ts, 633, 11), Decl(lib.d.ts, 1694, 1)) +>Math : Symbol(Math, Decl(lib.d.ts, 522, 1), Decl(lib.d.ts, 633, 11), Decl(lib.d.ts, 1705, 1)) >random : Symbol(Math.random, Decl(lib.d.ts, 608, 38)) return () => arguments[0]; diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments17_ES6.symbols b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments17_ES6.symbols index c8bf211897a49..df5ab202dfcbc 100644 --- a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments17_ES6.symbols +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments17_ES6.symbols @@ -9,7 +9,7 @@ function f() { if (Math.random()) { >Math.random : Symbol(Math.random, Decl(lib.d.ts, 608, 38)) ->Math : Symbol(Math, Decl(lib.d.ts, 522, 1), Decl(lib.d.ts, 633, 11), Decl(lib.d.ts, 1694, 1)) +>Math : Symbol(Math, Decl(lib.d.ts, 522, 1), Decl(lib.d.ts, 633, 11), Decl(lib.d.ts, 1705, 1)) >random : Symbol(Math.random, Decl(lib.d.ts, 608, 38)) return () => arguments[0]; diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments18_ES6.symbols b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments18_ES6.symbols index cc867dd2c72ef..c4fc2e434e857 100644 --- a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments18_ES6.symbols +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments18_ES6.symbols @@ -9,7 +9,7 @@ function f() { if (Math.random()) { >Math.random : Symbol(Math.random, Decl(lib.d.ts, 608, 38)) ->Math : Symbol(Math, Decl(lib.d.ts, 522, 1), Decl(lib.d.ts, 633, 11), Decl(lib.d.ts, 1694, 1)) +>Math : Symbol(Math, Decl(lib.d.ts, 522, 1), Decl(lib.d.ts, 633, 11), Decl(lib.d.ts, 1705, 1)) >random : Symbol(Math.random, Decl(lib.d.ts, 608, 38)) return () => arguments; diff --git a/tests/baselines/reference/for-of13.symbols b/tests/baselines/reference/for-of13.symbols index 833ea1d6875e7..bcd19f1a4d414 100644 --- a/tests/baselines/reference/for-of13.symbols +++ b/tests/baselines/reference/for-of13.symbols @@ -4,6 +4,6 @@ var v: string; for (v of [""].values()) { } >v : Symbol(v, Decl(for-of13.ts, 0, 3)) ->[""].values : Symbol(Array.values, Decl(lib.d.ts, 1453, 37)) ->values : Symbol(Array.values, Decl(lib.d.ts, 1453, 37)) +>[""].values : Symbol(Array.values, Decl(lib.d.ts, 1464, 37)) +>values : Symbol(Array.values, Decl(lib.d.ts, 1464, 37)) diff --git a/tests/baselines/reference/for-of18.symbols b/tests/baselines/reference/for-of18.symbols index 2c08338ce73b3..a61af49253804 100644 --- a/tests/baselines/reference/for-of18.symbols +++ b/tests/baselines/reference/for-of18.symbols @@ -22,9 +22,9 @@ class StringIterator { }; } [Symbol.iterator]() { ->Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1236, 31)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1186, 52), Decl(lib.d.ts, 1292, 11)) ->iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1236, 31)) +>Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1247, 31)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1197, 53), Decl(lib.d.ts, 1303, 11)) +>iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1247, 31)) return this; >this : Symbol(StringIterator, Decl(for-of18.ts, 1, 33)) diff --git a/tests/baselines/reference/for-of19.symbols b/tests/baselines/reference/for-of19.symbols index 6be3c83964adc..c2d2d07841559 100644 --- a/tests/baselines/reference/for-of19.symbols +++ b/tests/baselines/reference/for-of19.symbols @@ -27,9 +27,9 @@ class FooIterator { }; } [Symbol.iterator]() { ->Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1236, 31)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1186, 52), Decl(lib.d.ts, 1292, 11)) ->iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1236, 31)) +>Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1247, 31)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1197, 53), Decl(lib.d.ts, 1303, 11)) +>iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1247, 31)) return this; >this : Symbol(FooIterator, Decl(for-of19.ts, 4, 13)) diff --git a/tests/baselines/reference/for-of20.symbols b/tests/baselines/reference/for-of20.symbols index 97200f93f3589..251a5b28fcae2 100644 --- a/tests/baselines/reference/for-of20.symbols +++ b/tests/baselines/reference/for-of20.symbols @@ -27,9 +27,9 @@ class FooIterator { }; } [Symbol.iterator]() { ->Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1236, 31)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1186, 52), Decl(lib.d.ts, 1292, 11)) ->iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1236, 31)) +>Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1247, 31)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1197, 53), Decl(lib.d.ts, 1303, 11)) +>iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1247, 31)) return this; >this : Symbol(FooIterator, Decl(for-of20.ts, 4, 13)) diff --git a/tests/baselines/reference/for-of21.symbols b/tests/baselines/reference/for-of21.symbols index bbe3504294c7e..0b6b6f23cc0d8 100644 --- a/tests/baselines/reference/for-of21.symbols +++ b/tests/baselines/reference/for-of21.symbols @@ -27,9 +27,9 @@ class FooIterator { }; } [Symbol.iterator]() { ->Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1236, 31)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1186, 52), Decl(lib.d.ts, 1292, 11)) ->iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1236, 31)) +>Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1247, 31)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1197, 53), Decl(lib.d.ts, 1303, 11)) +>iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1247, 31)) return this; >this : Symbol(FooIterator, Decl(for-of21.ts, 4, 13)) diff --git a/tests/baselines/reference/for-of22.symbols b/tests/baselines/reference/for-of22.symbols index 4f15b54135628..cc4fcf55a7c84 100644 --- a/tests/baselines/reference/for-of22.symbols +++ b/tests/baselines/reference/for-of22.symbols @@ -28,9 +28,9 @@ class FooIterator { }; } [Symbol.iterator]() { ->Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1236, 31)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1186, 52), Decl(lib.d.ts, 1292, 11)) ->iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1236, 31)) +>Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1247, 31)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1197, 53), Decl(lib.d.ts, 1303, 11)) +>iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1247, 31)) return this; >this : Symbol(FooIterator, Decl(for-of22.ts, 5, 13)) diff --git a/tests/baselines/reference/for-of23.symbols b/tests/baselines/reference/for-of23.symbols index 0f409605e2806..8c7455a2dbc33 100644 --- a/tests/baselines/reference/for-of23.symbols +++ b/tests/baselines/reference/for-of23.symbols @@ -27,9 +27,9 @@ class FooIterator { }; } [Symbol.iterator]() { ->Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1236, 31)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1186, 52), Decl(lib.d.ts, 1292, 11)) ->iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1236, 31)) +>Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1247, 31)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1197, 53), Decl(lib.d.ts, 1303, 11)) +>iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1247, 31)) return this; >this : Symbol(FooIterator, Decl(for-of23.ts, 4, 13)) diff --git a/tests/baselines/reference/for-of25.symbols b/tests/baselines/reference/for-of25.symbols index 44cc83143af28..dae7d4bae7f32 100644 --- a/tests/baselines/reference/for-of25.symbols +++ b/tests/baselines/reference/for-of25.symbols @@ -10,9 +10,9 @@ class StringIterator { >StringIterator : Symbol(StringIterator, Decl(for-of25.ts, 1, 37)) [Symbol.iterator]() { ->Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1236, 31)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1186, 52), Decl(lib.d.ts, 1292, 11)) ->iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1236, 31)) +>Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1247, 31)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1197, 53), Decl(lib.d.ts, 1303, 11)) +>iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1247, 31)) return x; >x : Symbol(x, Decl(for-of25.ts, 0, 3)) diff --git a/tests/baselines/reference/for-of26.symbols b/tests/baselines/reference/for-of26.symbols index 0218a8b9995be..34766b1bc8c11 100644 --- a/tests/baselines/reference/for-of26.symbols +++ b/tests/baselines/reference/for-of26.symbols @@ -16,9 +16,9 @@ class StringIterator { >x : Symbol(x, Decl(for-of26.ts, 0, 3)) } [Symbol.iterator]() { ->Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1236, 31)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1186, 52), Decl(lib.d.ts, 1292, 11)) ->iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1236, 31)) +>Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1247, 31)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1197, 53), Decl(lib.d.ts, 1303, 11)) +>iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1247, 31)) return this; >this : Symbol(StringIterator, Decl(for-of26.ts, 1, 37)) diff --git a/tests/baselines/reference/for-of27.symbols b/tests/baselines/reference/for-of27.symbols index 82918a19986fb..aa44808cd736c 100644 --- a/tests/baselines/reference/for-of27.symbols +++ b/tests/baselines/reference/for-of27.symbols @@ -7,7 +7,7 @@ class StringIterator { >StringIterator : Symbol(StringIterator, Decl(for-of27.ts, 0, 37)) [Symbol.iterator]: any; ->Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1236, 31)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1186, 52), Decl(lib.d.ts, 1292, 11)) ->iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1236, 31)) +>Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1247, 31)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1197, 53), Decl(lib.d.ts, 1303, 11)) +>iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1247, 31)) } diff --git a/tests/baselines/reference/for-of28.symbols b/tests/baselines/reference/for-of28.symbols index e4324b05779a5..caf0356df220f 100644 --- a/tests/baselines/reference/for-of28.symbols +++ b/tests/baselines/reference/for-of28.symbols @@ -10,9 +10,9 @@ class StringIterator { >next : Symbol(next, Decl(for-of28.ts, 2, 22)) [Symbol.iterator]() { ->Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1236, 31)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1186, 52), Decl(lib.d.ts, 1292, 11)) ->iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1236, 31)) +>Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1247, 31)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1197, 53), Decl(lib.d.ts, 1303, 11)) +>iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1247, 31)) return this; >this : Symbol(StringIterator, Decl(for-of28.ts, 0, 37)) diff --git a/tests/baselines/reference/for-of37.symbols b/tests/baselines/reference/for-of37.symbols index 93f6c4f7dd6fe..73455ff17e671 100644 --- a/tests/baselines/reference/for-of37.symbols +++ b/tests/baselines/reference/for-of37.symbols @@ -1,7 +1,7 @@ === tests/cases/conformance/es6/for-ofStatements/for-of37.ts === var map = new Map([["", true]]); >map : Symbol(map, Decl(for-of37.ts, 0, 3)) ->Map : Symbol(Map, Decl(lib.d.ts, 1867, 1), Decl(lib.d.ts, 1889, 11)) +>Map : Symbol(Map, Decl(lib.d.ts, 1878, 1), Decl(lib.d.ts, 1900, 11)) for (var v of map) { >v : Symbol(v, Decl(for-of37.ts, 1, 8)) diff --git a/tests/baselines/reference/for-of38.symbols b/tests/baselines/reference/for-of38.symbols index fab42d9172459..bfbe035730c89 100644 --- a/tests/baselines/reference/for-of38.symbols +++ b/tests/baselines/reference/for-of38.symbols @@ -1,7 +1,7 @@ === tests/cases/conformance/es6/for-ofStatements/for-of38.ts === var map = new Map([["", true]]); >map : Symbol(map, Decl(for-of38.ts, 0, 3)) ->Map : Symbol(Map, Decl(lib.d.ts, 1867, 1), Decl(lib.d.ts, 1889, 11)) +>Map : Symbol(Map, Decl(lib.d.ts, 1878, 1), Decl(lib.d.ts, 1900, 11)) for (var [k, v] of map) { >k : Symbol(k, Decl(for-of38.ts, 1, 10)) diff --git a/tests/baselines/reference/for-of40.symbols b/tests/baselines/reference/for-of40.symbols index 1cd3538f98747..ed6ecb128f7fb 100644 --- a/tests/baselines/reference/for-of40.symbols +++ b/tests/baselines/reference/for-of40.symbols @@ -1,7 +1,7 @@ === tests/cases/conformance/es6/for-ofStatements/for-of40.ts === var map = new Map([["", true]]); >map : Symbol(map, Decl(for-of40.ts, 0, 3)) ->Map : Symbol(Map, Decl(lib.d.ts, 1867, 1), Decl(lib.d.ts, 1889, 11)) +>Map : Symbol(Map, Decl(lib.d.ts, 1878, 1), Decl(lib.d.ts, 1900, 11)) for (var [k = "", v = false] of map) { >k : Symbol(k, Decl(for-of40.ts, 1, 10)) diff --git a/tests/baselines/reference/for-of44.symbols b/tests/baselines/reference/for-of44.symbols index 9c6afa04adb77..adcd2ae376000 100644 --- a/tests/baselines/reference/for-of44.symbols +++ b/tests/baselines/reference/for-of44.symbols @@ -1,7 +1,7 @@ === tests/cases/conformance/es6/for-ofStatements/for-of44.ts === var array: [number, string | boolean | symbol][] = [[0, ""], [0, true], [1, Symbol()]] >array : Symbol(array, Decl(for-of44.ts, 0, 3)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1186, 52), Decl(lib.d.ts, 1292, 11)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1197, 53), Decl(lib.d.ts, 1303, 11)) for (var [num, strBoolSym] of array) { >num : Symbol(num, Decl(for-of44.ts, 1, 10)) diff --git a/tests/baselines/reference/for-of45.symbols b/tests/baselines/reference/for-of45.symbols index 9fda4cb4e0a64..2f4a85111471d 100644 --- a/tests/baselines/reference/for-of45.symbols +++ b/tests/baselines/reference/for-of45.symbols @@ -5,7 +5,7 @@ var k: string, v: boolean; var map = new Map([["", true]]); >map : Symbol(map, Decl(for-of45.ts, 1, 3)) ->Map : Symbol(Map, Decl(lib.d.ts, 1867, 1), Decl(lib.d.ts, 1889, 11)) +>Map : Symbol(Map, Decl(lib.d.ts, 1878, 1), Decl(lib.d.ts, 1900, 11)) for ([k = "", v = false] of map) { >k : Symbol(k, Decl(for-of45.ts, 0, 3)) diff --git a/tests/baselines/reference/for-of50.symbols b/tests/baselines/reference/for-of50.symbols index c176e1aca0cf1..6813cd4eee548 100644 --- a/tests/baselines/reference/for-of50.symbols +++ b/tests/baselines/reference/for-of50.symbols @@ -1,7 +1,7 @@ === tests/cases/conformance/es6/for-ofStatements/for-of50.ts === var map = new Map([["", true]]); >map : Symbol(map, Decl(for-of50.ts, 0, 3)) ->Map : Symbol(Map, Decl(lib.d.ts, 1867, 1), Decl(lib.d.ts, 1889, 11)) +>Map : Symbol(Map, Decl(lib.d.ts, 1878, 1), Decl(lib.d.ts, 1900, 11)) for (const [k, v] of map) { >k : Symbol(k, Decl(for-of50.ts, 1, 12)) diff --git a/tests/baselines/reference/for-of57.symbols b/tests/baselines/reference/for-of57.symbols index 27aed0777ba7f..e8be8da6f9ca6 100644 --- a/tests/baselines/reference/for-of57.symbols +++ b/tests/baselines/reference/for-of57.symbols @@ -1,7 +1,7 @@ === tests/cases/conformance/es6/for-ofStatements/for-of57.ts === var iter: Iterable; >iter : Symbol(iter, Decl(for-of57.ts, 0, 3)) ->Iterable : Symbol(Iterable, Decl(lib.d.ts, 1663, 1)) +>Iterable : Symbol(Iterable, Decl(lib.d.ts, 1674, 1)) for (let num of iter) { } >num : Symbol(num, Decl(for-of57.ts, 1, 8)) diff --git a/tests/baselines/reference/iterableArrayPattern1.symbols b/tests/baselines/reference/iterableArrayPattern1.symbols index c6025123179d6..02f2ad6e8ef52 100644 --- a/tests/baselines/reference/iterableArrayPattern1.symbols +++ b/tests/baselines/reference/iterableArrayPattern1.symbols @@ -13,7 +13,7 @@ class SymbolIterator { return { value: Symbol(), >value : Symbol(value, Decl(iterableArrayPattern1.ts, 3, 16)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1186, 52), Decl(lib.d.ts, 1292, 11)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1197, 53), Decl(lib.d.ts, 1303, 11)) done: false >done : Symbol(done, Decl(iterableArrayPattern1.ts, 4, 28)) @@ -22,9 +22,9 @@ class SymbolIterator { } [Symbol.iterator]() { ->Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1236, 31)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1186, 52), Decl(lib.d.ts, 1292, 11)) ->iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1236, 31)) +>Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1247, 31)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1197, 53), Decl(lib.d.ts, 1303, 11)) +>iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1247, 31)) return this; >this : Symbol(SymbolIterator, Decl(iterableArrayPattern1.ts, 0, 32)) diff --git a/tests/baselines/reference/iterableArrayPattern11.symbols b/tests/baselines/reference/iterableArrayPattern11.symbols index 07b1fb52af845..9bbe4bfb983f7 100644 --- a/tests/baselines/reference/iterableArrayPattern11.symbols +++ b/tests/baselines/reference/iterableArrayPattern11.symbols @@ -36,9 +36,9 @@ class FooIterator { } [Symbol.iterator]() { ->Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1236, 31)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1186, 52), Decl(lib.d.ts, 1292, 11)) ->iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1236, 31)) +>Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1247, 31)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1197, 53), Decl(lib.d.ts, 1303, 11)) +>iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1247, 31)) return this; >this : Symbol(FooIterator, Decl(iterableArrayPattern11.ts, 3, 27)) diff --git a/tests/baselines/reference/iterableArrayPattern12.symbols b/tests/baselines/reference/iterableArrayPattern12.symbols index 001cb99b4865a..1a8634862ea20 100644 --- a/tests/baselines/reference/iterableArrayPattern12.symbols +++ b/tests/baselines/reference/iterableArrayPattern12.symbols @@ -36,9 +36,9 @@ class FooIterator { } [Symbol.iterator]() { ->Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1236, 31)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1186, 52), Decl(lib.d.ts, 1292, 11)) ->iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1236, 31)) +>Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1247, 31)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1197, 53), Decl(lib.d.ts, 1303, 11)) +>iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1247, 31)) return this; >this : Symbol(FooIterator, Decl(iterableArrayPattern12.ts, 3, 27)) diff --git a/tests/baselines/reference/iterableArrayPattern13.symbols b/tests/baselines/reference/iterableArrayPattern13.symbols index 7085fd224f408..3c8a8c1ba5221 100644 --- a/tests/baselines/reference/iterableArrayPattern13.symbols +++ b/tests/baselines/reference/iterableArrayPattern13.symbols @@ -35,9 +35,9 @@ class FooIterator { } [Symbol.iterator]() { ->Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1236, 31)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1186, 52), Decl(lib.d.ts, 1292, 11)) ->iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1236, 31)) +>Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1247, 31)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1197, 53), Decl(lib.d.ts, 1303, 11)) +>iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1247, 31)) return this; >this : Symbol(FooIterator, Decl(iterableArrayPattern13.ts, 3, 27)) diff --git a/tests/baselines/reference/iterableArrayPattern2.symbols b/tests/baselines/reference/iterableArrayPattern2.symbols index 09a6984cb3cb7..a28e682c9ed88 100644 --- a/tests/baselines/reference/iterableArrayPattern2.symbols +++ b/tests/baselines/reference/iterableArrayPattern2.symbols @@ -13,7 +13,7 @@ class SymbolIterator { return { value: Symbol(), >value : Symbol(value, Decl(iterableArrayPattern2.ts, 3, 16)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1186, 52), Decl(lib.d.ts, 1292, 11)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1197, 53), Decl(lib.d.ts, 1303, 11)) done: false >done : Symbol(done, Decl(iterableArrayPattern2.ts, 4, 28)) @@ -22,9 +22,9 @@ class SymbolIterator { } [Symbol.iterator]() { ->Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1236, 31)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1186, 52), Decl(lib.d.ts, 1292, 11)) ->iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1236, 31)) +>Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1247, 31)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1197, 53), Decl(lib.d.ts, 1303, 11)) +>iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1247, 31)) return this; >this : Symbol(SymbolIterator, Decl(iterableArrayPattern2.ts, 0, 35)) diff --git a/tests/baselines/reference/iterableArrayPattern3.symbols b/tests/baselines/reference/iterableArrayPattern3.symbols index 4ee65a10825de..46087c2f8bb6d 100644 --- a/tests/baselines/reference/iterableArrayPattern3.symbols +++ b/tests/baselines/reference/iterableArrayPattern3.symbols @@ -37,9 +37,9 @@ class FooIterator { } [Symbol.iterator]() { ->Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1236, 31)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1186, 52), Decl(lib.d.ts, 1292, 11)) ->iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1236, 31)) +>Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1247, 31)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1197, 53), Decl(lib.d.ts, 1303, 11)) +>iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1247, 31)) return this; >this : Symbol(FooIterator, Decl(iterableArrayPattern3.ts, 3, 27)) diff --git a/tests/baselines/reference/iterableArrayPattern30.symbols b/tests/baselines/reference/iterableArrayPattern30.symbols index 0f50713b43d6c..e4c5de1770433 100644 --- a/tests/baselines/reference/iterableArrayPattern30.symbols +++ b/tests/baselines/reference/iterableArrayPattern30.symbols @@ -4,5 +4,5 @@ const [[k1, v1], [k2, v2]] = new Map([["", true], ["hello", true]]) >v1 : Symbol(v1, Decl(iterableArrayPattern30.ts, 0, 11)) >k2 : Symbol(k2, Decl(iterableArrayPattern30.ts, 0, 18)) >v2 : Symbol(v2, Decl(iterableArrayPattern30.ts, 0, 21)) ->Map : Symbol(Map, Decl(lib.d.ts, 1867, 1), Decl(lib.d.ts, 1889, 11)) +>Map : Symbol(Map, Decl(lib.d.ts, 1878, 1), Decl(lib.d.ts, 1900, 11)) diff --git a/tests/baselines/reference/iterableArrayPattern4.symbols b/tests/baselines/reference/iterableArrayPattern4.symbols index aa5ce5783a011..2b0c26918e413 100644 --- a/tests/baselines/reference/iterableArrayPattern4.symbols +++ b/tests/baselines/reference/iterableArrayPattern4.symbols @@ -37,9 +37,9 @@ class FooIterator { } [Symbol.iterator]() { ->Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1236, 31)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1186, 52), Decl(lib.d.ts, 1292, 11)) ->iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1236, 31)) +>Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1247, 31)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1197, 53), Decl(lib.d.ts, 1303, 11)) +>iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1247, 31)) return this; >this : Symbol(FooIterator, Decl(iterableArrayPattern4.ts, 3, 27)) diff --git a/tests/baselines/reference/iterableArrayPattern9.symbols b/tests/baselines/reference/iterableArrayPattern9.symbols index 01cfba0f09efb..90adcfeba92cf 100644 --- a/tests/baselines/reference/iterableArrayPattern9.symbols +++ b/tests/baselines/reference/iterableArrayPattern9.symbols @@ -32,9 +32,9 @@ class FooIterator { } [Symbol.iterator]() { ->Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1236, 31)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1186, 52), Decl(lib.d.ts, 1292, 11)) ->iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1236, 31)) +>Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1247, 31)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1197, 53), Decl(lib.d.ts, 1303, 11)) +>iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1247, 31)) return this; >this : Symbol(FooIterator, Decl(iterableArrayPattern9.ts, 2, 27)) diff --git a/tests/baselines/reference/iterableContextualTyping1.symbols b/tests/baselines/reference/iterableContextualTyping1.symbols index 76d94dc29233b..43c6d7135e08d 100644 --- a/tests/baselines/reference/iterableContextualTyping1.symbols +++ b/tests/baselines/reference/iterableContextualTyping1.symbols @@ -1,7 +1,7 @@ === tests/cases/conformance/expressions/contextualTyping/iterableContextualTyping1.ts === var iter: Iterable<(x: string) => number> = [s => s.length]; >iter : Symbol(iter, Decl(iterableContextualTyping1.ts, 0, 3)) ->Iterable : Symbol(Iterable, Decl(lib.d.ts, 1663, 1)) +>Iterable : Symbol(Iterable, Decl(lib.d.ts, 1674, 1)) >x : Symbol(x, Decl(iterableContextualTyping1.ts, 0, 20)) >s : Symbol(s, Decl(iterableContextualTyping1.ts, 0, 45)) >s.length : Symbol(String.length, Decl(lib.d.ts, 414, 19)) diff --git a/tests/baselines/reference/iteratorSpreadInArray.symbols b/tests/baselines/reference/iteratorSpreadInArray.symbols index f53e8266baaab..3c1cf17480d64 100644 --- a/tests/baselines/reference/iteratorSpreadInArray.symbols +++ b/tests/baselines/reference/iteratorSpreadInArray.symbols @@ -12,7 +12,7 @@ class SymbolIterator { return { value: Symbol(), >value : Symbol(value, Decl(iteratorSpreadInArray.ts, 4, 16)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1186, 52), Decl(lib.d.ts, 1292, 11)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1197, 53), Decl(lib.d.ts, 1303, 11)) done: false >done : Symbol(done, Decl(iteratorSpreadInArray.ts, 5, 28)) @@ -21,9 +21,9 @@ class SymbolIterator { } [Symbol.iterator]() { ->Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1236, 31)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1186, 52), Decl(lib.d.ts, 1292, 11)) ->iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1236, 31)) +>Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1247, 31)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1197, 53), Decl(lib.d.ts, 1303, 11)) +>iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1247, 31)) return this; >this : Symbol(SymbolIterator, Decl(iteratorSpreadInArray.ts, 0, 36)) diff --git a/tests/baselines/reference/iteratorSpreadInArray11.symbols b/tests/baselines/reference/iteratorSpreadInArray11.symbols index b128803aa50f7..d1eb5420ef119 100644 --- a/tests/baselines/reference/iteratorSpreadInArray11.symbols +++ b/tests/baselines/reference/iteratorSpreadInArray11.symbols @@ -1,7 +1,7 @@ === tests/cases/conformance/es6/spread/iteratorSpreadInArray11.ts === var iter: Iterable; >iter : Symbol(iter, Decl(iteratorSpreadInArray11.ts, 0, 3)) ->Iterable : Symbol(Iterable, Decl(lib.d.ts, 1663, 1)) +>Iterable : Symbol(Iterable, Decl(lib.d.ts, 1674, 1)) var array = [...iter]; >array : Symbol(array, Decl(iteratorSpreadInArray11.ts, 1, 3)) diff --git a/tests/baselines/reference/iteratorSpreadInArray2.symbols b/tests/baselines/reference/iteratorSpreadInArray2.symbols index db8da1bac9d2e..42c7e7e626ea8 100644 --- a/tests/baselines/reference/iteratorSpreadInArray2.symbols +++ b/tests/baselines/reference/iteratorSpreadInArray2.symbols @@ -13,7 +13,7 @@ class SymbolIterator { return { value: Symbol(), >value : Symbol(value, Decl(iteratorSpreadInArray2.ts, 4, 16)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1186, 52), Decl(lib.d.ts, 1292, 11)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1197, 53), Decl(lib.d.ts, 1303, 11)) done: false >done : Symbol(done, Decl(iteratorSpreadInArray2.ts, 5, 28)) @@ -22,9 +22,9 @@ class SymbolIterator { } [Symbol.iterator]() { ->Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1236, 31)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1186, 52), Decl(lib.d.ts, 1292, 11)) ->iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1236, 31)) +>Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1247, 31)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1197, 53), Decl(lib.d.ts, 1303, 11)) +>iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1247, 31)) return this; >this : Symbol(SymbolIterator, Decl(iteratorSpreadInArray2.ts, 0, 59)) @@ -48,9 +48,9 @@ class NumberIterator { } [Symbol.iterator]() { ->Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1236, 31)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1186, 52), Decl(lib.d.ts, 1292, 11)) ->iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1236, 31)) +>Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1247, 31)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1197, 53), Decl(lib.d.ts, 1303, 11)) +>iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1247, 31)) return this; >this : Symbol(NumberIterator, Decl(iteratorSpreadInArray2.ts, 13, 1)) diff --git a/tests/baselines/reference/iteratorSpreadInArray3.symbols b/tests/baselines/reference/iteratorSpreadInArray3.symbols index bdc200c25ec92..8a7abd3f19589 100644 --- a/tests/baselines/reference/iteratorSpreadInArray3.symbols +++ b/tests/baselines/reference/iteratorSpreadInArray3.symbols @@ -12,7 +12,7 @@ class SymbolIterator { return { value: Symbol(), >value : Symbol(value, Decl(iteratorSpreadInArray3.ts, 4, 16)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1186, 52), Decl(lib.d.ts, 1292, 11)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1197, 53), Decl(lib.d.ts, 1303, 11)) done: false >done : Symbol(done, Decl(iteratorSpreadInArray3.ts, 5, 28)) @@ -21,9 +21,9 @@ class SymbolIterator { } [Symbol.iterator]() { ->Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1236, 31)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1186, 52), Decl(lib.d.ts, 1292, 11)) ->iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1236, 31)) +>Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1247, 31)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1197, 53), Decl(lib.d.ts, 1303, 11)) +>iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1247, 31)) return this; >this : Symbol(SymbolIterator, Decl(iteratorSpreadInArray3.ts, 0, 47)) diff --git a/tests/baselines/reference/iteratorSpreadInArray4.symbols b/tests/baselines/reference/iteratorSpreadInArray4.symbols index c49ea74dc23f2..03aca3c69b36e 100644 --- a/tests/baselines/reference/iteratorSpreadInArray4.symbols +++ b/tests/baselines/reference/iteratorSpreadInArray4.symbols @@ -12,7 +12,7 @@ class SymbolIterator { return { value: Symbol(), >value : Symbol(value, Decl(iteratorSpreadInArray4.ts, 4, 16)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1186, 52), Decl(lib.d.ts, 1292, 11)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1197, 53), Decl(lib.d.ts, 1303, 11)) done: false >done : Symbol(done, Decl(iteratorSpreadInArray4.ts, 5, 28)) @@ -21,9 +21,9 @@ class SymbolIterator { } [Symbol.iterator]() { ->Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1236, 31)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1186, 52), Decl(lib.d.ts, 1292, 11)) ->iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1236, 31)) +>Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1247, 31)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1197, 53), Decl(lib.d.ts, 1303, 11)) +>iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1247, 31)) return this; >this : Symbol(SymbolIterator, Decl(iteratorSpreadInArray4.ts, 0, 42)) diff --git a/tests/baselines/reference/iteratorSpreadInArray7.symbols b/tests/baselines/reference/iteratorSpreadInArray7.symbols index e7fbdac226482..e8c6571943e25 100644 --- a/tests/baselines/reference/iteratorSpreadInArray7.symbols +++ b/tests/baselines/reference/iteratorSpreadInArray7.symbols @@ -17,7 +17,7 @@ class SymbolIterator { return { value: Symbol(), >value : Symbol(value, Decl(iteratorSpreadInArray7.ts, 5, 16)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1186, 52), Decl(lib.d.ts, 1292, 11)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1197, 53), Decl(lib.d.ts, 1303, 11)) done: false >done : Symbol(done, Decl(iteratorSpreadInArray7.ts, 6, 28)) @@ -26,9 +26,9 @@ class SymbolIterator { } [Symbol.iterator]() { ->Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1236, 31)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1186, 52), Decl(lib.d.ts, 1292, 11)) ->iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1236, 31)) +>Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1247, 31)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1197, 53), Decl(lib.d.ts, 1303, 11)) +>iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1247, 31)) return this; >this : Symbol(SymbolIterator, Decl(iteratorSpreadInArray7.ts, 1, 38)) diff --git a/tests/baselines/reference/iteratorSpreadInCall11.symbols b/tests/baselines/reference/iteratorSpreadInCall11.symbols index 54ac770c5dfcf..d695457621f5d 100644 --- a/tests/baselines/reference/iteratorSpreadInCall11.symbols +++ b/tests/baselines/reference/iteratorSpreadInCall11.symbols @@ -19,7 +19,7 @@ class SymbolIterator { return { value: Symbol(), >value : Symbol(value, Decl(iteratorSpreadInCall11.ts, 6, 16)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1186, 52), Decl(lib.d.ts, 1292, 11)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1197, 53), Decl(lib.d.ts, 1303, 11)) done: false >done : Symbol(done, Decl(iteratorSpreadInCall11.ts, 7, 28)) @@ -28,9 +28,9 @@ class SymbolIterator { } [Symbol.iterator]() { ->Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1236, 31)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1186, 52), Decl(lib.d.ts, 1292, 11)) ->iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1236, 31)) +>Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1247, 31)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1197, 53), Decl(lib.d.ts, 1303, 11)) +>iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1247, 31)) return this; >this : Symbol(SymbolIterator, Decl(iteratorSpreadInCall11.ts, 2, 42)) diff --git a/tests/baselines/reference/iteratorSpreadInCall12.symbols b/tests/baselines/reference/iteratorSpreadInCall12.symbols index 8b24ba5d1b766..58ed5ea493530 100644 --- a/tests/baselines/reference/iteratorSpreadInCall12.symbols +++ b/tests/baselines/reference/iteratorSpreadInCall12.symbols @@ -22,7 +22,7 @@ class SymbolIterator { return { value: Symbol(), >value : Symbol(value, Decl(iteratorSpreadInCall12.ts, 8, 16)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1186, 52), Decl(lib.d.ts, 1292, 11)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1197, 53), Decl(lib.d.ts, 1303, 11)) done: false >done : Symbol(done, Decl(iteratorSpreadInCall12.ts, 9, 28)) @@ -31,9 +31,9 @@ class SymbolIterator { } [Symbol.iterator]() { ->Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1236, 31)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1186, 52), Decl(lib.d.ts, 1292, 11)) ->iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1236, 31)) +>Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1247, 31)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1197, 53), Decl(lib.d.ts, 1303, 11)) +>iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1247, 31)) return this; >this : Symbol(SymbolIterator, Decl(iteratorSpreadInCall12.ts, 4, 1)) @@ -57,9 +57,9 @@ class StringIterator { } [Symbol.iterator]() { ->Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1236, 31)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1186, 52), Decl(lib.d.ts, 1292, 11)) ->iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1236, 31)) +>Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1247, 31)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1197, 53), Decl(lib.d.ts, 1303, 11)) +>iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1247, 31)) return this; >this : Symbol(StringIterator, Decl(iteratorSpreadInCall12.ts, 17, 1)) diff --git a/tests/baselines/reference/iteratorSpreadInCall3.symbols b/tests/baselines/reference/iteratorSpreadInCall3.symbols index d43a7f9b4fca8..ac81fdea2618e 100644 --- a/tests/baselines/reference/iteratorSpreadInCall3.symbols +++ b/tests/baselines/reference/iteratorSpreadInCall3.symbols @@ -16,7 +16,7 @@ class SymbolIterator { return { value: Symbol(), >value : Symbol(value, Decl(iteratorSpreadInCall3.ts, 5, 16)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1186, 52), Decl(lib.d.ts, 1292, 11)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1197, 53), Decl(lib.d.ts, 1303, 11)) done: false >done : Symbol(done, Decl(iteratorSpreadInCall3.ts, 6, 28)) @@ -25,9 +25,9 @@ class SymbolIterator { } [Symbol.iterator]() { ->Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1236, 31)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1186, 52), Decl(lib.d.ts, 1292, 11)) ->iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1236, 31)) +>Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1247, 31)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1197, 53), Decl(lib.d.ts, 1303, 11)) +>iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1247, 31)) return this; >this : Symbol(SymbolIterator, Decl(iteratorSpreadInCall3.ts, 2, 32)) diff --git a/tests/baselines/reference/iteratorSpreadInCall5.symbols b/tests/baselines/reference/iteratorSpreadInCall5.symbols index 9d86858eb8eb0..da79720409de3 100644 --- a/tests/baselines/reference/iteratorSpreadInCall5.symbols +++ b/tests/baselines/reference/iteratorSpreadInCall5.symbols @@ -17,7 +17,7 @@ class SymbolIterator { return { value: Symbol(), >value : Symbol(value, Decl(iteratorSpreadInCall5.ts, 5, 16)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1186, 52), Decl(lib.d.ts, 1292, 11)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1197, 53), Decl(lib.d.ts, 1303, 11)) done: false >done : Symbol(done, Decl(iteratorSpreadInCall5.ts, 6, 28)) @@ -26,9 +26,9 @@ class SymbolIterator { } [Symbol.iterator]() { ->Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1236, 31)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1186, 52), Decl(lib.d.ts, 1292, 11)) ->iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1236, 31)) +>Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1247, 31)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1197, 53), Decl(lib.d.ts, 1303, 11)) +>iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1247, 31)) return this; >this : Symbol(SymbolIterator, Decl(iteratorSpreadInCall5.ts, 2, 43)) @@ -52,9 +52,9 @@ class StringIterator { } [Symbol.iterator]() { ->Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1236, 31)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1186, 52), Decl(lib.d.ts, 1292, 11)) ->iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1236, 31)) +>Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1247, 31)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1197, 53), Decl(lib.d.ts, 1303, 11)) +>iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1247, 31)) return this; >this : Symbol(StringIterator, Decl(iteratorSpreadInCall5.ts, 14, 1)) diff --git a/tests/baselines/reference/parserSymbolProperty1.symbols b/tests/baselines/reference/parserSymbolProperty1.symbols index 54d674ea0a83d..9b0b706077d60 100644 --- a/tests/baselines/reference/parserSymbolProperty1.symbols +++ b/tests/baselines/reference/parserSymbolProperty1.symbols @@ -3,7 +3,7 @@ interface I { >I : Symbol(I, Decl(parserSymbolProperty1.ts, 0, 0)) [Symbol.iterator]: string; ->Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1236, 31)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1186, 52), Decl(lib.d.ts, 1292, 11)) ->iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1236, 31)) +>Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1247, 31)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1197, 53), Decl(lib.d.ts, 1303, 11)) +>iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1247, 31)) } diff --git a/tests/baselines/reference/parserSymbolProperty2.symbols b/tests/baselines/reference/parserSymbolProperty2.symbols index 51fdb40efd49e..f13748e9996d9 100644 --- a/tests/baselines/reference/parserSymbolProperty2.symbols +++ b/tests/baselines/reference/parserSymbolProperty2.symbols @@ -3,7 +3,7 @@ interface I { >I : Symbol(I, Decl(parserSymbolProperty2.ts, 0, 0)) [Symbol.unscopables](): string; ->Symbol.unscopables : Symbol(SymbolConstructor.unscopables, Decl(lib.d.ts, 1284, 24)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1186, 52), Decl(lib.d.ts, 1292, 11)) ->unscopables : Symbol(SymbolConstructor.unscopables, Decl(lib.d.ts, 1284, 24)) +>Symbol.unscopables : Symbol(SymbolConstructor.unscopables, Decl(lib.d.ts, 1295, 24)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1197, 53), Decl(lib.d.ts, 1303, 11)) +>unscopables : Symbol(SymbolConstructor.unscopables, Decl(lib.d.ts, 1295, 24)) } diff --git a/tests/baselines/reference/parserSymbolProperty3.symbols b/tests/baselines/reference/parserSymbolProperty3.symbols index 11b6d8de94fcd..cb4ff68a63766 100644 --- a/tests/baselines/reference/parserSymbolProperty3.symbols +++ b/tests/baselines/reference/parserSymbolProperty3.symbols @@ -3,7 +3,7 @@ declare class C { >C : Symbol(C, Decl(parserSymbolProperty3.ts, 0, 0)) [Symbol.unscopables](): string; ->Symbol.unscopables : Symbol(SymbolConstructor.unscopables, Decl(lib.d.ts, 1284, 24)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1186, 52), Decl(lib.d.ts, 1292, 11)) ->unscopables : Symbol(SymbolConstructor.unscopables, Decl(lib.d.ts, 1284, 24)) +>Symbol.unscopables : Symbol(SymbolConstructor.unscopables, Decl(lib.d.ts, 1295, 24)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1197, 53), Decl(lib.d.ts, 1303, 11)) +>unscopables : Symbol(SymbolConstructor.unscopables, Decl(lib.d.ts, 1295, 24)) } diff --git a/tests/baselines/reference/parserSymbolProperty4.symbols b/tests/baselines/reference/parserSymbolProperty4.symbols index b2ffc2c89d222..34f550b750b9d 100644 --- a/tests/baselines/reference/parserSymbolProperty4.symbols +++ b/tests/baselines/reference/parserSymbolProperty4.symbols @@ -3,7 +3,7 @@ declare class C { >C : Symbol(C, Decl(parserSymbolProperty4.ts, 0, 0)) [Symbol.toPrimitive]: string; ->Symbol.toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, 1272, 18)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1186, 52), Decl(lib.d.ts, 1292, 11)) ->toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, 1272, 18)) +>Symbol.toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, 1283, 18)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1197, 53), Decl(lib.d.ts, 1303, 11)) +>toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, 1283, 18)) } diff --git a/tests/baselines/reference/parserSymbolProperty5.symbols b/tests/baselines/reference/parserSymbolProperty5.symbols index e896ebbd2a281..5257941831b89 100644 --- a/tests/baselines/reference/parserSymbolProperty5.symbols +++ b/tests/baselines/reference/parserSymbolProperty5.symbols @@ -3,7 +3,7 @@ class C { >C : Symbol(C, Decl(parserSymbolProperty5.ts, 0, 0)) [Symbol.toPrimitive]: string; ->Symbol.toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, 1272, 18)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1186, 52), Decl(lib.d.ts, 1292, 11)) ->toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, 1272, 18)) +>Symbol.toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, 1283, 18)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1197, 53), Decl(lib.d.ts, 1303, 11)) +>toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, 1283, 18)) } diff --git a/tests/baselines/reference/parserSymbolProperty6.symbols b/tests/baselines/reference/parserSymbolProperty6.symbols index 1859c954ba479..77770a62bd575 100644 --- a/tests/baselines/reference/parserSymbolProperty6.symbols +++ b/tests/baselines/reference/parserSymbolProperty6.symbols @@ -3,7 +3,7 @@ class C { >C : Symbol(C, Decl(parserSymbolProperty6.ts, 0, 0)) [Symbol.toStringTag]: string = ""; ->Symbol.toStringTag : Symbol(SymbolConstructor.toStringTag, Decl(lib.d.ts, 1278, 24)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1186, 52), Decl(lib.d.ts, 1292, 11)) ->toStringTag : Symbol(SymbolConstructor.toStringTag, Decl(lib.d.ts, 1278, 24)) +>Symbol.toStringTag : Symbol(SymbolConstructor.toStringTag, Decl(lib.d.ts, 1289, 24)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1197, 53), Decl(lib.d.ts, 1303, 11)) +>toStringTag : Symbol(SymbolConstructor.toStringTag, Decl(lib.d.ts, 1289, 24)) } diff --git a/tests/baselines/reference/parserSymbolProperty7.symbols b/tests/baselines/reference/parserSymbolProperty7.symbols index a91a8227ae496..3e912a18a2fdb 100644 --- a/tests/baselines/reference/parserSymbolProperty7.symbols +++ b/tests/baselines/reference/parserSymbolProperty7.symbols @@ -3,7 +3,7 @@ class C { >C : Symbol(C, Decl(parserSymbolProperty7.ts, 0, 0)) [Symbol.toStringTag](): void { } ->Symbol.toStringTag : Symbol(SymbolConstructor.toStringTag, Decl(lib.d.ts, 1278, 24)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1186, 52), Decl(lib.d.ts, 1292, 11)) ->toStringTag : Symbol(SymbolConstructor.toStringTag, Decl(lib.d.ts, 1278, 24)) +>Symbol.toStringTag : Symbol(SymbolConstructor.toStringTag, Decl(lib.d.ts, 1289, 24)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1197, 53), Decl(lib.d.ts, 1303, 11)) +>toStringTag : Symbol(SymbolConstructor.toStringTag, Decl(lib.d.ts, 1289, 24)) } diff --git a/tests/baselines/reference/parserSymbolProperty8.symbols b/tests/baselines/reference/parserSymbolProperty8.symbols index dee98ed1e77bf..dcf4a037db2ff 100644 --- a/tests/baselines/reference/parserSymbolProperty8.symbols +++ b/tests/baselines/reference/parserSymbolProperty8.symbols @@ -3,7 +3,7 @@ var x: { >x : Symbol(x, Decl(parserSymbolProperty8.ts, 0, 3)) [Symbol.toPrimitive](): string ->Symbol.toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, 1272, 18)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1186, 52), Decl(lib.d.ts, 1292, 11)) ->toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, 1272, 18)) +>Symbol.toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, 1283, 18)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1197, 53), Decl(lib.d.ts, 1303, 11)) +>toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, 1283, 18)) } diff --git a/tests/baselines/reference/parserSymbolProperty9.symbols b/tests/baselines/reference/parserSymbolProperty9.symbols index cffbded17e64b..f706a35e3b5af 100644 --- a/tests/baselines/reference/parserSymbolProperty9.symbols +++ b/tests/baselines/reference/parserSymbolProperty9.symbols @@ -3,7 +3,7 @@ var x: { >x : Symbol(x, Decl(parserSymbolProperty9.ts, 0, 3)) [Symbol.toPrimitive]: string ->Symbol.toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, 1272, 18)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1186, 52), Decl(lib.d.ts, 1292, 11)) ->toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, 1272, 18)) +>Symbol.toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, 1283, 18)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1197, 53), Decl(lib.d.ts, 1303, 11)) +>toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, 1283, 18)) } diff --git a/tests/baselines/reference/symbolDeclarationEmit1.symbols b/tests/baselines/reference/symbolDeclarationEmit1.symbols index f24cfe2b783fd..6b17c421a0731 100644 --- a/tests/baselines/reference/symbolDeclarationEmit1.symbols +++ b/tests/baselines/reference/symbolDeclarationEmit1.symbols @@ -3,7 +3,7 @@ class C { >C : Symbol(C, Decl(symbolDeclarationEmit1.ts, 0, 0)) [Symbol.toPrimitive]: number; ->Symbol.toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, 1272, 18)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1186, 52), Decl(lib.d.ts, 1292, 11)) ->toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, 1272, 18)) +>Symbol.toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, 1283, 18)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1197, 53), Decl(lib.d.ts, 1303, 11)) +>toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, 1283, 18)) } diff --git a/tests/baselines/reference/symbolDeclarationEmit10.symbols b/tests/baselines/reference/symbolDeclarationEmit10.symbols index 375bcf2174ab7..e620614d829eb 100644 --- a/tests/baselines/reference/symbolDeclarationEmit10.symbols +++ b/tests/baselines/reference/symbolDeclarationEmit10.symbols @@ -3,13 +3,13 @@ var obj = { >obj : Symbol(obj, Decl(symbolDeclarationEmit10.ts, 0, 3)) get [Symbol.isConcatSpreadable]() { return '' }, ->Symbol.isConcatSpreadable : Symbol(SymbolConstructor.isConcatSpreadable, Decl(lib.d.ts, 1230, 24)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1186, 52), Decl(lib.d.ts, 1292, 11)) ->isConcatSpreadable : Symbol(SymbolConstructor.isConcatSpreadable, Decl(lib.d.ts, 1230, 24)) +>Symbol.isConcatSpreadable : Symbol(SymbolConstructor.isConcatSpreadable, Decl(lib.d.ts, 1241, 24)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1197, 53), Decl(lib.d.ts, 1303, 11)) +>isConcatSpreadable : Symbol(SymbolConstructor.isConcatSpreadable, Decl(lib.d.ts, 1241, 24)) set [Symbol.isConcatSpreadable](x) { } ->Symbol.isConcatSpreadable : Symbol(SymbolConstructor.isConcatSpreadable, Decl(lib.d.ts, 1230, 24)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1186, 52), Decl(lib.d.ts, 1292, 11)) ->isConcatSpreadable : Symbol(SymbolConstructor.isConcatSpreadable, Decl(lib.d.ts, 1230, 24)) +>Symbol.isConcatSpreadable : Symbol(SymbolConstructor.isConcatSpreadable, Decl(lib.d.ts, 1241, 24)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1197, 53), Decl(lib.d.ts, 1303, 11)) +>isConcatSpreadable : Symbol(SymbolConstructor.isConcatSpreadable, Decl(lib.d.ts, 1241, 24)) >x : Symbol(x, Decl(symbolDeclarationEmit10.ts, 2, 36)) } diff --git a/tests/baselines/reference/symbolDeclarationEmit11.symbols b/tests/baselines/reference/symbolDeclarationEmit11.symbols index 90290569e0792..3cbae021c32e5 100644 --- a/tests/baselines/reference/symbolDeclarationEmit11.symbols +++ b/tests/baselines/reference/symbolDeclarationEmit11.symbols @@ -3,23 +3,23 @@ class C { >C : Symbol(C, Decl(symbolDeclarationEmit11.ts, 0, 0)) static [Symbol.iterator] = 0; ->Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1236, 31)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1186, 52), Decl(lib.d.ts, 1292, 11)) ->iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1236, 31)) +>Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1247, 31)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1197, 53), Decl(lib.d.ts, 1303, 11)) +>iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1247, 31)) static [Symbol.isConcatSpreadable]() { } ->Symbol.isConcatSpreadable : Symbol(SymbolConstructor.isConcatSpreadable, Decl(lib.d.ts, 1230, 24)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1186, 52), Decl(lib.d.ts, 1292, 11)) ->isConcatSpreadable : Symbol(SymbolConstructor.isConcatSpreadable, Decl(lib.d.ts, 1230, 24)) +>Symbol.isConcatSpreadable : Symbol(SymbolConstructor.isConcatSpreadable, Decl(lib.d.ts, 1241, 24)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1197, 53), Decl(lib.d.ts, 1303, 11)) +>isConcatSpreadable : Symbol(SymbolConstructor.isConcatSpreadable, Decl(lib.d.ts, 1241, 24)) static get [Symbol.toPrimitive]() { return ""; } ->Symbol.toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, 1272, 18)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1186, 52), Decl(lib.d.ts, 1292, 11)) ->toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, 1272, 18)) +>Symbol.toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, 1283, 18)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1197, 53), Decl(lib.d.ts, 1303, 11)) +>toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, 1283, 18)) static set [Symbol.toPrimitive](x) { } ->Symbol.toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, 1272, 18)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1186, 52), Decl(lib.d.ts, 1292, 11)) ->toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, 1272, 18)) +>Symbol.toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, 1283, 18)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1197, 53), Decl(lib.d.ts, 1303, 11)) +>toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, 1283, 18)) >x : Symbol(x, Decl(symbolDeclarationEmit11.ts, 4, 36)) } diff --git a/tests/baselines/reference/symbolDeclarationEmit13.symbols b/tests/baselines/reference/symbolDeclarationEmit13.symbols index 66f540a8caeaf..9e6b00fbc45a8 100644 --- a/tests/baselines/reference/symbolDeclarationEmit13.symbols +++ b/tests/baselines/reference/symbolDeclarationEmit13.symbols @@ -3,13 +3,13 @@ class C { >C : Symbol(C, Decl(symbolDeclarationEmit13.ts, 0, 0)) get [Symbol.toPrimitive]() { return ""; } ->Symbol.toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, 1272, 18)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1186, 52), Decl(lib.d.ts, 1292, 11)) ->toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, 1272, 18)) +>Symbol.toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, 1283, 18)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1197, 53), Decl(lib.d.ts, 1303, 11)) +>toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, 1283, 18)) set [Symbol.toStringTag](x) { } ->Symbol.toStringTag : Symbol(SymbolConstructor.toStringTag, Decl(lib.d.ts, 1278, 24)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1186, 52), Decl(lib.d.ts, 1292, 11)) ->toStringTag : Symbol(SymbolConstructor.toStringTag, Decl(lib.d.ts, 1278, 24)) +>Symbol.toStringTag : Symbol(SymbolConstructor.toStringTag, Decl(lib.d.ts, 1289, 24)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1197, 53), Decl(lib.d.ts, 1303, 11)) +>toStringTag : Symbol(SymbolConstructor.toStringTag, Decl(lib.d.ts, 1289, 24)) >x : Symbol(x, Decl(symbolDeclarationEmit13.ts, 2, 29)) } diff --git a/tests/baselines/reference/symbolDeclarationEmit14.symbols b/tests/baselines/reference/symbolDeclarationEmit14.symbols index 5927b8a6a298f..610a6bae9cd61 100644 --- a/tests/baselines/reference/symbolDeclarationEmit14.symbols +++ b/tests/baselines/reference/symbolDeclarationEmit14.symbols @@ -3,12 +3,12 @@ class C { >C : Symbol(C, Decl(symbolDeclarationEmit14.ts, 0, 0)) get [Symbol.toPrimitive]() { return ""; } ->Symbol.toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, 1272, 18)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1186, 52), Decl(lib.d.ts, 1292, 11)) ->toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, 1272, 18)) +>Symbol.toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, 1283, 18)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1197, 53), Decl(lib.d.ts, 1303, 11)) +>toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, 1283, 18)) get [Symbol.toStringTag]() { return ""; } ->Symbol.toStringTag : Symbol(SymbolConstructor.toStringTag, Decl(lib.d.ts, 1278, 24)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1186, 52), Decl(lib.d.ts, 1292, 11)) ->toStringTag : Symbol(SymbolConstructor.toStringTag, Decl(lib.d.ts, 1278, 24)) +>Symbol.toStringTag : Symbol(SymbolConstructor.toStringTag, Decl(lib.d.ts, 1289, 24)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1197, 53), Decl(lib.d.ts, 1303, 11)) +>toStringTag : Symbol(SymbolConstructor.toStringTag, Decl(lib.d.ts, 1289, 24)) } diff --git a/tests/baselines/reference/symbolDeclarationEmit2.symbols b/tests/baselines/reference/symbolDeclarationEmit2.symbols index 3c214bd9c25a1..e0ba5ffc72a78 100644 --- a/tests/baselines/reference/symbolDeclarationEmit2.symbols +++ b/tests/baselines/reference/symbolDeclarationEmit2.symbols @@ -3,7 +3,7 @@ class C { >C : Symbol(C, Decl(symbolDeclarationEmit2.ts, 0, 0)) [Symbol.toPrimitive] = ""; ->Symbol.toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, 1272, 18)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1186, 52), Decl(lib.d.ts, 1292, 11)) ->toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, 1272, 18)) +>Symbol.toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, 1283, 18)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1197, 53), Decl(lib.d.ts, 1303, 11)) +>toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, 1283, 18)) } diff --git a/tests/baselines/reference/symbolDeclarationEmit3.symbols b/tests/baselines/reference/symbolDeclarationEmit3.symbols index d3a3a31322352..712b233a744f4 100644 --- a/tests/baselines/reference/symbolDeclarationEmit3.symbols +++ b/tests/baselines/reference/symbolDeclarationEmit3.symbols @@ -3,20 +3,20 @@ class C { >C : Symbol(C, Decl(symbolDeclarationEmit3.ts, 0, 0)) [Symbol.toPrimitive](x: number); ->Symbol.toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, 1272, 18)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1186, 52), Decl(lib.d.ts, 1292, 11)) ->toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, 1272, 18)) +>Symbol.toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, 1283, 18)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1197, 53), Decl(lib.d.ts, 1303, 11)) +>toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, 1283, 18)) >x : Symbol(x, Decl(symbolDeclarationEmit3.ts, 1, 25)) [Symbol.toPrimitive](x: string); ->Symbol.toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, 1272, 18)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1186, 52), Decl(lib.d.ts, 1292, 11)) ->toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, 1272, 18)) +>Symbol.toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, 1283, 18)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1197, 53), Decl(lib.d.ts, 1303, 11)) +>toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, 1283, 18)) >x : Symbol(x, Decl(symbolDeclarationEmit3.ts, 2, 25)) [Symbol.toPrimitive](x: any) { } ->Symbol.toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, 1272, 18)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1186, 52), Decl(lib.d.ts, 1292, 11)) ->toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, 1272, 18)) +>Symbol.toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, 1283, 18)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1197, 53), Decl(lib.d.ts, 1303, 11)) +>toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, 1283, 18)) >x : Symbol(x, Decl(symbolDeclarationEmit3.ts, 3, 25)) } diff --git a/tests/baselines/reference/symbolDeclarationEmit4.symbols b/tests/baselines/reference/symbolDeclarationEmit4.symbols index d552300b70ece..3a24de2f0e331 100644 --- a/tests/baselines/reference/symbolDeclarationEmit4.symbols +++ b/tests/baselines/reference/symbolDeclarationEmit4.symbols @@ -3,13 +3,13 @@ class C { >C : Symbol(C, Decl(symbolDeclarationEmit4.ts, 0, 0)) get [Symbol.toPrimitive]() { return ""; } ->Symbol.toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, 1272, 18)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1186, 52), Decl(lib.d.ts, 1292, 11)) ->toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, 1272, 18)) +>Symbol.toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, 1283, 18)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1197, 53), Decl(lib.d.ts, 1303, 11)) +>toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, 1283, 18)) set [Symbol.toPrimitive](x) { } ->Symbol.toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, 1272, 18)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1186, 52), Decl(lib.d.ts, 1292, 11)) ->toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, 1272, 18)) +>Symbol.toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, 1283, 18)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1197, 53), Decl(lib.d.ts, 1303, 11)) +>toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, 1283, 18)) >x : Symbol(x, Decl(symbolDeclarationEmit4.ts, 2, 29)) } diff --git a/tests/baselines/reference/symbolDeclarationEmit5.symbols b/tests/baselines/reference/symbolDeclarationEmit5.symbols index 7f5fc3cf51baf..5580b833c0814 100644 --- a/tests/baselines/reference/symbolDeclarationEmit5.symbols +++ b/tests/baselines/reference/symbolDeclarationEmit5.symbols @@ -3,7 +3,7 @@ interface I { >I : Symbol(I, Decl(symbolDeclarationEmit5.ts, 0, 0)) [Symbol.isConcatSpreadable](): string; ->Symbol.isConcatSpreadable : Symbol(SymbolConstructor.isConcatSpreadable, Decl(lib.d.ts, 1230, 24)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1186, 52), Decl(lib.d.ts, 1292, 11)) ->isConcatSpreadable : Symbol(SymbolConstructor.isConcatSpreadable, Decl(lib.d.ts, 1230, 24)) +>Symbol.isConcatSpreadable : Symbol(SymbolConstructor.isConcatSpreadable, Decl(lib.d.ts, 1241, 24)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1197, 53), Decl(lib.d.ts, 1303, 11)) +>isConcatSpreadable : Symbol(SymbolConstructor.isConcatSpreadable, Decl(lib.d.ts, 1241, 24)) } diff --git a/tests/baselines/reference/symbolDeclarationEmit6.symbols b/tests/baselines/reference/symbolDeclarationEmit6.symbols index fe60e2ecc3103..10c95ed620bc9 100644 --- a/tests/baselines/reference/symbolDeclarationEmit6.symbols +++ b/tests/baselines/reference/symbolDeclarationEmit6.symbols @@ -3,7 +3,7 @@ interface I { >I : Symbol(I, Decl(symbolDeclarationEmit6.ts, 0, 0)) [Symbol.isConcatSpreadable]: string; ->Symbol.isConcatSpreadable : Symbol(SymbolConstructor.isConcatSpreadable, Decl(lib.d.ts, 1230, 24)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1186, 52), Decl(lib.d.ts, 1292, 11)) ->isConcatSpreadable : Symbol(SymbolConstructor.isConcatSpreadable, Decl(lib.d.ts, 1230, 24)) +>Symbol.isConcatSpreadable : Symbol(SymbolConstructor.isConcatSpreadable, Decl(lib.d.ts, 1241, 24)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1197, 53), Decl(lib.d.ts, 1303, 11)) +>isConcatSpreadable : Symbol(SymbolConstructor.isConcatSpreadable, Decl(lib.d.ts, 1241, 24)) } diff --git a/tests/baselines/reference/symbolDeclarationEmit7.symbols b/tests/baselines/reference/symbolDeclarationEmit7.symbols index b044c5264d85a..42f6b86686737 100644 --- a/tests/baselines/reference/symbolDeclarationEmit7.symbols +++ b/tests/baselines/reference/symbolDeclarationEmit7.symbols @@ -3,7 +3,7 @@ var obj: { >obj : Symbol(obj, Decl(symbolDeclarationEmit7.ts, 0, 3)) [Symbol.isConcatSpreadable]: string; ->Symbol.isConcatSpreadable : Symbol(SymbolConstructor.isConcatSpreadable, Decl(lib.d.ts, 1230, 24)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1186, 52), Decl(lib.d.ts, 1292, 11)) ->isConcatSpreadable : Symbol(SymbolConstructor.isConcatSpreadable, Decl(lib.d.ts, 1230, 24)) +>Symbol.isConcatSpreadable : Symbol(SymbolConstructor.isConcatSpreadable, Decl(lib.d.ts, 1241, 24)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1197, 53), Decl(lib.d.ts, 1303, 11)) +>isConcatSpreadable : Symbol(SymbolConstructor.isConcatSpreadable, Decl(lib.d.ts, 1241, 24)) } diff --git a/tests/baselines/reference/symbolDeclarationEmit8.symbols b/tests/baselines/reference/symbolDeclarationEmit8.symbols index 797b422c7fc77..13331a49dc355 100644 --- a/tests/baselines/reference/symbolDeclarationEmit8.symbols +++ b/tests/baselines/reference/symbolDeclarationEmit8.symbols @@ -3,7 +3,7 @@ var obj = { >obj : Symbol(obj, Decl(symbolDeclarationEmit8.ts, 0, 3)) [Symbol.isConcatSpreadable]: 0 ->Symbol.isConcatSpreadable : Symbol(SymbolConstructor.isConcatSpreadable, Decl(lib.d.ts, 1230, 24)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1186, 52), Decl(lib.d.ts, 1292, 11)) ->isConcatSpreadable : Symbol(SymbolConstructor.isConcatSpreadable, Decl(lib.d.ts, 1230, 24)) +>Symbol.isConcatSpreadable : Symbol(SymbolConstructor.isConcatSpreadable, Decl(lib.d.ts, 1241, 24)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1197, 53), Decl(lib.d.ts, 1303, 11)) +>isConcatSpreadable : Symbol(SymbolConstructor.isConcatSpreadable, Decl(lib.d.ts, 1241, 24)) } diff --git a/tests/baselines/reference/symbolDeclarationEmit9.symbols b/tests/baselines/reference/symbolDeclarationEmit9.symbols index deaf1c1bb62d6..2b6984b6baef0 100644 --- a/tests/baselines/reference/symbolDeclarationEmit9.symbols +++ b/tests/baselines/reference/symbolDeclarationEmit9.symbols @@ -3,7 +3,7 @@ var obj = { >obj : Symbol(obj, Decl(symbolDeclarationEmit9.ts, 0, 3)) [Symbol.isConcatSpreadable]() { } ->Symbol.isConcatSpreadable : Symbol(SymbolConstructor.isConcatSpreadable, Decl(lib.d.ts, 1230, 24)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1186, 52), Decl(lib.d.ts, 1292, 11)) ->isConcatSpreadable : Symbol(SymbolConstructor.isConcatSpreadable, Decl(lib.d.ts, 1230, 24)) +>Symbol.isConcatSpreadable : Symbol(SymbolConstructor.isConcatSpreadable, Decl(lib.d.ts, 1241, 24)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1197, 53), Decl(lib.d.ts, 1303, 11)) +>isConcatSpreadable : Symbol(SymbolConstructor.isConcatSpreadable, Decl(lib.d.ts, 1241, 24)) } diff --git a/tests/baselines/reference/symbolProperty11.symbols b/tests/baselines/reference/symbolProperty11.symbols index f8b758cbf6879..bff61ccc01476 100644 --- a/tests/baselines/reference/symbolProperty11.symbols +++ b/tests/baselines/reference/symbolProperty11.symbols @@ -6,9 +6,9 @@ interface I { >I : Symbol(I, Decl(symbolProperty11.ts, 0, 11)) [Symbol.iterator]?: { x }; ->Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1236, 31)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1186, 52), Decl(lib.d.ts, 1292, 11)) ->iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1236, 31)) +>Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1247, 31)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1197, 53), Decl(lib.d.ts, 1303, 11)) +>iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1247, 31)) >x : Symbol(x, Decl(symbolProperty11.ts, 2, 25)) } diff --git a/tests/baselines/reference/symbolProperty13.symbols b/tests/baselines/reference/symbolProperty13.symbols index 246ca2f085148..1b0026c5ea4bb 100644 --- a/tests/baselines/reference/symbolProperty13.symbols +++ b/tests/baselines/reference/symbolProperty13.symbols @@ -3,9 +3,9 @@ class C { >C : Symbol(C, Decl(symbolProperty13.ts, 0, 0)) [Symbol.iterator]: { x; y }; ->Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1236, 31)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1186, 52), Decl(lib.d.ts, 1292, 11)) ->iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1236, 31)) +>Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1247, 31)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1197, 53), Decl(lib.d.ts, 1303, 11)) +>iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1247, 31)) >x : Symbol(x, Decl(symbolProperty13.ts, 1, 24)) >y : Symbol(y, Decl(symbolProperty13.ts, 1, 27)) } @@ -13,9 +13,9 @@ interface I { >I : Symbol(I, Decl(symbolProperty13.ts, 2, 1)) [Symbol.iterator]: { x }; ->Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1236, 31)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1186, 52), Decl(lib.d.ts, 1292, 11)) ->iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1236, 31)) +>Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1247, 31)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1197, 53), Decl(lib.d.ts, 1303, 11)) +>iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1247, 31)) >x : Symbol(x, Decl(symbolProperty13.ts, 4, 24)) } diff --git a/tests/baselines/reference/symbolProperty14.symbols b/tests/baselines/reference/symbolProperty14.symbols index 4531b13dca132..358819f47b393 100644 --- a/tests/baselines/reference/symbolProperty14.symbols +++ b/tests/baselines/reference/symbolProperty14.symbols @@ -3,9 +3,9 @@ class C { >C : Symbol(C, Decl(symbolProperty14.ts, 0, 0)) [Symbol.iterator]: { x; y }; ->Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1236, 31)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1186, 52), Decl(lib.d.ts, 1292, 11)) ->iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1236, 31)) +>Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1247, 31)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1197, 53), Decl(lib.d.ts, 1303, 11)) +>iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1247, 31)) >x : Symbol(x, Decl(symbolProperty14.ts, 1, 24)) >y : Symbol(y, Decl(symbolProperty14.ts, 1, 27)) } @@ -13,9 +13,9 @@ interface I { >I : Symbol(I, Decl(symbolProperty14.ts, 2, 1)) [Symbol.iterator]?: { x }; ->Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1236, 31)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1186, 52), Decl(lib.d.ts, 1292, 11)) ->iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1236, 31)) +>Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1247, 31)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1197, 53), Decl(lib.d.ts, 1303, 11)) +>iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1247, 31)) >x : Symbol(x, Decl(symbolProperty14.ts, 4, 25)) } diff --git a/tests/baselines/reference/symbolProperty15.symbols b/tests/baselines/reference/symbolProperty15.symbols index 6027f5e797e0d..fe630f8f82d1f 100644 --- a/tests/baselines/reference/symbolProperty15.symbols +++ b/tests/baselines/reference/symbolProperty15.symbols @@ -6,9 +6,9 @@ interface I { >I : Symbol(I, Decl(symbolProperty15.ts, 0, 11)) [Symbol.iterator]?: { x }; ->Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1236, 31)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1186, 52), Decl(lib.d.ts, 1292, 11)) ->iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1236, 31)) +>Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1247, 31)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1197, 53), Decl(lib.d.ts, 1303, 11)) +>iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1247, 31)) >x : Symbol(x, Decl(symbolProperty15.ts, 2, 25)) } diff --git a/tests/baselines/reference/symbolProperty16.symbols b/tests/baselines/reference/symbolProperty16.symbols index f7700e3b777b2..d87416cd43a6c 100644 --- a/tests/baselines/reference/symbolProperty16.symbols +++ b/tests/baselines/reference/symbolProperty16.symbols @@ -3,18 +3,18 @@ class C { >C : Symbol(C, Decl(symbolProperty16.ts, 0, 0)) private [Symbol.iterator]: { x }; ->Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1236, 31)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1186, 52), Decl(lib.d.ts, 1292, 11)) ->iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1236, 31)) +>Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1247, 31)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1197, 53), Decl(lib.d.ts, 1303, 11)) +>iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1247, 31)) >x : Symbol(x, Decl(symbolProperty16.ts, 1, 32)) } interface I { >I : Symbol(I, Decl(symbolProperty16.ts, 2, 1)) [Symbol.iterator]: { x }; ->Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1236, 31)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1186, 52), Decl(lib.d.ts, 1292, 11)) ->iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1236, 31)) +>Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1247, 31)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1197, 53), Decl(lib.d.ts, 1303, 11)) +>iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1247, 31)) >x : Symbol(x, Decl(symbolProperty16.ts, 4, 24)) } diff --git a/tests/baselines/reference/symbolProperty18.symbols b/tests/baselines/reference/symbolProperty18.symbols index bc23c468a22cd..4597eb81c0f22 100644 --- a/tests/baselines/reference/symbolProperty18.symbols +++ b/tests/baselines/reference/symbolProperty18.symbols @@ -3,39 +3,39 @@ var i = { >i : Symbol(i, Decl(symbolProperty18.ts, 0, 3)) [Symbol.iterator]: 0, ->Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1236, 31)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1186, 52), Decl(lib.d.ts, 1292, 11)) ->iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1236, 31)) +>Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1247, 31)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1197, 53), Decl(lib.d.ts, 1303, 11)) +>iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1247, 31)) [Symbol.toStringTag]() { return "" }, ->Symbol.toStringTag : Symbol(SymbolConstructor.toStringTag, Decl(lib.d.ts, 1278, 24)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1186, 52), Decl(lib.d.ts, 1292, 11)) ->toStringTag : Symbol(SymbolConstructor.toStringTag, Decl(lib.d.ts, 1278, 24)) +>Symbol.toStringTag : Symbol(SymbolConstructor.toStringTag, Decl(lib.d.ts, 1289, 24)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1197, 53), Decl(lib.d.ts, 1303, 11)) +>toStringTag : Symbol(SymbolConstructor.toStringTag, Decl(lib.d.ts, 1289, 24)) set [Symbol.toPrimitive](p: boolean) { } ->Symbol.toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, 1272, 18)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1186, 52), Decl(lib.d.ts, 1292, 11)) ->toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, 1272, 18)) +>Symbol.toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, 1283, 18)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1197, 53), Decl(lib.d.ts, 1303, 11)) +>toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, 1283, 18)) >p : Symbol(p, Decl(symbolProperty18.ts, 3, 29)) } var it = i[Symbol.iterator]; >it : Symbol(it, Decl(symbolProperty18.ts, 6, 3)) >i : Symbol(i, Decl(symbolProperty18.ts, 0, 3)) ->Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1236, 31)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1186, 52), Decl(lib.d.ts, 1292, 11)) ->iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1236, 31)) +>Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1247, 31)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1197, 53), Decl(lib.d.ts, 1303, 11)) +>iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1247, 31)) var str = i[Symbol.toStringTag](); >str : Symbol(str, Decl(symbolProperty18.ts, 7, 3)) >i : Symbol(i, Decl(symbolProperty18.ts, 0, 3)) ->Symbol.toStringTag : Symbol(SymbolConstructor.toStringTag, Decl(lib.d.ts, 1278, 24)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1186, 52), Decl(lib.d.ts, 1292, 11)) ->toStringTag : Symbol(SymbolConstructor.toStringTag, Decl(lib.d.ts, 1278, 24)) +>Symbol.toStringTag : Symbol(SymbolConstructor.toStringTag, Decl(lib.d.ts, 1289, 24)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1197, 53), Decl(lib.d.ts, 1303, 11)) +>toStringTag : Symbol(SymbolConstructor.toStringTag, Decl(lib.d.ts, 1289, 24)) i[Symbol.toPrimitive] = false; >i : Symbol(i, Decl(symbolProperty18.ts, 0, 3)) ->Symbol.toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, 1272, 18)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1186, 52), Decl(lib.d.ts, 1292, 11)) ->toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, 1272, 18)) +>Symbol.toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, 1283, 18)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1197, 53), Decl(lib.d.ts, 1303, 11)) +>toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, 1283, 18)) diff --git a/tests/baselines/reference/symbolProperty19.symbols b/tests/baselines/reference/symbolProperty19.symbols index a0274f2c7622d..d3295b6507e3d 100644 --- a/tests/baselines/reference/symbolProperty19.symbols +++ b/tests/baselines/reference/symbolProperty19.symbols @@ -3,15 +3,15 @@ var i = { >i : Symbol(i, Decl(symbolProperty19.ts, 0, 3)) [Symbol.iterator]: { p: null }, ->Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1236, 31)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1186, 52), Decl(lib.d.ts, 1292, 11)) ->iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1236, 31)) +>Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1247, 31)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1197, 53), Decl(lib.d.ts, 1303, 11)) +>iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1247, 31)) >p : Symbol(p, Decl(symbolProperty19.ts, 1, 24)) [Symbol.toStringTag]() { return { p: undefined }; } ->Symbol.toStringTag : Symbol(SymbolConstructor.toStringTag, Decl(lib.d.ts, 1278, 24)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1186, 52), Decl(lib.d.ts, 1292, 11)) ->toStringTag : Symbol(SymbolConstructor.toStringTag, Decl(lib.d.ts, 1278, 24)) +>Symbol.toStringTag : Symbol(SymbolConstructor.toStringTag, Decl(lib.d.ts, 1289, 24)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1197, 53), Decl(lib.d.ts, 1303, 11)) +>toStringTag : Symbol(SymbolConstructor.toStringTag, Decl(lib.d.ts, 1289, 24)) >p : Symbol(p, Decl(symbolProperty19.ts, 2, 37)) >undefined : Symbol(undefined) } @@ -19,14 +19,14 @@ var i = { var it = i[Symbol.iterator]; >it : Symbol(it, Decl(symbolProperty19.ts, 5, 3)) >i : Symbol(i, Decl(symbolProperty19.ts, 0, 3)) ->Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1236, 31)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1186, 52), Decl(lib.d.ts, 1292, 11)) ->iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1236, 31)) +>Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1247, 31)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1197, 53), Decl(lib.d.ts, 1303, 11)) +>iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1247, 31)) var str = i[Symbol.toStringTag](); >str : Symbol(str, Decl(symbolProperty19.ts, 6, 3)) >i : Symbol(i, Decl(symbolProperty19.ts, 0, 3)) ->Symbol.toStringTag : Symbol(SymbolConstructor.toStringTag, Decl(lib.d.ts, 1278, 24)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1186, 52), Decl(lib.d.ts, 1292, 11)) ->toStringTag : Symbol(SymbolConstructor.toStringTag, Decl(lib.d.ts, 1278, 24)) +>Symbol.toStringTag : Symbol(SymbolConstructor.toStringTag, Decl(lib.d.ts, 1289, 24)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1197, 53), Decl(lib.d.ts, 1303, 11)) +>toStringTag : Symbol(SymbolConstructor.toStringTag, Decl(lib.d.ts, 1289, 24)) diff --git a/tests/baselines/reference/symbolProperty2.symbols b/tests/baselines/reference/symbolProperty2.symbols index c6bb74bef3103..ea698562ed2be 100644 --- a/tests/baselines/reference/symbolProperty2.symbols +++ b/tests/baselines/reference/symbolProperty2.symbols @@ -1,7 +1,7 @@ === tests/cases/conformance/es6/Symbols/symbolProperty2.ts === var s = Symbol(); >s : Symbol(s, Decl(symbolProperty2.ts, 0, 3)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1186, 52), Decl(lib.d.ts, 1292, 11)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1197, 53), Decl(lib.d.ts, 1303, 11)) var x = { >x : Symbol(x, Decl(symbolProperty2.ts, 1, 3)) diff --git a/tests/baselines/reference/symbolProperty20.symbols b/tests/baselines/reference/symbolProperty20.symbols index 04c76275b55ed..714b771b67e3f 100644 --- a/tests/baselines/reference/symbolProperty20.symbols +++ b/tests/baselines/reference/symbolProperty20.symbols @@ -3,15 +3,15 @@ interface I { >I : Symbol(I, Decl(symbolProperty20.ts, 0, 0)) [Symbol.iterator]: (s: string) => string; ->Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1236, 31)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1186, 52), Decl(lib.d.ts, 1292, 11)) ->iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1236, 31)) +>Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1247, 31)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1197, 53), Decl(lib.d.ts, 1303, 11)) +>iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1247, 31)) >s : Symbol(s, Decl(symbolProperty20.ts, 1, 24)) [Symbol.toStringTag](s: number): number; ->Symbol.toStringTag : Symbol(SymbolConstructor.toStringTag, Decl(lib.d.ts, 1278, 24)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1186, 52), Decl(lib.d.ts, 1292, 11)) ->toStringTag : Symbol(SymbolConstructor.toStringTag, Decl(lib.d.ts, 1278, 24)) +>Symbol.toStringTag : Symbol(SymbolConstructor.toStringTag, Decl(lib.d.ts, 1289, 24)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1197, 53), Decl(lib.d.ts, 1303, 11)) +>toStringTag : Symbol(SymbolConstructor.toStringTag, Decl(lib.d.ts, 1289, 24)) >s : Symbol(s, Decl(symbolProperty20.ts, 2, 25)) } @@ -20,16 +20,16 @@ var i: I = { >I : Symbol(I, Decl(symbolProperty20.ts, 0, 0)) [Symbol.iterator]: s => s, ->Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1236, 31)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1186, 52), Decl(lib.d.ts, 1292, 11)) ->iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1236, 31)) +>Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1247, 31)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1197, 53), Decl(lib.d.ts, 1303, 11)) +>iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1247, 31)) >s : Symbol(s, Decl(symbolProperty20.ts, 6, 22)) >s : Symbol(s, Decl(symbolProperty20.ts, 6, 22)) [Symbol.toStringTag](n) { return n; } ->Symbol.toStringTag : Symbol(SymbolConstructor.toStringTag, Decl(lib.d.ts, 1278, 24)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1186, 52), Decl(lib.d.ts, 1292, 11)) ->toStringTag : Symbol(SymbolConstructor.toStringTag, Decl(lib.d.ts, 1278, 24)) +>Symbol.toStringTag : Symbol(SymbolConstructor.toStringTag, Decl(lib.d.ts, 1289, 24)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1197, 53), Decl(lib.d.ts, 1303, 11)) +>toStringTag : Symbol(SymbolConstructor.toStringTag, Decl(lib.d.ts, 1289, 24)) >n : Symbol(n, Decl(symbolProperty20.ts, 7, 25)) >n : Symbol(n, Decl(symbolProperty20.ts, 7, 25)) } diff --git a/tests/baselines/reference/symbolProperty21.symbols b/tests/baselines/reference/symbolProperty21.symbols index 544813c305638..f2061b3bb2cd0 100644 --- a/tests/baselines/reference/symbolProperty21.symbols +++ b/tests/baselines/reference/symbolProperty21.symbols @@ -5,15 +5,15 @@ interface I { >U : Symbol(U, Decl(symbolProperty21.ts, 0, 14)) [Symbol.unscopables]: T; ->Symbol.unscopables : Symbol(SymbolConstructor.unscopables, Decl(lib.d.ts, 1284, 24)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1186, 52), Decl(lib.d.ts, 1292, 11)) ->unscopables : Symbol(SymbolConstructor.unscopables, Decl(lib.d.ts, 1284, 24)) +>Symbol.unscopables : Symbol(SymbolConstructor.unscopables, Decl(lib.d.ts, 1295, 24)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1197, 53), Decl(lib.d.ts, 1303, 11)) +>unscopables : Symbol(SymbolConstructor.unscopables, Decl(lib.d.ts, 1295, 24)) >T : Symbol(T, Decl(symbolProperty21.ts, 0, 12)) [Symbol.isConcatSpreadable]: U; ->Symbol.isConcatSpreadable : Symbol(SymbolConstructor.isConcatSpreadable, Decl(lib.d.ts, 1230, 24)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1186, 52), Decl(lib.d.ts, 1292, 11)) ->isConcatSpreadable : Symbol(SymbolConstructor.isConcatSpreadable, Decl(lib.d.ts, 1230, 24)) +>Symbol.isConcatSpreadable : Symbol(SymbolConstructor.isConcatSpreadable, Decl(lib.d.ts, 1241, 24)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1197, 53), Decl(lib.d.ts, 1303, 11)) +>isConcatSpreadable : Symbol(SymbolConstructor.isConcatSpreadable, Decl(lib.d.ts, 1241, 24)) >U : Symbol(U, Decl(symbolProperty21.ts, 0, 14)) } @@ -34,18 +34,18 @@ foo({ >foo : Symbol(foo, Decl(symbolProperty21.ts, 3, 1)) [Symbol.isConcatSpreadable]: "", ->Symbol.isConcatSpreadable : Symbol(SymbolConstructor.isConcatSpreadable, Decl(lib.d.ts, 1230, 24)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1186, 52), Decl(lib.d.ts, 1292, 11)) ->isConcatSpreadable : Symbol(SymbolConstructor.isConcatSpreadable, Decl(lib.d.ts, 1230, 24)) +>Symbol.isConcatSpreadable : Symbol(SymbolConstructor.isConcatSpreadable, Decl(lib.d.ts, 1241, 24)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1197, 53), Decl(lib.d.ts, 1303, 11)) +>isConcatSpreadable : Symbol(SymbolConstructor.isConcatSpreadable, Decl(lib.d.ts, 1241, 24)) [Symbol.toPrimitive]: 0, ->Symbol.toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, 1272, 18)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1186, 52), Decl(lib.d.ts, 1292, 11)) ->toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, 1272, 18)) +>Symbol.toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, 1283, 18)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1197, 53), Decl(lib.d.ts, 1303, 11)) +>toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, 1283, 18)) [Symbol.unscopables]: true ->Symbol.unscopables : Symbol(SymbolConstructor.unscopables, Decl(lib.d.ts, 1284, 24)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1186, 52), Decl(lib.d.ts, 1292, 11)) ->unscopables : Symbol(SymbolConstructor.unscopables, Decl(lib.d.ts, 1284, 24)) +>Symbol.unscopables : Symbol(SymbolConstructor.unscopables, Decl(lib.d.ts, 1295, 24)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1197, 53), Decl(lib.d.ts, 1303, 11)) +>unscopables : Symbol(SymbolConstructor.unscopables, Decl(lib.d.ts, 1295, 24)) }); diff --git a/tests/baselines/reference/symbolProperty22.symbols b/tests/baselines/reference/symbolProperty22.symbols index e9f6761e121ff..d1bee54bd7b69 100644 --- a/tests/baselines/reference/symbolProperty22.symbols +++ b/tests/baselines/reference/symbolProperty22.symbols @@ -5,9 +5,9 @@ interface I { >U : Symbol(U, Decl(symbolProperty22.ts, 0, 14)) [Symbol.unscopables](x: T): U; ->Symbol.unscopables : Symbol(SymbolConstructor.unscopables, Decl(lib.d.ts, 1284, 24)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1186, 52), Decl(lib.d.ts, 1292, 11)) ->unscopables : Symbol(SymbolConstructor.unscopables, Decl(lib.d.ts, 1284, 24)) +>Symbol.unscopables : Symbol(SymbolConstructor.unscopables, Decl(lib.d.ts, 1295, 24)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1197, 53), Decl(lib.d.ts, 1303, 11)) +>unscopables : Symbol(SymbolConstructor.unscopables, Decl(lib.d.ts, 1295, 24)) >x : Symbol(x, Decl(symbolProperty22.ts, 1, 25)) >T : Symbol(T, Decl(symbolProperty22.ts, 0, 12)) >U : Symbol(U, Decl(symbolProperty22.ts, 0, 14)) @@ -27,9 +27,9 @@ declare function foo(p1: T, p2: I): U; foo("", { [Symbol.unscopables]: s => s.length }); >foo : Symbol(foo, Decl(symbolProperty22.ts, 2, 1)) ->Symbol.unscopables : Symbol(SymbolConstructor.unscopables, Decl(lib.d.ts, 1284, 24)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1186, 52), Decl(lib.d.ts, 1292, 11)) ->unscopables : Symbol(SymbolConstructor.unscopables, Decl(lib.d.ts, 1284, 24)) +>Symbol.unscopables : Symbol(SymbolConstructor.unscopables, Decl(lib.d.ts, 1295, 24)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1197, 53), Decl(lib.d.ts, 1303, 11)) +>unscopables : Symbol(SymbolConstructor.unscopables, Decl(lib.d.ts, 1295, 24)) >s : Symbol(s, Decl(symbolProperty22.ts, 6, 31)) >s.length : Symbol(String.length, Decl(lib.d.ts, 414, 19)) >s : Symbol(s, Decl(symbolProperty22.ts, 6, 31)) diff --git a/tests/baselines/reference/symbolProperty23.symbols b/tests/baselines/reference/symbolProperty23.symbols index d220f80c0f75a..94dc416010e09 100644 --- a/tests/baselines/reference/symbolProperty23.symbols +++ b/tests/baselines/reference/symbolProperty23.symbols @@ -3,9 +3,9 @@ interface I { >I : Symbol(I, Decl(symbolProperty23.ts, 0, 0)) [Symbol.toPrimitive]: () => boolean; ->Symbol.toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, 1272, 18)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1186, 52), Decl(lib.d.ts, 1292, 11)) ->toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, 1272, 18)) +>Symbol.toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, 1283, 18)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1197, 53), Decl(lib.d.ts, 1303, 11)) +>toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, 1283, 18)) } class C implements I { @@ -13,9 +13,9 @@ class C implements I { >I : Symbol(I, Decl(symbolProperty23.ts, 0, 0)) [Symbol.toPrimitive]() { ->Symbol.toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, 1272, 18)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1186, 52), Decl(lib.d.ts, 1292, 11)) ->toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, 1272, 18)) +>Symbol.toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, 1283, 18)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1197, 53), Decl(lib.d.ts, 1303, 11)) +>toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, 1283, 18)) return true; } diff --git a/tests/baselines/reference/symbolProperty26.symbols b/tests/baselines/reference/symbolProperty26.symbols index 819b93e614776..0850ec9cdaa59 100644 --- a/tests/baselines/reference/symbolProperty26.symbols +++ b/tests/baselines/reference/symbolProperty26.symbols @@ -3,9 +3,9 @@ class C1 { >C1 : Symbol(C1, Decl(symbolProperty26.ts, 0, 0)) [Symbol.toStringTag]() { ->Symbol.toStringTag : Symbol(SymbolConstructor.toStringTag, Decl(lib.d.ts, 1278, 24)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1186, 52), Decl(lib.d.ts, 1292, 11)) ->toStringTag : Symbol(SymbolConstructor.toStringTag, Decl(lib.d.ts, 1278, 24)) +>Symbol.toStringTag : Symbol(SymbolConstructor.toStringTag, Decl(lib.d.ts, 1289, 24)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1197, 53), Decl(lib.d.ts, 1303, 11)) +>toStringTag : Symbol(SymbolConstructor.toStringTag, Decl(lib.d.ts, 1289, 24)) return ""; } @@ -16,9 +16,9 @@ class C2 extends C1 { >C1 : Symbol(C1, Decl(symbolProperty26.ts, 0, 0)) [Symbol.toStringTag]() { ->Symbol.toStringTag : Symbol(SymbolConstructor.toStringTag, Decl(lib.d.ts, 1278, 24)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1186, 52), Decl(lib.d.ts, 1292, 11)) ->toStringTag : Symbol(SymbolConstructor.toStringTag, Decl(lib.d.ts, 1278, 24)) +>Symbol.toStringTag : Symbol(SymbolConstructor.toStringTag, Decl(lib.d.ts, 1289, 24)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1197, 53), Decl(lib.d.ts, 1303, 11)) +>toStringTag : Symbol(SymbolConstructor.toStringTag, Decl(lib.d.ts, 1289, 24)) return ""; } diff --git a/tests/baselines/reference/symbolProperty27.symbols b/tests/baselines/reference/symbolProperty27.symbols index 7ead7b14b345d..ed56e55cca613 100644 --- a/tests/baselines/reference/symbolProperty27.symbols +++ b/tests/baselines/reference/symbolProperty27.symbols @@ -3,9 +3,9 @@ class C1 { >C1 : Symbol(C1, Decl(symbolProperty27.ts, 0, 0)) [Symbol.toStringTag]() { ->Symbol.toStringTag : Symbol(SymbolConstructor.toStringTag, Decl(lib.d.ts, 1278, 24)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1186, 52), Decl(lib.d.ts, 1292, 11)) ->toStringTag : Symbol(SymbolConstructor.toStringTag, Decl(lib.d.ts, 1278, 24)) +>Symbol.toStringTag : Symbol(SymbolConstructor.toStringTag, Decl(lib.d.ts, 1289, 24)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1197, 53), Decl(lib.d.ts, 1303, 11)) +>toStringTag : Symbol(SymbolConstructor.toStringTag, Decl(lib.d.ts, 1289, 24)) return {}; } @@ -16,9 +16,9 @@ class C2 extends C1 { >C1 : Symbol(C1, Decl(symbolProperty27.ts, 0, 0)) [Symbol.toStringTag]() { ->Symbol.toStringTag : Symbol(SymbolConstructor.toStringTag, Decl(lib.d.ts, 1278, 24)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1186, 52), Decl(lib.d.ts, 1292, 11)) ->toStringTag : Symbol(SymbolConstructor.toStringTag, Decl(lib.d.ts, 1278, 24)) +>Symbol.toStringTag : Symbol(SymbolConstructor.toStringTag, Decl(lib.d.ts, 1289, 24)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1197, 53), Decl(lib.d.ts, 1303, 11)) +>toStringTag : Symbol(SymbolConstructor.toStringTag, Decl(lib.d.ts, 1289, 24)) return ""; } diff --git a/tests/baselines/reference/symbolProperty28.symbols b/tests/baselines/reference/symbolProperty28.symbols index 9f57cd1e2e38a..e5cdbb0ea6101 100644 --- a/tests/baselines/reference/symbolProperty28.symbols +++ b/tests/baselines/reference/symbolProperty28.symbols @@ -3,9 +3,9 @@ class C1 { >C1 : Symbol(C1, Decl(symbolProperty28.ts, 0, 0)) [Symbol.toStringTag]() { ->Symbol.toStringTag : Symbol(SymbolConstructor.toStringTag, Decl(lib.d.ts, 1278, 24)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1186, 52), Decl(lib.d.ts, 1292, 11)) ->toStringTag : Symbol(SymbolConstructor.toStringTag, Decl(lib.d.ts, 1278, 24)) +>Symbol.toStringTag : Symbol(SymbolConstructor.toStringTag, Decl(lib.d.ts, 1289, 24)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1197, 53), Decl(lib.d.ts, 1303, 11)) +>toStringTag : Symbol(SymbolConstructor.toStringTag, Decl(lib.d.ts, 1289, 24)) return { x: "" }; >x : Symbol(x, Decl(symbolProperty28.ts, 2, 16)) @@ -24,8 +24,8 @@ var obj = c[Symbol.toStringTag]().x; >obj : Symbol(obj, Decl(symbolProperty28.ts, 9, 3)) >c[Symbol.toStringTag]().x : Symbol(x, Decl(symbolProperty28.ts, 2, 16)) >c : Symbol(c, Decl(symbolProperty28.ts, 8, 3)) ->Symbol.toStringTag : Symbol(SymbolConstructor.toStringTag, Decl(lib.d.ts, 1278, 24)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1186, 52), Decl(lib.d.ts, 1292, 11)) ->toStringTag : Symbol(SymbolConstructor.toStringTag, Decl(lib.d.ts, 1278, 24)) +>Symbol.toStringTag : Symbol(SymbolConstructor.toStringTag, Decl(lib.d.ts, 1289, 24)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1197, 53), Decl(lib.d.ts, 1303, 11)) +>toStringTag : Symbol(SymbolConstructor.toStringTag, Decl(lib.d.ts, 1289, 24)) >x : Symbol(x, Decl(symbolProperty28.ts, 2, 16)) diff --git a/tests/baselines/reference/symbolProperty4.symbols b/tests/baselines/reference/symbolProperty4.symbols index a6594f5146b20..8a0d692de2281 100644 --- a/tests/baselines/reference/symbolProperty4.symbols +++ b/tests/baselines/reference/symbolProperty4.symbols @@ -3,13 +3,13 @@ var x = { >x : Symbol(x, Decl(symbolProperty4.ts, 0, 3)) [Symbol()]: 0, ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1186, 52), Decl(lib.d.ts, 1292, 11)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1197, 53), Decl(lib.d.ts, 1303, 11)) [Symbol()]() { }, ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1186, 52), Decl(lib.d.ts, 1292, 11)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1197, 53), Decl(lib.d.ts, 1303, 11)) get [Symbol()]() { ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1186, 52), Decl(lib.d.ts, 1292, 11)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1197, 53), Decl(lib.d.ts, 1303, 11)) return 0; } diff --git a/tests/baselines/reference/symbolProperty40.symbols b/tests/baselines/reference/symbolProperty40.symbols index 1f0fdaf91a7db..246d0952c8901 100644 --- a/tests/baselines/reference/symbolProperty40.symbols +++ b/tests/baselines/reference/symbolProperty40.symbols @@ -3,21 +3,21 @@ class C { >C : Symbol(C, Decl(symbolProperty40.ts, 0, 0)) [Symbol.iterator](x: string): string; ->Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1236, 31)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1186, 52), Decl(lib.d.ts, 1292, 11)) ->iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1236, 31)) +>Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1247, 31)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1197, 53), Decl(lib.d.ts, 1303, 11)) +>iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1247, 31)) >x : Symbol(x, Decl(symbolProperty40.ts, 1, 22)) [Symbol.iterator](x: number): number; ->Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1236, 31)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1186, 52), Decl(lib.d.ts, 1292, 11)) ->iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1236, 31)) +>Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1247, 31)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1197, 53), Decl(lib.d.ts, 1303, 11)) +>iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1247, 31)) >x : Symbol(x, Decl(symbolProperty40.ts, 2, 22)) [Symbol.iterator](x: any) { ->Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1236, 31)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1186, 52), Decl(lib.d.ts, 1292, 11)) ->iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1236, 31)) +>Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1247, 31)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1197, 53), Decl(lib.d.ts, 1303, 11)) +>iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1247, 31)) >x : Symbol(x, Decl(symbolProperty40.ts, 3, 22)) return undefined; @@ -31,13 +31,13 @@ var c = new C; c[Symbol.iterator](""); >c : Symbol(c, Decl(symbolProperty40.ts, 8, 3)) ->Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1236, 31)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1186, 52), Decl(lib.d.ts, 1292, 11)) ->iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1236, 31)) +>Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1247, 31)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1197, 53), Decl(lib.d.ts, 1303, 11)) +>iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1247, 31)) c[Symbol.iterator](0); >c : Symbol(c, Decl(symbolProperty40.ts, 8, 3)) ->Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1236, 31)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1186, 52), Decl(lib.d.ts, 1292, 11)) ->iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1236, 31)) +>Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1247, 31)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1197, 53), Decl(lib.d.ts, 1303, 11)) +>iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1247, 31)) diff --git a/tests/baselines/reference/symbolProperty41.symbols b/tests/baselines/reference/symbolProperty41.symbols index d50401a637ac0..2872f6cb13493 100644 --- a/tests/baselines/reference/symbolProperty41.symbols +++ b/tests/baselines/reference/symbolProperty41.symbols @@ -3,24 +3,24 @@ class C { >C : Symbol(C, Decl(symbolProperty41.ts, 0, 0)) [Symbol.iterator](x: string): { x: string }; ->Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1236, 31)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1186, 52), Decl(lib.d.ts, 1292, 11)) ->iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1236, 31)) +>Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1247, 31)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1197, 53), Decl(lib.d.ts, 1303, 11)) +>iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1247, 31)) >x : Symbol(x, Decl(symbolProperty41.ts, 1, 22)) >x : Symbol(x, Decl(symbolProperty41.ts, 1, 35)) [Symbol.iterator](x: "hello"): { x: string; hello: string }; ->Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1236, 31)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1186, 52), Decl(lib.d.ts, 1292, 11)) ->iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1236, 31)) +>Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1247, 31)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1197, 53), Decl(lib.d.ts, 1303, 11)) +>iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1247, 31)) >x : Symbol(x, Decl(symbolProperty41.ts, 2, 22)) >x : Symbol(x, Decl(symbolProperty41.ts, 2, 36)) >hello : Symbol(hello, Decl(symbolProperty41.ts, 2, 47)) [Symbol.iterator](x: any) { ->Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1236, 31)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1186, 52), Decl(lib.d.ts, 1292, 11)) ->iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1236, 31)) +>Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1247, 31)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1197, 53), Decl(lib.d.ts, 1303, 11)) +>iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1247, 31)) >x : Symbol(x, Decl(symbolProperty41.ts, 3, 22)) return undefined; @@ -34,13 +34,13 @@ var c = new C; c[Symbol.iterator](""); >c : Symbol(c, Decl(symbolProperty41.ts, 8, 3)) ->Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1236, 31)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1186, 52), Decl(lib.d.ts, 1292, 11)) ->iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1236, 31)) +>Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1247, 31)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1197, 53), Decl(lib.d.ts, 1303, 11)) +>iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1247, 31)) c[Symbol.iterator]("hello"); >c : Symbol(c, Decl(symbolProperty41.ts, 8, 3)) ->Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1236, 31)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1186, 52), Decl(lib.d.ts, 1292, 11)) ->iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1236, 31)) +>Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1247, 31)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1197, 53), Decl(lib.d.ts, 1303, 11)) +>iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1247, 31)) diff --git a/tests/baselines/reference/symbolProperty45.symbols b/tests/baselines/reference/symbolProperty45.symbols index 4c3d2595c1383..1f691f8827d4c 100644 --- a/tests/baselines/reference/symbolProperty45.symbols +++ b/tests/baselines/reference/symbolProperty45.symbols @@ -3,16 +3,16 @@ class C { >C : Symbol(C, Decl(symbolProperty45.ts, 0, 0)) get [Symbol.hasInstance]() { ->Symbol.hasInstance : Symbol(SymbolConstructor.hasInstance, Decl(lib.d.ts, 1222, 32)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1186, 52), Decl(lib.d.ts, 1292, 11)) ->hasInstance : Symbol(SymbolConstructor.hasInstance, Decl(lib.d.ts, 1222, 32)) +>Symbol.hasInstance : Symbol(SymbolConstructor.hasInstance, Decl(lib.d.ts, 1233, 32)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1197, 53), Decl(lib.d.ts, 1303, 11)) +>hasInstance : Symbol(SymbolConstructor.hasInstance, Decl(lib.d.ts, 1233, 32)) return ""; } get [Symbol.toPrimitive]() { ->Symbol.toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, 1272, 18)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1186, 52), Decl(lib.d.ts, 1292, 11)) ->toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, 1272, 18)) +>Symbol.toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, 1283, 18)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1197, 53), Decl(lib.d.ts, 1303, 11)) +>toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, 1283, 18)) return ""; } diff --git a/tests/baselines/reference/symbolProperty5.symbols b/tests/baselines/reference/symbolProperty5.symbols index a759e09588e3f..e9bda77fd7152 100644 --- a/tests/baselines/reference/symbolProperty5.symbols +++ b/tests/baselines/reference/symbolProperty5.symbols @@ -3,19 +3,19 @@ var x = { >x : Symbol(x, Decl(symbolProperty5.ts, 0, 3)) [Symbol.iterator]: 0, ->Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1236, 31)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1186, 52), Decl(lib.d.ts, 1292, 11)) ->iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1236, 31)) +>Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1247, 31)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1197, 53), Decl(lib.d.ts, 1303, 11)) +>iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1247, 31)) [Symbol.toPrimitive]() { }, ->Symbol.toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, 1272, 18)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1186, 52), Decl(lib.d.ts, 1292, 11)) ->toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, 1272, 18)) +>Symbol.toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, 1283, 18)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1197, 53), Decl(lib.d.ts, 1303, 11)) +>toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, 1283, 18)) get [Symbol.toStringTag]() { ->Symbol.toStringTag : Symbol(SymbolConstructor.toStringTag, Decl(lib.d.ts, 1278, 24)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1186, 52), Decl(lib.d.ts, 1292, 11)) ->toStringTag : Symbol(SymbolConstructor.toStringTag, Decl(lib.d.ts, 1278, 24)) +>Symbol.toStringTag : Symbol(SymbolConstructor.toStringTag, Decl(lib.d.ts, 1289, 24)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1197, 53), Decl(lib.d.ts, 1303, 11)) +>toStringTag : Symbol(SymbolConstructor.toStringTag, Decl(lib.d.ts, 1289, 24)) return 0; } diff --git a/tests/baselines/reference/symbolProperty50.symbols b/tests/baselines/reference/symbolProperty50.symbols index ee785ae606d24..69a695e6c5bbf 100644 --- a/tests/baselines/reference/symbolProperty50.symbols +++ b/tests/baselines/reference/symbolProperty50.symbols @@ -9,8 +9,8 @@ module M { >C : Symbol(C, Decl(symbolProperty50.ts, 1, 24)) [Symbol.iterator]() { } ->Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1236, 31)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1186, 52), Decl(lib.d.ts, 1292, 11)) ->iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1236, 31)) +>Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1247, 31)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1197, 53), Decl(lib.d.ts, 1303, 11)) +>iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1247, 31)) } } diff --git a/tests/baselines/reference/symbolProperty51.symbols b/tests/baselines/reference/symbolProperty51.symbols index 825f73ebcd101..e045d35f13fce 100644 --- a/tests/baselines/reference/symbolProperty51.symbols +++ b/tests/baselines/reference/symbolProperty51.symbols @@ -9,8 +9,8 @@ module M { >C : Symbol(C, Decl(symbolProperty51.ts, 1, 21)) [Symbol.iterator]() { } ->Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1236, 31)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1186, 52), Decl(lib.d.ts, 1292, 11)) ->iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1236, 31)) +>Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1247, 31)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1197, 53), Decl(lib.d.ts, 1303, 11)) +>iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1247, 31)) } } diff --git a/tests/baselines/reference/symbolProperty55.symbols b/tests/baselines/reference/symbolProperty55.symbols index e76ad43f43d1c..077199e496904 100644 --- a/tests/baselines/reference/symbolProperty55.symbols +++ b/tests/baselines/reference/symbolProperty55.symbols @@ -3,9 +3,9 @@ var obj = { >obj : Symbol(obj, Decl(symbolProperty55.ts, 0, 3)) [Symbol.iterator]: 0 ->Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1236, 31)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1186, 52), Decl(lib.d.ts, 1292, 11)) ->iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1236, 31)) +>Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1247, 31)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1197, 53), Decl(lib.d.ts, 1303, 11)) +>iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1247, 31)) }; @@ -14,13 +14,13 @@ module M { var Symbol: SymbolConstructor; >Symbol : Symbol(Symbol, Decl(symbolProperty55.ts, 5, 7)) ->SymbolConstructor : Symbol(SymbolConstructor, Decl(lib.d.ts, 1196, 1)) +>SymbolConstructor : Symbol(SymbolConstructor, Decl(lib.d.ts, 1207, 1)) // The following should be of type 'any'. This is because even though obj has a property keyed by Symbol.iterator, // the key passed in here is the *wrong* Symbol.iterator. It is not the iterator property of the global Symbol. obj[Symbol.iterator]; >obj : Symbol(obj, Decl(symbolProperty55.ts, 0, 3)) ->Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1236, 31)) +>Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1247, 31)) >Symbol : Symbol(Symbol, Decl(symbolProperty55.ts, 5, 7)) ->iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1236, 31)) +>iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1247, 31)) } diff --git a/tests/baselines/reference/symbolProperty56.symbols b/tests/baselines/reference/symbolProperty56.symbols index caca4686bbf48..a76ab0418cc47 100644 --- a/tests/baselines/reference/symbolProperty56.symbols +++ b/tests/baselines/reference/symbolProperty56.symbols @@ -3,9 +3,9 @@ var obj = { >obj : Symbol(obj, Decl(symbolProperty56.ts, 0, 3)) [Symbol.iterator]: 0 ->Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1236, 31)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1186, 52), Decl(lib.d.ts, 1292, 11)) ->iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1236, 31)) +>Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1247, 31)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1197, 53), Decl(lib.d.ts, 1303, 11)) +>iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1247, 31)) }; diff --git a/tests/baselines/reference/symbolProperty57.symbols b/tests/baselines/reference/symbolProperty57.symbols index 4e0ce4203881d..e98cf96380723 100644 --- a/tests/baselines/reference/symbolProperty57.symbols +++ b/tests/baselines/reference/symbolProperty57.symbols @@ -3,14 +3,14 @@ var obj = { >obj : Symbol(obj, Decl(symbolProperty57.ts, 0, 3)) [Symbol.iterator]: 0 ->Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1236, 31)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1186, 52), Decl(lib.d.ts, 1292, 11)) ->iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1236, 31)) +>Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1247, 31)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1197, 53), Decl(lib.d.ts, 1303, 11)) +>iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1247, 31)) }; // Should give type 'any'. obj[Symbol["nonsense"]]; >obj : Symbol(obj, Decl(symbolProperty57.ts, 0, 3)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1186, 52), Decl(lib.d.ts, 1292, 11)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1197, 53), Decl(lib.d.ts, 1303, 11)) diff --git a/tests/baselines/reference/symbolProperty6.symbols b/tests/baselines/reference/symbolProperty6.symbols index cedcfe69a9f0b..8b0e62e406890 100644 --- a/tests/baselines/reference/symbolProperty6.symbols +++ b/tests/baselines/reference/symbolProperty6.symbols @@ -3,24 +3,24 @@ class C { >C : Symbol(C, Decl(symbolProperty6.ts, 0, 0)) [Symbol.iterator] = 0; ->Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1236, 31)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1186, 52), Decl(lib.d.ts, 1292, 11)) ->iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1236, 31)) +>Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1247, 31)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1197, 53), Decl(lib.d.ts, 1303, 11)) +>iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1247, 31)) [Symbol.unscopables]: number; ->Symbol.unscopables : Symbol(SymbolConstructor.unscopables, Decl(lib.d.ts, 1284, 24)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1186, 52), Decl(lib.d.ts, 1292, 11)) ->unscopables : Symbol(SymbolConstructor.unscopables, Decl(lib.d.ts, 1284, 24)) +>Symbol.unscopables : Symbol(SymbolConstructor.unscopables, Decl(lib.d.ts, 1295, 24)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1197, 53), Decl(lib.d.ts, 1303, 11)) +>unscopables : Symbol(SymbolConstructor.unscopables, Decl(lib.d.ts, 1295, 24)) [Symbol.toPrimitive]() { } ->Symbol.toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, 1272, 18)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1186, 52), Decl(lib.d.ts, 1292, 11)) ->toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, 1272, 18)) +>Symbol.toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, 1283, 18)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1197, 53), Decl(lib.d.ts, 1303, 11)) +>toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, 1283, 18)) get [Symbol.toStringTag]() { ->Symbol.toStringTag : Symbol(SymbolConstructor.toStringTag, Decl(lib.d.ts, 1278, 24)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1186, 52), Decl(lib.d.ts, 1292, 11)) ->toStringTag : Symbol(SymbolConstructor.toStringTag, Decl(lib.d.ts, 1278, 24)) +>Symbol.toStringTag : Symbol(SymbolConstructor.toStringTag, Decl(lib.d.ts, 1289, 24)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1197, 53), Decl(lib.d.ts, 1303, 11)) +>toStringTag : Symbol(SymbolConstructor.toStringTag, Decl(lib.d.ts, 1289, 24)) return 0; } diff --git a/tests/baselines/reference/symbolProperty8.symbols b/tests/baselines/reference/symbolProperty8.symbols index 269a8412d95ac..a1a4d1d50dfb6 100644 --- a/tests/baselines/reference/symbolProperty8.symbols +++ b/tests/baselines/reference/symbolProperty8.symbols @@ -3,12 +3,12 @@ interface I { >I : Symbol(I, Decl(symbolProperty8.ts, 0, 0)) [Symbol.unscopables]: number; ->Symbol.unscopables : Symbol(SymbolConstructor.unscopables, Decl(lib.d.ts, 1284, 24)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1186, 52), Decl(lib.d.ts, 1292, 11)) ->unscopables : Symbol(SymbolConstructor.unscopables, Decl(lib.d.ts, 1284, 24)) +>Symbol.unscopables : Symbol(SymbolConstructor.unscopables, Decl(lib.d.ts, 1295, 24)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1197, 53), Decl(lib.d.ts, 1303, 11)) +>unscopables : Symbol(SymbolConstructor.unscopables, Decl(lib.d.ts, 1295, 24)) [Symbol.toPrimitive](); ->Symbol.toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, 1272, 18)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1186, 52), Decl(lib.d.ts, 1292, 11)) ->toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, 1272, 18)) +>Symbol.toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, 1283, 18)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1197, 53), Decl(lib.d.ts, 1303, 11)) +>toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, 1283, 18)) } diff --git a/tests/baselines/reference/symbolType11.symbols b/tests/baselines/reference/symbolType11.symbols index 4bf91a6112e3d..6c4001fa4c85a 100644 --- a/tests/baselines/reference/symbolType11.symbols +++ b/tests/baselines/reference/symbolType11.symbols @@ -1,9 +1,9 @@ === tests/cases/conformance/es6/Symbols/symbolType11.ts === var s = Symbol.for("logical"); >s : Symbol(s, Decl(symbolType11.ts, 0, 3)) ->Symbol.for : Symbol(SymbolConstructor.for, Decl(lib.d.ts, 1208, 42)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1186, 52), Decl(lib.d.ts, 1292, 11)) ->for : Symbol(SymbolConstructor.for, Decl(lib.d.ts, 1208, 42)) +>Symbol.for : Symbol(SymbolConstructor.for, Decl(lib.d.ts, 1219, 42)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1197, 53), Decl(lib.d.ts, 1303, 11)) +>for : Symbol(SymbolConstructor.for, Decl(lib.d.ts, 1219, 42)) s && s; >s : Symbol(s, Decl(symbolType11.ts, 0, 3)) diff --git a/tests/baselines/reference/symbolType16.symbols b/tests/baselines/reference/symbolType16.symbols index 1d87ae6a1a415..7a54b0efcbe72 100644 --- a/tests/baselines/reference/symbolType16.symbols +++ b/tests/baselines/reference/symbolType16.symbols @@ -1,6 +1,6 @@ === tests/cases/conformance/es6/Symbols/symbolType16.ts === interface Symbol { ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1186, 52), Decl(lib.d.ts, 1292, 11), Decl(symbolType16.ts, 0, 0)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1197, 53), Decl(lib.d.ts, 1303, 11), Decl(symbolType16.ts, 0, 0)) newSymbolProp: number; >newSymbolProp : Symbol(newSymbolProp, Decl(symbolType16.ts, 0, 18)) diff --git a/tests/baselines/reference/templateStringWithEmbeddedNewOperatorES6.symbols b/tests/baselines/reference/templateStringWithEmbeddedNewOperatorES6.symbols index 0cfe0d854beaf..a6e319c0dfa7e 100644 --- a/tests/baselines/reference/templateStringWithEmbeddedNewOperatorES6.symbols +++ b/tests/baselines/reference/templateStringWithEmbeddedNewOperatorES6.symbols @@ -1,5 +1,5 @@ === tests/cases/conformance/es6/templates/templateStringWithEmbeddedNewOperatorES6.ts === var x = `abc${ new String("Hi") }def`; >x : Symbol(x, Decl(templateStringWithEmbeddedNewOperatorES6.ts, 0, 3)) ->String : Symbol(String, Decl(lib.d.ts, 275, 1), Decl(lib.d.ts, 443, 11), Decl(lib.d.ts, 1538, 1)) +>String : Symbol(String, Decl(lib.d.ts, 275, 1), Decl(lib.d.ts, 443, 11), Decl(lib.d.ts, 1549, 1)) diff --git a/tests/baselines/reference/typedArrays.symbols b/tests/baselines/reference/typedArrays.symbols index 27b72cc54f1cb..ef9f533bb58e3 100644 --- a/tests/baselines/reference/typedArrays.symbols +++ b/tests/baselines/reference/typedArrays.symbols @@ -8,39 +8,39 @@ function CreateTypedArrayTypes() { typedArrays[0] = Int8Array; >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 2, 7)) ->Int8Array : Symbol(Int8Array, Decl(lib.d.ts, 2107, 42), Decl(lib.d.ts, 2397, 11)) +>Int8Array : Symbol(Int8Array, Decl(lib.d.ts, 2118, 42), Decl(lib.d.ts, 2408, 11)) typedArrays[1] = Uint8Array; >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 2, 7)) ->Uint8Array : Symbol(Uint8Array, Decl(lib.d.ts, 2397, 44), Decl(lib.d.ts, 2687, 11)) +>Uint8Array : Symbol(Uint8Array, Decl(lib.d.ts, 2408, 44), Decl(lib.d.ts, 2698, 11)) typedArrays[2] = Int16Array; >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 2, 7)) ->Int16Array : Symbol(Int16Array, Decl(lib.d.ts, 2977, 60), Decl(lib.d.ts, 3267, 11)) +>Int16Array : Symbol(Int16Array, Decl(lib.d.ts, 2988, 60), Decl(lib.d.ts, 3278, 11)) typedArrays[3] = Uint16Array; >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 2, 7)) ->Uint16Array : Symbol(Uint16Array, Decl(lib.d.ts, 3267, 46), Decl(lib.d.ts, 3557, 11)) +>Uint16Array : Symbol(Uint16Array, Decl(lib.d.ts, 3278, 46), Decl(lib.d.ts, 3568, 11)) typedArrays[4] = Int32Array; >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 2, 7)) ->Int32Array : Symbol(Int32Array, Decl(lib.d.ts, 3557, 48), Decl(lib.d.ts, 3847, 11)) +>Int32Array : Symbol(Int32Array, Decl(lib.d.ts, 3568, 48), Decl(lib.d.ts, 3858, 11)) typedArrays[5] = Uint32Array; >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 2, 7)) ->Uint32Array : Symbol(Uint32Array, Decl(lib.d.ts, 3847, 46), Decl(lib.d.ts, 4137, 11)) +>Uint32Array : Symbol(Uint32Array, Decl(lib.d.ts, 3858, 46), Decl(lib.d.ts, 4148, 11)) typedArrays[6] = Float32Array; >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 2, 7)) ->Float32Array : Symbol(Float32Array, Decl(lib.d.ts, 4137, 48), Decl(lib.d.ts, 4427, 11)) +>Float32Array : Symbol(Float32Array, Decl(lib.d.ts, 4148, 48), Decl(lib.d.ts, 4438, 11)) typedArrays[7] = Float64Array; >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 2, 7)) ->Float64Array : Symbol(Float64Array, Decl(lib.d.ts, 4427, 50), Decl(lib.d.ts, 4717, 11)) +>Float64Array : Symbol(Float64Array, Decl(lib.d.ts, 4438, 50), Decl(lib.d.ts, 4728, 11)) typedArrays[8] = Uint8ClampedArray; >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 2, 7)) ->Uint8ClampedArray : Symbol(Uint8ClampedArray, Decl(lib.d.ts, 2687, 46), Decl(lib.d.ts, 2977, 11)) +>Uint8ClampedArray : Symbol(Uint8ClampedArray, Decl(lib.d.ts, 2698, 46), Decl(lib.d.ts, 2988, 11)) return typedArrays; >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 2, 7)) @@ -55,47 +55,47 @@ function CreateTypedArrayInstancesFromLength(obj: number) { typedArrays[0] = new Int8Array(obj); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 17, 7)) ->Int8Array : Symbol(Int8Array, Decl(lib.d.ts, 2107, 42), Decl(lib.d.ts, 2397, 11)) +>Int8Array : Symbol(Int8Array, Decl(lib.d.ts, 2118, 42), Decl(lib.d.ts, 2408, 11)) >obj : Symbol(obj, Decl(typedArrays.ts, 16, 45)) typedArrays[1] = new Uint8Array(obj); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 17, 7)) ->Uint8Array : Symbol(Uint8Array, Decl(lib.d.ts, 2397, 44), Decl(lib.d.ts, 2687, 11)) +>Uint8Array : Symbol(Uint8Array, Decl(lib.d.ts, 2408, 44), Decl(lib.d.ts, 2698, 11)) >obj : Symbol(obj, Decl(typedArrays.ts, 16, 45)) typedArrays[2] = new Int16Array(obj); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 17, 7)) ->Int16Array : Symbol(Int16Array, Decl(lib.d.ts, 2977, 60), Decl(lib.d.ts, 3267, 11)) +>Int16Array : Symbol(Int16Array, Decl(lib.d.ts, 2988, 60), Decl(lib.d.ts, 3278, 11)) >obj : Symbol(obj, Decl(typedArrays.ts, 16, 45)) typedArrays[3] = new Uint16Array(obj); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 17, 7)) ->Uint16Array : Symbol(Uint16Array, Decl(lib.d.ts, 3267, 46), Decl(lib.d.ts, 3557, 11)) +>Uint16Array : Symbol(Uint16Array, Decl(lib.d.ts, 3278, 46), Decl(lib.d.ts, 3568, 11)) >obj : Symbol(obj, Decl(typedArrays.ts, 16, 45)) typedArrays[4] = new Int32Array(obj); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 17, 7)) ->Int32Array : Symbol(Int32Array, Decl(lib.d.ts, 3557, 48), Decl(lib.d.ts, 3847, 11)) +>Int32Array : Symbol(Int32Array, Decl(lib.d.ts, 3568, 48), Decl(lib.d.ts, 3858, 11)) >obj : Symbol(obj, Decl(typedArrays.ts, 16, 45)) typedArrays[5] = new Uint32Array(obj); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 17, 7)) ->Uint32Array : Symbol(Uint32Array, Decl(lib.d.ts, 3847, 46), Decl(lib.d.ts, 4137, 11)) +>Uint32Array : Symbol(Uint32Array, Decl(lib.d.ts, 3858, 46), Decl(lib.d.ts, 4148, 11)) >obj : Symbol(obj, Decl(typedArrays.ts, 16, 45)) typedArrays[6] = new Float32Array(obj); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 17, 7)) ->Float32Array : Symbol(Float32Array, Decl(lib.d.ts, 4137, 48), Decl(lib.d.ts, 4427, 11)) +>Float32Array : Symbol(Float32Array, Decl(lib.d.ts, 4148, 48), Decl(lib.d.ts, 4438, 11)) >obj : Symbol(obj, Decl(typedArrays.ts, 16, 45)) typedArrays[7] = new Float64Array(obj); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 17, 7)) ->Float64Array : Symbol(Float64Array, Decl(lib.d.ts, 4427, 50), Decl(lib.d.ts, 4717, 11)) +>Float64Array : Symbol(Float64Array, Decl(lib.d.ts, 4438, 50), Decl(lib.d.ts, 4728, 11)) >obj : Symbol(obj, Decl(typedArrays.ts, 16, 45)) typedArrays[8] = new Uint8ClampedArray(obj); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 17, 7)) ->Uint8ClampedArray : Symbol(Uint8ClampedArray, Decl(lib.d.ts, 2687, 46), Decl(lib.d.ts, 2977, 11)) +>Uint8ClampedArray : Symbol(Uint8ClampedArray, Decl(lib.d.ts, 2698, 46), Decl(lib.d.ts, 2988, 11)) >obj : Symbol(obj, Decl(typedArrays.ts, 16, 45)) return typedArrays; @@ -111,47 +111,47 @@ function CreateTypedArrayInstancesFromArray(obj: number[]) { typedArrays[0] = new Int8Array(obj); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 32, 7)) ->Int8Array : Symbol(Int8Array, Decl(lib.d.ts, 2107, 42), Decl(lib.d.ts, 2397, 11)) +>Int8Array : Symbol(Int8Array, Decl(lib.d.ts, 2118, 42), Decl(lib.d.ts, 2408, 11)) >obj : Symbol(obj, Decl(typedArrays.ts, 31, 44)) typedArrays[1] = new Uint8Array(obj); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 32, 7)) ->Uint8Array : Symbol(Uint8Array, Decl(lib.d.ts, 2397, 44), Decl(lib.d.ts, 2687, 11)) +>Uint8Array : Symbol(Uint8Array, Decl(lib.d.ts, 2408, 44), Decl(lib.d.ts, 2698, 11)) >obj : Symbol(obj, Decl(typedArrays.ts, 31, 44)) typedArrays[2] = new Int16Array(obj); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 32, 7)) ->Int16Array : Symbol(Int16Array, Decl(lib.d.ts, 2977, 60), Decl(lib.d.ts, 3267, 11)) +>Int16Array : Symbol(Int16Array, Decl(lib.d.ts, 2988, 60), Decl(lib.d.ts, 3278, 11)) >obj : Symbol(obj, Decl(typedArrays.ts, 31, 44)) typedArrays[3] = new Uint16Array(obj); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 32, 7)) ->Uint16Array : Symbol(Uint16Array, Decl(lib.d.ts, 3267, 46), Decl(lib.d.ts, 3557, 11)) +>Uint16Array : Symbol(Uint16Array, Decl(lib.d.ts, 3278, 46), Decl(lib.d.ts, 3568, 11)) >obj : Symbol(obj, Decl(typedArrays.ts, 31, 44)) typedArrays[4] = new Int32Array(obj); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 32, 7)) ->Int32Array : Symbol(Int32Array, Decl(lib.d.ts, 3557, 48), Decl(lib.d.ts, 3847, 11)) +>Int32Array : Symbol(Int32Array, Decl(lib.d.ts, 3568, 48), Decl(lib.d.ts, 3858, 11)) >obj : Symbol(obj, Decl(typedArrays.ts, 31, 44)) typedArrays[5] = new Uint32Array(obj); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 32, 7)) ->Uint32Array : Symbol(Uint32Array, Decl(lib.d.ts, 3847, 46), Decl(lib.d.ts, 4137, 11)) +>Uint32Array : Symbol(Uint32Array, Decl(lib.d.ts, 3858, 46), Decl(lib.d.ts, 4148, 11)) >obj : Symbol(obj, Decl(typedArrays.ts, 31, 44)) typedArrays[6] = new Float32Array(obj); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 32, 7)) ->Float32Array : Symbol(Float32Array, Decl(lib.d.ts, 4137, 48), Decl(lib.d.ts, 4427, 11)) +>Float32Array : Symbol(Float32Array, Decl(lib.d.ts, 4148, 48), Decl(lib.d.ts, 4438, 11)) >obj : Symbol(obj, Decl(typedArrays.ts, 31, 44)) typedArrays[7] = new Float64Array(obj); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 32, 7)) ->Float64Array : Symbol(Float64Array, Decl(lib.d.ts, 4427, 50), Decl(lib.d.ts, 4717, 11)) +>Float64Array : Symbol(Float64Array, Decl(lib.d.ts, 4438, 50), Decl(lib.d.ts, 4728, 11)) >obj : Symbol(obj, Decl(typedArrays.ts, 31, 44)) typedArrays[8] = new Uint8ClampedArray(obj); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 32, 7)) ->Uint8ClampedArray : Symbol(Uint8ClampedArray, Decl(lib.d.ts, 2687, 46), Decl(lib.d.ts, 2977, 11)) +>Uint8ClampedArray : Symbol(Uint8ClampedArray, Decl(lib.d.ts, 2698, 46), Decl(lib.d.ts, 2988, 11)) >obj : Symbol(obj, Decl(typedArrays.ts, 31, 44)) return typedArrays; @@ -167,65 +167,65 @@ function CreateIntegerTypedArraysFromArray2(obj:number[]) { typedArrays[0] = Int8Array.from(obj); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 47, 7)) ->Int8Array.from : Symbol(Int8ArrayConstructor.from, Decl(lib.d.ts, 2387, 38)) ->Int8Array : Symbol(Int8Array, Decl(lib.d.ts, 2107, 42), Decl(lib.d.ts, 2397, 11)) ->from : Symbol(Int8ArrayConstructor.from, Decl(lib.d.ts, 2387, 38)) +>Int8Array.from : Symbol(Int8ArrayConstructor.from, Decl(lib.d.ts, 2398, 38)) +>Int8Array : Symbol(Int8Array, Decl(lib.d.ts, 2118, 42), Decl(lib.d.ts, 2408, 11)) +>from : Symbol(Int8ArrayConstructor.from, Decl(lib.d.ts, 2398, 38)) >obj : Symbol(obj, Decl(typedArrays.ts, 46, 44)) typedArrays[1] = Uint8Array.from(obj); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 47, 7)) ->Uint8Array.from : Symbol(Uint8ArrayConstructor.from, Decl(lib.d.ts, 2677, 39)) ->Uint8Array : Symbol(Uint8Array, Decl(lib.d.ts, 2397, 44), Decl(lib.d.ts, 2687, 11)) ->from : Symbol(Uint8ArrayConstructor.from, Decl(lib.d.ts, 2677, 39)) +>Uint8Array.from : Symbol(Uint8ArrayConstructor.from, Decl(lib.d.ts, 2688, 39)) +>Uint8Array : Symbol(Uint8Array, Decl(lib.d.ts, 2408, 44), Decl(lib.d.ts, 2698, 11)) +>from : Symbol(Uint8ArrayConstructor.from, Decl(lib.d.ts, 2688, 39)) >obj : Symbol(obj, Decl(typedArrays.ts, 46, 44)) typedArrays[2] = Int16Array.from(obj); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 47, 7)) ->Int16Array.from : Symbol(Int16ArrayConstructor.from, Decl(lib.d.ts, 3257, 39)) ->Int16Array : Symbol(Int16Array, Decl(lib.d.ts, 2977, 60), Decl(lib.d.ts, 3267, 11)) ->from : Symbol(Int16ArrayConstructor.from, Decl(lib.d.ts, 3257, 39)) +>Int16Array.from : Symbol(Int16ArrayConstructor.from, Decl(lib.d.ts, 3268, 39)) +>Int16Array : Symbol(Int16Array, Decl(lib.d.ts, 2988, 60), Decl(lib.d.ts, 3278, 11)) +>from : Symbol(Int16ArrayConstructor.from, Decl(lib.d.ts, 3268, 39)) >obj : Symbol(obj, Decl(typedArrays.ts, 46, 44)) typedArrays[3] = Uint16Array.from(obj); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 47, 7)) ->Uint16Array.from : Symbol(Uint16ArrayConstructor.from, Decl(lib.d.ts, 3547, 40)) ->Uint16Array : Symbol(Uint16Array, Decl(lib.d.ts, 3267, 46), Decl(lib.d.ts, 3557, 11)) ->from : Symbol(Uint16ArrayConstructor.from, Decl(lib.d.ts, 3547, 40)) +>Uint16Array.from : Symbol(Uint16ArrayConstructor.from, Decl(lib.d.ts, 3558, 40)) +>Uint16Array : Symbol(Uint16Array, Decl(lib.d.ts, 3278, 46), Decl(lib.d.ts, 3568, 11)) +>from : Symbol(Uint16ArrayConstructor.from, Decl(lib.d.ts, 3558, 40)) >obj : Symbol(obj, Decl(typedArrays.ts, 46, 44)) typedArrays[4] = Int32Array.from(obj); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 47, 7)) ->Int32Array.from : Symbol(Int32ArrayConstructor.from, Decl(lib.d.ts, 3837, 39)) ->Int32Array : Symbol(Int32Array, Decl(lib.d.ts, 3557, 48), Decl(lib.d.ts, 3847, 11)) ->from : Symbol(Int32ArrayConstructor.from, Decl(lib.d.ts, 3837, 39)) +>Int32Array.from : Symbol(Int32ArrayConstructor.from, Decl(lib.d.ts, 3848, 39)) +>Int32Array : Symbol(Int32Array, Decl(lib.d.ts, 3568, 48), Decl(lib.d.ts, 3858, 11)) +>from : Symbol(Int32ArrayConstructor.from, Decl(lib.d.ts, 3848, 39)) >obj : Symbol(obj, Decl(typedArrays.ts, 46, 44)) typedArrays[5] = Uint32Array.from(obj); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 47, 7)) ->Uint32Array.from : Symbol(Uint32ArrayConstructor.from, Decl(lib.d.ts, 4127, 40)) ->Uint32Array : Symbol(Uint32Array, Decl(lib.d.ts, 3847, 46), Decl(lib.d.ts, 4137, 11)) ->from : Symbol(Uint32ArrayConstructor.from, Decl(lib.d.ts, 4127, 40)) +>Uint32Array.from : Symbol(Uint32ArrayConstructor.from, Decl(lib.d.ts, 4138, 40)) +>Uint32Array : Symbol(Uint32Array, Decl(lib.d.ts, 3858, 46), Decl(lib.d.ts, 4148, 11)) +>from : Symbol(Uint32ArrayConstructor.from, Decl(lib.d.ts, 4138, 40)) >obj : Symbol(obj, Decl(typedArrays.ts, 46, 44)) typedArrays[6] = Float32Array.from(obj); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 47, 7)) ->Float32Array.from : Symbol(Float32ArrayConstructor.from, Decl(lib.d.ts, 4417, 41)) ->Float32Array : Symbol(Float32Array, Decl(lib.d.ts, 4137, 48), Decl(lib.d.ts, 4427, 11)) ->from : Symbol(Float32ArrayConstructor.from, Decl(lib.d.ts, 4417, 41)) +>Float32Array.from : Symbol(Float32ArrayConstructor.from, Decl(lib.d.ts, 4428, 41)) +>Float32Array : Symbol(Float32Array, Decl(lib.d.ts, 4148, 48), Decl(lib.d.ts, 4438, 11)) +>from : Symbol(Float32ArrayConstructor.from, Decl(lib.d.ts, 4428, 41)) >obj : Symbol(obj, Decl(typedArrays.ts, 46, 44)) typedArrays[7] = Float64Array.from(obj); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 47, 7)) ->Float64Array.from : Symbol(Float64ArrayConstructor.from, Decl(lib.d.ts, 4707, 41)) ->Float64Array : Symbol(Float64Array, Decl(lib.d.ts, 4427, 50), Decl(lib.d.ts, 4717, 11)) ->from : Symbol(Float64ArrayConstructor.from, Decl(lib.d.ts, 4707, 41)) +>Float64Array.from : Symbol(Float64ArrayConstructor.from, Decl(lib.d.ts, 4718, 41)) +>Float64Array : Symbol(Float64Array, Decl(lib.d.ts, 4438, 50), Decl(lib.d.ts, 4728, 11)) +>from : Symbol(Float64ArrayConstructor.from, Decl(lib.d.ts, 4718, 41)) >obj : Symbol(obj, Decl(typedArrays.ts, 46, 44)) typedArrays[8] = Uint8ClampedArray.from(obj); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 47, 7)) ->Uint8ClampedArray.from : Symbol(Uint8ClampedArrayConstructor.from, Decl(lib.d.ts, 2967, 46)) ->Uint8ClampedArray : Symbol(Uint8ClampedArray, Decl(lib.d.ts, 2687, 46), Decl(lib.d.ts, 2977, 11)) ->from : Symbol(Uint8ClampedArrayConstructor.from, Decl(lib.d.ts, 2967, 46)) +>Uint8ClampedArray.from : Symbol(Uint8ClampedArrayConstructor.from, Decl(lib.d.ts, 2978, 46)) +>Uint8ClampedArray : Symbol(Uint8ClampedArray, Decl(lib.d.ts, 2698, 46), Decl(lib.d.ts, 2988, 11)) +>from : Symbol(Uint8ClampedArrayConstructor.from, Decl(lib.d.ts, 2978, 46)) >obj : Symbol(obj, Decl(typedArrays.ts, 46, 44)) return typedArrays; @@ -235,72 +235,72 @@ function CreateIntegerTypedArraysFromArray2(obj:number[]) { function CreateIntegerTypedArraysFromArrayLike(obj:ArrayLike) { >CreateIntegerTypedArraysFromArrayLike : Symbol(CreateIntegerTypedArraysFromArrayLike, Decl(typedArrays.ts, 59, 1)) >obj : Symbol(obj, Decl(typedArrays.ts, 61, 47)) ->ArrayLike : Symbol(ArrayLike, Decl(lib.d.ts, 1434, 1)) +>ArrayLike : Symbol(ArrayLike, Decl(lib.d.ts, 1445, 1)) var typedArrays = []; >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 62, 7)) typedArrays[0] = Int8Array.from(obj); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 62, 7)) ->Int8Array.from : Symbol(Int8ArrayConstructor.from, Decl(lib.d.ts, 2387, 38)) ->Int8Array : Symbol(Int8Array, Decl(lib.d.ts, 2107, 42), Decl(lib.d.ts, 2397, 11)) ->from : Symbol(Int8ArrayConstructor.from, Decl(lib.d.ts, 2387, 38)) +>Int8Array.from : Symbol(Int8ArrayConstructor.from, Decl(lib.d.ts, 2398, 38)) +>Int8Array : Symbol(Int8Array, Decl(lib.d.ts, 2118, 42), Decl(lib.d.ts, 2408, 11)) +>from : Symbol(Int8ArrayConstructor.from, Decl(lib.d.ts, 2398, 38)) >obj : Symbol(obj, Decl(typedArrays.ts, 61, 47)) typedArrays[1] = Uint8Array.from(obj); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 62, 7)) ->Uint8Array.from : Symbol(Uint8ArrayConstructor.from, Decl(lib.d.ts, 2677, 39)) ->Uint8Array : Symbol(Uint8Array, Decl(lib.d.ts, 2397, 44), Decl(lib.d.ts, 2687, 11)) ->from : Symbol(Uint8ArrayConstructor.from, Decl(lib.d.ts, 2677, 39)) +>Uint8Array.from : Symbol(Uint8ArrayConstructor.from, Decl(lib.d.ts, 2688, 39)) +>Uint8Array : Symbol(Uint8Array, Decl(lib.d.ts, 2408, 44), Decl(lib.d.ts, 2698, 11)) +>from : Symbol(Uint8ArrayConstructor.from, Decl(lib.d.ts, 2688, 39)) >obj : Symbol(obj, Decl(typedArrays.ts, 61, 47)) typedArrays[2] = Int16Array.from(obj); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 62, 7)) ->Int16Array.from : Symbol(Int16ArrayConstructor.from, Decl(lib.d.ts, 3257, 39)) ->Int16Array : Symbol(Int16Array, Decl(lib.d.ts, 2977, 60), Decl(lib.d.ts, 3267, 11)) ->from : Symbol(Int16ArrayConstructor.from, Decl(lib.d.ts, 3257, 39)) +>Int16Array.from : Symbol(Int16ArrayConstructor.from, Decl(lib.d.ts, 3268, 39)) +>Int16Array : Symbol(Int16Array, Decl(lib.d.ts, 2988, 60), Decl(lib.d.ts, 3278, 11)) +>from : Symbol(Int16ArrayConstructor.from, Decl(lib.d.ts, 3268, 39)) >obj : Symbol(obj, Decl(typedArrays.ts, 61, 47)) typedArrays[3] = Uint16Array.from(obj); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 62, 7)) ->Uint16Array.from : Symbol(Uint16ArrayConstructor.from, Decl(lib.d.ts, 3547, 40)) ->Uint16Array : Symbol(Uint16Array, Decl(lib.d.ts, 3267, 46), Decl(lib.d.ts, 3557, 11)) ->from : Symbol(Uint16ArrayConstructor.from, Decl(lib.d.ts, 3547, 40)) +>Uint16Array.from : Symbol(Uint16ArrayConstructor.from, Decl(lib.d.ts, 3558, 40)) +>Uint16Array : Symbol(Uint16Array, Decl(lib.d.ts, 3278, 46), Decl(lib.d.ts, 3568, 11)) +>from : Symbol(Uint16ArrayConstructor.from, Decl(lib.d.ts, 3558, 40)) >obj : Symbol(obj, Decl(typedArrays.ts, 61, 47)) typedArrays[4] = Int32Array.from(obj); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 62, 7)) ->Int32Array.from : Symbol(Int32ArrayConstructor.from, Decl(lib.d.ts, 3837, 39)) ->Int32Array : Symbol(Int32Array, Decl(lib.d.ts, 3557, 48), Decl(lib.d.ts, 3847, 11)) ->from : Symbol(Int32ArrayConstructor.from, Decl(lib.d.ts, 3837, 39)) +>Int32Array.from : Symbol(Int32ArrayConstructor.from, Decl(lib.d.ts, 3848, 39)) +>Int32Array : Symbol(Int32Array, Decl(lib.d.ts, 3568, 48), Decl(lib.d.ts, 3858, 11)) +>from : Symbol(Int32ArrayConstructor.from, Decl(lib.d.ts, 3848, 39)) >obj : Symbol(obj, Decl(typedArrays.ts, 61, 47)) typedArrays[5] = Uint32Array.from(obj); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 62, 7)) ->Uint32Array.from : Symbol(Uint32ArrayConstructor.from, Decl(lib.d.ts, 4127, 40)) ->Uint32Array : Symbol(Uint32Array, Decl(lib.d.ts, 3847, 46), Decl(lib.d.ts, 4137, 11)) ->from : Symbol(Uint32ArrayConstructor.from, Decl(lib.d.ts, 4127, 40)) +>Uint32Array.from : Symbol(Uint32ArrayConstructor.from, Decl(lib.d.ts, 4138, 40)) +>Uint32Array : Symbol(Uint32Array, Decl(lib.d.ts, 3858, 46), Decl(lib.d.ts, 4148, 11)) +>from : Symbol(Uint32ArrayConstructor.from, Decl(lib.d.ts, 4138, 40)) >obj : Symbol(obj, Decl(typedArrays.ts, 61, 47)) typedArrays[6] = Float32Array.from(obj); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 62, 7)) ->Float32Array.from : Symbol(Float32ArrayConstructor.from, Decl(lib.d.ts, 4417, 41)) ->Float32Array : Symbol(Float32Array, Decl(lib.d.ts, 4137, 48), Decl(lib.d.ts, 4427, 11)) ->from : Symbol(Float32ArrayConstructor.from, Decl(lib.d.ts, 4417, 41)) +>Float32Array.from : Symbol(Float32ArrayConstructor.from, Decl(lib.d.ts, 4428, 41)) +>Float32Array : Symbol(Float32Array, Decl(lib.d.ts, 4148, 48), Decl(lib.d.ts, 4438, 11)) +>from : Symbol(Float32ArrayConstructor.from, Decl(lib.d.ts, 4428, 41)) >obj : Symbol(obj, Decl(typedArrays.ts, 61, 47)) typedArrays[7] = Float64Array.from(obj); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 62, 7)) ->Float64Array.from : Symbol(Float64ArrayConstructor.from, Decl(lib.d.ts, 4707, 41)) ->Float64Array : Symbol(Float64Array, Decl(lib.d.ts, 4427, 50), Decl(lib.d.ts, 4717, 11)) ->from : Symbol(Float64ArrayConstructor.from, Decl(lib.d.ts, 4707, 41)) +>Float64Array.from : Symbol(Float64ArrayConstructor.from, Decl(lib.d.ts, 4718, 41)) +>Float64Array : Symbol(Float64Array, Decl(lib.d.ts, 4438, 50), Decl(lib.d.ts, 4728, 11)) +>from : Symbol(Float64ArrayConstructor.from, Decl(lib.d.ts, 4718, 41)) >obj : Symbol(obj, Decl(typedArrays.ts, 61, 47)) typedArrays[8] = Uint8ClampedArray.from(obj); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 62, 7)) ->Uint8ClampedArray.from : Symbol(Uint8ClampedArrayConstructor.from, Decl(lib.d.ts, 2967, 46)) ->Uint8ClampedArray : Symbol(Uint8ClampedArray, Decl(lib.d.ts, 2687, 46), Decl(lib.d.ts, 2977, 11)) ->from : Symbol(Uint8ClampedArrayConstructor.from, Decl(lib.d.ts, 2967, 46)) +>Uint8ClampedArray.from : Symbol(Uint8ClampedArrayConstructor.from, Decl(lib.d.ts, 2978, 46)) +>Uint8ClampedArray : Symbol(Uint8ClampedArray, Decl(lib.d.ts, 2698, 46), Decl(lib.d.ts, 2988, 11)) +>from : Symbol(Uint8ClampedArrayConstructor.from, Decl(lib.d.ts, 2978, 46)) >obj : Symbol(obj, Decl(typedArrays.ts, 61, 47)) return typedArrays; @@ -332,57 +332,57 @@ function CreateTypedArraysOf2() { typedArrays[0] = Int8Array.of(1,2,3,4); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 94, 7)) ->Int8Array.of : Symbol(Int8ArrayConstructor.of, Decl(lib.d.ts, 2381, 30)) ->Int8Array : Symbol(Int8Array, Decl(lib.d.ts, 2107, 42), Decl(lib.d.ts, 2397, 11)) ->of : Symbol(Int8ArrayConstructor.of, Decl(lib.d.ts, 2381, 30)) +>Int8Array.of : Symbol(Int8ArrayConstructor.of, Decl(lib.d.ts, 2392, 30)) +>Int8Array : Symbol(Int8Array, Decl(lib.d.ts, 2118, 42), Decl(lib.d.ts, 2408, 11)) +>of : Symbol(Int8ArrayConstructor.of, Decl(lib.d.ts, 2392, 30)) typedArrays[1] = Uint8Array.of(1,2,3,4); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 94, 7)) ->Uint8Array.of : Symbol(Uint8ArrayConstructor.of, Decl(lib.d.ts, 2671, 30)) ->Uint8Array : Symbol(Uint8Array, Decl(lib.d.ts, 2397, 44), Decl(lib.d.ts, 2687, 11)) ->of : Symbol(Uint8ArrayConstructor.of, Decl(lib.d.ts, 2671, 30)) +>Uint8Array.of : Symbol(Uint8ArrayConstructor.of, Decl(lib.d.ts, 2682, 30)) +>Uint8Array : Symbol(Uint8Array, Decl(lib.d.ts, 2408, 44), Decl(lib.d.ts, 2698, 11)) +>of : Symbol(Uint8ArrayConstructor.of, Decl(lib.d.ts, 2682, 30)) typedArrays[2] = Int16Array.of(1,2,3,4); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 94, 7)) ->Int16Array.of : Symbol(Int16ArrayConstructor.of, Decl(lib.d.ts, 3251, 30)) ->Int16Array : Symbol(Int16Array, Decl(lib.d.ts, 2977, 60), Decl(lib.d.ts, 3267, 11)) ->of : Symbol(Int16ArrayConstructor.of, Decl(lib.d.ts, 3251, 30)) +>Int16Array.of : Symbol(Int16ArrayConstructor.of, Decl(lib.d.ts, 3262, 30)) +>Int16Array : Symbol(Int16Array, Decl(lib.d.ts, 2988, 60), Decl(lib.d.ts, 3278, 11)) +>of : Symbol(Int16ArrayConstructor.of, Decl(lib.d.ts, 3262, 30)) typedArrays[3] = Uint16Array.of(1,2,3,4); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 94, 7)) ->Uint16Array.of : Symbol(Uint16ArrayConstructor.of, Decl(lib.d.ts, 3541, 30)) ->Uint16Array : Symbol(Uint16Array, Decl(lib.d.ts, 3267, 46), Decl(lib.d.ts, 3557, 11)) ->of : Symbol(Uint16ArrayConstructor.of, Decl(lib.d.ts, 3541, 30)) +>Uint16Array.of : Symbol(Uint16ArrayConstructor.of, Decl(lib.d.ts, 3552, 30)) +>Uint16Array : Symbol(Uint16Array, Decl(lib.d.ts, 3278, 46), Decl(lib.d.ts, 3568, 11)) +>of : Symbol(Uint16ArrayConstructor.of, Decl(lib.d.ts, 3552, 30)) typedArrays[4] = Int32Array.of(1,2,3,4); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 94, 7)) ->Int32Array.of : Symbol(Int32ArrayConstructor.of, Decl(lib.d.ts, 3831, 30)) ->Int32Array : Symbol(Int32Array, Decl(lib.d.ts, 3557, 48), Decl(lib.d.ts, 3847, 11)) ->of : Symbol(Int32ArrayConstructor.of, Decl(lib.d.ts, 3831, 30)) +>Int32Array.of : Symbol(Int32ArrayConstructor.of, Decl(lib.d.ts, 3842, 30)) +>Int32Array : Symbol(Int32Array, Decl(lib.d.ts, 3568, 48), Decl(lib.d.ts, 3858, 11)) +>of : Symbol(Int32ArrayConstructor.of, Decl(lib.d.ts, 3842, 30)) typedArrays[5] = Uint32Array.of(1,2,3,4); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 94, 7)) ->Uint32Array.of : Symbol(Uint32ArrayConstructor.of, Decl(lib.d.ts, 4121, 30)) ->Uint32Array : Symbol(Uint32Array, Decl(lib.d.ts, 3847, 46), Decl(lib.d.ts, 4137, 11)) ->of : Symbol(Uint32ArrayConstructor.of, Decl(lib.d.ts, 4121, 30)) +>Uint32Array.of : Symbol(Uint32ArrayConstructor.of, Decl(lib.d.ts, 4132, 30)) +>Uint32Array : Symbol(Uint32Array, Decl(lib.d.ts, 3858, 46), Decl(lib.d.ts, 4148, 11)) +>of : Symbol(Uint32ArrayConstructor.of, Decl(lib.d.ts, 4132, 30)) typedArrays[6] = Float32Array.of(1,2,3,4); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 94, 7)) ->Float32Array.of : Symbol(Float32ArrayConstructor.of, Decl(lib.d.ts, 4411, 30)) ->Float32Array : Symbol(Float32Array, Decl(lib.d.ts, 4137, 48), Decl(lib.d.ts, 4427, 11)) ->of : Symbol(Float32ArrayConstructor.of, Decl(lib.d.ts, 4411, 30)) +>Float32Array.of : Symbol(Float32ArrayConstructor.of, Decl(lib.d.ts, 4422, 30)) +>Float32Array : Symbol(Float32Array, Decl(lib.d.ts, 4148, 48), Decl(lib.d.ts, 4438, 11)) +>of : Symbol(Float32ArrayConstructor.of, Decl(lib.d.ts, 4422, 30)) typedArrays[7] = Float64Array.of(1,2,3,4); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 94, 7)) ->Float64Array.of : Symbol(Float64ArrayConstructor.of, Decl(lib.d.ts, 4701, 30)) ->Float64Array : Symbol(Float64Array, Decl(lib.d.ts, 4427, 50), Decl(lib.d.ts, 4717, 11)) ->of : Symbol(Float64ArrayConstructor.of, Decl(lib.d.ts, 4701, 30)) +>Float64Array.of : Symbol(Float64ArrayConstructor.of, Decl(lib.d.ts, 4712, 30)) +>Float64Array : Symbol(Float64Array, Decl(lib.d.ts, 4438, 50), Decl(lib.d.ts, 4728, 11)) +>of : Symbol(Float64ArrayConstructor.of, Decl(lib.d.ts, 4712, 30)) typedArrays[8] = Uint8ClampedArray.of(1,2,3,4); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 94, 7)) ->Uint8ClampedArray.of : Symbol(Uint8ClampedArrayConstructor.of, Decl(lib.d.ts, 2961, 30)) ->Uint8ClampedArray : Symbol(Uint8ClampedArray, Decl(lib.d.ts, 2687, 46), Decl(lib.d.ts, 2977, 11)) ->of : Symbol(Uint8ClampedArrayConstructor.of, Decl(lib.d.ts, 2961, 30)) +>Uint8ClampedArray.of : Symbol(Uint8ClampedArrayConstructor.of, Decl(lib.d.ts, 2972, 30)) +>Uint8ClampedArray : Symbol(Uint8ClampedArray, Decl(lib.d.ts, 2698, 46), Decl(lib.d.ts, 2988, 11)) +>of : Symbol(Uint8ClampedArrayConstructor.of, Decl(lib.d.ts, 2972, 30)) return typedArrays; >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 94, 7)) @@ -391,7 +391,7 @@ function CreateTypedArraysOf2() { function CreateTypedArraysFromMapFn(obj:ArrayLike, mapFn: (n:number, v:number)=> number) { >CreateTypedArraysFromMapFn : Symbol(CreateTypedArraysFromMapFn, Decl(typedArrays.ts, 106, 1)) >obj : Symbol(obj, Decl(typedArrays.ts, 108, 36)) ->ArrayLike : Symbol(ArrayLike, Decl(lib.d.ts, 1434, 1)) +>ArrayLike : Symbol(ArrayLike, Decl(lib.d.ts, 1445, 1)) >mapFn : Symbol(mapFn, Decl(typedArrays.ts, 108, 58)) >n : Symbol(n, Decl(typedArrays.ts, 108, 67)) >v : Symbol(v, Decl(typedArrays.ts, 108, 76)) @@ -401,73 +401,73 @@ function CreateTypedArraysFromMapFn(obj:ArrayLike, mapFn: (n:number, v:n typedArrays[0] = Int8Array.from(obj, mapFn); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 109, 7)) ->Int8Array.from : Symbol(Int8ArrayConstructor.from, Decl(lib.d.ts, 2387, 38)) ->Int8Array : Symbol(Int8Array, Decl(lib.d.ts, 2107, 42), Decl(lib.d.ts, 2397, 11)) ->from : Symbol(Int8ArrayConstructor.from, Decl(lib.d.ts, 2387, 38)) +>Int8Array.from : Symbol(Int8ArrayConstructor.from, Decl(lib.d.ts, 2398, 38)) +>Int8Array : Symbol(Int8Array, Decl(lib.d.ts, 2118, 42), Decl(lib.d.ts, 2408, 11)) +>from : Symbol(Int8ArrayConstructor.from, Decl(lib.d.ts, 2398, 38)) >obj : Symbol(obj, Decl(typedArrays.ts, 108, 36)) >mapFn : Symbol(mapFn, Decl(typedArrays.ts, 108, 58)) typedArrays[1] = Uint8Array.from(obj, mapFn); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 109, 7)) ->Uint8Array.from : Symbol(Uint8ArrayConstructor.from, Decl(lib.d.ts, 2677, 39)) ->Uint8Array : Symbol(Uint8Array, Decl(lib.d.ts, 2397, 44), Decl(lib.d.ts, 2687, 11)) ->from : Symbol(Uint8ArrayConstructor.from, Decl(lib.d.ts, 2677, 39)) +>Uint8Array.from : Symbol(Uint8ArrayConstructor.from, Decl(lib.d.ts, 2688, 39)) +>Uint8Array : Symbol(Uint8Array, Decl(lib.d.ts, 2408, 44), Decl(lib.d.ts, 2698, 11)) +>from : Symbol(Uint8ArrayConstructor.from, Decl(lib.d.ts, 2688, 39)) >obj : Symbol(obj, Decl(typedArrays.ts, 108, 36)) >mapFn : Symbol(mapFn, Decl(typedArrays.ts, 108, 58)) typedArrays[2] = Int16Array.from(obj, mapFn); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 109, 7)) ->Int16Array.from : Symbol(Int16ArrayConstructor.from, Decl(lib.d.ts, 3257, 39)) ->Int16Array : Symbol(Int16Array, Decl(lib.d.ts, 2977, 60), Decl(lib.d.ts, 3267, 11)) ->from : Symbol(Int16ArrayConstructor.from, Decl(lib.d.ts, 3257, 39)) +>Int16Array.from : Symbol(Int16ArrayConstructor.from, Decl(lib.d.ts, 3268, 39)) +>Int16Array : Symbol(Int16Array, Decl(lib.d.ts, 2988, 60), Decl(lib.d.ts, 3278, 11)) +>from : Symbol(Int16ArrayConstructor.from, Decl(lib.d.ts, 3268, 39)) >obj : Symbol(obj, Decl(typedArrays.ts, 108, 36)) >mapFn : Symbol(mapFn, Decl(typedArrays.ts, 108, 58)) typedArrays[3] = Uint16Array.from(obj, mapFn); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 109, 7)) ->Uint16Array.from : Symbol(Uint16ArrayConstructor.from, Decl(lib.d.ts, 3547, 40)) ->Uint16Array : Symbol(Uint16Array, Decl(lib.d.ts, 3267, 46), Decl(lib.d.ts, 3557, 11)) ->from : Symbol(Uint16ArrayConstructor.from, Decl(lib.d.ts, 3547, 40)) +>Uint16Array.from : Symbol(Uint16ArrayConstructor.from, Decl(lib.d.ts, 3558, 40)) +>Uint16Array : Symbol(Uint16Array, Decl(lib.d.ts, 3278, 46), Decl(lib.d.ts, 3568, 11)) +>from : Symbol(Uint16ArrayConstructor.from, Decl(lib.d.ts, 3558, 40)) >obj : Symbol(obj, Decl(typedArrays.ts, 108, 36)) >mapFn : Symbol(mapFn, Decl(typedArrays.ts, 108, 58)) typedArrays[4] = Int32Array.from(obj, mapFn); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 109, 7)) ->Int32Array.from : Symbol(Int32ArrayConstructor.from, Decl(lib.d.ts, 3837, 39)) ->Int32Array : Symbol(Int32Array, Decl(lib.d.ts, 3557, 48), Decl(lib.d.ts, 3847, 11)) ->from : Symbol(Int32ArrayConstructor.from, Decl(lib.d.ts, 3837, 39)) +>Int32Array.from : Symbol(Int32ArrayConstructor.from, Decl(lib.d.ts, 3848, 39)) +>Int32Array : Symbol(Int32Array, Decl(lib.d.ts, 3568, 48), Decl(lib.d.ts, 3858, 11)) +>from : Symbol(Int32ArrayConstructor.from, Decl(lib.d.ts, 3848, 39)) >obj : Symbol(obj, Decl(typedArrays.ts, 108, 36)) >mapFn : Symbol(mapFn, Decl(typedArrays.ts, 108, 58)) typedArrays[5] = Uint32Array.from(obj, mapFn); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 109, 7)) ->Uint32Array.from : Symbol(Uint32ArrayConstructor.from, Decl(lib.d.ts, 4127, 40)) ->Uint32Array : Symbol(Uint32Array, Decl(lib.d.ts, 3847, 46), Decl(lib.d.ts, 4137, 11)) ->from : Symbol(Uint32ArrayConstructor.from, Decl(lib.d.ts, 4127, 40)) +>Uint32Array.from : Symbol(Uint32ArrayConstructor.from, Decl(lib.d.ts, 4138, 40)) +>Uint32Array : Symbol(Uint32Array, Decl(lib.d.ts, 3858, 46), Decl(lib.d.ts, 4148, 11)) +>from : Symbol(Uint32ArrayConstructor.from, Decl(lib.d.ts, 4138, 40)) >obj : Symbol(obj, Decl(typedArrays.ts, 108, 36)) >mapFn : Symbol(mapFn, Decl(typedArrays.ts, 108, 58)) typedArrays[6] = Float32Array.from(obj, mapFn); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 109, 7)) ->Float32Array.from : Symbol(Float32ArrayConstructor.from, Decl(lib.d.ts, 4417, 41)) ->Float32Array : Symbol(Float32Array, Decl(lib.d.ts, 4137, 48), Decl(lib.d.ts, 4427, 11)) ->from : Symbol(Float32ArrayConstructor.from, Decl(lib.d.ts, 4417, 41)) +>Float32Array.from : Symbol(Float32ArrayConstructor.from, Decl(lib.d.ts, 4428, 41)) +>Float32Array : Symbol(Float32Array, Decl(lib.d.ts, 4148, 48), Decl(lib.d.ts, 4438, 11)) +>from : Symbol(Float32ArrayConstructor.from, Decl(lib.d.ts, 4428, 41)) >obj : Symbol(obj, Decl(typedArrays.ts, 108, 36)) >mapFn : Symbol(mapFn, Decl(typedArrays.ts, 108, 58)) typedArrays[7] = Float64Array.from(obj, mapFn); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 109, 7)) ->Float64Array.from : Symbol(Float64ArrayConstructor.from, Decl(lib.d.ts, 4707, 41)) ->Float64Array : Symbol(Float64Array, Decl(lib.d.ts, 4427, 50), Decl(lib.d.ts, 4717, 11)) ->from : Symbol(Float64ArrayConstructor.from, Decl(lib.d.ts, 4707, 41)) +>Float64Array.from : Symbol(Float64ArrayConstructor.from, Decl(lib.d.ts, 4718, 41)) +>Float64Array : Symbol(Float64Array, Decl(lib.d.ts, 4438, 50), Decl(lib.d.ts, 4728, 11)) +>from : Symbol(Float64ArrayConstructor.from, Decl(lib.d.ts, 4718, 41)) >obj : Symbol(obj, Decl(typedArrays.ts, 108, 36)) >mapFn : Symbol(mapFn, Decl(typedArrays.ts, 108, 58)) typedArrays[8] = Uint8ClampedArray.from(obj, mapFn); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 109, 7)) ->Uint8ClampedArray.from : Symbol(Uint8ClampedArrayConstructor.from, Decl(lib.d.ts, 2967, 46)) ->Uint8ClampedArray : Symbol(Uint8ClampedArray, Decl(lib.d.ts, 2687, 46), Decl(lib.d.ts, 2977, 11)) ->from : Symbol(Uint8ClampedArrayConstructor.from, Decl(lib.d.ts, 2967, 46)) +>Uint8ClampedArray.from : Symbol(Uint8ClampedArrayConstructor.from, Decl(lib.d.ts, 2978, 46)) +>Uint8ClampedArray : Symbol(Uint8ClampedArray, Decl(lib.d.ts, 2698, 46), Decl(lib.d.ts, 2988, 11)) +>from : Symbol(Uint8ClampedArrayConstructor.from, Decl(lib.d.ts, 2978, 46)) >obj : Symbol(obj, Decl(typedArrays.ts, 108, 36)) >mapFn : Symbol(mapFn, Decl(typedArrays.ts, 108, 58)) @@ -478,7 +478,7 @@ function CreateTypedArraysFromMapFn(obj:ArrayLike, mapFn: (n:number, v:n function CreateTypedArraysFromThisObj(obj:ArrayLike, mapFn: (n:number, v:number)=> number, thisArg: {}) { >CreateTypedArraysFromThisObj : Symbol(CreateTypedArraysFromThisObj, Decl(typedArrays.ts, 121, 1)) >obj : Symbol(obj, Decl(typedArrays.ts, 123, 38)) ->ArrayLike : Symbol(ArrayLike, Decl(lib.d.ts, 1434, 1)) +>ArrayLike : Symbol(ArrayLike, Decl(lib.d.ts, 1445, 1)) >mapFn : Symbol(mapFn, Decl(typedArrays.ts, 123, 60)) >n : Symbol(n, Decl(typedArrays.ts, 123, 69)) >v : Symbol(v, Decl(typedArrays.ts, 123, 78)) @@ -489,81 +489,81 @@ function CreateTypedArraysFromThisObj(obj:ArrayLike, mapFn: (n:number, v typedArrays[0] = Int8Array.from(obj, mapFn, thisArg); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 124, 7)) ->Int8Array.from : Symbol(Int8ArrayConstructor.from, Decl(lib.d.ts, 2387, 38)) ->Int8Array : Symbol(Int8Array, Decl(lib.d.ts, 2107, 42), Decl(lib.d.ts, 2397, 11)) ->from : Symbol(Int8ArrayConstructor.from, Decl(lib.d.ts, 2387, 38)) +>Int8Array.from : Symbol(Int8ArrayConstructor.from, Decl(lib.d.ts, 2398, 38)) +>Int8Array : Symbol(Int8Array, Decl(lib.d.ts, 2118, 42), Decl(lib.d.ts, 2408, 11)) +>from : Symbol(Int8ArrayConstructor.from, Decl(lib.d.ts, 2398, 38)) >obj : Symbol(obj, Decl(typedArrays.ts, 123, 38)) >mapFn : Symbol(mapFn, Decl(typedArrays.ts, 123, 60)) >thisArg : Symbol(thisArg, Decl(typedArrays.ts, 123, 98)) typedArrays[1] = Uint8Array.from(obj, mapFn, thisArg); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 124, 7)) ->Uint8Array.from : Symbol(Uint8ArrayConstructor.from, Decl(lib.d.ts, 2677, 39)) ->Uint8Array : Symbol(Uint8Array, Decl(lib.d.ts, 2397, 44), Decl(lib.d.ts, 2687, 11)) ->from : Symbol(Uint8ArrayConstructor.from, Decl(lib.d.ts, 2677, 39)) +>Uint8Array.from : Symbol(Uint8ArrayConstructor.from, Decl(lib.d.ts, 2688, 39)) +>Uint8Array : Symbol(Uint8Array, Decl(lib.d.ts, 2408, 44), Decl(lib.d.ts, 2698, 11)) +>from : Symbol(Uint8ArrayConstructor.from, Decl(lib.d.ts, 2688, 39)) >obj : Symbol(obj, Decl(typedArrays.ts, 123, 38)) >mapFn : Symbol(mapFn, Decl(typedArrays.ts, 123, 60)) >thisArg : Symbol(thisArg, Decl(typedArrays.ts, 123, 98)) typedArrays[2] = Int16Array.from(obj, mapFn, thisArg); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 124, 7)) ->Int16Array.from : Symbol(Int16ArrayConstructor.from, Decl(lib.d.ts, 3257, 39)) ->Int16Array : Symbol(Int16Array, Decl(lib.d.ts, 2977, 60), Decl(lib.d.ts, 3267, 11)) ->from : Symbol(Int16ArrayConstructor.from, Decl(lib.d.ts, 3257, 39)) +>Int16Array.from : Symbol(Int16ArrayConstructor.from, Decl(lib.d.ts, 3268, 39)) +>Int16Array : Symbol(Int16Array, Decl(lib.d.ts, 2988, 60), Decl(lib.d.ts, 3278, 11)) +>from : Symbol(Int16ArrayConstructor.from, Decl(lib.d.ts, 3268, 39)) >obj : Symbol(obj, Decl(typedArrays.ts, 123, 38)) >mapFn : Symbol(mapFn, Decl(typedArrays.ts, 123, 60)) >thisArg : Symbol(thisArg, Decl(typedArrays.ts, 123, 98)) typedArrays[3] = Uint16Array.from(obj, mapFn, thisArg); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 124, 7)) ->Uint16Array.from : Symbol(Uint16ArrayConstructor.from, Decl(lib.d.ts, 3547, 40)) ->Uint16Array : Symbol(Uint16Array, Decl(lib.d.ts, 3267, 46), Decl(lib.d.ts, 3557, 11)) ->from : Symbol(Uint16ArrayConstructor.from, Decl(lib.d.ts, 3547, 40)) +>Uint16Array.from : Symbol(Uint16ArrayConstructor.from, Decl(lib.d.ts, 3558, 40)) +>Uint16Array : Symbol(Uint16Array, Decl(lib.d.ts, 3278, 46), Decl(lib.d.ts, 3568, 11)) +>from : Symbol(Uint16ArrayConstructor.from, Decl(lib.d.ts, 3558, 40)) >obj : Symbol(obj, Decl(typedArrays.ts, 123, 38)) >mapFn : Symbol(mapFn, Decl(typedArrays.ts, 123, 60)) >thisArg : Symbol(thisArg, Decl(typedArrays.ts, 123, 98)) typedArrays[4] = Int32Array.from(obj, mapFn, thisArg); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 124, 7)) ->Int32Array.from : Symbol(Int32ArrayConstructor.from, Decl(lib.d.ts, 3837, 39)) ->Int32Array : Symbol(Int32Array, Decl(lib.d.ts, 3557, 48), Decl(lib.d.ts, 3847, 11)) ->from : Symbol(Int32ArrayConstructor.from, Decl(lib.d.ts, 3837, 39)) +>Int32Array.from : Symbol(Int32ArrayConstructor.from, Decl(lib.d.ts, 3848, 39)) +>Int32Array : Symbol(Int32Array, Decl(lib.d.ts, 3568, 48), Decl(lib.d.ts, 3858, 11)) +>from : Symbol(Int32ArrayConstructor.from, Decl(lib.d.ts, 3848, 39)) >obj : Symbol(obj, Decl(typedArrays.ts, 123, 38)) >mapFn : Symbol(mapFn, Decl(typedArrays.ts, 123, 60)) >thisArg : Symbol(thisArg, Decl(typedArrays.ts, 123, 98)) typedArrays[5] = Uint32Array.from(obj, mapFn, thisArg); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 124, 7)) ->Uint32Array.from : Symbol(Uint32ArrayConstructor.from, Decl(lib.d.ts, 4127, 40)) ->Uint32Array : Symbol(Uint32Array, Decl(lib.d.ts, 3847, 46), Decl(lib.d.ts, 4137, 11)) ->from : Symbol(Uint32ArrayConstructor.from, Decl(lib.d.ts, 4127, 40)) +>Uint32Array.from : Symbol(Uint32ArrayConstructor.from, Decl(lib.d.ts, 4138, 40)) +>Uint32Array : Symbol(Uint32Array, Decl(lib.d.ts, 3858, 46), Decl(lib.d.ts, 4148, 11)) +>from : Symbol(Uint32ArrayConstructor.from, Decl(lib.d.ts, 4138, 40)) >obj : Symbol(obj, Decl(typedArrays.ts, 123, 38)) >mapFn : Symbol(mapFn, Decl(typedArrays.ts, 123, 60)) >thisArg : Symbol(thisArg, Decl(typedArrays.ts, 123, 98)) typedArrays[6] = Float32Array.from(obj, mapFn, thisArg); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 124, 7)) ->Float32Array.from : Symbol(Float32ArrayConstructor.from, Decl(lib.d.ts, 4417, 41)) ->Float32Array : Symbol(Float32Array, Decl(lib.d.ts, 4137, 48), Decl(lib.d.ts, 4427, 11)) ->from : Symbol(Float32ArrayConstructor.from, Decl(lib.d.ts, 4417, 41)) +>Float32Array.from : Symbol(Float32ArrayConstructor.from, Decl(lib.d.ts, 4428, 41)) +>Float32Array : Symbol(Float32Array, Decl(lib.d.ts, 4148, 48), Decl(lib.d.ts, 4438, 11)) +>from : Symbol(Float32ArrayConstructor.from, Decl(lib.d.ts, 4428, 41)) >obj : Symbol(obj, Decl(typedArrays.ts, 123, 38)) >mapFn : Symbol(mapFn, Decl(typedArrays.ts, 123, 60)) >thisArg : Symbol(thisArg, Decl(typedArrays.ts, 123, 98)) typedArrays[7] = Float64Array.from(obj, mapFn, thisArg); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 124, 7)) ->Float64Array.from : Symbol(Float64ArrayConstructor.from, Decl(lib.d.ts, 4707, 41)) ->Float64Array : Symbol(Float64Array, Decl(lib.d.ts, 4427, 50), Decl(lib.d.ts, 4717, 11)) ->from : Symbol(Float64ArrayConstructor.from, Decl(lib.d.ts, 4707, 41)) +>Float64Array.from : Symbol(Float64ArrayConstructor.from, Decl(lib.d.ts, 4718, 41)) +>Float64Array : Symbol(Float64Array, Decl(lib.d.ts, 4438, 50), Decl(lib.d.ts, 4728, 11)) +>from : Symbol(Float64ArrayConstructor.from, Decl(lib.d.ts, 4718, 41)) >obj : Symbol(obj, Decl(typedArrays.ts, 123, 38)) >mapFn : Symbol(mapFn, Decl(typedArrays.ts, 123, 60)) >thisArg : Symbol(thisArg, Decl(typedArrays.ts, 123, 98)) typedArrays[8] = Uint8ClampedArray.from(obj, mapFn, thisArg); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 124, 7)) ->Uint8ClampedArray.from : Symbol(Uint8ClampedArrayConstructor.from, Decl(lib.d.ts, 2967, 46)) ->Uint8ClampedArray : Symbol(Uint8ClampedArray, Decl(lib.d.ts, 2687, 46), Decl(lib.d.ts, 2977, 11)) ->from : Symbol(Uint8ClampedArrayConstructor.from, Decl(lib.d.ts, 2967, 46)) +>Uint8ClampedArray.from : Symbol(Uint8ClampedArrayConstructor.from, Decl(lib.d.ts, 2978, 46)) +>Uint8ClampedArray : Symbol(Uint8ClampedArray, Decl(lib.d.ts, 2698, 46), Decl(lib.d.ts, 2988, 11)) +>from : Symbol(Uint8ClampedArrayConstructor.from, Decl(lib.d.ts, 2978, 46)) >obj : Symbol(obj, Decl(typedArrays.ts, 123, 38)) >mapFn : Symbol(mapFn, Decl(typedArrays.ts, 123, 60)) >thisArg : Symbol(thisArg, Decl(typedArrays.ts, 123, 98)) diff --git a/tests/cases/conformance/async/es6/asyncArrowFunction/asyncArrowFunction10_es6.ts b/tests/cases/conformance/async/es6/asyncArrowFunction/asyncArrowFunction10_es6.ts new file mode 100644 index 0000000000000..0959ed6c561e8 --- /dev/null +++ b/tests/cases/conformance/async/es6/asyncArrowFunction/asyncArrowFunction10_es6.ts @@ -0,0 +1,7 @@ +// @target: ES6 +// @noEmitHelpers: true + +var foo = async foo(): Promise => { + // Legal to use 'await' in a type context. + var v: await; +} diff --git a/tests/cases/conformance/async/es6/asyncArrowFunction/asyncArrowFunction1_es6.ts b/tests/cases/conformance/async/es6/asyncArrowFunction/asyncArrowFunction1_es6.ts new file mode 100644 index 0000000000000..83e7413c5279a --- /dev/null +++ b/tests/cases/conformance/async/es6/asyncArrowFunction/asyncArrowFunction1_es6.ts @@ -0,0 +1,5 @@ +// @target: ES6 +// @noEmitHelpers: true + +var foo = async (): Promise => { +}; \ No newline at end of file diff --git a/tests/cases/conformance/async/es6/asyncArrowFunction/asyncArrowFunction2_es6.ts b/tests/cases/conformance/async/es6/asyncArrowFunction/asyncArrowFunction2_es6.ts new file mode 100644 index 0000000000000..bf39735d4603f --- /dev/null +++ b/tests/cases/conformance/async/es6/asyncArrowFunction/asyncArrowFunction2_es6.ts @@ -0,0 +1,4 @@ +// @target: ES6 +// @noEmitHelpers: true +var f = (await) => { +} \ No newline at end of file diff --git a/tests/cases/conformance/async/es6/asyncArrowFunction/asyncArrowFunction3_es6.ts b/tests/cases/conformance/async/es6/asyncArrowFunction/asyncArrowFunction3_es6.ts new file mode 100644 index 0000000000000..4ae27c596f1ab --- /dev/null +++ b/tests/cases/conformance/async/es6/asyncArrowFunction/asyncArrowFunction3_es6.ts @@ -0,0 +1,4 @@ +// @target: ES6 +// @noEmitHelpers: true +function f(await = await) { +} \ No newline at end of file diff --git a/tests/cases/conformance/async/es6/asyncArrowFunction/asyncArrowFunction4_es6.ts b/tests/cases/conformance/async/es6/asyncArrowFunction/asyncArrowFunction4_es6.ts new file mode 100644 index 0000000000000..51b34abeca1aa --- /dev/null +++ b/tests/cases/conformance/async/es6/asyncArrowFunction/asyncArrowFunction4_es6.ts @@ -0,0 +1,4 @@ +// @target: ES6 +// @noEmitHelpers: true +var await = () => { +} \ No newline at end of file diff --git a/tests/cases/conformance/async/es6/asyncArrowFunction/asyncArrowFunction5_es6.ts b/tests/cases/conformance/async/es6/asyncArrowFunction/asyncArrowFunction5_es6.ts new file mode 100644 index 0000000000000..174a619bdf9f9 --- /dev/null +++ b/tests/cases/conformance/async/es6/asyncArrowFunction/asyncArrowFunction5_es6.ts @@ -0,0 +1,5 @@ +// @target: ES6 +// @noEmitHelpers: true + +var foo = async (await): Promise => { +} \ No newline at end of file diff --git a/tests/cases/conformance/async/es6/asyncArrowFunction/asyncArrowFunction6_es6.ts b/tests/cases/conformance/async/es6/asyncArrowFunction/asyncArrowFunction6_es6.ts new file mode 100644 index 0000000000000..dace96c4933da --- /dev/null +++ b/tests/cases/conformance/async/es6/asyncArrowFunction/asyncArrowFunction6_es6.ts @@ -0,0 +1,5 @@ +// @target: ES6 +// @noEmitHelpers: true + +var foo = async (a = await): Promise => { +} \ No newline at end of file diff --git a/tests/cases/conformance/async/es6/asyncArrowFunction/asyncArrowFunction7_es6.ts b/tests/cases/conformance/async/es6/asyncArrowFunction/asyncArrowFunction7_es6.ts new file mode 100644 index 0000000000000..b1fd5cc030d97 --- /dev/null +++ b/tests/cases/conformance/async/es6/asyncArrowFunction/asyncArrowFunction7_es6.ts @@ -0,0 +1,8 @@ +// @target: ES6 +// @noEmitHelpers: true + +var bar = async (): Promise => { + // 'await' here is an identifier, and not an await expression. + var foo = async (a = await): Promise => { + } +} \ No newline at end of file diff --git a/tests/cases/conformance/async/es6/asyncArrowFunction/asyncArrowFunction8_es6.ts b/tests/cases/conformance/async/es6/asyncArrowFunction/asyncArrowFunction8_es6.ts new file mode 100644 index 0000000000000..5d53338b1bd78 --- /dev/null +++ b/tests/cases/conformance/async/es6/asyncArrowFunction/asyncArrowFunction8_es6.ts @@ -0,0 +1,6 @@ +// @target: ES6 +// @noEmitHelpers: true + +var foo = async (): Promise => { + var v = { [await]: foo } +} \ No newline at end of file diff --git a/tests/cases/conformance/async/es6/asyncArrowFunction/asyncArrowFunction9_es6.ts b/tests/cases/conformance/async/es6/asyncArrowFunction/asyncArrowFunction9_es6.ts new file mode 100644 index 0000000000000..da041fe472b30 --- /dev/null +++ b/tests/cases/conformance/async/es6/asyncArrowFunction/asyncArrowFunction9_es6.ts @@ -0,0 +1,4 @@ +// @target: ES6 +// @noEmitHelpers: true +var foo = async (a = await => await): Promise => { +} \ No newline at end of file diff --git a/tests/cases/conformance/async/es6/asyncArrowFunction/asyncArrowFunctionCapturesArguments_es6.ts b/tests/cases/conformance/async/es6/asyncArrowFunction/asyncArrowFunctionCapturesArguments_es6.ts new file mode 100644 index 0000000000000..8dab2c0408630 --- /dev/null +++ b/tests/cases/conformance/async/es6/asyncArrowFunction/asyncArrowFunctionCapturesArguments_es6.ts @@ -0,0 +1,8 @@ +// @target: ES6 +// @noEmitHelpers: true +class C { + method() { + function other() {} + var fn = async () => await other.apply(this, arguments); + } +} diff --git a/tests/cases/conformance/async/es6/asyncArrowFunction/asyncArrowFunctionCapturesThis_es6.ts b/tests/cases/conformance/async/es6/asyncArrowFunction/asyncArrowFunctionCapturesThis_es6.ts new file mode 100644 index 0000000000000..f2c507cbdd667 --- /dev/null +++ b/tests/cases/conformance/async/es6/asyncArrowFunction/asyncArrowFunctionCapturesThis_es6.ts @@ -0,0 +1,7 @@ +// @target: ES6 +// @noEmitHelpers: true +class C { + method() { + var fn = async () => await this; + } +} diff --git a/tests/cases/conformance/async/es6/asyncClass_es6.ts b/tests/cases/conformance/async/es6/asyncClass_es6.ts new file mode 100644 index 0000000000000..22ffe997b03cd --- /dev/null +++ b/tests/cases/conformance/async/es6/asyncClass_es6.ts @@ -0,0 +1,4 @@ +// @target: ES6 +// @noEmitHelpers: true +async class C { +} \ No newline at end of file diff --git a/tests/cases/conformance/async/es6/asyncConstructor_es6.ts b/tests/cases/conformance/async/es6/asyncConstructor_es6.ts new file mode 100644 index 0000000000000..d769fad039525 --- /dev/null +++ b/tests/cases/conformance/async/es6/asyncConstructor_es6.ts @@ -0,0 +1,6 @@ +// @target: ES6 +// @noEmitHelpers: true +class C { + async constructor() { + } +} \ No newline at end of file diff --git a/tests/cases/conformance/async/es6/asyncDeclare_es6.ts b/tests/cases/conformance/async/es6/asyncDeclare_es6.ts new file mode 100644 index 0000000000000..5e0fb536b395f --- /dev/null +++ b/tests/cases/conformance/async/es6/asyncDeclare_es6.ts @@ -0,0 +1,3 @@ +// @target: ES6 +// @noEmitHelpers: true +declare async function foo(): Promise; \ No newline at end of file diff --git a/tests/cases/conformance/async/es6/asyncEnum_es6.ts b/tests/cases/conformance/async/es6/asyncEnum_es6.ts new file mode 100644 index 0000000000000..4fad7923a8c93 --- /dev/null +++ b/tests/cases/conformance/async/es6/asyncEnum_es6.ts @@ -0,0 +1,5 @@ +// @target: ES6 +// @noEmitHelpers: true +async enum E { + Value +} \ No newline at end of file diff --git a/tests/cases/conformance/async/es6/asyncGetter_es6.ts b/tests/cases/conformance/async/es6/asyncGetter_es6.ts new file mode 100644 index 0000000000000..79fde60fdc4bb --- /dev/null +++ b/tests/cases/conformance/async/es6/asyncGetter_es6.ts @@ -0,0 +1,6 @@ +// @target: ES6 +// @noEmitHelpers: true +class C { + async get foo() { + } +} \ No newline at end of file diff --git a/tests/cases/conformance/async/es6/asyncInterface_es6.ts b/tests/cases/conformance/async/es6/asyncInterface_es6.ts new file mode 100644 index 0000000000000..5d5497d3cd4bf --- /dev/null +++ b/tests/cases/conformance/async/es6/asyncInterface_es6.ts @@ -0,0 +1,4 @@ +// @target: ES6 +// @noEmitHelpers: true +async interface I { +} \ No newline at end of file diff --git a/tests/cases/conformance/async/es6/asyncModule_es6.ts b/tests/cases/conformance/async/es6/asyncModule_es6.ts new file mode 100644 index 0000000000000..aa4c295d0e357 --- /dev/null +++ b/tests/cases/conformance/async/es6/asyncModule_es6.ts @@ -0,0 +1,4 @@ +// @target: ES6 +// @noEmitHelpers: true +async module M { +} \ No newline at end of file diff --git a/tests/cases/conformance/async/es6/asyncSetter_es6.ts b/tests/cases/conformance/async/es6/asyncSetter_es6.ts new file mode 100644 index 0000000000000..8eedcbb5288a2 --- /dev/null +++ b/tests/cases/conformance/async/es6/asyncSetter_es6.ts @@ -0,0 +1,6 @@ +// @target: ES6 +// @noEmitHelpers: true +class C { + async set foo(value) { + } +} \ No newline at end of file diff --git a/tests/cases/conformance/async/es6/awaitBinaryExpression/awaitBinaryExpression1_es6.ts b/tests/cases/conformance/async/es6/awaitBinaryExpression/awaitBinaryExpression1_es6.ts new file mode 100644 index 0000000000000..46060f309b241 --- /dev/null +++ b/tests/cases/conformance/async/es6/awaitBinaryExpression/awaitBinaryExpression1_es6.ts @@ -0,0 +1,9 @@ +// @target: ES6 +// @noEmitHelpers: true +declare var a: boolean; +declare var p: Promise; +async function func(): Promise { + "before"; + var b = await p || a; + "after"; +} \ No newline at end of file diff --git a/tests/cases/conformance/async/es6/awaitBinaryExpression/awaitBinaryExpression2_es6.ts b/tests/cases/conformance/async/es6/awaitBinaryExpression/awaitBinaryExpression2_es6.ts new file mode 100644 index 0000000000000..362f1ecc4463f --- /dev/null +++ b/tests/cases/conformance/async/es6/awaitBinaryExpression/awaitBinaryExpression2_es6.ts @@ -0,0 +1,9 @@ +// @target: ES6 +// @noEmitHelpers: true +declare var a: boolean; +declare var p: Promise; +async function func(): Promise { + "before"; + var b = await p && a; + "after"; +} \ No newline at end of file diff --git a/tests/cases/conformance/async/es6/awaitBinaryExpression/awaitBinaryExpression3_es6.ts b/tests/cases/conformance/async/es6/awaitBinaryExpression/awaitBinaryExpression3_es6.ts new file mode 100644 index 0000000000000..d3b02033252e1 --- /dev/null +++ b/tests/cases/conformance/async/es6/awaitBinaryExpression/awaitBinaryExpression3_es6.ts @@ -0,0 +1,9 @@ +// @target: ES6 +// @noEmitHelpers: true +declare var a: number; +declare var p: Promise; +async function func(): Promise { + "before"; + var b = await p + a; + "after"; +} \ No newline at end of file diff --git a/tests/cases/conformance/async/es6/awaitBinaryExpression/awaitBinaryExpression4_es6.ts b/tests/cases/conformance/async/es6/awaitBinaryExpression/awaitBinaryExpression4_es6.ts new file mode 100644 index 0000000000000..eba3be31acfbc --- /dev/null +++ b/tests/cases/conformance/async/es6/awaitBinaryExpression/awaitBinaryExpression4_es6.ts @@ -0,0 +1,9 @@ +// @target: ES6 +// @noEmitHelpers: true +declare var a: boolean; +declare var p: Promise; +async function func(): Promise { + "before"; + var b = await p, a; + "after"; +} \ No newline at end of file diff --git a/tests/cases/conformance/async/es6/awaitBinaryExpression/awaitBinaryExpression5_es6.ts b/tests/cases/conformance/async/es6/awaitBinaryExpression/awaitBinaryExpression5_es6.ts new file mode 100644 index 0000000000000..71b173f9e73a7 --- /dev/null +++ b/tests/cases/conformance/async/es6/awaitBinaryExpression/awaitBinaryExpression5_es6.ts @@ -0,0 +1,10 @@ +// @target: ES6 +// @noEmitHelpers: true +declare var a: boolean; +declare var p: Promise; +async function func(): Promise { + "before"; + var o: { a: boolean; }; + o.a = await p; + "after"; +} \ No newline at end of file diff --git a/tests/cases/conformance/async/es6/awaitCallExpression/awaitCallExpression1_es6.ts b/tests/cases/conformance/async/es6/awaitCallExpression/awaitCallExpression1_es6.ts new file mode 100644 index 0000000000000..d0442f0968dc4 --- /dev/null +++ b/tests/cases/conformance/async/es6/awaitCallExpression/awaitCallExpression1_es6.ts @@ -0,0 +1,13 @@ +// @target: ES6 +// @noEmitHelpers: true +declare var a: boolean; +declare var p: Promise; +declare function fn(arg0: boolean, arg1: boolean, arg2: boolean): void; +declare var o: { fn(arg0: boolean, arg1: boolean, arg2: boolean): void; }; +declare var pfn: Promise<{ (arg0: boolean, arg1: boolean, arg2: boolean): void; }>; +declare var po: Promise<{ fn(arg0: boolean, arg1: boolean, arg2: boolean): void; }>; +async function func(): Promise { + "before"; + var b = fn(a, a, a); + "after"; +} \ No newline at end of file diff --git a/tests/cases/conformance/async/es6/awaitCallExpression/awaitCallExpression2_es6.ts b/tests/cases/conformance/async/es6/awaitCallExpression/awaitCallExpression2_es6.ts new file mode 100644 index 0000000000000..6de07ef12ffee --- /dev/null +++ b/tests/cases/conformance/async/es6/awaitCallExpression/awaitCallExpression2_es6.ts @@ -0,0 +1,13 @@ +// @target: ES6 +// @noEmitHelpers: true +declare var a: boolean; +declare var p: Promise; +declare function fn(arg0: boolean, arg1: boolean, arg2: boolean): void; +declare var o: { fn(arg0: boolean, arg1: boolean, arg2: boolean): void; }; +declare var pfn: Promise<{ (arg0: boolean, arg1: boolean, arg2: boolean): void; }>; +declare var po: Promise<{ fn(arg0: boolean, arg1: boolean, arg2: boolean): void; }>; +async function func(): Promise { + "before"; + var b = fn(await p, a, a); + "after"; +} \ No newline at end of file diff --git a/tests/cases/conformance/async/es6/awaitCallExpression/awaitCallExpression3_es6.ts b/tests/cases/conformance/async/es6/awaitCallExpression/awaitCallExpression3_es6.ts new file mode 100644 index 0000000000000..2cc0b7b12d071 --- /dev/null +++ b/tests/cases/conformance/async/es6/awaitCallExpression/awaitCallExpression3_es6.ts @@ -0,0 +1,13 @@ +// @target: ES6 +// @noEmitHelpers: true +declare var a: boolean; +declare var p: Promise; +declare function fn(arg0: boolean, arg1: boolean, arg2: boolean): void; +declare var o: { fn(arg0: boolean, arg1: boolean, arg2: boolean): void; }; +declare var pfn: Promise<{ (arg0: boolean, arg1: boolean, arg2: boolean): void; }>; +declare var po: Promise<{ fn(arg0: boolean, arg1: boolean, arg2: boolean): void; }>; +async function func(): Promise { + "before"; + var b = fn(a, await p, a); + "after"; +} \ No newline at end of file diff --git a/tests/cases/conformance/async/es6/awaitCallExpression/awaitCallExpression4_es6.ts b/tests/cases/conformance/async/es6/awaitCallExpression/awaitCallExpression4_es6.ts new file mode 100644 index 0000000000000..8e349fbc5c329 --- /dev/null +++ b/tests/cases/conformance/async/es6/awaitCallExpression/awaitCallExpression4_es6.ts @@ -0,0 +1,13 @@ +// @target: ES6 +// @noEmitHelpers: true +declare var a: boolean; +declare var p: Promise; +declare function fn(arg0: boolean, arg1: boolean, arg2: boolean): void; +declare var o: { fn(arg0: boolean, arg1: boolean, arg2: boolean): void; }; +declare var pfn: Promise<{ (arg0: boolean, arg1: boolean, arg2: boolean): void; }>; +declare var po: Promise<{ fn(arg0: boolean, arg1: boolean, arg2: boolean): void; }>; +async function func(): Promise { + "before"; + var b = (await pfn)(a, a, a); + "after"; +} \ No newline at end of file diff --git a/tests/cases/conformance/async/es6/awaitCallExpression/awaitCallExpression5_es6.ts b/tests/cases/conformance/async/es6/awaitCallExpression/awaitCallExpression5_es6.ts new file mode 100644 index 0000000000000..bbe81ac94b110 --- /dev/null +++ b/tests/cases/conformance/async/es6/awaitCallExpression/awaitCallExpression5_es6.ts @@ -0,0 +1,13 @@ +// @target: ES6 +// @noEmitHelpers: true +declare var a: boolean; +declare var p: Promise; +declare function fn(arg0: boolean, arg1: boolean, arg2: boolean): void; +declare var o: { fn(arg0: boolean, arg1: boolean, arg2: boolean): void; }; +declare var pfn: Promise<{ (arg0: boolean, arg1: boolean, arg2: boolean): void; }>; +declare var po: Promise<{ fn(arg0: boolean, arg1: boolean, arg2: boolean): void; }>; +async function func(): Promise { + "before"; + var b = o.fn(a, a, a); + "after"; +} \ No newline at end of file diff --git a/tests/cases/conformance/async/es6/awaitCallExpression/awaitCallExpression6_es6.ts b/tests/cases/conformance/async/es6/awaitCallExpression/awaitCallExpression6_es6.ts new file mode 100644 index 0000000000000..09e88f5acbcdd --- /dev/null +++ b/tests/cases/conformance/async/es6/awaitCallExpression/awaitCallExpression6_es6.ts @@ -0,0 +1,13 @@ +// @target: ES6 +// @noEmitHelpers: true +declare var a: boolean; +declare var p: Promise; +declare function fn(arg0: boolean, arg1: boolean, arg2: boolean): void; +declare var o: { fn(arg0: boolean, arg1: boolean, arg2: boolean): void; }; +declare var pfn: Promise<{ (arg0: boolean, arg1: boolean, arg2: boolean): void; }>; +declare var po: Promise<{ fn(arg0: boolean, arg1: boolean, arg2: boolean): void; }>; +async function func(): Promise { + "before"; + var b = o.fn(await p, a, a); + "after"; +} \ No newline at end of file diff --git a/tests/cases/conformance/async/es6/awaitCallExpression/awaitCallExpression7_es6.ts b/tests/cases/conformance/async/es6/awaitCallExpression/awaitCallExpression7_es6.ts new file mode 100644 index 0000000000000..fe0182da4aa1b --- /dev/null +++ b/tests/cases/conformance/async/es6/awaitCallExpression/awaitCallExpression7_es6.ts @@ -0,0 +1,13 @@ +// @target: ES6 +// @noEmitHelpers: true +declare var a: boolean; +declare var p: Promise; +declare function fn(arg0: boolean, arg1: boolean, arg2: boolean): void; +declare var o: { fn(arg0: boolean, arg1: boolean, arg2: boolean): void; }; +declare var pfn: Promise<{ (arg0: boolean, arg1: boolean, arg2: boolean): void; }>; +declare var po: Promise<{ fn(arg0: boolean, arg1: boolean, arg2: boolean): void; }>; +async function func(): Promise { + "before"; + var b = o.fn(a, await p, a); + "after"; +} \ No newline at end of file diff --git a/tests/cases/conformance/async/es6/awaitCallExpression/awaitCallExpression8_es6.ts b/tests/cases/conformance/async/es6/awaitCallExpression/awaitCallExpression8_es6.ts new file mode 100644 index 0000000000000..e3280eb7c10ff --- /dev/null +++ b/tests/cases/conformance/async/es6/awaitCallExpression/awaitCallExpression8_es6.ts @@ -0,0 +1,13 @@ +// @target: ES6 +// @noEmitHelpers: true +declare var a: boolean; +declare var p: Promise; +declare function fn(arg0: boolean, arg1: boolean, arg2: boolean): void; +declare var o: { fn(arg0: boolean, arg1: boolean, arg2: boolean): void; }; +declare var pfn: Promise<{ (arg0: boolean, arg1: boolean, arg2: boolean): void; }>; +declare var po: Promise<{ fn(arg0: boolean, arg1: boolean, arg2: boolean): void; }>; +async function func(): Promise { + "before"; + var b = (await po).fn(a, a, a); + "after"; +} \ No newline at end of file diff --git a/tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration10_es6.ts b/tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration10_es6.ts new file mode 100644 index 0000000000000..aab1f0013ecf9 --- /dev/null +++ b/tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration10_es6.ts @@ -0,0 +1,4 @@ +// @target: ES6 +// @noEmitHelpers: true +async function foo(a = await => await): Promise { +} \ No newline at end of file diff --git a/tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration11_es6.ts b/tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration11_es6.ts new file mode 100644 index 0000000000000..747d20d7ea850 --- /dev/null +++ b/tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration11_es6.ts @@ -0,0 +1,4 @@ +// @target: ES6 +// @noEmitHelpers: true +async function await(): Promise { +} \ No newline at end of file diff --git a/tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration12_es6.ts b/tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration12_es6.ts new file mode 100644 index 0000000000000..bbd7725036512 --- /dev/null +++ b/tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration12_es6.ts @@ -0,0 +1,3 @@ +// @target: ES6 +// @noEmitHelpers: true +var v = async function await(): Promise { } \ No newline at end of file diff --git a/tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration13_es6.ts b/tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration13_es6.ts new file mode 100644 index 0000000000000..8670fa0281165 --- /dev/null +++ b/tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration13_es6.ts @@ -0,0 +1,6 @@ +// @target: ES6 +// @noEmitHelpers: true +async function foo(): Promise { + // Legal to use 'await' in a type context. + var v: await; +} diff --git a/tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration14_es6.ts b/tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration14_es6.ts new file mode 100644 index 0000000000000..ba70c61b49241 --- /dev/null +++ b/tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration14_es6.ts @@ -0,0 +1,5 @@ +// @target: ES6 +// @noEmitHelpers: true +async function foo(): Promise { + return; +} \ No newline at end of file diff --git a/tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration1_es6.ts b/tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration1_es6.ts new file mode 100644 index 0000000000000..289a65bb74fe1 --- /dev/null +++ b/tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration1_es6.ts @@ -0,0 +1,4 @@ +// @target: ES6 +// @noEmitHelpers: true +async function foo(): Promise { +} \ No newline at end of file diff --git a/tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration2_es6.ts b/tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration2_es6.ts new file mode 100644 index 0000000000000..25a153b4a3412 --- /dev/null +++ b/tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration2_es6.ts @@ -0,0 +1,4 @@ +// @target: ES6 +// @noEmitHelpers: true +function f(await) { +} \ No newline at end of file diff --git a/tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration3_es6.ts b/tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration3_es6.ts new file mode 100644 index 0000000000000..4ae27c596f1ab --- /dev/null +++ b/tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration3_es6.ts @@ -0,0 +1,4 @@ +// @target: ES6 +// @noEmitHelpers: true +function f(await = await) { +} \ No newline at end of file diff --git a/tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration4_es6.ts b/tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration4_es6.ts new file mode 100644 index 0000000000000..5d1ec389da366 --- /dev/null +++ b/tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration4_es6.ts @@ -0,0 +1,4 @@ +// @target: ES6 +// @noEmitHelpers: true +function await() { +} \ No newline at end of file diff --git a/tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration5_es6.ts b/tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration5_es6.ts new file mode 100644 index 0000000000000..eb3cd1db55675 --- /dev/null +++ b/tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration5_es6.ts @@ -0,0 +1,4 @@ +// @target: ES6 +// @noEmitHelpers: true +async function foo(await): Promise { +} \ No newline at end of file diff --git a/tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration6_es6.ts b/tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration6_es6.ts new file mode 100644 index 0000000000000..89b0445fd2efd --- /dev/null +++ b/tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration6_es6.ts @@ -0,0 +1,4 @@ +// @target: ES6 +// @noEmitHelpers: true +async function foo(a = await): Promise { +} \ No newline at end of file diff --git a/tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration7_es6.ts b/tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration7_es6.ts new file mode 100644 index 0000000000000..5a964695da5e5 --- /dev/null +++ b/tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration7_es6.ts @@ -0,0 +1,7 @@ +// @target: ES6 +// @noEmitHelpers: true +async function bar(): Promise { + // 'await' here is an identifier, and not a yield expression. + async function foo(a = await): Promise { + } +} \ No newline at end of file diff --git a/tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration8_es6.ts b/tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration8_es6.ts new file mode 100644 index 0000000000000..764b0f3fb8a79 --- /dev/null +++ b/tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration8_es6.ts @@ -0,0 +1,3 @@ +// @target: ES6 +// @noEmitHelpers: true +var v = { [await]: foo } \ No newline at end of file diff --git a/tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration9_es6.ts b/tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration9_es6.ts new file mode 100644 index 0000000000000..7671764ad2add --- /dev/null +++ b/tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration9_es6.ts @@ -0,0 +1,5 @@ +// @target: ES6 +// @noEmitHelpers: true +async function foo(): Promise { + var v = { [await]: foo } +} \ No newline at end of file From 80edb2de4a058ccd8594d8faad5f8e1f4cbe8962 Mon Sep 17 00:00:00 2001 From: Ron Buckton Date: Thu, 7 May 2015 11:13:45 -0700 Subject: [PATCH 03/35] Bug fixes and baselines --- src/compiler/parser.ts | 58 +++++++++---------- src/compiler/types.ts | 4 +- tests/baselines/reference/APISample_linter.js | 20 +++---- .../FunctionDeclaration10_es6.errors.txt | 20 ++----- .../FunctionDeclaration6_es6.errors.txt | 4 +- .../FunctionDeclaration7_es6.errors.txt | 4 +- .../asyncArrowFunction6_es6.errors.txt | 6 +- .../reference/asyncArrowFunction6_es6.js | 2 +- .../asyncArrowFunction7_es6.errors.txt | 6 +- .../reference/asyncArrowFunction7_es6.js | 2 +- .../asyncArrowFunction9_es6.errors.txt | 23 -------- .../reference/asyncArrowFunction9_es6.js | 5 +- .../reference/asyncArrowFunction9_es6.symbols | 8 +++ .../reference/asyncArrowFunction9_es6.types | 10 ++++ .../asyncFunctionDeclaration10_es6.errors.txt | 26 --------- .../asyncFunctionDeclaration10_es6.js | 6 +- .../asyncFunctionDeclaration10_es6.symbols | 8 +++ .../asyncFunctionDeclaration10_es6.types | 9 +++ .../asyncFunctionDeclaration6_es6.errors.txt | 6 +- .../asyncFunctionDeclaration6_es6.js | 2 +- .../asyncFunctionDeclaration7_es6.errors.txt | 6 +- .../asyncFunctionDeclaration7_es6.js | 2 +- 22 files changed, 104 insertions(+), 133 deletions(-) delete mode 100644 tests/baselines/reference/asyncArrowFunction9_es6.errors.txt create mode 100644 tests/baselines/reference/asyncArrowFunction9_es6.symbols create mode 100644 tests/baselines/reference/asyncArrowFunction9_es6.types delete mode 100644 tests/baselines/reference/asyncFunctionDeclaration10_es6.errors.txt create mode 100644 tests/baselines/reference/asyncFunctionDeclaration10_es6.symbols create mode 100644 tests/baselines/reference/asyncFunctionDeclaration10_es6.types diff --git a/src/compiler/parser.ts b/src/compiler/parser.ts index a22ec28ecbcb7..db6a00ec9aa81 100644 --- a/src/compiler/parser.ts +++ b/src/compiler/parser.ts @@ -592,7 +592,7 @@ module ts { // no need to do anything special as we are already in all of the requested contexts return func(); } - + function allowInAnd(func: () => T): T { return doOutsideOfContext(ParserContextFlags.DisallowIn, func); } @@ -621,12 +621,16 @@ module ts { return doOutsideOfContext(ParserContextFlags.Await, func); } + function doInYieldAndAwaitContext(func: () => T): T { + return doInsideOfContext(ParserContextFlags.Yield | ParserContextFlags.Await, func); + } + function doOutsideOfYieldAndAwaitContext(func: () => T): T { return doOutsideOfContext(ParserContextFlags.Yield | ParserContextFlags.Await, func); } function inContext(flags: ParserContextFlags) { - return (contextFlags & flags) === flags; + return (contextFlags & flags) !== 0; } function inYieldContext() { @@ -957,8 +961,8 @@ module ts { // says that only an assignment expression is allowed, so the grammar checker // will error if it sees a comma expression. node.expression = inGeneratorParameterOrAsyncParameterContext() - ? doOutsideOfYieldAndAwaitContext(parseExpression) - : parseExpression(); + ? doOutsideOfYieldAndAwaitContext(allowInAndParseExpression) + : allowInAnd(parseExpression); parseExpected(SyntaxKind.CloseBracketToken); return finishNode(node); @@ -1857,8 +1861,8 @@ module ts { function parseParameter(): ParameterDeclaration { let node = createNode(SyntaxKind.Parameter); node.decorators = parseDecorators(); - setModifiers(node, parseModifiers()); node.dotDotDotToken = parseOptionalToken(SyntaxKind.DotDotDotToken); + setModifiers(node, parseModifiers()); // FormalParameter[Yield,GeneratorParameter,Await,AsyncParameter] : (Modified) See 14.1 // BindingElement[?Yield,?GeneratorParameter,?Await,?AsyncParameter] @@ -1901,7 +1905,6 @@ module ts { // [+GeneratorParameter] BindingIdentifier[Yield] Initializer[In]opt // [+AsyncParameter] BindingIdentifier[Await] Initializer[In]opt // [~GeneratorParameter,~AsyncParameter] BindingIdentifier[?Yield,?Await] Initializer[In,?Yield,?Await]opt - let parseInitializer = inParameter ? parseParameterInitializer : parseNonParameterInitializer; return inGeneratorParameterOrAsyncParameterContext() ? doOutsideOfYieldAndAwaitContext(parseInitializer) @@ -1957,27 +1960,19 @@ module ts { let savedGeneratorParameterContext = inGeneratorParameterContext(); let savedAwaitContext = inAwaitContext(); let savedAsyncParameterContext = inAsyncParameterContext(); - - if (yieldAndGeneratorParameterContext) { - setYieldContext(true); - } + setYieldContext(yieldAndGeneratorParameterContext); setGeneratorParameterContext(yieldAndGeneratorParameterContext); - - if (awaitAndAsyncParameterContext) { - setAwaitContext(true); - } - + setAwaitContext(awaitAndAsyncParameterContext); setAsyncParameterContext(awaitAndAsyncParameterContext); - + let result = parseDelimitedList(ParsingContext.Parameters, parseParameter); - + setYieldContext(savedYieldContext); setGeneratorParameterContext(savedGeneratorParameterContext); - setAwaitContext(savedAwaitContext); setAsyncParameterContext(savedAsyncParameterContext); - + if (!parseExpected(SyntaxKind.CloseParenToken) && requireCompleteParameterList) { // Caller insisted that we had to end with a ) We didn't. So just return // undefined here. @@ -1992,7 +1987,7 @@ module ts { // then just return an empty set of parameters. return requireCompleteParameterList ? undefined : createMissingList(); } - + function parseTypeMemberSemicolon() { // We allow type members to be separated by commas or (possibly ASI) semicolons. // First check if it was a comma. If so, we're done with the member. @@ -2368,7 +2363,7 @@ module ts { function parseType(): TypeNode { // The rules about 'yield' only apply to actual code/expression contexts. They don't // apply to 'type' contexts. So we disable these parameters here before moving on. - return doOutsideOfContext(ParserContextFlags.ContextParameterFlags, parseTypeWorker); + return doOutsideOfContext(ParserContextFlags.AllParameterFlags, parseTypeWorker); } function parseTypeWorker(): TypeNode { @@ -2455,6 +2450,10 @@ module ts { token !== SyntaxKind.AtToken && isStartOfExpression(); } + + function allowInAndParseExpression(): Expression { + return allowInAnd(parseExpression); + } function parseExpression(): Expression { // Expression[in]: @@ -3449,20 +3448,15 @@ module ts { let node = createNode(SyntaxKind.FunctionExpression); setModifiers(node, parseModifiers()); parseExpected(SyntaxKind.FunctionKeyword); - node.asteriskToken = parseOptionalToken(SyntaxKind.AsteriskToken); + node.asteriskToken = parseOptionalToken(SyntaxKind.AsteriskToken); - let savedYieldContext = inYieldContext(); let isGenerator = node.asteriskToken != undefined; - setYieldContext(isGenerator); - - let savedAwaitContext = inAwaitContext(); let isAsync = isAsyncFunctionLike(node); - setAwaitContext(isAsync); - - node.name = parseOptionalIdentifier(); - - setYieldContext(savedYieldContext); - setAwaitContext(savedAwaitContext); + node.name = + isGenerator && isAsync ? doInYieldAndAwaitContext(parseOptionalIdentifier) : + isGenerator ? doInYieldContext(parseOptionalIdentifier) : + isAsync ? doInAwaitContext(parseOptionalIdentifier) : + parseOptionalIdentifier(); fillSignature(SyntaxKind.ColonToken, /*yieldAndGeneratorParameterContext*/ isGenerator, /*awaitAndAsyncParameterContext*/ isAsync, /*requireCompleteParameterList*/ false, node); node.body = parseFunctionBlock(/*allowYield*/ isGenerator, /*allowAwait*/ isAsync, /*ignoreMissingOpenBrace*/ false); diff --git a/src/compiler/types.ts b/src/compiler/types.ts index f256c63056f4b..86b4113eecc9c 100644 --- a/src/compiler/types.ts +++ b/src/compiler/types.ts @@ -359,7 +359,9 @@ module ts { ParserGeneratedFlags = StrictMode | DisallowIn | Yield | GeneratorParameter | Decorator | ThisNodeHasError | AsyncParameter | Await, // Context flags passed as part of the modified ES6 grammar. - ContextParameterFlags = Yield | GeneratorParameter | AsyncParameter | Await, + YieldAndGeneratorParameterFlags = Yield | GeneratorParameter, + AwaitAndAsyncParameterFlags = Await | AsyncParameter, + AllParameterFlags = YieldAndGeneratorParameterFlags | AwaitAndAsyncParameterFlags, // Context flags computed by aggregating child flags upwards. diff --git a/tests/baselines/reference/APISample_linter.js b/tests/baselines/reference/APISample_linter.js index cd2df23ffbf4f..5c2a8953a6123 100644 --- a/tests/baselines/reference/APISample_linter.js +++ b/tests/baselines/reference/APISample_linter.js @@ -75,26 +75,26 @@ function delint(sourceFile) { delintNode(sourceFile); function delintNode(node) { switch (node.kind) { - case 187 /* ForStatement */: - case 188 /* ForInStatement */: - case 186 /* WhileStatement */: - case 185 /* DoStatement */: - if (node.statement.kind !== 180 /* Block */) { + case 190 /* ForStatement */: + case 191 /* ForInStatement */: + case 189 /* WhileStatement */: + case 188 /* DoStatement */: + if (node.statement.kind !== 183 /* Block */) { report(node, "A looping statement's contents should be wrapped in a block body."); } break; - case 184 /* IfStatement */: + case 187 /* IfStatement */: var ifStatement = node; - if (ifStatement.thenStatement.kind !== 180 /* Block */) { + if (ifStatement.thenStatement.kind !== 183 /* Block */) { report(ifStatement.thenStatement, "An if statement's contents should be wrapped in a block body."); } if (ifStatement.elseStatement && - ifStatement.elseStatement.kind !== 180 /* Block */ && - ifStatement.elseStatement.kind !== 184 /* IfStatement */) { + ifStatement.elseStatement.kind !== 183 /* Block */ && + ifStatement.elseStatement.kind !== 187 /* IfStatement */) { report(ifStatement.elseStatement, "An else statement's contents should be wrapped in a block body."); } break; - case 170 /* BinaryExpression */: + case 173 /* BinaryExpression */: var op = node.operatorToken.kind; if (op === 28 /* EqualsEqualsToken */ || op == 29 /* ExclamationEqualsToken */) { report(node, "Use '===' and '!=='."); diff --git a/tests/baselines/reference/FunctionDeclaration10_es6.errors.txt b/tests/baselines/reference/FunctionDeclaration10_es6.errors.txt index 6efd10dce099f..8c6b09c82d6bd 100644 --- a/tests/baselines/reference/FunctionDeclaration10_es6.errors.txt +++ b/tests/baselines/reference/FunctionDeclaration10_es6.errors.txt @@ -1,20 +1,8 @@ -tests/cases/conformance/es6/functionDeclarations/FunctionDeclaration10_es6.ts(1,16): error TS2371: A parameter initializer is only allowed in a function or constructor implementation. -tests/cases/conformance/es6/functionDeclarations/FunctionDeclaration10_es6.ts(1,26): error TS1005: ',' expected. -tests/cases/conformance/es6/functionDeclarations/FunctionDeclaration10_es6.ts(1,29): error TS1138: Parameter declaration expected. -tests/cases/conformance/es6/functionDeclarations/FunctionDeclaration10_es6.ts(1,29): error TS2304: Cannot find name 'yield'. -tests/cases/conformance/es6/functionDeclarations/FunctionDeclaration10_es6.ts(1,34): error TS1005: ';' expected. +tests/cases/conformance/es6/functionDeclarations/FunctionDeclaration10_es6.ts(1,10): error TS9001: Generators are not currently supported. -==== tests/cases/conformance/es6/functionDeclarations/FunctionDeclaration10_es6.ts (5 errors) ==== +==== tests/cases/conformance/es6/functionDeclarations/FunctionDeclaration10_es6.ts (1 errors) ==== function * foo(a = yield => yield) { - ~~~~~~~~~ -!!! error TS2371: A parameter initializer is only allowed in a function or constructor implementation. - ~~ -!!! error TS1005: ',' expected. - ~~~~~ -!!! error TS1138: Parameter declaration expected. - ~~~~~ -!!! error TS2304: Cannot find name 'yield'. - ~ -!!! error TS1005: ';' expected. + ~ +!!! error TS9001: Generators are not currently supported. } \ No newline at end of file diff --git a/tests/baselines/reference/FunctionDeclaration6_es6.errors.txt b/tests/baselines/reference/FunctionDeclaration6_es6.errors.txt index 13f69a47653b1..b5ea3f494a74b 100644 --- a/tests/baselines/reference/FunctionDeclaration6_es6.errors.txt +++ b/tests/baselines/reference/FunctionDeclaration6_es6.errors.txt @@ -1,5 +1,5 @@ tests/cases/conformance/es6/functionDeclarations/FunctionDeclaration6_es6.ts(1,9): error TS9001: Generators are not currently supported. -tests/cases/conformance/es6/functionDeclarations/FunctionDeclaration6_es6.ts(1,18): error TS9000: 'yield' expressions are not currently supported. +tests/cases/conformance/es6/functionDeclarations/FunctionDeclaration6_es6.ts(1,18): error TS2304: Cannot find name 'yield'. ==== tests/cases/conformance/es6/functionDeclarations/FunctionDeclaration6_es6.ts (2 errors) ==== @@ -7,5 +7,5 @@ tests/cases/conformance/es6/functionDeclarations/FunctionDeclaration6_es6.ts(1,1 ~ !!! error TS9001: Generators are not currently supported. ~~~~~ -!!! error TS9000: 'yield' expressions are not currently supported. +!!! error TS2304: Cannot find name 'yield'. } \ No newline at end of file diff --git a/tests/baselines/reference/FunctionDeclaration7_es6.errors.txt b/tests/baselines/reference/FunctionDeclaration7_es6.errors.txt index 8b15522b136c1..f129d3fa30b45 100644 --- a/tests/baselines/reference/FunctionDeclaration7_es6.errors.txt +++ b/tests/baselines/reference/FunctionDeclaration7_es6.errors.txt @@ -1,6 +1,6 @@ tests/cases/conformance/es6/functionDeclarations/FunctionDeclaration7_es6.ts(1,9): error TS9001: Generators are not currently supported. tests/cases/conformance/es6/functionDeclarations/FunctionDeclaration7_es6.ts(3,11): error TS9001: Generators are not currently supported. -tests/cases/conformance/es6/functionDeclarations/FunctionDeclaration7_es6.ts(3,20): error TS9000: 'yield' expressions are not currently supported. +tests/cases/conformance/es6/functionDeclarations/FunctionDeclaration7_es6.ts(3,20): error TS2304: Cannot find name 'yield'. ==== tests/cases/conformance/es6/functionDeclarations/FunctionDeclaration7_es6.ts (3 errors) ==== @@ -12,6 +12,6 @@ tests/cases/conformance/es6/functionDeclarations/FunctionDeclaration7_es6.ts(3,2 ~ !!! error TS9001: Generators are not currently supported. ~~~~~ -!!! error TS9000: 'yield' expressions are not currently supported. +!!! error TS2304: Cannot find name 'yield'. } } \ No newline at end of file diff --git a/tests/baselines/reference/asyncArrowFunction6_es6.errors.txt b/tests/baselines/reference/asyncArrowFunction6_es6.errors.txt index 3afce3a812759..c5a34f513b029 100644 --- a/tests/baselines/reference/asyncArrowFunction6_es6.errors.txt +++ b/tests/baselines/reference/asyncArrowFunction6_es6.errors.txt @@ -1,9 +1,9 @@ -tests/cases/conformance/async/es6/asyncArrowFunction/asyncArrowFunction6_es6.ts(2,27): error TS1109: Expression expected. +tests/cases/conformance/async/es6/asyncArrowFunction/asyncArrowFunction6_es6.ts(2,22): error TS2304: Cannot find name 'await'. ==== tests/cases/conformance/async/es6/asyncArrowFunction/asyncArrowFunction6_es6.ts (1 errors) ==== var foo = async (a = await): Promise => { - ~ -!!! error TS1109: Expression expected. + ~~~~~ +!!! error TS2304: Cannot find name 'await'. } \ No newline at end of file diff --git a/tests/baselines/reference/asyncArrowFunction6_es6.js b/tests/baselines/reference/asyncArrowFunction6_es6.js index 186ecc4cf19ec..e4da75e3cd157 100644 --- a/tests/baselines/reference/asyncArrowFunction6_es6.js +++ b/tests/baselines/reference/asyncArrowFunction6_es6.js @@ -4,5 +4,5 @@ var foo = async (a = await): Promise => { } //// [asyncArrowFunction6_es6.js] -var foo = (...arguments_1) => __awaiter(function *(a = yield ) { +var foo = (...arguments_1) => __awaiter(function *(a = await) { }.apply(this, arguments_1), Promise); diff --git a/tests/baselines/reference/asyncArrowFunction7_es6.errors.txt b/tests/baselines/reference/asyncArrowFunction7_es6.errors.txt index db7e634b47986..823d779c601c5 100644 --- a/tests/baselines/reference/asyncArrowFunction7_es6.errors.txt +++ b/tests/baselines/reference/asyncArrowFunction7_es6.errors.txt @@ -1,4 +1,4 @@ -tests/cases/conformance/async/es6/asyncArrowFunction/asyncArrowFunction7_es6.ts(4,29): error TS1109: Expression expected. +tests/cases/conformance/async/es6/asyncArrowFunction/asyncArrowFunction7_es6.ts(4,24): error TS2304: Cannot find name 'await'. ==== tests/cases/conformance/async/es6/asyncArrowFunction/asyncArrowFunction7_es6.ts (1 errors) ==== @@ -6,7 +6,7 @@ tests/cases/conformance/async/es6/asyncArrowFunction/asyncArrowFunction7_es6.ts( var bar = async (): Promise => { // 'await' here is an identifier, and not an await expression. var foo = async (a = await): Promise => { - ~ -!!! error TS1109: Expression expected. + ~~~~~ +!!! error TS2304: Cannot find name 'await'. } } \ No newline at end of file diff --git a/tests/baselines/reference/asyncArrowFunction7_es6.js b/tests/baselines/reference/asyncArrowFunction7_es6.js index b1859159c92c5..9bf3fdc480f0a 100644 --- a/tests/baselines/reference/asyncArrowFunction7_es6.js +++ b/tests/baselines/reference/asyncArrowFunction7_es6.js @@ -9,6 +9,6 @@ var bar = async (): Promise => { //// [asyncArrowFunction7_es6.js] var bar = () => __awaiter(function *() { // 'await' here is an identifier, and not an await expression. - var foo = (...arguments_1) => __awaiter(function *(a = yield ) { + var foo = (...arguments_1) => __awaiter(function *(a = await) { }.apply(this, arguments_1), Promise); }.apply(this), Promise); diff --git a/tests/baselines/reference/asyncArrowFunction9_es6.errors.txt b/tests/baselines/reference/asyncArrowFunction9_es6.errors.txt deleted file mode 100644 index 623095e8a5e33..0000000000000 --- a/tests/baselines/reference/asyncArrowFunction9_es6.errors.txt +++ /dev/null @@ -1,23 +0,0 @@ -tests/cases/conformance/async/es6/asyncArrowFunction/asyncArrowFunction9_es6.ts(1,11): error TS2304: Cannot find name 'async'. -tests/cases/conformance/async/es6/asyncArrowFunction/asyncArrowFunction9_es6.ts(1,18): error TS2304: Cannot find name 'a'. -tests/cases/conformance/async/es6/asyncArrowFunction/asyncArrowFunction9_es6.ts(1,37): error TS1005: ',' expected. -tests/cases/conformance/async/es6/asyncArrowFunction/asyncArrowFunction9_es6.ts(1,39): error TS2403: Subsequent variable declarations must have the same type. Variable 'Promise' must be of type 'PromiseConstructor', but here has type 'void'. -tests/cases/conformance/async/es6/asyncArrowFunction/asyncArrowFunction9_es6.ts(1,46): error TS1005: '=' expected. -tests/cases/conformance/async/es6/asyncArrowFunction/asyncArrowFunction9_es6.ts(1,53): error TS1109: Expression expected. - - -==== tests/cases/conformance/async/es6/asyncArrowFunction/asyncArrowFunction9_es6.ts (6 errors) ==== - var foo = async (a = await => await): Promise => { - ~~~~~ -!!! error TS2304: Cannot find name 'async'. - ~ -!!! error TS2304: Cannot find name 'a'. - ~ -!!! error TS1005: ',' expected. - ~~~~~~~ -!!! error TS2403: Subsequent variable declarations must have the same type. Variable 'Promise' must be of type 'PromiseConstructor', but here has type 'void'. - ~ -!!! error TS1005: '=' expected. - ~~ -!!! error TS1109: Expression expected. - } \ No newline at end of file diff --git a/tests/baselines/reference/asyncArrowFunction9_es6.js b/tests/baselines/reference/asyncArrowFunction9_es6.js index fb2f9d28a17c4..b78a49afdbb76 100644 --- a/tests/baselines/reference/asyncArrowFunction9_es6.js +++ b/tests/baselines/reference/asyncArrowFunction9_es6.js @@ -3,6 +3,5 @@ var foo = async (a = await => await): Promise => { } //// [asyncArrowFunction9_es6.js] -var foo = async(a = await => await), Promise = ; -{ -} +var foo = (...arguments_1) => __awaiter(function *(a = await => await) { +}.apply(this, arguments_1), Promise); diff --git a/tests/baselines/reference/asyncArrowFunction9_es6.symbols b/tests/baselines/reference/asyncArrowFunction9_es6.symbols new file mode 100644 index 0000000000000..8db4592f0e13a --- /dev/null +++ b/tests/baselines/reference/asyncArrowFunction9_es6.symbols @@ -0,0 +1,8 @@ +=== tests/cases/conformance/async/es6/asyncArrowFunction/asyncArrowFunction9_es6.ts === +var foo = async (a = await => await): Promise => { +>foo : Symbol(foo, Decl(asyncArrowFunction9_es6.ts, 0, 3)) +>a : Symbol(a, Decl(asyncArrowFunction9_es6.ts, 0, 17)) +>await : Symbol(await, Decl(asyncArrowFunction9_es6.ts, 0, 20)) +>await : Symbol(await, Decl(asyncArrowFunction9_es6.ts, 0, 20)) +>Promise : Symbol(Promise, Decl(lib.d.ts, 4769, 1), Decl(lib.d.ts, 4853, 11)) +} diff --git a/tests/baselines/reference/asyncArrowFunction9_es6.types b/tests/baselines/reference/asyncArrowFunction9_es6.types new file mode 100644 index 0000000000000..9f6244c4a0eed --- /dev/null +++ b/tests/baselines/reference/asyncArrowFunction9_es6.types @@ -0,0 +1,10 @@ +=== tests/cases/conformance/async/es6/asyncArrowFunction/asyncArrowFunction9_es6.ts === +var foo = async (a = await => await): Promise => { +>foo : (a?: (await: any) => any) => Promise +>async (a = await => await): Promise => {} : (a?: (await: any) => any) => Promise +>a : (await: any) => any +>await => await : (await: any) => any +>await : any +>await : any +>Promise : Promise +} diff --git a/tests/baselines/reference/asyncFunctionDeclaration10_es6.errors.txt b/tests/baselines/reference/asyncFunctionDeclaration10_es6.errors.txt deleted file mode 100644 index 15ceb3e60c763..0000000000000 --- a/tests/baselines/reference/asyncFunctionDeclaration10_es6.errors.txt +++ /dev/null @@ -1,26 +0,0 @@ -tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration10_es6.ts(1,20): error TS2371: A parameter initializer is only allowed in a function or constructor implementation. -tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration10_es6.ts(1,30): error TS1109: Expression expected. -tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration10_es6.ts(1,33): error TS1138: Parameter declaration expected. -tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration10_es6.ts(1,33): error TS2304: Cannot find name 'await'. -tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration10_es6.ts(1,38): error TS1005: ';' expected. -tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration10_es6.ts(1,39): error TS1128: Declaration or statement expected. -tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration10_es6.ts(1,53): error TS1109: Expression expected. - - -==== tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration10_es6.ts (7 errors) ==== - async function foo(a = await => await): Promise { - ~~~~~~~~~ -!!! error TS2371: A parameter initializer is only allowed in a function or constructor implementation. - ~~ -!!! error TS1109: Expression expected. - ~~~~~ -!!! error TS1138: Parameter declaration expected. - ~~~~~ -!!! error TS2304: Cannot find name 'await'. - ~ -!!! error TS1005: ';' expected. - ~ -!!! error TS1128: Declaration or statement expected. - ~ -!!! error TS1109: Expression expected. - } \ No newline at end of file diff --git a/tests/baselines/reference/asyncFunctionDeclaration10_es6.js b/tests/baselines/reference/asyncFunctionDeclaration10_es6.js index 141c0cbab55cd..e85492bee709b 100644 --- a/tests/baselines/reference/asyncFunctionDeclaration10_es6.js +++ b/tests/baselines/reference/asyncFunctionDeclaration10_es6.js @@ -3,5 +3,7 @@ async function foo(a = await => await): Promise { } //// [asyncFunctionDeclaration10_es6.js] -await; -Promise < void > {}; +function foo() { + return __awaiter(function *(a = await => await) { + }.apply(this, arguments), Promise); +} diff --git a/tests/baselines/reference/asyncFunctionDeclaration10_es6.symbols b/tests/baselines/reference/asyncFunctionDeclaration10_es6.symbols new file mode 100644 index 0000000000000..d4f4dcedcd032 --- /dev/null +++ b/tests/baselines/reference/asyncFunctionDeclaration10_es6.symbols @@ -0,0 +1,8 @@ +=== tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration10_es6.ts === +async function foo(a = await => await): Promise { +>foo : Symbol(foo, Decl(asyncFunctionDeclaration10_es6.ts, 0, 0)) +>a : Symbol(a, Decl(asyncFunctionDeclaration10_es6.ts, 0, 19)) +>await : Symbol(await, Decl(asyncFunctionDeclaration10_es6.ts, 0, 22)) +>await : Symbol(await, Decl(asyncFunctionDeclaration10_es6.ts, 0, 22)) +>Promise : Symbol(Promise, Decl(lib.d.ts, 4769, 1), Decl(lib.d.ts, 4853, 11)) +} diff --git a/tests/baselines/reference/asyncFunctionDeclaration10_es6.types b/tests/baselines/reference/asyncFunctionDeclaration10_es6.types new file mode 100644 index 0000000000000..0018b994e0026 --- /dev/null +++ b/tests/baselines/reference/asyncFunctionDeclaration10_es6.types @@ -0,0 +1,9 @@ +=== tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration10_es6.ts === +async function foo(a = await => await): Promise { +>foo : (a?: (await: any) => any) => Promise +>a : (await: any) => any +>await => await : (await: any) => any +>await : any +>await : any +>Promise : Promise +} diff --git a/tests/baselines/reference/asyncFunctionDeclaration6_es6.errors.txt b/tests/baselines/reference/asyncFunctionDeclaration6_es6.errors.txt index e719ed801e614..e89029e7c5f10 100644 --- a/tests/baselines/reference/asyncFunctionDeclaration6_es6.errors.txt +++ b/tests/baselines/reference/asyncFunctionDeclaration6_es6.errors.txt @@ -1,8 +1,8 @@ -tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration6_es6.ts(1,29): error TS1109: Expression expected. +tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration6_es6.ts(1,24): error TS2304: Cannot find name 'await'. ==== tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration6_es6.ts (1 errors) ==== async function foo(a = await): Promise { - ~ -!!! error TS1109: Expression expected. + ~~~~~ +!!! error TS2304: Cannot find name 'await'. } \ No newline at end of file diff --git a/tests/baselines/reference/asyncFunctionDeclaration6_es6.js b/tests/baselines/reference/asyncFunctionDeclaration6_es6.js index 2a3ffaa94dd70..663e02604ead1 100644 --- a/tests/baselines/reference/asyncFunctionDeclaration6_es6.js +++ b/tests/baselines/reference/asyncFunctionDeclaration6_es6.js @@ -4,6 +4,6 @@ async function foo(a = await): Promise { //// [asyncFunctionDeclaration6_es6.js] function foo() { - return __awaiter(function *(a = yield ) { + return __awaiter(function *(a = await) { }.apply(this, arguments), Promise); } diff --git a/tests/baselines/reference/asyncFunctionDeclaration7_es6.errors.txt b/tests/baselines/reference/asyncFunctionDeclaration7_es6.errors.txt index 01643ffcdbb2f..b29fed652d866 100644 --- a/tests/baselines/reference/asyncFunctionDeclaration7_es6.errors.txt +++ b/tests/baselines/reference/asyncFunctionDeclaration7_es6.errors.txt @@ -1,11 +1,11 @@ -tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration7_es6.ts(3,31): error TS1109: Expression expected. +tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration7_es6.ts(3,26): error TS2304: Cannot find name 'await'. ==== tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration7_es6.ts (1 errors) ==== async function bar(): Promise { // 'await' here is an identifier, and not a yield expression. async function foo(a = await): Promise { - ~ -!!! error TS1109: Expression expected. + ~~~~~ +!!! error TS2304: Cannot find name 'await'. } } \ No newline at end of file diff --git a/tests/baselines/reference/asyncFunctionDeclaration7_es6.js b/tests/baselines/reference/asyncFunctionDeclaration7_es6.js index c22870b08fef0..fb913e3f6f435 100644 --- a/tests/baselines/reference/asyncFunctionDeclaration7_es6.js +++ b/tests/baselines/reference/asyncFunctionDeclaration7_es6.js @@ -10,7 +10,7 @@ function bar() { return __awaiter(function *() { // 'await' here is an identifier, and not a yield expression. function foo() { - return __awaiter(function *(a = yield ) { + return __awaiter(function *(a = await) { }.apply(this, arguments), Promise); } }.apply(this, arguments), Promise); From bca21ecf48bc3642c8174c0b258fc76fd427ef24 Mon Sep 17 00:00:00 2001 From: Ron Buckton Date: Thu, 7 May 2015 18:30:38 -0700 Subject: [PATCH 04/35] Updated baselines --- .../reference/arrayLiterals2ES6.symbols | 6 +- .../reference/asyncArrowFunction1_es6.symbols | 2 +- .../reference/asyncArrowFunction9_es6.symbols | 2 +- .../asyncFunctionDeclaration10_es6.symbols | 2 +- .../asyncFunctionDeclaration11_es6.symbols | 2 +- .../asyncFunctionDeclaration14_es6.symbols | 2 +- .../asyncFunctionDeclaration1_es6.symbols | 2 +- .../awaitBinaryExpression1_es6.symbols | 4 +- .../awaitBinaryExpression2_es6.symbols | 4 +- .../awaitBinaryExpression3_es6.symbols | 4 +- .../awaitBinaryExpression4_es6.symbols | 4 +- .../awaitBinaryExpression5_es6.symbols | 4 +- .../awaitCallExpression1_es6.symbols | 8 +- .../awaitCallExpression2_es6.symbols | 8 +- .../awaitCallExpression3_es6.symbols | 8 +- .../awaitCallExpression4_es6.symbols | 8 +- .../awaitCallExpression5_es6.symbols | 8 +- .../awaitCallExpression6_es6.symbols | 8 +- .../awaitCallExpression7_es6.symbols | 8 +- .../awaitCallExpression8_es6.symbols | 8 +- .../reference/callWithSpreadES6.symbols | 2 +- ...tructuringParameterDeclaration3ES5.symbols | 16 +- ...tructuringParameterDeclaration3ES6.symbols | 16 +- ...owFunctionWhenUsingArguments14_ES6.symbols | 2 +- ...owFunctionWhenUsingArguments15_ES6.symbols | 2 +- ...owFunctionWhenUsingArguments16_ES6.symbols | 2 +- ...owFunctionWhenUsingArguments17_ES6.symbols | 2 +- ...owFunctionWhenUsingArguments18_ES6.symbols | 2 +- tests/baselines/reference/for-of13.symbols | 4 +- tests/baselines/reference/for-of18.symbols | 6 +- tests/baselines/reference/for-of19.symbols | 6 +- tests/baselines/reference/for-of20.symbols | 6 +- tests/baselines/reference/for-of21.symbols | 6 +- tests/baselines/reference/for-of22.symbols | 6 +- tests/baselines/reference/for-of23.symbols | 6 +- tests/baselines/reference/for-of25.symbols | 6 +- tests/baselines/reference/for-of26.symbols | 6 +- tests/baselines/reference/for-of27.symbols | 6 +- tests/baselines/reference/for-of28.symbols | 6 +- tests/baselines/reference/for-of37.symbols | 2 +- tests/baselines/reference/for-of38.symbols | 2 +- tests/baselines/reference/for-of40.symbols | 2 +- tests/baselines/reference/for-of44.symbols | 2 +- tests/baselines/reference/for-of45.symbols | 2 +- tests/baselines/reference/for-of50.symbols | 2 +- tests/baselines/reference/for-of57.symbols | 2 +- .../reference/iterableArrayPattern1.symbols | 8 +- .../reference/iterableArrayPattern11.symbols | 6 +- .../reference/iterableArrayPattern12.symbols | 6 +- .../reference/iterableArrayPattern13.symbols | 6 +- .../reference/iterableArrayPattern2.symbols | 8 +- .../reference/iterableArrayPattern3.symbols | 6 +- .../reference/iterableArrayPattern30.symbols | 2 +- .../reference/iterableArrayPattern4.symbols | 6 +- .../reference/iterableArrayPattern9.symbols | 6 +- .../iterableContextualTyping1.symbols | 2 +- .../reference/iteratorSpreadInArray.symbols | 8 +- .../reference/iteratorSpreadInArray11.symbols | 2 +- .../reference/iteratorSpreadInArray2.symbols | 14 +- .../reference/iteratorSpreadInArray3.symbols | 8 +- .../reference/iteratorSpreadInArray4.symbols | 8 +- .../reference/iteratorSpreadInArray7.symbols | 8 +- .../reference/iteratorSpreadInCall11.symbols | 8 +- .../reference/iteratorSpreadInCall12.symbols | 14 +- .../reference/iteratorSpreadInCall3.symbols | 8 +- .../reference/iteratorSpreadInCall5.symbols | 14 +- .../reference/parserSymbolProperty1.symbols | 6 +- .../reference/parserSymbolProperty2.symbols | 6 +- .../reference/parserSymbolProperty3.symbols | 6 +- .../reference/parserSymbolProperty4.symbols | 6 +- .../reference/parserSymbolProperty5.symbols | 6 +- .../reference/parserSymbolProperty6.symbols | 6 +- .../reference/parserSymbolProperty7.symbols | 6 +- .../reference/parserSymbolProperty8.symbols | 6 +- .../reference/parserSymbolProperty9.symbols | 6 +- .../promiseVoidErrorCallback.symbols | 16 +- .../reference/symbolDeclarationEmit1.symbols | 6 +- .../reference/symbolDeclarationEmit10.symbols | 12 +- .../reference/symbolDeclarationEmit11.symbols | 24 +- .../reference/symbolDeclarationEmit13.symbols | 12 +- .../reference/symbolDeclarationEmit14.symbols | 12 +- .../reference/symbolDeclarationEmit2.symbols | 6 +- .../reference/symbolDeclarationEmit3.symbols | 18 +- .../reference/symbolDeclarationEmit4.symbols | 12 +- .../reference/symbolDeclarationEmit5.symbols | 6 +- .../reference/symbolDeclarationEmit6.symbols | 6 +- .../reference/symbolDeclarationEmit7.symbols | 6 +- .../reference/symbolDeclarationEmit8.symbols | 6 +- .../reference/symbolDeclarationEmit9.symbols | 6 +- .../reference/symbolProperty11.symbols | 6 +- .../reference/symbolProperty13.symbols | 12 +- .../reference/symbolProperty14.symbols | 12 +- .../reference/symbolProperty15.symbols | 6 +- .../reference/symbolProperty16.symbols | 12 +- .../reference/symbolProperty18.symbols | 36 +- .../reference/symbolProperty19.symbols | 24 +- .../reference/symbolProperty2.symbols | 2 +- .../reference/symbolProperty20.symbols | 24 +- .../reference/symbolProperty21.symbols | 30 +- .../reference/symbolProperty22.symbols | 12 +- .../reference/symbolProperty23.symbols | 12 +- .../reference/symbolProperty26.symbols | 12 +- .../reference/symbolProperty27.symbols | 12 +- .../reference/symbolProperty28.symbols | 12 +- .../reference/symbolProperty4.symbols | 6 +- .../reference/symbolProperty40.symbols | 30 +- .../reference/symbolProperty41.symbols | 30 +- .../reference/symbolProperty45.symbols | 12 +- .../reference/symbolProperty5.symbols | 18 +- .../reference/symbolProperty50.symbols | 6 +- .../reference/symbolProperty51.symbols | 6 +- .../reference/symbolProperty55.symbols | 12 +- .../reference/symbolProperty56.symbols | 6 +- .../reference/symbolProperty57.symbols | 8 +- .../reference/symbolProperty6.symbols | 24 +- .../reference/symbolProperty8.symbols | 12 +- .../baselines/reference/symbolType11.symbols | 6 +- .../baselines/reference/symbolType16.symbols | 2 +- ...teStringWithEmbeddedNewOperatorES6.symbols | 2 +- tests/baselines/reference/typedArrays.symbols | 330 +++++++++--------- 120 files changed, 654 insertions(+), 654 deletions(-) diff --git a/tests/baselines/reference/arrayLiterals2ES6.symbols b/tests/baselines/reference/arrayLiterals2ES6.symbols index 30f541751a151..f4b223379daf0 100644 --- a/tests/baselines/reference/arrayLiterals2ES6.symbols +++ b/tests/baselines/reference/arrayLiterals2ES6.symbols @@ -72,14 +72,14 @@ var temp2: [number[], string[]] = [[1, 2, 3], ["hello", "string"]]; interface myArray extends Array { } >myArray : Symbol(myArray, Decl(arrayLiterals2ES6.ts, 40, 67)) ->Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11), Decl(lib.d.ts, 1450, 1)) +>Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11), Decl(lib.d.ts, 1451, 1)) >Number : Symbol(Number, Decl(lib.d.ts, 456, 40), Decl(lib.d.ts, 518, 11)) interface myArray2 extends Array { } >myArray2 : Symbol(myArray2, Decl(arrayLiterals2ES6.ts, 42, 43)) ->Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11), Decl(lib.d.ts, 1450, 1)) +>Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11), Decl(lib.d.ts, 1451, 1)) >Number : Symbol(Number, Decl(lib.d.ts, 456, 40), Decl(lib.d.ts, 518, 11)) ->String : Symbol(String, Decl(lib.d.ts, 275, 1), Decl(lib.d.ts, 443, 11), Decl(lib.d.ts, 1549, 1)) +>String : Symbol(String, Decl(lib.d.ts, 275, 1), Decl(lib.d.ts, 443, 11), Decl(lib.d.ts, 1550, 1)) var d0 = [1, true, ...temp, ]; // has type (string|number|boolean)[] >d0 : Symbol(d0, Decl(arrayLiterals2ES6.ts, 44, 3)) diff --git a/tests/baselines/reference/asyncArrowFunction1_es6.symbols b/tests/baselines/reference/asyncArrowFunction1_es6.symbols index dc2ed671c464b..405121287a6ba 100644 --- a/tests/baselines/reference/asyncArrowFunction1_es6.symbols +++ b/tests/baselines/reference/asyncArrowFunction1_es6.symbols @@ -2,6 +2,6 @@ var foo = async (): Promise => { >foo : Symbol(foo, Decl(asyncArrowFunction1_es6.ts, 1, 3)) ->Promise : Symbol(Promise, Decl(lib.d.ts, 4769, 1), Decl(lib.d.ts, 4853, 11)) +>Promise : Symbol(Promise, Decl(lib.d.ts, 4770, 1), Decl(lib.d.ts, 4855, 11)) }; diff --git a/tests/baselines/reference/asyncArrowFunction9_es6.symbols b/tests/baselines/reference/asyncArrowFunction9_es6.symbols index 8db4592f0e13a..7c50a463248e5 100644 --- a/tests/baselines/reference/asyncArrowFunction9_es6.symbols +++ b/tests/baselines/reference/asyncArrowFunction9_es6.symbols @@ -4,5 +4,5 @@ var foo = async (a = await => await): Promise => { >a : Symbol(a, Decl(asyncArrowFunction9_es6.ts, 0, 17)) >await : Symbol(await, Decl(asyncArrowFunction9_es6.ts, 0, 20)) >await : Symbol(await, Decl(asyncArrowFunction9_es6.ts, 0, 20)) ->Promise : Symbol(Promise, Decl(lib.d.ts, 4769, 1), Decl(lib.d.ts, 4853, 11)) +>Promise : Symbol(Promise, Decl(lib.d.ts, 4770, 1), Decl(lib.d.ts, 4855, 11)) } diff --git a/tests/baselines/reference/asyncFunctionDeclaration10_es6.symbols b/tests/baselines/reference/asyncFunctionDeclaration10_es6.symbols index d4f4dcedcd032..76ed959e0af1f 100644 --- a/tests/baselines/reference/asyncFunctionDeclaration10_es6.symbols +++ b/tests/baselines/reference/asyncFunctionDeclaration10_es6.symbols @@ -4,5 +4,5 @@ async function foo(a = await => await): Promise { >a : Symbol(a, Decl(asyncFunctionDeclaration10_es6.ts, 0, 19)) >await : Symbol(await, Decl(asyncFunctionDeclaration10_es6.ts, 0, 22)) >await : Symbol(await, Decl(asyncFunctionDeclaration10_es6.ts, 0, 22)) ->Promise : Symbol(Promise, Decl(lib.d.ts, 4769, 1), Decl(lib.d.ts, 4853, 11)) +>Promise : Symbol(Promise, Decl(lib.d.ts, 4770, 1), Decl(lib.d.ts, 4855, 11)) } diff --git a/tests/baselines/reference/asyncFunctionDeclaration11_es6.symbols b/tests/baselines/reference/asyncFunctionDeclaration11_es6.symbols index b432029637399..ec47746020290 100644 --- a/tests/baselines/reference/asyncFunctionDeclaration11_es6.symbols +++ b/tests/baselines/reference/asyncFunctionDeclaration11_es6.symbols @@ -1,5 +1,5 @@ === tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration11_es6.ts === async function await(): Promise { >await : Symbol(await, Decl(asyncFunctionDeclaration11_es6.ts, 0, 0)) ->Promise : Symbol(Promise, Decl(lib.d.ts, 4769, 1), Decl(lib.d.ts, 4853, 11)) +>Promise : Symbol(Promise, Decl(lib.d.ts, 4770, 1), Decl(lib.d.ts, 4855, 11)) } diff --git a/tests/baselines/reference/asyncFunctionDeclaration14_es6.symbols b/tests/baselines/reference/asyncFunctionDeclaration14_es6.symbols index 5354c67a195f0..0cbcb69685c93 100644 --- a/tests/baselines/reference/asyncFunctionDeclaration14_es6.symbols +++ b/tests/baselines/reference/asyncFunctionDeclaration14_es6.symbols @@ -1,7 +1,7 @@ === tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration14_es6.ts === async function foo(): Promise { >foo : Symbol(foo, Decl(asyncFunctionDeclaration14_es6.ts, 0, 0)) ->Promise : Symbol(Promise, Decl(lib.d.ts, 4769, 1), Decl(lib.d.ts, 4853, 11)) +>Promise : Symbol(Promise, Decl(lib.d.ts, 4770, 1), Decl(lib.d.ts, 4855, 11)) return; } diff --git a/tests/baselines/reference/asyncFunctionDeclaration1_es6.symbols b/tests/baselines/reference/asyncFunctionDeclaration1_es6.symbols index 241290a489999..9631076c0842f 100644 --- a/tests/baselines/reference/asyncFunctionDeclaration1_es6.symbols +++ b/tests/baselines/reference/asyncFunctionDeclaration1_es6.symbols @@ -1,5 +1,5 @@ === tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration1_es6.ts === async function foo(): Promise { >foo : Symbol(foo, Decl(asyncFunctionDeclaration1_es6.ts, 0, 0)) ->Promise : Symbol(Promise, Decl(lib.d.ts, 4769, 1), Decl(lib.d.ts, 4853, 11)) +>Promise : Symbol(Promise, Decl(lib.d.ts, 4770, 1), Decl(lib.d.ts, 4855, 11)) } diff --git a/tests/baselines/reference/awaitBinaryExpression1_es6.symbols b/tests/baselines/reference/awaitBinaryExpression1_es6.symbols index 373086ecbac5f..6df30c99fa59e 100644 --- a/tests/baselines/reference/awaitBinaryExpression1_es6.symbols +++ b/tests/baselines/reference/awaitBinaryExpression1_es6.symbols @@ -4,11 +4,11 @@ declare var a: boolean; declare var p: Promise; >p : Symbol(p, Decl(awaitBinaryExpression1_es6.ts, 1, 11)) ->Promise : Symbol(Promise, Decl(lib.d.ts, 4769, 1), Decl(lib.d.ts, 4853, 11)) +>Promise : Symbol(Promise, Decl(lib.d.ts, 4770, 1), Decl(lib.d.ts, 4855, 11)) async function func(): Promise { >func : Symbol(func, Decl(awaitBinaryExpression1_es6.ts, 1, 32)) ->Promise : Symbol(Promise, Decl(lib.d.ts, 4769, 1), Decl(lib.d.ts, 4853, 11)) +>Promise : Symbol(Promise, Decl(lib.d.ts, 4770, 1), Decl(lib.d.ts, 4855, 11)) "before"; var b = await p || a; diff --git a/tests/baselines/reference/awaitBinaryExpression2_es6.symbols b/tests/baselines/reference/awaitBinaryExpression2_es6.symbols index 9331ad13ce58f..af1c2e3395ad8 100644 --- a/tests/baselines/reference/awaitBinaryExpression2_es6.symbols +++ b/tests/baselines/reference/awaitBinaryExpression2_es6.symbols @@ -4,11 +4,11 @@ declare var a: boolean; declare var p: Promise; >p : Symbol(p, Decl(awaitBinaryExpression2_es6.ts, 1, 11)) ->Promise : Symbol(Promise, Decl(lib.d.ts, 4769, 1), Decl(lib.d.ts, 4853, 11)) +>Promise : Symbol(Promise, Decl(lib.d.ts, 4770, 1), Decl(lib.d.ts, 4855, 11)) async function func(): Promise { >func : Symbol(func, Decl(awaitBinaryExpression2_es6.ts, 1, 32)) ->Promise : Symbol(Promise, Decl(lib.d.ts, 4769, 1), Decl(lib.d.ts, 4853, 11)) +>Promise : Symbol(Promise, Decl(lib.d.ts, 4770, 1), Decl(lib.d.ts, 4855, 11)) "before"; var b = await p && a; diff --git a/tests/baselines/reference/awaitBinaryExpression3_es6.symbols b/tests/baselines/reference/awaitBinaryExpression3_es6.symbols index b1acda7013630..6983f2c73ab57 100644 --- a/tests/baselines/reference/awaitBinaryExpression3_es6.symbols +++ b/tests/baselines/reference/awaitBinaryExpression3_es6.symbols @@ -4,11 +4,11 @@ declare var a: number; declare var p: Promise; >p : Symbol(p, Decl(awaitBinaryExpression3_es6.ts, 1, 11)) ->Promise : Symbol(Promise, Decl(lib.d.ts, 4769, 1), Decl(lib.d.ts, 4853, 11)) +>Promise : Symbol(Promise, Decl(lib.d.ts, 4770, 1), Decl(lib.d.ts, 4855, 11)) async function func(): Promise { >func : Symbol(func, Decl(awaitBinaryExpression3_es6.ts, 1, 31)) ->Promise : Symbol(Promise, Decl(lib.d.ts, 4769, 1), Decl(lib.d.ts, 4853, 11)) +>Promise : Symbol(Promise, Decl(lib.d.ts, 4770, 1), Decl(lib.d.ts, 4855, 11)) "before"; var b = await p + a; diff --git a/tests/baselines/reference/awaitBinaryExpression4_es6.symbols b/tests/baselines/reference/awaitBinaryExpression4_es6.symbols index c1a3bd903f4de..42f6730ad66aa 100644 --- a/tests/baselines/reference/awaitBinaryExpression4_es6.symbols +++ b/tests/baselines/reference/awaitBinaryExpression4_es6.symbols @@ -4,11 +4,11 @@ declare var a: boolean; declare var p: Promise; >p : Symbol(p, Decl(awaitBinaryExpression4_es6.ts, 1, 11)) ->Promise : Symbol(Promise, Decl(lib.d.ts, 4769, 1), Decl(lib.d.ts, 4853, 11)) +>Promise : Symbol(Promise, Decl(lib.d.ts, 4770, 1), Decl(lib.d.ts, 4855, 11)) async function func(): Promise { >func : Symbol(func, Decl(awaitBinaryExpression4_es6.ts, 1, 32)) ->Promise : Symbol(Promise, Decl(lib.d.ts, 4769, 1), Decl(lib.d.ts, 4853, 11)) +>Promise : Symbol(Promise, Decl(lib.d.ts, 4770, 1), Decl(lib.d.ts, 4855, 11)) "before"; var b = await p, a; diff --git a/tests/baselines/reference/awaitBinaryExpression5_es6.symbols b/tests/baselines/reference/awaitBinaryExpression5_es6.symbols index cb74dcff7f62e..4f5d853c68f96 100644 --- a/tests/baselines/reference/awaitBinaryExpression5_es6.symbols +++ b/tests/baselines/reference/awaitBinaryExpression5_es6.symbols @@ -4,11 +4,11 @@ declare var a: boolean; declare var p: Promise; >p : Symbol(p, Decl(awaitBinaryExpression5_es6.ts, 1, 11)) ->Promise : Symbol(Promise, Decl(lib.d.ts, 4769, 1), Decl(lib.d.ts, 4853, 11)) +>Promise : Symbol(Promise, Decl(lib.d.ts, 4770, 1), Decl(lib.d.ts, 4855, 11)) async function func(): Promise { >func : Symbol(func, Decl(awaitBinaryExpression5_es6.ts, 1, 32)) ->Promise : Symbol(Promise, Decl(lib.d.ts, 4769, 1), Decl(lib.d.ts, 4853, 11)) +>Promise : Symbol(Promise, Decl(lib.d.ts, 4770, 1), Decl(lib.d.ts, 4855, 11)) "before"; var o: { a: boolean; }; diff --git a/tests/baselines/reference/awaitCallExpression1_es6.symbols b/tests/baselines/reference/awaitCallExpression1_es6.symbols index f9756da1768e3..4065e1e0e0200 100644 --- a/tests/baselines/reference/awaitCallExpression1_es6.symbols +++ b/tests/baselines/reference/awaitCallExpression1_es6.symbols @@ -4,7 +4,7 @@ declare var a: boolean; declare var p: Promise; >p : Symbol(p, Decl(awaitCallExpression1_es6.ts, 1, 11)) ->Promise : Symbol(Promise, Decl(lib.d.ts, 4769, 1), Decl(lib.d.ts, 4853, 11)) +>Promise : Symbol(Promise, Decl(lib.d.ts, 4770, 1), Decl(lib.d.ts, 4855, 11)) declare function fn(arg0: boolean, arg1: boolean, arg2: boolean): void; >fn : Symbol(fn, Decl(awaitCallExpression1_es6.ts, 1, 32)) @@ -21,14 +21,14 @@ declare var o: { fn(arg0: boolean, arg1: boolean, arg2: boolean): void; }; declare var pfn: Promise<{ (arg0: boolean, arg1: boolean, arg2: boolean): void; }>; >pfn : Symbol(pfn, Decl(awaitCallExpression1_es6.ts, 4, 11)) ->Promise : Symbol(Promise, Decl(lib.d.ts, 4769, 1), Decl(lib.d.ts, 4853, 11)) +>Promise : Symbol(Promise, Decl(lib.d.ts, 4770, 1), Decl(lib.d.ts, 4855, 11)) >arg0 : Symbol(arg0, Decl(awaitCallExpression1_es6.ts, 4, 28)) >arg1 : Symbol(arg1, Decl(awaitCallExpression1_es6.ts, 4, 42)) >arg2 : Symbol(arg2, Decl(awaitCallExpression1_es6.ts, 4, 57)) declare var po: Promise<{ fn(arg0: boolean, arg1: boolean, arg2: boolean): void; }>; >po : Symbol(po, Decl(awaitCallExpression1_es6.ts, 5, 11)) ->Promise : Symbol(Promise, Decl(lib.d.ts, 4769, 1), Decl(lib.d.ts, 4853, 11)) +>Promise : Symbol(Promise, Decl(lib.d.ts, 4770, 1), Decl(lib.d.ts, 4855, 11)) >fn : Symbol(fn, Decl(awaitCallExpression1_es6.ts, 5, 25)) >arg0 : Symbol(arg0, Decl(awaitCallExpression1_es6.ts, 5, 29)) >arg1 : Symbol(arg1, Decl(awaitCallExpression1_es6.ts, 5, 43)) @@ -36,7 +36,7 @@ declare var po: Promise<{ fn(arg0: boolean, arg1: boolean, arg2: boolean): void; async function func(): Promise { >func : Symbol(func, Decl(awaitCallExpression1_es6.ts, 5, 84)) ->Promise : Symbol(Promise, Decl(lib.d.ts, 4769, 1), Decl(lib.d.ts, 4853, 11)) +>Promise : Symbol(Promise, Decl(lib.d.ts, 4770, 1), Decl(lib.d.ts, 4855, 11)) "before"; var b = fn(a, a, a); diff --git a/tests/baselines/reference/awaitCallExpression2_es6.symbols b/tests/baselines/reference/awaitCallExpression2_es6.symbols index 2e5b8761163be..a4b36cbc13c16 100644 --- a/tests/baselines/reference/awaitCallExpression2_es6.symbols +++ b/tests/baselines/reference/awaitCallExpression2_es6.symbols @@ -4,7 +4,7 @@ declare var a: boolean; declare var p: Promise; >p : Symbol(p, Decl(awaitCallExpression2_es6.ts, 1, 11)) ->Promise : Symbol(Promise, Decl(lib.d.ts, 4769, 1), Decl(lib.d.ts, 4853, 11)) +>Promise : Symbol(Promise, Decl(lib.d.ts, 4770, 1), Decl(lib.d.ts, 4855, 11)) declare function fn(arg0: boolean, arg1: boolean, arg2: boolean): void; >fn : Symbol(fn, Decl(awaitCallExpression2_es6.ts, 1, 32)) @@ -21,14 +21,14 @@ declare var o: { fn(arg0: boolean, arg1: boolean, arg2: boolean): void; }; declare var pfn: Promise<{ (arg0: boolean, arg1: boolean, arg2: boolean): void; }>; >pfn : Symbol(pfn, Decl(awaitCallExpression2_es6.ts, 4, 11)) ->Promise : Symbol(Promise, Decl(lib.d.ts, 4769, 1), Decl(lib.d.ts, 4853, 11)) +>Promise : Symbol(Promise, Decl(lib.d.ts, 4770, 1), Decl(lib.d.ts, 4855, 11)) >arg0 : Symbol(arg0, Decl(awaitCallExpression2_es6.ts, 4, 28)) >arg1 : Symbol(arg1, Decl(awaitCallExpression2_es6.ts, 4, 42)) >arg2 : Symbol(arg2, Decl(awaitCallExpression2_es6.ts, 4, 57)) declare var po: Promise<{ fn(arg0: boolean, arg1: boolean, arg2: boolean): void; }>; >po : Symbol(po, Decl(awaitCallExpression2_es6.ts, 5, 11)) ->Promise : Symbol(Promise, Decl(lib.d.ts, 4769, 1), Decl(lib.d.ts, 4853, 11)) +>Promise : Symbol(Promise, Decl(lib.d.ts, 4770, 1), Decl(lib.d.ts, 4855, 11)) >fn : Symbol(fn, Decl(awaitCallExpression2_es6.ts, 5, 25)) >arg0 : Symbol(arg0, Decl(awaitCallExpression2_es6.ts, 5, 29)) >arg1 : Symbol(arg1, Decl(awaitCallExpression2_es6.ts, 5, 43)) @@ -36,7 +36,7 @@ declare var po: Promise<{ fn(arg0: boolean, arg1: boolean, arg2: boolean): void; async function func(): Promise { >func : Symbol(func, Decl(awaitCallExpression2_es6.ts, 5, 84)) ->Promise : Symbol(Promise, Decl(lib.d.ts, 4769, 1), Decl(lib.d.ts, 4853, 11)) +>Promise : Symbol(Promise, Decl(lib.d.ts, 4770, 1), Decl(lib.d.ts, 4855, 11)) "before"; var b = fn(await p, a, a); diff --git a/tests/baselines/reference/awaitCallExpression3_es6.symbols b/tests/baselines/reference/awaitCallExpression3_es6.symbols index 331fbeb8e6eed..184c80fde62c3 100644 --- a/tests/baselines/reference/awaitCallExpression3_es6.symbols +++ b/tests/baselines/reference/awaitCallExpression3_es6.symbols @@ -4,7 +4,7 @@ declare var a: boolean; declare var p: Promise; >p : Symbol(p, Decl(awaitCallExpression3_es6.ts, 1, 11)) ->Promise : Symbol(Promise, Decl(lib.d.ts, 4769, 1), Decl(lib.d.ts, 4853, 11)) +>Promise : Symbol(Promise, Decl(lib.d.ts, 4770, 1), Decl(lib.d.ts, 4855, 11)) declare function fn(arg0: boolean, arg1: boolean, arg2: boolean): void; >fn : Symbol(fn, Decl(awaitCallExpression3_es6.ts, 1, 32)) @@ -21,14 +21,14 @@ declare var o: { fn(arg0: boolean, arg1: boolean, arg2: boolean): void; }; declare var pfn: Promise<{ (arg0: boolean, arg1: boolean, arg2: boolean): void; }>; >pfn : Symbol(pfn, Decl(awaitCallExpression3_es6.ts, 4, 11)) ->Promise : Symbol(Promise, Decl(lib.d.ts, 4769, 1), Decl(lib.d.ts, 4853, 11)) +>Promise : Symbol(Promise, Decl(lib.d.ts, 4770, 1), Decl(lib.d.ts, 4855, 11)) >arg0 : Symbol(arg0, Decl(awaitCallExpression3_es6.ts, 4, 28)) >arg1 : Symbol(arg1, Decl(awaitCallExpression3_es6.ts, 4, 42)) >arg2 : Symbol(arg2, Decl(awaitCallExpression3_es6.ts, 4, 57)) declare var po: Promise<{ fn(arg0: boolean, arg1: boolean, arg2: boolean): void; }>; >po : Symbol(po, Decl(awaitCallExpression3_es6.ts, 5, 11)) ->Promise : Symbol(Promise, Decl(lib.d.ts, 4769, 1), Decl(lib.d.ts, 4853, 11)) +>Promise : Symbol(Promise, Decl(lib.d.ts, 4770, 1), Decl(lib.d.ts, 4855, 11)) >fn : Symbol(fn, Decl(awaitCallExpression3_es6.ts, 5, 25)) >arg0 : Symbol(arg0, Decl(awaitCallExpression3_es6.ts, 5, 29)) >arg1 : Symbol(arg1, Decl(awaitCallExpression3_es6.ts, 5, 43)) @@ -36,7 +36,7 @@ declare var po: Promise<{ fn(arg0: boolean, arg1: boolean, arg2: boolean): void; async function func(): Promise { >func : Symbol(func, Decl(awaitCallExpression3_es6.ts, 5, 84)) ->Promise : Symbol(Promise, Decl(lib.d.ts, 4769, 1), Decl(lib.d.ts, 4853, 11)) +>Promise : Symbol(Promise, Decl(lib.d.ts, 4770, 1), Decl(lib.d.ts, 4855, 11)) "before"; var b = fn(a, await p, a); diff --git a/tests/baselines/reference/awaitCallExpression4_es6.symbols b/tests/baselines/reference/awaitCallExpression4_es6.symbols index cc3407610b78f..f8a7bbe037b85 100644 --- a/tests/baselines/reference/awaitCallExpression4_es6.symbols +++ b/tests/baselines/reference/awaitCallExpression4_es6.symbols @@ -4,7 +4,7 @@ declare var a: boolean; declare var p: Promise; >p : Symbol(p, Decl(awaitCallExpression4_es6.ts, 1, 11)) ->Promise : Symbol(Promise, Decl(lib.d.ts, 4769, 1), Decl(lib.d.ts, 4853, 11)) +>Promise : Symbol(Promise, Decl(lib.d.ts, 4770, 1), Decl(lib.d.ts, 4855, 11)) declare function fn(arg0: boolean, arg1: boolean, arg2: boolean): void; >fn : Symbol(fn, Decl(awaitCallExpression4_es6.ts, 1, 32)) @@ -21,14 +21,14 @@ declare var o: { fn(arg0: boolean, arg1: boolean, arg2: boolean): void; }; declare var pfn: Promise<{ (arg0: boolean, arg1: boolean, arg2: boolean): void; }>; >pfn : Symbol(pfn, Decl(awaitCallExpression4_es6.ts, 4, 11)) ->Promise : Symbol(Promise, Decl(lib.d.ts, 4769, 1), Decl(lib.d.ts, 4853, 11)) +>Promise : Symbol(Promise, Decl(lib.d.ts, 4770, 1), Decl(lib.d.ts, 4855, 11)) >arg0 : Symbol(arg0, Decl(awaitCallExpression4_es6.ts, 4, 28)) >arg1 : Symbol(arg1, Decl(awaitCallExpression4_es6.ts, 4, 42)) >arg2 : Symbol(arg2, Decl(awaitCallExpression4_es6.ts, 4, 57)) declare var po: Promise<{ fn(arg0: boolean, arg1: boolean, arg2: boolean): void; }>; >po : Symbol(po, Decl(awaitCallExpression4_es6.ts, 5, 11)) ->Promise : Symbol(Promise, Decl(lib.d.ts, 4769, 1), Decl(lib.d.ts, 4853, 11)) +>Promise : Symbol(Promise, Decl(lib.d.ts, 4770, 1), Decl(lib.d.ts, 4855, 11)) >fn : Symbol(fn, Decl(awaitCallExpression4_es6.ts, 5, 25)) >arg0 : Symbol(arg0, Decl(awaitCallExpression4_es6.ts, 5, 29)) >arg1 : Symbol(arg1, Decl(awaitCallExpression4_es6.ts, 5, 43)) @@ -36,7 +36,7 @@ declare var po: Promise<{ fn(arg0: boolean, arg1: boolean, arg2: boolean): void; async function func(): Promise { >func : Symbol(func, Decl(awaitCallExpression4_es6.ts, 5, 84)) ->Promise : Symbol(Promise, Decl(lib.d.ts, 4769, 1), Decl(lib.d.ts, 4853, 11)) +>Promise : Symbol(Promise, Decl(lib.d.ts, 4770, 1), Decl(lib.d.ts, 4855, 11)) "before"; var b = (await pfn)(a, a, a); diff --git a/tests/baselines/reference/awaitCallExpression5_es6.symbols b/tests/baselines/reference/awaitCallExpression5_es6.symbols index 0063434d0fb0e..58a0553533efe 100644 --- a/tests/baselines/reference/awaitCallExpression5_es6.symbols +++ b/tests/baselines/reference/awaitCallExpression5_es6.symbols @@ -4,7 +4,7 @@ declare var a: boolean; declare var p: Promise; >p : Symbol(p, Decl(awaitCallExpression5_es6.ts, 1, 11)) ->Promise : Symbol(Promise, Decl(lib.d.ts, 4769, 1), Decl(lib.d.ts, 4853, 11)) +>Promise : Symbol(Promise, Decl(lib.d.ts, 4770, 1), Decl(lib.d.ts, 4855, 11)) declare function fn(arg0: boolean, arg1: boolean, arg2: boolean): void; >fn : Symbol(fn, Decl(awaitCallExpression5_es6.ts, 1, 32)) @@ -21,14 +21,14 @@ declare var o: { fn(arg0: boolean, arg1: boolean, arg2: boolean): void; }; declare var pfn: Promise<{ (arg0: boolean, arg1: boolean, arg2: boolean): void; }>; >pfn : Symbol(pfn, Decl(awaitCallExpression5_es6.ts, 4, 11)) ->Promise : Symbol(Promise, Decl(lib.d.ts, 4769, 1), Decl(lib.d.ts, 4853, 11)) +>Promise : Symbol(Promise, Decl(lib.d.ts, 4770, 1), Decl(lib.d.ts, 4855, 11)) >arg0 : Symbol(arg0, Decl(awaitCallExpression5_es6.ts, 4, 28)) >arg1 : Symbol(arg1, Decl(awaitCallExpression5_es6.ts, 4, 42)) >arg2 : Symbol(arg2, Decl(awaitCallExpression5_es6.ts, 4, 57)) declare var po: Promise<{ fn(arg0: boolean, arg1: boolean, arg2: boolean): void; }>; >po : Symbol(po, Decl(awaitCallExpression5_es6.ts, 5, 11)) ->Promise : Symbol(Promise, Decl(lib.d.ts, 4769, 1), Decl(lib.d.ts, 4853, 11)) +>Promise : Symbol(Promise, Decl(lib.d.ts, 4770, 1), Decl(lib.d.ts, 4855, 11)) >fn : Symbol(fn, Decl(awaitCallExpression5_es6.ts, 5, 25)) >arg0 : Symbol(arg0, Decl(awaitCallExpression5_es6.ts, 5, 29)) >arg1 : Symbol(arg1, Decl(awaitCallExpression5_es6.ts, 5, 43)) @@ -36,7 +36,7 @@ declare var po: Promise<{ fn(arg0: boolean, arg1: boolean, arg2: boolean): void; async function func(): Promise { >func : Symbol(func, Decl(awaitCallExpression5_es6.ts, 5, 84)) ->Promise : Symbol(Promise, Decl(lib.d.ts, 4769, 1), Decl(lib.d.ts, 4853, 11)) +>Promise : Symbol(Promise, Decl(lib.d.ts, 4770, 1), Decl(lib.d.ts, 4855, 11)) "before"; var b = o.fn(a, a, a); diff --git a/tests/baselines/reference/awaitCallExpression6_es6.symbols b/tests/baselines/reference/awaitCallExpression6_es6.symbols index 9f99f55f26c6b..48262825ed9cc 100644 --- a/tests/baselines/reference/awaitCallExpression6_es6.symbols +++ b/tests/baselines/reference/awaitCallExpression6_es6.symbols @@ -4,7 +4,7 @@ declare var a: boolean; declare var p: Promise; >p : Symbol(p, Decl(awaitCallExpression6_es6.ts, 1, 11)) ->Promise : Symbol(Promise, Decl(lib.d.ts, 4769, 1), Decl(lib.d.ts, 4853, 11)) +>Promise : Symbol(Promise, Decl(lib.d.ts, 4770, 1), Decl(lib.d.ts, 4855, 11)) declare function fn(arg0: boolean, arg1: boolean, arg2: boolean): void; >fn : Symbol(fn, Decl(awaitCallExpression6_es6.ts, 1, 32)) @@ -21,14 +21,14 @@ declare var o: { fn(arg0: boolean, arg1: boolean, arg2: boolean): void; }; declare var pfn: Promise<{ (arg0: boolean, arg1: boolean, arg2: boolean): void; }>; >pfn : Symbol(pfn, Decl(awaitCallExpression6_es6.ts, 4, 11)) ->Promise : Symbol(Promise, Decl(lib.d.ts, 4769, 1), Decl(lib.d.ts, 4853, 11)) +>Promise : Symbol(Promise, Decl(lib.d.ts, 4770, 1), Decl(lib.d.ts, 4855, 11)) >arg0 : Symbol(arg0, Decl(awaitCallExpression6_es6.ts, 4, 28)) >arg1 : Symbol(arg1, Decl(awaitCallExpression6_es6.ts, 4, 42)) >arg2 : Symbol(arg2, Decl(awaitCallExpression6_es6.ts, 4, 57)) declare var po: Promise<{ fn(arg0: boolean, arg1: boolean, arg2: boolean): void; }>; >po : Symbol(po, Decl(awaitCallExpression6_es6.ts, 5, 11)) ->Promise : Symbol(Promise, Decl(lib.d.ts, 4769, 1), Decl(lib.d.ts, 4853, 11)) +>Promise : Symbol(Promise, Decl(lib.d.ts, 4770, 1), Decl(lib.d.ts, 4855, 11)) >fn : Symbol(fn, Decl(awaitCallExpression6_es6.ts, 5, 25)) >arg0 : Symbol(arg0, Decl(awaitCallExpression6_es6.ts, 5, 29)) >arg1 : Symbol(arg1, Decl(awaitCallExpression6_es6.ts, 5, 43)) @@ -36,7 +36,7 @@ declare var po: Promise<{ fn(arg0: boolean, arg1: boolean, arg2: boolean): void; async function func(): Promise { >func : Symbol(func, Decl(awaitCallExpression6_es6.ts, 5, 84)) ->Promise : Symbol(Promise, Decl(lib.d.ts, 4769, 1), Decl(lib.d.ts, 4853, 11)) +>Promise : Symbol(Promise, Decl(lib.d.ts, 4770, 1), Decl(lib.d.ts, 4855, 11)) "before"; var b = o.fn(await p, a, a); diff --git a/tests/baselines/reference/awaitCallExpression7_es6.symbols b/tests/baselines/reference/awaitCallExpression7_es6.symbols index d9dd6535bc292..85f172d03e425 100644 --- a/tests/baselines/reference/awaitCallExpression7_es6.symbols +++ b/tests/baselines/reference/awaitCallExpression7_es6.symbols @@ -4,7 +4,7 @@ declare var a: boolean; declare var p: Promise; >p : Symbol(p, Decl(awaitCallExpression7_es6.ts, 1, 11)) ->Promise : Symbol(Promise, Decl(lib.d.ts, 4769, 1), Decl(lib.d.ts, 4853, 11)) +>Promise : Symbol(Promise, Decl(lib.d.ts, 4770, 1), Decl(lib.d.ts, 4855, 11)) declare function fn(arg0: boolean, arg1: boolean, arg2: boolean): void; >fn : Symbol(fn, Decl(awaitCallExpression7_es6.ts, 1, 32)) @@ -21,14 +21,14 @@ declare var o: { fn(arg0: boolean, arg1: boolean, arg2: boolean): void; }; declare var pfn: Promise<{ (arg0: boolean, arg1: boolean, arg2: boolean): void; }>; >pfn : Symbol(pfn, Decl(awaitCallExpression7_es6.ts, 4, 11)) ->Promise : Symbol(Promise, Decl(lib.d.ts, 4769, 1), Decl(lib.d.ts, 4853, 11)) +>Promise : Symbol(Promise, Decl(lib.d.ts, 4770, 1), Decl(lib.d.ts, 4855, 11)) >arg0 : Symbol(arg0, Decl(awaitCallExpression7_es6.ts, 4, 28)) >arg1 : Symbol(arg1, Decl(awaitCallExpression7_es6.ts, 4, 42)) >arg2 : Symbol(arg2, Decl(awaitCallExpression7_es6.ts, 4, 57)) declare var po: Promise<{ fn(arg0: boolean, arg1: boolean, arg2: boolean): void; }>; >po : Symbol(po, Decl(awaitCallExpression7_es6.ts, 5, 11)) ->Promise : Symbol(Promise, Decl(lib.d.ts, 4769, 1), Decl(lib.d.ts, 4853, 11)) +>Promise : Symbol(Promise, Decl(lib.d.ts, 4770, 1), Decl(lib.d.ts, 4855, 11)) >fn : Symbol(fn, Decl(awaitCallExpression7_es6.ts, 5, 25)) >arg0 : Symbol(arg0, Decl(awaitCallExpression7_es6.ts, 5, 29)) >arg1 : Symbol(arg1, Decl(awaitCallExpression7_es6.ts, 5, 43)) @@ -36,7 +36,7 @@ declare var po: Promise<{ fn(arg0: boolean, arg1: boolean, arg2: boolean): void; async function func(): Promise { >func : Symbol(func, Decl(awaitCallExpression7_es6.ts, 5, 84)) ->Promise : Symbol(Promise, Decl(lib.d.ts, 4769, 1), Decl(lib.d.ts, 4853, 11)) +>Promise : Symbol(Promise, Decl(lib.d.ts, 4770, 1), Decl(lib.d.ts, 4855, 11)) "before"; var b = o.fn(a, await p, a); diff --git a/tests/baselines/reference/awaitCallExpression8_es6.symbols b/tests/baselines/reference/awaitCallExpression8_es6.symbols index 1a2097d041d84..a1b9798b4c2db 100644 --- a/tests/baselines/reference/awaitCallExpression8_es6.symbols +++ b/tests/baselines/reference/awaitCallExpression8_es6.symbols @@ -4,7 +4,7 @@ declare var a: boolean; declare var p: Promise; >p : Symbol(p, Decl(awaitCallExpression8_es6.ts, 1, 11)) ->Promise : Symbol(Promise, Decl(lib.d.ts, 4769, 1), Decl(lib.d.ts, 4853, 11)) +>Promise : Symbol(Promise, Decl(lib.d.ts, 4770, 1), Decl(lib.d.ts, 4855, 11)) declare function fn(arg0: boolean, arg1: boolean, arg2: boolean): void; >fn : Symbol(fn, Decl(awaitCallExpression8_es6.ts, 1, 32)) @@ -21,14 +21,14 @@ declare var o: { fn(arg0: boolean, arg1: boolean, arg2: boolean): void; }; declare var pfn: Promise<{ (arg0: boolean, arg1: boolean, arg2: boolean): void; }>; >pfn : Symbol(pfn, Decl(awaitCallExpression8_es6.ts, 4, 11)) ->Promise : Symbol(Promise, Decl(lib.d.ts, 4769, 1), Decl(lib.d.ts, 4853, 11)) +>Promise : Symbol(Promise, Decl(lib.d.ts, 4770, 1), Decl(lib.d.ts, 4855, 11)) >arg0 : Symbol(arg0, Decl(awaitCallExpression8_es6.ts, 4, 28)) >arg1 : Symbol(arg1, Decl(awaitCallExpression8_es6.ts, 4, 42)) >arg2 : Symbol(arg2, Decl(awaitCallExpression8_es6.ts, 4, 57)) declare var po: Promise<{ fn(arg0: boolean, arg1: boolean, arg2: boolean): void; }>; >po : Symbol(po, Decl(awaitCallExpression8_es6.ts, 5, 11)) ->Promise : Symbol(Promise, Decl(lib.d.ts, 4769, 1), Decl(lib.d.ts, 4853, 11)) +>Promise : Symbol(Promise, Decl(lib.d.ts, 4770, 1), Decl(lib.d.ts, 4855, 11)) >fn : Symbol(fn, Decl(awaitCallExpression8_es6.ts, 5, 25)) >arg0 : Symbol(arg0, Decl(awaitCallExpression8_es6.ts, 5, 29)) >arg1 : Symbol(arg1, Decl(awaitCallExpression8_es6.ts, 5, 43)) @@ -36,7 +36,7 @@ declare var po: Promise<{ fn(arg0: boolean, arg1: boolean, arg2: boolean): void; async function func(): Promise { >func : Symbol(func, Decl(awaitCallExpression8_es6.ts, 5, 84)) ->Promise : Symbol(Promise, Decl(lib.d.ts, 4769, 1), Decl(lib.d.ts, 4853, 11)) +>Promise : Symbol(Promise, Decl(lib.d.ts, 4770, 1), Decl(lib.d.ts, 4855, 11)) "before"; var b = (await po).fn(a, a, a); diff --git a/tests/baselines/reference/callWithSpreadES6.symbols b/tests/baselines/reference/callWithSpreadES6.symbols index c29c41bff20f9..c642152ebc39b 100644 --- a/tests/baselines/reference/callWithSpreadES6.symbols +++ b/tests/baselines/reference/callWithSpreadES6.symbols @@ -94,7 +94,7 @@ xa[1].foo(1, 2, ...a, "abc"); >a : Symbol(a, Decl(callWithSpreadES6.ts, 8, 3)) (xa[1].foo)(...[1, 2, "abc"]); ->Function : Symbol(Function, Decl(lib.d.ts, 223, 38), Decl(lib.d.ts, 269, 11), Decl(lib.d.ts, 1366, 1)) +>Function : Symbol(Function, Decl(lib.d.ts, 223, 38), Decl(lib.d.ts, 269, 11), Decl(lib.d.ts, 1367, 1)) >xa[1].foo : Symbol(X.foo, Decl(callWithSpreadES6.ts, 1, 13)) >xa : Symbol(xa, Decl(callWithSpreadES6.ts, 11, 3)) >foo : Symbol(X.foo, Decl(callWithSpreadES6.ts, 1, 13)) diff --git a/tests/baselines/reference/destructuringParameterDeclaration3ES5.symbols b/tests/baselines/reference/destructuringParameterDeclaration3ES5.symbols index 6a4eb82af97e9..acb0e91ab3efa 100644 --- a/tests/baselines/reference/destructuringParameterDeclaration3ES5.symbols +++ b/tests/baselines/reference/destructuringParameterDeclaration3ES5.symbols @@ -8,18 +8,18 @@ type arrayString = Array >arrayString : Symbol(arrayString, Decl(destructuringParameterDeclaration3ES5.ts, 0, 0)) ->Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11), Decl(lib.d.ts, 1450, 1)) ->String : Symbol(String, Decl(lib.d.ts, 275, 1), Decl(lib.d.ts, 443, 11), Decl(lib.d.ts, 1549, 1)) +>Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11), Decl(lib.d.ts, 1451, 1)) +>String : Symbol(String, Decl(lib.d.ts, 275, 1), Decl(lib.d.ts, 443, 11), Decl(lib.d.ts, 1550, 1)) type someArray = Array | number[]; >someArray : Symbol(someArray, Decl(destructuringParameterDeclaration3ES5.ts, 7, 32)) ->Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11), Decl(lib.d.ts, 1450, 1)) ->String : Symbol(String, Decl(lib.d.ts, 275, 1), Decl(lib.d.ts, 443, 11), Decl(lib.d.ts, 1549, 1)) +>Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11), Decl(lib.d.ts, 1451, 1)) +>String : Symbol(String, Decl(lib.d.ts, 275, 1), Decl(lib.d.ts, 443, 11), Decl(lib.d.ts, 1550, 1)) type stringOrNumArray = Array; >stringOrNumArray : Symbol(stringOrNumArray, Decl(destructuringParameterDeclaration3ES5.ts, 8, 42)) ->Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11), Decl(lib.d.ts, 1450, 1)) ->String : Symbol(String, Decl(lib.d.ts, 275, 1), Decl(lib.d.ts, 443, 11), Decl(lib.d.ts, 1549, 1)) +>Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11), Decl(lib.d.ts, 1451, 1)) +>String : Symbol(String, Decl(lib.d.ts, 275, 1), Decl(lib.d.ts, 443, 11), Decl(lib.d.ts, 1550, 1)) >Number : Symbol(Number, Decl(lib.d.ts, 456, 40), Decl(lib.d.ts, 518, 11)) function a1(...x: (number|string)[]) { } @@ -33,8 +33,8 @@ function a2(...a) { } function a3(...a: Array) { } >a3 : Symbol(a3, Decl(destructuringParameterDeclaration3ES5.ts, 12, 21)) >a : Symbol(a, Decl(destructuringParameterDeclaration3ES5.ts, 13, 12)) ->Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11), Decl(lib.d.ts, 1450, 1)) ->String : Symbol(String, Decl(lib.d.ts, 275, 1), Decl(lib.d.ts, 443, 11), Decl(lib.d.ts, 1549, 1)) +>Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11), Decl(lib.d.ts, 1451, 1)) +>String : Symbol(String, Decl(lib.d.ts, 275, 1), Decl(lib.d.ts, 443, 11), Decl(lib.d.ts, 1550, 1)) function a4(...a: arrayString) { } >a4 : Symbol(a4, Decl(destructuringParameterDeclaration3ES5.ts, 13, 36)) diff --git a/tests/baselines/reference/destructuringParameterDeclaration3ES6.symbols b/tests/baselines/reference/destructuringParameterDeclaration3ES6.symbols index 22340c6aa60d3..08a61e4fb0c38 100644 --- a/tests/baselines/reference/destructuringParameterDeclaration3ES6.symbols +++ b/tests/baselines/reference/destructuringParameterDeclaration3ES6.symbols @@ -8,18 +8,18 @@ type arrayString = Array >arrayString : Symbol(arrayString, Decl(destructuringParameterDeclaration3ES6.ts, 0, 0)) ->Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11), Decl(lib.d.ts, 1450, 1)) ->String : Symbol(String, Decl(lib.d.ts, 275, 1), Decl(lib.d.ts, 443, 11), Decl(lib.d.ts, 1549, 1)) +>Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11), Decl(lib.d.ts, 1451, 1)) +>String : Symbol(String, Decl(lib.d.ts, 275, 1), Decl(lib.d.ts, 443, 11), Decl(lib.d.ts, 1550, 1)) type someArray = Array | number[]; >someArray : Symbol(someArray, Decl(destructuringParameterDeclaration3ES6.ts, 7, 32)) ->Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11), Decl(lib.d.ts, 1450, 1)) ->String : Symbol(String, Decl(lib.d.ts, 275, 1), Decl(lib.d.ts, 443, 11), Decl(lib.d.ts, 1549, 1)) +>Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11), Decl(lib.d.ts, 1451, 1)) +>String : Symbol(String, Decl(lib.d.ts, 275, 1), Decl(lib.d.ts, 443, 11), Decl(lib.d.ts, 1550, 1)) type stringOrNumArray = Array; >stringOrNumArray : Symbol(stringOrNumArray, Decl(destructuringParameterDeclaration3ES6.ts, 8, 42)) ->Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11), Decl(lib.d.ts, 1450, 1)) ->String : Symbol(String, Decl(lib.d.ts, 275, 1), Decl(lib.d.ts, 443, 11), Decl(lib.d.ts, 1549, 1)) +>Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11), Decl(lib.d.ts, 1451, 1)) +>String : Symbol(String, Decl(lib.d.ts, 275, 1), Decl(lib.d.ts, 443, 11), Decl(lib.d.ts, 1550, 1)) >Number : Symbol(Number, Decl(lib.d.ts, 456, 40), Decl(lib.d.ts, 518, 11)) function a1(...x: (number|string)[]) { } @@ -33,8 +33,8 @@ function a2(...a) { } function a3(...a: Array) { } >a3 : Symbol(a3, Decl(destructuringParameterDeclaration3ES6.ts, 12, 21)) >a : Symbol(a, Decl(destructuringParameterDeclaration3ES6.ts, 13, 12)) ->Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11), Decl(lib.d.ts, 1450, 1)) ->String : Symbol(String, Decl(lib.d.ts, 275, 1), Decl(lib.d.ts, 443, 11), Decl(lib.d.ts, 1549, 1)) +>Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11), Decl(lib.d.ts, 1451, 1)) +>String : Symbol(String, Decl(lib.d.ts, 275, 1), Decl(lib.d.ts, 443, 11), Decl(lib.d.ts, 1550, 1)) function a4(...a: arrayString) { } >a4 : Symbol(a4, Decl(destructuringParameterDeclaration3ES6.ts, 13, 36)) diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments14_ES6.symbols b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments14_ES6.symbols index 611db6485b906..7e69e1c51ae31 100644 --- a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments14_ES6.symbols +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments14_ES6.symbols @@ -5,7 +5,7 @@ function f() { if (Math.random()) { >Math.random : Symbol(Math.random, Decl(lib.d.ts, 608, 38)) ->Math : Symbol(Math, Decl(lib.d.ts, 522, 1), Decl(lib.d.ts, 633, 11), Decl(lib.d.ts, 1705, 1)) +>Math : Symbol(Math, Decl(lib.d.ts, 522, 1), Decl(lib.d.ts, 633, 11), Decl(lib.d.ts, 1706, 1)) >random : Symbol(Math.random, Decl(lib.d.ts, 608, 38)) let arguments = 100; diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments15_ES6.symbols b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments15_ES6.symbols index 7a3c26204242a..083b2713d1888 100644 --- a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments15_ES6.symbols +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments15_ES6.symbols @@ -8,7 +8,7 @@ function f() { if (Math.random()) { >Math.random : Symbol(Math.random, Decl(lib.d.ts, 608, 38)) ->Math : Symbol(Math, Decl(lib.d.ts, 522, 1), Decl(lib.d.ts, 633, 11), Decl(lib.d.ts, 1705, 1)) +>Math : Symbol(Math, Decl(lib.d.ts, 522, 1), Decl(lib.d.ts, 633, 11), Decl(lib.d.ts, 1706, 1)) >random : Symbol(Math.random, Decl(lib.d.ts, 608, 38)) const arguments = 100; diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments16_ES6.symbols b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments16_ES6.symbols index c9658b4d90d83..403bf7d4946e8 100644 --- a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments16_ES6.symbols +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments16_ES6.symbols @@ -8,7 +8,7 @@ function f() { if (Math.random()) { >Math.random : Symbol(Math.random, Decl(lib.d.ts, 608, 38)) ->Math : Symbol(Math, Decl(lib.d.ts, 522, 1), Decl(lib.d.ts, 633, 11), Decl(lib.d.ts, 1705, 1)) +>Math : Symbol(Math, Decl(lib.d.ts, 522, 1), Decl(lib.d.ts, 633, 11), Decl(lib.d.ts, 1706, 1)) >random : Symbol(Math.random, Decl(lib.d.ts, 608, 38)) return () => arguments[0]; diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments17_ES6.symbols b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments17_ES6.symbols index df5ab202dfcbc..ed79ccc0e5dee 100644 --- a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments17_ES6.symbols +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments17_ES6.symbols @@ -9,7 +9,7 @@ function f() { if (Math.random()) { >Math.random : Symbol(Math.random, Decl(lib.d.ts, 608, 38)) ->Math : Symbol(Math, Decl(lib.d.ts, 522, 1), Decl(lib.d.ts, 633, 11), Decl(lib.d.ts, 1705, 1)) +>Math : Symbol(Math, Decl(lib.d.ts, 522, 1), Decl(lib.d.ts, 633, 11), Decl(lib.d.ts, 1706, 1)) >random : Symbol(Math.random, Decl(lib.d.ts, 608, 38)) return () => arguments[0]; diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments18_ES6.symbols b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments18_ES6.symbols index c4fc2e434e857..15baf6aca1cf0 100644 --- a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments18_ES6.symbols +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments18_ES6.symbols @@ -9,7 +9,7 @@ function f() { if (Math.random()) { >Math.random : Symbol(Math.random, Decl(lib.d.ts, 608, 38)) ->Math : Symbol(Math, Decl(lib.d.ts, 522, 1), Decl(lib.d.ts, 633, 11), Decl(lib.d.ts, 1705, 1)) +>Math : Symbol(Math, Decl(lib.d.ts, 522, 1), Decl(lib.d.ts, 633, 11), Decl(lib.d.ts, 1706, 1)) >random : Symbol(Math.random, Decl(lib.d.ts, 608, 38)) return () => arguments; diff --git a/tests/baselines/reference/for-of13.symbols b/tests/baselines/reference/for-of13.symbols index bcd19f1a4d414..bc4595f73cf00 100644 --- a/tests/baselines/reference/for-of13.symbols +++ b/tests/baselines/reference/for-of13.symbols @@ -4,6 +4,6 @@ var v: string; for (v of [""].values()) { } >v : Symbol(v, Decl(for-of13.ts, 0, 3)) ->[""].values : Symbol(Array.values, Decl(lib.d.ts, 1464, 37)) ->values : Symbol(Array.values, Decl(lib.d.ts, 1464, 37)) +>[""].values : Symbol(Array.values, Decl(lib.d.ts, 1465, 37)) +>values : Symbol(Array.values, Decl(lib.d.ts, 1465, 37)) diff --git a/tests/baselines/reference/for-of18.symbols b/tests/baselines/reference/for-of18.symbols index a61af49253804..f5688d73566c7 100644 --- a/tests/baselines/reference/for-of18.symbols +++ b/tests/baselines/reference/for-of18.symbols @@ -22,9 +22,9 @@ class StringIterator { }; } [Symbol.iterator]() { ->Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1247, 31)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1197, 53), Decl(lib.d.ts, 1303, 11)) ->iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1247, 31)) +>Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1248, 31)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1198, 53), Decl(lib.d.ts, 1304, 11)) +>iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1248, 31)) return this; >this : Symbol(StringIterator, Decl(for-of18.ts, 1, 33)) diff --git a/tests/baselines/reference/for-of19.symbols b/tests/baselines/reference/for-of19.symbols index c2d2d07841559..182d45a3369bb 100644 --- a/tests/baselines/reference/for-of19.symbols +++ b/tests/baselines/reference/for-of19.symbols @@ -27,9 +27,9 @@ class FooIterator { }; } [Symbol.iterator]() { ->Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1247, 31)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1197, 53), Decl(lib.d.ts, 1303, 11)) ->iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1247, 31)) +>Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1248, 31)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1198, 53), Decl(lib.d.ts, 1304, 11)) +>iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1248, 31)) return this; >this : Symbol(FooIterator, Decl(for-of19.ts, 4, 13)) diff --git a/tests/baselines/reference/for-of20.symbols b/tests/baselines/reference/for-of20.symbols index 251a5b28fcae2..4697f3283a629 100644 --- a/tests/baselines/reference/for-of20.symbols +++ b/tests/baselines/reference/for-of20.symbols @@ -27,9 +27,9 @@ class FooIterator { }; } [Symbol.iterator]() { ->Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1247, 31)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1197, 53), Decl(lib.d.ts, 1303, 11)) ->iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1247, 31)) +>Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1248, 31)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1198, 53), Decl(lib.d.ts, 1304, 11)) +>iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1248, 31)) return this; >this : Symbol(FooIterator, Decl(for-of20.ts, 4, 13)) diff --git a/tests/baselines/reference/for-of21.symbols b/tests/baselines/reference/for-of21.symbols index 0b6b6f23cc0d8..fcaf9b069dc04 100644 --- a/tests/baselines/reference/for-of21.symbols +++ b/tests/baselines/reference/for-of21.symbols @@ -27,9 +27,9 @@ class FooIterator { }; } [Symbol.iterator]() { ->Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1247, 31)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1197, 53), Decl(lib.d.ts, 1303, 11)) ->iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1247, 31)) +>Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1248, 31)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1198, 53), Decl(lib.d.ts, 1304, 11)) +>iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1248, 31)) return this; >this : Symbol(FooIterator, Decl(for-of21.ts, 4, 13)) diff --git a/tests/baselines/reference/for-of22.symbols b/tests/baselines/reference/for-of22.symbols index cc4fcf55a7c84..f72094cdf4f5f 100644 --- a/tests/baselines/reference/for-of22.symbols +++ b/tests/baselines/reference/for-of22.symbols @@ -28,9 +28,9 @@ class FooIterator { }; } [Symbol.iterator]() { ->Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1247, 31)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1197, 53), Decl(lib.d.ts, 1303, 11)) ->iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1247, 31)) +>Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1248, 31)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1198, 53), Decl(lib.d.ts, 1304, 11)) +>iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1248, 31)) return this; >this : Symbol(FooIterator, Decl(for-of22.ts, 5, 13)) diff --git a/tests/baselines/reference/for-of23.symbols b/tests/baselines/reference/for-of23.symbols index 8c7455a2dbc33..205a57d2c0781 100644 --- a/tests/baselines/reference/for-of23.symbols +++ b/tests/baselines/reference/for-of23.symbols @@ -27,9 +27,9 @@ class FooIterator { }; } [Symbol.iterator]() { ->Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1247, 31)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1197, 53), Decl(lib.d.ts, 1303, 11)) ->iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1247, 31)) +>Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1248, 31)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1198, 53), Decl(lib.d.ts, 1304, 11)) +>iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1248, 31)) return this; >this : Symbol(FooIterator, Decl(for-of23.ts, 4, 13)) diff --git a/tests/baselines/reference/for-of25.symbols b/tests/baselines/reference/for-of25.symbols index dae7d4bae7f32..6ff68dea5d45c 100644 --- a/tests/baselines/reference/for-of25.symbols +++ b/tests/baselines/reference/for-of25.symbols @@ -10,9 +10,9 @@ class StringIterator { >StringIterator : Symbol(StringIterator, Decl(for-of25.ts, 1, 37)) [Symbol.iterator]() { ->Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1247, 31)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1197, 53), Decl(lib.d.ts, 1303, 11)) ->iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1247, 31)) +>Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1248, 31)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1198, 53), Decl(lib.d.ts, 1304, 11)) +>iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1248, 31)) return x; >x : Symbol(x, Decl(for-of25.ts, 0, 3)) diff --git a/tests/baselines/reference/for-of26.symbols b/tests/baselines/reference/for-of26.symbols index 34766b1bc8c11..19e917e7190be 100644 --- a/tests/baselines/reference/for-of26.symbols +++ b/tests/baselines/reference/for-of26.symbols @@ -16,9 +16,9 @@ class StringIterator { >x : Symbol(x, Decl(for-of26.ts, 0, 3)) } [Symbol.iterator]() { ->Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1247, 31)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1197, 53), Decl(lib.d.ts, 1303, 11)) ->iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1247, 31)) +>Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1248, 31)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1198, 53), Decl(lib.d.ts, 1304, 11)) +>iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1248, 31)) return this; >this : Symbol(StringIterator, Decl(for-of26.ts, 1, 37)) diff --git a/tests/baselines/reference/for-of27.symbols b/tests/baselines/reference/for-of27.symbols index aa44808cd736c..edf8ab0a84c81 100644 --- a/tests/baselines/reference/for-of27.symbols +++ b/tests/baselines/reference/for-of27.symbols @@ -7,7 +7,7 @@ class StringIterator { >StringIterator : Symbol(StringIterator, Decl(for-of27.ts, 0, 37)) [Symbol.iterator]: any; ->Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1247, 31)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1197, 53), Decl(lib.d.ts, 1303, 11)) ->iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1247, 31)) +>Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1248, 31)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1198, 53), Decl(lib.d.ts, 1304, 11)) +>iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1248, 31)) } diff --git a/tests/baselines/reference/for-of28.symbols b/tests/baselines/reference/for-of28.symbols index caf0356df220f..d569ffae2f6dc 100644 --- a/tests/baselines/reference/for-of28.symbols +++ b/tests/baselines/reference/for-of28.symbols @@ -10,9 +10,9 @@ class StringIterator { >next : Symbol(next, Decl(for-of28.ts, 2, 22)) [Symbol.iterator]() { ->Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1247, 31)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1197, 53), Decl(lib.d.ts, 1303, 11)) ->iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1247, 31)) +>Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1248, 31)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1198, 53), Decl(lib.d.ts, 1304, 11)) +>iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1248, 31)) return this; >this : Symbol(StringIterator, Decl(for-of28.ts, 0, 37)) diff --git a/tests/baselines/reference/for-of37.symbols b/tests/baselines/reference/for-of37.symbols index 73455ff17e671..17c30514ffca8 100644 --- a/tests/baselines/reference/for-of37.symbols +++ b/tests/baselines/reference/for-of37.symbols @@ -1,7 +1,7 @@ === tests/cases/conformance/es6/for-ofStatements/for-of37.ts === var map = new Map([["", true]]); >map : Symbol(map, Decl(for-of37.ts, 0, 3)) ->Map : Symbol(Map, Decl(lib.d.ts, 1878, 1), Decl(lib.d.ts, 1900, 11)) +>Map : Symbol(Map, Decl(lib.d.ts, 1879, 1), Decl(lib.d.ts, 1901, 11)) for (var v of map) { >v : Symbol(v, Decl(for-of37.ts, 1, 8)) diff --git a/tests/baselines/reference/for-of38.symbols b/tests/baselines/reference/for-of38.symbols index bfbe035730c89..118d687659fe2 100644 --- a/tests/baselines/reference/for-of38.symbols +++ b/tests/baselines/reference/for-of38.symbols @@ -1,7 +1,7 @@ === tests/cases/conformance/es6/for-ofStatements/for-of38.ts === var map = new Map([["", true]]); >map : Symbol(map, Decl(for-of38.ts, 0, 3)) ->Map : Symbol(Map, Decl(lib.d.ts, 1878, 1), Decl(lib.d.ts, 1900, 11)) +>Map : Symbol(Map, Decl(lib.d.ts, 1879, 1), Decl(lib.d.ts, 1901, 11)) for (var [k, v] of map) { >k : Symbol(k, Decl(for-of38.ts, 1, 10)) diff --git a/tests/baselines/reference/for-of40.symbols b/tests/baselines/reference/for-of40.symbols index ed6ecb128f7fb..b916ffc3bf53a 100644 --- a/tests/baselines/reference/for-of40.symbols +++ b/tests/baselines/reference/for-of40.symbols @@ -1,7 +1,7 @@ === tests/cases/conformance/es6/for-ofStatements/for-of40.ts === var map = new Map([["", true]]); >map : Symbol(map, Decl(for-of40.ts, 0, 3)) ->Map : Symbol(Map, Decl(lib.d.ts, 1878, 1), Decl(lib.d.ts, 1900, 11)) +>Map : Symbol(Map, Decl(lib.d.ts, 1879, 1), Decl(lib.d.ts, 1901, 11)) for (var [k = "", v = false] of map) { >k : Symbol(k, Decl(for-of40.ts, 1, 10)) diff --git a/tests/baselines/reference/for-of44.symbols b/tests/baselines/reference/for-of44.symbols index adcd2ae376000..2c4ebb582f9f2 100644 --- a/tests/baselines/reference/for-of44.symbols +++ b/tests/baselines/reference/for-of44.symbols @@ -1,7 +1,7 @@ === tests/cases/conformance/es6/for-ofStatements/for-of44.ts === var array: [number, string | boolean | symbol][] = [[0, ""], [0, true], [1, Symbol()]] >array : Symbol(array, Decl(for-of44.ts, 0, 3)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1197, 53), Decl(lib.d.ts, 1303, 11)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1198, 53), Decl(lib.d.ts, 1304, 11)) for (var [num, strBoolSym] of array) { >num : Symbol(num, Decl(for-of44.ts, 1, 10)) diff --git a/tests/baselines/reference/for-of45.symbols b/tests/baselines/reference/for-of45.symbols index 2f4a85111471d..83ab93a9b6080 100644 --- a/tests/baselines/reference/for-of45.symbols +++ b/tests/baselines/reference/for-of45.symbols @@ -5,7 +5,7 @@ var k: string, v: boolean; var map = new Map([["", true]]); >map : Symbol(map, Decl(for-of45.ts, 1, 3)) ->Map : Symbol(Map, Decl(lib.d.ts, 1878, 1), Decl(lib.d.ts, 1900, 11)) +>Map : Symbol(Map, Decl(lib.d.ts, 1879, 1), Decl(lib.d.ts, 1901, 11)) for ([k = "", v = false] of map) { >k : Symbol(k, Decl(for-of45.ts, 0, 3)) diff --git a/tests/baselines/reference/for-of50.symbols b/tests/baselines/reference/for-of50.symbols index 6813cd4eee548..f11290b987922 100644 --- a/tests/baselines/reference/for-of50.symbols +++ b/tests/baselines/reference/for-of50.symbols @@ -1,7 +1,7 @@ === tests/cases/conformance/es6/for-ofStatements/for-of50.ts === var map = new Map([["", true]]); >map : Symbol(map, Decl(for-of50.ts, 0, 3)) ->Map : Symbol(Map, Decl(lib.d.ts, 1878, 1), Decl(lib.d.ts, 1900, 11)) +>Map : Symbol(Map, Decl(lib.d.ts, 1879, 1), Decl(lib.d.ts, 1901, 11)) for (const [k, v] of map) { >k : Symbol(k, Decl(for-of50.ts, 1, 12)) diff --git a/tests/baselines/reference/for-of57.symbols b/tests/baselines/reference/for-of57.symbols index e8be8da6f9ca6..9f3862e10172d 100644 --- a/tests/baselines/reference/for-of57.symbols +++ b/tests/baselines/reference/for-of57.symbols @@ -1,7 +1,7 @@ === tests/cases/conformance/es6/for-ofStatements/for-of57.ts === var iter: Iterable; >iter : Symbol(iter, Decl(for-of57.ts, 0, 3)) ->Iterable : Symbol(Iterable, Decl(lib.d.ts, 1674, 1)) +>Iterable : Symbol(Iterable, Decl(lib.d.ts, 1675, 1)) for (let num of iter) { } >num : Symbol(num, Decl(for-of57.ts, 1, 8)) diff --git a/tests/baselines/reference/iterableArrayPattern1.symbols b/tests/baselines/reference/iterableArrayPattern1.symbols index 02f2ad6e8ef52..d7877b5947abb 100644 --- a/tests/baselines/reference/iterableArrayPattern1.symbols +++ b/tests/baselines/reference/iterableArrayPattern1.symbols @@ -13,7 +13,7 @@ class SymbolIterator { return { value: Symbol(), >value : Symbol(value, Decl(iterableArrayPattern1.ts, 3, 16)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1197, 53), Decl(lib.d.ts, 1303, 11)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1198, 53), Decl(lib.d.ts, 1304, 11)) done: false >done : Symbol(done, Decl(iterableArrayPattern1.ts, 4, 28)) @@ -22,9 +22,9 @@ class SymbolIterator { } [Symbol.iterator]() { ->Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1247, 31)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1197, 53), Decl(lib.d.ts, 1303, 11)) ->iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1247, 31)) +>Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1248, 31)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1198, 53), Decl(lib.d.ts, 1304, 11)) +>iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1248, 31)) return this; >this : Symbol(SymbolIterator, Decl(iterableArrayPattern1.ts, 0, 32)) diff --git a/tests/baselines/reference/iterableArrayPattern11.symbols b/tests/baselines/reference/iterableArrayPattern11.symbols index 9bbe4bfb983f7..a4dae0104c85a 100644 --- a/tests/baselines/reference/iterableArrayPattern11.symbols +++ b/tests/baselines/reference/iterableArrayPattern11.symbols @@ -36,9 +36,9 @@ class FooIterator { } [Symbol.iterator]() { ->Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1247, 31)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1197, 53), Decl(lib.d.ts, 1303, 11)) ->iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1247, 31)) +>Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1248, 31)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1198, 53), Decl(lib.d.ts, 1304, 11)) +>iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1248, 31)) return this; >this : Symbol(FooIterator, Decl(iterableArrayPattern11.ts, 3, 27)) diff --git a/tests/baselines/reference/iterableArrayPattern12.symbols b/tests/baselines/reference/iterableArrayPattern12.symbols index 1a8634862ea20..124fc600b068c 100644 --- a/tests/baselines/reference/iterableArrayPattern12.symbols +++ b/tests/baselines/reference/iterableArrayPattern12.symbols @@ -36,9 +36,9 @@ class FooIterator { } [Symbol.iterator]() { ->Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1247, 31)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1197, 53), Decl(lib.d.ts, 1303, 11)) ->iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1247, 31)) +>Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1248, 31)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1198, 53), Decl(lib.d.ts, 1304, 11)) +>iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1248, 31)) return this; >this : Symbol(FooIterator, Decl(iterableArrayPattern12.ts, 3, 27)) diff --git a/tests/baselines/reference/iterableArrayPattern13.symbols b/tests/baselines/reference/iterableArrayPattern13.symbols index 3c8a8c1ba5221..43641993f344e 100644 --- a/tests/baselines/reference/iterableArrayPattern13.symbols +++ b/tests/baselines/reference/iterableArrayPattern13.symbols @@ -35,9 +35,9 @@ class FooIterator { } [Symbol.iterator]() { ->Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1247, 31)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1197, 53), Decl(lib.d.ts, 1303, 11)) ->iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1247, 31)) +>Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1248, 31)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1198, 53), Decl(lib.d.ts, 1304, 11)) +>iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1248, 31)) return this; >this : Symbol(FooIterator, Decl(iterableArrayPattern13.ts, 3, 27)) diff --git a/tests/baselines/reference/iterableArrayPattern2.symbols b/tests/baselines/reference/iterableArrayPattern2.symbols index a28e682c9ed88..ded5eea872675 100644 --- a/tests/baselines/reference/iterableArrayPattern2.symbols +++ b/tests/baselines/reference/iterableArrayPattern2.symbols @@ -13,7 +13,7 @@ class SymbolIterator { return { value: Symbol(), >value : Symbol(value, Decl(iterableArrayPattern2.ts, 3, 16)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1197, 53), Decl(lib.d.ts, 1303, 11)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1198, 53), Decl(lib.d.ts, 1304, 11)) done: false >done : Symbol(done, Decl(iterableArrayPattern2.ts, 4, 28)) @@ -22,9 +22,9 @@ class SymbolIterator { } [Symbol.iterator]() { ->Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1247, 31)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1197, 53), Decl(lib.d.ts, 1303, 11)) ->iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1247, 31)) +>Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1248, 31)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1198, 53), Decl(lib.d.ts, 1304, 11)) +>iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1248, 31)) return this; >this : Symbol(SymbolIterator, Decl(iterableArrayPattern2.ts, 0, 35)) diff --git a/tests/baselines/reference/iterableArrayPattern3.symbols b/tests/baselines/reference/iterableArrayPattern3.symbols index 46087c2f8bb6d..85ecd34218b2f 100644 --- a/tests/baselines/reference/iterableArrayPattern3.symbols +++ b/tests/baselines/reference/iterableArrayPattern3.symbols @@ -37,9 +37,9 @@ class FooIterator { } [Symbol.iterator]() { ->Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1247, 31)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1197, 53), Decl(lib.d.ts, 1303, 11)) ->iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1247, 31)) +>Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1248, 31)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1198, 53), Decl(lib.d.ts, 1304, 11)) +>iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1248, 31)) return this; >this : Symbol(FooIterator, Decl(iterableArrayPattern3.ts, 3, 27)) diff --git a/tests/baselines/reference/iterableArrayPattern30.symbols b/tests/baselines/reference/iterableArrayPattern30.symbols index e4c5de1770433..db22e31429e5d 100644 --- a/tests/baselines/reference/iterableArrayPattern30.symbols +++ b/tests/baselines/reference/iterableArrayPattern30.symbols @@ -4,5 +4,5 @@ const [[k1, v1], [k2, v2]] = new Map([["", true], ["hello", true]]) >v1 : Symbol(v1, Decl(iterableArrayPattern30.ts, 0, 11)) >k2 : Symbol(k2, Decl(iterableArrayPattern30.ts, 0, 18)) >v2 : Symbol(v2, Decl(iterableArrayPattern30.ts, 0, 21)) ->Map : Symbol(Map, Decl(lib.d.ts, 1878, 1), Decl(lib.d.ts, 1900, 11)) +>Map : Symbol(Map, Decl(lib.d.ts, 1879, 1), Decl(lib.d.ts, 1901, 11)) diff --git a/tests/baselines/reference/iterableArrayPattern4.symbols b/tests/baselines/reference/iterableArrayPattern4.symbols index 2b0c26918e413..b6b569d15c616 100644 --- a/tests/baselines/reference/iterableArrayPattern4.symbols +++ b/tests/baselines/reference/iterableArrayPattern4.symbols @@ -37,9 +37,9 @@ class FooIterator { } [Symbol.iterator]() { ->Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1247, 31)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1197, 53), Decl(lib.d.ts, 1303, 11)) ->iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1247, 31)) +>Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1248, 31)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1198, 53), Decl(lib.d.ts, 1304, 11)) +>iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1248, 31)) return this; >this : Symbol(FooIterator, Decl(iterableArrayPattern4.ts, 3, 27)) diff --git a/tests/baselines/reference/iterableArrayPattern9.symbols b/tests/baselines/reference/iterableArrayPattern9.symbols index 90adcfeba92cf..0722765c4de1b 100644 --- a/tests/baselines/reference/iterableArrayPattern9.symbols +++ b/tests/baselines/reference/iterableArrayPattern9.symbols @@ -32,9 +32,9 @@ class FooIterator { } [Symbol.iterator]() { ->Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1247, 31)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1197, 53), Decl(lib.d.ts, 1303, 11)) ->iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1247, 31)) +>Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1248, 31)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1198, 53), Decl(lib.d.ts, 1304, 11)) +>iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1248, 31)) return this; >this : Symbol(FooIterator, Decl(iterableArrayPattern9.ts, 2, 27)) diff --git a/tests/baselines/reference/iterableContextualTyping1.symbols b/tests/baselines/reference/iterableContextualTyping1.symbols index 43c6d7135e08d..0270830ca793e 100644 --- a/tests/baselines/reference/iterableContextualTyping1.symbols +++ b/tests/baselines/reference/iterableContextualTyping1.symbols @@ -1,7 +1,7 @@ === tests/cases/conformance/expressions/contextualTyping/iterableContextualTyping1.ts === var iter: Iterable<(x: string) => number> = [s => s.length]; >iter : Symbol(iter, Decl(iterableContextualTyping1.ts, 0, 3)) ->Iterable : Symbol(Iterable, Decl(lib.d.ts, 1674, 1)) +>Iterable : Symbol(Iterable, Decl(lib.d.ts, 1675, 1)) >x : Symbol(x, Decl(iterableContextualTyping1.ts, 0, 20)) >s : Symbol(s, Decl(iterableContextualTyping1.ts, 0, 45)) >s.length : Symbol(String.length, Decl(lib.d.ts, 414, 19)) diff --git a/tests/baselines/reference/iteratorSpreadInArray.symbols b/tests/baselines/reference/iteratorSpreadInArray.symbols index 3c1cf17480d64..e7085745aa7f1 100644 --- a/tests/baselines/reference/iteratorSpreadInArray.symbols +++ b/tests/baselines/reference/iteratorSpreadInArray.symbols @@ -12,7 +12,7 @@ class SymbolIterator { return { value: Symbol(), >value : Symbol(value, Decl(iteratorSpreadInArray.ts, 4, 16)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1197, 53), Decl(lib.d.ts, 1303, 11)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1198, 53), Decl(lib.d.ts, 1304, 11)) done: false >done : Symbol(done, Decl(iteratorSpreadInArray.ts, 5, 28)) @@ -21,9 +21,9 @@ class SymbolIterator { } [Symbol.iterator]() { ->Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1247, 31)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1197, 53), Decl(lib.d.ts, 1303, 11)) ->iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1247, 31)) +>Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1248, 31)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1198, 53), Decl(lib.d.ts, 1304, 11)) +>iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1248, 31)) return this; >this : Symbol(SymbolIterator, Decl(iteratorSpreadInArray.ts, 0, 36)) diff --git a/tests/baselines/reference/iteratorSpreadInArray11.symbols b/tests/baselines/reference/iteratorSpreadInArray11.symbols index d1eb5420ef119..8d276ae555428 100644 --- a/tests/baselines/reference/iteratorSpreadInArray11.symbols +++ b/tests/baselines/reference/iteratorSpreadInArray11.symbols @@ -1,7 +1,7 @@ === tests/cases/conformance/es6/spread/iteratorSpreadInArray11.ts === var iter: Iterable; >iter : Symbol(iter, Decl(iteratorSpreadInArray11.ts, 0, 3)) ->Iterable : Symbol(Iterable, Decl(lib.d.ts, 1674, 1)) +>Iterable : Symbol(Iterable, Decl(lib.d.ts, 1675, 1)) var array = [...iter]; >array : Symbol(array, Decl(iteratorSpreadInArray11.ts, 1, 3)) diff --git a/tests/baselines/reference/iteratorSpreadInArray2.symbols b/tests/baselines/reference/iteratorSpreadInArray2.symbols index 42c7e7e626ea8..7bc6808d849a9 100644 --- a/tests/baselines/reference/iteratorSpreadInArray2.symbols +++ b/tests/baselines/reference/iteratorSpreadInArray2.symbols @@ -13,7 +13,7 @@ class SymbolIterator { return { value: Symbol(), >value : Symbol(value, Decl(iteratorSpreadInArray2.ts, 4, 16)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1197, 53), Decl(lib.d.ts, 1303, 11)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1198, 53), Decl(lib.d.ts, 1304, 11)) done: false >done : Symbol(done, Decl(iteratorSpreadInArray2.ts, 5, 28)) @@ -22,9 +22,9 @@ class SymbolIterator { } [Symbol.iterator]() { ->Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1247, 31)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1197, 53), Decl(lib.d.ts, 1303, 11)) ->iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1247, 31)) +>Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1248, 31)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1198, 53), Decl(lib.d.ts, 1304, 11)) +>iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1248, 31)) return this; >this : Symbol(SymbolIterator, Decl(iteratorSpreadInArray2.ts, 0, 59)) @@ -48,9 +48,9 @@ class NumberIterator { } [Symbol.iterator]() { ->Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1247, 31)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1197, 53), Decl(lib.d.ts, 1303, 11)) ->iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1247, 31)) +>Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1248, 31)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1198, 53), Decl(lib.d.ts, 1304, 11)) +>iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1248, 31)) return this; >this : Symbol(NumberIterator, Decl(iteratorSpreadInArray2.ts, 13, 1)) diff --git a/tests/baselines/reference/iteratorSpreadInArray3.symbols b/tests/baselines/reference/iteratorSpreadInArray3.symbols index 8a7abd3f19589..bded5309f83ed 100644 --- a/tests/baselines/reference/iteratorSpreadInArray3.symbols +++ b/tests/baselines/reference/iteratorSpreadInArray3.symbols @@ -12,7 +12,7 @@ class SymbolIterator { return { value: Symbol(), >value : Symbol(value, Decl(iteratorSpreadInArray3.ts, 4, 16)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1197, 53), Decl(lib.d.ts, 1303, 11)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1198, 53), Decl(lib.d.ts, 1304, 11)) done: false >done : Symbol(done, Decl(iteratorSpreadInArray3.ts, 5, 28)) @@ -21,9 +21,9 @@ class SymbolIterator { } [Symbol.iterator]() { ->Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1247, 31)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1197, 53), Decl(lib.d.ts, 1303, 11)) ->iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1247, 31)) +>Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1248, 31)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1198, 53), Decl(lib.d.ts, 1304, 11)) +>iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1248, 31)) return this; >this : Symbol(SymbolIterator, Decl(iteratorSpreadInArray3.ts, 0, 47)) diff --git a/tests/baselines/reference/iteratorSpreadInArray4.symbols b/tests/baselines/reference/iteratorSpreadInArray4.symbols index 03aca3c69b36e..0dbe4711e95ee 100644 --- a/tests/baselines/reference/iteratorSpreadInArray4.symbols +++ b/tests/baselines/reference/iteratorSpreadInArray4.symbols @@ -12,7 +12,7 @@ class SymbolIterator { return { value: Symbol(), >value : Symbol(value, Decl(iteratorSpreadInArray4.ts, 4, 16)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1197, 53), Decl(lib.d.ts, 1303, 11)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1198, 53), Decl(lib.d.ts, 1304, 11)) done: false >done : Symbol(done, Decl(iteratorSpreadInArray4.ts, 5, 28)) @@ -21,9 +21,9 @@ class SymbolIterator { } [Symbol.iterator]() { ->Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1247, 31)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1197, 53), Decl(lib.d.ts, 1303, 11)) ->iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1247, 31)) +>Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1248, 31)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1198, 53), Decl(lib.d.ts, 1304, 11)) +>iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1248, 31)) return this; >this : Symbol(SymbolIterator, Decl(iteratorSpreadInArray4.ts, 0, 42)) diff --git a/tests/baselines/reference/iteratorSpreadInArray7.symbols b/tests/baselines/reference/iteratorSpreadInArray7.symbols index e8c6571943e25..50725a3f99f89 100644 --- a/tests/baselines/reference/iteratorSpreadInArray7.symbols +++ b/tests/baselines/reference/iteratorSpreadInArray7.symbols @@ -17,7 +17,7 @@ class SymbolIterator { return { value: Symbol(), >value : Symbol(value, Decl(iteratorSpreadInArray7.ts, 5, 16)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1197, 53), Decl(lib.d.ts, 1303, 11)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1198, 53), Decl(lib.d.ts, 1304, 11)) done: false >done : Symbol(done, Decl(iteratorSpreadInArray7.ts, 6, 28)) @@ -26,9 +26,9 @@ class SymbolIterator { } [Symbol.iterator]() { ->Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1247, 31)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1197, 53), Decl(lib.d.ts, 1303, 11)) ->iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1247, 31)) +>Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1248, 31)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1198, 53), Decl(lib.d.ts, 1304, 11)) +>iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1248, 31)) return this; >this : Symbol(SymbolIterator, Decl(iteratorSpreadInArray7.ts, 1, 38)) diff --git a/tests/baselines/reference/iteratorSpreadInCall11.symbols b/tests/baselines/reference/iteratorSpreadInCall11.symbols index d695457621f5d..ac52c5d172abb 100644 --- a/tests/baselines/reference/iteratorSpreadInCall11.symbols +++ b/tests/baselines/reference/iteratorSpreadInCall11.symbols @@ -19,7 +19,7 @@ class SymbolIterator { return { value: Symbol(), >value : Symbol(value, Decl(iteratorSpreadInCall11.ts, 6, 16)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1197, 53), Decl(lib.d.ts, 1303, 11)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1198, 53), Decl(lib.d.ts, 1304, 11)) done: false >done : Symbol(done, Decl(iteratorSpreadInCall11.ts, 7, 28)) @@ -28,9 +28,9 @@ class SymbolIterator { } [Symbol.iterator]() { ->Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1247, 31)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1197, 53), Decl(lib.d.ts, 1303, 11)) ->iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1247, 31)) +>Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1248, 31)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1198, 53), Decl(lib.d.ts, 1304, 11)) +>iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1248, 31)) return this; >this : Symbol(SymbolIterator, Decl(iteratorSpreadInCall11.ts, 2, 42)) diff --git a/tests/baselines/reference/iteratorSpreadInCall12.symbols b/tests/baselines/reference/iteratorSpreadInCall12.symbols index 58ed5ea493530..8ac205edcc579 100644 --- a/tests/baselines/reference/iteratorSpreadInCall12.symbols +++ b/tests/baselines/reference/iteratorSpreadInCall12.symbols @@ -22,7 +22,7 @@ class SymbolIterator { return { value: Symbol(), >value : Symbol(value, Decl(iteratorSpreadInCall12.ts, 8, 16)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1197, 53), Decl(lib.d.ts, 1303, 11)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1198, 53), Decl(lib.d.ts, 1304, 11)) done: false >done : Symbol(done, Decl(iteratorSpreadInCall12.ts, 9, 28)) @@ -31,9 +31,9 @@ class SymbolIterator { } [Symbol.iterator]() { ->Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1247, 31)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1197, 53), Decl(lib.d.ts, 1303, 11)) ->iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1247, 31)) +>Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1248, 31)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1198, 53), Decl(lib.d.ts, 1304, 11)) +>iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1248, 31)) return this; >this : Symbol(SymbolIterator, Decl(iteratorSpreadInCall12.ts, 4, 1)) @@ -57,9 +57,9 @@ class StringIterator { } [Symbol.iterator]() { ->Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1247, 31)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1197, 53), Decl(lib.d.ts, 1303, 11)) ->iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1247, 31)) +>Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1248, 31)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1198, 53), Decl(lib.d.ts, 1304, 11)) +>iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1248, 31)) return this; >this : Symbol(StringIterator, Decl(iteratorSpreadInCall12.ts, 17, 1)) diff --git a/tests/baselines/reference/iteratorSpreadInCall3.symbols b/tests/baselines/reference/iteratorSpreadInCall3.symbols index ac81fdea2618e..12e4bd1bb9ba7 100644 --- a/tests/baselines/reference/iteratorSpreadInCall3.symbols +++ b/tests/baselines/reference/iteratorSpreadInCall3.symbols @@ -16,7 +16,7 @@ class SymbolIterator { return { value: Symbol(), >value : Symbol(value, Decl(iteratorSpreadInCall3.ts, 5, 16)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1197, 53), Decl(lib.d.ts, 1303, 11)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1198, 53), Decl(lib.d.ts, 1304, 11)) done: false >done : Symbol(done, Decl(iteratorSpreadInCall3.ts, 6, 28)) @@ -25,9 +25,9 @@ class SymbolIterator { } [Symbol.iterator]() { ->Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1247, 31)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1197, 53), Decl(lib.d.ts, 1303, 11)) ->iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1247, 31)) +>Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1248, 31)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1198, 53), Decl(lib.d.ts, 1304, 11)) +>iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1248, 31)) return this; >this : Symbol(SymbolIterator, Decl(iteratorSpreadInCall3.ts, 2, 32)) diff --git a/tests/baselines/reference/iteratorSpreadInCall5.symbols b/tests/baselines/reference/iteratorSpreadInCall5.symbols index da79720409de3..06226958069e4 100644 --- a/tests/baselines/reference/iteratorSpreadInCall5.symbols +++ b/tests/baselines/reference/iteratorSpreadInCall5.symbols @@ -17,7 +17,7 @@ class SymbolIterator { return { value: Symbol(), >value : Symbol(value, Decl(iteratorSpreadInCall5.ts, 5, 16)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1197, 53), Decl(lib.d.ts, 1303, 11)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1198, 53), Decl(lib.d.ts, 1304, 11)) done: false >done : Symbol(done, Decl(iteratorSpreadInCall5.ts, 6, 28)) @@ -26,9 +26,9 @@ class SymbolIterator { } [Symbol.iterator]() { ->Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1247, 31)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1197, 53), Decl(lib.d.ts, 1303, 11)) ->iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1247, 31)) +>Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1248, 31)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1198, 53), Decl(lib.d.ts, 1304, 11)) +>iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1248, 31)) return this; >this : Symbol(SymbolIterator, Decl(iteratorSpreadInCall5.ts, 2, 43)) @@ -52,9 +52,9 @@ class StringIterator { } [Symbol.iterator]() { ->Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1247, 31)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1197, 53), Decl(lib.d.ts, 1303, 11)) ->iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1247, 31)) +>Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1248, 31)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1198, 53), Decl(lib.d.ts, 1304, 11)) +>iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1248, 31)) return this; >this : Symbol(StringIterator, Decl(iteratorSpreadInCall5.ts, 14, 1)) diff --git a/tests/baselines/reference/parserSymbolProperty1.symbols b/tests/baselines/reference/parserSymbolProperty1.symbols index 9b0b706077d60..72d4ad96aac92 100644 --- a/tests/baselines/reference/parserSymbolProperty1.symbols +++ b/tests/baselines/reference/parserSymbolProperty1.symbols @@ -3,7 +3,7 @@ interface I { >I : Symbol(I, Decl(parserSymbolProperty1.ts, 0, 0)) [Symbol.iterator]: string; ->Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1247, 31)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1197, 53), Decl(lib.d.ts, 1303, 11)) ->iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1247, 31)) +>Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1248, 31)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1198, 53), Decl(lib.d.ts, 1304, 11)) +>iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1248, 31)) } diff --git a/tests/baselines/reference/parserSymbolProperty2.symbols b/tests/baselines/reference/parserSymbolProperty2.symbols index f13748e9996d9..77eb6c610593a 100644 --- a/tests/baselines/reference/parserSymbolProperty2.symbols +++ b/tests/baselines/reference/parserSymbolProperty2.symbols @@ -3,7 +3,7 @@ interface I { >I : Symbol(I, Decl(parserSymbolProperty2.ts, 0, 0)) [Symbol.unscopables](): string; ->Symbol.unscopables : Symbol(SymbolConstructor.unscopables, Decl(lib.d.ts, 1295, 24)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1197, 53), Decl(lib.d.ts, 1303, 11)) ->unscopables : Symbol(SymbolConstructor.unscopables, Decl(lib.d.ts, 1295, 24)) +>Symbol.unscopables : Symbol(SymbolConstructor.unscopables, Decl(lib.d.ts, 1296, 24)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1198, 53), Decl(lib.d.ts, 1304, 11)) +>unscopables : Symbol(SymbolConstructor.unscopables, Decl(lib.d.ts, 1296, 24)) } diff --git a/tests/baselines/reference/parserSymbolProperty3.symbols b/tests/baselines/reference/parserSymbolProperty3.symbols index cb4ff68a63766..5f7f13956a824 100644 --- a/tests/baselines/reference/parserSymbolProperty3.symbols +++ b/tests/baselines/reference/parserSymbolProperty3.symbols @@ -3,7 +3,7 @@ declare class C { >C : Symbol(C, Decl(parserSymbolProperty3.ts, 0, 0)) [Symbol.unscopables](): string; ->Symbol.unscopables : Symbol(SymbolConstructor.unscopables, Decl(lib.d.ts, 1295, 24)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1197, 53), Decl(lib.d.ts, 1303, 11)) ->unscopables : Symbol(SymbolConstructor.unscopables, Decl(lib.d.ts, 1295, 24)) +>Symbol.unscopables : Symbol(SymbolConstructor.unscopables, Decl(lib.d.ts, 1296, 24)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1198, 53), Decl(lib.d.ts, 1304, 11)) +>unscopables : Symbol(SymbolConstructor.unscopables, Decl(lib.d.ts, 1296, 24)) } diff --git a/tests/baselines/reference/parserSymbolProperty4.symbols b/tests/baselines/reference/parserSymbolProperty4.symbols index 34f550b750b9d..94701b8908a13 100644 --- a/tests/baselines/reference/parserSymbolProperty4.symbols +++ b/tests/baselines/reference/parserSymbolProperty4.symbols @@ -3,7 +3,7 @@ declare class C { >C : Symbol(C, Decl(parserSymbolProperty4.ts, 0, 0)) [Symbol.toPrimitive]: string; ->Symbol.toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, 1283, 18)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1197, 53), Decl(lib.d.ts, 1303, 11)) ->toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, 1283, 18)) +>Symbol.toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, 1284, 18)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1198, 53), Decl(lib.d.ts, 1304, 11)) +>toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, 1284, 18)) } diff --git a/tests/baselines/reference/parserSymbolProperty5.symbols b/tests/baselines/reference/parserSymbolProperty5.symbols index 5257941831b89..b91cd771c5d28 100644 --- a/tests/baselines/reference/parserSymbolProperty5.symbols +++ b/tests/baselines/reference/parserSymbolProperty5.symbols @@ -3,7 +3,7 @@ class C { >C : Symbol(C, Decl(parserSymbolProperty5.ts, 0, 0)) [Symbol.toPrimitive]: string; ->Symbol.toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, 1283, 18)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1197, 53), Decl(lib.d.ts, 1303, 11)) ->toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, 1283, 18)) +>Symbol.toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, 1284, 18)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1198, 53), Decl(lib.d.ts, 1304, 11)) +>toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, 1284, 18)) } diff --git a/tests/baselines/reference/parserSymbolProperty6.symbols b/tests/baselines/reference/parserSymbolProperty6.symbols index 77770a62bd575..4762fb4fd7002 100644 --- a/tests/baselines/reference/parserSymbolProperty6.symbols +++ b/tests/baselines/reference/parserSymbolProperty6.symbols @@ -3,7 +3,7 @@ class C { >C : Symbol(C, Decl(parserSymbolProperty6.ts, 0, 0)) [Symbol.toStringTag]: string = ""; ->Symbol.toStringTag : Symbol(SymbolConstructor.toStringTag, Decl(lib.d.ts, 1289, 24)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1197, 53), Decl(lib.d.ts, 1303, 11)) ->toStringTag : Symbol(SymbolConstructor.toStringTag, Decl(lib.d.ts, 1289, 24)) +>Symbol.toStringTag : Symbol(SymbolConstructor.toStringTag, Decl(lib.d.ts, 1290, 24)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1198, 53), Decl(lib.d.ts, 1304, 11)) +>toStringTag : Symbol(SymbolConstructor.toStringTag, Decl(lib.d.ts, 1290, 24)) } diff --git a/tests/baselines/reference/parserSymbolProperty7.symbols b/tests/baselines/reference/parserSymbolProperty7.symbols index 3e912a18a2fdb..0eb96fa03b039 100644 --- a/tests/baselines/reference/parserSymbolProperty7.symbols +++ b/tests/baselines/reference/parserSymbolProperty7.symbols @@ -3,7 +3,7 @@ class C { >C : Symbol(C, Decl(parserSymbolProperty7.ts, 0, 0)) [Symbol.toStringTag](): void { } ->Symbol.toStringTag : Symbol(SymbolConstructor.toStringTag, Decl(lib.d.ts, 1289, 24)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1197, 53), Decl(lib.d.ts, 1303, 11)) ->toStringTag : Symbol(SymbolConstructor.toStringTag, Decl(lib.d.ts, 1289, 24)) +>Symbol.toStringTag : Symbol(SymbolConstructor.toStringTag, Decl(lib.d.ts, 1290, 24)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1198, 53), Decl(lib.d.ts, 1304, 11)) +>toStringTag : Symbol(SymbolConstructor.toStringTag, Decl(lib.d.ts, 1290, 24)) } diff --git a/tests/baselines/reference/parserSymbolProperty8.symbols b/tests/baselines/reference/parserSymbolProperty8.symbols index dcf4a037db2ff..cc11d61259e84 100644 --- a/tests/baselines/reference/parserSymbolProperty8.symbols +++ b/tests/baselines/reference/parserSymbolProperty8.symbols @@ -3,7 +3,7 @@ var x: { >x : Symbol(x, Decl(parserSymbolProperty8.ts, 0, 3)) [Symbol.toPrimitive](): string ->Symbol.toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, 1283, 18)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1197, 53), Decl(lib.d.ts, 1303, 11)) ->toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, 1283, 18)) +>Symbol.toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, 1284, 18)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1198, 53), Decl(lib.d.ts, 1304, 11)) +>toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, 1284, 18)) } diff --git a/tests/baselines/reference/parserSymbolProperty9.symbols b/tests/baselines/reference/parserSymbolProperty9.symbols index f706a35e3b5af..eae90071b65d8 100644 --- a/tests/baselines/reference/parserSymbolProperty9.symbols +++ b/tests/baselines/reference/parserSymbolProperty9.symbols @@ -3,7 +3,7 @@ var x: { >x : Symbol(x, Decl(parserSymbolProperty9.ts, 0, 3)) [Symbol.toPrimitive]: string ->Symbol.toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, 1283, 18)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1197, 53), Decl(lib.d.ts, 1303, 11)) ->toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, 1283, 18)) +>Symbol.toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, 1284, 18)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1198, 53), Decl(lib.d.ts, 1304, 11)) +>toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, 1284, 18)) } diff --git a/tests/baselines/reference/promiseVoidErrorCallback.symbols b/tests/baselines/reference/promiseVoidErrorCallback.symbols index 78faacdb1f14a..d9e329885aab2 100644 --- a/tests/baselines/reference/promiseVoidErrorCallback.symbols +++ b/tests/baselines/reference/promiseVoidErrorCallback.symbols @@ -22,13 +22,13 @@ interface T3 { function f1(): Promise { >f1 : Symbol(f1, Decl(promiseVoidErrorCallback.ts, 10, 1)) ->Promise : Symbol(Promise, Decl(lib.d.ts, 4769, 1), Decl(lib.d.ts, 4854, 11)) +>Promise : Symbol(Promise, Decl(lib.d.ts, 4770, 1), Decl(lib.d.ts, 4855, 11)) >T1 : Symbol(T1, Decl(promiseVoidErrorCallback.ts, 0, 0)) return Promise.resolve({ __t1: "foo_t1" }); ->Promise.resolve : Symbol(PromiseConstructor.resolve, Decl(lib.d.ts, 4836, 39), Decl(lib.d.ts, 4843, 54)) ->Promise : Symbol(Promise, Decl(lib.d.ts, 4769, 1), Decl(lib.d.ts, 4854, 11)) ->resolve : Symbol(PromiseConstructor.resolve, Decl(lib.d.ts, 4836, 39), Decl(lib.d.ts, 4843, 54)) +>Promise.resolve : Symbol(PromiseConstructor.resolve, Decl(lib.d.ts, 4837, 39), Decl(lib.d.ts, 4844, 54)) +>Promise : Symbol(Promise, Decl(lib.d.ts, 4770, 1), Decl(lib.d.ts, 4855, 11)) +>resolve : Symbol(PromiseConstructor.resolve, Decl(lib.d.ts, 4837, 39), Decl(lib.d.ts, 4844, 54)) >__t1 : Symbol(__t1, Decl(promiseVoidErrorCallback.ts, 13, 28)) } @@ -47,12 +47,12 @@ function f2(x: T1): T2 { var x3 = f1() >x3 : Symbol(x3, Decl(promiseVoidErrorCallback.ts, 20, 3)) ->f1() .then(f2, (e: Error) => { throw e;}) .then : Symbol(Promise.then, Decl(lib.d.ts, 4774, 22), Decl(lib.d.ts, 4781, 158)) ->f1() .then : Symbol(Promise.then, Decl(lib.d.ts, 4774, 22), Decl(lib.d.ts, 4781, 158)) +>f1() .then(f2, (e: Error) => { throw e;}) .then : Symbol(Promise.then, Decl(lib.d.ts, 4775, 22), Decl(lib.d.ts, 4782, 158)) +>f1() .then : Symbol(Promise.then, Decl(lib.d.ts, 4775, 22), Decl(lib.d.ts, 4782, 158)) >f1 : Symbol(f1, Decl(promiseVoidErrorCallback.ts, 10, 1)) .then(f2, (e: Error) => { ->then : Symbol(Promise.then, Decl(lib.d.ts, 4774, 22), Decl(lib.d.ts, 4781, 158)) +>then : Symbol(Promise.then, Decl(lib.d.ts, 4775, 22), Decl(lib.d.ts, 4782, 158)) >f2 : Symbol(f2, Decl(promiseVoidErrorCallback.ts, 14, 1)) >e : Symbol(e, Decl(promiseVoidErrorCallback.ts, 21, 15)) >Error : Symbol(Error, Decl(lib.d.ts, 876, 38), Decl(lib.d.ts, 889, 11)) @@ -62,7 +62,7 @@ var x3 = f1() }) .then((x: T2) => { ->then : Symbol(Promise.then, Decl(lib.d.ts, 4774, 22), Decl(lib.d.ts, 4781, 158)) +>then : Symbol(Promise.then, Decl(lib.d.ts, 4775, 22), Decl(lib.d.ts, 4782, 158)) >x : Symbol(x, Decl(promiseVoidErrorCallback.ts, 24, 11)) >T2 : Symbol(T2, Decl(promiseVoidErrorCallback.ts, 2, 1)) diff --git a/tests/baselines/reference/symbolDeclarationEmit1.symbols b/tests/baselines/reference/symbolDeclarationEmit1.symbols index 6b17c421a0731..0b0e820404bdc 100644 --- a/tests/baselines/reference/symbolDeclarationEmit1.symbols +++ b/tests/baselines/reference/symbolDeclarationEmit1.symbols @@ -3,7 +3,7 @@ class C { >C : Symbol(C, Decl(symbolDeclarationEmit1.ts, 0, 0)) [Symbol.toPrimitive]: number; ->Symbol.toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, 1283, 18)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1197, 53), Decl(lib.d.ts, 1303, 11)) ->toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, 1283, 18)) +>Symbol.toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, 1284, 18)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1198, 53), Decl(lib.d.ts, 1304, 11)) +>toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, 1284, 18)) } diff --git a/tests/baselines/reference/symbolDeclarationEmit10.symbols b/tests/baselines/reference/symbolDeclarationEmit10.symbols index e620614d829eb..5ed853abd19fd 100644 --- a/tests/baselines/reference/symbolDeclarationEmit10.symbols +++ b/tests/baselines/reference/symbolDeclarationEmit10.symbols @@ -3,13 +3,13 @@ var obj = { >obj : Symbol(obj, Decl(symbolDeclarationEmit10.ts, 0, 3)) get [Symbol.isConcatSpreadable]() { return '' }, ->Symbol.isConcatSpreadable : Symbol(SymbolConstructor.isConcatSpreadable, Decl(lib.d.ts, 1241, 24)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1197, 53), Decl(lib.d.ts, 1303, 11)) ->isConcatSpreadable : Symbol(SymbolConstructor.isConcatSpreadable, Decl(lib.d.ts, 1241, 24)) +>Symbol.isConcatSpreadable : Symbol(SymbolConstructor.isConcatSpreadable, Decl(lib.d.ts, 1242, 24)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1198, 53), Decl(lib.d.ts, 1304, 11)) +>isConcatSpreadable : Symbol(SymbolConstructor.isConcatSpreadable, Decl(lib.d.ts, 1242, 24)) set [Symbol.isConcatSpreadable](x) { } ->Symbol.isConcatSpreadable : Symbol(SymbolConstructor.isConcatSpreadable, Decl(lib.d.ts, 1241, 24)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1197, 53), Decl(lib.d.ts, 1303, 11)) ->isConcatSpreadable : Symbol(SymbolConstructor.isConcatSpreadable, Decl(lib.d.ts, 1241, 24)) +>Symbol.isConcatSpreadable : Symbol(SymbolConstructor.isConcatSpreadable, Decl(lib.d.ts, 1242, 24)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1198, 53), Decl(lib.d.ts, 1304, 11)) +>isConcatSpreadable : Symbol(SymbolConstructor.isConcatSpreadable, Decl(lib.d.ts, 1242, 24)) >x : Symbol(x, Decl(symbolDeclarationEmit10.ts, 2, 36)) } diff --git a/tests/baselines/reference/symbolDeclarationEmit11.symbols b/tests/baselines/reference/symbolDeclarationEmit11.symbols index 3cbae021c32e5..44115a3e7309b 100644 --- a/tests/baselines/reference/symbolDeclarationEmit11.symbols +++ b/tests/baselines/reference/symbolDeclarationEmit11.symbols @@ -3,23 +3,23 @@ class C { >C : Symbol(C, Decl(symbolDeclarationEmit11.ts, 0, 0)) static [Symbol.iterator] = 0; ->Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1247, 31)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1197, 53), Decl(lib.d.ts, 1303, 11)) ->iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1247, 31)) +>Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1248, 31)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1198, 53), Decl(lib.d.ts, 1304, 11)) +>iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1248, 31)) static [Symbol.isConcatSpreadable]() { } ->Symbol.isConcatSpreadable : Symbol(SymbolConstructor.isConcatSpreadable, Decl(lib.d.ts, 1241, 24)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1197, 53), Decl(lib.d.ts, 1303, 11)) ->isConcatSpreadable : Symbol(SymbolConstructor.isConcatSpreadable, Decl(lib.d.ts, 1241, 24)) +>Symbol.isConcatSpreadable : Symbol(SymbolConstructor.isConcatSpreadable, Decl(lib.d.ts, 1242, 24)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1198, 53), Decl(lib.d.ts, 1304, 11)) +>isConcatSpreadable : Symbol(SymbolConstructor.isConcatSpreadable, Decl(lib.d.ts, 1242, 24)) static get [Symbol.toPrimitive]() { return ""; } ->Symbol.toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, 1283, 18)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1197, 53), Decl(lib.d.ts, 1303, 11)) ->toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, 1283, 18)) +>Symbol.toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, 1284, 18)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1198, 53), Decl(lib.d.ts, 1304, 11)) +>toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, 1284, 18)) static set [Symbol.toPrimitive](x) { } ->Symbol.toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, 1283, 18)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1197, 53), Decl(lib.d.ts, 1303, 11)) ->toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, 1283, 18)) +>Symbol.toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, 1284, 18)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1198, 53), Decl(lib.d.ts, 1304, 11)) +>toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, 1284, 18)) >x : Symbol(x, Decl(symbolDeclarationEmit11.ts, 4, 36)) } diff --git a/tests/baselines/reference/symbolDeclarationEmit13.symbols b/tests/baselines/reference/symbolDeclarationEmit13.symbols index 9e6b00fbc45a8..a0aa4e1142a1f 100644 --- a/tests/baselines/reference/symbolDeclarationEmit13.symbols +++ b/tests/baselines/reference/symbolDeclarationEmit13.symbols @@ -3,13 +3,13 @@ class C { >C : Symbol(C, Decl(symbolDeclarationEmit13.ts, 0, 0)) get [Symbol.toPrimitive]() { return ""; } ->Symbol.toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, 1283, 18)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1197, 53), Decl(lib.d.ts, 1303, 11)) ->toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, 1283, 18)) +>Symbol.toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, 1284, 18)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1198, 53), Decl(lib.d.ts, 1304, 11)) +>toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, 1284, 18)) set [Symbol.toStringTag](x) { } ->Symbol.toStringTag : Symbol(SymbolConstructor.toStringTag, Decl(lib.d.ts, 1289, 24)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1197, 53), Decl(lib.d.ts, 1303, 11)) ->toStringTag : Symbol(SymbolConstructor.toStringTag, Decl(lib.d.ts, 1289, 24)) +>Symbol.toStringTag : Symbol(SymbolConstructor.toStringTag, Decl(lib.d.ts, 1290, 24)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1198, 53), Decl(lib.d.ts, 1304, 11)) +>toStringTag : Symbol(SymbolConstructor.toStringTag, Decl(lib.d.ts, 1290, 24)) >x : Symbol(x, Decl(symbolDeclarationEmit13.ts, 2, 29)) } diff --git a/tests/baselines/reference/symbolDeclarationEmit14.symbols b/tests/baselines/reference/symbolDeclarationEmit14.symbols index 610a6bae9cd61..0acef2d8a7180 100644 --- a/tests/baselines/reference/symbolDeclarationEmit14.symbols +++ b/tests/baselines/reference/symbolDeclarationEmit14.symbols @@ -3,12 +3,12 @@ class C { >C : Symbol(C, Decl(symbolDeclarationEmit14.ts, 0, 0)) get [Symbol.toPrimitive]() { return ""; } ->Symbol.toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, 1283, 18)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1197, 53), Decl(lib.d.ts, 1303, 11)) ->toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, 1283, 18)) +>Symbol.toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, 1284, 18)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1198, 53), Decl(lib.d.ts, 1304, 11)) +>toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, 1284, 18)) get [Symbol.toStringTag]() { return ""; } ->Symbol.toStringTag : Symbol(SymbolConstructor.toStringTag, Decl(lib.d.ts, 1289, 24)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1197, 53), Decl(lib.d.ts, 1303, 11)) ->toStringTag : Symbol(SymbolConstructor.toStringTag, Decl(lib.d.ts, 1289, 24)) +>Symbol.toStringTag : Symbol(SymbolConstructor.toStringTag, Decl(lib.d.ts, 1290, 24)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1198, 53), Decl(lib.d.ts, 1304, 11)) +>toStringTag : Symbol(SymbolConstructor.toStringTag, Decl(lib.d.ts, 1290, 24)) } diff --git a/tests/baselines/reference/symbolDeclarationEmit2.symbols b/tests/baselines/reference/symbolDeclarationEmit2.symbols index e0ba5ffc72a78..bfcf6243d9e47 100644 --- a/tests/baselines/reference/symbolDeclarationEmit2.symbols +++ b/tests/baselines/reference/symbolDeclarationEmit2.symbols @@ -3,7 +3,7 @@ class C { >C : Symbol(C, Decl(symbolDeclarationEmit2.ts, 0, 0)) [Symbol.toPrimitive] = ""; ->Symbol.toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, 1283, 18)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1197, 53), Decl(lib.d.ts, 1303, 11)) ->toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, 1283, 18)) +>Symbol.toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, 1284, 18)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1198, 53), Decl(lib.d.ts, 1304, 11)) +>toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, 1284, 18)) } diff --git a/tests/baselines/reference/symbolDeclarationEmit3.symbols b/tests/baselines/reference/symbolDeclarationEmit3.symbols index 712b233a744f4..fcfcd0efe1400 100644 --- a/tests/baselines/reference/symbolDeclarationEmit3.symbols +++ b/tests/baselines/reference/symbolDeclarationEmit3.symbols @@ -3,20 +3,20 @@ class C { >C : Symbol(C, Decl(symbolDeclarationEmit3.ts, 0, 0)) [Symbol.toPrimitive](x: number); ->Symbol.toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, 1283, 18)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1197, 53), Decl(lib.d.ts, 1303, 11)) ->toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, 1283, 18)) +>Symbol.toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, 1284, 18)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1198, 53), Decl(lib.d.ts, 1304, 11)) +>toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, 1284, 18)) >x : Symbol(x, Decl(symbolDeclarationEmit3.ts, 1, 25)) [Symbol.toPrimitive](x: string); ->Symbol.toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, 1283, 18)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1197, 53), Decl(lib.d.ts, 1303, 11)) ->toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, 1283, 18)) +>Symbol.toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, 1284, 18)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1198, 53), Decl(lib.d.ts, 1304, 11)) +>toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, 1284, 18)) >x : Symbol(x, Decl(symbolDeclarationEmit3.ts, 2, 25)) [Symbol.toPrimitive](x: any) { } ->Symbol.toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, 1283, 18)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1197, 53), Decl(lib.d.ts, 1303, 11)) ->toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, 1283, 18)) +>Symbol.toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, 1284, 18)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1198, 53), Decl(lib.d.ts, 1304, 11)) +>toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, 1284, 18)) >x : Symbol(x, Decl(symbolDeclarationEmit3.ts, 3, 25)) } diff --git a/tests/baselines/reference/symbolDeclarationEmit4.symbols b/tests/baselines/reference/symbolDeclarationEmit4.symbols index 3a24de2f0e331..28d4602b181c6 100644 --- a/tests/baselines/reference/symbolDeclarationEmit4.symbols +++ b/tests/baselines/reference/symbolDeclarationEmit4.symbols @@ -3,13 +3,13 @@ class C { >C : Symbol(C, Decl(symbolDeclarationEmit4.ts, 0, 0)) get [Symbol.toPrimitive]() { return ""; } ->Symbol.toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, 1283, 18)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1197, 53), Decl(lib.d.ts, 1303, 11)) ->toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, 1283, 18)) +>Symbol.toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, 1284, 18)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1198, 53), Decl(lib.d.ts, 1304, 11)) +>toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, 1284, 18)) set [Symbol.toPrimitive](x) { } ->Symbol.toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, 1283, 18)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1197, 53), Decl(lib.d.ts, 1303, 11)) ->toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, 1283, 18)) +>Symbol.toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, 1284, 18)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1198, 53), Decl(lib.d.ts, 1304, 11)) +>toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, 1284, 18)) >x : Symbol(x, Decl(symbolDeclarationEmit4.ts, 2, 29)) } diff --git a/tests/baselines/reference/symbolDeclarationEmit5.symbols b/tests/baselines/reference/symbolDeclarationEmit5.symbols index 5580b833c0814..c8a7ab36e94b8 100644 --- a/tests/baselines/reference/symbolDeclarationEmit5.symbols +++ b/tests/baselines/reference/symbolDeclarationEmit5.symbols @@ -3,7 +3,7 @@ interface I { >I : Symbol(I, Decl(symbolDeclarationEmit5.ts, 0, 0)) [Symbol.isConcatSpreadable](): string; ->Symbol.isConcatSpreadable : Symbol(SymbolConstructor.isConcatSpreadable, Decl(lib.d.ts, 1241, 24)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1197, 53), Decl(lib.d.ts, 1303, 11)) ->isConcatSpreadable : Symbol(SymbolConstructor.isConcatSpreadable, Decl(lib.d.ts, 1241, 24)) +>Symbol.isConcatSpreadable : Symbol(SymbolConstructor.isConcatSpreadable, Decl(lib.d.ts, 1242, 24)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1198, 53), Decl(lib.d.ts, 1304, 11)) +>isConcatSpreadable : Symbol(SymbolConstructor.isConcatSpreadable, Decl(lib.d.ts, 1242, 24)) } diff --git a/tests/baselines/reference/symbolDeclarationEmit6.symbols b/tests/baselines/reference/symbolDeclarationEmit6.symbols index 10c95ed620bc9..d535c8ce1ec89 100644 --- a/tests/baselines/reference/symbolDeclarationEmit6.symbols +++ b/tests/baselines/reference/symbolDeclarationEmit6.symbols @@ -3,7 +3,7 @@ interface I { >I : Symbol(I, Decl(symbolDeclarationEmit6.ts, 0, 0)) [Symbol.isConcatSpreadable]: string; ->Symbol.isConcatSpreadable : Symbol(SymbolConstructor.isConcatSpreadable, Decl(lib.d.ts, 1241, 24)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1197, 53), Decl(lib.d.ts, 1303, 11)) ->isConcatSpreadable : Symbol(SymbolConstructor.isConcatSpreadable, Decl(lib.d.ts, 1241, 24)) +>Symbol.isConcatSpreadable : Symbol(SymbolConstructor.isConcatSpreadable, Decl(lib.d.ts, 1242, 24)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1198, 53), Decl(lib.d.ts, 1304, 11)) +>isConcatSpreadable : Symbol(SymbolConstructor.isConcatSpreadable, Decl(lib.d.ts, 1242, 24)) } diff --git a/tests/baselines/reference/symbolDeclarationEmit7.symbols b/tests/baselines/reference/symbolDeclarationEmit7.symbols index 42f6b86686737..0860dae4a277f 100644 --- a/tests/baselines/reference/symbolDeclarationEmit7.symbols +++ b/tests/baselines/reference/symbolDeclarationEmit7.symbols @@ -3,7 +3,7 @@ var obj: { >obj : Symbol(obj, Decl(symbolDeclarationEmit7.ts, 0, 3)) [Symbol.isConcatSpreadable]: string; ->Symbol.isConcatSpreadable : Symbol(SymbolConstructor.isConcatSpreadable, Decl(lib.d.ts, 1241, 24)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1197, 53), Decl(lib.d.ts, 1303, 11)) ->isConcatSpreadable : Symbol(SymbolConstructor.isConcatSpreadable, Decl(lib.d.ts, 1241, 24)) +>Symbol.isConcatSpreadable : Symbol(SymbolConstructor.isConcatSpreadable, Decl(lib.d.ts, 1242, 24)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1198, 53), Decl(lib.d.ts, 1304, 11)) +>isConcatSpreadable : Symbol(SymbolConstructor.isConcatSpreadable, Decl(lib.d.ts, 1242, 24)) } diff --git a/tests/baselines/reference/symbolDeclarationEmit8.symbols b/tests/baselines/reference/symbolDeclarationEmit8.symbols index 13331a49dc355..21faad440290a 100644 --- a/tests/baselines/reference/symbolDeclarationEmit8.symbols +++ b/tests/baselines/reference/symbolDeclarationEmit8.symbols @@ -3,7 +3,7 @@ var obj = { >obj : Symbol(obj, Decl(symbolDeclarationEmit8.ts, 0, 3)) [Symbol.isConcatSpreadable]: 0 ->Symbol.isConcatSpreadable : Symbol(SymbolConstructor.isConcatSpreadable, Decl(lib.d.ts, 1241, 24)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1197, 53), Decl(lib.d.ts, 1303, 11)) ->isConcatSpreadable : Symbol(SymbolConstructor.isConcatSpreadable, Decl(lib.d.ts, 1241, 24)) +>Symbol.isConcatSpreadable : Symbol(SymbolConstructor.isConcatSpreadable, Decl(lib.d.ts, 1242, 24)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1198, 53), Decl(lib.d.ts, 1304, 11)) +>isConcatSpreadable : Symbol(SymbolConstructor.isConcatSpreadable, Decl(lib.d.ts, 1242, 24)) } diff --git a/tests/baselines/reference/symbolDeclarationEmit9.symbols b/tests/baselines/reference/symbolDeclarationEmit9.symbols index 2b6984b6baef0..9212123105def 100644 --- a/tests/baselines/reference/symbolDeclarationEmit9.symbols +++ b/tests/baselines/reference/symbolDeclarationEmit9.symbols @@ -3,7 +3,7 @@ var obj = { >obj : Symbol(obj, Decl(symbolDeclarationEmit9.ts, 0, 3)) [Symbol.isConcatSpreadable]() { } ->Symbol.isConcatSpreadable : Symbol(SymbolConstructor.isConcatSpreadable, Decl(lib.d.ts, 1241, 24)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1197, 53), Decl(lib.d.ts, 1303, 11)) ->isConcatSpreadable : Symbol(SymbolConstructor.isConcatSpreadable, Decl(lib.d.ts, 1241, 24)) +>Symbol.isConcatSpreadable : Symbol(SymbolConstructor.isConcatSpreadable, Decl(lib.d.ts, 1242, 24)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1198, 53), Decl(lib.d.ts, 1304, 11)) +>isConcatSpreadable : Symbol(SymbolConstructor.isConcatSpreadable, Decl(lib.d.ts, 1242, 24)) } diff --git a/tests/baselines/reference/symbolProperty11.symbols b/tests/baselines/reference/symbolProperty11.symbols index bff61ccc01476..952846d768d91 100644 --- a/tests/baselines/reference/symbolProperty11.symbols +++ b/tests/baselines/reference/symbolProperty11.symbols @@ -6,9 +6,9 @@ interface I { >I : Symbol(I, Decl(symbolProperty11.ts, 0, 11)) [Symbol.iterator]?: { x }; ->Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1247, 31)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1197, 53), Decl(lib.d.ts, 1303, 11)) ->iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1247, 31)) +>Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1248, 31)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1198, 53), Decl(lib.d.ts, 1304, 11)) +>iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1248, 31)) >x : Symbol(x, Decl(symbolProperty11.ts, 2, 25)) } diff --git a/tests/baselines/reference/symbolProperty13.symbols b/tests/baselines/reference/symbolProperty13.symbols index 1b0026c5ea4bb..3b5685d1d7738 100644 --- a/tests/baselines/reference/symbolProperty13.symbols +++ b/tests/baselines/reference/symbolProperty13.symbols @@ -3,9 +3,9 @@ class C { >C : Symbol(C, Decl(symbolProperty13.ts, 0, 0)) [Symbol.iterator]: { x; y }; ->Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1247, 31)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1197, 53), Decl(lib.d.ts, 1303, 11)) ->iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1247, 31)) +>Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1248, 31)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1198, 53), Decl(lib.d.ts, 1304, 11)) +>iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1248, 31)) >x : Symbol(x, Decl(symbolProperty13.ts, 1, 24)) >y : Symbol(y, Decl(symbolProperty13.ts, 1, 27)) } @@ -13,9 +13,9 @@ interface I { >I : Symbol(I, Decl(symbolProperty13.ts, 2, 1)) [Symbol.iterator]: { x }; ->Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1247, 31)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1197, 53), Decl(lib.d.ts, 1303, 11)) ->iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1247, 31)) +>Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1248, 31)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1198, 53), Decl(lib.d.ts, 1304, 11)) +>iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1248, 31)) >x : Symbol(x, Decl(symbolProperty13.ts, 4, 24)) } diff --git a/tests/baselines/reference/symbolProperty14.symbols b/tests/baselines/reference/symbolProperty14.symbols index 358819f47b393..b47ae5d912dde 100644 --- a/tests/baselines/reference/symbolProperty14.symbols +++ b/tests/baselines/reference/symbolProperty14.symbols @@ -3,9 +3,9 @@ class C { >C : Symbol(C, Decl(symbolProperty14.ts, 0, 0)) [Symbol.iterator]: { x; y }; ->Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1247, 31)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1197, 53), Decl(lib.d.ts, 1303, 11)) ->iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1247, 31)) +>Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1248, 31)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1198, 53), Decl(lib.d.ts, 1304, 11)) +>iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1248, 31)) >x : Symbol(x, Decl(symbolProperty14.ts, 1, 24)) >y : Symbol(y, Decl(symbolProperty14.ts, 1, 27)) } @@ -13,9 +13,9 @@ interface I { >I : Symbol(I, Decl(symbolProperty14.ts, 2, 1)) [Symbol.iterator]?: { x }; ->Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1247, 31)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1197, 53), Decl(lib.d.ts, 1303, 11)) ->iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1247, 31)) +>Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1248, 31)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1198, 53), Decl(lib.d.ts, 1304, 11)) +>iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1248, 31)) >x : Symbol(x, Decl(symbolProperty14.ts, 4, 25)) } diff --git a/tests/baselines/reference/symbolProperty15.symbols b/tests/baselines/reference/symbolProperty15.symbols index fe630f8f82d1f..ac05eb6195e74 100644 --- a/tests/baselines/reference/symbolProperty15.symbols +++ b/tests/baselines/reference/symbolProperty15.symbols @@ -6,9 +6,9 @@ interface I { >I : Symbol(I, Decl(symbolProperty15.ts, 0, 11)) [Symbol.iterator]?: { x }; ->Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1247, 31)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1197, 53), Decl(lib.d.ts, 1303, 11)) ->iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1247, 31)) +>Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1248, 31)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1198, 53), Decl(lib.d.ts, 1304, 11)) +>iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1248, 31)) >x : Symbol(x, Decl(symbolProperty15.ts, 2, 25)) } diff --git a/tests/baselines/reference/symbolProperty16.symbols b/tests/baselines/reference/symbolProperty16.symbols index d87416cd43a6c..c45b22056af9c 100644 --- a/tests/baselines/reference/symbolProperty16.symbols +++ b/tests/baselines/reference/symbolProperty16.symbols @@ -3,18 +3,18 @@ class C { >C : Symbol(C, Decl(symbolProperty16.ts, 0, 0)) private [Symbol.iterator]: { x }; ->Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1247, 31)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1197, 53), Decl(lib.d.ts, 1303, 11)) ->iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1247, 31)) +>Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1248, 31)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1198, 53), Decl(lib.d.ts, 1304, 11)) +>iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1248, 31)) >x : Symbol(x, Decl(symbolProperty16.ts, 1, 32)) } interface I { >I : Symbol(I, Decl(symbolProperty16.ts, 2, 1)) [Symbol.iterator]: { x }; ->Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1247, 31)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1197, 53), Decl(lib.d.ts, 1303, 11)) ->iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1247, 31)) +>Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1248, 31)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1198, 53), Decl(lib.d.ts, 1304, 11)) +>iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1248, 31)) >x : Symbol(x, Decl(symbolProperty16.ts, 4, 24)) } diff --git a/tests/baselines/reference/symbolProperty18.symbols b/tests/baselines/reference/symbolProperty18.symbols index 4597eb81c0f22..40c5a86c0e91c 100644 --- a/tests/baselines/reference/symbolProperty18.symbols +++ b/tests/baselines/reference/symbolProperty18.symbols @@ -3,39 +3,39 @@ var i = { >i : Symbol(i, Decl(symbolProperty18.ts, 0, 3)) [Symbol.iterator]: 0, ->Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1247, 31)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1197, 53), Decl(lib.d.ts, 1303, 11)) ->iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1247, 31)) +>Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1248, 31)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1198, 53), Decl(lib.d.ts, 1304, 11)) +>iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1248, 31)) [Symbol.toStringTag]() { return "" }, ->Symbol.toStringTag : Symbol(SymbolConstructor.toStringTag, Decl(lib.d.ts, 1289, 24)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1197, 53), Decl(lib.d.ts, 1303, 11)) ->toStringTag : Symbol(SymbolConstructor.toStringTag, Decl(lib.d.ts, 1289, 24)) +>Symbol.toStringTag : Symbol(SymbolConstructor.toStringTag, Decl(lib.d.ts, 1290, 24)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1198, 53), Decl(lib.d.ts, 1304, 11)) +>toStringTag : Symbol(SymbolConstructor.toStringTag, Decl(lib.d.ts, 1290, 24)) set [Symbol.toPrimitive](p: boolean) { } ->Symbol.toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, 1283, 18)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1197, 53), Decl(lib.d.ts, 1303, 11)) ->toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, 1283, 18)) +>Symbol.toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, 1284, 18)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1198, 53), Decl(lib.d.ts, 1304, 11)) +>toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, 1284, 18)) >p : Symbol(p, Decl(symbolProperty18.ts, 3, 29)) } var it = i[Symbol.iterator]; >it : Symbol(it, Decl(symbolProperty18.ts, 6, 3)) >i : Symbol(i, Decl(symbolProperty18.ts, 0, 3)) ->Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1247, 31)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1197, 53), Decl(lib.d.ts, 1303, 11)) ->iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1247, 31)) +>Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1248, 31)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1198, 53), Decl(lib.d.ts, 1304, 11)) +>iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1248, 31)) var str = i[Symbol.toStringTag](); >str : Symbol(str, Decl(symbolProperty18.ts, 7, 3)) >i : Symbol(i, Decl(symbolProperty18.ts, 0, 3)) ->Symbol.toStringTag : Symbol(SymbolConstructor.toStringTag, Decl(lib.d.ts, 1289, 24)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1197, 53), Decl(lib.d.ts, 1303, 11)) ->toStringTag : Symbol(SymbolConstructor.toStringTag, Decl(lib.d.ts, 1289, 24)) +>Symbol.toStringTag : Symbol(SymbolConstructor.toStringTag, Decl(lib.d.ts, 1290, 24)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1198, 53), Decl(lib.d.ts, 1304, 11)) +>toStringTag : Symbol(SymbolConstructor.toStringTag, Decl(lib.d.ts, 1290, 24)) i[Symbol.toPrimitive] = false; >i : Symbol(i, Decl(symbolProperty18.ts, 0, 3)) ->Symbol.toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, 1283, 18)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1197, 53), Decl(lib.d.ts, 1303, 11)) ->toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, 1283, 18)) +>Symbol.toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, 1284, 18)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1198, 53), Decl(lib.d.ts, 1304, 11)) +>toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, 1284, 18)) diff --git a/tests/baselines/reference/symbolProperty19.symbols b/tests/baselines/reference/symbolProperty19.symbols index d3295b6507e3d..909c6394ec267 100644 --- a/tests/baselines/reference/symbolProperty19.symbols +++ b/tests/baselines/reference/symbolProperty19.symbols @@ -3,15 +3,15 @@ var i = { >i : Symbol(i, Decl(symbolProperty19.ts, 0, 3)) [Symbol.iterator]: { p: null }, ->Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1247, 31)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1197, 53), Decl(lib.d.ts, 1303, 11)) ->iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1247, 31)) +>Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1248, 31)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1198, 53), Decl(lib.d.ts, 1304, 11)) +>iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1248, 31)) >p : Symbol(p, Decl(symbolProperty19.ts, 1, 24)) [Symbol.toStringTag]() { return { p: undefined }; } ->Symbol.toStringTag : Symbol(SymbolConstructor.toStringTag, Decl(lib.d.ts, 1289, 24)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1197, 53), Decl(lib.d.ts, 1303, 11)) ->toStringTag : Symbol(SymbolConstructor.toStringTag, Decl(lib.d.ts, 1289, 24)) +>Symbol.toStringTag : Symbol(SymbolConstructor.toStringTag, Decl(lib.d.ts, 1290, 24)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1198, 53), Decl(lib.d.ts, 1304, 11)) +>toStringTag : Symbol(SymbolConstructor.toStringTag, Decl(lib.d.ts, 1290, 24)) >p : Symbol(p, Decl(symbolProperty19.ts, 2, 37)) >undefined : Symbol(undefined) } @@ -19,14 +19,14 @@ var i = { var it = i[Symbol.iterator]; >it : Symbol(it, Decl(symbolProperty19.ts, 5, 3)) >i : Symbol(i, Decl(symbolProperty19.ts, 0, 3)) ->Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1247, 31)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1197, 53), Decl(lib.d.ts, 1303, 11)) ->iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1247, 31)) +>Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1248, 31)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1198, 53), Decl(lib.d.ts, 1304, 11)) +>iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1248, 31)) var str = i[Symbol.toStringTag](); >str : Symbol(str, Decl(symbolProperty19.ts, 6, 3)) >i : Symbol(i, Decl(symbolProperty19.ts, 0, 3)) ->Symbol.toStringTag : Symbol(SymbolConstructor.toStringTag, Decl(lib.d.ts, 1289, 24)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1197, 53), Decl(lib.d.ts, 1303, 11)) ->toStringTag : Symbol(SymbolConstructor.toStringTag, Decl(lib.d.ts, 1289, 24)) +>Symbol.toStringTag : Symbol(SymbolConstructor.toStringTag, Decl(lib.d.ts, 1290, 24)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1198, 53), Decl(lib.d.ts, 1304, 11)) +>toStringTag : Symbol(SymbolConstructor.toStringTag, Decl(lib.d.ts, 1290, 24)) diff --git a/tests/baselines/reference/symbolProperty2.symbols b/tests/baselines/reference/symbolProperty2.symbols index ea698562ed2be..9d618e7751f87 100644 --- a/tests/baselines/reference/symbolProperty2.symbols +++ b/tests/baselines/reference/symbolProperty2.symbols @@ -1,7 +1,7 @@ === tests/cases/conformance/es6/Symbols/symbolProperty2.ts === var s = Symbol(); >s : Symbol(s, Decl(symbolProperty2.ts, 0, 3)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1197, 53), Decl(lib.d.ts, 1303, 11)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1198, 53), Decl(lib.d.ts, 1304, 11)) var x = { >x : Symbol(x, Decl(symbolProperty2.ts, 1, 3)) diff --git a/tests/baselines/reference/symbolProperty20.symbols b/tests/baselines/reference/symbolProperty20.symbols index 714b771b67e3f..b12874d028bf0 100644 --- a/tests/baselines/reference/symbolProperty20.symbols +++ b/tests/baselines/reference/symbolProperty20.symbols @@ -3,15 +3,15 @@ interface I { >I : Symbol(I, Decl(symbolProperty20.ts, 0, 0)) [Symbol.iterator]: (s: string) => string; ->Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1247, 31)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1197, 53), Decl(lib.d.ts, 1303, 11)) ->iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1247, 31)) +>Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1248, 31)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1198, 53), Decl(lib.d.ts, 1304, 11)) +>iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1248, 31)) >s : Symbol(s, Decl(symbolProperty20.ts, 1, 24)) [Symbol.toStringTag](s: number): number; ->Symbol.toStringTag : Symbol(SymbolConstructor.toStringTag, Decl(lib.d.ts, 1289, 24)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1197, 53), Decl(lib.d.ts, 1303, 11)) ->toStringTag : Symbol(SymbolConstructor.toStringTag, Decl(lib.d.ts, 1289, 24)) +>Symbol.toStringTag : Symbol(SymbolConstructor.toStringTag, Decl(lib.d.ts, 1290, 24)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1198, 53), Decl(lib.d.ts, 1304, 11)) +>toStringTag : Symbol(SymbolConstructor.toStringTag, Decl(lib.d.ts, 1290, 24)) >s : Symbol(s, Decl(symbolProperty20.ts, 2, 25)) } @@ -20,16 +20,16 @@ var i: I = { >I : Symbol(I, Decl(symbolProperty20.ts, 0, 0)) [Symbol.iterator]: s => s, ->Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1247, 31)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1197, 53), Decl(lib.d.ts, 1303, 11)) ->iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1247, 31)) +>Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1248, 31)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1198, 53), Decl(lib.d.ts, 1304, 11)) +>iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1248, 31)) >s : Symbol(s, Decl(symbolProperty20.ts, 6, 22)) >s : Symbol(s, Decl(symbolProperty20.ts, 6, 22)) [Symbol.toStringTag](n) { return n; } ->Symbol.toStringTag : Symbol(SymbolConstructor.toStringTag, Decl(lib.d.ts, 1289, 24)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1197, 53), Decl(lib.d.ts, 1303, 11)) ->toStringTag : Symbol(SymbolConstructor.toStringTag, Decl(lib.d.ts, 1289, 24)) +>Symbol.toStringTag : Symbol(SymbolConstructor.toStringTag, Decl(lib.d.ts, 1290, 24)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1198, 53), Decl(lib.d.ts, 1304, 11)) +>toStringTag : Symbol(SymbolConstructor.toStringTag, Decl(lib.d.ts, 1290, 24)) >n : Symbol(n, Decl(symbolProperty20.ts, 7, 25)) >n : Symbol(n, Decl(symbolProperty20.ts, 7, 25)) } diff --git a/tests/baselines/reference/symbolProperty21.symbols b/tests/baselines/reference/symbolProperty21.symbols index f2061b3bb2cd0..b0632e2eaaebb 100644 --- a/tests/baselines/reference/symbolProperty21.symbols +++ b/tests/baselines/reference/symbolProperty21.symbols @@ -5,15 +5,15 @@ interface I { >U : Symbol(U, Decl(symbolProperty21.ts, 0, 14)) [Symbol.unscopables]: T; ->Symbol.unscopables : Symbol(SymbolConstructor.unscopables, Decl(lib.d.ts, 1295, 24)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1197, 53), Decl(lib.d.ts, 1303, 11)) ->unscopables : Symbol(SymbolConstructor.unscopables, Decl(lib.d.ts, 1295, 24)) +>Symbol.unscopables : Symbol(SymbolConstructor.unscopables, Decl(lib.d.ts, 1296, 24)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1198, 53), Decl(lib.d.ts, 1304, 11)) +>unscopables : Symbol(SymbolConstructor.unscopables, Decl(lib.d.ts, 1296, 24)) >T : Symbol(T, Decl(symbolProperty21.ts, 0, 12)) [Symbol.isConcatSpreadable]: U; ->Symbol.isConcatSpreadable : Symbol(SymbolConstructor.isConcatSpreadable, Decl(lib.d.ts, 1241, 24)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1197, 53), Decl(lib.d.ts, 1303, 11)) ->isConcatSpreadable : Symbol(SymbolConstructor.isConcatSpreadable, Decl(lib.d.ts, 1241, 24)) +>Symbol.isConcatSpreadable : Symbol(SymbolConstructor.isConcatSpreadable, Decl(lib.d.ts, 1242, 24)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1198, 53), Decl(lib.d.ts, 1304, 11)) +>isConcatSpreadable : Symbol(SymbolConstructor.isConcatSpreadable, Decl(lib.d.ts, 1242, 24)) >U : Symbol(U, Decl(symbolProperty21.ts, 0, 14)) } @@ -34,18 +34,18 @@ foo({ >foo : Symbol(foo, Decl(symbolProperty21.ts, 3, 1)) [Symbol.isConcatSpreadable]: "", ->Symbol.isConcatSpreadable : Symbol(SymbolConstructor.isConcatSpreadable, Decl(lib.d.ts, 1241, 24)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1197, 53), Decl(lib.d.ts, 1303, 11)) ->isConcatSpreadable : Symbol(SymbolConstructor.isConcatSpreadable, Decl(lib.d.ts, 1241, 24)) +>Symbol.isConcatSpreadable : Symbol(SymbolConstructor.isConcatSpreadable, Decl(lib.d.ts, 1242, 24)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1198, 53), Decl(lib.d.ts, 1304, 11)) +>isConcatSpreadable : Symbol(SymbolConstructor.isConcatSpreadable, Decl(lib.d.ts, 1242, 24)) [Symbol.toPrimitive]: 0, ->Symbol.toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, 1283, 18)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1197, 53), Decl(lib.d.ts, 1303, 11)) ->toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, 1283, 18)) +>Symbol.toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, 1284, 18)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1198, 53), Decl(lib.d.ts, 1304, 11)) +>toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, 1284, 18)) [Symbol.unscopables]: true ->Symbol.unscopables : Symbol(SymbolConstructor.unscopables, Decl(lib.d.ts, 1295, 24)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1197, 53), Decl(lib.d.ts, 1303, 11)) ->unscopables : Symbol(SymbolConstructor.unscopables, Decl(lib.d.ts, 1295, 24)) +>Symbol.unscopables : Symbol(SymbolConstructor.unscopables, Decl(lib.d.ts, 1296, 24)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1198, 53), Decl(lib.d.ts, 1304, 11)) +>unscopables : Symbol(SymbolConstructor.unscopables, Decl(lib.d.ts, 1296, 24)) }); diff --git a/tests/baselines/reference/symbolProperty22.symbols b/tests/baselines/reference/symbolProperty22.symbols index d1bee54bd7b69..4c8ec1aa7f5d2 100644 --- a/tests/baselines/reference/symbolProperty22.symbols +++ b/tests/baselines/reference/symbolProperty22.symbols @@ -5,9 +5,9 @@ interface I { >U : Symbol(U, Decl(symbolProperty22.ts, 0, 14)) [Symbol.unscopables](x: T): U; ->Symbol.unscopables : Symbol(SymbolConstructor.unscopables, Decl(lib.d.ts, 1295, 24)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1197, 53), Decl(lib.d.ts, 1303, 11)) ->unscopables : Symbol(SymbolConstructor.unscopables, Decl(lib.d.ts, 1295, 24)) +>Symbol.unscopables : Symbol(SymbolConstructor.unscopables, Decl(lib.d.ts, 1296, 24)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1198, 53), Decl(lib.d.ts, 1304, 11)) +>unscopables : Symbol(SymbolConstructor.unscopables, Decl(lib.d.ts, 1296, 24)) >x : Symbol(x, Decl(symbolProperty22.ts, 1, 25)) >T : Symbol(T, Decl(symbolProperty22.ts, 0, 12)) >U : Symbol(U, Decl(symbolProperty22.ts, 0, 14)) @@ -27,9 +27,9 @@ declare function foo(p1: T, p2: I): U; foo("", { [Symbol.unscopables]: s => s.length }); >foo : Symbol(foo, Decl(symbolProperty22.ts, 2, 1)) ->Symbol.unscopables : Symbol(SymbolConstructor.unscopables, Decl(lib.d.ts, 1295, 24)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1197, 53), Decl(lib.d.ts, 1303, 11)) ->unscopables : Symbol(SymbolConstructor.unscopables, Decl(lib.d.ts, 1295, 24)) +>Symbol.unscopables : Symbol(SymbolConstructor.unscopables, Decl(lib.d.ts, 1296, 24)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1198, 53), Decl(lib.d.ts, 1304, 11)) +>unscopables : Symbol(SymbolConstructor.unscopables, Decl(lib.d.ts, 1296, 24)) >s : Symbol(s, Decl(symbolProperty22.ts, 6, 31)) >s.length : Symbol(String.length, Decl(lib.d.ts, 414, 19)) >s : Symbol(s, Decl(symbolProperty22.ts, 6, 31)) diff --git a/tests/baselines/reference/symbolProperty23.symbols b/tests/baselines/reference/symbolProperty23.symbols index 94dc416010e09..a8ebaf9534590 100644 --- a/tests/baselines/reference/symbolProperty23.symbols +++ b/tests/baselines/reference/symbolProperty23.symbols @@ -3,9 +3,9 @@ interface I { >I : Symbol(I, Decl(symbolProperty23.ts, 0, 0)) [Symbol.toPrimitive]: () => boolean; ->Symbol.toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, 1283, 18)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1197, 53), Decl(lib.d.ts, 1303, 11)) ->toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, 1283, 18)) +>Symbol.toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, 1284, 18)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1198, 53), Decl(lib.d.ts, 1304, 11)) +>toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, 1284, 18)) } class C implements I { @@ -13,9 +13,9 @@ class C implements I { >I : Symbol(I, Decl(symbolProperty23.ts, 0, 0)) [Symbol.toPrimitive]() { ->Symbol.toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, 1283, 18)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1197, 53), Decl(lib.d.ts, 1303, 11)) ->toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, 1283, 18)) +>Symbol.toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, 1284, 18)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1198, 53), Decl(lib.d.ts, 1304, 11)) +>toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, 1284, 18)) return true; } diff --git a/tests/baselines/reference/symbolProperty26.symbols b/tests/baselines/reference/symbolProperty26.symbols index 0850ec9cdaa59..b5c726712e4d2 100644 --- a/tests/baselines/reference/symbolProperty26.symbols +++ b/tests/baselines/reference/symbolProperty26.symbols @@ -3,9 +3,9 @@ class C1 { >C1 : Symbol(C1, Decl(symbolProperty26.ts, 0, 0)) [Symbol.toStringTag]() { ->Symbol.toStringTag : Symbol(SymbolConstructor.toStringTag, Decl(lib.d.ts, 1289, 24)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1197, 53), Decl(lib.d.ts, 1303, 11)) ->toStringTag : Symbol(SymbolConstructor.toStringTag, Decl(lib.d.ts, 1289, 24)) +>Symbol.toStringTag : Symbol(SymbolConstructor.toStringTag, Decl(lib.d.ts, 1290, 24)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1198, 53), Decl(lib.d.ts, 1304, 11)) +>toStringTag : Symbol(SymbolConstructor.toStringTag, Decl(lib.d.ts, 1290, 24)) return ""; } @@ -16,9 +16,9 @@ class C2 extends C1 { >C1 : Symbol(C1, Decl(symbolProperty26.ts, 0, 0)) [Symbol.toStringTag]() { ->Symbol.toStringTag : Symbol(SymbolConstructor.toStringTag, Decl(lib.d.ts, 1289, 24)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1197, 53), Decl(lib.d.ts, 1303, 11)) ->toStringTag : Symbol(SymbolConstructor.toStringTag, Decl(lib.d.ts, 1289, 24)) +>Symbol.toStringTag : Symbol(SymbolConstructor.toStringTag, Decl(lib.d.ts, 1290, 24)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1198, 53), Decl(lib.d.ts, 1304, 11)) +>toStringTag : Symbol(SymbolConstructor.toStringTag, Decl(lib.d.ts, 1290, 24)) return ""; } diff --git a/tests/baselines/reference/symbolProperty27.symbols b/tests/baselines/reference/symbolProperty27.symbols index ed56e55cca613..039963b02aad7 100644 --- a/tests/baselines/reference/symbolProperty27.symbols +++ b/tests/baselines/reference/symbolProperty27.symbols @@ -3,9 +3,9 @@ class C1 { >C1 : Symbol(C1, Decl(symbolProperty27.ts, 0, 0)) [Symbol.toStringTag]() { ->Symbol.toStringTag : Symbol(SymbolConstructor.toStringTag, Decl(lib.d.ts, 1289, 24)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1197, 53), Decl(lib.d.ts, 1303, 11)) ->toStringTag : Symbol(SymbolConstructor.toStringTag, Decl(lib.d.ts, 1289, 24)) +>Symbol.toStringTag : Symbol(SymbolConstructor.toStringTag, Decl(lib.d.ts, 1290, 24)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1198, 53), Decl(lib.d.ts, 1304, 11)) +>toStringTag : Symbol(SymbolConstructor.toStringTag, Decl(lib.d.ts, 1290, 24)) return {}; } @@ -16,9 +16,9 @@ class C2 extends C1 { >C1 : Symbol(C1, Decl(symbolProperty27.ts, 0, 0)) [Symbol.toStringTag]() { ->Symbol.toStringTag : Symbol(SymbolConstructor.toStringTag, Decl(lib.d.ts, 1289, 24)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1197, 53), Decl(lib.d.ts, 1303, 11)) ->toStringTag : Symbol(SymbolConstructor.toStringTag, Decl(lib.d.ts, 1289, 24)) +>Symbol.toStringTag : Symbol(SymbolConstructor.toStringTag, Decl(lib.d.ts, 1290, 24)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1198, 53), Decl(lib.d.ts, 1304, 11)) +>toStringTag : Symbol(SymbolConstructor.toStringTag, Decl(lib.d.ts, 1290, 24)) return ""; } diff --git a/tests/baselines/reference/symbolProperty28.symbols b/tests/baselines/reference/symbolProperty28.symbols index e5cdbb0ea6101..6ba9c126943c5 100644 --- a/tests/baselines/reference/symbolProperty28.symbols +++ b/tests/baselines/reference/symbolProperty28.symbols @@ -3,9 +3,9 @@ class C1 { >C1 : Symbol(C1, Decl(symbolProperty28.ts, 0, 0)) [Symbol.toStringTag]() { ->Symbol.toStringTag : Symbol(SymbolConstructor.toStringTag, Decl(lib.d.ts, 1289, 24)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1197, 53), Decl(lib.d.ts, 1303, 11)) ->toStringTag : Symbol(SymbolConstructor.toStringTag, Decl(lib.d.ts, 1289, 24)) +>Symbol.toStringTag : Symbol(SymbolConstructor.toStringTag, Decl(lib.d.ts, 1290, 24)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1198, 53), Decl(lib.d.ts, 1304, 11)) +>toStringTag : Symbol(SymbolConstructor.toStringTag, Decl(lib.d.ts, 1290, 24)) return { x: "" }; >x : Symbol(x, Decl(symbolProperty28.ts, 2, 16)) @@ -24,8 +24,8 @@ var obj = c[Symbol.toStringTag]().x; >obj : Symbol(obj, Decl(symbolProperty28.ts, 9, 3)) >c[Symbol.toStringTag]().x : Symbol(x, Decl(symbolProperty28.ts, 2, 16)) >c : Symbol(c, Decl(symbolProperty28.ts, 8, 3)) ->Symbol.toStringTag : Symbol(SymbolConstructor.toStringTag, Decl(lib.d.ts, 1289, 24)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1197, 53), Decl(lib.d.ts, 1303, 11)) ->toStringTag : Symbol(SymbolConstructor.toStringTag, Decl(lib.d.ts, 1289, 24)) +>Symbol.toStringTag : Symbol(SymbolConstructor.toStringTag, Decl(lib.d.ts, 1290, 24)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1198, 53), Decl(lib.d.ts, 1304, 11)) +>toStringTag : Symbol(SymbolConstructor.toStringTag, Decl(lib.d.ts, 1290, 24)) >x : Symbol(x, Decl(symbolProperty28.ts, 2, 16)) diff --git a/tests/baselines/reference/symbolProperty4.symbols b/tests/baselines/reference/symbolProperty4.symbols index 8a0d692de2281..99961ec662981 100644 --- a/tests/baselines/reference/symbolProperty4.symbols +++ b/tests/baselines/reference/symbolProperty4.symbols @@ -3,13 +3,13 @@ var x = { >x : Symbol(x, Decl(symbolProperty4.ts, 0, 3)) [Symbol()]: 0, ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1197, 53), Decl(lib.d.ts, 1303, 11)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1198, 53), Decl(lib.d.ts, 1304, 11)) [Symbol()]() { }, ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1197, 53), Decl(lib.d.ts, 1303, 11)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1198, 53), Decl(lib.d.ts, 1304, 11)) get [Symbol()]() { ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1197, 53), Decl(lib.d.ts, 1303, 11)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1198, 53), Decl(lib.d.ts, 1304, 11)) return 0; } diff --git a/tests/baselines/reference/symbolProperty40.symbols b/tests/baselines/reference/symbolProperty40.symbols index 246d0952c8901..62acefd45c242 100644 --- a/tests/baselines/reference/symbolProperty40.symbols +++ b/tests/baselines/reference/symbolProperty40.symbols @@ -3,21 +3,21 @@ class C { >C : Symbol(C, Decl(symbolProperty40.ts, 0, 0)) [Symbol.iterator](x: string): string; ->Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1247, 31)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1197, 53), Decl(lib.d.ts, 1303, 11)) ->iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1247, 31)) +>Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1248, 31)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1198, 53), Decl(lib.d.ts, 1304, 11)) +>iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1248, 31)) >x : Symbol(x, Decl(symbolProperty40.ts, 1, 22)) [Symbol.iterator](x: number): number; ->Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1247, 31)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1197, 53), Decl(lib.d.ts, 1303, 11)) ->iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1247, 31)) +>Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1248, 31)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1198, 53), Decl(lib.d.ts, 1304, 11)) +>iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1248, 31)) >x : Symbol(x, Decl(symbolProperty40.ts, 2, 22)) [Symbol.iterator](x: any) { ->Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1247, 31)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1197, 53), Decl(lib.d.ts, 1303, 11)) ->iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1247, 31)) +>Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1248, 31)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1198, 53), Decl(lib.d.ts, 1304, 11)) +>iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1248, 31)) >x : Symbol(x, Decl(symbolProperty40.ts, 3, 22)) return undefined; @@ -31,13 +31,13 @@ var c = new C; c[Symbol.iterator](""); >c : Symbol(c, Decl(symbolProperty40.ts, 8, 3)) ->Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1247, 31)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1197, 53), Decl(lib.d.ts, 1303, 11)) ->iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1247, 31)) +>Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1248, 31)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1198, 53), Decl(lib.d.ts, 1304, 11)) +>iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1248, 31)) c[Symbol.iterator](0); >c : Symbol(c, Decl(symbolProperty40.ts, 8, 3)) ->Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1247, 31)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1197, 53), Decl(lib.d.ts, 1303, 11)) ->iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1247, 31)) +>Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1248, 31)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1198, 53), Decl(lib.d.ts, 1304, 11)) +>iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1248, 31)) diff --git a/tests/baselines/reference/symbolProperty41.symbols b/tests/baselines/reference/symbolProperty41.symbols index 2872f6cb13493..1635419694d01 100644 --- a/tests/baselines/reference/symbolProperty41.symbols +++ b/tests/baselines/reference/symbolProperty41.symbols @@ -3,24 +3,24 @@ class C { >C : Symbol(C, Decl(symbolProperty41.ts, 0, 0)) [Symbol.iterator](x: string): { x: string }; ->Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1247, 31)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1197, 53), Decl(lib.d.ts, 1303, 11)) ->iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1247, 31)) +>Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1248, 31)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1198, 53), Decl(lib.d.ts, 1304, 11)) +>iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1248, 31)) >x : Symbol(x, Decl(symbolProperty41.ts, 1, 22)) >x : Symbol(x, Decl(symbolProperty41.ts, 1, 35)) [Symbol.iterator](x: "hello"): { x: string; hello: string }; ->Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1247, 31)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1197, 53), Decl(lib.d.ts, 1303, 11)) ->iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1247, 31)) +>Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1248, 31)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1198, 53), Decl(lib.d.ts, 1304, 11)) +>iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1248, 31)) >x : Symbol(x, Decl(symbolProperty41.ts, 2, 22)) >x : Symbol(x, Decl(symbolProperty41.ts, 2, 36)) >hello : Symbol(hello, Decl(symbolProperty41.ts, 2, 47)) [Symbol.iterator](x: any) { ->Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1247, 31)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1197, 53), Decl(lib.d.ts, 1303, 11)) ->iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1247, 31)) +>Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1248, 31)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1198, 53), Decl(lib.d.ts, 1304, 11)) +>iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1248, 31)) >x : Symbol(x, Decl(symbolProperty41.ts, 3, 22)) return undefined; @@ -34,13 +34,13 @@ var c = new C; c[Symbol.iterator](""); >c : Symbol(c, Decl(symbolProperty41.ts, 8, 3)) ->Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1247, 31)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1197, 53), Decl(lib.d.ts, 1303, 11)) ->iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1247, 31)) +>Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1248, 31)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1198, 53), Decl(lib.d.ts, 1304, 11)) +>iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1248, 31)) c[Symbol.iterator]("hello"); >c : Symbol(c, Decl(symbolProperty41.ts, 8, 3)) ->Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1247, 31)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1197, 53), Decl(lib.d.ts, 1303, 11)) ->iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1247, 31)) +>Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1248, 31)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1198, 53), Decl(lib.d.ts, 1304, 11)) +>iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1248, 31)) diff --git a/tests/baselines/reference/symbolProperty45.symbols b/tests/baselines/reference/symbolProperty45.symbols index 1f691f8827d4c..67fce3aefab3e 100644 --- a/tests/baselines/reference/symbolProperty45.symbols +++ b/tests/baselines/reference/symbolProperty45.symbols @@ -3,16 +3,16 @@ class C { >C : Symbol(C, Decl(symbolProperty45.ts, 0, 0)) get [Symbol.hasInstance]() { ->Symbol.hasInstance : Symbol(SymbolConstructor.hasInstance, Decl(lib.d.ts, 1233, 32)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1197, 53), Decl(lib.d.ts, 1303, 11)) ->hasInstance : Symbol(SymbolConstructor.hasInstance, Decl(lib.d.ts, 1233, 32)) +>Symbol.hasInstance : Symbol(SymbolConstructor.hasInstance, Decl(lib.d.ts, 1234, 32)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1198, 53), Decl(lib.d.ts, 1304, 11)) +>hasInstance : Symbol(SymbolConstructor.hasInstance, Decl(lib.d.ts, 1234, 32)) return ""; } get [Symbol.toPrimitive]() { ->Symbol.toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, 1283, 18)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1197, 53), Decl(lib.d.ts, 1303, 11)) ->toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, 1283, 18)) +>Symbol.toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, 1284, 18)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1198, 53), Decl(lib.d.ts, 1304, 11)) +>toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, 1284, 18)) return ""; } diff --git a/tests/baselines/reference/symbolProperty5.symbols b/tests/baselines/reference/symbolProperty5.symbols index e9bda77fd7152..4dc58d689d8ac 100644 --- a/tests/baselines/reference/symbolProperty5.symbols +++ b/tests/baselines/reference/symbolProperty5.symbols @@ -3,19 +3,19 @@ var x = { >x : Symbol(x, Decl(symbolProperty5.ts, 0, 3)) [Symbol.iterator]: 0, ->Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1247, 31)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1197, 53), Decl(lib.d.ts, 1303, 11)) ->iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1247, 31)) +>Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1248, 31)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1198, 53), Decl(lib.d.ts, 1304, 11)) +>iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1248, 31)) [Symbol.toPrimitive]() { }, ->Symbol.toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, 1283, 18)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1197, 53), Decl(lib.d.ts, 1303, 11)) ->toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, 1283, 18)) +>Symbol.toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, 1284, 18)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1198, 53), Decl(lib.d.ts, 1304, 11)) +>toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, 1284, 18)) get [Symbol.toStringTag]() { ->Symbol.toStringTag : Symbol(SymbolConstructor.toStringTag, Decl(lib.d.ts, 1289, 24)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1197, 53), Decl(lib.d.ts, 1303, 11)) ->toStringTag : Symbol(SymbolConstructor.toStringTag, Decl(lib.d.ts, 1289, 24)) +>Symbol.toStringTag : Symbol(SymbolConstructor.toStringTag, Decl(lib.d.ts, 1290, 24)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1198, 53), Decl(lib.d.ts, 1304, 11)) +>toStringTag : Symbol(SymbolConstructor.toStringTag, Decl(lib.d.ts, 1290, 24)) return 0; } diff --git a/tests/baselines/reference/symbolProperty50.symbols b/tests/baselines/reference/symbolProperty50.symbols index 69a695e6c5bbf..9201435c09eb1 100644 --- a/tests/baselines/reference/symbolProperty50.symbols +++ b/tests/baselines/reference/symbolProperty50.symbols @@ -9,8 +9,8 @@ module M { >C : Symbol(C, Decl(symbolProperty50.ts, 1, 24)) [Symbol.iterator]() { } ->Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1247, 31)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1197, 53), Decl(lib.d.ts, 1303, 11)) ->iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1247, 31)) +>Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1248, 31)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1198, 53), Decl(lib.d.ts, 1304, 11)) +>iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1248, 31)) } } diff --git a/tests/baselines/reference/symbolProperty51.symbols b/tests/baselines/reference/symbolProperty51.symbols index e045d35f13fce..199c51e65a3aa 100644 --- a/tests/baselines/reference/symbolProperty51.symbols +++ b/tests/baselines/reference/symbolProperty51.symbols @@ -9,8 +9,8 @@ module M { >C : Symbol(C, Decl(symbolProperty51.ts, 1, 21)) [Symbol.iterator]() { } ->Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1247, 31)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1197, 53), Decl(lib.d.ts, 1303, 11)) ->iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1247, 31)) +>Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1248, 31)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1198, 53), Decl(lib.d.ts, 1304, 11)) +>iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1248, 31)) } } diff --git a/tests/baselines/reference/symbolProperty55.symbols b/tests/baselines/reference/symbolProperty55.symbols index 077199e496904..95521c7e7149a 100644 --- a/tests/baselines/reference/symbolProperty55.symbols +++ b/tests/baselines/reference/symbolProperty55.symbols @@ -3,9 +3,9 @@ var obj = { >obj : Symbol(obj, Decl(symbolProperty55.ts, 0, 3)) [Symbol.iterator]: 0 ->Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1247, 31)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1197, 53), Decl(lib.d.ts, 1303, 11)) ->iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1247, 31)) +>Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1248, 31)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1198, 53), Decl(lib.d.ts, 1304, 11)) +>iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1248, 31)) }; @@ -14,13 +14,13 @@ module M { var Symbol: SymbolConstructor; >Symbol : Symbol(Symbol, Decl(symbolProperty55.ts, 5, 7)) ->SymbolConstructor : Symbol(SymbolConstructor, Decl(lib.d.ts, 1207, 1)) +>SymbolConstructor : Symbol(SymbolConstructor, Decl(lib.d.ts, 1208, 1)) // The following should be of type 'any'. This is because even though obj has a property keyed by Symbol.iterator, // the key passed in here is the *wrong* Symbol.iterator. It is not the iterator property of the global Symbol. obj[Symbol.iterator]; >obj : Symbol(obj, Decl(symbolProperty55.ts, 0, 3)) ->Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1247, 31)) +>Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1248, 31)) >Symbol : Symbol(Symbol, Decl(symbolProperty55.ts, 5, 7)) ->iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1247, 31)) +>iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1248, 31)) } diff --git a/tests/baselines/reference/symbolProperty56.symbols b/tests/baselines/reference/symbolProperty56.symbols index a76ab0418cc47..97f9966e19613 100644 --- a/tests/baselines/reference/symbolProperty56.symbols +++ b/tests/baselines/reference/symbolProperty56.symbols @@ -3,9 +3,9 @@ var obj = { >obj : Symbol(obj, Decl(symbolProperty56.ts, 0, 3)) [Symbol.iterator]: 0 ->Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1247, 31)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1197, 53), Decl(lib.d.ts, 1303, 11)) ->iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1247, 31)) +>Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1248, 31)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1198, 53), Decl(lib.d.ts, 1304, 11)) +>iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1248, 31)) }; diff --git a/tests/baselines/reference/symbolProperty57.symbols b/tests/baselines/reference/symbolProperty57.symbols index e98cf96380723..bc1497aaa1479 100644 --- a/tests/baselines/reference/symbolProperty57.symbols +++ b/tests/baselines/reference/symbolProperty57.symbols @@ -3,14 +3,14 @@ var obj = { >obj : Symbol(obj, Decl(symbolProperty57.ts, 0, 3)) [Symbol.iterator]: 0 ->Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1247, 31)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1197, 53), Decl(lib.d.ts, 1303, 11)) ->iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1247, 31)) +>Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1248, 31)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1198, 53), Decl(lib.d.ts, 1304, 11)) +>iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1248, 31)) }; // Should give type 'any'. obj[Symbol["nonsense"]]; >obj : Symbol(obj, Decl(symbolProperty57.ts, 0, 3)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1197, 53), Decl(lib.d.ts, 1303, 11)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1198, 53), Decl(lib.d.ts, 1304, 11)) diff --git a/tests/baselines/reference/symbolProperty6.symbols b/tests/baselines/reference/symbolProperty6.symbols index 8b0e62e406890..0dbda66432f52 100644 --- a/tests/baselines/reference/symbolProperty6.symbols +++ b/tests/baselines/reference/symbolProperty6.symbols @@ -3,24 +3,24 @@ class C { >C : Symbol(C, Decl(symbolProperty6.ts, 0, 0)) [Symbol.iterator] = 0; ->Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1247, 31)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1197, 53), Decl(lib.d.ts, 1303, 11)) ->iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1247, 31)) +>Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1248, 31)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1198, 53), Decl(lib.d.ts, 1304, 11)) +>iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1248, 31)) [Symbol.unscopables]: number; ->Symbol.unscopables : Symbol(SymbolConstructor.unscopables, Decl(lib.d.ts, 1295, 24)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1197, 53), Decl(lib.d.ts, 1303, 11)) ->unscopables : Symbol(SymbolConstructor.unscopables, Decl(lib.d.ts, 1295, 24)) +>Symbol.unscopables : Symbol(SymbolConstructor.unscopables, Decl(lib.d.ts, 1296, 24)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1198, 53), Decl(lib.d.ts, 1304, 11)) +>unscopables : Symbol(SymbolConstructor.unscopables, Decl(lib.d.ts, 1296, 24)) [Symbol.toPrimitive]() { } ->Symbol.toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, 1283, 18)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1197, 53), Decl(lib.d.ts, 1303, 11)) ->toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, 1283, 18)) +>Symbol.toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, 1284, 18)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1198, 53), Decl(lib.d.ts, 1304, 11)) +>toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, 1284, 18)) get [Symbol.toStringTag]() { ->Symbol.toStringTag : Symbol(SymbolConstructor.toStringTag, Decl(lib.d.ts, 1289, 24)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1197, 53), Decl(lib.d.ts, 1303, 11)) ->toStringTag : Symbol(SymbolConstructor.toStringTag, Decl(lib.d.ts, 1289, 24)) +>Symbol.toStringTag : Symbol(SymbolConstructor.toStringTag, Decl(lib.d.ts, 1290, 24)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1198, 53), Decl(lib.d.ts, 1304, 11)) +>toStringTag : Symbol(SymbolConstructor.toStringTag, Decl(lib.d.ts, 1290, 24)) return 0; } diff --git a/tests/baselines/reference/symbolProperty8.symbols b/tests/baselines/reference/symbolProperty8.symbols index a1a4d1d50dfb6..07f572b03bc36 100644 --- a/tests/baselines/reference/symbolProperty8.symbols +++ b/tests/baselines/reference/symbolProperty8.symbols @@ -3,12 +3,12 @@ interface I { >I : Symbol(I, Decl(symbolProperty8.ts, 0, 0)) [Symbol.unscopables]: number; ->Symbol.unscopables : Symbol(SymbolConstructor.unscopables, Decl(lib.d.ts, 1295, 24)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1197, 53), Decl(lib.d.ts, 1303, 11)) ->unscopables : Symbol(SymbolConstructor.unscopables, Decl(lib.d.ts, 1295, 24)) +>Symbol.unscopables : Symbol(SymbolConstructor.unscopables, Decl(lib.d.ts, 1296, 24)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1198, 53), Decl(lib.d.ts, 1304, 11)) +>unscopables : Symbol(SymbolConstructor.unscopables, Decl(lib.d.ts, 1296, 24)) [Symbol.toPrimitive](); ->Symbol.toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, 1283, 18)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1197, 53), Decl(lib.d.ts, 1303, 11)) ->toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, 1283, 18)) +>Symbol.toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, 1284, 18)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1198, 53), Decl(lib.d.ts, 1304, 11)) +>toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, 1284, 18)) } diff --git a/tests/baselines/reference/symbolType11.symbols b/tests/baselines/reference/symbolType11.symbols index 6c4001fa4c85a..11be00dba4076 100644 --- a/tests/baselines/reference/symbolType11.symbols +++ b/tests/baselines/reference/symbolType11.symbols @@ -1,9 +1,9 @@ === tests/cases/conformance/es6/Symbols/symbolType11.ts === var s = Symbol.for("logical"); >s : Symbol(s, Decl(symbolType11.ts, 0, 3)) ->Symbol.for : Symbol(SymbolConstructor.for, Decl(lib.d.ts, 1219, 42)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1197, 53), Decl(lib.d.ts, 1303, 11)) ->for : Symbol(SymbolConstructor.for, Decl(lib.d.ts, 1219, 42)) +>Symbol.for : Symbol(SymbolConstructor.for, Decl(lib.d.ts, 1220, 42)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1198, 53), Decl(lib.d.ts, 1304, 11)) +>for : Symbol(SymbolConstructor.for, Decl(lib.d.ts, 1220, 42)) s && s; >s : Symbol(s, Decl(symbolType11.ts, 0, 3)) diff --git a/tests/baselines/reference/symbolType16.symbols b/tests/baselines/reference/symbolType16.symbols index 7a54b0efcbe72..7791f4ee2ba96 100644 --- a/tests/baselines/reference/symbolType16.symbols +++ b/tests/baselines/reference/symbolType16.symbols @@ -1,6 +1,6 @@ === tests/cases/conformance/es6/Symbols/symbolType16.ts === interface Symbol { ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1197, 53), Decl(lib.d.ts, 1303, 11), Decl(symbolType16.ts, 0, 0)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1198, 53), Decl(lib.d.ts, 1304, 11), Decl(symbolType16.ts, 0, 0)) newSymbolProp: number; >newSymbolProp : Symbol(newSymbolProp, Decl(symbolType16.ts, 0, 18)) diff --git a/tests/baselines/reference/templateStringWithEmbeddedNewOperatorES6.symbols b/tests/baselines/reference/templateStringWithEmbeddedNewOperatorES6.symbols index a6e319c0dfa7e..7feac825ac9d1 100644 --- a/tests/baselines/reference/templateStringWithEmbeddedNewOperatorES6.symbols +++ b/tests/baselines/reference/templateStringWithEmbeddedNewOperatorES6.symbols @@ -1,5 +1,5 @@ === tests/cases/conformance/es6/templates/templateStringWithEmbeddedNewOperatorES6.ts === var x = `abc${ new String("Hi") }def`; >x : Symbol(x, Decl(templateStringWithEmbeddedNewOperatorES6.ts, 0, 3)) ->String : Symbol(String, Decl(lib.d.ts, 275, 1), Decl(lib.d.ts, 443, 11), Decl(lib.d.ts, 1549, 1)) +>String : Symbol(String, Decl(lib.d.ts, 275, 1), Decl(lib.d.ts, 443, 11), Decl(lib.d.ts, 1550, 1)) diff --git a/tests/baselines/reference/typedArrays.symbols b/tests/baselines/reference/typedArrays.symbols index ef9f533bb58e3..66499f844d343 100644 --- a/tests/baselines/reference/typedArrays.symbols +++ b/tests/baselines/reference/typedArrays.symbols @@ -8,39 +8,39 @@ function CreateTypedArrayTypes() { typedArrays[0] = Int8Array; >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 2, 7)) ->Int8Array : Symbol(Int8Array, Decl(lib.d.ts, 2118, 42), Decl(lib.d.ts, 2408, 11)) +>Int8Array : Symbol(Int8Array, Decl(lib.d.ts, 2119, 42), Decl(lib.d.ts, 2409, 11)) typedArrays[1] = Uint8Array; >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 2, 7)) ->Uint8Array : Symbol(Uint8Array, Decl(lib.d.ts, 2408, 44), Decl(lib.d.ts, 2698, 11)) +>Uint8Array : Symbol(Uint8Array, Decl(lib.d.ts, 2409, 44), Decl(lib.d.ts, 2699, 11)) typedArrays[2] = Int16Array; >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 2, 7)) ->Int16Array : Symbol(Int16Array, Decl(lib.d.ts, 2988, 60), Decl(lib.d.ts, 3278, 11)) +>Int16Array : Symbol(Int16Array, Decl(lib.d.ts, 2989, 60), Decl(lib.d.ts, 3279, 11)) typedArrays[3] = Uint16Array; >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 2, 7)) ->Uint16Array : Symbol(Uint16Array, Decl(lib.d.ts, 3278, 46), Decl(lib.d.ts, 3568, 11)) +>Uint16Array : Symbol(Uint16Array, Decl(lib.d.ts, 3279, 46), Decl(lib.d.ts, 3569, 11)) typedArrays[4] = Int32Array; >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 2, 7)) ->Int32Array : Symbol(Int32Array, Decl(lib.d.ts, 3568, 48), Decl(lib.d.ts, 3858, 11)) +>Int32Array : Symbol(Int32Array, Decl(lib.d.ts, 3569, 48), Decl(lib.d.ts, 3859, 11)) typedArrays[5] = Uint32Array; >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 2, 7)) ->Uint32Array : Symbol(Uint32Array, Decl(lib.d.ts, 3858, 46), Decl(lib.d.ts, 4148, 11)) +>Uint32Array : Symbol(Uint32Array, Decl(lib.d.ts, 3859, 46), Decl(lib.d.ts, 4149, 11)) typedArrays[6] = Float32Array; >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 2, 7)) ->Float32Array : Symbol(Float32Array, Decl(lib.d.ts, 4148, 48), Decl(lib.d.ts, 4438, 11)) +>Float32Array : Symbol(Float32Array, Decl(lib.d.ts, 4149, 48), Decl(lib.d.ts, 4439, 11)) typedArrays[7] = Float64Array; >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 2, 7)) ->Float64Array : Symbol(Float64Array, Decl(lib.d.ts, 4438, 50), Decl(lib.d.ts, 4728, 11)) +>Float64Array : Symbol(Float64Array, Decl(lib.d.ts, 4439, 50), Decl(lib.d.ts, 4729, 11)) typedArrays[8] = Uint8ClampedArray; >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 2, 7)) ->Uint8ClampedArray : Symbol(Uint8ClampedArray, Decl(lib.d.ts, 2698, 46), Decl(lib.d.ts, 2988, 11)) +>Uint8ClampedArray : Symbol(Uint8ClampedArray, Decl(lib.d.ts, 2699, 46), Decl(lib.d.ts, 2989, 11)) return typedArrays; >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 2, 7)) @@ -55,47 +55,47 @@ function CreateTypedArrayInstancesFromLength(obj: number) { typedArrays[0] = new Int8Array(obj); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 17, 7)) ->Int8Array : Symbol(Int8Array, Decl(lib.d.ts, 2118, 42), Decl(lib.d.ts, 2408, 11)) +>Int8Array : Symbol(Int8Array, Decl(lib.d.ts, 2119, 42), Decl(lib.d.ts, 2409, 11)) >obj : Symbol(obj, Decl(typedArrays.ts, 16, 45)) typedArrays[1] = new Uint8Array(obj); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 17, 7)) ->Uint8Array : Symbol(Uint8Array, Decl(lib.d.ts, 2408, 44), Decl(lib.d.ts, 2698, 11)) +>Uint8Array : Symbol(Uint8Array, Decl(lib.d.ts, 2409, 44), Decl(lib.d.ts, 2699, 11)) >obj : Symbol(obj, Decl(typedArrays.ts, 16, 45)) typedArrays[2] = new Int16Array(obj); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 17, 7)) ->Int16Array : Symbol(Int16Array, Decl(lib.d.ts, 2988, 60), Decl(lib.d.ts, 3278, 11)) +>Int16Array : Symbol(Int16Array, Decl(lib.d.ts, 2989, 60), Decl(lib.d.ts, 3279, 11)) >obj : Symbol(obj, Decl(typedArrays.ts, 16, 45)) typedArrays[3] = new Uint16Array(obj); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 17, 7)) ->Uint16Array : Symbol(Uint16Array, Decl(lib.d.ts, 3278, 46), Decl(lib.d.ts, 3568, 11)) +>Uint16Array : Symbol(Uint16Array, Decl(lib.d.ts, 3279, 46), Decl(lib.d.ts, 3569, 11)) >obj : Symbol(obj, Decl(typedArrays.ts, 16, 45)) typedArrays[4] = new Int32Array(obj); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 17, 7)) ->Int32Array : Symbol(Int32Array, Decl(lib.d.ts, 3568, 48), Decl(lib.d.ts, 3858, 11)) +>Int32Array : Symbol(Int32Array, Decl(lib.d.ts, 3569, 48), Decl(lib.d.ts, 3859, 11)) >obj : Symbol(obj, Decl(typedArrays.ts, 16, 45)) typedArrays[5] = new Uint32Array(obj); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 17, 7)) ->Uint32Array : Symbol(Uint32Array, Decl(lib.d.ts, 3858, 46), Decl(lib.d.ts, 4148, 11)) +>Uint32Array : Symbol(Uint32Array, Decl(lib.d.ts, 3859, 46), Decl(lib.d.ts, 4149, 11)) >obj : Symbol(obj, Decl(typedArrays.ts, 16, 45)) typedArrays[6] = new Float32Array(obj); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 17, 7)) ->Float32Array : Symbol(Float32Array, Decl(lib.d.ts, 4148, 48), Decl(lib.d.ts, 4438, 11)) +>Float32Array : Symbol(Float32Array, Decl(lib.d.ts, 4149, 48), Decl(lib.d.ts, 4439, 11)) >obj : Symbol(obj, Decl(typedArrays.ts, 16, 45)) typedArrays[7] = new Float64Array(obj); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 17, 7)) ->Float64Array : Symbol(Float64Array, Decl(lib.d.ts, 4438, 50), Decl(lib.d.ts, 4728, 11)) +>Float64Array : Symbol(Float64Array, Decl(lib.d.ts, 4439, 50), Decl(lib.d.ts, 4729, 11)) >obj : Symbol(obj, Decl(typedArrays.ts, 16, 45)) typedArrays[8] = new Uint8ClampedArray(obj); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 17, 7)) ->Uint8ClampedArray : Symbol(Uint8ClampedArray, Decl(lib.d.ts, 2698, 46), Decl(lib.d.ts, 2988, 11)) +>Uint8ClampedArray : Symbol(Uint8ClampedArray, Decl(lib.d.ts, 2699, 46), Decl(lib.d.ts, 2989, 11)) >obj : Symbol(obj, Decl(typedArrays.ts, 16, 45)) return typedArrays; @@ -111,47 +111,47 @@ function CreateTypedArrayInstancesFromArray(obj: number[]) { typedArrays[0] = new Int8Array(obj); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 32, 7)) ->Int8Array : Symbol(Int8Array, Decl(lib.d.ts, 2118, 42), Decl(lib.d.ts, 2408, 11)) +>Int8Array : Symbol(Int8Array, Decl(lib.d.ts, 2119, 42), Decl(lib.d.ts, 2409, 11)) >obj : Symbol(obj, Decl(typedArrays.ts, 31, 44)) typedArrays[1] = new Uint8Array(obj); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 32, 7)) ->Uint8Array : Symbol(Uint8Array, Decl(lib.d.ts, 2408, 44), Decl(lib.d.ts, 2698, 11)) +>Uint8Array : Symbol(Uint8Array, Decl(lib.d.ts, 2409, 44), Decl(lib.d.ts, 2699, 11)) >obj : Symbol(obj, Decl(typedArrays.ts, 31, 44)) typedArrays[2] = new Int16Array(obj); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 32, 7)) ->Int16Array : Symbol(Int16Array, Decl(lib.d.ts, 2988, 60), Decl(lib.d.ts, 3278, 11)) +>Int16Array : Symbol(Int16Array, Decl(lib.d.ts, 2989, 60), Decl(lib.d.ts, 3279, 11)) >obj : Symbol(obj, Decl(typedArrays.ts, 31, 44)) typedArrays[3] = new Uint16Array(obj); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 32, 7)) ->Uint16Array : Symbol(Uint16Array, Decl(lib.d.ts, 3278, 46), Decl(lib.d.ts, 3568, 11)) +>Uint16Array : Symbol(Uint16Array, Decl(lib.d.ts, 3279, 46), Decl(lib.d.ts, 3569, 11)) >obj : Symbol(obj, Decl(typedArrays.ts, 31, 44)) typedArrays[4] = new Int32Array(obj); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 32, 7)) ->Int32Array : Symbol(Int32Array, Decl(lib.d.ts, 3568, 48), Decl(lib.d.ts, 3858, 11)) +>Int32Array : Symbol(Int32Array, Decl(lib.d.ts, 3569, 48), Decl(lib.d.ts, 3859, 11)) >obj : Symbol(obj, Decl(typedArrays.ts, 31, 44)) typedArrays[5] = new Uint32Array(obj); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 32, 7)) ->Uint32Array : Symbol(Uint32Array, Decl(lib.d.ts, 3858, 46), Decl(lib.d.ts, 4148, 11)) +>Uint32Array : Symbol(Uint32Array, Decl(lib.d.ts, 3859, 46), Decl(lib.d.ts, 4149, 11)) >obj : Symbol(obj, Decl(typedArrays.ts, 31, 44)) typedArrays[6] = new Float32Array(obj); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 32, 7)) ->Float32Array : Symbol(Float32Array, Decl(lib.d.ts, 4148, 48), Decl(lib.d.ts, 4438, 11)) +>Float32Array : Symbol(Float32Array, Decl(lib.d.ts, 4149, 48), Decl(lib.d.ts, 4439, 11)) >obj : Symbol(obj, Decl(typedArrays.ts, 31, 44)) typedArrays[7] = new Float64Array(obj); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 32, 7)) ->Float64Array : Symbol(Float64Array, Decl(lib.d.ts, 4438, 50), Decl(lib.d.ts, 4728, 11)) +>Float64Array : Symbol(Float64Array, Decl(lib.d.ts, 4439, 50), Decl(lib.d.ts, 4729, 11)) >obj : Symbol(obj, Decl(typedArrays.ts, 31, 44)) typedArrays[8] = new Uint8ClampedArray(obj); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 32, 7)) ->Uint8ClampedArray : Symbol(Uint8ClampedArray, Decl(lib.d.ts, 2698, 46), Decl(lib.d.ts, 2988, 11)) +>Uint8ClampedArray : Symbol(Uint8ClampedArray, Decl(lib.d.ts, 2699, 46), Decl(lib.d.ts, 2989, 11)) >obj : Symbol(obj, Decl(typedArrays.ts, 31, 44)) return typedArrays; @@ -167,65 +167,65 @@ function CreateIntegerTypedArraysFromArray2(obj:number[]) { typedArrays[0] = Int8Array.from(obj); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 47, 7)) ->Int8Array.from : Symbol(Int8ArrayConstructor.from, Decl(lib.d.ts, 2398, 38)) ->Int8Array : Symbol(Int8Array, Decl(lib.d.ts, 2118, 42), Decl(lib.d.ts, 2408, 11)) ->from : Symbol(Int8ArrayConstructor.from, Decl(lib.d.ts, 2398, 38)) +>Int8Array.from : Symbol(Int8ArrayConstructor.from, Decl(lib.d.ts, 2399, 38)) +>Int8Array : Symbol(Int8Array, Decl(lib.d.ts, 2119, 42), Decl(lib.d.ts, 2409, 11)) +>from : Symbol(Int8ArrayConstructor.from, Decl(lib.d.ts, 2399, 38)) >obj : Symbol(obj, Decl(typedArrays.ts, 46, 44)) typedArrays[1] = Uint8Array.from(obj); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 47, 7)) ->Uint8Array.from : Symbol(Uint8ArrayConstructor.from, Decl(lib.d.ts, 2688, 39)) ->Uint8Array : Symbol(Uint8Array, Decl(lib.d.ts, 2408, 44), Decl(lib.d.ts, 2698, 11)) ->from : Symbol(Uint8ArrayConstructor.from, Decl(lib.d.ts, 2688, 39)) +>Uint8Array.from : Symbol(Uint8ArrayConstructor.from, Decl(lib.d.ts, 2689, 39)) +>Uint8Array : Symbol(Uint8Array, Decl(lib.d.ts, 2409, 44), Decl(lib.d.ts, 2699, 11)) +>from : Symbol(Uint8ArrayConstructor.from, Decl(lib.d.ts, 2689, 39)) >obj : Symbol(obj, Decl(typedArrays.ts, 46, 44)) typedArrays[2] = Int16Array.from(obj); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 47, 7)) ->Int16Array.from : Symbol(Int16ArrayConstructor.from, Decl(lib.d.ts, 3268, 39)) ->Int16Array : Symbol(Int16Array, Decl(lib.d.ts, 2988, 60), Decl(lib.d.ts, 3278, 11)) ->from : Symbol(Int16ArrayConstructor.from, Decl(lib.d.ts, 3268, 39)) +>Int16Array.from : Symbol(Int16ArrayConstructor.from, Decl(lib.d.ts, 3269, 39)) +>Int16Array : Symbol(Int16Array, Decl(lib.d.ts, 2989, 60), Decl(lib.d.ts, 3279, 11)) +>from : Symbol(Int16ArrayConstructor.from, Decl(lib.d.ts, 3269, 39)) >obj : Symbol(obj, Decl(typedArrays.ts, 46, 44)) typedArrays[3] = Uint16Array.from(obj); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 47, 7)) ->Uint16Array.from : Symbol(Uint16ArrayConstructor.from, Decl(lib.d.ts, 3558, 40)) ->Uint16Array : Symbol(Uint16Array, Decl(lib.d.ts, 3278, 46), Decl(lib.d.ts, 3568, 11)) ->from : Symbol(Uint16ArrayConstructor.from, Decl(lib.d.ts, 3558, 40)) +>Uint16Array.from : Symbol(Uint16ArrayConstructor.from, Decl(lib.d.ts, 3559, 40)) +>Uint16Array : Symbol(Uint16Array, Decl(lib.d.ts, 3279, 46), Decl(lib.d.ts, 3569, 11)) +>from : Symbol(Uint16ArrayConstructor.from, Decl(lib.d.ts, 3559, 40)) >obj : Symbol(obj, Decl(typedArrays.ts, 46, 44)) typedArrays[4] = Int32Array.from(obj); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 47, 7)) ->Int32Array.from : Symbol(Int32ArrayConstructor.from, Decl(lib.d.ts, 3848, 39)) ->Int32Array : Symbol(Int32Array, Decl(lib.d.ts, 3568, 48), Decl(lib.d.ts, 3858, 11)) ->from : Symbol(Int32ArrayConstructor.from, Decl(lib.d.ts, 3848, 39)) +>Int32Array.from : Symbol(Int32ArrayConstructor.from, Decl(lib.d.ts, 3849, 39)) +>Int32Array : Symbol(Int32Array, Decl(lib.d.ts, 3569, 48), Decl(lib.d.ts, 3859, 11)) +>from : Symbol(Int32ArrayConstructor.from, Decl(lib.d.ts, 3849, 39)) >obj : Symbol(obj, Decl(typedArrays.ts, 46, 44)) typedArrays[5] = Uint32Array.from(obj); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 47, 7)) ->Uint32Array.from : Symbol(Uint32ArrayConstructor.from, Decl(lib.d.ts, 4138, 40)) ->Uint32Array : Symbol(Uint32Array, Decl(lib.d.ts, 3858, 46), Decl(lib.d.ts, 4148, 11)) ->from : Symbol(Uint32ArrayConstructor.from, Decl(lib.d.ts, 4138, 40)) +>Uint32Array.from : Symbol(Uint32ArrayConstructor.from, Decl(lib.d.ts, 4139, 40)) +>Uint32Array : Symbol(Uint32Array, Decl(lib.d.ts, 3859, 46), Decl(lib.d.ts, 4149, 11)) +>from : Symbol(Uint32ArrayConstructor.from, Decl(lib.d.ts, 4139, 40)) >obj : Symbol(obj, Decl(typedArrays.ts, 46, 44)) typedArrays[6] = Float32Array.from(obj); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 47, 7)) ->Float32Array.from : Symbol(Float32ArrayConstructor.from, Decl(lib.d.ts, 4428, 41)) ->Float32Array : Symbol(Float32Array, Decl(lib.d.ts, 4148, 48), Decl(lib.d.ts, 4438, 11)) ->from : Symbol(Float32ArrayConstructor.from, Decl(lib.d.ts, 4428, 41)) +>Float32Array.from : Symbol(Float32ArrayConstructor.from, Decl(lib.d.ts, 4429, 41)) +>Float32Array : Symbol(Float32Array, Decl(lib.d.ts, 4149, 48), Decl(lib.d.ts, 4439, 11)) +>from : Symbol(Float32ArrayConstructor.from, Decl(lib.d.ts, 4429, 41)) >obj : Symbol(obj, Decl(typedArrays.ts, 46, 44)) typedArrays[7] = Float64Array.from(obj); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 47, 7)) ->Float64Array.from : Symbol(Float64ArrayConstructor.from, Decl(lib.d.ts, 4718, 41)) ->Float64Array : Symbol(Float64Array, Decl(lib.d.ts, 4438, 50), Decl(lib.d.ts, 4728, 11)) ->from : Symbol(Float64ArrayConstructor.from, Decl(lib.d.ts, 4718, 41)) +>Float64Array.from : Symbol(Float64ArrayConstructor.from, Decl(lib.d.ts, 4719, 41)) +>Float64Array : Symbol(Float64Array, Decl(lib.d.ts, 4439, 50), Decl(lib.d.ts, 4729, 11)) +>from : Symbol(Float64ArrayConstructor.from, Decl(lib.d.ts, 4719, 41)) >obj : Symbol(obj, Decl(typedArrays.ts, 46, 44)) typedArrays[8] = Uint8ClampedArray.from(obj); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 47, 7)) ->Uint8ClampedArray.from : Symbol(Uint8ClampedArrayConstructor.from, Decl(lib.d.ts, 2978, 46)) ->Uint8ClampedArray : Symbol(Uint8ClampedArray, Decl(lib.d.ts, 2698, 46), Decl(lib.d.ts, 2988, 11)) ->from : Symbol(Uint8ClampedArrayConstructor.from, Decl(lib.d.ts, 2978, 46)) +>Uint8ClampedArray.from : Symbol(Uint8ClampedArrayConstructor.from, Decl(lib.d.ts, 2979, 46)) +>Uint8ClampedArray : Symbol(Uint8ClampedArray, Decl(lib.d.ts, 2699, 46), Decl(lib.d.ts, 2989, 11)) +>from : Symbol(Uint8ClampedArrayConstructor.from, Decl(lib.d.ts, 2979, 46)) >obj : Symbol(obj, Decl(typedArrays.ts, 46, 44)) return typedArrays; @@ -235,72 +235,72 @@ function CreateIntegerTypedArraysFromArray2(obj:number[]) { function CreateIntegerTypedArraysFromArrayLike(obj:ArrayLike) { >CreateIntegerTypedArraysFromArrayLike : Symbol(CreateIntegerTypedArraysFromArrayLike, Decl(typedArrays.ts, 59, 1)) >obj : Symbol(obj, Decl(typedArrays.ts, 61, 47)) ->ArrayLike : Symbol(ArrayLike, Decl(lib.d.ts, 1445, 1)) +>ArrayLike : Symbol(ArrayLike, Decl(lib.d.ts, 1446, 1)) var typedArrays = []; >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 62, 7)) typedArrays[0] = Int8Array.from(obj); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 62, 7)) ->Int8Array.from : Symbol(Int8ArrayConstructor.from, Decl(lib.d.ts, 2398, 38)) ->Int8Array : Symbol(Int8Array, Decl(lib.d.ts, 2118, 42), Decl(lib.d.ts, 2408, 11)) ->from : Symbol(Int8ArrayConstructor.from, Decl(lib.d.ts, 2398, 38)) +>Int8Array.from : Symbol(Int8ArrayConstructor.from, Decl(lib.d.ts, 2399, 38)) +>Int8Array : Symbol(Int8Array, Decl(lib.d.ts, 2119, 42), Decl(lib.d.ts, 2409, 11)) +>from : Symbol(Int8ArrayConstructor.from, Decl(lib.d.ts, 2399, 38)) >obj : Symbol(obj, Decl(typedArrays.ts, 61, 47)) typedArrays[1] = Uint8Array.from(obj); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 62, 7)) ->Uint8Array.from : Symbol(Uint8ArrayConstructor.from, Decl(lib.d.ts, 2688, 39)) ->Uint8Array : Symbol(Uint8Array, Decl(lib.d.ts, 2408, 44), Decl(lib.d.ts, 2698, 11)) ->from : Symbol(Uint8ArrayConstructor.from, Decl(lib.d.ts, 2688, 39)) +>Uint8Array.from : Symbol(Uint8ArrayConstructor.from, Decl(lib.d.ts, 2689, 39)) +>Uint8Array : Symbol(Uint8Array, Decl(lib.d.ts, 2409, 44), Decl(lib.d.ts, 2699, 11)) +>from : Symbol(Uint8ArrayConstructor.from, Decl(lib.d.ts, 2689, 39)) >obj : Symbol(obj, Decl(typedArrays.ts, 61, 47)) typedArrays[2] = Int16Array.from(obj); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 62, 7)) ->Int16Array.from : Symbol(Int16ArrayConstructor.from, Decl(lib.d.ts, 3268, 39)) ->Int16Array : Symbol(Int16Array, Decl(lib.d.ts, 2988, 60), Decl(lib.d.ts, 3278, 11)) ->from : Symbol(Int16ArrayConstructor.from, Decl(lib.d.ts, 3268, 39)) +>Int16Array.from : Symbol(Int16ArrayConstructor.from, Decl(lib.d.ts, 3269, 39)) +>Int16Array : Symbol(Int16Array, Decl(lib.d.ts, 2989, 60), Decl(lib.d.ts, 3279, 11)) +>from : Symbol(Int16ArrayConstructor.from, Decl(lib.d.ts, 3269, 39)) >obj : Symbol(obj, Decl(typedArrays.ts, 61, 47)) typedArrays[3] = Uint16Array.from(obj); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 62, 7)) ->Uint16Array.from : Symbol(Uint16ArrayConstructor.from, Decl(lib.d.ts, 3558, 40)) ->Uint16Array : Symbol(Uint16Array, Decl(lib.d.ts, 3278, 46), Decl(lib.d.ts, 3568, 11)) ->from : Symbol(Uint16ArrayConstructor.from, Decl(lib.d.ts, 3558, 40)) +>Uint16Array.from : Symbol(Uint16ArrayConstructor.from, Decl(lib.d.ts, 3559, 40)) +>Uint16Array : Symbol(Uint16Array, Decl(lib.d.ts, 3279, 46), Decl(lib.d.ts, 3569, 11)) +>from : Symbol(Uint16ArrayConstructor.from, Decl(lib.d.ts, 3559, 40)) >obj : Symbol(obj, Decl(typedArrays.ts, 61, 47)) typedArrays[4] = Int32Array.from(obj); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 62, 7)) ->Int32Array.from : Symbol(Int32ArrayConstructor.from, Decl(lib.d.ts, 3848, 39)) ->Int32Array : Symbol(Int32Array, Decl(lib.d.ts, 3568, 48), Decl(lib.d.ts, 3858, 11)) ->from : Symbol(Int32ArrayConstructor.from, Decl(lib.d.ts, 3848, 39)) +>Int32Array.from : Symbol(Int32ArrayConstructor.from, Decl(lib.d.ts, 3849, 39)) +>Int32Array : Symbol(Int32Array, Decl(lib.d.ts, 3569, 48), Decl(lib.d.ts, 3859, 11)) +>from : Symbol(Int32ArrayConstructor.from, Decl(lib.d.ts, 3849, 39)) >obj : Symbol(obj, Decl(typedArrays.ts, 61, 47)) typedArrays[5] = Uint32Array.from(obj); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 62, 7)) ->Uint32Array.from : Symbol(Uint32ArrayConstructor.from, Decl(lib.d.ts, 4138, 40)) ->Uint32Array : Symbol(Uint32Array, Decl(lib.d.ts, 3858, 46), Decl(lib.d.ts, 4148, 11)) ->from : Symbol(Uint32ArrayConstructor.from, Decl(lib.d.ts, 4138, 40)) +>Uint32Array.from : Symbol(Uint32ArrayConstructor.from, Decl(lib.d.ts, 4139, 40)) +>Uint32Array : Symbol(Uint32Array, Decl(lib.d.ts, 3859, 46), Decl(lib.d.ts, 4149, 11)) +>from : Symbol(Uint32ArrayConstructor.from, Decl(lib.d.ts, 4139, 40)) >obj : Symbol(obj, Decl(typedArrays.ts, 61, 47)) typedArrays[6] = Float32Array.from(obj); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 62, 7)) ->Float32Array.from : Symbol(Float32ArrayConstructor.from, Decl(lib.d.ts, 4428, 41)) ->Float32Array : Symbol(Float32Array, Decl(lib.d.ts, 4148, 48), Decl(lib.d.ts, 4438, 11)) ->from : Symbol(Float32ArrayConstructor.from, Decl(lib.d.ts, 4428, 41)) +>Float32Array.from : Symbol(Float32ArrayConstructor.from, Decl(lib.d.ts, 4429, 41)) +>Float32Array : Symbol(Float32Array, Decl(lib.d.ts, 4149, 48), Decl(lib.d.ts, 4439, 11)) +>from : Symbol(Float32ArrayConstructor.from, Decl(lib.d.ts, 4429, 41)) >obj : Symbol(obj, Decl(typedArrays.ts, 61, 47)) typedArrays[7] = Float64Array.from(obj); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 62, 7)) ->Float64Array.from : Symbol(Float64ArrayConstructor.from, Decl(lib.d.ts, 4718, 41)) ->Float64Array : Symbol(Float64Array, Decl(lib.d.ts, 4438, 50), Decl(lib.d.ts, 4728, 11)) ->from : Symbol(Float64ArrayConstructor.from, Decl(lib.d.ts, 4718, 41)) +>Float64Array.from : Symbol(Float64ArrayConstructor.from, Decl(lib.d.ts, 4719, 41)) +>Float64Array : Symbol(Float64Array, Decl(lib.d.ts, 4439, 50), Decl(lib.d.ts, 4729, 11)) +>from : Symbol(Float64ArrayConstructor.from, Decl(lib.d.ts, 4719, 41)) >obj : Symbol(obj, Decl(typedArrays.ts, 61, 47)) typedArrays[8] = Uint8ClampedArray.from(obj); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 62, 7)) ->Uint8ClampedArray.from : Symbol(Uint8ClampedArrayConstructor.from, Decl(lib.d.ts, 2978, 46)) ->Uint8ClampedArray : Symbol(Uint8ClampedArray, Decl(lib.d.ts, 2698, 46), Decl(lib.d.ts, 2988, 11)) ->from : Symbol(Uint8ClampedArrayConstructor.from, Decl(lib.d.ts, 2978, 46)) +>Uint8ClampedArray.from : Symbol(Uint8ClampedArrayConstructor.from, Decl(lib.d.ts, 2979, 46)) +>Uint8ClampedArray : Symbol(Uint8ClampedArray, Decl(lib.d.ts, 2699, 46), Decl(lib.d.ts, 2989, 11)) +>from : Symbol(Uint8ClampedArrayConstructor.from, Decl(lib.d.ts, 2979, 46)) >obj : Symbol(obj, Decl(typedArrays.ts, 61, 47)) return typedArrays; @@ -332,57 +332,57 @@ function CreateTypedArraysOf2() { typedArrays[0] = Int8Array.of(1,2,3,4); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 94, 7)) ->Int8Array.of : Symbol(Int8ArrayConstructor.of, Decl(lib.d.ts, 2392, 30)) ->Int8Array : Symbol(Int8Array, Decl(lib.d.ts, 2118, 42), Decl(lib.d.ts, 2408, 11)) ->of : Symbol(Int8ArrayConstructor.of, Decl(lib.d.ts, 2392, 30)) +>Int8Array.of : Symbol(Int8ArrayConstructor.of, Decl(lib.d.ts, 2393, 30)) +>Int8Array : Symbol(Int8Array, Decl(lib.d.ts, 2119, 42), Decl(lib.d.ts, 2409, 11)) +>of : Symbol(Int8ArrayConstructor.of, Decl(lib.d.ts, 2393, 30)) typedArrays[1] = Uint8Array.of(1,2,3,4); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 94, 7)) ->Uint8Array.of : Symbol(Uint8ArrayConstructor.of, Decl(lib.d.ts, 2682, 30)) ->Uint8Array : Symbol(Uint8Array, Decl(lib.d.ts, 2408, 44), Decl(lib.d.ts, 2698, 11)) ->of : Symbol(Uint8ArrayConstructor.of, Decl(lib.d.ts, 2682, 30)) +>Uint8Array.of : Symbol(Uint8ArrayConstructor.of, Decl(lib.d.ts, 2683, 30)) +>Uint8Array : Symbol(Uint8Array, Decl(lib.d.ts, 2409, 44), Decl(lib.d.ts, 2699, 11)) +>of : Symbol(Uint8ArrayConstructor.of, Decl(lib.d.ts, 2683, 30)) typedArrays[2] = Int16Array.of(1,2,3,4); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 94, 7)) ->Int16Array.of : Symbol(Int16ArrayConstructor.of, Decl(lib.d.ts, 3262, 30)) ->Int16Array : Symbol(Int16Array, Decl(lib.d.ts, 2988, 60), Decl(lib.d.ts, 3278, 11)) ->of : Symbol(Int16ArrayConstructor.of, Decl(lib.d.ts, 3262, 30)) +>Int16Array.of : Symbol(Int16ArrayConstructor.of, Decl(lib.d.ts, 3263, 30)) +>Int16Array : Symbol(Int16Array, Decl(lib.d.ts, 2989, 60), Decl(lib.d.ts, 3279, 11)) +>of : Symbol(Int16ArrayConstructor.of, Decl(lib.d.ts, 3263, 30)) typedArrays[3] = Uint16Array.of(1,2,3,4); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 94, 7)) ->Uint16Array.of : Symbol(Uint16ArrayConstructor.of, Decl(lib.d.ts, 3552, 30)) ->Uint16Array : Symbol(Uint16Array, Decl(lib.d.ts, 3278, 46), Decl(lib.d.ts, 3568, 11)) ->of : Symbol(Uint16ArrayConstructor.of, Decl(lib.d.ts, 3552, 30)) +>Uint16Array.of : Symbol(Uint16ArrayConstructor.of, Decl(lib.d.ts, 3553, 30)) +>Uint16Array : Symbol(Uint16Array, Decl(lib.d.ts, 3279, 46), Decl(lib.d.ts, 3569, 11)) +>of : Symbol(Uint16ArrayConstructor.of, Decl(lib.d.ts, 3553, 30)) typedArrays[4] = Int32Array.of(1,2,3,4); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 94, 7)) ->Int32Array.of : Symbol(Int32ArrayConstructor.of, Decl(lib.d.ts, 3842, 30)) ->Int32Array : Symbol(Int32Array, Decl(lib.d.ts, 3568, 48), Decl(lib.d.ts, 3858, 11)) ->of : Symbol(Int32ArrayConstructor.of, Decl(lib.d.ts, 3842, 30)) +>Int32Array.of : Symbol(Int32ArrayConstructor.of, Decl(lib.d.ts, 3843, 30)) +>Int32Array : Symbol(Int32Array, Decl(lib.d.ts, 3569, 48), Decl(lib.d.ts, 3859, 11)) +>of : Symbol(Int32ArrayConstructor.of, Decl(lib.d.ts, 3843, 30)) typedArrays[5] = Uint32Array.of(1,2,3,4); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 94, 7)) ->Uint32Array.of : Symbol(Uint32ArrayConstructor.of, Decl(lib.d.ts, 4132, 30)) ->Uint32Array : Symbol(Uint32Array, Decl(lib.d.ts, 3858, 46), Decl(lib.d.ts, 4148, 11)) ->of : Symbol(Uint32ArrayConstructor.of, Decl(lib.d.ts, 4132, 30)) +>Uint32Array.of : Symbol(Uint32ArrayConstructor.of, Decl(lib.d.ts, 4133, 30)) +>Uint32Array : Symbol(Uint32Array, Decl(lib.d.ts, 3859, 46), Decl(lib.d.ts, 4149, 11)) +>of : Symbol(Uint32ArrayConstructor.of, Decl(lib.d.ts, 4133, 30)) typedArrays[6] = Float32Array.of(1,2,3,4); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 94, 7)) ->Float32Array.of : Symbol(Float32ArrayConstructor.of, Decl(lib.d.ts, 4422, 30)) ->Float32Array : Symbol(Float32Array, Decl(lib.d.ts, 4148, 48), Decl(lib.d.ts, 4438, 11)) ->of : Symbol(Float32ArrayConstructor.of, Decl(lib.d.ts, 4422, 30)) +>Float32Array.of : Symbol(Float32ArrayConstructor.of, Decl(lib.d.ts, 4423, 30)) +>Float32Array : Symbol(Float32Array, Decl(lib.d.ts, 4149, 48), Decl(lib.d.ts, 4439, 11)) +>of : Symbol(Float32ArrayConstructor.of, Decl(lib.d.ts, 4423, 30)) typedArrays[7] = Float64Array.of(1,2,3,4); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 94, 7)) ->Float64Array.of : Symbol(Float64ArrayConstructor.of, Decl(lib.d.ts, 4712, 30)) ->Float64Array : Symbol(Float64Array, Decl(lib.d.ts, 4438, 50), Decl(lib.d.ts, 4728, 11)) ->of : Symbol(Float64ArrayConstructor.of, Decl(lib.d.ts, 4712, 30)) +>Float64Array.of : Symbol(Float64ArrayConstructor.of, Decl(lib.d.ts, 4713, 30)) +>Float64Array : Symbol(Float64Array, Decl(lib.d.ts, 4439, 50), Decl(lib.d.ts, 4729, 11)) +>of : Symbol(Float64ArrayConstructor.of, Decl(lib.d.ts, 4713, 30)) typedArrays[8] = Uint8ClampedArray.of(1,2,3,4); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 94, 7)) ->Uint8ClampedArray.of : Symbol(Uint8ClampedArrayConstructor.of, Decl(lib.d.ts, 2972, 30)) ->Uint8ClampedArray : Symbol(Uint8ClampedArray, Decl(lib.d.ts, 2698, 46), Decl(lib.d.ts, 2988, 11)) ->of : Symbol(Uint8ClampedArrayConstructor.of, Decl(lib.d.ts, 2972, 30)) +>Uint8ClampedArray.of : Symbol(Uint8ClampedArrayConstructor.of, Decl(lib.d.ts, 2973, 30)) +>Uint8ClampedArray : Symbol(Uint8ClampedArray, Decl(lib.d.ts, 2699, 46), Decl(lib.d.ts, 2989, 11)) +>of : Symbol(Uint8ClampedArrayConstructor.of, Decl(lib.d.ts, 2973, 30)) return typedArrays; >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 94, 7)) @@ -391,7 +391,7 @@ function CreateTypedArraysOf2() { function CreateTypedArraysFromMapFn(obj:ArrayLike, mapFn: (n:number, v:number)=> number) { >CreateTypedArraysFromMapFn : Symbol(CreateTypedArraysFromMapFn, Decl(typedArrays.ts, 106, 1)) >obj : Symbol(obj, Decl(typedArrays.ts, 108, 36)) ->ArrayLike : Symbol(ArrayLike, Decl(lib.d.ts, 1445, 1)) +>ArrayLike : Symbol(ArrayLike, Decl(lib.d.ts, 1446, 1)) >mapFn : Symbol(mapFn, Decl(typedArrays.ts, 108, 58)) >n : Symbol(n, Decl(typedArrays.ts, 108, 67)) >v : Symbol(v, Decl(typedArrays.ts, 108, 76)) @@ -401,73 +401,73 @@ function CreateTypedArraysFromMapFn(obj:ArrayLike, mapFn: (n:number, v:n typedArrays[0] = Int8Array.from(obj, mapFn); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 109, 7)) ->Int8Array.from : Symbol(Int8ArrayConstructor.from, Decl(lib.d.ts, 2398, 38)) ->Int8Array : Symbol(Int8Array, Decl(lib.d.ts, 2118, 42), Decl(lib.d.ts, 2408, 11)) ->from : Symbol(Int8ArrayConstructor.from, Decl(lib.d.ts, 2398, 38)) +>Int8Array.from : Symbol(Int8ArrayConstructor.from, Decl(lib.d.ts, 2399, 38)) +>Int8Array : Symbol(Int8Array, Decl(lib.d.ts, 2119, 42), Decl(lib.d.ts, 2409, 11)) +>from : Symbol(Int8ArrayConstructor.from, Decl(lib.d.ts, 2399, 38)) >obj : Symbol(obj, Decl(typedArrays.ts, 108, 36)) >mapFn : Symbol(mapFn, Decl(typedArrays.ts, 108, 58)) typedArrays[1] = Uint8Array.from(obj, mapFn); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 109, 7)) ->Uint8Array.from : Symbol(Uint8ArrayConstructor.from, Decl(lib.d.ts, 2688, 39)) ->Uint8Array : Symbol(Uint8Array, Decl(lib.d.ts, 2408, 44), Decl(lib.d.ts, 2698, 11)) ->from : Symbol(Uint8ArrayConstructor.from, Decl(lib.d.ts, 2688, 39)) +>Uint8Array.from : Symbol(Uint8ArrayConstructor.from, Decl(lib.d.ts, 2689, 39)) +>Uint8Array : Symbol(Uint8Array, Decl(lib.d.ts, 2409, 44), Decl(lib.d.ts, 2699, 11)) +>from : Symbol(Uint8ArrayConstructor.from, Decl(lib.d.ts, 2689, 39)) >obj : Symbol(obj, Decl(typedArrays.ts, 108, 36)) >mapFn : Symbol(mapFn, Decl(typedArrays.ts, 108, 58)) typedArrays[2] = Int16Array.from(obj, mapFn); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 109, 7)) ->Int16Array.from : Symbol(Int16ArrayConstructor.from, Decl(lib.d.ts, 3268, 39)) ->Int16Array : Symbol(Int16Array, Decl(lib.d.ts, 2988, 60), Decl(lib.d.ts, 3278, 11)) ->from : Symbol(Int16ArrayConstructor.from, Decl(lib.d.ts, 3268, 39)) +>Int16Array.from : Symbol(Int16ArrayConstructor.from, Decl(lib.d.ts, 3269, 39)) +>Int16Array : Symbol(Int16Array, Decl(lib.d.ts, 2989, 60), Decl(lib.d.ts, 3279, 11)) +>from : Symbol(Int16ArrayConstructor.from, Decl(lib.d.ts, 3269, 39)) >obj : Symbol(obj, Decl(typedArrays.ts, 108, 36)) >mapFn : Symbol(mapFn, Decl(typedArrays.ts, 108, 58)) typedArrays[3] = Uint16Array.from(obj, mapFn); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 109, 7)) ->Uint16Array.from : Symbol(Uint16ArrayConstructor.from, Decl(lib.d.ts, 3558, 40)) ->Uint16Array : Symbol(Uint16Array, Decl(lib.d.ts, 3278, 46), Decl(lib.d.ts, 3568, 11)) ->from : Symbol(Uint16ArrayConstructor.from, Decl(lib.d.ts, 3558, 40)) +>Uint16Array.from : Symbol(Uint16ArrayConstructor.from, Decl(lib.d.ts, 3559, 40)) +>Uint16Array : Symbol(Uint16Array, Decl(lib.d.ts, 3279, 46), Decl(lib.d.ts, 3569, 11)) +>from : Symbol(Uint16ArrayConstructor.from, Decl(lib.d.ts, 3559, 40)) >obj : Symbol(obj, Decl(typedArrays.ts, 108, 36)) >mapFn : Symbol(mapFn, Decl(typedArrays.ts, 108, 58)) typedArrays[4] = Int32Array.from(obj, mapFn); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 109, 7)) ->Int32Array.from : Symbol(Int32ArrayConstructor.from, Decl(lib.d.ts, 3848, 39)) ->Int32Array : Symbol(Int32Array, Decl(lib.d.ts, 3568, 48), Decl(lib.d.ts, 3858, 11)) ->from : Symbol(Int32ArrayConstructor.from, Decl(lib.d.ts, 3848, 39)) +>Int32Array.from : Symbol(Int32ArrayConstructor.from, Decl(lib.d.ts, 3849, 39)) +>Int32Array : Symbol(Int32Array, Decl(lib.d.ts, 3569, 48), Decl(lib.d.ts, 3859, 11)) +>from : Symbol(Int32ArrayConstructor.from, Decl(lib.d.ts, 3849, 39)) >obj : Symbol(obj, Decl(typedArrays.ts, 108, 36)) >mapFn : Symbol(mapFn, Decl(typedArrays.ts, 108, 58)) typedArrays[5] = Uint32Array.from(obj, mapFn); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 109, 7)) ->Uint32Array.from : Symbol(Uint32ArrayConstructor.from, Decl(lib.d.ts, 4138, 40)) ->Uint32Array : Symbol(Uint32Array, Decl(lib.d.ts, 3858, 46), Decl(lib.d.ts, 4148, 11)) ->from : Symbol(Uint32ArrayConstructor.from, Decl(lib.d.ts, 4138, 40)) +>Uint32Array.from : Symbol(Uint32ArrayConstructor.from, Decl(lib.d.ts, 4139, 40)) +>Uint32Array : Symbol(Uint32Array, Decl(lib.d.ts, 3859, 46), Decl(lib.d.ts, 4149, 11)) +>from : Symbol(Uint32ArrayConstructor.from, Decl(lib.d.ts, 4139, 40)) >obj : Symbol(obj, Decl(typedArrays.ts, 108, 36)) >mapFn : Symbol(mapFn, Decl(typedArrays.ts, 108, 58)) typedArrays[6] = Float32Array.from(obj, mapFn); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 109, 7)) ->Float32Array.from : Symbol(Float32ArrayConstructor.from, Decl(lib.d.ts, 4428, 41)) ->Float32Array : Symbol(Float32Array, Decl(lib.d.ts, 4148, 48), Decl(lib.d.ts, 4438, 11)) ->from : Symbol(Float32ArrayConstructor.from, Decl(lib.d.ts, 4428, 41)) +>Float32Array.from : Symbol(Float32ArrayConstructor.from, Decl(lib.d.ts, 4429, 41)) +>Float32Array : Symbol(Float32Array, Decl(lib.d.ts, 4149, 48), Decl(lib.d.ts, 4439, 11)) +>from : Symbol(Float32ArrayConstructor.from, Decl(lib.d.ts, 4429, 41)) >obj : Symbol(obj, Decl(typedArrays.ts, 108, 36)) >mapFn : Symbol(mapFn, Decl(typedArrays.ts, 108, 58)) typedArrays[7] = Float64Array.from(obj, mapFn); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 109, 7)) ->Float64Array.from : Symbol(Float64ArrayConstructor.from, Decl(lib.d.ts, 4718, 41)) ->Float64Array : Symbol(Float64Array, Decl(lib.d.ts, 4438, 50), Decl(lib.d.ts, 4728, 11)) ->from : Symbol(Float64ArrayConstructor.from, Decl(lib.d.ts, 4718, 41)) +>Float64Array.from : Symbol(Float64ArrayConstructor.from, Decl(lib.d.ts, 4719, 41)) +>Float64Array : Symbol(Float64Array, Decl(lib.d.ts, 4439, 50), Decl(lib.d.ts, 4729, 11)) +>from : Symbol(Float64ArrayConstructor.from, Decl(lib.d.ts, 4719, 41)) >obj : Symbol(obj, Decl(typedArrays.ts, 108, 36)) >mapFn : Symbol(mapFn, Decl(typedArrays.ts, 108, 58)) typedArrays[8] = Uint8ClampedArray.from(obj, mapFn); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 109, 7)) ->Uint8ClampedArray.from : Symbol(Uint8ClampedArrayConstructor.from, Decl(lib.d.ts, 2978, 46)) ->Uint8ClampedArray : Symbol(Uint8ClampedArray, Decl(lib.d.ts, 2698, 46), Decl(lib.d.ts, 2988, 11)) ->from : Symbol(Uint8ClampedArrayConstructor.from, Decl(lib.d.ts, 2978, 46)) +>Uint8ClampedArray.from : Symbol(Uint8ClampedArrayConstructor.from, Decl(lib.d.ts, 2979, 46)) +>Uint8ClampedArray : Symbol(Uint8ClampedArray, Decl(lib.d.ts, 2699, 46), Decl(lib.d.ts, 2989, 11)) +>from : Symbol(Uint8ClampedArrayConstructor.from, Decl(lib.d.ts, 2979, 46)) >obj : Symbol(obj, Decl(typedArrays.ts, 108, 36)) >mapFn : Symbol(mapFn, Decl(typedArrays.ts, 108, 58)) @@ -478,7 +478,7 @@ function CreateTypedArraysFromMapFn(obj:ArrayLike, mapFn: (n:number, v:n function CreateTypedArraysFromThisObj(obj:ArrayLike, mapFn: (n:number, v:number)=> number, thisArg: {}) { >CreateTypedArraysFromThisObj : Symbol(CreateTypedArraysFromThisObj, Decl(typedArrays.ts, 121, 1)) >obj : Symbol(obj, Decl(typedArrays.ts, 123, 38)) ->ArrayLike : Symbol(ArrayLike, Decl(lib.d.ts, 1445, 1)) +>ArrayLike : Symbol(ArrayLike, Decl(lib.d.ts, 1446, 1)) >mapFn : Symbol(mapFn, Decl(typedArrays.ts, 123, 60)) >n : Symbol(n, Decl(typedArrays.ts, 123, 69)) >v : Symbol(v, Decl(typedArrays.ts, 123, 78)) @@ -489,81 +489,81 @@ function CreateTypedArraysFromThisObj(obj:ArrayLike, mapFn: (n:number, v typedArrays[0] = Int8Array.from(obj, mapFn, thisArg); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 124, 7)) ->Int8Array.from : Symbol(Int8ArrayConstructor.from, Decl(lib.d.ts, 2398, 38)) ->Int8Array : Symbol(Int8Array, Decl(lib.d.ts, 2118, 42), Decl(lib.d.ts, 2408, 11)) ->from : Symbol(Int8ArrayConstructor.from, Decl(lib.d.ts, 2398, 38)) +>Int8Array.from : Symbol(Int8ArrayConstructor.from, Decl(lib.d.ts, 2399, 38)) +>Int8Array : Symbol(Int8Array, Decl(lib.d.ts, 2119, 42), Decl(lib.d.ts, 2409, 11)) +>from : Symbol(Int8ArrayConstructor.from, Decl(lib.d.ts, 2399, 38)) >obj : Symbol(obj, Decl(typedArrays.ts, 123, 38)) >mapFn : Symbol(mapFn, Decl(typedArrays.ts, 123, 60)) >thisArg : Symbol(thisArg, Decl(typedArrays.ts, 123, 98)) typedArrays[1] = Uint8Array.from(obj, mapFn, thisArg); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 124, 7)) ->Uint8Array.from : Symbol(Uint8ArrayConstructor.from, Decl(lib.d.ts, 2688, 39)) ->Uint8Array : Symbol(Uint8Array, Decl(lib.d.ts, 2408, 44), Decl(lib.d.ts, 2698, 11)) ->from : Symbol(Uint8ArrayConstructor.from, Decl(lib.d.ts, 2688, 39)) +>Uint8Array.from : Symbol(Uint8ArrayConstructor.from, Decl(lib.d.ts, 2689, 39)) +>Uint8Array : Symbol(Uint8Array, Decl(lib.d.ts, 2409, 44), Decl(lib.d.ts, 2699, 11)) +>from : Symbol(Uint8ArrayConstructor.from, Decl(lib.d.ts, 2689, 39)) >obj : Symbol(obj, Decl(typedArrays.ts, 123, 38)) >mapFn : Symbol(mapFn, Decl(typedArrays.ts, 123, 60)) >thisArg : Symbol(thisArg, Decl(typedArrays.ts, 123, 98)) typedArrays[2] = Int16Array.from(obj, mapFn, thisArg); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 124, 7)) ->Int16Array.from : Symbol(Int16ArrayConstructor.from, Decl(lib.d.ts, 3268, 39)) ->Int16Array : Symbol(Int16Array, Decl(lib.d.ts, 2988, 60), Decl(lib.d.ts, 3278, 11)) ->from : Symbol(Int16ArrayConstructor.from, Decl(lib.d.ts, 3268, 39)) +>Int16Array.from : Symbol(Int16ArrayConstructor.from, Decl(lib.d.ts, 3269, 39)) +>Int16Array : Symbol(Int16Array, Decl(lib.d.ts, 2989, 60), Decl(lib.d.ts, 3279, 11)) +>from : Symbol(Int16ArrayConstructor.from, Decl(lib.d.ts, 3269, 39)) >obj : Symbol(obj, Decl(typedArrays.ts, 123, 38)) >mapFn : Symbol(mapFn, Decl(typedArrays.ts, 123, 60)) >thisArg : Symbol(thisArg, Decl(typedArrays.ts, 123, 98)) typedArrays[3] = Uint16Array.from(obj, mapFn, thisArg); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 124, 7)) ->Uint16Array.from : Symbol(Uint16ArrayConstructor.from, Decl(lib.d.ts, 3558, 40)) ->Uint16Array : Symbol(Uint16Array, Decl(lib.d.ts, 3278, 46), Decl(lib.d.ts, 3568, 11)) ->from : Symbol(Uint16ArrayConstructor.from, Decl(lib.d.ts, 3558, 40)) +>Uint16Array.from : Symbol(Uint16ArrayConstructor.from, Decl(lib.d.ts, 3559, 40)) +>Uint16Array : Symbol(Uint16Array, Decl(lib.d.ts, 3279, 46), Decl(lib.d.ts, 3569, 11)) +>from : Symbol(Uint16ArrayConstructor.from, Decl(lib.d.ts, 3559, 40)) >obj : Symbol(obj, Decl(typedArrays.ts, 123, 38)) >mapFn : Symbol(mapFn, Decl(typedArrays.ts, 123, 60)) >thisArg : Symbol(thisArg, Decl(typedArrays.ts, 123, 98)) typedArrays[4] = Int32Array.from(obj, mapFn, thisArg); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 124, 7)) ->Int32Array.from : Symbol(Int32ArrayConstructor.from, Decl(lib.d.ts, 3848, 39)) ->Int32Array : Symbol(Int32Array, Decl(lib.d.ts, 3568, 48), Decl(lib.d.ts, 3858, 11)) ->from : Symbol(Int32ArrayConstructor.from, Decl(lib.d.ts, 3848, 39)) +>Int32Array.from : Symbol(Int32ArrayConstructor.from, Decl(lib.d.ts, 3849, 39)) +>Int32Array : Symbol(Int32Array, Decl(lib.d.ts, 3569, 48), Decl(lib.d.ts, 3859, 11)) +>from : Symbol(Int32ArrayConstructor.from, Decl(lib.d.ts, 3849, 39)) >obj : Symbol(obj, Decl(typedArrays.ts, 123, 38)) >mapFn : Symbol(mapFn, Decl(typedArrays.ts, 123, 60)) >thisArg : Symbol(thisArg, Decl(typedArrays.ts, 123, 98)) typedArrays[5] = Uint32Array.from(obj, mapFn, thisArg); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 124, 7)) ->Uint32Array.from : Symbol(Uint32ArrayConstructor.from, Decl(lib.d.ts, 4138, 40)) ->Uint32Array : Symbol(Uint32Array, Decl(lib.d.ts, 3858, 46), Decl(lib.d.ts, 4148, 11)) ->from : Symbol(Uint32ArrayConstructor.from, Decl(lib.d.ts, 4138, 40)) +>Uint32Array.from : Symbol(Uint32ArrayConstructor.from, Decl(lib.d.ts, 4139, 40)) +>Uint32Array : Symbol(Uint32Array, Decl(lib.d.ts, 3859, 46), Decl(lib.d.ts, 4149, 11)) +>from : Symbol(Uint32ArrayConstructor.from, Decl(lib.d.ts, 4139, 40)) >obj : Symbol(obj, Decl(typedArrays.ts, 123, 38)) >mapFn : Symbol(mapFn, Decl(typedArrays.ts, 123, 60)) >thisArg : Symbol(thisArg, Decl(typedArrays.ts, 123, 98)) typedArrays[6] = Float32Array.from(obj, mapFn, thisArg); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 124, 7)) ->Float32Array.from : Symbol(Float32ArrayConstructor.from, Decl(lib.d.ts, 4428, 41)) ->Float32Array : Symbol(Float32Array, Decl(lib.d.ts, 4148, 48), Decl(lib.d.ts, 4438, 11)) ->from : Symbol(Float32ArrayConstructor.from, Decl(lib.d.ts, 4428, 41)) +>Float32Array.from : Symbol(Float32ArrayConstructor.from, Decl(lib.d.ts, 4429, 41)) +>Float32Array : Symbol(Float32Array, Decl(lib.d.ts, 4149, 48), Decl(lib.d.ts, 4439, 11)) +>from : Symbol(Float32ArrayConstructor.from, Decl(lib.d.ts, 4429, 41)) >obj : Symbol(obj, Decl(typedArrays.ts, 123, 38)) >mapFn : Symbol(mapFn, Decl(typedArrays.ts, 123, 60)) >thisArg : Symbol(thisArg, Decl(typedArrays.ts, 123, 98)) typedArrays[7] = Float64Array.from(obj, mapFn, thisArg); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 124, 7)) ->Float64Array.from : Symbol(Float64ArrayConstructor.from, Decl(lib.d.ts, 4718, 41)) ->Float64Array : Symbol(Float64Array, Decl(lib.d.ts, 4438, 50), Decl(lib.d.ts, 4728, 11)) ->from : Symbol(Float64ArrayConstructor.from, Decl(lib.d.ts, 4718, 41)) +>Float64Array.from : Symbol(Float64ArrayConstructor.from, Decl(lib.d.ts, 4719, 41)) +>Float64Array : Symbol(Float64Array, Decl(lib.d.ts, 4439, 50), Decl(lib.d.ts, 4729, 11)) +>from : Symbol(Float64ArrayConstructor.from, Decl(lib.d.ts, 4719, 41)) >obj : Symbol(obj, Decl(typedArrays.ts, 123, 38)) >mapFn : Symbol(mapFn, Decl(typedArrays.ts, 123, 60)) >thisArg : Symbol(thisArg, Decl(typedArrays.ts, 123, 98)) typedArrays[8] = Uint8ClampedArray.from(obj, mapFn, thisArg); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 124, 7)) ->Uint8ClampedArray.from : Symbol(Uint8ClampedArrayConstructor.from, Decl(lib.d.ts, 2978, 46)) ->Uint8ClampedArray : Symbol(Uint8ClampedArray, Decl(lib.d.ts, 2698, 46), Decl(lib.d.ts, 2988, 11)) ->from : Symbol(Uint8ClampedArrayConstructor.from, Decl(lib.d.ts, 2978, 46)) +>Uint8ClampedArray.from : Symbol(Uint8ClampedArrayConstructor.from, Decl(lib.d.ts, 2979, 46)) +>Uint8ClampedArray : Symbol(Uint8ClampedArray, Decl(lib.d.ts, 2699, 46), Decl(lib.d.ts, 2989, 11)) +>from : Symbol(Uint8ClampedArrayConstructor.from, Decl(lib.d.ts, 2979, 46)) >obj : Symbol(obj, Decl(typedArrays.ts, 123, 38)) >mapFn : Symbol(mapFn, Decl(typedArrays.ts, 123, 60)) >thisArg : Symbol(thisArg, Decl(typedArrays.ts, 123, 98)) From 655f2ec74eb07cd3a5e3f1717da521b27a71a879 Mon Sep 17 00:00:00 2001 From: Ron Buckton Date: Fri, 8 May 2015 16:51:35 -0700 Subject: [PATCH 05/35] Cleanup and PR feedback --- src/compiler/checker.ts | 210 ++++++++++++------ .../diagnosticInformationMap.generated.ts | 6 +- src/compiler/diagnosticMessages.json | 2 +- src/compiler/parser.ts | 50 +++-- src/compiler/types.ts | 14 +- 5 files changed, 187 insertions(+), 95 deletions(-) diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index 0529b8012bfc6..d759eb1fc1aac 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -7303,7 +7303,9 @@ module ts { if (globalPromiseType !== emptyObjectType) { // if the promised type is itself a promise, get the underlying type; otherwise, fallback to the promised type promisedType = getAwaitedType(promisedType); - return createTypeReference(globalPromiseType, [promisedType]); + if (promisedType !== unknownType) { + return createTypeReference(globalPromiseType, [promisedType]); + } } error(location, Diagnostics.An_async_function_or_method_must_have_a_valid_awaitable_return_type); @@ -7319,17 +7321,23 @@ module ts { let isAsync = isAsyncFunctionLike(func); let type: Type; if (func.body.kind !== SyntaxKind.Block) { - type = isAsync - ? checkAwaitedExpressionCached(func.body, contextualMapper) - : checkExpressionCached(func.body, contextualMapper); + if (isAsync) { + type = checkAwaitedExpressionCached(func.body, contextualMapper); + } + else { + type = checkExpressionCached(func.body, contextualMapper); + } } else { // Aggregate the types of expressions within all the return statements. let types = checkAndAggregateReturnExpressionTypes(func.body, contextualMapper); if (types.length === 0) { - return isAsync - ? createPromiseType(voidType, func) - : voidType; + if (isAsync) { + return createPromiseType(voidType, func); + } + else { + return voidType; + } } // When return statements are contextually typed we allow the return type to be a union type. Otherwise we require the @@ -7340,14 +7348,18 @@ module ts { return unknownType; } } + if (!contextualSignature) { reportErrorsFromWidening(func, type); } let widenedType = getWidenedType(type); - return isAsync - ? createPromiseType(widenedType, func) - : widenedType; + if (isAsync) { + return createPromiseType(widenedType, func); + } + else { + return widenedType; + } } /// Returns a set of types relating to every return expression relating to a function block. @@ -7357,9 +7369,14 @@ module ts { forEachReturnStatement(body, returnStatement => { let expr = returnStatement.expression; if (expr) { - let type = isAsync - ? checkAwaitedExpressionCached(expr, contextualMapper) - : checkExpressionCached(expr, contextualMapper); + let type: Type; + if (isAsync) { + type = checkAwaitedExpressionCached(expr, contextualMapper); + } + else { + type = checkExpressionCached(expr, contextualMapper); + } + if (!contains(aggregatedTypes, type)) { aggregatedTypes.push(type); } @@ -7495,10 +7512,12 @@ module ts { else { let exprType = checkExpression(node.body); if (returnType) { - checkTypeAssignableTo( - isAsync ? getAwaitedType(exprType) : exprType, - isAsync ? promisedType : returnType, - node.body); + if (isAsync) { + checkTypeAssignableTo(getAwaitedType(exprType, node.body), promisedType, node.body); + } + else { + checkTypeAssignableTo(exprType, returnType, node.body); + } } checkFunctionExpressionBodies(node.body); } @@ -7619,8 +7638,8 @@ module ts { grammarErrorOnFirstToken(node, Diagnostics.await_expression_must_be_contained_within_an_async_function); } - var operandType = checkExpression(node.expression); - return getAwaitedType(operandType); + let operandType = checkExpression(node.expression); + return getAwaitedType(operandType, node); } function checkPrefixUnaryExpression(node: PrefixUnaryExpression): Type { @@ -8322,13 +8341,14 @@ module ts { break; } } + if (isAsyncFunctionLike(node)) { var promiseConstructor = getPromiseConstructor(node); if (promiseConstructor) { var promiseIdentifier = getFirstIdentifier(promiseConstructor); var promiseName = promiseIdentifier.text; - var typeSymbol = resolveName(node, promiseName, SymbolFlags.Type | SymbolFlags.Module, undefined, undefined); - var valueSymbol = resolveName(node, promiseName, SymbolFlags.Value, undefined, undefined); + var typeSymbol = resolveName(node, promiseName, SymbolFlags.Type | SymbolFlags.Module, /*nameNotFoundMessage*/ undefined, /*nameArg*/ undefined); + var valueSymbol = resolveName(node, promiseName, SymbolFlags.Value, /*nameNotFoundMessage*/ undefined, /*nameArg*/ undefined); if (typeSymbol !== valueSymbol) { var valueLinks = getNodeLinks(valueSymbol.valueDeclaration); if (!(valueLinks.flags & NodeCheckFlags.PromiseCollision)) { @@ -8932,8 +8952,28 @@ module ts { } } + function checkNonThenableType(type: Type, location?: Node, message?: DiagnosticMessage) { + if (!(type.flags & TypeFlags.Any) && isTypeAssignableTo(type, getGlobalThenableType())) { + if (location) { + if (!message) { + message = Diagnostics.Operand_for_await_does_not_have_a_valid_callable_then_member; + } + + error(location, message); + } + + return false; + } + + return true; + } + + /** + * Gets the "promised type" of a promise. + * @param type The type of the promise. + * @remarks The "promised type" of a type is the type of the "value" argument of the "onfulfilled" callback. + */ function getPromisedType(type: Type): Type { - // the "promised type" of a type is the type of the "value" argument of the "onfulfilled" callback. let globalPromiseLikeType = getInstantiatedGlobalPromiseLikeType(); if (globalPromiseLikeType !== emptyObjectType && isTypeAssignableTo(type, globalPromiseLikeType)) { let thenProp = getPropertyOfType(type, "then"); @@ -8954,67 +8994,100 @@ module ts { } return getUnionType(awaitedTypes); - } + } } - - return emptyObjectType; - } - function getAwaitedType(type: Type): Type { - // The "awaited type" of an expression is its "promised type" if the expression is a `Promise`; otherwise, it is the type of the expression. - + return unknownType; + } + + /** + * Gets the "awaited type" of a type. + * @param type The type to await. + * @remarks The "awaited type" of an expression is its "promised type" if the expression is a + * Promise-like type; otherwise, it is the type of the expression. This is used to reflect + * The runtime behavior of the `await` keyword. + */ + function getAwaitedType(type: Type, location?: Node): Type { let promisedType = getPromisedType(type); - if (promisedType === emptyObjectType) { - return type; + if (promisedType === unknownType) { + // if we got the unknown type, the type wasn't a promise. We need to check to + // ensure it is not a thenable. + if (checkNonThenableType(type, location)) { + return type; + } + + return unknownType; } - - // if we have a bad actor in the form of a promise whose promised type is the same promise, return the empty type. - // if this were the actual case in the JavaScript, this Promise would never resolve. - if (promisedType === type) { - return emptyObjectType; + else if (promisedType === type) { + // if we have a bad actor in the form of a promise whose promised type is the same + // promise, return the unknown type as we cannot guess the shape. + // if this were the actual case in the JavaScript, this Promise would never resolve. + if (location) { + error(location, Diagnostics.Operand_for_await_does_not_have_a_valid_callable_then_member); + } + + return unknownType; } - // unwrap any nested promises + // `seen` keeps track of types we've tried to await to avoid cycles. + // This is to protect against a bad actor with a mutually recursive promised type: + // + // declare class PromiseA { + // then(onfulfilled: (value: PromiseB) => any, onrejected?); + // } + // declare class PromiseB { + // then(onfulfilled: (value: PromiseA) => any, onrejected?); + // } + // let seen: boolean[]; + + // unwrap any nested promises while (true) { let nestedPromisedType = getPromisedType(promisedType); - if (nestedPromisedType === emptyObjectType) { - // if this could not be unwrapped further, return the promised type - return promisedType; + if (nestedPromisedType === unknownType) { + // this type could not be unwrapped further. We need to check to + // ensure it is not a thenable + if (checkNonThenableType(promisedType, location)) { + return promisedType; + } + + return unknownType; } if (!seen) { - // `seen` keeps track of types we've tried to await to avoid cycles seen = []; seen[type.id] = true; seen[promisedType.id] = true; } else if (seen[nestedPromisedType.id]) { - // if we've already seen this type, this is a promise that would never resolve. As above, we return the empty type. - return emptyObjectType; + // if we've already seen this type, this is a promise that + // would never resolve. As above, we return the unknown type. + if (location) { + error(location, Diagnostics.Operand_for_await_does_not_have_a_valid_callable_then_member); + } + + return unknownType; } seen[nestedPromisedType.id] = true; promisedType = nestedPromisedType; } - - return promisedType; - - // if we didn't get a promised type, check the type does not have a callable then member. - if (isTypeAssignableTo(type, getGlobalThenableType())) { - error(null, Diagnostics.Type_for_await_does_not_have_a_valid_callable_then_member); - return emptyObjectType; - } - - // if the type was not a "promise" or a "thenable", return the type. - return type; } - function checkAsyncFunctionReturnType(node: SignatureDeclaration, returnType: Type): Type { - // This checks that an async function has a valid Promise-compatible return type, and returns the *awaited type* of the promise. - // An async function has a valid Promise-compatible return type if the resolved value of the return type has a construct - // signature that takes in an `initializer` function that in turn supplies a `resolve` function as one of its arguments - // and results in an object with a callable `then` signature. + /** + * Checks the return type of an async function to ensure it is a compatible + * Promise implementation. + * @param node The signature to check + * @param returnType The return type for the function + * @remarks + * This checks that an async function has a valid Promise-compatible return type, + * and returns the *awaited type* of the promise. An async function has a valid + * Promise-compatible return type if the resolved value of the return type has a + * construct signature that takes in an `initializer` function that in turn supplies + * a `resolve` function as one of its arguments and results in an object with a + * callable `then` signature. + */ + function checkAsyncFunctionReturnType(node: SignatureDeclaration, returnType: Type): Type { let globalPromiseConstructorLikeType = getGlobalPromiseConstructorLikeType(); if (globalPromiseConstructorLikeType !== emptyObjectType) { if (!returnType) { @@ -9022,23 +9095,24 @@ module ts { } // get the constructor type of the return type - var declaredType = returnType.symbol ? getTypeOfSymbol(returnType.symbol) : emptyObjectType; + let declaredType = returnType.symbol ? getTypeOfSymbol(returnType.symbol) : emptyObjectType; if (isTypeAssignableTo(declaredType, globalPromiseConstructorLikeType)) { - var promisedType = getPromisedType(returnType); - if (promisedType !== emptyObjectType) { + let promisedType = getPromisedType(returnType); + if (promisedType !== unknownType) { // unwrap the promised type - var promiseConstructor = getPromiseConstructor(node); + let promiseConstructor = getPromiseConstructor(node); if (promiseConstructor) { - emitAwaiter = true; checkExpressionOrQualifiedName(promiseConstructor); - return getAwaitedType(promisedType); } + + emitAwaiter = true; + return getAwaitedType(promisedType, node); } } } error(node, ts.Diagnostics.An_async_function_or_method_must_have_a_valid_awaitable_return_type); - return emptyObjectType; + return unknownType; } /** Check a decorator */ @@ -12351,9 +12425,11 @@ module ts { let thenPropertySymbol = createSymbol(SymbolFlags.Transient | SymbolFlags.Property, "then"); getSymbolLinks(thenPropertySymbol).type = globalFunctionType; - let thenableType = createObjectType(TypeFlags.ObjectType); + let thenableType = createObjectType(TypeFlags.Anonymous); thenableType.properties = [thenPropertySymbol]; thenableType.members = createSymbolTable(thenableType.properties); + thenableType.callSignatures = []; + thenableType.constructSignatures = []; return thenableType; } diff --git a/src/compiler/diagnosticInformationMap.generated.ts b/src/compiler/diagnosticInformationMap.generated.ts index ec2bca8a7ce24..4a4ae96110907 100644 --- a/src/compiler/diagnosticInformationMap.generated.ts +++ b/src/compiler/diagnosticInformationMap.generated.ts @@ -50,7 +50,7 @@ module ts { A_get_accessor_cannot_have_parameters: { code: 1054, category: DiagnosticCategory.Error, key: "A 'get' accessor cannot have parameters." }, Accessors_are_only_available_when_targeting_ECMAScript_5_and_higher: { code: 1056, category: DiagnosticCategory.Error, key: "Accessors are only available when targeting ECMAScript 5 and higher." }, An_async_function_or_method_must_have_a_valid_awaitable_return_type: { code: 1057, category: DiagnosticCategory.Error, key: "An async function or method must have a valid awaitable return type." }, - Type_for_await_does_not_have_a_valid_callable_then_member: { code: 1058, category: DiagnosticCategory.Error, key: "Type for 'await' does not have a valid callable 'then' member." }, + Operand_for_await_does_not_have_a_valid_callable_then_member: { code: 1058, category: DiagnosticCategory.Error, key: "Operand for 'await' does not have a valid callable 'then' member." }, Enum_member_must_have_initializer: { code: 1061, category: DiagnosticCategory.Error, key: "Enum member must have initializer." }, An_export_assignment_cannot_be_used_in_a_namespace: { code: 1063, category: DiagnosticCategory.Error, key: "An export assignment cannot be used in a namespace." }, Ambient_enum_elements_can_only_have_integer_literal_initializers: { code: 1066, category: DiagnosticCategory.Error, key: "Ambient enum elements can only have integer literal initializers." }, @@ -381,11 +381,11 @@ module ts { An_interface_can_only_extend_an_identifier_Slashqualified_name_with_optional_type_arguments: { code: 2499, category: DiagnosticCategory.Error, key: "An interface can only extend an identifier/qualified-name with optional type arguments." }, A_class_can_only_implement_an_identifier_Slashqualified_name_with_optional_type_arguments: { code: 2500, category: DiagnosticCategory.Error, key: "A class can only implement an identifier/qualified-name with optional type arguments." }, A_rest_element_cannot_contain_a_binding_pattern: { code: 2501, category: DiagnosticCategory.Error, key: "A rest element cannot contain a binding pattern." }, + _0_is_referenced_directly_or_indirectly_in_its_own_type_annotation: { code: 2502, category: DiagnosticCategory.Error, key: "'{0}' is referenced directly or indirectly in its own type annotation." }, + Cannot_find_namespace_0: { code: 2503, category: DiagnosticCategory.Error, key: "Cannot find namespace '{0}'." }, Duplicate_identifier_0_Compiler_uses_declaration_1_to_support_async_functions: { code: 2520, category: DiagnosticCategory.Error, key: "Duplicate identifier '{0}'. Compiler uses declaration '{1}' to support async functions." }, Expression_resolves_to_variable_declaration_0_that_compiler_uses_to_support_async_functions: { code: 2521, category: DiagnosticCategory.Error, key: "Expression resolves to variable declaration '{0}' that compiler uses to support async functions." }, The_arguments_object_cannot_be_referenced_in_an_async_arrow_function_Consider_using_a_standard_async_function_expression: { code: 2522, category: DiagnosticCategory.Error, key: "The 'arguments' object cannot be referenced in an async arrow function Consider using a standard async function expression." }, - _0_is_referenced_directly_or_indirectly_in_its_own_type_annotation: { code: 2502, category: DiagnosticCategory.Error, key: "'{0}' is referenced directly or indirectly in its own type annotation." }, - Cannot_find_namespace_0: { code: 2503, category: DiagnosticCategory.Error, key: "Cannot find namespace '{0}'." }, Import_declaration_0_is_using_private_name_1: { code: 4000, category: DiagnosticCategory.Error, key: "Import declaration '{0}' is using private name '{1}'." }, Type_parameter_0_of_exported_class_has_or_is_using_private_name_1: { code: 4002, category: DiagnosticCategory.Error, key: "Type parameter '{0}' of exported class has or is using private name '{1}'." }, Type_parameter_0_of_exported_interface_has_or_is_using_private_name_1: { code: 4004, category: DiagnosticCategory.Error, key: "Type parameter '{0}' of exported interface has or is using private name '{1}'." }, diff --git a/src/compiler/diagnosticMessages.json b/src/compiler/diagnosticMessages.json index 600c928a0ddf5..feb7730a8a317 100644 --- a/src/compiler/diagnosticMessages.json +++ b/src/compiler/diagnosticMessages.json @@ -187,7 +187,7 @@ "category": "Error", "code": 1057 }, - "Type for 'await' does not have a valid callable 'then' member.": { + "Operand for 'await' does not have a valid callable 'then' member.": { "category": "Error", "code": 1058 }, diff --git a/src/compiler/parser.ts b/src/compiler/parser.ts index db6a00ec9aa81..f4ac24c5fc821 100644 --- a/src/compiler/parser.ts +++ b/src/compiler/parser.ts @@ -568,11 +568,15 @@ module ts { } function doOutsideOfContext(context: ParserContextFlags, func: () => T): T { - let setContextFlags = context & contextFlags; - if (setContextFlags) { - setContextFlag(false, setContextFlags); + // contextFlagsToClear will contain only the context flags that are + // currently set that we need to temporarily clear + let contextFlagsToClear = context & contextFlags; + if (contextFlagsToClear) { + // clear the requested context flags + setContextFlag(false, contextFlagsToClear); let result = func(); - setContextFlag(true, setContextFlags); + // restore the context flags we just cleared + setContextFlag(true, contextFlagsToClear); return result; } @@ -581,11 +585,15 @@ module ts { } function doInsideOfContext(context: ParserContextFlags, func: () => T): T { - let unsetContextFlags = context & ~contextFlags; - if (unsetContextFlags) { - setContextFlag(true, unsetContextFlags); + // contextFlagsToSet will contain only the context flags that + // are not currently set that we need to temporarily enable + let contextFlagsToSet = context & ~contextFlags; + if (contextFlagsToSet) { + // set the requested context flags + setContextFlag(true, contextFlagsToSet); let result = func(); - setContextFlag(false, unsetContextFlags); + // reset the context flags we just set + setContextFlag(false, contextFlagsToSet); return result; } @@ -1013,6 +1021,11 @@ module ts { } function canFollowModifier(isArrowFunction?: boolean): boolean { + // Arrow functions can have an `async` modifier, but the rules for what can follow that modifier + // differ from the rules for any other declaration. + // The `async` modifier on an async function can only be followed by an open parenthesis, + // or a less than token (in the case of a generic arrow function). + // In addition, the `async` modifier must appear on the same line as the following token. if (isArrowFunction) { if (scanner.hasPrecedingLineBreak()) { return false; @@ -1898,12 +1911,12 @@ module ts { function parseBindingElementInitializer(inParameter: boolean) { // BindingElement[Yield,GeneratorParameter,Await,AsyncParameter] : - // [+GeneratorParameter] BindingPattern[?Yield,?Await,GeneratorParameter] Initializer[In]opt - // [+AsyncParameter] BindingPattern[?Yield,?Await,AsyncParameter] Initializer[In]opt + // [+GeneratorParameter] BindingPattern[?Yield,?Await,?AsyncParameter,GeneratorParameter] Initializer[In]opt + // [+AsyncParameter] BindingPattern[?Yield,?GeneratorParameter,?Await,AsyncParameter] Initializer[In]opt // [~GeneratorParameter,~AsyncParameter] BindingPattern[?Yield,?Await] Initializer[In,?Yield,?Await]opt // SingleNameBinding[Yield,GeneratorParameter,Await,AsyncParameter] : - // [+GeneratorParameter] BindingIdentifier[Yield] Initializer[In]opt - // [+AsyncParameter] BindingIdentifier[Await] Initializer[In]opt + // [+GeneratorParameter] BindingIdentifier[Yield, ?Await] Initializer[In]opt + // [+AsyncParameter] BindingIdentifier[Await, ?Yield] Initializer[In]opt // [~GeneratorParameter,~AsyncParameter] BindingIdentifier[?Yield,?Await] Initializer[In,?Yield,?Await]opt let parseInitializer = inParameter ? parseParameterInitializer : parseNonParameterInitializer; return inGeneratorParameterOrAsyncParameterContext() @@ -2425,9 +2438,9 @@ module ts { case SyntaxKind.LessThanToken: case SyntaxKind.AwaitKeyword: case SyntaxKind.YieldKeyword: - // Yield always starts an expression. Either it is an identifier (in which case + // Yield/await always starts an expression. Either it is an identifier (in which case // it is definitely an expression). Or it's a keyword (either because we're in - // a generator, or in strict mode (or both)) and it started a yield expression. + // a generator or async function, or in strict mode (or both)) and it started a yield or await expression. return true; default: // Error tolerance. If we see the start of some binary operator, we consider @@ -3317,6 +3330,9 @@ module ts { case SyntaxKind.OpenBraceToken: return parseObjectLiteralExpression(); case SyntaxKind.AsyncKeyword: + // Async arrow functions are parsed earlier in parseAssignmentExpressionOrHigher. + // If we encounter `async [no LineTerminator here] function` then this is an async + // function; otherwise, its an identifier. if (!lookAhead(nextTokenIsFunctionKeywordOnSameLine)) { break; } @@ -3450,7 +3466,7 @@ module ts { parseExpected(SyntaxKind.FunctionKeyword); node.asteriskToken = parseOptionalToken(SyntaxKind.AsteriskToken); - let isGenerator = node.asteriskToken != undefined; + let isGenerator = !!node.asteriskToken; let isAsync = isAsyncFunctionLike(node); node.name = isGenerator && isAsync ? doInYieldAndAwaitContext(parseOptionalIdentifier) : @@ -4092,7 +4108,7 @@ module ts { parseExpected(SyntaxKind.FunctionKeyword); node.asteriskToken = parseOptionalToken(SyntaxKind.AsteriskToken); node.name = node.flags & NodeFlags.Default ? parseOptionalIdentifier() : parseIdentifier(); - let isGenerator = node.asteriskToken != undefined; + let isGenerator = !!node.asteriskToken; let isAsync = isAsyncFunctionLike(node); fillSignature(SyntaxKind.ColonToken, /*yieldAndGeneratorParameterContext*/ isGenerator, /*awaitAndAsyncParameterContext*/ isAsync, /*requireCompleteParameterList:*/ false, node); node.body = parseFunctionBlockOrSemicolon(isGenerator, isAsync, Diagnostics.or_expected); @@ -4116,7 +4132,7 @@ module ts { method.asteriskToken = asteriskToken; method.name = name; method.questionToken = questionToken; - let isGenerator = asteriskToken != undefined; + let isGenerator = !!asteriskToken; let isAsync = isAsyncFunctionLike(method); fillSignature(SyntaxKind.ColonToken, /*yieldAndGeneratorParameterContext:*/ isGenerator, /*awaitAndAsyncParameterContext*/ isAsync, /*requireCompleteParameterList:*/ false, method); method.body = parseFunctionBlockOrSemicolon(isGenerator, isAsync, diagnosticMessage); diff --git a/src/compiler/types.ts b/src/compiler/types.ts index 86b4113eecc9c..29206c53f39a5 100644 --- a/src/compiler/types.ts +++ b/src/compiler/types.ts @@ -344,16 +344,16 @@ module ts { // If this node was parsed as part of a decorator Decorator = 1 << 4, - // If the parser encountered an error when parsing the code that created this node. Note - // the parser only sets this directly on the node it creates right after encountering the - // error. - ThisNodeHasError = 1 << 5, - // If this node was parsed in the parameters of an async function. - AsyncParameter = 1 << 6, + AsyncParameter = 1 << 5, // If this node was parsed in the 'await' context created when parsing an async function. - Await = 1 << 7, + Await = 1 << 6, + + // If the parser encountered an error when parsing the code that created this node. Note + // the parser only sets this directly on the node it creates right after encountering the + // error. + ThisNodeHasError = 1 << 7, // Context flags set directly by the parser. ParserGeneratedFlags = StrictMode | DisallowIn | Yield | GeneratorParameter | Decorator | ThisNodeHasError | AsyncParameter | Await, From 239166643592ddaa4708094d9d9aa5daa70e4614 Mon Sep 17 00:00:00 2001 From: Ron Buckton Date: Fri, 8 May 2015 17:07:48 -0700 Subject: [PATCH 06/35] Updated declaration and symbol baselines --- src/lib/es6.d.ts | 1 + tests/baselines/reference/asyncArrowFunction1_es6.symbols | 2 +- tests/baselines/reference/asyncArrowFunction9_es6.symbols | 2 +- .../reference/asyncFunctionDeclaration10_es6.symbols | 2 +- .../reference/asyncFunctionDeclaration11_es6.symbols | 2 +- .../reference/asyncFunctionDeclaration14_es6.symbols | 2 +- .../reference/asyncFunctionDeclaration1_es6.symbols | 2 +- .../reference/awaitBinaryExpression1_es6.symbols | 4 ++-- .../reference/awaitBinaryExpression2_es6.symbols | 4 ++-- .../reference/awaitBinaryExpression3_es6.symbols | 4 ++-- .../reference/awaitBinaryExpression4_es6.symbols | 4 ++-- .../reference/awaitBinaryExpression5_es6.symbols | 4 ++-- .../baselines/reference/awaitCallExpression1_es6.symbols | 8 ++++---- .../baselines/reference/awaitCallExpression2_es6.symbols | 8 ++++---- .../baselines/reference/awaitCallExpression3_es6.symbols | 8 ++++---- .../baselines/reference/awaitCallExpression4_es6.symbols | 8 ++++---- .../baselines/reference/awaitCallExpression5_es6.symbols | 8 ++++---- .../baselines/reference/awaitCallExpression6_es6.symbols | 8 ++++---- .../baselines/reference/awaitCallExpression7_es6.symbols | 8 ++++---- .../baselines/reference/awaitCallExpression8_es6.symbols | 8 ++++---- .../baselines/reference/promiseVoidErrorCallback.symbols | 8 ++++---- 21 files changed, 53 insertions(+), 52 deletions(-) diff --git a/src/lib/es6.d.ts b/src/lib/es6.d.ts index 2c1db00de9b8e..b6b8d8fc13b18 100644 --- a/src/lib/es6.d.ts +++ b/src/lib/es6.d.ts @@ -3591,6 +3591,7 @@ interface Promise { * @returns A Promise for the completion of the callback. */ catch(onrejected?: (reason: any) => T | PromiseLike): Promise; + catch(onrejected?: (reason: any) => void): Promise; [Symbol.toStringTag]: string; } diff --git a/tests/baselines/reference/asyncArrowFunction1_es6.symbols b/tests/baselines/reference/asyncArrowFunction1_es6.symbols index 405121287a6ba..3540c6d24982e 100644 --- a/tests/baselines/reference/asyncArrowFunction1_es6.symbols +++ b/tests/baselines/reference/asyncArrowFunction1_es6.symbols @@ -2,6 +2,6 @@ var foo = async (): Promise => { >foo : Symbol(foo, Decl(asyncArrowFunction1_es6.ts, 1, 3)) ->Promise : Symbol(Promise, Decl(lib.d.ts, 4770, 1), Decl(lib.d.ts, 4855, 11)) +>Promise : Symbol(Promise, Decl(lib.d.ts, 4770, 1), Decl(lib.d.ts, 4856, 11)) }; diff --git a/tests/baselines/reference/asyncArrowFunction9_es6.symbols b/tests/baselines/reference/asyncArrowFunction9_es6.symbols index 7c50a463248e5..66612c3483077 100644 --- a/tests/baselines/reference/asyncArrowFunction9_es6.symbols +++ b/tests/baselines/reference/asyncArrowFunction9_es6.symbols @@ -4,5 +4,5 @@ var foo = async (a = await => await): Promise => { >a : Symbol(a, Decl(asyncArrowFunction9_es6.ts, 0, 17)) >await : Symbol(await, Decl(asyncArrowFunction9_es6.ts, 0, 20)) >await : Symbol(await, Decl(asyncArrowFunction9_es6.ts, 0, 20)) ->Promise : Symbol(Promise, Decl(lib.d.ts, 4770, 1), Decl(lib.d.ts, 4855, 11)) +>Promise : Symbol(Promise, Decl(lib.d.ts, 4770, 1), Decl(lib.d.ts, 4856, 11)) } diff --git a/tests/baselines/reference/asyncFunctionDeclaration10_es6.symbols b/tests/baselines/reference/asyncFunctionDeclaration10_es6.symbols index 76ed959e0af1f..cc3870c6d71fe 100644 --- a/tests/baselines/reference/asyncFunctionDeclaration10_es6.symbols +++ b/tests/baselines/reference/asyncFunctionDeclaration10_es6.symbols @@ -4,5 +4,5 @@ async function foo(a = await => await): Promise { >a : Symbol(a, Decl(asyncFunctionDeclaration10_es6.ts, 0, 19)) >await : Symbol(await, Decl(asyncFunctionDeclaration10_es6.ts, 0, 22)) >await : Symbol(await, Decl(asyncFunctionDeclaration10_es6.ts, 0, 22)) ->Promise : Symbol(Promise, Decl(lib.d.ts, 4770, 1), Decl(lib.d.ts, 4855, 11)) +>Promise : Symbol(Promise, Decl(lib.d.ts, 4770, 1), Decl(lib.d.ts, 4856, 11)) } diff --git a/tests/baselines/reference/asyncFunctionDeclaration11_es6.symbols b/tests/baselines/reference/asyncFunctionDeclaration11_es6.symbols index ec47746020290..58fe50df2cf41 100644 --- a/tests/baselines/reference/asyncFunctionDeclaration11_es6.symbols +++ b/tests/baselines/reference/asyncFunctionDeclaration11_es6.symbols @@ -1,5 +1,5 @@ === tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration11_es6.ts === async function await(): Promise { >await : Symbol(await, Decl(asyncFunctionDeclaration11_es6.ts, 0, 0)) ->Promise : Symbol(Promise, Decl(lib.d.ts, 4770, 1), Decl(lib.d.ts, 4855, 11)) +>Promise : Symbol(Promise, Decl(lib.d.ts, 4770, 1), Decl(lib.d.ts, 4856, 11)) } diff --git a/tests/baselines/reference/asyncFunctionDeclaration14_es6.symbols b/tests/baselines/reference/asyncFunctionDeclaration14_es6.symbols index 0cbcb69685c93..a88f3f752e096 100644 --- a/tests/baselines/reference/asyncFunctionDeclaration14_es6.symbols +++ b/tests/baselines/reference/asyncFunctionDeclaration14_es6.symbols @@ -1,7 +1,7 @@ === tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration14_es6.ts === async function foo(): Promise { >foo : Symbol(foo, Decl(asyncFunctionDeclaration14_es6.ts, 0, 0)) ->Promise : Symbol(Promise, Decl(lib.d.ts, 4770, 1), Decl(lib.d.ts, 4855, 11)) +>Promise : Symbol(Promise, Decl(lib.d.ts, 4770, 1), Decl(lib.d.ts, 4856, 11)) return; } diff --git a/tests/baselines/reference/asyncFunctionDeclaration1_es6.symbols b/tests/baselines/reference/asyncFunctionDeclaration1_es6.symbols index 9631076c0842f..ee10e306a4218 100644 --- a/tests/baselines/reference/asyncFunctionDeclaration1_es6.symbols +++ b/tests/baselines/reference/asyncFunctionDeclaration1_es6.symbols @@ -1,5 +1,5 @@ === tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration1_es6.ts === async function foo(): Promise { >foo : Symbol(foo, Decl(asyncFunctionDeclaration1_es6.ts, 0, 0)) ->Promise : Symbol(Promise, Decl(lib.d.ts, 4770, 1), Decl(lib.d.ts, 4855, 11)) +>Promise : Symbol(Promise, Decl(lib.d.ts, 4770, 1), Decl(lib.d.ts, 4856, 11)) } diff --git a/tests/baselines/reference/awaitBinaryExpression1_es6.symbols b/tests/baselines/reference/awaitBinaryExpression1_es6.symbols index 6df30c99fa59e..b33c26f7707a0 100644 --- a/tests/baselines/reference/awaitBinaryExpression1_es6.symbols +++ b/tests/baselines/reference/awaitBinaryExpression1_es6.symbols @@ -4,11 +4,11 @@ declare var a: boolean; declare var p: Promise; >p : Symbol(p, Decl(awaitBinaryExpression1_es6.ts, 1, 11)) ->Promise : Symbol(Promise, Decl(lib.d.ts, 4770, 1), Decl(lib.d.ts, 4855, 11)) +>Promise : Symbol(Promise, Decl(lib.d.ts, 4770, 1), Decl(lib.d.ts, 4856, 11)) async function func(): Promise { >func : Symbol(func, Decl(awaitBinaryExpression1_es6.ts, 1, 32)) ->Promise : Symbol(Promise, Decl(lib.d.ts, 4770, 1), Decl(lib.d.ts, 4855, 11)) +>Promise : Symbol(Promise, Decl(lib.d.ts, 4770, 1), Decl(lib.d.ts, 4856, 11)) "before"; var b = await p || a; diff --git a/tests/baselines/reference/awaitBinaryExpression2_es6.symbols b/tests/baselines/reference/awaitBinaryExpression2_es6.symbols index af1c2e3395ad8..f36bc7f2019fe 100644 --- a/tests/baselines/reference/awaitBinaryExpression2_es6.symbols +++ b/tests/baselines/reference/awaitBinaryExpression2_es6.symbols @@ -4,11 +4,11 @@ declare var a: boolean; declare var p: Promise; >p : Symbol(p, Decl(awaitBinaryExpression2_es6.ts, 1, 11)) ->Promise : Symbol(Promise, Decl(lib.d.ts, 4770, 1), Decl(lib.d.ts, 4855, 11)) +>Promise : Symbol(Promise, Decl(lib.d.ts, 4770, 1), Decl(lib.d.ts, 4856, 11)) async function func(): Promise { >func : Symbol(func, Decl(awaitBinaryExpression2_es6.ts, 1, 32)) ->Promise : Symbol(Promise, Decl(lib.d.ts, 4770, 1), Decl(lib.d.ts, 4855, 11)) +>Promise : Symbol(Promise, Decl(lib.d.ts, 4770, 1), Decl(lib.d.ts, 4856, 11)) "before"; var b = await p && a; diff --git a/tests/baselines/reference/awaitBinaryExpression3_es6.symbols b/tests/baselines/reference/awaitBinaryExpression3_es6.symbols index 6983f2c73ab57..543a6e8659d3c 100644 --- a/tests/baselines/reference/awaitBinaryExpression3_es6.symbols +++ b/tests/baselines/reference/awaitBinaryExpression3_es6.symbols @@ -4,11 +4,11 @@ declare var a: number; declare var p: Promise; >p : Symbol(p, Decl(awaitBinaryExpression3_es6.ts, 1, 11)) ->Promise : Symbol(Promise, Decl(lib.d.ts, 4770, 1), Decl(lib.d.ts, 4855, 11)) +>Promise : Symbol(Promise, Decl(lib.d.ts, 4770, 1), Decl(lib.d.ts, 4856, 11)) async function func(): Promise { >func : Symbol(func, Decl(awaitBinaryExpression3_es6.ts, 1, 31)) ->Promise : Symbol(Promise, Decl(lib.d.ts, 4770, 1), Decl(lib.d.ts, 4855, 11)) +>Promise : Symbol(Promise, Decl(lib.d.ts, 4770, 1), Decl(lib.d.ts, 4856, 11)) "before"; var b = await p + a; diff --git a/tests/baselines/reference/awaitBinaryExpression4_es6.symbols b/tests/baselines/reference/awaitBinaryExpression4_es6.symbols index 42f6730ad66aa..142655b999707 100644 --- a/tests/baselines/reference/awaitBinaryExpression4_es6.symbols +++ b/tests/baselines/reference/awaitBinaryExpression4_es6.symbols @@ -4,11 +4,11 @@ declare var a: boolean; declare var p: Promise; >p : Symbol(p, Decl(awaitBinaryExpression4_es6.ts, 1, 11)) ->Promise : Symbol(Promise, Decl(lib.d.ts, 4770, 1), Decl(lib.d.ts, 4855, 11)) +>Promise : Symbol(Promise, Decl(lib.d.ts, 4770, 1), Decl(lib.d.ts, 4856, 11)) async function func(): Promise { >func : Symbol(func, Decl(awaitBinaryExpression4_es6.ts, 1, 32)) ->Promise : Symbol(Promise, Decl(lib.d.ts, 4770, 1), Decl(lib.d.ts, 4855, 11)) +>Promise : Symbol(Promise, Decl(lib.d.ts, 4770, 1), Decl(lib.d.ts, 4856, 11)) "before"; var b = await p, a; diff --git a/tests/baselines/reference/awaitBinaryExpression5_es6.symbols b/tests/baselines/reference/awaitBinaryExpression5_es6.symbols index 4f5d853c68f96..f883da2cd16ce 100644 --- a/tests/baselines/reference/awaitBinaryExpression5_es6.symbols +++ b/tests/baselines/reference/awaitBinaryExpression5_es6.symbols @@ -4,11 +4,11 @@ declare var a: boolean; declare var p: Promise; >p : Symbol(p, Decl(awaitBinaryExpression5_es6.ts, 1, 11)) ->Promise : Symbol(Promise, Decl(lib.d.ts, 4770, 1), Decl(lib.d.ts, 4855, 11)) +>Promise : Symbol(Promise, Decl(lib.d.ts, 4770, 1), Decl(lib.d.ts, 4856, 11)) async function func(): Promise { >func : Symbol(func, Decl(awaitBinaryExpression5_es6.ts, 1, 32)) ->Promise : Symbol(Promise, Decl(lib.d.ts, 4770, 1), Decl(lib.d.ts, 4855, 11)) +>Promise : Symbol(Promise, Decl(lib.d.ts, 4770, 1), Decl(lib.d.ts, 4856, 11)) "before"; var o: { a: boolean; }; diff --git a/tests/baselines/reference/awaitCallExpression1_es6.symbols b/tests/baselines/reference/awaitCallExpression1_es6.symbols index 4065e1e0e0200..1e7f17daa7cee 100644 --- a/tests/baselines/reference/awaitCallExpression1_es6.symbols +++ b/tests/baselines/reference/awaitCallExpression1_es6.symbols @@ -4,7 +4,7 @@ declare var a: boolean; declare var p: Promise; >p : Symbol(p, Decl(awaitCallExpression1_es6.ts, 1, 11)) ->Promise : Symbol(Promise, Decl(lib.d.ts, 4770, 1), Decl(lib.d.ts, 4855, 11)) +>Promise : Symbol(Promise, Decl(lib.d.ts, 4770, 1), Decl(lib.d.ts, 4856, 11)) declare function fn(arg0: boolean, arg1: boolean, arg2: boolean): void; >fn : Symbol(fn, Decl(awaitCallExpression1_es6.ts, 1, 32)) @@ -21,14 +21,14 @@ declare var o: { fn(arg0: boolean, arg1: boolean, arg2: boolean): void; }; declare var pfn: Promise<{ (arg0: boolean, arg1: boolean, arg2: boolean): void; }>; >pfn : Symbol(pfn, Decl(awaitCallExpression1_es6.ts, 4, 11)) ->Promise : Symbol(Promise, Decl(lib.d.ts, 4770, 1), Decl(lib.d.ts, 4855, 11)) +>Promise : Symbol(Promise, Decl(lib.d.ts, 4770, 1), Decl(lib.d.ts, 4856, 11)) >arg0 : Symbol(arg0, Decl(awaitCallExpression1_es6.ts, 4, 28)) >arg1 : Symbol(arg1, Decl(awaitCallExpression1_es6.ts, 4, 42)) >arg2 : Symbol(arg2, Decl(awaitCallExpression1_es6.ts, 4, 57)) declare var po: Promise<{ fn(arg0: boolean, arg1: boolean, arg2: boolean): void; }>; >po : Symbol(po, Decl(awaitCallExpression1_es6.ts, 5, 11)) ->Promise : Symbol(Promise, Decl(lib.d.ts, 4770, 1), Decl(lib.d.ts, 4855, 11)) +>Promise : Symbol(Promise, Decl(lib.d.ts, 4770, 1), Decl(lib.d.ts, 4856, 11)) >fn : Symbol(fn, Decl(awaitCallExpression1_es6.ts, 5, 25)) >arg0 : Symbol(arg0, Decl(awaitCallExpression1_es6.ts, 5, 29)) >arg1 : Symbol(arg1, Decl(awaitCallExpression1_es6.ts, 5, 43)) @@ -36,7 +36,7 @@ declare var po: Promise<{ fn(arg0: boolean, arg1: boolean, arg2: boolean): void; async function func(): Promise { >func : Symbol(func, Decl(awaitCallExpression1_es6.ts, 5, 84)) ->Promise : Symbol(Promise, Decl(lib.d.ts, 4770, 1), Decl(lib.d.ts, 4855, 11)) +>Promise : Symbol(Promise, Decl(lib.d.ts, 4770, 1), Decl(lib.d.ts, 4856, 11)) "before"; var b = fn(a, a, a); diff --git a/tests/baselines/reference/awaitCallExpression2_es6.symbols b/tests/baselines/reference/awaitCallExpression2_es6.symbols index a4b36cbc13c16..ad053c6a75f6c 100644 --- a/tests/baselines/reference/awaitCallExpression2_es6.symbols +++ b/tests/baselines/reference/awaitCallExpression2_es6.symbols @@ -4,7 +4,7 @@ declare var a: boolean; declare var p: Promise; >p : Symbol(p, Decl(awaitCallExpression2_es6.ts, 1, 11)) ->Promise : Symbol(Promise, Decl(lib.d.ts, 4770, 1), Decl(lib.d.ts, 4855, 11)) +>Promise : Symbol(Promise, Decl(lib.d.ts, 4770, 1), Decl(lib.d.ts, 4856, 11)) declare function fn(arg0: boolean, arg1: boolean, arg2: boolean): void; >fn : Symbol(fn, Decl(awaitCallExpression2_es6.ts, 1, 32)) @@ -21,14 +21,14 @@ declare var o: { fn(arg0: boolean, arg1: boolean, arg2: boolean): void; }; declare var pfn: Promise<{ (arg0: boolean, arg1: boolean, arg2: boolean): void; }>; >pfn : Symbol(pfn, Decl(awaitCallExpression2_es6.ts, 4, 11)) ->Promise : Symbol(Promise, Decl(lib.d.ts, 4770, 1), Decl(lib.d.ts, 4855, 11)) +>Promise : Symbol(Promise, Decl(lib.d.ts, 4770, 1), Decl(lib.d.ts, 4856, 11)) >arg0 : Symbol(arg0, Decl(awaitCallExpression2_es6.ts, 4, 28)) >arg1 : Symbol(arg1, Decl(awaitCallExpression2_es6.ts, 4, 42)) >arg2 : Symbol(arg2, Decl(awaitCallExpression2_es6.ts, 4, 57)) declare var po: Promise<{ fn(arg0: boolean, arg1: boolean, arg2: boolean): void; }>; >po : Symbol(po, Decl(awaitCallExpression2_es6.ts, 5, 11)) ->Promise : Symbol(Promise, Decl(lib.d.ts, 4770, 1), Decl(lib.d.ts, 4855, 11)) +>Promise : Symbol(Promise, Decl(lib.d.ts, 4770, 1), Decl(lib.d.ts, 4856, 11)) >fn : Symbol(fn, Decl(awaitCallExpression2_es6.ts, 5, 25)) >arg0 : Symbol(arg0, Decl(awaitCallExpression2_es6.ts, 5, 29)) >arg1 : Symbol(arg1, Decl(awaitCallExpression2_es6.ts, 5, 43)) @@ -36,7 +36,7 @@ declare var po: Promise<{ fn(arg0: boolean, arg1: boolean, arg2: boolean): void; async function func(): Promise { >func : Symbol(func, Decl(awaitCallExpression2_es6.ts, 5, 84)) ->Promise : Symbol(Promise, Decl(lib.d.ts, 4770, 1), Decl(lib.d.ts, 4855, 11)) +>Promise : Symbol(Promise, Decl(lib.d.ts, 4770, 1), Decl(lib.d.ts, 4856, 11)) "before"; var b = fn(await p, a, a); diff --git a/tests/baselines/reference/awaitCallExpression3_es6.symbols b/tests/baselines/reference/awaitCallExpression3_es6.symbols index 184c80fde62c3..ad6ec4b11a0b7 100644 --- a/tests/baselines/reference/awaitCallExpression3_es6.symbols +++ b/tests/baselines/reference/awaitCallExpression3_es6.symbols @@ -4,7 +4,7 @@ declare var a: boolean; declare var p: Promise; >p : Symbol(p, Decl(awaitCallExpression3_es6.ts, 1, 11)) ->Promise : Symbol(Promise, Decl(lib.d.ts, 4770, 1), Decl(lib.d.ts, 4855, 11)) +>Promise : Symbol(Promise, Decl(lib.d.ts, 4770, 1), Decl(lib.d.ts, 4856, 11)) declare function fn(arg0: boolean, arg1: boolean, arg2: boolean): void; >fn : Symbol(fn, Decl(awaitCallExpression3_es6.ts, 1, 32)) @@ -21,14 +21,14 @@ declare var o: { fn(arg0: boolean, arg1: boolean, arg2: boolean): void; }; declare var pfn: Promise<{ (arg0: boolean, arg1: boolean, arg2: boolean): void; }>; >pfn : Symbol(pfn, Decl(awaitCallExpression3_es6.ts, 4, 11)) ->Promise : Symbol(Promise, Decl(lib.d.ts, 4770, 1), Decl(lib.d.ts, 4855, 11)) +>Promise : Symbol(Promise, Decl(lib.d.ts, 4770, 1), Decl(lib.d.ts, 4856, 11)) >arg0 : Symbol(arg0, Decl(awaitCallExpression3_es6.ts, 4, 28)) >arg1 : Symbol(arg1, Decl(awaitCallExpression3_es6.ts, 4, 42)) >arg2 : Symbol(arg2, Decl(awaitCallExpression3_es6.ts, 4, 57)) declare var po: Promise<{ fn(arg0: boolean, arg1: boolean, arg2: boolean): void; }>; >po : Symbol(po, Decl(awaitCallExpression3_es6.ts, 5, 11)) ->Promise : Symbol(Promise, Decl(lib.d.ts, 4770, 1), Decl(lib.d.ts, 4855, 11)) +>Promise : Symbol(Promise, Decl(lib.d.ts, 4770, 1), Decl(lib.d.ts, 4856, 11)) >fn : Symbol(fn, Decl(awaitCallExpression3_es6.ts, 5, 25)) >arg0 : Symbol(arg0, Decl(awaitCallExpression3_es6.ts, 5, 29)) >arg1 : Symbol(arg1, Decl(awaitCallExpression3_es6.ts, 5, 43)) @@ -36,7 +36,7 @@ declare var po: Promise<{ fn(arg0: boolean, arg1: boolean, arg2: boolean): void; async function func(): Promise { >func : Symbol(func, Decl(awaitCallExpression3_es6.ts, 5, 84)) ->Promise : Symbol(Promise, Decl(lib.d.ts, 4770, 1), Decl(lib.d.ts, 4855, 11)) +>Promise : Symbol(Promise, Decl(lib.d.ts, 4770, 1), Decl(lib.d.ts, 4856, 11)) "before"; var b = fn(a, await p, a); diff --git a/tests/baselines/reference/awaitCallExpression4_es6.symbols b/tests/baselines/reference/awaitCallExpression4_es6.symbols index f8a7bbe037b85..1ef5577411435 100644 --- a/tests/baselines/reference/awaitCallExpression4_es6.symbols +++ b/tests/baselines/reference/awaitCallExpression4_es6.symbols @@ -4,7 +4,7 @@ declare var a: boolean; declare var p: Promise; >p : Symbol(p, Decl(awaitCallExpression4_es6.ts, 1, 11)) ->Promise : Symbol(Promise, Decl(lib.d.ts, 4770, 1), Decl(lib.d.ts, 4855, 11)) +>Promise : Symbol(Promise, Decl(lib.d.ts, 4770, 1), Decl(lib.d.ts, 4856, 11)) declare function fn(arg0: boolean, arg1: boolean, arg2: boolean): void; >fn : Symbol(fn, Decl(awaitCallExpression4_es6.ts, 1, 32)) @@ -21,14 +21,14 @@ declare var o: { fn(arg0: boolean, arg1: boolean, arg2: boolean): void; }; declare var pfn: Promise<{ (arg0: boolean, arg1: boolean, arg2: boolean): void; }>; >pfn : Symbol(pfn, Decl(awaitCallExpression4_es6.ts, 4, 11)) ->Promise : Symbol(Promise, Decl(lib.d.ts, 4770, 1), Decl(lib.d.ts, 4855, 11)) +>Promise : Symbol(Promise, Decl(lib.d.ts, 4770, 1), Decl(lib.d.ts, 4856, 11)) >arg0 : Symbol(arg0, Decl(awaitCallExpression4_es6.ts, 4, 28)) >arg1 : Symbol(arg1, Decl(awaitCallExpression4_es6.ts, 4, 42)) >arg2 : Symbol(arg2, Decl(awaitCallExpression4_es6.ts, 4, 57)) declare var po: Promise<{ fn(arg0: boolean, arg1: boolean, arg2: boolean): void; }>; >po : Symbol(po, Decl(awaitCallExpression4_es6.ts, 5, 11)) ->Promise : Symbol(Promise, Decl(lib.d.ts, 4770, 1), Decl(lib.d.ts, 4855, 11)) +>Promise : Symbol(Promise, Decl(lib.d.ts, 4770, 1), Decl(lib.d.ts, 4856, 11)) >fn : Symbol(fn, Decl(awaitCallExpression4_es6.ts, 5, 25)) >arg0 : Symbol(arg0, Decl(awaitCallExpression4_es6.ts, 5, 29)) >arg1 : Symbol(arg1, Decl(awaitCallExpression4_es6.ts, 5, 43)) @@ -36,7 +36,7 @@ declare var po: Promise<{ fn(arg0: boolean, arg1: boolean, arg2: boolean): void; async function func(): Promise { >func : Symbol(func, Decl(awaitCallExpression4_es6.ts, 5, 84)) ->Promise : Symbol(Promise, Decl(lib.d.ts, 4770, 1), Decl(lib.d.ts, 4855, 11)) +>Promise : Symbol(Promise, Decl(lib.d.ts, 4770, 1), Decl(lib.d.ts, 4856, 11)) "before"; var b = (await pfn)(a, a, a); diff --git a/tests/baselines/reference/awaitCallExpression5_es6.symbols b/tests/baselines/reference/awaitCallExpression5_es6.symbols index 58a0553533efe..11232eeb38ca6 100644 --- a/tests/baselines/reference/awaitCallExpression5_es6.symbols +++ b/tests/baselines/reference/awaitCallExpression5_es6.symbols @@ -4,7 +4,7 @@ declare var a: boolean; declare var p: Promise; >p : Symbol(p, Decl(awaitCallExpression5_es6.ts, 1, 11)) ->Promise : Symbol(Promise, Decl(lib.d.ts, 4770, 1), Decl(lib.d.ts, 4855, 11)) +>Promise : Symbol(Promise, Decl(lib.d.ts, 4770, 1), Decl(lib.d.ts, 4856, 11)) declare function fn(arg0: boolean, arg1: boolean, arg2: boolean): void; >fn : Symbol(fn, Decl(awaitCallExpression5_es6.ts, 1, 32)) @@ -21,14 +21,14 @@ declare var o: { fn(arg0: boolean, arg1: boolean, arg2: boolean): void; }; declare var pfn: Promise<{ (arg0: boolean, arg1: boolean, arg2: boolean): void; }>; >pfn : Symbol(pfn, Decl(awaitCallExpression5_es6.ts, 4, 11)) ->Promise : Symbol(Promise, Decl(lib.d.ts, 4770, 1), Decl(lib.d.ts, 4855, 11)) +>Promise : Symbol(Promise, Decl(lib.d.ts, 4770, 1), Decl(lib.d.ts, 4856, 11)) >arg0 : Symbol(arg0, Decl(awaitCallExpression5_es6.ts, 4, 28)) >arg1 : Symbol(arg1, Decl(awaitCallExpression5_es6.ts, 4, 42)) >arg2 : Symbol(arg2, Decl(awaitCallExpression5_es6.ts, 4, 57)) declare var po: Promise<{ fn(arg0: boolean, arg1: boolean, arg2: boolean): void; }>; >po : Symbol(po, Decl(awaitCallExpression5_es6.ts, 5, 11)) ->Promise : Symbol(Promise, Decl(lib.d.ts, 4770, 1), Decl(lib.d.ts, 4855, 11)) +>Promise : Symbol(Promise, Decl(lib.d.ts, 4770, 1), Decl(lib.d.ts, 4856, 11)) >fn : Symbol(fn, Decl(awaitCallExpression5_es6.ts, 5, 25)) >arg0 : Symbol(arg0, Decl(awaitCallExpression5_es6.ts, 5, 29)) >arg1 : Symbol(arg1, Decl(awaitCallExpression5_es6.ts, 5, 43)) @@ -36,7 +36,7 @@ declare var po: Promise<{ fn(arg0: boolean, arg1: boolean, arg2: boolean): void; async function func(): Promise { >func : Symbol(func, Decl(awaitCallExpression5_es6.ts, 5, 84)) ->Promise : Symbol(Promise, Decl(lib.d.ts, 4770, 1), Decl(lib.d.ts, 4855, 11)) +>Promise : Symbol(Promise, Decl(lib.d.ts, 4770, 1), Decl(lib.d.ts, 4856, 11)) "before"; var b = o.fn(a, a, a); diff --git a/tests/baselines/reference/awaitCallExpression6_es6.symbols b/tests/baselines/reference/awaitCallExpression6_es6.symbols index 48262825ed9cc..06ec12c99d3c5 100644 --- a/tests/baselines/reference/awaitCallExpression6_es6.symbols +++ b/tests/baselines/reference/awaitCallExpression6_es6.symbols @@ -4,7 +4,7 @@ declare var a: boolean; declare var p: Promise; >p : Symbol(p, Decl(awaitCallExpression6_es6.ts, 1, 11)) ->Promise : Symbol(Promise, Decl(lib.d.ts, 4770, 1), Decl(lib.d.ts, 4855, 11)) +>Promise : Symbol(Promise, Decl(lib.d.ts, 4770, 1), Decl(lib.d.ts, 4856, 11)) declare function fn(arg0: boolean, arg1: boolean, arg2: boolean): void; >fn : Symbol(fn, Decl(awaitCallExpression6_es6.ts, 1, 32)) @@ -21,14 +21,14 @@ declare var o: { fn(arg0: boolean, arg1: boolean, arg2: boolean): void; }; declare var pfn: Promise<{ (arg0: boolean, arg1: boolean, arg2: boolean): void; }>; >pfn : Symbol(pfn, Decl(awaitCallExpression6_es6.ts, 4, 11)) ->Promise : Symbol(Promise, Decl(lib.d.ts, 4770, 1), Decl(lib.d.ts, 4855, 11)) +>Promise : Symbol(Promise, Decl(lib.d.ts, 4770, 1), Decl(lib.d.ts, 4856, 11)) >arg0 : Symbol(arg0, Decl(awaitCallExpression6_es6.ts, 4, 28)) >arg1 : Symbol(arg1, Decl(awaitCallExpression6_es6.ts, 4, 42)) >arg2 : Symbol(arg2, Decl(awaitCallExpression6_es6.ts, 4, 57)) declare var po: Promise<{ fn(arg0: boolean, arg1: boolean, arg2: boolean): void; }>; >po : Symbol(po, Decl(awaitCallExpression6_es6.ts, 5, 11)) ->Promise : Symbol(Promise, Decl(lib.d.ts, 4770, 1), Decl(lib.d.ts, 4855, 11)) +>Promise : Symbol(Promise, Decl(lib.d.ts, 4770, 1), Decl(lib.d.ts, 4856, 11)) >fn : Symbol(fn, Decl(awaitCallExpression6_es6.ts, 5, 25)) >arg0 : Symbol(arg0, Decl(awaitCallExpression6_es6.ts, 5, 29)) >arg1 : Symbol(arg1, Decl(awaitCallExpression6_es6.ts, 5, 43)) @@ -36,7 +36,7 @@ declare var po: Promise<{ fn(arg0: boolean, arg1: boolean, arg2: boolean): void; async function func(): Promise { >func : Symbol(func, Decl(awaitCallExpression6_es6.ts, 5, 84)) ->Promise : Symbol(Promise, Decl(lib.d.ts, 4770, 1), Decl(lib.d.ts, 4855, 11)) +>Promise : Symbol(Promise, Decl(lib.d.ts, 4770, 1), Decl(lib.d.ts, 4856, 11)) "before"; var b = o.fn(await p, a, a); diff --git a/tests/baselines/reference/awaitCallExpression7_es6.symbols b/tests/baselines/reference/awaitCallExpression7_es6.symbols index 85f172d03e425..91cce6e9a336f 100644 --- a/tests/baselines/reference/awaitCallExpression7_es6.symbols +++ b/tests/baselines/reference/awaitCallExpression7_es6.symbols @@ -4,7 +4,7 @@ declare var a: boolean; declare var p: Promise; >p : Symbol(p, Decl(awaitCallExpression7_es6.ts, 1, 11)) ->Promise : Symbol(Promise, Decl(lib.d.ts, 4770, 1), Decl(lib.d.ts, 4855, 11)) +>Promise : Symbol(Promise, Decl(lib.d.ts, 4770, 1), Decl(lib.d.ts, 4856, 11)) declare function fn(arg0: boolean, arg1: boolean, arg2: boolean): void; >fn : Symbol(fn, Decl(awaitCallExpression7_es6.ts, 1, 32)) @@ -21,14 +21,14 @@ declare var o: { fn(arg0: boolean, arg1: boolean, arg2: boolean): void; }; declare var pfn: Promise<{ (arg0: boolean, arg1: boolean, arg2: boolean): void; }>; >pfn : Symbol(pfn, Decl(awaitCallExpression7_es6.ts, 4, 11)) ->Promise : Symbol(Promise, Decl(lib.d.ts, 4770, 1), Decl(lib.d.ts, 4855, 11)) +>Promise : Symbol(Promise, Decl(lib.d.ts, 4770, 1), Decl(lib.d.ts, 4856, 11)) >arg0 : Symbol(arg0, Decl(awaitCallExpression7_es6.ts, 4, 28)) >arg1 : Symbol(arg1, Decl(awaitCallExpression7_es6.ts, 4, 42)) >arg2 : Symbol(arg2, Decl(awaitCallExpression7_es6.ts, 4, 57)) declare var po: Promise<{ fn(arg0: boolean, arg1: boolean, arg2: boolean): void; }>; >po : Symbol(po, Decl(awaitCallExpression7_es6.ts, 5, 11)) ->Promise : Symbol(Promise, Decl(lib.d.ts, 4770, 1), Decl(lib.d.ts, 4855, 11)) +>Promise : Symbol(Promise, Decl(lib.d.ts, 4770, 1), Decl(lib.d.ts, 4856, 11)) >fn : Symbol(fn, Decl(awaitCallExpression7_es6.ts, 5, 25)) >arg0 : Symbol(arg0, Decl(awaitCallExpression7_es6.ts, 5, 29)) >arg1 : Symbol(arg1, Decl(awaitCallExpression7_es6.ts, 5, 43)) @@ -36,7 +36,7 @@ declare var po: Promise<{ fn(arg0: boolean, arg1: boolean, arg2: boolean): void; async function func(): Promise { >func : Symbol(func, Decl(awaitCallExpression7_es6.ts, 5, 84)) ->Promise : Symbol(Promise, Decl(lib.d.ts, 4770, 1), Decl(lib.d.ts, 4855, 11)) +>Promise : Symbol(Promise, Decl(lib.d.ts, 4770, 1), Decl(lib.d.ts, 4856, 11)) "before"; var b = o.fn(a, await p, a); diff --git a/tests/baselines/reference/awaitCallExpression8_es6.symbols b/tests/baselines/reference/awaitCallExpression8_es6.symbols index a1b9798b4c2db..2decfda811e8a 100644 --- a/tests/baselines/reference/awaitCallExpression8_es6.symbols +++ b/tests/baselines/reference/awaitCallExpression8_es6.symbols @@ -4,7 +4,7 @@ declare var a: boolean; declare var p: Promise; >p : Symbol(p, Decl(awaitCallExpression8_es6.ts, 1, 11)) ->Promise : Symbol(Promise, Decl(lib.d.ts, 4770, 1), Decl(lib.d.ts, 4855, 11)) +>Promise : Symbol(Promise, Decl(lib.d.ts, 4770, 1), Decl(lib.d.ts, 4856, 11)) declare function fn(arg0: boolean, arg1: boolean, arg2: boolean): void; >fn : Symbol(fn, Decl(awaitCallExpression8_es6.ts, 1, 32)) @@ -21,14 +21,14 @@ declare var o: { fn(arg0: boolean, arg1: boolean, arg2: boolean): void; }; declare var pfn: Promise<{ (arg0: boolean, arg1: boolean, arg2: boolean): void; }>; >pfn : Symbol(pfn, Decl(awaitCallExpression8_es6.ts, 4, 11)) ->Promise : Symbol(Promise, Decl(lib.d.ts, 4770, 1), Decl(lib.d.ts, 4855, 11)) +>Promise : Symbol(Promise, Decl(lib.d.ts, 4770, 1), Decl(lib.d.ts, 4856, 11)) >arg0 : Symbol(arg0, Decl(awaitCallExpression8_es6.ts, 4, 28)) >arg1 : Symbol(arg1, Decl(awaitCallExpression8_es6.ts, 4, 42)) >arg2 : Symbol(arg2, Decl(awaitCallExpression8_es6.ts, 4, 57)) declare var po: Promise<{ fn(arg0: boolean, arg1: boolean, arg2: boolean): void; }>; >po : Symbol(po, Decl(awaitCallExpression8_es6.ts, 5, 11)) ->Promise : Symbol(Promise, Decl(lib.d.ts, 4770, 1), Decl(lib.d.ts, 4855, 11)) +>Promise : Symbol(Promise, Decl(lib.d.ts, 4770, 1), Decl(lib.d.ts, 4856, 11)) >fn : Symbol(fn, Decl(awaitCallExpression8_es6.ts, 5, 25)) >arg0 : Symbol(arg0, Decl(awaitCallExpression8_es6.ts, 5, 29)) >arg1 : Symbol(arg1, Decl(awaitCallExpression8_es6.ts, 5, 43)) @@ -36,7 +36,7 @@ declare var po: Promise<{ fn(arg0: boolean, arg1: boolean, arg2: boolean): void; async function func(): Promise { >func : Symbol(func, Decl(awaitCallExpression8_es6.ts, 5, 84)) ->Promise : Symbol(Promise, Decl(lib.d.ts, 4770, 1), Decl(lib.d.ts, 4855, 11)) +>Promise : Symbol(Promise, Decl(lib.d.ts, 4770, 1), Decl(lib.d.ts, 4856, 11)) "before"; var b = (await po).fn(a, a, a); diff --git a/tests/baselines/reference/promiseVoidErrorCallback.symbols b/tests/baselines/reference/promiseVoidErrorCallback.symbols index d9e329885aab2..aa6b1b642ceec 100644 --- a/tests/baselines/reference/promiseVoidErrorCallback.symbols +++ b/tests/baselines/reference/promiseVoidErrorCallback.symbols @@ -22,13 +22,13 @@ interface T3 { function f1(): Promise { >f1 : Symbol(f1, Decl(promiseVoidErrorCallback.ts, 10, 1)) ->Promise : Symbol(Promise, Decl(lib.d.ts, 4770, 1), Decl(lib.d.ts, 4855, 11)) +>Promise : Symbol(Promise, Decl(lib.d.ts, 4770, 1), Decl(lib.d.ts, 4856, 11)) >T1 : Symbol(T1, Decl(promiseVoidErrorCallback.ts, 0, 0)) return Promise.resolve({ __t1: "foo_t1" }); ->Promise.resolve : Symbol(PromiseConstructor.resolve, Decl(lib.d.ts, 4837, 39), Decl(lib.d.ts, 4844, 54)) ->Promise : Symbol(Promise, Decl(lib.d.ts, 4770, 1), Decl(lib.d.ts, 4855, 11)) ->resolve : Symbol(PromiseConstructor.resolve, Decl(lib.d.ts, 4837, 39), Decl(lib.d.ts, 4844, 54)) +>Promise.resolve : Symbol(PromiseConstructor.resolve, Decl(lib.d.ts, 4838, 39), Decl(lib.d.ts, 4845, 54)) +>Promise : Symbol(Promise, Decl(lib.d.ts, 4770, 1), Decl(lib.d.ts, 4856, 11)) +>resolve : Symbol(PromiseConstructor.resolve, Decl(lib.d.ts, 4838, 39), Decl(lib.d.ts, 4845, 54)) >__t1 : Symbol(__t1, Decl(promiseVoidErrorCallback.ts, 13, 28)) } From 39a6cce78910ef410889f6993408720f4c2284df Mon Sep 17 00:00:00 2001 From: Ron Buckton Date: Fri, 8 May 2015 21:37:43 -0700 Subject: [PATCH 07/35] Cleaned up diagnostic messages --- src/compiler/checker.ts | 5 ++- .../diagnosticInformationMap.generated.ts | 11 +----- src/compiler/diagnosticMessages.json | 38 +------------------ 3 files changed, 6 insertions(+), 48 deletions(-) diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index d759eb1fc1aac..650a65119b65c 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -7635,7 +7635,7 @@ module ts { function checkAwaitExpression(node: AwaitExpression): Type { // Grammar checking if (!(node.parserContextFlags & ParserContextFlags.Await)) { - grammarErrorOnFirstToken(node, Diagnostics.await_expression_must_be_contained_within_an_async_function); + grammarErrorOnFirstToken(node, Diagnostics.await_expression_is_only_allowed_within_an_async_function); } let operandType = checkExpression(node.expression); @@ -10069,6 +10069,9 @@ module ts { if (node.parserContextFlags & ParserContextFlags.StrictMode) { grammarErrorOnFirstToken(node, Diagnostics.with_statements_are_not_allowed_in_strict_mode); } + else if (node.parserContextFlags & ParserContextFlags.Await) { + grammarErrorOnFirstToken(node, Diagnostics.with_statements_are_not_allowed_in_an_async_function_block); + } } checkExpression(node.expression); diff --git a/src/compiler/diagnosticInformationMap.generated.ts b/src/compiler/diagnosticInformationMap.generated.ts index 4a4ae96110907..f466d6bfe41d2 100644 --- a/src/compiler/diagnosticInformationMap.generated.ts +++ b/src/compiler/diagnosticInformationMap.generated.ts @@ -181,16 +181,7 @@ module ts { Type_expected_0_is_a_reserved_word_in_strict_mode_Class_definitions_are_automatically_in_strict_mode: { code: 1216, category: DiagnosticCategory.Error, key: "Type expected. '{0}' is a reserved word in strict mode. Class definitions are automatically in strict mode." }, Export_assignment_is_not_supported_when_module_flag_is_system: { code: 1218, category: DiagnosticCategory.Error, key: "Export assignment is not supported when '--module' flag is 'system'." }, with_statements_are_not_allowed_in_an_async_function_block: { code: 1300, category: DiagnosticCategory.Error, key: "'with' statements are not allowed in an async function block." }, - _0_modifier_cannot_be_used_with_a_generator: { code: 1301, category: DiagnosticCategory.Error, key: "'{0}' modifier cannot be used with a generator." }, - _0_modifier_cannot_be_used_with_a_module_declaration: { code: 1302, category: DiagnosticCategory.Error, key: "'{0}' modifier cannot be used with a module declaration." }, - _0_modifier_cannot_be_used_with_an_enum_declaration: { code: 1303, category: DiagnosticCategory.Error, key: "'{0}' modifier cannot be used with an enum declaration." }, - _0_modifier_cannot_be_used_with_an_export_assignment_declaration: { code: 1304, category: DiagnosticCategory.Error, key: "'{0}' modifier cannot be used with an export assignment declaration." }, - _0_modifier_cannot_be_used_on_a_variable_statement: { code: 1305, category: DiagnosticCategory.Error, key: "'{0}' modifier cannot be used on a variable statement." }, - _0_modifier_cannot_be_used_with_a_type_declaration: { code: 1306, category: DiagnosticCategory.Error, key: "'{0}' modifier cannot be used with a type declaration." }, - _0_modifier_cannot_be_used_with_a_parameter_declaration: { code: 1307, category: DiagnosticCategory.Error, key: "'{0}' modifier cannot be used with a parameter declaration." }, - await_expression_must_be_contained_within_an_async_function: { code: 1308, category: DiagnosticCategory.Error, key: "'await' expression must be contained within an async function." }, - _0_modifier_cannot_be_used_on_an_object_literal_element: { code: 1309, category: DiagnosticCategory.Error, key: "'{0}' modifier cannot be used on an object literal element." }, - _0_expression_is_not_allowed_in_an_initializer: { code: 1310, category: DiagnosticCategory.Error, key: "'{0}' expression is not allowed in an initializer." }, + await_expression_is_only_allowed_within_an_async_function: { code: 1308, category: DiagnosticCategory.Error, key: "'await' expression is only allowed within an async function." }, Async_functions_are_only_available_when_targeting_ECMAScript_6_and_higher: { code: 1311, category: DiagnosticCategory.Error, key: "Async functions are only available when targeting ECMAScript 6 and higher." }, Duplicate_identifier_0: { code: 2300, category: DiagnosticCategory.Error, key: "Duplicate identifier '{0}'." }, Initializer_of_instance_member_variable_0_cannot_reference_identifier_1_declared_in_the_constructor: { code: 2301, category: DiagnosticCategory.Error, key: "Initializer of instance member variable '{0}' cannot reference identifier '{1}' declared in the constructor." }, diff --git a/src/compiler/diagnosticMessages.json b/src/compiler/diagnosticMessages.json index feb7730a8a317..aa8ec55f522c6 100644 --- a/src/compiler/diagnosticMessages.json +++ b/src/compiler/diagnosticMessages.json @@ -712,46 +712,10 @@ "category": "Error", "code": 1300 }, - "'{0}' modifier cannot be used with a generator.": { - "category": "Error", - "code": 1301 - }, - "'{0}' modifier cannot be used with a module declaration.": { - "category": "Error", - "code": 1302 - }, - "'{0}' modifier cannot be used with an enum declaration.": { - "category": "Error", - "code": 1303 - }, - "'{0}' modifier cannot be used with an export assignment declaration.": { - "category": "Error", - "code": 1304 - }, - "'{0}' modifier cannot be used on a variable statement.": { - "category": "Error", - "code": 1305 - }, - "'{0}' modifier cannot be used with a type declaration.": { - "category": "Error", - "code": 1306 - }, - "'{0}' modifier cannot be used with a parameter declaration.": { - "category": "Error", - "code": 1307 - }, - "'await' expression must be contained within an async function.": { + "'await' expression is only allowed within an async function.": { "category": "Error", "code": 1308 }, - "'{0}' modifier cannot be used on an object literal element.": { - "category": "Error", - "code": 1309 - }, - "'{0}' expression is not allowed in an initializer.": { - "category": "Error", - "code": 1310 - }, "Async functions are only available when targeting ECMAScript 6 and higher.": { "category": "Error", "code": 1311 From daa77935e31cb728401cc0a44881daba248a8d0f Mon Sep 17 00:00:00 2001 From: Ron Buckton Date: Fri, 8 May 2015 21:40:56 -0700 Subject: [PATCH 08/35] Additional clean up of diagnostic messages --- src/compiler/diagnosticInformationMap.generated.ts | 1 - src/compiler/diagnosticMessages.json | 4 ---- 2 files changed, 5 deletions(-) diff --git a/src/compiler/diagnosticInformationMap.generated.ts b/src/compiler/diagnosticInformationMap.generated.ts index f466d6bfe41d2..2beb3fd5cd160 100644 --- a/src/compiler/diagnosticInformationMap.generated.ts +++ b/src/compiler/diagnosticInformationMap.generated.ts @@ -519,7 +519,6 @@ module ts { Specifies_the_end_of_line_sequence_to_be_used_when_emitting_files_Colon_CRLF_dos_or_LF_unix: { code: 6060, category: DiagnosticCategory.Message, key: "Specifies the end of line sequence to be used when emitting files: 'CRLF' (dos) or 'LF' (unix)." }, NEWLINE: { code: 6061, category: DiagnosticCategory.Message, key: "NEWLINE" }, Argument_for_newLine_option_must_be_CRLF_or_LF: { code: 6062, category: DiagnosticCategory.Error, key: "Argument for '--newLine' option must be 'CRLF' or 'LF'." }, - Emit_async_functions_when_ECMAScript_target_version_is_lower_than_ES6: { code: 6063, category: DiagnosticCategory.Message, key: "Emit async functions when ECMAScript target version is lower than 'ES6'." }, Variable_0_implicitly_has_an_1_type: { code: 7005, category: DiagnosticCategory.Error, key: "Variable '{0}' implicitly has an '{1}' type." }, Parameter_0_implicitly_has_an_1_type: { code: 7006, category: DiagnosticCategory.Error, key: "Parameter '{0}' implicitly has an '{1}' type." }, Member_0_implicitly_has_an_1_type: { code: 7008, category: DiagnosticCategory.Error, key: "Member '{0}' implicitly has an '{1}' type." }, diff --git a/src/compiler/diagnosticMessages.json b/src/compiler/diagnosticMessages.json index aa8ec55f522c6..3c1f3405db803 100644 --- a/src/compiler/diagnosticMessages.json +++ b/src/compiler/diagnosticMessages.json @@ -2068,10 +2068,6 @@ "category": "Error", "code": 6062 }, - "Emit async functions when ECMAScript target version is lower than 'ES6'.": { - "category": "Message", - "code": 6063 - }, "Variable '{0}' implicitly has an '{1}' type.": { "category": "Error", From 2ee5beb3786e198e3d6cb1b9801958b2fe802257 Mon Sep 17 00:00:00 2001 From: Ron Buckton Date: Fri, 8 May 2015 22:15:54 -0700 Subject: [PATCH 09/35] PR feedback --- src/compiler/parser.ts | 37 +++++++++++++++++-------------------- src/compiler/types.ts | 10 +++++----- src/compiler/utilities.ts | 2 +- 3 files changed, 23 insertions(+), 26 deletions(-) diff --git a/src/compiler/parser.ts b/src/compiler/parser.ts index f4ac24c5fc821..ed7ecd6c9f61b 100644 --- a/src/compiler/parser.ts +++ b/src/compiler/parser.ts @@ -983,25 +983,22 @@ module ts { } function nextTokenCanFollowModifierForArrowFunction() { - return nextTokenCanFollowModifier(/*isArrowFunction*/ true); + nextToken(); + return canFollowModifierForArrowFunction(); } - function nextTokenCanFollowModifier(isArrowFunction?: boolean) { + function nextTokenCanFollowModifier() { nextToken(); - return canFollowModifier(isArrowFunction); + return canFollowModifier(); } function parseAnyContextualModifier(isArrowFunction?: boolean): boolean { return isModifier(token) && tryParse(isArrowFunction - ? nextTokenCanFollowContextualModifierForArrowFunction + ? nextTokenCanFollowModifierForArrowFunction : nextTokenCanFollowContextualModifier); } - function nextTokenCanFollowContextualModifierForArrowFunction() { - return nextTokenCanFollowContextualModifier(/*isArrowFunction*/ true); - } - - function nextTokenCanFollowContextualModifier(isArrowFunction?: boolean) { + function nextTokenCanFollowContextualModifier() { if (token === SyntaxKind.ConstKeyword) { // 'const' is only a modifier if followed by 'enum'. return nextToken() === SyntaxKind.EnumKeyword; @@ -1017,24 +1014,24 @@ module ts { return nextTokenIsClassOrFunction(); } nextToken(); - return canFollowModifier(isArrowFunction); + return canFollowModifier(); } - - function canFollowModifier(isArrowFunction?: boolean): boolean { + + function canFollowModifierForArrowFunction(): boolean { // Arrow functions can have an `async` modifier, but the rules for what can follow that modifier // differ from the rules for any other declaration. // The `async` modifier on an async function can only be followed by an open parenthesis, // or a less than token (in the case of a generic arrow function). // In addition, the `async` modifier must appear on the same line as the following token. - if (isArrowFunction) { - if (scanner.hasPrecedingLineBreak()) { - return false; - } - - return token === SyntaxKind.OpenParenToken - || token === SyntaxKind.LessThanToken; + if (scanner.hasPrecedingLineBreak()) { + return false; } - + + return token === SyntaxKind.OpenParenToken + || token === SyntaxKind.LessThanToken; + } + + function canFollowModifier(): boolean { return token === SyntaxKind.OpenBracketToken || token === SyntaxKind.OpenBraceToken || token === SyntaxKind.AsteriskToken diff --git a/src/compiler/types.ts b/src/compiler/types.ts index 29206c53f39a5..0b5df05ff0058 100644 --- a/src/compiler/types.ts +++ b/src/compiler/types.ts @@ -344,11 +344,11 @@ module ts { // If this node was parsed as part of a decorator Decorator = 1 << 4, - // If this node was parsed in the parameters of an async function. - AsyncParameter = 1 << 5, - // If this node was parsed in the 'await' context created when parsing an async function. - Await = 1 << 6, + Await = 1 << 5, + + // If this node was parsed in the parameters of an async function. + AsyncParameter = 1 << 6, // If the parser encountered an error when parsing the code that created this node. Note // the parser only sets this directly on the node it creates right after encountering the @@ -356,7 +356,7 @@ module ts { ThisNodeHasError = 1 << 7, // Context flags set directly by the parser. - ParserGeneratedFlags = StrictMode | DisallowIn | Yield | GeneratorParameter | Decorator | ThisNodeHasError | AsyncParameter | Await, + ParserGeneratedFlags = StrictMode | DisallowIn | Yield | GeneratorParameter | Decorator | ThisNodeHasError | Await | AsyncParameter, // Context flags passed as part of the modified ES6 grammar. YieldAndGeneratorParameterFlags = Yield | GeneratorParameter, diff --git a/src/compiler/utilities.ts b/src/compiler/utilities.ts index 805bc877fee3a..b8aa89aca525f 100644 --- a/src/compiler/utilities.ts +++ b/src/compiler/utilities.ts @@ -1101,7 +1101,7 @@ module ts { } export function isAsyncFunctionLike(node: Node): boolean { - return isFunctionLike(node) && !isAccessor(node) && (node.flags & NodeFlags.Async) === NodeFlags.Async; + return isFunctionLike(node) && (node.flags & NodeFlags.Async) !== 0 && !isAccessor(node); } /** From 3d0991d27d1653943c10081d3687733a221826e0 Mon Sep 17 00:00:00 2001 From: Ron Buckton Date: Wed, 13 May 2015 10:50:40 -0700 Subject: [PATCH 10/35] Better name for bitmask in ParserContextFlags --- src/compiler/parser.ts | 28 +++++++--------------------- src/compiler/types.ts | 4 +++- 2 files changed, 10 insertions(+), 22 deletions(-) diff --git a/src/compiler/parser.ts b/src/compiler/parser.ts index db6a00ec9aa81..7b293adadc256 100644 --- a/src/compiler/parser.ts +++ b/src/compiler/parser.ts @@ -2363,7 +2363,7 @@ module ts { function parseType(): TypeNode { // The rules about 'yield' only apply to actual code/expression contexts. They don't // apply to 'type' contexts. So we disable these parameters here before moving on. - return doOutsideOfContext(ParserContextFlags.AllParameterFlags, parseTypeWorker); + return doOutsideOfContext(ParserContextFlags.TypeExcludesFlags, parseTypeWorker); } function parseTypeWorker(): TypeNode { @@ -4363,15 +4363,9 @@ module ts { node.heritageClauses = parseHeritageClauses(/*isClassHeritageClause:*/ true); if (parseExpected(SyntaxKind.OpenBraceToken)) { - // ClassTail[Yield,GeneratorParameter,Await,AsyncParameter] : (Modified) See 14.5 - // [~GeneratorParameter,~AsyncParameter]ClassHeritage[?Yield,?Await]opt { ClassBody[?Yield,?Await]opt } - // [+GeneratorParameter] ClassHeritageopt { ClassBodyopt } - // [+AsyncParameter] ClassHeritageopt { ClassBodyopt } - - node.members = inGeneratorParameterOrAsyncParameterContext() - ? doOutsideOfYieldAndAwaitContext(parseClassMembers) - : parseClassMembers(); - + // ClassTail[Yield,Await] : (Modified) See 14.5 + // ClassHeritage[?Yield,?Await]opt { ClassBody[?Yield,?Await]opt } + node.members = parseClassMembers(); parseExpected(SyntaxKind.CloseBraceToken); } else { @@ -4384,24 +4378,16 @@ module ts { } function parseHeritageClauses(isClassHeritageClause: boolean): NodeArray { - // ClassTail[Yield,GeneratorParameter,Await,AsyncParameter] : (Modified) See 14.5 - // [~GeneratorParameter,~AsyncParameter]ClassHeritage[?Yield,?Await]opt { ClassBody[?Yield,?Await]opt } - // [+GeneratorParameter] ClassHeritageopt { ClassBodyopt } - // [+AsyncParameter] ClassHeritageopt { ClassBodyopt } + // ClassTail[Yield,Await] : (Modified) See 14.5 + // ClassHeritage[?Yield,?Await]opt { ClassBody[?Yield,?Await]opt } if (isHeritageClause()) { - return isClassHeritageClause && inGeneratorParameterOrAsyncParameterContext() - ? doOutsideOfYieldAndAwaitContext(parseHeritageClausesWorker) - : parseHeritageClausesWorker(); + return parseList(ParsingContext.HeritageClauses, /*checkForStrictMode:*/ false, parseHeritageClause); } return undefined; } - function parseHeritageClausesWorker() { - return parseList(ParsingContext.HeritageClauses, /*checkForStrictMode:*/ false, parseHeritageClause); - } - function parseHeritageClause() { if (token === SyntaxKind.ExtendsKeyword || token === SyntaxKind.ImplementsKeyword) { let node = createNode(SyntaxKind.HeritageClause); diff --git a/src/compiler/types.ts b/src/compiler/types.ts index 86b4113eecc9c..4de0f7fd98cc6 100644 --- a/src/compiler/types.ts +++ b/src/compiler/types.ts @@ -361,7 +361,9 @@ module ts { // Context flags passed as part of the modified ES6 grammar. YieldAndGeneratorParameterFlags = Yield | GeneratorParameter, AwaitAndAsyncParameterFlags = Await | AsyncParameter, - AllParameterFlags = YieldAndGeneratorParameterFlags | AwaitAndAsyncParameterFlags, + + // Exclude these flags when parsing a Type + TypeExcludesFlags = YieldAndGeneratorParameterFlags | AwaitAndAsyncParameterFlags, // Context flags computed by aggregating child flags upwards. From 9a6d308203f7bc8cc73f6ecb00ae1dbd5fc14267 Mon Sep 17 00:00:00 2001 From: Ron Buckton Date: Wed, 13 May 2015 11:15:51 -0700 Subject: [PATCH 11/35] Simplified parenthesis check for await as yield. --- src/compiler/emitter.ts | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/src/compiler/emitter.ts b/src/compiler/emitter.ts index e31989e672688..ba4b1010dbac2 100644 --- a/src/compiler/emitter.ts +++ b/src/compiler/emitter.ts @@ -1381,14 +1381,13 @@ var __awaiter = (this && this.__awaiter) || function (generator, ctor) { } function needsParenthesisForAwaitExpressionAsYield(node: AwaitExpression) { - for (let current: Node = node; isExpression(current.parent); current = current.parent) { - if (current.parent.kind === SyntaxKind.BinaryExpression) { - if ((current.parent).left === current) { - return true; - } - } + if (node.parent.kind === SyntaxKind.BinaryExpression && !isAssignmentOperator((node.parent).operatorToken.kind)) { + return true; } - + else if (node.parent.kind === SyntaxKind.ConditionalExpression && (node.parent).condition === node) { + return true; + } + return false; } From 117b07bbf9da51615405131adb06ed39d8c072bf Mon Sep 17 00:00:00 2001 From: Ron Buckton Date: Wed, 13 May 2015 11:36:44 -0700 Subject: [PATCH 12/35] Added comments for emitAsyncSignatureAndBodyForES6 --- src/compiler/emitter.ts | 65 ++++++++++++++++++++++++++++++++++++++--- 1 file changed, 61 insertions(+), 4 deletions(-) diff --git a/src/compiler/emitter.ts b/src/compiler/emitter.ts index ba4b1010dbac2..c7a0b1c27a7bc 100644 --- a/src/compiler/emitter.ts +++ b/src/compiler/emitter.ts @@ -3324,12 +3324,60 @@ var __awaiter = (this && this.__awaiter) || function (generator, ctor) { emitSignatureParameters(node); } - function emitAsyncSignatureAndBodyForES6(node: FunctionLikeDeclaration) { + function emitAsyncSignatureAndBodyForES6(node: FunctionLikeDeclaration) { let promiseConstructor = resolver.getPromiseConstructor(node); - let resolve = makeUniqueName("resolve"); let isArrowFunction = node.kind === SyntaxKind.ArrowFunction; let args: string; + + // An async function is emit as an outer function that calls an inner + // generator function. Any arguments of the outer function must be + // evaluated in the context of the generator function, to ensure the correct + // environment and bindings for things like binding patterns in the + // argument list. + // + // For async function declarations and function expressions, we want to + // pass the `arguments` object of the outer function to the inner generator + // function in the event the async function directly manipulates the `arguments` + // object. + // + // For async arrow functions, the `arguments` object is not bound to the arrow + // but its containing function. In that case, we must collect all of the passed + // arguments into an array which we then pass to the inner generator function to + // ensure the correct environment for any binding patterns. + // + // Async arrow functions do not have access to the lexical `arguments` of its + // lexical container. + // + // The emit for an async arrow without parameters will look something like this: + // + // let a = async () => await b; + // + // let a = () => __awaiter(function* () { + // return yield b; + // }.apply(this)); + // + // The emit for an async arrow with parameters will look something like this: + // + // let a = async (b) => await b; + // + // let a = (...arguments_1) => __awaiter(function* (b) { + // return yield b; + // }).apply(this, arguments_1); + // + // The emit for an async function expression will look something like this: + // + // let a = async function () { + // return await b; + // } + // + // let a = function () { + // return __awaiter(function* () { + // return yield b; + // }.apply(this, arguments)); + // } + // if (isArrowFunction) { + // Emit the outer signature for the async arrow if (node.parameters.length) { args = makeUniqueName("arguments"); write(`(...${args}) => `); @@ -3339,6 +3387,7 @@ var __awaiter = (this && this.__awaiter) || function (generator, ctor) { } } else { + // Emit the outer signature for the async function expression or declaration args = "arguments"; write("() {"); increaseIndent(); @@ -3346,29 +3395,37 @@ var __awaiter = (this && this.__awaiter) || function (generator, ctor) { write("return "); } + // Emit the call to __awaiter write("__awaiter(function *"); + // Emit the signature and body for the inner generator function emitSignatureParameters(node); emitFunctionBody(node); + + // Emit the call to `apply` to ensure the correct `this` and arguments. write(".apply(this"); if (args) { write(`, ${args}`); } write(")"); + + // If the function has an explicit type annotation for a promise, emit the + // constructor. if (promiseConstructor) { write(", "); emit(promiseConstructor); } write(")"); + // If this is not an async arrow, emit the closing brace of the outer function body if (!isArrowFunction) { write(";"); decreaseIndent(); writeLine(); write("}"); - } + } } - + function emitFunctionBody(node: FunctionLikeDeclaration) { if (!node.body) { // There can be no body when there are parse errors. Just emit an empty block From 379704ff4faf2dc4e33a950869b608c18fa586ea Mon Sep 17 00:00:00 2001 From: Ron Buckton Date: Wed, 13 May 2015 13:18:54 -0700 Subject: [PATCH 13/35] Cleaned up checker, added comments to parser based on PR feedback. --- src/compiler/checker.ts | 197 ++++++++++++++++++++++------------------ src/compiler/parser.ts | 10 +- 2 files changed, 116 insertions(+), 91 deletions(-) diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index 1a256809f1033..85b63ad0d7a48 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -120,6 +120,7 @@ module ts { let getGlobalPropertyDecoratorType: () => ObjectType; let getGlobalMethodDecoratorType: () => ObjectType; let getGlobalPromiseType: () => ObjectType; + let tryGetGlobalPromiseType: () => ObjectType; let getGlobalPromiseLikeType: () => ObjectType; let getInstantiatedGlobalPromiseLikeType: () => ObjectType; let getGlobalPromiseConstructorLikeType: () => ObjectType; @@ -3501,6 +3502,10 @@ module ts { function getGlobalType(name: string, arity = 0): ObjectType { return getTypeOfGlobalSymbol(getGlobalTypeSymbol(name), arity); } + + function tryGetGlobalType(name: string, arity = 0): ObjectType { + return getTypeOfGlobalSymbol(getGlobalSymbol(name, SymbolFlags.Type, /*diagnostic*/ undefined), arity); + } function getGlobalESSymbolConstructorSymbol() { return globalESSymbolConstructorSymbol || (globalESSymbolConstructorSymbol = getGlobalValueSymbol("Symbol")); @@ -7296,7 +7301,7 @@ module ts { } } - function createPromiseType(promisedType: Type, location: Node): Type { + function createPromiseType(promisedType: Type): Type { // creates a `Promise` type where `T` is the promisedType argument let globalPromiseType = getGlobalPromiseType(); if (globalPromiseType !== emptyObjectType) { @@ -7307,8 +7312,7 @@ module ts { } } - error(location, Diagnostics.An_async_function_or_method_must_have_a_valid_awaitable_return_type); - return unknownType; + return undefined; } function getReturnTypeFromBody(func: FunctionLikeDeclaration, contextualMapper?: TypeMapper): Type { @@ -7321,6 +7325,11 @@ module ts { let type: Type; if (func.body.kind !== SyntaxKind.Block) { if (isAsync) { + // From within an async function you can return either a non-promise value or a promise. Any + // Promise/A+ compatible implementation will always assimilate any foreign promise, so the + // return type of the body is not the return type of the consise body, rather it + // is the awaited type of the consise body, which we will wrap in the native Promise type + // later in this function. type = checkAwaitedExpressionCached(func.body, contextualMapper); } else { @@ -7332,7 +7341,14 @@ module ts { let types = checkAndAggregateReturnExpressionTypes(func.body, contextualMapper); if (types.length === 0) { if (isAsync) { - return createPromiseType(voidType, func); + // For an async function, the return type will not be void, but rather a Promise for void. + let promiseType = createPromiseType(voidType); + if (!promiseType) { + error(func, Diagnostics.An_async_function_or_method_must_have_a_valid_awaitable_return_type); + return unknownType; + } + + return promiseType; } else { return voidType; @@ -7354,7 +7370,16 @@ module ts { let widenedType = getWidenedType(type); if (isAsync) { - return createPromiseType(widenedType, func); + // From within an async function you can return either a non-promise value or a promise. Any + // Promise/A+ compatible implementation will always assimilate any foreign promise, so the + // return type of the body is awaited type of the body, wrapped in a native Promise type. + let promiseType = createPromiseType(widenedType); + if (!promiseType) { + error(func, Diagnostics.An_async_function_or_method_must_have_a_valid_awaitable_return_type); + return unknownType; + } + + return promiseType; } else { return widenedType; @@ -7492,11 +7517,6 @@ module ts { let returnType = node.type && getTypeFromTypeNode(node.type); let promisedType: Type; if (returnType && isAsync) { - // From within an async function you can return either a non-promise value or a promise. Any - // Promise/A+ compatible implementation will always assimilate any foreign promise, so we - // should not be checking assignability of a promise to the return type. Instead, we need to - // check assignability of the awaited type of the concise body against the promised type of - // its return type annotation. promisedType = checkAsyncFunctionReturnType(node, returnType); } @@ -7509,6 +7529,11 @@ module ts { checkSourceElement(node.body); } else { + // From within an async function you can return either a non-promise value or a promise. Any + // Promise/A+ compatible implementation will always assimilate any foreign promise, so we + // should not be checking assignability of a promise to the return type. Instead, we need to + // check assignability of the awaited type of the concise body against the promised type of + // its return type annotation. let exprType = checkExpression(node.body); if (returnType) { if (isAsync) { @@ -8340,23 +8365,6 @@ module ts { break; } } - - if (isAsyncFunctionLike(node)) { - var promiseConstructor = getPromiseConstructor(node); - if (promiseConstructor) { - var promiseIdentifier = getFirstIdentifier(promiseConstructor); - var promiseName = promiseIdentifier.text; - var typeSymbol = resolveName(node, promiseName, SymbolFlags.Type | SymbolFlags.Module, /*nameNotFoundMessage*/ undefined, /*nameArg*/ undefined); - var valueSymbol = resolveName(node, promiseName, SymbolFlags.Value, /*nameNotFoundMessage*/ undefined, /*nameArg*/ undefined); - if (typeSymbol !== valueSymbol) { - var valueLinks = getNodeLinks(valueSymbol.valueDeclaration); - if (!(valueLinks.flags & NodeCheckFlags.PromiseCollision)) { - valueLinks.flags |= NodeCheckFlags.PromiseCollision; - error(valueSymbol.valueDeclaration, Diagnostics.Duplicate_identifier_0_Compiler_uses_declaration_1_to_support_async_functions, promiseName, getTextOfNode(promiseConstructor)); - } - } - } - } } checkSpecializedSignatureDeclaration(node); @@ -8952,7 +8960,7 @@ module ts { } function checkNonThenableType(type: Type, location?: Node, message?: DiagnosticMessage) { - if (!(type.flags & TypeFlags.Any) && isTypeAssignableTo(type, getGlobalThenableType())) { + if (!allConstituentTypesHaveKind(type, TypeFlags.Any) && isTypeAssignableTo(type, getGlobalThenableType())) { if (location) { if (!message) { message = Diagnostics.Operand_for_await_does_not_have_a_valid_callable_then_member; @@ -8970,33 +8978,58 @@ module ts { /** * Gets the "promised type" of a promise. * @param type The type of the promise. - * @remarks The "promised type" of a type is the type of the "value" argument of the "onfulfilled" callback. + * @remarks The "promised type" of a type is the type of the "value" parameter of the "onfulfilled" callback. */ - function getPromisedType(type: Type): Type { + function getPromisedType(promise: Type): Type { + // + // { // promise + // then( // thenFunction + // onfulfilled: ( // onfulfilledParameterType + // value: T // valueParameterType + // ) => any + // ): any; + // } + // + + if (allConstituentTypesHaveKind(promise, TypeFlags.Any)) { + return undefined; + } + + if ((promise.flags & TypeFlags.Reference) && (promise).target === tryGetGlobalPromiseType()) { + return (promise).typeArguments[0]; + } + let globalPromiseLikeType = getInstantiatedGlobalPromiseLikeType(); - if (globalPromiseLikeType !== emptyObjectType && isTypeAssignableTo(type, globalPromiseLikeType)) { - let thenProp = getPropertyOfType(type, "then"); - if (thenProp) { - let awaitedTypes: Type[] = []; - let thenType = getTypeOfSymbol(thenProp); - let thenSignatures = getSignaturesOfType(thenType, SignatureKind.Call); - for (let thenSignature of thenSignatures) { - thenSignature = getErasedSignature(thenSignature); - let onfulfilledParameterType = getTypeAtPosition(thenSignature, 0); - let onfulfilledParameterSignatures = getSignaturesOfType(onfulfilledParameterType, SignatureKind.Call); - for (let onfulfilledParameterSignature of onfulfilledParameterSignatures) { - let valueParameterType = getTypeAtPosition(onfulfilledParameterSignature, 0); - if (valueParameterType !== type) { - awaitedTypes.push(valueParameterType); - } - } - } - - return getUnionType(awaitedTypes); - } + if (globalPromiseLikeType === emptyObjectType || !isTypeAssignableTo(promise, globalPromiseLikeType)) { + return undefined; } - return unknownType; + let thenFunction = getTypeOfPropertyOfType(promise, "then"); + if (thenFunction && allConstituentTypesHaveKind(thenFunction, TypeFlags.Any)) { + return undefined; + } + + let thenSignatures = thenFunction ? getSignaturesOfType(thenFunction, SignatureKind.Call) : emptyArray; + if (thenSignatures.length === 0) { + return undefined; + } + + let onfulfilledParameterType = getUnionType(map(thenSignatures, getTypeOfFirstParameterOfSignature)); + if (allConstituentTypesHaveKind(onfulfilledParameterType, TypeFlags.Any)) { + return undefined; + } + + let onfulfilledParameterSignatures = getSignaturesOfType(onfulfilledParameterType, SignatureKind.Call); + if (onfulfilledParameterSignatures.length === 0) { + return undefined; + } + + let valueParameterType = getUnionType(map(onfulfilledParameterSignatures, getTypeOfFirstParameterOfSignature)); + return valueParameterType; + } + + function getTypeOfFirstParameterOfSignature(signature: Signature) { + return getTypeAtPosition(signature, 0); } /** @@ -9006,28 +9039,7 @@ module ts { * Promise-like type; otherwise, it is the type of the expression. This is used to reflect * The runtime behavior of the `await` keyword. */ - function getAwaitedType(type: Type, location?: Node): Type { - let promisedType = getPromisedType(type); - if (promisedType === unknownType) { - // if we got the unknown type, the type wasn't a promise. We need to check to - // ensure it is not a thenable. - if (checkNonThenableType(type, location)) { - return type; - } - - return unknownType; - } - else if (promisedType === type) { - // if we have a bad actor in the form of a promise whose promised type is the same - // promise, return the unknown type as we cannot guess the shape. - // if this were the actual case in the JavaScript, this Promise would never resolve. - if (location) { - error(location, Diagnostics.Operand_for_await_does_not_have_a_valid_callable_then_member); - } - - return unknownType; - } - + function getAwaitedType(type: Type, location?: Node): Type { // `seen` keeps track of types we've tried to await to avoid cycles. // This is to protect against a bad actor with a mutually recursive promised type: // @@ -9039,26 +9051,34 @@ module ts { // } // let seen: boolean[]; - - // unwrap any nested promises while (true) { - let nestedPromisedType = getPromisedType(promisedType); - if (nestedPromisedType === unknownType) { + let promisedType = getPromisedType(type); + if (!promisedType) { // this type could not be unwrapped further. We need to check to // ensure it is not a thenable - if (checkNonThenableType(promisedType, location)) { - return promisedType; + if (checkNonThenableType(type, location)) { + return type; } return unknownType; } if (!seen) { + if (promisedType === type) { + // if we have a bad actor in the form of a promise whose promised type is the same + // promise, return the unknown type as we cannot guess the shape. + // if this were the actual case in the JavaScript, this Promise would never resolve. + if (location) { + error(location, Diagnostics.Operand_for_await_does_not_have_a_valid_callable_then_member); + } + + return unknownType; + } + seen = []; seen[type.id] = true; - seen[promisedType.id] = true; } - else if (seen[nestedPromisedType.id]) { + else if (seen[promisedType.id]) { // if we've already seen this type, this is a promise that // would never resolve. As above, we return the unknown type. if (location) { @@ -9068,8 +9088,8 @@ module ts { return unknownType; } - seen[nestedPromisedType.id] = true; - promisedType = nestedPromisedType; + seen[promisedType.id] = true; + type = promisedType; } } @@ -9089,15 +9109,11 @@ module ts { function checkAsyncFunctionReturnType(node: SignatureDeclaration, returnType: Type): Type { let globalPromiseConstructorLikeType = getGlobalPromiseConstructorLikeType(); if (globalPromiseConstructorLikeType !== emptyObjectType) { - if (!returnType) { - returnType = getReturnTypeOfSignature(getSignatureFromDeclaration(node)); - } - - // get the constructor type of the return type + // get the constructor type of the return type let declaredType = returnType.symbol ? getTypeOfSymbol(returnType.symbol) : emptyObjectType; if (isTypeAssignableTo(declaredType, globalPromiseConstructorLikeType)) { let promisedType = getPromisedType(returnType); - if (promisedType !== unknownType) { + if (promisedType) { // unwrap the promised type let promiseConstructor = getPromiseConstructor(node); if (promiseConstructor) { @@ -10045,7 +10061,7 @@ module ts { } } else if (func.type && !isAccessor(func.kind) && isAsyncFunctionLike(func)) { - checkTypeAssignableTo(getAwaitedType(exprType), getPromisedType(returnType), node.expression); + checkTypeAssignableTo(getAwaitedType(exprType), getAwaitedType(returnType), node.expression); } else if (func.type || isGetAccessorWithAnnotatatedSetAccessor(func)) { checkTypeAssignableTo(exprType, returnType, node.expression); @@ -12379,6 +12395,7 @@ module ts { getGlobalMethodDecoratorType = memoize(() => getGlobalType("MethodDecorator")); getGlobalParameterDecoratorType = memoize(() => getGlobalType("ParameterDecorator")); getGlobalPromiseType = memoize(() => getGlobalType("Promise", /*arity*/ 1)); + tryGetGlobalPromiseType = memoize(() => getGlobalSymbol("Promise", SymbolFlags.Type, /*diagnostic*/ undefined) && getGlobalPromiseType()); getGlobalPromiseLikeType = memoize(() => getGlobalType("PromiseLike", /*arity*/ 1)); getInstantiatedGlobalPromiseLikeType = memoize(createInstantiatedPromiseLikeType); getGlobalPromiseConstructorSymbol = memoize(() => getGlobalValueSymbol("Promise")); diff --git a/src/compiler/parser.ts b/src/compiler/parser.ts index 770f23b53b830..74f32488e5ba2 100644 --- a/src/compiler/parser.ts +++ b/src/compiler/parser.ts @@ -570,6 +570,10 @@ module ts { function doOutsideOfContext(context: ParserContextFlags, func: () => T): T { // contextFlagsToClear will contain only the context flags that are // currently set that we need to temporarily clear + // We don't just blindly reset to the previous flags to ensure + // that we do not mutate cached flags for the incremental + // parser (ThisNodeHasError, ThisNodeOrAnySubNodesHasError, and + // HasAggregatedChildData). let contextFlagsToClear = context & contextFlags; if (contextFlagsToClear) { // clear the requested context flags @@ -586,7 +590,11 @@ module ts { function doInsideOfContext(context: ParserContextFlags, func: () => T): T { // contextFlagsToSet will contain only the context flags that - // are not currently set that we need to temporarily enable + // are not currently set that we need to temporarily enable. + // We don't just blindly reset to the previous flags to ensure + // that we do not mutate cached flags for the incremental + // parser (ThisNodeHasError, ThisNodeOrAnySubNodesHasError, and + // HasAggregatedChildData). let contextFlagsToSet = context & ~contextFlags; if (contextFlagsToSet) { // set the requested context flags From b70e6a1ee549fb3ce6f0bc6714ef10d2dfcecc0c Mon Sep 17 00:00:00 2001 From: Ron Buckton Date: Wed, 13 May 2015 15:27:24 -0700 Subject: [PATCH 14/35] Added parseModifiersForArrowFunction --- src/compiler/parser.ts | 64 ++++++++++++++++++++---------------------- 1 file changed, 31 insertions(+), 33 deletions(-) diff --git a/src/compiler/parser.ts b/src/compiler/parser.ts index 74f32488e5ba2..9a35015cffb4e 100644 --- a/src/compiler/parser.ts +++ b/src/compiler/parser.ts @@ -984,17 +984,10 @@ module ts { return finishNode(node); } - function parseContextualModifier(t: SyntaxKind, isArrowFunction?: boolean): boolean { - return token === t && tryParse(isArrowFunction - ? nextTokenCanFollowModifierForArrowFunction - : nextTokenCanFollowModifier); + function parseContextualModifier(t: SyntaxKind): boolean { + return token === t && tryParse(nextTokenCanFollowModifier); } - function nextTokenCanFollowModifierForArrowFunction() { - nextToken(); - return canFollowModifierForArrowFunction(); - } - function nextTokenCanFollowModifier() { if (token === SyntaxKind.ConstKeyword) { // 'const' is only a modifier if followed by 'enum'. @@ -1014,24 +1007,8 @@ module ts { return canFollowModifier(); } - function parseAnyContextualModifier(isArrowFunction?: boolean): boolean { - return isModifier(token) && tryParse(isArrowFunction - ? nextTokenCanFollowModifierForArrowFunction - : nextTokenCanFollowModifier); - } - - function canFollowModifierForArrowFunction(): boolean { - // Arrow functions can have an `async` modifier, but the rules for what can follow that modifier - // differ from the rules for any other declaration. - // The `async` modifier on an async function can only be followed by an open parenthesis, - // or a less than token (in the case of a generic arrow function). - // In addition, the `async` modifier must appear on the same line as the following token. - if (scanner.hasPrecedingLineBreak()) { - return false; - } - - return token === SyntaxKind.OpenParenToken - || token === SyntaxKind.LessThanToken; + function parseAnyContextualModifier(): boolean { + return isModifier(token) && tryParse(nextTokenCanFollowModifier); } function canFollowModifier(): boolean { @@ -2709,8 +2686,11 @@ module ts { } function isParenthesizedArrowFunctionExpressionWorker() { - if (token === SyntaxKind.AsyncKeyword && !parseContextualModifier(SyntaxKind.AsyncKeyword, /*isArrowFunction*/ true)) { - return Tristate.False; + if (token === SyntaxKind.AsyncKeyword) { + nextToken(); + if (scanner.hasPrecedingLineBreak()) { + return Tristate.False; + } } let first = token; @@ -2788,7 +2768,7 @@ module ts { function parseParenthesizedArrowFunctionExpressionHead(allowAmbiguity: boolean): ArrowFunction { let node = createNode(SyntaxKind.ArrowFunction); - setModifiers(node, parseModifiers(/*isArrowFunction*/ true)); + setModifiers(node, parseModifiersForArrowFunction()); let isAsync = isAsyncFunctionLike(node); // Arrow functions are never generators. @@ -3451,8 +3431,8 @@ module ts { return finishNode(node); } - function parseFunctionExpression(): FunctionExpression { // GeneratorExpression : + function parseFunctionExpression(): FunctionExpression { // function * BindingIdentifier[Yield]opt (FormalParameters[Yield, GeneratorParameter]) { GeneratorBody[Yield] } // FunctionExpression: // function BindingIdentifieropt(FormalParameters) { FunctionBody } @@ -4283,14 +4263,14 @@ module ts { return decorators; } - function parseModifiers(isArrowFunction?: boolean): ModifiersArray { + function parseModifiers(): ModifiersArray { let flags = 0; let modifiers: ModifiersArray; while (true) { let modifierStart = scanner.getStartPos(); let modifierKind = token; - if (!parseAnyContextualModifier(isArrowFunction)) { + if (!parseAnyContextualModifier()) { break; } @@ -4298,6 +4278,7 @@ module ts { modifiers = []; modifiers.pos = modifierStart; } + flags |= modifierToFlag(modifierKind); modifiers.push(finishNode(createNode(modifierKind, modifierStart))); } @@ -4308,6 +4289,23 @@ module ts { return modifiers; } + function parseModifiersForArrowFunction(): ModifiersArray { + let flags = 0; + let modifiers: ModifiersArray; + if (token === SyntaxKind.AsyncKeyword) { + let modifierStart = scanner.getStartPos(); + let modifierKind = token; + modifiers = []; + modifiers.pos = modifierStart; + flags |= modifierToFlag(modifierKind); + modifiers.push(finishNode(createNode(modifierKind, modifierStart))); + modifiers.flags = flags; + modifiers.end = scanner.getStartPos(); + } + + return modifiers; + } + function parseClassElement(): ClassElement { if (token === SyntaxKind.SemicolonToken) { let result = createNode(SyntaxKind.SemicolonClassElement); From 890a5d81d1101fd9c5636e543205976f63e9dc6e Mon Sep 17 00:00:00 2001 From: Ron Buckton Date: Wed, 13 May 2015 15:50:30 -0700 Subject: [PATCH 15/35] Fixed missing call to nextToken() --- src/compiler/parser.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/compiler/parser.ts b/src/compiler/parser.ts index 9a35015cffb4e..425741ec3cc30 100644 --- a/src/compiler/parser.ts +++ b/src/compiler/parser.ts @@ -4295,6 +4295,7 @@ module ts { if (token === SyntaxKind.AsyncKeyword) { let modifierStart = scanner.getStartPos(); let modifierKind = token; + nextToken(); modifiers = []; modifiers.pos = modifierStart; flags |= modifierToFlag(modifierKind); From a565a023ebee17ae2a96b75ca29f94375d1dfb44 Mon Sep 17 00:00:00 2001 From: Ron Buckton Date: Wed, 13 May 2015 17:26:28 -0700 Subject: [PATCH 16/35] Fixes missing check in isParenthesizedArrowFunctionExpressionWorker --- src/compiler/parser.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/compiler/parser.ts b/src/compiler/parser.ts index 425741ec3cc30..6e9b37c97e738 100644 --- a/src/compiler/parser.ts +++ b/src/compiler/parser.ts @@ -2691,6 +2691,9 @@ module ts { if (scanner.hasPrecedingLineBreak()) { return Tristate.False; } + if (token !== SyntaxKind.OpenParenToken && token !== SyntaxKind.LessThanToken) { + return Tristate.False; + } } let first = token; From a2c50732e8866575dbfd872e02e15edab6f3a134 Mon Sep 17 00:00:00 2001 From: Ron Buckton Date: Tue, 19 May 2015 12:49:47 -0700 Subject: [PATCH 17/35] Some cleanup and additional comments following PR feedback --- src/compiler/checker.ts | 211 +++++++++++------- .../diagnosticInformationMap.generated.ts | 4 +- src/compiler/diagnosticMessages.json | 10 +- ...owFunctionCapturesArguments_es6.errors.txt | 4 +- 4 files changed, 144 insertions(+), 85 deletions(-) diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index 85b63ad0d7a48..734cae63881fc 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -7324,21 +7324,18 @@ module ts { let isAsync = isAsyncFunctionLike(func); let type: Type; if (func.body.kind !== SyntaxKind.Block) { + type = checkExpressionCached(func.body, contextualMapper); if (isAsync) { // From within an async function you can return either a non-promise value or a promise. Any // Promise/A+ compatible implementation will always assimilate any foreign promise, so the - // return type of the body is not the return type of the consise body, rather it - // is the awaited type of the consise body, which we will wrap in the native Promise type - // later in this function. - type = checkAwaitedExpressionCached(func.body, contextualMapper); - } - else { - type = checkExpressionCached(func.body, contextualMapper); + // return type of the body should be unwrapped to its awaited type, which we will wrap in + // the native Promise type later in this function. + type = getAwaitedType(type, func, Diagnostics.Return_expression_in_async_function_does_not_have_a_valid_callable_then_member); } } else { // Aggregate the types of expressions within all the return statements. - let types = checkAndAggregateReturnExpressionTypes(func.body, contextualMapper); + let types = checkAndAggregateReturnExpressionTypes(func.body, contextualMapper, isAsync); if (types.length === 0) { if (isAsync) { // For an async function, the return type will not be void, but rather a Promise for void. @@ -7393,12 +7390,13 @@ module ts { forEachReturnStatement(body, returnStatement => { let expr = returnStatement.expression; if (expr) { - let type: Type; + let type = checkExpressionCached(expr, contextualMapper); if (isAsync) { - type = checkAwaitedExpressionCached(expr, contextualMapper); - } - else { - type = checkExpressionCached(expr, contextualMapper); + // From within an async function you can return either a non-promise value or a promise. Any + // Promise/A+ compatible implementation will always assimilate any foreign promise, so the + // return type of the body should be unwrapped to its awaited type, which should be wrapped in + // the native Promise type by the caller. + type = getAwaitedType(type, body.parent, Diagnostics.Return_expression_in_async_function_does_not_have_a_valid_callable_then_member); } if (!contains(aggregatedTypes, type)) { @@ -7515,6 +7513,7 @@ module ts { let isAsync = isAsyncFunctionLike(node); let returnType = node.type && getTypeFromTypeNode(node.type); + let promisedType: Type; if (returnType && isAsync) { promisedType = checkAsyncFunctionReturnType(node, returnType); @@ -7532,17 +7531,19 @@ module ts { // From within an async function you can return either a non-promise value or a promise. Any // Promise/A+ compatible implementation will always assimilate any foreign promise, so we // should not be checking assignability of a promise to the return type. Instead, we need to - // check assignability of the awaited type of the concise body against the promised type of + // check assignability of the awaited type of the expression body against the promised type of // its return type annotation. let exprType = checkExpression(node.body); if (returnType) { if (isAsync) { - checkTypeAssignableTo(getAwaitedType(exprType, node.body), promisedType, node.body); + let awaitedType = getAwaitedType(exprType, node.body, Diagnostics.Expression_body_for_async_arrow_function_does_not_have_a_valid_callable_then_member); + checkTypeAssignableTo(awaitedType, promisedType, node.body); } else { checkTypeAssignableTo(exprType, returnType, node.body); } } + checkFunctionExpressionBodies(node.body); } } @@ -8108,15 +8109,6 @@ module ts { return result; } - function checkAwaitedExpressionCached(node: Expression, contextualMapper?: TypeMapper): Type { - let links = getNodeLinks(node); - if (!links.resolvedAwaitedType) { - links.resolvedAwaitedType = getAwaitedType(checkExpressionCached(node, contextualMapper)); - } - - return links.resolvedAwaitedType; - } - function checkExpressionCached(node: Expression, contextualMapper?: TypeMapper): Type { let links = getNodeLinks(node); if (!links.resolvedType) { @@ -8960,7 +8952,7 @@ module ts { } function checkNonThenableType(type: Type, location?: Node, message?: DiagnosticMessage) { - if (!allConstituentTypesHaveKind(type, TypeFlags.Any) && isTypeAssignableTo(type, getGlobalThenableType())) { + if (!(type.flags & TypeFlags.Any) && isTypeAssignableTo(type, getGlobalThenableType())) { if (location) { if (!message) { message = Diagnostics.Operand_for_await_does_not_have_a_valid_callable_then_member; @@ -8991,7 +8983,7 @@ module ts { // } // - if (allConstituentTypesHaveKind(promise, TypeFlags.Any)) { + if (promise.flags & TypeFlags.Any) { return undefined; } @@ -9005,7 +8997,7 @@ module ts { } let thenFunction = getTypeOfPropertyOfType(promise, "then"); - if (thenFunction && allConstituentTypesHaveKind(thenFunction, TypeFlags.Any)) { + if (thenFunction && (thenFunction.flags & TypeFlags.Any)) { return undefined; } @@ -9015,7 +9007,7 @@ module ts { } let onfulfilledParameterType = getUnionType(map(thenSignatures, getTypeOfFirstParameterOfSignature)); - if (allConstituentTypesHaveKind(onfulfilledParameterType, TypeFlags.Any)) { + if (onfulfilledParameterType.flags & TypeFlags.Any) { return undefined; } @@ -9032,6 +9024,8 @@ module ts { return getTypeAtPosition(signature, 0); } + let alreadySeenTypesForAwait: boolean[] = []; + /** * Gets the "awaited type" of a type. * @param type The type to await. @@ -9039,58 +9033,81 @@ module ts { * Promise-like type; otherwise, it is the type of the expression. This is used to reflect * The runtime behavior of the `await` keyword. */ - function getAwaitedType(type: Type, location?: Node): Type { - // `seen` keeps track of types we've tried to await to avoid cycles. - // This is to protect against a bad actor with a mutually recursive promised type: - // - // declare class PromiseA { - // then(onfulfilled: (value: PromiseB) => any, onrejected?); - // } - // declare class PromiseB { - // then(onfulfilled: (value: PromiseA) => any, onrejected?); - // } - // - let seen: boolean[]; + function getAwaitedType(type: Type, location?: Node, message?: DiagnosticMessage): Type { + // reset the set of visited types + alreadySeenTypesForAwait.length = 0; while (true) { let promisedType = getPromisedType(type); - if (!promisedType) { - // this type could not be unwrapped further. We need to check to - // ensure it is not a thenable - if (checkNonThenableType(type, location)) { - return type; + if (promisedType === undefined) { + // The type was not a PromiseLike, so it could not be unwrapped any further. + // As long as the type does not have a known callable "then" property, then it is + // safe to return the type; otherwise, an error will have been reported in + // the call to checkNonThenableType and we will return unknownType. + // + // An example of a non-promise "thenable" might be: + // + // await { then(): void {} } + // + // The "thenable" does not match the minimal definition for a PromiseLike. When + // a Promise/A+-compatible or ES6 promise tries to adopt this value, the promise + // will never settle. We treat this as an error to help flag an early indicator + // of a runtime problem. If the user wants to return this value from an async + // function, they would need to wrap it in some other value. If they want it to + // be treated as a promise, they can cast to . + if (checkNonThenableType(type, location, message)) { + break; } - return unknownType; + type = unknownType; + break; } - if (!seen) { - if (promisedType === type) { - // if we have a bad actor in the form of a promise whose promised type is the same - // promise, return the unknown type as we cannot guess the shape. - // if this were the actual case in the JavaScript, this Promise would never resolve. - if (location) { - error(location, Diagnostics.Operand_for_await_does_not_have_a_valid_callable_then_member); + // Keep track of the type we're about to unwrap to avoid bad recursive promise types. + // See the comments below for more information. + alreadySeenTypesForAwait[type.id] = true; + + if (alreadySeenTypesForAwait[promisedType.id]) { + // We have a bad actor in the form of a promise whose promised type is the same + // promise type, or a mutually recursive promise. Return the unknown type as we cannot guess + // the shape. If this were the actual case in the JavaScript, this Promise would never resolve. + // + // An example of a bad actor with a singly-recursive promise type might be: + // + // interface BadPromise { + // then(onfulfilled: (value: BadPromise) => any, onrejected: (error: any) => any): BadPromise; + // } + // + // The above interface will pass the PromiseLike check, and return a promised type of `BadPromise`. + // Since this is a self reference, we don't want to keep recursing ad infinitum. + // + // An example of a bad actor in the form of a mutually-recursive promise type might be: + // + // interface BadPromiseA { + // then(onfulfilled: (value: BadPromiseB) => any, onrejected: (error: any) => any): BadPromiseB; + // } + // + // interface BadPromiseB { + // then(onfulfilled: (value: BadPromiseA) => any, onrejected: (error: any) => any): BadPromiseA; + // } + // + if (location) { + if (!message) { + message = Diagnostics.Operand_for_await_does_not_have_a_valid_callable_then_member; } - return unknownType; + error(location, message); } - seen = []; - seen[type.id] = true; - } - else if (seen[promisedType.id]) { - // if we've already seen this type, this is a promise that - // would never resolve. As above, we return the unknown type. - if (location) { - error(location, Diagnostics.Operand_for_await_does_not_have_a_valid_callable_then_member); - } - - return unknownType; + type = unknownType; + break; } - seen[promisedType.id] = true; type = promisedType; } + + // Cleanup, reset the set of visited types + alreadySeenTypesForAwait.length = 0; + return type; } /** @@ -9109,20 +9126,48 @@ module ts { function checkAsyncFunctionReturnType(node: SignatureDeclaration, returnType: Type): Type { let globalPromiseConstructorLikeType = getGlobalPromiseConstructorLikeType(); if (globalPromiseConstructorLikeType !== emptyObjectType) { - // get the constructor type of the return type + // The return type of an async function will be the type of the instance. For this + // to be a type compatible with our async function emit, we must also check that + // the type of the declaration (e.g. the static side or "constructor" type of the + // promise) is a compatible `PromiseConstructorLike`. + // + // An example might be (from lib.es6.d.ts): + // + // interface Promise { ... } + // interface PromiseConstructor { + // new (...): Promise; + // } + // declare var Promise: PromiseConstructor; + // + // When an async function declares a return type annotation of `Promise`, we + // need to get the type of the `Promise` variable declaration above, which would + // be `PromiseConstructor`. + // + // The same case applies to a class: + // + // declare class Promise { + // constructor(...); + // then(...): Promise; + // } + // + // When we get the type of the `Promise` symbol here, we get the type of the static + // side of the `Promise` class, which would be `{ new (...): Promise }`. let declaredType = returnType.symbol ? getTypeOfSymbol(returnType.symbol) : emptyObjectType; if (isTypeAssignableTo(declaredType, globalPromiseConstructorLikeType)) { - let promisedType = getPromisedType(returnType); - if (promisedType) { - // unwrap the promised type - let promiseConstructor = getPromiseConstructor(node); - if (promiseConstructor) { - checkExpressionOrQualifiedName(promiseConstructor); - } - - emitAwaiter = true; - return getAwaitedType(promisedType, node); + // Ensure we will emit the `__awaiter` helper. + emitAwaiter = true; + + // When we emit the async function, we need to ensure we emit any imports that might + // otherwise have been elided if the return type were only ever referenced in a type + // position. As such, we get the entity name of the type reference from the return + // type and check it as an expression. + let promiseConstructor = getPromiseConstructor(node); + if (promiseConstructor) { + checkExpressionOrQualifiedName(promiseConstructor); } + + // Get and return the awaited type of the return type. + return getAwaitedType(returnType, node, Diagnostics.An_async_function_or_method_must_have_a_valid_awaitable_return_type); } } @@ -10060,11 +10105,15 @@ module ts { error(node.expression, Diagnostics.Return_type_of_constructor_signature_must_be_assignable_to_the_instance_type_of_the_class); } } - else if (func.type && !isAccessor(func.kind) && isAsyncFunctionLike(func)) { - checkTypeAssignableTo(getAwaitedType(exprType), getAwaitedType(returnType), node.expression); - } else if (func.type || isGetAccessorWithAnnotatatedSetAccessor(func)) { - checkTypeAssignableTo(exprType, returnType, node.expression); + if (isAsyncFunctionLike(func)) { + let promisedType = getPromisedType(returnType); + let awaitedType = getAwaitedType(exprType, node.expression, Diagnostics.Return_expression_in_async_function_does_not_have_a_valid_callable_then_member); + checkTypeAssignableTo(awaitedType, promisedType, node.expression); + } + else { + checkTypeAssignableTo(exprType, returnType, node.expression); + } } } } diff --git a/src/compiler/diagnosticInformationMap.generated.ts b/src/compiler/diagnosticInformationMap.generated.ts index 3f781a268098a..6469bf8b1bbf0 100644 --- a/src/compiler/diagnosticInformationMap.generated.ts +++ b/src/compiler/diagnosticInformationMap.generated.ts @@ -51,6 +51,8 @@ module ts { Accessors_are_only_available_when_targeting_ECMAScript_5_and_higher: { code: 1056, category: DiagnosticCategory.Error, key: "Accessors are only available when targeting ECMAScript 5 and higher." }, An_async_function_or_method_must_have_a_valid_awaitable_return_type: { code: 1057, category: DiagnosticCategory.Error, key: "An async function or method must have a valid awaitable return type." }, Operand_for_await_does_not_have_a_valid_callable_then_member: { code: 1058, category: DiagnosticCategory.Error, key: "Operand for 'await' does not have a valid callable 'then' member." }, + Return_expression_in_async_function_does_not_have_a_valid_callable_then_member: { code: 1059, category: DiagnosticCategory.Error, key: "Return expression in async function does not have a valid callable 'then' member." }, + Expression_body_for_async_arrow_function_does_not_have_a_valid_callable_then_member: { code: 1060, category: DiagnosticCategory.Error, key: "Expression body for async arrow function does not have a valid callable 'then' member." }, Enum_member_must_have_initializer: { code: 1061, category: DiagnosticCategory.Error, key: "Enum member must have initializer." }, An_export_assignment_cannot_be_used_in_a_namespace: { code: 1063, category: DiagnosticCategory.Error, key: "An export assignment cannot be used in a namespace." }, Ambient_enum_elements_can_only_have_integer_literal_initializers: { code: 1066, category: DiagnosticCategory.Error, key: "Ambient enum elements can only have integer literal initializers." }, @@ -376,7 +378,7 @@ module ts { Cannot_find_namespace_0: { code: 2503, category: DiagnosticCategory.Error, key: "Cannot find namespace '{0}'." }, Duplicate_identifier_0_Compiler_uses_declaration_1_to_support_async_functions: { code: 2520, category: DiagnosticCategory.Error, key: "Duplicate identifier '{0}'. Compiler uses declaration '{1}' to support async functions." }, Expression_resolves_to_variable_declaration_0_that_compiler_uses_to_support_async_functions: { code: 2521, category: DiagnosticCategory.Error, key: "Expression resolves to variable declaration '{0}' that compiler uses to support async functions." }, - The_arguments_object_cannot_be_referenced_in_an_async_arrow_function_Consider_using_a_standard_async_function_expression: { code: 2522, category: DiagnosticCategory.Error, key: "The 'arguments' object cannot be referenced in an async arrow function Consider using a standard async function expression." }, + The_arguments_object_cannot_be_referenced_in_an_async_arrow_function_Consider_using_a_standard_async_function_expression: { code: 2522, category: DiagnosticCategory.Error, key: "The 'arguments' object cannot be referenced in an async arrow function. Consider using a standard async function expression." }, Import_declaration_0_is_using_private_name_1: { code: 4000, category: DiagnosticCategory.Error, key: "Import declaration '{0}' is using private name '{1}'." }, Type_parameter_0_of_exported_class_has_or_is_using_private_name_1: { code: 4002, category: DiagnosticCategory.Error, key: "Type parameter '{0}' of exported class has or is using private name '{1}'." }, Type_parameter_0_of_exported_interface_has_or_is_using_private_name_1: { code: 4004, category: DiagnosticCategory.Error, key: "Type parameter '{0}' of exported interface has or is using private name '{1}'." }, diff --git a/src/compiler/diagnosticMessages.json b/src/compiler/diagnosticMessages.json index df419f7ec8cb1..b1e8f565790f7 100644 --- a/src/compiler/diagnosticMessages.json +++ b/src/compiler/diagnosticMessages.json @@ -191,6 +191,14 @@ "category": "Error", "code": 1058 }, + "Return expression in async function does not have a valid callable 'then' member.": { + "category": "Error", + "code": 1059 + }, + "Expression body for async arrow function does not have a valid callable 'then' member.": { + "category": "Error", + "code": 1060 + }, "Enum member must have initializer.": { "category": "Error", "code": 1061 @@ -1494,7 +1502,7 @@ "category": "Error", "code": 2521 }, - "The 'arguments' object cannot be referenced in an async arrow function Consider using a standard async function expression.": { + "The 'arguments' object cannot be referenced in an async arrow function. Consider using a standard async function expression.": { "category": "Error", "code": 2522 }, diff --git a/tests/baselines/reference/asyncArrowFunctionCapturesArguments_es6.errors.txt b/tests/baselines/reference/asyncArrowFunctionCapturesArguments_es6.errors.txt index 6b80a53f5293e..dcaba564e2339 100644 --- a/tests/baselines/reference/asyncArrowFunctionCapturesArguments_es6.errors.txt +++ b/tests/baselines/reference/asyncArrowFunctionCapturesArguments_es6.errors.txt @@ -1,4 +1,4 @@ -tests/cases/conformance/async/es6/asyncArrowFunction/asyncArrowFunctionCapturesArguments_es6.ts(4,52): error TS2522: The 'arguments' object cannot be referenced in an async arrow function Consider using a standard async function expression. +tests/cases/conformance/async/es6/asyncArrowFunction/asyncArrowFunctionCapturesArguments_es6.ts(4,52): error TS2522: The 'arguments' object cannot be referenced in an async arrow function. Consider using a standard async function expression. ==== tests/cases/conformance/async/es6/asyncArrowFunction/asyncArrowFunctionCapturesArguments_es6.ts (1 errors) ==== @@ -7,7 +7,7 @@ tests/cases/conformance/async/es6/asyncArrowFunction/asyncArrowFunctionCapturesA function other() {} var fn = async () => await other.apply(this, arguments); ~~~~~~~~~ -!!! error TS2522: The 'arguments' object cannot be referenced in an async arrow function Consider using a standard async function expression. +!!! error TS2522: The 'arguments' object cannot be referenced in an async arrow function. Consider using a standard async function expression. } } \ No newline at end of file From 72a6865f93debeb72f8bf4c17f7929808f5a90fc Mon Sep 17 00:00:00 2001 From: Ron Buckton Date: Thu, 4 Jun 2015 12:08:09 -0700 Subject: [PATCH 18/35] Updated emit to align with current proposal for ES7 async functions --- src/compiler/checker.ts | 173 ++++++++++------- src/compiler/emitter.ts | 179 ++++++++++-------- src/compiler/types.ts | 6 +- .../reference/asyncArrowFunction1_es6.js | 4 +- .../reference/asyncArrowFunction6_es6.js | 4 +- .../reference/asyncArrowFunction7_es6.js | 8 +- .../reference/asyncArrowFunction8_es6.js | 4 +- .../reference/asyncArrowFunction9_es6.js | 4 +- ...owFunctionCapturesArguments_es6.errors.txt | 13 -- ...asyncArrowFunctionCapturesArguments_es6.js | 2 +- ...ncArrowFunctionCapturesArguments_es6.types | 22 +++ .../asyncArrowFunctionCapturesThis_es6.js | 2 +- .../asyncFunctionDeclaration10_es6.js | 6 +- .../asyncFunctionDeclaration11_es6.js | 4 +- .../asyncFunctionDeclaration13_es6.js | 4 +- .../asyncFunctionDeclaration14_es6.js | 4 +- .../asyncFunctionDeclaration1_es6.js | 4 +- .../asyncFunctionDeclaration6_es6.js | 6 +- .../asyncFunctionDeclaration7_es6.js | 10 +- .../asyncFunctionDeclaration9_es6.js | 4 +- .../reference/awaitBinaryExpression1_es6.js | 4 +- .../reference/awaitBinaryExpression2_es6.js | 4 +- .../reference/awaitBinaryExpression3_es6.js | 4 +- .../reference/awaitBinaryExpression4_es6.js | 4 +- .../reference/awaitBinaryExpression5_es6.js | 4 +- .../reference/awaitCallExpression1_es6.js | 4 +- .../reference/awaitCallExpression2_es6.js | 4 +- .../reference/awaitCallExpression3_es6.js | 4 +- .../reference/awaitCallExpression4_es6.js | 4 +- .../reference/awaitCallExpression5_es6.js | 4 +- .../reference/awaitCallExpression6_es6.js | 4 +- .../reference/awaitCallExpression7_es6.js | 4 +- .../reference/awaitCallExpression8_es6.js | 4 +- 33 files changed, 291 insertions(+), 224 deletions(-) delete mode 100644 tests/baselines/reference/asyncArrowFunctionCapturesArguments_es6.errors.txt create mode 100644 tests/baselines/reference/asyncArrowFunctionCapturesArguments_es6.types diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index 7f93b21392bfc..177c577655756 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -824,7 +824,7 @@ module ts { } // Resolves a qualified name and any involved aliases - function resolveEntityName(name: EntityName | Expression, meaning: SymbolFlags): Symbol { + function resolveEntityName(name: EntityName | Expression, meaning: SymbolFlags, location?: Node): Symbol { if (nodeIsMissing(name)) { return undefined; } @@ -833,7 +833,7 @@ module ts { if (name.kind === SyntaxKind.Identifier) { let message = meaning === SymbolFlags.Namespace ? Diagnostics.Cannot_find_namespace_0 : Diagnostics.Cannot_find_name_0; - symbol = resolveName(name, (name).text, meaning, message, name); + symbol = resolveName(location || name, (name).text, meaning, message, name); if (!symbol) { return undefined; } @@ -842,7 +842,7 @@ module ts { let left = name.kind === SyntaxKind.QualifiedName ? (name).left : (name).expression; let right = name.kind === SyntaxKind.QualifiedName ? (name).right : (name).name; - let namespace = resolveEntityName(left, SymbolFlags.Namespace); + let namespace = resolveEntityName(left, SymbolFlags.Namespace, location); if (!namespace || namespace === unknownSymbol || nodeIsMissing(right)) { return undefined; } @@ -3834,6 +3834,20 @@ module ts { } return links.resolvedType; } + + function getEntityNameFromTypeNode(node: TypeNode): EntityName | Expression { + switch (node.kind) { + case SyntaxKind.TypeReference: + return (node).typeName; + case SyntaxKind.ExpressionWithTypeArguments: + return (node).expression + case SyntaxKind.Identifier: + case SyntaxKind.QualifiedName: + return (node); + default: + return undefined; + } + } function getTypeFromTypeNode(node: TypeNode): Type { switch (node.kind) { @@ -5643,9 +5657,10 @@ module ts { if (languageVersion < ScriptTarget.ES6) { error(node, Diagnostics.The_arguments_object_cannot_be_referenced_in_an_arrow_function_in_ES3_and_ES5_Consider_using_a_standard_function_expression); } - else if (node.parserContextFlags & ParserContextFlags.Await) { - error(node, Diagnostics.The_arguments_object_cannot_be_referenced_in_an_async_arrow_function_Consider_using_a_standard_async_function_expression); - } + } + + if (node.parserContextFlags & ParserContextFlags.Await) { + getNodeLinks(container).flags |= NodeCheckFlags.CaptureArguments; } } @@ -7746,11 +7761,14 @@ module ts { Debug.assert(node.kind !== SyntaxKind.MethodDeclaration || isObjectLiteralMethod(node)); let isAsync = isAsyncFunctionLike(node); + if (isAsync) { + emitAwaiter = true; + } + let returnType = node.type && getTypeFromTypeNode(node.type); - let promisedType: Type; if (returnType && isAsync) { - promisedType = checkAsyncFunctionReturnType(node, returnType); + promisedType = checkAsyncFunctionReturnType(node); } if (returnType && !node.asteriskToken) { @@ -9440,56 +9458,71 @@ module ts { * a `resolve` function as one of its arguments and results in an object with a * callable `then` signature. */ - function checkAsyncFunctionReturnType(node: SignatureDeclaration, returnType: Type): Type { + function checkAsyncFunctionReturnType(node: SignatureDeclaration): Type { let globalPromiseConstructorLikeType = getGlobalPromiseConstructorLikeType(); - if (globalPromiseConstructorLikeType !== emptyObjectType) { - // The return type of an async function will be the type of the instance. For this - // to be a type compatible with our async function emit, we must also check that - // the type of the declaration (e.g. the static side or "constructor" type of the - // promise) is a compatible `PromiseConstructorLike`. - // - // An example might be (from lib.es6.d.ts): - // - // interface Promise { ... } - // interface PromiseConstructor { - // new (...): Promise; - // } - // declare var Promise: PromiseConstructor; - // - // When an async function declares a return type annotation of `Promise`, we - // need to get the type of the `Promise` variable declaration above, which would - // be `PromiseConstructor`. - // - // The same case applies to a class: - // - // declare class Promise { - // constructor(...); - // then(...): Promise; - // } - // - // When we get the type of the `Promise` symbol here, we get the type of the static - // side of the `Promise` class, which would be `{ new (...): Promise }`. - let declaredType = returnType.symbol ? getTypeOfSymbol(returnType.symbol) : emptyObjectType; - if (isTypeAssignableTo(declaredType, globalPromiseConstructorLikeType)) { - // Ensure we will emit the `__awaiter` helper. - emitAwaiter = true; - - // When we emit the async function, we need to ensure we emit any imports that might - // otherwise have been elided if the return type were only ever referenced in a type - // position. As such, we get the entity name of the type reference from the return - // type and check it as an expression. - let promiseConstructor = getPromiseConstructor(node); - if (promiseConstructor) { - checkExpressionOrQualifiedName(promiseConstructor); - } - - // Get and return the awaited type of the return type. - return getAwaitedType(returnType, node, Diagnostics.An_async_function_or_method_must_have_a_valid_awaitable_return_type); - } + if (globalPromiseConstructorLikeType === emptyObjectType) { + // If we couldn't resolve the global PromiseConstructorLike type we cannot verify + // compatibility with __awaiter, so we report an error. + error(node, Diagnostics.An_async_function_or_method_must_have_a_valid_awaitable_return_type); + return unknownType; + } + + // The return type of an async function will be the type of the instance. For this + // to be a type compatible with our async function emit, we must also check that + // the type of the declaration (e.g. the static side or "constructor" type of the + // promise) is a compatible `PromiseConstructorLike`. + // + // An example might be (from lib.es6.d.ts): + // + // interface Promise { ... } + // interface PromiseConstructor { + // new (...): Promise; + // } + // declare var Promise: PromiseConstructor; + // + // When an async function declares a return type annotation of `Promise`, we + // need to get the type of the `Promise` variable declaration above, which would + // be `PromiseConstructor`. + // + // The same case applies to a class: + // + // declare class Promise { + // constructor(...); + // then(...): Promise; + // } + // + // When we get the type of the `Promise` symbol here, we get the type of the static + // side of the `Promise` class, which would be `{ new (...): Promise }`. + let returnType = getTypeFromTypeNode(node.type); + let entityName = getEntityNameFromTypeNode(node.type); + let resolvedName = entityName ? resolveEntityName(entityName, SymbolFlags.Value, node) : undefined; + if (!resolvedName || !returnType.symbol) { + error(node, Diagnostics.An_async_function_or_method_must_have_a_valid_awaitable_return_type); + return unknownType; + } + + if (getMergedSymbol(resolvedName) !== getMergedSymbol(returnType.symbol)) { + // If we were unable to resolve the return type as a value, report an error. + let identifier = getFirstIdentifier(entityName); + error(resolvedName.valueDeclaration, Diagnostics.Duplicate_identifier_0_Compiler_uses_declaration_1_to_support_async_functions, + identifier.text, + identifier.text); + return unknownType; + } + + // When we emit the async function, we need to ensure we emit any imports that might + // otherwise have been elided if the return type were only ever referenced in a type + // position. As such, we check the entity name as an expression. + let declaredType = checkExpressionOrQualifiedName(entityName); + + if (!isTypeAssignableTo(declaredType, globalPromiseConstructorLikeType)) { + // If the declared type of the return type is not assignable to a PromiseConstructorLike, report an error. + error(node, ts.Diagnostics.An_async_function_or_method_must_have_a_valid_awaitable_return_type); + return unknownType; } - error(node, ts.Diagnostics.An_async_function_or_method_must_have_a_valid_awaitable_return_type); - return unknownType; + // Get and return the awaited type of the return type. + return getAwaitedType(returnType, node, Diagnostics.An_async_function_or_method_must_have_a_valid_awaitable_return_type); } /** Check a decorator */ @@ -9635,6 +9668,10 @@ module ts { checkGrammarDeclarationNameInStrictMode(node); checkDecorators(node); checkSignatureDeclaration(node); + let isAsync = isAsyncFunctionLike(node); + if (isAsync) { + emitAwaiter = true; + } // Do not use hasDynamicName here, because that returns false for well known symbols. // We want to perform checkComputedPropertyName for all computed properties, including @@ -9670,10 +9707,9 @@ module ts { checkSourceElement(node.body); if (node.type && !isAccessor(node.kind) && !node.asteriskToken) { let returnType = getTypeFromTypeNode(node.type); - let isAsync = isAsyncFunctionLike(node); let promisedType: Type; if (isAsync) { - promisedType = checkAsyncFunctionReturnType(node, returnType); + promisedType = checkAsyncFunctionReturnType(node); } checkIfNonVoidFunctionHasReturnExpressionsOrSingleThrowStatment(node, isAsync ? promisedType : returnType); @@ -9888,13 +9924,11 @@ module ts { } } - function getPromiseConstructor(node: SignatureDeclaration): EntityName { - if (isAsyncFunctionLike(node)) { + function getPromiseConstructor(node: SignatureDeclaration): EntityName | Expression { + if (isAsyncFunctionLike(node) && node.type) { let links = getNodeLinks(node); if (!links.promiseConstructor) { - if (node.type && node.type.kind === SyntaxKind.TypeReference) { - links.promiseConstructor = (node.type).typeName; - } + links.promiseConstructor = getEntityNameFromTypeNode(node.type); } return links.promiseConstructor; @@ -10037,8 +10071,12 @@ module ts { function checkGrammarDisallowedModifiersInBlockOrObjectLiteralExpression(node: Node) { if (node.modifiers) { if (inBlockOrObjectLiteralExpression(node)) { - // disallow all but the `async` modifier here - if (isAccessor(node.kind) || !isFunctionLike(node) || (node.modifiers.flags & ~NodeFlags.Async)) { + if (isAsyncFunctionLike(node)) { + if (node.modifiers.length > 1) { + return grammarErrorOnFirstToken(node, Diagnostics.Modifiers_cannot_appear_here); + } + } + else { return grammarErrorOnFirstToken(node, Diagnostics.Modifiers_cannot_appear_here); } } @@ -12973,10 +13011,15 @@ module ts { case SyntaxKind.ExportAssignment: case SyntaxKind.Parameter: break; + case SyntaxKind.FunctionDeclaration: + if (node.modifiers && (node.modifiers.length > 1 || node.modifiers[0].kind !== SyntaxKind.AsyncKeyword) && + node.parent.kind !== SyntaxKind.ModuleBlock && node.parent.kind !== SyntaxKind.SourceFile) { + return grammarErrorOnFirstToken(node, Diagnostics.Modifiers_cannot_appear_here); + } + break; case SyntaxKind.ClassDeclaration: case SyntaxKind.InterfaceDeclaration: case SyntaxKind.VariableStatement: - case SyntaxKind.FunctionDeclaration: case SyntaxKind.TypeAliasDeclaration: if (node.modifiers && node.parent.kind !== SyntaxKind.ModuleBlock && node.parent.kind !== SyntaxKind.SourceFile) { return grammarErrorOnFirstToken(node, Diagnostics.Modifiers_cannot_appear_here); diff --git a/src/compiler/emitter.ts b/src/compiler/emitter.ts index 9472ed680912c..66cdebe4ee85c 100644 --- a/src/compiler/emitter.ts +++ b/src/compiler/emitter.ts @@ -49,19 +49,20 @@ var __param = (this && this.__param) || function (paramIndex, decorator) { };`; const awaiterHelper = ` -var __awaiter = (this && this.__awaiter) || function (generator, ctor) { - function resolve(value) { return step(generator.next(value)); } - function reject(reason) { return step(generator["throw"](reason)); } - function step(result) { - while (true) { - var done = result.done, value = result.value, then; - if (done) return value; - if (value && typeof (then = value.then) === "function") return then.call(value, resolve, reject); - result = generator.next(value); +var __awaiter = (this && this.__awaiter) || function (generator, thisArg, args, PromiseConstructor) { + PromiseConstructor || (PromiseConstructor = Promise); + return new PromiseConstructor(function (resolve, reject) { + generator = generator.call(thisArg, args); + function cast(value) { return value instanceof PromiseConstructor ? value : new PromiseConstructor(function (resolve) { resolve(value); }); } + function onfulfill(value) { try { step("next", value); } catch (e) { reject(e); } } + function onreject(value) { try { step("throw", value); } catch (e) { reject(e); } } + function step(verb, value) { + var result = generator[verb](value); + result.done ? resolve(result.value) : cast(result.value).then(onfulfill, onreject); } - } - return new (ctor || Promise)(function (resolver) { resolver(resolve(undefined)); }); -}`; + step("next", void 0); + }); +};`; let compilerOptions = host.getCompilerOptions(); let languageVersion = compilerOptions.target || ScriptTarget.ES3; @@ -128,7 +129,7 @@ var __awaiter = (this && this.__awaiter) || function (generator, ctor) { let writeLine = writer.writeLine; let increaseIndent = writer.increaseIndent; let decreaseIndent = writer.decreaseIndent; - + let currentSourceFile: SourceFile; // name of an exporter function if file is a System external module // System.register([...], function () {...}) @@ -3390,100 +3391,114 @@ var __awaiter = (this && this.__awaiter) || function (generator, ctor) { emitSignatureParameters(node); } - function emitAsyncSignatureAndBodyForES6(node: FunctionLikeDeclaration) { + function emitAsyncFunctionBodyForES6(node: FunctionLikeDeclaration) { let promiseConstructor = resolver.getPromiseConstructor(node); let isArrowFunction = node.kind === SyntaxKind.ArrowFunction; let args: string; // An async function is emit as an outer function that calls an inner - // generator function. Any arguments of the outer function must be - // evaluated in the context of the generator function, to ensure the correct - // environment and bindings for things like binding patterns in the - // argument list. + // generator function. To preserve lexical bindings, we pass the current + // `this` and `arguments` objects to `__awaiter`. The generator function + // passed to `__awaiter` is executed inside of the callback to the + // promise constructor. // - // For async function declarations and function expressions, we want to - // pass the `arguments` object of the outer function to the inner generator - // function in the event the async function directly manipulates the `arguments` - // object. + // The emit for an async arrow without a lexical `arguments` binding might be: // - // For async arrow functions, the `arguments` object is not bound to the arrow - // but its containing function. In that case, we must collect all of the passed - // arguments into an array which we then pass to the inner generator function to - // ensure the correct environment for any binding patterns. + // // input + // let a = async (b) => { await b; } // - // Async arrow functions do not have access to the lexical `arguments` of its - // lexical container. + // // output + // let a = (b) => __awaiter(function* (b) { + // yield b; + // }, this); // - // The emit for an async arrow without parameters will look something like this: + // The emit for an async arrow with a lexical `arguments` binding might be: // - // let a = async () => await b; + // // input + // let a = async (b) => { await arguments[0]; } // - // let a = () => __awaiter(function* () { - // return yield b; - // }.apply(this)); + // // output + // let a = (b) => __awaiter(function* (arguments) { + // yield arguments[0]; + // }, this, arguments); // - // The emit for an async arrow with parameters will look something like this: + // The emit for an async function expression without a lexical `arguments` binding + // might be: // - // let a = async (b) => await b; + // // input + // let a = async function (b) { + // await b; + // } // - // let a = (...arguments_1) => __awaiter(function* (b) { - // return yield b; - // }).apply(this, arguments_1); + // // output + // let a = function (b) { + // return __awaiter(function* () { + // yield b; + // }, this); + // } // - // The emit for an async function expression will look something like this: + // The emit for an async function expression with a lexical `arguments` binding + // might be: // - // let a = async function () { - // return await b; + // // input + // let a = async function (b) { + // await arguments[0]; // } // - // let a = function () { - // return __awaiter(function* () { - // return yield b; - // }.apply(this, arguments)); + // // output + // let a = function (b) { + // return __awaiter(function* (arguments) { + // yield arguments[0]; + // }, this, arguments); // } // - if (isArrowFunction) { - // Emit the outer signature for the async arrow - if (node.parameters.length) { - args = makeUniqueName("arguments"); - write(`(...${args}) => `); - } - else { - write("() => "); - } - } - else { - // Emit the outer signature for the async function expression or declaration - args = "arguments"; - write("() {"); + + // If this is not an async arrow, emit the opening brace of the function body + // and the start of the return statement. + if (!isArrowFunction) { + write(" {"); increaseIndent(); writeLine(); - write("return "); + write("return"); } - // Emit the call to __awaiter - write("__awaiter(function *"); - // Emit the signature and body for the inner generator function - emitSignatureParameters(node); + // Emit the call to __awaiter. + let hasLexicalArguments = (resolver.getNodeCheckFlags(node) & NodeCheckFlags.CaptureArguments) !== 0; + if (hasLexicalArguments) { + write(" __awaiter(function* (arguments)"); + } + else { + write(" __awaiter(function* ()"); + } + + // Emit the signature and body for the inner generator function. emitFunctionBody(node); - // Emit the call to `apply` to ensure the correct `this` and arguments. - write(".apply(this"); - if (args) { - write(`, ${args}`); - } - write(")"); + // Emit the current `this` binding. + write(", this"); + // Optionally emit the lexical arguments. + if (hasLexicalArguments) { + write(", arguments"); + } + // If the function has an explicit type annotation for a promise, emit the // constructor. if (promiseConstructor) { + // If we did not have lexical arguments, supply undefined (void 0) for + // the `arguments` parameter. + if (!hasLexicalArguments) { + write(", void 0"); + } + write(", "); - emit(promiseConstructor); + emitNodeWithoutSourceMap(promiseConstructor); } + write(")"); - // If this is not an async arrow, emit the closing brace of the outer function body + // If this is not an async arrow, emit the closing brace of the outer function body. if (!isArrowFunction) { write(";"); decreaseIndent(); @@ -3516,20 +3531,20 @@ var __awaiter = (this && this.__awaiter) || function (generator, ctor) { tempVariables = undefined; tempParameters = undefined; + // When targeting ES6, emit arrow function natively in ES6 + if (shouldEmitAsArrowFunction(node)) { + emitSignatureParametersForArrow(node); + write(" =>"); + } + else { + emitSignatureParameters(node); + } + let isAsync = isAsyncFunctionLike(node); if (isAsync && languageVersion === ScriptTarget.ES6) { - emitAsyncSignatureAndBodyForES6(node); + emitAsyncFunctionBodyForES6(node); } else { - // When targeting ES6, emit arrow function natively in ES6 - if (shouldEmitAsArrowFunction(node)) { - emitSignatureParametersForArrow(node); - write(" =>"); - } - else { - emitSignatureParameters(node); - } - emitFunctionBody(node); } diff --git a/src/compiler/types.ts b/src/compiler/types.ts index 0d70de93e191f..28b2bffa94a4b 100644 --- a/src/compiler/types.ts +++ b/src/compiler/types.ts @@ -1441,7 +1441,7 @@ module ts { serializeTypeOfNode(node: Node, getGeneratedNameForNode: (Node: Node) => string): string | string[]; serializeParameterTypesOfNode(node: Node, getGeneratedNameForNode: (Node: Node) => string): (string | string[])[]; serializeReturnTypeOfNode(node: Node, getGeneratedNameForNode: (Node: Node) => string): string | string[]; - getPromiseConstructor(node: SignatureDeclaration): EntityName; + getPromiseConstructor(node: SignatureDeclaration): EntityName | Expression; } export const enum SymbolFlags { @@ -1569,7 +1569,7 @@ module ts { SuperInstance = 0x00000100, // Instance 'super' reference SuperStatic = 0x00000200, // Static 'super' reference ContextChecked = 0x00000400, // Contextual types have been assigned - PromiseCollision = 0x00000800, // Declaration collides with the global 'Promise' + CaptureArguments = 0x00000800, // Lexical 'arguments' used in body (for async functions) // Values for enum members have been computed, and any errors have been reported for them. EnumValuesComputed = 0x00001000, @@ -1592,7 +1592,7 @@ module ts { assignmentChecks?: Map; // Cache of assignment checks hasReportedStatementInAmbientContext?: boolean; // Cache boolean if we report statements in ambient context importOnRightSide?: Symbol; // for import declarations - import that appear on the right side - promiseConstructor?: EntityName; + promiseConstructor?: EntityName | Expression; } export const enum TypeFlags { diff --git a/tests/baselines/reference/asyncArrowFunction1_es6.js b/tests/baselines/reference/asyncArrowFunction1_es6.js index 78a2899d056e3..4ce29929de855 100644 --- a/tests/baselines/reference/asyncArrowFunction1_es6.js +++ b/tests/baselines/reference/asyncArrowFunction1_es6.js @@ -4,5 +4,5 @@ var foo = async (): Promise => { }; //// [asyncArrowFunction1_es6.js] -var foo = () => __awaiter(function *() { -}.apply(this), Promise); +var foo = () => __awaiter(function* () { +}, this, void 0, Promise); diff --git a/tests/baselines/reference/asyncArrowFunction6_es6.js b/tests/baselines/reference/asyncArrowFunction6_es6.js index e4da75e3cd157..1554e895d14a3 100644 --- a/tests/baselines/reference/asyncArrowFunction6_es6.js +++ b/tests/baselines/reference/asyncArrowFunction6_es6.js @@ -4,5 +4,5 @@ var foo = async (a = await): Promise => { } //// [asyncArrowFunction6_es6.js] -var foo = (...arguments_1) => __awaiter(function *(a = await) { -}.apply(this, arguments_1), Promise); +var foo = (a = await) => __awaiter(function* () { +}, this, void 0, Promise); diff --git a/tests/baselines/reference/asyncArrowFunction7_es6.js b/tests/baselines/reference/asyncArrowFunction7_es6.js index 9bf3fdc480f0a..459ec413da587 100644 --- a/tests/baselines/reference/asyncArrowFunction7_es6.js +++ b/tests/baselines/reference/asyncArrowFunction7_es6.js @@ -7,8 +7,8 @@ var bar = async (): Promise => { } //// [asyncArrowFunction7_es6.js] -var bar = () => __awaiter(function *() { +var bar = () => __awaiter(function* () { // 'await' here is an identifier, and not an await expression. - var foo = (...arguments_1) => __awaiter(function *(a = await) { - }.apply(this, arguments_1), Promise); -}.apply(this), Promise); + var foo = (a = await) => __awaiter(function* () { + }, this, void 0, Promise); +}, this, void 0, Promise); diff --git a/tests/baselines/reference/asyncArrowFunction8_es6.js b/tests/baselines/reference/asyncArrowFunction8_es6.js index 3f98f3a4f63c2..b32541fdda6b7 100644 --- a/tests/baselines/reference/asyncArrowFunction8_es6.js +++ b/tests/baselines/reference/asyncArrowFunction8_es6.js @@ -5,6 +5,6 @@ var foo = async (): Promise => { } //// [asyncArrowFunction8_es6.js] -var foo = () => __awaiter(function *() { +var foo = () => __awaiter(function* () { var v = { [yield ]: foo }; -}.apply(this), Promise); +}, this, void 0, Promise); diff --git a/tests/baselines/reference/asyncArrowFunction9_es6.js b/tests/baselines/reference/asyncArrowFunction9_es6.js index b78a49afdbb76..8a9b663266c58 100644 --- a/tests/baselines/reference/asyncArrowFunction9_es6.js +++ b/tests/baselines/reference/asyncArrowFunction9_es6.js @@ -3,5 +3,5 @@ var foo = async (a = await => await): Promise => { } //// [asyncArrowFunction9_es6.js] -var foo = (...arguments_1) => __awaiter(function *(a = await => await) { -}.apply(this, arguments_1), Promise); +var foo = (a = await => await) => __awaiter(function* () { +}, this, void 0, Promise); diff --git a/tests/baselines/reference/asyncArrowFunctionCapturesArguments_es6.errors.txt b/tests/baselines/reference/asyncArrowFunctionCapturesArguments_es6.errors.txt deleted file mode 100644 index dcaba564e2339..0000000000000 --- a/tests/baselines/reference/asyncArrowFunctionCapturesArguments_es6.errors.txt +++ /dev/null @@ -1,13 +0,0 @@ -tests/cases/conformance/async/es6/asyncArrowFunction/asyncArrowFunctionCapturesArguments_es6.ts(4,52): error TS2522: The 'arguments' object cannot be referenced in an async arrow function. Consider using a standard async function expression. - - -==== tests/cases/conformance/async/es6/asyncArrowFunction/asyncArrowFunctionCapturesArguments_es6.ts (1 errors) ==== - class C { - method() { - function other() {} - var fn = async () => await other.apply(this, arguments); - ~~~~~~~~~ -!!! error TS2522: The 'arguments' object cannot be referenced in an async arrow function. Consider using a standard async function expression. - } - } - \ No newline at end of file diff --git a/tests/baselines/reference/asyncArrowFunctionCapturesArguments_es6.js b/tests/baselines/reference/asyncArrowFunctionCapturesArguments_es6.js index 96926ba8f41b3..86a1b6e110c6d 100644 --- a/tests/baselines/reference/asyncArrowFunctionCapturesArguments_es6.js +++ b/tests/baselines/reference/asyncArrowFunctionCapturesArguments_es6.js @@ -11,6 +11,6 @@ class C { class C { method() { function other() { } - var fn = () => __awaiter(function *() { return yield other.apply(this, arguments); }.apply(this)); + var fn = () => __awaiter(function* (arguments) { return yield other.apply(this, arguments); }, this, arguments); } } diff --git a/tests/baselines/reference/asyncArrowFunctionCapturesArguments_es6.types b/tests/baselines/reference/asyncArrowFunctionCapturesArguments_es6.types new file mode 100644 index 0000000000000..b3f6f18cde834 --- /dev/null +++ b/tests/baselines/reference/asyncArrowFunctionCapturesArguments_es6.types @@ -0,0 +1,22 @@ +=== tests/cases/conformance/async/es6/asyncArrowFunction/asyncArrowFunctionCapturesArguments_es6.ts === +class C { +>C : C + + method() { +>method : () => void + + function other() {} +>other : () => void + + var fn = async () => await other.apply(this, arguments); +>fn : () => Promise +>async () => await other.apply(this, arguments) : () => Promise +>other.apply(this, arguments) : any +>other.apply : (thisArg: any, argArray?: any) => any +>other : () => void +>apply : (thisArg: any, argArray?: any) => any +>this : C +>arguments : IArguments + } +} + diff --git a/tests/baselines/reference/asyncArrowFunctionCapturesThis_es6.js b/tests/baselines/reference/asyncArrowFunctionCapturesThis_es6.js index 572c5fbe04668..afcd73b32dccf 100644 --- a/tests/baselines/reference/asyncArrowFunctionCapturesThis_es6.js +++ b/tests/baselines/reference/asyncArrowFunctionCapturesThis_es6.js @@ -9,6 +9,6 @@ class C { //// [asyncArrowFunctionCapturesThis_es6.js] class C { method() { - var fn = () => __awaiter(function *() { return yield this; }.apply(this)); + var fn = () => __awaiter(function* () { return yield this; }, this); } } diff --git a/tests/baselines/reference/asyncFunctionDeclaration10_es6.js b/tests/baselines/reference/asyncFunctionDeclaration10_es6.js index e85492bee709b..25319680cebca 100644 --- a/tests/baselines/reference/asyncFunctionDeclaration10_es6.js +++ b/tests/baselines/reference/asyncFunctionDeclaration10_es6.js @@ -3,7 +3,7 @@ async function foo(a = await => await): Promise { } //// [asyncFunctionDeclaration10_es6.js] -function foo() { - return __awaiter(function *(a = await => await) { - }.apply(this, arguments), Promise); +function foo(a = await => await) { + return __awaiter(function* () { + }, this, void 0, Promise); } diff --git a/tests/baselines/reference/asyncFunctionDeclaration11_es6.js b/tests/baselines/reference/asyncFunctionDeclaration11_es6.js index 39bf2c20e7956..37cb4bbc0d43b 100644 --- a/tests/baselines/reference/asyncFunctionDeclaration11_es6.js +++ b/tests/baselines/reference/asyncFunctionDeclaration11_es6.js @@ -4,6 +4,6 @@ async function await(): Promise { //// [asyncFunctionDeclaration11_es6.js] function await() { - return __awaiter(function *() { - }.apply(this, arguments), Promise); + return __awaiter(function* () { + }, this, void 0, Promise); } diff --git a/tests/baselines/reference/asyncFunctionDeclaration13_es6.js b/tests/baselines/reference/asyncFunctionDeclaration13_es6.js index 9666fb5d7c4fb..0423ca2341ba8 100644 --- a/tests/baselines/reference/asyncFunctionDeclaration13_es6.js +++ b/tests/baselines/reference/asyncFunctionDeclaration13_es6.js @@ -7,8 +7,8 @@ async function foo(): Promise { //// [asyncFunctionDeclaration13_es6.js] function foo() { - return __awaiter(function *() { + return __awaiter(function* () { // Legal to use 'await' in a type context. var v; - }.apply(this, arguments), Promise); + }, this, void 0, Promise); } diff --git a/tests/baselines/reference/asyncFunctionDeclaration14_es6.js b/tests/baselines/reference/asyncFunctionDeclaration14_es6.js index 2f694f0269686..eccf374cdc3a5 100644 --- a/tests/baselines/reference/asyncFunctionDeclaration14_es6.js +++ b/tests/baselines/reference/asyncFunctionDeclaration14_es6.js @@ -5,7 +5,7 @@ async function foo(): Promise { //// [asyncFunctionDeclaration14_es6.js] function foo() { - return __awaiter(function *() { + return __awaiter(function* () { return; - }.apply(this, arguments), Promise); + }, this, void 0, Promise); } diff --git a/tests/baselines/reference/asyncFunctionDeclaration1_es6.js b/tests/baselines/reference/asyncFunctionDeclaration1_es6.js index 75cb74a68a53e..386e1e76241e2 100644 --- a/tests/baselines/reference/asyncFunctionDeclaration1_es6.js +++ b/tests/baselines/reference/asyncFunctionDeclaration1_es6.js @@ -4,6 +4,6 @@ async function foo(): Promise { //// [asyncFunctionDeclaration1_es6.js] function foo() { - return __awaiter(function *() { - }.apply(this, arguments), Promise); + return __awaiter(function* () { + }, this, void 0, Promise); } diff --git a/tests/baselines/reference/asyncFunctionDeclaration6_es6.js b/tests/baselines/reference/asyncFunctionDeclaration6_es6.js index 663e02604ead1..9bd17a7cd0ec1 100644 --- a/tests/baselines/reference/asyncFunctionDeclaration6_es6.js +++ b/tests/baselines/reference/asyncFunctionDeclaration6_es6.js @@ -3,7 +3,7 @@ async function foo(a = await): Promise { } //// [asyncFunctionDeclaration6_es6.js] -function foo() { - return __awaiter(function *(a = await) { - }.apply(this, arguments), Promise); +function foo(a = await) { + return __awaiter(function* () { + }, this, void 0, Promise); } diff --git a/tests/baselines/reference/asyncFunctionDeclaration7_es6.js b/tests/baselines/reference/asyncFunctionDeclaration7_es6.js index fb913e3f6f435..b32c90664acd5 100644 --- a/tests/baselines/reference/asyncFunctionDeclaration7_es6.js +++ b/tests/baselines/reference/asyncFunctionDeclaration7_es6.js @@ -7,11 +7,11 @@ async function bar(): Promise { //// [asyncFunctionDeclaration7_es6.js] function bar() { - return __awaiter(function *() { + return __awaiter(function* () { // 'await' here is an identifier, and not a yield expression. - function foo() { - return __awaiter(function *(a = await) { - }.apply(this, arguments), Promise); + function foo(a = await) { + return __awaiter(function* () { + }, this, void 0, Promise); } - }.apply(this, arguments), Promise); + }, this, void 0, Promise); } diff --git a/tests/baselines/reference/asyncFunctionDeclaration9_es6.js b/tests/baselines/reference/asyncFunctionDeclaration9_es6.js index 8b5ea4c4b5c4b..3fcf3f2f7cace 100644 --- a/tests/baselines/reference/asyncFunctionDeclaration9_es6.js +++ b/tests/baselines/reference/asyncFunctionDeclaration9_es6.js @@ -5,7 +5,7 @@ async function foo(): Promise { //// [asyncFunctionDeclaration9_es6.js] function foo() { - return __awaiter(function *() { + return __awaiter(function* () { var v = { [yield ]: foo }; - }.apply(this, arguments), Promise); + }, this, void 0, Promise); } diff --git a/tests/baselines/reference/awaitBinaryExpression1_es6.js b/tests/baselines/reference/awaitBinaryExpression1_es6.js index f92324dcdacbc..889e937336816 100644 --- a/tests/baselines/reference/awaitBinaryExpression1_es6.js +++ b/tests/baselines/reference/awaitBinaryExpression1_es6.js @@ -9,9 +9,9 @@ async function func(): Promise { //// [awaitBinaryExpression1_es6.js] function func() { - return __awaiter(function *() { + return __awaiter(function* () { "before"; var b = (yield p) || a; "after"; - }.apply(this, arguments), Promise); + }, this, void 0, Promise); } diff --git a/tests/baselines/reference/awaitBinaryExpression2_es6.js b/tests/baselines/reference/awaitBinaryExpression2_es6.js index e2d3b3ba46f4f..5a156d6d0d36a 100644 --- a/tests/baselines/reference/awaitBinaryExpression2_es6.js +++ b/tests/baselines/reference/awaitBinaryExpression2_es6.js @@ -9,9 +9,9 @@ async function func(): Promise { //// [awaitBinaryExpression2_es6.js] function func() { - return __awaiter(function *() { + return __awaiter(function* () { "before"; var b = (yield p) && a; "after"; - }.apply(this, arguments), Promise); + }, this, void 0, Promise); } diff --git a/tests/baselines/reference/awaitBinaryExpression3_es6.js b/tests/baselines/reference/awaitBinaryExpression3_es6.js index 08e98d5dafee0..8b150a9fcbf48 100644 --- a/tests/baselines/reference/awaitBinaryExpression3_es6.js +++ b/tests/baselines/reference/awaitBinaryExpression3_es6.js @@ -9,9 +9,9 @@ async function func(): Promise { //// [awaitBinaryExpression3_es6.js] function func() { - return __awaiter(function *() { + return __awaiter(function* () { "before"; var b = (yield p) + a; "after"; - }.apply(this, arguments), Promise); + }, this, void 0, Promise); } diff --git a/tests/baselines/reference/awaitBinaryExpression4_es6.js b/tests/baselines/reference/awaitBinaryExpression4_es6.js index 0eec5e990a544..c8f42d191c09b 100644 --- a/tests/baselines/reference/awaitBinaryExpression4_es6.js +++ b/tests/baselines/reference/awaitBinaryExpression4_es6.js @@ -9,9 +9,9 @@ async function func(): Promise { //// [awaitBinaryExpression4_es6.js] function func() { - return __awaiter(function *() { + return __awaiter(function* () { "before"; var b = yield p, a; "after"; - }.apply(this, arguments), Promise); + }, this, void 0, Promise); } diff --git a/tests/baselines/reference/awaitBinaryExpression5_es6.js b/tests/baselines/reference/awaitBinaryExpression5_es6.js index d725d55404add..1c867a8abbf7b 100644 --- a/tests/baselines/reference/awaitBinaryExpression5_es6.js +++ b/tests/baselines/reference/awaitBinaryExpression5_es6.js @@ -10,10 +10,10 @@ async function func(): Promise { //// [awaitBinaryExpression5_es6.js] function func() { - return __awaiter(function *() { + return __awaiter(function* () { "before"; var o; o.a = yield p; "after"; - }.apply(this, arguments), Promise); + }, this, void 0, Promise); } diff --git a/tests/baselines/reference/awaitCallExpression1_es6.js b/tests/baselines/reference/awaitCallExpression1_es6.js index 3391274ae7a5d..dc73da972acad 100644 --- a/tests/baselines/reference/awaitCallExpression1_es6.js +++ b/tests/baselines/reference/awaitCallExpression1_es6.js @@ -13,9 +13,9 @@ async function func(): Promise { //// [awaitCallExpression1_es6.js] function func() { - return __awaiter(function *() { + return __awaiter(function* () { "before"; var b = fn(a, a, a); "after"; - }.apply(this, arguments), Promise); + }, this, void 0, Promise); } diff --git a/tests/baselines/reference/awaitCallExpression2_es6.js b/tests/baselines/reference/awaitCallExpression2_es6.js index fd7129e84182e..a0f0944d79610 100644 --- a/tests/baselines/reference/awaitCallExpression2_es6.js +++ b/tests/baselines/reference/awaitCallExpression2_es6.js @@ -13,9 +13,9 @@ async function func(): Promise { //// [awaitCallExpression2_es6.js] function func() { - return __awaiter(function *() { + return __awaiter(function* () { "before"; var b = fn(yield p, a, a); "after"; - }.apply(this, arguments), Promise); + }, this, void 0, Promise); } diff --git a/tests/baselines/reference/awaitCallExpression3_es6.js b/tests/baselines/reference/awaitCallExpression3_es6.js index 4f0d55185e2d4..75e7788399325 100644 --- a/tests/baselines/reference/awaitCallExpression3_es6.js +++ b/tests/baselines/reference/awaitCallExpression3_es6.js @@ -13,9 +13,9 @@ async function func(): Promise { //// [awaitCallExpression3_es6.js] function func() { - return __awaiter(function *() { + return __awaiter(function* () { "before"; var b = fn(a, yield p, a); "after"; - }.apply(this, arguments), Promise); + }, this, void 0, Promise); } diff --git a/tests/baselines/reference/awaitCallExpression4_es6.js b/tests/baselines/reference/awaitCallExpression4_es6.js index 7ec6c6ff90e27..8f1756393cb6d 100644 --- a/tests/baselines/reference/awaitCallExpression4_es6.js +++ b/tests/baselines/reference/awaitCallExpression4_es6.js @@ -13,9 +13,9 @@ async function func(): Promise { //// [awaitCallExpression4_es6.js] function func() { - return __awaiter(function *() { + return __awaiter(function* () { "before"; var b = (yield pfn)(a, a, a); "after"; - }.apply(this, arguments), Promise); + }, this, void 0, Promise); } diff --git a/tests/baselines/reference/awaitCallExpression5_es6.js b/tests/baselines/reference/awaitCallExpression5_es6.js index f41d0ae994fdc..0752c02758b1f 100644 --- a/tests/baselines/reference/awaitCallExpression5_es6.js +++ b/tests/baselines/reference/awaitCallExpression5_es6.js @@ -13,9 +13,9 @@ async function func(): Promise { //// [awaitCallExpression5_es6.js] function func() { - return __awaiter(function *() { + return __awaiter(function* () { "before"; var b = o.fn(a, a, a); "after"; - }.apply(this, arguments), Promise); + }, this, void 0, Promise); } diff --git a/tests/baselines/reference/awaitCallExpression6_es6.js b/tests/baselines/reference/awaitCallExpression6_es6.js index d6c0e3707483d..3fc683dc399bd 100644 --- a/tests/baselines/reference/awaitCallExpression6_es6.js +++ b/tests/baselines/reference/awaitCallExpression6_es6.js @@ -13,9 +13,9 @@ async function func(): Promise { //// [awaitCallExpression6_es6.js] function func() { - return __awaiter(function *() { + return __awaiter(function* () { "before"; var b = o.fn(yield p, a, a); "after"; - }.apply(this, arguments), Promise); + }, this, void 0, Promise); } diff --git a/tests/baselines/reference/awaitCallExpression7_es6.js b/tests/baselines/reference/awaitCallExpression7_es6.js index 45e8a9fa64679..8618313587a97 100644 --- a/tests/baselines/reference/awaitCallExpression7_es6.js +++ b/tests/baselines/reference/awaitCallExpression7_es6.js @@ -13,9 +13,9 @@ async function func(): Promise { //// [awaitCallExpression7_es6.js] function func() { - return __awaiter(function *() { + return __awaiter(function* () { "before"; var b = o.fn(a, yield p, a); "after"; - }.apply(this, arguments), Promise); + }, this, void 0, Promise); } diff --git a/tests/baselines/reference/awaitCallExpression8_es6.js b/tests/baselines/reference/awaitCallExpression8_es6.js index 3ffac0006aecb..ceab826c58aae 100644 --- a/tests/baselines/reference/awaitCallExpression8_es6.js +++ b/tests/baselines/reference/awaitCallExpression8_es6.js @@ -13,9 +13,9 @@ async function func(): Promise { //// [awaitCallExpression8_es6.js] function func() { - return __awaiter(function *() { + return __awaiter(function* () { "before"; var b = (yield po).fn(a, a, a); "after"; - }.apply(this, arguments), Promise); + }, this, void 0, Promise); } From 02557b140310f3247edf5e881da43640cc72b093 Mon Sep 17 00:00:00 2001 From: Wesley Wigham Date: Tue, 9 Jun 2015 14:50:46 -0700 Subject: [PATCH 19/35] Emit awaiter arguments on new line --- src/compiler/emitter.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/compiler/emitter.ts b/src/compiler/emitter.ts index 66cdebe4ee85c..d5eb314c4782d 100644 --- a/src/compiler/emitter.ts +++ b/src/compiler/emitter.ts @@ -3476,7 +3476,9 @@ var __awaiter = (this && this.__awaiter) || function (generator, thisArg, args, emitFunctionBody(node); // Emit the current `this` binding. - write(", this"); + write(","); + writeLine(); + write("this"); // Optionally emit the lexical arguments. if (hasLexicalArguments) { From 371583b1eee87bbf923e1e04b9ac2d5ab31c4790 Mon Sep 17 00:00:00 2001 From: Wesley Wigham Date: Tue, 9 Jun 2015 17:08:15 -0700 Subject: [PATCH 20/35] Update baselines for emit change --- tests/baselines/reference/asyncArrowFunction1_es6.js | 3 ++- tests/baselines/reference/asyncArrowFunction6_es6.js | 3 ++- tests/baselines/reference/asyncArrowFunction7_es6.js | 6 ++++-- tests/baselines/reference/asyncArrowFunction8_es6.js | 3 ++- tests/baselines/reference/asyncArrowFunction9_es6.js | 3 ++- .../reference/asyncArrowFunctionCapturesArguments_es6.js | 3 ++- .../reference/asyncArrowFunctionCapturesThis_es6.js | 3 ++- tests/baselines/reference/asyncFunctionDeclaration10_es6.js | 3 ++- tests/baselines/reference/asyncFunctionDeclaration11_es6.js | 3 ++- tests/baselines/reference/asyncFunctionDeclaration13_es6.js | 3 ++- tests/baselines/reference/asyncFunctionDeclaration14_es6.js | 3 ++- tests/baselines/reference/asyncFunctionDeclaration1_es6.js | 3 ++- tests/baselines/reference/asyncFunctionDeclaration6_es6.js | 3 ++- tests/baselines/reference/asyncFunctionDeclaration7_es6.js | 6 ++++-- tests/baselines/reference/asyncFunctionDeclaration9_es6.js | 3 ++- tests/baselines/reference/awaitBinaryExpression1_es6.js | 3 ++- tests/baselines/reference/awaitBinaryExpression2_es6.js | 3 ++- tests/baselines/reference/awaitBinaryExpression3_es6.js | 3 ++- tests/baselines/reference/awaitBinaryExpression4_es6.js | 3 ++- tests/baselines/reference/awaitBinaryExpression5_es6.js | 3 ++- tests/baselines/reference/awaitCallExpression1_es6.js | 3 ++- tests/baselines/reference/awaitCallExpression2_es6.js | 3 ++- tests/baselines/reference/awaitCallExpression3_es6.js | 3 ++- tests/baselines/reference/awaitCallExpression4_es6.js | 3 ++- tests/baselines/reference/awaitCallExpression5_es6.js | 3 ++- tests/baselines/reference/awaitCallExpression6_es6.js | 3 ++- tests/baselines/reference/awaitCallExpression7_es6.js | 3 ++- tests/baselines/reference/awaitCallExpression8_es6.js | 3 ++- 28 files changed, 60 insertions(+), 30 deletions(-) diff --git a/tests/baselines/reference/asyncArrowFunction1_es6.js b/tests/baselines/reference/asyncArrowFunction1_es6.js index 4ce29929de855..257b147dbc7b2 100644 --- a/tests/baselines/reference/asyncArrowFunction1_es6.js +++ b/tests/baselines/reference/asyncArrowFunction1_es6.js @@ -5,4 +5,5 @@ var foo = async (): Promise => { //// [asyncArrowFunction1_es6.js] var foo = () => __awaiter(function* () { -}, this, void 0, Promise); +}, +this, void 0, Promise); diff --git a/tests/baselines/reference/asyncArrowFunction6_es6.js b/tests/baselines/reference/asyncArrowFunction6_es6.js index 1554e895d14a3..48035057fe05d 100644 --- a/tests/baselines/reference/asyncArrowFunction6_es6.js +++ b/tests/baselines/reference/asyncArrowFunction6_es6.js @@ -5,4 +5,5 @@ var foo = async (a = await): Promise => { //// [asyncArrowFunction6_es6.js] var foo = (a = await) => __awaiter(function* () { -}, this, void 0, Promise); +}, +this, void 0, Promise); diff --git a/tests/baselines/reference/asyncArrowFunction7_es6.js b/tests/baselines/reference/asyncArrowFunction7_es6.js index 459ec413da587..6f8cf6141a893 100644 --- a/tests/baselines/reference/asyncArrowFunction7_es6.js +++ b/tests/baselines/reference/asyncArrowFunction7_es6.js @@ -10,5 +10,7 @@ var bar = async (): Promise => { var bar = () => __awaiter(function* () { // 'await' here is an identifier, and not an await expression. var foo = (a = await) => __awaiter(function* () { - }, this, void 0, Promise); -}, this, void 0, Promise); + }, + this, void 0, Promise); +}, +this, void 0, Promise); diff --git a/tests/baselines/reference/asyncArrowFunction8_es6.js b/tests/baselines/reference/asyncArrowFunction8_es6.js index b32541fdda6b7..e4383a16220c6 100644 --- a/tests/baselines/reference/asyncArrowFunction8_es6.js +++ b/tests/baselines/reference/asyncArrowFunction8_es6.js @@ -7,4 +7,5 @@ var foo = async (): Promise => { //// [asyncArrowFunction8_es6.js] var foo = () => __awaiter(function* () { var v = { [yield ]: foo }; -}, this, void 0, Promise); +}, +this, void 0, Promise); diff --git a/tests/baselines/reference/asyncArrowFunction9_es6.js b/tests/baselines/reference/asyncArrowFunction9_es6.js index 8a9b663266c58..42511dd87f547 100644 --- a/tests/baselines/reference/asyncArrowFunction9_es6.js +++ b/tests/baselines/reference/asyncArrowFunction9_es6.js @@ -4,4 +4,5 @@ var foo = async (a = await => await): Promise => { //// [asyncArrowFunction9_es6.js] var foo = (a = await => await) => __awaiter(function* () { -}, this, void 0, Promise); +}, +this, void 0, Promise); diff --git a/tests/baselines/reference/asyncArrowFunctionCapturesArguments_es6.js b/tests/baselines/reference/asyncArrowFunctionCapturesArguments_es6.js index 86a1b6e110c6d..888c935cc3f47 100644 --- a/tests/baselines/reference/asyncArrowFunctionCapturesArguments_es6.js +++ b/tests/baselines/reference/asyncArrowFunctionCapturesArguments_es6.js @@ -11,6 +11,7 @@ class C { class C { method() { function other() { } - var fn = () => __awaiter(function* (arguments) { return yield other.apply(this, arguments); }, this, arguments); + var fn = () => __awaiter(function* (arguments) { return yield other.apply(this, arguments); }, + this, arguments); } } diff --git a/tests/baselines/reference/asyncArrowFunctionCapturesThis_es6.js b/tests/baselines/reference/asyncArrowFunctionCapturesThis_es6.js index afcd73b32dccf..67279d7f1be09 100644 --- a/tests/baselines/reference/asyncArrowFunctionCapturesThis_es6.js +++ b/tests/baselines/reference/asyncArrowFunctionCapturesThis_es6.js @@ -9,6 +9,7 @@ class C { //// [asyncArrowFunctionCapturesThis_es6.js] class C { method() { - var fn = () => __awaiter(function* () { return yield this; }, this); + var fn = () => __awaiter(function* () { return yield this; }, + this); } } diff --git a/tests/baselines/reference/asyncFunctionDeclaration10_es6.js b/tests/baselines/reference/asyncFunctionDeclaration10_es6.js index 25319680cebca..7048ca2ffa423 100644 --- a/tests/baselines/reference/asyncFunctionDeclaration10_es6.js +++ b/tests/baselines/reference/asyncFunctionDeclaration10_es6.js @@ -5,5 +5,6 @@ async function foo(a = await => await): Promise { //// [asyncFunctionDeclaration10_es6.js] function foo(a = await => await) { return __awaiter(function* () { - }, this, void 0, Promise); + }, + this, void 0, Promise); } diff --git a/tests/baselines/reference/asyncFunctionDeclaration11_es6.js b/tests/baselines/reference/asyncFunctionDeclaration11_es6.js index 37cb4bbc0d43b..dbf2d489a92ff 100644 --- a/tests/baselines/reference/asyncFunctionDeclaration11_es6.js +++ b/tests/baselines/reference/asyncFunctionDeclaration11_es6.js @@ -5,5 +5,6 @@ async function await(): Promise { //// [asyncFunctionDeclaration11_es6.js] function await() { return __awaiter(function* () { - }, this, void 0, Promise); + }, + this, void 0, Promise); } diff --git a/tests/baselines/reference/asyncFunctionDeclaration13_es6.js b/tests/baselines/reference/asyncFunctionDeclaration13_es6.js index 0423ca2341ba8..35f6af6b2ff30 100644 --- a/tests/baselines/reference/asyncFunctionDeclaration13_es6.js +++ b/tests/baselines/reference/asyncFunctionDeclaration13_es6.js @@ -10,5 +10,6 @@ function foo() { return __awaiter(function* () { // Legal to use 'await' in a type context. var v; - }, this, void 0, Promise); + }, + this, void 0, Promise); } diff --git a/tests/baselines/reference/asyncFunctionDeclaration14_es6.js b/tests/baselines/reference/asyncFunctionDeclaration14_es6.js index eccf374cdc3a5..3610cabbdec63 100644 --- a/tests/baselines/reference/asyncFunctionDeclaration14_es6.js +++ b/tests/baselines/reference/asyncFunctionDeclaration14_es6.js @@ -7,5 +7,6 @@ async function foo(): Promise { function foo() { return __awaiter(function* () { return; - }, this, void 0, Promise); + }, + this, void 0, Promise); } diff --git a/tests/baselines/reference/asyncFunctionDeclaration1_es6.js b/tests/baselines/reference/asyncFunctionDeclaration1_es6.js index 386e1e76241e2..e3e1fb650964a 100644 --- a/tests/baselines/reference/asyncFunctionDeclaration1_es6.js +++ b/tests/baselines/reference/asyncFunctionDeclaration1_es6.js @@ -5,5 +5,6 @@ async function foo(): Promise { //// [asyncFunctionDeclaration1_es6.js] function foo() { return __awaiter(function* () { - }, this, void 0, Promise); + }, + this, void 0, Promise); } diff --git a/tests/baselines/reference/asyncFunctionDeclaration6_es6.js b/tests/baselines/reference/asyncFunctionDeclaration6_es6.js index 9bd17a7cd0ec1..a74d55c35ca2c 100644 --- a/tests/baselines/reference/asyncFunctionDeclaration6_es6.js +++ b/tests/baselines/reference/asyncFunctionDeclaration6_es6.js @@ -5,5 +5,6 @@ async function foo(a = await): Promise { //// [asyncFunctionDeclaration6_es6.js] function foo(a = await) { return __awaiter(function* () { - }, this, void 0, Promise); + }, + this, void 0, Promise); } diff --git a/tests/baselines/reference/asyncFunctionDeclaration7_es6.js b/tests/baselines/reference/asyncFunctionDeclaration7_es6.js index b32c90664acd5..fcc2394a1d13d 100644 --- a/tests/baselines/reference/asyncFunctionDeclaration7_es6.js +++ b/tests/baselines/reference/asyncFunctionDeclaration7_es6.js @@ -11,7 +11,9 @@ function bar() { // 'await' here is an identifier, and not a yield expression. function foo(a = await) { return __awaiter(function* () { - }, this, void 0, Promise); + }, + this, void 0, Promise); } - }, this, void 0, Promise); + }, + this, void 0, Promise); } diff --git a/tests/baselines/reference/asyncFunctionDeclaration9_es6.js b/tests/baselines/reference/asyncFunctionDeclaration9_es6.js index 3fcf3f2f7cace..7f23510f942d6 100644 --- a/tests/baselines/reference/asyncFunctionDeclaration9_es6.js +++ b/tests/baselines/reference/asyncFunctionDeclaration9_es6.js @@ -7,5 +7,6 @@ async function foo(): Promise { function foo() { return __awaiter(function* () { var v = { [yield ]: foo }; - }, this, void 0, Promise); + }, + this, void 0, Promise); } diff --git a/tests/baselines/reference/awaitBinaryExpression1_es6.js b/tests/baselines/reference/awaitBinaryExpression1_es6.js index 889e937336816..0531f7643fcb0 100644 --- a/tests/baselines/reference/awaitBinaryExpression1_es6.js +++ b/tests/baselines/reference/awaitBinaryExpression1_es6.js @@ -13,5 +13,6 @@ function func() { "before"; var b = (yield p) || a; "after"; - }, this, void 0, Promise); + }, + this, void 0, Promise); } diff --git a/tests/baselines/reference/awaitBinaryExpression2_es6.js b/tests/baselines/reference/awaitBinaryExpression2_es6.js index 5a156d6d0d36a..36545440f1f1f 100644 --- a/tests/baselines/reference/awaitBinaryExpression2_es6.js +++ b/tests/baselines/reference/awaitBinaryExpression2_es6.js @@ -13,5 +13,6 @@ function func() { "before"; var b = (yield p) && a; "after"; - }, this, void 0, Promise); + }, + this, void 0, Promise); } diff --git a/tests/baselines/reference/awaitBinaryExpression3_es6.js b/tests/baselines/reference/awaitBinaryExpression3_es6.js index 8b150a9fcbf48..bfe95956ebc4a 100644 --- a/tests/baselines/reference/awaitBinaryExpression3_es6.js +++ b/tests/baselines/reference/awaitBinaryExpression3_es6.js @@ -13,5 +13,6 @@ function func() { "before"; var b = (yield p) + a; "after"; - }, this, void 0, Promise); + }, + this, void 0, Promise); } diff --git a/tests/baselines/reference/awaitBinaryExpression4_es6.js b/tests/baselines/reference/awaitBinaryExpression4_es6.js index c8f42d191c09b..fa2dd17143e55 100644 --- a/tests/baselines/reference/awaitBinaryExpression4_es6.js +++ b/tests/baselines/reference/awaitBinaryExpression4_es6.js @@ -13,5 +13,6 @@ function func() { "before"; var b = yield p, a; "after"; - }, this, void 0, Promise); + }, + this, void 0, Promise); } diff --git a/tests/baselines/reference/awaitBinaryExpression5_es6.js b/tests/baselines/reference/awaitBinaryExpression5_es6.js index 1c867a8abbf7b..615320e8ebb0c 100644 --- a/tests/baselines/reference/awaitBinaryExpression5_es6.js +++ b/tests/baselines/reference/awaitBinaryExpression5_es6.js @@ -15,5 +15,6 @@ function func() { var o; o.a = yield p; "after"; - }, this, void 0, Promise); + }, + this, void 0, Promise); } diff --git a/tests/baselines/reference/awaitCallExpression1_es6.js b/tests/baselines/reference/awaitCallExpression1_es6.js index dc73da972acad..9e329e14ad2dd 100644 --- a/tests/baselines/reference/awaitCallExpression1_es6.js +++ b/tests/baselines/reference/awaitCallExpression1_es6.js @@ -17,5 +17,6 @@ function func() { "before"; var b = fn(a, a, a); "after"; - }, this, void 0, Promise); + }, + this, void 0, Promise); } diff --git a/tests/baselines/reference/awaitCallExpression2_es6.js b/tests/baselines/reference/awaitCallExpression2_es6.js index a0f0944d79610..4f8e088b55dd1 100644 --- a/tests/baselines/reference/awaitCallExpression2_es6.js +++ b/tests/baselines/reference/awaitCallExpression2_es6.js @@ -17,5 +17,6 @@ function func() { "before"; var b = fn(yield p, a, a); "after"; - }, this, void 0, Promise); + }, + this, void 0, Promise); } diff --git a/tests/baselines/reference/awaitCallExpression3_es6.js b/tests/baselines/reference/awaitCallExpression3_es6.js index 75e7788399325..54b5d8411d728 100644 --- a/tests/baselines/reference/awaitCallExpression3_es6.js +++ b/tests/baselines/reference/awaitCallExpression3_es6.js @@ -17,5 +17,6 @@ function func() { "before"; var b = fn(a, yield p, a); "after"; - }, this, void 0, Promise); + }, + this, void 0, Promise); } diff --git a/tests/baselines/reference/awaitCallExpression4_es6.js b/tests/baselines/reference/awaitCallExpression4_es6.js index 8f1756393cb6d..9e32395df83e0 100644 --- a/tests/baselines/reference/awaitCallExpression4_es6.js +++ b/tests/baselines/reference/awaitCallExpression4_es6.js @@ -17,5 +17,6 @@ function func() { "before"; var b = (yield pfn)(a, a, a); "after"; - }, this, void 0, Promise); + }, + this, void 0, Promise); } diff --git a/tests/baselines/reference/awaitCallExpression5_es6.js b/tests/baselines/reference/awaitCallExpression5_es6.js index 0752c02758b1f..76ccf06b1050c 100644 --- a/tests/baselines/reference/awaitCallExpression5_es6.js +++ b/tests/baselines/reference/awaitCallExpression5_es6.js @@ -17,5 +17,6 @@ function func() { "before"; var b = o.fn(a, a, a); "after"; - }, this, void 0, Promise); + }, + this, void 0, Promise); } diff --git a/tests/baselines/reference/awaitCallExpression6_es6.js b/tests/baselines/reference/awaitCallExpression6_es6.js index 3fc683dc399bd..90b96a06ad741 100644 --- a/tests/baselines/reference/awaitCallExpression6_es6.js +++ b/tests/baselines/reference/awaitCallExpression6_es6.js @@ -17,5 +17,6 @@ function func() { "before"; var b = o.fn(yield p, a, a); "after"; - }, this, void 0, Promise); + }, + this, void 0, Promise); } diff --git a/tests/baselines/reference/awaitCallExpression7_es6.js b/tests/baselines/reference/awaitCallExpression7_es6.js index 8618313587a97..e9a2edb8a9142 100644 --- a/tests/baselines/reference/awaitCallExpression7_es6.js +++ b/tests/baselines/reference/awaitCallExpression7_es6.js @@ -17,5 +17,6 @@ function func() { "before"; var b = o.fn(a, yield p, a); "after"; - }, this, void 0, Promise); + }, + this, void 0, Promise); } diff --git a/tests/baselines/reference/awaitCallExpression8_es6.js b/tests/baselines/reference/awaitCallExpression8_es6.js index ceab826c58aae..e172dde417d31 100644 --- a/tests/baselines/reference/awaitCallExpression8_es6.js +++ b/tests/baselines/reference/awaitCallExpression8_es6.js @@ -17,5 +17,6 @@ function func() { "before"; var b = (yield po).fn(a, a, a); "after"; - }, this, void 0, Promise); + }, + this, void 0, Promise); } From 9a57e6ff172cdb591f35ec6a02ad7d9f6401a08b Mon Sep 17 00:00:00 2001 From: Ron Buckton Date: Mon, 15 Jun 2015 12:04:15 -0700 Subject: [PATCH 21/35] Updated baselines --- src/harness/runner.ts | 2 +- .../argumentsObjectIterator02_ES6.symbols | 6 +- .../reference/arrayLiterals2ES6.symbols | 6 +- .../reference/asyncArrowFunction1_es6.symbols | 2 +- .../reference/asyncArrowFunction9_es6.symbols | 2 +- .../asyncFunctionDeclaration10_es6.symbols | 2 +- .../asyncFunctionDeclaration11_es6.symbols | 2 +- .../asyncFunctionDeclaration14_es6.symbols | 2 +- .../asyncFunctionDeclaration1_es6.symbols | 2 +- .../awaitBinaryExpression1_es6.symbols | 4 +- .../awaitBinaryExpression2_es6.symbols | 4 +- .../awaitBinaryExpression3_es6.symbols | 4 +- .../awaitBinaryExpression4_es6.symbols | 4 +- .../awaitBinaryExpression5_es6.symbols | 4 +- .../awaitCallExpression1_es6.symbols | 8 +- .../awaitCallExpression2_es6.symbols | 8 +- .../awaitCallExpression3_es6.symbols | 8 +- .../awaitCallExpression4_es6.symbols | 8 +- .../awaitCallExpression5_es6.symbols | 8 +- .../awaitCallExpression6_es6.symbols | 8 +- .../awaitCallExpression7_es6.symbols | 8 +- .../awaitCallExpression8_es6.symbols | 8 +- .../reference/callWithSpreadES6.symbols | 2 +- ...tructuringParameterDeclaration3ES5.symbols | 16 +- ...tructuringParameterDeclaration3ES6.symbols | 16 +- ...owFunctionWhenUsingArguments14_ES6.symbols | 2 +- ...owFunctionWhenUsingArguments15_ES6.symbols | 2 +- ...owFunctionWhenUsingArguments16_ES6.symbols | 2 +- ...owFunctionWhenUsingArguments17_ES6.symbols | 2 +- ...owFunctionWhenUsingArguments18_ES6.symbols | 2 +- tests/baselines/reference/for-of13.symbols | 4 +- tests/baselines/reference/for-of18.symbols | 6 +- tests/baselines/reference/for-of19.symbols | 6 +- tests/baselines/reference/for-of20.symbols | 6 +- tests/baselines/reference/for-of21.symbols | 6 +- tests/baselines/reference/for-of22.symbols | 6 +- tests/baselines/reference/for-of23.symbols | 6 +- tests/baselines/reference/for-of25.symbols | 6 +- tests/baselines/reference/for-of26.symbols | 6 +- tests/baselines/reference/for-of27.symbols | 6 +- tests/baselines/reference/for-of28.symbols | 6 +- tests/baselines/reference/for-of37.symbols | 2 +- tests/baselines/reference/for-of38.symbols | 2 +- tests/baselines/reference/for-of40.symbols | 2 +- tests/baselines/reference/for-of44.symbols | 2 +- tests/baselines/reference/for-of45.symbols | 2 +- tests/baselines/reference/for-of50.symbols | 2 +- tests/baselines/reference/for-of57.symbols | 2 +- .../reference/generatorES6_6.symbols | 6 +- .../reference/generatorOverloads4.symbols | 6 +- .../reference/generatorOverloads5.symbols | 6 +- .../reference/generatorTypeCheck1.symbols | 2 +- .../reference/generatorTypeCheck10.symbols | 2 +- .../reference/generatorTypeCheck11.symbols | 2 +- .../reference/generatorTypeCheck12.symbols | 2 +- .../reference/generatorTypeCheck13.symbols | 2 +- .../reference/generatorTypeCheck17.symbols | 2 +- .../reference/generatorTypeCheck19.symbols | 2 +- .../reference/generatorTypeCheck2.symbols | 2 +- .../reference/generatorTypeCheck26.symbols | 2 +- .../reference/generatorTypeCheck27.symbols | 2 +- .../reference/generatorTypeCheck28.symbols | 8 +- .../reference/generatorTypeCheck29.symbols | 4 +- .../reference/generatorTypeCheck3.symbols | 2 +- .../reference/generatorTypeCheck30.symbols | 4 +- .../reference/generatorTypeCheck45.symbols | 2 +- .../reference/generatorTypeCheck46.symbols | 8 +- .../reference/iterableArrayPattern1.symbols | 8 +- .../reference/iterableArrayPattern11.symbols | 6 +- .../reference/iterableArrayPattern12.symbols | 6 +- .../reference/iterableArrayPattern13.symbols | 6 +- .../reference/iterableArrayPattern2.symbols | 8 +- .../reference/iterableArrayPattern3.symbols | 6 +- .../reference/iterableArrayPattern30.symbols | 2 +- .../reference/iterableArrayPattern4.symbols | 6 +- .../reference/iterableArrayPattern9.symbols | 6 +- .../iterableContextualTyping1.symbols | 2 +- .../reference/iteratorSpreadInArray.symbols | 8 +- .../reference/iteratorSpreadInArray11.symbols | 2 +- .../reference/iteratorSpreadInArray2.symbols | 14 +- .../reference/iteratorSpreadInArray3.symbols | 8 +- .../reference/iteratorSpreadInArray4.symbols | 8 +- .../reference/iteratorSpreadInArray7.symbols | 8 +- .../reference/iteratorSpreadInCall11.symbols | 8 +- .../reference/iteratorSpreadInCall12.symbols | 14 +- .../reference/iteratorSpreadInCall3.symbols | 8 +- .../reference/iteratorSpreadInCall5.symbols | 14 +- .../reference/parserSymbolProperty1.symbols | 6 +- .../reference/parserSymbolProperty2.symbols | 6 +- .../reference/parserSymbolProperty3.symbols | 6 +- .../reference/parserSymbolProperty4.symbols | 6 +- .../reference/parserSymbolProperty5.symbols | 6 +- .../reference/parserSymbolProperty6.symbols | 6 +- .../reference/parserSymbolProperty7.symbols | 6 +- .../reference/parserSymbolProperty8.symbols | 6 +- .../reference/parserSymbolProperty9.symbols | 6 +- .../promiseVoidErrorCallback.symbols | 16 +- .../reference/symbolDeclarationEmit1.symbols | 6 +- .../reference/symbolDeclarationEmit10.symbols | 12 +- .../reference/symbolDeclarationEmit11.symbols | 24 +- .../reference/symbolDeclarationEmit13.symbols | 12 +- .../reference/symbolDeclarationEmit14.symbols | 12 +- .../reference/symbolDeclarationEmit2.symbols | 6 +- .../reference/symbolDeclarationEmit3.symbols | 18 +- .../reference/symbolDeclarationEmit4.symbols | 12 +- .../reference/symbolDeclarationEmit5.symbols | 6 +- .../reference/symbolDeclarationEmit6.symbols | 6 +- .../reference/symbolDeclarationEmit7.symbols | 6 +- .../reference/symbolDeclarationEmit8.symbols | 6 +- .../reference/symbolDeclarationEmit9.symbols | 6 +- .../reference/symbolProperty11.symbols | 6 +- .../reference/symbolProperty13.symbols | 12 +- .../reference/symbolProperty14.symbols | 12 +- .../reference/symbolProperty15.symbols | 6 +- .../reference/symbolProperty16.symbols | 12 +- .../reference/symbolProperty18.symbols | 36 +- .../reference/symbolProperty19.symbols | 24 +- .../reference/symbolProperty2.symbols | 2 +- .../reference/symbolProperty20.symbols | 24 +- .../reference/symbolProperty21.symbols | 30 +- .../reference/symbolProperty22.symbols | 12 +- .../reference/symbolProperty23.symbols | 12 +- .../reference/symbolProperty26.symbols | 12 +- .../reference/symbolProperty27.symbols | 12 +- .../reference/symbolProperty28.symbols | 12 +- .../reference/symbolProperty4.symbols | 6 +- .../reference/symbolProperty40.symbols | 30 +- .../reference/symbolProperty41.symbols | 30 +- .../reference/symbolProperty45.symbols | 12 +- .../reference/symbolProperty5.symbols | 18 +- .../reference/symbolProperty50.symbols | 6 +- .../reference/symbolProperty51.symbols | 6 +- .../reference/symbolProperty55.symbols | 12 +- .../reference/symbolProperty56.symbols | 6 +- .../reference/symbolProperty57.symbols | 8 +- .../reference/symbolProperty6.symbols | 24 +- .../reference/symbolProperty8.symbols | 12 +- .../baselines/reference/symbolType11.symbols | 6 +- .../baselines/reference/symbolType16.symbols | 2 +- ...teStringWithEmbeddedNewOperatorES6.symbols | 2 +- tests/baselines/reference/typedArrays.symbols | 330 +++++++++--------- 141 files changed, 691 insertions(+), 691 deletions(-) diff --git a/src/harness/runner.ts b/src/harness/runner.ts index 42c2d5667c4be..13d93302f183c 100644 --- a/src/harness/runner.ts +++ b/src/harness/runner.ts @@ -49,7 +49,7 @@ if (testConfigFile !== '') { if (!option) { continue; } - ts.sys.write("Option: " + option + "\r\n"); + switch (option) { case 'compiler': runners.push(new CompilerBaselineRunner(CompilerTestType.Conformance)); diff --git a/tests/baselines/reference/argumentsObjectIterator02_ES6.symbols b/tests/baselines/reference/argumentsObjectIterator02_ES6.symbols index 2b1504386622b..208646dc1013e 100644 --- a/tests/baselines/reference/argumentsObjectIterator02_ES6.symbols +++ b/tests/baselines/reference/argumentsObjectIterator02_ES6.symbols @@ -9,9 +9,9 @@ function doubleAndReturnAsArray(x: number, y: number, z: number): [number, numbe let blah = arguments[Symbol.iterator]; >blah : Symbol(blah, Decl(argumentsObjectIterator02_ES6.ts, 2, 7)) >arguments : Symbol(arguments) ->Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1248, 31)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1198, 53), Decl(lib.d.ts, 1304, 11)) ->iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1248, 31)) +>Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1249, 31)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1199, 52), Decl(lib.d.ts, 1305, 11)) +>iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1249, 31)) let result = []; >result : Symbol(result, Decl(argumentsObjectIterator02_ES6.ts, 4, 7)) diff --git a/tests/baselines/reference/arrayLiterals2ES6.symbols b/tests/baselines/reference/arrayLiterals2ES6.symbols index 5a13a359581f8..faf0b13073815 100644 --- a/tests/baselines/reference/arrayLiterals2ES6.symbols +++ b/tests/baselines/reference/arrayLiterals2ES6.symbols @@ -72,14 +72,14 @@ var temp2: [number[], string[]] = [[1, 2, 3], ["hello", "string"]]; interface myArray extends Array { } >myArray : Symbol(myArray, Decl(arrayLiterals2ES6.ts, 40, 67)) ->Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11), Decl(lib.d.ts, 1451, 1)) +>Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11), Decl(lib.d.ts, 1452, 1)) >Number : Symbol(Number, Decl(lib.d.ts, 456, 40), Decl(lib.d.ts, 518, 11)) interface myArray2 extends Array { } >myArray2 : Symbol(myArray2, Decl(arrayLiterals2ES6.ts, 42, 43)) ->Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11), Decl(lib.d.ts, 1451, 1)) +>Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11), Decl(lib.d.ts, 1452, 1)) >Number : Symbol(Number, Decl(lib.d.ts, 456, 40), Decl(lib.d.ts, 518, 11)) ->String : Symbol(String, Decl(lib.d.ts, 275, 1), Decl(lib.d.ts, 443, 11), Decl(lib.d.ts, 1555, 1)) +>String : Symbol(String, Decl(lib.d.ts, 275, 1), Decl(lib.d.ts, 443, 11), Decl(lib.d.ts, 1556, 1)) var d0 = [1, true, ...temp, ]; // has type (string|number|boolean)[] >d0 : Symbol(d0, Decl(arrayLiterals2ES6.ts, 44, 3)) diff --git a/tests/baselines/reference/asyncArrowFunction1_es6.symbols b/tests/baselines/reference/asyncArrowFunction1_es6.symbols index db10199213556..81712c324c0bc 100644 --- a/tests/baselines/reference/asyncArrowFunction1_es6.symbols +++ b/tests/baselines/reference/asyncArrowFunction1_es6.symbols @@ -2,6 +2,6 @@ var foo = async (): Promise => { >foo : Symbol(foo, Decl(asyncArrowFunction1_es6.ts, 1, 3)) ->Promise : Symbol(Promise, Decl(lib.d.ts, 4767, 1), Decl(lib.d.ts, 4853, 11)) +>Promise : Symbol(Promise, Decl(lib.d.ts, 4768, 1), Decl(lib.d.ts, 4854, 11)) }; diff --git a/tests/baselines/reference/asyncArrowFunction9_es6.symbols b/tests/baselines/reference/asyncArrowFunction9_es6.symbols index 706baa3fbb4db..9714b119e72dd 100644 --- a/tests/baselines/reference/asyncArrowFunction9_es6.symbols +++ b/tests/baselines/reference/asyncArrowFunction9_es6.symbols @@ -4,5 +4,5 @@ var foo = async (a = await => await): Promise => { >a : Symbol(a, Decl(asyncArrowFunction9_es6.ts, 0, 17)) >await : Symbol(await, Decl(asyncArrowFunction9_es6.ts, 0, 20)) >await : Symbol(await, Decl(asyncArrowFunction9_es6.ts, 0, 20)) ->Promise : Symbol(Promise, Decl(lib.d.ts, 4767, 1), Decl(lib.d.ts, 4853, 11)) +>Promise : Symbol(Promise, Decl(lib.d.ts, 4768, 1), Decl(lib.d.ts, 4854, 11)) } diff --git a/tests/baselines/reference/asyncFunctionDeclaration10_es6.symbols b/tests/baselines/reference/asyncFunctionDeclaration10_es6.symbols index e4fb76ac698d2..3bf5baec3b190 100644 --- a/tests/baselines/reference/asyncFunctionDeclaration10_es6.symbols +++ b/tests/baselines/reference/asyncFunctionDeclaration10_es6.symbols @@ -4,5 +4,5 @@ async function foo(a = await => await): Promise { >a : Symbol(a, Decl(asyncFunctionDeclaration10_es6.ts, 0, 19)) >await : Symbol(await, Decl(asyncFunctionDeclaration10_es6.ts, 0, 22)) >await : Symbol(await, Decl(asyncFunctionDeclaration10_es6.ts, 0, 22)) ->Promise : Symbol(Promise, Decl(lib.d.ts, 4767, 1), Decl(lib.d.ts, 4853, 11)) +>Promise : Symbol(Promise, Decl(lib.d.ts, 4768, 1), Decl(lib.d.ts, 4854, 11)) } diff --git a/tests/baselines/reference/asyncFunctionDeclaration11_es6.symbols b/tests/baselines/reference/asyncFunctionDeclaration11_es6.symbols index 58bc3fc0146f7..339108848fa5a 100644 --- a/tests/baselines/reference/asyncFunctionDeclaration11_es6.symbols +++ b/tests/baselines/reference/asyncFunctionDeclaration11_es6.symbols @@ -1,5 +1,5 @@ === tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration11_es6.ts === async function await(): Promise { >await : Symbol(await, Decl(asyncFunctionDeclaration11_es6.ts, 0, 0)) ->Promise : Symbol(Promise, Decl(lib.d.ts, 4767, 1), Decl(lib.d.ts, 4853, 11)) +>Promise : Symbol(Promise, Decl(lib.d.ts, 4768, 1), Decl(lib.d.ts, 4854, 11)) } diff --git a/tests/baselines/reference/asyncFunctionDeclaration14_es6.symbols b/tests/baselines/reference/asyncFunctionDeclaration14_es6.symbols index b0a05f8d5212e..a9679f386922a 100644 --- a/tests/baselines/reference/asyncFunctionDeclaration14_es6.symbols +++ b/tests/baselines/reference/asyncFunctionDeclaration14_es6.symbols @@ -1,7 +1,7 @@ === tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration14_es6.ts === async function foo(): Promise { >foo : Symbol(foo, Decl(asyncFunctionDeclaration14_es6.ts, 0, 0)) ->Promise : Symbol(Promise, Decl(lib.d.ts, 4767, 1), Decl(lib.d.ts, 4853, 11)) +>Promise : Symbol(Promise, Decl(lib.d.ts, 4768, 1), Decl(lib.d.ts, 4854, 11)) return; } diff --git a/tests/baselines/reference/asyncFunctionDeclaration1_es6.symbols b/tests/baselines/reference/asyncFunctionDeclaration1_es6.symbols index b5c3c1b837d5f..ce3b922cae882 100644 --- a/tests/baselines/reference/asyncFunctionDeclaration1_es6.symbols +++ b/tests/baselines/reference/asyncFunctionDeclaration1_es6.symbols @@ -1,5 +1,5 @@ === tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration1_es6.ts === async function foo(): Promise { >foo : Symbol(foo, Decl(asyncFunctionDeclaration1_es6.ts, 0, 0)) ->Promise : Symbol(Promise, Decl(lib.d.ts, 4767, 1), Decl(lib.d.ts, 4853, 11)) +>Promise : Symbol(Promise, Decl(lib.d.ts, 4768, 1), Decl(lib.d.ts, 4854, 11)) } diff --git a/tests/baselines/reference/awaitBinaryExpression1_es6.symbols b/tests/baselines/reference/awaitBinaryExpression1_es6.symbols index 19a480a376d77..ea5174c203580 100644 --- a/tests/baselines/reference/awaitBinaryExpression1_es6.symbols +++ b/tests/baselines/reference/awaitBinaryExpression1_es6.symbols @@ -4,11 +4,11 @@ declare var a: boolean; declare var p: Promise; >p : Symbol(p, Decl(awaitBinaryExpression1_es6.ts, 1, 11)) ->Promise : Symbol(Promise, Decl(lib.d.ts, 4767, 1), Decl(lib.d.ts, 4853, 11)) +>Promise : Symbol(Promise, Decl(lib.d.ts, 4768, 1), Decl(lib.d.ts, 4854, 11)) async function func(): Promise { >func : Symbol(func, Decl(awaitBinaryExpression1_es6.ts, 1, 32)) ->Promise : Symbol(Promise, Decl(lib.d.ts, 4767, 1), Decl(lib.d.ts, 4853, 11)) +>Promise : Symbol(Promise, Decl(lib.d.ts, 4768, 1), Decl(lib.d.ts, 4854, 11)) "before"; var b = await p || a; diff --git a/tests/baselines/reference/awaitBinaryExpression2_es6.symbols b/tests/baselines/reference/awaitBinaryExpression2_es6.symbols index b0398a7399867..6b12c72bce439 100644 --- a/tests/baselines/reference/awaitBinaryExpression2_es6.symbols +++ b/tests/baselines/reference/awaitBinaryExpression2_es6.symbols @@ -4,11 +4,11 @@ declare var a: boolean; declare var p: Promise; >p : Symbol(p, Decl(awaitBinaryExpression2_es6.ts, 1, 11)) ->Promise : Symbol(Promise, Decl(lib.d.ts, 4767, 1), Decl(lib.d.ts, 4853, 11)) +>Promise : Symbol(Promise, Decl(lib.d.ts, 4768, 1), Decl(lib.d.ts, 4854, 11)) async function func(): Promise { >func : Symbol(func, Decl(awaitBinaryExpression2_es6.ts, 1, 32)) ->Promise : Symbol(Promise, Decl(lib.d.ts, 4767, 1), Decl(lib.d.ts, 4853, 11)) +>Promise : Symbol(Promise, Decl(lib.d.ts, 4768, 1), Decl(lib.d.ts, 4854, 11)) "before"; var b = await p && a; diff --git a/tests/baselines/reference/awaitBinaryExpression3_es6.symbols b/tests/baselines/reference/awaitBinaryExpression3_es6.symbols index 0c0bd1815f5ae..c4e568a54e94b 100644 --- a/tests/baselines/reference/awaitBinaryExpression3_es6.symbols +++ b/tests/baselines/reference/awaitBinaryExpression3_es6.symbols @@ -4,11 +4,11 @@ declare var a: number; declare var p: Promise; >p : Symbol(p, Decl(awaitBinaryExpression3_es6.ts, 1, 11)) ->Promise : Symbol(Promise, Decl(lib.d.ts, 4767, 1), Decl(lib.d.ts, 4853, 11)) +>Promise : Symbol(Promise, Decl(lib.d.ts, 4768, 1), Decl(lib.d.ts, 4854, 11)) async function func(): Promise { >func : Symbol(func, Decl(awaitBinaryExpression3_es6.ts, 1, 31)) ->Promise : Symbol(Promise, Decl(lib.d.ts, 4767, 1), Decl(lib.d.ts, 4853, 11)) +>Promise : Symbol(Promise, Decl(lib.d.ts, 4768, 1), Decl(lib.d.ts, 4854, 11)) "before"; var b = await p + a; diff --git a/tests/baselines/reference/awaitBinaryExpression4_es6.symbols b/tests/baselines/reference/awaitBinaryExpression4_es6.symbols index d5c3fa80d58ee..77c80010b647d 100644 --- a/tests/baselines/reference/awaitBinaryExpression4_es6.symbols +++ b/tests/baselines/reference/awaitBinaryExpression4_es6.symbols @@ -4,11 +4,11 @@ declare var a: boolean; declare var p: Promise; >p : Symbol(p, Decl(awaitBinaryExpression4_es6.ts, 1, 11)) ->Promise : Symbol(Promise, Decl(lib.d.ts, 4767, 1), Decl(lib.d.ts, 4853, 11)) +>Promise : Symbol(Promise, Decl(lib.d.ts, 4768, 1), Decl(lib.d.ts, 4854, 11)) async function func(): Promise { >func : Symbol(func, Decl(awaitBinaryExpression4_es6.ts, 1, 32)) ->Promise : Symbol(Promise, Decl(lib.d.ts, 4767, 1), Decl(lib.d.ts, 4853, 11)) +>Promise : Symbol(Promise, Decl(lib.d.ts, 4768, 1), Decl(lib.d.ts, 4854, 11)) "before"; var b = await p, a; diff --git a/tests/baselines/reference/awaitBinaryExpression5_es6.symbols b/tests/baselines/reference/awaitBinaryExpression5_es6.symbols index b1d75d324a42b..451311947aa3a 100644 --- a/tests/baselines/reference/awaitBinaryExpression5_es6.symbols +++ b/tests/baselines/reference/awaitBinaryExpression5_es6.symbols @@ -4,11 +4,11 @@ declare var a: boolean; declare var p: Promise; >p : Symbol(p, Decl(awaitBinaryExpression5_es6.ts, 1, 11)) ->Promise : Symbol(Promise, Decl(lib.d.ts, 4767, 1), Decl(lib.d.ts, 4853, 11)) +>Promise : Symbol(Promise, Decl(lib.d.ts, 4768, 1), Decl(lib.d.ts, 4854, 11)) async function func(): Promise { >func : Symbol(func, Decl(awaitBinaryExpression5_es6.ts, 1, 32)) ->Promise : Symbol(Promise, Decl(lib.d.ts, 4767, 1), Decl(lib.d.ts, 4853, 11)) +>Promise : Symbol(Promise, Decl(lib.d.ts, 4768, 1), Decl(lib.d.ts, 4854, 11)) "before"; var o: { a: boolean; }; diff --git a/tests/baselines/reference/awaitCallExpression1_es6.symbols b/tests/baselines/reference/awaitCallExpression1_es6.symbols index f574a34dd5121..5d44f790f23a4 100644 --- a/tests/baselines/reference/awaitCallExpression1_es6.symbols +++ b/tests/baselines/reference/awaitCallExpression1_es6.symbols @@ -4,7 +4,7 @@ declare var a: boolean; declare var p: Promise; >p : Symbol(p, Decl(awaitCallExpression1_es6.ts, 1, 11)) ->Promise : Symbol(Promise, Decl(lib.d.ts, 4767, 1), Decl(lib.d.ts, 4853, 11)) +>Promise : Symbol(Promise, Decl(lib.d.ts, 4768, 1), Decl(lib.d.ts, 4854, 11)) declare function fn(arg0: boolean, arg1: boolean, arg2: boolean): void; >fn : Symbol(fn, Decl(awaitCallExpression1_es6.ts, 1, 32)) @@ -21,14 +21,14 @@ declare var o: { fn(arg0: boolean, arg1: boolean, arg2: boolean): void; }; declare var pfn: Promise<{ (arg0: boolean, arg1: boolean, arg2: boolean): void; }>; >pfn : Symbol(pfn, Decl(awaitCallExpression1_es6.ts, 4, 11)) ->Promise : Symbol(Promise, Decl(lib.d.ts, 4767, 1), Decl(lib.d.ts, 4853, 11)) +>Promise : Symbol(Promise, Decl(lib.d.ts, 4768, 1), Decl(lib.d.ts, 4854, 11)) >arg0 : Symbol(arg0, Decl(awaitCallExpression1_es6.ts, 4, 28)) >arg1 : Symbol(arg1, Decl(awaitCallExpression1_es6.ts, 4, 42)) >arg2 : Symbol(arg2, Decl(awaitCallExpression1_es6.ts, 4, 57)) declare var po: Promise<{ fn(arg0: boolean, arg1: boolean, arg2: boolean): void; }>; >po : Symbol(po, Decl(awaitCallExpression1_es6.ts, 5, 11)) ->Promise : Symbol(Promise, Decl(lib.d.ts, 4767, 1), Decl(lib.d.ts, 4853, 11)) +>Promise : Symbol(Promise, Decl(lib.d.ts, 4768, 1), Decl(lib.d.ts, 4854, 11)) >fn : Symbol(fn, Decl(awaitCallExpression1_es6.ts, 5, 25)) >arg0 : Symbol(arg0, Decl(awaitCallExpression1_es6.ts, 5, 29)) >arg1 : Symbol(arg1, Decl(awaitCallExpression1_es6.ts, 5, 43)) @@ -36,7 +36,7 @@ declare var po: Promise<{ fn(arg0: boolean, arg1: boolean, arg2: boolean): void; async function func(): Promise { >func : Symbol(func, Decl(awaitCallExpression1_es6.ts, 5, 84)) ->Promise : Symbol(Promise, Decl(lib.d.ts, 4767, 1), Decl(lib.d.ts, 4853, 11)) +>Promise : Symbol(Promise, Decl(lib.d.ts, 4768, 1), Decl(lib.d.ts, 4854, 11)) "before"; var b = fn(a, a, a); diff --git a/tests/baselines/reference/awaitCallExpression2_es6.symbols b/tests/baselines/reference/awaitCallExpression2_es6.symbols index 4e474e1db99e7..fdd6975f45b25 100644 --- a/tests/baselines/reference/awaitCallExpression2_es6.symbols +++ b/tests/baselines/reference/awaitCallExpression2_es6.symbols @@ -4,7 +4,7 @@ declare var a: boolean; declare var p: Promise; >p : Symbol(p, Decl(awaitCallExpression2_es6.ts, 1, 11)) ->Promise : Symbol(Promise, Decl(lib.d.ts, 4767, 1), Decl(lib.d.ts, 4853, 11)) +>Promise : Symbol(Promise, Decl(lib.d.ts, 4768, 1), Decl(lib.d.ts, 4854, 11)) declare function fn(arg0: boolean, arg1: boolean, arg2: boolean): void; >fn : Symbol(fn, Decl(awaitCallExpression2_es6.ts, 1, 32)) @@ -21,14 +21,14 @@ declare var o: { fn(arg0: boolean, arg1: boolean, arg2: boolean): void; }; declare var pfn: Promise<{ (arg0: boolean, arg1: boolean, arg2: boolean): void; }>; >pfn : Symbol(pfn, Decl(awaitCallExpression2_es6.ts, 4, 11)) ->Promise : Symbol(Promise, Decl(lib.d.ts, 4767, 1), Decl(lib.d.ts, 4853, 11)) +>Promise : Symbol(Promise, Decl(lib.d.ts, 4768, 1), Decl(lib.d.ts, 4854, 11)) >arg0 : Symbol(arg0, Decl(awaitCallExpression2_es6.ts, 4, 28)) >arg1 : Symbol(arg1, Decl(awaitCallExpression2_es6.ts, 4, 42)) >arg2 : Symbol(arg2, Decl(awaitCallExpression2_es6.ts, 4, 57)) declare var po: Promise<{ fn(arg0: boolean, arg1: boolean, arg2: boolean): void; }>; >po : Symbol(po, Decl(awaitCallExpression2_es6.ts, 5, 11)) ->Promise : Symbol(Promise, Decl(lib.d.ts, 4767, 1), Decl(lib.d.ts, 4853, 11)) +>Promise : Symbol(Promise, Decl(lib.d.ts, 4768, 1), Decl(lib.d.ts, 4854, 11)) >fn : Symbol(fn, Decl(awaitCallExpression2_es6.ts, 5, 25)) >arg0 : Symbol(arg0, Decl(awaitCallExpression2_es6.ts, 5, 29)) >arg1 : Symbol(arg1, Decl(awaitCallExpression2_es6.ts, 5, 43)) @@ -36,7 +36,7 @@ declare var po: Promise<{ fn(arg0: boolean, arg1: boolean, arg2: boolean): void; async function func(): Promise { >func : Symbol(func, Decl(awaitCallExpression2_es6.ts, 5, 84)) ->Promise : Symbol(Promise, Decl(lib.d.ts, 4767, 1), Decl(lib.d.ts, 4853, 11)) +>Promise : Symbol(Promise, Decl(lib.d.ts, 4768, 1), Decl(lib.d.ts, 4854, 11)) "before"; var b = fn(await p, a, a); diff --git a/tests/baselines/reference/awaitCallExpression3_es6.symbols b/tests/baselines/reference/awaitCallExpression3_es6.symbols index 242b35baa3b98..17ba0bf92c707 100644 --- a/tests/baselines/reference/awaitCallExpression3_es6.symbols +++ b/tests/baselines/reference/awaitCallExpression3_es6.symbols @@ -4,7 +4,7 @@ declare var a: boolean; declare var p: Promise; >p : Symbol(p, Decl(awaitCallExpression3_es6.ts, 1, 11)) ->Promise : Symbol(Promise, Decl(lib.d.ts, 4767, 1), Decl(lib.d.ts, 4853, 11)) +>Promise : Symbol(Promise, Decl(lib.d.ts, 4768, 1), Decl(lib.d.ts, 4854, 11)) declare function fn(arg0: boolean, arg1: boolean, arg2: boolean): void; >fn : Symbol(fn, Decl(awaitCallExpression3_es6.ts, 1, 32)) @@ -21,14 +21,14 @@ declare var o: { fn(arg0: boolean, arg1: boolean, arg2: boolean): void; }; declare var pfn: Promise<{ (arg0: boolean, arg1: boolean, arg2: boolean): void; }>; >pfn : Symbol(pfn, Decl(awaitCallExpression3_es6.ts, 4, 11)) ->Promise : Symbol(Promise, Decl(lib.d.ts, 4767, 1), Decl(lib.d.ts, 4853, 11)) +>Promise : Symbol(Promise, Decl(lib.d.ts, 4768, 1), Decl(lib.d.ts, 4854, 11)) >arg0 : Symbol(arg0, Decl(awaitCallExpression3_es6.ts, 4, 28)) >arg1 : Symbol(arg1, Decl(awaitCallExpression3_es6.ts, 4, 42)) >arg2 : Symbol(arg2, Decl(awaitCallExpression3_es6.ts, 4, 57)) declare var po: Promise<{ fn(arg0: boolean, arg1: boolean, arg2: boolean): void; }>; >po : Symbol(po, Decl(awaitCallExpression3_es6.ts, 5, 11)) ->Promise : Symbol(Promise, Decl(lib.d.ts, 4767, 1), Decl(lib.d.ts, 4853, 11)) +>Promise : Symbol(Promise, Decl(lib.d.ts, 4768, 1), Decl(lib.d.ts, 4854, 11)) >fn : Symbol(fn, Decl(awaitCallExpression3_es6.ts, 5, 25)) >arg0 : Symbol(arg0, Decl(awaitCallExpression3_es6.ts, 5, 29)) >arg1 : Symbol(arg1, Decl(awaitCallExpression3_es6.ts, 5, 43)) @@ -36,7 +36,7 @@ declare var po: Promise<{ fn(arg0: boolean, arg1: boolean, arg2: boolean): void; async function func(): Promise { >func : Symbol(func, Decl(awaitCallExpression3_es6.ts, 5, 84)) ->Promise : Symbol(Promise, Decl(lib.d.ts, 4767, 1), Decl(lib.d.ts, 4853, 11)) +>Promise : Symbol(Promise, Decl(lib.d.ts, 4768, 1), Decl(lib.d.ts, 4854, 11)) "before"; var b = fn(a, await p, a); diff --git a/tests/baselines/reference/awaitCallExpression4_es6.symbols b/tests/baselines/reference/awaitCallExpression4_es6.symbols index 66974f24a71a0..5bff8aa3b2ee5 100644 --- a/tests/baselines/reference/awaitCallExpression4_es6.symbols +++ b/tests/baselines/reference/awaitCallExpression4_es6.symbols @@ -4,7 +4,7 @@ declare var a: boolean; declare var p: Promise; >p : Symbol(p, Decl(awaitCallExpression4_es6.ts, 1, 11)) ->Promise : Symbol(Promise, Decl(lib.d.ts, 4767, 1), Decl(lib.d.ts, 4853, 11)) +>Promise : Symbol(Promise, Decl(lib.d.ts, 4768, 1), Decl(lib.d.ts, 4854, 11)) declare function fn(arg0: boolean, arg1: boolean, arg2: boolean): void; >fn : Symbol(fn, Decl(awaitCallExpression4_es6.ts, 1, 32)) @@ -21,14 +21,14 @@ declare var o: { fn(arg0: boolean, arg1: boolean, arg2: boolean): void; }; declare var pfn: Promise<{ (arg0: boolean, arg1: boolean, arg2: boolean): void; }>; >pfn : Symbol(pfn, Decl(awaitCallExpression4_es6.ts, 4, 11)) ->Promise : Symbol(Promise, Decl(lib.d.ts, 4767, 1), Decl(lib.d.ts, 4853, 11)) +>Promise : Symbol(Promise, Decl(lib.d.ts, 4768, 1), Decl(lib.d.ts, 4854, 11)) >arg0 : Symbol(arg0, Decl(awaitCallExpression4_es6.ts, 4, 28)) >arg1 : Symbol(arg1, Decl(awaitCallExpression4_es6.ts, 4, 42)) >arg2 : Symbol(arg2, Decl(awaitCallExpression4_es6.ts, 4, 57)) declare var po: Promise<{ fn(arg0: boolean, arg1: boolean, arg2: boolean): void; }>; >po : Symbol(po, Decl(awaitCallExpression4_es6.ts, 5, 11)) ->Promise : Symbol(Promise, Decl(lib.d.ts, 4767, 1), Decl(lib.d.ts, 4853, 11)) +>Promise : Symbol(Promise, Decl(lib.d.ts, 4768, 1), Decl(lib.d.ts, 4854, 11)) >fn : Symbol(fn, Decl(awaitCallExpression4_es6.ts, 5, 25)) >arg0 : Symbol(arg0, Decl(awaitCallExpression4_es6.ts, 5, 29)) >arg1 : Symbol(arg1, Decl(awaitCallExpression4_es6.ts, 5, 43)) @@ -36,7 +36,7 @@ declare var po: Promise<{ fn(arg0: boolean, arg1: boolean, arg2: boolean): void; async function func(): Promise { >func : Symbol(func, Decl(awaitCallExpression4_es6.ts, 5, 84)) ->Promise : Symbol(Promise, Decl(lib.d.ts, 4767, 1), Decl(lib.d.ts, 4853, 11)) +>Promise : Symbol(Promise, Decl(lib.d.ts, 4768, 1), Decl(lib.d.ts, 4854, 11)) "before"; var b = (await pfn)(a, a, a); diff --git a/tests/baselines/reference/awaitCallExpression5_es6.symbols b/tests/baselines/reference/awaitCallExpression5_es6.symbols index 848168bc8d705..a5a883780742f 100644 --- a/tests/baselines/reference/awaitCallExpression5_es6.symbols +++ b/tests/baselines/reference/awaitCallExpression5_es6.symbols @@ -4,7 +4,7 @@ declare var a: boolean; declare var p: Promise; >p : Symbol(p, Decl(awaitCallExpression5_es6.ts, 1, 11)) ->Promise : Symbol(Promise, Decl(lib.d.ts, 4767, 1), Decl(lib.d.ts, 4853, 11)) +>Promise : Symbol(Promise, Decl(lib.d.ts, 4768, 1), Decl(lib.d.ts, 4854, 11)) declare function fn(arg0: boolean, arg1: boolean, arg2: boolean): void; >fn : Symbol(fn, Decl(awaitCallExpression5_es6.ts, 1, 32)) @@ -21,14 +21,14 @@ declare var o: { fn(arg0: boolean, arg1: boolean, arg2: boolean): void; }; declare var pfn: Promise<{ (arg0: boolean, arg1: boolean, arg2: boolean): void; }>; >pfn : Symbol(pfn, Decl(awaitCallExpression5_es6.ts, 4, 11)) ->Promise : Symbol(Promise, Decl(lib.d.ts, 4767, 1), Decl(lib.d.ts, 4853, 11)) +>Promise : Symbol(Promise, Decl(lib.d.ts, 4768, 1), Decl(lib.d.ts, 4854, 11)) >arg0 : Symbol(arg0, Decl(awaitCallExpression5_es6.ts, 4, 28)) >arg1 : Symbol(arg1, Decl(awaitCallExpression5_es6.ts, 4, 42)) >arg2 : Symbol(arg2, Decl(awaitCallExpression5_es6.ts, 4, 57)) declare var po: Promise<{ fn(arg0: boolean, arg1: boolean, arg2: boolean): void; }>; >po : Symbol(po, Decl(awaitCallExpression5_es6.ts, 5, 11)) ->Promise : Symbol(Promise, Decl(lib.d.ts, 4767, 1), Decl(lib.d.ts, 4853, 11)) +>Promise : Symbol(Promise, Decl(lib.d.ts, 4768, 1), Decl(lib.d.ts, 4854, 11)) >fn : Symbol(fn, Decl(awaitCallExpression5_es6.ts, 5, 25)) >arg0 : Symbol(arg0, Decl(awaitCallExpression5_es6.ts, 5, 29)) >arg1 : Symbol(arg1, Decl(awaitCallExpression5_es6.ts, 5, 43)) @@ -36,7 +36,7 @@ declare var po: Promise<{ fn(arg0: boolean, arg1: boolean, arg2: boolean): void; async function func(): Promise { >func : Symbol(func, Decl(awaitCallExpression5_es6.ts, 5, 84)) ->Promise : Symbol(Promise, Decl(lib.d.ts, 4767, 1), Decl(lib.d.ts, 4853, 11)) +>Promise : Symbol(Promise, Decl(lib.d.ts, 4768, 1), Decl(lib.d.ts, 4854, 11)) "before"; var b = o.fn(a, a, a); diff --git a/tests/baselines/reference/awaitCallExpression6_es6.symbols b/tests/baselines/reference/awaitCallExpression6_es6.symbols index e8d1c38e9e251..ed6f52a4a50fb 100644 --- a/tests/baselines/reference/awaitCallExpression6_es6.symbols +++ b/tests/baselines/reference/awaitCallExpression6_es6.symbols @@ -4,7 +4,7 @@ declare var a: boolean; declare var p: Promise; >p : Symbol(p, Decl(awaitCallExpression6_es6.ts, 1, 11)) ->Promise : Symbol(Promise, Decl(lib.d.ts, 4767, 1), Decl(lib.d.ts, 4853, 11)) +>Promise : Symbol(Promise, Decl(lib.d.ts, 4768, 1), Decl(lib.d.ts, 4854, 11)) declare function fn(arg0: boolean, arg1: boolean, arg2: boolean): void; >fn : Symbol(fn, Decl(awaitCallExpression6_es6.ts, 1, 32)) @@ -21,14 +21,14 @@ declare var o: { fn(arg0: boolean, arg1: boolean, arg2: boolean): void; }; declare var pfn: Promise<{ (arg0: boolean, arg1: boolean, arg2: boolean): void; }>; >pfn : Symbol(pfn, Decl(awaitCallExpression6_es6.ts, 4, 11)) ->Promise : Symbol(Promise, Decl(lib.d.ts, 4767, 1), Decl(lib.d.ts, 4853, 11)) +>Promise : Symbol(Promise, Decl(lib.d.ts, 4768, 1), Decl(lib.d.ts, 4854, 11)) >arg0 : Symbol(arg0, Decl(awaitCallExpression6_es6.ts, 4, 28)) >arg1 : Symbol(arg1, Decl(awaitCallExpression6_es6.ts, 4, 42)) >arg2 : Symbol(arg2, Decl(awaitCallExpression6_es6.ts, 4, 57)) declare var po: Promise<{ fn(arg0: boolean, arg1: boolean, arg2: boolean): void; }>; >po : Symbol(po, Decl(awaitCallExpression6_es6.ts, 5, 11)) ->Promise : Symbol(Promise, Decl(lib.d.ts, 4767, 1), Decl(lib.d.ts, 4853, 11)) +>Promise : Symbol(Promise, Decl(lib.d.ts, 4768, 1), Decl(lib.d.ts, 4854, 11)) >fn : Symbol(fn, Decl(awaitCallExpression6_es6.ts, 5, 25)) >arg0 : Symbol(arg0, Decl(awaitCallExpression6_es6.ts, 5, 29)) >arg1 : Symbol(arg1, Decl(awaitCallExpression6_es6.ts, 5, 43)) @@ -36,7 +36,7 @@ declare var po: Promise<{ fn(arg0: boolean, arg1: boolean, arg2: boolean): void; async function func(): Promise { >func : Symbol(func, Decl(awaitCallExpression6_es6.ts, 5, 84)) ->Promise : Symbol(Promise, Decl(lib.d.ts, 4767, 1), Decl(lib.d.ts, 4853, 11)) +>Promise : Symbol(Promise, Decl(lib.d.ts, 4768, 1), Decl(lib.d.ts, 4854, 11)) "before"; var b = o.fn(await p, a, a); diff --git a/tests/baselines/reference/awaitCallExpression7_es6.symbols b/tests/baselines/reference/awaitCallExpression7_es6.symbols index ef8834d405093..3e901f6dd1b97 100644 --- a/tests/baselines/reference/awaitCallExpression7_es6.symbols +++ b/tests/baselines/reference/awaitCallExpression7_es6.symbols @@ -4,7 +4,7 @@ declare var a: boolean; declare var p: Promise; >p : Symbol(p, Decl(awaitCallExpression7_es6.ts, 1, 11)) ->Promise : Symbol(Promise, Decl(lib.d.ts, 4767, 1), Decl(lib.d.ts, 4853, 11)) +>Promise : Symbol(Promise, Decl(lib.d.ts, 4768, 1), Decl(lib.d.ts, 4854, 11)) declare function fn(arg0: boolean, arg1: boolean, arg2: boolean): void; >fn : Symbol(fn, Decl(awaitCallExpression7_es6.ts, 1, 32)) @@ -21,14 +21,14 @@ declare var o: { fn(arg0: boolean, arg1: boolean, arg2: boolean): void; }; declare var pfn: Promise<{ (arg0: boolean, arg1: boolean, arg2: boolean): void; }>; >pfn : Symbol(pfn, Decl(awaitCallExpression7_es6.ts, 4, 11)) ->Promise : Symbol(Promise, Decl(lib.d.ts, 4767, 1), Decl(lib.d.ts, 4853, 11)) +>Promise : Symbol(Promise, Decl(lib.d.ts, 4768, 1), Decl(lib.d.ts, 4854, 11)) >arg0 : Symbol(arg0, Decl(awaitCallExpression7_es6.ts, 4, 28)) >arg1 : Symbol(arg1, Decl(awaitCallExpression7_es6.ts, 4, 42)) >arg2 : Symbol(arg2, Decl(awaitCallExpression7_es6.ts, 4, 57)) declare var po: Promise<{ fn(arg0: boolean, arg1: boolean, arg2: boolean): void; }>; >po : Symbol(po, Decl(awaitCallExpression7_es6.ts, 5, 11)) ->Promise : Symbol(Promise, Decl(lib.d.ts, 4767, 1), Decl(lib.d.ts, 4853, 11)) +>Promise : Symbol(Promise, Decl(lib.d.ts, 4768, 1), Decl(lib.d.ts, 4854, 11)) >fn : Symbol(fn, Decl(awaitCallExpression7_es6.ts, 5, 25)) >arg0 : Symbol(arg0, Decl(awaitCallExpression7_es6.ts, 5, 29)) >arg1 : Symbol(arg1, Decl(awaitCallExpression7_es6.ts, 5, 43)) @@ -36,7 +36,7 @@ declare var po: Promise<{ fn(arg0: boolean, arg1: boolean, arg2: boolean): void; async function func(): Promise { >func : Symbol(func, Decl(awaitCallExpression7_es6.ts, 5, 84)) ->Promise : Symbol(Promise, Decl(lib.d.ts, 4767, 1), Decl(lib.d.ts, 4853, 11)) +>Promise : Symbol(Promise, Decl(lib.d.ts, 4768, 1), Decl(lib.d.ts, 4854, 11)) "before"; var b = o.fn(a, await p, a); diff --git a/tests/baselines/reference/awaitCallExpression8_es6.symbols b/tests/baselines/reference/awaitCallExpression8_es6.symbols index 888062d58d2dd..fda2b254b173c 100644 --- a/tests/baselines/reference/awaitCallExpression8_es6.symbols +++ b/tests/baselines/reference/awaitCallExpression8_es6.symbols @@ -4,7 +4,7 @@ declare var a: boolean; declare var p: Promise; >p : Symbol(p, Decl(awaitCallExpression8_es6.ts, 1, 11)) ->Promise : Symbol(Promise, Decl(lib.d.ts, 4767, 1), Decl(lib.d.ts, 4853, 11)) +>Promise : Symbol(Promise, Decl(lib.d.ts, 4768, 1), Decl(lib.d.ts, 4854, 11)) declare function fn(arg0: boolean, arg1: boolean, arg2: boolean): void; >fn : Symbol(fn, Decl(awaitCallExpression8_es6.ts, 1, 32)) @@ -21,14 +21,14 @@ declare var o: { fn(arg0: boolean, arg1: boolean, arg2: boolean): void; }; declare var pfn: Promise<{ (arg0: boolean, arg1: boolean, arg2: boolean): void; }>; >pfn : Symbol(pfn, Decl(awaitCallExpression8_es6.ts, 4, 11)) ->Promise : Symbol(Promise, Decl(lib.d.ts, 4767, 1), Decl(lib.d.ts, 4853, 11)) +>Promise : Symbol(Promise, Decl(lib.d.ts, 4768, 1), Decl(lib.d.ts, 4854, 11)) >arg0 : Symbol(arg0, Decl(awaitCallExpression8_es6.ts, 4, 28)) >arg1 : Symbol(arg1, Decl(awaitCallExpression8_es6.ts, 4, 42)) >arg2 : Symbol(arg2, Decl(awaitCallExpression8_es6.ts, 4, 57)) declare var po: Promise<{ fn(arg0: boolean, arg1: boolean, arg2: boolean): void; }>; >po : Symbol(po, Decl(awaitCallExpression8_es6.ts, 5, 11)) ->Promise : Symbol(Promise, Decl(lib.d.ts, 4767, 1), Decl(lib.d.ts, 4853, 11)) +>Promise : Symbol(Promise, Decl(lib.d.ts, 4768, 1), Decl(lib.d.ts, 4854, 11)) >fn : Symbol(fn, Decl(awaitCallExpression8_es6.ts, 5, 25)) >arg0 : Symbol(arg0, Decl(awaitCallExpression8_es6.ts, 5, 29)) >arg1 : Symbol(arg1, Decl(awaitCallExpression8_es6.ts, 5, 43)) @@ -36,7 +36,7 @@ declare var po: Promise<{ fn(arg0: boolean, arg1: boolean, arg2: boolean): void; async function func(): Promise { >func : Symbol(func, Decl(awaitCallExpression8_es6.ts, 5, 84)) ->Promise : Symbol(Promise, Decl(lib.d.ts, 4767, 1), Decl(lib.d.ts, 4853, 11)) +>Promise : Symbol(Promise, Decl(lib.d.ts, 4768, 1), Decl(lib.d.ts, 4854, 11)) "before"; var b = (await po).fn(a, a, a); diff --git a/tests/baselines/reference/callWithSpreadES6.symbols b/tests/baselines/reference/callWithSpreadES6.symbols index 9cb8319d41426..0e2368210200e 100644 --- a/tests/baselines/reference/callWithSpreadES6.symbols +++ b/tests/baselines/reference/callWithSpreadES6.symbols @@ -94,7 +94,7 @@ xa[1].foo(1, 2, ...a, "abc"); >a : Symbol(a, Decl(callWithSpreadES6.ts, 8, 3)) (xa[1].foo)(...[1, 2, "abc"]); ->Function : Symbol(Function, Decl(lib.d.ts, 223, 38), Decl(lib.d.ts, 269, 11), Decl(lib.d.ts, 1367, 1)) +>Function : Symbol(Function, Decl(lib.d.ts, 223, 38), Decl(lib.d.ts, 269, 11), Decl(lib.d.ts, 1368, 1)) >xa[1].foo : Symbol(X.foo, Decl(callWithSpreadES6.ts, 1, 13)) >xa : Symbol(xa, Decl(callWithSpreadES6.ts, 11, 3)) >foo : Symbol(X.foo, Decl(callWithSpreadES6.ts, 1, 13)) diff --git a/tests/baselines/reference/destructuringParameterDeclaration3ES5.symbols b/tests/baselines/reference/destructuringParameterDeclaration3ES5.symbols index 9f46ea81288ec..c232eb2463682 100644 --- a/tests/baselines/reference/destructuringParameterDeclaration3ES5.symbols +++ b/tests/baselines/reference/destructuringParameterDeclaration3ES5.symbols @@ -8,18 +8,18 @@ type arrayString = Array >arrayString : Symbol(arrayString, Decl(destructuringParameterDeclaration3ES5.ts, 0, 0)) ->Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11), Decl(lib.d.ts, 1451, 1)) ->String : Symbol(String, Decl(lib.d.ts, 275, 1), Decl(lib.d.ts, 443, 11), Decl(lib.d.ts, 1555, 1)) +>Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11), Decl(lib.d.ts, 1452, 1)) +>String : Symbol(String, Decl(lib.d.ts, 275, 1), Decl(lib.d.ts, 443, 11), Decl(lib.d.ts, 1556, 1)) type someArray = Array | number[]; >someArray : Symbol(someArray, Decl(destructuringParameterDeclaration3ES5.ts, 7, 32)) ->Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11), Decl(lib.d.ts, 1451, 1)) ->String : Symbol(String, Decl(lib.d.ts, 275, 1), Decl(lib.d.ts, 443, 11), Decl(lib.d.ts, 1555, 1)) +>Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11), Decl(lib.d.ts, 1452, 1)) +>String : Symbol(String, Decl(lib.d.ts, 275, 1), Decl(lib.d.ts, 443, 11), Decl(lib.d.ts, 1556, 1)) type stringOrNumArray = Array; >stringOrNumArray : Symbol(stringOrNumArray, Decl(destructuringParameterDeclaration3ES5.ts, 8, 42)) ->Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11), Decl(lib.d.ts, 1451, 1)) ->String : Symbol(String, Decl(lib.d.ts, 275, 1), Decl(lib.d.ts, 443, 11), Decl(lib.d.ts, 1555, 1)) +>Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11), Decl(lib.d.ts, 1452, 1)) +>String : Symbol(String, Decl(lib.d.ts, 275, 1), Decl(lib.d.ts, 443, 11), Decl(lib.d.ts, 1556, 1)) >Number : Symbol(Number, Decl(lib.d.ts, 456, 40), Decl(lib.d.ts, 518, 11)) function a1(...x: (number|string)[]) { } @@ -33,8 +33,8 @@ function a2(...a) { } function a3(...a: Array) { } >a3 : Symbol(a3, Decl(destructuringParameterDeclaration3ES5.ts, 12, 21)) >a : Symbol(a, Decl(destructuringParameterDeclaration3ES5.ts, 13, 12)) ->Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11), Decl(lib.d.ts, 1451, 1)) ->String : Symbol(String, Decl(lib.d.ts, 275, 1), Decl(lib.d.ts, 443, 11), Decl(lib.d.ts, 1555, 1)) +>Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11), Decl(lib.d.ts, 1452, 1)) +>String : Symbol(String, Decl(lib.d.ts, 275, 1), Decl(lib.d.ts, 443, 11), Decl(lib.d.ts, 1556, 1)) function a4(...a: arrayString) { } >a4 : Symbol(a4, Decl(destructuringParameterDeclaration3ES5.ts, 13, 36)) diff --git a/tests/baselines/reference/destructuringParameterDeclaration3ES6.symbols b/tests/baselines/reference/destructuringParameterDeclaration3ES6.symbols index f5f6f0cc6fd45..89f62f9718593 100644 --- a/tests/baselines/reference/destructuringParameterDeclaration3ES6.symbols +++ b/tests/baselines/reference/destructuringParameterDeclaration3ES6.symbols @@ -8,18 +8,18 @@ type arrayString = Array >arrayString : Symbol(arrayString, Decl(destructuringParameterDeclaration3ES6.ts, 0, 0)) ->Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11), Decl(lib.d.ts, 1451, 1)) ->String : Symbol(String, Decl(lib.d.ts, 275, 1), Decl(lib.d.ts, 443, 11), Decl(lib.d.ts, 1555, 1)) +>Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11), Decl(lib.d.ts, 1452, 1)) +>String : Symbol(String, Decl(lib.d.ts, 275, 1), Decl(lib.d.ts, 443, 11), Decl(lib.d.ts, 1556, 1)) type someArray = Array | number[]; >someArray : Symbol(someArray, Decl(destructuringParameterDeclaration3ES6.ts, 7, 32)) ->Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11), Decl(lib.d.ts, 1451, 1)) ->String : Symbol(String, Decl(lib.d.ts, 275, 1), Decl(lib.d.ts, 443, 11), Decl(lib.d.ts, 1555, 1)) +>Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11), Decl(lib.d.ts, 1452, 1)) +>String : Symbol(String, Decl(lib.d.ts, 275, 1), Decl(lib.d.ts, 443, 11), Decl(lib.d.ts, 1556, 1)) type stringOrNumArray = Array; >stringOrNumArray : Symbol(stringOrNumArray, Decl(destructuringParameterDeclaration3ES6.ts, 8, 42)) ->Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11), Decl(lib.d.ts, 1451, 1)) ->String : Symbol(String, Decl(lib.d.ts, 275, 1), Decl(lib.d.ts, 443, 11), Decl(lib.d.ts, 1555, 1)) +>Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11), Decl(lib.d.ts, 1452, 1)) +>String : Symbol(String, Decl(lib.d.ts, 275, 1), Decl(lib.d.ts, 443, 11), Decl(lib.d.ts, 1556, 1)) >Number : Symbol(Number, Decl(lib.d.ts, 456, 40), Decl(lib.d.ts, 518, 11)) function a1(...x: (number|string)[]) { } @@ -33,8 +33,8 @@ function a2(...a) { } function a3(...a: Array) { } >a3 : Symbol(a3, Decl(destructuringParameterDeclaration3ES6.ts, 12, 21)) >a : Symbol(a, Decl(destructuringParameterDeclaration3ES6.ts, 13, 12)) ->Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11), Decl(lib.d.ts, 1451, 1)) ->String : Symbol(String, Decl(lib.d.ts, 275, 1), Decl(lib.d.ts, 443, 11), Decl(lib.d.ts, 1555, 1)) +>Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11), Decl(lib.d.ts, 1452, 1)) +>String : Symbol(String, Decl(lib.d.ts, 275, 1), Decl(lib.d.ts, 443, 11), Decl(lib.d.ts, 1556, 1)) function a4(...a: arrayString) { } >a4 : Symbol(a4, Decl(destructuringParameterDeclaration3ES6.ts, 13, 36)) diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments14_ES6.symbols b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments14_ES6.symbols index 98cb744f549d3..ad1482e7f1afd 100644 --- a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments14_ES6.symbols +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments14_ES6.symbols @@ -5,7 +5,7 @@ function f() { if (Math.random()) { >Math.random : Symbol(Math.random, Decl(lib.d.ts, 608, 38)) ->Math : Symbol(Math, Decl(lib.d.ts, 522, 1), Decl(lib.d.ts, 633, 11), Decl(lib.d.ts, 1703, 60)) +>Math : Symbol(Math, Decl(lib.d.ts, 522, 1), Decl(lib.d.ts, 633, 11), Decl(lib.d.ts, 1704, 60)) >random : Symbol(Math.random, Decl(lib.d.ts, 608, 38)) let arguments = 100; diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments15_ES6.symbols b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments15_ES6.symbols index 84dbbf9fca40d..42db5aeaa859f 100644 --- a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments15_ES6.symbols +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments15_ES6.symbols @@ -8,7 +8,7 @@ function f() { if (Math.random()) { >Math.random : Symbol(Math.random, Decl(lib.d.ts, 608, 38)) ->Math : Symbol(Math, Decl(lib.d.ts, 522, 1), Decl(lib.d.ts, 633, 11), Decl(lib.d.ts, 1703, 60)) +>Math : Symbol(Math, Decl(lib.d.ts, 522, 1), Decl(lib.d.ts, 633, 11), Decl(lib.d.ts, 1704, 60)) >random : Symbol(Math.random, Decl(lib.d.ts, 608, 38)) const arguments = 100; diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments16_ES6.symbols b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments16_ES6.symbols index d1b92562299f0..453e04d752136 100644 --- a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments16_ES6.symbols +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments16_ES6.symbols @@ -8,7 +8,7 @@ function f() { if (Math.random()) { >Math.random : Symbol(Math.random, Decl(lib.d.ts, 608, 38)) ->Math : Symbol(Math, Decl(lib.d.ts, 522, 1), Decl(lib.d.ts, 633, 11), Decl(lib.d.ts, 1703, 60)) +>Math : Symbol(Math, Decl(lib.d.ts, 522, 1), Decl(lib.d.ts, 633, 11), Decl(lib.d.ts, 1704, 60)) >random : Symbol(Math.random, Decl(lib.d.ts, 608, 38)) return () => arguments[0]; diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments17_ES6.symbols b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments17_ES6.symbols index 96973f9dbf4cb..b686dd1959243 100644 --- a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments17_ES6.symbols +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments17_ES6.symbols @@ -9,7 +9,7 @@ function f() { if (Math.random()) { >Math.random : Symbol(Math.random, Decl(lib.d.ts, 608, 38)) ->Math : Symbol(Math, Decl(lib.d.ts, 522, 1), Decl(lib.d.ts, 633, 11), Decl(lib.d.ts, 1703, 60)) +>Math : Symbol(Math, Decl(lib.d.ts, 522, 1), Decl(lib.d.ts, 633, 11), Decl(lib.d.ts, 1704, 60)) >random : Symbol(Math.random, Decl(lib.d.ts, 608, 38)) return () => arguments[0]; diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments18_ES6.symbols b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments18_ES6.symbols index 0b4e4b37fec0d..4ac60f9b429d5 100644 --- a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments18_ES6.symbols +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments18_ES6.symbols @@ -9,7 +9,7 @@ function f() { if (Math.random()) { >Math.random : Symbol(Math.random, Decl(lib.d.ts, 608, 38)) ->Math : Symbol(Math, Decl(lib.d.ts, 522, 1), Decl(lib.d.ts, 633, 11), Decl(lib.d.ts, 1703, 60)) +>Math : Symbol(Math, Decl(lib.d.ts, 522, 1), Decl(lib.d.ts, 633, 11), Decl(lib.d.ts, 1704, 60)) >random : Symbol(Math.random, Decl(lib.d.ts, 608, 38)) return () => arguments; diff --git a/tests/baselines/reference/for-of13.symbols b/tests/baselines/reference/for-of13.symbols index bc4595f73cf00..08e5f4ff4683e 100644 --- a/tests/baselines/reference/for-of13.symbols +++ b/tests/baselines/reference/for-of13.symbols @@ -4,6 +4,6 @@ var v: string; for (v of [""].values()) { } >v : Symbol(v, Decl(for-of13.ts, 0, 3)) ->[""].values : Symbol(Array.values, Decl(lib.d.ts, 1465, 37)) ->values : Symbol(Array.values, Decl(lib.d.ts, 1465, 37)) +>[""].values : Symbol(Array.values, Decl(lib.d.ts, 1466, 37)) +>values : Symbol(Array.values, Decl(lib.d.ts, 1466, 37)) diff --git a/tests/baselines/reference/for-of18.symbols b/tests/baselines/reference/for-of18.symbols index f5688d73566c7..066d9534051ef 100644 --- a/tests/baselines/reference/for-of18.symbols +++ b/tests/baselines/reference/for-of18.symbols @@ -22,9 +22,9 @@ class StringIterator { }; } [Symbol.iterator]() { ->Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1248, 31)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1198, 53), Decl(lib.d.ts, 1304, 11)) ->iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1248, 31)) +>Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1249, 31)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1199, 52), Decl(lib.d.ts, 1305, 11)) +>iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1249, 31)) return this; >this : Symbol(StringIterator, Decl(for-of18.ts, 1, 33)) diff --git a/tests/baselines/reference/for-of19.symbols b/tests/baselines/reference/for-of19.symbols index 182d45a3369bb..8c34f6f0d7a4e 100644 --- a/tests/baselines/reference/for-of19.symbols +++ b/tests/baselines/reference/for-of19.symbols @@ -27,9 +27,9 @@ class FooIterator { }; } [Symbol.iterator]() { ->Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1248, 31)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1198, 53), Decl(lib.d.ts, 1304, 11)) ->iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1248, 31)) +>Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1249, 31)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1199, 52), Decl(lib.d.ts, 1305, 11)) +>iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1249, 31)) return this; >this : Symbol(FooIterator, Decl(for-of19.ts, 4, 13)) diff --git a/tests/baselines/reference/for-of20.symbols b/tests/baselines/reference/for-of20.symbols index 4697f3283a629..4e7aaf7e362bf 100644 --- a/tests/baselines/reference/for-of20.symbols +++ b/tests/baselines/reference/for-of20.symbols @@ -27,9 +27,9 @@ class FooIterator { }; } [Symbol.iterator]() { ->Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1248, 31)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1198, 53), Decl(lib.d.ts, 1304, 11)) ->iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1248, 31)) +>Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1249, 31)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1199, 52), Decl(lib.d.ts, 1305, 11)) +>iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1249, 31)) return this; >this : Symbol(FooIterator, Decl(for-of20.ts, 4, 13)) diff --git a/tests/baselines/reference/for-of21.symbols b/tests/baselines/reference/for-of21.symbols index fcaf9b069dc04..70c1132afbd6d 100644 --- a/tests/baselines/reference/for-of21.symbols +++ b/tests/baselines/reference/for-of21.symbols @@ -27,9 +27,9 @@ class FooIterator { }; } [Symbol.iterator]() { ->Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1248, 31)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1198, 53), Decl(lib.d.ts, 1304, 11)) ->iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1248, 31)) +>Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1249, 31)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1199, 52), Decl(lib.d.ts, 1305, 11)) +>iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1249, 31)) return this; >this : Symbol(FooIterator, Decl(for-of21.ts, 4, 13)) diff --git a/tests/baselines/reference/for-of22.symbols b/tests/baselines/reference/for-of22.symbols index f72094cdf4f5f..4650725593796 100644 --- a/tests/baselines/reference/for-of22.symbols +++ b/tests/baselines/reference/for-of22.symbols @@ -28,9 +28,9 @@ class FooIterator { }; } [Symbol.iterator]() { ->Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1248, 31)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1198, 53), Decl(lib.d.ts, 1304, 11)) ->iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1248, 31)) +>Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1249, 31)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1199, 52), Decl(lib.d.ts, 1305, 11)) +>iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1249, 31)) return this; >this : Symbol(FooIterator, Decl(for-of22.ts, 5, 13)) diff --git a/tests/baselines/reference/for-of23.symbols b/tests/baselines/reference/for-of23.symbols index 205a57d2c0781..8401de024d976 100644 --- a/tests/baselines/reference/for-of23.symbols +++ b/tests/baselines/reference/for-of23.symbols @@ -27,9 +27,9 @@ class FooIterator { }; } [Symbol.iterator]() { ->Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1248, 31)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1198, 53), Decl(lib.d.ts, 1304, 11)) ->iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1248, 31)) +>Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1249, 31)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1199, 52), Decl(lib.d.ts, 1305, 11)) +>iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1249, 31)) return this; >this : Symbol(FooIterator, Decl(for-of23.ts, 4, 13)) diff --git a/tests/baselines/reference/for-of25.symbols b/tests/baselines/reference/for-of25.symbols index 6ff68dea5d45c..93e918c4bcdbd 100644 --- a/tests/baselines/reference/for-of25.symbols +++ b/tests/baselines/reference/for-of25.symbols @@ -10,9 +10,9 @@ class StringIterator { >StringIterator : Symbol(StringIterator, Decl(for-of25.ts, 1, 37)) [Symbol.iterator]() { ->Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1248, 31)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1198, 53), Decl(lib.d.ts, 1304, 11)) ->iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1248, 31)) +>Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1249, 31)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1199, 52), Decl(lib.d.ts, 1305, 11)) +>iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1249, 31)) return x; >x : Symbol(x, Decl(for-of25.ts, 0, 3)) diff --git a/tests/baselines/reference/for-of26.symbols b/tests/baselines/reference/for-of26.symbols index 19e917e7190be..04445f50171ab 100644 --- a/tests/baselines/reference/for-of26.symbols +++ b/tests/baselines/reference/for-of26.symbols @@ -16,9 +16,9 @@ class StringIterator { >x : Symbol(x, Decl(for-of26.ts, 0, 3)) } [Symbol.iterator]() { ->Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1248, 31)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1198, 53), Decl(lib.d.ts, 1304, 11)) ->iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1248, 31)) +>Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1249, 31)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1199, 52), Decl(lib.d.ts, 1305, 11)) +>iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1249, 31)) return this; >this : Symbol(StringIterator, Decl(for-of26.ts, 1, 37)) diff --git a/tests/baselines/reference/for-of27.symbols b/tests/baselines/reference/for-of27.symbols index edf8ab0a84c81..4c645d359dd55 100644 --- a/tests/baselines/reference/for-of27.symbols +++ b/tests/baselines/reference/for-of27.symbols @@ -7,7 +7,7 @@ class StringIterator { >StringIterator : Symbol(StringIterator, Decl(for-of27.ts, 0, 37)) [Symbol.iterator]: any; ->Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1248, 31)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1198, 53), Decl(lib.d.ts, 1304, 11)) ->iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1248, 31)) +>Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1249, 31)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1199, 52), Decl(lib.d.ts, 1305, 11)) +>iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1249, 31)) } diff --git a/tests/baselines/reference/for-of28.symbols b/tests/baselines/reference/for-of28.symbols index d569ffae2f6dc..6887b46a44de7 100644 --- a/tests/baselines/reference/for-of28.symbols +++ b/tests/baselines/reference/for-of28.symbols @@ -10,9 +10,9 @@ class StringIterator { >next : Symbol(next, Decl(for-of28.ts, 2, 22)) [Symbol.iterator]() { ->Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1248, 31)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1198, 53), Decl(lib.d.ts, 1304, 11)) ->iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1248, 31)) +>Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1249, 31)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1199, 52), Decl(lib.d.ts, 1305, 11)) +>iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1249, 31)) return this; >this : Symbol(StringIterator, Decl(for-of28.ts, 0, 37)) diff --git a/tests/baselines/reference/for-of37.symbols b/tests/baselines/reference/for-of37.symbols index e4f958d5ac96f..09d3b036829d5 100644 --- a/tests/baselines/reference/for-of37.symbols +++ b/tests/baselines/reference/for-of37.symbols @@ -1,7 +1,7 @@ === tests/cases/conformance/es6/for-ofStatements/for-of37.ts === var map = new Map([["", true]]); >map : Symbol(map, Decl(for-of37.ts, 0, 3)) ->Map : Symbol(Map, Decl(lib.d.ts, 1876, 1), Decl(lib.d.ts, 1898, 11)) +>Map : Symbol(Map, Decl(lib.d.ts, 1877, 1), Decl(lib.d.ts, 1899, 11)) for (var v of map) { >v : Symbol(v, Decl(for-of37.ts, 1, 8)) diff --git a/tests/baselines/reference/for-of38.symbols b/tests/baselines/reference/for-of38.symbols index e8205819ba1f1..d4958740698b1 100644 --- a/tests/baselines/reference/for-of38.symbols +++ b/tests/baselines/reference/for-of38.symbols @@ -1,7 +1,7 @@ === tests/cases/conformance/es6/for-ofStatements/for-of38.ts === var map = new Map([["", true]]); >map : Symbol(map, Decl(for-of38.ts, 0, 3)) ->Map : Symbol(Map, Decl(lib.d.ts, 1876, 1), Decl(lib.d.ts, 1898, 11)) +>Map : Symbol(Map, Decl(lib.d.ts, 1877, 1), Decl(lib.d.ts, 1899, 11)) for (var [k, v] of map) { >k : Symbol(k, Decl(for-of38.ts, 1, 10)) diff --git a/tests/baselines/reference/for-of40.symbols b/tests/baselines/reference/for-of40.symbols index 3e54e9651a752..3ab1825211460 100644 --- a/tests/baselines/reference/for-of40.symbols +++ b/tests/baselines/reference/for-of40.symbols @@ -1,7 +1,7 @@ === tests/cases/conformance/es6/for-ofStatements/for-of40.ts === var map = new Map([["", true]]); >map : Symbol(map, Decl(for-of40.ts, 0, 3)) ->Map : Symbol(Map, Decl(lib.d.ts, 1876, 1), Decl(lib.d.ts, 1898, 11)) +>Map : Symbol(Map, Decl(lib.d.ts, 1877, 1), Decl(lib.d.ts, 1899, 11)) for (var [k = "", v = false] of map) { >k : Symbol(k, Decl(for-of40.ts, 1, 10)) diff --git a/tests/baselines/reference/for-of44.symbols b/tests/baselines/reference/for-of44.symbols index 2c4ebb582f9f2..a9ea283d6736b 100644 --- a/tests/baselines/reference/for-of44.symbols +++ b/tests/baselines/reference/for-of44.symbols @@ -1,7 +1,7 @@ === tests/cases/conformance/es6/for-ofStatements/for-of44.ts === var array: [number, string | boolean | symbol][] = [[0, ""], [0, true], [1, Symbol()]] >array : Symbol(array, Decl(for-of44.ts, 0, 3)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1198, 53), Decl(lib.d.ts, 1304, 11)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1199, 52), Decl(lib.d.ts, 1305, 11)) for (var [num, strBoolSym] of array) { >num : Symbol(num, Decl(for-of44.ts, 1, 10)) diff --git a/tests/baselines/reference/for-of45.symbols b/tests/baselines/reference/for-of45.symbols index 96180033a3709..3f746c0520640 100644 --- a/tests/baselines/reference/for-of45.symbols +++ b/tests/baselines/reference/for-of45.symbols @@ -5,7 +5,7 @@ var k: string, v: boolean; var map = new Map([["", true]]); >map : Symbol(map, Decl(for-of45.ts, 1, 3)) ->Map : Symbol(Map, Decl(lib.d.ts, 1876, 1), Decl(lib.d.ts, 1898, 11)) +>Map : Symbol(Map, Decl(lib.d.ts, 1877, 1), Decl(lib.d.ts, 1899, 11)) for ([k = "", v = false] of map) { >k : Symbol(k, Decl(for-of45.ts, 0, 3)) diff --git a/tests/baselines/reference/for-of50.symbols b/tests/baselines/reference/for-of50.symbols index a80a91b4fb6a1..e96abcae76e37 100644 --- a/tests/baselines/reference/for-of50.symbols +++ b/tests/baselines/reference/for-of50.symbols @@ -1,7 +1,7 @@ === tests/cases/conformance/es6/for-ofStatements/for-of50.ts === var map = new Map([["", true]]); >map : Symbol(map, Decl(for-of50.ts, 0, 3)) ->Map : Symbol(Map, Decl(lib.d.ts, 1876, 1), Decl(lib.d.ts, 1898, 11)) +>Map : Symbol(Map, Decl(lib.d.ts, 1877, 1), Decl(lib.d.ts, 1899, 11)) for (const [k, v] of map) { >k : Symbol(k, Decl(for-of50.ts, 1, 12)) diff --git a/tests/baselines/reference/for-of57.symbols b/tests/baselines/reference/for-of57.symbols index da7d83844f831..b8d01d3bd1b06 100644 --- a/tests/baselines/reference/for-of57.symbols +++ b/tests/baselines/reference/for-of57.symbols @@ -1,7 +1,7 @@ === tests/cases/conformance/es6/for-ofStatements/for-of57.ts === var iter: Iterable; >iter : Symbol(iter, Decl(for-of57.ts, 0, 3)) ->Iterable : Symbol(Iterable, Decl(lib.d.ts, 1680, 1)) +>Iterable : Symbol(Iterable, Decl(lib.d.ts, 1681, 1)) for (let num of iter) { } >num : Symbol(num, Decl(for-of57.ts, 1, 8)) diff --git a/tests/baselines/reference/generatorES6_6.symbols b/tests/baselines/reference/generatorES6_6.symbols index 1a9c76911ef7f..7f30b4f67973a 100644 --- a/tests/baselines/reference/generatorES6_6.symbols +++ b/tests/baselines/reference/generatorES6_6.symbols @@ -3,9 +3,9 @@ class C { >C : Symbol(C, Decl(generatorES6_6.ts, 0, 0)) *[Symbol.iterator]() { ->Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1248, 31)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1198, 53), Decl(lib.d.ts, 1304, 11)) ->iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1248, 31)) +>Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1249, 31)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1199, 52), Decl(lib.d.ts, 1305, 11)) +>iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1249, 31)) let a = yield 1; >a : Symbol(a, Decl(generatorES6_6.ts, 2, 7)) diff --git a/tests/baselines/reference/generatorOverloads4.symbols b/tests/baselines/reference/generatorOverloads4.symbols index 7327e0f22ce44..c4fb9401517ab 100644 --- a/tests/baselines/reference/generatorOverloads4.symbols +++ b/tests/baselines/reference/generatorOverloads4.symbols @@ -5,15 +5,15 @@ class C { f(s: string): Iterable; >f : Symbol(f, Decl(generatorOverloads4.ts, 0, 9), Decl(generatorOverloads4.ts, 1, 32), Decl(generatorOverloads4.ts, 2, 32)) >s : Symbol(s, Decl(generatorOverloads4.ts, 1, 6)) ->Iterable : Symbol(Iterable, Decl(lib.d.ts, 1680, 1)) +>Iterable : Symbol(Iterable, Decl(lib.d.ts, 1681, 1)) f(s: number): Iterable; >f : Symbol(f, Decl(generatorOverloads4.ts, 0, 9), Decl(generatorOverloads4.ts, 1, 32), Decl(generatorOverloads4.ts, 2, 32)) >s : Symbol(s, Decl(generatorOverloads4.ts, 2, 6)) ->Iterable : Symbol(Iterable, Decl(lib.d.ts, 1680, 1)) +>Iterable : Symbol(Iterable, Decl(lib.d.ts, 1681, 1)) *f(s: any): Iterable { } >f : Symbol(f, Decl(generatorOverloads4.ts, 0, 9), Decl(generatorOverloads4.ts, 1, 32), Decl(generatorOverloads4.ts, 2, 32)) >s : Symbol(s, Decl(generatorOverloads4.ts, 3, 7)) ->Iterable : Symbol(Iterable, Decl(lib.d.ts, 1680, 1)) +>Iterable : Symbol(Iterable, Decl(lib.d.ts, 1681, 1)) } diff --git a/tests/baselines/reference/generatorOverloads5.symbols b/tests/baselines/reference/generatorOverloads5.symbols index a0cb5ed3610de..509ed22d1976c 100644 --- a/tests/baselines/reference/generatorOverloads5.symbols +++ b/tests/baselines/reference/generatorOverloads5.symbols @@ -5,15 +5,15 @@ module M { function f(s: string): Iterable; >f : Symbol(f, Decl(generatorOverloads5.ts, 0, 10), Decl(generatorOverloads5.ts, 1, 41), Decl(generatorOverloads5.ts, 2, 41)) >s : Symbol(s, Decl(generatorOverloads5.ts, 1, 15)) ->Iterable : Symbol(Iterable, Decl(lib.d.ts, 1680, 1)) +>Iterable : Symbol(Iterable, Decl(lib.d.ts, 1681, 1)) function f(s: number): Iterable; >f : Symbol(f, Decl(generatorOverloads5.ts, 0, 10), Decl(generatorOverloads5.ts, 1, 41), Decl(generatorOverloads5.ts, 2, 41)) >s : Symbol(s, Decl(generatorOverloads5.ts, 2, 15)) ->Iterable : Symbol(Iterable, Decl(lib.d.ts, 1680, 1)) +>Iterable : Symbol(Iterable, Decl(lib.d.ts, 1681, 1)) function* f(s: any): Iterable { } >f : Symbol(f, Decl(generatorOverloads5.ts, 0, 10), Decl(generatorOverloads5.ts, 1, 41), Decl(generatorOverloads5.ts, 2, 41)) >s : Symbol(s, Decl(generatorOverloads5.ts, 3, 16)) ->Iterable : Symbol(Iterable, Decl(lib.d.ts, 1680, 1)) +>Iterable : Symbol(Iterable, Decl(lib.d.ts, 1681, 1)) } diff --git a/tests/baselines/reference/generatorTypeCheck1.symbols b/tests/baselines/reference/generatorTypeCheck1.symbols index 775148b80e1a6..79cc3e275ad61 100644 --- a/tests/baselines/reference/generatorTypeCheck1.symbols +++ b/tests/baselines/reference/generatorTypeCheck1.symbols @@ -1,5 +1,5 @@ === tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck1.ts === function* g1(): Iterator { } >g1 : Symbol(g1, Decl(generatorTypeCheck1.ts, 0, 0)) ->Iterator : Symbol(Iterator, Decl(lib.d.ts, 1674, 1)) +>Iterator : Symbol(Iterator, Decl(lib.d.ts, 1675, 1)) diff --git a/tests/baselines/reference/generatorTypeCheck10.symbols b/tests/baselines/reference/generatorTypeCheck10.symbols index bd652fdae9267..6247bd7b85ca4 100644 --- a/tests/baselines/reference/generatorTypeCheck10.symbols +++ b/tests/baselines/reference/generatorTypeCheck10.symbols @@ -1,7 +1,7 @@ === tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck10.ts === function* g(): IterableIterator { >g : Symbol(g, Decl(generatorTypeCheck10.ts, 0, 0)) ->IterableIterator : Symbol(IterableIterator, Decl(lib.d.ts, 1684, 1)) +>IterableIterator : Symbol(IterableIterator, Decl(lib.d.ts, 1685, 1)) return; } diff --git a/tests/baselines/reference/generatorTypeCheck11.symbols b/tests/baselines/reference/generatorTypeCheck11.symbols index 2ede04e04cebb..dce2524d1ba3f 100644 --- a/tests/baselines/reference/generatorTypeCheck11.symbols +++ b/tests/baselines/reference/generatorTypeCheck11.symbols @@ -1,7 +1,7 @@ === tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck11.ts === function* g(): IterableIterator { >g : Symbol(g, Decl(generatorTypeCheck11.ts, 0, 0)) ->IterableIterator : Symbol(IterableIterator, Decl(lib.d.ts, 1684, 1)) +>IterableIterator : Symbol(IterableIterator, Decl(lib.d.ts, 1685, 1)) return 0; } diff --git a/tests/baselines/reference/generatorTypeCheck12.symbols b/tests/baselines/reference/generatorTypeCheck12.symbols index 49309243b64f3..f9c9b7b6e22a7 100644 --- a/tests/baselines/reference/generatorTypeCheck12.symbols +++ b/tests/baselines/reference/generatorTypeCheck12.symbols @@ -1,7 +1,7 @@ === tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck12.ts === function* g(): IterableIterator { >g : Symbol(g, Decl(generatorTypeCheck12.ts, 0, 0)) ->IterableIterator : Symbol(IterableIterator, Decl(lib.d.ts, 1684, 1)) +>IterableIterator : Symbol(IterableIterator, Decl(lib.d.ts, 1685, 1)) return ""; } diff --git a/tests/baselines/reference/generatorTypeCheck13.symbols b/tests/baselines/reference/generatorTypeCheck13.symbols index 13f633d527e93..bc43ea8c8f909 100644 --- a/tests/baselines/reference/generatorTypeCheck13.symbols +++ b/tests/baselines/reference/generatorTypeCheck13.symbols @@ -1,7 +1,7 @@ === tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck13.ts === function* g(): IterableIterator { >g : Symbol(g, Decl(generatorTypeCheck13.ts, 0, 0)) ->IterableIterator : Symbol(IterableIterator, Decl(lib.d.ts, 1684, 1)) +>IterableIterator : Symbol(IterableIterator, Decl(lib.d.ts, 1685, 1)) yield 0; return ""; diff --git a/tests/baselines/reference/generatorTypeCheck17.symbols b/tests/baselines/reference/generatorTypeCheck17.symbols index ce5f683d238bf..789eb22347cfc 100644 --- a/tests/baselines/reference/generatorTypeCheck17.symbols +++ b/tests/baselines/reference/generatorTypeCheck17.symbols @@ -10,7 +10,7 @@ class Bar extends Foo { y: string } function* g(): IterableIterator { >g : Symbol(g, Decl(generatorTypeCheck17.ts, 1, 35)) ->IterableIterator : Symbol(IterableIterator, Decl(lib.d.ts, 1684, 1)) +>IterableIterator : Symbol(IterableIterator, Decl(lib.d.ts, 1685, 1)) >Foo : Symbol(Foo, Decl(generatorTypeCheck17.ts, 0, 0)) yield; diff --git a/tests/baselines/reference/generatorTypeCheck19.symbols b/tests/baselines/reference/generatorTypeCheck19.symbols index 0b4d61fb29224..e7a5898099f29 100644 --- a/tests/baselines/reference/generatorTypeCheck19.symbols +++ b/tests/baselines/reference/generatorTypeCheck19.symbols @@ -10,7 +10,7 @@ class Bar extends Foo { y: string } function* g(): IterableIterator { >g : Symbol(g, Decl(generatorTypeCheck19.ts, 1, 35)) ->IterableIterator : Symbol(IterableIterator, Decl(lib.d.ts, 1684, 1)) +>IterableIterator : Symbol(IterableIterator, Decl(lib.d.ts, 1685, 1)) >Foo : Symbol(Foo, Decl(generatorTypeCheck19.ts, 0, 0)) yield; diff --git a/tests/baselines/reference/generatorTypeCheck2.symbols b/tests/baselines/reference/generatorTypeCheck2.symbols index 009568c15a7db..5a0aec4d59224 100644 --- a/tests/baselines/reference/generatorTypeCheck2.symbols +++ b/tests/baselines/reference/generatorTypeCheck2.symbols @@ -1,5 +1,5 @@ === tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck2.ts === function* g1(): Iterable { } >g1 : Symbol(g1, Decl(generatorTypeCheck2.ts, 0, 0)) ->Iterable : Symbol(Iterable, Decl(lib.d.ts, 1680, 1)) +>Iterable : Symbol(Iterable, Decl(lib.d.ts, 1681, 1)) diff --git a/tests/baselines/reference/generatorTypeCheck26.symbols b/tests/baselines/reference/generatorTypeCheck26.symbols index 6feb9b6fabdde..08cc7289ef872 100644 --- a/tests/baselines/reference/generatorTypeCheck26.symbols +++ b/tests/baselines/reference/generatorTypeCheck26.symbols @@ -1,7 +1,7 @@ === tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck26.ts === function* g(): IterableIterator<(x: string) => number> { >g : Symbol(g, Decl(generatorTypeCheck26.ts, 0, 0)) ->IterableIterator : Symbol(IterableIterator, Decl(lib.d.ts, 1684, 1)) +>IterableIterator : Symbol(IterableIterator, Decl(lib.d.ts, 1685, 1)) >x : Symbol(x, Decl(generatorTypeCheck26.ts, 0, 33)) yield x => x.length; diff --git a/tests/baselines/reference/generatorTypeCheck27.symbols b/tests/baselines/reference/generatorTypeCheck27.symbols index 01cd720ca77ca..fcee922d1e909 100644 --- a/tests/baselines/reference/generatorTypeCheck27.symbols +++ b/tests/baselines/reference/generatorTypeCheck27.symbols @@ -1,7 +1,7 @@ === tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck27.ts === function* g(): IterableIterator<(x: string) => number> { >g : Symbol(g, Decl(generatorTypeCheck27.ts, 0, 0)) ->IterableIterator : Symbol(IterableIterator, Decl(lib.d.ts, 1684, 1)) +>IterableIterator : Symbol(IterableIterator, Decl(lib.d.ts, 1685, 1)) >x : Symbol(x, Decl(generatorTypeCheck27.ts, 0, 33)) yield * function* () { diff --git a/tests/baselines/reference/generatorTypeCheck28.symbols b/tests/baselines/reference/generatorTypeCheck28.symbols index 11ddf19bf40be..27b246515f603 100644 --- a/tests/baselines/reference/generatorTypeCheck28.symbols +++ b/tests/baselines/reference/generatorTypeCheck28.symbols @@ -1,14 +1,14 @@ === tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck28.ts === function* g(): IterableIterator<(x: string) => number> { >g : Symbol(g, Decl(generatorTypeCheck28.ts, 0, 0)) ->IterableIterator : Symbol(IterableIterator, Decl(lib.d.ts, 1684, 1)) +>IterableIterator : Symbol(IterableIterator, Decl(lib.d.ts, 1685, 1)) >x : Symbol(x, Decl(generatorTypeCheck28.ts, 0, 33)) yield * { *[Symbol.iterator]() { ->Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1248, 31)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1198, 53), Decl(lib.d.ts, 1304, 11)) ->iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1248, 31)) +>Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1249, 31)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1199, 52), Decl(lib.d.ts, 1305, 11)) +>iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1249, 31)) yield x => x.length; >x : Symbol(x, Decl(generatorTypeCheck28.ts, 3, 17)) diff --git a/tests/baselines/reference/generatorTypeCheck29.symbols b/tests/baselines/reference/generatorTypeCheck29.symbols index 72e4d2dc7490c..260137dd1cf3a 100644 --- a/tests/baselines/reference/generatorTypeCheck29.symbols +++ b/tests/baselines/reference/generatorTypeCheck29.symbols @@ -1,8 +1,8 @@ === tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck29.ts === function* g2(): Iterator number>> { >g2 : Symbol(g2, Decl(generatorTypeCheck29.ts, 0, 0)) ->Iterator : Symbol(Iterator, Decl(lib.d.ts, 1674, 1)) ->Iterable : Symbol(Iterable, Decl(lib.d.ts, 1680, 1)) +>Iterator : Symbol(Iterator, Decl(lib.d.ts, 1675, 1)) +>Iterable : Symbol(Iterable, Decl(lib.d.ts, 1681, 1)) >x : Symbol(x, Decl(generatorTypeCheck29.ts, 0, 35)) yield function* () { diff --git a/tests/baselines/reference/generatorTypeCheck3.symbols b/tests/baselines/reference/generatorTypeCheck3.symbols index f39c8675d989e..a149a592e3d3c 100644 --- a/tests/baselines/reference/generatorTypeCheck3.symbols +++ b/tests/baselines/reference/generatorTypeCheck3.symbols @@ -1,5 +1,5 @@ === tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck3.ts === function* g1(): IterableIterator { } >g1 : Symbol(g1, Decl(generatorTypeCheck3.ts, 0, 0)) ->IterableIterator : Symbol(IterableIterator, Decl(lib.d.ts, 1684, 1)) +>IterableIterator : Symbol(IterableIterator, Decl(lib.d.ts, 1685, 1)) diff --git a/tests/baselines/reference/generatorTypeCheck30.symbols b/tests/baselines/reference/generatorTypeCheck30.symbols index c489eb83f2bf2..086c65685a8e3 100644 --- a/tests/baselines/reference/generatorTypeCheck30.symbols +++ b/tests/baselines/reference/generatorTypeCheck30.symbols @@ -1,8 +1,8 @@ === tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck30.ts === function* g2(): Iterator number>> { >g2 : Symbol(g2, Decl(generatorTypeCheck30.ts, 0, 0)) ->Iterator : Symbol(Iterator, Decl(lib.d.ts, 1674, 1)) ->Iterable : Symbol(Iterable, Decl(lib.d.ts, 1680, 1)) +>Iterator : Symbol(Iterator, Decl(lib.d.ts, 1675, 1)) +>Iterable : Symbol(Iterable, Decl(lib.d.ts, 1681, 1)) >x : Symbol(x, Decl(generatorTypeCheck30.ts, 0, 35)) yield function* () { diff --git a/tests/baselines/reference/generatorTypeCheck45.symbols b/tests/baselines/reference/generatorTypeCheck45.symbols index ccf9fbe57ebeb..89c01ff020353 100644 --- a/tests/baselines/reference/generatorTypeCheck45.symbols +++ b/tests/baselines/reference/generatorTypeCheck45.symbols @@ -6,7 +6,7 @@ declare function foo(x: T, fun: () => Iterator<(x: T) => U>, fun2: (y: U) >x : Symbol(x, Decl(generatorTypeCheck45.ts, 0, 27)) >T : Symbol(T, Decl(generatorTypeCheck45.ts, 0, 21)) >fun : Symbol(fun, Decl(generatorTypeCheck45.ts, 0, 32)) ->Iterator : Symbol(Iterator, Decl(lib.d.ts, 1674, 1)) +>Iterator : Symbol(Iterator, Decl(lib.d.ts, 1675, 1)) >x : Symbol(x, Decl(generatorTypeCheck45.ts, 0, 54)) >T : Symbol(T, Decl(generatorTypeCheck45.ts, 0, 21)) >U : Symbol(U, Decl(generatorTypeCheck45.ts, 0, 23)) diff --git a/tests/baselines/reference/generatorTypeCheck46.symbols b/tests/baselines/reference/generatorTypeCheck46.symbols index 853f0ffab162c..72d8ebf57a167 100644 --- a/tests/baselines/reference/generatorTypeCheck46.symbols +++ b/tests/baselines/reference/generatorTypeCheck46.symbols @@ -6,7 +6,7 @@ declare function foo(x: T, fun: () => Iterable<(x: T) => U>, fun2: (y: U) >x : Symbol(x, Decl(generatorTypeCheck46.ts, 0, 27)) >T : Symbol(T, Decl(generatorTypeCheck46.ts, 0, 21)) >fun : Symbol(fun, Decl(generatorTypeCheck46.ts, 0, 32)) ->Iterable : Symbol(Iterable, Decl(lib.d.ts, 1680, 1)) +>Iterable : Symbol(Iterable, Decl(lib.d.ts, 1681, 1)) >x : Symbol(x, Decl(generatorTypeCheck46.ts, 0, 54)) >T : Symbol(T, Decl(generatorTypeCheck46.ts, 0, 21)) >U : Symbol(U, Decl(generatorTypeCheck46.ts, 0, 23)) @@ -21,9 +21,9 @@ foo("", function* () { yield* { *[Symbol.iterator]() { ->Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1248, 31)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1198, 53), Decl(lib.d.ts, 1304, 11)) ->iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1248, 31)) +>Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1249, 31)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1199, 52), Decl(lib.d.ts, 1305, 11)) +>iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1249, 31)) yield x => x.length >x : Symbol(x, Decl(generatorTypeCheck46.ts, 5, 17)) diff --git a/tests/baselines/reference/iterableArrayPattern1.symbols b/tests/baselines/reference/iterableArrayPattern1.symbols index d7877b5947abb..3920dc1cef466 100644 --- a/tests/baselines/reference/iterableArrayPattern1.symbols +++ b/tests/baselines/reference/iterableArrayPattern1.symbols @@ -13,7 +13,7 @@ class SymbolIterator { return { value: Symbol(), >value : Symbol(value, Decl(iterableArrayPattern1.ts, 3, 16)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1198, 53), Decl(lib.d.ts, 1304, 11)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1199, 52), Decl(lib.d.ts, 1305, 11)) done: false >done : Symbol(done, Decl(iterableArrayPattern1.ts, 4, 28)) @@ -22,9 +22,9 @@ class SymbolIterator { } [Symbol.iterator]() { ->Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1248, 31)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1198, 53), Decl(lib.d.ts, 1304, 11)) ->iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1248, 31)) +>Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1249, 31)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1199, 52), Decl(lib.d.ts, 1305, 11)) +>iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1249, 31)) return this; >this : Symbol(SymbolIterator, Decl(iterableArrayPattern1.ts, 0, 32)) diff --git a/tests/baselines/reference/iterableArrayPattern11.symbols b/tests/baselines/reference/iterableArrayPattern11.symbols index a4dae0104c85a..06e38c57af41d 100644 --- a/tests/baselines/reference/iterableArrayPattern11.symbols +++ b/tests/baselines/reference/iterableArrayPattern11.symbols @@ -36,9 +36,9 @@ class FooIterator { } [Symbol.iterator]() { ->Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1248, 31)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1198, 53), Decl(lib.d.ts, 1304, 11)) ->iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1248, 31)) +>Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1249, 31)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1199, 52), Decl(lib.d.ts, 1305, 11)) +>iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1249, 31)) return this; >this : Symbol(FooIterator, Decl(iterableArrayPattern11.ts, 3, 27)) diff --git a/tests/baselines/reference/iterableArrayPattern12.symbols b/tests/baselines/reference/iterableArrayPattern12.symbols index 124fc600b068c..e16fe5255e4fd 100644 --- a/tests/baselines/reference/iterableArrayPattern12.symbols +++ b/tests/baselines/reference/iterableArrayPattern12.symbols @@ -36,9 +36,9 @@ class FooIterator { } [Symbol.iterator]() { ->Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1248, 31)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1198, 53), Decl(lib.d.ts, 1304, 11)) ->iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1248, 31)) +>Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1249, 31)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1199, 52), Decl(lib.d.ts, 1305, 11)) +>iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1249, 31)) return this; >this : Symbol(FooIterator, Decl(iterableArrayPattern12.ts, 3, 27)) diff --git a/tests/baselines/reference/iterableArrayPattern13.symbols b/tests/baselines/reference/iterableArrayPattern13.symbols index 43641993f344e..b870919782926 100644 --- a/tests/baselines/reference/iterableArrayPattern13.symbols +++ b/tests/baselines/reference/iterableArrayPattern13.symbols @@ -35,9 +35,9 @@ class FooIterator { } [Symbol.iterator]() { ->Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1248, 31)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1198, 53), Decl(lib.d.ts, 1304, 11)) ->iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1248, 31)) +>Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1249, 31)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1199, 52), Decl(lib.d.ts, 1305, 11)) +>iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1249, 31)) return this; >this : Symbol(FooIterator, Decl(iterableArrayPattern13.ts, 3, 27)) diff --git a/tests/baselines/reference/iterableArrayPattern2.symbols b/tests/baselines/reference/iterableArrayPattern2.symbols index ded5eea872675..17ac6a1feacef 100644 --- a/tests/baselines/reference/iterableArrayPattern2.symbols +++ b/tests/baselines/reference/iterableArrayPattern2.symbols @@ -13,7 +13,7 @@ class SymbolIterator { return { value: Symbol(), >value : Symbol(value, Decl(iterableArrayPattern2.ts, 3, 16)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1198, 53), Decl(lib.d.ts, 1304, 11)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1199, 52), Decl(lib.d.ts, 1305, 11)) done: false >done : Symbol(done, Decl(iterableArrayPattern2.ts, 4, 28)) @@ -22,9 +22,9 @@ class SymbolIterator { } [Symbol.iterator]() { ->Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1248, 31)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1198, 53), Decl(lib.d.ts, 1304, 11)) ->iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1248, 31)) +>Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1249, 31)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1199, 52), Decl(lib.d.ts, 1305, 11)) +>iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1249, 31)) return this; >this : Symbol(SymbolIterator, Decl(iterableArrayPattern2.ts, 0, 35)) diff --git a/tests/baselines/reference/iterableArrayPattern3.symbols b/tests/baselines/reference/iterableArrayPattern3.symbols index 85ecd34218b2f..468866ca32404 100644 --- a/tests/baselines/reference/iterableArrayPattern3.symbols +++ b/tests/baselines/reference/iterableArrayPattern3.symbols @@ -37,9 +37,9 @@ class FooIterator { } [Symbol.iterator]() { ->Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1248, 31)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1198, 53), Decl(lib.d.ts, 1304, 11)) ->iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1248, 31)) +>Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1249, 31)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1199, 52), Decl(lib.d.ts, 1305, 11)) +>iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1249, 31)) return this; >this : Symbol(FooIterator, Decl(iterableArrayPattern3.ts, 3, 27)) diff --git a/tests/baselines/reference/iterableArrayPattern30.symbols b/tests/baselines/reference/iterableArrayPattern30.symbols index af6f8c617b253..3701cc85ed8ea 100644 --- a/tests/baselines/reference/iterableArrayPattern30.symbols +++ b/tests/baselines/reference/iterableArrayPattern30.symbols @@ -4,5 +4,5 @@ const [[k1, v1], [k2, v2]] = new Map([["", true], ["hello", true]]) >v1 : Symbol(v1, Decl(iterableArrayPattern30.ts, 0, 11)) >k2 : Symbol(k2, Decl(iterableArrayPattern30.ts, 0, 18)) >v2 : Symbol(v2, Decl(iterableArrayPattern30.ts, 0, 21)) ->Map : Symbol(Map, Decl(lib.d.ts, 1876, 1), Decl(lib.d.ts, 1898, 11)) +>Map : Symbol(Map, Decl(lib.d.ts, 1877, 1), Decl(lib.d.ts, 1899, 11)) diff --git a/tests/baselines/reference/iterableArrayPattern4.symbols b/tests/baselines/reference/iterableArrayPattern4.symbols index b6b569d15c616..10225e183e6cb 100644 --- a/tests/baselines/reference/iterableArrayPattern4.symbols +++ b/tests/baselines/reference/iterableArrayPattern4.symbols @@ -37,9 +37,9 @@ class FooIterator { } [Symbol.iterator]() { ->Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1248, 31)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1198, 53), Decl(lib.d.ts, 1304, 11)) ->iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1248, 31)) +>Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1249, 31)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1199, 52), Decl(lib.d.ts, 1305, 11)) +>iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1249, 31)) return this; >this : Symbol(FooIterator, Decl(iterableArrayPattern4.ts, 3, 27)) diff --git a/tests/baselines/reference/iterableArrayPattern9.symbols b/tests/baselines/reference/iterableArrayPattern9.symbols index 0722765c4de1b..86c46812688fa 100644 --- a/tests/baselines/reference/iterableArrayPattern9.symbols +++ b/tests/baselines/reference/iterableArrayPattern9.symbols @@ -32,9 +32,9 @@ class FooIterator { } [Symbol.iterator]() { ->Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1248, 31)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1198, 53), Decl(lib.d.ts, 1304, 11)) ->iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1248, 31)) +>Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1249, 31)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1199, 52), Decl(lib.d.ts, 1305, 11)) +>iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1249, 31)) return this; >this : Symbol(FooIterator, Decl(iterableArrayPattern9.ts, 2, 27)) diff --git a/tests/baselines/reference/iterableContextualTyping1.symbols b/tests/baselines/reference/iterableContextualTyping1.symbols index 3960aa4d5d108..ae99a4b52554e 100644 --- a/tests/baselines/reference/iterableContextualTyping1.symbols +++ b/tests/baselines/reference/iterableContextualTyping1.symbols @@ -1,7 +1,7 @@ === tests/cases/conformance/expressions/contextualTyping/iterableContextualTyping1.ts === var iter: Iterable<(x: string) => number> = [s => s.length]; >iter : Symbol(iter, Decl(iterableContextualTyping1.ts, 0, 3)) ->Iterable : Symbol(Iterable, Decl(lib.d.ts, 1680, 1)) +>Iterable : Symbol(Iterable, Decl(lib.d.ts, 1681, 1)) >x : Symbol(x, Decl(iterableContextualTyping1.ts, 0, 20)) >s : Symbol(s, Decl(iterableContextualTyping1.ts, 0, 45)) >s.length : Symbol(String.length, Decl(lib.d.ts, 414, 19)) diff --git a/tests/baselines/reference/iteratorSpreadInArray.symbols b/tests/baselines/reference/iteratorSpreadInArray.symbols index e7085745aa7f1..c4a2459e26276 100644 --- a/tests/baselines/reference/iteratorSpreadInArray.symbols +++ b/tests/baselines/reference/iteratorSpreadInArray.symbols @@ -12,7 +12,7 @@ class SymbolIterator { return { value: Symbol(), >value : Symbol(value, Decl(iteratorSpreadInArray.ts, 4, 16)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1198, 53), Decl(lib.d.ts, 1304, 11)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1199, 52), Decl(lib.d.ts, 1305, 11)) done: false >done : Symbol(done, Decl(iteratorSpreadInArray.ts, 5, 28)) @@ -21,9 +21,9 @@ class SymbolIterator { } [Symbol.iterator]() { ->Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1248, 31)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1198, 53), Decl(lib.d.ts, 1304, 11)) ->iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1248, 31)) +>Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1249, 31)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1199, 52), Decl(lib.d.ts, 1305, 11)) +>iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1249, 31)) return this; >this : Symbol(SymbolIterator, Decl(iteratorSpreadInArray.ts, 0, 36)) diff --git a/tests/baselines/reference/iteratorSpreadInArray11.symbols b/tests/baselines/reference/iteratorSpreadInArray11.symbols index 882df437fd39c..c2fce062fb007 100644 --- a/tests/baselines/reference/iteratorSpreadInArray11.symbols +++ b/tests/baselines/reference/iteratorSpreadInArray11.symbols @@ -1,7 +1,7 @@ === tests/cases/conformance/es6/spread/iteratorSpreadInArray11.ts === var iter: Iterable; >iter : Symbol(iter, Decl(iteratorSpreadInArray11.ts, 0, 3)) ->Iterable : Symbol(Iterable, Decl(lib.d.ts, 1680, 1)) +>Iterable : Symbol(Iterable, Decl(lib.d.ts, 1681, 1)) var array = [...iter]; >array : Symbol(array, Decl(iteratorSpreadInArray11.ts, 1, 3)) diff --git a/tests/baselines/reference/iteratorSpreadInArray2.symbols b/tests/baselines/reference/iteratorSpreadInArray2.symbols index 7bc6808d849a9..cdc7bb3e2bcb6 100644 --- a/tests/baselines/reference/iteratorSpreadInArray2.symbols +++ b/tests/baselines/reference/iteratorSpreadInArray2.symbols @@ -13,7 +13,7 @@ class SymbolIterator { return { value: Symbol(), >value : Symbol(value, Decl(iteratorSpreadInArray2.ts, 4, 16)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1198, 53), Decl(lib.d.ts, 1304, 11)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1199, 52), Decl(lib.d.ts, 1305, 11)) done: false >done : Symbol(done, Decl(iteratorSpreadInArray2.ts, 5, 28)) @@ -22,9 +22,9 @@ class SymbolIterator { } [Symbol.iterator]() { ->Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1248, 31)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1198, 53), Decl(lib.d.ts, 1304, 11)) ->iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1248, 31)) +>Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1249, 31)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1199, 52), Decl(lib.d.ts, 1305, 11)) +>iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1249, 31)) return this; >this : Symbol(SymbolIterator, Decl(iteratorSpreadInArray2.ts, 0, 59)) @@ -48,9 +48,9 @@ class NumberIterator { } [Symbol.iterator]() { ->Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1248, 31)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1198, 53), Decl(lib.d.ts, 1304, 11)) ->iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1248, 31)) +>Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1249, 31)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1199, 52), Decl(lib.d.ts, 1305, 11)) +>iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1249, 31)) return this; >this : Symbol(NumberIterator, Decl(iteratorSpreadInArray2.ts, 13, 1)) diff --git a/tests/baselines/reference/iteratorSpreadInArray3.symbols b/tests/baselines/reference/iteratorSpreadInArray3.symbols index bded5309f83ed..e4d1b508bb5d4 100644 --- a/tests/baselines/reference/iteratorSpreadInArray3.symbols +++ b/tests/baselines/reference/iteratorSpreadInArray3.symbols @@ -12,7 +12,7 @@ class SymbolIterator { return { value: Symbol(), >value : Symbol(value, Decl(iteratorSpreadInArray3.ts, 4, 16)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1198, 53), Decl(lib.d.ts, 1304, 11)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1199, 52), Decl(lib.d.ts, 1305, 11)) done: false >done : Symbol(done, Decl(iteratorSpreadInArray3.ts, 5, 28)) @@ -21,9 +21,9 @@ class SymbolIterator { } [Symbol.iterator]() { ->Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1248, 31)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1198, 53), Decl(lib.d.ts, 1304, 11)) ->iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1248, 31)) +>Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1249, 31)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1199, 52), Decl(lib.d.ts, 1305, 11)) +>iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1249, 31)) return this; >this : Symbol(SymbolIterator, Decl(iteratorSpreadInArray3.ts, 0, 47)) diff --git a/tests/baselines/reference/iteratorSpreadInArray4.symbols b/tests/baselines/reference/iteratorSpreadInArray4.symbols index 0dbe4711e95ee..bd6760dd0aa21 100644 --- a/tests/baselines/reference/iteratorSpreadInArray4.symbols +++ b/tests/baselines/reference/iteratorSpreadInArray4.symbols @@ -12,7 +12,7 @@ class SymbolIterator { return { value: Symbol(), >value : Symbol(value, Decl(iteratorSpreadInArray4.ts, 4, 16)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1198, 53), Decl(lib.d.ts, 1304, 11)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1199, 52), Decl(lib.d.ts, 1305, 11)) done: false >done : Symbol(done, Decl(iteratorSpreadInArray4.ts, 5, 28)) @@ -21,9 +21,9 @@ class SymbolIterator { } [Symbol.iterator]() { ->Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1248, 31)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1198, 53), Decl(lib.d.ts, 1304, 11)) ->iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1248, 31)) +>Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1249, 31)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1199, 52), Decl(lib.d.ts, 1305, 11)) +>iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1249, 31)) return this; >this : Symbol(SymbolIterator, Decl(iteratorSpreadInArray4.ts, 0, 42)) diff --git a/tests/baselines/reference/iteratorSpreadInArray7.symbols b/tests/baselines/reference/iteratorSpreadInArray7.symbols index 50725a3f99f89..d0bc97907526d 100644 --- a/tests/baselines/reference/iteratorSpreadInArray7.symbols +++ b/tests/baselines/reference/iteratorSpreadInArray7.symbols @@ -17,7 +17,7 @@ class SymbolIterator { return { value: Symbol(), >value : Symbol(value, Decl(iteratorSpreadInArray7.ts, 5, 16)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1198, 53), Decl(lib.d.ts, 1304, 11)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1199, 52), Decl(lib.d.ts, 1305, 11)) done: false >done : Symbol(done, Decl(iteratorSpreadInArray7.ts, 6, 28)) @@ -26,9 +26,9 @@ class SymbolIterator { } [Symbol.iterator]() { ->Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1248, 31)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1198, 53), Decl(lib.d.ts, 1304, 11)) ->iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1248, 31)) +>Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1249, 31)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1199, 52), Decl(lib.d.ts, 1305, 11)) +>iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1249, 31)) return this; >this : Symbol(SymbolIterator, Decl(iteratorSpreadInArray7.ts, 1, 38)) diff --git a/tests/baselines/reference/iteratorSpreadInCall11.symbols b/tests/baselines/reference/iteratorSpreadInCall11.symbols index ac52c5d172abb..a7e5d7b8919f8 100644 --- a/tests/baselines/reference/iteratorSpreadInCall11.symbols +++ b/tests/baselines/reference/iteratorSpreadInCall11.symbols @@ -19,7 +19,7 @@ class SymbolIterator { return { value: Symbol(), >value : Symbol(value, Decl(iteratorSpreadInCall11.ts, 6, 16)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1198, 53), Decl(lib.d.ts, 1304, 11)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1199, 52), Decl(lib.d.ts, 1305, 11)) done: false >done : Symbol(done, Decl(iteratorSpreadInCall11.ts, 7, 28)) @@ -28,9 +28,9 @@ class SymbolIterator { } [Symbol.iterator]() { ->Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1248, 31)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1198, 53), Decl(lib.d.ts, 1304, 11)) ->iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1248, 31)) +>Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1249, 31)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1199, 52), Decl(lib.d.ts, 1305, 11)) +>iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1249, 31)) return this; >this : Symbol(SymbolIterator, Decl(iteratorSpreadInCall11.ts, 2, 42)) diff --git a/tests/baselines/reference/iteratorSpreadInCall12.symbols b/tests/baselines/reference/iteratorSpreadInCall12.symbols index 8ac205edcc579..67b9e9e500daf 100644 --- a/tests/baselines/reference/iteratorSpreadInCall12.symbols +++ b/tests/baselines/reference/iteratorSpreadInCall12.symbols @@ -22,7 +22,7 @@ class SymbolIterator { return { value: Symbol(), >value : Symbol(value, Decl(iteratorSpreadInCall12.ts, 8, 16)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1198, 53), Decl(lib.d.ts, 1304, 11)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1199, 52), Decl(lib.d.ts, 1305, 11)) done: false >done : Symbol(done, Decl(iteratorSpreadInCall12.ts, 9, 28)) @@ -31,9 +31,9 @@ class SymbolIterator { } [Symbol.iterator]() { ->Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1248, 31)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1198, 53), Decl(lib.d.ts, 1304, 11)) ->iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1248, 31)) +>Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1249, 31)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1199, 52), Decl(lib.d.ts, 1305, 11)) +>iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1249, 31)) return this; >this : Symbol(SymbolIterator, Decl(iteratorSpreadInCall12.ts, 4, 1)) @@ -57,9 +57,9 @@ class StringIterator { } [Symbol.iterator]() { ->Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1248, 31)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1198, 53), Decl(lib.d.ts, 1304, 11)) ->iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1248, 31)) +>Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1249, 31)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1199, 52), Decl(lib.d.ts, 1305, 11)) +>iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1249, 31)) return this; >this : Symbol(StringIterator, Decl(iteratorSpreadInCall12.ts, 17, 1)) diff --git a/tests/baselines/reference/iteratorSpreadInCall3.symbols b/tests/baselines/reference/iteratorSpreadInCall3.symbols index 12e4bd1bb9ba7..0c3c11c84f470 100644 --- a/tests/baselines/reference/iteratorSpreadInCall3.symbols +++ b/tests/baselines/reference/iteratorSpreadInCall3.symbols @@ -16,7 +16,7 @@ class SymbolIterator { return { value: Symbol(), >value : Symbol(value, Decl(iteratorSpreadInCall3.ts, 5, 16)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1198, 53), Decl(lib.d.ts, 1304, 11)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1199, 52), Decl(lib.d.ts, 1305, 11)) done: false >done : Symbol(done, Decl(iteratorSpreadInCall3.ts, 6, 28)) @@ -25,9 +25,9 @@ class SymbolIterator { } [Symbol.iterator]() { ->Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1248, 31)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1198, 53), Decl(lib.d.ts, 1304, 11)) ->iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1248, 31)) +>Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1249, 31)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1199, 52), Decl(lib.d.ts, 1305, 11)) +>iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1249, 31)) return this; >this : Symbol(SymbolIterator, Decl(iteratorSpreadInCall3.ts, 2, 32)) diff --git a/tests/baselines/reference/iteratorSpreadInCall5.symbols b/tests/baselines/reference/iteratorSpreadInCall5.symbols index 06226958069e4..03faf4b593ea8 100644 --- a/tests/baselines/reference/iteratorSpreadInCall5.symbols +++ b/tests/baselines/reference/iteratorSpreadInCall5.symbols @@ -17,7 +17,7 @@ class SymbolIterator { return { value: Symbol(), >value : Symbol(value, Decl(iteratorSpreadInCall5.ts, 5, 16)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1198, 53), Decl(lib.d.ts, 1304, 11)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1199, 52), Decl(lib.d.ts, 1305, 11)) done: false >done : Symbol(done, Decl(iteratorSpreadInCall5.ts, 6, 28)) @@ -26,9 +26,9 @@ class SymbolIterator { } [Symbol.iterator]() { ->Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1248, 31)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1198, 53), Decl(lib.d.ts, 1304, 11)) ->iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1248, 31)) +>Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1249, 31)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1199, 52), Decl(lib.d.ts, 1305, 11)) +>iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1249, 31)) return this; >this : Symbol(SymbolIterator, Decl(iteratorSpreadInCall5.ts, 2, 43)) @@ -52,9 +52,9 @@ class StringIterator { } [Symbol.iterator]() { ->Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1248, 31)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1198, 53), Decl(lib.d.ts, 1304, 11)) ->iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1248, 31)) +>Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1249, 31)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1199, 52), Decl(lib.d.ts, 1305, 11)) +>iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1249, 31)) return this; >this : Symbol(StringIterator, Decl(iteratorSpreadInCall5.ts, 14, 1)) diff --git a/tests/baselines/reference/parserSymbolProperty1.symbols b/tests/baselines/reference/parserSymbolProperty1.symbols index 72d4ad96aac92..5d97b2d7a017f 100644 --- a/tests/baselines/reference/parserSymbolProperty1.symbols +++ b/tests/baselines/reference/parserSymbolProperty1.symbols @@ -3,7 +3,7 @@ interface I { >I : Symbol(I, Decl(parserSymbolProperty1.ts, 0, 0)) [Symbol.iterator]: string; ->Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1248, 31)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1198, 53), Decl(lib.d.ts, 1304, 11)) ->iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1248, 31)) +>Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1249, 31)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1199, 52), Decl(lib.d.ts, 1305, 11)) +>iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1249, 31)) } diff --git a/tests/baselines/reference/parserSymbolProperty2.symbols b/tests/baselines/reference/parserSymbolProperty2.symbols index 77eb6c610593a..69764d70b4531 100644 --- a/tests/baselines/reference/parserSymbolProperty2.symbols +++ b/tests/baselines/reference/parserSymbolProperty2.symbols @@ -3,7 +3,7 @@ interface I { >I : Symbol(I, Decl(parserSymbolProperty2.ts, 0, 0)) [Symbol.unscopables](): string; ->Symbol.unscopables : Symbol(SymbolConstructor.unscopables, Decl(lib.d.ts, 1296, 24)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1198, 53), Decl(lib.d.ts, 1304, 11)) ->unscopables : Symbol(SymbolConstructor.unscopables, Decl(lib.d.ts, 1296, 24)) +>Symbol.unscopables : Symbol(SymbolConstructor.unscopables, Decl(lib.d.ts, 1297, 24)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1199, 52), Decl(lib.d.ts, 1305, 11)) +>unscopables : Symbol(SymbolConstructor.unscopables, Decl(lib.d.ts, 1297, 24)) } diff --git a/tests/baselines/reference/parserSymbolProperty3.symbols b/tests/baselines/reference/parserSymbolProperty3.symbols index 5f7f13956a824..c42bb3abb8343 100644 --- a/tests/baselines/reference/parserSymbolProperty3.symbols +++ b/tests/baselines/reference/parserSymbolProperty3.symbols @@ -3,7 +3,7 @@ declare class C { >C : Symbol(C, Decl(parserSymbolProperty3.ts, 0, 0)) [Symbol.unscopables](): string; ->Symbol.unscopables : Symbol(SymbolConstructor.unscopables, Decl(lib.d.ts, 1296, 24)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1198, 53), Decl(lib.d.ts, 1304, 11)) ->unscopables : Symbol(SymbolConstructor.unscopables, Decl(lib.d.ts, 1296, 24)) +>Symbol.unscopables : Symbol(SymbolConstructor.unscopables, Decl(lib.d.ts, 1297, 24)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1199, 52), Decl(lib.d.ts, 1305, 11)) +>unscopables : Symbol(SymbolConstructor.unscopables, Decl(lib.d.ts, 1297, 24)) } diff --git a/tests/baselines/reference/parserSymbolProperty4.symbols b/tests/baselines/reference/parserSymbolProperty4.symbols index 94701b8908a13..ba93afde83716 100644 --- a/tests/baselines/reference/parserSymbolProperty4.symbols +++ b/tests/baselines/reference/parserSymbolProperty4.symbols @@ -3,7 +3,7 @@ declare class C { >C : Symbol(C, Decl(parserSymbolProperty4.ts, 0, 0)) [Symbol.toPrimitive]: string; ->Symbol.toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, 1284, 18)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1198, 53), Decl(lib.d.ts, 1304, 11)) ->toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, 1284, 18)) +>Symbol.toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, 1285, 18)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1199, 52), Decl(lib.d.ts, 1305, 11)) +>toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, 1285, 18)) } diff --git a/tests/baselines/reference/parserSymbolProperty5.symbols b/tests/baselines/reference/parserSymbolProperty5.symbols index b91cd771c5d28..4829677f5160c 100644 --- a/tests/baselines/reference/parserSymbolProperty5.symbols +++ b/tests/baselines/reference/parserSymbolProperty5.symbols @@ -3,7 +3,7 @@ class C { >C : Symbol(C, Decl(parserSymbolProperty5.ts, 0, 0)) [Symbol.toPrimitive]: string; ->Symbol.toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, 1284, 18)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1198, 53), Decl(lib.d.ts, 1304, 11)) ->toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, 1284, 18)) +>Symbol.toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, 1285, 18)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1199, 52), Decl(lib.d.ts, 1305, 11)) +>toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, 1285, 18)) } diff --git a/tests/baselines/reference/parserSymbolProperty6.symbols b/tests/baselines/reference/parserSymbolProperty6.symbols index 4762fb4fd7002..793b925b382dd 100644 --- a/tests/baselines/reference/parserSymbolProperty6.symbols +++ b/tests/baselines/reference/parserSymbolProperty6.symbols @@ -3,7 +3,7 @@ class C { >C : Symbol(C, Decl(parserSymbolProperty6.ts, 0, 0)) [Symbol.toStringTag]: string = ""; ->Symbol.toStringTag : Symbol(SymbolConstructor.toStringTag, Decl(lib.d.ts, 1290, 24)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1198, 53), Decl(lib.d.ts, 1304, 11)) ->toStringTag : Symbol(SymbolConstructor.toStringTag, Decl(lib.d.ts, 1290, 24)) +>Symbol.toStringTag : Symbol(SymbolConstructor.toStringTag, Decl(lib.d.ts, 1291, 24)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1199, 52), Decl(lib.d.ts, 1305, 11)) +>toStringTag : Symbol(SymbolConstructor.toStringTag, Decl(lib.d.ts, 1291, 24)) } diff --git a/tests/baselines/reference/parserSymbolProperty7.symbols b/tests/baselines/reference/parserSymbolProperty7.symbols index 0eb96fa03b039..e1b85f2a3b996 100644 --- a/tests/baselines/reference/parserSymbolProperty7.symbols +++ b/tests/baselines/reference/parserSymbolProperty7.symbols @@ -3,7 +3,7 @@ class C { >C : Symbol(C, Decl(parserSymbolProperty7.ts, 0, 0)) [Symbol.toStringTag](): void { } ->Symbol.toStringTag : Symbol(SymbolConstructor.toStringTag, Decl(lib.d.ts, 1290, 24)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1198, 53), Decl(lib.d.ts, 1304, 11)) ->toStringTag : Symbol(SymbolConstructor.toStringTag, Decl(lib.d.ts, 1290, 24)) +>Symbol.toStringTag : Symbol(SymbolConstructor.toStringTag, Decl(lib.d.ts, 1291, 24)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1199, 52), Decl(lib.d.ts, 1305, 11)) +>toStringTag : Symbol(SymbolConstructor.toStringTag, Decl(lib.d.ts, 1291, 24)) } diff --git a/tests/baselines/reference/parserSymbolProperty8.symbols b/tests/baselines/reference/parserSymbolProperty8.symbols index cc11d61259e84..05b002eb56940 100644 --- a/tests/baselines/reference/parserSymbolProperty8.symbols +++ b/tests/baselines/reference/parserSymbolProperty8.symbols @@ -3,7 +3,7 @@ var x: { >x : Symbol(x, Decl(parserSymbolProperty8.ts, 0, 3)) [Symbol.toPrimitive](): string ->Symbol.toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, 1284, 18)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1198, 53), Decl(lib.d.ts, 1304, 11)) ->toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, 1284, 18)) +>Symbol.toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, 1285, 18)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1199, 52), Decl(lib.d.ts, 1305, 11)) +>toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, 1285, 18)) } diff --git a/tests/baselines/reference/parserSymbolProperty9.symbols b/tests/baselines/reference/parserSymbolProperty9.symbols index eae90071b65d8..774eb2dcc4b34 100644 --- a/tests/baselines/reference/parserSymbolProperty9.symbols +++ b/tests/baselines/reference/parserSymbolProperty9.symbols @@ -3,7 +3,7 @@ var x: { >x : Symbol(x, Decl(parserSymbolProperty9.ts, 0, 3)) [Symbol.toPrimitive]: string ->Symbol.toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, 1284, 18)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1198, 53), Decl(lib.d.ts, 1304, 11)) ->toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, 1284, 18)) +>Symbol.toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, 1285, 18)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1199, 52), Decl(lib.d.ts, 1305, 11)) +>toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, 1285, 18)) } diff --git a/tests/baselines/reference/promiseVoidErrorCallback.symbols b/tests/baselines/reference/promiseVoidErrorCallback.symbols index aa15fc016594d..b01825c8ad992 100644 --- a/tests/baselines/reference/promiseVoidErrorCallback.symbols +++ b/tests/baselines/reference/promiseVoidErrorCallback.symbols @@ -22,13 +22,13 @@ interface T3 { function f1(): Promise { >f1 : Symbol(f1, Decl(promiseVoidErrorCallback.ts, 10, 1)) ->Promise : Symbol(Promise, Decl(lib.d.ts, 4767, 1), Decl(lib.d.ts, 4853, 11)) +>Promise : Symbol(Promise, Decl(lib.d.ts, 4768, 1), Decl(lib.d.ts, 4854, 11)) >T1 : Symbol(T1, Decl(promiseVoidErrorCallback.ts, 0, 0)) return Promise.resolve({ __t1: "foo_t1" }); ->Promise.resolve : Symbol(PromiseConstructor.resolve, Decl(lib.d.ts, 4835, 39), Decl(lib.d.ts, 4842, 54)) ->Promise : Symbol(Promise, Decl(lib.d.ts, 4767, 1), Decl(lib.d.ts, 4853, 11)) ->resolve : Symbol(PromiseConstructor.resolve, Decl(lib.d.ts, 4835, 39), Decl(lib.d.ts, 4842, 54)) +>Promise.resolve : Symbol(PromiseConstructor.resolve, Decl(lib.d.ts, 4836, 39), Decl(lib.d.ts, 4843, 54)) +>Promise : Symbol(Promise, Decl(lib.d.ts, 4768, 1), Decl(lib.d.ts, 4854, 11)) +>resolve : Symbol(PromiseConstructor.resolve, Decl(lib.d.ts, 4836, 39), Decl(lib.d.ts, 4843, 54)) >__t1 : Symbol(__t1, Decl(promiseVoidErrorCallback.ts, 13, 28)) } @@ -47,12 +47,12 @@ function f2(x: T1): T2 { var x3 = f1() >x3 : Symbol(x3, Decl(promiseVoidErrorCallback.ts, 20, 3)) ->f1() .then(f2, (e: Error) => { throw e;}) .then : Symbol(Promise.then, Decl(lib.d.ts, 4772, 22), Decl(lib.d.ts, 4779, 158)) ->f1() .then : Symbol(Promise.then, Decl(lib.d.ts, 4772, 22), Decl(lib.d.ts, 4779, 158)) +>f1() .then(f2, (e: Error) => { throw e;}) .then : Symbol(Promise.then, Decl(lib.d.ts, 4773, 22), Decl(lib.d.ts, 4780, 158)) +>f1() .then : Symbol(Promise.then, Decl(lib.d.ts, 4773, 22), Decl(lib.d.ts, 4780, 158)) >f1 : Symbol(f1, Decl(promiseVoidErrorCallback.ts, 10, 1)) .then(f2, (e: Error) => { ->then : Symbol(Promise.then, Decl(lib.d.ts, 4772, 22), Decl(lib.d.ts, 4779, 158)) +>then : Symbol(Promise.then, Decl(lib.d.ts, 4773, 22), Decl(lib.d.ts, 4780, 158)) >f2 : Symbol(f2, Decl(promiseVoidErrorCallback.ts, 14, 1)) >e : Symbol(e, Decl(promiseVoidErrorCallback.ts, 21, 15)) >Error : Symbol(Error, Decl(lib.d.ts, 876, 38), Decl(lib.d.ts, 889, 11)) @@ -62,7 +62,7 @@ var x3 = f1() }) .then((x: T2) => { ->then : Symbol(Promise.then, Decl(lib.d.ts, 4772, 22), Decl(lib.d.ts, 4779, 158)) +>then : Symbol(Promise.then, Decl(lib.d.ts, 4773, 22), Decl(lib.d.ts, 4780, 158)) >x : Symbol(x, Decl(promiseVoidErrorCallback.ts, 24, 11)) >T2 : Symbol(T2, Decl(promiseVoidErrorCallback.ts, 2, 1)) diff --git a/tests/baselines/reference/symbolDeclarationEmit1.symbols b/tests/baselines/reference/symbolDeclarationEmit1.symbols index 0b0e820404bdc..9fae9d57c4f6d 100644 --- a/tests/baselines/reference/symbolDeclarationEmit1.symbols +++ b/tests/baselines/reference/symbolDeclarationEmit1.symbols @@ -3,7 +3,7 @@ class C { >C : Symbol(C, Decl(symbolDeclarationEmit1.ts, 0, 0)) [Symbol.toPrimitive]: number; ->Symbol.toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, 1284, 18)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1198, 53), Decl(lib.d.ts, 1304, 11)) ->toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, 1284, 18)) +>Symbol.toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, 1285, 18)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1199, 52), Decl(lib.d.ts, 1305, 11)) +>toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, 1285, 18)) } diff --git a/tests/baselines/reference/symbolDeclarationEmit10.symbols b/tests/baselines/reference/symbolDeclarationEmit10.symbols index 5ed853abd19fd..5dba2268d2641 100644 --- a/tests/baselines/reference/symbolDeclarationEmit10.symbols +++ b/tests/baselines/reference/symbolDeclarationEmit10.symbols @@ -3,13 +3,13 @@ var obj = { >obj : Symbol(obj, Decl(symbolDeclarationEmit10.ts, 0, 3)) get [Symbol.isConcatSpreadable]() { return '' }, ->Symbol.isConcatSpreadable : Symbol(SymbolConstructor.isConcatSpreadable, Decl(lib.d.ts, 1242, 24)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1198, 53), Decl(lib.d.ts, 1304, 11)) ->isConcatSpreadable : Symbol(SymbolConstructor.isConcatSpreadable, Decl(lib.d.ts, 1242, 24)) +>Symbol.isConcatSpreadable : Symbol(SymbolConstructor.isConcatSpreadable, Decl(lib.d.ts, 1243, 24)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1199, 52), Decl(lib.d.ts, 1305, 11)) +>isConcatSpreadable : Symbol(SymbolConstructor.isConcatSpreadable, Decl(lib.d.ts, 1243, 24)) set [Symbol.isConcatSpreadable](x) { } ->Symbol.isConcatSpreadable : Symbol(SymbolConstructor.isConcatSpreadable, Decl(lib.d.ts, 1242, 24)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1198, 53), Decl(lib.d.ts, 1304, 11)) ->isConcatSpreadable : Symbol(SymbolConstructor.isConcatSpreadable, Decl(lib.d.ts, 1242, 24)) +>Symbol.isConcatSpreadable : Symbol(SymbolConstructor.isConcatSpreadable, Decl(lib.d.ts, 1243, 24)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1199, 52), Decl(lib.d.ts, 1305, 11)) +>isConcatSpreadable : Symbol(SymbolConstructor.isConcatSpreadable, Decl(lib.d.ts, 1243, 24)) >x : Symbol(x, Decl(symbolDeclarationEmit10.ts, 2, 36)) } diff --git a/tests/baselines/reference/symbolDeclarationEmit11.symbols b/tests/baselines/reference/symbolDeclarationEmit11.symbols index 44115a3e7309b..a6019a364e47b 100644 --- a/tests/baselines/reference/symbolDeclarationEmit11.symbols +++ b/tests/baselines/reference/symbolDeclarationEmit11.symbols @@ -3,23 +3,23 @@ class C { >C : Symbol(C, Decl(symbolDeclarationEmit11.ts, 0, 0)) static [Symbol.iterator] = 0; ->Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1248, 31)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1198, 53), Decl(lib.d.ts, 1304, 11)) ->iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1248, 31)) +>Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1249, 31)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1199, 52), Decl(lib.d.ts, 1305, 11)) +>iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1249, 31)) static [Symbol.isConcatSpreadable]() { } ->Symbol.isConcatSpreadable : Symbol(SymbolConstructor.isConcatSpreadable, Decl(lib.d.ts, 1242, 24)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1198, 53), Decl(lib.d.ts, 1304, 11)) ->isConcatSpreadable : Symbol(SymbolConstructor.isConcatSpreadable, Decl(lib.d.ts, 1242, 24)) +>Symbol.isConcatSpreadable : Symbol(SymbolConstructor.isConcatSpreadable, Decl(lib.d.ts, 1243, 24)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1199, 52), Decl(lib.d.ts, 1305, 11)) +>isConcatSpreadable : Symbol(SymbolConstructor.isConcatSpreadable, Decl(lib.d.ts, 1243, 24)) static get [Symbol.toPrimitive]() { return ""; } ->Symbol.toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, 1284, 18)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1198, 53), Decl(lib.d.ts, 1304, 11)) ->toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, 1284, 18)) +>Symbol.toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, 1285, 18)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1199, 52), Decl(lib.d.ts, 1305, 11)) +>toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, 1285, 18)) static set [Symbol.toPrimitive](x) { } ->Symbol.toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, 1284, 18)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1198, 53), Decl(lib.d.ts, 1304, 11)) ->toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, 1284, 18)) +>Symbol.toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, 1285, 18)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1199, 52), Decl(lib.d.ts, 1305, 11)) +>toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, 1285, 18)) >x : Symbol(x, Decl(symbolDeclarationEmit11.ts, 4, 36)) } diff --git a/tests/baselines/reference/symbolDeclarationEmit13.symbols b/tests/baselines/reference/symbolDeclarationEmit13.symbols index a0aa4e1142a1f..e16ec7384893e 100644 --- a/tests/baselines/reference/symbolDeclarationEmit13.symbols +++ b/tests/baselines/reference/symbolDeclarationEmit13.symbols @@ -3,13 +3,13 @@ class C { >C : Symbol(C, Decl(symbolDeclarationEmit13.ts, 0, 0)) get [Symbol.toPrimitive]() { return ""; } ->Symbol.toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, 1284, 18)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1198, 53), Decl(lib.d.ts, 1304, 11)) ->toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, 1284, 18)) +>Symbol.toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, 1285, 18)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1199, 52), Decl(lib.d.ts, 1305, 11)) +>toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, 1285, 18)) set [Symbol.toStringTag](x) { } ->Symbol.toStringTag : Symbol(SymbolConstructor.toStringTag, Decl(lib.d.ts, 1290, 24)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1198, 53), Decl(lib.d.ts, 1304, 11)) ->toStringTag : Symbol(SymbolConstructor.toStringTag, Decl(lib.d.ts, 1290, 24)) +>Symbol.toStringTag : Symbol(SymbolConstructor.toStringTag, Decl(lib.d.ts, 1291, 24)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1199, 52), Decl(lib.d.ts, 1305, 11)) +>toStringTag : Symbol(SymbolConstructor.toStringTag, Decl(lib.d.ts, 1291, 24)) >x : Symbol(x, Decl(symbolDeclarationEmit13.ts, 2, 29)) } diff --git a/tests/baselines/reference/symbolDeclarationEmit14.symbols b/tests/baselines/reference/symbolDeclarationEmit14.symbols index 0acef2d8a7180..b2f520351f2c0 100644 --- a/tests/baselines/reference/symbolDeclarationEmit14.symbols +++ b/tests/baselines/reference/symbolDeclarationEmit14.symbols @@ -3,12 +3,12 @@ class C { >C : Symbol(C, Decl(symbolDeclarationEmit14.ts, 0, 0)) get [Symbol.toPrimitive]() { return ""; } ->Symbol.toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, 1284, 18)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1198, 53), Decl(lib.d.ts, 1304, 11)) ->toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, 1284, 18)) +>Symbol.toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, 1285, 18)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1199, 52), Decl(lib.d.ts, 1305, 11)) +>toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, 1285, 18)) get [Symbol.toStringTag]() { return ""; } ->Symbol.toStringTag : Symbol(SymbolConstructor.toStringTag, Decl(lib.d.ts, 1290, 24)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1198, 53), Decl(lib.d.ts, 1304, 11)) ->toStringTag : Symbol(SymbolConstructor.toStringTag, Decl(lib.d.ts, 1290, 24)) +>Symbol.toStringTag : Symbol(SymbolConstructor.toStringTag, Decl(lib.d.ts, 1291, 24)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1199, 52), Decl(lib.d.ts, 1305, 11)) +>toStringTag : Symbol(SymbolConstructor.toStringTag, Decl(lib.d.ts, 1291, 24)) } diff --git a/tests/baselines/reference/symbolDeclarationEmit2.symbols b/tests/baselines/reference/symbolDeclarationEmit2.symbols index bfcf6243d9e47..7e9d06cd332e6 100644 --- a/tests/baselines/reference/symbolDeclarationEmit2.symbols +++ b/tests/baselines/reference/symbolDeclarationEmit2.symbols @@ -3,7 +3,7 @@ class C { >C : Symbol(C, Decl(symbolDeclarationEmit2.ts, 0, 0)) [Symbol.toPrimitive] = ""; ->Symbol.toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, 1284, 18)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1198, 53), Decl(lib.d.ts, 1304, 11)) ->toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, 1284, 18)) +>Symbol.toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, 1285, 18)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1199, 52), Decl(lib.d.ts, 1305, 11)) +>toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, 1285, 18)) } diff --git a/tests/baselines/reference/symbolDeclarationEmit3.symbols b/tests/baselines/reference/symbolDeclarationEmit3.symbols index fcfcd0efe1400..177180b5bcae9 100644 --- a/tests/baselines/reference/symbolDeclarationEmit3.symbols +++ b/tests/baselines/reference/symbolDeclarationEmit3.symbols @@ -3,20 +3,20 @@ class C { >C : Symbol(C, Decl(symbolDeclarationEmit3.ts, 0, 0)) [Symbol.toPrimitive](x: number); ->Symbol.toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, 1284, 18)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1198, 53), Decl(lib.d.ts, 1304, 11)) ->toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, 1284, 18)) +>Symbol.toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, 1285, 18)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1199, 52), Decl(lib.d.ts, 1305, 11)) +>toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, 1285, 18)) >x : Symbol(x, Decl(symbolDeclarationEmit3.ts, 1, 25)) [Symbol.toPrimitive](x: string); ->Symbol.toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, 1284, 18)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1198, 53), Decl(lib.d.ts, 1304, 11)) ->toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, 1284, 18)) +>Symbol.toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, 1285, 18)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1199, 52), Decl(lib.d.ts, 1305, 11)) +>toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, 1285, 18)) >x : Symbol(x, Decl(symbolDeclarationEmit3.ts, 2, 25)) [Symbol.toPrimitive](x: any) { } ->Symbol.toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, 1284, 18)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1198, 53), Decl(lib.d.ts, 1304, 11)) ->toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, 1284, 18)) +>Symbol.toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, 1285, 18)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1199, 52), Decl(lib.d.ts, 1305, 11)) +>toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, 1285, 18)) >x : Symbol(x, Decl(symbolDeclarationEmit3.ts, 3, 25)) } diff --git a/tests/baselines/reference/symbolDeclarationEmit4.symbols b/tests/baselines/reference/symbolDeclarationEmit4.symbols index 28d4602b181c6..98cb277ad474a 100644 --- a/tests/baselines/reference/symbolDeclarationEmit4.symbols +++ b/tests/baselines/reference/symbolDeclarationEmit4.symbols @@ -3,13 +3,13 @@ class C { >C : Symbol(C, Decl(symbolDeclarationEmit4.ts, 0, 0)) get [Symbol.toPrimitive]() { return ""; } ->Symbol.toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, 1284, 18)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1198, 53), Decl(lib.d.ts, 1304, 11)) ->toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, 1284, 18)) +>Symbol.toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, 1285, 18)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1199, 52), Decl(lib.d.ts, 1305, 11)) +>toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, 1285, 18)) set [Symbol.toPrimitive](x) { } ->Symbol.toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, 1284, 18)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1198, 53), Decl(lib.d.ts, 1304, 11)) ->toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, 1284, 18)) +>Symbol.toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, 1285, 18)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1199, 52), Decl(lib.d.ts, 1305, 11)) +>toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, 1285, 18)) >x : Symbol(x, Decl(symbolDeclarationEmit4.ts, 2, 29)) } diff --git a/tests/baselines/reference/symbolDeclarationEmit5.symbols b/tests/baselines/reference/symbolDeclarationEmit5.symbols index c8a7ab36e94b8..17bda345253bc 100644 --- a/tests/baselines/reference/symbolDeclarationEmit5.symbols +++ b/tests/baselines/reference/symbolDeclarationEmit5.symbols @@ -3,7 +3,7 @@ interface I { >I : Symbol(I, Decl(symbolDeclarationEmit5.ts, 0, 0)) [Symbol.isConcatSpreadable](): string; ->Symbol.isConcatSpreadable : Symbol(SymbolConstructor.isConcatSpreadable, Decl(lib.d.ts, 1242, 24)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1198, 53), Decl(lib.d.ts, 1304, 11)) ->isConcatSpreadable : Symbol(SymbolConstructor.isConcatSpreadable, Decl(lib.d.ts, 1242, 24)) +>Symbol.isConcatSpreadable : Symbol(SymbolConstructor.isConcatSpreadable, Decl(lib.d.ts, 1243, 24)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1199, 52), Decl(lib.d.ts, 1305, 11)) +>isConcatSpreadable : Symbol(SymbolConstructor.isConcatSpreadable, Decl(lib.d.ts, 1243, 24)) } diff --git a/tests/baselines/reference/symbolDeclarationEmit6.symbols b/tests/baselines/reference/symbolDeclarationEmit6.symbols index d535c8ce1ec89..c4b046cc14607 100644 --- a/tests/baselines/reference/symbolDeclarationEmit6.symbols +++ b/tests/baselines/reference/symbolDeclarationEmit6.symbols @@ -3,7 +3,7 @@ interface I { >I : Symbol(I, Decl(symbolDeclarationEmit6.ts, 0, 0)) [Symbol.isConcatSpreadable]: string; ->Symbol.isConcatSpreadable : Symbol(SymbolConstructor.isConcatSpreadable, Decl(lib.d.ts, 1242, 24)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1198, 53), Decl(lib.d.ts, 1304, 11)) ->isConcatSpreadable : Symbol(SymbolConstructor.isConcatSpreadable, Decl(lib.d.ts, 1242, 24)) +>Symbol.isConcatSpreadable : Symbol(SymbolConstructor.isConcatSpreadable, Decl(lib.d.ts, 1243, 24)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1199, 52), Decl(lib.d.ts, 1305, 11)) +>isConcatSpreadable : Symbol(SymbolConstructor.isConcatSpreadable, Decl(lib.d.ts, 1243, 24)) } diff --git a/tests/baselines/reference/symbolDeclarationEmit7.symbols b/tests/baselines/reference/symbolDeclarationEmit7.symbols index 0860dae4a277f..58a661412da23 100644 --- a/tests/baselines/reference/symbolDeclarationEmit7.symbols +++ b/tests/baselines/reference/symbolDeclarationEmit7.symbols @@ -3,7 +3,7 @@ var obj: { >obj : Symbol(obj, Decl(symbolDeclarationEmit7.ts, 0, 3)) [Symbol.isConcatSpreadable]: string; ->Symbol.isConcatSpreadable : Symbol(SymbolConstructor.isConcatSpreadable, Decl(lib.d.ts, 1242, 24)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1198, 53), Decl(lib.d.ts, 1304, 11)) ->isConcatSpreadable : Symbol(SymbolConstructor.isConcatSpreadable, Decl(lib.d.ts, 1242, 24)) +>Symbol.isConcatSpreadable : Symbol(SymbolConstructor.isConcatSpreadable, Decl(lib.d.ts, 1243, 24)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1199, 52), Decl(lib.d.ts, 1305, 11)) +>isConcatSpreadable : Symbol(SymbolConstructor.isConcatSpreadable, Decl(lib.d.ts, 1243, 24)) } diff --git a/tests/baselines/reference/symbolDeclarationEmit8.symbols b/tests/baselines/reference/symbolDeclarationEmit8.symbols index 21faad440290a..7879d28b02f52 100644 --- a/tests/baselines/reference/symbolDeclarationEmit8.symbols +++ b/tests/baselines/reference/symbolDeclarationEmit8.symbols @@ -3,7 +3,7 @@ var obj = { >obj : Symbol(obj, Decl(symbolDeclarationEmit8.ts, 0, 3)) [Symbol.isConcatSpreadable]: 0 ->Symbol.isConcatSpreadable : Symbol(SymbolConstructor.isConcatSpreadable, Decl(lib.d.ts, 1242, 24)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1198, 53), Decl(lib.d.ts, 1304, 11)) ->isConcatSpreadable : Symbol(SymbolConstructor.isConcatSpreadable, Decl(lib.d.ts, 1242, 24)) +>Symbol.isConcatSpreadable : Symbol(SymbolConstructor.isConcatSpreadable, Decl(lib.d.ts, 1243, 24)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1199, 52), Decl(lib.d.ts, 1305, 11)) +>isConcatSpreadable : Symbol(SymbolConstructor.isConcatSpreadable, Decl(lib.d.ts, 1243, 24)) } diff --git a/tests/baselines/reference/symbolDeclarationEmit9.symbols b/tests/baselines/reference/symbolDeclarationEmit9.symbols index 9212123105def..17901fb713aac 100644 --- a/tests/baselines/reference/symbolDeclarationEmit9.symbols +++ b/tests/baselines/reference/symbolDeclarationEmit9.symbols @@ -3,7 +3,7 @@ var obj = { >obj : Symbol(obj, Decl(symbolDeclarationEmit9.ts, 0, 3)) [Symbol.isConcatSpreadable]() { } ->Symbol.isConcatSpreadable : Symbol(SymbolConstructor.isConcatSpreadable, Decl(lib.d.ts, 1242, 24)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1198, 53), Decl(lib.d.ts, 1304, 11)) ->isConcatSpreadable : Symbol(SymbolConstructor.isConcatSpreadable, Decl(lib.d.ts, 1242, 24)) +>Symbol.isConcatSpreadable : Symbol(SymbolConstructor.isConcatSpreadable, Decl(lib.d.ts, 1243, 24)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1199, 52), Decl(lib.d.ts, 1305, 11)) +>isConcatSpreadable : Symbol(SymbolConstructor.isConcatSpreadable, Decl(lib.d.ts, 1243, 24)) } diff --git a/tests/baselines/reference/symbolProperty11.symbols b/tests/baselines/reference/symbolProperty11.symbols index 952846d768d91..4028da455a6eb 100644 --- a/tests/baselines/reference/symbolProperty11.symbols +++ b/tests/baselines/reference/symbolProperty11.symbols @@ -6,9 +6,9 @@ interface I { >I : Symbol(I, Decl(symbolProperty11.ts, 0, 11)) [Symbol.iterator]?: { x }; ->Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1248, 31)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1198, 53), Decl(lib.d.ts, 1304, 11)) ->iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1248, 31)) +>Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1249, 31)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1199, 52), Decl(lib.d.ts, 1305, 11)) +>iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1249, 31)) >x : Symbol(x, Decl(symbolProperty11.ts, 2, 25)) } diff --git a/tests/baselines/reference/symbolProperty13.symbols b/tests/baselines/reference/symbolProperty13.symbols index 3b5685d1d7738..07e9b6bae2698 100644 --- a/tests/baselines/reference/symbolProperty13.symbols +++ b/tests/baselines/reference/symbolProperty13.symbols @@ -3,9 +3,9 @@ class C { >C : Symbol(C, Decl(symbolProperty13.ts, 0, 0)) [Symbol.iterator]: { x; y }; ->Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1248, 31)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1198, 53), Decl(lib.d.ts, 1304, 11)) ->iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1248, 31)) +>Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1249, 31)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1199, 52), Decl(lib.d.ts, 1305, 11)) +>iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1249, 31)) >x : Symbol(x, Decl(symbolProperty13.ts, 1, 24)) >y : Symbol(y, Decl(symbolProperty13.ts, 1, 27)) } @@ -13,9 +13,9 @@ interface I { >I : Symbol(I, Decl(symbolProperty13.ts, 2, 1)) [Symbol.iterator]: { x }; ->Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1248, 31)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1198, 53), Decl(lib.d.ts, 1304, 11)) ->iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1248, 31)) +>Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1249, 31)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1199, 52), Decl(lib.d.ts, 1305, 11)) +>iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1249, 31)) >x : Symbol(x, Decl(symbolProperty13.ts, 4, 24)) } diff --git a/tests/baselines/reference/symbolProperty14.symbols b/tests/baselines/reference/symbolProperty14.symbols index b47ae5d912dde..d4e79a064a961 100644 --- a/tests/baselines/reference/symbolProperty14.symbols +++ b/tests/baselines/reference/symbolProperty14.symbols @@ -3,9 +3,9 @@ class C { >C : Symbol(C, Decl(symbolProperty14.ts, 0, 0)) [Symbol.iterator]: { x; y }; ->Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1248, 31)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1198, 53), Decl(lib.d.ts, 1304, 11)) ->iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1248, 31)) +>Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1249, 31)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1199, 52), Decl(lib.d.ts, 1305, 11)) +>iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1249, 31)) >x : Symbol(x, Decl(symbolProperty14.ts, 1, 24)) >y : Symbol(y, Decl(symbolProperty14.ts, 1, 27)) } @@ -13,9 +13,9 @@ interface I { >I : Symbol(I, Decl(symbolProperty14.ts, 2, 1)) [Symbol.iterator]?: { x }; ->Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1248, 31)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1198, 53), Decl(lib.d.ts, 1304, 11)) ->iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1248, 31)) +>Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1249, 31)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1199, 52), Decl(lib.d.ts, 1305, 11)) +>iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1249, 31)) >x : Symbol(x, Decl(symbolProperty14.ts, 4, 25)) } diff --git a/tests/baselines/reference/symbolProperty15.symbols b/tests/baselines/reference/symbolProperty15.symbols index ac05eb6195e74..2a83145da03b6 100644 --- a/tests/baselines/reference/symbolProperty15.symbols +++ b/tests/baselines/reference/symbolProperty15.symbols @@ -6,9 +6,9 @@ interface I { >I : Symbol(I, Decl(symbolProperty15.ts, 0, 11)) [Symbol.iterator]?: { x }; ->Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1248, 31)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1198, 53), Decl(lib.d.ts, 1304, 11)) ->iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1248, 31)) +>Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1249, 31)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1199, 52), Decl(lib.d.ts, 1305, 11)) +>iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1249, 31)) >x : Symbol(x, Decl(symbolProperty15.ts, 2, 25)) } diff --git a/tests/baselines/reference/symbolProperty16.symbols b/tests/baselines/reference/symbolProperty16.symbols index c45b22056af9c..1b4b23e951175 100644 --- a/tests/baselines/reference/symbolProperty16.symbols +++ b/tests/baselines/reference/symbolProperty16.symbols @@ -3,18 +3,18 @@ class C { >C : Symbol(C, Decl(symbolProperty16.ts, 0, 0)) private [Symbol.iterator]: { x }; ->Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1248, 31)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1198, 53), Decl(lib.d.ts, 1304, 11)) ->iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1248, 31)) +>Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1249, 31)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1199, 52), Decl(lib.d.ts, 1305, 11)) +>iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1249, 31)) >x : Symbol(x, Decl(symbolProperty16.ts, 1, 32)) } interface I { >I : Symbol(I, Decl(symbolProperty16.ts, 2, 1)) [Symbol.iterator]: { x }; ->Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1248, 31)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1198, 53), Decl(lib.d.ts, 1304, 11)) ->iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1248, 31)) +>Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1249, 31)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1199, 52), Decl(lib.d.ts, 1305, 11)) +>iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1249, 31)) >x : Symbol(x, Decl(symbolProperty16.ts, 4, 24)) } diff --git a/tests/baselines/reference/symbolProperty18.symbols b/tests/baselines/reference/symbolProperty18.symbols index 40c5a86c0e91c..89df72d65430d 100644 --- a/tests/baselines/reference/symbolProperty18.symbols +++ b/tests/baselines/reference/symbolProperty18.symbols @@ -3,39 +3,39 @@ var i = { >i : Symbol(i, Decl(symbolProperty18.ts, 0, 3)) [Symbol.iterator]: 0, ->Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1248, 31)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1198, 53), Decl(lib.d.ts, 1304, 11)) ->iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1248, 31)) +>Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1249, 31)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1199, 52), Decl(lib.d.ts, 1305, 11)) +>iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1249, 31)) [Symbol.toStringTag]() { return "" }, ->Symbol.toStringTag : Symbol(SymbolConstructor.toStringTag, Decl(lib.d.ts, 1290, 24)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1198, 53), Decl(lib.d.ts, 1304, 11)) ->toStringTag : Symbol(SymbolConstructor.toStringTag, Decl(lib.d.ts, 1290, 24)) +>Symbol.toStringTag : Symbol(SymbolConstructor.toStringTag, Decl(lib.d.ts, 1291, 24)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1199, 52), Decl(lib.d.ts, 1305, 11)) +>toStringTag : Symbol(SymbolConstructor.toStringTag, Decl(lib.d.ts, 1291, 24)) set [Symbol.toPrimitive](p: boolean) { } ->Symbol.toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, 1284, 18)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1198, 53), Decl(lib.d.ts, 1304, 11)) ->toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, 1284, 18)) +>Symbol.toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, 1285, 18)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1199, 52), Decl(lib.d.ts, 1305, 11)) +>toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, 1285, 18)) >p : Symbol(p, Decl(symbolProperty18.ts, 3, 29)) } var it = i[Symbol.iterator]; >it : Symbol(it, Decl(symbolProperty18.ts, 6, 3)) >i : Symbol(i, Decl(symbolProperty18.ts, 0, 3)) ->Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1248, 31)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1198, 53), Decl(lib.d.ts, 1304, 11)) ->iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1248, 31)) +>Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1249, 31)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1199, 52), Decl(lib.d.ts, 1305, 11)) +>iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1249, 31)) var str = i[Symbol.toStringTag](); >str : Symbol(str, Decl(symbolProperty18.ts, 7, 3)) >i : Symbol(i, Decl(symbolProperty18.ts, 0, 3)) ->Symbol.toStringTag : Symbol(SymbolConstructor.toStringTag, Decl(lib.d.ts, 1290, 24)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1198, 53), Decl(lib.d.ts, 1304, 11)) ->toStringTag : Symbol(SymbolConstructor.toStringTag, Decl(lib.d.ts, 1290, 24)) +>Symbol.toStringTag : Symbol(SymbolConstructor.toStringTag, Decl(lib.d.ts, 1291, 24)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1199, 52), Decl(lib.d.ts, 1305, 11)) +>toStringTag : Symbol(SymbolConstructor.toStringTag, Decl(lib.d.ts, 1291, 24)) i[Symbol.toPrimitive] = false; >i : Symbol(i, Decl(symbolProperty18.ts, 0, 3)) ->Symbol.toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, 1284, 18)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1198, 53), Decl(lib.d.ts, 1304, 11)) ->toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, 1284, 18)) +>Symbol.toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, 1285, 18)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1199, 52), Decl(lib.d.ts, 1305, 11)) +>toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, 1285, 18)) diff --git a/tests/baselines/reference/symbolProperty19.symbols b/tests/baselines/reference/symbolProperty19.symbols index 909c6394ec267..3ee9ed595c2ad 100644 --- a/tests/baselines/reference/symbolProperty19.symbols +++ b/tests/baselines/reference/symbolProperty19.symbols @@ -3,15 +3,15 @@ var i = { >i : Symbol(i, Decl(symbolProperty19.ts, 0, 3)) [Symbol.iterator]: { p: null }, ->Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1248, 31)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1198, 53), Decl(lib.d.ts, 1304, 11)) ->iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1248, 31)) +>Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1249, 31)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1199, 52), Decl(lib.d.ts, 1305, 11)) +>iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1249, 31)) >p : Symbol(p, Decl(symbolProperty19.ts, 1, 24)) [Symbol.toStringTag]() { return { p: undefined }; } ->Symbol.toStringTag : Symbol(SymbolConstructor.toStringTag, Decl(lib.d.ts, 1290, 24)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1198, 53), Decl(lib.d.ts, 1304, 11)) ->toStringTag : Symbol(SymbolConstructor.toStringTag, Decl(lib.d.ts, 1290, 24)) +>Symbol.toStringTag : Symbol(SymbolConstructor.toStringTag, Decl(lib.d.ts, 1291, 24)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1199, 52), Decl(lib.d.ts, 1305, 11)) +>toStringTag : Symbol(SymbolConstructor.toStringTag, Decl(lib.d.ts, 1291, 24)) >p : Symbol(p, Decl(symbolProperty19.ts, 2, 37)) >undefined : Symbol(undefined) } @@ -19,14 +19,14 @@ var i = { var it = i[Symbol.iterator]; >it : Symbol(it, Decl(symbolProperty19.ts, 5, 3)) >i : Symbol(i, Decl(symbolProperty19.ts, 0, 3)) ->Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1248, 31)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1198, 53), Decl(lib.d.ts, 1304, 11)) ->iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1248, 31)) +>Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1249, 31)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1199, 52), Decl(lib.d.ts, 1305, 11)) +>iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1249, 31)) var str = i[Symbol.toStringTag](); >str : Symbol(str, Decl(symbolProperty19.ts, 6, 3)) >i : Symbol(i, Decl(symbolProperty19.ts, 0, 3)) ->Symbol.toStringTag : Symbol(SymbolConstructor.toStringTag, Decl(lib.d.ts, 1290, 24)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1198, 53), Decl(lib.d.ts, 1304, 11)) ->toStringTag : Symbol(SymbolConstructor.toStringTag, Decl(lib.d.ts, 1290, 24)) +>Symbol.toStringTag : Symbol(SymbolConstructor.toStringTag, Decl(lib.d.ts, 1291, 24)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1199, 52), Decl(lib.d.ts, 1305, 11)) +>toStringTag : Symbol(SymbolConstructor.toStringTag, Decl(lib.d.ts, 1291, 24)) diff --git a/tests/baselines/reference/symbolProperty2.symbols b/tests/baselines/reference/symbolProperty2.symbols index 9d618e7751f87..b52c4087d7143 100644 --- a/tests/baselines/reference/symbolProperty2.symbols +++ b/tests/baselines/reference/symbolProperty2.symbols @@ -1,7 +1,7 @@ === tests/cases/conformance/es6/Symbols/symbolProperty2.ts === var s = Symbol(); >s : Symbol(s, Decl(symbolProperty2.ts, 0, 3)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1198, 53), Decl(lib.d.ts, 1304, 11)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1199, 52), Decl(lib.d.ts, 1305, 11)) var x = { >x : Symbol(x, Decl(symbolProperty2.ts, 1, 3)) diff --git a/tests/baselines/reference/symbolProperty20.symbols b/tests/baselines/reference/symbolProperty20.symbols index b12874d028bf0..ad4f0c7952351 100644 --- a/tests/baselines/reference/symbolProperty20.symbols +++ b/tests/baselines/reference/symbolProperty20.symbols @@ -3,15 +3,15 @@ interface I { >I : Symbol(I, Decl(symbolProperty20.ts, 0, 0)) [Symbol.iterator]: (s: string) => string; ->Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1248, 31)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1198, 53), Decl(lib.d.ts, 1304, 11)) ->iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1248, 31)) +>Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1249, 31)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1199, 52), Decl(lib.d.ts, 1305, 11)) +>iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1249, 31)) >s : Symbol(s, Decl(symbolProperty20.ts, 1, 24)) [Symbol.toStringTag](s: number): number; ->Symbol.toStringTag : Symbol(SymbolConstructor.toStringTag, Decl(lib.d.ts, 1290, 24)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1198, 53), Decl(lib.d.ts, 1304, 11)) ->toStringTag : Symbol(SymbolConstructor.toStringTag, Decl(lib.d.ts, 1290, 24)) +>Symbol.toStringTag : Symbol(SymbolConstructor.toStringTag, Decl(lib.d.ts, 1291, 24)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1199, 52), Decl(lib.d.ts, 1305, 11)) +>toStringTag : Symbol(SymbolConstructor.toStringTag, Decl(lib.d.ts, 1291, 24)) >s : Symbol(s, Decl(symbolProperty20.ts, 2, 25)) } @@ -20,16 +20,16 @@ var i: I = { >I : Symbol(I, Decl(symbolProperty20.ts, 0, 0)) [Symbol.iterator]: s => s, ->Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1248, 31)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1198, 53), Decl(lib.d.ts, 1304, 11)) ->iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1248, 31)) +>Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1249, 31)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1199, 52), Decl(lib.d.ts, 1305, 11)) +>iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1249, 31)) >s : Symbol(s, Decl(symbolProperty20.ts, 6, 22)) >s : Symbol(s, Decl(symbolProperty20.ts, 6, 22)) [Symbol.toStringTag](n) { return n; } ->Symbol.toStringTag : Symbol(SymbolConstructor.toStringTag, Decl(lib.d.ts, 1290, 24)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1198, 53), Decl(lib.d.ts, 1304, 11)) ->toStringTag : Symbol(SymbolConstructor.toStringTag, Decl(lib.d.ts, 1290, 24)) +>Symbol.toStringTag : Symbol(SymbolConstructor.toStringTag, Decl(lib.d.ts, 1291, 24)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1199, 52), Decl(lib.d.ts, 1305, 11)) +>toStringTag : Symbol(SymbolConstructor.toStringTag, Decl(lib.d.ts, 1291, 24)) >n : Symbol(n, Decl(symbolProperty20.ts, 7, 25)) >n : Symbol(n, Decl(symbolProperty20.ts, 7, 25)) } diff --git a/tests/baselines/reference/symbolProperty21.symbols b/tests/baselines/reference/symbolProperty21.symbols index b0632e2eaaebb..09997f687d53f 100644 --- a/tests/baselines/reference/symbolProperty21.symbols +++ b/tests/baselines/reference/symbolProperty21.symbols @@ -5,15 +5,15 @@ interface I { >U : Symbol(U, Decl(symbolProperty21.ts, 0, 14)) [Symbol.unscopables]: T; ->Symbol.unscopables : Symbol(SymbolConstructor.unscopables, Decl(lib.d.ts, 1296, 24)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1198, 53), Decl(lib.d.ts, 1304, 11)) ->unscopables : Symbol(SymbolConstructor.unscopables, Decl(lib.d.ts, 1296, 24)) +>Symbol.unscopables : Symbol(SymbolConstructor.unscopables, Decl(lib.d.ts, 1297, 24)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1199, 52), Decl(lib.d.ts, 1305, 11)) +>unscopables : Symbol(SymbolConstructor.unscopables, Decl(lib.d.ts, 1297, 24)) >T : Symbol(T, Decl(symbolProperty21.ts, 0, 12)) [Symbol.isConcatSpreadable]: U; ->Symbol.isConcatSpreadable : Symbol(SymbolConstructor.isConcatSpreadable, Decl(lib.d.ts, 1242, 24)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1198, 53), Decl(lib.d.ts, 1304, 11)) ->isConcatSpreadable : Symbol(SymbolConstructor.isConcatSpreadable, Decl(lib.d.ts, 1242, 24)) +>Symbol.isConcatSpreadable : Symbol(SymbolConstructor.isConcatSpreadable, Decl(lib.d.ts, 1243, 24)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1199, 52), Decl(lib.d.ts, 1305, 11)) +>isConcatSpreadable : Symbol(SymbolConstructor.isConcatSpreadable, Decl(lib.d.ts, 1243, 24)) >U : Symbol(U, Decl(symbolProperty21.ts, 0, 14)) } @@ -34,18 +34,18 @@ foo({ >foo : Symbol(foo, Decl(symbolProperty21.ts, 3, 1)) [Symbol.isConcatSpreadable]: "", ->Symbol.isConcatSpreadable : Symbol(SymbolConstructor.isConcatSpreadable, Decl(lib.d.ts, 1242, 24)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1198, 53), Decl(lib.d.ts, 1304, 11)) ->isConcatSpreadable : Symbol(SymbolConstructor.isConcatSpreadable, Decl(lib.d.ts, 1242, 24)) +>Symbol.isConcatSpreadable : Symbol(SymbolConstructor.isConcatSpreadable, Decl(lib.d.ts, 1243, 24)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1199, 52), Decl(lib.d.ts, 1305, 11)) +>isConcatSpreadable : Symbol(SymbolConstructor.isConcatSpreadable, Decl(lib.d.ts, 1243, 24)) [Symbol.toPrimitive]: 0, ->Symbol.toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, 1284, 18)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1198, 53), Decl(lib.d.ts, 1304, 11)) ->toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, 1284, 18)) +>Symbol.toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, 1285, 18)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1199, 52), Decl(lib.d.ts, 1305, 11)) +>toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, 1285, 18)) [Symbol.unscopables]: true ->Symbol.unscopables : Symbol(SymbolConstructor.unscopables, Decl(lib.d.ts, 1296, 24)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1198, 53), Decl(lib.d.ts, 1304, 11)) ->unscopables : Symbol(SymbolConstructor.unscopables, Decl(lib.d.ts, 1296, 24)) +>Symbol.unscopables : Symbol(SymbolConstructor.unscopables, Decl(lib.d.ts, 1297, 24)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1199, 52), Decl(lib.d.ts, 1305, 11)) +>unscopables : Symbol(SymbolConstructor.unscopables, Decl(lib.d.ts, 1297, 24)) }); diff --git a/tests/baselines/reference/symbolProperty22.symbols b/tests/baselines/reference/symbolProperty22.symbols index 4c8ec1aa7f5d2..b62037e32a507 100644 --- a/tests/baselines/reference/symbolProperty22.symbols +++ b/tests/baselines/reference/symbolProperty22.symbols @@ -5,9 +5,9 @@ interface I { >U : Symbol(U, Decl(symbolProperty22.ts, 0, 14)) [Symbol.unscopables](x: T): U; ->Symbol.unscopables : Symbol(SymbolConstructor.unscopables, Decl(lib.d.ts, 1296, 24)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1198, 53), Decl(lib.d.ts, 1304, 11)) ->unscopables : Symbol(SymbolConstructor.unscopables, Decl(lib.d.ts, 1296, 24)) +>Symbol.unscopables : Symbol(SymbolConstructor.unscopables, Decl(lib.d.ts, 1297, 24)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1199, 52), Decl(lib.d.ts, 1305, 11)) +>unscopables : Symbol(SymbolConstructor.unscopables, Decl(lib.d.ts, 1297, 24)) >x : Symbol(x, Decl(symbolProperty22.ts, 1, 25)) >T : Symbol(T, Decl(symbolProperty22.ts, 0, 12)) >U : Symbol(U, Decl(symbolProperty22.ts, 0, 14)) @@ -27,9 +27,9 @@ declare function foo(p1: T, p2: I): U; foo("", { [Symbol.unscopables]: s => s.length }); >foo : Symbol(foo, Decl(symbolProperty22.ts, 2, 1)) ->Symbol.unscopables : Symbol(SymbolConstructor.unscopables, Decl(lib.d.ts, 1296, 24)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1198, 53), Decl(lib.d.ts, 1304, 11)) ->unscopables : Symbol(SymbolConstructor.unscopables, Decl(lib.d.ts, 1296, 24)) +>Symbol.unscopables : Symbol(SymbolConstructor.unscopables, Decl(lib.d.ts, 1297, 24)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1199, 52), Decl(lib.d.ts, 1305, 11)) +>unscopables : Symbol(SymbolConstructor.unscopables, Decl(lib.d.ts, 1297, 24)) >s : Symbol(s, Decl(symbolProperty22.ts, 6, 31)) >s.length : Symbol(String.length, Decl(lib.d.ts, 414, 19)) >s : Symbol(s, Decl(symbolProperty22.ts, 6, 31)) diff --git a/tests/baselines/reference/symbolProperty23.symbols b/tests/baselines/reference/symbolProperty23.symbols index a8ebaf9534590..da9d07ffeed89 100644 --- a/tests/baselines/reference/symbolProperty23.symbols +++ b/tests/baselines/reference/symbolProperty23.symbols @@ -3,9 +3,9 @@ interface I { >I : Symbol(I, Decl(symbolProperty23.ts, 0, 0)) [Symbol.toPrimitive]: () => boolean; ->Symbol.toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, 1284, 18)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1198, 53), Decl(lib.d.ts, 1304, 11)) ->toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, 1284, 18)) +>Symbol.toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, 1285, 18)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1199, 52), Decl(lib.d.ts, 1305, 11)) +>toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, 1285, 18)) } class C implements I { @@ -13,9 +13,9 @@ class C implements I { >I : Symbol(I, Decl(symbolProperty23.ts, 0, 0)) [Symbol.toPrimitive]() { ->Symbol.toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, 1284, 18)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1198, 53), Decl(lib.d.ts, 1304, 11)) ->toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, 1284, 18)) +>Symbol.toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, 1285, 18)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1199, 52), Decl(lib.d.ts, 1305, 11)) +>toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, 1285, 18)) return true; } diff --git a/tests/baselines/reference/symbolProperty26.symbols b/tests/baselines/reference/symbolProperty26.symbols index b5c726712e4d2..46babb69a87c0 100644 --- a/tests/baselines/reference/symbolProperty26.symbols +++ b/tests/baselines/reference/symbolProperty26.symbols @@ -3,9 +3,9 @@ class C1 { >C1 : Symbol(C1, Decl(symbolProperty26.ts, 0, 0)) [Symbol.toStringTag]() { ->Symbol.toStringTag : Symbol(SymbolConstructor.toStringTag, Decl(lib.d.ts, 1290, 24)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1198, 53), Decl(lib.d.ts, 1304, 11)) ->toStringTag : Symbol(SymbolConstructor.toStringTag, Decl(lib.d.ts, 1290, 24)) +>Symbol.toStringTag : Symbol(SymbolConstructor.toStringTag, Decl(lib.d.ts, 1291, 24)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1199, 52), Decl(lib.d.ts, 1305, 11)) +>toStringTag : Symbol(SymbolConstructor.toStringTag, Decl(lib.d.ts, 1291, 24)) return ""; } @@ -16,9 +16,9 @@ class C2 extends C1 { >C1 : Symbol(C1, Decl(symbolProperty26.ts, 0, 0)) [Symbol.toStringTag]() { ->Symbol.toStringTag : Symbol(SymbolConstructor.toStringTag, Decl(lib.d.ts, 1290, 24)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1198, 53), Decl(lib.d.ts, 1304, 11)) ->toStringTag : Symbol(SymbolConstructor.toStringTag, Decl(lib.d.ts, 1290, 24)) +>Symbol.toStringTag : Symbol(SymbolConstructor.toStringTag, Decl(lib.d.ts, 1291, 24)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1199, 52), Decl(lib.d.ts, 1305, 11)) +>toStringTag : Symbol(SymbolConstructor.toStringTag, Decl(lib.d.ts, 1291, 24)) return ""; } diff --git a/tests/baselines/reference/symbolProperty27.symbols b/tests/baselines/reference/symbolProperty27.symbols index 039963b02aad7..69fe473e17c3f 100644 --- a/tests/baselines/reference/symbolProperty27.symbols +++ b/tests/baselines/reference/symbolProperty27.symbols @@ -3,9 +3,9 @@ class C1 { >C1 : Symbol(C1, Decl(symbolProperty27.ts, 0, 0)) [Symbol.toStringTag]() { ->Symbol.toStringTag : Symbol(SymbolConstructor.toStringTag, Decl(lib.d.ts, 1290, 24)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1198, 53), Decl(lib.d.ts, 1304, 11)) ->toStringTag : Symbol(SymbolConstructor.toStringTag, Decl(lib.d.ts, 1290, 24)) +>Symbol.toStringTag : Symbol(SymbolConstructor.toStringTag, Decl(lib.d.ts, 1291, 24)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1199, 52), Decl(lib.d.ts, 1305, 11)) +>toStringTag : Symbol(SymbolConstructor.toStringTag, Decl(lib.d.ts, 1291, 24)) return {}; } @@ -16,9 +16,9 @@ class C2 extends C1 { >C1 : Symbol(C1, Decl(symbolProperty27.ts, 0, 0)) [Symbol.toStringTag]() { ->Symbol.toStringTag : Symbol(SymbolConstructor.toStringTag, Decl(lib.d.ts, 1290, 24)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1198, 53), Decl(lib.d.ts, 1304, 11)) ->toStringTag : Symbol(SymbolConstructor.toStringTag, Decl(lib.d.ts, 1290, 24)) +>Symbol.toStringTag : Symbol(SymbolConstructor.toStringTag, Decl(lib.d.ts, 1291, 24)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1199, 52), Decl(lib.d.ts, 1305, 11)) +>toStringTag : Symbol(SymbolConstructor.toStringTag, Decl(lib.d.ts, 1291, 24)) return ""; } diff --git a/tests/baselines/reference/symbolProperty28.symbols b/tests/baselines/reference/symbolProperty28.symbols index 6ba9c126943c5..cf6ab1f5edba1 100644 --- a/tests/baselines/reference/symbolProperty28.symbols +++ b/tests/baselines/reference/symbolProperty28.symbols @@ -3,9 +3,9 @@ class C1 { >C1 : Symbol(C1, Decl(symbolProperty28.ts, 0, 0)) [Symbol.toStringTag]() { ->Symbol.toStringTag : Symbol(SymbolConstructor.toStringTag, Decl(lib.d.ts, 1290, 24)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1198, 53), Decl(lib.d.ts, 1304, 11)) ->toStringTag : Symbol(SymbolConstructor.toStringTag, Decl(lib.d.ts, 1290, 24)) +>Symbol.toStringTag : Symbol(SymbolConstructor.toStringTag, Decl(lib.d.ts, 1291, 24)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1199, 52), Decl(lib.d.ts, 1305, 11)) +>toStringTag : Symbol(SymbolConstructor.toStringTag, Decl(lib.d.ts, 1291, 24)) return { x: "" }; >x : Symbol(x, Decl(symbolProperty28.ts, 2, 16)) @@ -24,8 +24,8 @@ var obj = c[Symbol.toStringTag]().x; >obj : Symbol(obj, Decl(symbolProperty28.ts, 9, 3)) >c[Symbol.toStringTag]().x : Symbol(x, Decl(symbolProperty28.ts, 2, 16)) >c : Symbol(c, Decl(symbolProperty28.ts, 8, 3)) ->Symbol.toStringTag : Symbol(SymbolConstructor.toStringTag, Decl(lib.d.ts, 1290, 24)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1198, 53), Decl(lib.d.ts, 1304, 11)) ->toStringTag : Symbol(SymbolConstructor.toStringTag, Decl(lib.d.ts, 1290, 24)) +>Symbol.toStringTag : Symbol(SymbolConstructor.toStringTag, Decl(lib.d.ts, 1291, 24)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1199, 52), Decl(lib.d.ts, 1305, 11)) +>toStringTag : Symbol(SymbolConstructor.toStringTag, Decl(lib.d.ts, 1291, 24)) >x : Symbol(x, Decl(symbolProperty28.ts, 2, 16)) diff --git a/tests/baselines/reference/symbolProperty4.symbols b/tests/baselines/reference/symbolProperty4.symbols index 99961ec662981..4e17e561bce0e 100644 --- a/tests/baselines/reference/symbolProperty4.symbols +++ b/tests/baselines/reference/symbolProperty4.symbols @@ -3,13 +3,13 @@ var x = { >x : Symbol(x, Decl(symbolProperty4.ts, 0, 3)) [Symbol()]: 0, ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1198, 53), Decl(lib.d.ts, 1304, 11)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1199, 52), Decl(lib.d.ts, 1305, 11)) [Symbol()]() { }, ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1198, 53), Decl(lib.d.ts, 1304, 11)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1199, 52), Decl(lib.d.ts, 1305, 11)) get [Symbol()]() { ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1198, 53), Decl(lib.d.ts, 1304, 11)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1199, 52), Decl(lib.d.ts, 1305, 11)) return 0; } diff --git a/tests/baselines/reference/symbolProperty40.symbols b/tests/baselines/reference/symbolProperty40.symbols index 62acefd45c242..e3e469764a866 100644 --- a/tests/baselines/reference/symbolProperty40.symbols +++ b/tests/baselines/reference/symbolProperty40.symbols @@ -3,21 +3,21 @@ class C { >C : Symbol(C, Decl(symbolProperty40.ts, 0, 0)) [Symbol.iterator](x: string): string; ->Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1248, 31)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1198, 53), Decl(lib.d.ts, 1304, 11)) ->iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1248, 31)) +>Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1249, 31)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1199, 52), Decl(lib.d.ts, 1305, 11)) +>iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1249, 31)) >x : Symbol(x, Decl(symbolProperty40.ts, 1, 22)) [Symbol.iterator](x: number): number; ->Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1248, 31)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1198, 53), Decl(lib.d.ts, 1304, 11)) ->iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1248, 31)) +>Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1249, 31)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1199, 52), Decl(lib.d.ts, 1305, 11)) +>iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1249, 31)) >x : Symbol(x, Decl(symbolProperty40.ts, 2, 22)) [Symbol.iterator](x: any) { ->Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1248, 31)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1198, 53), Decl(lib.d.ts, 1304, 11)) ->iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1248, 31)) +>Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1249, 31)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1199, 52), Decl(lib.d.ts, 1305, 11)) +>iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1249, 31)) >x : Symbol(x, Decl(symbolProperty40.ts, 3, 22)) return undefined; @@ -31,13 +31,13 @@ var c = new C; c[Symbol.iterator](""); >c : Symbol(c, Decl(symbolProperty40.ts, 8, 3)) ->Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1248, 31)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1198, 53), Decl(lib.d.ts, 1304, 11)) ->iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1248, 31)) +>Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1249, 31)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1199, 52), Decl(lib.d.ts, 1305, 11)) +>iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1249, 31)) c[Symbol.iterator](0); >c : Symbol(c, Decl(symbolProperty40.ts, 8, 3)) ->Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1248, 31)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1198, 53), Decl(lib.d.ts, 1304, 11)) ->iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1248, 31)) +>Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1249, 31)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1199, 52), Decl(lib.d.ts, 1305, 11)) +>iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1249, 31)) diff --git a/tests/baselines/reference/symbolProperty41.symbols b/tests/baselines/reference/symbolProperty41.symbols index 1635419694d01..622d1b693e87f 100644 --- a/tests/baselines/reference/symbolProperty41.symbols +++ b/tests/baselines/reference/symbolProperty41.symbols @@ -3,24 +3,24 @@ class C { >C : Symbol(C, Decl(symbolProperty41.ts, 0, 0)) [Symbol.iterator](x: string): { x: string }; ->Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1248, 31)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1198, 53), Decl(lib.d.ts, 1304, 11)) ->iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1248, 31)) +>Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1249, 31)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1199, 52), Decl(lib.d.ts, 1305, 11)) +>iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1249, 31)) >x : Symbol(x, Decl(symbolProperty41.ts, 1, 22)) >x : Symbol(x, Decl(symbolProperty41.ts, 1, 35)) [Symbol.iterator](x: "hello"): { x: string; hello: string }; ->Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1248, 31)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1198, 53), Decl(lib.d.ts, 1304, 11)) ->iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1248, 31)) +>Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1249, 31)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1199, 52), Decl(lib.d.ts, 1305, 11)) +>iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1249, 31)) >x : Symbol(x, Decl(symbolProperty41.ts, 2, 22)) >x : Symbol(x, Decl(symbolProperty41.ts, 2, 36)) >hello : Symbol(hello, Decl(symbolProperty41.ts, 2, 47)) [Symbol.iterator](x: any) { ->Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1248, 31)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1198, 53), Decl(lib.d.ts, 1304, 11)) ->iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1248, 31)) +>Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1249, 31)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1199, 52), Decl(lib.d.ts, 1305, 11)) +>iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1249, 31)) >x : Symbol(x, Decl(symbolProperty41.ts, 3, 22)) return undefined; @@ -34,13 +34,13 @@ var c = new C; c[Symbol.iterator](""); >c : Symbol(c, Decl(symbolProperty41.ts, 8, 3)) ->Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1248, 31)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1198, 53), Decl(lib.d.ts, 1304, 11)) ->iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1248, 31)) +>Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1249, 31)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1199, 52), Decl(lib.d.ts, 1305, 11)) +>iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1249, 31)) c[Symbol.iterator]("hello"); >c : Symbol(c, Decl(symbolProperty41.ts, 8, 3)) ->Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1248, 31)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1198, 53), Decl(lib.d.ts, 1304, 11)) ->iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1248, 31)) +>Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1249, 31)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1199, 52), Decl(lib.d.ts, 1305, 11)) +>iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1249, 31)) diff --git a/tests/baselines/reference/symbolProperty45.symbols b/tests/baselines/reference/symbolProperty45.symbols index 67fce3aefab3e..5aba3b8c104e8 100644 --- a/tests/baselines/reference/symbolProperty45.symbols +++ b/tests/baselines/reference/symbolProperty45.symbols @@ -3,16 +3,16 @@ class C { >C : Symbol(C, Decl(symbolProperty45.ts, 0, 0)) get [Symbol.hasInstance]() { ->Symbol.hasInstance : Symbol(SymbolConstructor.hasInstance, Decl(lib.d.ts, 1234, 32)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1198, 53), Decl(lib.d.ts, 1304, 11)) ->hasInstance : Symbol(SymbolConstructor.hasInstance, Decl(lib.d.ts, 1234, 32)) +>Symbol.hasInstance : Symbol(SymbolConstructor.hasInstance, Decl(lib.d.ts, 1235, 32)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1199, 52), Decl(lib.d.ts, 1305, 11)) +>hasInstance : Symbol(SymbolConstructor.hasInstance, Decl(lib.d.ts, 1235, 32)) return ""; } get [Symbol.toPrimitive]() { ->Symbol.toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, 1284, 18)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1198, 53), Decl(lib.d.ts, 1304, 11)) ->toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, 1284, 18)) +>Symbol.toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, 1285, 18)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1199, 52), Decl(lib.d.ts, 1305, 11)) +>toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, 1285, 18)) return ""; } diff --git a/tests/baselines/reference/symbolProperty5.symbols b/tests/baselines/reference/symbolProperty5.symbols index 4dc58d689d8ac..7b57003e607a0 100644 --- a/tests/baselines/reference/symbolProperty5.symbols +++ b/tests/baselines/reference/symbolProperty5.symbols @@ -3,19 +3,19 @@ var x = { >x : Symbol(x, Decl(symbolProperty5.ts, 0, 3)) [Symbol.iterator]: 0, ->Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1248, 31)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1198, 53), Decl(lib.d.ts, 1304, 11)) ->iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1248, 31)) +>Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1249, 31)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1199, 52), Decl(lib.d.ts, 1305, 11)) +>iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1249, 31)) [Symbol.toPrimitive]() { }, ->Symbol.toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, 1284, 18)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1198, 53), Decl(lib.d.ts, 1304, 11)) ->toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, 1284, 18)) +>Symbol.toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, 1285, 18)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1199, 52), Decl(lib.d.ts, 1305, 11)) +>toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, 1285, 18)) get [Symbol.toStringTag]() { ->Symbol.toStringTag : Symbol(SymbolConstructor.toStringTag, Decl(lib.d.ts, 1290, 24)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1198, 53), Decl(lib.d.ts, 1304, 11)) ->toStringTag : Symbol(SymbolConstructor.toStringTag, Decl(lib.d.ts, 1290, 24)) +>Symbol.toStringTag : Symbol(SymbolConstructor.toStringTag, Decl(lib.d.ts, 1291, 24)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1199, 52), Decl(lib.d.ts, 1305, 11)) +>toStringTag : Symbol(SymbolConstructor.toStringTag, Decl(lib.d.ts, 1291, 24)) return 0; } diff --git a/tests/baselines/reference/symbolProperty50.symbols b/tests/baselines/reference/symbolProperty50.symbols index 9201435c09eb1..4beb1f6d9e2b9 100644 --- a/tests/baselines/reference/symbolProperty50.symbols +++ b/tests/baselines/reference/symbolProperty50.symbols @@ -9,8 +9,8 @@ module M { >C : Symbol(C, Decl(symbolProperty50.ts, 1, 24)) [Symbol.iterator]() { } ->Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1248, 31)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1198, 53), Decl(lib.d.ts, 1304, 11)) ->iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1248, 31)) +>Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1249, 31)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1199, 52), Decl(lib.d.ts, 1305, 11)) +>iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1249, 31)) } } diff --git a/tests/baselines/reference/symbolProperty51.symbols b/tests/baselines/reference/symbolProperty51.symbols index 199c51e65a3aa..32240efd98610 100644 --- a/tests/baselines/reference/symbolProperty51.symbols +++ b/tests/baselines/reference/symbolProperty51.symbols @@ -9,8 +9,8 @@ module M { >C : Symbol(C, Decl(symbolProperty51.ts, 1, 21)) [Symbol.iterator]() { } ->Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1248, 31)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1198, 53), Decl(lib.d.ts, 1304, 11)) ->iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1248, 31)) +>Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1249, 31)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1199, 52), Decl(lib.d.ts, 1305, 11)) +>iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1249, 31)) } } diff --git a/tests/baselines/reference/symbolProperty55.symbols b/tests/baselines/reference/symbolProperty55.symbols index 95521c7e7149a..05eeace3b869e 100644 --- a/tests/baselines/reference/symbolProperty55.symbols +++ b/tests/baselines/reference/symbolProperty55.symbols @@ -3,9 +3,9 @@ var obj = { >obj : Symbol(obj, Decl(symbolProperty55.ts, 0, 3)) [Symbol.iterator]: 0 ->Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1248, 31)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1198, 53), Decl(lib.d.ts, 1304, 11)) ->iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1248, 31)) +>Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1249, 31)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1199, 52), Decl(lib.d.ts, 1305, 11)) +>iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1249, 31)) }; @@ -14,13 +14,13 @@ module M { var Symbol: SymbolConstructor; >Symbol : Symbol(Symbol, Decl(symbolProperty55.ts, 5, 7)) ->SymbolConstructor : Symbol(SymbolConstructor, Decl(lib.d.ts, 1208, 1)) +>SymbolConstructor : Symbol(SymbolConstructor, Decl(lib.d.ts, 1209, 1)) // The following should be of type 'any'. This is because even though obj has a property keyed by Symbol.iterator, // the key passed in here is the *wrong* Symbol.iterator. It is not the iterator property of the global Symbol. obj[Symbol.iterator]; >obj : Symbol(obj, Decl(symbolProperty55.ts, 0, 3)) ->Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1248, 31)) +>Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1249, 31)) >Symbol : Symbol(Symbol, Decl(symbolProperty55.ts, 5, 7)) ->iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1248, 31)) +>iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1249, 31)) } diff --git a/tests/baselines/reference/symbolProperty56.symbols b/tests/baselines/reference/symbolProperty56.symbols index 97f9966e19613..a4e335cc7d7c3 100644 --- a/tests/baselines/reference/symbolProperty56.symbols +++ b/tests/baselines/reference/symbolProperty56.symbols @@ -3,9 +3,9 @@ var obj = { >obj : Symbol(obj, Decl(symbolProperty56.ts, 0, 3)) [Symbol.iterator]: 0 ->Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1248, 31)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1198, 53), Decl(lib.d.ts, 1304, 11)) ->iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1248, 31)) +>Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1249, 31)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1199, 52), Decl(lib.d.ts, 1305, 11)) +>iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1249, 31)) }; diff --git a/tests/baselines/reference/symbolProperty57.symbols b/tests/baselines/reference/symbolProperty57.symbols index bc1497aaa1479..249545872b1d0 100644 --- a/tests/baselines/reference/symbolProperty57.symbols +++ b/tests/baselines/reference/symbolProperty57.symbols @@ -3,14 +3,14 @@ var obj = { >obj : Symbol(obj, Decl(symbolProperty57.ts, 0, 3)) [Symbol.iterator]: 0 ->Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1248, 31)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1198, 53), Decl(lib.d.ts, 1304, 11)) ->iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1248, 31)) +>Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1249, 31)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1199, 52), Decl(lib.d.ts, 1305, 11)) +>iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1249, 31)) }; // Should give type 'any'. obj[Symbol["nonsense"]]; >obj : Symbol(obj, Decl(symbolProperty57.ts, 0, 3)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1198, 53), Decl(lib.d.ts, 1304, 11)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1199, 52), Decl(lib.d.ts, 1305, 11)) diff --git a/tests/baselines/reference/symbolProperty6.symbols b/tests/baselines/reference/symbolProperty6.symbols index 0dbda66432f52..78be14d086222 100644 --- a/tests/baselines/reference/symbolProperty6.symbols +++ b/tests/baselines/reference/symbolProperty6.symbols @@ -3,24 +3,24 @@ class C { >C : Symbol(C, Decl(symbolProperty6.ts, 0, 0)) [Symbol.iterator] = 0; ->Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1248, 31)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1198, 53), Decl(lib.d.ts, 1304, 11)) ->iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1248, 31)) +>Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1249, 31)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1199, 52), Decl(lib.d.ts, 1305, 11)) +>iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1249, 31)) [Symbol.unscopables]: number; ->Symbol.unscopables : Symbol(SymbolConstructor.unscopables, Decl(lib.d.ts, 1296, 24)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1198, 53), Decl(lib.d.ts, 1304, 11)) ->unscopables : Symbol(SymbolConstructor.unscopables, Decl(lib.d.ts, 1296, 24)) +>Symbol.unscopables : Symbol(SymbolConstructor.unscopables, Decl(lib.d.ts, 1297, 24)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1199, 52), Decl(lib.d.ts, 1305, 11)) +>unscopables : Symbol(SymbolConstructor.unscopables, Decl(lib.d.ts, 1297, 24)) [Symbol.toPrimitive]() { } ->Symbol.toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, 1284, 18)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1198, 53), Decl(lib.d.ts, 1304, 11)) ->toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, 1284, 18)) +>Symbol.toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, 1285, 18)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1199, 52), Decl(lib.d.ts, 1305, 11)) +>toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, 1285, 18)) get [Symbol.toStringTag]() { ->Symbol.toStringTag : Symbol(SymbolConstructor.toStringTag, Decl(lib.d.ts, 1290, 24)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1198, 53), Decl(lib.d.ts, 1304, 11)) ->toStringTag : Symbol(SymbolConstructor.toStringTag, Decl(lib.d.ts, 1290, 24)) +>Symbol.toStringTag : Symbol(SymbolConstructor.toStringTag, Decl(lib.d.ts, 1291, 24)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1199, 52), Decl(lib.d.ts, 1305, 11)) +>toStringTag : Symbol(SymbolConstructor.toStringTag, Decl(lib.d.ts, 1291, 24)) return 0; } diff --git a/tests/baselines/reference/symbolProperty8.symbols b/tests/baselines/reference/symbolProperty8.symbols index 07f572b03bc36..64452f49c9c19 100644 --- a/tests/baselines/reference/symbolProperty8.symbols +++ b/tests/baselines/reference/symbolProperty8.symbols @@ -3,12 +3,12 @@ interface I { >I : Symbol(I, Decl(symbolProperty8.ts, 0, 0)) [Symbol.unscopables]: number; ->Symbol.unscopables : Symbol(SymbolConstructor.unscopables, Decl(lib.d.ts, 1296, 24)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1198, 53), Decl(lib.d.ts, 1304, 11)) ->unscopables : Symbol(SymbolConstructor.unscopables, Decl(lib.d.ts, 1296, 24)) +>Symbol.unscopables : Symbol(SymbolConstructor.unscopables, Decl(lib.d.ts, 1297, 24)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1199, 52), Decl(lib.d.ts, 1305, 11)) +>unscopables : Symbol(SymbolConstructor.unscopables, Decl(lib.d.ts, 1297, 24)) [Symbol.toPrimitive](); ->Symbol.toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, 1284, 18)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1198, 53), Decl(lib.d.ts, 1304, 11)) ->toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, 1284, 18)) +>Symbol.toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, 1285, 18)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1199, 52), Decl(lib.d.ts, 1305, 11)) +>toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, 1285, 18)) } diff --git a/tests/baselines/reference/symbolType11.symbols b/tests/baselines/reference/symbolType11.symbols index 11be00dba4076..d40e0e7272474 100644 --- a/tests/baselines/reference/symbolType11.symbols +++ b/tests/baselines/reference/symbolType11.symbols @@ -1,9 +1,9 @@ === tests/cases/conformance/es6/Symbols/symbolType11.ts === var s = Symbol.for("logical"); >s : Symbol(s, Decl(symbolType11.ts, 0, 3)) ->Symbol.for : Symbol(SymbolConstructor.for, Decl(lib.d.ts, 1220, 42)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1198, 53), Decl(lib.d.ts, 1304, 11)) ->for : Symbol(SymbolConstructor.for, Decl(lib.d.ts, 1220, 42)) +>Symbol.for : Symbol(SymbolConstructor.for, Decl(lib.d.ts, 1221, 42)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1199, 52), Decl(lib.d.ts, 1305, 11)) +>for : Symbol(SymbolConstructor.for, Decl(lib.d.ts, 1221, 42)) s && s; >s : Symbol(s, Decl(symbolType11.ts, 0, 3)) diff --git a/tests/baselines/reference/symbolType16.symbols b/tests/baselines/reference/symbolType16.symbols index 7791f4ee2ba96..4b61749b89873 100644 --- a/tests/baselines/reference/symbolType16.symbols +++ b/tests/baselines/reference/symbolType16.symbols @@ -1,6 +1,6 @@ === tests/cases/conformance/es6/Symbols/symbolType16.ts === interface Symbol { ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1198, 53), Decl(lib.d.ts, 1304, 11), Decl(symbolType16.ts, 0, 0)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1199, 52), Decl(lib.d.ts, 1305, 11), Decl(symbolType16.ts, 0, 0)) newSymbolProp: number; >newSymbolProp : Symbol(newSymbolProp, Decl(symbolType16.ts, 0, 18)) diff --git a/tests/baselines/reference/templateStringWithEmbeddedNewOperatorES6.symbols b/tests/baselines/reference/templateStringWithEmbeddedNewOperatorES6.symbols index 8133afb527335..baa4613d26b46 100644 --- a/tests/baselines/reference/templateStringWithEmbeddedNewOperatorES6.symbols +++ b/tests/baselines/reference/templateStringWithEmbeddedNewOperatorES6.symbols @@ -1,5 +1,5 @@ === tests/cases/conformance/es6/templates/templateStringWithEmbeddedNewOperatorES6.ts === var x = `abc${ new String("Hi") }def`; >x : Symbol(x, Decl(templateStringWithEmbeddedNewOperatorES6.ts, 0, 3)) ->String : Symbol(String, Decl(lib.d.ts, 275, 1), Decl(lib.d.ts, 443, 11), Decl(lib.d.ts, 1555, 1)) +>String : Symbol(String, Decl(lib.d.ts, 275, 1), Decl(lib.d.ts, 443, 11), Decl(lib.d.ts, 1556, 1)) diff --git a/tests/baselines/reference/typedArrays.symbols b/tests/baselines/reference/typedArrays.symbols index 47ceb90c04ee1..f4a310ef0fcc2 100644 --- a/tests/baselines/reference/typedArrays.symbols +++ b/tests/baselines/reference/typedArrays.symbols @@ -8,39 +8,39 @@ function CreateTypedArrayTypes() { typedArrays[0] = Int8Array; >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 2, 7)) ->Int8Array : Symbol(Int8Array, Decl(lib.d.ts, 2116, 42), Decl(lib.d.ts, 2406, 11)) +>Int8Array : Symbol(Int8Array, Decl(lib.d.ts, 2117, 42), Decl(lib.d.ts, 2407, 11)) typedArrays[1] = Uint8Array; >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 2, 7)) ->Uint8Array : Symbol(Uint8Array, Decl(lib.d.ts, 2406, 44), Decl(lib.d.ts, 2696, 11)) +>Uint8Array : Symbol(Uint8Array, Decl(lib.d.ts, 2407, 44), Decl(lib.d.ts, 2697, 11)) typedArrays[2] = Int16Array; >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 2, 7)) ->Int16Array : Symbol(Int16Array, Decl(lib.d.ts, 2986, 60), Decl(lib.d.ts, 3276, 11)) +>Int16Array : Symbol(Int16Array, Decl(lib.d.ts, 2987, 60), Decl(lib.d.ts, 3277, 11)) typedArrays[3] = Uint16Array; >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 2, 7)) ->Uint16Array : Symbol(Uint16Array, Decl(lib.d.ts, 3276, 46), Decl(lib.d.ts, 3566, 11)) +>Uint16Array : Symbol(Uint16Array, Decl(lib.d.ts, 3277, 46), Decl(lib.d.ts, 3567, 11)) typedArrays[4] = Int32Array; >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 2, 7)) ->Int32Array : Symbol(Int32Array, Decl(lib.d.ts, 3566, 48), Decl(lib.d.ts, 3856, 11)) +>Int32Array : Symbol(Int32Array, Decl(lib.d.ts, 3567, 48), Decl(lib.d.ts, 3857, 11)) typedArrays[5] = Uint32Array; >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 2, 7)) ->Uint32Array : Symbol(Uint32Array, Decl(lib.d.ts, 3856, 46), Decl(lib.d.ts, 4146, 11)) +>Uint32Array : Symbol(Uint32Array, Decl(lib.d.ts, 3857, 46), Decl(lib.d.ts, 4147, 11)) typedArrays[6] = Float32Array; >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 2, 7)) ->Float32Array : Symbol(Float32Array, Decl(lib.d.ts, 4146, 48), Decl(lib.d.ts, 4436, 11)) +>Float32Array : Symbol(Float32Array, Decl(lib.d.ts, 4147, 48), Decl(lib.d.ts, 4437, 11)) typedArrays[7] = Float64Array; >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 2, 7)) ->Float64Array : Symbol(Float64Array, Decl(lib.d.ts, 4436, 50), Decl(lib.d.ts, 4726, 11)) +>Float64Array : Symbol(Float64Array, Decl(lib.d.ts, 4437, 50), Decl(lib.d.ts, 4727, 11)) typedArrays[8] = Uint8ClampedArray; >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 2, 7)) ->Uint8ClampedArray : Symbol(Uint8ClampedArray, Decl(lib.d.ts, 2696, 46), Decl(lib.d.ts, 2986, 11)) +>Uint8ClampedArray : Symbol(Uint8ClampedArray, Decl(lib.d.ts, 2697, 46), Decl(lib.d.ts, 2987, 11)) return typedArrays; >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 2, 7)) @@ -55,47 +55,47 @@ function CreateTypedArrayInstancesFromLength(obj: number) { typedArrays[0] = new Int8Array(obj); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 17, 7)) ->Int8Array : Symbol(Int8Array, Decl(lib.d.ts, 2116, 42), Decl(lib.d.ts, 2406, 11)) +>Int8Array : Symbol(Int8Array, Decl(lib.d.ts, 2117, 42), Decl(lib.d.ts, 2407, 11)) >obj : Symbol(obj, Decl(typedArrays.ts, 16, 45)) typedArrays[1] = new Uint8Array(obj); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 17, 7)) ->Uint8Array : Symbol(Uint8Array, Decl(lib.d.ts, 2406, 44), Decl(lib.d.ts, 2696, 11)) +>Uint8Array : Symbol(Uint8Array, Decl(lib.d.ts, 2407, 44), Decl(lib.d.ts, 2697, 11)) >obj : Symbol(obj, Decl(typedArrays.ts, 16, 45)) typedArrays[2] = new Int16Array(obj); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 17, 7)) ->Int16Array : Symbol(Int16Array, Decl(lib.d.ts, 2986, 60), Decl(lib.d.ts, 3276, 11)) +>Int16Array : Symbol(Int16Array, Decl(lib.d.ts, 2987, 60), Decl(lib.d.ts, 3277, 11)) >obj : Symbol(obj, Decl(typedArrays.ts, 16, 45)) typedArrays[3] = new Uint16Array(obj); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 17, 7)) ->Uint16Array : Symbol(Uint16Array, Decl(lib.d.ts, 3276, 46), Decl(lib.d.ts, 3566, 11)) +>Uint16Array : Symbol(Uint16Array, Decl(lib.d.ts, 3277, 46), Decl(lib.d.ts, 3567, 11)) >obj : Symbol(obj, Decl(typedArrays.ts, 16, 45)) typedArrays[4] = new Int32Array(obj); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 17, 7)) ->Int32Array : Symbol(Int32Array, Decl(lib.d.ts, 3566, 48), Decl(lib.d.ts, 3856, 11)) +>Int32Array : Symbol(Int32Array, Decl(lib.d.ts, 3567, 48), Decl(lib.d.ts, 3857, 11)) >obj : Symbol(obj, Decl(typedArrays.ts, 16, 45)) typedArrays[5] = new Uint32Array(obj); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 17, 7)) ->Uint32Array : Symbol(Uint32Array, Decl(lib.d.ts, 3856, 46), Decl(lib.d.ts, 4146, 11)) +>Uint32Array : Symbol(Uint32Array, Decl(lib.d.ts, 3857, 46), Decl(lib.d.ts, 4147, 11)) >obj : Symbol(obj, Decl(typedArrays.ts, 16, 45)) typedArrays[6] = new Float32Array(obj); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 17, 7)) ->Float32Array : Symbol(Float32Array, Decl(lib.d.ts, 4146, 48), Decl(lib.d.ts, 4436, 11)) +>Float32Array : Symbol(Float32Array, Decl(lib.d.ts, 4147, 48), Decl(lib.d.ts, 4437, 11)) >obj : Symbol(obj, Decl(typedArrays.ts, 16, 45)) typedArrays[7] = new Float64Array(obj); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 17, 7)) ->Float64Array : Symbol(Float64Array, Decl(lib.d.ts, 4436, 50), Decl(lib.d.ts, 4726, 11)) +>Float64Array : Symbol(Float64Array, Decl(lib.d.ts, 4437, 50), Decl(lib.d.ts, 4727, 11)) >obj : Symbol(obj, Decl(typedArrays.ts, 16, 45)) typedArrays[8] = new Uint8ClampedArray(obj); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 17, 7)) ->Uint8ClampedArray : Symbol(Uint8ClampedArray, Decl(lib.d.ts, 2696, 46), Decl(lib.d.ts, 2986, 11)) +>Uint8ClampedArray : Symbol(Uint8ClampedArray, Decl(lib.d.ts, 2697, 46), Decl(lib.d.ts, 2987, 11)) >obj : Symbol(obj, Decl(typedArrays.ts, 16, 45)) return typedArrays; @@ -111,47 +111,47 @@ function CreateTypedArrayInstancesFromArray(obj: number[]) { typedArrays[0] = new Int8Array(obj); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 32, 7)) ->Int8Array : Symbol(Int8Array, Decl(lib.d.ts, 2116, 42), Decl(lib.d.ts, 2406, 11)) +>Int8Array : Symbol(Int8Array, Decl(lib.d.ts, 2117, 42), Decl(lib.d.ts, 2407, 11)) >obj : Symbol(obj, Decl(typedArrays.ts, 31, 44)) typedArrays[1] = new Uint8Array(obj); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 32, 7)) ->Uint8Array : Symbol(Uint8Array, Decl(lib.d.ts, 2406, 44), Decl(lib.d.ts, 2696, 11)) +>Uint8Array : Symbol(Uint8Array, Decl(lib.d.ts, 2407, 44), Decl(lib.d.ts, 2697, 11)) >obj : Symbol(obj, Decl(typedArrays.ts, 31, 44)) typedArrays[2] = new Int16Array(obj); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 32, 7)) ->Int16Array : Symbol(Int16Array, Decl(lib.d.ts, 2986, 60), Decl(lib.d.ts, 3276, 11)) +>Int16Array : Symbol(Int16Array, Decl(lib.d.ts, 2987, 60), Decl(lib.d.ts, 3277, 11)) >obj : Symbol(obj, Decl(typedArrays.ts, 31, 44)) typedArrays[3] = new Uint16Array(obj); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 32, 7)) ->Uint16Array : Symbol(Uint16Array, Decl(lib.d.ts, 3276, 46), Decl(lib.d.ts, 3566, 11)) +>Uint16Array : Symbol(Uint16Array, Decl(lib.d.ts, 3277, 46), Decl(lib.d.ts, 3567, 11)) >obj : Symbol(obj, Decl(typedArrays.ts, 31, 44)) typedArrays[4] = new Int32Array(obj); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 32, 7)) ->Int32Array : Symbol(Int32Array, Decl(lib.d.ts, 3566, 48), Decl(lib.d.ts, 3856, 11)) +>Int32Array : Symbol(Int32Array, Decl(lib.d.ts, 3567, 48), Decl(lib.d.ts, 3857, 11)) >obj : Symbol(obj, Decl(typedArrays.ts, 31, 44)) typedArrays[5] = new Uint32Array(obj); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 32, 7)) ->Uint32Array : Symbol(Uint32Array, Decl(lib.d.ts, 3856, 46), Decl(lib.d.ts, 4146, 11)) +>Uint32Array : Symbol(Uint32Array, Decl(lib.d.ts, 3857, 46), Decl(lib.d.ts, 4147, 11)) >obj : Symbol(obj, Decl(typedArrays.ts, 31, 44)) typedArrays[6] = new Float32Array(obj); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 32, 7)) ->Float32Array : Symbol(Float32Array, Decl(lib.d.ts, 4146, 48), Decl(lib.d.ts, 4436, 11)) +>Float32Array : Symbol(Float32Array, Decl(lib.d.ts, 4147, 48), Decl(lib.d.ts, 4437, 11)) >obj : Symbol(obj, Decl(typedArrays.ts, 31, 44)) typedArrays[7] = new Float64Array(obj); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 32, 7)) ->Float64Array : Symbol(Float64Array, Decl(lib.d.ts, 4436, 50), Decl(lib.d.ts, 4726, 11)) +>Float64Array : Symbol(Float64Array, Decl(lib.d.ts, 4437, 50), Decl(lib.d.ts, 4727, 11)) >obj : Symbol(obj, Decl(typedArrays.ts, 31, 44)) typedArrays[8] = new Uint8ClampedArray(obj); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 32, 7)) ->Uint8ClampedArray : Symbol(Uint8ClampedArray, Decl(lib.d.ts, 2696, 46), Decl(lib.d.ts, 2986, 11)) +>Uint8ClampedArray : Symbol(Uint8ClampedArray, Decl(lib.d.ts, 2697, 46), Decl(lib.d.ts, 2987, 11)) >obj : Symbol(obj, Decl(typedArrays.ts, 31, 44)) return typedArrays; @@ -167,65 +167,65 @@ function CreateIntegerTypedArraysFromArray2(obj:number[]) { typedArrays[0] = Int8Array.from(obj); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 47, 7)) ->Int8Array.from : Symbol(Int8ArrayConstructor.from, Decl(lib.d.ts, 2396, 38)) ->Int8Array : Symbol(Int8Array, Decl(lib.d.ts, 2116, 42), Decl(lib.d.ts, 2406, 11)) ->from : Symbol(Int8ArrayConstructor.from, Decl(lib.d.ts, 2396, 38)) +>Int8Array.from : Symbol(Int8ArrayConstructor.from, Decl(lib.d.ts, 2397, 38)) +>Int8Array : Symbol(Int8Array, Decl(lib.d.ts, 2117, 42), Decl(lib.d.ts, 2407, 11)) +>from : Symbol(Int8ArrayConstructor.from, Decl(lib.d.ts, 2397, 38)) >obj : Symbol(obj, Decl(typedArrays.ts, 46, 44)) typedArrays[1] = Uint8Array.from(obj); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 47, 7)) ->Uint8Array.from : Symbol(Uint8ArrayConstructor.from, Decl(lib.d.ts, 2686, 39)) ->Uint8Array : Symbol(Uint8Array, Decl(lib.d.ts, 2406, 44), Decl(lib.d.ts, 2696, 11)) ->from : Symbol(Uint8ArrayConstructor.from, Decl(lib.d.ts, 2686, 39)) +>Uint8Array.from : Symbol(Uint8ArrayConstructor.from, Decl(lib.d.ts, 2687, 39)) +>Uint8Array : Symbol(Uint8Array, Decl(lib.d.ts, 2407, 44), Decl(lib.d.ts, 2697, 11)) +>from : Symbol(Uint8ArrayConstructor.from, Decl(lib.d.ts, 2687, 39)) >obj : Symbol(obj, Decl(typedArrays.ts, 46, 44)) typedArrays[2] = Int16Array.from(obj); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 47, 7)) ->Int16Array.from : Symbol(Int16ArrayConstructor.from, Decl(lib.d.ts, 3266, 39)) ->Int16Array : Symbol(Int16Array, Decl(lib.d.ts, 2986, 60), Decl(lib.d.ts, 3276, 11)) ->from : Symbol(Int16ArrayConstructor.from, Decl(lib.d.ts, 3266, 39)) +>Int16Array.from : Symbol(Int16ArrayConstructor.from, Decl(lib.d.ts, 3267, 39)) +>Int16Array : Symbol(Int16Array, Decl(lib.d.ts, 2987, 60), Decl(lib.d.ts, 3277, 11)) +>from : Symbol(Int16ArrayConstructor.from, Decl(lib.d.ts, 3267, 39)) >obj : Symbol(obj, Decl(typedArrays.ts, 46, 44)) typedArrays[3] = Uint16Array.from(obj); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 47, 7)) ->Uint16Array.from : Symbol(Uint16ArrayConstructor.from, Decl(lib.d.ts, 3556, 40)) ->Uint16Array : Symbol(Uint16Array, Decl(lib.d.ts, 3276, 46), Decl(lib.d.ts, 3566, 11)) ->from : Symbol(Uint16ArrayConstructor.from, Decl(lib.d.ts, 3556, 40)) +>Uint16Array.from : Symbol(Uint16ArrayConstructor.from, Decl(lib.d.ts, 3557, 40)) +>Uint16Array : Symbol(Uint16Array, Decl(lib.d.ts, 3277, 46), Decl(lib.d.ts, 3567, 11)) +>from : Symbol(Uint16ArrayConstructor.from, Decl(lib.d.ts, 3557, 40)) >obj : Symbol(obj, Decl(typedArrays.ts, 46, 44)) typedArrays[4] = Int32Array.from(obj); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 47, 7)) ->Int32Array.from : Symbol(Int32ArrayConstructor.from, Decl(lib.d.ts, 3846, 39)) ->Int32Array : Symbol(Int32Array, Decl(lib.d.ts, 3566, 48), Decl(lib.d.ts, 3856, 11)) ->from : Symbol(Int32ArrayConstructor.from, Decl(lib.d.ts, 3846, 39)) +>Int32Array.from : Symbol(Int32ArrayConstructor.from, Decl(lib.d.ts, 3847, 39)) +>Int32Array : Symbol(Int32Array, Decl(lib.d.ts, 3567, 48), Decl(lib.d.ts, 3857, 11)) +>from : Symbol(Int32ArrayConstructor.from, Decl(lib.d.ts, 3847, 39)) >obj : Symbol(obj, Decl(typedArrays.ts, 46, 44)) typedArrays[5] = Uint32Array.from(obj); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 47, 7)) ->Uint32Array.from : Symbol(Uint32ArrayConstructor.from, Decl(lib.d.ts, 4136, 40)) ->Uint32Array : Symbol(Uint32Array, Decl(lib.d.ts, 3856, 46), Decl(lib.d.ts, 4146, 11)) ->from : Symbol(Uint32ArrayConstructor.from, Decl(lib.d.ts, 4136, 40)) +>Uint32Array.from : Symbol(Uint32ArrayConstructor.from, Decl(lib.d.ts, 4137, 40)) +>Uint32Array : Symbol(Uint32Array, Decl(lib.d.ts, 3857, 46), Decl(lib.d.ts, 4147, 11)) +>from : Symbol(Uint32ArrayConstructor.from, Decl(lib.d.ts, 4137, 40)) >obj : Symbol(obj, Decl(typedArrays.ts, 46, 44)) typedArrays[6] = Float32Array.from(obj); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 47, 7)) ->Float32Array.from : Symbol(Float32ArrayConstructor.from, Decl(lib.d.ts, 4426, 41)) ->Float32Array : Symbol(Float32Array, Decl(lib.d.ts, 4146, 48), Decl(lib.d.ts, 4436, 11)) ->from : Symbol(Float32ArrayConstructor.from, Decl(lib.d.ts, 4426, 41)) +>Float32Array.from : Symbol(Float32ArrayConstructor.from, Decl(lib.d.ts, 4427, 41)) +>Float32Array : Symbol(Float32Array, Decl(lib.d.ts, 4147, 48), Decl(lib.d.ts, 4437, 11)) +>from : Symbol(Float32ArrayConstructor.from, Decl(lib.d.ts, 4427, 41)) >obj : Symbol(obj, Decl(typedArrays.ts, 46, 44)) typedArrays[7] = Float64Array.from(obj); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 47, 7)) ->Float64Array.from : Symbol(Float64ArrayConstructor.from, Decl(lib.d.ts, 4716, 41)) ->Float64Array : Symbol(Float64Array, Decl(lib.d.ts, 4436, 50), Decl(lib.d.ts, 4726, 11)) ->from : Symbol(Float64ArrayConstructor.from, Decl(lib.d.ts, 4716, 41)) +>Float64Array.from : Symbol(Float64ArrayConstructor.from, Decl(lib.d.ts, 4717, 41)) +>Float64Array : Symbol(Float64Array, Decl(lib.d.ts, 4437, 50), Decl(lib.d.ts, 4727, 11)) +>from : Symbol(Float64ArrayConstructor.from, Decl(lib.d.ts, 4717, 41)) >obj : Symbol(obj, Decl(typedArrays.ts, 46, 44)) typedArrays[8] = Uint8ClampedArray.from(obj); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 47, 7)) ->Uint8ClampedArray.from : Symbol(Uint8ClampedArrayConstructor.from, Decl(lib.d.ts, 2976, 46)) ->Uint8ClampedArray : Symbol(Uint8ClampedArray, Decl(lib.d.ts, 2696, 46), Decl(lib.d.ts, 2986, 11)) ->from : Symbol(Uint8ClampedArrayConstructor.from, Decl(lib.d.ts, 2976, 46)) +>Uint8ClampedArray.from : Symbol(Uint8ClampedArrayConstructor.from, Decl(lib.d.ts, 2977, 46)) +>Uint8ClampedArray : Symbol(Uint8ClampedArray, Decl(lib.d.ts, 2697, 46), Decl(lib.d.ts, 2987, 11)) +>from : Symbol(Uint8ClampedArrayConstructor.from, Decl(lib.d.ts, 2977, 46)) >obj : Symbol(obj, Decl(typedArrays.ts, 46, 44)) return typedArrays; @@ -235,72 +235,72 @@ function CreateIntegerTypedArraysFromArray2(obj:number[]) { function CreateIntegerTypedArraysFromArrayLike(obj:ArrayLike) { >CreateIntegerTypedArraysFromArrayLike : Symbol(CreateIntegerTypedArraysFromArrayLike, Decl(typedArrays.ts, 59, 1)) >obj : Symbol(obj, Decl(typedArrays.ts, 61, 47)) ->ArrayLike : Symbol(ArrayLike, Decl(lib.d.ts, 1446, 1)) +>ArrayLike : Symbol(ArrayLike, Decl(lib.d.ts, 1447, 1)) var typedArrays = []; >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 62, 7)) typedArrays[0] = Int8Array.from(obj); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 62, 7)) ->Int8Array.from : Symbol(Int8ArrayConstructor.from, Decl(lib.d.ts, 2396, 38)) ->Int8Array : Symbol(Int8Array, Decl(lib.d.ts, 2116, 42), Decl(lib.d.ts, 2406, 11)) ->from : Symbol(Int8ArrayConstructor.from, Decl(lib.d.ts, 2396, 38)) +>Int8Array.from : Symbol(Int8ArrayConstructor.from, Decl(lib.d.ts, 2397, 38)) +>Int8Array : Symbol(Int8Array, Decl(lib.d.ts, 2117, 42), Decl(lib.d.ts, 2407, 11)) +>from : Symbol(Int8ArrayConstructor.from, Decl(lib.d.ts, 2397, 38)) >obj : Symbol(obj, Decl(typedArrays.ts, 61, 47)) typedArrays[1] = Uint8Array.from(obj); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 62, 7)) ->Uint8Array.from : Symbol(Uint8ArrayConstructor.from, Decl(lib.d.ts, 2686, 39)) ->Uint8Array : Symbol(Uint8Array, Decl(lib.d.ts, 2406, 44), Decl(lib.d.ts, 2696, 11)) ->from : Symbol(Uint8ArrayConstructor.from, Decl(lib.d.ts, 2686, 39)) +>Uint8Array.from : Symbol(Uint8ArrayConstructor.from, Decl(lib.d.ts, 2687, 39)) +>Uint8Array : Symbol(Uint8Array, Decl(lib.d.ts, 2407, 44), Decl(lib.d.ts, 2697, 11)) +>from : Symbol(Uint8ArrayConstructor.from, Decl(lib.d.ts, 2687, 39)) >obj : Symbol(obj, Decl(typedArrays.ts, 61, 47)) typedArrays[2] = Int16Array.from(obj); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 62, 7)) ->Int16Array.from : Symbol(Int16ArrayConstructor.from, Decl(lib.d.ts, 3266, 39)) ->Int16Array : Symbol(Int16Array, Decl(lib.d.ts, 2986, 60), Decl(lib.d.ts, 3276, 11)) ->from : Symbol(Int16ArrayConstructor.from, Decl(lib.d.ts, 3266, 39)) +>Int16Array.from : Symbol(Int16ArrayConstructor.from, Decl(lib.d.ts, 3267, 39)) +>Int16Array : Symbol(Int16Array, Decl(lib.d.ts, 2987, 60), Decl(lib.d.ts, 3277, 11)) +>from : Symbol(Int16ArrayConstructor.from, Decl(lib.d.ts, 3267, 39)) >obj : Symbol(obj, Decl(typedArrays.ts, 61, 47)) typedArrays[3] = Uint16Array.from(obj); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 62, 7)) ->Uint16Array.from : Symbol(Uint16ArrayConstructor.from, Decl(lib.d.ts, 3556, 40)) ->Uint16Array : Symbol(Uint16Array, Decl(lib.d.ts, 3276, 46), Decl(lib.d.ts, 3566, 11)) ->from : Symbol(Uint16ArrayConstructor.from, Decl(lib.d.ts, 3556, 40)) +>Uint16Array.from : Symbol(Uint16ArrayConstructor.from, Decl(lib.d.ts, 3557, 40)) +>Uint16Array : Symbol(Uint16Array, Decl(lib.d.ts, 3277, 46), Decl(lib.d.ts, 3567, 11)) +>from : Symbol(Uint16ArrayConstructor.from, Decl(lib.d.ts, 3557, 40)) >obj : Symbol(obj, Decl(typedArrays.ts, 61, 47)) typedArrays[4] = Int32Array.from(obj); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 62, 7)) ->Int32Array.from : Symbol(Int32ArrayConstructor.from, Decl(lib.d.ts, 3846, 39)) ->Int32Array : Symbol(Int32Array, Decl(lib.d.ts, 3566, 48), Decl(lib.d.ts, 3856, 11)) ->from : Symbol(Int32ArrayConstructor.from, Decl(lib.d.ts, 3846, 39)) +>Int32Array.from : Symbol(Int32ArrayConstructor.from, Decl(lib.d.ts, 3847, 39)) +>Int32Array : Symbol(Int32Array, Decl(lib.d.ts, 3567, 48), Decl(lib.d.ts, 3857, 11)) +>from : Symbol(Int32ArrayConstructor.from, Decl(lib.d.ts, 3847, 39)) >obj : Symbol(obj, Decl(typedArrays.ts, 61, 47)) typedArrays[5] = Uint32Array.from(obj); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 62, 7)) ->Uint32Array.from : Symbol(Uint32ArrayConstructor.from, Decl(lib.d.ts, 4136, 40)) ->Uint32Array : Symbol(Uint32Array, Decl(lib.d.ts, 3856, 46), Decl(lib.d.ts, 4146, 11)) ->from : Symbol(Uint32ArrayConstructor.from, Decl(lib.d.ts, 4136, 40)) +>Uint32Array.from : Symbol(Uint32ArrayConstructor.from, Decl(lib.d.ts, 4137, 40)) +>Uint32Array : Symbol(Uint32Array, Decl(lib.d.ts, 3857, 46), Decl(lib.d.ts, 4147, 11)) +>from : Symbol(Uint32ArrayConstructor.from, Decl(lib.d.ts, 4137, 40)) >obj : Symbol(obj, Decl(typedArrays.ts, 61, 47)) typedArrays[6] = Float32Array.from(obj); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 62, 7)) ->Float32Array.from : Symbol(Float32ArrayConstructor.from, Decl(lib.d.ts, 4426, 41)) ->Float32Array : Symbol(Float32Array, Decl(lib.d.ts, 4146, 48), Decl(lib.d.ts, 4436, 11)) ->from : Symbol(Float32ArrayConstructor.from, Decl(lib.d.ts, 4426, 41)) +>Float32Array.from : Symbol(Float32ArrayConstructor.from, Decl(lib.d.ts, 4427, 41)) +>Float32Array : Symbol(Float32Array, Decl(lib.d.ts, 4147, 48), Decl(lib.d.ts, 4437, 11)) +>from : Symbol(Float32ArrayConstructor.from, Decl(lib.d.ts, 4427, 41)) >obj : Symbol(obj, Decl(typedArrays.ts, 61, 47)) typedArrays[7] = Float64Array.from(obj); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 62, 7)) ->Float64Array.from : Symbol(Float64ArrayConstructor.from, Decl(lib.d.ts, 4716, 41)) ->Float64Array : Symbol(Float64Array, Decl(lib.d.ts, 4436, 50), Decl(lib.d.ts, 4726, 11)) ->from : Symbol(Float64ArrayConstructor.from, Decl(lib.d.ts, 4716, 41)) +>Float64Array.from : Symbol(Float64ArrayConstructor.from, Decl(lib.d.ts, 4717, 41)) +>Float64Array : Symbol(Float64Array, Decl(lib.d.ts, 4437, 50), Decl(lib.d.ts, 4727, 11)) +>from : Symbol(Float64ArrayConstructor.from, Decl(lib.d.ts, 4717, 41)) >obj : Symbol(obj, Decl(typedArrays.ts, 61, 47)) typedArrays[8] = Uint8ClampedArray.from(obj); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 62, 7)) ->Uint8ClampedArray.from : Symbol(Uint8ClampedArrayConstructor.from, Decl(lib.d.ts, 2976, 46)) ->Uint8ClampedArray : Symbol(Uint8ClampedArray, Decl(lib.d.ts, 2696, 46), Decl(lib.d.ts, 2986, 11)) ->from : Symbol(Uint8ClampedArrayConstructor.from, Decl(lib.d.ts, 2976, 46)) +>Uint8ClampedArray.from : Symbol(Uint8ClampedArrayConstructor.from, Decl(lib.d.ts, 2977, 46)) +>Uint8ClampedArray : Symbol(Uint8ClampedArray, Decl(lib.d.ts, 2697, 46), Decl(lib.d.ts, 2987, 11)) +>from : Symbol(Uint8ClampedArrayConstructor.from, Decl(lib.d.ts, 2977, 46)) >obj : Symbol(obj, Decl(typedArrays.ts, 61, 47)) return typedArrays; @@ -332,57 +332,57 @@ function CreateTypedArraysOf2() { typedArrays[0] = Int8Array.of(1,2,3,4); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 94, 7)) ->Int8Array.of : Symbol(Int8ArrayConstructor.of, Decl(lib.d.ts, 2390, 30)) ->Int8Array : Symbol(Int8Array, Decl(lib.d.ts, 2116, 42), Decl(lib.d.ts, 2406, 11)) ->of : Symbol(Int8ArrayConstructor.of, Decl(lib.d.ts, 2390, 30)) +>Int8Array.of : Symbol(Int8ArrayConstructor.of, Decl(lib.d.ts, 2391, 30)) +>Int8Array : Symbol(Int8Array, Decl(lib.d.ts, 2117, 42), Decl(lib.d.ts, 2407, 11)) +>of : Symbol(Int8ArrayConstructor.of, Decl(lib.d.ts, 2391, 30)) typedArrays[1] = Uint8Array.of(1,2,3,4); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 94, 7)) ->Uint8Array.of : Symbol(Uint8ArrayConstructor.of, Decl(lib.d.ts, 2680, 30)) ->Uint8Array : Symbol(Uint8Array, Decl(lib.d.ts, 2406, 44), Decl(lib.d.ts, 2696, 11)) ->of : Symbol(Uint8ArrayConstructor.of, Decl(lib.d.ts, 2680, 30)) +>Uint8Array.of : Symbol(Uint8ArrayConstructor.of, Decl(lib.d.ts, 2681, 30)) +>Uint8Array : Symbol(Uint8Array, Decl(lib.d.ts, 2407, 44), Decl(lib.d.ts, 2697, 11)) +>of : Symbol(Uint8ArrayConstructor.of, Decl(lib.d.ts, 2681, 30)) typedArrays[2] = Int16Array.of(1,2,3,4); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 94, 7)) ->Int16Array.of : Symbol(Int16ArrayConstructor.of, Decl(lib.d.ts, 3260, 30)) ->Int16Array : Symbol(Int16Array, Decl(lib.d.ts, 2986, 60), Decl(lib.d.ts, 3276, 11)) ->of : Symbol(Int16ArrayConstructor.of, Decl(lib.d.ts, 3260, 30)) +>Int16Array.of : Symbol(Int16ArrayConstructor.of, Decl(lib.d.ts, 3261, 30)) +>Int16Array : Symbol(Int16Array, Decl(lib.d.ts, 2987, 60), Decl(lib.d.ts, 3277, 11)) +>of : Symbol(Int16ArrayConstructor.of, Decl(lib.d.ts, 3261, 30)) typedArrays[3] = Uint16Array.of(1,2,3,4); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 94, 7)) ->Uint16Array.of : Symbol(Uint16ArrayConstructor.of, Decl(lib.d.ts, 3550, 30)) ->Uint16Array : Symbol(Uint16Array, Decl(lib.d.ts, 3276, 46), Decl(lib.d.ts, 3566, 11)) ->of : Symbol(Uint16ArrayConstructor.of, Decl(lib.d.ts, 3550, 30)) +>Uint16Array.of : Symbol(Uint16ArrayConstructor.of, Decl(lib.d.ts, 3551, 30)) +>Uint16Array : Symbol(Uint16Array, Decl(lib.d.ts, 3277, 46), Decl(lib.d.ts, 3567, 11)) +>of : Symbol(Uint16ArrayConstructor.of, Decl(lib.d.ts, 3551, 30)) typedArrays[4] = Int32Array.of(1,2,3,4); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 94, 7)) ->Int32Array.of : Symbol(Int32ArrayConstructor.of, Decl(lib.d.ts, 3840, 30)) ->Int32Array : Symbol(Int32Array, Decl(lib.d.ts, 3566, 48), Decl(lib.d.ts, 3856, 11)) ->of : Symbol(Int32ArrayConstructor.of, Decl(lib.d.ts, 3840, 30)) +>Int32Array.of : Symbol(Int32ArrayConstructor.of, Decl(lib.d.ts, 3841, 30)) +>Int32Array : Symbol(Int32Array, Decl(lib.d.ts, 3567, 48), Decl(lib.d.ts, 3857, 11)) +>of : Symbol(Int32ArrayConstructor.of, Decl(lib.d.ts, 3841, 30)) typedArrays[5] = Uint32Array.of(1,2,3,4); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 94, 7)) ->Uint32Array.of : Symbol(Uint32ArrayConstructor.of, Decl(lib.d.ts, 4130, 30)) ->Uint32Array : Symbol(Uint32Array, Decl(lib.d.ts, 3856, 46), Decl(lib.d.ts, 4146, 11)) ->of : Symbol(Uint32ArrayConstructor.of, Decl(lib.d.ts, 4130, 30)) +>Uint32Array.of : Symbol(Uint32ArrayConstructor.of, Decl(lib.d.ts, 4131, 30)) +>Uint32Array : Symbol(Uint32Array, Decl(lib.d.ts, 3857, 46), Decl(lib.d.ts, 4147, 11)) +>of : Symbol(Uint32ArrayConstructor.of, Decl(lib.d.ts, 4131, 30)) typedArrays[6] = Float32Array.of(1,2,3,4); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 94, 7)) ->Float32Array.of : Symbol(Float32ArrayConstructor.of, Decl(lib.d.ts, 4420, 30)) ->Float32Array : Symbol(Float32Array, Decl(lib.d.ts, 4146, 48), Decl(lib.d.ts, 4436, 11)) ->of : Symbol(Float32ArrayConstructor.of, Decl(lib.d.ts, 4420, 30)) +>Float32Array.of : Symbol(Float32ArrayConstructor.of, Decl(lib.d.ts, 4421, 30)) +>Float32Array : Symbol(Float32Array, Decl(lib.d.ts, 4147, 48), Decl(lib.d.ts, 4437, 11)) +>of : Symbol(Float32ArrayConstructor.of, Decl(lib.d.ts, 4421, 30)) typedArrays[7] = Float64Array.of(1,2,3,4); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 94, 7)) ->Float64Array.of : Symbol(Float64ArrayConstructor.of, Decl(lib.d.ts, 4710, 30)) ->Float64Array : Symbol(Float64Array, Decl(lib.d.ts, 4436, 50), Decl(lib.d.ts, 4726, 11)) ->of : Symbol(Float64ArrayConstructor.of, Decl(lib.d.ts, 4710, 30)) +>Float64Array.of : Symbol(Float64ArrayConstructor.of, Decl(lib.d.ts, 4711, 30)) +>Float64Array : Symbol(Float64Array, Decl(lib.d.ts, 4437, 50), Decl(lib.d.ts, 4727, 11)) +>of : Symbol(Float64ArrayConstructor.of, Decl(lib.d.ts, 4711, 30)) typedArrays[8] = Uint8ClampedArray.of(1,2,3,4); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 94, 7)) ->Uint8ClampedArray.of : Symbol(Uint8ClampedArrayConstructor.of, Decl(lib.d.ts, 2970, 30)) ->Uint8ClampedArray : Symbol(Uint8ClampedArray, Decl(lib.d.ts, 2696, 46), Decl(lib.d.ts, 2986, 11)) ->of : Symbol(Uint8ClampedArrayConstructor.of, Decl(lib.d.ts, 2970, 30)) +>Uint8ClampedArray.of : Symbol(Uint8ClampedArrayConstructor.of, Decl(lib.d.ts, 2971, 30)) +>Uint8ClampedArray : Symbol(Uint8ClampedArray, Decl(lib.d.ts, 2697, 46), Decl(lib.d.ts, 2987, 11)) +>of : Symbol(Uint8ClampedArrayConstructor.of, Decl(lib.d.ts, 2971, 30)) return typedArrays; >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 94, 7)) @@ -391,7 +391,7 @@ function CreateTypedArraysOf2() { function CreateTypedArraysFromMapFn(obj:ArrayLike, mapFn: (n:number, v:number)=> number) { >CreateTypedArraysFromMapFn : Symbol(CreateTypedArraysFromMapFn, Decl(typedArrays.ts, 106, 1)) >obj : Symbol(obj, Decl(typedArrays.ts, 108, 36)) ->ArrayLike : Symbol(ArrayLike, Decl(lib.d.ts, 1446, 1)) +>ArrayLike : Symbol(ArrayLike, Decl(lib.d.ts, 1447, 1)) >mapFn : Symbol(mapFn, Decl(typedArrays.ts, 108, 58)) >n : Symbol(n, Decl(typedArrays.ts, 108, 67)) >v : Symbol(v, Decl(typedArrays.ts, 108, 76)) @@ -401,73 +401,73 @@ function CreateTypedArraysFromMapFn(obj:ArrayLike, mapFn: (n:number, v:n typedArrays[0] = Int8Array.from(obj, mapFn); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 109, 7)) ->Int8Array.from : Symbol(Int8ArrayConstructor.from, Decl(lib.d.ts, 2396, 38)) ->Int8Array : Symbol(Int8Array, Decl(lib.d.ts, 2116, 42), Decl(lib.d.ts, 2406, 11)) ->from : Symbol(Int8ArrayConstructor.from, Decl(lib.d.ts, 2396, 38)) +>Int8Array.from : Symbol(Int8ArrayConstructor.from, Decl(lib.d.ts, 2397, 38)) +>Int8Array : Symbol(Int8Array, Decl(lib.d.ts, 2117, 42), Decl(lib.d.ts, 2407, 11)) +>from : Symbol(Int8ArrayConstructor.from, Decl(lib.d.ts, 2397, 38)) >obj : Symbol(obj, Decl(typedArrays.ts, 108, 36)) >mapFn : Symbol(mapFn, Decl(typedArrays.ts, 108, 58)) typedArrays[1] = Uint8Array.from(obj, mapFn); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 109, 7)) ->Uint8Array.from : Symbol(Uint8ArrayConstructor.from, Decl(lib.d.ts, 2686, 39)) ->Uint8Array : Symbol(Uint8Array, Decl(lib.d.ts, 2406, 44), Decl(lib.d.ts, 2696, 11)) ->from : Symbol(Uint8ArrayConstructor.from, Decl(lib.d.ts, 2686, 39)) +>Uint8Array.from : Symbol(Uint8ArrayConstructor.from, Decl(lib.d.ts, 2687, 39)) +>Uint8Array : Symbol(Uint8Array, Decl(lib.d.ts, 2407, 44), Decl(lib.d.ts, 2697, 11)) +>from : Symbol(Uint8ArrayConstructor.from, Decl(lib.d.ts, 2687, 39)) >obj : Symbol(obj, Decl(typedArrays.ts, 108, 36)) >mapFn : Symbol(mapFn, Decl(typedArrays.ts, 108, 58)) typedArrays[2] = Int16Array.from(obj, mapFn); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 109, 7)) ->Int16Array.from : Symbol(Int16ArrayConstructor.from, Decl(lib.d.ts, 3266, 39)) ->Int16Array : Symbol(Int16Array, Decl(lib.d.ts, 2986, 60), Decl(lib.d.ts, 3276, 11)) ->from : Symbol(Int16ArrayConstructor.from, Decl(lib.d.ts, 3266, 39)) +>Int16Array.from : Symbol(Int16ArrayConstructor.from, Decl(lib.d.ts, 3267, 39)) +>Int16Array : Symbol(Int16Array, Decl(lib.d.ts, 2987, 60), Decl(lib.d.ts, 3277, 11)) +>from : Symbol(Int16ArrayConstructor.from, Decl(lib.d.ts, 3267, 39)) >obj : Symbol(obj, Decl(typedArrays.ts, 108, 36)) >mapFn : Symbol(mapFn, Decl(typedArrays.ts, 108, 58)) typedArrays[3] = Uint16Array.from(obj, mapFn); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 109, 7)) ->Uint16Array.from : Symbol(Uint16ArrayConstructor.from, Decl(lib.d.ts, 3556, 40)) ->Uint16Array : Symbol(Uint16Array, Decl(lib.d.ts, 3276, 46), Decl(lib.d.ts, 3566, 11)) ->from : Symbol(Uint16ArrayConstructor.from, Decl(lib.d.ts, 3556, 40)) +>Uint16Array.from : Symbol(Uint16ArrayConstructor.from, Decl(lib.d.ts, 3557, 40)) +>Uint16Array : Symbol(Uint16Array, Decl(lib.d.ts, 3277, 46), Decl(lib.d.ts, 3567, 11)) +>from : Symbol(Uint16ArrayConstructor.from, Decl(lib.d.ts, 3557, 40)) >obj : Symbol(obj, Decl(typedArrays.ts, 108, 36)) >mapFn : Symbol(mapFn, Decl(typedArrays.ts, 108, 58)) typedArrays[4] = Int32Array.from(obj, mapFn); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 109, 7)) ->Int32Array.from : Symbol(Int32ArrayConstructor.from, Decl(lib.d.ts, 3846, 39)) ->Int32Array : Symbol(Int32Array, Decl(lib.d.ts, 3566, 48), Decl(lib.d.ts, 3856, 11)) ->from : Symbol(Int32ArrayConstructor.from, Decl(lib.d.ts, 3846, 39)) +>Int32Array.from : Symbol(Int32ArrayConstructor.from, Decl(lib.d.ts, 3847, 39)) +>Int32Array : Symbol(Int32Array, Decl(lib.d.ts, 3567, 48), Decl(lib.d.ts, 3857, 11)) +>from : Symbol(Int32ArrayConstructor.from, Decl(lib.d.ts, 3847, 39)) >obj : Symbol(obj, Decl(typedArrays.ts, 108, 36)) >mapFn : Symbol(mapFn, Decl(typedArrays.ts, 108, 58)) typedArrays[5] = Uint32Array.from(obj, mapFn); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 109, 7)) ->Uint32Array.from : Symbol(Uint32ArrayConstructor.from, Decl(lib.d.ts, 4136, 40)) ->Uint32Array : Symbol(Uint32Array, Decl(lib.d.ts, 3856, 46), Decl(lib.d.ts, 4146, 11)) ->from : Symbol(Uint32ArrayConstructor.from, Decl(lib.d.ts, 4136, 40)) +>Uint32Array.from : Symbol(Uint32ArrayConstructor.from, Decl(lib.d.ts, 4137, 40)) +>Uint32Array : Symbol(Uint32Array, Decl(lib.d.ts, 3857, 46), Decl(lib.d.ts, 4147, 11)) +>from : Symbol(Uint32ArrayConstructor.from, Decl(lib.d.ts, 4137, 40)) >obj : Symbol(obj, Decl(typedArrays.ts, 108, 36)) >mapFn : Symbol(mapFn, Decl(typedArrays.ts, 108, 58)) typedArrays[6] = Float32Array.from(obj, mapFn); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 109, 7)) ->Float32Array.from : Symbol(Float32ArrayConstructor.from, Decl(lib.d.ts, 4426, 41)) ->Float32Array : Symbol(Float32Array, Decl(lib.d.ts, 4146, 48), Decl(lib.d.ts, 4436, 11)) ->from : Symbol(Float32ArrayConstructor.from, Decl(lib.d.ts, 4426, 41)) +>Float32Array.from : Symbol(Float32ArrayConstructor.from, Decl(lib.d.ts, 4427, 41)) +>Float32Array : Symbol(Float32Array, Decl(lib.d.ts, 4147, 48), Decl(lib.d.ts, 4437, 11)) +>from : Symbol(Float32ArrayConstructor.from, Decl(lib.d.ts, 4427, 41)) >obj : Symbol(obj, Decl(typedArrays.ts, 108, 36)) >mapFn : Symbol(mapFn, Decl(typedArrays.ts, 108, 58)) typedArrays[7] = Float64Array.from(obj, mapFn); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 109, 7)) ->Float64Array.from : Symbol(Float64ArrayConstructor.from, Decl(lib.d.ts, 4716, 41)) ->Float64Array : Symbol(Float64Array, Decl(lib.d.ts, 4436, 50), Decl(lib.d.ts, 4726, 11)) ->from : Symbol(Float64ArrayConstructor.from, Decl(lib.d.ts, 4716, 41)) +>Float64Array.from : Symbol(Float64ArrayConstructor.from, Decl(lib.d.ts, 4717, 41)) +>Float64Array : Symbol(Float64Array, Decl(lib.d.ts, 4437, 50), Decl(lib.d.ts, 4727, 11)) +>from : Symbol(Float64ArrayConstructor.from, Decl(lib.d.ts, 4717, 41)) >obj : Symbol(obj, Decl(typedArrays.ts, 108, 36)) >mapFn : Symbol(mapFn, Decl(typedArrays.ts, 108, 58)) typedArrays[8] = Uint8ClampedArray.from(obj, mapFn); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 109, 7)) ->Uint8ClampedArray.from : Symbol(Uint8ClampedArrayConstructor.from, Decl(lib.d.ts, 2976, 46)) ->Uint8ClampedArray : Symbol(Uint8ClampedArray, Decl(lib.d.ts, 2696, 46), Decl(lib.d.ts, 2986, 11)) ->from : Symbol(Uint8ClampedArrayConstructor.from, Decl(lib.d.ts, 2976, 46)) +>Uint8ClampedArray.from : Symbol(Uint8ClampedArrayConstructor.from, Decl(lib.d.ts, 2977, 46)) +>Uint8ClampedArray : Symbol(Uint8ClampedArray, Decl(lib.d.ts, 2697, 46), Decl(lib.d.ts, 2987, 11)) +>from : Symbol(Uint8ClampedArrayConstructor.from, Decl(lib.d.ts, 2977, 46)) >obj : Symbol(obj, Decl(typedArrays.ts, 108, 36)) >mapFn : Symbol(mapFn, Decl(typedArrays.ts, 108, 58)) @@ -478,7 +478,7 @@ function CreateTypedArraysFromMapFn(obj:ArrayLike, mapFn: (n:number, v:n function CreateTypedArraysFromThisObj(obj:ArrayLike, mapFn: (n:number, v:number)=> number, thisArg: {}) { >CreateTypedArraysFromThisObj : Symbol(CreateTypedArraysFromThisObj, Decl(typedArrays.ts, 121, 1)) >obj : Symbol(obj, Decl(typedArrays.ts, 123, 38)) ->ArrayLike : Symbol(ArrayLike, Decl(lib.d.ts, 1446, 1)) +>ArrayLike : Symbol(ArrayLike, Decl(lib.d.ts, 1447, 1)) >mapFn : Symbol(mapFn, Decl(typedArrays.ts, 123, 60)) >n : Symbol(n, Decl(typedArrays.ts, 123, 69)) >v : Symbol(v, Decl(typedArrays.ts, 123, 78)) @@ -489,81 +489,81 @@ function CreateTypedArraysFromThisObj(obj:ArrayLike, mapFn: (n:number, v typedArrays[0] = Int8Array.from(obj, mapFn, thisArg); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 124, 7)) ->Int8Array.from : Symbol(Int8ArrayConstructor.from, Decl(lib.d.ts, 2396, 38)) ->Int8Array : Symbol(Int8Array, Decl(lib.d.ts, 2116, 42), Decl(lib.d.ts, 2406, 11)) ->from : Symbol(Int8ArrayConstructor.from, Decl(lib.d.ts, 2396, 38)) +>Int8Array.from : Symbol(Int8ArrayConstructor.from, Decl(lib.d.ts, 2397, 38)) +>Int8Array : Symbol(Int8Array, Decl(lib.d.ts, 2117, 42), Decl(lib.d.ts, 2407, 11)) +>from : Symbol(Int8ArrayConstructor.from, Decl(lib.d.ts, 2397, 38)) >obj : Symbol(obj, Decl(typedArrays.ts, 123, 38)) >mapFn : Symbol(mapFn, Decl(typedArrays.ts, 123, 60)) >thisArg : Symbol(thisArg, Decl(typedArrays.ts, 123, 98)) typedArrays[1] = Uint8Array.from(obj, mapFn, thisArg); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 124, 7)) ->Uint8Array.from : Symbol(Uint8ArrayConstructor.from, Decl(lib.d.ts, 2686, 39)) ->Uint8Array : Symbol(Uint8Array, Decl(lib.d.ts, 2406, 44), Decl(lib.d.ts, 2696, 11)) ->from : Symbol(Uint8ArrayConstructor.from, Decl(lib.d.ts, 2686, 39)) +>Uint8Array.from : Symbol(Uint8ArrayConstructor.from, Decl(lib.d.ts, 2687, 39)) +>Uint8Array : Symbol(Uint8Array, Decl(lib.d.ts, 2407, 44), Decl(lib.d.ts, 2697, 11)) +>from : Symbol(Uint8ArrayConstructor.from, Decl(lib.d.ts, 2687, 39)) >obj : Symbol(obj, Decl(typedArrays.ts, 123, 38)) >mapFn : Symbol(mapFn, Decl(typedArrays.ts, 123, 60)) >thisArg : Symbol(thisArg, Decl(typedArrays.ts, 123, 98)) typedArrays[2] = Int16Array.from(obj, mapFn, thisArg); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 124, 7)) ->Int16Array.from : Symbol(Int16ArrayConstructor.from, Decl(lib.d.ts, 3266, 39)) ->Int16Array : Symbol(Int16Array, Decl(lib.d.ts, 2986, 60), Decl(lib.d.ts, 3276, 11)) ->from : Symbol(Int16ArrayConstructor.from, Decl(lib.d.ts, 3266, 39)) +>Int16Array.from : Symbol(Int16ArrayConstructor.from, Decl(lib.d.ts, 3267, 39)) +>Int16Array : Symbol(Int16Array, Decl(lib.d.ts, 2987, 60), Decl(lib.d.ts, 3277, 11)) +>from : Symbol(Int16ArrayConstructor.from, Decl(lib.d.ts, 3267, 39)) >obj : Symbol(obj, Decl(typedArrays.ts, 123, 38)) >mapFn : Symbol(mapFn, Decl(typedArrays.ts, 123, 60)) >thisArg : Symbol(thisArg, Decl(typedArrays.ts, 123, 98)) typedArrays[3] = Uint16Array.from(obj, mapFn, thisArg); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 124, 7)) ->Uint16Array.from : Symbol(Uint16ArrayConstructor.from, Decl(lib.d.ts, 3556, 40)) ->Uint16Array : Symbol(Uint16Array, Decl(lib.d.ts, 3276, 46), Decl(lib.d.ts, 3566, 11)) ->from : Symbol(Uint16ArrayConstructor.from, Decl(lib.d.ts, 3556, 40)) +>Uint16Array.from : Symbol(Uint16ArrayConstructor.from, Decl(lib.d.ts, 3557, 40)) +>Uint16Array : Symbol(Uint16Array, Decl(lib.d.ts, 3277, 46), Decl(lib.d.ts, 3567, 11)) +>from : Symbol(Uint16ArrayConstructor.from, Decl(lib.d.ts, 3557, 40)) >obj : Symbol(obj, Decl(typedArrays.ts, 123, 38)) >mapFn : Symbol(mapFn, Decl(typedArrays.ts, 123, 60)) >thisArg : Symbol(thisArg, Decl(typedArrays.ts, 123, 98)) typedArrays[4] = Int32Array.from(obj, mapFn, thisArg); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 124, 7)) ->Int32Array.from : Symbol(Int32ArrayConstructor.from, Decl(lib.d.ts, 3846, 39)) ->Int32Array : Symbol(Int32Array, Decl(lib.d.ts, 3566, 48), Decl(lib.d.ts, 3856, 11)) ->from : Symbol(Int32ArrayConstructor.from, Decl(lib.d.ts, 3846, 39)) +>Int32Array.from : Symbol(Int32ArrayConstructor.from, Decl(lib.d.ts, 3847, 39)) +>Int32Array : Symbol(Int32Array, Decl(lib.d.ts, 3567, 48), Decl(lib.d.ts, 3857, 11)) +>from : Symbol(Int32ArrayConstructor.from, Decl(lib.d.ts, 3847, 39)) >obj : Symbol(obj, Decl(typedArrays.ts, 123, 38)) >mapFn : Symbol(mapFn, Decl(typedArrays.ts, 123, 60)) >thisArg : Symbol(thisArg, Decl(typedArrays.ts, 123, 98)) typedArrays[5] = Uint32Array.from(obj, mapFn, thisArg); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 124, 7)) ->Uint32Array.from : Symbol(Uint32ArrayConstructor.from, Decl(lib.d.ts, 4136, 40)) ->Uint32Array : Symbol(Uint32Array, Decl(lib.d.ts, 3856, 46), Decl(lib.d.ts, 4146, 11)) ->from : Symbol(Uint32ArrayConstructor.from, Decl(lib.d.ts, 4136, 40)) +>Uint32Array.from : Symbol(Uint32ArrayConstructor.from, Decl(lib.d.ts, 4137, 40)) +>Uint32Array : Symbol(Uint32Array, Decl(lib.d.ts, 3857, 46), Decl(lib.d.ts, 4147, 11)) +>from : Symbol(Uint32ArrayConstructor.from, Decl(lib.d.ts, 4137, 40)) >obj : Symbol(obj, Decl(typedArrays.ts, 123, 38)) >mapFn : Symbol(mapFn, Decl(typedArrays.ts, 123, 60)) >thisArg : Symbol(thisArg, Decl(typedArrays.ts, 123, 98)) typedArrays[6] = Float32Array.from(obj, mapFn, thisArg); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 124, 7)) ->Float32Array.from : Symbol(Float32ArrayConstructor.from, Decl(lib.d.ts, 4426, 41)) ->Float32Array : Symbol(Float32Array, Decl(lib.d.ts, 4146, 48), Decl(lib.d.ts, 4436, 11)) ->from : Symbol(Float32ArrayConstructor.from, Decl(lib.d.ts, 4426, 41)) +>Float32Array.from : Symbol(Float32ArrayConstructor.from, Decl(lib.d.ts, 4427, 41)) +>Float32Array : Symbol(Float32Array, Decl(lib.d.ts, 4147, 48), Decl(lib.d.ts, 4437, 11)) +>from : Symbol(Float32ArrayConstructor.from, Decl(lib.d.ts, 4427, 41)) >obj : Symbol(obj, Decl(typedArrays.ts, 123, 38)) >mapFn : Symbol(mapFn, Decl(typedArrays.ts, 123, 60)) >thisArg : Symbol(thisArg, Decl(typedArrays.ts, 123, 98)) typedArrays[7] = Float64Array.from(obj, mapFn, thisArg); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 124, 7)) ->Float64Array.from : Symbol(Float64ArrayConstructor.from, Decl(lib.d.ts, 4716, 41)) ->Float64Array : Symbol(Float64Array, Decl(lib.d.ts, 4436, 50), Decl(lib.d.ts, 4726, 11)) ->from : Symbol(Float64ArrayConstructor.from, Decl(lib.d.ts, 4716, 41)) +>Float64Array.from : Symbol(Float64ArrayConstructor.from, Decl(lib.d.ts, 4717, 41)) +>Float64Array : Symbol(Float64Array, Decl(lib.d.ts, 4437, 50), Decl(lib.d.ts, 4727, 11)) +>from : Symbol(Float64ArrayConstructor.from, Decl(lib.d.ts, 4717, 41)) >obj : Symbol(obj, Decl(typedArrays.ts, 123, 38)) >mapFn : Symbol(mapFn, Decl(typedArrays.ts, 123, 60)) >thisArg : Symbol(thisArg, Decl(typedArrays.ts, 123, 98)) typedArrays[8] = Uint8ClampedArray.from(obj, mapFn, thisArg); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 124, 7)) ->Uint8ClampedArray.from : Symbol(Uint8ClampedArrayConstructor.from, Decl(lib.d.ts, 2976, 46)) ->Uint8ClampedArray : Symbol(Uint8ClampedArray, Decl(lib.d.ts, 2696, 46), Decl(lib.d.ts, 2986, 11)) ->from : Symbol(Uint8ClampedArrayConstructor.from, Decl(lib.d.ts, 2976, 46)) +>Uint8ClampedArray.from : Symbol(Uint8ClampedArrayConstructor.from, Decl(lib.d.ts, 2977, 46)) +>Uint8ClampedArray : Symbol(Uint8ClampedArray, Decl(lib.d.ts, 2697, 46), Decl(lib.d.ts, 2987, 11)) +>from : Symbol(Uint8ClampedArrayConstructor.from, Decl(lib.d.ts, 2977, 46)) >obj : Symbol(obj, Decl(typedArrays.ts, 123, 38)) >mapFn : Symbol(mapFn, Decl(typedArrays.ts, 123, 60)) >thisArg : Symbol(thisArg, Decl(typedArrays.ts, 123, 98)) From f1c99f3397edcf01300f77e5f2d7b66a89cfb090 Mon Sep 17 00:00:00 2001 From: Cyrus Najmabadi Date: Tue, 16 Jun 2015 13:25:46 -0700 Subject: [PATCH 22/35] Remove generatorParameter and asyncParameter contexts. --- src/compiler/checker.ts | 32 ++++- .../diagnosticInformationMap.generated.ts | 2 + src/compiler/diagnosticMessages.json | 9 +- src/compiler/parser.ts | 134 ++++++------------ src/compiler/types.ts | 14 +- .../FunctionDeclaration10_es6.errors.txt | 20 ++- .../reference/FunctionDeclaration10_es6.js | 4 +- .../FunctionDeclaration6_es6.errors.txt | 4 +- .../FunctionDeclaration7_es6.errors.txt | 4 +- .../asyncArrowFunction6_es6.errors.txt | 9 +- .../reference/asyncArrowFunction6_es6.js | 2 +- .../asyncArrowFunction7_es6.errors.txt | 9 +- .../reference/asyncArrowFunction7_es6.js | 2 +- .../asyncArrowFunction9_es6.errors.txt | 23 +++ .../reference/asyncArrowFunction9_es6.js | 6 +- .../reference/asyncArrowFunction9_es6.symbols | 8 -- .../reference/asyncArrowFunction9_es6.types | 10 -- .../asyncFunctionDeclaration10_es6.errors.txt | 26 ++++ .../asyncFunctionDeclaration10_es6.js | 7 +- .../asyncFunctionDeclaration10_es6.symbols | 8 -- .../asyncFunctionDeclaration10_es6.types | 9 -- .../asyncFunctionDeclaration6_es6.errors.txt | 9 +- .../asyncFunctionDeclaration6_es6.js | 2 +- .../asyncFunctionDeclaration7_es6.errors.txt | 9 +- .../asyncFunctionDeclaration7_es6.js | 2 +- 25 files changed, 186 insertions(+), 178 deletions(-) create mode 100644 tests/baselines/reference/asyncArrowFunction9_es6.errors.txt delete mode 100644 tests/baselines/reference/asyncArrowFunction9_es6.symbols delete mode 100644 tests/baselines/reference/asyncArrowFunction9_es6.types create mode 100644 tests/baselines/reference/asyncFunctionDeclaration10_es6.errors.txt delete mode 100644 tests/baselines/reference/asyncFunctionDeclaration10_es6.symbols delete mode 100644 tests/baselines/reference/asyncFunctionDeclaration10_es6.types diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index 1ee1e1cd09485..c39cb04302510 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -6083,6 +6083,18 @@ namespace ts { return undefined; } + function isInParameterInitializerBeforeContainingFunction(node: Node) { + while (node.parent && !isFunctionLike(node.parent)) { + if (node.parent.kind === SyntaxKind.Parameter && (node.parent).initializer === node) { + return true; + } + + node = node.parent; + } + + return false; + } + function getContextualReturnType(functionDecl: FunctionLikeDeclaration): Type { // If the containing function has a return type annotation, is a constructor, or is a get accessor whose // corresponding set accessor has a type annotation, return statements in the function are contextually typed @@ -8031,8 +8043,14 @@ namespace ts { function checkAwaitExpression(node: AwaitExpression): Type { // Grammar checking - if (!(node.parserContextFlags & ParserContextFlags.Await)) { - grammarErrorOnFirstToken(node, Diagnostics.await_expression_is_only_allowed_within_an_async_function); + if (produceDiagnostics) { + if (!(node.parserContextFlags & ParserContextFlags.Await)) { + grammarErrorOnFirstToken(node, Diagnostics.await_expression_is_only_allowed_within_an_async_function); + } + + if (isInParameterInitializerBeforeContainingFunction(node)) { + error(node, Diagnostics.await_expressions_cannot_be_used_in_a_parameter_initializer); + } } let operandType = checkExpression(node.expression); @@ -8465,8 +8483,14 @@ namespace ts { function checkYieldExpression(node: YieldExpression): Type { // Grammar checking - if (!(node.parserContextFlags & ParserContextFlags.Yield) || isYieldExpressionInClass(node)) { - grammarErrorOnFirstToken(node, Diagnostics.A_yield_expression_is_only_allowed_in_a_generator_body); + if (produceDiagnostics) { + if (!(node.parserContextFlags & ParserContextFlags.Yield) || isYieldExpressionInClass(node)) { + grammarErrorOnFirstToken(node, Diagnostics.A_yield_expression_is_only_allowed_in_a_generator_body); + } + + if (isInParameterInitializerBeforeContainingFunction(node)) { + error(node, Diagnostics.yield_expressions_cannot_be_used_in_a_parameter_initializer); + } } if (node.expression) { diff --git a/src/compiler/diagnosticInformationMap.generated.ts b/src/compiler/diagnosticInformationMap.generated.ts index 6118e62a1a757..08efa93781c67 100644 --- a/src/compiler/diagnosticInformationMap.generated.ts +++ b/src/compiler/diagnosticInformationMap.generated.ts @@ -398,6 +398,8 @@ namespace ts { Duplicate_identifier_0_Compiler_uses_declaration_1_to_support_async_functions: { code: 2520, category: DiagnosticCategory.Error, key: "Duplicate identifier '{0}'. Compiler uses declaration '{1}' to support async functions." }, Expression_resolves_to_variable_declaration_0_that_compiler_uses_to_support_async_functions: { code: 2521, category: DiagnosticCategory.Error, key: "Expression resolves to variable declaration '{0}' that compiler uses to support async functions." }, The_arguments_object_cannot_be_referenced_in_an_async_arrow_function_Consider_using_a_standard_async_function_expression: { code: 2522, category: DiagnosticCategory.Error, key: "The 'arguments' object cannot be referenced in an async arrow function. Consider using a standard async function expression." }, + yield_expressions_cannot_be_used_in_a_parameter_initializer: { code: 2523, category: DiagnosticCategory.Error, key: "'yield' expressions cannot be used in a parameter initializer." }, + await_expressions_cannot_be_used_in_a_parameter_initializer: { code: 2524, category: DiagnosticCategory.Error, key: "'await' expressions cannot be used in a parameter initializer." }, Import_declaration_0_is_using_private_name_1: { code: 4000, category: DiagnosticCategory.Error, key: "Import declaration '{0}' is using private name '{1}'." }, Type_parameter_0_of_exported_class_has_or_is_using_private_name_1: { code: 4002, category: DiagnosticCategory.Error, key: "Type parameter '{0}' of exported class has or is using private name '{1}'." }, Type_parameter_0_of_exported_interface_has_or_is_using_private_name_1: { code: 4004, category: DiagnosticCategory.Error, key: "Type parameter '{0}' of exported interface has or is using private name '{1}'." }, diff --git a/src/compiler/diagnosticMessages.json b/src/compiler/diagnosticMessages.json index 7e256bbe8ce3f..05f2690ae43be 100644 --- a/src/compiler/diagnosticMessages.json +++ b/src/compiler/diagnosticMessages.json @@ -1570,7 +1570,6 @@ "category": "Error", "code": 2505 }, - "Duplicate identifier '{0}'. Compiler uses declaration '{1}' to support async functions.": { "category": "Error", "code": 2520 @@ -1583,6 +1582,14 @@ "category": "Error", "code": 2522 }, + "'yield' expressions cannot be used in a parameter initializer.": { + "category": "Error", + "code": 2523 + }, + "'await' expressions cannot be used in a parameter initializer.": { + "category": "Error", + "code": 2524 + }, "Import declaration '{0}' is using private name '{1}'.": { "category": "Error", diff --git a/src/compiler/parser.ts b/src/compiler/parser.ts index 6059aec65ae3b..2bff3ee72debc 100644 --- a/src/compiler/parser.ts +++ b/src/compiler/parser.ts @@ -661,10 +661,6 @@ namespace ts { setContextFlag(val, ParserContextFlags.Yield); } - function setGeneratorParameterContext(val: boolean) { - setContextFlag(val, ParserContextFlags.GeneratorParameter); - } - function setDecoratorContext(val: boolean) { setContextFlag(val, ParserContextFlags.Decorator); } @@ -672,11 +668,7 @@ namespace ts { function setAwaitContext(val: boolean) { setContextFlag(val, ParserContextFlags.Await); } - - function setAsyncParameterContext(val: boolean) { - setContextFlag(val, ParserContextFlags.AsyncParameter); - } - + function doOutsideOfContext(context: ParserContextFlags, func: () => T): T { // contextFlagsToClear will contain only the context flags that are // currently set that we need to temporarily clear @@ -767,10 +759,6 @@ namespace ts { return inContext(ParserContextFlags.StrictMode); } - function inGeneratorParameterContext() { - return inContext(ParserContextFlags.GeneratorParameter); - } - function inDisallowInContext() { return inContext(ParserContextFlags.DisallowIn); } @@ -782,15 +770,7 @@ namespace ts { function inAwaitContext() { return inContext(ParserContextFlags.Await); } - - function inAsyncParameterContext() { - return inContext(ParserContextFlags.AsyncParameter); - } - function inGeneratorParameterOrAsyncParameterContext() { - return inContext(ParserContextFlags.GeneratorParameter | ParserContextFlags.AsyncParameter); - } - function parseErrorAtCurrentToken(message: DiagnosticMessage, arg0?: any): void { let start = scanner.getTokenPos(); let length = scanner.getTextPos() - start; @@ -1083,24 +1063,16 @@ namespace ts { } function parseComputedPropertyName(): ComputedPropertyName { - // PropertyName[Yield,GeneratorParameter] : - // LiteralPropertyName - // [+GeneratorParameter] ComputedPropertyName - // [+AsyncParameter] ComputedPropertyName - // [~GeneratorParameter,~AsyncParameter] ComputedPropertyName[?Yield,?Await] - // - // ComputedPropertyName[Yield] : - // [ AssignmentExpression[In, ?Yield] ] - // + // PropertyName [Yield]: + // LiteralPropertyName + // ComputedPropertyName[?Yield] let node = createNode(SyntaxKind.ComputedPropertyName); parseExpected(SyntaxKind.OpenBracketToken); // We parse any expression (including a comma expression). But the grammar // says that only an assignment expression is allowed, so the grammar checker // will error if it sees a comma expression. - node.expression = inGeneratorParameterOrAsyncParameterContext() - ? doOutsideOfYieldAndAwaitContext(allowInAndParseExpression) - : allowInAnd(parseExpression); + node.expression = allowInAnd(parseExpression); parseExpected(SyntaxKind.CloseBracketToken); return finishNode(node); @@ -1991,8 +1963,8 @@ namespace ts { node.dotDotDotToken = parseOptionalToken(SyntaxKind.DotDotDotToken); setModifiers(node, parseModifiers()); - // FormalParameter[Yield,GeneratorParameter,Await,AsyncParameter] : (Modified) See 14.1 - // BindingElement[?Yield,?GeneratorParameter,?Await,?AsyncParameter] + // FormalParameter [Yield,Await]: + // BindingElement[?Yield,?Await] node.name = parseIdentifierOrPattern(); @@ -2024,18 +1996,7 @@ namespace ts { } function parseBindingElementInitializer(inParameter: boolean) { - // BindingElement[Yield,GeneratorParameter,Await,AsyncParameter] : - // [+GeneratorParameter] BindingPattern[?Yield,?Await,?AsyncParameter,GeneratorParameter] Initializer[In]opt - // [+AsyncParameter] BindingPattern[?Yield,?GeneratorParameter,?Await,AsyncParameter] Initializer[In]opt - // [~GeneratorParameter,~AsyncParameter] BindingPattern[?Yield,?Await] Initializer[In,?Yield,?Await]opt - // SingleNameBinding[Yield,GeneratorParameter,Await,AsyncParameter] : - // [+GeneratorParameter] BindingIdentifier[Yield, ?Await] Initializer[In]opt - // [+AsyncParameter] BindingIdentifier[Await, ?Yield] Initializer[In]opt - // [~GeneratorParameter,~AsyncParameter] BindingIdentifier[?Yield,?Await] Initializer[In,?Yield,?Await]opt - let parseInitializer = inParameter ? parseParameterInitializer : parseNonParameterInitializer; - return inGeneratorParameterOrAsyncParameterContext() - ? doOutsideOfYieldAndAwaitContext(parseInitializer) - : parseInitializer(); + return inParameter ? parseParameterInitializer() : parseNonParameterInitializer(); } function parseParameterInitializer() { @@ -2043,14 +2004,15 @@ namespace ts { } function fillSignature( - returnToken: SyntaxKind, - yieldAndGeneratorParameterContext: boolean, - awaitAndAsyncParameterContext: boolean, - requireCompleteParameterList: boolean, - signature: SignatureDeclaration): void { + returnToken: SyntaxKind, + yieldContext: boolean, + awaitContext: boolean, + requireCompleteParameterList: boolean, + signature: SignatureDeclaration): void { + let returnTokenRequired = returnToken === SyntaxKind.EqualsGreaterThanToken; signature.typeParameters = parseTypeParameters(); - signature.parameters = parseParameterList(yieldAndGeneratorParameterContext, awaitAndAsyncParameterContext, requireCompleteParameterList); + signature.parameters = parseParameterList(yieldContext, awaitContext, requireCompleteParameterList); if (returnTokenRequired) { parseExpected(returnToken); @@ -2061,44 +2023,31 @@ namespace ts { } } - // Note: after careful analysis of the grammar, it does not appear to be possible to - // have 'Yield' And 'GeneratorParameter' not in sync. i.e. any production calling - // this FormalParameters production either always sets both to true, or always sets - // both to false. As such we only have a single parameter to represent both. - function parseParameterList(yieldAndGeneratorParameterContext: boolean, awaitAndAsyncParameterContext: boolean, requireCompleteParameterList: boolean) { - // FormalParameters[Yield,GeneratorParameter,Await,AsyncParameter] : (Modified) - // ... + function parseParameterList(yieldContext: boolean, awaitContext: boolean, requireCompleteParameterList: boolean) { + // FormalParameters [Yield,Await]: (modified) + // [empty] + // FormalParameterList[?Yield,Await] // - // FormalParameter[Yield,GeneratorParameter,Await,AsyncParameter] : (Modified) - // BindingElement[?Yield,?GeneratorParameter,?Await,?AsyncParameter] + // FormalParameter[Yield,Await]: (modified) + // BindingElement[?Yield,Await] // - // BindingElement[Yield,GeneratorParameter,Await,AsyncParameter] : (Modified) See 13.2.3 - // SingleNameBinding[?Yield,?GeneratorParameter,?Await,?AsyncParameter] - // [+GeneratorParameter]BindingPattern[?Yield,?Await,?AsyncParameter,GeneratorParameter] Initializer[In]opt - // [+AsyncParameter]BindingPattern[?Yield,?Await,?GeneratorParameter,AsyncParameter] Initializer[In]opt - // [~GeneratorParameter,~AsyncParameter]BindingPattern[?Yield,?Await]Initializer[In,?Yield,?Await]opt + // BindingElement [Yield,Await]: (modified) + // SingleNameBinding[?Yield,?Await] + // BindingPattern[?Yield,?Await]Initializer [In, ?Yield,?Await] opt // - // SingleNameBinding[Yield,GeneratorParameter,Await,AsyncParameter] : (Modified) See 13.2.3 - // [+GeneratorParameter]BindingIdentifier[Yield]Initializer[In]opt - // [+AsyncParameter]BindingIdentifier[Await]Initializer[In]opt - // [~GeneratorParameter,~AsyncParameter]BindingIdentifier[?Yield,?Await]Initializer[In,?Yield,?Await]opt + // SingleNameBinding [Yield,Await]: + // BindingIdentifier[?Yield,?Await]Initializer [In, ?Yield,?Await] opt if (parseExpected(SyntaxKind.OpenParenToken)) { let savedYieldContext = inYieldContext(); - let savedGeneratorParameterContext = inGeneratorParameterContext(); let savedAwaitContext = inAwaitContext(); - let savedAsyncParameterContext = inAsyncParameterContext(); - setYieldContext(yieldAndGeneratorParameterContext); - setGeneratorParameterContext(yieldAndGeneratorParameterContext); - setAwaitContext(awaitAndAsyncParameterContext); - setAsyncParameterContext(awaitAndAsyncParameterContext); + setYieldContext(yieldContext); + setAwaitContext(awaitContext); let result = parseDelimitedList(ParsingContext.Parameters, parseParameter); setYieldContext(savedYieldContext); - setGeneratorParameterContext(savedGeneratorParameterContext); setAwaitContext(savedAwaitContext); - setAsyncParameterContext(savedAsyncParameterContext); if (!parseExpected(SyntaxKind.CloseParenToken) && requireCompleteParameterList) { // Caller insisted that we had to end with a ) We didn't. So just return @@ -2131,7 +2080,7 @@ namespace ts { if (kind === SyntaxKind.ConstructSignature) { parseExpected(SyntaxKind.NewKeyword); } - fillSignature(SyntaxKind.ColonToken, /*yieldAndGeneratorParameterContext*/ false, /*awaitAndAsyncParameterContext*/ false, /*requireCompleteParameterList*/ false, node); + fillSignature(SyntaxKind.ColonToken, /*yieldContext*/ false, /*awaitContext*/ false, /*requireCompleteParameterList*/ false, node); parseTypeMemberSemicolon(); return finishNode(node); } @@ -2220,8 +2169,8 @@ namespace ts { method.questionToken = questionToken; // Method signatues don't exist in expression contexts. So they have neither - // [Yield] nor [GeneratorParameter] - fillSignature(SyntaxKind.ColonToken, /*yieldAndGeneratorParameterContext*/ false, /*awaitAndAsyncParameterContext*/ false, /*requireCompleteParameterList*/ false, method); + // [Yield] nor [Await] + fillSignature(SyntaxKind.ColonToken, /*yieldContext*/ false, /*awaitContext*/ false, /*requireCompleteParameterList*/ false, method); parseTypeMemberSemicolon(); return finishNode(method); } @@ -2360,7 +2309,7 @@ namespace ts { if (kind === SyntaxKind.ConstructorType) { parseExpected(SyntaxKind.NewKeyword); } - fillSignature(SyntaxKind.EqualsGreaterThanToken, /*yieldAndGeneratorParameterContext*/ false, /*awaitAndAsyncParameterContext*/ false, /*requireCompleteParameterList*/ false, node); + fillSignature(SyntaxKind.EqualsGreaterThanToken, /*yieldContext*/ false, /*awaitContext*/ false, /*requireCompleteParameterList*/ false, node); return finishNode(node); } @@ -2912,7 +2861,7 @@ namespace ts { // a => (b => c) // And think that "(b =>" was actually a parenthesized arrow function with a missing // close paren. - fillSignature(SyntaxKind.ColonToken, /*yieldAndGeneratorParameterContext*/ false, /*awaitAndAsyncParameterContext*/ isAsync, /*requireCompleteParameterList*/ !allowAmbiguity, node); + fillSignature(SyntaxKind.ColonToken, /*yieldContext*/ false, /*awaitContext*/ isAsync, /*requireCompleteParameterList*/ !allowAmbiguity, node); // If we couldn't get parameters, we definitely could not parse out an arrow function. if (!node.parameters) { @@ -3566,11 +3515,12 @@ namespace ts { return finishNode(node); } - // GeneratorExpression : function parseFunctionExpression(): FunctionExpression { - // function * BindingIdentifier[Yield]opt (FormalParameters[Yield, GeneratorParameter]) { GeneratorBody[Yield] } + // GeneratorExpression: + // function* BindingIdentifier [Yield][opt](FormalParameters[Yield]){ GeneratorBody } + // // FunctionExpression: - // function BindingIdentifieropt(FormalParameters) { FunctionBody } + // function BindingIdentifier[opt](FormalParameters){ FunctionBody } let saveDecoratorContext = inDecoratorContext(); if (saveDecoratorContext) { setDecoratorContext(false); @@ -3589,7 +3539,7 @@ namespace ts { isAsync ? doInAwaitContext(parseOptionalIdentifier) : parseOptionalIdentifier(); - fillSignature(SyntaxKind.ColonToken, /*yieldAndGeneratorParameterContext*/ isGenerator, /*awaitAndAsyncParameterContext*/ isAsync, /*requireCompleteParameterList*/ false, node); + fillSignature(SyntaxKind.ColonToken, /*yieldContext*/ isGenerator, /*awaitContext*/ isAsync, /*requireCompleteParameterList*/ false, node); node.body = parseFunctionBlock(/*allowYield*/ isGenerator, /*allowAwait*/ isAsync, /*ignoreMissingOpenBrace*/ false); if (saveDecoratorContext) { @@ -4303,7 +4253,7 @@ namespace ts { node.name = node.flags & NodeFlags.Default ? parseOptionalIdentifier() : parseIdentifier(); let isGenerator = !!node.asteriskToken; let isAsync = isAsyncFunctionLike(node); - fillSignature(SyntaxKind.ColonToken, /*yieldAndGeneratorParameterContext*/ isGenerator, /*awaitAndAsyncParameterContext*/ isAsync, /*requireCompleteParameterList*/ false, node); + fillSignature(SyntaxKind.ColonToken, /*yieldContext*/ isGenerator, /*awaitContext*/ isAsync, /*requireCompleteParameterList*/ false, node); node.body = parseFunctionBlockOrSemicolon(isGenerator, isAsync, Diagnostics.or_expected); return finishNode(node); } @@ -4313,7 +4263,7 @@ namespace ts { node.decorators = decorators; setModifiers(node, modifiers); parseExpected(SyntaxKind.ConstructorKeyword); - fillSignature(SyntaxKind.ColonToken, /*yieldAndGeneratorParameterContext*/ false, /*awaitAndAsyncParameterContext*/ false, /*requireCompleteParameterList*/ false, node); + fillSignature(SyntaxKind.ColonToken, /*yieldContext*/ false, /*awaitContext*/ false, /*requireCompleteParameterList*/ false, node); node.body = parseFunctionBlockOrSemicolon(/*isGenerator*/ false, /*isAsync*/ false, Diagnostics.or_expected); return finishNode(node); } @@ -4327,7 +4277,7 @@ namespace ts { method.questionToken = questionToken; let isGenerator = !!asteriskToken; let isAsync = isAsyncFunctionLike(method); - fillSignature(SyntaxKind.ColonToken, /*yieldAndGeneratorParameterContext*/ isGenerator, /*awaitAndAsyncParameterContext*/ isAsync, /*requireCompleteParameterList*/ false, method); + fillSignature(SyntaxKind.ColonToken, /*yieldContext*/ isGenerator, /*awaitContext*/ isAsync, /*requireCompleteParameterList*/ false, method); method.body = parseFunctionBlockOrSemicolon(isGenerator, isAsync, diagnosticMessage); return finishNode(method); } @@ -4381,7 +4331,7 @@ namespace ts { node.decorators = decorators; setModifiers(node, modifiers); node.name = parsePropertyName(); - fillSignature(SyntaxKind.ColonToken, /*yieldAndGeneratorParameterContext*/ false, /*awaitAndAsyncParameterContext*/ false, /*requireCompleteParameterList*/ false, node); + fillSignature(SyntaxKind.ColonToken, /*yieldContext*/ false, /*awaitContext*/ false, /*requireCompleteParameterList*/ false, node); node.body = parseFunctionBlockOrSemicolon(/*isGenerator*/ false, /*isAsync*/ false); return finishNode(node); } diff --git a/src/compiler/types.ts b/src/compiler/types.ts index 9022295ccfbb2..e1aa071a7d927 100644 --- a/src/compiler/types.ts +++ b/src/compiler/types.ts @@ -376,18 +376,12 @@ namespace ts { // If this node was parsed in the 'yield' context created when parsing a generator. Yield = 1 << 2, - // If this node was parsed in the parameters of a generator. - GeneratorParameter = 1 << 3, - // If this node was parsed as part of a decorator Decorator = 1 << 4, // If this node was parsed in the 'await' context created when parsing an async function. Await = 1 << 5, - // If this node was parsed in the parameters of an async function. - AsyncParameter = 1 << 6, - // If the parser encountered an error when parsing the code that created this node. Note // the parser only sets this directly on the node it creates right after encountering the // error. @@ -398,14 +392,10 @@ namespace ts { JavaScriptFile = 1 << 8, // Context flags set directly by the parser. - ParserGeneratedFlags = StrictMode | DisallowIn | Yield | GeneratorParameter | Decorator | ThisNodeHasError | Await | AsyncParameter, - - // Context flags passed as part of the modified ES6 grammar. - YieldAndGeneratorParameterFlags = Yield | GeneratorParameter, - AwaitAndAsyncParameterFlags = Await | AsyncParameter, + ParserGeneratedFlags = StrictMode | DisallowIn | Yield | Decorator | ThisNodeHasError | Await, // Exclude these flags when parsing a Type - TypeExcludesFlags = YieldAndGeneratorParameterFlags | AwaitAndAsyncParameterFlags, + TypeExcludesFlags = Yield | Await, // Context flags computed by aggregating child flags upwards. diff --git a/tests/baselines/reference/FunctionDeclaration10_es6.errors.txt b/tests/baselines/reference/FunctionDeclaration10_es6.errors.txt index 35edf48564afc..6efd10dce099f 100644 --- a/tests/baselines/reference/FunctionDeclaration10_es6.errors.txt +++ b/tests/baselines/reference/FunctionDeclaration10_es6.errors.txt @@ -1,8 +1,20 @@ -tests/cases/conformance/es6/functionDeclarations/FunctionDeclaration10_es6.ts(1,10): error TS1220: Generators are only available when targeting ECMAScript 6 or higher. +tests/cases/conformance/es6/functionDeclarations/FunctionDeclaration10_es6.ts(1,16): error TS2371: A parameter initializer is only allowed in a function or constructor implementation. +tests/cases/conformance/es6/functionDeclarations/FunctionDeclaration10_es6.ts(1,26): error TS1005: ',' expected. +tests/cases/conformance/es6/functionDeclarations/FunctionDeclaration10_es6.ts(1,29): error TS1138: Parameter declaration expected. +tests/cases/conformance/es6/functionDeclarations/FunctionDeclaration10_es6.ts(1,29): error TS2304: Cannot find name 'yield'. +tests/cases/conformance/es6/functionDeclarations/FunctionDeclaration10_es6.ts(1,34): error TS1005: ';' expected. -==== tests/cases/conformance/es6/functionDeclarations/FunctionDeclaration10_es6.ts (1 errors) ==== +==== tests/cases/conformance/es6/functionDeclarations/FunctionDeclaration10_es6.ts (5 errors) ==== function * foo(a = yield => yield) { - ~ -!!! error TS1220: Generators are only available when targeting ECMAScript 6 or higher. + ~~~~~~~~~ +!!! error TS2371: A parameter initializer is only allowed in a function or constructor implementation. + ~~ +!!! error TS1005: ',' expected. + ~~~~~ +!!! error TS1138: Parameter declaration expected. + ~~~~~ +!!! error TS2304: Cannot find name 'yield'. + ~ +!!! error TS1005: ';' expected. } \ No newline at end of file diff --git a/tests/baselines/reference/FunctionDeclaration10_es6.js b/tests/baselines/reference/FunctionDeclaration10_es6.js index 5169453396463..ccff1ac10362b 100644 --- a/tests/baselines/reference/FunctionDeclaration10_es6.js +++ b/tests/baselines/reference/FunctionDeclaration10_es6.js @@ -3,6 +3,6 @@ function * foo(a = yield => yield) { } //// [FunctionDeclaration10_es6.js] -function foo(a) { - if (a === void 0) { a = function (yield) { return yield; }; } +yield; +{ } diff --git a/tests/baselines/reference/FunctionDeclaration6_es6.errors.txt b/tests/baselines/reference/FunctionDeclaration6_es6.errors.txt index 9f696e710847f..eae7628f04657 100644 --- a/tests/baselines/reference/FunctionDeclaration6_es6.errors.txt +++ b/tests/baselines/reference/FunctionDeclaration6_es6.errors.txt @@ -1,5 +1,5 @@ tests/cases/conformance/es6/functionDeclarations/FunctionDeclaration6_es6.ts(1,9): error TS1220: Generators are only available when targeting ECMAScript 6 or higher. -tests/cases/conformance/es6/functionDeclarations/FunctionDeclaration6_es6.ts(1,18): error TS2304: Cannot find name 'yield'. +tests/cases/conformance/es6/functionDeclarations/FunctionDeclaration6_es6.ts(1,18): error TS2523: 'yield' expressions cannot be used in a parameter initializer. ==== tests/cases/conformance/es6/functionDeclarations/FunctionDeclaration6_es6.ts (2 errors) ==== @@ -7,5 +7,5 @@ tests/cases/conformance/es6/functionDeclarations/FunctionDeclaration6_es6.ts(1,1 ~ !!! error TS1220: Generators are only available when targeting ECMAScript 6 or higher. ~~~~~ -!!! error TS2304: Cannot find name 'yield'. +!!! error TS2523: 'yield' expressions cannot be used in a parameter initializer. } \ No newline at end of file diff --git a/tests/baselines/reference/FunctionDeclaration7_es6.errors.txt b/tests/baselines/reference/FunctionDeclaration7_es6.errors.txt index 91fab36ed3118..4a9e4bca6d3eb 100644 --- a/tests/baselines/reference/FunctionDeclaration7_es6.errors.txt +++ b/tests/baselines/reference/FunctionDeclaration7_es6.errors.txt @@ -1,6 +1,6 @@ tests/cases/conformance/es6/functionDeclarations/FunctionDeclaration7_es6.ts(1,9): error TS1220: Generators are only available when targeting ECMAScript 6 or higher. tests/cases/conformance/es6/functionDeclarations/FunctionDeclaration7_es6.ts(3,11): error TS1220: Generators are only available when targeting ECMAScript 6 or higher. -tests/cases/conformance/es6/functionDeclarations/FunctionDeclaration7_es6.ts(3,20): error TS2304: Cannot find name 'yield'. +tests/cases/conformance/es6/functionDeclarations/FunctionDeclaration7_es6.ts(3,20): error TS2523: 'yield' expressions cannot be used in a parameter initializer. ==== tests/cases/conformance/es6/functionDeclarations/FunctionDeclaration7_es6.ts (3 errors) ==== @@ -12,6 +12,6 @@ tests/cases/conformance/es6/functionDeclarations/FunctionDeclaration7_es6.ts(3,2 ~ !!! error TS1220: Generators are only available when targeting ECMAScript 6 or higher. ~~~~~ -!!! error TS2304: Cannot find name 'yield'. +!!! error TS2523: 'yield' expressions cannot be used in a parameter initializer. } } \ No newline at end of file diff --git a/tests/baselines/reference/asyncArrowFunction6_es6.errors.txt b/tests/baselines/reference/asyncArrowFunction6_es6.errors.txt index c5a34f513b029..111e4ff46d095 100644 --- a/tests/baselines/reference/asyncArrowFunction6_es6.errors.txt +++ b/tests/baselines/reference/asyncArrowFunction6_es6.errors.txt @@ -1,9 +1,12 @@ -tests/cases/conformance/async/es6/asyncArrowFunction/asyncArrowFunction6_es6.ts(2,22): error TS2304: Cannot find name 'await'. +tests/cases/conformance/async/es6/asyncArrowFunction/asyncArrowFunction6_es6.ts(2,22): error TS2524: 'await' expressions cannot be used in a parameter initializer. +tests/cases/conformance/async/es6/asyncArrowFunction/asyncArrowFunction6_es6.ts(2,27): error TS1109: Expression expected. -==== tests/cases/conformance/async/es6/asyncArrowFunction/asyncArrowFunction6_es6.ts (1 errors) ==== +==== tests/cases/conformance/async/es6/asyncArrowFunction/asyncArrowFunction6_es6.ts (2 errors) ==== var foo = async (a = await): Promise => { ~~~~~ -!!! error TS2304: Cannot find name 'await'. +!!! error TS2524: 'await' expressions cannot be used in a parameter initializer. + ~ +!!! error TS1109: Expression expected. } \ No newline at end of file diff --git a/tests/baselines/reference/asyncArrowFunction6_es6.js b/tests/baselines/reference/asyncArrowFunction6_es6.js index 48035057fe05d..5353903d10e94 100644 --- a/tests/baselines/reference/asyncArrowFunction6_es6.js +++ b/tests/baselines/reference/asyncArrowFunction6_es6.js @@ -4,6 +4,6 @@ var foo = async (a = await): Promise => { } //// [asyncArrowFunction6_es6.js] -var foo = (a = await) => __awaiter(function* () { +var foo = (a = yield ) => __awaiter(function* () { }, this, void 0, Promise); diff --git a/tests/baselines/reference/asyncArrowFunction7_es6.errors.txt b/tests/baselines/reference/asyncArrowFunction7_es6.errors.txt index 823d779c601c5..6376626d0e717 100644 --- a/tests/baselines/reference/asyncArrowFunction7_es6.errors.txt +++ b/tests/baselines/reference/asyncArrowFunction7_es6.errors.txt @@ -1,12 +1,15 @@ -tests/cases/conformance/async/es6/asyncArrowFunction/asyncArrowFunction7_es6.ts(4,24): error TS2304: Cannot find name 'await'. +tests/cases/conformance/async/es6/asyncArrowFunction/asyncArrowFunction7_es6.ts(4,24): error TS2524: 'await' expressions cannot be used in a parameter initializer. +tests/cases/conformance/async/es6/asyncArrowFunction/asyncArrowFunction7_es6.ts(4,29): error TS1109: Expression expected. -==== tests/cases/conformance/async/es6/asyncArrowFunction/asyncArrowFunction7_es6.ts (1 errors) ==== +==== tests/cases/conformance/async/es6/asyncArrowFunction/asyncArrowFunction7_es6.ts (2 errors) ==== var bar = async (): Promise => { // 'await' here is an identifier, and not an await expression. var foo = async (a = await): Promise => { ~~~~~ -!!! error TS2304: Cannot find name 'await'. +!!! error TS2524: 'await' expressions cannot be used in a parameter initializer. + ~ +!!! error TS1109: Expression expected. } } \ No newline at end of file diff --git a/tests/baselines/reference/asyncArrowFunction7_es6.js b/tests/baselines/reference/asyncArrowFunction7_es6.js index 6f8cf6141a893..b3c5f536550d6 100644 --- a/tests/baselines/reference/asyncArrowFunction7_es6.js +++ b/tests/baselines/reference/asyncArrowFunction7_es6.js @@ -9,7 +9,7 @@ var bar = async (): Promise => { //// [asyncArrowFunction7_es6.js] var bar = () => __awaiter(function* () { // 'await' here is an identifier, and not an await expression. - var foo = (a = await) => __awaiter(function* () { + var foo = (a = yield ) => __awaiter(function* () { }, this, void 0, Promise); }, diff --git a/tests/baselines/reference/asyncArrowFunction9_es6.errors.txt b/tests/baselines/reference/asyncArrowFunction9_es6.errors.txt new file mode 100644 index 0000000000000..623095e8a5e33 --- /dev/null +++ b/tests/baselines/reference/asyncArrowFunction9_es6.errors.txt @@ -0,0 +1,23 @@ +tests/cases/conformance/async/es6/asyncArrowFunction/asyncArrowFunction9_es6.ts(1,11): error TS2304: Cannot find name 'async'. +tests/cases/conformance/async/es6/asyncArrowFunction/asyncArrowFunction9_es6.ts(1,18): error TS2304: Cannot find name 'a'. +tests/cases/conformance/async/es6/asyncArrowFunction/asyncArrowFunction9_es6.ts(1,37): error TS1005: ',' expected. +tests/cases/conformance/async/es6/asyncArrowFunction/asyncArrowFunction9_es6.ts(1,39): error TS2403: Subsequent variable declarations must have the same type. Variable 'Promise' must be of type 'PromiseConstructor', but here has type 'void'. +tests/cases/conformance/async/es6/asyncArrowFunction/asyncArrowFunction9_es6.ts(1,46): error TS1005: '=' expected. +tests/cases/conformance/async/es6/asyncArrowFunction/asyncArrowFunction9_es6.ts(1,53): error TS1109: Expression expected. + + +==== tests/cases/conformance/async/es6/asyncArrowFunction/asyncArrowFunction9_es6.ts (6 errors) ==== + var foo = async (a = await => await): Promise => { + ~~~~~ +!!! error TS2304: Cannot find name 'async'. + ~ +!!! error TS2304: Cannot find name 'a'. + ~ +!!! error TS1005: ',' expected. + ~~~~~~~ +!!! error TS2403: Subsequent variable declarations must have the same type. Variable 'Promise' must be of type 'PromiseConstructor', but here has type 'void'. + ~ +!!! error TS1005: '=' expected. + ~~ +!!! error TS1109: Expression expected. + } \ No newline at end of file diff --git a/tests/baselines/reference/asyncArrowFunction9_es6.js b/tests/baselines/reference/asyncArrowFunction9_es6.js index 42511dd87f547..fb2f9d28a17c4 100644 --- a/tests/baselines/reference/asyncArrowFunction9_es6.js +++ b/tests/baselines/reference/asyncArrowFunction9_es6.js @@ -3,6 +3,6 @@ var foo = async (a = await => await): Promise => { } //// [asyncArrowFunction9_es6.js] -var foo = (a = await => await) => __awaiter(function* () { -}, -this, void 0, Promise); +var foo = async(a = await => await), Promise = ; +{ +} diff --git a/tests/baselines/reference/asyncArrowFunction9_es6.symbols b/tests/baselines/reference/asyncArrowFunction9_es6.symbols deleted file mode 100644 index 9714b119e72dd..0000000000000 --- a/tests/baselines/reference/asyncArrowFunction9_es6.symbols +++ /dev/null @@ -1,8 +0,0 @@ -=== tests/cases/conformance/async/es6/asyncArrowFunction/asyncArrowFunction9_es6.ts === -var foo = async (a = await => await): Promise => { ->foo : Symbol(foo, Decl(asyncArrowFunction9_es6.ts, 0, 3)) ->a : Symbol(a, Decl(asyncArrowFunction9_es6.ts, 0, 17)) ->await : Symbol(await, Decl(asyncArrowFunction9_es6.ts, 0, 20)) ->await : Symbol(await, Decl(asyncArrowFunction9_es6.ts, 0, 20)) ->Promise : Symbol(Promise, Decl(lib.d.ts, 4768, 1), Decl(lib.d.ts, 4854, 11)) -} diff --git a/tests/baselines/reference/asyncArrowFunction9_es6.types b/tests/baselines/reference/asyncArrowFunction9_es6.types deleted file mode 100644 index 9f6244c4a0eed..0000000000000 --- a/tests/baselines/reference/asyncArrowFunction9_es6.types +++ /dev/null @@ -1,10 +0,0 @@ -=== tests/cases/conformance/async/es6/asyncArrowFunction/asyncArrowFunction9_es6.ts === -var foo = async (a = await => await): Promise => { ->foo : (a?: (await: any) => any) => Promise ->async (a = await => await): Promise => {} : (a?: (await: any) => any) => Promise ->a : (await: any) => any ->await => await : (await: any) => any ->await : any ->await : any ->Promise : Promise -} diff --git a/tests/baselines/reference/asyncFunctionDeclaration10_es6.errors.txt b/tests/baselines/reference/asyncFunctionDeclaration10_es6.errors.txt new file mode 100644 index 0000000000000..15ceb3e60c763 --- /dev/null +++ b/tests/baselines/reference/asyncFunctionDeclaration10_es6.errors.txt @@ -0,0 +1,26 @@ +tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration10_es6.ts(1,20): error TS2371: A parameter initializer is only allowed in a function or constructor implementation. +tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration10_es6.ts(1,30): error TS1109: Expression expected. +tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration10_es6.ts(1,33): error TS1138: Parameter declaration expected. +tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration10_es6.ts(1,33): error TS2304: Cannot find name 'await'. +tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration10_es6.ts(1,38): error TS1005: ';' expected. +tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration10_es6.ts(1,39): error TS1128: Declaration or statement expected. +tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration10_es6.ts(1,53): error TS1109: Expression expected. + + +==== tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration10_es6.ts (7 errors) ==== + async function foo(a = await => await): Promise { + ~~~~~~~~~ +!!! error TS2371: A parameter initializer is only allowed in a function or constructor implementation. + ~~ +!!! error TS1109: Expression expected. + ~~~~~ +!!! error TS1138: Parameter declaration expected. + ~~~~~ +!!! error TS2304: Cannot find name 'await'. + ~ +!!! error TS1005: ';' expected. + ~ +!!! error TS1128: Declaration or statement expected. + ~ +!!! error TS1109: Expression expected. + } \ No newline at end of file diff --git a/tests/baselines/reference/asyncFunctionDeclaration10_es6.js b/tests/baselines/reference/asyncFunctionDeclaration10_es6.js index 7048ca2ffa423..141c0cbab55cd 100644 --- a/tests/baselines/reference/asyncFunctionDeclaration10_es6.js +++ b/tests/baselines/reference/asyncFunctionDeclaration10_es6.js @@ -3,8 +3,5 @@ async function foo(a = await => await): Promise { } //// [asyncFunctionDeclaration10_es6.js] -function foo(a = await => await) { - return __awaiter(function* () { - }, - this, void 0, Promise); -} +await; +Promise < void > {}; diff --git a/tests/baselines/reference/asyncFunctionDeclaration10_es6.symbols b/tests/baselines/reference/asyncFunctionDeclaration10_es6.symbols deleted file mode 100644 index 3bf5baec3b190..0000000000000 --- a/tests/baselines/reference/asyncFunctionDeclaration10_es6.symbols +++ /dev/null @@ -1,8 +0,0 @@ -=== tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration10_es6.ts === -async function foo(a = await => await): Promise { ->foo : Symbol(foo, Decl(asyncFunctionDeclaration10_es6.ts, 0, 0)) ->a : Symbol(a, Decl(asyncFunctionDeclaration10_es6.ts, 0, 19)) ->await : Symbol(await, Decl(asyncFunctionDeclaration10_es6.ts, 0, 22)) ->await : Symbol(await, Decl(asyncFunctionDeclaration10_es6.ts, 0, 22)) ->Promise : Symbol(Promise, Decl(lib.d.ts, 4768, 1), Decl(lib.d.ts, 4854, 11)) -} diff --git a/tests/baselines/reference/asyncFunctionDeclaration10_es6.types b/tests/baselines/reference/asyncFunctionDeclaration10_es6.types deleted file mode 100644 index 0018b994e0026..0000000000000 --- a/tests/baselines/reference/asyncFunctionDeclaration10_es6.types +++ /dev/null @@ -1,9 +0,0 @@ -=== tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration10_es6.ts === -async function foo(a = await => await): Promise { ->foo : (a?: (await: any) => any) => Promise ->a : (await: any) => any ->await => await : (await: any) => any ->await : any ->await : any ->Promise : Promise -} diff --git a/tests/baselines/reference/asyncFunctionDeclaration6_es6.errors.txt b/tests/baselines/reference/asyncFunctionDeclaration6_es6.errors.txt index e89029e7c5f10..ee8abb7bdadf6 100644 --- a/tests/baselines/reference/asyncFunctionDeclaration6_es6.errors.txt +++ b/tests/baselines/reference/asyncFunctionDeclaration6_es6.errors.txt @@ -1,8 +1,11 @@ -tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration6_es6.ts(1,24): error TS2304: Cannot find name 'await'. +tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration6_es6.ts(1,24): error TS2524: 'await' expressions cannot be used in a parameter initializer. +tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration6_es6.ts(1,29): error TS1109: Expression expected. -==== tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration6_es6.ts (1 errors) ==== +==== tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration6_es6.ts (2 errors) ==== async function foo(a = await): Promise { ~~~~~ -!!! error TS2304: Cannot find name 'await'. +!!! error TS2524: 'await' expressions cannot be used in a parameter initializer. + ~ +!!! error TS1109: Expression expected. } \ No newline at end of file diff --git a/tests/baselines/reference/asyncFunctionDeclaration6_es6.js b/tests/baselines/reference/asyncFunctionDeclaration6_es6.js index a74d55c35ca2c..3c1b16cea96a0 100644 --- a/tests/baselines/reference/asyncFunctionDeclaration6_es6.js +++ b/tests/baselines/reference/asyncFunctionDeclaration6_es6.js @@ -3,7 +3,7 @@ async function foo(a = await): Promise { } //// [asyncFunctionDeclaration6_es6.js] -function foo(a = await) { +function foo(a = yield ) { return __awaiter(function* () { }, this, void 0, Promise); diff --git a/tests/baselines/reference/asyncFunctionDeclaration7_es6.errors.txt b/tests/baselines/reference/asyncFunctionDeclaration7_es6.errors.txt index b29fed652d866..91ba4508ba139 100644 --- a/tests/baselines/reference/asyncFunctionDeclaration7_es6.errors.txt +++ b/tests/baselines/reference/asyncFunctionDeclaration7_es6.errors.txt @@ -1,11 +1,14 @@ -tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration7_es6.ts(3,26): error TS2304: Cannot find name 'await'. +tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration7_es6.ts(3,26): error TS2524: 'await' expressions cannot be used in a parameter initializer. +tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration7_es6.ts(3,31): error TS1109: Expression expected. -==== tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration7_es6.ts (1 errors) ==== +==== tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration7_es6.ts (2 errors) ==== async function bar(): Promise { // 'await' here is an identifier, and not a yield expression. async function foo(a = await): Promise { ~~~~~ -!!! error TS2304: Cannot find name 'await'. +!!! error TS2524: 'await' expressions cannot be used in a parameter initializer. + ~ +!!! error TS1109: Expression expected. } } \ No newline at end of file diff --git a/tests/baselines/reference/asyncFunctionDeclaration7_es6.js b/tests/baselines/reference/asyncFunctionDeclaration7_es6.js index fcc2394a1d13d..0b2f643e469e5 100644 --- a/tests/baselines/reference/asyncFunctionDeclaration7_es6.js +++ b/tests/baselines/reference/asyncFunctionDeclaration7_es6.js @@ -9,7 +9,7 @@ async function bar(): Promise { function bar() { return __awaiter(function* () { // 'await' here is an identifier, and not a yield expression. - function foo(a = await) { + function foo(a = yield ) { return __awaiter(function* () { }, this, void 0, Promise); From 2e16680f01ecb9fb5d9fe5bdd73ac57b2a1d0b67 Mon Sep 17 00:00:00 2001 From: Cyrus Najmabadi Date: Tue, 16 Jun 2015 14:00:31 -0700 Subject: [PATCH 23/35] Re-number enum. --- src/compiler/types.ts | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/src/compiler/types.ts b/src/compiler/types.ts index d6baa492bb634..db2eafe4e5377 100644 --- a/src/compiler/types.ts +++ b/src/compiler/types.ts @@ -367,25 +367,25 @@ namespace ts { None = 0, // If this node was parsed in a context where 'in-expressions' are not allowed. - DisallowIn = 1 << 1, + DisallowIn = 1 << 0, // If this node was parsed in the 'yield' context created when parsing a generator. - Yield = 1 << 2, + Yield = 1 << 1, // If this node was parsed as part of a decorator - Decorator = 1 << 4, + Decorator = 1 << 2, // If this node was parsed in the 'await' context created when parsing an async function. - Await = 1 << 5, + Await = 1 << 3, // If the parser encountered an error when parsing the code that created this node. Note // the parser only sets this directly on the node it creates right after encountering the // error. - ThisNodeHasError = 1 << 7, + ThisNodeHasError = 1 << 4, // This node was parsed in a JavaScript file and can be processed differently. For example // its type can be specified usign a JSDoc comment. - JavaScriptFile = 1 << 8, + JavaScriptFile = 1 << 5, // Context flags set directly by the parser. ParserGeneratedFlags = DisallowIn | Yield | Decorator | ThisNodeHasError | Await, @@ -397,13 +397,10 @@ namespace ts { // Used during incremental parsing to determine if this node or any of its children had an // error. Computed only once and then cached. - ThisNodeOrAnySubNodesHasError = 1 << 9, - - // Used to know if we've computed whether any children of this node are or contain an 'await' or 'yield' expression. - ThisNodeOrAnySubNodesHasAwaitOrYield = 1 << 10, + ThisNodeOrAnySubNodesHasError = 1 << 6, // Used to know if we've computed data from children and cached it in this node. - HasAggregatedChildData = 1 << 11 + HasAggregatedChildData = 1 << 7 } /* @internal */ From b25d855341b9c9f98071895a99a88aa1403c6558 Mon Sep 17 00:00:00 2001 From: Ron Buckton Date: Wed, 17 Jun 2015 16:05:55 -0700 Subject: [PATCH 24/35] Removed unused getContainingParameter function --- src/compiler/utilities.ts | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/src/compiler/utilities.ts b/src/compiler/utilities.ts index 4aed1aaee58e1..5f062539e1c21 100644 --- a/src/compiler/utilities.ts +++ b/src/compiler/utilities.ts @@ -640,19 +640,6 @@ namespace ts { } } } - - export function getContainingParameter(node: Node): ParameterDeclaration { - while (true) { - node = node.parent; - if (!node || isFunctionLike(node)) { - return undefined; - } - - if (node.kind === SyntaxKind.Parameter) { - return node; - } - } - } export function getThisContainer(node: Node, includeArrowFunctions: boolean): Node { while (true) { From 82eae194f1ea6aa4a7c85fd96d0cf98e898418a8 Mon Sep 17 00:00:00 2001 From: Ron Buckton Date: Wed, 17 Jun 2015 16:10:17 -0700 Subject: [PATCH 25/35] Inlined checks for NodeFlags.Async in parser --- src/compiler/parser.ts | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/compiler/parser.ts b/src/compiler/parser.ts index 72fb6a8b3e513..98c9c56ae8ca5 100644 --- a/src/compiler/parser.ts +++ b/src/compiler/parser.ts @@ -2695,13 +2695,15 @@ namespace ts { // Didn't appear to actually be a parenthesized arrow function. Just bail out. return undefined; } + + let isAsync = !!(arrowFunction.flags & NodeFlags.Async); // If we have an arrow, then try to parse the body. Even if not, try to parse if we // have an opening brace, just in case we're in an error state. var lastToken = token; arrowFunction.equalsGreaterThanToken = parseExpectedToken(SyntaxKind.EqualsGreaterThanToken, /*reportAtCurrentPosition*/false, Diagnostics._0_expected, "=>"); arrowFunction.body = (lastToken === SyntaxKind.EqualsGreaterThanToken || lastToken === SyntaxKind.OpenBraceToken) - ? parseArrowFunctionExpressionBody(/*isAsync*/ isAsyncFunctionLike(arrowFunction)) + ? parseArrowFunctionExpressionBody(isAsync) : parseIdentifier(); return finishNode(arrowFunction); @@ -2813,7 +2815,7 @@ namespace ts { function parseParenthesizedArrowFunctionExpressionHead(allowAmbiguity: boolean): ArrowFunction { let node = createNode(SyntaxKind.ArrowFunction); setModifiers(node, parseModifiersForArrowFunction()); - let isAsync = isAsyncFunctionLike(node); + let isAsync = !!(node.flags & NodeFlags.Async); // Arrow functions are never generators. // @@ -3493,7 +3495,7 @@ namespace ts { node.asteriskToken = parseOptionalToken(SyntaxKind.AsteriskToken); let isGenerator = !!node.asteriskToken; - let isAsync = isAsyncFunctionLike(node); + let isAsync = !!(node.flags & NodeFlags.Async); node.name = isGenerator && isAsync ? doInYieldAndAwaitContext(parseOptionalIdentifier) : isGenerator ? doInYieldContext(parseOptionalIdentifier) : @@ -4217,7 +4219,7 @@ namespace ts { node.asteriskToken = parseOptionalToken(SyntaxKind.AsteriskToken); node.name = node.flags & NodeFlags.Default ? parseOptionalIdentifier() : parseIdentifier(); let isGenerator = !!node.asteriskToken; - let isAsync = isAsyncFunctionLike(node); + let isAsync = !!(node.flags & NodeFlags.Async); fillSignature(SyntaxKind.ColonToken, /*yieldContext*/ isGenerator, /*awaitContext*/ isAsync, /*requireCompleteParameterList*/ false, node); node.body = parseFunctionBlockOrSemicolon(isGenerator, isAsync, Diagnostics.or_expected); return finishNode(node); @@ -4241,7 +4243,7 @@ namespace ts { method.name = name; method.questionToken = questionToken; let isGenerator = !!asteriskToken; - let isAsync = isAsyncFunctionLike(method); + let isAsync = !!(method.flags & NodeFlags.Async); fillSignature(SyntaxKind.ColonToken, /*yieldContext*/ isGenerator, /*awaitContext*/ isAsync, /*requireCompleteParameterList*/ false, method); method.body = parseFunctionBlockOrSemicolon(isGenerator, isAsync, diagnosticMessage); return finishNode(method); From c74bb842ba266370384d31bc47caf6dee3210161 Mon Sep 17 00:00:00 2001 From: Ron Buckton Date: Wed, 17 Jun 2015 16:11:14 -0700 Subject: [PATCH 26/35] Moved getContainingFunction call in checkIdentifier --- src/compiler/checker.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index cdacf47375f87..500d0dec3440b 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -5755,8 +5755,8 @@ namespace ts { // will be bound to non-arrow function that contain this arrow function. This results in inconsistent behavior. // To avoid that we will give an error to users if they use arguments objects in arrow function so that they // can explicitly bound arguments objects - let container = getContainingFunction(node); if (symbol === argumentsSymbol) { + let container = getContainingFunction(node); if (container.kind === SyntaxKind.ArrowFunction) { if (languageVersion < ScriptTarget.ES6) { error(node, Diagnostics.The_arguments_object_cannot_be_referenced_in_an_arrow_function_in_ES3_and_ES5_Consider_using_a_standard_function_expression); From b00a9579a8645cc96ff5717296a8bcda6d33f2d7 Mon Sep 17 00:00:00 2001 From: Ron Buckton Date: Wed, 17 Jun 2015 16:16:55 -0700 Subject: [PATCH 27/35] Removed unneeded capture for lexical this --- src/compiler/checker.ts | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index 500d0dec3440b..d0af755125c51 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -5855,10 +5855,6 @@ namespace ts { // When targeting es6, arrow function lexically bind "this" so we do not need to do the work of binding "this" in emitted code needToCaptureLexicalThis = (languageVersion < ScriptTarget.ES6); } - else if (node.parserContextFlags & ParserContextFlags.Await) { - // if 'this' is part of an async function, we will need to capture 'this' - needToCaptureLexicalThis = (languageVersion < ScriptTarget.ES6); - } switch (container.kind) { case SyntaxKind.ModuleDeclaration: From 02f6622e43b03d269806b641524a60fed6593059 Mon Sep 17 00:00:00 2001 From: Ron Buckton Date: Wed, 17 Jun 2015 16:28:32 -0700 Subject: [PATCH 28/35] Changed createPromiseType to return emptyObjectType --- src/compiler/checker.ts | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index d0af755125c51..c6d0b8aacbf24 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -7632,12 +7632,10 @@ namespace ts { if (globalPromiseType !== emptyObjectType) { // if the promised type is itself a promise, get the underlying type; otherwise, fallback to the promised type promisedType = getAwaitedType(promisedType); - if (promisedType !== unknownType) { - return createTypeReference(globalPromiseType, [promisedType]); - } + return createTypeReference(globalPromiseType, [promisedType]); } - return undefined; + return emptyObjectType; } function getReturnTypeFromBody(func: FunctionLikeDeclaration, contextualMapper?: TypeMapper): Type { @@ -7678,7 +7676,7 @@ namespace ts { if (isAsync) { // For an async function, the return type will not be void, but rather a Promise for void. let promiseType = createPromiseType(voidType); - if (!promiseType) { + if (promiseType === emptyObjectType) { error(func, Diagnostics.An_async_function_or_method_must_have_a_valid_awaitable_return_type); return unknownType; } @@ -7688,7 +7686,7 @@ namespace ts { else { return voidType; } - } + } } // When yield/return statements are contextually typed we allow the return type to be a union type. // Otherwise we require the yield/return expressions to have a best common supertype. @@ -7718,7 +7716,7 @@ namespace ts { // Promise/A+ compatible implementation will always assimilate any foreign promise, so the // return type of the body is awaited type of the body, wrapped in a native Promise type. let promiseType = createPromiseType(widenedType); - if (!promiseType) { + if (promiseType === emptyObjectType) { error(func, Diagnostics.An_async_function_or_method_must_have_a_valid_awaitable_return_type); return unknownType; } @@ -9556,7 +9554,7 @@ namespace ts { let promisedType = getPromisedType(type); if (promisedType === undefined) { // The type was not a PromiseLike, so it could not be unwrapped any further. - // As long as the type does not have a known callable "then" property, then it is + // As long as the type does not have a callable "then" property, then it is // safe to return the type; otherwise, an error will have been reported in // the call to checkNonThenableType and we will return unknownType. // @@ -9570,11 +9568,10 @@ namespace ts { // of a runtime problem. If the user wants to return this value from an async // function, they would need to wrap it in some other value. If they want it to // be treated as a promise, they can cast to . - if (checkNonThenableType(type, location, message)) { - break; + if (!checkNonThenableType(type, location, message)) { + type = unknownType; } - type = unknownType; break; } From 7443ecc6a57ab558a5d5affbeecec296f1640777 Mon Sep 17 00:00:00 2001 From: Ron Buckton Date: Wed, 17 Jun 2015 16:30:25 -0700 Subject: [PATCH 29/35] Cleaned up diagnostics --- src/compiler/checker.ts | 9 ++------- src/compiler/diagnosticInformationMap.generated.ts | 1 + src/compiler/diagnosticMessages.json | 4 ++++ 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index c6d0b8aacbf24..6ede08a32a40f 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -9604,11 +9604,7 @@ namespace ts { // } // if (location) { - if (!message) { - message = Diagnostics.Operand_for_await_does_not_have_a_valid_callable_then_member; - } - - error(location, message); + error(location, Diagnostics._0_is_referenced_directly_or_indirectly_in_the_fulfillment_callback_of_its_own_then_method, symbolToString(type.symbol)); } type = unknownType; @@ -9640,8 +9636,7 @@ namespace ts { let globalPromiseConstructorLikeType = getGlobalPromiseConstructorLikeType(); if (globalPromiseConstructorLikeType === emptyObjectType) { // If we couldn't resolve the global PromiseConstructorLike type we cannot verify - // compatibility with __awaiter, so we report an error. - error(node, Diagnostics.An_async_function_or_method_must_have_a_valid_awaitable_return_type); + // compatibility with __awaiter. return unknownType; } diff --git a/src/compiler/diagnosticInformationMap.generated.ts b/src/compiler/diagnosticInformationMap.generated.ts index e1b563bb3ea70..17472e4ce85d7 100644 --- a/src/compiler/diagnosticInformationMap.generated.ts +++ b/src/compiler/diagnosticInformationMap.generated.ts @@ -54,6 +54,7 @@ namespace ts { Return_expression_in_async_function_does_not_have_a_valid_callable_then_member: { code: 1059, category: DiagnosticCategory.Error, key: "Return expression in async function does not have a valid callable 'then' member." }, Expression_body_for_async_arrow_function_does_not_have_a_valid_callable_then_member: { code: 1060, category: DiagnosticCategory.Error, key: "Expression body for async arrow function does not have a valid callable 'then' member." }, Enum_member_must_have_initializer: { code: 1061, category: DiagnosticCategory.Error, key: "Enum member must have initializer." }, + _0_is_referenced_directly_or_indirectly_in_the_fulfillment_callback_of_its_own_then_method: { code: 1062, category: DiagnosticCategory.Error, key: "{0} is referenced directly or indirectly in the fulfillment callback of its own 'then' method." }, An_export_assignment_cannot_be_used_in_a_namespace: { code: 1063, category: DiagnosticCategory.Error, key: "An export assignment cannot be used in a namespace." }, Ambient_enum_elements_can_only_have_integer_literal_initializers: { code: 1066, category: DiagnosticCategory.Error, key: "Ambient enum elements can only have integer literal initializers." }, Unexpected_token_A_constructor_method_accessor_or_property_was_expected: { code: 1068, category: DiagnosticCategory.Error, key: "Unexpected token. A constructor, method, accessor, or property was expected." }, diff --git a/src/compiler/diagnosticMessages.json b/src/compiler/diagnosticMessages.json index 4ccf40e8463a5..6ddf170947502 100644 --- a/src/compiler/diagnosticMessages.json +++ b/src/compiler/diagnosticMessages.json @@ -203,6 +203,10 @@ "category": "Error", "code": 1061 }, + "{0} is referenced directly or indirectly in the fulfillment callback of its own 'then' method.": { + "category": "Error", + "code": 1062 + }, "An export assignment cannot be used in a namespace.": { "category": "Error", "code": 1063 From 2891a1d1b7b032fe92a5c8d45f6b27588e60e070 Mon Sep 17 00:00:00 2001 From: Ron Buckton Date: Thu, 18 Jun 2015 11:31:03 -0700 Subject: [PATCH 30/35] Cleaned up async return type check --- src/compiler/checker.ts | 78 ++++------- .../diagnosticInformationMap.generated.ts | 1 + src/compiler/diagnosticMessages.json | 4 + src/compiler/emitter.ts | 73 +++++----- .../reference/asyncArrowFunction1_es6.js | 5 +- .../reference/asyncArrowFunction6_es6.js | 5 +- .../reference/asyncArrowFunction7_es6.js | 10 +- .../reference/asyncArrowFunction8_es6.js | 5 +- ...asyncArrowFunctionCapturesArguments_es6.js | 3 +- .../asyncArrowFunctionCapturesThis_es6.js | 3 +- tests/baselines/reference/asyncAwait_es6.js | 119 ++++++++++++++++ .../reference/asyncAwait_es6.symbols | 118 ++++++++++++++++ .../baselines/reference/asyncAwait_es6.types | 129 ++++++++++++++++++ .../asyncFunctionDeclaration11_es6.js | 5 +- .../asyncFunctionDeclaration13_es6.js | 5 +- .../asyncFunctionDeclaration14_es6.js | 5 +- .../asyncFunctionDeclaration1_es6.js | 5 +- .../asyncFunctionDeclaration6_es6.js | 5 +- .../asyncFunctionDeclaration7_es6.js | 10 +- .../asyncFunctionDeclaration9_es6.js | 5 +- .../reference/awaitBinaryExpression1_es6.js | 5 +- .../reference/awaitBinaryExpression2_es6.js | 5 +- .../reference/awaitBinaryExpression3_es6.js | 5 +- .../reference/awaitBinaryExpression4_es6.js | 5 +- .../reference/awaitBinaryExpression5_es6.js | 5 +- .../reference/awaitCallExpression1_es6.js | 5 +- .../reference/awaitCallExpression2_es6.js | 5 +- .../reference/awaitCallExpression3_es6.js | 5 +- .../reference/awaitCallExpression4_es6.js | 5 +- .../reference/awaitCallExpression5_es6.js | 5 +- .../reference/awaitCallExpression6_es6.js | 5 +- .../reference/awaitCallExpression7_es6.js | 5 +- .../reference/awaitCallExpression8_es6.js | 5 +- .../conformance/async/es6/asyncAwait_es6.ts | 40 ++++++ 34 files changed, 530 insertions(+), 168 deletions(-) create mode 100644 tests/baselines/reference/asyncAwait_es6.js create mode 100644 tests/baselines/reference/asyncAwait_es6.symbols create mode 100644 tests/baselines/reference/asyncAwait_es6.types create mode 100644 tests/cases/conformance/async/es6/asyncAwait_es6.ts diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index 6ede08a32a40f..70ca1172ccbfa 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -824,7 +824,7 @@ namespace ts { } // Resolves a qualified name and any involved aliases - function resolveEntityName(name: EntityName | Expression, meaning: SymbolFlags, location?: Node): Symbol { + function resolveEntityName(name: EntityName | Expression, meaning: SymbolFlags): Symbol { if (nodeIsMissing(name)) { return undefined; } @@ -833,7 +833,7 @@ namespace ts { if (name.kind === SyntaxKind.Identifier) { let message = meaning === SymbolFlags.Namespace ? Diagnostics.Cannot_find_namespace_0 : Diagnostics.Cannot_find_name_0; - symbol = resolveName(location || name, (name).text, meaning, message, name); + symbol = resolveName(name, (name).text, meaning, message, name); if (!symbol) { return undefined; } @@ -842,7 +842,7 @@ namespace ts { let left = name.kind === SyntaxKind.QualifiedName ? (name).left : (name).expression; let right = name.kind === SyntaxKind.QualifiedName ? (name).right : (name).name; - let namespace = resolveEntityName(left, SymbolFlags.Namespace, location); + let namespace = resolveEntityName(left, SymbolFlags.Namespace); if (!namespace || namespace === unknownSymbol || nodeIsMissing(right)) { return undefined; } @@ -8839,7 +8839,6 @@ namespace ts { } if (produceDiagnostics) { - checkCollisionWithAwaiterVariablesInGeneratedCode(node, node.name); checkCollisionWithArgumentsInGeneratedCode(node); if (compilerOptions.noImplicitAny && !node.type) { switch (node.kind) { @@ -9632,7 +9631,7 @@ namespace ts { * a `resolve` function as one of its arguments and results in an object with a * callable `then` signature. */ - function checkAsyncFunctionReturnType(node: SignatureDeclaration): Type { + function checkAsyncFunctionReturnType(node: FunctionLikeDeclaration): Type { let globalPromiseConstructorLikeType = getGlobalPromiseConstructorLikeType(); if (globalPromiseConstructorLikeType === emptyObjectType) { // If we couldn't resolve the global PromiseConstructorLike type we cannot verify @@ -9640,10 +9639,10 @@ namespace ts { return unknownType; } - // The return type of an async function will be the type of the instance. For this - // to be a type compatible with our async function emit, we must also check that - // the type of the declaration (e.g. the static side or "constructor" type of the - // promise) is a compatible `PromiseConstructorLike`. + // As part of our emit for an async function, we will need to emit the entity name of + // the return type annotation as an expression. To meet the necessary runtime semantics + // for __awaiter, we must also check that the type of the declaration (e.g. the static + // side or "constructor" of the promise type) is compatible `PromiseConstructorLike`. // // An example might be (from lib.es6.d.ts): // @@ -9666,36 +9665,33 @@ namespace ts { // // When we get the type of the `Promise` symbol here, we get the type of the static // side of the `Promise` class, which would be `{ new (...): Promise }`. - let returnType = getTypeFromTypeNode(node.type); - let entityName = getEntityNameFromTypeNode(node.type); - let resolvedName = entityName ? resolveEntityName(entityName, SymbolFlags.Value, node) : undefined; - if (!resolvedName || !returnType.symbol) { - error(node, Diagnostics.An_async_function_or_method_must_have_a_valid_awaitable_return_type); - return unknownType; + + let promiseType = getTypeFromTypeNode(node.type); + let promiseConstructor = getMergedSymbol(promiseType.symbol); + if (!promiseConstructor || !symbolIsValue(promiseConstructor)) { + error(node, Diagnostics.Type_0_is_not_a_valid_async_function_return_type, typeToString(promiseType)); + return unknownType } - - if (getMergedSymbol(resolvedName) !== getMergedSymbol(returnType.symbol)) { - // If we were unable to resolve the return type as a value, report an error. - let identifier = getFirstIdentifier(entityName); - error(resolvedName.valueDeclaration, Diagnostics.Duplicate_identifier_0_Compiler_uses_declaration_1_to_support_async_functions, - identifier.text, - identifier.text); + + // Validate the promise constructor type. + let promiseConstructorType = getTypeOfSymbol(promiseConstructor); + if (!checkTypeAssignableTo(promiseConstructorType, globalPromiseConstructorLikeType, node, Diagnostics.Type_0_is_not_a_valid_async_function_return_type)) { return unknownType; } - // When we emit the async function, we need to ensure we emit any imports that might - // otherwise have been elided if the return type were only ever referenced in a type - // position. As such, we check the entity name as an expression. - let declaredType = checkExpression(entityName); - - if (!isTypeAssignableTo(declaredType, globalPromiseConstructorLikeType)) { - // If the declared type of the return type is not assignable to a PromiseConstructorLike, report an error. - error(node, ts.Diagnostics.An_async_function_or_method_must_have_a_valid_awaitable_return_type); + // Verify there is no local declaration that could collide with the promise constructor. + let promiseName = getEntityNameFromTypeNode(node.type); + let root = getFirstIdentifier(promiseName); + let rootSymbol = getSymbol(node.locals, root.text, SymbolFlags.Value); + if (rootSymbol) { + error(rootSymbol.valueDeclaration, Diagnostics.Duplicate_identifier_0_Compiler_uses_declaration_1_to_support_async_functions, + root.text, + getFullyQualifiedName(promiseConstructor)); return unknownType; } - + // Get and return the awaited type of the return type. - return getAwaitedType(returnType, node, Diagnostics.An_async_function_or_method_must_have_a_valid_awaitable_return_type); + return getAwaitedType(promiseType, node, Diagnostics.An_async_function_or_method_must_have_a_valid_awaitable_return_type); } /** Check a decorator */ @@ -10093,22 +10089,6 @@ namespace ts { } } } - - function checkCollisionWithAwaiterVariablesInGeneratedCode(node: Node, name: DeclarationName): void { - if (!name || name.kind !== SyntaxKind.Identifier || isTypeNode(name)) { - return; - } - - let identifier = name; - let container = getContainingFunction(name); - if (container && isAsyncFunctionLike(container) && node.kind !== SyntaxKind.Identifier) { - let promiseConstructorName = getEntityNameFromTypeNode(container.type); - let firstIdentifier = promiseConstructorName ? getFirstIdentifier(promiseConstructorName) : undefined; - if (firstIdentifier && firstIdentifier.text === identifier.text) { - error(node, Diagnostics.Duplicate_identifier_0_Compiler_uses_declaration_1_to_support_async_functions, identifier.text, getTextOfNode(promiseConstructorName)); - } - } - } // Check that a parameter initializer contains no references to parameters declared to the right of itself function checkParameterInitializer(node: VariableLikeDeclaration): void { @@ -10954,7 +10934,6 @@ namespace ts { checkTypeNameIsReserved(node.name, Diagnostics.Class_name_cannot_be_0); checkCollisionWithCapturedThisVariable(node, node.name); checkCollisionWithRequireExportsInGeneratedCode(node, node.name); - checkCollisionWithAwaiterVariablesInGeneratedCode(node, node.name); } checkTypeParameters(node.typeParameters); checkExportsOnMergedDeclarations(node); @@ -11398,7 +11377,6 @@ namespace ts { checkTypeNameIsReserved(node.name, Diagnostics.Enum_name_cannot_be_0); checkCollisionWithCapturedThisVariable(node, node.name); checkCollisionWithRequireExportsInGeneratedCode(node, node.name); - checkCollisionWithAwaiterVariablesInGeneratedCode(node, node.name); checkExportsOnMergedDeclarations(node); computeEnumMemberValues(node); diff --git a/src/compiler/diagnosticInformationMap.generated.ts b/src/compiler/diagnosticInformationMap.generated.ts index 17472e4ce85d7..6cd9a803aa4a7 100644 --- a/src/compiler/diagnosticInformationMap.generated.ts +++ b/src/compiler/diagnosticInformationMap.generated.ts @@ -48,6 +48,7 @@ namespace ts { A_set_accessor_parameter_cannot_have_an_initializer: { code: 1052, category: DiagnosticCategory.Error, key: "A 'set' accessor parameter cannot have an initializer." }, A_set_accessor_cannot_have_rest_parameter: { code: 1053, category: DiagnosticCategory.Error, key: "A 'set' accessor cannot have rest parameter." }, A_get_accessor_cannot_have_parameters: { code: 1054, category: DiagnosticCategory.Error, key: "A 'get' accessor cannot have parameters." }, + Type_0_is_not_a_valid_async_function_return_type: { code: 1055, category: DiagnosticCategory.Error, key: "Type '{0}' is not a valid async function return type." }, Accessors_are_only_available_when_targeting_ECMAScript_5_and_higher: { code: 1056, category: DiagnosticCategory.Error, key: "Accessors are only available when targeting ECMAScript 5 and higher." }, An_async_function_or_method_must_have_a_valid_awaitable_return_type: { code: 1057, category: DiagnosticCategory.Error, key: "An async function or method must have a valid awaitable return type." }, Operand_for_await_does_not_have_a_valid_callable_then_member: { code: 1058, category: DiagnosticCategory.Error, key: "Operand for 'await' does not have a valid callable 'then' member." }, diff --git a/src/compiler/diagnosticMessages.json b/src/compiler/diagnosticMessages.json index 6ddf170947502..4ad7408d70d17 100644 --- a/src/compiler/diagnosticMessages.json +++ b/src/compiler/diagnosticMessages.json @@ -179,6 +179,10 @@ "category": "Error", "code": 1054 }, + "Type '{0}' is not a valid async function return type.": { + "category": "Error", + "code": 1055 + }, "Accessors are only available when targeting ECMAScript 5 and higher.": { "category": "Error", "code": 1056 diff --git a/src/compiler/emitter.ts b/src/compiler/emitter.ts index d0903ccfdf238..d537380dc5d8f 100644 --- a/src/compiler/emitter.ts +++ b/src/compiler/emitter.ts @@ -49,10 +49,10 @@ var __param = (this && this.__param) || function (paramIndex, decorator) { };`; const awaiterHelper = ` -var __awaiter = (this && this.__awaiter) || function (generator, thisArg, args, PromiseConstructor) { - PromiseConstructor || (PromiseConstructor = Promise); +var __awaiter = (this && this.__awaiter) || function (args, generator) { + var PromiseConstructor = args[1] || Promise; return new PromiseConstructor(function (resolve, reject) { - generator = generator.call(thisArg, args); + generator = generator.call(args[0], args[2]); function cast(value) { return value instanceof PromiseConstructor ? value : new PromiseConstructor(function (resolve) { resolve(value); }); } function onfulfill(value) { try { step("next", value); } catch (e) { reject(e); } } function onreject(value) { try { step("throw", value); } catch (e) { reject(e); } } @@ -3359,6 +3359,7 @@ var __awaiter = (this && this.__awaiter) || function (generator, thisArg, args, function emitAsyncFunctionBodyForES6(node: FunctionLikeDeclaration) { let promiseConstructor = getEntityNameFromTypeNode(node.type); let isArrowFunction = node.kind === SyntaxKind.ArrowFunction; + let hasLexicalArguments = (resolver.getNodeCheckFlags(node) & NodeCheckFlags.CaptureArguments) !== 0; let args: string; // An async function is emit as an outer function that calls an inner @@ -3373,7 +3374,7 @@ var __awaiter = (this && this.__awaiter) || function (generator, thisArg, args, // let a = async (b) => { await b; } // // // output - // let a = (b) => __awaiter(function* (b) { + // let a = (b) => __awaiter([this], function* (b) { // yield b; // }, this); // @@ -3383,9 +3384,9 @@ var __awaiter = (this && this.__awaiter) || function (generator, thisArg, args, // let a = async (b) => { await arguments[0]; } // // // output - // let a = (b) => __awaiter(function* (arguments) { + // let a = (b) => __awaiter([this, arguments], function* (arguments) { // yield arguments[0]; - // }, this, arguments); + // }); // // The emit for an async function expression without a lexical `arguments` binding // might be: @@ -3397,7 +3398,7 @@ var __awaiter = (this && this.__awaiter) || function (generator, thisArg, args, // // // output // let a = function (b) { - // return __awaiter(function* () { + // return __awaiter([this], function* () { // yield b; // }, this); // } @@ -3412,9 +3413,24 @@ var __awaiter = (this && this.__awaiter) || function (generator, thisArg, args, // // // output // let a = function (b) { - // return __awaiter(function* (arguments) { + // return __awaiter([this, arguments], function* (arguments) { + // yield arguments[0]; + // }); + // } + // + // The emit for an async function expression with a lexical `arguments` binding + // and a return type annotation might be: + // + // // input + // let a = async function (b): MyPromise { + // await arguments[0]; + // } + // + // // output + // let a = function (b) { + // return __awaiter([this, arguments, MyPromise], function* (arguments) { // yield arguments[0]; - // }, this, arguments); + // }); // } // @@ -3427,42 +3443,27 @@ var __awaiter = (this && this.__awaiter) || function (generator, thisArg, args, write("return"); } + write(" __awaiter([this"); + if (promiseConstructor || hasLexicalArguments) { + write(", "); + if (promiseConstructor) { + emitNodeWithoutSourceMap(promiseConstructor); + } + if (hasLexicalArguments) { + write(", arguments"); + } + } // Emit the call to __awaiter. - let hasLexicalArguments = (resolver.getNodeCheckFlags(node) & NodeCheckFlags.CaptureArguments) !== 0; if (hasLexicalArguments) { - write(" __awaiter(function* (arguments)"); + write("], function* (arguments)"); } else { - write(" __awaiter(function* ()"); + write("], function* ()"); } // Emit the signature and body for the inner generator function. emitFunctionBody(node); - - // Emit the current `this` binding. - write(","); - writeLine(); - write("this"); - - // Optionally emit the lexical arguments. - if (hasLexicalArguments) { - write(", arguments"); - } - - // If the function has an explicit type annotation for a promise, emit the - // constructor. - if (promiseConstructor) { - // If we did not have lexical arguments, supply undefined (void 0) for - // the `arguments` parameter. - if (!hasLexicalArguments) { - write(", void 0"); - } - - write(", "); - emitNodeWithoutSourceMap(promiseConstructor); - } - write(")"); // If this is not an async arrow, emit the closing brace of the outer function body. diff --git a/tests/baselines/reference/asyncArrowFunction1_es6.js b/tests/baselines/reference/asyncArrowFunction1_es6.js index 257b147dbc7b2..2c2f1091b1537 100644 --- a/tests/baselines/reference/asyncArrowFunction1_es6.js +++ b/tests/baselines/reference/asyncArrowFunction1_es6.js @@ -4,6 +4,5 @@ var foo = async (): Promise => { }; //// [asyncArrowFunction1_es6.js] -var foo = () => __awaiter(function* () { -}, -this, void 0, Promise); +var foo = () => __awaiter([this, Promise], function* () { +}); diff --git a/tests/baselines/reference/asyncArrowFunction6_es6.js b/tests/baselines/reference/asyncArrowFunction6_es6.js index 5353903d10e94..0a39441edf795 100644 --- a/tests/baselines/reference/asyncArrowFunction6_es6.js +++ b/tests/baselines/reference/asyncArrowFunction6_es6.js @@ -4,6 +4,5 @@ var foo = async (a = await): Promise => { } //// [asyncArrowFunction6_es6.js] -var foo = (a = yield ) => __awaiter(function* () { -}, -this, void 0, Promise); +var foo = (a = yield ) => __awaiter([this, Promise], function* () { +}); diff --git a/tests/baselines/reference/asyncArrowFunction7_es6.js b/tests/baselines/reference/asyncArrowFunction7_es6.js index b3c5f536550d6..bb17963bfd371 100644 --- a/tests/baselines/reference/asyncArrowFunction7_es6.js +++ b/tests/baselines/reference/asyncArrowFunction7_es6.js @@ -7,10 +7,8 @@ var bar = async (): Promise => { } //// [asyncArrowFunction7_es6.js] -var bar = () => __awaiter(function* () { +var bar = () => __awaiter([this, Promise], function* () { // 'await' here is an identifier, and not an await expression. - var foo = (a = yield ) => __awaiter(function* () { - }, - this, void 0, Promise); -}, -this, void 0, Promise); + var foo = (a = yield ) => __awaiter([this, Promise], function* () { + }); +}); diff --git a/tests/baselines/reference/asyncArrowFunction8_es6.js b/tests/baselines/reference/asyncArrowFunction8_es6.js index e4383a16220c6..2ec2325951055 100644 --- a/tests/baselines/reference/asyncArrowFunction8_es6.js +++ b/tests/baselines/reference/asyncArrowFunction8_es6.js @@ -5,7 +5,6 @@ var foo = async (): Promise => { } //// [asyncArrowFunction8_es6.js] -var foo = () => __awaiter(function* () { +var foo = () => __awaiter([this, Promise], function* () { var v = { [yield ]: foo }; -}, -this, void 0, Promise); +}); diff --git a/tests/baselines/reference/asyncArrowFunctionCapturesArguments_es6.js b/tests/baselines/reference/asyncArrowFunctionCapturesArguments_es6.js index 888c935cc3f47..8cac736ea1b6d 100644 --- a/tests/baselines/reference/asyncArrowFunctionCapturesArguments_es6.js +++ b/tests/baselines/reference/asyncArrowFunctionCapturesArguments_es6.js @@ -11,7 +11,6 @@ class C { class C { method() { function other() { } - var fn = () => __awaiter(function* (arguments) { return yield other.apply(this, arguments); }, - this, arguments); + var fn = () => __awaiter([this, , arguments], function* (arguments) { return yield other.apply(this, arguments); }); } } diff --git a/tests/baselines/reference/asyncArrowFunctionCapturesThis_es6.js b/tests/baselines/reference/asyncArrowFunctionCapturesThis_es6.js index 67279d7f1be09..b13815ffcbf41 100644 --- a/tests/baselines/reference/asyncArrowFunctionCapturesThis_es6.js +++ b/tests/baselines/reference/asyncArrowFunctionCapturesThis_es6.js @@ -9,7 +9,6 @@ class C { //// [asyncArrowFunctionCapturesThis_es6.js] class C { method() { - var fn = () => __awaiter(function* () { return yield this; }, - this); + var fn = () => __awaiter([this], function* () { return yield this; }); } } diff --git a/tests/baselines/reference/asyncAwait_es6.js b/tests/baselines/reference/asyncAwait_es6.js new file mode 100644 index 0000000000000..2c0ffaf478a1c --- /dev/null +++ b/tests/baselines/reference/asyncAwait_es6.js @@ -0,0 +1,119 @@ +//// [asyncAwait_es6.ts] +type MyPromise = Promise; +declare var MyPromise: typeof Promise; +declare var p: Promise; +declare var mp: MyPromise; + +async function f0() { } +async function f1(): Promise { } +async function f3(): MyPromise { } + +let f4 = async function() { } +let f5 = async function(): Promise { } +let f6 = async function(): MyPromise { } + +let f7 = async () => { }; +let f8 = async (): Promise => { }; +let f9 = async (): MyPromise => { }; +let f10 = async () => p; +let f11 = async () => mp; +let f12 = async (): Promise => mp; +let f13 = async (): MyPromise => p; + +let o = { + async m1() { }, + async m2(): Promise { }, + async m3(): MyPromise { } +}; + +class C { + async m1() { } + async m2(): Promise { } + async m3(): MyPromise { } + static async m4() { } + static async m5(): Promise { } + static async m6(): MyPromise { } +} + +module M { + export async function f1() { } +} + +//// [asyncAwait_es6.js] +var __awaiter = (this && this.__awaiter) || function (args, generator) { + var PromiseConstructor = args[1] || Promise; + return new PromiseConstructor(function (resolve, reject) { + generator = generator.call(args[0], args[2]); + function cast(value) { return value instanceof PromiseConstructor ? value : new PromiseConstructor(function (resolve) { resolve(value); }); } + function onfulfill(value) { try { step("next", value); } catch (e) { reject(e); } } + function onreject(value) { try { step("throw", value); } catch (e) { reject(e); } } + function step(verb, value) { + var result = generator[verb](value); + result.done ? resolve(result.value) : cast(result.value).then(onfulfill, onreject); + } + step("next", void 0); + }); +}; +function f0() { + return __awaiter([this], function* () { }); +} +function f1() { + return __awaiter([this, Promise], function* () { }); +} +function f3() { + return __awaiter([this, MyPromise], function* () { }); +} +let f4 = function () { + return __awaiter([this], function* () { }); +}; +let f5 = function () { + return __awaiter([this, Promise], function* () { }); +}; +let f6 = function () { + return __awaiter([this, MyPromise], function* () { }); +}; +let f7 = () => __awaiter([this], function* () { }); +let f8 = () => __awaiter([this, Promise], function* () { }); +let f9 = () => __awaiter([this, MyPromise], function* () { }); +let f10 = () => __awaiter([this], function* () { return p; }); +let f11 = () => __awaiter([this], function* () { return mp; }); +let f12 = () => __awaiter([this, Promise], function* () { return mp; }); +let f13 = () => __awaiter([this, MyPromise], function* () { return p; }); +let o = { + m1() { + return __awaiter([this], function* () { }); + }, + m2() { + return __awaiter([this, Promise], function* () { }); + }, + m3() { + return __awaiter([this, MyPromise], function* () { }); + } +}; +class C { + m1() { + return __awaiter([this], function* () { }); + } + m2() { + return __awaiter([this, Promise], function* () { }); + } + m3() { + return __awaiter([this, MyPromise], function* () { }); + } + static m4() { + return __awaiter([this], function* () { }); + } + static m5() { + return __awaiter([this, Promise], function* () { }); + } + static m6() { + return __awaiter([this, MyPromise], function* () { }); + } +} +var M; +(function (M) { + function f1() { + return __awaiter([this], function* () { }); + } + M.f1 = f1; +})(M || (M = {})); diff --git a/tests/baselines/reference/asyncAwait_es6.symbols b/tests/baselines/reference/asyncAwait_es6.symbols new file mode 100644 index 0000000000000..6cd18e254ba0e --- /dev/null +++ b/tests/baselines/reference/asyncAwait_es6.symbols @@ -0,0 +1,118 @@ +=== tests/cases/conformance/async/es6/asyncAwait_es6.ts === +type MyPromise = Promise; +>MyPromise : Symbol(MyPromise, Decl(asyncAwait_es6.ts, 0, 0), Decl(asyncAwait_es6.ts, 1, 11)) +>T : Symbol(T, Decl(asyncAwait_es6.ts, 0, 15)) +>Promise : Symbol(Promise, Decl(lib.d.ts, 4768, 1), Decl(lib.d.ts, 4854, 11)) +>T : Symbol(T, Decl(asyncAwait_es6.ts, 0, 15)) + +declare var MyPromise: typeof Promise; +>MyPromise : Symbol(MyPromise, Decl(asyncAwait_es6.ts, 0, 0), Decl(asyncAwait_es6.ts, 1, 11)) +>Promise : Symbol(Promise, Decl(lib.d.ts, 4768, 1), Decl(lib.d.ts, 4854, 11)) + +declare var p: Promise; +>p : Symbol(p, Decl(asyncAwait_es6.ts, 2, 11)) +>Promise : Symbol(Promise, Decl(lib.d.ts, 4768, 1), Decl(lib.d.ts, 4854, 11)) + +declare var mp: MyPromise; +>mp : Symbol(mp, Decl(asyncAwait_es6.ts, 3, 11)) +>MyPromise : Symbol(MyPromise, Decl(asyncAwait_es6.ts, 0, 0), Decl(asyncAwait_es6.ts, 1, 11)) + +async function f0() { } +>f0 : Symbol(f0, Decl(asyncAwait_es6.ts, 3, 34)) + +async function f1(): Promise { } +>f1 : Symbol(f1, Decl(asyncAwait_es6.ts, 5, 23)) +>Promise : Symbol(Promise, Decl(lib.d.ts, 4768, 1), Decl(lib.d.ts, 4854, 11)) + +async function f3(): MyPromise { } +>f3 : Symbol(f3, Decl(asyncAwait_es6.ts, 6, 38)) +>MyPromise : Symbol(MyPromise, Decl(asyncAwait_es6.ts, 0, 0), Decl(asyncAwait_es6.ts, 1, 11)) + +let f4 = async function() { } +>f4 : Symbol(f4, Decl(asyncAwait_es6.ts, 9, 3)) + +let f5 = async function(): Promise { } +>f5 : Symbol(f5, Decl(asyncAwait_es6.ts, 10, 3)) +>Promise : Symbol(Promise, Decl(lib.d.ts, 4768, 1), Decl(lib.d.ts, 4854, 11)) + +let f6 = async function(): MyPromise { } +>f6 : Symbol(f6, Decl(asyncAwait_es6.ts, 11, 3)) +>MyPromise : Symbol(MyPromise, Decl(asyncAwait_es6.ts, 0, 0), Decl(asyncAwait_es6.ts, 1, 11)) + +let f7 = async () => { }; +>f7 : Symbol(f7, Decl(asyncAwait_es6.ts, 13, 3)) + +let f8 = async (): Promise => { }; +>f8 : Symbol(f8, Decl(asyncAwait_es6.ts, 14, 3)) +>Promise : Symbol(Promise, Decl(lib.d.ts, 4768, 1), Decl(lib.d.ts, 4854, 11)) + +let f9 = async (): MyPromise => { }; +>f9 : Symbol(f9, Decl(asyncAwait_es6.ts, 15, 3)) +>MyPromise : Symbol(MyPromise, Decl(asyncAwait_es6.ts, 0, 0), Decl(asyncAwait_es6.ts, 1, 11)) + +let f10 = async () => p; +>f10 : Symbol(f10, Decl(asyncAwait_es6.ts, 16, 3)) +>p : Symbol(p, Decl(asyncAwait_es6.ts, 2, 11)) + +let f11 = async () => mp; +>f11 : Symbol(f11, Decl(asyncAwait_es6.ts, 17, 3)) +>mp : Symbol(mp, Decl(asyncAwait_es6.ts, 3, 11)) + +let f12 = async (): Promise => mp; +>f12 : Symbol(f12, Decl(asyncAwait_es6.ts, 18, 3)) +>Promise : Symbol(Promise, Decl(lib.d.ts, 4768, 1), Decl(lib.d.ts, 4854, 11)) +>mp : Symbol(mp, Decl(asyncAwait_es6.ts, 3, 11)) + +let f13 = async (): MyPromise => p; +>f13 : Symbol(f13, Decl(asyncAwait_es6.ts, 19, 3)) +>MyPromise : Symbol(MyPromise, Decl(asyncAwait_es6.ts, 0, 0), Decl(asyncAwait_es6.ts, 1, 11)) +>p : Symbol(p, Decl(asyncAwait_es6.ts, 2, 11)) + +let o = { +>o : Symbol(o, Decl(asyncAwait_es6.ts, 21, 3)) + + async m1() { }, +>m1 : Symbol(m1, Decl(asyncAwait_es6.ts, 21, 9)) + + async m2(): Promise { }, +>m2 : Symbol(m2, Decl(asyncAwait_es6.ts, 22, 16)) +>Promise : Symbol(Promise, Decl(lib.d.ts, 4768, 1), Decl(lib.d.ts, 4854, 11)) + + async m3(): MyPromise { } +>m3 : Symbol(m3, Decl(asyncAwait_es6.ts, 23, 31)) +>MyPromise : Symbol(MyPromise, Decl(asyncAwait_es6.ts, 0, 0), Decl(asyncAwait_es6.ts, 1, 11)) + +}; + +class C { +>C : Symbol(C, Decl(asyncAwait_es6.ts, 25, 2)) + + async m1() { } +>m1 : Symbol(m1, Decl(asyncAwait_es6.ts, 27, 9)) + + async m2(): Promise { } +>m2 : Symbol(m2, Decl(asyncAwait_es6.ts, 28, 15)) +>Promise : Symbol(Promise, Decl(lib.d.ts, 4768, 1), Decl(lib.d.ts, 4854, 11)) + + async m3(): MyPromise { } +>m3 : Symbol(m3, Decl(asyncAwait_es6.ts, 29, 30)) +>MyPromise : Symbol(MyPromise, Decl(asyncAwait_es6.ts, 0, 0), Decl(asyncAwait_es6.ts, 1, 11)) + + static async m4() { } +>m4 : Symbol(C.m4, Decl(asyncAwait_es6.ts, 30, 32)) + + static async m5(): Promise { } +>m5 : Symbol(C.m5, Decl(asyncAwait_es6.ts, 31, 22)) +>Promise : Symbol(Promise, Decl(lib.d.ts, 4768, 1), Decl(lib.d.ts, 4854, 11)) + + static async m6(): MyPromise { } +>m6 : Symbol(C.m6, Decl(asyncAwait_es6.ts, 32, 37)) +>MyPromise : Symbol(MyPromise, Decl(asyncAwait_es6.ts, 0, 0), Decl(asyncAwait_es6.ts, 1, 11)) +} + +module M { +>M : Symbol(M, Decl(asyncAwait_es6.ts, 34, 1)) + + export async function f1() { } +>f1 : Symbol(f1, Decl(asyncAwait_es6.ts, 36, 10)) +} diff --git a/tests/baselines/reference/asyncAwait_es6.types b/tests/baselines/reference/asyncAwait_es6.types new file mode 100644 index 0000000000000..5f0cd2cc35a92 --- /dev/null +++ b/tests/baselines/reference/asyncAwait_es6.types @@ -0,0 +1,129 @@ +=== tests/cases/conformance/async/es6/asyncAwait_es6.ts === +type MyPromise = Promise; +>MyPromise : Promise +>T : T +>Promise : Promise +>T : T + +declare var MyPromise: typeof Promise; +>MyPromise : PromiseConstructor +>Promise : PromiseConstructor + +declare var p: Promise; +>p : Promise +>Promise : Promise + +declare var mp: MyPromise; +>mp : Promise +>MyPromise : Promise + +async function f0() { } +>f0 : () => Promise + +async function f1(): Promise { } +>f1 : () => Promise +>Promise : Promise + +async function f3(): MyPromise { } +>f3 : () => Promise +>MyPromise : Promise + +let f4 = async function() { } +>f4 : () => Promise +>async function() { } : () => Promise + +let f5 = async function(): Promise { } +>f5 : () => Promise +>async function(): Promise { } : () => Promise +>Promise : Promise + +let f6 = async function(): MyPromise { } +>f6 : () => Promise +>async function(): MyPromise { } : () => Promise +>MyPromise : Promise + +let f7 = async () => { }; +>f7 : () => Promise +>async () => { } : () => Promise + +let f8 = async (): Promise => { }; +>f8 : () => Promise +>async (): Promise => { } : () => Promise +>Promise : Promise + +let f9 = async (): MyPromise => { }; +>f9 : () => Promise +>async (): MyPromise => { } : () => Promise +>MyPromise : Promise + +let f10 = async () => p; +>f10 : () => Promise +>async () => p : () => Promise +>p : Promise + +let f11 = async () => mp; +>f11 : () => Promise +>async () => mp : () => Promise +>mp : Promise + +let f12 = async (): Promise => mp; +>f12 : () => Promise +>async (): Promise => mp : () => Promise +>Promise : Promise +>mp : Promise + +let f13 = async (): MyPromise => p; +>f13 : () => Promise +>async (): MyPromise => p : () => Promise +>MyPromise : Promise +>p : Promise + +let o = { +>o : { m1(): Promise; m2(): Promise; m3(): Promise; } +>{ async m1() { }, async m2(): Promise { }, async m3(): MyPromise { }} : { m1(): Promise; m2(): Promise; m3(): Promise; } + + async m1() { }, +>m1 : () => Promise + + async m2(): Promise { }, +>m2 : () => Promise +>Promise : Promise + + async m3(): MyPromise { } +>m3 : () => Promise +>MyPromise : Promise + +}; + +class C { +>C : C + + async m1() { } +>m1 : () => Promise + + async m2(): Promise { } +>m2 : () => Promise +>Promise : Promise + + async m3(): MyPromise { } +>m3 : () => Promise +>MyPromise : Promise + + static async m4() { } +>m4 : () => Promise + + static async m5(): Promise { } +>m5 : () => Promise +>Promise : Promise + + static async m6(): MyPromise { } +>m6 : () => Promise +>MyPromise : Promise +} + +module M { +>M : typeof M + + export async function f1() { } +>f1 : () => Promise +} diff --git a/tests/baselines/reference/asyncFunctionDeclaration11_es6.js b/tests/baselines/reference/asyncFunctionDeclaration11_es6.js index dbf2d489a92ff..7cc10548371c7 100644 --- a/tests/baselines/reference/asyncFunctionDeclaration11_es6.js +++ b/tests/baselines/reference/asyncFunctionDeclaration11_es6.js @@ -4,7 +4,6 @@ async function await(): Promise { //// [asyncFunctionDeclaration11_es6.js] function await() { - return __awaiter(function* () { - }, - this, void 0, Promise); + return __awaiter([this, Promise], function* () { + }); } diff --git a/tests/baselines/reference/asyncFunctionDeclaration13_es6.js b/tests/baselines/reference/asyncFunctionDeclaration13_es6.js index 35f6af6b2ff30..f17b5c894f8cf 100644 --- a/tests/baselines/reference/asyncFunctionDeclaration13_es6.js +++ b/tests/baselines/reference/asyncFunctionDeclaration13_es6.js @@ -7,9 +7,8 @@ async function foo(): Promise { //// [asyncFunctionDeclaration13_es6.js] function foo() { - return __awaiter(function* () { + return __awaiter([this, Promise], function* () { // Legal to use 'await' in a type context. var v; - }, - this, void 0, Promise); + }); } diff --git a/tests/baselines/reference/asyncFunctionDeclaration14_es6.js b/tests/baselines/reference/asyncFunctionDeclaration14_es6.js index 3610cabbdec63..7fee3f4802abb 100644 --- a/tests/baselines/reference/asyncFunctionDeclaration14_es6.js +++ b/tests/baselines/reference/asyncFunctionDeclaration14_es6.js @@ -5,8 +5,7 @@ async function foo(): Promise { //// [asyncFunctionDeclaration14_es6.js] function foo() { - return __awaiter(function* () { + return __awaiter([this, Promise], function* () { return; - }, - this, void 0, Promise); + }); } diff --git a/tests/baselines/reference/asyncFunctionDeclaration1_es6.js b/tests/baselines/reference/asyncFunctionDeclaration1_es6.js index e3e1fb650964a..3e58785802185 100644 --- a/tests/baselines/reference/asyncFunctionDeclaration1_es6.js +++ b/tests/baselines/reference/asyncFunctionDeclaration1_es6.js @@ -4,7 +4,6 @@ async function foo(): Promise { //// [asyncFunctionDeclaration1_es6.js] function foo() { - return __awaiter(function* () { - }, - this, void 0, Promise); + return __awaiter([this, Promise], function* () { + }); } diff --git a/tests/baselines/reference/asyncFunctionDeclaration6_es6.js b/tests/baselines/reference/asyncFunctionDeclaration6_es6.js index 3c1b16cea96a0..33645996cd880 100644 --- a/tests/baselines/reference/asyncFunctionDeclaration6_es6.js +++ b/tests/baselines/reference/asyncFunctionDeclaration6_es6.js @@ -4,7 +4,6 @@ async function foo(a = await): Promise { //// [asyncFunctionDeclaration6_es6.js] function foo(a = yield ) { - return __awaiter(function* () { - }, - this, void 0, Promise); + return __awaiter([this, Promise], function* () { + }); } diff --git a/tests/baselines/reference/asyncFunctionDeclaration7_es6.js b/tests/baselines/reference/asyncFunctionDeclaration7_es6.js index 0b2f643e469e5..667250e45db61 100644 --- a/tests/baselines/reference/asyncFunctionDeclaration7_es6.js +++ b/tests/baselines/reference/asyncFunctionDeclaration7_es6.js @@ -7,13 +7,11 @@ async function bar(): Promise { //// [asyncFunctionDeclaration7_es6.js] function bar() { - return __awaiter(function* () { + return __awaiter([this, Promise], function* () { // 'await' here is an identifier, and not a yield expression. function foo(a = yield ) { - return __awaiter(function* () { - }, - this, void 0, Promise); + return __awaiter([this, Promise], function* () { + }); } - }, - this, void 0, Promise); + }); } diff --git a/tests/baselines/reference/asyncFunctionDeclaration9_es6.js b/tests/baselines/reference/asyncFunctionDeclaration9_es6.js index 7f23510f942d6..dab1b75076e68 100644 --- a/tests/baselines/reference/asyncFunctionDeclaration9_es6.js +++ b/tests/baselines/reference/asyncFunctionDeclaration9_es6.js @@ -5,8 +5,7 @@ async function foo(): Promise { //// [asyncFunctionDeclaration9_es6.js] function foo() { - return __awaiter(function* () { + return __awaiter([this, Promise], function* () { var v = { [yield ]: foo }; - }, - this, void 0, Promise); + }); } diff --git a/tests/baselines/reference/awaitBinaryExpression1_es6.js b/tests/baselines/reference/awaitBinaryExpression1_es6.js index 0531f7643fcb0..11b630355d40d 100644 --- a/tests/baselines/reference/awaitBinaryExpression1_es6.js +++ b/tests/baselines/reference/awaitBinaryExpression1_es6.js @@ -9,10 +9,9 @@ async function func(): Promise { //// [awaitBinaryExpression1_es6.js] function func() { - return __awaiter(function* () { + return __awaiter([this, Promise], function* () { "before"; var b = (yield p) || a; "after"; - }, - this, void 0, Promise); + }); } diff --git a/tests/baselines/reference/awaitBinaryExpression2_es6.js b/tests/baselines/reference/awaitBinaryExpression2_es6.js index 36545440f1f1f..e8f610ae10ac2 100644 --- a/tests/baselines/reference/awaitBinaryExpression2_es6.js +++ b/tests/baselines/reference/awaitBinaryExpression2_es6.js @@ -9,10 +9,9 @@ async function func(): Promise { //// [awaitBinaryExpression2_es6.js] function func() { - return __awaiter(function* () { + return __awaiter([this, Promise], function* () { "before"; var b = (yield p) && a; "after"; - }, - this, void 0, Promise); + }); } diff --git a/tests/baselines/reference/awaitBinaryExpression3_es6.js b/tests/baselines/reference/awaitBinaryExpression3_es6.js index bfe95956ebc4a..770bf75d5a1e1 100644 --- a/tests/baselines/reference/awaitBinaryExpression3_es6.js +++ b/tests/baselines/reference/awaitBinaryExpression3_es6.js @@ -9,10 +9,9 @@ async function func(): Promise { //// [awaitBinaryExpression3_es6.js] function func() { - return __awaiter(function* () { + return __awaiter([this, Promise], function* () { "before"; var b = (yield p) + a; "after"; - }, - this, void 0, Promise); + }); } diff --git a/tests/baselines/reference/awaitBinaryExpression4_es6.js b/tests/baselines/reference/awaitBinaryExpression4_es6.js index fa2dd17143e55..f756d6604bb0f 100644 --- a/tests/baselines/reference/awaitBinaryExpression4_es6.js +++ b/tests/baselines/reference/awaitBinaryExpression4_es6.js @@ -9,10 +9,9 @@ async function func(): Promise { //// [awaitBinaryExpression4_es6.js] function func() { - return __awaiter(function* () { + return __awaiter([this, Promise], function* () { "before"; var b = yield p, a; "after"; - }, - this, void 0, Promise); + }); } diff --git a/tests/baselines/reference/awaitBinaryExpression5_es6.js b/tests/baselines/reference/awaitBinaryExpression5_es6.js index 615320e8ebb0c..c66cfbbd57a2b 100644 --- a/tests/baselines/reference/awaitBinaryExpression5_es6.js +++ b/tests/baselines/reference/awaitBinaryExpression5_es6.js @@ -10,11 +10,10 @@ async function func(): Promise { //// [awaitBinaryExpression5_es6.js] function func() { - return __awaiter(function* () { + return __awaiter([this, Promise], function* () { "before"; var o; o.a = yield p; "after"; - }, - this, void 0, Promise); + }); } diff --git a/tests/baselines/reference/awaitCallExpression1_es6.js b/tests/baselines/reference/awaitCallExpression1_es6.js index 9e329e14ad2dd..db4e0c96abf9f 100644 --- a/tests/baselines/reference/awaitCallExpression1_es6.js +++ b/tests/baselines/reference/awaitCallExpression1_es6.js @@ -13,10 +13,9 @@ async function func(): Promise { //// [awaitCallExpression1_es6.js] function func() { - return __awaiter(function* () { + return __awaiter([this, Promise], function* () { "before"; var b = fn(a, a, a); "after"; - }, - this, void 0, Promise); + }); } diff --git a/tests/baselines/reference/awaitCallExpression2_es6.js b/tests/baselines/reference/awaitCallExpression2_es6.js index 4f8e088b55dd1..47b1e062ae5b8 100644 --- a/tests/baselines/reference/awaitCallExpression2_es6.js +++ b/tests/baselines/reference/awaitCallExpression2_es6.js @@ -13,10 +13,9 @@ async function func(): Promise { //// [awaitCallExpression2_es6.js] function func() { - return __awaiter(function* () { + return __awaiter([this, Promise], function* () { "before"; var b = fn(yield p, a, a); "after"; - }, - this, void 0, Promise); + }); } diff --git a/tests/baselines/reference/awaitCallExpression3_es6.js b/tests/baselines/reference/awaitCallExpression3_es6.js index 54b5d8411d728..e7a09f9b9b883 100644 --- a/tests/baselines/reference/awaitCallExpression3_es6.js +++ b/tests/baselines/reference/awaitCallExpression3_es6.js @@ -13,10 +13,9 @@ async function func(): Promise { //// [awaitCallExpression3_es6.js] function func() { - return __awaiter(function* () { + return __awaiter([this, Promise], function* () { "before"; var b = fn(a, yield p, a); "after"; - }, - this, void 0, Promise); + }); } diff --git a/tests/baselines/reference/awaitCallExpression4_es6.js b/tests/baselines/reference/awaitCallExpression4_es6.js index 9e32395df83e0..59449e4f6a14b 100644 --- a/tests/baselines/reference/awaitCallExpression4_es6.js +++ b/tests/baselines/reference/awaitCallExpression4_es6.js @@ -13,10 +13,9 @@ async function func(): Promise { //// [awaitCallExpression4_es6.js] function func() { - return __awaiter(function* () { + return __awaiter([this, Promise], function* () { "before"; var b = (yield pfn)(a, a, a); "after"; - }, - this, void 0, Promise); + }); } diff --git a/tests/baselines/reference/awaitCallExpression5_es6.js b/tests/baselines/reference/awaitCallExpression5_es6.js index 76ccf06b1050c..c5e28deee89bc 100644 --- a/tests/baselines/reference/awaitCallExpression5_es6.js +++ b/tests/baselines/reference/awaitCallExpression5_es6.js @@ -13,10 +13,9 @@ async function func(): Promise { //// [awaitCallExpression5_es6.js] function func() { - return __awaiter(function* () { + return __awaiter([this, Promise], function* () { "before"; var b = o.fn(a, a, a); "after"; - }, - this, void 0, Promise); + }); } diff --git a/tests/baselines/reference/awaitCallExpression6_es6.js b/tests/baselines/reference/awaitCallExpression6_es6.js index 90b96a06ad741..62fde8c799ca3 100644 --- a/tests/baselines/reference/awaitCallExpression6_es6.js +++ b/tests/baselines/reference/awaitCallExpression6_es6.js @@ -13,10 +13,9 @@ async function func(): Promise { //// [awaitCallExpression6_es6.js] function func() { - return __awaiter(function* () { + return __awaiter([this, Promise], function* () { "before"; var b = o.fn(yield p, a, a); "after"; - }, - this, void 0, Promise); + }); } diff --git a/tests/baselines/reference/awaitCallExpression7_es6.js b/tests/baselines/reference/awaitCallExpression7_es6.js index e9a2edb8a9142..f717d76c51dee 100644 --- a/tests/baselines/reference/awaitCallExpression7_es6.js +++ b/tests/baselines/reference/awaitCallExpression7_es6.js @@ -13,10 +13,9 @@ async function func(): Promise { //// [awaitCallExpression7_es6.js] function func() { - return __awaiter(function* () { + return __awaiter([this, Promise], function* () { "before"; var b = o.fn(a, yield p, a); "after"; - }, - this, void 0, Promise); + }); } diff --git a/tests/baselines/reference/awaitCallExpression8_es6.js b/tests/baselines/reference/awaitCallExpression8_es6.js index e172dde417d31..e6e2cee172bc2 100644 --- a/tests/baselines/reference/awaitCallExpression8_es6.js +++ b/tests/baselines/reference/awaitCallExpression8_es6.js @@ -13,10 +13,9 @@ async function func(): Promise { //// [awaitCallExpression8_es6.js] function func() { - return __awaiter(function* () { + return __awaiter([this, Promise], function* () { "before"; var b = (yield po).fn(a, a, a); "after"; - }, - this, void 0, Promise); + }); } diff --git a/tests/cases/conformance/async/es6/asyncAwait_es6.ts b/tests/cases/conformance/async/es6/asyncAwait_es6.ts new file mode 100644 index 0000000000000..8e72197a98d9a --- /dev/null +++ b/tests/cases/conformance/async/es6/asyncAwait_es6.ts @@ -0,0 +1,40 @@ +// @target: ES6 +type MyPromise = Promise; +declare var MyPromise: typeof Promise; +declare var p: Promise; +declare var mp: MyPromise; + +async function f0() { } +async function f1(): Promise { } +async function f3(): MyPromise { } + +let f4 = async function() { } +let f5 = async function(): Promise { } +let f6 = async function(): MyPromise { } + +let f7 = async () => { }; +let f8 = async (): Promise => { }; +let f9 = async (): MyPromise => { }; +let f10 = async () => p; +let f11 = async () => mp; +let f12 = async (): Promise => mp; +let f13 = async (): MyPromise => p; + +let o = { + async m1() { }, + async m2(): Promise { }, + async m3(): MyPromise { } +}; + +class C { + async m1() { } + async m2(): Promise { } + async m3(): MyPromise { } + static async m4() { } + static async m5(): Promise { } + static async m6(): MyPromise { } +} + +module M { + export async function f1() { } +} \ No newline at end of file From c4876d53fd461cd7842396e0e1faa5de34c11c04 Mon Sep 17 00:00:00 2001 From: Ron Buckton Date: Thu, 18 Jun 2015 14:26:22 -0700 Subject: [PATCH 31/35] Add support for awaiting union types with mixed promise and non-promise constituents. --- src/compiler/checker.ts | 166 ++++++++++-------- tests/baselines/reference/awaitUnion_es6.js | 24 +++ .../reference/awaitUnion_es6.symbols | 39 ++++ .../baselines/reference/awaitUnion_es6.types | 44 +++++ .../conformance/async/es6/awaitUnion_es6.ts | 14 ++ 5 files changed, 214 insertions(+), 73 deletions(-) create mode 100644 tests/baselines/reference/awaitUnion_es6.js create mode 100644 tests/baselines/reference/awaitUnion_es6.symbols create mode 100644 tests/baselines/reference/awaitUnion_es6.types create mode 100644 tests/cases/conformance/async/es6/awaitUnion_es6.ts diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index 70ca1172ccbfa..83e5d3de18ca4 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -7653,7 +7653,7 @@ namespace ts { // Promise/A+ compatible implementation will always assimilate any foreign promise, so the // return type of the body should be unwrapped to its awaited type, which we will wrap in // the native Promise type later in this function. - type = getAwaitedType(type, func, Diagnostics.Return_expression_in_async_function_does_not_have_a_valid_callable_then_member); + type = checkAwaitedType(type, func, Diagnostics.Return_expression_in_async_function_does_not_have_a_valid_callable_then_member); } } else { @@ -7762,7 +7762,7 @@ namespace ts { // Promise/A+ compatible implementation will always assimilate any foreign promise, so the // return type of the body should be unwrapped to its awaited type, which should be wrapped in // the native Promise type by the caller. - type = getAwaitedType(type, body.parent, Diagnostics.Return_expression_in_async_function_does_not_have_a_valid_callable_then_member); + type = checkAwaitedType(type, body.parent, Diagnostics.Return_expression_in_async_function_does_not_have_a_valid_callable_then_member); } if (!contains(aggregatedTypes, type)) { @@ -7914,7 +7914,7 @@ namespace ts { let exprType = checkExpression(node.body); if (returnType) { if (isAsync) { - let awaitedType = getAwaitedType(exprType, node.body, Diagnostics.Expression_body_for_async_arrow_function_does_not_have_a_valid_callable_then_member); + let awaitedType = checkAwaitedType(exprType, node.body, Diagnostics.Expression_body_for_async_arrow_function_does_not_have_a_valid_callable_then_member); checkTypeAssignableTo(awaitedType, promisedType, node.body); } else { @@ -8041,7 +8041,7 @@ namespace ts { } let operandType = checkExpression(node.expression); - return getAwaitedType(operandType, node); + return checkAwaitedType(operandType, node); } function checkPrefixUnaryExpression(node: PrefixUnaryExpression): Type { @@ -9474,10 +9474,10 @@ namespace ts { error(location, message); } - return false; + return unknownType; } - return true; + return type; } /** @@ -9537,7 +9537,7 @@ namespace ts { return getTypeAtPosition(signature, 0); } - let alreadySeenTypesForAwait: boolean[] = []; + let awaitedTypeStack: number[] = []; /** * Gets the "awaited type" of a type. @@ -9546,76 +9546,96 @@ namespace ts { * Promise-like type; otherwise, it is the type of the expression. This is used to reflect * The runtime behavior of the `await` keyword. */ - function getAwaitedType(type: Type, location?: Node, message?: DiagnosticMessage): Type { - // reset the set of visited types - alreadySeenTypesForAwait.length = 0; - while (true) { - let promisedType = getPromisedType(type); - if (promisedType === undefined) { - // The type was not a PromiseLike, so it could not be unwrapped any further. - // As long as the type does not have a callable "then" property, then it is - // safe to return the type; otherwise, an error will have been reported in - // the call to checkNonThenableType and we will return unknownType. - // - // An example of a non-promise "thenable" might be: - // - // await { then(): void {} } - // - // The "thenable" does not match the minimal definition for a PromiseLike. When - // a Promise/A+-compatible or ES6 promise tries to adopt this value, the promise - // will never settle. We treat this as an error to help flag an early indicator - // of a runtime problem. If the user wants to return this value from an async - // function, they would need to wrap it in some other value. If they want it to - // be treated as a promise, they can cast to . - if (!checkNonThenableType(type, location, message)) { - type = unknownType; + function getAwaitedType(type: Type) { + return checkAwaitedType(type, /*location*/ undefined, /*message*/ undefined); + } + + function checkAwaitedType(type: Type, location?: Node, message?: DiagnosticMessage) { + return getAwaitedTypeWorker(type); + + function getAwaitedTypeWorker(type: Type): Type { + if (type.flags & TypeFlags.Union) { + let types: Type[] = []; + for (let constituentType of (type).types) { + types.push(getAwaitedTypeWorker(constituentType)); } - break; + return getUnionType(types); } - - // Keep track of the type we're about to unwrap to avoid bad recursive promise types. - // See the comments below for more information. - alreadySeenTypesForAwait[type.id] = true; - - if (alreadySeenTypesForAwait[promisedType.id]) { - // We have a bad actor in the form of a promise whose promised type is the same - // promise type, or a mutually recursive promise. Return the unknown type as we cannot guess - // the shape. If this were the actual case in the JavaScript, this Promise would never resolve. - // - // An example of a bad actor with a singly-recursive promise type might be: - // - // interface BadPromise { - // then(onfulfilled: (value: BadPromise) => any, onrejected: (error: any) => any): BadPromise; - // } - // - // The above interface will pass the PromiseLike check, and return a promised type of `BadPromise`. - // Since this is a self reference, we don't want to keep recursing ad infinitum. - // - // An example of a bad actor in the form of a mutually-recursive promise type might be: - // - // interface BadPromiseA { - // then(onfulfilled: (value: BadPromiseB) => any, onrejected: (error: any) => any): BadPromiseB; - // } - // - // interface BadPromiseB { - // then(onfulfilled: (value: BadPromiseA) => any, onrejected: (error: any) => any): BadPromiseA; - // } - // - if (location) { - error(location, Diagnostics._0_is_referenced_directly_or_indirectly_in_the_fulfillment_callback_of_its_own_then_method, symbolToString(type.symbol)); + else { + let promisedType = getPromisedType(type); + if (promisedType === undefined) { + // The type was not a PromiseLike, so it could not be unwrapped any further. + // As long as the type does not have a callable "then" property, it is + // safe to return the type; otherwise, an error will have been reported in + // the call to checkNonThenableType and we will return unknownType. + // + // An example of a non-promise "thenable" might be: + // + // await { then(): void {} } + // + // The "thenable" does not match the minimal definition for a PromiseLike. When + // a Promise/A+-compatible or ES6 promise tries to adopt this value, the promise + // will never settle. We treat this as an error to help flag an early indicator + // of a runtime problem. If the user wants to return this value from an async + // function, they would need to wrap it in some other value. If they want it to + // be treated as a promise, they can cast to . + return checkNonThenableType(type, location, message); + } + else { + if (type.id === promisedType.id || awaitedTypeStack.indexOf(promisedType.id) >= 0) { + // We have a bad actor in the form of a promise whose promised type is + // the same promise type, or a mutually recursive promise. Return the + // unknown type as we cannot guess the shape. If this were the actual + // case in the JavaScript, this Promise would never resolve. + // + // An example of a bad actor with a singly-recursive promise type might + // be: + // + // interface BadPromise { + // then( + // onfulfilled: (value: BadPromise) => any, + // onrejected: (error: any) => any): BadPromise; + // } + // + // The above interface will pass the PromiseLike check, and return a + // promised type of `BadPromise`. Since this is a self reference, we + // don't want to keep recursing ad infinitum. + // + // An example of a bad actor in the form of a mutually-recursive + // promise type might be: + // + // interface BadPromiseA { + // then( + // onfulfilled: (value: BadPromiseB) => any, + // onrejected: (error: any) => any): BadPromiseB; + // } + // + // interface BadPromiseB { + // then( + // onfulfilled: (value: BadPromiseA) => any, + // onrejected: (error: any) => any): BadPromiseA; + // } + // + if (location) { + error( + location, + Diagnostics._0_is_referenced_directly_or_indirectly_in_the_fulfillment_callback_of_its_own_then_method, + symbolToString(type.symbol)); + } + + return unknownType; + } + + // Keep track of the type we're about to unwrap to avoid bad recursive promise types. + // See the comments above for more information. + awaitedTypeStack.push(type.id); + let awaitedType = getAwaitedTypeWorker(promisedType); + awaitedTypeStack.pop(); + return awaitedType; } - - type = unknownType; - break; } - - type = promisedType; } - - // Cleanup, reset the set of visited types - alreadySeenTypesForAwait.length = 0; - return type; } /** @@ -9691,7 +9711,7 @@ namespace ts { } // Get and return the awaited type of the return type. - return getAwaitedType(promiseType, node, Diagnostics.An_async_function_or_method_must_have_a_valid_awaitable_return_type); + return checkAwaitedType(promiseType, node, Diagnostics.An_async_function_or_method_must_have_a_valid_awaitable_return_type); } /** Check a decorator */ @@ -10664,7 +10684,7 @@ namespace ts { else if (func.type || isGetAccessorWithAnnotatatedSetAccessor(func) || signature.typePredicate) { if (isAsyncFunctionLike(func)) { let promisedType = getPromisedType(returnType); - let awaitedType = getAwaitedType(exprType, node.expression, Diagnostics.Return_expression_in_async_function_does_not_have_a_valid_callable_then_member); + let awaitedType = checkAwaitedType(exprType, node.expression, Diagnostics.Return_expression_in_async_function_does_not_have_a_valid_callable_then_member); checkTypeAssignableTo(awaitedType, promisedType, node.expression); } else { diff --git a/tests/baselines/reference/awaitUnion_es6.js b/tests/baselines/reference/awaitUnion_es6.js new file mode 100644 index 0000000000000..7ac556b01bca4 --- /dev/null +++ b/tests/baselines/reference/awaitUnion_es6.js @@ -0,0 +1,24 @@ +//// [awaitUnion_es6.ts] +declare let a: number | string; +declare let b: PromiseLike | PromiseLike; +declare let c: PromiseLike; +declare let d: number | PromiseLike; +declare let e: number | PromiseLike; +async function f() { + let await_a = await a; + let await_b = await b; + let await_c = await c; + let await_d = await d; + let await_e = await e; +} + +//// [awaitUnion_es6.js] +function f() { + return __awaiter([this], function* () { + let await_a = yield a; + let await_b = yield b; + let await_c = yield c; + let await_d = yield d; + let await_e = yield e; + }); +} diff --git a/tests/baselines/reference/awaitUnion_es6.symbols b/tests/baselines/reference/awaitUnion_es6.symbols new file mode 100644 index 0000000000000..ca0b9afaf929c --- /dev/null +++ b/tests/baselines/reference/awaitUnion_es6.symbols @@ -0,0 +1,39 @@ +=== tests/cases/conformance/async/es6/awaitUnion_es6.ts === +declare let a: number | string; +>a : Symbol(a, Decl(awaitUnion_es6.ts, 0, 11)) + +declare let b: PromiseLike | PromiseLike; +>b : Symbol(b, Decl(awaitUnion_es6.ts, 1, 11)) +>PromiseLike : Symbol(PromiseLike, Decl(lib.d.ts, 1187, 163)) +>PromiseLike : Symbol(PromiseLike, Decl(lib.d.ts, 1187, 163)) + +declare let c: PromiseLike; +>c : Symbol(c, Decl(awaitUnion_es6.ts, 2, 11)) +>PromiseLike : Symbol(PromiseLike, Decl(lib.d.ts, 1187, 163)) + +declare let d: number | PromiseLike; +>d : Symbol(d, Decl(awaitUnion_es6.ts, 3, 11)) +>PromiseLike : Symbol(PromiseLike, Decl(lib.d.ts, 1187, 163)) + +declare let e: number | PromiseLike; +>e : Symbol(e, Decl(awaitUnion_es6.ts, 4, 11)) +>PromiseLike : Symbol(PromiseLike, Decl(lib.d.ts, 1187, 163)) + +async function f() { +>f : Symbol(f, Decl(awaitUnion_es6.ts, 4, 53)) + + let await_a = await a; +>await_a : Symbol(await_a, Decl(awaitUnion_es6.ts, 6, 4)) + + let await_b = await b; +>await_b : Symbol(await_b, Decl(awaitUnion_es6.ts, 7, 4)) + + let await_c = await c; +>await_c : Symbol(await_c, Decl(awaitUnion_es6.ts, 8, 4)) + + let await_d = await d; +>await_d : Symbol(await_d, Decl(awaitUnion_es6.ts, 9, 4)) + + let await_e = await e; +>await_e : Symbol(await_e, Decl(awaitUnion_es6.ts, 10, 4)) +} diff --git a/tests/baselines/reference/awaitUnion_es6.types b/tests/baselines/reference/awaitUnion_es6.types new file mode 100644 index 0000000000000..fc7bef8a28c25 --- /dev/null +++ b/tests/baselines/reference/awaitUnion_es6.types @@ -0,0 +1,44 @@ +=== tests/cases/conformance/async/es6/awaitUnion_es6.ts === +declare let a: number | string; +>a : string | number + +declare let b: PromiseLike | PromiseLike; +>b : PromiseLike | PromiseLike +>PromiseLike : PromiseLike +>PromiseLike : PromiseLike + +declare let c: PromiseLike; +>c : PromiseLike +>PromiseLike : PromiseLike + +declare let d: number | PromiseLike; +>d : number | PromiseLike +>PromiseLike : PromiseLike + +declare let e: number | PromiseLike; +>e : number | PromiseLike +>PromiseLike : PromiseLike + +async function f() { +>f : () => Promise + + let await_a = await a; +>await_a : string | number +>a : any + + let await_b = await b; +>await_b : string | number +>b : any + + let await_c = await c; +>await_c : string | number +>c : any + + let await_d = await d; +>await_d : string | number +>d : any + + let await_e = await e; +>await_e : string | number +>e : any +} diff --git a/tests/cases/conformance/async/es6/awaitUnion_es6.ts b/tests/cases/conformance/async/es6/awaitUnion_es6.ts new file mode 100644 index 0000000000000..a132ae01dfde2 --- /dev/null +++ b/tests/cases/conformance/async/es6/awaitUnion_es6.ts @@ -0,0 +1,14 @@ +// @target: ES6 +// @noEmitHelpers: true +declare let a: number | string; +declare let b: PromiseLike | PromiseLike; +declare let c: PromiseLike; +declare let d: number | PromiseLike; +declare let e: number | PromiseLike; +async function f() { + let await_a = await a; + let await_b = await b; + let await_c = await c; + let await_d = await d; + let await_e = await e; +} \ No newline at end of file From 379d74a1bfa49acdc616846dc02e21a4f2d25891 Mon Sep 17 00:00:00 2001 From: Ron Buckton Date: Thu, 18 Jun 2015 14:27:20 -0700 Subject: [PATCH 32/35] Minor function rename --- src/compiler/checker.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index 83e5d3de18ca4..13c0aa89a9fd1 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -9551,13 +9551,13 @@ namespace ts { } function checkAwaitedType(type: Type, location?: Node, message?: DiagnosticMessage) { - return getAwaitedTypeWorker(type); + return checkAwaitedTypeWorker(type); - function getAwaitedTypeWorker(type: Type): Type { + function checkAwaitedTypeWorker(type: Type): Type { if (type.flags & TypeFlags.Union) { let types: Type[] = []; for (let constituentType of (type).types) { - types.push(getAwaitedTypeWorker(constituentType)); + types.push(checkAwaitedTypeWorker(constituentType)); } return getUnionType(types); @@ -9630,7 +9630,7 @@ namespace ts { // Keep track of the type we're about to unwrap to avoid bad recursive promise types. // See the comments above for more information. awaitedTypeStack.push(type.id); - let awaitedType = getAwaitedTypeWorker(promisedType); + let awaitedType = checkAwaitedTypeWorker(promisedType); awaitedTypeStack.pop(); return awaitedType; } From eb03ae8e7c66f32326eb2e32c5defae17455bb74 Mon Sep 17 00:00:00 2001 From: Ron Buckton Date: Thu, 18 Jun 2015 15:41:19 -0700 Subject: [PATCH 33/35] Added shortcut in checkAwaitedType for isolatedModules --- src/compiler/checker.ts | 6 + .../asyncAwaitIsolatedModules_es6.errors.txt | 45 +++++++ .../asyncAwaitIsolatedModules_es6.js | 119 ++++++++++++++++++ .../es6/asyncAwaitIsolatedModules_es6.ts | 41 ++++++ 4 files changed, 211 insertions(+) create mode 100644 tests/baselines/reference/asyncAwaitIsolatedModules_es6.errors.txt create mode 100644 tests/baselines/reference/asyncAwaitIsolatedModules_es6.js create mode 100644 tests/cases/conformance/async/es6/asyncAwaitIsolatedModules_es6.ts diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index 13c0aa89a9fd1..5445c7f919e2b 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -9687,6 +9687,12 @@ namespace ts { // side of the `Promise` class, which would be `{ new (...): Promise }`. let promiseType = getTypeFromTypeNode(node.type); + if (promiseType === unknownType && compilerOptions.isolatedModules) { + // If we are compiling with isolatedModules, we may not be able to resolve the + // type as a value. As such, we will just return unknownType; + return unknownType; + } + let promiseConstructor = getMergedSymbol(promiseType.symbol); if (!promiseConstructor || !symbolIsValue(promiseConstructor)) { error(node, Diagnostics.Type_0_is_not_a_valid_async_function_return_type, typeToString(promiseType)); diff --git a/tests/baselines/reference/asyncAwaitIsolatedModules_es6.errors.txt b/tests/baselines/reference/asyncAwaitIsolatedModules_es6.errors.txt new file mode 100644 index 0000000000000..068fbb604e1e9 --- /dev/null +++ b/tests/baselines/reference/asyncAwaitIsolatedModules_es6.errors.txt @@ -0,0 +1,45 @@ +tests/cases/conformance/async/es6/asyncAwaitIsolatedModules_es6.ts(1,27): error TS2307: Cannot find module 'missing'. + + +==== tests/cases/conformance/async/es6/asyncAwaitIsolatedModules_es6.ts (1 errors) ==== + import { MyPromise } from "missing"; + ~~~~~~~~~ +!!! error TS2307: Cannot find module 'missing'. + + declare var p: Promise; + declare var mp: MyPromise; + + async function f0() { } + async function f1(): Promise { } + async function f3(): MyPromise { } + + let f4 = async function() { } + let f5 = async function(): Promise { } + let f6 = async function(): MyPromise { } + + let f7 = async () => { }; + let f8 = async (): Promise => { }; + let f9 = async (): MyPromise => { }; + let f10 = async () => p; + let f11 = async () => mp; + let f12 = async (): Promise => mp; + let f13 = async (): MyPromise => p; + + let o = { + async m1() { }, + async m2(): Promise { }, + async m3(): MyPromise { } + }; + + class C { + async m1() { } + async m2(): Promise { } + async m3(): MyPromise { } + static async m4() { } + static async m5(): Promise { } + static async m6(): MyPromise { } + } + + module M { + export async function f1() { } + } \ No newline at end of file diff --git a/tests/baselines/reference/asyncAwaitIsolatedModules_es6.js b/tests/baselines/reference/asyncAwaitIsolatedModules_es6.js new file mode 100644 index 0000000000000..7fb55df0eae63 --- /dev/null +++ b/tests/baselines/reference/asyncAwaitIsolatedModules_es6.js @@ -0,0 +1,119 @@ +//// [asyncAwaitIsolatedModules_es6.ts] +import { MyPromise } from "missing"; + +declare var p: Promise; +declare var mp: MyPromise; + +async function f0() { } +async function f1(): Promise { } +async function f3(): MyPromise { } + +let f4 = async function() { } +let f5 = async function(): Promise { } +let f6 = async function(): MyPromise { } + +let f7 = async () => { }; +let f8 = async (): Promise => { }; +let f9 = async (): MyPromise => { }; +let f10 = async () => p; +let f11 = async () => mp; +let f12 = async (): Promise => mp; +let f13 = async (): MyPromise => p; + +let o = { + async m1() { }, + async m2(): Promise { }, + async m3(): MyPromise { } +}; + +class C { + async m1() { } + async m2(): Promise { } + async m3(): MyPromise { } + static async m4() { } + static async m5(): Promise { } + static async m6(): MyPromise { } +} + +module M { + export async function f1() { } +} + +//// [asyncAwaitIsolatedModules_es6.js] +var __awaiter = (this && this.__awaiter) || function (args, generator) { + var PromiseConstructor = args[1] || Promise; + return new PromiseConstructor(function (resolve, reject) { + generator = generator.call(args[0], args[2]); + function cast(value) { return value instanceof PromiseConstructor ? value : new PromiseConstructor(function (resolve) { resolve(value); }); } + function onfulfill(value) { try { step("next", value); } catch (e) { reject(e); } } + function onreject(value) { try { step("throw", value); } catch (e) { reject(e); } } + function step(verb, value) { + var result = generator[verb](value); + result.done ? resolve(result.value) : cast(result.value).then(onfulfill, onreject); + } + step("next", void 0); + }); +}; +function f0() { + return __awaiter([this], function* () { }); +} +function f1() { + return __awaiter([this, Promise], function* () { }); +} +function f3() { + return __awaiter([this, MyPromise], function* () { }); +} +let f4 = function () { + return __awaiter([this], function* () { }); +}; +let f5 = function () { + return __awaiter([this, Promise], function* () { }); +}; +let f6 = function () { + return __awaiter([this, MyPromise], function* () { }); +}; +let f7 = () => __awaiter([this], function* () { }); +let f8 = () => __awaiter([this, Promise], function* () { }); +let f9 = () => __awaiter([this, MyPromise], function* () { }); +let f10 = () => __awaiter([this], function* () { return p; }); +let f11 = () => __awaiter([this], function* () { return mp; }); +let f12 = () => __awaiter([this, Promise], function* () { return mp; }); +let f13 = () => __awaiter([this, MyPromise], function* () { return p; }); +let o = { + m1() { + return __awaiter([this], function* () { }); + }, + m2() { + return __awaiter([this, Promise], function* () { }); + }, + m3() { + return __awaiter([this, MyPromise], function* () { }); + } +}; +class C { + m1() { + return __awaiter([this], function* () { }); + } + m2() { + return __awaiter([this, Promise], function* () { }); + } + m3() { + return __awaiter([this, MyPromise], function* () { }); + } + static m4() { + return __awaiter([this], function* () { }); + } + static m5() { + return __awaiter([this, Promise], function* () { }); + } + static m6() { + return __awaiter([this, MyPromise], function* () { }); + } +} +var M; +(function (M) { + function f1() { + return __awaiter([this], function* () { }); + } + M.f1 = f1; +})(M || (M = {})); diff --git a/tests/cases/conformance/async/es6/asyncAwaitIsolatedModules_es6.ts b/tests/cases/conformance/async/es6/asyncAwaitIsolatedModules_es6.ts new file mode 100644 index 0000000000000..8e2cfd8c6c578 --- /dev/null +++ b/tests/cases/conformance/async/es6/asyncAwaitIsolatedModules_es6.ts @@ -0,0 +1,41 @@ +// @target: ES6 +// @isolatedModules: true +import { MyPromise } from "missing"; + +declare var p: Promise; +declare var mp: MyPromise; + +async function f0() { } +async function f1(): Promise { } +async function f3(): MyPromise { } + +let f4 = async function() { } +let f5 = async function(): Promise { } +let f6 = async function(): MyPromise { } + +let f7 = async () => { }; +let f8 = async (): Promise => { }; +let f9 = async (): MyPromise => { }; +let f10 = async () => p; +let f11 = async () => mp; +let f12 = async (): Promise => mp; +let f13 = async (): MyPromise => p; + +let o = { + async m1() { }, + async m2(): Promise { }, + async m3(): MyPromise { } +}; + +class C { + async m1() { } + async m2(): Promise { } + async m3(): MyPromise { } + static async m4() { } + static async m5(): Promise { } + static async m6(): MyPromise { } +} + +module M { + export async function f1() { } +} \ No newline at end of file From 5b32903ab40549efc9cefd4f5f73688dff101a0a Mon Sep 17 00:00:00 2001 From: Ron Buckton Date: Fri, 19 Jun 2015 16:01:12 -0700 Subject: [PATCH 34/35] Fix async function emit for lexical arguments --- src/compiler/checker.ts | 1 + src/compiler/emitter.ts | 57 +++++++++++-------- src/compiler/types.ts | 9 +-- .../reference/asyncArrowFunction1_es6.js | 2 +- .../reference/asyncArrowFunction6_es6.js | 2 +- .../reference/asyncArrowFunction7_es6.js | 4 +- .../reference/asyncArrowFunction8_es6.js | 2 +- ...asyncArrowFunctionCapturesArguments_es6.js | 2 +- .../asyncArrowFunctionCapturesThis_es6.js | 2 +- .../asyncAwaitIsolatedModules_es6.js | 55 +++++++++--------- tests/baselines/reference/asyncAwait_es6.js | 55 +++++++++--------- .../asyncFunctionDeclaration11_es6.js | 2 +- .../asyncFunctionDeclaration13_es6.js | 2 +- .../asyncFunctionDeclaration14_es6.js | 2 +- .../asyncFunctionDeclaration1_es6.js | 2 +- .../asyncFunctionDeclaration6_es6.js | 2 +- .../asyncFunctionDeclaration7_es6.js | 4 +- .../asyncFunctionDeclaration9_es6.js | 2 +- .../reference/awaitBinaryExpression1_es6.js | 2 +- .../reference/awaitBinaryExpression2_es6.js | 2 +- .../reference/awaitBinaryExpression3_es6.js | 2 +- .../reference/awaitBinaryExpression4_es6.js | 2 +- .../reference/awaitBinaryExpression5_es6.js | 2 +- .../reference/awaitCallExpression1_es6.js | 2 +- .../reference/awaitCallExpression2_es6.js | 2 +- .../reference/awaitCallExpression3_es6.js | 2 +- .../reference/awaitCallExpression4_es6.js | 2 +- .../reference/awaitCallExpression5_es6.js | 2 +- .../reference/awaitCallExpression6_es6.js | 2 +- .../reference/awaitCallExpression7_es6.js | 2 +- .../reference/awaitCallExpression8_es6.js | 2 +- tests/baselines/reference/awaitUnion_es6.js | 2 +- 32 files changed, 122 insertions(+), 113 deletions(-) diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index 5445c7f919e2b..53c5e3d883337 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -5765,6 +5765,7 @@ namespace ts { if (node.parserContextFlags & ParserContextFlags.Await) { getNodeLinks(container).flags |= NodeCheckFlags.CaptureArguments; + getNodeLinks(node).flags |= NodeCheckFlags.LexicalArguments; } } diff --git a/src/compiler/emitter.ts b/src/compiler/emitter.ts index d537380dc5d8f..a5271b27c2cab 100644 --- a/src/compiler/emitter.ts +++ b/src/compiler/emitter.ts @@ -49,11 +49,10 @@ var __param = (this && this.__param) || function (paramIndex, decorator) { };`; const awaiterHelper = ` -var __awaiter = (this && this.__awaiter) || function (args, generator) { - var PromiseConstructor = args[1] || Promise; - return new PromiseConstructor(function (resolve, reject) { - generator = generator.call(args[0], args[2]); - function cast(value) { return value instanceof PromiseConstructor ? value : new PromiseConstructor(function (resolve) { resolve(value); }); } +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promise, generator) { + return new Promise(function (resolve, reject) { + generator = generator.call(thisArg, _arguments); + function cast(value) { return value instanceof Promise && value.constructor === Promise ? value : new Promise(function (resolve) { resolve(value); }); } function onfulfill(value) { try { step("next", value); } catch (e) { reject(e); } } function onreject(value) { try { step("throw", value); } catch (e) { reject(e); } } function step(verb, value) { @@ -1239,6 +1238,11 @@ var __awaiter = (this && this.__awaiter) || function (args, generator) { } function emitExpressionIdentifier(node: Identifier) { + if (resolver.getNodeCheckFlags(node) & NodeCheckFlags.LexicalArguments) { + write("_arguments"); + return; + } + let container = resolver.getReferencedExportContainer(node); if (container) { if (container.kind === SyntaxKind.SourceFile) { @@ -3374,9 +3378,9 @@ var __awaiter = (this && this.__awaiter) || function (args, generator) { // let a = async (b) => { await b; } // // // output - // let a = (b) => __awaiter([this], function* (b) { + // let a = (b) => __awaiter(this, void 0, void 0, function* () { // yield b; - // }, this); + // }); // // The emit for an async arrow with a lexical `arguments` binding might be: // @@ -3384,7 +3388,7 @@ var __awaiter = (this && this.__awaiter) || function (args, generator) { // let a = async (b) => { await arguments[0]; } // // // output - // let a = (b) => __awaiter([this, arguments], function* (arguments) { + // let a = (b) => __awaiter(this, arguments, void 0, function* (arguments) { // yield arguments[0]; // }); // @@ -3398,9 +3402,9 @@ var __awaiter = (this && this.__awaiter) || function (args, generator) { // // // output // let a = function (b) { - // return __awaiter([this], function* () { + // return __awaiter(this, void 0, void 0, function* () { // yield b; - // }, this); + // }); // } // // The emit for an async function expression with a lexical `arguments` binding @@ -3413,8 +3417,8 @@ var __awaiter = (this && this.__awaiter) || function (args, generator) { // // // output // let a = function (b) { - // return __awaiter([this, arguments], function* (arguments) { - // yield arguments[0]; + // return __awaiter(this, arguments, void 0, function* (_arguments) { + // yield _arguments[0]; // }); // } // @@ -3428,8 +3432,8 @@ var __awaiter = (this && this.__awaiter) || function (args, generator) { // // // output // let a = function (b) { - // return __awaiter([this, arguments, MyPromise], function* (arguments) { - // yield arguments[0]; + // return __awaiter(this, arguments, MyPromise, function* (_arguments) { + // yield _arguments[0]; // }); // } // @@ -3443,23 +3447,28 @@ var __awaiter = (this && this.__awaiter) || function (args, generator) { write("return"); } - write(" __awaiter([this"); - if (promiseConstructor || hasLexicalArguments) { + write(" __awaiter(this"); + if (hasLexicalArguments) { + write(", arguments"); + } + else { + write(", void 0"); + } + + if (promiseConstructor) { write(", "); - if (promiseConstructor) { - emitNodeWithoutSourceMap(promiseConstructor); - } - if (hasLexicalArguments) { - write(", arguments"); - } + emitNodeWithoutSourceMap(promiseConstructor); + } + else { + write(", Promise"); } // Emit the call to __awaiter. if (hasLexicalArguments) { - write("], function* (arguments)"); + write(", function* (_arguments)"); } else { - write("], function* ()"); + write(", function* ()"); } // Emit the signature and body for the inner generator function. diff --git a/src/compiler/types.ts b/src/compiler/types.ts index db2eafe4e5377..e55cccc0cccef 100644 --- a/src/compiler/types.ts +++ b/src/compiler/types.ts @@ -1595,12 +1595,13 @@ namespace ts { SuperInstance = 0x00000100, // Instance 'super' reference SuperStatic = 0x00000200, // Static 'super' reference ContextChecked = 0x00000400, // Contextual types have been assigned - CaptureArguments = 0x00000800, // Lexical 'arguments' used in body (for async functions) + LexicalArguments = 0x00000800, + CaptureArguments = 0x00001000, // Lexical 'arguments' used in body (for async functions) // Values for enum members have been computed, and any errors have been reported for them. - EnumValuesComputed = 0x00001000, - BlockScopedBindingInLoop = 0x00002000, - LexicalModuleMergesWithClass= 0x00004000, // Instantiated lexical module declaration is merged with a previous class declaration. + EnumValuesComputed = 0x00002000, + BlockScopedBindingInLoop = 0x00004000, + LexicalModuleMergesWithClass= 0x00008000, // Instantiated lexical module declaration is merged with a previous class declaration. } /* @internal */ diff --git a/tests/baselines/reference/asyncArrowFunction1_es6.js b/tests/baselines/reference/asyncArrowFunction1_es6.js index 2c2f1091b1537..4f03acc5ced43 100644 --- a/tests/baselines/reference/asyncArrowFunction1_es6.js +++ b/tests/baselines/reference/asyncArrowFunction1_es6.js @@ -4,5 +4,5 @@ var foo = async (): Promise => { }; //// [asyncArrowFunction1_es6.js] -var foo = () => __awaiter([this, Promise], function* () { +var foo = () => __awaiter(this, void 0, Promise, function* () { }); diff --git a/tests/baselines/reference/asyncArrowFunction6_es6.js b/tests/baselines/reference/asyncArrowFunction6_es6.js index 0a39441edf795..54b8aa1f6b154 100644 --- a/tests/baselines/reference/asyncArrowFunction6_es6.js +++ b/tests/baselines/reference/asyncArrowFunction6_es6.js @@ -4,5 +4,5 @@ var foo = async (a = await): Promise => { } //// [asyncArrowFunction6_es6.js] -var foo = (a = yield ) => __awaiter([this, Promise], function* () { +var foo = (a = yield ) => __awaiter(this, void 0, Promise, function* () { }); diff --git a/tests/baselines/reference/asyncArrowFunction7_es6.js b/tests/baselines/reference/asyncArrowFunction7_es6.js index bb17963bfd371..ac68a8fd2f865 100644 --- a/tests/baselines/reference/asyncArrowFunction7_es6.js +++ b/tests/baselines/reference/asyncArrowFunction7_es6.js @@ -7,8 +7,8 @@ var bar = async (): Promise => { } //// [asyncArrowFunction7_es6.js] -var bar = () => __awaiter([this, Promise], function* () { +var bar = () => __awaiter(this, void 0, Promise, function* () { // 'await' here is an identifier, and not an await expression. - var foo = (a = yield ) => __awaiter([this, Promise], function* () { + var foo = (a = yield ) => __awaiter(this, void 0, Promise, function* () { }); }); diff --git a/tests/baselines/reference/asyncArrowFunction8_es6.js b/tests/baselines/reference/asyncArrowFunction8_es6.js index 2ec2325951055..9cee5ee1525d7 100644 --- a/tests/baselines/reference/asyncArrowFunction8_es6.js +++ b/tests/baselines/reference/asyncArrowFunction8_es6.js @@ -5,6 +5,6 @@ var foo = async (): Promise => { } //// [asyncArrowFunction8_es6.js] -var foo = () => __awaiter([this, Promise], function* () { +var foo = () => __awaiter(this, void 0, Promise, function* () { var v = { [yield ]: foo }; }); diff --git a/tests/baselines/reference/asyncArrowFunctionCapturesArguments_es6.js b/tests/baselines/reference/asyncArrowFunctionCapturesArguments_es6.js index 8cac736ea1b6d..c24259cf0b528 100644 --- a/tests/baselines/reference/asyncArrowFunctionCapturesArguments_es6.js +++ b/tests/baselines/reference/asyncArrowFunctionCapturesArguments_es6.js @@ -11,6 +11,6 @@ class C { class C { method() { function other() { } - var fn = () => __awaiter([this, , arguments], function* (arguments) { return yield other.apply(this, arguments); }); + var fn = () => __awaiter(this, arguments, Promise, function* (_arguments) { return yield other.apply(this, _arguments); }); } } diff --git a/tests/baselines/reference/asyncArrowFunctionCapturesThis_es6.js b/tests/baselines/reference/asyncArrowFunctionCapturesThis_es6.js index b13815ffcbf41..0f09e366ef3dc 100644 --- a/tests/baselines/reference/asyncArrowFunctionCapturesThis_es6.js +++ b/tests/baselines/reference/asyncArrowFunctionCapturesThis_es6.js @@ -9,6 +9,6 @@ class C { //// [asyncArrowFunctionCapturesThis_es6.js] class C { method() { - var fn = () => __awaiter([this], function* () { return yield this; }); + var fn = () => __awaiter(this, void 0, Promise, function* () { return yield this; }); } } diff --git a/tests/baselines/reference/asyncAwaitIsolatedModules_es6.js b/tests/baselines/reference/asyncAwaitIsolatedModules_es6.js index 7fb55df0eae63..7007c66ae2810 100644 --- a/tests/baselines/reference/asyncAwaitIsolatedModules_es6.js +++ b/tests/baselines/reference/asyncAwaitIsolatedModules_es6.js @@ -40,11 +40,10 @@ module M { } //// [asyncAwaitIsolatedModules_es6.js] -var __awaiter = (this && this.__awaiter) || function (args, generator) { - var PromiseConstructor = args[1] || Promise; - return new PromiseConstructor(function (resolve, reject) { - generator = generator.call(args[0], args[2]); - function cast(value) { return value instanceof PromiseConstructor ? value : new PromiseConstructor(function (resolve) { resolve(value); }); } +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promise, generator) { + return new Promise(function (resolve, reject) { + generator = generator.call(thisArg, _arguments); + function cast(value) { return value instanceof Promise && value.constructor === Promise ? value : new Promise(function (resolve) { resolve(value); }); } function onfulfill(value) { try { step("next", value); } catch (e) { reject(e); } } function onreject(value) { try { step("throw", value); } catch (e) { reject(e); } } function step(verb, value) { @@ -55,65 +54,65 @@ var __awaiter = (this && this.__awaiter) || function (args, generator) { }); }; function f0() { - return __awaiter([this], function* () { }); + return __awaiter(this, void 0, Promise, function* () { }); } function f1() { - return __awaiter([this, Promise], function* () { }); + return __awaiter(this, void 0, Promise, function* () { }); } function f3() { - return __awaiter([this, MyPromise], function* () { }); + return __awaiter(this, void 0, MyPromise, function* () { }); } let f4 = function () { - return __awaiter([this], function* () { }); + return __awaiter(this, void 0, Promise, function* () { }); }; let f5 = function () { - return __awaiter([this, Promise], function* () { }); + return __awaiter(this, void 0, Promise, function* () { }); }; let f6 = function () { - return __awaiter([this, MyPromise], function* () { }); + return __awaiter(this, void 0, MyPromise, function* () { }); }; -let f7 = () => __awaiter([this], function* () { }); -let f8 = () => __awaiter([this, Promise], function* () { }); -let f9 = () => __awaiter([this, MyPromise], function* () { }); -let f10 = () => __awaiter([this], function* () { return p; }); -let f11 = () => __awaiter([this], function* () { return mp; }); -let f12 = () => __awaiter([this, Promise], function* () { return mp; }); -let f13 = () => __awaiter([this, MyPromise], function* () { return p; }); +let f7 = () => __awaiter(this, void 0, Promise, function* () { }); +let f8 = () => __awaiter(this, void 0, Promise, function* () { }); +let f9 = () => __awaiter(this, void 0, MyPromise, function* () { }); +let f10 = () => __awaiter(this, void 0, Promise, function* () { return p; }); +let f11 = () => __awaiter(this, void 0, Promise, function* () { return mp; }); +let f12 = () => __awaiter(this, void 0, Promise, function* () { return mp; }); +let f13 = () => __awaiter(this, void 0, MyPromise, function* () { return p; }); let o = { m1() { - return __awaiter([this], function* () { }); + return __awaiter(this, void 0, Promise, function* () { }); }, m2() { - return __awaiter([this, Promise], function* () { }); + return __awaiter(this, void 0, Promise, function* () { }); }, m3() { - return __awaiter([this, MyPromise], function* () { }); + return __awaiter(this, void 0, MyPromise, function* () { }); } }; class C { m1() { - return __awaiter([this], function* () { }); + return __awaiter(this, void 0, Promise, function* () { }); } m2() { - return __awaiter([this, Promise], function* () { }); + return __awaiter(this, void 0, Promise, function* () { }); } m3() { - return __awaiter([this, MyPromise], function* () { }); + return __awaiter(this, void 0, MyPromise, function* () { }); } static m4() { - return __awaiter([this], function* () { }); + return __awaiter(this, void 0, Promise, function* () { }); } static m5() { - return __awaiter([this, Promise], function* () { }); + return __awaiter(this, void 0, Promise, function* () { }); } static m6() { - return __awaiter([this, MyPromise], function* () { }); + return __awaiter(this, void 0, MyPromise, function* () { }); } } var M; (function (M) { function f1() { - return __awaiter([this], function* () { }); + return __awaiter(this, void 0, Promise, function* () { }); } M.f1 = f1; })(M || (M = {})); diff --git a/tests/baselines/reference/asyncAwait_es6.js b/tests/baselines/reference/asyncAwait_es6.js index 2c0ffaf478a1c..155a44d339dbb 100644 --- a/tests/baselines/reference/asyncAwait_es6.js +++ b/tests/baselines/reference/asyncAwait_es6.js @@ -40,11 +40,10 @@ module M { } //// [asyncAwait_es6.js] -var __awaiter = (this && this.__awaiter) || function (args, generator) { - var PromiseConstructor = args[1] || Promise; - return new PromiseConstructor(function (resolve, reject) { - generator = generator.call(args[0], args[2]); - function cast(value) { return value instanceof PromiseConstructor ? value : new PromiseConstructor(function (resolve) { resolve(value); }); } +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promise, generator) { + return new Promise(function (resolve, reject) { + generator = generator.call(thisArg, _arguments); + function cast(value) { return value instanceof Promise && value.constructor === Promise ? value : new Promise(function (resolve) { resolve(value); }); } function onfulfill(value) { try { step("next", value); } catch (e) { reject(e); } } function onreject(value) { try { step("throw", value); } catch (e) { reject(e); } } function step(verb, value) { @@ -55,65 +54,65 @@ var __awaiter = (this && this.__awaiter) || function (args, generator) { }); }; function f0() { - return __awaiter([this], function* () { }); + return __awaiter(this, void 0, Promise, function* () { }); } function f1() { - return __awaiter([this, Promise], function* () { }); + return __awaiter(this, void 0, Promise, function* () { }); } function f3() { - return __awaiter([this, MyPromise], function* () { }); + return __awaiter(this, void 0, MyPromise, function* () { }); } let f4 = function () { - return __awaiter([this], function* () { }); + return __awaiter(this, void 0, Promise, function* () { }); }; let f5 = function () { - return __awaiter([this, Promise], function* () { }); + return __awaiter(this, void 0, Promise, function* () { }); }; let f6 = function () { - return __awaiter([this, MyPromise], function* () { }); + return __awaiter(this, void 0, MyPromise, function* () { }); }; -let f7 = () => __awaiter([this], function* () { }); -let f8 = () => __awaiter([this, Promise], function* () { }); -let f9 = () => __awaiter([this, MyPromise], function* () { }); -let f10 = () => __awaiter([this], function* () { return p; }); -let f11 = () => __awaiter([this], function* () { return mp; }); -let f12 = () => __awaiter([this, Promise], function* () { return mp; }); -let f13 = () => __awaiter([this, MyPromise], function* () { return p; }); +let f7 = () => __awaiter(this, void 0, Promise, function* () { }); +let f8 = () => __awaiter(this, void 0, Promise, function* () { }); +let f9 = () => __awaiter(this, void 0, MyPromise, function* () { }); +let f10 = () => __awaiter(this, void 0, Promise, function* () { return p; }); +let f11 = () => __awaiter(this, void 0, Promise, function* () { return mp; }); +let f12 = () => __awaiter(this, void 0, Promise, function* () { return mp; }); +let f13 = () => __awaiter(this, void 0, MyPromise, function* () { return p; }); let o = { m1() { - return __awaiter([this], function* () { }); + return __awaiter(this, void 0, Promise, function* () { }); }, m2() { - return __awaiter([this, Promise], function* () { }); + return __awaiter(this, void 0, Promise, function* () { }); }, m3() { - return __awaiter([this, MyPromise], function* () { }); + return __awaiter(this, void 0, MyPromise, function* () { }); } }; class C { m1() { - return __awaiter([this], function* () { }); + return __awaiter(this, void 0, Promise, function* () { }); } m2() { - return __awaiter([this, Promise], function* () { }); + return __awaiter(this, void 0, Promise, function* () { }); } m3() { - return __awaiter([this, MyPromise], function* () { }); + return __awaiter(this, void 0, MyPromise, function* () { }); } static m4() { - return __awaiter([this], function* () { }); + return __awaiter(this, void 0, Promise, function* () { }); } static m5() { - return __awaiter([this, Promise], function* () { }); + return __awaiter(this, void 0, Promise, function* () { }); } static m6() { - return __awaiter([this, MyPromise], function* () { }); + return __awaiter(this, void 0, MyPromise, function* () { }); } } var M; (function (M) { function f1() { - return __awaiter([this], function* () { }); + return __awaiter(this, void 0, Promise, function* () { }); } M.f1 = f1; })(M || (M = {})); diff --git a/tests/baselines/reference/asyncFunctionDeclaration11_es6.js b/tests/baselines/reference/asyncFunctionDeclaration11_es6.js index 7cc10548371c7..a44343cef7822 100644 --- a/tests/baselines/reference/asyncFunctionDeclaration11_es6.js +++ b/tests/baselines/reference/asyncFunctionDeclaration11_es6.js @@ -4,6 +4,6 @@ async function await(): Promise { //// [asyncFunctionDeclaration11_es6.js] function await() { - return __awaiter([this, Promise], function* () { + return __awaiter(this, void 0, Promise, function* () { }); } diff --git a/tests/baselines/reference/asyncFunctionDeclaration13_es6.js b/tests/baselines/reference/asyncFunctionDeclaration13_es6.js index f17b5c894f8cf..4257c8691c25b 100644 --- a/tests/baselines/reference/asyncFunctionDeclaration13_es6.js +++ b/tests/baselines/reference/asyncFunctionDeclaration13_es6.js @@ -7,7 +7,7 @@ async function foo(): Promise { //// [asyncFunctionDeclaration13_es6.js] function foo() { - return __awaiter([this, Promise], function* () { + return __awaiter(this, void 0, Promise, function* () { // Legal to use 'await' in a type context. var v; }); diff --git a/tests/baselines/reference/asyncFunctionDeclaration14_es6.js b/tests/baselines/reference/asyncFunctionDeclaration14_es6.js index 7fee3f4802abb..f32d106f92e37 100644 --- a/tests/baselines/reference/asyncFunctionDeclaration14_es6.js +++ b/tests/baselines/reference/asyncFunctionDeclaration14_es6.js @@ -5,7 +5,7 @@ async function foo(): Promise { //// [asyncFunctionDeclaration14_es6.js] function foo() { - return __awaiter([this, Promise], function* () { + return __awaiter(this, void 0, Promise, function* () { return; }); } diff --git a/tests/baselines/reference/asyncFunctionDeclaration1_es6.js b/tests/baselines/reference/asyncFunctionDeclaration1_es6.js index 3e58785802185..263e27fa35efa 100644 --- a/tests/baselines/reference/asyncFunctionDeclaration1_es6.js +++ b/tests/baselines/reference/asyncFunctionDeclaration1_es6.js @@ -4,6 +4,6 @@ async function foo(): Promise { //// [asyncFunctionDeclaration1_es6.js] function foo() { - return __awaiter([this, Promise], function* () { + return __awaiter(this, void 0, Promise, function* () { }); } diff --git a/tests/baselines/reference/asyncFunctionDeclaration6_es6.js b/tests/baselines/reference/asyncFunctionDeclaration6_es6.js index 33645996cd880..8c37968ab4c22 100644 --- a/tests/baselines/reference/asyncFunctionDeclaration6_es6.js +++ b/tests/baselines/reference/asyncFunctionDeclaration6_es6.js @@ -4,6 +4,6 @@ async function foo(a = await): Promise { //// [asyncFunctionDeclaration6_es6.js] function foo(a = yield ) { - return __awaiter([this, Promise], function* () { + return __awaiter(this, void 0, Promise, function* () { }); } diff --git a/tests/baselines/reference/asyncFunctionDeclaration7_es6.js b/tests/baselines/reference/asyncFunctionDeclaration7_es6.js index 667250e45db61..ef66df4e4133a 100644 --- a/tests/baselines/reference/asyncFunctionDeclaration7_es6.js +++ b/tests/baselines/reference/asyncFunctionDeclaration7_es6.js @@ -7,10 +7,10 @@ async function bar(): Promise { //// [asyncFunctionDeclaration7_es6.js] function bar() { - return __awaiter([this, Promise], function* () { + return __awaiter(this, void 0, Promise, function* () { // 'await' here is an identifier, and not a yield expression. function foo(a = yield ) { - return __awaiter([this, Promise], function* () { + return __awaiter(this, void 0, Promise, function* () { }); } }); diff --git a/tests/baselines/reference/asyncFunctionDeclaration9_es6.js b/tests/baselines/reference/asyncFunctionDeclaration9_es6.js index dab1b75076e68..9723a69f2a23b 100644 --- a/tests/baselines/reference/asyncFunctionDeclaration9_es6.js +++ b/tests/baselines/reference/asyncFunctionDeclaration9_es6.js @@ -5,7 +5,7 @@ async function foo(): Promise { //// [asyncFunctionDeclaration9_es6.js] function foo() { - return __awaiter([this, Promise], function* () { + return __awaiter(this, void 0, Promise, function* () { var v = { [yield ]: foo }; }); } diff --git a/tests/baselines/reference/awaitBinaryExpression1_es6.js b/tests/baselines/reference/awaitBinaryExpression1_es6.js index 11b630355d40d..8deb771f5abf2 100644 --- a/tests/baselines/reference/awaitBinaryExpression1_es6.js +++ b/tests/baselines/reference/awaitBinaryExpression1_es6.js @@ -9,7 +9,7 @@ async function func(): Promise { //// [awaitBinaryExpression1_es6.js] function func() { - return __awaiter([this, Promise], function* () { + return __awaiter(this, void 0, Promise, function* () { "before"; var b = (yield p) || a; "after"; diff --git a/tests/baselines/reference/awaitBinaryExpression2_es6.js b/tests/baselines/reference/awaitBinaryExpression2_es6.js index e8f610ae10ac2..506af50a0efba 100644 --- a/tests/baselines/reference/awaitBinaryExpression2_es6.js +++ b/tests/baselines/reference/awaitBinaryExpression2_es6.js @@ -9,7 +9,7 @@ async function func(): Promise { //// [awaitBinaryExpression2_es6.js] function func() { - return __awaiter([this, Promise], function* () { + return __awaiter(this, void 0, Promise, function* () { "before"; var b = (yield p) && a; "after"; diff --git a/tests/baselines/reference/awaitBinaryExpression3_es6.js b/tests/baselines/reference/awaitBinaryExpression3_es6.js index 770bf75d5a1e1..4b298d7b94751 100644 --- a/tests/baselines/reference/awaitBinaryExpression3_es6.js +++ b/tests/baselines/reference/awaitBinaryExpression3_es6.js @@ -9,7 +9,7 @@ async function func(): Promise { //// [awaitBinaryExpression3_es6.js] function func() { - return __awaiter([this, Promise], function* () { + return __awaiter(this, void 0, Promise, function* () { "before"; var b = (yield p) + a; "after"; diff --git a/tests/baselines/reference/awaitBinaryExpression4_es6.js b/tests/baselines/reference/awaitBinaryExpression4_es6.js index f756d6604bb0f..4d31358898442 100644 --- a/tests/baselines/reference/awaitBinaryExpression4_es6.js +++ b/tests/baselines/reference/awaitBinaryExpression4_es6.js @@ -9,7 +9,7 @@ async function func(): Promise { //// [awaitBinaryExpression4_es6.js] function func() { - return __awaiter([this, Promise], function* () { + return __awaiter(this, void 0, Promise, function* () { "before"; var b = yield p, a; "after"; diff --git a/tests/baselines/reference/awaitBinaryExpression5_es6.js b/tests/baselines/reference/awaitBinaryExpression5_es6.js index c66cfbbd57a2b..01d6c50f6f03e 100644 --- a/tests/baselines/reference/awaitBinaryExpression5_es6.js +++ b/tests/baselines/reference/awaitBinaryExpression5_es6.js @@ -10,7 +10,7 @@ async function func(): Promise { //// [awaitBinaryExpression5_es6.js] function func() { - return __awaiter([this, Promise], function* () { + return __awaiter(this, void 0, Promise, function* () { "before"; var o; o.a = yield p; diff --git a/tests/baselines/reference/awaitCallExpression1_es6.js b/tests/baselines/reference/awaitCallExpression1_es6.js index db4e0c96abf9f..f9dad87a8b6b3 100644 --- a/tests/baselines/reference/awaitCallExpression1_es6.js +++ b/tests/baselines/reference/awaitCallExpression1_es6.js @@ -13,7 +13,7 @@ async function func(): Promise { //// [awaitCallExpression1_es6.js] function func() { - return __awaiter([this, Promise], function* () { + return __awaiter(this, void 0, Promise, function* () { "before"; var b = fn(a, a, a); "after"; diff --git a/tests/baselines/reference/awaitCallExpression2_es6.js b/tests/baselines/reference/awaitCallExpression2_es6.js index 47b1e062ae5b8..87d99cd079399 100644 --- a/tests/baselines/reference/awaitCallExpression2_es6.js +++ b/tests/baselines/reference/awaitCallExpression2_es6.js @@ -13,7 +13,7 @@ async function func(): Promise { //// [awaitCallExpression2_es6.js] function func() { - return __awaiter([this, Promise], function* () { + return __awaiter(this, void 0, Promise, function* () { "before"; var b = fn(yield p, a, a); "after"; diff --git a/tests/baselines/reference/awaitCallExpression3_es6.js b/tests/baselines/reference/awaitCallExpression3_es6.js index e7a09f9b9b883..f397d83c3a14e 100644 --- a/tests/baselines/reference/awaitCallExpression3_es6.js +++ b/tests/baselines/reference/awaitCallExpression3_es6.js @@ -13,7 +13,7 @@ async function func(): Promise { //// [awaitCallExpression3_es6.js] function func() { - return __awaiter([this, Promise], function* () { + return __awaiter(this, void 0, Promise, function* () { "before"; var b = fn(a, yield p, a); "after"; diff --git a/tests/baselines/reference/awaitCallExpression4_es6.js b/tests/baselines/reference/awaitCallExpression4_es6.js index 59449e4f6a14b..d8824d7e7a007 100644 --- a/tests/baselines/reference/awaitCallExpression4_es6.js +++ b/tests/baselines/reference/awaitCallExpression4_es6.js @@ -13,7 +13,7 @@ async function func(): Promise { //// [awaitCallExpression4_es6.js] function func() { - return __awaiter([this, Promise], function* () { + return __awaiter(this, void 0, Promise, function* () { "before"; var b = (yield pfn)(a, a, a); "after"; diff --git a/tests/baselines/reference/awaitCallExpression5_es6.js b/tests/baselines/reference/awaitCallExpression5_es6.js index c5e28deee89bc..f39a633765d88 100644 --- a/tests/baselines/reference/awaitCallExpression5_es6.js +++ b/tests/baselines/reference/awaitCallExpression5_es6.js @@ -13,7 +13,7 @@ async function func(): Promise { //// [awaitCallExpression5_es6.js] function func() { - return __awaiter([this, Promise], function* () { + return __awaiter(this, void 0, Promise, function* () { "before"; var b = o.fn(a, a, a); "after"; diff --git a/tests/baselines/reference/awaitCallExpression6_es6.js b/tests/baselines/reference/awaitCallExpression6_es6.js index 62fde8c799ca3..de8477fa9388a 100644 --- a/tests/baselines/reference/awaitCallExpression6_es6.js +++ b/tests/baselines/reference/awaitCallExpression6_es6.js @@ -13,7 +13,7 @@ async function func(): Promise { //// [awaitCallExpression6_es6.js] function func() { - return __awaiter([this, Promise], function* () { + return __awaiter(this, void 0, Promise, function* () { "before"; var b = o.fn(yield p, a, a); "after"; diff --git a/tests/baselines/reference/awaitCallExpression7_es6.js b/tests/baselines/reference/awaitCallExpression7_es6.js index f717d76c51dee..24edc3b9393e6 100644 --- a/tests/baselines/reference/awaitCallExpression7_es6.js +++ b/tests/baselines/reference/awaitCallExpression7_es6.js @@ -13,7 +13,7 @@ async function func(): Promise { //// [awaitCallExpression7_es6.js] function func() { - return __awaiter([this, Promise], function* () { + return __awaiter(this, void 0, Promise, function* () { "before"; var b = o.fn(a, yield p, a); "after"; diff --git a/tests/baselines/reference/awaitCallExpression8_es6.js b/tests/baselines/reference/awaitCallExpression8_es6.js index e6e2cee172bc2..8bee6112a7a39 100644 --- a/tests/baselines/reference/awaitCallExpression8_es6.js +++ b/tests/baselines/reference/awaitCallExpression8_es6.js @@ -13,7 +13,7 @@ async function func(): Promise { //// [awaitCallExpression8_es6.js] function func() { - return __awaiter([this, Promise], function* () { + return __awaiter(this, void 0, Promise, function* () { "before"; var b = (yield po).fn(a, a, a); "after"; diff --git a/tests/baselines/reference/awaitUnion_es6.js b/tests/baselines/reference/awaitUnion_es6.js index 7ac556b01bca4..80c68f811ef95 100644 --- a/tests/baselines/reference/awaitUnion_es6.js +++ b/tests/baselines/reference/awaitUnion_es6.js @@ -14,7 +14,7 @@ async function f() { //// [awaitUnion_es6.js] function f() { - return __awaiter([this], function* () { + return __awaiter(this, void 0, Promise, function* () { let await_a = yield a; let await_b = yield b; let await_c = yield c; From 76c0d32f9da2a378f12e427b52edade900576915 Mon Sep 17 00:00:00 2001 From: Ron Buckton Date: Fri, 19 Jun 2015 18:05:43 -0700 Subject: [PATCH 35/35] Moved async functions for ES6 behind experimental flag --- src/compiler/checker.ts | 4 ++++ src/compiler/commandLineParser.ts | 5 +++++ src/compiler/diagnosticInformationMap.generated.ts | 3 +++ src/compiler/diagnosticMessages.json | 12 ++++++++++++ src/compiler/program.ts | 7 ++++++- src/compiler/types.ts | 1 + src/harness/harness.ts | 4 ++++ .../asyncArrowFunction/asyncArrowFunction10_es6.ts | 1 + .../asyncArrowFunction/asyncArrowFunction1_es6.ts | 1 + .../asyncArrowFunction/asyncArrowFunction2_es6.ts | 1 + .../asyncArrowFunction/asyncArrowFunction3_es6.ts | 1 + .../asyncArrowFunction/asyncArrowFunction4_es6.ts | 1 + .../asyncArrowFunction/asyncArrowFunction5_es6.ts | 1 + .../asyncArrowFunction/asyncArrowFunction6_es6.ts | 1 + .../asyncArrowFunction/asyncArrowFunction7_es6.ts | 1 + .../asyncArrowFunction/asyncArrowFunction8_es6.ts | 1 + .../asyncArrowFunction/asyncArrowFunction9_es6.ts | 1 + .../asyncArrowFunctionCapturesArguments_es6.ts | 1 + .../asyncArrowFunctionCapturesThis_es6.ts | 1 + .../async/es6/asyncAwaitIsolatedModules_es6.ts | 1 + tests/cases/conformance/async/es6/asyncAwait_es6.ts | 1 + tests/cases/conformance/async/es6/asyncClass_es6.ts | 1 + .../conformance/async/es6/asyncConstructor_es6.ts | 1 + .../cases/conformance/async/es6/asyncDeclare_es6.ts | 1 + tests/cases/conformance/async/es6/asyncEnum_es6.ts | 1 + tests/cases/conformance/async/es6/asyncGetter_es6.ts | 1 + .../conformance/async/es6/asyncInterface_es6.ts | 1 + tests/cases/conformance/async/es6/asyncModule_es6.ts | 1 + tests/cases/conformance/async/es6/asyncSetter_es6.ts | 1 + .../awaitBinaryExpression1_es6.ts | 1 + .../awaitBinaryExpression2_es6.ts | 1 + .../awaitBinaryExpression3_es6.ts | 1 + .../awaitBinaryExpression4_es6.ts | 1 + .../awaitBinaryExpression5_es6.ts | 1 + .../awaitCallExpression/awaitCallExpression1_es6.ts | 1 + .../awaitCallExpression/awaitCallExpression2_es6.ts | 1 + .../awaitCallExpression/awaitCallExpression3_es6.ts | 1 + .../awaitCallExpression/awaitCallExpression4_es6.ts | 1 + .../awaitCallExpression/awaitCallExpression5_es6.ts | 1 + .../awaitCallExpression/awaitCallExpression6_es6.ts | 1 + .../awaitCallExpression/awaitCallExpression7_es6.ts | 1 + .../awaitCallExpression/awaitCallExpression8_es6.ts | 1 + tests/cases/conformance/async/es6/awaitUnion_es6.ts | 1 + .../asyncFunctionDeclaration10_es6.ts | 1 + .../asyncFunctionDeclaration11_es6.ts | 1 + .../asyncFunctionDeclaration12_es6.ts | 1 + .../asyncFunctionDeclaration13_es6.ts | 1 + .../asyncFunctionDeclaration14_es6.ts | 1 + .../asyncFunctionDeclaration1_es6.ts | 1 + .../asyncFunctionDeclaration2_es6.ts | 1 + .../asyncFunctionDeclaration3_es6.ts | 1 + .../asyncFunctionDeclaration4_es6.ts | 1 + .../asyncFunctionDeclaration5_es6.ts | 1 + .../asyncFunctionDeclaration6_es6.ts | 1 + .../asyncFunctionDeclaration7_es6.ts | 1 + .../asyncFunctionDeclaration8_es6.ts | 1 + .../asyncFunctionDeclaration9_es6.ts | 1 + 57 files changed, 85 insertions(+), 1 deletion(-) diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index 53c5e3d883337..87b5ac44dce23 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -9863,6 +9863,10 @@ namespace ts { checkSignatureDeclaration(node); let isAsync = isAsyncFunctionLike(node); if (isAsync) { + if (!compilerOptions.experimentalAsyncFunctions) { + error(node, Diagnostics.Experimental_support_for_async_functions_is_a_feature_that_is_subject_to_change_in_a_future_release_Specify_experimentalAsyncFunctions_to_remove_this_warning); + } + emitAwaiter = true; } diff --git a/src/compiler/commandLineParser.ts b/src/compiler/commandLineParser.ts index 07bccf4a5efa3..f2b7dcc91c134 100644 --- a/src/compiler/commandLineParser.ts +++ b/src/compiler/commandLineParser.ts @@ -192,6 +192,11 @@ namespace ts { type: "boolean", description: Diagnostics.Watch_input_files, }, + { + name: "experimentalAsyncFunctions", + type: "boolean", + description: Diagnostics.Enables_experimental_support_for_ES7_async_functions + }, { name: "experimentalDecorators", type: "boolean", diff --git a/src/compiler/diagnosticInformationMap.generated.ts b/src/compiler/diagnosticInformationMap.generated.ts index 6cd9a803aa4a7..beb35eec9bf1e 100644 --- a/src/compiler/diagnosticInformationMap.generated.ts +++ b/src/compiler/diagnosticInformationMap.generated.ts @@ -201,6 +201,7 @@ namespace ts { An_export_declaration_can_only_be_used_in_a_module: { code: 1233, category: DiagnosticCategory.Error, key: "An export declaration can only be used in a module." }, An_ambient_module_declaration_is_only_allowed_at_the_top_level_in_a_file: { code: 1234, category: DiagnosticCategory.Error, key: "An ambient module declaration is only allowed at the top level in a file." }, A_namespace_declaration_is_only_allowed_in_a_namespace_or_module: { code: 1235, category: DiagnosticCategory.Error, key: "A namespace declaration is only allowed in a namespace or module." }, + Experimental_support_for_async_functions_is_a_feature_that_is_subject_to_change_in_a_future_release_Specify_experimentalAsyncFunctions_to_remove_this_warning: { code: 1236, category: DiagnosticCategory.Error, key: "Experimental support for async functions is a feature that is subject to change in a future release. Specify '--experimentalAsyncFunctions' to remove this warning." }, with_statements_are_not_allowed_in_an_async_function_block: { code: 1300, category: DiagnosticCategory.Error, key: "'with' statements are not allowed in an async function block." }, await_expression_is_only_allowed_within_an_async_function: { code: 1308, category: DiagnosticCategory.Error, key: "'await' expression is only allowed within an async function." }, Async_functions_are_only_available_when_targeting_ECMAScript_6_and_higher: { code: 1311, category: DiagnosticCategory.Error, key: "Async functions are only available when targeting ECMAScript 6 and higher." }, @@ -547,6 +548,8 @@ namespace ts { Option_experimentalDecorators_must_also_be_specified_when_option_emitDecoratorMetadata_is_specified: { code: 6064, category: DiagnosticCategory.Error, key: "Option 'experimentalDecorators' must also be specified when option 'emitDecoratorMetadata' is specified." }, Enables_experimental_support_for_ES7_decorators: { code: 6065, category: DiagnosticCategory.Message, key: "Enables experimental support for ES7 decorators." }, Enables_experimental_support_for_emitting_type_metadata_for_decorators: { code: 6066, category: DiagnosticCategory.Message, key: "Enables experimental support for emitting type metadata for decorators." }, + Option_experimentalAsyncFunctions_cannot_be_specified_when_targeting_ES5_or_lower: { code: 6067, category: DiagnosticCategory.Message, key: "Option 'experimentalAsyncFunctions' cannot be specified when targeting ES5 or lower." }, + Enables_experimental_support_for_ES7_async_functions: { code: 6068, category: DiagnosticCategory.Message, key: "Enables experimental support for ES7 async functions." }, Variable_0_implicitly_has_an_1_type: { code: 7005, category: DiagnosticCategory.Error, key: "Variable '{0}' implicitly has an '{1}' type." }, Parameter_0_implicitly_has_an_1_type: { code: 7006, category: DiagnosticCategory.Error, key: "Parameter '{0}' implicitly has an '{1}' type." }, Member_0_implicitly_has_an_1_type: { code: 7008, category: DiagnosticCategory.Error, key: "Member '{0}' implicitly has an '{1}' type." }, diff --git a/src/compiler/diagnosticMessages.json b/src/compiler/diagnosticMessages.json index 4ad7408d70d17..089ddb6a83ed8 100644 --- a/src/compiler/diagnosticMessages.json +++ b/src/compiler/diagnosticMessages.json @@ -791,6 +791,10 @@ "category": "Error", "code": 1235 }, + "Experimental support for async functions is a feature that is subject to change in a future release. Specify '--experimentalAsyncFunctions' to remove this warning.": { + "category": "Error", + "code": 1236 + }, "'with' statements are not allowed in an async function block.": { @@ -2180,6 +2184,14 @@ "category": "Message", "code": 6066 }, + "Option 'experimentalAsyncFunctions' cannot be specified when targeting ES5 or lower.": { + "category": "Message", + "code": 6067 + }, + "Enables experimental support for ES7 async functions.": { + "category": "Message", + "code": 6068 + }, "Variable '{0}' implicitly has an '{1}' type.": { "category": "Error", diff --git a/src/compiler/program.ts b/src/compiler/program.ts index 562654c2ed0c1..4484addd84eae 100644 --- a/src/compiler/program.ts +++ b/src/compiler/program.ts @@ -144,7 +144,7 @@ namespace ts { let program: Program; let files: SourceFile[] = []; let diagnostics = createDiagnosticCollection(); - + let commonSourceDirectory: string; let diagnosticsProducingTypeChecker: TypeChecker; let noDiagnosticsTypeChecker: TypeChecker; @@ -676,6 +676,11 @@ namespace ts { !options.experimentalDecorators) { diagnostics.add(createCompilerDiagnostic(Diagnostics.Option_experimentalDecorators_must_also_be_specified_when_option_emitDecoratorMetadata_is_specified)); } + + if (options.experimentalAsyncFunctions && + options.target !== ScriptTarget.ES6) { + diagnostics.add(createCompilerDiagnostic(Diagnostics.Option_experimentalAsyncFunctions_cannot_be_specified_when_targeting_ES5_or_lower)); + } } } } \ No newline at end of file diff --git a/src/compiler/types.ts b/src/compiler/types.ts index e55cccc0cccef..3d9d4151079d3 100644 --- a/src/compiler/types.ts +++ b/src/compiler/types.ts @@ -1878,6 +1878,7 @@ namespace ts { watch?: boolean; isolatedModules?: boolean; experimentalDecorators?: boolean; + experimentalAsyncFunctions?: boolean; emitDecoratorMetadata?: boolean; /* @internal */ stripInternal?: boolean; diff --git a/src/harness/harness.ts b/src/harness/harness.ts index 6a55948815010..8e8fb8d9acb84 100644 --- a/src/harness/harness.ts +++ b/src/harness/harness.ts @@ -1055,6 +1055,10 @@ module Harness { case 'emitdecoratormetadata': options.emitDecoratorMetadata = setting.value === 'true'; break; + + case 'experimentalasyncfunctions': + options.experimentalAsyncFunctions = setting.value === 'true'; + break; case 'noemithelpers': options.noEmitHelpers = setting.value === 'true'; diff --git a/tests/cases/conformance/async/es6/asyncArrowFunction/asyncArrowFunction10_es6.ts b/tests/cases/conformance/async/es6/asyncArrowFunction/asyncArrowFunction10_es6.ts index 0959ed6c561e8..bb9f8a54e44a1 100644 --- a/tests/cases/conformance/async/es6/asyncArrowFunction/asyncArrowFunction10_es6.ts +++ b/tests/cases/conformance/async/es6/asyncArrowFunction/asyncArrowFunction10_es6.ts @@ -1,5 +1,6 @@ // @target: ES6 // @noEmitHelpers: true +// @experimentalAsyncFunctions: true var foo = async foo(): Promise => { // Legal to use 'await' in a type context. diff --git a/tests/cases/conformance/async/es6/asyncArrowFunction/asyncArrowFunction1_es6.ts b/tests/cases/conformance/async/es6/asyncArrowFunction/asyncArrowFunction1_es6.ts index 83e7413c5279a..45e686fd280c3 100644 --- a/tests/cases/conformance/async/es6/asyncArrowFunction/asyncArrowFunction1_es6.ts +++ b/tests/cases/conformance/async/es6/asyncArrowFunction/asyncArrowFunction1_es6.ts @@ -1,5 +1,6 @@ // @target: ES6 // @noEmitHelpers: true +// @experimentalAsyncFunctions: true var foo = async (): Promise => { }; \ No newline at end of file diff --git a/tests/cases/conformance/async/es6/asyncArrowFunction/asyncArrowFunction2_es6.ts b/tests/cases/conformance/async/es6/asyncArrowFunction/asyncArrowFunction2_es6.ts index bf39735d4603f..8d792fdff9c40 100644 --- a/tests/cases/conformance/async/es6/asyncArrowFunction/asyncArrowFunction2_es6.ts +++ b/tests/cases/conformance/async/es6/asyncArrowFunction/asyncArrowFunction2_es6.ts @@ -1,4 +1,5 @@ // @target: ES6 // @noEmitHelpers: true +// @experimentalAsyncFunctions: true var f = (await) => { } \ No newline at end of file diff --git a/tests/cases/conformance/async/es6/asyncArrowFunction/asyncArrowFunction3_es6.ts b/tests/cases/conformance/async/es6/asyncArrowFunction/asyncArrowFunction3_es6.ts index 4ae27c596f1ab..9ca200f8d76f8 100644 --- a/tests/cases/conformance/async/es6/asyncArrowFunction/asyncArrowFunction3_es6.ts +++ b/tests/cases/conformance/async/es6/asyncArrowFunction/asyncArrowFunction3_es6.ts @@ -1,4 +1,5 @@ // @target: ES6 // @noEmitHelpers: true +// @experimentalAsyncFunctions: true function f(await = await) { } \ No newline at end of file diff --git a/tests/cases/conformance/async/es6/asyncArrowFunction/asyncArrowFunction4_es6.ts b/tests/cases/conformance/async/es6/asyncArrowFunction/asyncArrowFunction4_es6.ts index 51b34abeca1aa..4946592c45bb6 100644 --- a/tests/cases/conformance/async/es6/asyncArrowFunction/asyncArrowFunction4_es6.ts +++ b/tests/cases/conformance/async/es6/asyncArrowFunction/asyncArrowFunction4_es6.ts @@ -1,4 +1,5 @@ // @target: ES6 // @noEmitHelpers: true +// @experimentalAsyncFunctions: true var await = () => { } \ No newline at end of file diff --git a/tests/cases/conformance/async/es6/asyncArrowFunction/asyncArrowFunction5_es6.ts b/tests/cases/conformance/async/es6/asyncArrowFunction/asyncArrowFunction5_es6.ts index 174a619bdf9f9..53052368b31a7 100644 --- a/tests/cases/conformance/async/es6/asyncArrowFunction/asyncArrowFunction5_es6.ts +++ b/tests/cases/conformance/async/es6/asyncArrowFunction/asyncArrowFunction5_es6.ts @@ -1,5 +1,6 @@ // @target: ES6 // @noEmitHelpers: true +// @experimentalAsyncFunctions: true var foo = async (await): Promise => { } \ No newline at end of file diff --git a/tests/cases/conformance/async/es6/asyncArrowFunction/asyncArrowFunction6_es6.ts b/tests/cases/conformance/async/es6/asyncArrowFunction/asyncArrowFunction6_es6.ts index dace96c4933da..69768429ecf1a 100644 --- a/tests/cases/conformance/async/es6/asyncArrowFunction/asyncArrowFunction6_es6.ts +++ b/tests/cases/conformance/async/es6/asyncArrowFunction/asyncArrowFunction6_es6.ts @@ -1,5 +1,6 @@ // @target: ES6 // @noEmitHelpers: true +// @experimentalAsyncFunctions: true var foo = async (a = await): Promise => { } \ No newline at end of file diff --git a/tests/cases/conformance/async/es6/asyncArrowFunction/asyncArrowFunction7_es6.ts b/tests/cases/conformance/async/es6/asyncArrowFunction/asyncArrowFunction7_es6.ts index b1fd5cc030d97..a034381ba57d2 100644 --- a/tests/cases/conformance/async/es6/asyncArrowFunction/asyncArrowFunction7_es6.ts +++ b/tests/cases/conformance/async/es6/asyncArrowFunction/asyncArrowFunction7_es6.ts @@ -1,5 +1,6 @@ // @target: ES6 // @noEmitHelpers: true +// @experimentalAsyncFunctions: true var bar = async (): Promise => { // 'await' here is an identifier, and not an await expression. diff --git a/tests/cases/conformance/async/es6/asyncArrowFunction/asyncArrowFunction8_es6.ts b/tests/cases/conformance/async/es6/asyncArrowFunction/asyncArrowFunction8_es6.ts index 5d53338b1bd78..397e06f703dad 100644 --- a/tests/cases/conformance/async/es6/asyncArrowFunction/asyncArrowFunction8_es6.ts +++ b/tests/cases/conformance/async/es6/asyncArrowFunction/asyncArrowFunction8_es6.ts @@ -1,5 +1,6 @@ // @target: ES6 // @noEmitHelpers: true +// @experimentalAsyncFunctions: true var foo = async (): Promise => { var v = { [await]: foo } diff --git a/tests/cases/conformance/async/es6/asyncArrowFunction/asyncArrowFunction9_es6.ts b/tests/cases/conformance/async/es6/asyncArrowFunction/asyncArrowFunction9_es6.ts index da041fe472b30..3f961c9d59592 100644 --- a/tests/cases/conformance/async/es6/asyncArrowFunction/asyncArrowFunction9_es6.ts +++ b/tests/cases/conformance/async/es6/asyncArrowFunction/asyncArrowFunction9_es6.ts @@ -1,4 +1,5 @@ // @target: ES6 // @noEmitHelpers: true +// @experimentalAsyncFunctions: true var foo = async (a = await => await): Promise => { } \ No newline at end of file diff --git a/tests/cases/conformance/async/es6/asyncArrowFunction/asyncArrowFunctionCapturesArguments_es6.ts b/tests/cases/conformance/async/es6/asyncArrowFunction/asyncArrowFunctionCapturesArguments_es6.ts index 8dab2c0408630..f00d0d16545c5 100644 --- a/tests/cases/conformance/async/es6/asyncArrowFunction/asyncArrowFunctionCapturesArguments_es6.ts +++ b/tests/cases/conformance/async/es6/asyncArrowFunction/asyncArrowFunctionCapturesArguments_es6.ts @@ -1,5 +1,6 @@ // @target: ES6 // @noEmitHelpers: true +// @experimentalAsyncFunctions: true class C { method() { function other() {} diff --git a/tests/cases/conformance/async/es6/asyncArrowFunction/asyncArrowFunctionCapturesThis_es6.ts b/tests/cases/conformance/async/es6/asyncArrowFunction/asyncArrowFunctionCapturesThis_es6.ts index f2c507cbdd667..a90f08cb9f779 100644 --- a/tests/cases/conformance/async/es6/asyncArrowFunction/asyncArrowFunctionCapturesThis_es6.ts +++ b/tests/cases/conformance/async/es6/asyncArrowFunction/asyncArrowFunctionCapturesThis_es6.ts @@ -1,5 +1,6 @@ // @target: ES6 // @noEmitHelpers: true +// @experimentalAsyncFunctions: true class C { method() { var fn = async () => await this; diff --git a/tests/cases/conformance/async/es6/asyncAwaitIsolatedModules_es6.ts b/tests/cases/conformance/async/es6/asyncAwaitIsolatedModules_es6.ts index 8e2cfd8c6c578..52694f241185d 100644 --- a/tests/cases/conformance/async/es6/asyncAwaitIsolatedModules_es6.ts +++ b/tests/cases/conformance/async/es6/asyncAwaitIsolatedModules_es6.ts @@ -1,5 +1,6 @@ // @target: ES6 // @isolatedModules: true +// @experimentalAsyncFunctions: true import { MyPromise } from "missing"; declare var p: Promise; diff --git a/tests/cases/conformance/async/es6/asyncAwait_es6.ts b/tests/cases/conformance/async/es6/asyncAwait_es6.ts index 8e72197a98d9a..eee2e73d023c9 100644 --- a/tests/cases/conformance/async/es6/asyncAwait_es6.ts +++ b/tests/cases/conformance/async/es6/asyncAwait_es6.ts @@ -1,4 +1,5 @@ // @target: ES6 +// @experimentalAsyncFunctions: true type MyPromise = Promise; declare var MyPromise: typeof Promise; declare var p: Promise; diff --git a/tests/cases/conformance/async/es6/asyncClass_es6.ts b/tests/cases/conformance/async/es6/asyncClass_es6.ts index 22ffe997b03cd..c4a444ca90958 100644 --- a/tests/cases/conformance/async/es6/asyncClass_es6.ts +++ b/tests/cases/conformance/async/es6/asyncClass_es6.ts @@ -1,4 +1,5 @@ // @target: ES6 // @noEmitHelpers: true +// @experimentalAsyncFunctions: true async class C { } \ No newline at end of file diff --git a/tests/cases/conformance/async/es6/asyncConstructor_es6.ts b/tests/cases/conformance/async/es6/asyncConstructor_es6.ts index d769fad039525..998156f19f41f 100644 --- a/tests/cases/conformance/async/es6/asyncConstructor_es6.ts +++ b/tests/cases/conformance/async/es6/asyncConstructor_es6.ts @@ -1,5 +1,6 @@ // @target: ES6 // @noEmitHelpers: true +// @experimentalAsyncFunctions: true class C { async constructor() { } diff --git a/tests/cases/conformance/async/es6/asyncDeclare_es6.ts b/tests/cases/conformance/async/es6/asyncDeclare_es6.ts index 5e0fb536b395f..d83c25a421a11 100644 --- a/tests/cases/conformance/async/es6/asyncDeclare_es6.ts +++ b/tests/cases/conformance/async/es6/asyncDeclare_es6.ts @@ -1,3 +1,4 @@ // @target: ES6 // @noEmitHelpers: true +// @experimentalAsyncFunctions: true declare async function foo(): Promise; \ No newline at end of file diff --git a/tests/cases/conformance/async/es6/asyncEnum_es6.ts b/tests/cases/conformance/async/es6/asyncEnum_es6.ts index 4fad7923a8c93..d9569bef9d17e 100644 --- a/tests/cases/conformance/async/es6/asyncEnum_es6.ts +++ b/tests/cases/conformance/async/es6/asyncEnum_es6.ts @@ -1,5 +1,6 @@ // @target: ES6 // @noEmitHelpers: true +// @experimentalAsyncFunctions: true async enum E { Value } \ No newline at end of file diff --git a/tests/cases/conformance/async/es6/asyncGetter_es6.ts b/tests/cases/conformance/async/es6/asyncGetter_es6.ts index 79fde60fdc4bb..fe5751ece0be7 100644 --- a/tests/cases/conformance/async/es6/asyncGetter_es6.ts +++ b/tests/cases/conformance/async/es6/asyncGetter_es6.ts @@ -1,5 +1,6 @@ // @target: ES6 // @noEmitHelpers: true +// @experimentalAsyncFunctions: true class C { async get foo() { } diff --git a/tests/cases/conformance/async/es6/asyncInterface_es6.ts b/tests/cases/conformance/async/es6/asyncInterface_es6.ts index 5d5497d3cd4bf..c7bb460ea2b2c 100644 --- a/tests/cases/conformance/async/es6/asyncInterface_es6.ts +++ b/tests/cases/conformance/async/es6/asyncInterface_es6.ts @@ -1,4 +1,5 @@ // @target: ES6 // @noEmitHelpers: true +// @experimentalAsyncFunctions: true async interface I { } \ No newline at end of file diff --git a/tests/cases/conformance/async/es6/asyncModule_es6.ts b/tests/cases/conformance/async/es6/asyncModule_es6.ts index aa4c295d0e357..cf660d25d1f85 100644 --- a/tests/cases/conformance/async/es6/asyncModule_es6.ts +++ b/tests/cases/conformance/async/es6/asyncModule_es6.ts @@ -1,4 +1,5 @@ // @target: ES6 // @noEmitHelpers: true +// @experimentalAsyncFunctions: true async module M { } \ No newline at end of file diff --git a/tests/cases/conformance/async/es6/asyncSetter_es6.ts b/tests/cases/conformance/async/es6/asyncSetter_es6.ts index 8eedcbb5288a2..2ca1c805a453e 100644 --- a/tests/cases/conformance/async/es6/asyncSetter_es6.ts +++ b/tests/cases/conformance/async/es6/asyncSetter_es6.ts @@ -1,5 +1,6 @@ // @target: ES6 // @noEmitHelpers: true +// @experimentalAsyncFunctions: true class C { async set foo(value) { } diff --git a/tests/cases/conformance/async/es6/awaitBinaryExpression/awaitBinaryExpression1_es6.ts b/tests/cases/conformance/async/es6/awaitBinaryExpression/awaitBinaryExpression1_es6.ts index 46060f309b241..df0d0e459d470 100644 --- a/tests/cases/conformance/async/es6/awaitBinaryExpression/awaitBinaryExpression1_es6.ts +++ b/tests/cases/conformance/async/es6/awaitBinaryExpression/awaitBinaryExpression1_es6.ts @@ -1,5 +1,6 @@ // @target: ES6 // @noEmitHelpers: true +// @experimentalAsyncFunctions: true declare var a: boolean; declare var p: Promise; async function func(): Promise { diff --git a/tests/cases/conformance/async/es6/awaitBinaryExpression/awaitBinaryExpression2_es6.ts b/tests/cases/conformance/async/es6/awaitBinaryExpression/awaitBinaryExpression2_es6.ts index 362f1ecc4463f..7678c4b17abc1 100644 --- a/tests/cases/conformance/async/es6/awaitBinaryExpression/awaitBinaryExpression2_es6.ts +++ b/tests/cases/conformance/async/es6/awaitBinaryExpression/awaitBinaryExpression2_es6.ts @@ -1,5 +1,6 @@ // @target: ES6 // @noEmitHelpers: true +// @experimentalAsyncFunctions: true declare var a: boolean; declare var p: Promise; async function func(): Promise { diff --git a/tests/cases/conformance/async/es6/awaitBinaryExpression/awaitBinaryExpression3_es6.ts b/tests/cases/conformance/async/es6/awaitBinaryExpression/awaitBinaryExpression3_es6.ts index d3b02033252e1..0b441f063dded 100644 --- a/tests/cases/conformance/async/es6/awaitBinaryExpression/awaitBinaryExpression3_es6.ts +++ b/tests/cases/conformance/async/es6/awaitBinaryExpression/awaitBinaryExpression3_es6.ts @@ -1,5 +1,6 @@ // @target: ES6 // @noEmitHelpers: true +// @experimentalAsyncFunctions: true declare var a: number; declare var p: Promise; async function func(): Promise { diff --git a/tests/cases/conformance/async/es6/awaitBinaryExpression/awaitBinaryExpression4_es6.ts b/tests/cases/conformance/async/es6/awaitBinaryExpression/awaitBinaryExpression4_es6.ts index eba3be31acfbc..a0bdf58710fc0 100644 --- a/tests/cases/conformance/async/es6/awaitBinaryExpression/awaitBinaryExpression4_es6.ts +++ b/tests/cases/conformance/async/es6/awaitBinaryExpression/awaitBinaryExpression4_es6.ts @@ -1,5 +1,6 @@ // @target: ES6 // @noEmitHelpers: true +// @experimentalAsyncFunctions: true declare var a: boolean; declare var p: Promise; async function func(): Promise { diff --git a/tests/cases/conformance/async/es6/awaitBinaryExpression/awaitBinaryExpression5_es6.ts b/tests/cases/conformance/async/es6/awaitBinaryExpression/awaitBinaryExpression5_es6.ts index 71b173f9e73a7..3276d24ee4bfa 100644 --- a/tests/cases/conformance/async/es6/awaitBinaryExpression/awaitBinaryExpression5_es6.ts +++ b/tests/cases/conformance/async/es6/awaitBinaryExpression/awaitBinaryExpression5_es6.ts @@ -1,5 +1,6 @@ // @target: ES6 // @noEmitHelpers: true +// @experimentalAsyncFunctions: true declare var a: boolean; declare var p: Promise; async function func(): Promise { diff --git a/tests/cases/conformance/async/es6/awaitCallExpression/awaitCallExpression1_es6.ts b/tests/cases/conformance/async/es6/awaitCallExpression/awaitCallExpression1_es6.ts index d0442f0968dc4..02de646112c57 100644 --- a/tests/cases/conformance/async/es6/awaitCallExpression/awaitCallExpression1_es6.ts +++ b/tests/cases/conformance/async/es6/awaitCallExpression/awaitCallExpression1_es6.ts @@ -1,5 +1,6 @@ // @target: ES6 // @noEmitHelpers: true +// @experimentalAsyncFunctions: true declare var a: boolean; declare var p: Promise; declare function fn(arg0: boolean, arg1: boolean, arg2: boolean): void; diff --git a/tests/cases/conformance/async/es6/awaitCallExpression/awaitCallExpression2_es6.ts b/tests/cases/conformance/async/es6/awaitCallExpression/awaitCallExpression2_es6.ts index 6de07ef12ffee..5d2e4046349ad 100644 --- a/tests/cases/conformance/async/es6/awaitCallExpression/awaitCallExpression2_es6.ts +++ b/tests/cases/conformance/async/es6/awaitCallExpression/awaitCallExpression2_es6.ts @@ -1,5 +1,6 @@ // @target: ES6 // @noEmitHelpers: true +// @experimentalAsyncFunctions: true declare var a: boolean; declare var p: Promise; declare function fn(arg0: boolean, arg1: boolean, arg2: boolean): void; diff --git a/tests/cases/conformance/async/es6/awaitCallExpression/awaitCallExpression3_es6.ts b/tests/cases/conformance/async/es6/awaitCallExpression/awaitCallExpression3_es6.ts index 2cc0b7b12d071..702e1f4cbcc15 100644 --- a/tests/cases/conformance/async/es6/awaitCallExpression/awaitCallExpression3_es6.ts +++ b/tests/cases/conformance/async/es6/awaitCallExpression/awaitCallExpression3_es6.ts @@ -1,5 +1,6 @@ // @target: ES6 // @noEmitHelpers: true +// @experimentalAsyncFunctions: true declare var a: boolean; declare var p: Promise; declare function fn(arg0: boolean, arg1: boolean, arg2: boolean): void; diff --git a/tests/cases/conformance/async/es6/awaitCallExpression/awaitCallExpression4_es6.ts b/tests/cases/conformance/async/es6/awaitCallExpression/awaitCallExpression4_es6.ts index 8e349fbc5c329..aeeb192b4ba9a 100644 --- a/tests/cases/conformance/async/es6/awaitCallExpression/awaitCallExpression4_es6.ts +++ b/tests/cases/conformance/async/es6/awaitCallExpression/awaitCallExpression4_es6.ts @@ -1,5 +1,6 @@ // @target: ES6 // @noEmitHelpers: true +// @experimentalAsyncFunctions: true declare var a: boolean; declare var p: Promise; declare function fn(arg0: boolean, arg1: boolean, arg2: boolean): void; diff --git a/tests/cases/conformance/async/es6/awaitCallExpression/awaitCallExpression5_es6.ts b/tests/cases/conformance/async/es6/awaitCallExpression/awaitCallExpression5_es6.ts index bbe81ac94b110..82bb1f88ad27b 100644 --- a/tests/cases/conformance/async/es6/awaitCallExpression/awaitCallExpression5_es6.ts +++ b/tests/cases/conformance/async/es6/awaitCallExpression/awaitCallExpression5_es6.ts @@ -1,5 +1,6 @@ // @target: ES6 // @noEmitHelpers: true +// @experimentalAsyncFunctions: true declare var a: boolean; declare var p: Promise; declare function fn(arg0: boolean, arg1: boolean, arg2: boolean): void; diff --git a/tests/cases/conformance/async/es6/awaitCallExpression/awaitCallExpression6_es6.ts b/tests/cases/conformance/async/es6/awaitCallExpression/awaitCallExpression6_es6.ts index 09e88f5acbcdd..d5778df71ba79 100644 --- a/tests/cases/conformance/async/es6/awaitCallExpression/awaitCallExpression6_es6.ts +++ b/tests/cases/conformance/async/es6/awaitCallExpression/awaitCallExpression6_es6.ts @@ -1,5 +1,6 @@ // @target: ES6 // @noEmitHelpers: true +// @experimentalAsyncFunctions: true declare var a: boolean; declare var p: Promise; declare function fn(arg0: boolean, arg1: boolean, arg2: boolean): void; diff --git a/tests/cases/conformance/async/es6/awaitCallExpression/awaitCallExpression7_es6.ts b/tests/cases/conformance/async/es6/awaitCallExpression/awaitCallExpression7_es6.ts index fe0182da4aa1b..db01f34c82531 100644 --- a/tests/cases/conformance/async/es6/awaitCallExpression/awaitCallExpression7_es6.ts +++ b/tests/cases/conformance/async/es6/awaitCallExpression/awaitCallExpression7_es6.ts @@ -1,5 +1,6 @@ // @target: ES6 // @noEmitHelpers: true +// @experimentalAsyncFunctions: true declare var a: boolean; declare var p: Promise; declare function fn(arg0: boolean, arg1: boolean, arg2: boolean): void; diff --git a/tests/cases/conformance/async/es6/awaitCallExpression/awaitCallExpression8_es6.ts b/tests/cases/conformance/async/es6/awaitCallExpression/awaitCallExpression8_es6.ts index e3280eb7c10ff..b0b10a02a6ff5 100644 --- a/tests/cases/conformance/async/es6/awaitCallExpression/awaitCallExpression8_es6.ts +++ b/tests/cases/conformance/async/es6/awaitCallExpression/awaitCallExpression8_es6.ts @@ -1,5 +1,6 @@ // @target: ES6 // @noEmitHelpers: true +// @experimentalAsyncFunctions: true declare var a: boolean; declare var p: Promise; declare function fn(arg0: boolean, arg1: boolean, arg2: boolean): void; diff --git a/tests/cases/conformance/async/es6/awaitUnion_es6.ts b/tests/cases/conformance/async/es6/awaitUnion_es6.ts index a132ae01dfde2..59c5285556c53 100644 --- a/tests/cases/conformance/async/es6/awaitUnion_es6.ts +++ b/tests/cases/conformance/async/es6/awaitUnion_es6.ts @@ -1,5 +1,6 @@ // @target: ES6 // @noEmitHelpers: true +// @experimentalAsyncFunctions: true declare let a: number | string; declare let b: PromiseLike | PromiseLike; declare let c: PromiseLike; diff --git a/tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration10_es6.ts b/tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration10_es6.ts index aab1f0013ecf9..d543e424a38cc 100644 --- a/tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration10_es6.ts +++ b/tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration10_es6.ts @@ -1,4 +1,5 @@ // @target: ES6 // @noEmitHelpers: true +// @experimentalAsyncFunctions: true async function foo(a = await => await): Promise { } \ No newline at end of file diff --git a/tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration11_es6.ts b/tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration11_es6.ts index 747d20d7ea850..23e40a0e5ba8a 100644 --- a/tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration11_es6.ts +++ b/tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration11_es6.ts @@ -1,4 +1,5 @@ // @target: ES6 // @noEmitHelpers: true +// @experimentalAsyncFunctions: true async function await(): Promise { } \ No newline at end of file diff --git a/tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration12_es6.ts b/tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration12_es6.ts index bbd7725036512..a457d27073f68 100644 --- a/tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration12_es6.ts +++ b/tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration12_es6.ts @@ -1,3 +1,4 @@ // @target: ES6 // @noEmitHelpers: true +// @experimentalAsyncFunctions: true var v = async function await(): Promise { } \ No newline at end of file diff --git a/tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration13_es6.ts b/tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration13_es6.ts index 8670fa0281165..83b6a99579cc5 100644 --- a/tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration13_es6.ts +++ b/tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration13_es6.ts @@ -1,5 +1,6 @@ // @target: ES6 // @noEmitHelpers: true +// @experimentalAsyncFunctions: true async function foo(): Promise { // Legal to use 'await' in a type context. var v: await; diff --git a/tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration14_es6.ts b/tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration14_es6.ts index ba70c61b49241..b837e6618d1ec 100644 --- a/tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration14_es6.ts +++ b/tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration14_es6.ts @@ -1,5 +1,6 @@ // @target: ES6 // @noEmitHelpers: true +// @experimentalAsyncFunctions: true async function foo(): Promise { return; } \ No newline at end of file diff --git a/tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration1_es6.ts b/tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration1_es6.ts index 289a65bb74fe1..3a79214001105 100644 --- a/tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration1_es6.ts +++ b/tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration1_es6.ts @@ -1,4 +1,5 @@ // @target: ES6 // @noEmitHelpers: true +// @experimentalAsyncFunctions: true async function foo(): Promise { } \ No newline at end of file diff --git a/tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration2_es6.ts b/tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration2_es6.ts index 25a153b4a3412..e75ef1d36a3b0 100644 --- a/tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration2_es6.ts +++ b/tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration2_es6.ts @@ -1,4 +1,5 @@ // @target: ES6 // @noEmitHelpers: true +// @experimentalAsyncFunctions: true function f(await) { } \ No newline at end of file diff --git a/tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration3_es6.ts b/tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration3_es6.ts index 4ae27c596f1ab..9ca200f8d76f8 100644 --- a/tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration3_es6.ts +++ b/tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration3_es6.ts @@ -1,4 +1,5 @@ // @target: ES6 // @noEmitHelpers: true +// @experimentalAsyncFunctions: true function f(await = await) { } \ No newline at end of file diff --git a/tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration4_es6.ts b/tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration4_es6.ts index 5d1ec389da366..ac4447a0e4d82 100644 --- a/tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration4_es6.ts +++ b/tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration4_es6.ts @@ -1,4 +1,5 @@ // @target: ES6 // @noEmitHelpers: true +// @experimentalAsyncFunctions: true function await() { } \ No newline at end of file diff --git a/tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration5_es6.ts b/tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration5_es6.ts index eb3cd1db55675..60a0a8f4b7476 100644 --- a/tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration5_es6.ts +++ b/tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration5_es6.ts @@ -1,4 +1,5 @@ // @target: ES6 // @noEmitHelpers: true +// @experimentalAsyncFunctions: true async function foo(await): Promise { } \ No newline at end of file diff --git a/tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration6_es6.ts b/tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration6_es6.ts index 89b0445fd2efd..a3ab64b9d294d 100644 --- a/tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration6_es6.ts +++ b/tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration6_es6.ts @@ -1,4 +1,5 @@ // @target: ES6 // @noEmitHelpers: true +// @experimentalAsyncFunctions: true async function foo(a = await): Promise { } \ No newline at end of file diff --git a/tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration7_es6.ts b/tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration7_es6.ts index 5a964695da5e5..cde12c7dbe3fb 100644 --- a/tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration7_es6.ts +++ b/tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration7_es6.ts @@ -1,5 +1,6 @@ // @target: ES6 // @noEmitHelpers: true +// @experimentalAsyncFunctions: true async function bar(): Promise { // 'await' here is an identifier, and not a yield expression. async function foo(a = await): Promise { diff --git a/tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration8_es6.ts b/tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration8_es6.ts index 764b0f3fb8a79..52b6dba279279 100644 --- a/tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration8_es6.ts +++ b/tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration8_es6.ts @@ -1,3 +1,4 @@ // @target: ES6 // @noEmitHelpers: true +// @experimentalAsyncFunctions: true var v = { [await]: foo } \ No newline at end of file diff --git a/tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration9_es6.ts b/tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration9_es6.ts index 7671764ad2add..662fa01760655 100644 --- a/tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration9_es6.ts +++ b/tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration9_es6.ts @@ -1,5 +1,6 @@ // @target: ES6 // @noEmitHelpers: true +// @experimentalAsyncFunctions: true async function foo(): Promise { var v = { [await]: foo } } \ No newline at end of file