From 3dd21fc3a73777f50da1f529f0ca4bb449518db7 Mon Sep 17 00:00:00 2001 From: Sheetal Nandi Date: Fri, 15 Aug 2014 13:18:54 -0700 Subject: [PATCH] Trailing comment tests for parameters, fixes the trailing // comments and parameter indentation --- src/compiler/emitter.ts | 8 +- src/compiler/scanner.ts | 4 +- ...duleAndAmbientWithSameNameAndCommonRoot.js | 2 +- ...nctionAndExportedFunctionThatShareAName.js | 8 +- ...ionAndNonExportedFunctionThatShareAName.js | 4 +- ...ticVariableAndExportedVarThatShareAName.js | 4 +- ...VariableAndNonExportedVarThatShareAName.js | 4 +- ...ClassAndModuleWithSameNameAndCommonRoot.js | 2 +- ...ctionAndModuleWithSameNameAndCommonRoot.js | 4 +- .../reference/InvalidNonInstantiatedModule.js | 4 +- ...duleWithExportedAndNonExportedFunctions.js | 2 +- tests/baselines/reference/ParameterList7.js | 2 +- .../additionOperatorWithInvalidOperands.js | 2 +- .../additionOperatorWithTypeParameter.js | 8 +- tests/baselines/reference/aliasBug.js | 2 +- .../reference/aliasOnMergedModuleInterface.js | 2 +- .../anyAssignabilityInInheritance.js | 32 +-- .../arithmeticOperatorWithInvalidOperands.js | 160 +++++++------- .../reference/arrayAssignmentTest1.js | 8 +- tests/baselines/reference/arrayAugment.js | 2 +- ...yLiteralAndArrayConstructorEquivalence1.js | 2 +- .../reference/arrayLiteralWidened.js | 6 +- ...arrayLiteralWithMultipleBestCommonTypes.js | 14 +- tests/baselines/reference/arrayLiterals.js | 10 +- .../arrayLiteralsWithRecursiveGenerics.js | 6 +- .../reference/arrayOfFunctionTypes3.js | 2 +- .../reference/arrayTypeOfFunctionTypes.js | 2 +- .../reference/arrowFunctionContexts.js | 12 +- .../arrowFunctionInConstructorArgument1.js | 2 +- .../reference/assignmentCompatBug2.js | 2 +- .../assignmentCompatWithCallSignatures3.js | 2 +- ...patWithCallSignaturesWithRestParameters.js | 2 +- ...ssignmentCompatWithConstructSignatures3.js | 2 +- .../baselines/reference/assignmentToObject.js | 4 +- .../assignmentToObjectAndFunction.js | 10 +- ...entedTypeAssignmentCompatIndexSignature.js | 2 +- ...ugmentedTypeBracketAccessIndexSignature.js | 2 +- ...augmentedTypeBracketNamedPropertyAccess.js | 6 +- .../reference/augmentedTypesClass.js | 2 +- .../reference/augmentedTypesClass2a.js | 2 +- .../reference/augmentedTypesClass3.js | 4 +- .../reference/augmentedTypesClass4.js | 2 +- .../baselines/reference/augmentedTypesEnum.js | 14 +- .../reference/augmentedTypesFunction.js | 16 +- .../reference/augmentedTypesModules.js | 10 +- .../reference/augmentedTypesModules3.js | 2 +- .../baselines/reference/augmentedTypesVar.js | 14 +- .../reference/autonumberingInEnums.js | 2 +- tests/baselines/reference/avoid.js | 8 +- tests/baselines/reference/baseCheck.js | 4 +- .../bestCommonTypeOfConditionalExpressions.js | 10 +- .../bestCommonTypeWithContextualTyping.js | 6 +- tests/baselines/reference/bind1.js | 2 +- tests/baselines/reference/callOnInstance.js | 2 +- tests/baselines/reference/callOverloads2.js | 2 +- .../callSignatureWithoutAnnotationsOrBody.js | 2 +- ...llSignaturesThatDifferOnlyByReturnType2.js | 4 +- .../reference/callbacksDontShareTypes.js | 2 +- .../reference/classAndVariableWithSameName.js | 4 +- .../baselines/reference/classExtendsItself.js | 4 +- .../reference/classExtendsItselfIndirectly.js | 4 +- .../classExtendsItselfIndirectly2.js | 4 +- .../classExtendsItselfIndirectly3.js | 4 +- .../classExtendsValidConstructorFunction.js | 2 +- .../reference/classImplementsClass2.js | 2 +- .../classMemberInitializerScoping.js | 2 +- .../reference/classSideInheritance3.js | 4 +- .../classWithBaseClassButNoConstructor.js | 14 +- .../reference/classWithConstructors.js | 32 +-- .../classWithoutExplicitConstructor.js | 2 +- .../cloduleAcrossModuleDefinitions.js | 2 +- tests/baselines/reference/cloduleTest2.js | 6 +- .../collisionArgumentsArrowFunctions.js | 10 +- .../collisionArgumentsClassConstructor.js | 20 +- .../collisionArgumentsClassMethod.js | 16 +- .../reference/collisionArgumentsFunction.js | 16 +- .../collisionArgumentsFunctionExpressions.js | 16 +- .../reference/collisionArgumentsInType.js | 4 +- .../collisionRestParameterArrowFunctions.js | 8 +- .../collisionRestParameterClassConstructor.js | 16 +- .../collisionRestParameterClassMethod.js | 12 +- .../collisionRestParameterFunction.js | 8 +- ...llisionRestParameterFunctionExpressions.js | 8 +- .../reference/collisionRestParameterInType.js | 2 +- .../collisionSuperAndLocalVarInConstructor.js | 8 +- .../collisionSuperAndLocalVarInMethod.js | 8 +- .../collisionSuperAndLocalVarInProperty.js | 10 +- .../collisionSuperAndNameResolution.js | 2 +- ...ollisionThisExpressionAndNameResolution.js | 2 +- .../collisionThisExpressionAndParameter.js | 4 +- .../commaOperatorOtherInvalidOperation.js | 4 +- tests/baselines/reference/commentsFunction.js | 24 ++- tests/baselines/reference/commentsVarDecl.js | 2 +- ...OperatorWithNoRelationshipPrimitiveType.js | 32 +-- tests/baselines/reference/constraints0.js | 4 +- ...straintsThatReferenceOtherContstraints1.js | 2 +- .../constructorArgWithGenericCallSignature.js | 2 +- .../constructorHasPrototypeProperty.js | 8 +- .../constructorParameterProperties.js | 4 +- .../constructorParameterProperties2.js | 6 +- .../constructorParameterShadowsOuterScopes.js | 4 +- .../constructorsWithSpecializedSignatures.js | 2 +- .../contextualSignatureInstantiation1.js | 2 +- .../contextualSignatureInstantiation3.js | 8 +- .../couldNotSelectGenericOverload.js | 6 +- .../reference/declFileInternalAliases.js | 4 +- tests/baselines/reference/declInput-2.js | 2 +- .../declarationEmit_nameConflicts.js | 10 +- .../declarationEmit_nameConflicts2.js | 8 +- .../declarationEmit_nameConflicts3.js | 8 +- .../declarationEmit_nameConflictsWithAlias.js | 2 +- .../defaultArgsInFunctionExpressions.js | 4 +- .../defaultBestCommonTypesHaveDecls.js | 2 +- ...derivedClassConstructorWithoutSuperCall.js | 6 +- .../reference/derivedClassTransitivity.js | 4 +- .../reference/derivedClassTransitivity2.js | 4 +- .../reference/derivedClassTransitivity3.js | 4 +- .../derivedClassWithoutExplicitConstructor.js | 4 +- ...derivedClassWithoutExplicitConstructor2.js | 6 +- ...derivedClassWithoutExplicitConstructor3.js | 8 +- ...sesHiddenBaseCallViaSuperPropertyAccess.js | 6 +- ...tWidenAtObjectLiteralPropertyAssignment.js | 2 +- .../reference/dottedSymbolResolution1.js | 2 +- .../duplicateIdentifierInCatchBlock.js | 6 +- ...ateIdentifiersAcrossContainerBoundaries.js | 12 +- .../duplicateSymbolsExportMatching.js | 6 +- .../reference/duplicateVariablesWithAny.js | 8 +- .../baselines/reference/enumAssignability.js | 8 +- .../enumAssignabilityInInheritance.js | 6 +- .../reference/enumAssignmentCompat.js | 10 +- .../reference/enumAssignmentCompat2.js | 10 +- tests/baselines/reference/enumBasics.js | 4 +- tests/baselines/reference/enumIndexer.js | 2 +- tests/baselines/reference/enumNumbering1.js | 2 +- .../baselines/reference/enumPropertyAccess.js | 4 +- .../errorOnContextuallyTypedReturnType.js | 4 +- tests/baselines/reference/es6MemberScoping.js | 4 +- .../exportAssignedTypeAsTypeAnnotation.js | 2 +- .../exportAssignmentConstrainedGenericType.js | 4 +- ...xportAssignmentOfDeclaredExternalModule.js | 8 +- .../baselines/reference/exportPrivateType.js | 2 +- .../reference/extendNonClassSymbol2.js | 2 +- .../externalModuleExportingGenericClass.js | 2 +- .../functionConstraintSatisfaction2.js | 2 +- .../functionSignatureAssignmentCompat1.js | 4 +- .../funduleUsedAcrossFileBoundary.js | 2 +- .../genericArrayAssignmentCompatErrors.js | 2 +- .../reference/genericArrayMethods1.js | 2 +- .../genericCallSpecializedToTypeArg.js | 2 +- .../genericCallTypeArgumentInference.js | 36 ++-- .../genericCallWithArrayLiteralArgs.js | 16 +- ...allWithConstraintsTypeArgumentInference.js | 44 ++-- ...llWithConstraintsTypeArgumentInference2.js | 8 +- ...nericCallWithConstructorTypedArguments5.js | 12 +- .../genericCallWithFunctionTypedArguments.js | 26 +-- .../genericCallWithFunctionTypedArguments2.js | 22 +- .../genericCallWithFunctionTypedArguments3.js | 2 +- .../genericCallWithFunctionTypedArguments4.js | 2 +- .../genericCallWithFunctionTypedArguments5.js | 14 +- ...enericCallWithGenericSignatureArguments.js | 22 +- ...nericCallWithGenericSignatureArguments2.js | 10 +- ...nericCallWithGenericSignatureArguments3.js | 22 +- .../genericCallWithNonSymmetricSubtypes.js | 18 +- .../genericCallWithObjectLiteralArgs.js | 6 +- .../genericCallWithObjectLiteralArguments1.js | 2 +- .../genericCallWithObjectTypeArgs.js | 2 +- .../genericCallWithObjectTypeArgs2.js | 6 +- ...icCallWithObjectTypeArgsAndConstraints2.js | 4 +- ...icCallWithObjectTypeArgsAndConstraints3.js | 6 +- ...icCallWithObjectTypeArgsAndConstraints4.js | 4 +- ...icCallWithObjectTypeArgsAndConstraints5.js | 6 +- ...CallWithObjectTypeArgsAndIndexersErrors.js | 4 +- ...icCallWithObjectTypeArgsAndInitializers.js | 12 +- ...CallWithObjectTypeArgsAndNumericIndexer.js | 2 +- ...cCallWithObjectTypeArgsAndStringIndexer.js | 6 +- ...WithOverloadedConstructorTypedArguments.js | 14 +- ...ithOverloadedConstructorTypedArguments2.js | 10 +- ...allWithOverloadedFunctionTypedArguments.js | 16 +- ...llWithOverloadedFunctionTypedArguments2.js | 10 +- .../reference/genericChainedCalls.js | 2 +- ...icClassWithFunctionTypedMemberArguments.js | 30 +-- tests/baselines/reference/genericClasses2.js | 4 +- tests/baselines/reference/genericClasses3.js | 4 +- .../reference/genericCloneReturnTypes2.js | 4 +- .../baselines/reference/genericImplements.js | 4 +- .../baselines/reference/genericInference2.js | 10 +- tests/baselines/reference/genericReduce.js | 2 +- tests/baselines/reference/genericRestArgs.js | 4 +- .../genericReversingTypeParameters.js | 2 +- .../genericReversingTypeParameters2.js | 2 +- .../reference/genericTypeAssertions1.js | 2 +- .../reference/genericTypeAssertions2.js | 4 +- .../reference/genericTypeAssertions3.js | 4 +- .../genericTypeReferencesRequireTypeArgs.js | 8 +- .../genericTypeWithCallableMembers.js | 4 +- .../genericTypeWithNonGenericBaseMisMatch.js | 2 +- .../genericWithOpenTypeParameters1.js | 8 +- tests/baselines/reference/generics1.js | 14 +- tests/baselines/reference/generics1NoError.js | 4 +- tests/baselines/reference/generics2.js | 14 +- tests/baselines/reference/generics2NoError.js | 4 +- tests/baselines/reference/generics5.js | 2 +- .../reference/heterogeneousArrayLiterals.js | 120 +++++------ .../implementPublicPropertyAsPrivate.js | 2 +- ...gAnInterfaceExtendingClassWithPrivates2.js | 4 +- ...AnyDeclareFunctionExprWithoutFormalType.js | 4 +- .../implicitAnyDeclareMemberWithoutType2.js | 6 +- ...plicitAnyDeclareTypePropertyWithoutType.js | 10 +- ...itAnyDeclareVariablesWithoutTypeAndInit.js | 2 +- ...tAnyFunctionInvocationWithAnyArguements.js | 8 +- ...mplicitAnyFunctionReturnNullOrUndefined.js | 4 +- .../reference/implicitAnyWidenToAny.js | 8 +- tests/baselines/reference/importDecl.js | 4 +- .../reference/importImportOnlyModule.js | 4 +- .../reference/importOnAliasedIdentifiers.js | 2 +- .../baselines/reference/importTsBeforeDTs.js | 4 +- .../reference/indexIntoArraySubclass.js | 2 +- .../reference/indexSignatureTypeInference.js | 8 +- .../indexSignaturesInferentialTyping.js | 4 +- .../inheritanceOfGenericConstructorMethod1.js | 6 +- .../inheritanceOfGenericConstructorMethod2.js | 8 +- tests/baselines/reference/innerOverloads.js | 2 +- .../reference/interfaceAssignmentCompat.js | 2 +- .../interfaceExtendingClassWithPrivates2.js | 2 +- tests/baselines/reference/intrinsics.js | 2 +- .../reference/invalidBooleanAssignments.js | 2 +- .../reference/invalidInstantiatedModule.js | 4 +- .../reference/invalidNestedModules.js | 2 +- .../reference/invalidReturnStatements.js | 2 +- .../invalidSymbolInTypeParameter1.js | 2 +- .../logicalOrOperatorWithEveryType.js | 198 +++++++++--------- .../memberFunctionsWithPrivateOverloads.js | 6 +- ...mberFunctionsWithPublicPrivateOverloads.js | 2 +- .../reference/mergeThreeInterfaces.js | 8 +- .../baselines/reference/mergeTwoInterfaces.js | 4 +- .../reference/mergedDeclarations3.js | 2 +- .../mergedInterfacesWithInheritedPrivates2.js | 2 +- .../mergedModuleDeclarationCodeGen5.js | 12 +- ...hedExplicitTypeParameterAndArgumentType.js | 4 +- .../reference/moduleAliasInterface.js | 4 +- .../moduleAndInterfaceWithSameName.js | 2 +- .../baselines/reference/moduleNewExportBug.js | 2 +- tests/baselines/reference/moduleProperty2.js | 6 +- tests/baselines/reference/moduleScopingBug.js | 6 +- .../reference/moduleUnassignedVariable.js | 4 +- .../reference/moduleVariableArrayIndexer.js | 2 +- .../reference/moduleWithNoValuesAsType.js | 4 +- .../reference/multiModuleFundule1.js | 2 +- tests/baselines/reference/nameCollisions.js | 14 +- ...nctionExpressionAssignedToClassProperty.js | 2 +- .../reference/nestedModulePrivateAccess.js | 2 +- tests/baselines/reference/nestedModules.js | 2 +- .../reference/newNonReferenceType.js | 2 +- .../reference/newOnInstanceSymbol.js | 2 +- .../baselines/reference/noErrorsInCallback.js | 4 +- .../noImplicitAnyForMethodParameters.js | 4 +- .../reference/nullAssignedToUndefined.js | 2 +- .../nullIsSubtypeOfEverythingButUndefined.js | 2 +- .../reference/numericIndexerConstraint1.js | 2 +- .../reference/numericIndexerTyping1.js | 2 +- .../reference/numericIndexerTyping2.js | 2 +- .../objectLiteralArraySpecialization.js | 2 +- .../reference/objectLiteralIndexerErrors.js | 2 +- .../reference/objectLiteralIndexers.js | 2 +- ...objectTypeHidingMembersOfExtendedObject.js | 10 +- ...ignatureHidingMembersOfExtendedFunction.js | 2 +- ...ignatureHidingMembersOfExtendedFunction.js | 2 +- ...ypeWithStringIndexerHidingObjectIndexer.js | 2 +- ...bjectTypeWithStringNamedNumericProperty.js | 16 +- ...ctTypesIdentityWithConstructSignatures2.js | 2 +- ...ConstructSignaturesDifferingParamCounts.js | 2 +- ...nstructSignaturesDifferingByConstraints.js | 2 +- ...structSignaturesDifferingByConstraints2.js | 2 +- ...structSignaturesDifferingByConstraints3.js | 2 +- ...onstructSignaturesDifferingByReturnType.js | 2 +- ...nstructSignaturesDifferingByReturnType2.js | 2 +- ...enericConstructSignaturesOptionalParams.js | 2 +- ...nericConstructSignaturesOptionalParams2.js | 2 +- ...nericConstructSignaturesOptionalParams3.js | 2 +- .../objectTypesWithPredefinedTypesAsName.js | 2 +- .../optionalConstructorArgInSuper.js | 2 +- .../optionalParamAssignmentCompat.js | 4 +- .../overEagerReturnTypeSpecialization.js | 4 +- tests/baselines/reference/overload1.js | 6 +- .../reference/overloadModifiersMustAgree.js | 2 +- ...verloadOnGenericClassAndNonGenericClass.js | 2 +- .../reference/overloadResolutionTest1.js | 14 +- .../reference/overloadingOnConstants2.js | 10 +- ...esolutionWithConstraintCheckingDeferred.js | 6 +- .../reference/overloadsWithinClasses.js | 4 +- .../reference/paramPropertiesInSignatures.js | 2 +- .../reference/parserParameterList7.js | 2 +- .../reference/primaryExpressionMods.js | 12 +- .../privacyCannotNameVarTypeDeclFile.js | 24 +-- .../privacyCheckAnonymousFunctionParameter.js | 2 +- ...privacyCheckAnonymousFunctionParameter2.js | 2 +- ...rivacyCheckTypeOfInvisibleModuleNoError.js | 2 +- tests/baselines/reference/privacyGloVar.js | 10 +- tests/baselines/reference/privacyVar.js | 18 +- .../baselines/reference/privacyVarDeclFile.js | 12 +- .../privateStaticMemberAccessibility.js | 4 +- .../privateStaticNotAccessibleInClodule.js | 2 +- .../privateStaticNotAccessibleInClodule2.js | 2 +- .../node/m5.js | 2 +- .../node/useModule.js | 4 +- .../node/m5.js | 2 +- .../node/useModule.js | 2 +- .../node/useModule.js | 2 +- tests/baselines/reference/promiseChaining.js | 2 +- tests/baselines/reference/promiseChaining1.js | 2 +- .../reference/promisePermutations.js | 120 +++++------ .../reference/promisePermutations2.js | 122 +++++------ .../reference/promisePermutations3.js | 120 +++++------ tests/baselines/reference/promiseTest.js | 2 +- tests/baselines/reference/propertyAccess.js | 6 +- ...rtyAccessOnTypeParameterWithConstraints.js | 4 +- ...tyAccessOnTypeParameterWithConstraints2.js | 6 +- ...tyAccessOnTypeParameterWithConstraints3.js | 12 +- ...tyAccessOnTypeParameterWithConstraints4.js | 4 +- ...tyAccessOnTypeParameterWithConstraints5.js | 4 +- ...AccessOnTypeParameterWithoutConstraints.js | 4 +- .../propertyAndFunctionWithSameName.js | 2 +- .../propertyIdentityWithPrivacyMismatch.js | 2 +- .../propertyNamesWithStringLiteral.js | 4 +- tests/baselines/reference/propertyOrdering.js | 4 +- .../propertyParameterWithQuestionMark.js | 2 +- .../reference/qualifiedModuleLocals.js | 2 +- .../recursiveBaseConstructorCreation1.js | 2 +- .../recursiveBaseConstructorCreation2.js | 2 +- .../recursiveBaseConstructorCreation3.js | 2 +- .../reference/recursiveFunctionTypes.js | 6 +- .../reference/recursiveIdenticalAssignment.js | 2 +- .../reference/recursiveInitializer.js | 4 +- tests/baselines/reference/returnStatements.js | 2 +- .../reference/returnTypeParameter.js | 2 +- .../reference/scopingInCatchBlocks.js | 2 +- .../specializedInheritedConstructors1.js | 2 +- .../baselines/reference/staticInheritance.js | 6 +- .../reference/staticMemberExportAccess.js | 8 +- ...AndPublicMemberOfAnotherClassAssignment.js | 2 +- .../staticMethodReferencingTypeArgument1.js | 2 +- tests/baselines/reference/staticPropSuper.js | 8 +- .../reference/staticsNotInScopeInClodule.js | 2 +- .../reference/strictModeInConstructor.js | 4 +- .../reference/subtypesOfTypeParameter.js | 14 +- ...subtypesOfTypeParameterWithConstraints2.js | 84 ++++---- .../reference/subtypingWithCallSignatures.js | 8 +- .../reference/subtypingWithCallSignatures2.js | 32 +-- .../reference/subtypingWithCallSignatures3.js | 24 +-- .../subtypingWithConstructSignatures.js | 8 +- .../subtypingWithConstructSignatures2.js | 32 +-- .../subtypingWithConstructSignatures3.js | 24 +-- .../subtypingWithOptionalProperties.js | 2 +- tests/baselines/reference/superAccess.js | 6 +- .../reference/superCallAssignResult.js | 2 +- .../reference/targetTypeBaseCalls.js | 2 +- tests/baselines/reference/targetTypeCalls.js | 6 +- tests/baselines/reference/targetTypeTest3.js | 2 +- .../reference/thisInInnerFunctions.js | 2 +- tests/baselines/reference/thisInLambda.js | 2 +- .../reference/thisInOuterClassBody.js | 2 +- .../this_inside-enum-should-not-be-allowed.js | 4 +- .../topLevelModuleDeclarationAndFile.js | 4 +- .../twoInterfacesDifferentRootModule.js | 4 +- .../twoInterfacesDifferentRootModule2.js | 8 +- ...oMergedInterfacesWithDifferingOverloads.js | 4 +- .../baselines/reference/typeArgInference2.js | 10 +- .../typeArgumentInferenceOrdering.js | 2 +- ...eArgumentInferenceTransitiveConstraints.js | 2 +- .../typeArgumentInferenceWithConstraints.js | 2 +- ...umentsShouldDisallowNonGenericOverloads.js | 6 +- .../typeConstraintsWithConstructSignatures.js | 4 +- .../typeOfEnumAndVarRedeclarations.js | 2 +- .../reference/typeOfThisInStaticMembers2.js | 4 +- ...typeParameterAsTypeParameterConstraint2.js | 4 +- .../reference/typecheckIfCondition.js | 2 +- .../reference/typeofInternalModules.js | 2 +- tests/baselines/reference/typeofProperty.js | 4 +- tests/baselines/reference/typeofSimple.js | 4 +- tests/baselines/reference/unaryPlus.js | 6 +- tests/baselines/reference/unknownSymbols1.js | 4 +- tests/baselines/reference/unknownSymbols2.js | 2 +- ...untypedFunctionCallsWithTypeParameters1.js | 10 +- ...flictsWithImportInDifferentPartOfModule.js | 2 +- tests/baselines/reference/voidArrayLit.js | 2 +- .../reference/voidFunctionAssignmentCompat.js | 8 +- tests/baselines/reference/widenToAny1.js | 2 +- tests/baselines/reference/widenToAny2.js | 2 +- tests/baselines/reference/widenedTypes.js | 2 +- tests/baselines/reference/witness.js | 8 +- tests/cases/compiler/commentsFunction.ts | 13 +- 391 files changed, 1600 insertions(+), 1565 deletions(-) diff --git a/src/compiler/emitter.ts b/src/compiler/emitter.ts index 5ae2b9a0aea..3a1a6d639a1 100644 --- a/src/compiler/emitter.ts +++ b/src/compiler/emitter.ts @@ -1204,13 +1204,13 @@ module ts { } function emitSignatureParameters(node: FunctionDeclaration) { + increaseIndent(); write("("); if (node) { - increaseIndent(); emitCommaList(node.parameters, node.parameters.length - (hasRestParameters(node) ? 1 : 0)); - decreaseIndent(); } write(")"); + decreaseIndent(); } function emitSignatureAndBody(node: FunctionDeclaration) { @@ -1386,8 +1386,8 @@ module ts { write("function "); emitSignatureAndBody(accessors.getAccessor); emitEnd(accessors.getAccessor); - write(","); emitTrailingComments(accessors.getAccessor); + write(","); } if (accessors.setAccessor) { writeLine(); @@ -1397,8 +1397,8 @@ module ts { write("function "); emitSignatureAndBody(accessors.setAccessor); emitEnd(accessors.setAccessor); - write(","); emitTrailingComments(accessors.setAccessor); + write(","); } writeLine(); write("enumerable: true,"); diff --git a/src/compiler/scanner.ts b/src/compiler/scanner.ts index a53333b3c5f..0d83c3e3d33 100644 --- a/src/compiler/scanner.ts +++ b/src/compiler/scanner.ts @@ -385,12 +385,14 @@ module ts { continue; case CharacterCodes.slash: var nextChar = text.charCodeAt(pos + 1); + var hasTrailingNewLine = false; if (nextChar === CharacterCodes.slash || nextChar === CharacterCodes.asterisk) { var startPos = pos; pos += 2; if (nextChar === CharacterCodes.slash) { while (pos < text.length) { if (isLineBreak(text.charCodeAt(pos))) { + hasTrailingNewLine = true; break; } pos++; @@ -407,7 +409,7 @@ module ts { } if (collecting) { if (!result) result = []; - result.push({ pos: startPos, end: pos }); + result.push({ pos: startPos, end: pos, hasTrailingNewLine: hasTrailingNewLine }); } continue; } diff --git a/tests/baselines/reference/AmbientModuleAndAmbientWithSameNameAndCommonRoot.js b/tests/baselines/reference/AmbientModuleAndAmbientWithSameNameAndCommonRoot.js index a671c9693d5..fd57d75d9b8 100644 --- a/tests/baselines/reference/AmbientModuleAndAmbientWithSameNameAndCommonRoot.js +++ b/tests/baselines/reference/AmbientModuleAndAmbientWithSameNameAndCommonRoot.js @@ -28,4 +28,4 @@ var p = new A.Point(0, 0); // unexpected error here, bug 840000 //// [test.js] var p; var p = A.Point.Origin; -var p = new A.Point(0, 0); // unexpected error here, bug 840000 +var p = new A.Point(0, 0); // unexpected error here, bug 840000 diff --git a/tests/baselines/reference/ClassAndModuleThatMergeWithStaticFunctionAndExportedFunctionThatShareAName.js b/tests/baselines/reference/ClassAndModuleThatMergeWithStaticFunctionAndExportedFunctionThatShareAName.js index aefd9a6d085..809cbe92920 100644 --- a/tests/baselines/reference/ClassAndModuleThatMergeWithStaticFunctionAndExportedFunctionThatShareAName.js +++ b/tests/baselines/reference/ClassAndModuleThatMergeWithStaticFunctionAndExportedFunctionThatShareAName.js @@ -30,7 +30,7 @@ var Point = (function () { } Point.Origin = function () { return { x: 0, y: 0 }; - }; // unexpected error here bug 840246 + }; // unexpected error here bug 840246 return Point; })(); var Point; @@ -38,7 +38,7 @@ var Point; function Origin() { return null; } - Point.Origin = Origin; //expected duplicate identifier error + Point.Origin = Origin; //expected duplicate identifier error })(Point || (Point = {})); var A; (function (A) { @@ -49,7 +49,7 @@ var A; } Point.Origin = function () { return { x: 0, y: 0 }; - }; // unexpected error here bug 840246 + }; // unexpected error here bug 840246 return Point; })(); A.Point = Point; @@ -57,7 +57,7 @@ var A; function Origin() { return ""; } - Point.Origin = Origin; //expected duplicate identifier error + Point.Origin = Origin; //expected duplicate identifier error })(A.Point || (A.Point = {})); var Point = A.Point; })(A || (A = {})); diff --git a/tests/baselines/reference/ClassAndModuleThatMergeWithStaticFunctionAndNonExportedFunctionThatShareAName.js b/tests/baselines/reference/ClassAndModuleThatMergeWithStaticFunctionAndNonExportedFunctionThatShareAName.js index 51f450a51e8..9a941abdc1e 100644 --- a/tests/baselines/reference/ClassAndModuleThatMergeWithStaticFunctionAndNonExportedFunctionThatShareAName.js +++ b/tests/baselines/reference/ClassAndModuleThatMergeWithStaticFunctionAndNonExportedFunctionThatShareAName.js @@ -37,7 +37,7 @@ var Point; (function (Point) { function Origin() { return ""; - } // not an error, since not exported + } // not an error, since not exported })(Point || (Point = {})); var A; (function (A) { @@ -55,7 +55,7 @@ var A; (function (Point) { function Origin() { return ""; - } // not an error since not exported + } // not an error since not exported })(A.Point || (A.Point = {})); var Point = A.Point; })(A || (A = {})); diff --git a/tests/baselines/reference/ClassAndModuleThatMergeWithStaticVariableAndExportedVarThatShareAName.js b/tests/baselines/reference/ClassAndModuleThatMergeWithStaticVariableAndExportedVarThatShareAName.js index fa752da4d92..3f377bfaf00 100644 --- a/tests/baselines/reference/ClassAndModuleThatMergeWithStaticVariableAndExportedVarThatShareAName.js +++ b/tests/baselines/reference/ClassAndModuleThatMergeWithStaticVariableAndExportedVarThatShareAName.js @@ -33,7 +33,7 @@ var Point = (function () { })(); var Point; (function (Point) { - Point.Origin = ""; //expected duplicate identifier error + Point.Origin = ""; //expected duplicate identifier error })(Point || (Point = {})); var A; (function (A) { @@ -47,7 +47,7 @@ var A; })(); A.Point = Point; (function (Point) { - Point.Origin = ""; //expected duplicate identifier error + Point.Origin = ""; //expected duplicate identifier error })(A.Point || (A.Point = {})); var Point = A.Point; })(A || (A = {})); diff --git a/tests/baselines/reference/ClassAndModuleThatMergeWithStaticVariableAndNonExportedVarThatShareAName.js b/tests/baselines/reference/ClassAndModuleThatMergeWithStaticVariableAndNonExportedVarThatShareAName.js index 083767c3c3c..ca069294926 100644 --- a/tests/baselines/reference/ClassAndModuleThatMergeWithStaticVariableAndNonExportedVarThatShareAName.js +++ b/tests/baselines/reference/ClassAndModuleThatMergeWithStaticVariableAndNonExportedVarThatShareAName.js @@ -33,7 +33,7 @@ var Point = (function () { })(); var Point; (function (Point) { - var Origin = ""; // not an error, since not exported + var Origin = ""; // not an error, since not exported })(Point || (Point = {})); var A; (function (A) { @@ -47,7 +47,7 @@ var A; })(); A.Point = Point; (function (Point) { - var Origin = ""; // not an error since not exported + var Origin = ""; // not an error since not exported })(A.Point || (A.Point = {})); var Point = A.Point; })(A || (A = {})); diff --git a/tests/baselines/reference/ClassAndModuleWithSameNameAndCommonRoot.js b/tests/baselines/reference/ClassAndModuleWithSameNameAndCommonRoot.js index 5ebd2c95bc6..3956c9e8828 100644 --- a/tests/baselines/reference/ClassAndModuleWithSameNameAndCommonRoot.js +++ b/tests/baselines/reference/ClassAndModuleWithSameNameAndCommonRoot.js @@ -69,7 +69,7 @@ var X; //// [test.js] //var cl: { x: number; y: number; } var cl = new X.Y.Point(1, 1); -var cl = X.Y.Point.Origin; // error not expected here same as bug 83996 ? +var cl = X.Y.Point.Origin; // error not expected here same as bug 83996 ? //// [simple.js] var A = (function () { function A() { diff --git a/tests/baselines/reference/FunctionAndModuleWithSameNameAndCommonRoot.js b/tests/baselines/reference/FunctionAndModuleWithSameNameAndCommonRoot.js index 3cfb581c348..0e34a18c48b 100644 --- a/tests/baselines/reference/FunctionAndModuleWithSameNameAndCommonRoot.js +++ b/tests/baselines/reference/FunctionAndModuleWithSameNameAndCommonRoot.js @@ -64,7 +64,7 @@ var fn; var fn = A.Point; var cl; var cl = A.Point(); -var cl = A.Point.Origin; // not expected to be an error. +var cl = A.Point.Origin; // not expected to be an error. //// [simple.js] var B; (function (B) { @@ -78,7 +78,7 @@ var B; var Point = B.Point; })(B || (B = {})); var fn; -var fn = B.Point; // not expected to be an error. bug 840000: [corelang] Function of fundule not assignalbe as expected +var fn = B.Point; // not expected to be an error. bug 840000: [corelang] Function of fundule not assignalbe as expected var cl; var cl = B.Point(); var cl = B.Point.Origin; diff --git a/tests/baselines/reference/InvalidNonInstantiatedModule.js b/tests/baselines/reference/InvalidNonInstantiatedModule.js index c9dd4ee6300..54c0f7a42ab 100644 --- a/tests/baselines/reference/InvalidNonInstantiatedModule.js +++ b/tests/baselines/reference/InvalidNonInstantiatedModule.js @@ -9,5 +9,5 @@ var x: typeof M; // Error only a namespace //// [InvalidNonInstantiatedModule.js] -var m = M; // Error, not instantiated can not be used as var -var x; // Error only a namespace +var m = M; // Error, not instantiated can not be used as var +var x; // Error only a namespace diff --git a/tests/baselines/reference/ModuleWithExportedAndNonExportedFunctions.js b/tests/baselines/reference/ModuleWithExportedAndNonExportedFunctions.js index 326a961f170..ed0e1f90bf3 100644 --- a/tests/baselines/reference/ModuleWithExportedAndNonExportedFunctions.js +++ b/tests/baselines/reference/ModuleWithExportedAndNonExportedFunctions.js @@ -51,7 +51,7 @@ var A; var fn; var fn = A.fn; var fng; -var fng = A.fng; // bug 838015 +var fng = A.fng; // bug 838015 // these should be errors since the functions are not exported var fn2 = A.fn2; var fng2 = A.fng2; diff --git a/tests/baselines/reference/ParameterList7.js b/tests/baselines/reference/ParameterList7.js index 5e693d6a264..76adf8352b9 100644 --- a/tests/baselines/reference/ParameterList7.js +++ b/tests/baselines/reference/ParameterList7.js @@ -9,6 +9,6 @@ class C1 { var C1 = (function () { function C1(p3) { this.p3 = p3; - } // OK + } // OK return C1; })(); diff --git a/tests/baselines/reference/additionOperatorWithInvalidOperands.js b/tests/baselines/reference/additionOperatorWithInvalidOperands.js index a31a5115c17..baf4fadedb3 100644 --- a/tests/baselines/reference/additionOperatorWithInvalidOperands.js +++ b/tests/baselines/reference/additionOperatorWithInvalidOperands.js @@ -70,7 +70,7 @@ var r2 = a + b; var r3 = a + c; // number + every type except any and string var r4 = b + a; -var r5 = b + b; // number + number is valid +var r5 = b + b; // number + number is valid var r6 = b + c; // object + every type except any and string var r7 = c + a; diff --git a/tests/baselines/reference/additionOperatorWithTypeParameter.js b/tests/baselines/reference/additionOperatorWithTypeParameter.js index 541714c5f97..23a6b95b147 100644 --- a/tests/baselines/reference/additionOperatorWithTypeParameter.js +++ b/tests/baselines/reference/additionOperatorWithTypeParameter.js @@ -54,18 +54,18 @@ function foo(t, u) { var g; var f; // type parameter as left operand - var r1 = t + a; // ok, one operand is any + var r1 = t + a; // ok, one operand is any var r2 = t + b; var r3 = t + c; - var r4 = t + d; // ok, one operand is string + var r4 = t + d; // ok, one operand is string var r5 = t + e; var r6 = t + g; var r7 = t + f; // type parameter as right operand - var r8 = a + t; // ok, one operand is any + var r8 = a + t; // ok, one operand is any var r9 = b + t; var r10 = c + t; - var r11 = d + t; // ok, one operand is string + var r11 = d + t; // ok, one operand is string var r12 = e + t; var r13 = g + t; var r14 = f + t; diff --git a/tests/baselines/reference/aliasBug.js b/tests/baselines/reference/aliasBug.js index 9e51bf4477a..21c130413ae 100644 --- a/tests/baselines/reference/aliasBug.js +++ b/tests/baselines/reference/aliasBug.js @@ -46,7 +46,7 @@ var provide = foo; var booz = foo.bar.baz; var p = new provide.Provide(); function use() { - var p1; // error here, but should be okay + var p1; // error here, but should be okay var p2; var p3; var p22 = new provide.Provide(); diff --git a/tests/baselines/reference/aliasOnMergedModuleInterface.js b/tests/baselines/reference/aliasOnMergedModuleInterface.js index 0286759d316..a85f49906df 100644 --- a/tests/baselines/reference/aliasOnMergedModuleInterface.js +++ b/tests/baselines/reference/aliasOnMergedModuleInterface.js @@ -25,4 +25,4 @@ var x: foo.A = foo.bar("hello"); // foo.A should be ok but foo.bar should be err //// [aliasOnMergedModuleInterface_1.js] var z; z.bar("hello"); -var x = foo.bar("hello"); // foo.A should be ok but foo.bar should be error +var x = foo.bar("hello"); // foo.A should be ok but foo.bar should be error diff --git a/tests/baselines/reference/anyAssignabilityInInheritance.js b/tests/baselines/reference/anyAssignabilityInInheritance.js index 618ba628b6c..c74c7b0e596 100644 --- a/tests/baselines/reference/anyAssignabilityInInheritance.js +++ b/tests/baselines/reference/anyAssignabilityInInheritance.js @@ -90,40 +90,40 @@ var r3 = foo3(a); // any //// [anyAssignabilityInInheritance.js] var a; -var r3 = foo2(a); // any, not a subtype of number so it skips that overload, is a subtype of itself so it picks second (if truly ambiguous it would pick first overload) -var r3 = foo3(a); // any -var r3 = foo3(a); // any -var r3 = foo3(a); // any -var r3 = foo3(a); // any -var r3 = foo3(a); // any -var r3 = foo3(a); // any -var r3 = foo3(a); // any +var r3 = foo2(a); // any, not a subtype of number so it skips that overload, is a subtype of itself so it picks second (if truly ambiguous it would pick first overload) +var r3 = foo3(a); // any +var r3 = foo3(a); // any +var r3 = foo3(a); // any +var r3 = foo3(a); // any +var r3 = foo3(a); // any +var r3 = foo3(a); // any +var r3 = foo3(a); // any var A = (function () { function A() { } return A; })(); -var r3 = foo3(a); // any +var r3 = foo3(a); // any var A2 = (function () { function A2() { } return A2; })(); -var r3 = foo3(a); // any -var r3 = foo3(a); // any -var r3 = foo3(a); // any +var r3 = foo3(a); // any +var r3 = foo3(a); // any +var r3 = foo3(a); // any var E; (function (E) { E[E["A"] = 0] = "A"; })(E || (E = {})); -var r3 = foo3(a); // any +var r3 = foo3(a); // any function f() { } var f; (function (f) { f.bar = 1; })(f || (f = {})); -var r3 = foo3(a); // any +var r3 = foo3(a); // any var CC = (function () { function CC() { } @@ -133,6 +133,6 @@ var CC; (function (CC) { CC.bar = 1; })(CC || (CC = {})); -var r3 = foo3(a); // any -var r3 = foo3(a); // any +var r3 = foo3(a); // any +var r3 = foo3(a); // any var r3 = foo3(a); // any diff --git a/tests/baselines/reference/arithmeticOperatorWithInvalidOperands.js b/tests/baselines/reference/arithmeticOperatorWithInvalidOperands.js index 34d09d84ef5..8a9e6549144 100644 --- a/tests/baselines/reference/arithmeticOperatorWithInvalidOperands.js +++ b/tests/baselines/reference/arithmeticOperatorWithInvalidOperands.js @@ -598,9 +598,9 @@ var e; var f; // All of the below should be an error unless otherwise noted // operator * -var r1a1 = a * a; //ok +var r1a1 = a * a; //ok var r1a2 = a * b; -var r1a3 = a * c; //ok +var r1a3 = a * c; //ok var r1a4 = a * d; var r1a5 = a * e; var r1a6 = a * f; @@ -610,9 +610,9 @@ var r1b3 = b * c; var r1b4 = b * d; var r1b5 = b * e; var r1b6 = b * f; -var r1c1 = c * a; //ok +var r1c1 = c * a; //ok var r1c2 = c * b; -var r1c3 = c * c; //ok +var r1c3 = c * c; //ok var r1c4 = c * d; var r1c5 = c * e; var r1c6 = c * f; @@ -634,22 +634,22 @@ var r1f3 = f * c; var r1f4 = f * d; var r1f5 = f * e; var r1f6 = f * f; -var r1g1 = 0 /* a */ * a; //ok +var r1g1 = 0 /* a */ * a; //ok var r1g2 = 0 /* a */ * b; -var r1g3 = 0 /* a */ * c; //ok +var r1g3 = 0 /* a */ * c; //ok var r1g4 = 0 /* a */ * d; var r1g5 = 0 /* a */ * e; var r1g6 = 0 /* a */ * f; -var r1h1 = a * 1 /* b */; //ok +var r1h1 = a * 1 /* b */; //ok var r1h2 = b * 1 /* b */; -var r1h3 = c * 1 /* b */; //ok +var r1h3 = c * 1 /* b */; //ok var r1h4 = d * 1 /* b */; var r1h5 = e * 1 /* b */; var r1h6 = f * 1 /* b */; // operator / -var r2a1 = a / a; //ok +var r2a1 = a / a; //ok var r2a2 = a / b; -var r2a3 = a / c; //ok +var r2a3 = a / c; //ok var r2a4 = a / d; var r2a5 = a / e; var r2a6 = a / f; @@ -659,9 +659,9 @@ var r2b3 = b / c; var r2b4 = b / d; var r2b5 = b / e; var r2b6 = b / f; -var r2c1 = c / a; //ok +var r2c1 = c / a; //ok var r2c2 = c / b; -var r2c3 = c / c; //ok +var r2c3 = c / c; //ok var r2c4 = c / d; var r2c5 = c / e; var r2c6 = c / f; @@ -683,22 +683,22 @@ var r2f3 = f / c; var r2f4 = f / d; var r2f5 = f / e; var r2f6 = f / f; -var r2g1 = 0 /* a */ / a; //ok +var r2g1 = 0 /* a */ / a; //ok var r2g2 = 0 /* a */ / b; -var r2g3 = 0 /* a */ / c; //ok +var r2g3 = 0 /* a */ / c; //ok var r2g4 = 0 /* a */ / d; var r2g5 = 0 /* a */ / e; var r2g6 = 0 /* a */ / f; -var r2h1 = a / 1 /* b */; //ok +var r2h1 = a / 1 /* b */; //ok var r2h2 = b / 1 /* b */; -var r2h3 = c / 1 /* b */; //ok +var r2h3 = c / 1 /* b */; //ok var r2h4 = d / 1 /* b */; var r2h5 = e / 1 /* b */; var r2h6 = f / 1 /* b */; // operator % -var r3a1 = a % a; //ok +var r3a1 = a % a; //ok var r3a2 = a % b; -var r3a3 = a % c; //ok +var r3a3 = a % c; //ok var r3a4 = a % d; var r3a5 = a % e; var r3a6 = a % f; @@ -708,9 +708,9 @@ var r3b3 = b % c; var r3b4 = b % d; var r3b5 = b % e; var r3b6 = b % f; -var r3c1 = c % a; //ok +var r3c1 = c % a; //ok var r3c2 = c % b; -var r3c3 = c % c; //ok +var r3c3 = c % c; //ok var r3c4 = c % d; var r3c5 = c % e; var r3c6 = c % f; @@ -732,22 +732,22 @@ var r3f3 = f % c; var r3f4 = f % d; var r3f5 = f % e; var r3f6 = f % f; -var r3g1 = 0 /* a */ % a; //ok +var r3g1 = 0 /* a */ % a; //ok var r3g2 = 0 /* a */ % b; -var r3g3 = 0 /* a */ % c; //ok +var r3g3 = 0 /* a */ % c; //ok var r3g4 = 0 /* a */ % d; var r3g5 = 0 /* a */ % e; var r3g6 = 0 /* a */ % f; -var r3h1 = a % 1 /* b */; //ok +var r3h1 = a % 1 /* b */; //ok var r3h2 = b % 1 /* b */; -var r3h3 = c % 1 /* b */; //ok +var r3h3 = c % 1 /* b */; //ok var r3h4 = d % 1 /* b */; var r3h5 = e % 1 /* b */; var r3h6 = f % 1 /* b */; // operator - -var r4a1 = a - a; //ok +var r4a1 = a - a; //ok var r4a2 = a - b; -var r4a3 = a - c; //ok +var r4a3 = a - c; //ok var r4a4 = a - d; var r4a5 = a - e; var r4a6 = a - f; @@ -757,9 +757,9 @@ var r4b3 = b - c; var r4b4 = b - d; var r4b5 = b - e; var r4b6 = b - f; -var r4c1 = c - a; //ok +var r4c1 = c - a; //ok var r4c2 = c - b; -var r4c3 = c - c; //ok +var r4c3 = c - c; //ok var r4c4 = c - d; var r4c5 = c - e; var r4c6 = c - f; @@ -781,22 +781,22 @@ var r4f3 = f - c; var r4f4 = f - d; var r4f5 = f - e; var r4f6 = f - f; -var r4g1 = 0 /* a */ - a; //ok +var r4g1 = 0 /* a */ - a; //ok var r4g2 = 0 /* a */ - b; -var r4g3 = 0 /* a */ - c; //ok +var r4g3 = 0 /* a */ - c; //ok var r4g4 = 0 /* a */ - d; var r4g5 = 0 /* a */ - e; var r4g6 = 0 /* a */ - f; -var r4h1 = a - 1 /* b */; //ok +var r4h1 = a - 1 /* b */; //ok var r4h2 = b - 1 /* b */; -var r4h3 = c - 1 /* b */; //ok +var r4h3 = c - 1 /* b */; //ok var r4h4 = d - 1 /* b */; var r4h5 = e - 1 /* b */; var r4h6 = f - 1 /* b */; // operator << -var r5a1 = a << a; //ok +var r5a1 = a << a; //ok var r5a2 = a << b; -var r5a3 = a << c; //ok +var r5a3 = a << c; //ok var r5a4 = a << d; var r5a5 = a << e; var r5a6 = a << f; @@ -806,9 +806,9 @@ var r5b3 = b << c; var r5b4 = b << d; var r5b5 = b << e; var r5b6 = b << f; -var r5c1 = c << a; //ok +var r5c1 = c << a; //ok var r5c2 = c << b; -var r5c3 = c << c; //ok +var r5c3 = c << c; //ok var r5c4 = c << d; var r5c5 = c << e; var r5c6 = c << f; @@ -830,22 +830,22 @@ var r5f3 = f << c; var r5f4 = f << d; var r5f5 = f << e; var r5f6 = f << f; -var r5g1 = 0 /* a */ << a; //ok +var r5g1 = 0 /* a */ << a; //ok var r5g2 = 0 /* a */ << b; -var r5g3 = 0 /* a */ << c; //ok +var r5g3 = 0 /* a */ << c; //ok var r5g4 = 0 /* a */ << d; var r5g5 = 0 /* a */ << e; var r5g6 = 0 /* a */ << f; -var r5h1 = a << 1 /* b */; //ok +var r5h1 = a << 1 /* b */; //ok var r5h2 = b << 1 /* b */; -var r5h3 = c << 1 /* b */; //ok +var r5h3 = c << 1 /* b */; //ok var r5h4 = d << 1 /* b */; var r5h5 = e << 1 /* b */; var r5h6 = f << 1 /* b */; // operator >> -var r6a1 = a >> a; //ok +var r6a1 = a >> a; //ok var r6a2 = a >> b; -var r6a3 = a >> c; //ok +var r6a3 = a >> c; //ok var r6a4 = a >> d; var r6a5 = a >> e; var r6a6 = a >> f; @@ -855,9 +855,9 @@ var r6b3 = b >> c; var r6b4 = b >> d; var r6b5 = b >> e; var r6b6 = b >> f; -var r6c1 = c >> a; //ok +var r6c1 = c >> a; //ok var r6c2 = c >> b; -var r6c3 = c >> c; //ok +var r6c3 = c >> c; //ok var r6c4 = c >> d; var r6c5 = c >> e; var r6c6 = c >> f; @@ -879,22 +879,22 @@ var r6f3 = f >> c; var r6f4 = f >> d; var r6f5 = f >> e; var r6f6 = f >> f; -var r6g1 = 0 /* a */ >> a; //ok +var r6g1 = 0 /* a */ >> a; //ok var r6g2 = 0 /* a */ >> b; -var r6g3 = 0 /* a */ >> c; //ok +var r6g3 = 0 /* a */ >> c; //ok var r6g4 = 0 /* a */ >> d; var r6g5 = 0 /* a */ >> e; var r6g6 = 0 /* a */ >> f; -var r6h1 = a >> 1 /* b */; //ok +var r6h1 = a >> 1 /* b */; //ok var r6h2 = b >> 1 /* b */; -var r6h3 = c >> 1 /* b */; //ok +var r6h3 = c >> 1 /* b */; //ok var r6h4 = d >> 1 /* b */; var r6h5 = e >> 1 /* b */; var r6h6 = f >> 1 /* b */; // operator >>> -var r7a1 = a >>> a; //ok +var r7a1 = a >>> a; //ok var r7a2 = a >>> b; -var r7a3 = a >>> c; //ok +var r7a3 = a >>> c; //ok var r7a4 = a >>> d; var r7a5 = a >>> e; var r7a6 = a >>> f; @@ -904,9 +904,9 @@ var r7b3 = b >>> c; var r7b4 = b >>> d; var r7b5 = b >>> e; var r7b6 = b >>> f; -var r7c1 = c >>> a; //ok +var r7c1 = c >>> a; //ok var r7c2 = c >>> b; -var r7c3 = c >>> c; //ok +var r7c3 = c >>> c; //ok var r7c4 = c >>> d; var r7c5 = c >>> e; var r7c6 = c >>> f; @@ -928,22 +928,22 @@ var r7f3 = f >>> c; var r7f4 = f >>> d; var r7f5 = f >>> e; var r7f6 = f >>> f; -var r7g1 = 0 /* a */ >>> a; //ok +var r7g1 = 0 /* a */ >>> a; //ok var r7g2 = 0 /* a */ >>> b; -var r7g3 = 0 /* a */ >>> c; //ok +var r7g3 = 0 /* a */ >>> c; //ok var r7g4 = 0 /* a */ >>> d; var r7g5 = 0 /* a */ >>> e; var r7g6 = 0 /* a */ >>> f; -var r7h1 = a >>> 1 /* b */; //ok +var r7h1 = a >>> 1 /* b */; //ok var r7h2 = b >>> 1 /* b */; -var r7h3 = c >>> 1 /* b */; //ok +var r7h3 = c >>> 1 /* b */; //ok var r7h4 = d >>> 1 /* b */; var r7h5 = e >>> 1 /* b */; var r7h6 = f >>> 1 /* b */; // operator & -var r8a1 = a & a; //ok +var r8a1 = a & a; //ok var r8a2 = a & b; -var r8a3 = a & c; //ok +var r8a3 = a & c; //ok var r8a4 = a & d; var r8a5 = a & e; var r8a6 = a & f; @@ -953,9 +953,9 @@ var r8b3 = b & c; var r8b4 = b & d; var r8b5 = b & e; var r8b6 = b & f; -var r8c1 = c & a; //ok +var r8c1 = c & a; //ok var r8c2 = c & b; -var r8c3 = c & c; //ok +var r8c3 = c & c; //ok var r8c4 = c & d; var r8c5 = c & e; var r8c6 = c & f; @@ -977,22 +977,22 @@ var r8f3 = f & c; var r8f4 = f & d; var r8f5 = f & e; var r8f6 = f & f; -var r8g1 = 0 /* a */ & a; //ok +var r8g1 = 0 /* a */ & a; //ok var r8g2 = 0 /* a */ & b; -var r8g3 = 0 /* a */ & c; //ok +var r8g3 = 0 /* a */ & c; //ok var r8g4 = 0 /* a */ & d; var r8g5 = 0 /* a */ & e; var r8g6 = 0 /* a */ & f; -var r8h1 = a & 1 /* b */; //ok +var r8h1 = a & 1 /* b */; //ok var r8h2 = b & 1 /* b */; -var r8h3 = c & 1 /* b */; //ok +var r8h3 = c & 1 /* b */; //ok var r8h4 = d & 1 /* b */; var r8h5 = e & 1 /* b */; var r8h6 = f & 1 /* b */; // operator ^ -var r9a1 = a ^ a; //ok +var r9a1 = a ^ a; //ok var r9a2 = a ^ b; -var r9a3 = a ^ c; //ok +var r9a3 = a ^ c; //ok var r9a4 = a ^ d; var r9a5 = a ^ e; var r9a6 = a ^ f; @@ -1002,9 +1002,9 @@ var r9b3 = b ^ c; var r9b4 = b ^ d; var r9b5 = b ^ e; var r9b6 = b ^ f; -var r9c1 = c ^ a; //ok +var r9c1 = c ^ a; //ok var r9c2 = c ^ b; -var r9c3 = c ^ c; //ok +var r9c3 = c ^ c; //ok var r9c4 = c ^ d; var r9c5 = c ^ e; var r9c6 = c ^ f; @@ -1026,22 +1026,22 @@ var r9f3 = f ^ c; var r9f4 = f ^ d; var r9f5 = f ^ e; var r9f6 = f ^ f; -var r9g1 = 0 /* a */ ^ a; //ok +var r9g1 = 0 /* a */ ^ a; //ok var r9g2 = 0 /* a */ ^ b; -var r9g3 = 0 /* a */ ^ c; //ok +var r9g3 = 0 /* a */ ^ c; //ok var r9g4 = 0 /* a */ ^ d; var r9g5 = 0 /* a */ ^ e; var r9g6 = 0 /* a */ ^ f; -var r9h1 = a ^ 1 /* b */; //ok +var r9h1 = a ^ 1 /* b */; //ok var r9h2 = b ^ 1 /* b */; -var r9h3 = c ^ 1 /* b */; //ok +var r9h3 = c ^ 1 /* b */; //ok var r9h4 = d ^ 1 /* b */; var r9h5 = e ^ 1 /* b */; var r9h6 = f ^ 1 /* b */; // operator | -var r10a1 = a | a; //ok +var r10a1 = a | a; //ok var r10a2 = a | b; -var r10a3 = a | c; //ok +var r10a3 = a | c; //ok var r10a4 = a | d; var r10a5 = a | e; var r10a6 = a | f; @@ -1051,9 +1051,9 @@ var r10b3 = b | c; var r10b4 = b | d; var r10b5 = b | e; var r10b6 = b | f; -var r10c1 = c | a; //ok +var r10c1 = c | a; //ok var r10c2 = c | b; -var r10c3 = c | c; //ok +var r10c3 = c | c; //ok var r10c4 = c | d; var r10c5 = c | e; var r10c6 = c | f; @@ -1075,15 +1075,15 @@ var r10f3 = f | c; var r10f4 = f | d; var r10f5 = f | e; var r10f6 = f | f; -var r10g1 = 0 /* a */ | a; //ok +var r10g1 = 0 /* a */ | a; //ok var r10g2 = 0 /* a */ | b; -var r10g3 = 0 /* a */ | c; //ok +var r10g3 = 0 /* a */ | c; //ok var r10g4 = 0 /* a */ | d; var r10g5 = 0 /* a */ | e; var r10g6 = 0 /* a */ | f; -var r10h1 = a | 1 /* b */; //ok +var r10h1 = a | 1 /* b */; //ok var r10h2 = b | 1 /* b */; -var r10h3 = c | 1 /* b */; //ok +var r10h3 = c | 1 /* b */; //ok var r10h4 = d | 1 /* b */; var r10h5 = e | 1 /* b */; var r10h6 = f | 1 /* b */; diff --git a/tests/baselines/reference/arrayAssignmentTest1.js b/tests/baselines/reference/arrayAssignmentTest1.js index 11fbebf0c2f..1e385fb5132 100644 --- a/tests/baselines/reference/arrayAssignmentTest1.js +++ b/tests/baselines/reference/arrayAssignmentTest1.js @@ -149,10 +149,10 @@ var arr_i1_2 = []; var arr_c1_2 = []; var arr_c2_2 = []; var arr_c3 = []; -var i1_error = []; // should be an error - is -var c1_error = []; // should be an error - is -var c2_error = []; // should be an error - is -var c3_error = []; // should be an error - is +var i1_error = []; // should be an error - is +var c1_error = []; // should be an error - is +var c2_error = []; // should be an error - is +var c3_error = []; // should be an error - is arr_any = arr_i1; arr_any = arr_c1; arr_any = arr_c2; diff --git a/tests/baselines/reference/arrayAugment.js b/tests/baselines/reference/arrayAugment.js index c0f63e8041e..20cf510712a 100644 --- a/tests/baselines/reference/arrayAugment.js +++ b/tests/baselines/reference/arrayAugment.js @@ -11,4 +11,4 @@ var y: string[][]; // Expect no error here //// [arrayAugment.js] var x = ['']; var y = x.split(4); -var y; // Expect no error here +var y; // Expect no error here diff --git a/tests/baselines/reference/arrayLiteralAndArrayConstructorEquivalence1.js b/tests/baselines/reference/arrayLiteralAndArrayConstructorEquivalence1.js index fad4aeb35b2..0b9f543e382 100644 --- a/tests/baselines/reference/arrayLiteralAndArrayConstructorEquivalence1.js +++ b/tests/baselines/reference/arrayLiteralAndArrayConstructorEquivalence1.js @@ -16,7 +16,7 @@ myCars3 = myCars5; //// [arrayLiteralAndArrayConstructorEquivalence1.js] var myCars = new Array(); var myCars3 = new Array({}); -var myCars4; // error +var myCars4; // error var myCars5; myCars = myCars3; myCars = myCars4; diff --git a/tests/baselines/reference/arrayLiteralWidened.js b/tests/baselines/reference/arrayLiteralWidened.js index de5fc231eea..a250c47849d 100644 --- a/tests/baselines/reference/arrayLiteralWidened.js +++ b/tests/baselines/reference/arrayLiteralWidened.js @@ -16,11 +16,11 @@ var c = [[[null]],[undefined]] //// [arrayLiteralWidened.js] // array literals are widened upon assignment according to their element type -var a = []; // any[] +var a = []; // any[] var a = [null, null]; var a = [undefined, undefined]; -var b = [[], [null, null]]; // any[][] +var b = [[], [null, null]]; // any[][] var b = [[], []]; var b = [[undefined, undefined]]; -var c = [[[]]]; // any[][][] +var c = [[[]]]; // any[][][] var c = [[[null]], [undefined]]; diff --git a/tests/baselines/reference/arrayLiteralWithMultipleBestCommonTypes.js b/tests/baselines/reference/arrayLiteralWithMultipleBestCommonTypes.js index eb96cf94edd..b4f869d499e 100644 --- a/tests/baselines/reference/arrayLiteralWithMultipleBestCommonTypes.js +++ b/tests/baselines/reference/arrayLiteralWithMultipleBestCommonTypes.js @@ -20,10 +20,10 @@ var gs = [(b: { x: number; z?: number }) => 2, (a: { x: number; y?: number }) => var a; var b; var c; -var as = [a, b]; // { x: number; y?: number };[] -var bs = [b, a]; // { x: number; z?: number };[] -var cs = [a, b, c]; // { x: number; y?: number };[] -var ds = [function (x) { return 1; }, function (x) { return 2; }]; // { (x:Object) => number }[] -var es = [function (x) { return 2; }, function (x) { return 1; }]; // { (x:string) => number }[] -var fs = [function (a) { return 1; }, function (b) { return 2; }]; // (a: { x: number; y?: number }) => number[] -var gs = [function (b) { return 2; }, function (a) { return 1; }]; // (b: { x: number; z?: number }) => number[] +var as = [a, b]; // { x: number; y?: number };[] +var bs = [b, a]; // { x: number; z?: number };[] +var cs = [a, b, c]; // { x: number; y?: number };[] +var ds = [function (x) { return 1; }, function (x) { return 2; }]; // { (x:Object) => number }[] +var es = [function (x) { return 2; }, function (x) { return 1; }]; // { (x:string) => number }[] +var fs = [function (a) { return 1; }, function (b) { return 2; }]; // (a: { x: number; y?: number }) => number[] +var gs = [function (b) { return 2; }, function (a) { return 1; }]; // (b: { x: number; z?: number }) => number[] diff --git a/tests/baselines/reference/arrayLiterals.js b/tests/baselines/reference/arrayLiterals.js index 80a44e7725b..61d801e8eb9 100644 --- a/tests/baselines/reference/arrayLiterals.js +++ b/tests/baselines/reference/arrayLiterals.js @@ -53,9 +53,9 @@ var __extends = this.__extends || function (d, b) { }; // Empty array literal with no contextual type has type Undefined[] var arr1 = [[], [1], ['']]; -var arr1; // Bug 825172: Error ({}[] does not match {}[]), but should be OK +var arr1; // Bug 825172: Error ({}[] does not match {}[]), but should be OK var arr2 = [[null], [1], ['']]; -var arr2; // Bug 825172: Error ({}[] does not match {}[]), but should be OK +var arr2; // Bug 825172: Error ({}[] does not match {}[]), but should be OK // Array literal with elements of only EveryType E has type E[] var stringArrArr = [[''], [""]]; var stringArrArr; @@ -71,13 +71,13 @@ var C = (function () { return C; })(); var classArr = [new C(), new C()]; -var classArr; // Should be OK +var classArr; // Should be OK var classTypeArray = [C, C, C]; -var classTypeArray; // Should OK, not be a parse error +var classTypeArray; // Should OK, not be a parse error // Contextual type C with numeric index signature makes array literal of EveryType E of type BCT(E,C)[] var context1 = [{ a: '', b: 0, c: '' }, { a: "", b: 3, c: 0 }]; var context2 = [{ a: '', b: 0, c: '' }, { a: "", b: 3, c: 0 }]; -var context2; // Should be OK +var context2; // Should be OK // Contextual type C with numeric index signature of type Base makes array literal of Derived have type Base[] var Base = (function () { function Base() { diff --git a/tests/baselines/reference/arrayLiteralsWithRecursiveGenerics.js b/tests/baselines/reference/arrayLiteralsWithRecursiveGenerics.js index 0dbe90f5c3b..4c4626bb073 100644 --- a/tests/baselines/reference/arrayLiteralsWithRecursiveGenerics.js +++ b/tests/baselines/reference/arrayLiteralsWithRecursiveGenerics.js @@ -52,8 +52,8 @@ var MyList = (function () { var list; var list2; var myList; -var xs = [list, myList]; // {}[] -var ys = [list, list2]; // {}[] -var zs = [list, null]; // List[] +var xs = [list, myList]; // {}[] +var ys = [list, list2]; // {}[] +var zs = [list, null]; // List[] var myDerivedList; var as = [list, myDerivedList]; // List[] diff --git a/tests/baselines/reference/arrayOfFunctionTypes3.js b/tests/baselines/reference/arrayOfFunctionTypes3.js index 91d4b9d201f..126660b70a8 100644 --- a/tests/baselines/reference/arrayOfFunctionTypes3.js +++ b/tests/baselines/reference/arrayOfFunctionTypes3.js @@ -43,7 +43,7 @@ var b; var c; var z = [a, b, c]; var r4 = z[0]; -var r5 = r4(''); // any not string +var r5 = r4(''); // any not string var r5b = r4(1); var a2; var b2; diff --git a/tests/baselines/reference/arrayTypeOfFunctionTypes.js b/tests/baselines/reference/arrayTypeOfFunctionTypes.js index c437ddf3dea..b2bdf018bdf 100644 --- a/tests/baselines/reference/arrayTypeOfFunctionTypes.js +++ b/tests/baselines/reference/arrayTypeOfFunctionTypes.js @@ -25,7 +25,7 @@ var r2b = new r(); var x2; var r3 = x2[1]; var r4 = r3(); -var r4b = new r3(); // error +var r4b = new r3(); // error var x3; var r5 = x2[1]; var r6 = r5(); diff --git a/tests/baselines/reference/arrowFunctionContexts.js b/tests/baselines/reference/arrowFunctionContexts.js index 8ed1e83778b..3972bc6fcf9 100644 --- a/tests/baselines/reference/arrowFunctionContexts.js +++ b/tests/baselines/reference/arrowFunctionContexts.js @@ -123,14 +123,14 @@ var Derived = (function (_super) { window.setTimeout(function () { return null; }, 100); // Arrow function as value in array literal var obj = function (n) { return ''; }; -var obj; // OK +var obj; // OK var arr = [function (n) { return ''; }]; -var arr; // Incorrect error here (bug 829597) +var arr; // Incorrect error here (bug 829597) // Arrow function as enum value var E; (function (E) { E[E["x"] = function () { return 4; }] = "x"; - E[E["y"] = (function () { return _this; }).length] = "y"; // error, can't use this in enum + E[E["y"] = (function () { return _this; }).length] = "y"; // error, can't use this in enum })(E || (E = {})); // Arrow function as module variable initializer var M; @@ -161,9 +161,9 @@ var M2; window.setTimeout(function () { return null; }, 100); // Arrow function as value in array literal var obj = function (n) { return ''; }; - var obj; // OK + var obj; // OK var arr = [function (n) { return ''; }]; - var arr; // Incorrect error here (bug 829597) + var arr; // Incorrect error here (bug 829597) // Arrow function as enum value var E; (function (E) { @@ -179,7 +179,7 @@ var M2; })(M2 || (M2 = {})); // (ParamList) => { ... } is a generic arrow function var generic1 = function (n) { return [n]; }; -var generic1; // Incorrect error, Bug 829597 +var generic1; // Incorrect error, Bug 829597 var generic2 = function (n) { return [n]; }; diff --git a/tests/baselines/reference/arrowFunctionInConstructorArgument1.js b/tests/baselines/reference/arrowFunctionInConstructorArgument1.js index b28a11cea0c..3cfc18d2cf7 100644 --- a/tests/baselines/reference/arrowFunctionInConstructorArgument1.js +++ b/tests/baselines/reference/arrowFunctionInConstructorArgument1.js @@ -13,4 +13,4 @@ var C = (function () { })(); var c = new C(function () { return asdf; -}); // should error +}); // should error diff --git a/tests/baselines/reference/assignmentCompatBug2.js b/tests/baselines/reference/assignmentCompatBug2.js index 682d850a7a6..b3fee0da4c8 100644 --- a/tests/baselines/reference/assignmentCompatBug2.js +++ b/tests/baselines/reference/assignmentCompatBug2.js @@ -39,7 +39,7 @@ b3 = { }; // error //// [assignmentCompatBug2.js] -var b2 = { a: 0 }; // error +var b2 = { a: 0 }; // error b2 = { a: 0 }; b2 = { b: 0, a: 0 }; var b3; diff --git a/tests/baselines/reference/assignmentCompatWithCallSignatures3.js b/tests/baselines/reference/assignmentCompatWithCallSignatures3.js index 314db923a8f..447e3706c02 100644 --- a/tests/baselines/reference/assignmentCompatWithCallSignatures3.js +++ b/tests/baselines/reference/assignmentCompatWithCallSignatures3.js @@ -199,7 +199,7 @@ b15 = a15; var b16; a16 = b16; b16 = a16; -var b17; // ok +var b17; // ok a17 = b17; b17 = a17; var b18; diff --git a/tests/baselines/reference/assignmentCompatWithCallSignaturesWithRestParameters.js b/tests/baselines/reference/assignmentCompatWithCallSignaturesWithRestParameters.js index 99323c09a0d..eea78af20e2 100644 --- a/tests/baselines/reference/assignmentCompatWithCallSignaturesWithRestParameters.js +++ b/tests/baselines/reference/assignmentCompatWithCallSignaturesWithRestParameters.js @@ -46,7 +46,7 @@ var a4: (x?: number, y?: string, ...z: number[]) => number; a4 = (x: number, ...args: string[]) => 1; // error, rest params have type mismatch //// [assignmentCompatWithCallSignaturesWithRestParameters.js] -var a; // ok, same number of required params +var a; // ok, same number of required params a = function () { return 1; }; a = function () { var args = []; diff --git a/tests/baselines/reference/assignmentCompatWithConstructSignatures3.js b/tests/baselines/reference/assignmentCompatWithConstructSignatures3.js index b18d3983558..98ca559989e 100644 --- a/tests/baselines/reference/assignmentCompatWithConstructSignatures3.js +++ b/tests/baselines/reference/assignmentCompatWithConstructSignatures3.js @@ -199,7 +199,7 @@ b15 = a15; var b16; a16 = b16; b16 = a16; -var b17; // ok +var b17; // ok a17 = b17; b17 = a17; var b18; diff --git a/tests/baselines/reference/assignmentToObject.js b/tests/baselines/reference/assignmentToObject.js index 06a0f9cee74..d8134080c6a 100644 --- a/tests/baselines/reference/assignmentToObject.js +++ b/tests/baselines/reference/assignmentToObject.js @@ -6,5 +6,5 @@ var c: Object = a; // should be error //// [assignmentToObject.js] var a = { toString: 5 }; -var b = a; // ok -var c = a; // should be error +var b = a; // ok +var c = a; // should be error diff --git a/tests/baselines/reference/assignmentToObjectAndFunction.js b/tests/baselines/reference/assignmentToObjectAndFunction.js index f08bba038b2..c6994abb3ab 100644 --- a/tests/baselines/reference/assignmentToObjectAndFunction.js +++ b/tests/baselines/reference/assignmentToObjectAndFunction.js @@ -30,20 +30,20 @@ module bad { var badFundule: Function = bad; // error //// [assignmentToObjectAndFunction.js] -var errObj = { toString: 0 }; // Error, incompatible toString +var errObj = { toString: 0 }; // Error, incompatible toString var goodObj = { toString: function (x) { return ""; } -}; // Ok, because toString is a subtype of Object's toString -var errFun = {}; // Error for no call signature +}; // Ok, because toString is a subtype of Object's toString +var errFun = {}; // Error for no call signature function foo() { } var foo; (function (foo) { foo.boom = 0; })(foo || (foo = {})); -var goodFundule = foo; // ok +var goodFundule = foo; // ok function bar() { } var bar; @@ -52,7 +52,7 @@ var bar; } bar.apply = apply; })(bar || (bar = {})); -var goodFundule2 = bar; // ok +var goodFundule2 = bar; // ok function bad() { } var bad; diff --git a/tests/baselines/reference/augmentedTypeAssignmentCompatIndexSignature.js b/tests/baselines/reference/augmentedTypeAssignmentCompatIndexSignature.js index 97fcf65f5b2..bb4bc81e0d9 100644 --- a/tests/baselines/reference/augmentedTypeAssignmentCompatIndexSignature.js +++ b/tests/baselines/reference/augmentedTypeAssignmentCompatIndexSignature.js @@ -25,5 +25,5 @@ var v2: { var o = {}; var f = function () { }; -var v1 = o; // Should be allowed +var v1 = o; // Should be allowed var v2 = f; // Should be allowed diff --git a/tests/baselines/reference/augmentedTypeBracketAccessIndexSignature.js b/tests/baselines/reference/augmentedTypeBracketAccessIndexSignature.js index b1a46cf8c90..79543b2de3e 100644 --- a/tests/baselines/reference/augmentedTypeBracketAccessIndexSignature.js +++ b/tests/baselines/reference/augmentedTypeBracketAccessIndexSignature.js @@ -14,6 +14,6 @@ var a = {}[0]; // Should be Foo var b = (() => { })[0]; // Should be Bar //// [augmentedTypeBracketAccessIndexSignature.js] -var a = {}[0]; // Should be Foo +var a = {}[0]; // Should be Foo var b = (function () { })[0]; // Should be Bar diff --git a/tests/baselines/reference/augmentedTypeBracketNamedPropertyAccess.js b/tests/baselines/reference/augmentedTypeBracketNamedPropertyAccess.js index 24e383d385f..cd78ec26191 100644 --- a/tests/baselines/reference/augmentedTypeBracketNamedPropertyAccess.js +++ b/tests/baselines/reference/augmentedTypeBracketNamedPropertyAccess.js @@ -17,7 +17,7 @@ var r4 = f['data']; // Should be number var o = {}; var f = function () { }; -var r1 = o['data']; // Should be number -var r2 = o['functionData']; // Should be any (no property found) -var r3 = f['functionData']; // Should be string +var r1 = o['data']; // Should be number +var r2 = o['functionData']; // Should be any (no property found) +var r3 = f['functionData']; // Should be string var r4 = f['data']; // Should be number diff --git a/tests/baselines/reference/augmentedTypesClass.js b/tests/baselines/reference/augmentedTypesClass.js index 34581318c82..2be1ff0bcbb 100644 --- a/tests/baselines/reference/augmentedTypesClass.js +++ b/tests/baselines/reference/augmentedTypesClass.js @@ -16,7 +16,7 @@ var c1 = (function () { }; return c1; })(); -var c1 = 1; // error +var c1 = 1; // error //// class then enum var c4 = (function () { function c4() { diff --git a/tests/baselines/reference/augmentedTypesClass2a.js b/tests/baselines/reference/augmentedTypesClass2a.js index 47b7a022cfd..cca45c2c0b3 100644 --- a/tests/baselines/reference/augmentedTypesClass2a.js +++ b/tests/baselines/reference/augmentedTypesClass2a.js @@ -14,6 +14,6 @@ var c2 = (function () { return c2; })(); function c2() { -} // error +} // error var c2 = function () { }; diff --git a/tests/baselines/reference/augmentedTypesClass3.js b/tests/baselines/reference/augmentedTypesClass3.js index ab5a845e327..dd0da2a1646 100644 --- a/tests/baselines/reference/augmentedTypesClass3.js +++ b/tests/baselines/reference/augmentedTypesClass3.js @@ -32,7 +32,7 @@ var c5a = (function () { var c5a; (function (c5a) { var y = 2; -})(c5a || (c5a = {})); // should be ok +})(c5a || (c5a = {})); // should be ok var c5b = (function () { function c5b() { } @@ -43,7 +43,7 @@ var c5b = (function () { var c5b; (function (c5b) { c5b.y = 2; -})(c5b || (c5b = {})); // should be ok +})(c5b || (c5b = {})); // should be ok //// class then import var c5c = (function () { function c5c() { diff --git a/tests/baselines/reference/augmentedTypesClass4.js b/tests/baselines/reference/augmentedTypesClass4.js index 22a3be5dc6f..c4e104e714b 100644 --- a/tests/baselines/reference/augmentedTypesClass4.js +++ b/tests/baselines/reference/augmentedTypesClass4.js @@ -19,4 +19,4 @@ var c3 = (function () { c3.prototype.bar = function () { }; return c3; -})(); // error +})(); // error diff --git a/tests/baselines/reference/augmentedTypesEnum.js b/tests/baselines/reference/augmentedTypesEnum.js index 2cab86acb46..8422b99798b 100644 --- a/tests/baselines/reference/augmentedTypesEnum.js +++ b/tests/baselines/reference/augmentedTypesEnum.js @@ -41,20 +41,20 @@ var e1111; (function (e1111) { e1111[e1111["One"] = 0] = "One"; })(e1111 || (e1111 = {})); -var e1111 = 1; // error +var e1111 = 1; // error // enum then function var e2; (function (e2) { e2[e2["One"] = 0] = "One"; })(e2 || (e2 = {})); function e2() { -} // error +} // error var e3; (function (e3) { e3[e3["One"] = 0] = "One"; })(e3 || (e3 = {})); var e3 = function () { -}; // error +}; // error // enum then class var e4; (function (e4) { @@ -66,7 +66,7 @@ var e4 = (function () { e4.prototype.foo = function () { }; return e4; -})(); // error +})(); // error // enum then enum var e5; (function (e5) { @@ -83,7 +83,7 @@ var e5a; var e5a; (function (e5a) { e5a[e5a["One"] = 0] = "One"; -})(e5a || (e5a = {})); // error +})(e5a || (e5a = {})); // error // enum then internal module var e6; (function (e6) { @@ -96,7 +96,7 @@ var e6a; var e6a; (function (e6a) { var y = 2; -})(e6a || (e6a = {})); // should be error +})(e6a || (e6a = {})); // should be error var e6b; (function (e6b) { e6b[e6b["One"] = 0] = "One"; @@ -104,4 +104,4 @@ var e6b; var e6b; (function (e6b) { e6b.y = 2; -})(e6b || (e6b = {})); // should be error +})(e6b || (e6b = {})); // should be error diff --git a/tests/baselines/reference/augmentedTypesFunction.js b/tests/baselines/reference/augmentedTypesFunction.js index 7a713455093..097482c7c5b 100644 --- a/tests/baselines/reference/augmentedTypesFunction.js +++ b/tests/baselines/reference/augmentedTypesFunction.js @@ -42,16 +42,16 @@ module y5c { export interface I { foo(): void } } // should be an error // function then var function y1() { } -var y1 = 1; // error +var y1 = 1; // error // function then function function y2() { } function y2() { -} // error +} // error function y2a() { } var y2a = function () { -}; // error +}; // error // function then class function y3() { } @@ -59,7 +59,7 @@ var y3 = (function () { function y3() { } return y3; -})(); // error +})(); // error function y3a() { } var y3a = (function () { @@ -68,14 +68,14 @@ var y3a = (function () { y3a.prototype.foo = function () { }; return y3a; -})(); // error +})(); // error // function then enum function y4() { } var y4; (function (y4) { y4[y4["One"] = 0] = "One"; -})(y4 || (y4 = {})); // error +})(y4 || (y4 = {})); // error // function then internal module function y5() { } @@ -84,12 +84,12 @@ function y5a() { var y5a; (function (y5a) { var y = 2; -})(y5a || (y5a = {})); // should be an error +})(y5a || (y5a = {})); // should be an error function y5b() { } var y5b; (function (y5b) { y5b.y = 3; -})(y5b || (y5b = {})); // should be an error +})(y5b || (y5b = {})); // should be an error function y5c() { } diff --git a/tests/baselines/reference/augmentedTypesModules.js b/tests/baselines/reference/augmentedTypesModules.js index 6bd2bef25dd..5085b1cbda3 100644 --- a/tests/baselines/reference/augmentedTypesModules.js +++ b/tests/baselines/reference/augmentedTypesModules.js @@ -98,7 +98,7 @@ module m6 { export var y = 2; } //// [augmentedTypesModules.js] -var m1 = 1; // Should be allowed +var m1 = 1; // Should be allowed var m1a; (function (m1a) { var y = 2; @@ -109,7 +109,7 @@ var m1b; m1b.y = 2; })(m1b || (m1b = {})); var m1b = 1; -var m1c = 1; // Should be allowed +var m1c = 1; // Should be allowed var m1d; (function (m1d) { var I = (function () { @@ -121,7 +121,7 @@ var m1d; })(); m1d.I = I; })(m1d || (m1d = {})); -var m1d = 1; // error +var m1d = 1; // error function m2() { } ; @@ -168,7 +168,7 @@ var m3 = (function () { function m3() { } return m3; -})(); // ok since the module is not instantiated +})(); // ok since the module is not instantiated var m3a; (function (m3a) { var y = 2; @@ -179,7 +179,7 @@ var m3a = (function () { m3a.prototype.foo = function () { }; return m3a; -})(); // error, class isn't ambient or declared before the module +})(); // error, class isn't ambient or declared before the module var m3b = (function () { function m3b() { } diff --git a/tests/baselines/reference/augmentedTypesModules3.js b/tests/baselines/reference/augmentedTypesModules3.js index 3cf5a3e1ec8..bf5b88e5611 100644 --- a/tests/baselines/reference/augmentedTypesModules3.js +++ b/tests/baselines/reference/augmentedTypesModules3.js @@ -11,7 +11,7 @@ var m3 = (function () { function m3() { } return m3; -})(); // ok since the module is not instantiated +})(); // ok since the module is not instantiated var m3a; (function (m3a) { var y = 2; diff --git a/tests/baselines/reference/augmentedTypesVar.js b/tests/baselines/reference/augmentedTypesVar.js index 2d936180a17..ca50b8ab9a9 100644 --- a/tests/baselines/reference/augmentedTypesVar.js +++ b/tests/baselines/reference/augmentedTypesVar.js @@ -43,17 +43,17 @@ var x1 = 2; // var then function var x2 = 1; function x2() { -} // should be an error +} // should be an error var x3 = 1; var x3 = function () { -}; // should be an error +}; // should be an error // var then class var x4 = 1; var x4 = (function () { function x4() { } return x4; -})(); // error +})(); // error var x4a = 1; var x4a = (function () { function x4a() { @@ -61,22 +61,22 @@ var x4a = (function () { x4a.prototype.foo = function () { }; return x4a; -})(); // error +})(); // error // var then enum var x5 = 1; var x5; (function (x5) { x5[x5["One"] = 0] = "One"; -})(x5 || (x5 = {})); // error +})(x5 || (x5 = {})); // error // var then module var x6 = 1; var x6a = 1; var x6a; (function (x6a) { var y = 2; -})(x6a || (x6a = {})); // error since instantiated +})(x6a || (x6a = {})); // error since instantiated var x6b = 1; var x6b; (function (x6b) { x6b.y = 2; -})(x6b || (x6b = {})); // error +})(x6b || (x6b = {})); // error diff --git a/tests/baselines/reference/autonumberingInEnums.js b/tests/baselines/reference/autonumberingInEnums.js index 0d72f900bc9..e6bf29bda8f 100644 --- a/tests/baselines/reference/autonumberingInEnums.js +++ b/tests/baselines/reference/autonumberingInEnums.js @@ -14,5 +14,5 @@ var Foo; })(Foo || (Foo = {})); var Foo; (function (Foo) { - Foo[Foo["b"] = 0] = "b"; // should work fine + Foo[Foo["b"] = 0] = "b"; // should work fine })(Foo || (Foo = {})); diff --git a/tests/baselines/reference/avoid.js b/tests/baselines/reference/avoid.js index 27bd1697d18..8bfc3e24215 100644 --- a/tests/baselines/reference/avoid.js +++ b/tests/baselines/reference/avoid.js @@ -23,8 +23,8 @@ var N=new f(); // ok with void fn function f() { var x = 1; } -var y = f(); // error void fn -var why = f(); // error void fn +var y = f(); // error void fn +var why = f(); // error void fn var w; w = f(); var C = (function () { @@ -34,5 +34,5 @@ var C = (function () { }; return C; })(); -var z = new C().g(); // error void fn -var N = new f(); // ok with void fn +var z = new C().g(); // error void fn +var N = new f(); // ok with void fn diff --git a/tests/baselines/reference/baseCheck.js b/tests/baselines/reference/baseCheck.js index 1681e571734..2ebefcbade2 100644 --- a/tests/baselines/reference/baseCheck.js +++ b/tests/baselines/reference/baseCheck.js @@ -65,7 +65,7 @@ var D = (function (_super) { this.z = z; } return D; -})(C); // too few params +})(C); // too few params var E = (function (_super) { __extends(E, _super); function E(z) { @@ -81,7 +81,7 @@ var F = (function (_super) { this.z = z; } return F; -})(C); // first param type +})(C); // first param type function f() { if (x < 10) { x = 11; diff --git a/tests/baselines/reference/bestCommonTypeOfConditionalExpressions.js b/tests/baselines/reference/bestCommonTypeOfConditionalExpressions.js index 8d31161b55b..4780a84303e 100644 --- a/tests/baselines/reference/bestCommonTypeOfConditionalExpressions.js +++ b/tests/baselines/reference/bestCommonTypeOfConditionalExpressions.js @@ -61,18 +61,18 @@ var derived; var derived2; var r = true ? 1 : 2; var r3 = true ? 1 : {}; -var r4 = true ? a : b; // typeof a -var r5 = true ? b : a; // typeof b +var r4 = true ? a : b; // typeof a +var r5 = true ? b : a; // typeof b var r6 = true ? function (x) { } : function (x) { -}; // returns number => void +}; // returns number => void var r7 = true ? function (x) { } : function (x) { }; var r8 = true ? function (x) { } : function (x) { -}; // returns Object => void -var r10 = true ? derived : derived2; // no error since we use the contextual type in BCT +}; // returns Object => void +var r10 = true ? derived : derived2; // no error since we use the contextual type in BCT var r11 = true ? base : derived2; function foo5(t, u) { return true ? t : u; diff --git a/tests/baselines/reference/bestCommonTypeWithContextualTyping.js b/tests/baselines/reference/bestCommonTypeWithContextualTyping.js index da24ca0be56..907599cf568 100644 --- a/tests/baselines/reference/bestCommonTypeWithContextualTyping.js +++ b/tests/baselines/reference/bestCommonTypeWithContextualTyping.js @@ -25,7 +25,7 @@ var e; // All of these should pass. Neither type is a supertype of the other, but the RHS should // always use Ellement in these examples (not Contextual). Because Ellement is assignable // to Contextual, no errors. -var arr = [e]; // Ellement[] -var obj = { s: e }; // { s: Ellement; [s: string]: Ellement } -var conditional = null ? e : e; // Ellement +var arr = [e]; // Ellement[] +var obj = { s: e }; // { s: Ellement; [s: string]: Ellement } +var conditional = null ? e : e; // Ellement var contextualOr = e || e; // Ellement diff --git a/tests/baselines/reference/bind1.js b/tests/baselines/reference/bind1.js index b8fb9f341db..5027e8a03e0 100644 --- a/tests/baselines/reference/bind1.js +++ b/tests/baselines/reference/bind1.js @@ -13,5 +13,5 @@ var M; } return C; })(); - M.C = C; // this should be an unresolved symbol I error + M.C = C; // this should be an unresolved symbol I error })(M || (M = {})); diff --git a/tests/baselines/reference/callOnInstance.js b/tests/baselines/reference/callOnInstance.js index 1732c430e62..d6f0db57f75 100644 --- a/tests/baselines/reference/callOnInstance.js +++ b/tests/baselines/reference/callOnInstance.js @@ -11,6 +11,6 @@ declare class C { constructor(value: number); } (new C(1))(); // Error for calling an instance //// [callOnInstance.js] -var s1 = D(); // OK +var s1 = D(); // OK var s2 = (new D(1))(); (new C(1))(); diff --git a/tests/baselines/reference/callOverloads2.js b/tests/baselines/reference/callOverloads2.js index c25026fd1a4..f152bde71aa 100644 --- a/tests/baselines/reference/callOverloads2.js +++ b/tests/baselines/reference/callOverloads2.js @@ -38,7 +38,7 @@ function F1(s) { } function F1(a) { return a; -} // error - duplicate identifier +} // error - duplicate identifier var f1 = new Foo("hey"); f1.bar1(); Foo(); diff --git a/tests/baselines/reference/callSignatureWithoutAnnotationsOrBody.js b/tests/baselines/reference/callSignatureWithoutAnnotationsOrBody.js index 14084c98fde..6daa62f83a8 100644 --- a/tests/baselines/reference/callSignatureWithoutAnnotationsOrBody.js +++ b/tests/baselines/reference/callSignatureWithoutAnnotationsOrBody.js @@ -23,7 +23,7 @@ var r5 = a.f(); // Call signatures without a return type annotation and function body return 'any' function foo(x) { } -var r = foo(1); // void since there's a body +var r = foo(1); // void since there's a body var i; var r2 = i(); var r3 = i.f(); diff --git a/tests/baselines/reference/callSignaturesThatDifferOnlyByReturnType2.js b/tests/baselines/reference/callSignaturesThatDifferOnlyByReturnType2.js index f28aabc7172..8e87d75eaaf 100644 --- a/tests/baselines/reference/callSignaturesThatDifferOnlyByReturnType2.js +++ b/tests/baselines/reference/callSignaturesThatDifferOnlyByReturnType2.js @@ -17,5 +17,5 @@ var r2 = x.foo(''); // error //// [callSignaturesThatDifferOnlyByReturnType2.js] var x; // BUG 822524 -var r = x.foo(1); // no error -var r2 = x.foo(''); // error +var r = x.foo(1); // no error +var r2 = x.foo(''); // error diff --git a/tests/baselines/reference/callbacksDontShareTypes.js b/tests/baselines/reference/callbacksDontShareTypes.js index 2d9594e331c..649ed1cb6ca 100644 --- a/tests/baselines/reference/callbacksDontShareTypes.js +++ b/tests/baselines/reference/callbacksDontShareTypes.js @@ -27,7 +27,7 @@ var rf1 = function (x) { var r1a = _.map(c2, function (x) { return x.toFixed(); }); -var r1b = _.map(c2, rf1); // this line should not cause the following 2 to have errors +var r1b = _.map(c2, rf1); // this line should not cause the following 2 to have errors var r5a = _.map(c2, function (x) { return x.toFixed(); }); diff --git a/tests/baselines/reference/classAndVariableWithSameName.js b/tests/baselines/reference/classAndVariableWithSameName.js index 6ceb53ce52d..ab17905d5b2 100644 --- a/tests/baselines/reference/classAndVariableWithSameName.js +++ b/tests/baselines/reference/classAndVariableWithSameName.js @@ -16,7 +16,7 @@ var C = (function () { } return C; })(); -var C = ''; // error +var C = ''; // error var M; (function (M) { var D = (function () { @@ -24,5 +24,5 @@ var M; } return D; })(); - var D = 1; // error + var D = 1; // error })(M || (M = {})); diff --git a/tests/baselines/reference/classExtendsItself.js b/tests/baselines/reference/classExtendsItself.js index 848bc0b9b0d..b91eacae694 100644 --- a/tests/baselines/reference/classExtendsItself.js +++ b/tests/baselines/reference/classExtendsItself.js @@ -18,14 +18,14 @@ var C = (function (_super) { _super.apply(this, arguments); } return C; -})(C); // error +})(C); // error var D = (function (_super) { __extends(D, _super); function D() { _super.apply(this, arguments); } return D; -})(D); // error +})(D); // error var E = (function (_super) { __extends(E, _super); function E() { diff --git a/tests/baselines/reference/classExtendsItselfIndirectly.js b/tests/baselines/reference/classExtendsItselfIndirectly.js index b0cd0326b5b..11b697cff6b 100644 --- a/tests/baselines/reference/classExtendsItselfIndirectly.js +++ b/tests/baselines/reference/classExtendsItselfIndirectly.js @@ -24,7 +24,7 @@ var C = (function (_super) { _super.apply(this, arguments); } return C; -})(E); // error +})(E); // error var D = (function (_super) { __extends(D, _super); function D() { @@ -45,7 +45,7 @@ var C2 = (function (_super) { _super.apply(this, arguments); } return C2; -})(E2); // error +})(E2); // error var D2 = (function (_super) { __extends(D2, _super); function D2() { diff --git a/tests/baselines/reference/classExtendsItselfIndirectly2.js b/tests/baselines/reference/classExtendsItselfIndirectly2.js index 136eb9d9684..129b2f51b36 100644 --- a/tests/baselines/reference/classExtendsItselfIndirectly2.js +++ b/tests/baselines/reference/classExtendsItselfIndirectly2.js @@ -35,7 +35,7 @@ var C = (function (_super) { _super.apply(this, arguments); } return C; -})(N.E); // error +})(N.E); // error var M; (function (M) { var D = (function (_super) { @@ -66,7 +66,7 @@ var O; _super.apply(this, arguments); } return C2; - })(Q.E2); // error + })(Q.E2); // error var P; (function (P) { var D2 = (function (_super) { diff --git a/tests/baselines/reference/classExtendsItselfIndirectly3.js b/tests/baselines/reference/classExtendsItselfIndirectly3.js index b582f28a7a0..679525a40a6 100644 --- a/tests/baselines/reference/classExtendsItselfIndirectly3.js +++ b/tests/baselines/reference/classExtendsItselfIndirectly3.js @@ -31,7 +31,7 @@ var C = (function (_super) { _super.apply(this, arguments); } return C; -})(E); // error +})(E); // error //// [classExtendsItselfIndirectly_file2.js] var __extends = this.__extends || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; @@ -73,7 +73,7 @@ var C2 = (function (_super) { _super.apply(this, arguments); } return C2; -})(E2); // error +})(E2); // error //// [classExtendsItselfIndirectly_file5.js] var __extends = this.__extends || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; diff --git a/tests/baselines/reference/classExtendsValidConstructorFunction.js b/tests/baselines/reference/classExtendsValidConstructorFunction.js index d1da02ad1c1..a2d73f2e605 100644 --- a/tests/baselines/reference/classExtendsValidConstructorFunction.js +++ b/tests/baselines/reference/classExtendsValidConstructorFunction.js @@ -14,7 +14,7 @@ var __extends = this.__extends || function (d, b) { }; function foo() { } -var x = new foo(); // can be used as a constructor function +var x = new foo(); // can be used as a constructor function var C = (function (_super) { __extends(C, _super); function C() { diff --git a/tests/baselines/reference/classImplementsClass2.js b/tests/baselines/reference/classImplementsClass2.js index 59d9f0a7179..98554944bc9 100644 --- a/tests/baselines/reference/classImplementsClass2.js +++ b/tests/baselines/reference/classImplementsClass2.js @@ -32,7 +32,7 @@ var C = (function () { function C() { } return C; -})(); // error +})(); // error var C2 = (function (_super) { __extends(C2, _super); function C2() { diff --git a/tests/baselines/reference/classMemberInitializerScoping.js b/tests/baselines/reference/classMemberInitializerScoping.js index 248e7d9194a..14ed74708be 100644 --- a/tests/baselines/reference/classMemberInitializerScoping.js +++ b/tests/baselines/reference/classMemberInitializerScoping.js @@ -27,7 +27,7 @@ var CCC = (function () { this.y = aaa; this.y = ''; } - CCC.staticY = aaa; // This shouldnt be error + CCC.staticY = aaa; // This shouldnt be error return CCC; })(); // above is equivalent to this: diff --git a/tests/baselines/reference/classSideInheritance3.js b/tests/baselines/reference/classSideInheritance3.js index 7efdf9e73f8..5737ba1380c 100644 --- a/tests/baselines/reference/classSideInheritance3.js +++ b/tests/baselines/reference/classSideInheritance3.js @@ -46,6 +46,6 @@ var C = (function (_super) { } return C; })(A); -var r1 = B; // error -var r2 = B; // error +var r1 = B; // error +var r2 = B; // error var r3 = C; // ok diff --git a/tests/baselines/reference/classWithBaseClassButNoConstructor.js b/tests/baselines/reference/classWithBaseClassButNoConstructor.js index 6bd0a1ac81f..2d625ac276c 100644 --- a/tests/baselines/reference/classWithBaseClassButNoConstructor.js +++ b/tests/baselines/reference/classWithBaseClassButNoConstructor.js @@ -60,8 +60,8 @@ var C = (function (_super) { return C; })(Base); var r = C; -var c = new C(); // error -var c2 = new C(1); // ok +var c = new C(); // error +var c2 = new C(1); // ok var Base2 = (function () { function Base2(x) { } @@ -75,8 +75,8 @@ var D = (function (_super) { return D; })(Base2); var r2 = D; -var d = new D(); // error -var d2 = new D(1); // ok +var d = new D(); // error +var d2 = new D(1); // ok // specialized base class var D2 = (function (_super) { __extends(D2, _super); @@ -86,8 +86,8 @@ var D2 = (function (_super) { return D2; })(Base2); var r3 = D2; -var d3 = new D(); // error -var d4 = new D(1); // ok +var d3 = new D(); // error +var d4 = new D(1); // ok var D3 = (function (_super) { __extends(D3, _super); function D3() { @@ -96,5 +96,5 @@ var D3 = (function (_super) { return D3; })(Base2); var r4 = D3; -var d5 = new D(); // error +var d5 = new D(); // error var d6 = new D(1); // ok diff --git a/tests/baselines/reference/classWithConstructors.js b/tests/baselines/reference/classWithConstructors.js index f40e4e0df31..10afc3a9f1b 100644 --- a/tests/baselines/reference/classWithConstructors.js +++ b/tests/baselines/reference/classWithConstructors.js @@ -63,16 +63,16 @@ var NonGeneric; } return C; })(); - var c = new C(); // error - var c2 = new C(''); // ok + var c = new C(); // error + var c2 = new C(''); // ok var C2 = (function () { function C2(x) { } return C2; })(); - var c3 = new C2(); // error - var c4 = new C2(''); // ok - var c5 = new C2(1); // ok + var c3 = new C2(); // error + var c4 = new C2(''); // ok + var c5 = new C2(1); // ok var D = (function (_super) { __extends(D, _super); function D() { @@ -80,9 +80,9 @@ var NonGeneric; } return D; })(C2); - var d = new D(); // error - var d2 = new D(1); // ok - var d3 = new D(''); // ok + var d = new D(); // error + var d2 = new D(1); // ok + var d3 = new D(''); // ok })(NonGeneric || (NonGeneric = {})); var Generics; (function (Generics) { @@ -91,16 +91,16 @@ var Generics; } return C; })(); - var c = new C(); // error - var c2 = new C(''); // ok + var c = new C(); // error + var c2 = new C(''); // ok var C2 = (function () { function C2(x) { } return C2; })(); - var c3 = new C2(); // error - var c4 = new C2(''); // ok - var c5 = new C2(1, 2); // ok + var c3 = new C2(); // error + var c4 = new C2(''); // ok + var c5 = new C2(1, 2); // ok var D = (function (_super) { __extends(D, _super); function D() { @@ -108,7 +108,7 @@ var Generics; } return D; })(C2); - var d = new D(); // error - var d2 = new D(1); // ok - var d3 = new D(''); // ok + var d = new D(); // error + var d2 = new D(1); // ok + var d3 = new D(''); // ok })(Generics || (Generics = {})); diff --git a/tests/baselines/reference/classWithoutExplicitConstructor.js b/tests/baselines/reference/classWithoutExplicitConstructor.js index 8eedc43d60c..9babd66115b 100644 --- a/tests/baselines/reference/classWithoutExplicitConstructor.js +++ b/tests/baselines/reference/classWithoutExplicitConstructor.js @@ -24,7 +24,7 @@ var C = (function () { return C; })(); var c = new C(); -var c2 = new C(null); // error +var c2 = new C(null); // error var D = (function () { function D() { this.x = 2; diff --git a/tests/baselines/reference/cloduleAcrossModuleDefinitions.js b/tests/baselines/reference/cloduleAcrossModuleDefinitions.js index 3847bac21a0..9f2a55a9ea2 100644 --- a/tests/baselines/reference/cloduleAcrossModuleDefinitions.js +++ b/tests/baselines/reference/cloduleAcrossModuleDefinitions.js @@ -36,4 +36,4 @@ var A; })(A.B || (A.B = {})); var B = A.B; })(A || (A = {})); -var b; // ok +var b; // ok diff --git a/tests/baselines/reference/cloduleTest2.js b/tests/baselines/reference/cloduleTest2.js index d492fa1b15b..c8d78e8198b 100644 --- a/tests/baselines/reference/cloduleTest2.js +++ b/tests/baselines/reference/cloduleTest2.js @@ -43,7 +43,7 @@ var T1; (function (m3d) { m3d.y = 2; })(m3d || (m3d = {})); - var r = new m3d(); // error + var r = new m3d(); // error })(T1 || (T1 = {})); var T2; (function (T2) { @@ -51,7 +51,7 @@ var T2; (function (m3d) { m3d.y = 2; })(m3d || (m3d = {})); - var r = new m3d(); // error + var r = new m3d(); // error })(T2 || (T2 = {})); var T3; (function (T3) { @@ -79,5 +79,5 @@ var m3d; (function (m3d) { m3d.y = 2; })(m3d || (m3d = {})); -var r = new m3d(); // error +var r = new m3d(); // error var r2 = new m4d(); // error diff --git a/tests/baselines/reference/collisionArgumentsArrowFunctions.js b/tests/baselines/reference/collisionArgumentsArrowFunctions.js index affe14d83cb..0aa939e1a2d 100644 --- a/tests/baselines/reference/collisionArgumentsArrowFunctions.js +++ b/tests/baselines/reference/collisionArgumentsArrowFunctions.js @@ -22,25 +22,25 @@ var f1 = function (i) { for (var _i = 1; _i < arguments.length; _i++) { arguments[_i - 1] = arguments[_i]; } - var arguments; // no error + var arguments; // no error }; var f12 = function (arguments) { var rest = []; for (var _i = 1; _i < arguments.length; _i++) { rest[_i - 1] = arguments[_i]; } - var arguments = 10; // no error + var arguments = 10; // no error }; var f1NoError = function (arguments) { - var arguments = 10; // no error + var arguments = 10; // no error }; var f2 = function () { var restParameters = []; for (var _i = 0; _i < arguments.length; _i++) { restParameters[_i - 0] = arguments[_i]; } - var arguments = 10; // No Error + var arguments = 10; // No Error }; var f2NoError = function () { - var arguments = 10; // no error + var arguments = 10; // no error }; diff --git a/tests/baselines/reference/collisionArgumentsClassConstructor.js b/tests/baselines/reference/collisionArgumentsClassConstructor.js index 340a18062f4..ca743777b39 100644 --- a/tests/baselines/reference/collisionArgumentsClassConstructor.js +++ b/tests/baselines/reference/collisionArgumentsClassConstructor.js @@ -94,7 +94,7 @@ var c1 = (function () { for (var _i = 1; _i < arguments.length; _i++) { arguments[_i - 1] = arguments[_i]; } - var arguments; // no error + var arguments; // no error } return c1; })(); @@ -104,13 +104,13 @@ var c12 = (function () { for (var _i = 1; _i < arguments.length; _i++) { rest[_i - 1] = arguments[_i]; } - var arguments = 10; // no error + var arguments = 10; // no error } return c12; })(); var c1NoError = (function () { function c1NoError(arguments) { - var arguments = 10; // no error + var arguments = 10; // no error } return c1NoError; })(); @@ -120,13 +120,13 @@ var c2 = (function () { for (var _i = 0; _i < arguments.length; _i++) { restParameters[_i - 0] = arguments[_i]; } - var arguments = 10; // no error + var arguments = 10; // no error } return c2; })(); var c2NoError = (function () { function c2NoError() { - var arguments = 10; // no error + var arguments = 10; // no error } return c2NoError; })(); @@ -137,14 +137,14 @@ var c3 = (function () { restParameters[_i - 1] = arguments[_i]; } this.arguments = arguments; - var arguments = 10; // no error + var arguments = 10; // no error } return c3; })(); var c3NoError = (function () { function c3NoError(arguments) { this.arguments = arguments; - var arguments = 10; // no error + var arguments = 10; // no error } return c3NoError; })(); @@ -154,7 +154,7 @@ var c5 = (function () { for (var _i = 1; _i < arguments.length; _i++) { arguments[_i - 1] = arguments[_i]; } - var arguments; // no error + var arguments; // no error } return c5; })(); @@ -164,13 +164,13 @@ var c52 = (function () { for (var _i = 1; _i < arguments.length; _i++) { rest[_i - 1] = arguments[_i]; } - var arguments; // no error + var arguments; // no error } return c52; })(); var c5NoError = (function () { function c5NoError(arguments) { - var arguments; // no error + var arguments; // no error } return c5NoError; })(); diff --git a/tests/baselines/reference/collisionArgumentsClassMethod.js b/tests/baselines/reference/collisionArgumentsClassMethod.js index 9049e4f0e56..10c9b288544 100644 --- a/tests/baselines/reference/collisionArgumentsClassMethod.js +++ b/tests/baselines/reference/collisionArgumentsClassMethod.js @@ -57,34 +57,34 @@ var c1 = (function () { for (var _i = 1; _i < arguments.length; _i++) { arguments[_i - 1] = arguments[_i]; } - var arguments; // no error + var arguments; // no error }; c1.prototype.foo1 = function (arguments) { var rest = []; for (var _i = 1; _i < arguments.length; _i++) { rest[_i - 1] = arguments[_i]; } - var arguments = 10; // no error + var arguments = 10; // no error }; c1.prototype.fooNoError = function (arguments) { - var arguments = 10; // no error + var arguments = 10; // no error }; c1.prototype.f4 = function (i) { var arguments = []; for (var _i = 1; _i < arguments.length; _i++) { arguments[_i - 1] = arguments[_i]; } - var arguments; // no error + var arguments; // no error }; c1.prototype.f41 = function (arguments) { var rest = []; for (var _i = 1; _i < arguments.length; _i++) { rest[_i - 1] = arguments[_i]; } - var arguments; // no error + var arguments; // no error }; c1.prototype.f4NoError = function (arguments) { - var arguments; // no error + var arguments; // no error }; return c1; })(); @@ -96,10 +96,10 @@ var c3 = (function () { for (var _i = 0; _i < arguments.length; _i++) { restParameters[_i - 0] = arguments[_i]; } - var arguments = 10; // no error + var arguments = 10; // no error }; c3.prototype.fooNoError = function () { - var arguments = 10; // no error + var arguments = 10; // no error }; return c3; })(); diff --git a/tests/baselines/reference/collisionArgumentsFunction.js b/tests/baselines/reference/collisionArgumentsFunction.js index c4dfc2ca52a..9ce4a5ab0e2 100644 --- a/tests/baselines/reference/collisionArgumentsFunction.js +++ b/tests/baselines/reference/collisionArgumentsFunction.js @@ -51,42 +51,42 @@ function f1(arguments) { for (var _i = 1; _i < arguments.length; _i++) { restParameters[_i - 1] = arguments[_i]; } - var arguments = 10; // no error + var arguments = 10; // no error } function f12(i) { var arguments = []; for (var _i = 1; _i < arguments.length; _i++) { arguments[_i - 1] = arguments[_i]; } - var arguments; // no error + var arguments; // no error } function f1NoError(arguments) { - var arguments = 10; // no error + var arguments = 10; // no error } function f3() { var restParameters = []; for (var _i = 0; _i < arguments.length; _i++) { restParameters[_i - 0] = arguments[_i]; } - var arguments = 10; // no error + var arguments = 10; // no error } function f3NoError() { - var arguments = 10; // no error + var arguments = 10; // no error } function f4(arguments) { var rest = []; for (var _i = 1; _i < arguments.length; _i++) { rest[_i - 1] = arguments[_i]; } - var arguments; // No error + var arguments; // No error } function f42(i) { var arguments = []; for (var _i = 1; _i < arguments.length; _i++) { arguments[_i - 1] = arguments[_i]; } - var arguments; // No error + var arguments; // No error } function f4NoError(arguments) { - var arguments; // No error + var arguments; // No error } diff --git a/tests/baselines/reference/collisionArgumentsFunctionExpressions.js b/tests/baselines/reference/collisionArgumentsFunctionExpressions.js index a276293e5b1..405ceb625c3 100644 --- a/tests/baselines/reference/collisionArgumentsFunctionExpressions.js +++ b/tests/baselines/reference/collisionArgumentsFunctionExpressions.js @@ -41,43 +41,43 @@ function foo() { for (var _i = 1; _i < arguments.length; _i++) { restParameters[_i - 1] = arguments[_i]; } - var arguments = 10; // no error + var arguments = 10; // no error } function f12(i) { var arguments = []; for (var _i = 1; _i < arguments.length; _i++) { arguments[_i - 1] = arguments[_i]; } - var arguments; // no error + var arguments; // no error } function f1NoError(arguments) { - var arguments = 10; // no error + var arguments = 10; // no error } function f3() { var restParameters = []; for (var _i = 0; _i < arguments.length; _i++) { restParameters[_i - 0] = arguments[_i]; } - var arguments = 10; // no error + var arguments = 10; // no error } function f3NoError() { - var arguments = 10; // no error + var arguments = 10; // no error } function f4(arguments) { var rest = []; for (var _i = 1; _i < arguments.length; _i++) { rest[_i - 1] = arguments[_i]; } - var arguments; // No error + var arguments; // No error } function f42(i) { var arguments = []; for (var _i = 1; _i < arguments.length; _i++) { arguments[_i - 1] = arguments[_i]; } - var arguments; // No error + var arguments; // No error } function f4NoError(arguments) { - var arguments; // No error + var arguments; // No error } } diff --git a/tests/baselines/reference/collisionArgumentsInType.js b/tests/baselines/reference/collisionArgumentsInType.js index 3eb219f1c47..4db7c930775 100644 --- a/tests/baselines/reference/collisionArgumentsInType.js +++ b/tests/baselines/reference/collisionArgumentsInType.js @@ -15,7 +15,7 @@ var v21: { } //// [collisionArgumentsInType.js] -var v1; // no error - no code gen -var v12; // no error - no code gen +var v1; // no error - no code gen +var v12; // no error - no code gen var v2; var v21; diff --git a/tests/baselines/reference/collisionRestParameterArrowFunctions.js b/tests/baselines/reference/collisionRestParameterArrowFunctions.js index 987a81ee60f..cc8dc337b87 100644 --- a/tests/baselines/reference/collisionRestParameterArrowFunctions.js +++ b/tests/baselines/reference/collisionRestParameterArrowFunctions.js @@ -19,18 +19,18 @@ var f1 = function (_i) { for (var _i = 1; _i < arguments.length; _i++) { restParameters[_i - 1] = arguments[_i]; } - var _i = 10; // no error + var _i = 10; // no error }; var f1NoError = function (_i) { - var _i = 10; // no error + var _i = 10; // no error }; var f2 = function () { var restParameters = []; for (var _i = 0; _i < arguments.length; _i++) { restParameters[_i - 0] = arguments[_i]; } - var _i = 10; // No Error + var _i = 10; // No Error }; var f2NoError = function () { - var _i = 10; // no error + var _i = 10; // no error }; diff --git a/tests/baselines/reference/collisionRestParameterClassConstructor.js b/tests/baselines/reference/collisionRestParameterClassConstructor.js index 9ea43815d38..02c7ada9dff 100644 --- a/tests/baselines/reference/collisionRestParameterClassConstructor.js +++ b/tests/baselines/reference/collisionRestParameterClassConstructor.js @@ -74,13 +74,13 @@ var c1 = (function () { for (var _i = 1; _i < arguments.length; _i++) { restParameters[_i - 1] = arguments[_i]; } - var _i = 10; // no error + var _i = 10; // no error } return c1; })(); var c1NoError = (function () { function c1NoError(_i) { - var _i = 10; // no error + var _i = 10; // no error } return c1NoError; })(); @@ -90,13 +90,13 @@ var c2 = (function () { for (var _i = 0; _i < arguments.length; _i++) { restParameters[_i - 0] = arguments[_i]; } - var _i = 10; // no error + var _i = 10; // no error } return c2; })(); var c2NoError = (function () { function c2NoError() { - var _i = 10; // no error + var _i = 10; // no error } return c2NoError; })(); @@ -107,14 +107,14 @@ var c3 = (function () { restParameters[_i - 1] = arguments[_i]; } this._i = _i; - var _i = 10; // no error + var _i = 10; // no error } return c3; })(); var c3NoError = (function () { function c3NoError(_i) { this._i = _i; - var _i = 10; // no error + var _i = 10; // no error } return c3NoError; })(); @@ -124,13 +124,13 @@ var c5 = (function () { for (var _i = 1; _i < arguments.length; _i++) { rest[_i - 1] = arguments[_i]; } - var _i; // no error + var _i; // no error } return c5; })(); var c5NoError = (function () { function c5NoError(_i) { - var _i; // no error + var _i; // no error } return c5NoError; })(); diff --git a/tests/baselines/reference/collisionRestParameterClassMethod.js b/tests/baselines/reference/collisionRestParameterClassMethod.js index ee98d6ebb4c..326ad0c424d 100644 --- a/tests/baselines/reference/collisionRestParameterClassMethod.js +++ b/tests/baselines/reference/collisionRestParameterClassMethod.js @@ -47,20 +47,20 @@ var c1 = (function () { for (var _i = 1; _i < arguments.length; _i++) { restParameters[_i - 1] = arguments[_i]; } - var _i = 10; // no error + var _i = 10; // no error }; c1.prototype.fooNoError = function (_i) { - var _i = 10; // no error + var _i = 10; // no error }; c1.prototype.f4 = function (_i) { var rest = []; for (var _i = 1; _i < arguments.length; _i++) { rest[_i - 1] = arguments[_i]; } - var _i; // no error + var _i; // no error }; c1.prototype.f4NoError = function (_i) { - var _i; // no error + var _i; // no error }; return c1; })(); @@ -72,10 +72,10 @@ var c3 = (function () { for (var _i = 0; _i < arguments.length; _i++) { restParameters[_i - 0] = arguments[_i]; } - var _i = 10; // no error + var _i = 10; // no error }; c3.prototype.fooNoError = function () { - var _i = 10; // no error + var _i = 10; // no error }; return c3; })(); diff --git a/tests/baselines/reference/collisionRestParameterFunction.js b/tests/baselines/reference/collisionRestParameterFunction.js index a6e5f9c1184..c81dbb0f8d3 100644 --- a/tests/baselines/reference/collisionRestParameterFunction.js +++ b/tests/baselines/reference/collisionRestParameterFunction.js @@ -40,20 +40,20 @@ function f1(_i) { for (var _i = 1; _i < arguments.length; _i++) { restParameters[_i - 1] = arguments[_i]; } - var _i = 10; // no error + var _i = 10; // no error } function f1NoError(_i) { - var _i = 10; // no error + var _i = 10; // no error } function f3() { var restParameters = []; for (var _i = 0; _i < arguments.length; _i++) { restParameters[_i - 0] = arguments[_i]; } - var _i = 10; // no error + var _i = 10; // no error } function f3NoError() { - var _i = 10; // no error + var _i = 10; // no error } function f4(_i) { var rest = []; diff --git a/tests/baselines/reference/collisionRestParameterFunctionExpressions.js b/tests/baselines/reference/collisionRestParameterFunctionExpressions.js index 4f502941a6e..4f1dea2b11e 100644 --- a/tests/baselines/reference/collisionRestParameterFunctionExpressions.js +++ b/tests/baselines/reference/collisionRestParameterFunctionExpressions.js @@ -31,20 +31,20 @@ function foo() { for (var _i = 1; _i < arguments.length; _i++) { restParameters[_i - 1] = arguments[_i]; } - var _i = 10; // no error + var _i = 10; // no error } function f1NoError(_i) { - var _i = 10; // no error + var _i = 10; // no error } function f3() { var restParameters = []; for (var _i = 0; _i < arguments.length; _i++) { restParameters[_i - 0] = arguments[_i]; } - var _i = 10; // no error + var _i = 10; // no error } function f3NoError() { - var _i = 10; // no error + var _i = 10; // no error } function f4(_i) { var rest = []; diff --git a/tests/baselines/reference/collisionRestParameterInType.js b/tests/baselines/reference/collisionRestParameterInType.js index ed288492605..9d1c7839451 100644 --- a/tests/baselines/reference/collisionRestParameterInType.js +++ b/tests/baselines/reference/collisionRestParameterInType.js @@ -8,5 +8,5 @@ var v2: { } //// [collisionRestParameterInType.js] -var v1; // no error - no code gen +var v1; // no error - no code gen var v2; diff --git a/tests/baselines/reference/collisionSuperAndLocalVarInConstructor.js b/tests/baselines/reference/collisionSuperAndLocalVarInConstructor.js index 8462a2f216c..2cd7549c78c 100644 --- a/tests/baselines/reference/collisionSuperAndLocalVarInConstructor.js +++ b/tests/baselines/reference/collisionSuperAndLocalVarInConstructor.js @@ -27,10 +27,10 @@ var __extends = this.__extends || function (d, b) { __.prototype = b.prototype; d.prototype = new __(); }; -var _super = 10; // No Error +var _super = 10; // No Error var Foo = (function () { function Foo() { - var _super = 10; // No error + var _super = 10; // No error } return Foo; })(); @@ -38,7 +38,7 @@ var b = (function (_super) { __extends(b, _super); function b() { _super.call(this); - var _super = 10; // Should be error + var _super = 10; // Should be error } return b; })(Foo); @@ -47,7 +47,7 @@ var c = (function (_super) { function c() { _super.call(this); var x = function () { - var _super = 10; // Should be error + var _super = 10; // Should be error }; } return c; diff --git a/tests/baselines/reference/collisionSuperAndLocalVarInMethod.js b/tests/baselines/reference/collisionSuperAndLocalVarInMethod.js index 61c9d32f5b7..e7b374e5a61 100644 --- a/tests/baselines/reference/collisionSuperAndLocalVarInMethod.js +++ b/tests/baselines/reference/collisionSuperAndLocalVarInMethod.js @@ -25,12 +25,12 @@ var __extends = this.__extends || function (d, b) { __.prototype = b.prototype; d.prototype = new __(); }; -var _super = 10; // No Error +var _super = 10; // No Error var Foo = (function () { function Foo() { } Foo.prototype.x = function () { - var _super = 10; // No error + var _super = 10; // No error }; return Foo; })(); @@ -40,7 +40,7 @@ var b = (function (_super) { _super.apply(this, arguments); } b.prototype.foo = function () { - var _super = 10; // Should be error + var _super = 10; // Should be error }; return b; })(Foo); @@ -51,7 +51,7 @@ var c = (function (_super) { } c.prototype.foo = function () { var x = function () { - var _super = 10; // Should be error + var _super = 10; // Should be error }; }; return c; diff --git a/tests/baselines/reference/collisionSuperAndLocalVarInProperty.js b/tests/baselines/reference/collisionSuperAndLocalVarInProperty.js index bf7fd4a545b..55777f920a2 100644 --- a/tests/baselines/reference/collisionSuperAndLocalVarInProperty.js +++ b/tests/baselines/reference/collisionSuperAndLocalVarInProperty.js @@ -24,15 +24,15 @@ var __extends = this.__extends || function (d, b) { __.prototype = b.prototype; d.prototype = new __(); }; -var _super = 10; // No Error +var _super = 10; // No Error var Foo = (function () { function Foo() { this.prop1 = { doStuff: function () { - var _super = 10; // No error + var _super = 10; // No error } }; - this._super = 10; // No error + this._super = 10; // No error } return Foo; })(); @@ -42,10 +42,10 @@ var b = (function (_super) { _super.apply(this, arguments); this.prop2 = { doStuff: function () { - var _super = 10; // Should be error + var _super = 10; // Should be error } }; - this._super = 10; // No error + this._super = 10; // No error } return b; })(Foo); diff --git a/tests/baselines/reference/collisionSuperAndNameResolution.js b/tests/baselines/reference/collisionSuperAndNameResolution.js index cf0298e1240..8af9464b37e 100644 --- a/tests/baselines/reference/collisionSuperAndNameResolution.js +++ b/tests/baselines/reference/collisionSuperAndNameResolution.js @@ -19,7 +19,7 @@ var __extends = this.__extends || function (d, b) { d.prototype = new __(); }; var console; -var _super = 10; // No error +var _super = 10; // No error var base = (function () { function base() { } diff --git a/tests/baselines/reference/collisionThisExpressionAndNameResolution.js b/tests/baselines/reference/collisionThisExpressionAndNameResolution.js index b1a74cf0a8f..c0a9ffcd297 100644 --- a/tests/baselines/reference/collisionThisExpressionAndNameResolution.js +++ b/tests/baselines/reference/collisionThisExpressionAndNameResolution.js @@ -18,7 +18,7 @@ var Foo = (function () { function Foo() { } Foo.prototype.x = function () { - var _this = 10; // Local var. No this capture in x(), so no conflict. + var _this = 10; // Local var. No this capture in x(), so no conflict. function inner() { var _this = this; console.log(_this); diff --git a/tests/baselines/reference/collisionThisExpressionAndParameter.js b/tests/baselines/reference/collisionThisExpressionAndParameter.js index 6abcefca6dc..7900bd45e1b 100644 --- a/tests/baselines/reference/collisionThisExpressionAndParameter.js +++ b/tests/baselines/reference/collisionThisExpressionAndParameter.js @@ -98,7 +98,7 @@ var Foo = (function () { function Foo() { } Foo.prototype.x = function () { - var _this = 10; // Local var. No this capture in x(), so no conflict. + var _this = 10; // Local var. No this capture in x(), so no conflict. function inner(_this) { var _this = this; return function (x) { return _this; }; @@ -117,7 +117,7 @@ var Foo = (function () { }; }; Foo.prototype.x1 = function () { - var _this = 10; // Local var. No this capture in x(), so no conflict. + var _this = 10; // Local var. No this capture in x(), so no conflict. function inner(_this) { } }; diff --git a/tests/baselines/reference/commaOperatorOtherInvalidOperation.js b/tests/baselines/reference/commaOperatorOtherInvalidOperation.js index 512d72dcc7f..d14dec67709 100644 --- a/tests/baselines/reference/commaOperatorOtherInvalidOperation.js +++ b/tests/baselines/reference/commaOperatorOtherInvalidOperation.js @@ -19,10 +19,10 @@ function foo1() { function foo(x, y) { return x, y; } -var resultIsString = foo(1, "123"); //error here +var resultIsString = foo(1, "123"); //error here //TypeParameters function foo1() { var x; var y; - var result = (x, y); //error here + var result = (x, y); //error here } diff --git a/tests/baselines/reference/commentsFunction.js b/tests/baselines/reference/commentsFunction.js index ccb58b40362..1137bf4b325 100644 --- a/tests/baselines/reference/commentsFunction.js +++ b/tests/baselines/reference/commentsFunction.js @@ -22,7 +22,18 @@ var fooFunc = function FooFunctionValue(/** fooFunctionValue param */ b: string) var lambdaFoo = /** this is lambda comment*/ (/**param a*/a: number, /**param b*/b: number) => a + b; var lambddaNoVarComment = /** this is lambda multiplication*/ (/**param a*/a: number, /**param b*/b: number) => a * b; lambdaFoo(10, 20); -lambddaNoVarComment(10, 20); +lambddaNoVarComment(10, 20); + +function blah(a: string /* multiline trailing comment +multiline */) { +} + +function blah2(a: string /* single line multiple trailing comments */ /* second */) { +} + +function blah3(a: string // trailing commen single line + ) { +} //// [commentsFunction.js] /** This comment should appear for foo*/ @@ -47,6 +58,14 @@ var lambdaFoo = function (a, b) { return a + b; }; var lambddaNoVarComment = function (a, b) { return a * b; }; lambdaFoo(10, 20); lambddaNoVarComment(10, 20); +function blah(a /* multiline trailing comment +multiline */ ) { +} +function blah2(a /* single line multiple trailing comments */ /* second */ ) { +} +function blah3(a // trailing commen single line + ) { +} //// [commentsFunction.d.ts] @@ -61,3 +80,6 @@ declare function fooWithParameters(/** this is comment about a*/ a: string, /** declare var fooFunc: (b: string) => string; declare var lambdaFoo: (a: number, b: number) => number; declare var lambddaNoVarComment: (a: number, b: number) => number; +declare function blah(a: string): void; +declare function blah2(a: string): void; +declare function blah3(a: string): void; diff --git a/tests/baselines/reference/commentsVarDecl.js b/tests/baselines/reference/commentsVarDecl.js index fb479965bf1..9d2b173589e 100644 --- a/tests/baselines/reference/commentsVarDecl.js +++ b/tests/baselines/reference/commentsVarDecl.js @@ -45,7 +45,7 @@ n4 = z2; //// [commentsVarDecl.js] /** Variable comments*/ -var myVariable = 10; // This trailing Comment1 +var myVariable = 10; // This trailing Comment1 /** This is another variable comment*/ var anotherVariable = 30; // shouldn't appear diff --git a/tests/baselines/reference/comparisonOperatorWithNoRelationshipPrimitiveType.js b/tests/baselines/reference/comparisonOperatorWithNoRelationshipPrimitiveType.js index a46888c1de3..3872e950f40 100644 --- a/tests/baselines/reference/comparisonOperatorWithNoRelationshipPrimitiveType.js +++ b/tests/baselines/reference/comparisonOperatorWithNoRelationshipPrimitiveType.js @@ -231,7 +231,7 @@ var e; var r1a1 = a < b; var r1a1 = a < c; var r1a1 = a < d; -var r1a1 = a < e; // no error, expected +var r1a1 = a < e; // no error, expected var r1b1 = b < a; var r1b1 = b < c; var r1b1 = b < d; @@ -244,7 +244,7 @@ var r1d1 = d < a; var r1d1 = d < b; var r1d1 = d < c; var r1d1 = d < e; -var r1e1 = e < a; // no error, expected +var r1e1 = e < a; // no error, expected var r1e1 = e < b; var r1e1 = e < c; var r1e1 = e < d; @@ -252,7 +252,7 @@ var r1e1 = e < d; var r2a1 = a > b; var r2a1 = a > c; var r2a1 = a > d; -var r2a1 = a > e; // no error, expected +var r2a1 = a > e; // no error, expected var r2b1 = b > a; var r2b1 = b > c; var r2b1 = b > d; @@ -265,7 +265,7 @@ var r2d1 = d > a; var r2d1 = d > b; var r2d1 = d > c; var r2d1 = d > e; -var r2e1 = e > a; // no error, expected +var r2e1 = e > a; // no error, expected var r2e1 = e > b; var r2e1 = e > c; var r2e1 = e > d; @@ -273,7 +273,7 @@ var r2e1 = e > d; var r3a1 = a <= b; var r3a1 = a <= c; var r3a1 = a <= d; -var r3a1 = a <= e; // no error, expected +var r3a1 = a <= e; // no error, expected var r3b1 = b <= a; var r3b1 = b <= c; var r3b1 = b <= d; @@ -286,7 +286,7 @@ var r3d1 = d <= a; var r3d1 = d <= b; var r3d1 = d <= c; var r3d1 = d <= e; -var r3e1 = e <= a; // no error, expected +var r3e1 = e <= a; // no error, expected var r3e1 = e <= b; var r3e1 = e <= c; var r3e1 = e <= d; @@ -294,7 +294,7 @@ var r3e1 = e <= d; var r4a1 = a >= b; var r4a1 = a >= c; var r4a1 = a >= d; -var r4a1 = a >= e; // no error, expected +var r4a1 = a >= e; // no error, expected var r4b1 = b >= a; var r4b1 = b >= c; var r4b1 = b >= d; @@ -307,7 +307,7 @@ var r4d1 = d >= a; var r4d1 = d >= b; var r4d1 = d >= c; var r4d1 = d >= e; -var r4e1 = e >= a; // no error, expected +var r4e1 = e >= a; // no error, expected var r4e1 = e >= b; var r4e1 = e >= c; var r4e1 = e >= d; @@ -315,7 +315,7 @@ var r4e1 = e >= d; var r5a1 = a == b; var r5a1 = a == c; var r5a1 = a == d; -var r5a1 = a == e; // no error, expected +var r5a1 = a == e; // no error, expected var r5b1 = b == a; var r5b1 = b == c; var r5b1 = b == d; @@ -328,7 +328,7 @@ var r5d1 = d == a; var r5d1 = d == b; var r5d1 = d == c; var r5d1 = d == e; -var r5e1 = e == a; // no error, expected +var r5e1 = e == a; // no error, expected var r5e1 = e == b; var r5e1 = e == c; var r5e1 = e == d; @@ -336,7 +336,7 @@ var r5e1 = e == d; var r6a1 = a != b; var r6a1 = a != c; var r6a1 = a != d; -var r6a1 = a != e; // no error, expected +var r6a1 = a != e; // no error, expected var r6b1 = b != a; var r6b1 = b != c; var r6b1 = b != d; @@ -349,7 +349,7 @@ var r6d1 = d != a; var r6d1 = d != b; var r6d1 = d != c; var r6d1 = d != e; -var r6e1 = e != a; // no error, expected +var r6e1 = e != a; // no error, expected var r6e1 = e != b; var r6e1 = e != c; var r6e1 = e != d; @@ -357,7 +357,7 @@ var r6e1 = e != d; var r7a1 = a === b; var r7a1 = a === c; var r7a1 = a === d; -var r7a1 = a === e; // no error, expected +var r7a1 = a === e; // no error, expected var r7b1 = b === a; var r7b1 = b === c; var r7b1 = b === d; @@ -370,7 +370,7 @@ var r7d1 = d === a; var r7d1 = d === b; var r7d1 = d === c; var r7d1 = d === e; -var r7e1 = e === a; // no error, expected +var r7e1 = e === a; // no error, expected var r7e1 = e === b; var r7e1 = e === c; var r7e1 = e === d; @@ -378,7 +378,7 @@ var r7e1 = e === d; var r8a1 = a !== b; var r8a1 = a !== c; var r8a1 = a !== d; -var r8a1 = a !== e; // no error, expected +var r8a1 = a !== e; // no error, expected var r8b1 = b !== a; var r8b1 = b !== c; var r8b1 = b !== d; @@ -391,7 +391,7 @@ var r8d1 = d !== a; var r8d1 = d !== b; var r8d1 = d !== c; var r8d1 = d !== e; -var r8e1 = e !== a; // no error, expected +var r8e1 = e !== a; // no error, expected var r8e1 = e !== b; var r8e1 = e !== c; var r8e1 = e !== d; diff --git a/tests/baselines/reference/constraints0.js b/tests/baselines/reference/constraints0.js index dffefd5900a..fa041877439 100644 --- a/tests/baselines/reference/constraints0.js +++ b/tests/baselines/reference/constraints0.js @@ -17,6 +17,6 @@ var v2: C; // should not work var y = v1.x.a; // 'a' should be of type 'number' //// [constraints0.js] -var v1; // should work -var v2; // should not work +var v1; // should work +var v2; // should not work var y = v1.x.a; // 'a' should be of type 'number' diff --git a/tests/baselines/reference/constraintsThatReferenceOtherContstraints1.js b/tests/baselines/reference/constraintsThatReferenceOtherContstraints1.js index b065a2fb3b3..f137ac6baa0 100644 --- a/tests/baselines/reference/constraintsThatReferenceOtherContstraints1.js +++ b/tests/baselines/reference/constraintsThatReferenceOtherContstraints1.js @@ -20,4 +20,4 @@ var Bar = (function () { } return Bar; })(); -var x; // Error 2 Type '{ a: string; b: number; }' does not satisfy the constraint 'T' for type +var x; // Error 2 Type '{ a: string; b: number; }' does not satisfy the constraint 'T' for type diff --git a/tests/baselines/reference/constructorArgWithGenericCallSignature.js b/tests/baselines/reference/constructorArgWithGenericCallSignature.js index 0a479058c9f..1460cd2b668 100644 --- a/tests/baselines/reference/constructorArgWithGenericCallSignature.js +++ b/tests/baselines/reference/constructorArgWithGenericCallSignature.js @@ -29,4 +29,4 @@ var Test; })(Test || (Test = {})); var func; Test.F(func); -var test = new Test.MyClass(func); // Should be OK +var test = new Test.MyClass(func); // Should be OK diff --git a/tests/baselines/reference/constructorHasPrototypeProperty.js b/tests/baselines/reference/constructorHasPrototypeProperty.js index 8d5bdfbb533..951593e9353 100644 --- a/tests/baselines/reference/constructorHasPrototypeProperty.js +++ b/tests/baselines/reference/constructorHasPrototypeProperty.js @@ -71,8 +71,8 @@ var Generic; } return D; })(C); - var r = C.prototype; // C - var ra = r.foo; // any - var r2 = D.prototype; // D - var rb = r2.baz; // any + var r = C.prototype; // C + var ra = r.foo; // any + var r2 = D.prototype; // D + var rb = r2.baz; // any })(Generic || (Generic = {})); diff --git a/tests/baselines/reference/constructorParameterProperties.js b/tests/baselines/reference/constructorParameterProperties.js index 3bb2e2be39d..0609d262e6d 100644 --- a/tests/baselines/reference/constructorParameterProperties.js +++ b/tests/baselines/reference/constructorParameterProperties.js @@ -27,7 +27,7 @@ var C = (function () { })(); var c; var r = c.y; -var r2 = c.x; // error +var r2 = c.x; // error var D = (function () { function D(a, x) { this.x = x; @@ -36,5 +36,5 @@ var D = (function () { })(); var d; var r = d.y; -var r2 = d.x; // error +var r2 = d.x; // error var r3 = d.a; // error diff --git a/tests/baselines/reference/constructorParameterProperties2.js b/tests/baselines/reference/constructorParameterProperties2.js index e23382cec25..a95a98c0c5f 100644 --- a/tests/baselines/reference/constructorParameterProperties2.js +++ b/tests/baselines/reference/constructorParameterProperties2.js @@ -26,7 +26,7 @@ var r3 = e.y; // error //// [constructorParameterProperties2.js] var C = (function () { function C(y) { - } // ok + } // ok return C; })(); var c; @@ -34,7 +34,7 @@ var r = c.y; var D = (function () { function D(y) { this.y = y; - } // error + } // error return D; })(); var d; @@ -42,7 +42,7 @@ var r2 = d.y; var E = (function () { function E(y) { this.y = y; - } // error + } // error return E; })(); var e; diff --git a/tests/baselines/reference/constructorParameterShadowsOuterScopes.js b/tests/baselines/reference/constructorParameterShadowsOuterScopes.js index c4d36c684f1..3e222cc6cb3 100644 --- a/tests/baselines/reference/constructorParameterShadowsOuterScopes.js +++ b/tests/baselines/reference/constructorParameterShadowsOuterScopes.js @@ -28,7 +28,7 @@ class D { var x = 1; var C = (function () { function C(x) { - this.b = x; // error, evaluated in scope of constructor, cannot reference x + this.b = x; // error, evaluated in scope of constructor, cannot reference x x = 2; } return C; @@ -36,7 +36,7 @@ var C = (function () { var y = 1; var D = (function () { function D(x) { - this.b = y; // error, evaluated in scope of constructor, cannot reference y + this.b = y; // error, evaluated in scope of constructor, cannot reference y var y = ""; } return D; diff --git a/tests/baselines/reference/constructorsWithSpecializedSignatures.js b/tests/baselines/reference/constructorsWithSpecializedSignatures.js index a0a9409fa35..4faa5e4030a 100644 --- a/tests/baselines/reference/constructorsWithSpecializedSignatures.js +++ b/tests/baselines/reference/constructorsWithSpecializedSignatures.js @@ -53,6 +53,6 @@ var D = (function () { // overloads are ok var D2 = (function () { function D2(x) { - } // error + } // error return D2; })(); diff --git a/tests/baselines/reference/contextualSignatureInstantiation1.js b/tests/baselines/reference/contextualSignatureInstantiation1.js index 56e76801125..c6756ff6331 100644 --- a/tests/baselines/reference/contextualSignatureInstantiation1.js +++ b/tests/baselines/reference/contextualSignatureInstantiation1.js @@ -9,6 +9,6 @@ var r100 = map2(e2); // type arg inference should fail for S since a generic lam //// [contextualSignatureInstantiation1.js] var e = function (x, y) { return x.length; }; -var r99 = map(e); // should be {}[] for S since a generic lambda is not inferentially typed +var r99 = map(e); // should be {}[] for S since a generic lambda is not inferentially typed var e2 = function (x, y) { return x.length; }; var r100 = map2(e2); // type arg inference should fail for S since a generic lambda is not inferentially typed. Falls back to { length: number } diff --git a/tests/baselines/reference/contextualSignatureInstantiation3.js b/tests/baselines/reference/contextualSignatureInstantiation3.js index e45ba07b367..9198a02ccda 100644 --- a/tests/baselines/reference/contextualSignatureInstantiation3.js +++ b/tests/baselines/reference/contextualSignatureInstantiation3.js @@ -36,8 +36,8 @@ function singleton(x) { var xs = [1, 2, 3]; // Have compiler check that we get the correct types var v1; -var v1 = xs.map(identity); // Error if not number[] -var v1 = map(xs, identity); // Error if not number[] +var v1 = xs.map(identity); // Error if not number[] +var v1 = map(xs, identity); // Error if not number[] var v2; -var v2 = xs.map(singleton); // Error if not number[][] -var v2 = map(xs, singleton); // Error if not number[][] +var v2 = xs.map(singleton); // Error if not number[][] +var v2 = map(xs, singleton); // Error if not number[][] diff --git a/tests/baselines/reference/couldNotSelectGenericOverload.js b/tests/baselines/reference/couldNotSelectGenericOverload.js index d87218a8911..45ce1c42274 100644 --- a/tests/baselines/reference/couldNotSelectGenericOverload.js +++ b/tests/baselines/reference/couldNotSelectGenericOverload.js @@ -13,9 +13,9 @@ function makeArray(items) { return items; } var b = [1, ""]; -var b1G = makeArray(1, ""); // any, no error -var b2G = makeArray(b); // any[] +var b1G = makeArray(1, ""); // any, no error +var b2G = makeArray(b); // any[] function makeArray2(items) { return items; } -var b3G = makeArray2(1, ""); // error +var b3G = makeArray2(1, ""); // error diff --git a/tests/baselines/reference/declFileInternalAliases.js b/tests/baselines/reference/declFileInternalAliases.js index b50ce17a1a2..2ebe48ce782 100644 --- a/tests/baselines/reference/declFileInternalAliases.js +++ b/tests/baselines/reference/declFileInternalAliases.js @@ -25,12 +25,12 @@ var m; var m1; (function (m1) { var x = m.c; - m1.d = new x(); // emit the type as m.c + m1.d = new x(); // emit the type as m.c })(m1 || (m1 = {})); var m2; (function (m2) { m2.x = m.c; - m2.d = new m2.x(); // emit the type as x + m2.d = new m2.x(); // emit the type as x })(m2 || (m2 = {})); diff --git a/tests/baselines/reference/declInput-2.js b/tests/baselines/reference/declInput-2.js index aa709b0bf07..3ba5ae11bf6 100644 --- a/tests/baselines/reference/declInput-2.js +++ b/tests/baselines/reference/declInput-2.js @@ -46,7 +46,7 @@ var M; }; D.prototype.m252 = function () { return null; - }; // don't generate + }; // don't generate D.prototype.m26 = function (i) { }; D.prototype.m262 = function (i) { diff --git a/tests/baselines/reference/declarationEmit_nameConflicts.js b/tests/baselines/reference/declarationEmit_nameConflicts.js index 72f5837a452..bbb7826707b 100644 --- a/tests/baselines/reference/declarationEmit_nameConflicts.js +++ b/tests/baselines/reference/declarationEmit_nameConflicts.js @@ -104,11 +104,11 @@ var M = exports.M; })(P.N || (P.N = {})); var N = P.N; P.im = M.P.f; - P.a = M.a; // emitted incorrectly as typeof f - P.b = M.b; // ok - P.c = M.c; // ok - P.g = M.c.g; // ok - P.d = M.d; // emitted incorrectly as typeof im + P.a = M.a; // emitted incorrectly as typeof f + P.b = M.b; // ok + P.c = M.c; // ok + P.g = M.c.g; // ok + P.d = M.d; // emitted incorrectly as typeof im })(M.P || (M.P = {})); var P = M.P; })(exports.M || (exports.M = {})); diff --git a/tests/baselines/reference/declarationEmit_nameConflicts2.js b/tests/baselines/reference/declarationEmit_nameConflicts2.js index fd9bc677292..7b8e1ce17c9 100644 --- a/tests/baselines/reference/declarationEmit_nameConflicts2.js +++ b/tests/baselines/reference/declarationEmit_nameConflicts2.js @@ -46,10 +46,10 @@ var X; (function (Y) { (function (base) { (function (Z) { - Z.f = X.Y.base.f; // Should be base.f - Z.C = X.Y.base.C; // Should be base.C - Z.M = X.Y.base.M; // Should be base.M - Z.E = X.Y.base.E; // Should be base.E + Z.f = X.Y.base.f; // Should be base.f + Z.C = X.Y.base.C; // Should be base.C + Z.M = X.Y.base.M; // Should be base.M + Z.E = X.Y.base.E; // Should be base.E })(base.Z || (base.Z = {})); var Z = base.Z; })(Y.base || (Y.base = {})); diff --git a/tests/baselines/reference/declarationEmit_nameConflicts3.js b/tests/baselines/reference/declarationEmit_nameConflicts3.js index d3424284113..a8dc1217ef4 100644 --- a/tests/baselines/reference/declarationEmit_nameConflicts3.js +++ b/tests/baselines/reference/declarationEmit_nameConflicts3.js @@ -77,10 +77,10 @@ var M; D[D["f"] = 0] = "f"; })(P.D || (P.D = {})); var D = P.D; - P.v; // ok - P.w = M.D.f; // error, should be typeof M.D.f - P.x = M.C.f; // error, should be typeof M.C.f - P.x = M.E.f; // error, should be typeof M.E.f + P.v; // ok + P.w = M.D.f; // error, should be typeof M.D.f + P.x = M.C.f; // error, should be typeof M.C.f + P.x = M.E.f; // error, should be typeof M.E.f })(M.P || (M.P = {})); var P = M.P; })(M || (M = {})); diff --git a/tests/baselines/reference/declarationEmit_nameConflictsWithAlias.js b/tests/baselines/reference/declarationEmit_nameConflictsWithAlias.js index c2ef76c9997..a5b2f397bf8 100644 --- a/tests/baselines/reference/declarationEmit_nameConflictsWithAlias.js +++ b/tests/baselines/reference/declarationEmit_nameConflictsWithAlias.js @@ -8,7 +8,7 @@ export module M { //// [declarationEmit_nameConflictsWithAlias.js] (function (M) { - M.w; // Gets emitted as C.I, which is the wrong interface + M.w; // Gets emitted as C.I, which is the wrong interface })(exports.M || (exports.M = {})); var M = exports.M; diff --git a/tests/baselines/reference/defaultArgsInFunctionExpressions.js b/tests/baselines/reference/defaultArgsInFunctionExpressions.js index 830a280f5ad..3f77c4430e8 100644 --- a/tests/baselines/reference/defaultArgsInFunctionExpressions.js +++ b/tests/baselines/reference/defaultArgsInFunctionExpressions.js @@ -35,7 +35,7 @@ f7().x; var f = function (a) { if (a === void 0) { a = 3; } return a; -}; // Type should be (a?: number) => number +}; // Type should be (a?: number) => number var n = f(4); n = f(); var s = f(''); @@ -44,7 +44,7 @@ s = f(); var f2 = function (a) { if (a === void 0) { a = 3; } return a; -}; // Should error, but be of type (a: string) => string; +}; // Should error, but be of type (a: string) => string; s = f2(''); s = f2(); n = f2(); diff --git a/tests/baselines/reference/defaultBestCommonTypesHaveDecls.js b/tests/baselines/reference/defaultBestCommonTypesHaveDecls.js index 8f093dd104c..59935cc53af 100644 --- a/tests/baselines/reference/defaultBestCommonTypesHaveDecls.js +++ b/tests/baselines/reference/defaultBestCommonTypesHaveDecls.js @@ -28,4 +28,4 @@ function concat(x, y) { return null; } var result = concat(1, ""); -var elementCount = result.length; // would like to get an error by now +var elementCount = result.length; // would like to get an error by now diff --git a/tests/baselines/reference/derivedClassConstructorWithoutSuperCall.js b/tests/baselines/reference/derivedClassConstructorWithoutSuperCall.js index c9faed689fc..ed38ce80006 100644 --- a/tests/baselines/reference/derivedClassConstructorWithoutSuperCall.js +++ b/tests/baselines/reference/derivedClassConstructorWithoutSuperCall.js @@ -59,7 +59,7 @@ var Base2 = (function () { var Derived2 = (function (_super) { __extends(Derived2, _super); function Derived2() { - var r2 = function () { return _super.call(this); }; // error for misplaced super call (nested function) + var r2 = function () { return _super.call(this); }; // error for misplaced super call (nested function) } return Derived2; })(Base2); @@ -68,14 +68,14 @@ var Derived3 = (function (_super) { function Derived3() { var r = function () { _super.call(this); - }; // error + }; // error } return Derived3; })(Base2); var Derived4 = (function (_super) { __extends(Derived4, _super); function Derived4() { - var r = _super.call(this); // ok + var r = _super.call(this); // ok } return Derived4; })(Base2); diff --git a/tests/baselines/reference/derivedClassTransitivity.js b/tests/baselines/reference/derivedClassTransitivity.js index 65dec3e818e..8d5fc370257 100644 --- a/tests/baselines/reference/derivedClassTransitivity.js +++ b/tests/baselines/reference/derivedClassTransitivity.js @@ -41,7 +41,7 @@ var D = (function (_super) { _super.apply(this, arguments); } D.prototype.foo = function () { - }; // ok to drop parameters + }; // ok to drop parameters return D; })(C); var E = (function (_super) { @@ -50,7 +50,7 @@ var E = (function (_super) { _super.apply(this, arguments); } E.prototype.foo = function (x) { - }; // ok to add optional parameters + }; // ok to add optional parameters return E; })(D); var c; diff --git a/tests/baselines/reference/derivedClassTransitivity2.js b/tests/baselines/reference/derivedClassTransitivity2.js index 32a5e09da46..7125ea2ccea 100644 --- a/tests/baselines/reference/derivedClassTransitivity2.js +++ b/tests/baselines/reference/derivedClassTransitivity2.js @@ -41,7 +41,7 @@ var D = (function (_super) { _super.apply(this, arguments); } D.prototype.foo = function (x) { - }; // ok to drop parameters + }; // ok to drop parameters return D; })(C); var E = (function (_super) { @@ -50,7 +50,7 @@ var E = (function (_super) { _super.apply(this, arguments); } E.prototype.foo = function (x, y) { - }; // ok to add optional parameters + }; // ok to add optional parameters return E; })(D); var c; diff --git a/tests/baselines/reference/derivedClassTransitivity3.js b/tests/baselines/reference/derivedClassTransitivity3.js index 650f9f8f8a3..1b176c0921c 100644 --- a/tests/baselines/reference/derivedClassTransitivity3.js +++ b/tests/baselines/reference/derivedClassTransitivity3.js @@ -41,7 +41,7 @@ var D = (function (_super) { _super.apply(this, arguments); } D.prototype.foo = function (x) { - }; // ok to drop parameters + }; // ok to drop parameters return D; })(C); var E = (function (_super) { @@ -50,7 +50,7 @@ var E = (function (_super) { _super.apply(this, arguments); } E.prototype.foo = function (x, y) { - }; // ok to add optional parameters + }; // ok to add optional parameters return E; })(D); var c; diff --git a/tests/baselines/reference/derivedClassWithoutExplicitConstructor.js b/tests/baselines/reference/derivedClassWithoutExplicitConstructor.js index 1e11c758e99..1d2c9818116 100644 --- a/tests/baselines/reference/derivedClassWithoutExplicitConstructor.js +++ b/tests/baselines/reference/derivedClassWithoutExplicitConstructor.js @@ -48,7 +48,7 @@ var Derived = (function (_super) { } return Derived; })(Base); -var r = new Derived(); // error +var r = new Derived(); // error var r2 = new Derived(1); var Base2 = (function () { function Base2(x) { @@ -65,5 +65,5 @@ var D = (function (_super) { } return D; })(Base2); -var d = new D(); // error +var d = new D(); // error var d2 = new D(new Date()); // ok diff --git a/tests/baselines/reference/derivedClassWithoutExplicitConstructor2.js b/tests/baselines/reference/derivedClassWithoutExplicitConstructor2.js index 49132e75682..b0f10960578 100644 --- a/tests/baselines/reference/derivedClassWithoutExplicitConstructor2.js +++ b/tests/baselines/reference/derivedClassWithoutExplicitConstructor2.js @@ -56,7 +56,7 @@ var Derived = (function (_super) { } return Derived; })(Base); -var r = new Derived(); // error +var r = new Derived(); // error var r2 = new Derived(1); var r3 = new Derived(1, 2); var r4 = new Derived(1, 2, 3); @@ -75,7 +75,7 @@ var D = (function (_super) { } return D; })(Base2); -var d = new D(); // error -var d2 = new D(new Date()); // ok +var d = new D(); // error +var d2 = new D(new Date()); // ok var d3 = new D(new Date(), new Date()); var d4 = new D(new Date(), new Date(), new Date()); diff --git a/tests/baselines/reference/derivedClassWithoutExplicitConstructor3.js b/tests/baselines/reference/derivedClassWithoutExplicitConstructor3.js index ef4ac0db64b..ae2fc3a3eea 100644 --- a/tests/baselines/reference/derivedClassWithoutExplicitConstructor3.js +++ b/tests/baselines/reference/derivedClassWithoutExplicitConstructor3.js @@ -79,8 +79,8 @@ var Derived2 = (function (_super) { } return Derived2; })(Derived); -var r = new Derived(); // error -var r2 = new Derived2(1); // error +var r = new Derived(); // error +var r2 = new Derived2(1); // error var r3 = new Derived('', ''); var Base2 = (function () { function Base2(x) { @@ -106,6 +106,6 @@ var D2 = (function (_super) { } return D2; })(D); -var d = new D2(); // error -var d2 = new D2(new Date()); // error +var d = new D2(); // error +var d2 = new D2(new Date()); // error var d3 = new D2(new Date(), new Date()); // ok diff --git a/tests/baselines/reference/derivedTypeAccessesHiddenBaseCallViaSuperPropertyAccess.js b/tests/baselines/reference/derivedTypeAccessesHiddenBaseCallViaSuperPropertyAccess.js index 277fb801af2..39e87b620d6 100644 --- a/tests/baselines/reference/derivedTypeAccessesHiddenBaseCallViaSuperPropertyAccess.js +++ b/tests/baselines/reference/derivedTypeAccessesHiddenBaseCallViaSuperPropertyAccess.js @@ -41,9 +41,9 @@ var Derived = (function (_super) { return null; }; Derived.prototype.bar = function () { - var r = _super.prototype.foo.call(this, { a: 1 }); // { a: number } - var r2 = _super.prototype.foo.call(this, { a: 1, b: 2 }); // { a: number } - var r3 = this.foo({ a: 1, b: 2 }); // { a: number; b: number; } + var r = _super.prototype.foo.call(this, { a: 1 }); // { a: number } + var r2 = _super.prototype.foo.call(this, { a: 1, b: 2 }); // { a: number } + var r3 = this.foo({ a: 1, b: 2 }); // { a: number; b: number; } }; return Derived; })(Base); diff --git a/tests/baselines/reference/doNotWidenAtObjectLiteralPropertyAssignment.js b/tests/baselines/reference/doNotWidenAtObjectLiteralPropertyAssignment.js index 2a44b16402e..b259f321f14 100644 --- a/tests/baselines/reference/doNotWidenAtObjectLiteralPropertyAssignment.js +++ b/tests/baselines/reference/doNotWidenAtObjectLiteralPropertyAssignment.js @@ -12,4 +12,4 @@ var test: IIntervalTreeNode[] = [{ interval: { begin: 0 }, children: null }]; // //// [doNotWidenAtObjectLiteralPropertyAssignment.js] -var test = [{ interval: { begin: 0 }, children: null }]; // was error here because best common type is {} +var test = [{ interval: { begin: 0 }, children: null }]; // was error here because best common type is {} diff --git a/tests/baselines/reference/dottedSymbolResolution1.js b/tests/baselines/reference/dottedSymbolResolution1.js index e18e799f47b..d5bdb6006d5 100644 --- a/tests/baselines/reference/dottedSymbolResolution1.js +++ b/tests/baselines/reference/dottedSymbolResolution1.js @@ -39,6 +39,6 @@ function each(collection, callback) { function _setBarAndText() { var x, $; each(x.find(" "), function () { - var $this = $(''), thisBar = $this.find(".fx-usagebars-calloutbar-this"); // bug lead to 'could not find dotted symbol' here + var $this = $(''), thisBar = $this.find(".fx-usagebars-calloutbar-this"); // bug lead to 'could not find dotted symbol' here }); } diff --git a/tests/baselines/reference/duplicateIdentifierInCatchBlock.js b/tests/baselines/reference/duplicateIdentifierInCatchBlock.js index eeeaa14b7f3..6d43b888f48 100644 --- a/tests/baselines/reference/duplicateIdentifierInCatchBlock.js +++ b/tests/baselines/reference/duplicateIdentifierInCatchBlock.js @@ -37,9 +37,9 @@ try { catch (e) { var x; function x() { - } // error + } // error function e() { - } // error + } // error var p; - var p; // error + var p; // error } diff --git a/tests/baselines/reference/duplicateIdentifiersAcrossContainerBoundaries.js b/tests/baselines/reference/duplicateIdentifiersAcrossContainerBoundaries.js index a818ad37f4e..eaef5d09bdd 100644 --- a/tests/baselines/reference/duplicateIdentifiersAcrossContainerBoundaries.js +++ b/tests/baselines/reference/duplicateIdentifiersAcrossContainerBoundaries.js @@ -60,7 +60,7 @@ var M; } return I; })(); - M.I = I; // error + M.I = I; // error })(M || (M = {})); var M; (function (M) { @@ -75,7 +75,7 @@ var M; } return f; })(); - M.f = f; // error + M.f = f; // error })(M || (M = {})); var M; (function (M) { @@ -89,7 +89,7 @@ var M; } return g; })(); - M.g = g; // no error + M.g = g; // no error })(M || (M = {})); var M; (function (M) { @@ -103,7 +103,7 @@ var M; var M; (function (M) { function C() { - } // no error + } // no error })(M || (M = {})); var M; (function (M) { @@ -111,7 +111,7 @@ var M; })(M || (M = {})); var M; (function (M) { - M.v = 3; // error for redeclaring var in a different parent + M.v = 3; // error for redeclaring var in a different parent })(M || (M = {})); var Foo = (function () { function Foo() { @@ -120,7 +120,7 @@ var Foo = (function () { })(); var Foo; (function (Foo) { - Foo.x; // error for redeclaring var in a different parent + Foo.x; // error for redeclaring var in a different parent })(Foo || (Foo = {})); var N; (function (N) { diff --git a/tests/baselines/reference/duplicateSymbolsExportMatching.js b/tests/baselines/reference/duplicateSymbolsExportMatching.js index f290252f907..43a610c7d33 100644 --- a/tests/baselines/reference/duplicateSymbolsExportMatching.js +++ b/tests/baselines/reference/duplicateSymbolsExportMatching.js @@ -83,9 +83,9 @@ define(["require", "exports"], function (require, exports) { var M2; (function (M2) { var v; - M2.v; // one error (visibility) + M2.v; // one error (visibility) var w; - M2.w; // two errors (visibility and type mismatch) + M2.w; // two errors (visibility and type mismatch) })(M2 || (M2 = {})); var M; (function (M) { @@ -95,7 +95,7 @@ define(["require", "exports"], function (require, exports) { })(F || (F = {})); function F() { } - M.F = F; // Only one error for duplicate identifier (don't consider visibility) + M.F = F; // Only one error for duplicate identifier (don't consider visibility) })(M || (M = {})); var M; (function (M) { diff --git a/tests/baselines/reference/duplicateVariablesWithAny.js b/tests/baselines/reference/duplicateVariablesWithAny.js index e66a4433482..1c6fe59b25e 100644 --- a/tests/baselines/reference/duplicateVariablesWithAny.js +++ b/tests/baselines/reference/duplicateVariablesWithAny.js @@ -20,15 +20,15 @@ var z; // ok //// [duplicateVariablesWithAny.js] // They should have to be the same even when one of the types is 'any' var x; -var x = 2; //error +var x = 2; //error var y = ""; -var y; //error +var y; //error var N; (function (N) { var x; - var x = 2; //error + var x = 2; //error var y = ""; - var y; //error + var y; //error })(N || (N = {})); var z; var z; // ok diff --git a/tests/baselines/reference/enumAssignability.js b/tests/baselines/reference/enumAssignability.js index 395430ac43b..3df51cfbaa9 100644 --- a/tests/baselines/reference/enumAssignability.js +++ b/tests/baselines/reference/enumAssignability.js @@ -70,11 +70,11 @@ e = f; f = e; e = 1; f = 1; -var x = e; // ok +var x = e; // ok x = f; var Others; (function (Others) { - var a = e; // ok + var a = e; // ok var C = (function () { function C() { } @@ -82,11 +82,11 @@ var Others; })(); var ac; var ai; - var b = e; // ok + var b = e; // ok var c = e; var d = e; var ee = e; - var f = e; // ok + var f = e; // ok var g = e; var h = e; var i = e; diff --git a/tests/baselines/reference/enumAssignabilityInInheritance.js b/tests/baselines/reference/enumAssignabilityInInheritance.js index 1eb19ba3e87..bec59a3d0de 100644 --- a/tests/baselines/reference/enumAssignabilityInInheritance.js +++ b/tests/baselines/reference/enumAssignabilityInInheritance.js @@ -115,9 +115,9 @@ var E; (function (E) { E[E["A"] = 0] = "A"; })(E || (E = {})); -var r = foo(0 /* A */); // E -var r2 = foo(1); // number -var r3 = foo(null); // any +var r = foo(0 /* A */); // E +var r2 = foo(1); // number +var r3 = foo(null); // any var r4 = foo2(0 /* A */); var r4 = foo3(0 /* A */); var r4 = foo4(0 /* A */); diff --git a/tests/baselines/reference/enumAssignmentCompat.js b/tests/baselines/reference/enumAssignmentCompat.js index 637ccea81d9..24f65bc96a9 100644 --- a/tests/baselines/reference/enumAssignmentCompat.js +++ b/tests/baselines/reference/enumAssignmentCompat.js @@ -56,14 +56,14 @@ var W; })(W || (W = {})); var x = W; var y = W; -var z = W; // error +var z = W; // error var a = 0 /* a */; -var b = 0 /* a */; // error +var b = 0 /* a */; // error var c = 0 /* a */; -var d = 3; // error +var d = 3; // error var e = 4; -var f = 0 /* a */; // error -var g = 5; // error +var f = 0 /* a */; // error +var g = 5; // error var h = 3; var i = 0 /* a */; i = 0 /* a */; diff --git a/tests/baselines/reference/enumAssignmentCompat2.js b/tests/baselines/reference/enumAssignmentCompat2.js index a76ea2dcf65..7ded9416c11 100644 --- a/tests/baselines/reference/enumAssignmentCompat2.js +++ b/tests/baselines/reference/enumAssignmentCompat2.js @@ -55,14 +55,14 @@ var W; })(W || (W = {})); var x = W; var y = W; -var z = W; // error +var z = W; // error var a = 0 /* a */; -var b = 0 /* a */; // error +var b = 0 /* a */; // error var c = 0 /* a */; -var d = 3; // error +var d = 3; // error var e = 4; -var f = 0 /* a */; // error -var g = 5; // error +var f = 0 /* a */; // error +var g = 5; // error var h = 3; var i = 0 /* a */; i = 0 /* a */; diff --git a/tests/baselines/reference/enumBasics.js b/tests/baselines/reference/enumBasics.js index 5e70967122a..6f1a039ca6e 100644 --- a/tests/baselines/reference/enumBasics.js +++ b/tests/baselines/reference/enumBasics.js @@ -123,13 +123,13 @@ var E5; (function (E5) { E5[E5["A"] = 0] = "A"; E5[E5["B"] = 3] = "B"; - E5[E5["C"] = 4] = "C"; // 4 + E5[E5["C"] = 4] = "C"; // 4 })(E5 || (E5 = {})); var E6; (function (E6) { E6[E6["A"] = 0] = "A"; E6[E6["B"] = 0] = "B"; - E6[E6["C"] = 1] = "C"; // 1 + E6[E6["C"] = 1] = "C"; // 1 })(E6 || (E6 = {})); // Enum with computed member initializer of type 'any' var E7; diff --git a/tests/baselines/reference/enumIndexer.js b/tests/baselines/reference/enumIndexer.js index 1ca93a03f2a..f9f71a3ff98 100644 --- a/tests/baselines/reference/enumIndexer.js +++ b/tests/baselines/reference/enumIndexer.js @@ -15,4 +15,4 @@ var MyEnumType; })(MyEnumType || (MyEnumType = {})); var _arr = [{ key: 'foo' }, { key: 'bar' }]; var enumValue = 0 /* foo */; -var x = _arr.map(function (o) { return MyEnumType[o.key] === enumValue; }); // these are not same type +var x = _arr.map(function (o) { return MyEnumType[o.key] === enumValue; }); // these are not same type diff --git a/tests/baselines/reference/enumNumbering1.js b/tests/baselines/reference/enumNumbering1.js index d2e95c38c3e..f5b09d10f40 100644 --- a/tests/baselines/reference/enumNumbering1.js +++ b/tests/baselines/reference/enumNumbering1.js @@ -15,5 +15,5 @@ var Test; Test[Test["B"] = 1] = "B"; Test[Test["C"] = Math.floor(Math.random() * 1000)] = "C"; Test[Test["D"] = 10] = "D"; - Test[Test["E"] = 11] = "E"; // Error but shouldn't be + Test[Test["E"] = 11] = "E"; // Error but shouldn't be })(Test || (Test = {})); diff --git a/tests/baselines/reference/enumPropertyAccess.js b/tests/baselines/reference/enumPropertyAccess.js index 9e4b48e2d1b..7b74e6272bc 100644 --- a/tests/baselines/reference/enumPropertyAccess.js +++ b/tests/baselines/reference/enumPropertyAccess.js @@ -20,8 +20,8 @@ var Colors; Colors[Colors["Red"] = 0] = "Red"; Colors[Colors["Green"] = 1] = "Green"; })(Colors || (Colors = {})); -var x = 0 /* Red */; // type of 'x' should be 'Colors' -var p = x.Green; // error +var x = 0 /* Red */; // type of 'x' should be 'Colors' +var p = x.Green; // error x.toFixed(); // Now with generics function fill(f) { diff --git a/tests/baselines/reference/errorOnContextuallyTypedReturnType.js b/tests/baselines/reference/errorOnContextuallyTypedReturnType.js index 9c602901e47..2a49ccd2b67 100644 --- a/tests/baselines/reference/errorOnContextuallyTypedReturnType.js +++ b/tests/baselines/reference/errorOnContextuallyTypedReturnType.js @@ -5,6 +5,6 @@ var n2: () => boolean = function ():boolean { }; // expect an error here //// [errorOnContextuallyTypedReturnType.js] var n1 = function () { -}; // expect an error here +}; // expect an error here var n2 = function () { -}; // expect an error here +}; // expect an error here diff --git a/tests/baselines/reference/es6MemberScoping.js b/tests/baselines/reference/es6MemberScoping.js index 9e553adb10e..85f76a93934 100644 --- a/tests/baselines/reference/es6MemberScoping.js +++ b/tests/baselines/reference/es6MemberScoping.js @@ -20,7 +20,7 @@ class Foo2 { //// [es6MemberScoping.js] var Foo = (function () { function Foo(store) { - this._store = store; // should be an error. + this._store = store; // should be an error. } Foo.prototype.foo = function () { return this._store.length; @@ -32,6 +32,6 @@ var Foo2 = (function () { } Foo2.Foo2 = function () { return 0; - }; // should not be an error + }; // should not be an error return Foo2; })(); diff --git a/tests/baselines/reference/exportAssignedTypeAsTypeAnnotation.js b/tests/baselines/reference/exportAssignedTypeAsTypeAnnotation.js index db6f522e7cb..40a370caf41 100644 --- a/tests/baselines/reference/exportAssignedTypeAsTypeAnnotation.js +++ b/tests/baselines/reference/exportAssignedTypeAsTypeAnnotation.js @@ -19,5 +19,5 @@ define(["require", "exports"], function (require, exports) { }); //// [exportAssignedTypeAsTypeAnnotation_1.js] define(["require", "exports"], function (require, exports) { - var t2; // should not raise a 'container type' error + var t2; // should not raise a 'container type' error }); diff --git a/tests/baselines/reference/exportAssignmentConstrainedGenericType.js b/tests/baselines/reference/exportAssignmentConstrainedGenericType.js index 6f80f642c2a..b62cc8251be 100644 --- a/tests/baselines/reference/exportAssignmentConstrainedGenericType.js +++ b/tests/baselines/reference/exportAssignmentConstrainedGenericType.js @@ -23,6 +23,6 @@ var Foo = (function () { module.exports = Foo; //// [foo_1.js] var foo = require("./foo_0"); -var x = new foo(true); // Should error -var y = new foo({ a: "test", b: 42 }); // Should be OK +var x = new foo(true); // Should error +var y = new foo({ a: "test", b: 42 }); // Should be OK var z = y.test.b; diff --git a/tests/baselines/reference/exportAssignmentOfDeclaredExternalModule.js b/tests/baselines/reference/exportAssignmentOfDeclaredExternalModule.js index 41b5a77009f..12895c6638d 100644 --- a/tests/baselines/reference/exportAssignmentOfDeclaredExternalModule.js +++ b/tests/baselines/reference/exportAssignmentOfDeclaredExternalModule.js @@ -18,8 +18,8 @@ var b = z(); // call signature - no error //// [exportAssignmentOfDeclaredExternalModule_0.js] //// [exportAssignmentOfDeclaredExternalModule_1.js] -var x = new Sammy(); // error to use as constructor as there is not constructor symbol -var y = Sammy(); // error to use interface name as call target -var z; // no error - z is of type interface Sammy from module 'M' -var a = new z(); // constructor - no error +var x = new Sammy(); // error to use as constructor as there is not constructor symbol +var y = Sammy(); // error to use interface name as call target +var z; // no error - z is of type interface Sammy from module 'M' +var a = new z(); // constructor - no error var b = z(); // call signature - no error diff --git a/tests/baselines/reference/exportPrivateType.js b/tests/baselines/reference/exportPrivateType.js index b5c6b0658fb..96acc83edb5 100644 --- a/tests/baselines/reference/exportPrivateType.js +++ b/tests/baselines/reference/exportPrivateType.js @@ -52,4 +52,4 @@ var foo; foo.g; foo.h; })(foo || (foo = {})); -var y = foo.g; // Exported variable 'y' has or is using private type 'foo.C2'. +var y = foo.g; // Exported variable 'y' has or is using private type 'foo.C2'. diff --git a/tests/baselines/reference/extendNonClassSymbol2.js b/tests/baselines/reference/extendNonClassSymbol2.js index 5e7436c1209..f9f79f708ee 100644 --- a/tests/baselines/reference/extendNonClassSymbol2.js +++ b/tests/baselines/reference/extendNonClassSymbol2.js @@ -15,7 +15,7 @@ var __extends = this.__extends || function (d, b) { function Foo() { this.x = 1; } -var x = new Foo(); // legal, considered a constructor function +var x = new Foo(); // legal, considered a constructor function var C = (function (_super) { __extends(C, _super); function C() { diff --git a/tests/baselines/reference/externalModuleExportingGenericClass.js b/tests/baselines/reference/externalModuleExportingGenericClass.js index b7bc86df6d3..14f18ddfc04 100644 --- a/tests/baselines/reference/externalModuleExportingGenericClass.js +++ b/tests/baselines/reference/externalModuleExportingGenericClass.js @@ -24,6 +24,6 @@ var C = (function () { module.exports = C; //// [externalModuleExportingGenericClass_file1.js] var a = require('externalModuleExportingGenericClass_file0'); -var v; // this should report error +var v; // this should report error var v2 = (new a()).foo; var v3 = (new a()).foo; diff --git a/tests/baselines/reference/functionConstraintSatisfaction2.js b/tests/baselines/reference/functionConstraintSatisfaction2.js index 72dcaaf0855..e204b6c0adb 100644 --- a/tests/baselines/reference/functionConstraintSatisfaction2.js +++ b/tests/baselines/reference/functionConstraintSatisfaction2.js @@ -69,7 +69,7 @@ var r = foo2(new Function()); var r2 = foo2(function (x) { return x; }); var r6 = foo2(C); var r7 = foo2(b); -var r8 = foo2(function (x) { return x; }); // no error expected +var r8 = foo2(function (x) { return x; }); // no error expected var r11 = foo2(function (x, y) { return x; }); var r13 = foo2(C2); var r14 = foo2(b2); diff --git a/tests/baselines/reference/functionSignatureAssignmentCompat1.js b/tests/baselines/reference/functionSignatureAssignmentCompat1.js index 4073a1ea338..737d27be484 100644 --- a/tests/baselines/reference/functionSignatureAssignmentCompat1.js +++ b/tests/baselines/reference/functionSignatureAssignmentCompat1.js @@ -13,6 +13,6 @@ var e: ParserFunc = parsers.readline(); // ok //// [functionSignatureAssignmentCompat1.js] var parsers; -var c = parsers.raw; // ok! -var d = parsers.readline; // not ok +var c = parsers.raw; // ok! +var d = parsers.readline; // not ok var e = parsers.readline(); // ok diff --git a/tests/baselines/reference/funduleUsedAcrossFileBoundary.js b/tests/baselines/reference/funduleUsedAcrossFileBoundary.js index a74b2ba1c29..ef06bdbc784 100644 --- a/tests/baselines/reference/funduleUsedAcrossFileBoundary.js +++ b/tests/baselines/reference/funduleUsedAcrossFileBoundary.js @@ -17,5 +17,5 @@ function promiseWithCancellation(promise: Q.Promise) { //// [funduleUsedAcrossFileBoundary_file1.js] //// [funduleUsedAcrossFileBoundary_file2.js] function promiseWithCancellation(promise) { - var deferred = Q.defer(); // used to be an error + var deferred = Q.defer(); // used to be an error } diff --git a/tests/baselines/reference/genericArrayAssignmentCompatErrors.js b/tests/baselines/reference/genericArrayAssignmentCompatErrors.js index de52dc59d30..8006ced4f1f 100644 --- a/tests/baselines/reference/genericArrayAssignmentCompatErrors.js +++ b/tests/baselines/reference/genericArrayAssignmentCompatErrors.js @@ -25,7 +25,7 @@ myCars3 = myCars5; var myCars = new Array(); var myCars2 = new []; var myCars3 = new Array({}); -var myCars4; // error +var myCars4; // error var myCars5; myCars = myCars2; myCars = myCars3; diff --git a/tests/baselines/reference/genericArrayMethods1.js b/tests/baselines/reference/genericArrayMethods1.js index bfa1f1a389e..c7fca1ee6b7 100644 --- a/tests/baselines/reference/genericArrayMethods1.js +++ b/tests/baselines/reference/genericArrayMethods1.js @@ -3,4 +3,4 @@ var x:string[] = [0,1].slice(0); // this should be an error //// [genericArrayMethods1.js] -var x = [0, 1].slice(0); // this should be an error +var x = [0, 1].slice(0); // this should be an error diff --git a/tests/baselines/reference/genericCallSpecializedToTypeArg.js b/tests/baselines/reference/genericCallSpecializedToTypeArg.js index 41612adfa10..4561959649b 100644 --- a/tests/baselines/reference/genericCallSpecializedToTypeArg.js +++ b/tests/baselines/reference/genericCallSpecializedToTypeArg.js @@ -14,7 +14,7 @@ function dupe(x) { return x; } function dupeAndGetDist(x) { - var y = dupe(x); //<-- dupe has incorrect type here + var y = dupe(x); //<-- dupe has incorrect type here y.getDist(); return y; } diff --git a/tests/baselines/reference/genericCallTypeArgumentInference.js b/tests/baselines/reference/genericCallTypeArgumentInference.js index f8fa9c47711..606ec231129 100644 --- a/tests/baselines/reference/genericCallTypeArgumentInference.js +++ b/tests/baselines/reference/genericCallTypeArgumentInference.js @@ -96,7 +96,7 @@ var r11 = i.foo8(); // {} function foo(t) { return t; } -var r = foo(''); // string +var r = foo(''); // string function foo2(t, u) { return u; } @@ -104,8 +104,8 @@ function foo2b(u) { var x; return x; } -var r2 = foo2('', 1); // number -var r3 = foo2b(1); // {} +var r2 = foo2('', 1); // number +var r3 = foo2b(1); // {} var C = (function () { function C(t, u) { this.t = t; @@ -141,20 +141,20 @@ var C = (function () { return C; })(); var c = new C('', 1); -var r4 = c.foo('', 1); // string -var r5 = c.foo2('', 1); // number -var r6 = c.foo3(true, 1); // boolean -var r7 = c.foo4('', true); // string -var r8 = c.foo5(true, 1); // boolean -var r9 = c.foo6(); // {} -var r10 = c.foo7(''); // {} -var r11 = c.foo8(); // {} +var r4 = c.foo('', 1); // string +var r5 = c.foo2('', 1); // number +var r6 = c.foo3(true, 1); // boolean +var r7 = c.foo4('', true); // string +var r8 = c.foo5(true, 1); // boolean +var r9 = c.foo6(); // {} +var r10 = c.foo7(''); // {} +var r11 = c.foo8(); // {} var i; -var r4 = i.foo('', 1); // string -var r5 = i.foo2('', 1); // number -var r6 = i.foo3(true, 1); // boolean -var r7 = i.foo4('', true); // string -var r8 = i.foo5(true, 1); // boolean -var r9 = i.foo6(); // {} -var r10 = i.foo7(''); // {} +var r4 = i.foo('', 1); // string +var r5 = i.foo2('', 1); // number +var r6 = i.foo3(true, 1); // boolean +var r7 = i.foo4('', true); // string +var r8 = i.foo5(true, 1); // boolean +var r9 = i.foo6(); // {} +var r10 = i.foo7(''); // {} var r11 = i.foo8(); // {} diff --git a/tests/baselines/reference/genericCallWithArrayLiteralArgs.js b/tests/baselines/reference/genericCallWithArrayLiteralArgs.js index 5eae5734735..ba8c2884fff 100644 --- a/tests/baselines/reference/genericCallWithArrayLiteralArgs.js +++ b/tests/baselines/reference/genericCallWithArrayLiteralArgs.js @@ -17,11 +17,11 @@ var r6 = foo([1, '']); // Object[] function foo(t) { return t; } -var r = foo([1, 2]); // number[] -var r = foo([1, 2]); // number[] -var ra = foo([1, 2]); // any[] -var r2 = foo([]); // any[] -var r3 = foo([]); // number[] -var r4 = foo([1, '']); // {}[] -var r5 = foo([1, '']); // any[] -var r6 = foo([1, '']); // Object[] +var r = foo([1, 2]); // number[] +var r = foo([1, 2]); // number[] +var ra = foo([1, 2]); // any[] +var r2 = foo([]); // any[] +var r3 = foo([]); // number[] +var r4 = foo([1, '']); // {}[] +var r5 = foo([1, '']); // any[] +var r6 = foo([1, '']); // Object[] diff --git a/tests/baselines/reference/genericCallWithConstraintsTypeArgumentInference.js b/tests/baselines/reference/genericCallWithConstraintsTypeArgumentInference.js index 8887903da6e..e8c8222f1e9 100644 --- a/tests/baselines/reference/genericCallWithConstraintsTypeArgumentInference.js +++ b/tests/baselines/reference/genericCallWithConstraintsTypeArgumentInference.js @@ -140,8 +140,8 @@ var d2; function foo(t) { return t; } -var r = foo(b); // Base -var r2 = foo(d1); // Derived +var r = foo(b); // Base +var r2 = foo(d1); // Derived function foo2(t, u) { return u; } @@ -153,8 +153,8 @@ function foo2c() { var x; return x; } -var r3 = foo2b(d1); // Base -var r3b = foo2c(); // Base +var r3 = foo2b(d1); // Base +var r3b = foo2c(); // Base var C = (function () { function C(t, u) { this.t = t; @@ -190,22 +190,22 @@ var C = (function () { return C; })(); var c = new C(b, d1); -var r4 = c.foo(d1, d2); // Base -var r5 = c.foo2(b, d2); // Derived -var r6 = c.foo3(d1, d1); // Derived -var r7 = c.foo4(d1, d2); // Base -var r8 = c.foo5(d1, d2); // Derived -var r8b = c.foo5(d2, d2); // Derived2 -var r9 = c.foo6(); // Derived -var r10 = c.foo7(d1); // Base -var r11 = c.foo8(); // Base +var r4 = c.foo(d1, d2); // Base +var r5 = c.foo2(b, d2); // Derived +var r6 = c.foo3(d1, d1); // Derived +var r7 = c.foo4(d1, d2); // Base +var r8 = c.foo5(d1, d2); // Derived +var r8b = c.foo5(d2, d2); // Derived2 +var r9 = c.foo6(); // Derived +var r10 = c.foo7(d1); // Base +var r11 = c.foo8(); // Base var i; -var r4 = i.foo(d1, d2); // Base -var r5 = i.foo2(b, d2); // Derived -var r6 = i.foo3(d1, d1); // Derived -var r7 = i.foo4(d1, d2); // Base -var r8 = i.foo5(d1, d2); // Derived -var r8b = i.foo5(d2, d2); // Derived2 -var r9 = i.foo6(); // Derived -var r10 = i.foo7(d1); // Base -var r11 = i.foo8(); // Base +var r4 = i.foo(d1, d2); // Base +var r5 = i.foo2(b, d2); // Derived +var r6 = i.foo3(d1, d1); // Derived +var r7 = i.foo4(d1, d2); // Base +var r8 = i.foo5(d1, d2); // Derived +var r8b = i.foo5(d2, d2); // Derived2 +var r9 = i.foo6(); // Derived +var r10 = i.foo7(d1); // Base +var r11 = i.foo8(); // Base diff --git a/tests/baselines/reference/genericCallWithConstraintsTypeArgumentInference2.js b/tests/baselines/reference/genericCallWithConstraintsTypeArgumentInference2.js index 90293bcc650..4eade3e00fd 100644 --- a/tests/baselines/reference/genericCallWithConstraintsTypeArgumentInference2.js +++ b/tests/baselines/reference/genericCallWithConstraintsTypeArgumentInference2.js @@ -18,8 +18,8 @@ function foo(t) { var u; return u; } -var r = foo(1); // ok -var r2 = foo(null); // {} -var r3 = foo(new Object()); // {} -var r4 = foo(1); // error +var r = foo(1); // ok +var r2 = foo(null); // {} +var r3 = foo(new Object()); // {} +var r4 = foo(1); // error var r5 = foo(new Date()); // no error diff --git a/tests/baselines/reference/genericCallWithConstructorTypedArguments5.js b/tests/baselines/reference/genericCallWithConstructorTypedArguments5.js index 6c29ca776df..e4a6f43eaa9 100644 --- a/tests/baselines/reference/genericCallWithConstructorTypedArguments5.js +++ b/tests/baselines/reference/genericCallWithConstructorTypedArguments5.js @@ -31,18 +31,18 @@ function foo(arg) { return new arg.cb(null); } var arg; -var r = foo(arg); // {} +var r = foo(arg); // {} // more args not allowed var arg2; -var r2 = foo(arg2); // error +var r2 = foo(arg2); // error var arg3; -var r3 = foo(arg3); // error +var r3 = foo(arg3); // error function foo2(arg) { return new arg.cb(null, null); } // fewer args ok -var r4 = foo(arg); // {} +var r4 = foo(arg); // {} var arg4; -var r6 = foo(arg4); // string +var r6 = foo(arg4); // string var arg5; -var r7 = foo(arg5); // string +var r7 = foo(arg5); // string diff --git a/tests/baselines/reference/genericCallWithFunctionTypedArguments.js b/tests/baselines/reference/genericCallWithFunctionTypedArguments.js index 4b1dc15a56b..8e844cfbc5a 100644 --- a/tests/baselines/reference/genericCallWithFunctionTypedArguments.js +++ b/tests/baselines/reference/genericCallWithFunctionTypedArguments.js @@ -42,31 +42,31 @@ function other(t: T, u: U) { function foo(x) { return x(null); } -var r = foo(function (x) { return ''; }); // {} -var r2 = foo(function (x) { return ''; }); // string -var r3 = foo(function (x) { return ''; }); // {} +var r = foo(function (x) { return ''; }); // {} +var r2 = foo(function (x) { return ''; }); // string +var r3 = foo(function (x) { return ''; }); // {} function foo2(x, cb) { return cb(x); } var r4 = foo2(1, function (a) { return ''; -}); // string, contextual signature instantiation is applied to generic functions -var r5 = foo2(1, function (a) { return ''; }); // string +}); // string, contextual signature instantiation is applied to generic functions +var r5 = foo2(1, function (a) { return ''; }); // string var r6 = foo2('', function (a) { return 1; }); function foo3(x, cb, y) { return cb(x); } -var r7 = foo3(1, function (a) { return ''; }, ''); // string +var r7 = foo3(1, function (a) { return ''; }, ''); // string var r8 = foo3(1, function (a) { return ''; -}, 1); // {} -var r9 = foo3(1, function (a) { return ''; }, ''); // string +}, 1); // {} +var r9 = foo3(1, function (a) { return ''; }, ''); // string function other(t, u) { - var r10 = foo2(1, function (x) { return ''; }); // string, non-generic signature allows inferences to be made - var r10 = foo2(1, function (x) { return ''; }); // string - var r11 = foo3(1, function (x) { return ''; }, ''); // string - var r11b = foo3(1, function (x) { return ''; }, 1); // {} + var r10 = foo2(1, function (x) { return ''; }); // string, non-generic signature allows inferences to be made + var r10 = foo2(1, function (x) { return ''; }); // string + var r11 = foo3(1, function (x) { return ''; }, ''); // string + var r11b = foo3(1, function (x) { return ''; }, 1); // {} var r12 = foo3(1, function (a) { return ''; - }, 1); // {} + }, 1); // {} } diff --git a/tests/baselines/reference/genericCallWithFunctionTypedArguments2.js b/tests/baselines/reference/genericCallWithFunctionTypedArguments2.js index 89a6e2320dd..9bc5168f1e4 100644 --- a/tests/baselines/reference/genericCallWithFunctionTypedArguments2.js +++ b/tests/baselines/reference/genericCallWithFunctionTypedArguments2.js @@ -50,21 +50,21 @@ function foo(x) { var i; var i2; var a; -var r = foo(i); // any -var r2 = foo(i); // string -var r3 = foo(i2); // string -var r3b = foo(a); // any +var r = foo(i); // any +var r2 = foo(i); // string +var r3 = foo(i2); // string +var r3b = foo(a); // any function foo2(x, cb) { return new cb(x); } -var r4 = foo2(1, i2); // string, instantiated generic -var r4b = foo2(1, a); // any -var r5 = foo2(1, i); // any -var r6 = foo2('', i2); // string +var r4 = foo2(1, i2); // string, instantiated generic +var r4b = foo2(1, a); // any +var r5 = foo2(1, i); // any +var r6 = foo2('', i2); // string function foo3(x, cb, y) { return new cb(x); } -var r7 = foo3(null, i, ''); // any -var r7b = foo3(null, a, ''); // any -var r8 = foo3(1, i2, 1); // {} +var r7 = foo3(null, i, ''); // any +var r7b = foo3(null, a, ''); // any +var r8 = foo3(1, i2, 1); // {} var r9 = foo3('', i2, ''); // string diff --git a/tests/baselines/reference/genericCallWithFunctionTypedArguments3.js b/tests/baselines/reference/genericCallWithFunctionTypedArguments3.js index 52d630c0c76..97f5bfda306 100644 --- a/tests/baselines/reference/genericCallWithFunctionTypedArguments3.js +++ b/tests/baselines/reference/genericCallWithFunctionTypedArguments3.js @@ -27,6 +27,6 @@ function foo4(cb) { var u; return u; } -var r = foo4(a); // T is {} (candidates boolean and string), U is any (candidates any and boolean) +var r = foo4(a); // T is {} (candidates boolean and string), U is any (candidates any and boolean) var b; var r2 = foo4(b); // T is {} (candidates boolean and {}), U is any (candidates any and {}) diff --git a/tests/baselines/reference/genericCallWithFunctionTypedArguments4.js b/tests/baselines/reference/genericCallWithFunctionTypedArguments4.js index ef10d398943..7a4daaeda64 100644 --- a/tests/baselines/reference/genericCallWithFunctionTypedArguments4.js +++ b/tests/baselines/reference/genericCallWithFunctionTypedArguments4.js @@ -39,6 +39,6 @@ function foo4(cb) { var u; return u; } -var r = foo4(a); // T is {} (candidates boolean and string), U is {} (candidates C and D) +var r = foo4(a); // T is {} (candidates boolean and string), U is {} (candidates C and D) var b; var r2 = foo4(b); // T is {} (candidates boolean and {}), U is any (candidates any and {}) diff --git a/tests/baselines/reference/genericCallWithFunctionTypedArguments5.js b/tests/baselines/reference/genericCallWithFunctionTypedArguments5.js index 263d2498388..4e3e20071b2 100644 --- a/tests/baselines/reference/genericCallWithFunctionTypedArguments5.js +++ b/tests/baselines/reference/genericCallWithFunctionTypedArguments5.js @@ -28,15 +28,15 @@ function foo(arg) { return arg.cb(null); } var arg = { cb: function (x) { return ''; } }; -var r = foo(arg); // {} +var r = foo(arg); // {} // more args not allowed -var r2 = foo({ cb: function (x, y) { return ''; } }); // error -var r3 = foo({ cb: function (x, y) { return ''; } }); // error +var r2 = foo({ cb: function (x, y) { return ''; } }); // error +var r3 = foo({ cb: function (x, y) { return ''; } }); // error function foo2(arg) { return arg.cb(null, null); } // fewer args ok -var r4 = foo(arg); // {} -var r5 = foo({ cb: function (x) { return ''; } }); // {} -var r6 = foo({ cb: function (x) { return ''; } }); // string -var r7 = foo({ cb: function () { return ''; } }); // string +var r4 = foo(arg); // {} +var r5 = foo({ cb: function (x) { return ''; } }); // {} +var r6 = foo({ cb: function (x) { return ''; } }); // string +var r7 = foo({ cb: function () { return ''; } }); // string diff --git a/tests/baselines/reference/genericCallWithGenericSignatureArguments.js b/tests/baselines/reference/genericCallWithGenericSignatureArguments.js index 4ad309a9a4a..9342691aa5a 100644 --- a/tests/baselines/reference/genericCallWithGenericSignatureArguments.js +++ b/tests/baselines/reference/genericCallWithGenericSignatureArguments.js @@ -50,21 +50,21 @@ function foo(a, b) { return r; } //var r1 = foo((x: number) => 1, (x: string) => ''); // error -var r1b = foo(function (x) { return 1; }, function (x) { return ''; }); // {} => {} -var r2 = foo(function (x) { return null; }, function (x) { return ''; }); // Object => Object -var r3 = foo(function (x) { return 1; }, function (x) { return null; }); // number => number -var r3ii = foo(function (x) { return 1; }, function (x) { return 1; }); // number => number +var r1b = foo(function (x) { return 1; }, function (x) { return ''; }); // {} => {} +var r2 = foo(function (x) { return null; }, function (x) { return ''; }); // Object => Object +var r3 = foo(function (x) { return 1; }, function (x) { return null; }); // number => number +var r3ii = foo(function (x) { return 1; }, function (x) { return 1; }); // number => number var a; var b; -var r4 = foo(function (x) { return a; }, function (x) { return b; }); // typeof a => typeof a -var r5 = foo(function (x) { return b; }, function (x) { return a; }); // typeof b => typeof b +var r4 = foo(function (x) { return a; }, function (x) { return b; }); // typeof a => typeof a +var r5 = foo(function (x) { return b; }, function (x) { return a; }); // typeof b => typeof b function other(x) { - var r6 = foo(function (a) { return a; }, function (b) { return b; }); // T => T - var r6b = foo(function (a) { return a; }, function (b) { return b; }); // {} => {} + var r6 = foo(function (a) { return a; }, function (b) { return b; }); // T => T + var r6b = foo(function (a) { return a; }, function (b) { return b; }); // {} => {} } function other2(x) { - var r7 = foo(function (a) { return a; }, function (b) { return b; }); // T => T - var r7b = foo(function (a) { return a; }, function (b) { return b; }); // {} => {} + var r7 = foo(function (a) { return a; }, function (b) { return b; }); // T => T + var r7b = foo(function (a) { return a; }, function (b) { return b; }); // {} => {} var r8 = r7(null); } function foo2(a, b) { @@ -72,5 +72,5 @@ function foo2(a, b) { return r; } function other3(x) { - var r8 = foo2(function (a) { return a; }, function (b) { return b; }); // Date => Date + var r8 = foo2(function (a) { return a; }, function (b) { return b; }); // Date => Date } diff --git a/tests/baselines/reference/genericCallWithGenericSignatureArguments2.js b/tests/baselines/reference/genericCallWithGenericSignatureArguments2.js index f3102623202..fa72febbfdc 100644 --- a/tests/baselines/reference/genericCallWithGenericSignatureArguments2.js +++ b/tests/baselines/reference/genericCallWithGenericSignatureArguments2.js @@ -45,18 +45,18 @@ function foo(a, b) { } var r1 = foo(function (x) { return 1; }, function (x) { return ''; }); function other2(x) { - var r7 = foo(function (a) { return a; }, function (b) { return b; }); // T => T + var r7 = foo(function (a) { return a; }, function (b) { return b; }); // T => T // BUG 835518 - var r9 = r7(new Date()); // should be ok - var r10 = r7(1); // error + var r9 = r7(new Date()); // should be ok + var r10 = r7(1); // error } function foo2(a, b) { var r; return r; } function other3(x) { - var r7 = foo2(function (a) { return a; }, function (b) { return b; }); // error - var r7b = foo2(function (a) { return a; }, function (b) { return b; }); // valid, T is inferred to be Date + var r7 = foo2(function (a) { return a; }, function (b) { return b; }); // error + var r7b = foo2(function (a) { return a; }, function (b) { return b; }); // valid, T is inferred to be Date } var E; (function (E) { diff --git a/tests/baselines/reference/genericCallWithGenericSignatureArguments3.js b/tests/baselines/reference/genericCallWithGenericSignatureArguments3.js index cf11ed14289..25ae6b48e26 100644 --- a/tests/baselines/reference/genericCallWithGenericSignatureArguments3.js +++ b/tests/baselines/reference/genericCallWithGenericSignatureArguments3.js @@ -40,12 +40,12 @@ function foo(x, a, b) { var r; return r; } -var r1 = foo('', function (x) { return ''; }, function (x) { return null; }); // any => any -var r1ii = foo('', function (x) { return ''; }, function (x) { return null; }); // string => string -var r2 = foo('', function (x) { return ''; }, function (x) { return ''; }); // string => string -var r3 = foo(null, function (x) { return ''; }, function (x) { return ''; }); // Object => Object -var r4 = foo(null, function (x) { return ''; }, function (x) { return ''; }); // any => any -var r5 = foo(new Object(), function (x) { return ''; }, function (x) { return ''; }); // Object => Object +var r1 = foo('', function (x) { return ''; }, function (x) { return null; }); // any => any +var r1ii = foo('', function (x) { return ''; }, function (x) { return null; }); // string => string +var r2 = foo('', function (x) { return ''; }, function (x) { return ''; }); // string => string +var r3 = foo(null, function (x) { return ''; }, function (x) { return ''; }); // Object => Object +var r4 = foo(null, function (x) { return ''; }, function (x) { return ''; }); // any => any +var r5 = foo(new Object(), function (x) { return ''; }, function (x) { return ''; }); // Object => Object var E; (function (E) { E[E["A"] = 0] = "A"; @@ -54,14 +54,14 @@ var F; (function (F) { F[F["A"] = 0] = "A"; })(F || (F = {})); -var r6 = foo(0 /* A */, function (x) { return 0 /* A */; }, function (x) { return 0 /* A */; }); // number => number +var r6 = foo(0 /* A */, function (x) { return 0 /* A */; }, function (x) { return 0 /* A */; }); // number => number function foo2(x, a, b) { var r; return r; } -var r8 = foo2('', function (x) { return ''; }, function (x) { return null; }); // string => string -var r9 = foo2(null, function (x) { return ''; }, function (x) { return ''; }); // any => any -var r10 = foo2(null, function (x) { return ''; }, function (x) { return ''; }); // Object => Object +var r8 = foo2('', function (x) { return ''; }, function (x) { return null; }); // string => string +var r9 = foo2(null, function (x) { return ''; }, function (x) { return ''; }); // any => any +var r10 = foo2(null, function (x) { return ''; }, function (x) { return ''; }); // Object => Object var x; -var r11 = foo2(x, function (a1) { return function (n) { return 1; }; }, function (a2) { return 2; }); // {} => {} +var r11 = foo2(x, function (a1) { return function (n) { return 1; }; }, function (a2) { return 2; }); // {} => {} var r12 = foo2(x, function (a1) { return function (n) { return 1; }; }, function (a2) { return 2; }); // (string => boolean) => {} diff --git a/tests/baselines/reference/genericCallWithNonSymmetricSubtypes.js b/tests/baselines/reference/genericCallWithNonSymmetricSubtypes.js index 45b353f6eab..d9f84977df0 100644 --- a/tests/baselines/reference/genericCallWithNonSymmetricSubtypes.js +++ b/tests/baselines/reference/genericCallWithNonSymmetricSubtypes.js @@ -40,17 +40,17 @@ function foo(x, y) { } var a; var b; -var r = foo(a, b); // { x: number; y?: number; }; -var r2 = foo(b, a); // { x: number; z?: number; }; +var r = foo(a, b); // { x: number; y?: number; }; +var r2 = foo(b, a); // { x: number; z?: number; }; var x; var y; -var r3 = foo(a, x); // { x: number; y?: number; }; -var r4 = foo(x, a); // { x: number; }; -var r5 = foo(a, y); // { x?: number; }; -var r5 = foo(y, a); // { x?: number; }; -var r6 = foo(x, y); // { x?: number; }; -var r6 = foo(y, x); // { x?: number; }; +var r3 = foo(a, x); // { x: number; y?: number; }; +var r4 = foo(x, a); // { x: number; }; +var r5 = foo(a, y); // { x?: number; }; +var r5 = foo(y, a); // { x?: number; }; +var r6 = foo(x, y); // { x?: number; }; +var r6 = foo(y, x); // { x?: number; }; var s1; var s2; -var r7 = foo(s1, s2); // (x: Object) => string; +var r7 = foo(s1, s2); // (x: Object) => string; var r8 = foo(s2, s1); // (x: string) => string; diff --git a/tests/baselines/reference/genericCallWithObjectLiteralArgs.js b/tests/baselines/reference/genericCallWithObjectLiteralArgs.js index f4eb4abf61f..117cbc114a1 100644 --- a/tests/baselines/reference/genericCallWithObjectLiteralArgs.js +++ b/tests/baselines/reference/genericCallWithObjectLiteralArgs.js @@ -13,8 +13,8 @@ var r4 = foo({ bar: 1, baz: '' }); // T = Object function foo(x) { return x; } -var r = foo({ bar: 1, baz: '' }); // T = {} -var r2 = foo({ bar: 1, baz: 1 }); // T = number +var r = foo({ bar: 1, baz: '' }); // T = {} +var r2 = foo({ bar: 1, baz: 1 }); // T = number // BUG 835724 -var r3 = foo({ bar: foo, baz: foo }); // T = any +var r3 = foo({ bar: foo, baz: foo }); // T = any var r4 = foo({ bar: 1, baz: '' }); // T = Object diff --git a/tests/baselines/reference/genericCallWithObjectLiteralArguments1.js b/tests/baselines/reference/genericCallWithObjectLiteralArguments1.js index c533c6ab00b..293a54e425f 100644 --- a/tests/baselines/reference/genericCallWithObjectLiteralArguments1.js +++ b/tests/baselines/reference/genericCallWithObjectLiteralArguments1.js @@ -11,7 +11,7 @@ var x5 = foo({ x: "", y: 4 }, ""); function foo(n, m) { return m; } -var x = foo({ x: 3, y: "" }, 4); // no error, x is Object, the best common type +var x = foo({ x: 3, y: "" }, 4); // no error, x is Object, the best common type // these are all errors var x2 = foo({ x: 3, y: "" }, 4); var x3 = foo({ x: 3, y: "" }, 4); diff --git a/tests/baselines/reference/genericCallWithObjectTypeArgs.js b/tests/baselines/reference/genericCallWithObjectTypeArgs.js index 61e37f3189a..c51a5f2495d 100644 --- a/tests/baselines/reference/genericCallWithObjectTypeArgs.js +++ b/tests/baselines/reference/genericCallWithObjectTypeArgs.js @@ -43,5 +43,5 @@ function foo(t, t2) { } var c1 = new X(); var d1 = new X(); -var r = foo(c1, d1); // error +var r = foo(c1, d1); // error var r2 = foo(c1, c1); // ok diff --git a/tests/baselines/reference/genericCallWithObjectTypeArgs2.js b/tests/baselines/reference/genericCallWithObjectTypeArgs2.js index 9b93622c4ac..d4012fbc641 100644 --- a/tests/baselines/reference/genericCallWithObjectTypeArgs2.js +++ b/tests/baselines/reference/genericCallWithObjectTypeArgs2.js @@ -62,11 +62,11 @@ var Derived2 = (function (_super) { function f(a) { return [a.x, a.y]; } -var r = f({ x: new Derived(), y: new Derived2() }); // {}[] -var r2 = f({ x: new Base(), y: new Derived2() }); // {}[] +var r = f({ x: new Derived(), y: new Derived2() }); // {}[] +var r2 = f({ x: new Base(), y: new Derived2() }); // {}[] function f2(a) { return function (x) { return a.y; }; } -var r3 = f2({ x: new Derived(), y: new Derived2() }); // Derived => Derived2 +var r3 = f2({ x: new Derived(), y: new Derived2() }); // Derived => Derived2 var i; var r4 = f2(i); // Base => Derived diff --git a/tests/baselines/reference/genericCallWithObjectTypeArgsAndConstraints2.js b/tests/baselines/reference/genericCallWithObjectTypeArgsAndConstraints2.js index a650faebec0..5803aa0bd54 100644 --- a/tests/baselines/reference/genericCallWithObjectTypeArgsAndConstraints2.js +++ b/tests/baselines/reference/genericCallWithObjectTypeArgsAndConstraints2.js @@ -76,5 +76,5 @@ function f3(x, y) { } var r4 = f3(new Base(), function (x) { return x; }); var r5 = f3(new Derived(), function (x) { return x; }); -var r6 = f3(null, null); // any -var r7 = f3(null, function (x) { return x; }); // any +var r6 = f3(null, null); // any +var r7 = f3(null, function (x) { return x; }); // any diff --git a/tests/baselines/reference/genericCallWithObjectTypeArgsAndConstraints3.js b/tests/baselines/reference/genericCallWithObjectTypeArgsAndConstraints3.js index beaf68e5407..839968ade9b 100644 --- a/tests/baselines/reference/genericCallWithObjectTypeArgsAndConstraints3.js +++ b/tests/baselines/reference/genericCallWithObjectTypeArgsAndConstraints3.js @@ -68,13 +68,13 @@ function f(a) { var r; return r; } -var r1 = f({ x: new Derived(), y: new Derived2() }); // ok, both extend Base +var r1 = f({ x: new Derived(), y: new Derived2() }); // ok, both extend Base function f2(a) { var r; return r; } -var r2 = f2({ x: new Derived(), y: new Derived2() }); // ok -var r3 = f2({ x: new Derived(), y: new Derived2() }); // ok +var r2 = f2({ x: new Derived(), y: new Derived2() }); // ok +var r3 = f2({ x: new Derived(), y: new Derived2() }); // ok function f3(y, x) { return y(null); } diff --git a/tests/baselines/reference/genericCallWithObjectTypeArgsAndConstraints4.js b/tests/baselines/reference/genericCallWithObjectTypeArgsAndConstraints4.js index 09d85658564..513a0317cf3 100644 --- a/tests/baselines/reference/genericCallWithObjectTypeArgsAndConstraints4.js +++ b/tests/baselines/reference/genericCallWithObjectTypeArgsAndConstraints4.js @@ -51,7 +51,7 @@ function foo(t, t2) { var c; var d; var r = foo(c, d); -var r2 = foo(d, c); // error because C does not extend D +var r2 = foo(d, c); // error because C does not extend D var r3 = foo(c, { x: '', foo: c }); var r4 = foo(null, null); var r5 = foo({}, null); @@ -64,5 +64,5 @@ var r9 = foo(function () { }, function () { return 1; }); function other() { var r4 = foo(c, d); - var r5 = foo(c, d); // error + var r5 = foo(c, d); // error } diff --git a/tests/baselines/reference/genericCallWithObjectTypeArgsAndConstraints5.js b/tests/baselines/reference/genericCallWithObjectTypeArgsAndConstraints5.js index 42257d70ebc..b2cda6e2d81 100644 --- a/tests/baselines/reference/genericCallWithObjectTypeArgsAndConstraints5.js +++ b/tests/baselines/reference/genericCallWithObjectTypeArgsAndConstraints5.js @@ -41,9 +41,9 @@ function foo(t, t2) { } var c; var d; -var r2 = foo(d, c); // the constraints are self-referencing, no downstream error +var r2 = foo(d, c); // the constraints are self-referencing, no downstream error var r9 = foo(function () { return 1; }, function () { -}); // the constraints are self-referencing, no downstream error +}); // the constraints are self-referencing, no downstream error function other() { - var r5 = foo(c, d); // error + var r5 = foo(c, d); // error } diff --git a/tests/baselines/reference/genericCallWithObjectTypeArgsAndIndexersErrors.js b/tests/baselines/reference/genericCallWithObjectTypeArgsAndIndexersErrors.js index 5d24b71bd7a..0c33d3cad15 100644 --- a/tests/baselines/reference/genericCallWithObjectTypeArgsAndIndexersErrors.js +++ b/tests/baselines/reference/genericCallWithObjectTypeArgsAndIndexersErrors.js @@ -31,12 +31,12 @@ function foo(x) { } function other(arg) { var b; - var r2 = foo(b); // T + var r2 = foo(b); // T } function other3(arg) { var b; var r2 = foo(b); var d = r2[1]; var e = r2['1']; - var u = r2[1]; // ok + var u = r2[1]; // ok } diff --git a/tests/baselines/reference/genericCallWithObjectTypeArgsAndInitializers.js b/tests/baselines/reference/genericCallWithObjectTypeArgsAndInitializers.js index 2a566810d68..c92b4c90ef3 100644 --- a/tests/baselines/reference/genericCallWithObjectTypeArgsAndInitializers.js +++ b/tests/baselines/reference/genericCallWithObjectTypeArgsAndInitializers.js @@ -14,23 +14,23 @@ function foo7(x: V, y: U = x) { } // should be ok function foo(x) { if (x === void 0) { x = null; } return x; -} // ok +} // ok function foo2(x) { if (x === void 0) { x = undefined; } return x; -} // ok +} // ok function foo3(x) { if (x === void 0) { x = 1; } -} // error +} // error function foo4(x, y) { if (y === void 0) { y = x; } -} // error +} // error function foo5(x, y) { if (y === void 0) { y = x; } -} // ok +} // ok function foo6(x, y, z) { if (z === void 0) { z = y; } -} // error +} // error function foo7(x, y) { if (y === void 0) { y = x; } } // should be ok diff --git a/tests/baselines/reference/genericCallWithObjectTypeArgsAndNumericIndexer.js b/tests/baselines/reference/genericCallWithObjectTypeArgsAndNumericIndexer.js index 77afe4ed062..8375bf07dcd 100644 --- a/tests/baselines/reference/genericCallWithObjectTypeArgsAndNumericIndexer.js +++ b/tests/baselines/reference/genericCallWithObjectTypeArgsAndNumericIndexer.js @@ -43,7 +43,7 @@ var a; var r = foo(a); function other(arg) { var b; - var r2 = foo(b); // T + var r2 = foo(b); // T } function other2(arg) { var b; diff --git a/tests/baselines/reference/genericCallWithObjectTypeArgsAndStringIndexer.js b/tests/baselines/reference/genericCallWithObjectTypeArgsAndStringIndexer.js index 65346a23441..dbc1579ab4a 100644 --- a/tests/baselines/reference/genericCallWithObjectTypeArgsAndStringIndexer.js +++ b/tests/baselines/reference/genericCallWithObjectTypeArgsAndStringIndexer.js @@ -44,15 +44,15 @@ var a; var r = foo(a); function other(arg) { var b; - var r2 = foo(b); // T + var r2 = foo(b); // T } function other2(arg) { var b; var r2 = foo(b); - var d = r2['hm']; // ok + var d = r2['hm']; // ok } function other3(arg) { var b; var r2 = foo(b); - var d = r2['hm']; // ok + var d = r2['hm']; // ok } diff --git a/tests/baselines/reference/genericCallWithOverloadedConstructorTypedArguments.js b/tests/baselines/reference/genericCallWithOverloadedConstructorTypedArguments.js index bb1ca57473a..9da34ebad86 100644 --- a/tests/baselines/reference/genericCallWithOverloadedConstructorTypedArguments.js +++ b/tests/baselines/reference/genericCallWithOverloadedConstructorTypedArguments.js @@ -67,20 +67,20 @@ var GenericParameter; return cb; } var a; - var r5 = foo5(a); // new{} => string; new(x:number) => {} + var r5 = foo5(a); // new{} => string; new(x:number) => {} var b; - var r7 = foo5(b); // new any => string; new(x:number) => any + var r7 = foo5(b); // new any => string; new(x:number) => any function foo6(cb) { return cb; } - var r8 = foo6(a); // new{} => string; new(x:{}, y?:{}) => string - var r9 = foo6(b); // new any => string; new(x:any, y?:any) => string + var r8 = foo6(a); // new{} => string; new(x:{}, y?:{}) => string + var r9 = foo6(b); // new any => string; new(x:any, y?:any) => string function foo7(x, cb) { return cb; } - var r13 = foo7(1, b); // new any => string; new(x:any, y?:any) => string + var r13 = foo7(1, b); // new any => string; new(x:any, y?:any) => string var c; var c2; - var r14 = foo7(1, c); // new any => string; new(x:any, y?:any) => string - var r15 = foo7(1, c2); // new any => string; new(x:any, y?:any) => string + var r14 = foo7(1, c); // new any => string; new(x:any, y?:any) => string + var r15 = foo7(1, c2); // new any => string; new(x:any, y?:any) => string })(GenericParameter || (GenericParameter = {})); diff --git a/tests/baselines/reference/genericCallWithOverloadedConstructorTypedArguments2.js b/tests/baselines/reference/genericCallWithOverloadedConstructorTypedArguments2.js index 963c9778040..88044f82fdb 100644 --- a/tests/baselines/reference/genericCallWithOverloadedConstructorTypedArguments2.js +++ b/tests/baselines/reference/genericCallWithOverloadedConstructorTypedArguments2.js @@ -50,7 +50,7 @@ var NonGenericParameter; return cb; } var b; - var r3 = foo4(b); // ok + var r3 = foo4(b); // ok })(NonGenericParameter || (NonGenericParameter = {})); var GenericParameter; (function (GenericParameter) { @@ -58,16 +58,16 @@ var GenericParameter; return cb; } var a; - var r6 = foo5(a); // ok + var r6 = foo5(a); // ok function foo6(cb) { return cb; } var b; - var r10 = foo6(b); // error + var r10 = foo6(b); // error function foo7(x, cb) { return cb; } - var r13 = foo7(1, a); // ok + var r13 = foo7(1, a); // ok var c; - var r14 = foo7(1, c); // ok + var r14 = foo7(1, c); // ok })(GenericParameter || (GenericParameter = {})); diff --git a/tests/baselines/reference/genericCallWithOverloadedFunctionTypedArguments.js b/tests/baselines/reference/genericCallWithOverloadedFunctionTypedArguments.js index ae95cf34a87..dea5948242b 100644 --- a/tests/baselines/reference/genericCallWithOverloadedFunctionTypedArguments.js +++ b/tests/baselines/reference/genericCallWithOverloadedFunctionTypedArguments.js @@ -62,20 +62,20 @@ var GenericParameter; function foo5(cb) { return cb; } - var r5 = foo5(function (x) { return x; }); // any => string (+1 overload) [inferences are made for T, but lambda not contextually typed]. T is any + var r5 = foo5(function (x) { return x; }); // any => string (+1 overload) [inferences are made for T, but lambda not contextually typed]. T is any var a; - var r7 = foo5(a); // any => string (+1 overload) + var r7 = foo5(a); // any => string (+1 overload) function foo6(cb) { return cb; } - var r8 = foo6(function (x) { return x; }); // any => string (+1 overload) [inferences are made for T, but lambda not contextually typed]. T is any - var r9 = foo6(function (x) { return ''; }); // any => string (+1 overload) - var r11 = foo6(function (x, y) { return ''; }); // any => string (+1 overload) + var r8 = foo6(function (x) { return x; }); // any => string (+1 overload) [inferences are made for T, but lambda not contextually typed]. T is any + var r9 = foo6(function (x) { return ''; }); // any => string (+1 overload) + var r11 = foo6(function (x, y) { return ''; }); // any => string (+1 overload) function foo7(x, cb) { return cb; } - var r12 = foo7(1, function (x) { return x; }); // any => string (+1 overload) [inferences are made for T, but lambda not contextually typed] - var r13 = foo7(1, function (x) { return ''; }); // any => string (+1 overload) [inferences are made for T, but lambda not contextually typed] + var r12 = foo7(1, function (x) { return x; }); // any => string (+1 overload) [inferences are made for T, but lambda not contextually typed] + var r13 = foo7(1, function (x) { return ''; }); // any => string (+1 overload) [inferences are made for T, but lambda not contextually typed] var a; - var r14 = foo7(1, a); // any => string (+1 overload) [inferences are made for T, but lambda not contextually typed] + var r14 = foo7(1, a); // any => string (+1 overload) [inferences are made for T, but lambda not contextually typed] })(GenericParameter || (GenericParameter = {})); diff --git a/tests/baselines/reference/genericCallWithOverloadedFunctionTypedArguments2.js b/tests/baselines/reference/genericCallWithOverloadedFunctionTypedArguments2.js index beaa136cb1d..25001bd86bb 100644 --- a/tests/baselines/reference/genericCallWithOverloadedFunctionTypedArguments2.js +++ b/tests/baselines/reference/genericCallWithOverloadedFunctionTypedArguments2.js @@ -49,22 +49,22 @@ var NonGenericParameter; var r3 = foo4(function (x) { var r; return r; - }); // ok + }); // ok })(NonGenericParameter || (NonGenericParameter = {})); var GenericParameter; (function (GenericParameter) { function foo5(cb) { return cb; } - var r6 = foo5(function (x) { return x; }); // ok + var r6 = foo5(function (x) { return x; }); // ok function foo6(cb) { return cb; } - var r10 = foo6(function (x, y) { return ''; }); // error + var r10 = foo6(function (x, y) { return ''; }); // error function foo7(x, cb) { return cb; } - var r13 = foo7(1, function (x) { return x; }); // ok + var r13 = foo7(1, function (x) { return x; }); // ok var a; - var r14 = foo7(1, a); // ok + var r14 = foo7(1, a); // ok })(GenericParameter || (GenericParameter = {})); diff --git a/tests/baselines/reference/genericChainedCalls.js b/tests/baselines/reference/genericChainedCalls.js index 0ef4571d7ae..618d34cbc5a 100644 --- a/tests/baselines/reference/genericChainedCalls.js +++ b/tests/baselines/reference/genericChainedCalls.js @@ -17,5 +17,5 @@ var s3 = s2.func(num => num.toString()) //// [genericChainedCalls.js] var r1 = v1.func(function (num) { return num.toString(); }).func(function (str) { return str.length; }).func(function (num) { return num.toString(); }); var s1 = v1.func(function (num) { return num.toString(); }); -var s2 = s1.func(function (str) { return str.length; }); // should also error +var s2 = s1.func(function (str) { return str.length; }); // should also error var s3 = s2.func(function (num) { return num.toString(); }); diff --git a/tests/baselines/reference/genericClassWithFunctionTypedMemberArguments.js b/tests/baselines/reference/genericClassWithFunctionTypedMemberArguments.js index c7d5fdc6a35..1af5f0ea6e6 100644 --- a/tests/baselines/reference/genericClassWithFunctionTypedMemberArguments.js +++ b/tests/baselines/reference/genericClassWithFunctionTypedMemberArguments.js @@ -78,9 +78,9 @@ var ImmediatelyFix; return C; })(); var c = new C(); - var r = c.foo(function (x) { return ''; }); // {} - var r2 = c.foo(function (x) { return ''; }); // string - var r3 = c.foo(function (x) { return ''; }); // {} + var r = c.foo(function (x) { return ''; }); // {} + var r2 = c.foo(function (x) { return ''; }); // string + var r3 = c.foo(function (x) { return ''; }); // {} var C2 = (function () { function C2() { } @@ -90,8 +90,8 @@ var ImmediatelyFix; return C2; })(); var c2 = new C2(); - var ra = c2.foo(function (x) { return 1; }); // number - var r3a = c2.foo(function (x) { return 1; }); // number + var ra = c2.foo(function (x) { return 1; }); // number + var r3a = c2.foo(function (x) { return 1; }); // number })(ImmediatelyFix || (ImmediatelyFix = {})); var WithCandidates; (function (WithCandidates) { @@ -106,9 +106,9 @@ var WithCandidates; var c; var r4 = c.foo2(1, function (a) { return ''; - }); // string, contextual signature instantiation is applied to generic functions - var r5 = c.foo2(1, function (a) { return ''; }); // string - var r6 = c.foo2('', function (a) { return 1; }); // number + }); // string, contextual signature instantiation is applied to generic functions + var r5 = c.foo2(1, function (a) { return ''; }); // string + var r6 = c.foo2('', function (a) { return 1; }); // number var C2 = (function () { function C2() { } @@ -118,10 +118,10 @@ var WithCandidates; return C2; })(); var c2; - var r7 = c2.foo3(1, function (a) { return ''; }, ''); // string + var r7 = c2.foo3(1, function (a) { return ''; }, ''); // string var r8 = c2.foo3(1, function (a) { return ''; - }, ''); // string + }, ''); // string var C3 = (function () { function C3() { } @@ -132,12 +132,12 @@ var WithCandidates; })(); var c3; function other(t, u) { - var r10 = c.foo2(1, function (x) { return ''; }); // string, non-generic signature allows inferences to be made - var r10 = c.foo2(1, function (x) { return ''; }); // string - var r11 = c3.foo3(1, function (x) { return ''; }, ''); // string - var r11b = c3.foo3(1, function (x) { return ''; }, 1); // {} + var r10 = c.foo2(1, function (x) { return ''; }); // string, non-generic signature allows inferences to be made + var r10 = c.foo2(1, function (x) { return ''; }); // string + var r11 = c3.foo3(1, function (x) { return ''; }, ''); // string + var r11b = c3.foo3(1, function (x) { return ''; }, 1); // {} var r12 = c3.foo3(1, function (a) { return ''; - }, 1); // {} + }, 1); // {} } })(WithCandidates || (WithCandidates = {})); diff --git a/tests/baselines/reference/genericClasses2.js b/tests/baselines/reference/genericClasses2.js index a51c044698f..d4ea5bcab91 100644 --- a/tests/baselines/reference/genericClasses2.js +++ b/tests/baselines/reference/genericClasses2.js @@ -22,8 +22,8 @@ var C = (function () { return C; })(); var v1; -var y = v1.x; // should be 'string' -var w = v1.y.a; // should be 'string' +var y = v1.x; // should be 'string' +var w = v1.y.a; // should be 'string' var z = v1.z.a; // should be 'number' diff --git a/tests/baselines/reference/genericClasses3.js b/tests/baselines/reference/genericClasses3.js index ef6f4d2c621..621142c2e9a 100644 --- a/tests/baselines/reference/genericClasses3.js +++ b/tests/baselines/reference/genericClasses3.js @@ -37,8 +37,8 @@ var C = (function (_super) { return C; })(B); var v2; -var y = v2.x; // should be 'string' -var u = v2.a; // should be 'string' +var y = v2.x; // should be 'string' +var u = v2.a; // should be 'string' var z = v2.b; diff --git a/tests/baselines/reference/genericCloneReturnTypes2.js b/tests/baselines/reference/genericCloneReturnTypes2.js index 3dc98e244a3..621b1487b44 100644 --- a/tests/baselines/reference/genericCloneReturnTypes2.js +++ b/tests/baselines/reference/genericCloneReturnTypes2.js @@ -27,6 +27,6 @@ var MyList = (function () { return MyList; })(); var a; -var b = a.clone(); // ok -var c = a.clone(); // bug was there was an error on this line +var b = a.clone(); // ok +var c = a.clone(); // bug was there was an error on this line var d = a.clone(); // error diff --git a/tests/baselines/reference/genericImplements.js b/tests/baselines/reference/genericImplements.js index c27f88fcc5f..73beda1dcfb 100644 --- a/tests/baselines/reference/genericImplements.js +++ b/tests/baselines/reference/genericImplements.js @@ -41,7 +41,7 @@ var X = (function () { return undefined; }; return X; -})(); // { f: () => { b; } } +})(); // { f: () => { b; } } // OK var Y = (function () { function Y() { @@ -50,7 +50,7 @@ var Y = (function () { return undefined; }; return Y; -})(); // { f: () => { a; } } +})(); // { f: () => { a; } } // OK var Z = (function () { function Z() { diff --git a/tests/baselines/reference/genericInference2.js b/tests/baselines/reference/genericInference2.js index 7840e7c67a2..db36f35eccc 100644 --- a/tests/baselines/reference/genericInference2.js +++ b/tests/baselines/reference/genericInference2.js @@ -25,9 +25,9 @@ var o = { name: ko.observable("Bob"), age: ko.observable(37) }; -var x_v = o.name().length; // should be 'number' -var age_v = o.age(); // should be 'number' -var name_v = o.name("Robert"); // should be 'any' -var zz_v = o.name.N; // should be 'number' -var yy_v = o.name.g; // should be 'boolean' +var x_v = o.name().length; // should be 'number' +var age_v = o.age(); // should be 'number' +var name_v = o.name("Robert"); // should be 'any' +var zz_v = o.name.N; // should be 'number' +var yy_v = o.name.g; // should be 'boolean' var rr_v = o.name.r; // should be 'string' diff --git a/tests/baselines/reference/genericReduce.js b/tests/baselines/reference/genericReduce.js index b44c4d97c23..af7c960baae 100644 --- a/tests/baselines/reference/genericReduce.js +++ b/tests/baselines/reference/genericReduce.js @@ -22,6 +22,6 @@ n1.x = "fail"; n1.toExponential(2); n2.x = "fail"; n2.toExponential(2); -var n3 = b.reduce(function (x, y) { return x + y; }, ""); // Initial value is of type string +var n3 = b.reduce(function (x, y) { return x + y; }, ""); // Initial value is of type string n3.toExponential(2); n3.charAt(0); diff --git a/tests/baselines/reference/genericRestArgs.js b/tests/baselines/reference/genericRestArgs.js index 3e78b4ecf2d..cae140ca019 100644 --- a/tests/baselines/reference/genericRestArgs.js +++ b/tests/baselines/reference/genericRestArgs.js @@ -20,10 +20,10 @@ function makeArrayG() { } return items; } -var a1Ga = makeArrayG(1, ""); // no error +var a1Ga = makeArrayG(1, ""); // no error var a1Gb = makeArrayG(1, ""); var a1Gc = makeArrayG(1, ""); -var a1Gd = makeArrayG(1, ""); // error +var a1Gd = makeArrayG(1, ""); // error function makeArrayGOpt(item1, item2, item3) { return [item1, item2, item3]; } diff --git a/tests/baselines/reference/genericReversingTypeParameters.js b/tests/baselines/reference/genericReversingTypeParameters.js index 223387b5a9b..0e51b0256ea 100644 --- a/tests/baselines/reference/genericReversingTypeParameters.js +++ b/tests/baselines/reference/genericReversingTypeParameters.js @@ -24,5 +24,5 @@ var BiMap = (function () { })(); var b = new BiMap(); var r1 = b.get(''); -var i = b.inverse(); // used to get the type wrong here. +var i = b.inverse(); // used to get the type wrong here. var r2b = i.get(1); diff --git a/tests/baselines/reference/genericReversingTypeParameters2.js b/tests/baselines/reference/genericReversingTypeParameters2.js index 89abd57e643..eb904f4a2ed 100644 --- a/tests/baselines/reference/genericReversingTypeParameters2.js +++ b/tests/baselines/reference/genericReversingTypeParameters2.js @@ -22,5 +22,5 @@ var BiMap = (function () { return BiMap; })(); var b = new BiMap(); -var i = b.inverse(); // used to get the type wrong here. +var i = b.inverse(); // used to get the type wrong here. var r2b = i.get(1); diff --git a/tests/baselines/reference/genericTypeAssertions1.js b/tests/baselines/reference/genericTypeAssertions1.js index 250117c8ef0..c107cefc4e8 100644 --- a/tests/baselines/reference/genericTypeAssertions1.js +++ b/tests/baselines/reference/genericTypeAssertions1.js @@ -13,5 +13,5 @@ var A = (function () { return A; })(); var foo = new A(); -var r = new A(); // error +var r = new A(); // error var r2 = foo; // error diff --git a/tests/baselines/reference/genericTypeAssertions2.js b/tests/baselines/reference/genericTypeAssertions2.js index 76711fddcb1..a7dd3b5352e 100644 --- a/tests/baselines/reference/genericTypeAssertions2.js +++ b/tests/baselines/reference/genericTypeAssertions2.js @@ -39,7 +39,7 @@ var B = (function (_super) { })(A); var foo = new A(); var r = new B(); -var r2 = new B(); // error -var r3 = new B(); // error +var r2 = new B(); // error +var r3 = new B(); // error var r4 = new A(); var r5 = []; // error diff --git a/tests/baselines/reference/genericTypeAssertions3.js b/tests/baselines/reference/genericTypeAssertions3.js index 1790140aaaa..19a477c142c 100644 --- a/tests/baselines/reference/genericTypeAssertions3.js +++ b/tests/baselines/reference/genericTypeAssertions3.js @@ -6,7 +6,7 @@ var s = < (x: T) => T > ((x: any) => { return null; }); // no error //// [genericTypeAssertions3.js] var r = (function (x) { return null; -}); // bug was 'could not find dotted symbol T' on x's annotation in the type assertion instead of no error +}); // bug was 'could not find dotted symbol T' on x's annotation in the type assertion instead of no error var s = (function (x) { return null; -}); // no error +}); // no error diff --git a/tests/baselines/reference/genericTypeReferencesRequireTypeArgs.js b/tests/baselines/reference/genericTypeReferencesRequireTypeArgs.js index 3cec124c63f..69bc1c372b3 100644 --- a/tests/baselines/reference/genericTypeReferencesRequireTypeArgs.js +++ b/tests/baselines/reference/genericTypeReferencesRequireTypeArgs.js @@ -20,7 +20,7 @@ var C = (function () { }; return C; })(); -var c1; // error -var i1; // error -var c2; // should be an error -var i2; // should be an error +var c1; // error +var i1; // error +var c2; // should be an error +var i2; // should be an error diff --git a/tests/baselines/reference/genericTypeWithCallableMembers.js b/tests/baselines/reference/genericTypeWithCallableMembers.js index 22e6d334b31..ebf95b41dcc 100644 --- a/tests/baselines/reference/genericTypeWithCallableMembers.js +++ b/tests/baselines/reference/genericTypeWithCallableMembers.js @@ -19,8 +19,8 @@ var C = (function () { this.data2 = data2; } C.prototype.create = function () { - var x = new this.data(); // no error - var x2 = new this.data2(); // was error, shouldn't be + var x = new this.data(); // no error + var x2 = new this.data2(); // was error, shouldn't be }; return C; })(); diff --git a/tests/baselines/reference/genericTypeWithNonGenericBaseMisMatch.js b/tests/baselines/reference/genericTypeWithNonGenericBaseMisMatch.js index 27f6116ac42..4cd7eb4165b 100644 --- a/tests/baselines/reference/genericTypeWithNonGenericBaseMisMatch.js +++ b/tests/baselines/reference/genericTypeWithNonGenericBaseMisMatch.js @@ -18,4 +18,4 @@ var X = (function () { return X; })(); var x = new X(); -var i = x; // Should not be allowed -- type of 'f' is incompatible with 'I' +var i = x; // Should not be allowed -- type of 'f' is incompatible with 'I' diff --git a/tests/baselines/reference/genericWithOpenTypeParameters1.js b/tests/baselines/reference/genericWithOpenTypeParameters1.js index 73bf646d0ab..c7994d71423 100644 --- a/tests/baselines/reference/genericWithOpenTypeParameters1.js +++ b/tests/baselines/reference/genericWithOpenTypeParameters1.js @@ -24,13 +24,13 @@ var x; x.foo(1); var f = function (x) { return x.foo(1); -}; // error +}; // error var f2 = function (x) { return x.foo(1); -}; // error +}; // error var f3 = function (x) { return x.foo(1); -}; // error +}; // error var f4 = function (x) { return x.foo(1); -}; // no error +}; // no error diff --git a/tests/baselines/reference/generics1.js b/tests/baselines/reference/generics1.js index 8b52d02e387..bd18aef7798 100644 --- a/tests/baselines/reference/generics1.js +++ b/tests/baselines/reference/generics1.js @@ -16,10 +16,10 @@ var v7: G; // Error, no type arguments //// [generics1.js] -var v1; // Ok -var v2; // Ok, equivalent to G -var v3; // Error, A not valid argument for U -var v4; // Ok -var v5; // Error, any does not satisfy constraint B -var v6; // Error, wrong number of arguments -var v7; // Error, no type arguments +var v1; // Ok +var v2; // Ok, equivalent to G +var v3; // Error, A not valid argument for U +var v4; // Ok +var v5; // Error, any does not satisfy constraint B +var v6; // Error, wrong number of arguments +var v7; // Error, no type arguments diff --git a/tests/baselines/reference/generics1NoError.js b/tests/baselines/reference/generics1NoError.js index 5716e26c1db..627b25c1748 100644 --- a/tests/baselines/reference/generics1NoError.js +++ b/tests/baselines/reference/generics1NoError.js @@ -11,8 +11,8 @@ var v2: G<{ a: string }, C>; // Ok, equivalent to G var v4: G, C>; // Ok //// [generics1NoError.js] -var v1; // Ok -var v2; // Ok, equivalent to G +var v1; // Ok +var v2; // Ok, equivalent to G var v4; // Ok diff --git a/tests/baselines/reference/generics2.js b/tests/baselines/reference/generics2.js index 5281bd3d0fe..aed20b922f6 100644 --- a/tests/baselines/reference/generics2.js +++ b/tests/baselines/reference/generics2.js @@ -23,10 +23,10 @@ var v7: G; // Error, no type arguments //// [generics2.js] -var v1; // Ok -var v2; // Ok, equivalent to G -var v3; // Error, A not valid argument for U -var v4; // Ok -var v5; // Error, any does not satisfy constraint B -var v6; // Error, wrong number of arguments -var v7; // Error, no type arguments +var v1; // Ok +var v2; // Ok, equivalent to G +var v3; // Error, A not valid argument for U +var v4; // Ok +var v5; // Error, any does not satisfy constraint B +var v6; // Error, wrong number of arguments +var v7; // Error, no type arguments diff --git a/tests/baselines/reference/generics2NoError.js b/tests/baselines/reference/generics2NoError.js index bf77d88813b..e26bb66605b 100644 --- a/tests/baselines/reference/generics2NoError.js +++ b/tests/baselines/reference/generics2NoError.js @@ -18,8 +18,8 @@ var v2: G<{ a: string }, C>; // Ok, equivalent to G var v4: G, C>; // Ok //// [generics2NoError.js] -var v1; // Ok -var v2; // Ok, equivalent to G +var v1; // Ok +var v2; // Ok, equivalent to G var v4; // Ok diff --git a/tests/baselines/reference/generics5.js b/tests/baselines/reference/generics5.js index 978f18e9a21..68660e1a939 100644 --- a/tests/baselines/reference/generics5.js +++ b/tests/baselines/reference/generics5.js @@ -13,4 +13,4 @@ var v3: G; // Error, A not valid argument for U //// [generics5.js] -var v3; // Error, A not valid argument for U +var v3; // Error, A not valid argument for U diff --git a/tests/baselines/reference/heterogeneousArrayLiterals.js b/tests/baselines/reference/heterogeneousArrayLiterals.js index 1650ca98c71..82fa5e90404 100644 --- a/tests/baselines/reference/heterogeneousArrayLiterals.js +++ b/tests/baselines/reference/heterogeneousArrayLiterals.js @@ -139,20 +139,20 @@ var __extends = this.__extends || function (d, b) { d.prototype = new __(); }; // type of an array is the best common type of its elements (plus its contextual type if it exists) -var a = [1, '']; // {}[] -var b = [1, null]; // number[] -var c = [1, '', null]; // {}[] -var d = [{}, 1]; // {}[] -var e = [{}, Object]; // {}[] -var f = [[], [1]]; // number[][] -var g = [[1], ['']]; // {}[] -var h = [{ foo: 1, bar: '' }, { foo: 2 }]; // {foo: number}[] -var i = [{ foo: 1, bar: '' }, { foo: '' }]; // {}[] -var j = [function () { return 1; }, function () { return ''; }]; // {}[] -var k = [function () { return 1; }, function () { return 1; }]; // { (): number }[] -var l = [function () { return 1; }, function () { return null; }]; // { (): any }[] -var m = [function () { return 1; }, function () { return ''; }, function () { return null; }]; // { (): any }[] -var n = [[function () { return 1; }], [function () { return ''; }]]; // {}[] +var a = [1, '']; // {}[] +var b = [1, null]; // number[] +var c = [1, '', null]; // {}[] +var d = [{}, 1]; // {}[] +var e = [{}, Object]; // {}[] +var f = [[], [1]]; // number[][] +var g = [[1], ['']]; // {}[] +var h = [{ foo: 1, bar: '' }, { foo: 2 }]; // {foo: number}[] +var i = [{ foo: 1, bar: '' }, { foo: '' }]; // {}[] +var j = [function () { return 1; }, function () { return ''; }]; // {}[] +var k = [function () { return 1; }, function () { return 1; }]; // { (): number }[] +var l = [function () { return 1; }, function () { return null; }]; // { (): any }[] +var m = [function () { return 1; }, function () { return ''; }, function () { return null; }]; // { (): any }[] +var n = [[function () { return 1; }], [function () { return ''; }]]; // {}[] var Base = (function () { function Base() { } @@ -177,16 +177,16 @@ var derived; var derived2; var Derived; (function (Derived) { - var h = [{ foo: base, basear: derived }, { foo: base }]; // {foo: Base}[] - var i = [{ foo: base, basear: derived }, { foo: derived }]; // {foo: Derived}[] - var j = [function () { return base; }, function () { return derived; }]; // { {}: Base } - var k = [function () { return base; }, function () { return 1; }]; // {}[]~ - var l = [function () { return base; }, function () { return null; }]; // { (): any }[] - var m = [function () { return base; }, function () { return derived; }, function () { return null; }]; // { (): any }[] - var n = [[function () { return base; }], [function () { return derived; }]]; // { (): Base }[] - var o = [derived, derived2]; // {}[] - var p = [derived, derived2, base]; // Base[] - var q = [[function () { return derived2; }], [function () { return derived; }]]; // {}[] + var h = [{ foo: base, basear: derived }, { foo: base }]; // {foo: Base}[] + var i = [{ foo: base, basear: derived }, { foo: derived }]; // {foo: Derived}[] + var j = [function () { return base; }, function () { return derived; }]; // { {}: Base } + var k = [function () { return base; }, function () { return 1; }]; // {}[]~ + var l = [function () { return base; }, function () { return null; }]; // { (): any }[] + var m = [function () { return base; }, function () { return derived; }, function () { return null; }]; // { (): any }[] + var n = [[function () { return base; }], [function () { return derived; }]]; // { (): Base }[] + var o = [derived, derived2]; // {}[] + var p = [derived, derived2, base]; // Base[] + var q = [[function () { return derived2; }], [function () { return derived; }]]; // {}[] })(Derived || (Derived = {})); var WithContextualType; (function (WithContextualType) { @@ -197,47 +197,47 @@ var WithContextualType; var d = [function () { return derived; }, function () { return derived2; }]; })(WithContextualType || (WithContextualType = {})); function foo(t, u) { - var a = [t, t]; // T[] - var b = [t, null]; // T[] - var c = [t, u]; // {}[] - var d = [t, 1]; // {}[] - var e = [function () { return t; }, function () { return u; }]; // {}[] - var f = [function () { return t; }, function () { return u; }, function () { return null; }]; // { (): any }[] + var a = [t, t]; // T[] + var b = [t, null]; // T[] + var c = [t, u]; // {}[] + var d = [t, 1]; // {}[] + var e = [function () { return t; }, function () { return u; }]; // {}[] + var f = [function () { return t; }, function () { return u; }, function () { return null; }]; // { (): any }[] } function foo2(t, u) { - var a = [t, t]; // T[] - var b = [t, null]; // T[] - var c = [t, u]; // {}[] - var d = [t, 1]; // {}[] - var e = [function () { return t; }, function () { return u; }]; // {}[] - var f = [function () { return t; }, function () { return u; }, function () { return null; }]; // { (): any }[] - var g = [t, base]; // Base[] - var h = [t, derived]; // Derived[] - var i = [u, base]; // Base[] - var j = [u, derived]; // Derived[] + var a = [t, t]; // T[] + var b = [t, null]; // T[] + var c = [t, u]; // {}[] + var d = [t, 1]; // {}[] + var e = [function () { return t; }, function () { return u; }]; // {}[] + var f = [function () { return t; }, function () { return u; }, function () { return null; }]; // { (): any }[] + var g = [t, base]; // Base[] + var h = [t, derived]; // Derived[] + var i = [u, base]; // Base[] + var j = [u, derived]; // Derived[] } function foo3(t, u) { - var a = [t, t]; // T[] - var b = [t, null]; // T[] - var c = [t, u]; // {}[] - var d = [t, 1]; // {}[] - var e = [function () { return t; }, function () { return u; }]; // {}[] - var f = [function () { return t; }, function () { return u; }, function () { return null; }]; // { (): any }[] - var g = [t, base]; // Base[] - var h = [t, derived]; // Derived[] - var i = [u, base]; // Base[] - var j = [u, derived]; // Derived[] + var a = [t, t]; // T[] + var b = [t, null]; // T[] + var c = [t, u]; // {}[] + var d = [t, 1]; // {}[] + var e = [function () { return t; }, function () { return u; }]; // {}[] + var f = [function () { return t; }, function () { return u; }, function () { return null; }]; // { (): any }[] + var g = [t, base]; // Base[] + var h = [t, derived]; // Derived[] + var i = [u, base]; // Base[] + var j = [u, derived]; // Derived[] } function foo4(t, u) { - var a = [t, t]; // T[] - var b = [t, null]; // T[] - var c = [t, u]; // BUG 821629 - var d = [t, 1]; // {}[] - var e = [function () { return t; }, function () { return u; }]; // {}[] - var f = [function () { return t; }, function () { return u; }, function () { return null; }]; // { (): any }[] - var g = [t, base]; // Base[] - var h = [t, derived]; // Derived[] - var i = [u, base]; // Base[] - var j = [u, derived]; // Derived[] + var a = [t, t]; // T[] + var b = [t, null]; // T[] + var c = [t, u]; // BUG 821629 + var d = [t, 1]; // {}[] + var e = [function () { return t; }, function () { return u; }]; // {}[] + var f = [function () { return t; }, function () { return u; }, function () { return null; }]; // { (): any }[] + var g = [t, base]; // Base[] + var h = [t, derived]; // Derived[] + var i = [u, base]; // Base[] + var j = [u, derived]; // Derived[] var k = [t, u]; } diff --git a/tests/baselines/reference/implementPublicPropertyAsPrivate.js b/tests/baselines/reference/implementPublicPropertyAsPrivate.js index 32b3e6ef007..4a946801da3 100644 --- a/tests/baselines/reference/implementPublicPropertyAsPrivate.js +++ b/tests/baselines/reference/implementPublicPropertyAsPrivate.js @@ -9,7 +9,7 @@ class C implements I { //// [implementPublicPropertyAsPrivate.js] var C = (function () { function C() { - this.x = 0; // should raise error at class decl + this.x = 0; // should raise error at class decl } return C; })(); diff --git a/tests/baselines/reference/implementingAnInterfaceExtendingClassWithPrivates2.js b/tests/baselines/reference/implementingAnInterfaceExtendingClassWithPrivates2.js index e7b065a8bfc..767851fd16d 100644 --- a/tests/baselines/reference/implementingAnInterfaceExtendingClassWithPrivates2.js +++ b/tests/baselines/reference/implementingAnInterfaceExtendingClassWithPrivates2.js @@ -179,8 +179,8 @@ var M2; })(Foo); var b; var r1 = b.z; - var r2 = b.x; // error - var r3 = b.y; // error + var r2 = b.x; // error + var r3 = b.y; // error var Bar2 = (function (_super) { __extends(Bar2, _super); function Bar2() { diff --git a/tests/baselines/reference/implicitAnyDeclareFunctionExprWithoutFormalType.js b/tests/baselines/reference/implicitAnyDeclareFunctionExprWithoutFormalType.js index bbbe93b2d10..cba7602d049 100644 --- a/tests/baselines/reference/implicitAnyDeclareFunctionExprWithoutFormalType.js +++ b/tests/baselines/reference/implicitAnyDeclareFunctionExprWithoutFormalType.js @@ -20,9 +20,9 @@ var lambda10 = function temp1() { return 5; } //// [implicitAnyDeclareFunctionExprWithoutFormalType.js] // these should be errors for implicit any parameter var lambda = function (l1) { -}; // Error at "l1" +}; // Error at "l1" var lambd2 = function (ll1, ll2) { -}; // Error at "ll1" +}; // Error at "ll1" var lamda3 = function myLambda3(myParam) { }; var lamda4 = function () { diff --git a/tests/baselines/reference/implicitAnyDeclareMemberWithoutType2.js b/tests/baselines/reference/implicitAnyDeclareMemberWithoutType2.js index a0c209a0088..1a49449529e 100644 --- a/tests/baselines/reference/implicitAnyDeclareMemberWithoutType2.js +++ b/tests/baselines/reference/implicitAnyDeclareMemberWithoutType2.js @@ -13,9 +13,9 @@ class C { // this should be an error var C = (function () { function C(c1, c2, c3) { - this.x = null; // error at "x" - } // error at "c1, c2" + this.x = null; // error at "x" + } // error at "c1, c2" C.prototype.funcOfC = function (f1, f2, f3) { - }; // error at "f1,f2" + }; // error at "f1,f2" return C; })(); diff --git a/tests/baselines/reference/implicitAnyDeclareTypePropertyWithoutType.js b/tests/baselines/reference/implicitAnyDeclareTypePropertyWithoutType.js index 3631ca8c404..63f90a1aaa7 100644 --- a/tests/baselines/reference/implicitAnyDeclareTypePropertyWithoutType.js +++ b/tests/baselines/reference/implicitAnyDeclareTypePropertyWithoutType.js @@ -24,11 +24,11 @@ var C = (function () { return C; })(); // this should be an error -var x; // error at "y,z" -var x1; // error at "z1" -var x11; // error at "new" -var x2; // error at "y2" -var x3; // error at "y3" +var x; // error at "y,z" +var x1; // error at "z1" +var x11; // error at "new" +var x2; // error at "y2" +var x3; // error at "y3" // this should not be an error var bar; var foo; diff --git a/tests/baselines/reference/implicitAnyDeclareVariablesWithoutTypeAndInit.js b/tests/baselines/reference/implicitAnyDeclareVariablesWithoutTypeAndInit.js index de579652b2a..95b617d79ee 100644 --- a/tests/baselines/reference/implicitAnyDeclareVariablesWithoutTypeAndInit.js +++ b/tests/baselines/reference/implicitAnyDeclareVariablesWithoutTypeAndInit.js @@ -13,7 +13,7 @@ var x1: any; var y1 = new x1; //// [implicitAnyDeclareVariablesWithoutTypeAndInit.js] // this should be an error -var x; // error at "x" +var x; // error at "x" function func(k) { } ; diff --git a/tests/baselines/reference/implicitAnyFunctionInvocationWithAnyArguements.js b/tests/baselines/reference/implicitAnyFunctionInvocationWithAnyArguements.js index d76b674a02e..0d4cc7bfdb0 100644 --- a/tests/baselines/reference/implicitAnyFunctionInvocationWithAnyArguements.js +++ b/tests/baselines/reference/implicitAnyFunctionInvocationWithAnyArguements.js @@ -37,12 +37,12 @@ var newC2 = new C([], null) //// [implicitAnyFunctionInvocationWithAnyArguements.js] // this should be errors -var arg0 = null; // error at "arg0" -var anyArray = [null, undefined]; // error at array literal -var objL; // error at "y,z" +var arg0 = null; // error at "arg0" +var anyArray = [null, undefined]; // error at array literal +var objL; // error at "y,z" var funcL; function temp1(arg1) { -} // error at "temp1" +} // error at "temp1" function testFunctionExprC(subReplace) { } function testFunctionExprC2(eq) { diff --git a/tests/baselines/reference/implicitAnyFunctionReturnNullOrUndefined.js b/tests/baselines/reference/implicitAnyFunctionReturnNullOrUndefined.js index 95f17a65a67..6b61cecfb2d 100644 --- a/tests/baselines/reference/implicitAnyFunctionReturnNullOrUndefined.js +++ b/tests/baselines/reference/implicitAnyFunctionReturnNullOrUndefined.js @@ -28,10 +28,10 @@ undefinedWidenFunction(); // this should be an error function nullWidenFunction() { return null; -} // error at "nullWidenFunction" +} // error at "nullWidenFunction" function undefinedWidenFunction() { return undefined; -} // error at "undefinedWidenFunction" +} // error at "undefinedWidenFunction" var C = (function () { function C() { } diff --git a/tests/baselines/reference/implicitAnyWidenToAny.js b/tests/baselines/reference/implicitAnyWidenToAny.js index 612b92234bd..9f380df1cf0 100644 --- a/tests/baselines/reference/implicitAnyWidenToAny.js +++ b/tests/baselines/reference/implicitAnyWidenToAny.js @@ -29,10 +29,10 @@ var obj1 = anyReturnFunc(); //// [implicitAnyWidenToAny.js] // these should be errors -var x = null; // error at "x" -var x1 = undefined; // error at "x1" -var widenArray = [null, undefined]; // error at "widenArray" -var emptyArray = []; // error at "emptyArray" +var x = null; // error at "x" +var x1 = undefined; // error at "x1" +var widenArray = [null, undefined]; // error at "widenArray" +var emptyArray = []; // error at "emptyArray" // these should not be error var AnimalObj = (function () { function AnimalObj() { diff --git a/tests/baselines/reference/importDecl.js b/tests/baselines/reference/importDecl.js index 3e822e65a31..e37d46919e9 100644 --- a/tests/baselines/reference/importDecl.js +++ b/tests/baselines/reference/importDecl.js @@ -140,7 +140,7 @@ exports.foo2 = foo2; /// /// /// -var m4 = require("importDecl_require"); // Emit used +var m4 = require("importDecl_require"); // Emit used exports.x4 = m4.x; exports.d4 = m4.d; exports.f4 = m4.foo(); @@ -172,7 +172,7 @@ var usePrivate_m4_m1 = exports.usePrivate_m4_m1; var m5 = require("importDecl_require4"); exports.d = m5.foo2(); // Do not emit multiple used import statements -var multiImport_m4 = require("importDecl_require"); // Emit used +var multiImport_m4 = require("importDecl_require"); // Emit used exports.useMultiImport_m4_x4 = multiImport_m4.x; exports.useMultiImport_m4_d4 = multiImport_m4.d; exports.useMultiImport_m4_f4 = multiImport_m4.foo(); diff --git a/tests/baselines/reference/importImportOnlyModule.js b/tests/baselines/reference/importImportOnlyModule.js index aa9fde49b1d..bbb450f2849 100644 --- a/tests/baselines/reference/importImportOnlyModule.js +++ b/tests/baselines/reference/importImportOnlyModule.js @@ -28,9 +28,9 @@ define(["require", "exports"], function (require, exports) { }); //// [foo_1.js] define(["require", "exports"], function (require, exports) { - var answer = 42; // No exports + var answer = 42; // No exports }); //// [foo_2.js] define(["require", "exports", "./foo_1"], function (require, exports, foo) { - var x = foo; // Cause a runtime dependency + var x = foo; // Cause a runtime dependency }); diff --git a/tests/baselines/reference/importOnAliasedIdentifiers.js b/tests/baselines/reference/importOnAliasedIdentifiers.js index d139cacf598..7034f682bf3 100644 --- a/tests/baselines/reference/importOnAliasedIdentifiers.js +++ b/tests/baselines/reference/importOnAliasedIdentifiers.js @@ -17,6 +17,6 @@ var A; })(A || (A = {})); var B; (function (B) { - var Z = A.X; // Alias for both type and member A.X + var Z = A.X; // Alias for both type and member A.X var v = Z; })(B || (B = {})); diff --git a/tests/baselines/reference/importTsBeforeDTs.js b/tests/baselines/reference/importTsBeforeDTs.js index 077350bce3f..138ff7b755a 100644 --- a/tests/baselines/reference/importTsBeforeDTs.js +++ b/tests/baselines/reference/importTsBeforeDTs.js @@ -17,5 +17,5 @@ var z2 = foo.y + 10; // Should resolve exports.y = 42; //// [foo_1.js] var foo = require("./foo_0"); -var z1 = foo.x + 10; // Should error, as .ts preferred over .d.ts -var z2 = foo.y + 10; // Should resolve +var z1 = foo.x + 10; // Should error, as .ts preferred over .d.ts +var z2 = foo.y + 10; // Should resolve diff --git a/tests/baselines/reference/indexIntoArraySubclass.js b/tests/baselines/reference/indexIntoArraySubclass.js index 40e5f23998f..c5b7ba66e51 100644 --- a/tests/baselines/reference/indexIntoArraySubclass.js +++ b/tests/baselines/reference/indexIntoArraySubclass.js @@ -6,5 +6,5 @@ r = 0; //error //// [indexIntoArraySubclass.js] var x2; -var r = x2[0]; // string +var r = x2[0]; // string r = 0; diff --git a/tests/baselines/reference/indexSignatureTypeInference.js b/tests/baselines/reference/indexSignatureTypeInference.js index 3ac738aa893..73458f9f8d9 100644 --- a/tests/baselines/reference/indexSignatureTypeInference.js +++ b/tests/baselines/reference/indexSignatureTypeInference.js @@ -24,7 +24,7 @@ var v1 = stringMapToArray(stringMap); // Ok var numberMap; var stringMap; var v1; -var v1 = numberMapToArray(numberMap); // Ok -var v1 = numberMapToArray(stringMap); // Ok -var v1 = stringMapToArray(numberMap); // Error expected here -var v1 = stringMapToArray(stringMap); // Ok +var v1 = numberMapToArray(numberMap); // Ok +var v1 = numberMapToArray(stringMap); // Ok +var v1 = stringMapToArray(numberMap); // Error expected here +var v1 = stringMapToArray(stringMap); // Ok diff --git a/tests/baselines/reference/indexSignaturesInferentialTyping.js b/tests/baselines/reference/indexSignaturesInferentialTyping.js index c12b20c4610..d8200338b62 100644 --- a/tests/baselines/reference/indexSignaturesInferentialTyping.js +++ b/tests/baselines/reference/indexSignaturesInferentialTyping.js @@ -15,7 +15,7 @@ function foo(items) { function bar(items) { return undefined; } -var x1 = foo({ 0: 0, 1: 1 }); // type should be number +var x1 = foo({ 0: 0, 1: 1 }); // type should be number var x2 = foo({ zero: 0, one: 1 }); var x3 = bar({ 0: 0, 1: 1 }); -var x4 = bar({ zero: 0, one: 1 }); // type should be number +var x4 = bar({ zero: 0, one: 1 }); // type should be number diff --git a/tests/baselines/reference/inheritanceOfGenericConstructorMethod1.js b/tests/baselines/reference/inheritanceOfGenericConstructorMethod1.js index bb12b9feb29..7c1eb291327 100644 --- a/tests/baselines/reference/inheritanceOfGenericConstructorMethod1.js +++ b/tests/baselines/reference/inheritanceOfGenericConstructorMethod1.js @@ -27,6 +27,6 @@ var B = (function (_super) { return B; })(A); var a = new A(); -var b1 = new B(); // no error -var b2 = new B(); // no error -var b3 = new B(); // error, could not select overload for 'new' expression +var b1 = new B(); // no error +var b2 = new B(); // no error +var b3 = new B(); // error, could not select overload for 'new' expression diff --git a/tests/baselines/reference/inheritanceOfGenericConstructorMethod2.js b/tests/baselines/reference/inheritanceOfGenericConstructorMethod2.js index 63f64c1b60d..0db872e52dd 100644 --- a/tests/baselines/reference/inheritanceOfGenericConstructorMethod2.js +++ b/tests/baselines/reference/inheritanceOfGenericConstructorMethod2.js @@ -55,7 +55,7 @@ var N; })(M.C2); N.D2 = D2; })(N || (N = {})); -var c = new M.C2(); // no error -var n = new N.D1(); // no error -var n2 = new N.D2(); // error -var n3 = new N.D2(); // no error, D2 +var c = new M.C2(); // no error +var n = new N.D1(); // no error +var n2 = new N.D2(); // error +var n3 = new N.D2(); // no error, D2 diff --git a/tests/baselines/reference/innerOverloads.js b/tests/baselines/reference/innerOverloads.js index 9eb9461048c..184b644406e 100644 --- a/tests/baselines/reference/innerOverloads.js +++ b/tests/baselines/reference/innerOverloads.js @@ -19,4 +19,4 @@ function outer() { } return inner(0); } -var x = outer(); // should work +var x = outer(); // should work diff --git a/tests/baselines/reference/interfaceAssignmentCompat.js b/tests/baselines/reference/interfaceAssignmentCompat.js index 4d15001aff8..9187dcf00b2 100644 --- a/tests/baselines/reference/interfaceAssignmentCompat.js +++ b/tests/baselines/reference/interfaceAssignmentCompat.js @@ -77,7 +77,7 @@ var M; x[2] = { color: 0 /* Green */ }; x = x.sort(CompareYeux); // type of z inferred from specialized array type - var z = x.sort(CompareEyes); // ok + var z = x.sort(CompareEyes); // ok for (var i = 0, len = z.length; i < len; i++) { result += ((Color._map[z[i].color]) + "\r\n"); } diff --git a/tests/baselines/reference/interfaceExtendingClassWithPrivates2.js b/tests/baselines/reference/interfaceExtendingClassWithPrivates2.js index 8de3264c99a..ace63a486ba 100644 --- a/tests/baselines/reference/interfaceExtendingClassWithPrivates2.js +++ b/tests/baselines/reference/interfaceExtendingClassWithPrivates2.js @@ -45,5 +45,5 @@ var Baz = (function () { })(); var i; var r = i.z; -var r2 = i.x; // error +var r2 = i.x; // error var r3 = i.y; // error diff --git a/tests/baselines/reference/intrinsics.js b/tests/baselines/reference/intrinsics.js index 46aa3652b32..09cd69b9d94 100644 --- a/tests/baselines/reference/intrinsics.js +++ b/tests/baselines/reference/intrinsics.js @@ -16,7 +16,7 @@ class Foo<__proto__> { } var foo: (__proto__: number) => void; //// [intrinsics.js] -var hasOwnProperty; // Error +var hasOwnProperty; // Error var m1; (function (m1) { m1.__proto__; diff --git a/tests/baselines/reference/invalidBooleanAssignments.js b/tests/baselines/reference/invalidBooleanAssignments.js index bf393abda5e..d47787b4bf4 100644 --- a/tests/baselines/reference/invalidBooleanAssignments.js +++ b/tests/baselines/reference/invalidBooleanAssignments.js @@ -45,7 +45,7 @@ var C = (function () { var f = x; var g = x; var h = x; -var h2 = x; // no error +var h2 = x; // no error var M; (function (M) { M.a = 1; diff --git a/tests/baselines/reference/invalidInstantiatedModule.js b/tests/baselines/reference/invalidInstantiatedModule.js index cd116dbd0fb..13e46c800ca 100644 --- a/tests/baselines/reference/invalidInstantiatedModule.js +++ b/tests/baselines/reference/invalidInstantiatedModule.js @@ -24,11 +24,11 @@ var M; return Point; })(); M.Point = Point; - M.Point = 1; // Error + M.Point = 1; // Error })(M || (M = {})); var M2; (function (M2) { M2.Point = 1; })(M2 || (M2 = {})); var m = M2; -var p; // Error +var p; // Error diff --git a/tests/baselines/reference/invalidNestedModules.js b/tests/baselines/reference/invalidNestedModules.js index a6c2f357efa..83e82ec656c 100644 --- a/tests/baselines/reference/invalidNestedModules.js +++ b/tests/baselines/reference/invalidNestedModules.js @@ -72,7 +72,7 @@ var M2; var M2; (function (M2) { (function (X) { - X.Point; // Error + X.Point; // Error })(M2.X || (M2.X = {})); var X = M2.X; })(M2 || (M2 = {})); diff --git a/tests/baselines/reference/invalidReturnStatements.js b/tests/baselines/reference/invalidReturnStatements.js index 01f588ab593..d452a1280f5 100644 --- a/tests/baselines/reference/invalidReturnStatements.js +++ b/tests/baselines/reference/invalidReturnStatements.js @@ -37,7 +37,7 @@ function fn3() { function fn4() { } function fn7() { -} // should be valid: any includes void +} // should be valid: any includes void var C = (function () { function C() { } diff --git a/tests/baselines/reference/invalidSymbolInTypeParameter1.js b/tests/baselines/reference/invalidSymbolInTypeParameter1.js index 88bbb3e2ff0..e051d221830 100644 --- a/tests/baselines/reference/invalidSymbolInTypeParameter1.js +++ b/tests/baselines/reference/invalidSymbolInTypeParameter1.js @@ -6,5 +6,5 @@ function test() { //// [invalidSymbolInTypeParameter1.js] function test() { - var cats = new Array(); // WAWA is not a valid type + var cats = new Array(); // WAWA is not a valid type } diff --git a/tests/baselines/reference/logicalOrOperatorWithEveryType.js b/tests/baselines/reference/logicalOrOperatorWithEveryType.js index 20f18d556de..bdd6802ea6a 100644 --- a/tests/baselines/reference/logicalOrOperatorWithEveryType.js +++ b/tests/baselines/reference/logicalOrOperatorWithEveryType.js @@ -144,103 +144,103 @@ var a5; var a6; var a7; var a8; -var ra1 = a1 || a1; // any || any is any -var ra2 = a2 || a1; // boolean || any is any -var ra3 = a3 || a1; // number || any is any -var ra4 = a4 || a1; // string || any is any -var ra5 = a5 || a1; // void || any is any -var ra6 = a6 || a1; // enum || any is any -var ra7 = a7 || a1; // object || any is any -var ra8 = a8 || a1; // array || any is any -var ra9 = null || a1; // null || any is any -var ra10 = undefined || a1; // undefined || any is any -var rb1 = a1 || a2; // any || boolean is any -var rb2 = a2 || a2; // boolean || boolean is boolean -var rb3 = a3 || a2; // number || boolean is {} -var rb4 = a4 || a2; // string || boolean is {} -var rb5 = a5 || a2; // void || boolean is {} -var rb6 = a6 || a2; // enum || boolean is {} -var rb7 = a7 || a2; // object || boolean is {} -var rb8 = a8 || a2; // array || boolean is {} -var rb9 = null || a2; // null || boolean is boolean -var rb10 = undefined || a2; // undefined || boolean is boolean -var rc1 = a1 || a3; // any || number is any -var rc2 = a2 || a3; // boolean || number is {} -var rc3 = a3 || a3; // number || number is number -var rc4 = a4 || a3; // string || number is {} -var rc5 = a5 || a3; // void || number is {} -var rc6 = a6 || a3; // enum || number is number -var rc7 = a7 || a3; // object || number is {} -var rc8 = a8 || a3; // array || number is {} -var rc9 = null || a3; // null || number is number -var rc10 = undefined || a3; // undefined || number is number -var rd1 = a1 || a4; // any || string is any -var rd2 = a2 || a4; // boolean || string is {} -var rd3 = a3 || a4; // number || string is {} -var rd4 = a4 || a4; // string || string is string -var rd5 = a5 || a4; // void || string is {} -var rd6 = a6 || a4; // enum || string is {} -var rd7 = a7 || a4; // object || string is {} -var rd8 = a8 || a4; // array || string is {} -var rd9 = null || a4; // null || string is string -var rd10 = undefined || a4; // undefined || string is string -var re1 = a1 || a5; // any || void is any -var re2 = a2 || a5; // boolean || void is {} -var re3 = a3 || a5; // number || void is {} -var re4 = a4 || a5; // string || void is {} -var re5 = a5 || a5; // void || void is void -var re6 = a6 || a5; // enum || void is {} -var re7 = a7 || a5; // object || void is {} -var re8 = a8 || a5; // array || void is {} -var re9 = null || a5; // null || void is void -var re10 = undefined || a5; // undefined || void is void -var rg1 = a1 || a6; // any || enum is any -var rg2 = a2 || a6; // boolean || enum is {} -var rg3 = a3 || a6; // number || enum is number -var rg4 = a4 || a6; // string || enum is {} -var rg5 = a5 || a6; // void || enum is {} -var rg6 = a6 || a6; // enum || enum is E -var rg7 = a7 || a6; // object || enum is {} -var rg8 = a8 || a6; // array || enum is {} -var rg9 = null || a6; // null || enum is E -var rg10 = undefined || a6; // undefined || enum is E -var rh1 = a1 || a7; // any || object is any -var rh2 = a2 || a7; // boolean || object is {} -var rh3 = a3 || a7; // number || object is {} -var rh4 = a4 || a7; // string || object is {} -var rh5 = a5 || a7; // void || object is {} -var rh6 = a6 || a7; // enum || object is {} -var rh7 = a7 || a7; // object || object is object -var rh8 = a8 || a7; // array || object is {} -var rh9 = null || a7; // null || object is object -var rh10 = undefined || a7; // undefined || object is object -var ri1 = a1 || a8; // any || array is any -var ri2 = a2 || a8; // boolean || array is {} -var ri3 = a3 || a8; // number || array is {} -var ri4 = a4 || a8; // string || array is {} -var ri5 = a5 || a8; // void || array is {} -var ri6 = a6 || a8; // enum || array is {} -var ri7 = a7 || a8; // object || array is {} -var ri8 = a8 || a8; // array || array is array -var ri9 = null || a8; // null || array is array -var ri10 = undefined || a8; // undefined || array is array -var rj1 = a1 || null; // any || null is any -var rj2 = a2 || null; // boolean || null is boolean -var rj3 = a3 || null; // number || null is number -var rj4 = a4 || null; // string || null is string -var rj5 = a5 || null; // void || null is void -var rj6 = a6 || null; // enum || null is E -var rj7 = a7 || null; // object || null is object -var rj8 = a8 || null; // array || null is array -var rj9 = null || null; // null || null is any -var rj10 = undefined || null; // undefined || null is any -var rf1 = a1 || undefined; // any || undefined is any -var rf2 = a2 || undefined; // boolean || undefined is boolean -var rf3 = a3 || undefined; // number || undefined is number -var rf4 = a4 || undefined; // string || undefined is string -var rf5 = a5 || undefined; // void || undefined is void -var rf6 = a6 || undefined; // enum || undefined is E -var rf7 = a7 || undefined; // object || undefined is object -var rf8 = a8 || undefined; // array || undefined is array -var rf9 = null || undefined; // null || undefined is any +var ra1 = a1 || a1; // any || any is any +var ra2 = a2 || a1; // boolean || any is any +var ra3 = a3 || a1; // number || any is any +var ra4 = a4 || a1; // string || any is any +var ra5 = a5 || a1; // void || any is any +var ra6 = a6 || a1; // enum || any is any +var ra7 = a7 || a1; // object || any is any +var ra8 = a8 || a1; // array || any is any +var ra9 = null || a1; // null || any is any +var ra10 = undefined || a1; // undefined || any is any +var rb1 = a1 || a2; // any || boolean is any +var rb2 = a2 || a2; // boolean || boolean is boolean +var rb3 = a3 || a2; // number || boolean is {} +var rb4 = a4 || a2; // string || boolean is {} +var rb5 = a5 || a2; // void || boolean is {} +var rb6 = a6 || a2; // enum || boolean is {} +var rb7 = a7 || a2; // object || boolean is {} +var rb8 = a8 || a2; // array || boolean is {} +var rb9 = null || a2; // null || boolean is boolean +var rb10 = undefined || a2; // undefined || boolean is boolean +var rc1 = a1 || a3; // any || number is any +var rc2 = a2 || a3; // boolean || number is {} +var rc3 = a3 || a3; // number || number is number +var rc4 = a4 || a3; // string || number is {} +var rc5 = a5 || a3; // void || number is {} +var rc6 = a6 || a3; // enum || number is number +var rc7 = a7 || a3; // object || number is {} +var rc8 = a8 || a3; // array || number is {} +var rc9 = null || a3; // null || number is number +var rc10 = undefined || a3; // undefined || number is number +var rd1 = a1 || a4; // any || string is any +var rd2 = a2 || a4; // boolean || string is {} +var rd3 = a3 || a4; // number || string is {} +var rd4 = a4 || a4; // string || string is string +var rd5 = a5 || a4; // void || string is {} +var rd6 = a6 || a4; // enum || string is {} +var rd7 = a7 || a4; // object || string is {} +var rd8 = a8 || a4; // array || string is {} +var rd9 = null || a4; // null || string is string +var rd10 = undefined || a4; // undefined || string is string +var re1 = a1 || a5; // any || void is any +var re2 = a2 || a5; // boolean || void is {} +var re3 = a3 || a5; // number || void is {} +var re4 = a4 || a5; // string || void is {} +var re5 = a5 || a5; // void || void is void +var re6 = a6 || a5; // enum || void is {} +var re7 = a7 || a5; // object || void is {} +var re8 = a8 || a5; // array || void is {} +var re9 = null || a5; // null || void is void +var re10 = undefined || a5; // undefined || void is void +var rg1 = a1 || a6; // any || enum is any +var rg2 = a2 || a6; // boolean || enum is {} +var rg3 = a3 || a6; // number || enum is number +var rg4 = a4 || a6; // string || enum is {} +var rg5 = a5 || a6; // void || enum is {} +var rg6 = a6 || a6; // enum || enum is E +var rg7 = a7 || a6; // object || enum is {} +var rg8 = a8 || a6; // array || enum is {} +var rg9 = null || a6; // null || enum is E +var rg10 = undefined || a6; // undefined || enum is E +var rh1 = a1 || a7; // any || object is any +var rh2 = a2 || a7; // boolean || object is {} +var rh3 = a3 || a7; // number || object is {} +var rh4 = a4 || a7; // string || object is {} +var rh5 = a5 || a7; // void || object is {} +var rh6 = a6 || a7; // enum || object is {} +var rh7 = a7 || a7; // object || object is object +var rh8 = a8 || a7; // array || object is {} +var rh9 = null || a7; // null || object is object +var rh10 = undefined || a7; // undefined || object is object +var ri1 = a1 || a8; // any || array is any +var ri2 = a2 || a8; // boolean || array is {} +var ri3 = a3 || a8; // number || array is {} +var ri4 = a4 || a8; // string || array is {} +var ri5 = a5 || a8; // void || array is {} +var ri6 = a6 || a8; // enum || array is {} +var ri7 = a7 || a8; // object || array is {} +var ri8 = a8 || a8; // array || array is array +var ri9 = null || a8; // null || array is array +var ri10 = undefined || a8; // undefined || array is array +var rj1 = a1 || null; // any || null is any +var rj2 = a2 || null; // boolean || null is boolean +var rj3 = a3 || null; // number || null is number +var rj4 = a4 || null; // string || null is string +var rj5 = a5 || null; // void || null is void +var rj6 = a6 || null; // enum || null is E +var rj7 = a7 || null; // object || null is object +var rj8 = a8 || null; // array || null is array +var rj9 = null || null; // null || null is any +var rj10 = undefined || null; // undefined || null is any +var rf1 = a1 || undefined; // any || undefined is any +var rf2 = a2 || undefined; // boolean || undefined is boolean +var rf3 = a3 || undefined; // number || undefined is number +var rf4 = a4 || undefined; // string || undefined is string +var rf5 = a5 || undefined; // void || undefined is void +var rf6 = a6 || undefined; // enum || undefined is E +var rf7 = a7 || undefined; // object || undefined is object +var rf8 = a8 || undefined; // array || undefined is array +var rf9 = null || undefined; // null || undefined is any var rf10 = undefined || undefined; // undefined || undefined is any diff --git a/tests/baselines/reference/memberFunctionsWithPrivateOverloads.js b/tests/baselines/reference/memberFunctionsWithPrivateOverloads.js index a4881157ce4..c7ee59c771a 100644 --- a/tests/baselines/reference/memberFunctionsWithPrivateOverloads.js +++ b/tests/baselines/reference/memberFunctionsWithPrivateOverloads.js @@ -77,8 +77,8 @@ var D = (function () { return D; })(); var c; -var r = c.foo(1); // error +var r = c.foo(1); // error var d; -var r2 = d.foo(2); // error -var r3 = C.foo(1); // error +var r2 = d.foo(2); // error +var r3 = C.foo(1); // error var r4 = D.bar(''); // error diff --git a/tests/baselines/reference/memberFunctionsWithPublicPrivateOverloads.js b/tests/baselines/reference/memberFunctionsWithPublicPrivateOverloads.js index ef5b0aa4f0c..94267971dd1 100644 --- a/tests/baselines/reference/memberFunctionsWithPublicPrivateOverloads.js +++ b/tests/baselines/reference/memberFunctionsWithPublicPrivateOverloads.js @@ -73,6 +73,6 @@ var D = (function () { return D; })(); var c; -var r = c.foo(1); // error +var r = c.foo(1); // error var d; var r2 = d.foo(2); // error diff --git a/tests/baselines/reference/mergeThreeInterfaces.js b/tests/baselines/reference/mergeThreeInterfaces.js index 73f35594645..9143fa944cd 100644 --- a/tests/baselines/reference/mergeThreeInterfaces.js +++ b/tests/baselines/reference/mergeThreeInterfaces.js @@ -93,13 +93,13 @@ var M; var a; var r1 = a.foo; // BUG 856491 - var r2 = a.bar; // any, should be number + var r2 = a.bar; // any, should be number // BUG 856491 - var r3 = a.baz; // any, should be boolean + var r3 = a.baz; // any, should be boolean var b; var r4 = b.foo; // BUG 856491 - var r5 = b.bar; // any, should be number + var r5 = b.bar; // any, should be number // BUG 856491 - var r6 = b.baz; // any, should be boolean + var r6 = b.baz; // any, should be boolean })(M || (M = {})); diff --git a/tests/baselines/reference/mergeTwoInterfaces.js b/tests/baselines/reference/mergeTwoInterfaces.js index ca81874ffb9..9415a7d70cb 100644 --- a/tests/baselines/reference/mergeTwoInterfaces.js +++ b/tests/baselines/reference/mergeTwoInterfaces.js @@ -70,9 +70,9 @@ var M; var a; var r1 = a.foo; // BUG 856491 - var r2 = a.bar; // any, should be number + var r2 = a.bar; // any, should be number var b; var r3 = b.foo; // BUG 856491 - var r4 = b.bar; // any, should be string + var r4 = b.bar; // any, should be string })(M || (M = {})); diff --git a/tests/baselines/reference/mergedDeclarations3.js b/tests/baselines/reference/mergedDeclarations3.js index dba0e81887b..f4fd8a5450b 100644 --- a/tests/baselines/reference/mergedDeclarations3.js +++ b/tests/baselines/reference/mergedDeclarations3.js @@ -55,7 +55,7 @@ var M; })(M.Color || (M.Color = {})); var Color = M.Color; })(M || (M = {})); -var p = M.Color.Blue; // ok +var p = M.Color.Blue; // ok var M; (function (M) { function foo() { diff --git a/tests/baselines/reference/mergedInterfacesWithInheritedPrivates2.js b/tests/baselines/reference/mergedInterfacesWithInheritedPrivates2.js index 754f46a9069..0c4419a5fa8 100644 --- a/tests/baselines/reference/mergedInterfacesWithInheritedPrivates2.js +++ b/tests/baselines/reference/mergedInterfacesWithInheritedPrivates2.js @@ -63,5 +63,5 @@ var E = (function (_super) { return E; })(C2); var a; -var r = a.x; // error +var r = a.x; // error var r2 = a.w; // error diff --git a/tests/baselines/reference/mergedModuleDeclarationCodeGen5.js b/tests/baselines/reference/mergedModuleDeclarationCodeGen5.js index c6dd7c7456f..f521b6d8d11 100644 --- a/tests/baselines/reference/mergedModuleDeclarationCodeGen5.js +++ b/tests/baselines/reference/mergedModuleDeclarationCodeGen5.js @@ -52,12 +52,12 @@ var M; })(_plop.plop || (_plop.plop = {})); var plop = _plop.plop; // Emit these references as follows - var v1 = gunk; // gunk - var v2 = buz; // buz - _plop.v3 = _plop.doom; // _plop.doom - _plop.v4 = _plop.M; // _plop.M - _plop.v5 = fudge; // fudge - _plop.v6 = plop; // plop + var v1 = gunk; // gunk + var v2 = buz; // buz + _plop.v3 = _plop.doom; // _plop.doom + _plop.v4 = _plop.M; // _plop.M + _plop.v5 = fudge; // fudge + _plop.v6 = plop; // plop })(_buz.plop || (_buz.plop = {})); var plop = _buz.plop; })(M.buz || (M.buz = {})); diff --git a/tests/baselines/reference/mismatchedExplicitTypeParameterAndArgumentType.js b/tests/baselines/reference/mismatchedExplicitTypeParameterAndArgumentType.js index 83bd8a03985..0465ea46f55 100644 --- a/tests/baselines/reference/mismatchedExplicitTypeParameterAndArgumentType.js +++ b/tests/baselines/reference/mismatchedExplicitTypeParameterAndArgumentType.js @@ -21,6 +21,6 @@ function map(xs, f) { var r0 = map([1, ""], function (x) { return x.toString(); }); var r5 = map([1, ""], function (x) { return x.toString(); }); var r6 = map([1, ""], function (x) { return x.toString(); }); -var r7 = map([1, ""], function (x) { return x.toString(); }); // error -var r7b = map([1, ""], function (x) { return x.toString(); }); // error +var r7 = map([1, ""], function (x) { return x.toString(); }); // error +var r7b = map([1, ""], function (x) { return x.toString(); }); // error var r8 = map([1, ""], function (x) { return x.toString(); }); diff --git a/tests/baselines/reference/moduleAliasInterface.js b/tests/baselines/reference/moduleAliasInterface.js index c5d946f771f..0678656bb02 100644 --- a/tests/baselines/reference/moduleAliasInterface.js +++ b/tests/baselines/reference/moduleAliasInterface.js @@ -72,7 +72,7 @@ var editor; // If you just use p1:modes, the compiler accepts it - should be an error var Bug = (function () { function Bug(p1, p2) { - } // should be an error on p2 - it's not exported + } // should be an error on p2 - it's not exported Bug.prototype.foo = function (p1) { }; return Bug; @@ -84,7 +84,7 @@ var editor2; var i; var Bug = (function () { function Bug(p1, p2) { - } // no error here, since modesOuter is declared externally + } // no error here, since modesOuter is declared externally return Bug; })(); var Foo; diff --git a/tests/baselines/reference/moduleAndInterfaceWithSameName.js b/tests/baselines/reference/moduleAndInterfaceWithSameName.js index d2d6b433e77..b7754c354c7 100644 --- a/tests/baselines/reference/moduleAndInterfaceWithSameName.js +++ b/tests/baselines/reference/moduleAndInterfaceWithSameName.js @@ -46,7 +46,7 @@ var Foo2; Bar.x = 42; })(Bar || (Bar = {})); })(Foo2 || (Foo2 = {})); -var z2 = Foo2.Bar.y; // Error for using interface name as a value. +var z2 = Foo2.Bar.y; // Error for using interface name as a value. var Foo3; (function (Foo3) { (function (Bar) { diff --git a/tests/baselines/reference/moduleNewExportBug.js b/tests/baselines/reference/moduleNewExportBug.js index a6a446f1ce0..51e1bb24144 100644 --- a/tests/baselines/reference/moduleNewExportBug.js +++ b/tests/baselines/reference/moduleNewExportBug.js @@ -24,4 +24,4 @@ var mod1; return C; })(); })(mod1 || (mod1 = {})); -var c; // ERROR: C should not be visible +var c; // ERROR: C should not be visible diff --git a/tests/baselines/reference/moduleProperty2.js b/tests/baselines/reference/moduleProperty2.js index f177f2f4fb2..715577b6458 100644 --- a/tests/baselines/reference/moduleProperty2.js +++ b/tests/baselines/reference/moduleProperty2.js @@ -23,10 +23,10 @@ var M; var y; M.z; var test1 = x; - var test2 = y; // y visible because same module + var test2 = y; // y visible because same module })(M || (M = {})); var N; (function (N) { - var test3 = M.y; // nope y private property of M - var test4 = M.z; // ok public property of M + var test3 = M.y; // nope y private property of M + var test4 = M.z; // ok public property of M })(N || (N = {})); diff --git a/tests/baselines/reference/moduleScopingBug.js b/tests/baselines/reference/moduleScopingBug.js index 6ed1b907e09..d9ac55e2b88 100644 --- a/tests/baselines/reference/moduleScopingBug.js +++ b/tests/baselines/reference/moduleScopingBug.js @@ -34,16 +34,16 @@ var M; (function (M) { var outer; function f() { - var inner = outer; // Ok + var inner = outer; // Ok } var C = (function () { function C() { - var inner = outer; // Ok + var inner = outer; // Ok } return C; })(); var X; (function (X) { - var inner = outer; // Error: outer not visible + var inner = outer; // Error: outer not visible })(X || (X = {})); })(M || (M = {})); diff --git a/tests/baselines/reference/moduleUnassignedVariable.js b/tests/baselines/reference/moduleUnassignedVariable.js index 52a856bbbef..179a2577adf 100644 --- a/tests/baselines/reference/moduleUnassignedVariable.js +++ b/tests/baselines/reference/moduleUnassignedVariable.js @@ -14,9 +14,9 @@ var Bar; Bar.a = 1; function fooA() { return Bar.a; - } // Correct: return Bar.a + } // Correct: return Bar.a Bar.b; function fooB() { return Bar.b; - } // Incorrect: return b + } // Incorrect: return b })(Bar || (Bar = {})); diff --git a/tests/baselines/reference/moduleVariableArrayIndexer.js b/tests/baselines/reference/moduleVariableArrayIndexer.js index 5d8be3b8b6b..fce3bf081a0 100644 --- a/tests/baselines/reference/moduleVariableArrayIndexer.js +++ b/tests/baselines/reference/moduleVariableArrayIndexer.js @@ -9,5 +9,5 @@ module Bar { var Bar; (function (Bar) { Bar.a = 1; - var t = undefined[Bar.a][Bar.a]; // CG: var t = undefined[Bar.a][a]; + var t = undefined[Bar.a][Bar.a]; // CG: var t = undefined[Bar.a][a]; })(Bar || (Bar = {})); diff --git a/tests/baselines/reference/moduleWithNoValuesAsType.js b/tests/baselines/reference/moduleWithNoValuesAsType.js index 08b5aba0090..84d3bdebfce 100644 --- a/tests/baselines/reference/moduleWithNoValuesAsType.js +++ b/tests/baselines/reference/moduleWithNoValuesAsType.js @@ -16,6 +16,6 @@ module C { var c: C; // error //// [moduleWithNoValuesAsType.js] -var a; // error -var b; // error +var a; // error +var b; // error var c; // error diff --git a/tests/baselines/reference/multiModuleFundule1.js b/tests/baselines/reference/multiModuleFundule1.js index afbc4fe5860..f643ed5ee4d 100644 --- a/tests/baselines/reference/multiModuleFundule1.js +++ b/tests/baselines/reference/multiModuleFundule1.js @@ -26,5 +26,5 @@ var C; C.foo = foo; })(C || (C = {})); var r = C(2); -var r2 = new C(2); // using void returning function as constructor +var r2 = new C(2); // using void returning function as constructor var r3 = C.foo(); diff --git a/tests/baselines/reference/nameCollisions.js b/tests/baselines/reference/nameCollisions.js index c9f1baee04d..51b66adcefe 100644 --- a/tests/baselines/reference/nameCollisions.js +++ b/tests/baselines/reference/nameCollisions.js @@ -64,7 +64,7 @@ var T; (function (z) { var t; })(z || (z = {})); - var z; // error + var z; // error var y; (function (y) { var b; @@ -73,14 +73,14 @@ var T; function y() { } return y; - })(); // error + })(); // error var w; var f; function f() { - } //error + } //error function f2() { } - var f2; // error + var f2; // error var i; var C = (function () { function C() { @@ -88,14 +88,14 @@ var T; return C; })(); function C() { - } // error + } // error function C2() { } var C2 = (function () { function C2() { } return C2; - })(); // error + })(); // error function fi() { } var cli = (function () { @@ -107,5 +107,5 @@ var T; function cli2() { } return cli2; - })(); // error + })(); // error })(T || (T = {})); diff --git a/tests/baselines/reference/namedFunctionExpressionAssignedToClassProperty.js b/tests/baselines/reference/namedFunctionExpressionAssignedToClassProperty.js index ed5ddf43bc8..0ce927b78c7 100644 --- a/tests/baselines/reference/namedFunctionExpressionAssignedToClassProperty.js +++ b/tests/baselines/reference/namedFunctionExpressionAssignedToClassProperty.js @@ -18,7 +18,7 @@ class Foo{ var Foo = (function () { function Foo() { this.a = function bar() { - }; // this shouldn't crash the compiler... + }; // this shouldn't crash the compiler... } return Foo; })(); diff --git a/tests/baselines/reference/nestedModulePrivateAccess.js b/tests/baselines/reference/nestedModulePrivateAccess.js index 844476e85e7..2c0e8a8e465 100644 --- a/tests/baselines/reference/nestedModulePrivateAccess.js +++ b/tests/baselines/reference/nestedModulePrivateAccess.js @@ -12,6 +12,6 @@ var a; var x; var b; (function (b) { - var y = x; // should not be an error + var y = x; // should not be an error })(b || (b = {})); })(a || (a = {})); diff --git a/tests/baselines/reference/nestedModules.js b/tests/baselines/reference/nestedModules.js index 6bcce3f7033..73b475f8160 100644 --- a/tests/baselines/reference/nestedModules.js +++ b/tests/baselines/reference/nestedModules.js @@ -36,7 +36,7 @@ var p: M2.X.Point; var A; (function (A) { (function (B) { - var Point = { x: 0, y: 0 }; // bug 832088: could not find module 'C' + var Point = { x: 0, y: 0 }; // bug 832088: could not find module 'C' })(A.B || (A.B = {})); var B = A.B; })(A || (A = {})); diff --git a/tests/baselines/reference/newNonReferenceType.js b/tests/baselines/reference/newNonReferenceType.js index 1078ab2441a..1fe26464898 100644 --- a/tests/baselines/reference/newNonReferenceType.js +++ b/tests/baselines/reference/newNonReferenceType.js @@ -5,4 +5,4 @@ var b = new boolean(); // error //// [newNonReferenceType.js] var a = new any(); -var b = new boolean(); // error +var b = new boolean(); // error diff --git a/tests/baselines/reference/newOnInstanceSymbol.js b/tests/baselines/reference/newOnInstanceSymbol.js index 54401d166ba..dab9033eaa4 100644 --- a/tests/baselines/reference/newOnInstanceSymbol.js +++ b/tests/baselines/reference/newOnInstanceSymbol.js @@ -9,5 +9,5 @@ var C = (function () { } return C; })(); -var x = new C(); // should be ok +var x = new C(); // should be ok new x(); diff --git a/tests/baselines/reference/noErrorsInCallback.js b/tests/baselines/reference/noErrorsInCallback.js index 4e367c9e874..cb6c4e41f8c 100644 --- a/tests/baselines/reference/noErrorsInCallback.js +++ b/tests/baselines/reference/noErrorsInCallback.js @@ -15,7 +15,7 @@ var Bar = (function () { } return Bar; })(); -var one = new Bar({}); // Error +var one = new Bar({}); // Error [].forEach(function () { - var two = new Bar({}); // No error? + var two = new Bar({}); // No error? }); diff --git a/tests/baselines/reference/noImplicitAnyForMethodParameters.js b/tests/baselines/reference/noImplicitAnyForMethodParameters.js index 06f817adede..379cf85b5e2 100644 --- a/tests/baselines/reference/noImplicitAnyForMethodParameters.js +++ b/tests/baselines/reference/noImplicitAnyForMethodParameters.js @@ -19,13 +19,13 @@ var C = (function () { function C() { } C.prototype.foo = function (a) { - }; // OK - non-ambient class and private method - error + }; // OK - non-ambient class and private method - error return C; })(); var D = (function () { function D() { } D.prototype.foo = function (a) { - }; // OK - non-ambient class and public method - error + }; // OK - non-ambient class and public method - error return D; })(); diff --git a/tests/baselines/reference/nullAssignedToUndefined.js b/tests/baselines/reference/nullAssignedToUndefined.js index fec75253b4f..a2ac0458d1a 100644 --- a/tests/baselines/reference/nullAssignedToUndefined.js +++ b/tests/baselines/reference/nullAssignedToUndefined.js @@ -3,5 +3,5 @@ var x = undefined = null; // error var y: typeof undefined = null; // ok, widened //// [nullAssignedToUndefined.js] -var x = undefined = null; // error +var x = undefined = null; // error var y = null; // ok, widened diff --git a/tests/baselines/reference/nullIsSubtypeOfEverythingButUndefined.js b/tests/baselines/reference/nullIsSubtypeOfEverythingButUndefined.js index 1d3b76f5f47..717c364d52c 100644 --- a/tests/baselines/reference/nullIsSubtypeOfEverythingButUndefined.js +++ b/tests/baselines/reference/nullIsSubtypeOfEverythingButUndefined.js @@ -119,7 +119,7 @@ var r8 = true ? function (x) { } : null; var r8b = true ? null : function (x) { return x; -}; // type parameters not identical across declarations +}; // type parameters not identical across declarations var i1; var r9 = true ? i1 : null; var r9 = true ? null : i1; diff --git a/tests/baselines/reference/numericIndexerConstraint1.js b/tests/baselines/reference/numericIndexerConstraint1.js index 611e81bb0d7..9587863a035 100644 --- a/tests/baselines/reference/numericIndexerConstraint1.js +++ b/tests/baselines/reference/numericIndexerConstraint1.js @@ -13,4 +13,4 @@ var Foo = (function () { return Foo; })(); var x; -var result = x["one"]; // error +var result = x["one"]; // error diff --git a/tests/baselines/reference/numericIndexerTyping1.js b/tests/baselines/reference/numericIndexerTyping1.js index 4136bb25cf4..252737db164 100644 --- a/tests/baselines/reference/numericIndexerTyping1.js +++ b/tests/baselines/reference/numericIndexerTyping1.js @@ -14,6 +14,6 @@ var r2: string = i2[1]; // error: numeric indexer returns the type of the string //// [numericIndexerTyping1.js] var i; -var r = i[1]; // error: numeric indexer returns the type of the string indexer +var r = i[1]; // error: numeric indexer returns the type of the string indexer var i2; var r2 = i2[1]; // error: numeric indexer returns the type of the string indexer diff --git a/tests/baselines/reference/numericIndexerTyping2.js b/tests/baselines/reference/numericIndexerTyping2.js index bf181f284f4..1bd4608c065 100644 --- a/tests/baselines/reference/numericIndexerTyping2.js +++ b/tests/baselines/reference/numericIndexerTyping2.js @@ -32,6 +32,6 @@ var I2 = (function (_super) { return I2; })(I); var i; -var r = i[1]; // error: numeric indexer returns the type of the string indexer +var r = i[1]; // error: numeric indexer returns the type of the string indexer var i2; var r2 = i2[1]; // error: numeric indexer returns the type of the string indexere diff --git a/tests/baselines/reference/objectLiteralArraySpecialization.js b/tests/baselines/reference/objectLiteralArraySpecialization.js index 49ffe9e67a0..91d8a5cf805 100644 --- a/tests/baselines/reference/objectLiteralArraySpecialization.js +++ b/tests/baselines/reference/objectLiteralArraySpecialization.js @@ -9,5 +9,5 @@ thing.doSomething((x, y) => x.name === "bob"); // should not error //// [objectLiteralArraySpecialization.js] -var thing = create([{ name: "bob", id: 24 }, { name: "doug", id: 32 }]); // should not error +var thing = create([{ name: "bob", id: 24 }, { name: "doug", id: 32 }]); // should not error thing.doSomething(function (x, y) { return x.name === "bob"; }); diff --git a/tests/baselines/reference/objectLiteralIndexerErrors.js b/tests/baselines/reference/objectLiteralIndexerErrors.js index bc2ef1559c8..1c791150f50 100644 --- a/tests/baselines/reference/objectLiteralIndexerErrors.js +++ b/tests/baselines/reference/objectLiteralIndexerErrors.js @@ -18,5 +18,5 @@ o1 = { x: c, 0: a }; // string indexer is any, number indexer is A var a; var b; var c; -var o1 = { x: b, 0: a }; // both indexers are A +var o1 = { x: b, 0: a }; // both indexers are A o1 = { x: c, 0: a }; diff --git a/tests/baselines/reference/objectLiteralIndexers.js b/tests/baselines/reference/objectLiteralIndexers.js index 6f0cf90587c..568c528a615 100644 --- a/tests/baselines/reference/objectLiteralIndexers.js +++ b/tests/baselines/reference/objectLiteralIndexers.js @@ -19,6 +19,6 @@ o1 = { x: c, 0: b }; // string indexer is any, number indexer is B var a; var b; var c; -var o1 = { x: a, 0: b }; // string indexer is A, number indexer is B +var o1 = { x: a, 0: b }; // string indexer is A, number indexer is B o1 = { x: b, 0: c }; o1 = { x: c, 0: b }; diff --git a/tests/baselines/reference/objectTypeHidingMembersOfExtendedObject.js b/tests/baselines/reference/objectTypeHidingMembersOfExtendedObject.js index 65e254c5d40..fa41e57e22e 100644 --- a/tests/baselines/reference/objectTypeHidingMembersOfExtendedObject.js +++ b/tests/baselines/reference/objectTypeHidingMembersOfExtendedObject.js @@ -83,13 +83,13 @@ var C = (function () { var c; var r1 = c.valueOf(); var r1b = c.data; -var r1c = r1b['hm']; // should be 'Object' -var r1d = c['hm']; // should be 'any' +var r1c = r1b['hm']; // should be 'Object' +var r1d = c['hm']; // should be 'any' var i; var r2 = i.valueOf(); var r2b = i.data; -var r2c = r2b['hm']; // should be 'Object' -var r2d = i['hm']; // should be 'any' +var r2c = r2b['hm']; // should be 'Object' +var r2d = i['hm']; // should be 'any' var a = { valueOf: function () { }, @@ -97,7 +97,7 @@ var a = { }; var r3 = a.valueOf(); var r3b = a.data; -var r3c = r3b['hm']; // should be 'Object' +var r3c = r3b['hm']; // should be 'Object' var r3d = i['hm']; var b; var r4 = b.valueOf(); diff --git a/tests/baselines/reference/objectTypeWithCallSignatureHidingMembersOfExtendedFunction.js b/tests/baselines/reference/objectTypeWithCallSignatureHidingMembersOfExtendedFunction.js index 33626a331cf..8dbd2f1d66a 100644 --- a/tests/baselines/reference/objectTypeWithCallSignatureHidingMembersOfExtendedFunction.js +++ b/tests/baselines/reference/objectTypeWithCallSignatureHidingMembersOfExtendedFunction.js @@ -38,7 +38,7 @@ var r1 = i.apply; var r1b = i.call; var r1c = i.arguments; var r1d = i.data; -var r1e = i['hm']; // should be Object +var r1e = i['hm']; // should be Object var x; var r2 = x.apply; var r2b = x.call; diff --git a/tests/baselines/reference/objectTypeWithConstructSignatureHidingMembersOfExtendedFunction.js b/tests/baselines/reference/objectTypeWithConstructSignatureHidingMembersOfExtendedFunction.js index e26b7f84052..3895e9951a3 100644 --- a/tests/baselines/reference/objectTypeWithConstructSignatureHidingMembersOfExtendedFunction.js +++ b/tests/baselines/reference/objectTypeWithConstructSignatureHidingMembersOfExtendedFunction.js @@ -35,7 +35,7 @@ var r1 = i.apply; var r1b = i.call; var r1c = i.arguments; var r1d = i.data; -var r1e = i['hm']; // should be Object +var r1e = i['hm']; // should be Object var x; var r2 = x.apply; var r2b = x.call; diff --git a/tests/baselines/reference/objectTypeWithStringIndexerHidingObjectIndexer.js b/tests/baselines/reference/objectTypeWithStringIndexerHidingObjectIndexer.js index 8f0e72aa48d..5f7500ae3cb 100644 --- a/tests/baselines/reference/objectTypeWithStringIndexerHidingObjectIndexer.js +++ b/tests/baselines/reference/objectTypeWithStringIndexerHidingObjectIndexer.js @@ -33,7 +33,7 @@ var r4: string = o2['']; //// [objectTypeWithStringIndexerHidingObjectIndexer.js] var o = {}; -var r = o['']; // should be Object +var r = o['']; // should be Object var C = (function () { function C() { } diff --git a/tests/baselines/reference/objectTypeWithStringNamedNumericProperty.js b/tests/baselines/reference/objectTypeWithStringNamedNumericProperty.js index dd1bff923fb..a52d74b9f2d 100644 --- a/tests/baselines/reference/objectTypeWithStringNamedNumericProperty.js +++ b/tests/baselines/reference/objectTypeWithStringNamedNumericProperty.js @@ -142,10 +142,10 @@ var r2 = c['.1']; var r3 = c['1']; var r3 = c[1]; var r4 = c['1.']; -var r3 = c[1.]; // same as indexing by 1 when done numerically +var r3 = c[1.]; // same as indexing by 1 when done numerically var r5 = c['1..']; var r6 = c['1.0']; -var r3 = c[1.0]; // same as indexing by 1 when done numerically +var r3 = c[1.0]; // same as indexing by 1 when done numerically // BUG 823822 var r7 = i[-1]; var r7 = i[-1.0]; @@ -161,10 +161,10 @@ var r2 = i['.1']; var r3 = i['1']; var r3 = c[1]; var r4 = i['1.']; -var r3 = c[1.]; // same as indexing by 1 when done numerically +var r3 = c[1.]; // same as indexing by 1 when done numerically var r5 = i['1..']; var r6 = i['1.0']; -var r3 = c[1.0]; // same as indexing by 1 when done numerically +var r3 = c[1.0]; // same as indexing by 1 when done numerically // BUG 823822 var r7 = i[-1]; var r7 = i[-1.0]; @@ -180,10 +180,10 @@ var r2 = a['.1']; var r3 = a['1']; var r3 = c[1]; var r4 = a['1.']; -var r3 = c[1.]; // same as indexing by 1 when done numerically +var r3 = c[1.]; // same as indexing by 1 when done numerically var r5 = a['1..']; var r6 = a['1.0']; -var r3 = c[1.0]; // same as indexing by 1 when done numerically +var r3 = c[1.0]; // same as indexing by 1 when done numerically // BUG 823822 var r7 = i[-1]; var r7 = i[-1.0]; @@ -208,10 +208,10 @@ var r2 = b['.1']; var r3 = b['1']; var r3 = c[1]; var r4 = b['1.']; -var r3 = c[1.]; // same as indexing by 1 when done numerically +var r3 = c[1.]; // same as indexing by 1 when done numerically var r5 = b['1..']; var r6 = b['1.0']; -var r3 = c[1.0]; // same as indexing by 1 when done numerically +var r3 = c[1.0]; // same as indexing by 1 when done numerically // BUG 823822 var r7 = i[-1]; var r7 = i[-1.0]; diff --git a/tests/baselines/reference/objectTypesIdentityWithConstructSignatures2.js b/tests/baselines/reference/objectTypesIdentityWithConstructSignatures2.js index 0645165a938..8825f8c301f 100644 --- a/tests/baselines/reference/objectTypesIdentityWithConstructSignatures2.js +++ b/tests/baselines/reference/objectTypesIdentityWithConstructSignatures2.js @@ -93,7 +93,7 @@ var C = (function () { var a; var b = { new: function (x) { return ''; -} }; // not a construct signature, function called new +} }; // not a construct signature, function called new function foo1b(x) { } function foo1c(x) { diff --git a/tests/baselines/reference/objectTypesIdentityWithConstructSignaturesDifferingParamCounts.js b/tests/baselines/reference/objectTypesIdentityWithConstructSignaturesDifferingParamCounts.js index 97a9a25424a..49b2b071a7e 100644 --- a/tests/baselines/reference/objectTypesIdentityWithConstructSignaturesDifferingParamCounts.js +++ b/tests/baselines/reference/objectTypesIdentityWithConstructSignaturesDifferingParamCounts.js @@ -93,7 +93,7 @@ var C = (function () { var a; var b = { new: function (x) { return ''; -} }; // not a construct signature, function called new +} }; // not a construct signature, function called new function foo1b(x) { } function foo1c(x) { diff --git a/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints.js b/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints.js index e02c6bf249d..e495fa98d65 100644 --- a/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints.js +++ b/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints.js @@ -94,7 +94,7 @@ var C = (function () { var a; var b = { new: function (x) { return ''; -} }; // not a construct signature, function called new +} }; // not a construct signature, function called new function foo1b(x) { } function foo1c(x) { diff --git a/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.js b/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.js index e86be4448d8..de9a9bf8c2b 100644 --- a/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.js +++ b/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.js @@ -111,7 +111,7 @@ var D = (function () { var a; var b = { new: function (x, y) { return ''; -} }; // not a construct signature, function called new +} }; // not a construct signature, function called new function foo1b(x) { } function foo1c(x) { diff --git a/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.js b/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.js index 90f4e6856ff..ee06af6d5e1 100644 --- a/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.js +++ b/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.js @@ -130,7 +130,7 @@ var D = (function () { var a; var b = { new: function (x, y) { return ''; -} }; // not a construct signature, function called new +} }; // not a construct signature, function called new function foo1b(x) { } function foo1c(x) { diff --git a/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType.js b/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType.js index ddfb7ed318c..48b8f4a5c5d 100644 --- a/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType.js +++ b/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType.js @@ -101,7 +101,7 @@ var C = (function () { var a; var b = { new: function (x) { return null; -} }; // not a construct signature, function called new +} }; // not a construct signature, function called new function foo1b(x) { } function foo1c(x) { diff --git a/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType2.js b/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType2.js index e86d0b5b96d..b09dcf9ba9c 100644 --- a/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType2.js +++ b/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType2.js @@ -97,7 +97,7 @@ var C = (function () { var a; var b = { new: function (x) { return null; -} }; // not a construct signature, function called new +} }; // not a construct signature, function called new function foo1b(x) { } function foo1c(x) { diff --git a/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesOptionalParams.js b/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesOptionalParams.js index 28fd5e3d01f..42ab74801b1 100644 --- a/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesOptionalParams.js +++ b/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesOptionalParams.js @@ -93,7 +93,7 @@ var C = (function () { var a; var b = { new: function (x, y) { return new C(x, y); -} }; // not a construct signature, function called new +} }; // not a construct signature, function called new function foo1b(x) { } function foo1c(x) { diff --git a/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesOptionalParams2.js b/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesOptionalParams2.js index 45c0cf00547..182a642af91 100644 --- a/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesOptionalParams2.js +++ b/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesOptionalParams2.js @@ -93,7 +93,7 @@ var C = (function () { var a; var b = { new: function (x, y) { return new C(x, y); -} }; // not a construct signature, function called new +} }; // not a construct signature, function called new function foo1b(x) { } function foo1c(x) { diff --git a/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesOptionalParams3.js b/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesOptionalParams3.js index 7495ad86952..a3714bd9dd2 100644 --- a/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesOptionalParams3.js +++ b/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesOptionalParams3.js @@ -93,7 +93,7 @@ var C = (function () { var a; var b = { new: function (x, y) { return new C(x, y); -} }; // not a construct signature, function called new +} }; // not a construct signature, function called new function foo1b(x) { } function foo1c(x) { diff --git a/tests/baselines/reference/objectTypesWithPredefinedTypesAsName.js b/tests/baselines/reference/objectTypesWithPredefinedTypesAsName.js index 72224e6cb2b..650ceb664df 100644 --- a/tests/baselines/reference/objectTypesWithPredefinedTypesAsName.js +++ b/tests/baselines/reference/objectTypesWithPredefinedTypesAsName.js @@ -34,7 +34,7 @@ var bool = (function () { function bool() { } return bool; -})(); // not a predefined type anymore +})(); // not a predefined type anymore var string = (function () { function string() { } diff --git a/tests/baselines/reference/optionalConstructorArgInSuper.js b/tests/baselines/reference/optionalConstructorArgInSuper.js index 2273a2322b0..45c0e032cd8 100644 --- a/tests/baselines/reference/optionalConstructorArgInSuper.js +++ b/tests/baselines/reference/optionalConstructorArgInSuper.js @@ -31,6 +31,6 @@ var Derived = (function (_super) { } return Derived; })(Base); -var d = new Derived(); // bug caused an error here, couldn't select overload +var d = new Derived(); // bug caused an error here, couldn't select overload var d2; d2.foo(); diff --git a/tests/baselines/reference/optionalParamAssignmentCompat.js b/tests/baselines/reference/optionalParamAssignmentCompat.js index 92da10e87ba..a0cdf4c88f4 100644 --- a/tests/baselines/reference/optionalParamAssignmentCompat.js +++ b/tests/baselines/reference/optionalParamAssignmentCompat.js @@ -13,5 +13,5 @@ var d: I1 = i2.m1; // should error //// [optionalParamAssignmentCompat.js] var i2; -var c = i2.p1; // should be ok -var d = i2.m1; // should error +var c = i2.p1; // should be ok +var d = i2.m1; // should error diff --git a/tests/baselines/reference/overEagerReturnTypeSpecialization.js b/tests/baselines/reference/overEagerReturnTypeSpecialization.js index d10bf165edd..6aaa4533ea7 100644 --- a/tests/baselines/reference/overEagerReturnTypeSpecialization.js +++ b/tests/baselines/reference/overEagerReturnTypeSpecialization.js @@ -15,5 +15,5 @@ var r2: I1 = v1.func(num => num.toString()) // Correctly returns an I1> = a // Error, any does not satisfy constraint B> //// [recursiveIdenticalAssignment.js] var a; -var b = a; // Error, any does not satisfy constraint B> +var b = a; // Error, any does not satisfy constraint B> diff --git a/tests/baselines/reference/recursiveInitializer.js b/tests/baselines/reference/recursiveInitializer.js index a9ef5cb8b12..c7a723c35d7 100644 --- a/tests/baselines/reference/recursiveInitializer.js +++ b/tests/baselines/reference/recursiveInitializer.js @@ -32,7 +32,7 @@ var s4 = '' + s4; // boolean unless otherwise specified var b1 = !b1; var b2 = !!b2; -var b3 = !b3 || b3; // expected boolean here. actually 'any' -var b4 = (!b4) && b4; // expected boolean here. actually 'any' +var b3 = !b3 || b3; // expected boolean here. actually 'any' +var b4 = (!b4) && b4; // expected boolean here. actually 'any' // (x:string) => any var f = function (x) { return f(x); }; diff --git a/tests/baselines/reference/returnStatements.js b/tests/baselines/reference/returnStatements.js index a6db832bdc9..4894caa47fa 100644 --- a/tests/baselines/reference/returnStatements.js +++ b/tests/baselines/reference/returnStatements.js @@ -55,7 +55,7 @@ function fn7() { } function fn8() { return; -} // OK, eq. to 'return undefined' +} // OK, eq. to 'return undefined' var C = (function () { function C() { } diff --git a/tests/baselines/reference/returnTypeParameter.js b/tests/baselines/reference/returnTypeParameter.js index bb93a5fcd93..fcf3714583d 100644 --- a/tests/baselines/reference/returnTypeParameter.js +++ b/tests/baselines/reference/returnTypeParameter.js @@ -4,7 +4,7 @@ function f2(a: T): T { return T; } // bug was that this satisfied the return //// [returnTypeParameter.js] function f(a) { -} // error, no return statement +} // error, no return statement function f2(a) { return T; } // bug was that this satisfied the return statement requirement diff --git a/tests/baselines/reference/scopingInCatchBlocks.js b/tests/baselines/reference/scopingInCatchBlocks.js index 9a61f8c9517..8590173147c 100644 --- a/tests/baselines/reference/scopingInCatchBlocks.js +++ b/tests/baselines/reference/scopingInCatchBlocks.js @@ -24,4 +24,4 @@ try { } catch (ex1) { } -var x = ex1; // should error +var x = ex1; // should error diff --git a/tests/baselines/reference/specializedInheritedConstructors1.js b/tests/baselines/reference/specializedInheritedConstructors1.js index 86e93c8b8d2..36280f9a44e 100644 --- a/tests/baselines/reference/specializedInheritedConstructors1.js +++ b/tests/baselines/reference/specializedInheritedConstructors1.js @@ -44,4 +44,4 @@ var MyView = (function (_super) { var m = { model: new Model() }; var aView = new View({ model: new Model() }); var aView2 = new View(m); -var myView = new MyView(m); // was error +var myView = new MyView(m); // was error diff --git a/tests/baselines/reference/staticInheritance.js b/tests/baselines/reference/staticInheritance.js index 23b5ba1e477..5744dae52a2 100644 --- a/tests/baselines/reference/staticInheritance.js +++ b/tests/baselines/reference/staticInheritance.js @@ -22,7 +22,7 @@ function doThing(x) { } var A = (function () { function A() { - this.p = doThing(A); // OK + this.p = doThing(A); // OK } return A; })(); @@ -30,8 +30,8 @@ var B = (function (_super) { __extends(B, _super); function B() { _super.apply(this, arguments); - this.p1 = doThing(A); // OK - this.p2 = doThing(B); // OK + this.p1 = doThing(A); // OK + this.p2 = doThing(B); // OK } return B; })(A); diff --git a/tests/baselines/reference/staticMemberExportAccess.js b/tests/baselines/reference/staticMemberExportAccess.js index 8cbbe15b165..5de5a76ca7a 100644 --- a/tests/baselines/reference/staticMemberExportAccess.js +++ b/tests/baselines/reference/staticMemberExportAccess.js @@ -37,9 +37,9 @@ var Sammy; Sammy.x = 1; })(Sammy || (Sammy = {})); var $; -var instanceOfClassSammy = new $.sammy(); // should be error -var r1 = instanceOfClassSammy.foo(); // r1 is string +var instanceOfClassSammy = new $.sammy(); // should be error +var r1 = instanceOfClassSammy.foo(); // r1 is string var r2 = $.sammy.foo(); -var r3 = $.sammy.bar(); // error -var r4 = $.sammy.x; // error +var r3 = $.sammy.bar(); // error +var r4 = $.sammy.x; // error Sammy.bar(); diff --git a/tests/baselines/reference/staticMemberOfClassAndPublicMemberOfAnotherClassAssignment.js b/tests/baselines/reference/staticMemberOfClassAndPublicMemberOfAnotherClassAssignment.js index 6ebc86f0b48..c33ce796fe0 100644 --- a/tests/baselines/reference/staticMemberOfClassAndPublicMemberOfAnotherClassAssignment.js +++ b/tests/baselines/reference/staticMemberOfClassAndPublicMemberOfAnotherClassAssignment.js @@ -44,7 +44,7 @@ var a = new B(); a = new C(); a = B; a = C; -var b = new C(); // error name is missing +var b = new C(); // error name is missing b = B; b = C; b = a; diff --git a/tests/baselines/reference/staticMethodReferencingTypeArgument1.js b/tests/baselines/reference/staticMethodReferencingTypeArgument1.js index 520c3dd6860..00ba0f14002 100644 --- a/tests/baselines/reference/staticMethodReferencingTypeArgument1.js +++ b/tests/baselines/reference/staticMethodReferencingTypeArgument1.js @@ -25,7 +25,7 @@ var Editor; this.data = data; } List.MakeHead = function () { - var entry = new List(true, null); // can't access T here + var entry = new List(true, null); // can't access T here entry.prev = entry; entry.next = entry; return entry; diff --git a/tests/baselines/reference/staticPropSuper.js b/tests/baselines/reference/staticPropSuper.js index 0904e77aaa7..f77098b56e4 100644 --- a/tests/baselines/reference/staticPropSuper.js +++ b/tests/baselines/reference/staticPropSuper.js @@ -50,7 +50,7 @@ var A = (function () { var B = (function (_super) { __extends(B, _super); function B() { - var x = 1; // should not error + var x = 1; // should not error _super.call(this); } B.s = 9; @@ -60,7 +60,7 @@ var C = (function (_super) { __extends(C, _super); function C() { this.p = 10; - var x = 1; // should error + var x = 1; // should error } return C; })(A); @@ -68,7 +68,7 @@ var D = (function (_super) { __extends(D, _super); function D() { this.p = 11; - var x = 1; // should error + var x = 1; // should error } return D; })(A); @@ -76,7 +76,7 @@ var E = (function (_super) { __extends(E, _super); function E() { this.p = 12; - var x = 1; // should error + var x = 1; // should error } return E; })(A); diff --git a/tests/baselines/reference/staticsNotInScopeInClodule.js b/tests/baselines/reference/staticsNotInScopeInClodule.js index fa321a381cb..9274a04f8b7 100644 --- a/tests/baselines/reference/staticsNotInScopeInClodule.js +++ b/tests/baselines/reference/staticsNotInScopeInClodule.js @@ -16,5 +16,5 @@ var Clod = (function () { })(); var Clod; (function (Clod) { - var p = x; // x isn't in scope here + var p = x; // x isn't in scope here })(Clod || (Clod = {})); diff --git a/tests/baselines/reference/strictModeInConstructor.js b/tests/baselines/reference/strictModeInConstructor.js index 95398cc32cf..d26d26f6878 100644 --- a/tests/baselines/reference/strictModeInConstructor.js +++ b/tests/baselines/reference/strictModeInConstructor.js @@ -94,7 +94,7 @@ var D = (function (_super) { __extends(D, _super); function D() { this.s = 9; - var x = 1; // Error + var x = 1; // Error _super.call(this); "use strict"; } @@ -121,7 +121,7 @@ var Cs = (function (_super) { var Ds = (function (_super) { __extends(Ds, _super); function Ds() { - var x = 1; // no Error + var x = 1; // no Error _super.call(this); "use strict"; } diff --git a/tests/baselines/reference/subtypesOfTypeParameter.js b/tests/baselines/reference/subtypesOfTypeParameter.js index 08d25a0d026..2e7756e125c 100644 --- a/tests/baselines/reference/subtypesOfTypeParameter.js +++ b/tests/baselines/reference/subtypesOfTypeParameter.js @@ -126,8 +126,8 @@ var D1 = (function (_super) { return D1; })(C3); function f1(x, y) { - var r = true ? x : y; // error - var r = true ? y : x; // error + var r = true ? x : y; // error + var r = true ? y : x; // error } var C1 = (function () { function C1() { @@ -186,7 +186,7 @@ function f2(x, y) { } : x; var r8b = true ? x : function (x) { return x; - }; // type parameters not identical across declarations + }; // type parameters not identical across declarations var i1; var r9 = true ? i1 : x; var r9 = true ? x : i1; @@ -214,8 +214,8 @@ function f2(x, y) { var r18 = true ? x : a; var r18 = true ? a : x; } - var r19 = true ? new Object() : x; // BCT is Object - var r19 = true ? x : new Object(); // BCT is Object - var r20 = true ? {} : x; // ok - var r20 = true ? x : {}; // ok + var r19 = true ? new Object() : x; // BCT is Object + var r19 = true ? x : new Object(); // BCT is Object + var r20 = true ? {} : x; // ok + var r20 = true ? x : {}; // ok } diff --git a/tests/baselines/reference/subtypesOfTypeParameterWithConstraints2.js b/tests/baselines/reference/subtypesOfTypeParameterWithConstraints2.js index 5353270ca27..bf582fe13e5 100644 --- a/tests/baselines/reference/subtypesOfTypeParameterWithConstraints2.js +++ b/tests/baselines/reference/subtypesOfTypeParameterWithConstraints2.js @@ -215,96 +215,96 @@ var c; c.bar = 1; })(c || (c = {})); function f4(x) { - var r0 = true ? x : null; // ok - var r0 = true ? null : x; // ok + var r0 = true ? x : null; // ok + var r0 = true ? null : x; // ok var u; - var r0b = true ? u : x; // ok - var r0b = true ? x : u; // ok + var r0b = true ? u : x; // ok + var r0b = true ? x : u; // ok } function f5(x) { - var r1 = true ? 1 : x; // error - var r1 = true ? x : 1; // error + var r1 = true ? 1 : x; // error + var r1 = true ? x : 1; // error } function f6(x) { - var r2 = true ? '' : x; // error - var r2 = true ? x : ''; // error + var r2 = true ? '' : x; // error + var r2 = true ? x : ''; // error } function f7(x) { - var r3 = true ? true : x; // error - var r3 = true ? x : true; // error + var r3 = true ? true : x; // error + var r3 = true ? x : true; // error } function f8(x) { - var r4 = true ? new Date() : x; // ok - var r4 = true ? x : new Date(); // ok + var r4 = true ? new Date() : x; // ok + var r4 = true ? x : new Date(); // ok } function f9(x) { - var r5 = true ? /1/ : x; // ok - var r5 = true ? x : /1/; // ok + var r5 = true ? /1/ : x; // ok + var r5 = true ? x : /1/; // ok } function f10(x) { - var r6 = true ? { foo: 1 } : x; // ok - var r6 = true ? x : { foo: 1 }; // ok + var r6 = true ? { foo: 1 } : x; // ok + var r6 = true ? x : { foo: 1 }; // ok } function f11(x) { var r7 = true ? function () { - } : x; // ok + } : x; // ok var r7 = true ? x : function () { - }; // ok + }; // ok } function f12(x) { var r8 = true ? function (x) { return x; - } : x; // ok + } : x; // ok var r8b = true ? x : function (x) { return x; - }; // ok, type parameters not identical across declarations + }; // ok, type parameters not identical across declarations } function f13(x) { var i1; - var r9 = true ? i1 : x; // ok - var r9 = true ? x : i1; // ok + var r9 = true ? i1 : x; // ok + var r9 = true ? x : i1; // ok } function f14(x) { var c1; - var r10 = true ? c1 : x; // ok - var r10 = true ? x : c1; // ok + var r10 = true ? c1 : x; // ok + var r10 = true ? x : c1; // ok } function f15(x) { var c2; - var r12 = true ? c2 : x; // ok - var r12 = true ? x : c2; // ok + var r12 = true ? c2 : x; // ok + var r12 = true ? x : c2; // ok } function f16(x) { - var r13 = true ? E : x; // BUG 831833 - var r13 = true ? x : E; // BUG 831833 - var r14 = true ? 0 /* A */ : x; // BUG 831833 - var r14 = true ? x : 0 /* A */; // BUG 831833 + var r13 = true ? E : x; // BUG 831833 + var r13 = true ? x : E; // BUG 831833 + var r14 = true ? 0 /* A */ : x; // BUG 831833 + var r14 = true ? x : 0 /* A */; // BUG 831833 } function f17(x) { var af; - var r15 = true ? af : x; // ok - var r15 = true ? x : af; // ok + var r15 = true ? af : x; // ok + var r15 = true ? x : af; // ok } function f18(x) { var ac; - var r16 = true ? ac : x; // ok - var r16 = true ? x : ac; // ok + var r16 = true ? ac : x; // ok + var r16 = true ? x : ac; // ok } function f19(x) { function f17(a) { - var r17 = true ? x : a; // ok - var r17 = true ? a : x; // ok + var r17 = true ? x : a; // ok + var r17 = true ? a : x; // ok } function f18(a) { - var r18 = true ? x : a; // ok - var r18 = true ? a : x; // ok + var r18 = true ? x : a; // ok + var r18 = true ? a : x; // ok } } function f20(x) { - var r19 = true ? new Object() : x; // ok - var r19 = true ? x : new Object(); // ok + var r19 = true ? new Object() : x; // ok + var r19 = true ? x : new Object(); // ok } function f21(x) { - var r20 = true ? {} : x; // ok - var r20 = true ? x : {}; // ok + var r20 = true ? {} : x; // ok + var r20 = true ? x : {}; // ok } diff --git a/tests/baselines/reference/subtypingWithCallSignatures.js b/tests/baselines/reference/subtypingWithCallSignatures.js index e4724fee1a1..73ca2c6543c 100644 --- a/tests/baselines/reference/subtypingWithCallSignatures.js +++ b/tests/baselines/reference/subtypingWithCallSignatures.js @@ -14,8 +14,8 @@ module CallSignature { //// [subtypingWithCallSignatures.js] var CallSignature; (function (CallSignature) { - var r = foo1(function (x) { return 1; }); // ok because base returns void - var r2 = foo1(function (x) { return ''; }); // ok because base returns void - var r3 = foo2(function (x, y) { return 1; }); // ok because base returns void - var r4 = foo2(function (x) { return ''; }); // ok because base returns void + var r = foo1(function (x) { return 1; }); // ok because base returns void + var r2 = foo1(function (x) { return ''; }); // ok because base returns void + var r3 = foo2(function (x, y) { return 1; }); // ok because base returns void + var r4 = foo2(function (x) { return ''; }); // ok because base returns void })(CallSignature || (CallSignature = {})); diff --git a/tests/baselines/reference/subtypingWithCallSignatures2.js b/tests/baselines/reference/subtypingWithCallSignatures2.js index ec088143145..99000d8d337 100644 --- a/tests/baselines/reference/subtypingWithCallSignatures2.js +++ b/tests/baselines/reference/subtypingWithCallSignatures2.js @@ -208,9 +208,9 @@ var OtherDerived = (function (_super) { })(Base); var r1arg1 = function (x) { return [x]; }; var r1arg2 = function (x) { return [1]; }; -var r1 = foo1(r1arg1); // any, return types are not subtype of first overload -var r1a = [r1arg2, r1arg1]; // generic signature, subtype in both directions -var r1b = [r1arg1, r1arg2]; // generic signature, subtype in both directions +var r1 = foo1(r1arg1); // any, return types are not subtype of first overload +var r1a = [r1arg2, r1arg1]; // generic signature, subtype in both directions +var r1b = [r1arg1, r1arg2]; // generic signature, subtype in both directions var r2arg1 = function (x) { return ['']; }; var r2arg2 = function (x) { return ['']; }; var r2 = foo2(r2arg1); @@ -224,32 +224,32 @@ var r3a = [r3arg1, r3arg2]; var r3b = [r3arg2, r3arg1]; var r4arg1 = function (x, y) { return x; }; var r4arg2 = function (x, y) { return ''; }; -var r4 = foo4(r4arg1); // any +var r4 = foo4(r4arg1); // any var r4a = [r4arg1, r4arg2]; var r4b = [r4arg2, r4arg1]; var r5arg1 = function (x) { return null; }; var r5arg2 = function (x) { return ''; }; -var r5 = foo5(r5arg1); // any +var r5 = foo5(r5arg1); // any var r5a = [r5arg1, r5arg2]; var r5b = [r5arg2, r5arg1]; var r6arg1 = function (x) { return null; }; var r6arg2 = function (x) { return null; }; -var r6 = foo6(r6arg1); // any +var r6 = foo6(r6arg1); // any var r6a = [r6arg1, r6arg2]; var r6b = [r6arg2, r6arg1]; var r7arg1 = function (x) { return function (r) { return null; }; }; var r7arg2 = function (x) { return function (r) { return null; }; }; -var r7 = foo7(r7arg1); // any +var r7 = foo7(r7arg1); // any var r7a = [r7arg1, r7arg2]; var r7b = [r7arg2, r7arg1]; var r8arg1 = function (x, y) { return function (r) { return null; }; }; var r8arg2 = function (x, y) { return function (r) { return null; }; }; -var r8 = foo8(r8arg1); // any +var r8 = foo8(r8arg1); // any var r8a = [r8arg1, r8arg2]; var r8b = [r8arg2, r8arg1]; var r9arg1 = function (x, y) { return function (r) { return null; }; }; var r9arg2 = function (x, y) { return function (r) { return null; }; }; -var r9 = foo9(r9arg1); // any +var r9 = foo9(r9arg1); // any var r9a = [r9arg1, r9arg2]; var r9b = [r9arg2, r9arg1]; var r10arg1 = function () { @@ -266,34 +266,34 @@ var r10arg2 = function () { } return null; }; -var r10 = foo10(r10arg1); // any +var r10 = foo10(r10arg1); // any var r10a = [r10arg1, r10arg2]; var r10b = [r10arg2, r10arg1]; var r11arg1 = function (x, y) { return x; }; var r11arg2 = function (x, y) { return null; }; -var r11 = foo11(r11arg1); // any +var r11 = foo11(r11arg1); // any var r11a = [r11arg1, r11arg2]; var r11b = [r11arg2, r11arg1]; var r12arg1 = function (x, y) { return null; }; var r12arg2 = function (x, y) { return null; }; -var r12 = foo12(r12arg1); // any +var r12 = foo12(r12arg1); // any var r12a = [r12arg1, r12arg2]; var r12b = [r12arg2, r12arg1]; var r13arg1 = function (x, y) { return y; }; var r13arg2 = function (x, y) { return null; }; -var r13 = foo13(r13arg1); // any +var r13 = foo13(r13arg1); // any var r13a = [r13arg1, r13arg2]; var r13b = [r13arg2, r13arg1]; var r14arg1 = function (x) { return x.a; }; var r14arg2 = function (x) { return null; }; -var r14 = foo14(r14arg1); // any +var r14 = foo14(r14arg1); // any var r14a = [r14arg1, r14arg2]; var r14b = [r14arg2, r14arg1]; var r15arg1 = function (x) { return null; }; -var r15 = foo15(r15arg1); // any +var r15 = foo15(r15arg1); // any var r16arg1 = function (x) { return [1]; }; var r16 = foo16(r16arg1); var r17arg1 = function (x) { return null; }; -var r17 = foo17(r17arg1); // any +var r17 = foo17(r17arg1); // any var r18arg1 = function (x) { return null; }; var r18 = foo18(r18arg1); diff --git a/tests/baselines/reference/subtypingWithCallSignatures3.js b/tests/baselines/reference/subtypingWithCallSignatures3.js index d9707920223..b91165f5bcd 100644 --- a/tests/baselines/reference/subtypingWithCallSignatures3.js +++ b/tests/baselines/reference/subtypingWithCallSignatures3.js @@ -155,17 +155,17 @@ var Errors; } return OtherDerived; })(Base); - var r1 = foo2(function (x) { return null; }); // any + var r1 = foo2(function (x) { return null; }); // any var r1a = [function (x) { return ['']; }, function (x) { return null; }]; var r1b = [function (x) { return null; }, function (x) { return ['']; }]; var r2arg = function (x) { return function (r) { return null; }; }; var r2arg2 = function (x) { return function (r) { return null; }; }; - var r2 = foo7(r2arg); // any + var r2 = foo7(r2arg); // any var r2a = [r2arg2, r2arg]; var r2b = [r2arg, r2arg2]; var r3arg = function (x, y) { return function (r) { return null; }; }; var r3arg2 = function (x, y) { return function (r) { return null; }; }; - var r3 = foo8(r3arg); // any + var r3 = foo8(r3arg); // any var r3a = [r3arg2, r3arg]; var r3b = [r3arg, r3arg2]; var r4arg = function () { @@ -182,37 +182,37 @@ var Errors; } return null; }; - var r4 = foo10(r4arg); // any + var r4 = foo10(r4arg); // any var r4a = [r4arg2, r4arg]; var r4b = [r4arg, r4arg2]; var r5arg = function (x, y) { return null; }; var r5arg2 = function (x, y) { return null; }; - var r5 = foo11(r5arg); // any + var r5 = foo11(r5arg); // any var r5a = [r5arg2, r5arg]; var r5b = [r5arg, r5arg2]; var r6arg = function (x, y) { return null; }; var r6arg2 = function (x, y) { return null; }; - var r6 = foo12(r6arg); // (x: Array, y: Array) => Array + var r6 = foo12(r6arg); // (x: Array, y: Array) => Array var r6a = [r6arg2, r6arg]; var r6b = [r6arg, r6arg2]; var r7arg = function (x) { return null; }; var r7arg2 = function (x) { return 1; }; - var r7 = foo15(r7arg); // any + var r7 = foo15(r7arg); // any var r7a = [r7arg2, r7arg]; var r7b = [r7arg, r7arg2]; var r7arg3 = function (x) { return 1; }; - var r7c = foo15(r7arg3); // (x: { a: string; b: number }) => number): number; + var r7c = foo15(r7arg3); // (x: { a: string; b: number }) => number): number; var r7d = [r7arg2, r7arg3]; var r7e = [r7arg3, r7arg2]; var r8arg = function (x) { return null; }; - var r8 = foo16(r8arg); // any + var r8 = foo16(r8arg); // any var r9arg = function (x) { return null; }; - var r9 = foo17(r9arg); // (x: { (a: T): T; (a: T): T; }): any[]; (x: { (a: T): T; (a: T): T; }): any[]; + var r9 = foo17(r9arg); // (x: { (a: T): T; (a: T): T; }): any[]; (x: { (a: T): T; (a: T): T; }): any[]; })(Errors || (Errors = {})); var WithGenericSignaturesInBaseType; (function (WithGenericSignaturesInBaseType) { var r2arg2 = function (x) { return ['']; }; - var r2 = foo2(r2arg2); // (x:T) => T[] since we can infer from generic signatures now + var r2 = foo2(r2arg2); // (x:T) => T[] since we can infer from generic signatures now var r3arg2 = function (x) { return null; }; - var r3 = foo3(r3arg2); // any + var r3 = foo3(r3arg2); // any })(WithGenericSignaturesInBaseType || (WithGenericSignaturesInBaseType = {})); diff --git a/tests/baselines/reference/subtypingWithConstructSignatures.js b/tests/baselines/reference/subtypingWithConstructSignatures.js index f1ae395d71f..cfbe5db0ccc 100644 --- a/tests/baselines/reference/subtypingWithConstructSignatures.js +++ b/tests/baselines/reference/subtypingWithConstructSignatures.js @@ -19,11 +19,11 @@ module ConstructSignature { var ConstructSignature; (function (ConstructSignature) { var rarg1; - var r = foo1(rarg1); // ok because base returns void + var r = foo1(rarg1); // ok because base returns void var rarg2; - var r2 = foo1(rarg2); // ok because base returns void + var r2 = foo1(rarg2); // ok because base returns void var r3arg1; - var r3 = foo2(r3arg1); // ok because base returns void + var r3 = foo2(r3arg1); // ok because base returns void var r4arg1; - var r4 = foo2(r4arg1); // ok because base returns void + var r4 = foo2(r4arg1); // ok because base returns void })(ConstructSignature || (ConstructSignature = {})); diff --git a/tests/baselines/reference/subtypingWithConstructSignatures2.js b/tests/baselines/reference/subtypingWithConstructSignatures2.js index 3e5a237cde2..eb5dbd1517b 100644 --- a/tests/baselines/reference/subtypingWithConstructSignatures2.js +++ b/tests/baselines/reference/subtypingWithConstructSignatures2.js @@ -208,9 +208,9 @@ var OtherDerived = (function (_super) { })(Base); var r1arg1; var r1arg2; -var r1 = foo1(r1arg1); // any, return types are not subtype of first overload -var r1a = [r1arg2, r1arg1]; // generic signature, subtype in both directions -var r1b = [r1arg1, r1arg2]; // generic signature, subtype in both directions +var r1 = foo1(r1arg1); // any, return types are not subtype of first overload +var r1a = [r1arg2, r1arg1]; // generic signature, subtype in both directions +var r1b = [r1arg1, r1arg2]; // generic signature, subtype in both directions var r2arg1; var r2arg2; var r2 = foo2(r2arg1); @@ -223,64 +223,64 @@ var r3a = [r3arg1, r3arg2]; var r3b = [r3arg2, r3arg1]; var r4arg1; var r4arg2; -var r4 = foo4(r4arg1); // any +var r4 = foo4(r4arg1); // any var r4a = [r4arg1, r4arg2]; var r4b = [r4arg2, r4arg1]; var r5arg1; var r5arg2; -var r5 = foo5(r5arg1); // any +var r5 = foo5(r5arg1); // any var r5a = [r5arg1, r5arg2]; var r5b = [r5arg2, r5arg1]; var r6arg1; var r6arg2; -var r6 = foo6(r6arg1); // any +var r6 = foo6(r6arg1); // any var r6a = [r6arg1, r6arg2]; var r6b = [r6arg2, r6arg1]; var r7arg1; var r7arg2; -var r7 = foo7(r7arg1); // any +var r7 = foo7(r7arg1); // any var r7a = [r7arg1, r7arg2]; var r7b = [r7arg2, r7arg1]; var r8arg1; var r8arg2; -var r8 = foo8(r8arg1); // any +var r8 = foo8(r8arg1); // any var r8a = [r8arg1, r8arg2]; var r8b = [r8arg2, r8arg1]; var r9arg1; var r9arg2; -var r9 = foo9(r9arg1); // any +var r9 = foo9(r9arg1); // any var r9a = [r9arg1, r9arg2]; var r9b = [r9arg2, r9arg1]; var r10arg1; var r10arg2; -var r10 = foo10(r10arg1); // any +var r10 = foo10(r10arg1); // any var r10a = [r10arg1, r10arg2]; var r10b = [r10arg2, r10arg1]; var r11arg1; var r11arg2; -var r11 = foo11(r11arg1); // any +var r11 = foo11(r11arg1); // any var r11a = [r11arg1, r11arg2]; var r11b = [r11arg2, r11arg1]; var r12arg1; var r12arg2; -var r12 = foo12(r12arg1); // any +var r12 = foo12(r12arg1); // any var r12a = [r12arg1, r12arg2]; var r12b = [r12arg2, r12arg1]; var r13arg1; var r13arg2; -var r13 = foo13(r13arg1); // any +var r13 = foo13(r13arg1); // any var r13a = [r13arg1, r13arg2]; var r13b = [r13arg2, r13arg1]; var r14arg1; var r14arg2; -var r14 = foo14(r14arg1); // any +var r14 = foo14(r14arg1); // any var r14a = [r14arg1, r14arg2]; var r14b = [r14arg2, r14arg1]; var r15arg1; -var r15 = foo15(r15arg1); // any +var r15 = foo15(r15arg1); // any var r16arg1; var r16 = foo16(r16arg1); var r17arg1; -var r17 = foo17(r17arg1); // any +var r17 = foo17(r17arg1); // any var r18arg1; var r18 = foo18(r18arg1); diff --git a/tests/baselines/reference/subtypingWithConstructSignatures3.js b/tests/baselines/reference/subtypingWithConstructSignatures3.js index 383ce411f68..961b4cb2d10 100644 --- a/tests/baselines/reference/subtypingWithConstructSignatures3.js +++ b/tests/baselines/reference/subtypingWithConstructSignatures3.js @@ -159,52 +159,52 @@ var Errors; })(Base); var r1arg1; var r1arg2; - var r1 = foo2(r1arg1); // any + var r1 = foo2(r1arg1); // any var r1a = [r1arg2, r1arg1]; var r1b = [r1arg1, r1arg2]; var r2arg1; var r2arg2; - var r2 = foo7(r2arg1); // any + var r2 = foo7(r2arg1); // any var r2a = [r2arg2, r2arg1]; var r2b = [r2arg1, r2arg2]; var r3arg1; var r3arg2; - var r3 = foo8(r3arg1); // any + var r3 = foo8(r3arg1); // any var r3a = [r3arg2, r3arg1]; var r3b = [r3arg1, r3arg2]; var r4arg1; var r4arg2; - var r4 = foo10(r4arg1); // any + var r4 = foo10(r4arg1); // any var r4a = [r4arg2, r4arg1]; var r4b = [r4arg1, r4arg2]; var r5arg1; var r5arg2; - var r5 = foo11(r5arg1); // any + var r5 = foo11(r5arg1); // any var r5a = [r5arg2, r5arg1]; var r5b = [r5arg1, r5arg2]; var r6arg1; var r6arg2; - var r6 = foo12(r6arg1); // new (x: Array, y: Array) => Array + var r6 = foo12(r6arg1); // new (x: Array, y: Array) => Array var r6a = [r6arg2, r6arg1]; var r6b = [r6arg1, r6arg2]; var r7arg1; var r7arg2; - var r7 = foo15(r7arg1); // (x: { a: string; b: number }) => number): number; + var r7 = foo15(r7arg1); // (x: { a: string; b: number }) => number): number; var r7a = [r7arg2, r7arg1]; var r7b = [r7arg1, r7arg2]; var r7arg3; - var r7c = foo15(r7arg3); // any + var r7c = foo15(r7arg3); // any var r7d = [r7arg2, r7arg3]; var r7e = [r7arg3, r7arg2]; var r8arg; - var r8 = foo16(r8arg); // any + var r8 = foo16(r8arg); // any var r9arg; - var r9 = foo17(r9arg); // // (x: { (a: T): T; (a: T): T; }): any[]; (x: { (a: T): T; (a: T): T; }): any[]; + var r9 = foo17(r9arg); // // (x: { (a: T): T; (a: T): T; }): any[]; (x: { (a: T): T; (a: T): T; }): any[]; })(Errors || (Errors = {})); var WithGenericSignaturesInBaseType; (function (WithGenericSignaturesInBaseType) { var r2arg2; - var r2 = foo2(r2arg2); // (x:T) => T[] since we can infer from generic signatures now + var r2 = foo2(r2arg2); // (x:T) => T[] since we can infer from generic signatures now var r3arg2; - var r3 = foo3(r3arg2); // any + var r3 = foo3(r3arg2); // any })(WithGenericSignaturesInBaseType || (WithGenericSignaturesInBaseType = {})); diff --git a/tests/baselines/reference/subtypingWithOptionalProperties.js b/tests/baselines/reference/subtypingWithOptionalProperties.js index 7a3dabbec63..1d60f0745b2 100644 --- a/tests/baselines/reference/subtypingWithOptionalProperties.js +++ b/tests/baselines/reference/subtypingWithOptionalProperties.js @@ -17,5 +17,5 @@ function f(a) { var b = a; return b; } -var r = f({ s: new Object() }); // ok +var r = f({ s: new Object() }); // ok r.s && r.s.toFixed(); diff --git a/tests/baselines/reference/superAccess.js b/tests/baselines/reference/superAccess.js index 89ff4ad0927..3d9080b76e1 100644 --- a/tests/baselines/reference/superAccess.js +++ b/tests/baselines/reference/superAccess.js @@ -34,9 +34,9 @@ var MyDerived = (function (_super) { _super.apply(this, arguments); } MyDerived.prototype.foo = function () { - var l3 = _super.prototype.S1; // Expected => Error: Only public instance methods of the base class are accessible via the 'super' keyword - var l4 = _super.prototype.S2; // Expected => Error: Only public instance methods of the base class are accessible via the 'super' keyword - var l5 = _super.prototype.f.call(this); // Expected => Error: Only public instance methods of the base class are accessible via the 'super' keyword + var l3 = _super.prototype.S1; // Expected => Error: Only public instance methods of the base class are accessible via the 'super' keyword + var l4 = _super.prototype.S2; // Expected => Error: Only public instance methods of the base class are accessible via the 'super' keyword + var l5 = _super.prototype.f.call(this); // Expected => Error: Only public instance methods of the base class are accessible via the 'super' keyword }; return MyDerived; })(MyBase); diff --git a/tests/baselines/reference/superCallAssignResult.js b/tests/baselines/reference/superCallAssignResult.js index c485347d8be..3a57a173a1c 100644 --- a/tests/baselines/reference/superCallAssignResult.js +++ b/tests/baselines/reference/superCallAssignResult.js @@ -25,7 +25,7 @@ var E = (function () { var H = (function (_super) { __extends(H, _super); function H() { - var x = _super.call(this, 5); // Should be of type void, not E. + var x = _super.call(this, 5); // Should be of type void, not E. x = 5; } return H; diff --git a/tests/baselines/reference/targetTypeBaseCalls.js b/tests/baselines/reference/targetTypeBaseCalls.js index a80b80b589e..b6114a8e686 100644 --- a/tests/baselines/reference/targetTypeBaseCalls.js +++ b/tests/baselines/reference/targetTypeBaseCalls.js @@ -46,4 +46,4 @@ var Bar = (function (_super) { }); } return Bar; -})(Foo); // error, if types are applied correctly +})(Foo); // error, if types are applied correctly diff --git a/tests/baselines/reference/targetTypeCalls.js b/tests/baselines/reference/targetTypeCalls.js index f1859b35f67..6b3653276fd 100644 --- a/tests/baselines/reference/targetTypeCalls.js +++ b/tests/baselines/reference/targetTypeCalls.js @@ -10,19 +10,19 @@ var fra1 = function () { return function (v) { return v; }; -}(); // should work +}(); // should work var fra2 = function () { return function () { return 0; }; -}(); // should work +}(); // should work var fra3 = function () { return function () { return function (v) { return v; }; }(); -}(); // should work +}(); // should work var fra4 = function () { return function () { return function (v) { diff --git a/tests/baselines/reference/targetTypeTest3.js b/tests/baselines/reference/targetTypeTest3.js index 594d5a98c7d..53e5691ab49 100644 --- a/tests/baselines/reference/targetTypeTest3.js +++ b/tests/baselines/reference/targetTypeTest3.js @@ -13,7 +13,7 @@ function func2(stuff1:string, stuff2:number, stuff3:number) { //// [targetTypeTest3.js] // Test target typing for array literals and call expressions -var a = [1, 2, "3"]; // should produce an error +var a = [1, 2, "3"]; // should produce an error function func1(stuff) { return stuff; } diff --git a/tests/baselines/reference/thisInInnerFunctions.js b/tests/baselines/reference/thisInInnerFunctions.js index 0329f0f09e0..3675ce844d0 100644 --- a/tests/baselines/reference/thisInInnerFunctions.js +++ b/tests/baselines/reference/thisInInnerFunctions.js @@ -26,7 +26,7 @@ var Foo = (function () { function inner() { var _this = this; this.y = "hi"; - var f = function () { return _this.y; }; // 'this' should be not type to 'Foo' either + var f = function () { return _this.y; }; // 'this' should be not type to 'Foo' either } }; return Foo; diff --git a/tests/baselines/reference/thisInLambda.js b/tests/baselines/reference/thisInLambda.js index f7b9e0e209f..0880606baf6 100644 --- a/tests/baselines/reference/thisInLambda.js +++ b/tests/baselines/reference/thisInLambda.js @@ -26,7 +26,7 @@ var Foo = (function () { Foo.prototype.bar = function () { var _this = this; this.x; - var f = function () { return _this.x; }; // 'this' should be type 'Foo' as well + var f = function () { return _this.x; }; // 'this' should be type 'Foo' as well }; return Foo; })(); diff --git a/tests/baselines/reference/thisInOuterClassBody.js b/tests/baselines/reference/thisInOuterClassBody.js index 49373c9e671..37dfd6fc373 100644 --- a/tests/baselines/reference/thisInOuterClassBody.js +++ b/tests/baselines/reference/thisInOuterClassBody.js @@ -28,7 +28,7 @@ var Foo = (function () { Foo.prototype.bar = function () { var _this = this; this.x; - var f = function () { return _this.x; }; // 'this' should be type 'Foo' as well + var f = function () { return _this.x; }; // 'this' should be type 'Foo' as well var p = this.y; return this; }; diff --git a/tests/baselines/reference/this_inside-enum-should-not-be-allowed.js b/tests/baselines/reference/this_inside-enum-should-not-be-allowed.js index ebe41703adb..094c453e089 100644 --- a/tests/baselines/reference/this_inside-enum-should-not-be-allowed.js +++ b/tests/baselines/reference/this_inside-enum-should-not-be-allowed.js @@ -12,12 +12,12 @@ module ModuleEnum { //// [this_inside-enum-should-not-be-allowed.js] var TopLevelEnum; (function (TopLevelEnum) { - TopLevelEnum[TopLevelEnum["ThisWasAllowedButShouldNotBe"] = this] = "ThisWasAllowedButShouldNotBe"; // Should not be allowed + TopLevelEnum[TopLevelEnum["ThisWasAllowedButShouldNotBe"] = this] = "ThisWasAllowedButShouldNotBe"; // Should not be allowed })(TopLevelEnum || (TopLevelEnum = {})); var ModuleEnum; (function (ModuleEnum) { var EnumInModule; (function (EnumInModule) { - EnumInModule[EnumInModule["WasADifferentError"] = this] = "WasADifferentError"; // this was handled as if this was in a module + EnumInModule[EnumInModule["WasADifferentError"] = this] = "WasADifferentError"; // this was handled as if this was in a module })(EnumInModule || (EnumInModule = {})); })(ModuleEnum || (ModuleEnum = {})); diff --git a/tests/baselines/reference/topLevelModuleDeclarationAndFile.js b/tests/baselines/reference/topLevelModuleDeclarationAndFile.js index 62e27cb4043..c47de516108 100644 --- a/tests/baselines/reference/topLevelModuleDeclarationAndFile.js +++ b/tests/baselines/reference/topLevelModuleDeclarationAndFile.js @@ -22,5 +22,5 @@ exports.x = 42; //// [foo_2.js] /// var foo = require("vs/foo_0"); -var z1 = foo.x + 10; // Should error, as declaration should win -var z2 = foo.y() + 10; // Should resolve +var z1 = foo.x + 10; // Should error, as declaration should win +var z2 = foo.y() + 10; // Should resolve diff --git a/tests/baselines/reference/twoInterfacesDifferentRootModule.js b/tests/baselines/reference/twoInterfacesDifferentRootModule.js index 7212d493415..fe6f66b1b72 100644 --- a/tests/baselines/reference/twoInterfacesDifferentRootModule.js +++ b/tests/baselines/reference/twoInterfacesDifferentRootModule.js @@ -33,9 +33,9 @@ module M2 { var M2; (function (M2) { var a; - var r1 = a.foo; // error + var r1 = a.foo; // error var r2 = a.bar; var b; - var r3 = b.foo; // error + var r3 = b.foo; // error var r4 = b.bar; })(M2 || (M2 = {})); diff --git a/tests/baselines/reference/twoInterfacesDifferentRootModule2.js b/tests/baselines/reference/twoInterfacesDifferentRootModule2.js index 6586a26d4b4..92eb1130ab8 100644 --- a/tests/baselines/reference/twoInterfacesDifferentRootModule2.js +++ b/tests/baselines/reference/twoInterfacesDifferentRootModule2.js @@ -44,16 +44,16 @@ var M; var M2; (function (M2) { var a; - var r1 = a.foo; // error + var r1 = a.foo; // error var r2 = a.bar; var b; - var r3 = b.foo; // error + var r3 = b.foo; // error var r4 = b.bar; })(M2 || (M2 = {})); var a; var r1 = a.foo; - var r2 = a.bar; // error + var r2 = a.bar; // error var b; var r3 = b.foo; - var r4 = b.bar; // error + var r4 = b.bar; // error })(M || (M = {})); diff --git a/tests/baselines/reference/twoMergedInterfacesWithDifferingOverloads.js b/tests/baselines/reference/twoMergedInterfacesWithDifferingOverloads.js index 3c25a45fe23..d0a0d81ff9d 100644 --- a/tests/baselines/reference/twoMergedInterfacesWithDifferingOverloads.js +++ b/tests/baselines/reference/twoMergedInterfacesWithDifferingOverloads.js @@ -52,8 +52,8 @@ var r3 = d.foo(1, 1); // boolean, last definition wins //// [twoMergedInterfacesWithDifferingOverloads.js] var b; -var r = b.foo(true); // returns Date +var r = b.foo(true); // returns Date var c; -var r2 = c.foo(1, 2); // number +var r2 = c.foo(1, 2); // number var d; var r3 = d.foo(1, 1); // boolean, last definition wins diff --git a/tests/baselines/reference/typeArgInference2.js b/tests/baselines/reference/typeArgInference2.js index 5ef26ad67dc..22a083b3f4c 100644 --- a/tests/baselines/reference/typeArgInference2.js +++ b/tests/baselines/reference/typeArgInference2.js @@ -13,9 +13,9 @@ var z5 = foo({ name: "abc", a: 5 }); // { name: string; a: number } var z6 = foo({ name: "abc", a: 5 }, { name: "def", b: 5 }); // Item //// [typeArgInference2.js] -var z1 = foo(null); // any -var z2 = foo(); // Item -var z3 = foo({ name: null }); // { name: any } -var z4 = foo({ name: "abc" }); // { name: string } -var z5 = foo({ name: "abc", a: 5 }); // { name: string; a: number } +var z1 = foo(null); // any +var z2 = foo(); // Item +var z3 = foo({ name: null }); // { name: any } +var z4 = foo({ name: "abc" }); // { name: string } +var z5 = foo({ name: "abc", a: 5 }); // { name: string; a: number } var z6 = foo({ name: "abc", a: 5 }, { name: "def", b: 5 }); // Item diff --git a/tests/baselines/reference/typeArgumentInferenceOrdering.js b/tests/baselines/reference/typeArgumentInferenceOrdering.js index 65b872963c4..53917844f66 100644 --- a/tests/baselines/reference/typeArgumentInferenceOrdering.js +++ b/tests/baselines/reference/typeArgumentInferenceOrdering.js @@ -19,7 +19,7 @@ interface Goo { function foo(f) { return null; } -var x = foo(new C()).x; // was Error that property x does not exist on type {} +var x = foo(new C()).x; // was Error that property x does not exist on type {} var C = (function () { function C() { } diff --git a/tests/baselines/reference/typeArgumentInferenceTransitiveConstraints.js b/tests/baselines/reference/typeArgumentInferenceTransitiveConstraints.js index 9fbfce4235d..003ae4af535 100644 --- a/tests/baselines/reference/typeArgumentInferenceTransitiveConstraints.js +++ b/tests/baselines/reference/typeArgumentInferenceTransitiveConstraints.js @@ -13,4 +13,4 @@ function fn(a, b, c) { return [a, b, c]; } var d = fn(new Date(), new Date(), new Date()); -var d; // Should be OK (d should be Date[]) +var d; // Should be OK (d should be Date[]) diff --git a/tests/baselines/reference/typeArgumentInferenceWithConstraints.js b/tests/baselines/reference/typeArgumentInferenceWithConstraints.js index 42312a5dce8..80f168271d2 100644 --- a/tests/baselines/reference/typeArgumentInferenceWithConstraints.js +++ b/tests/baselines/reference/typeArgumentInferenceWithConstraints.js @@ -173,7 +173,7 @@ someGenerics7(function (n) { return n; }, function (n) { return n; }, function ( function someGenerics8(n) { return n; } -var x = someGenerics8(someGenerics7); // Error +var x = someGenerics8(someGenerics7); // Error x(null, null, null); // Generic call with multiple parameters of generic type passed arguments with no best common type function someGenerics9(a, b, c) { diff --git a/tests/baselines/reference/typeArgumentsShouldDisallowNonGenericOverloads.js b/tests/baselines/reference/typeArgumentsShouldDisallowNonGenericOverloads.js index 5f8180962e1..5a93258ab41 100644 --- a/tests/baselines/reference/typeArgumentsShouldDisallowNonGenericOverloads.js +++ b/tests/baselines/reference/typeArgumentsShouldDisallowNonGenericOverloads.js @@ -15,7 +15,7 @@ var z: number = foo("hi"); // should error function foo(a) { return "hi"; } -var x = foo("hi"); // return type should be 'number' -var y = foo("hi"); // return type should be 'string' -var w = foo("hi"); // should error +var x = foo("hi"); // return type should be 'number' +var y = foo("hi"); // return type should be 'string' +var w = foo("hi"); // should error var z = foo("hi"); // should error diff --git a/tests/baselines/reference/typeConstraintsWithConstructSignatures.js b/tests/baselines/reference/typeConstraintsWithConstructSignatures.js index 4c625e91f26..749a55de9a4 100644 --- a/tests/baselines/reference/typeConstraintsWithConstructSignatures.js +++ b/tests/baselines/reference/typeConstraintsWithConstructSignatures.js @@ -19,8 +19,8 @@ var C = (function () { this.data2 = data2; } C.prototype.create = function () { - var x = new this.data(); // should not error - var x2 = new this.data2(); // should not error + var x = new this.data(); // should not error + var x2 = new this.data2(); // should not error }; return C; })(); diff --git a/tests/baselines/reference/typeOfEnumAndVarRedeclarations.js b/tests/baselines/reference/typeOfEnumAndVarRedeclarations.js index cbfccd231a4..995b0c75561 100644 --- a/tests/baselines/reference/typeOfEnumAndVarRedeclarations.js +++ b/tests/baselines/reference/typeOfEnumAndVarRedeclarations.js @@ -20,6 +20,6 @@ var E; E[E["b"] = 1] = "b"; })(E || (E = {})); var x = E; -var x; // Shouldnt error +var x; // Shouldnt error var y = E; var y; // two errors: the types are not identical and duplicate signatures diff --git a/tests/baselines/reference/typeOfThisInStaticMembers2.js b/tests/baselines/reference/typeOfThisInStaticMembers2.js index 51a999d1b95..9de5695640d 100644 --- a/tests/baselines/reference/typeOfThisInStaticMembers2.js +++ b/tests/baselines/reference/typeOfThisInStaticMembers2.js @@ -11,12 +11,12 @@ class C2 { var C = (function () { function C() { } - C.foo = this; // error + C.foo = this; // error return C; })(); var C2 = (function () { function C2() { } - C2.foo = this; // error + C2.foo = this; // error return C2; })(); diff --git a/tests/baselines/reference/typeParameterAsTypeParameterConstraint2.js b/tests/baselines/reference/typeParameterAsTypeParameterConstraint2.js index a4aa2264e43..9e1b3b1b3ec 100644 --- a/tests/baselines/reference/typeParameterAsTypeParameterConstraint2.js +++ b/tests/baselines/reference/typeParameterAsTypeParameterConstraint2.js @@ -23,14 +23,14 @@ foo2([], ['']); // these should be errors unless otherwise noted function foo(x, y) { return y; -} // this is now an error +} // this is now an error foo(1, ''); foo(1, {}); var n; var r3 = foo(1, n); function foo2(x, y) { return y; -} // this is now an error +} // this is now an error foo2(1, { length: '' }); foo2(1, { length: {} }); foo2([], ['']); diff --git a/tests/baselines/reference/typecheckIfCondition.js b/tests/baselines/reference/typecheckIfCondition.js index b13460835d8..f3e04ede538 100644 --- a/tests/baselines/reference/typecheckIfCondition.js +++ b/tests/baselines/reference/typecheckIfCondition.js @@ -12,5 +12,5 @@ function myWrapper() function myWrapper() { if (!module.exports) module.exports = ""; - var x = null; // don't want to baseline output + var x = null; // don't want to baseline output } diff --git a/tests/baselines/reference/typeofInternalModules.js b/tests/baselines/reference/typeofInternalModules.js index a7ced17c1cf..7b5f8ef4f41 100644 --- a/tests/baselines/reference/typeofInternalModules.js +++ b/tests/baselines/reference/typeofInternalModules.js @@ -40,7 +40,7 @@ var Outer; var importInst = Outer.instantiated; var x1 = importInst.C; var x2 = new x1(); -var x3; // Error again +var x3; // Error again var x4 = Outer; var x5; x5 = Outer; diff --git a/tests/baselines/reference/typeofProperty.js b/tests/baselines/reference/typeofProperty.js index 7453f2b6ee0..6735883bc8f 100644 --- a/tests/baselines/reference/typeofProperty.js +++ b/tests/baselines/reference/typeofProperty.js @@ -71,5 +71,5 @@ var ValidClass = (function () { })(); var vcInstance = new ValidClass(); var viInstance = vcInstance; -var x1; // x1: string -var x2; // x2: string +var x1; // x1: string +var x2; // x2: string diff --git a/tests/baselines/reference/typeofSimple.js b/tests/baselines/reference/typeofSimple.js index a683595cc34..762fff6059a 100644 --- a/tests/baselines/reference/typeofSimple.js +++ b/tests/baselines/reference/typeofSimple.js @@ -15,8 +15,8 @@ numberI = fun(); //// [typeofSimple.js] var v = 3; var v2; -var v3 = v2; // Not assignment compatible -var numberJ; //Error, cannot reference type in typeof +var v3 = v2; // Not assignment compatible +var numberJ; //Error, cannot reference type in typeof var numberI; var fun; numberI = fun(); diff --git a/tests/baselines/reference/unaryPlus.js b/tests/baselines/reference/unaryPlus.js index 9d0d5cd2829..7daf873c324 100644 --- a/tests/baselines/reference/unaryPlus.js +++ b/tests/baselines/reference/unaryPlus.js @@ -23,6 +23,6 @@ var E; ; var c = +0 /* some */; // also allowed, used to be errors -var x = +"3"; //should be valid -var y = -"3"; // should be valid -var z = ~"3"; // should be valid +var x = +"3"; //should be valid +var y = -"3"; // should be valid +var z = ~"3"; // should be valid diff --git a/tests/baselines/reference/unknownSymbols1.js b/tests/baselines/reference/unknownSymbols1.js index 380d37e8151..e4f38971461 100644 --- a/tests/baselines/reference/unknownSymbols1.js +++ b/tests/baselines/reference/unknownSymbols1.js @@ -46,7 +46,7 @@ function foo(x, y) { function foo2() { return asdf; } -var z = x; // should be an error +var z = x; // should be an error var C = (function () { function C() { } @@ -69,7 +69,7 @@ var C4 = (function (_super) { } return C4; })(C3); -var x2 = this.asdf; // no error, this is any +var x2 = this.asdf; // no error, this is any var C5 = (function () { function C5() { this.asdf = asdf; diff --git a/tests/baselines/reference/unknownSymbols2.js b/tests/baselines/reference/unknownSymbols2.js index d9ce27ecbd7..ba1b92ef71c 100644 --- a/tests/baselines/reference/unknownSymbols2.js +++ b/tests/baselines/reference/unknownSymbols2.js @@ -35,7 +35,7 @@ var M; (function (M) { var x; var y = x + asdf; - var z = x; // should be an error + var z = x; // should be an error if (asdf) { } else if (qwerty) { diff --git a/tests/baselines/reference/untypedFunctionCallsWithTypeParameters1.js b/tests/baselines/reference/untypedFunctionCallsWithTypeParameters1.js index a8bf41e4eea..2a993269373 100644 --- a/tests/baselines/reference/untypedFunctionCallsWithTypeParameters1.js +++ b/tests/baselines/reference/untypedFunctionCallsWithTypeParameters1.js @@ -58,7 +58,7 @@ var r1 = x(); var y = x; var r2 = y(); var c; -var r3 = c(); // should be an error +var r3 = c(); // should be an error var C = (function () { function C() { this.prototype = null; @@ -70,18 +70,18 @@ var C = (function () { return C; })(); var c2; -var r4 = c2(); // should be an error +var r4 = c2(); // should be an error var C2 = (function (_super) { __extends(C2, _super); function C2() { _super.apply(this, arguments); } return C2; -})(Function); // error +})(Function); // error var c3; -var r5 = c3(); // error +var r5 = c3(); // error var z; -var r6 = z(1); // error +var r6 = z(1); // error var c4; c4(1); var c5; diff --git a/tests/baselines/reference/varNameConflictsWithImportInDifferentPartOfModule.js b/tests/baselines/reference/varNameConflictsWithImportInDifferentPartOfModule.js index 5eb8e242351..870b01eda8e 100644 --- a/tests/baselines/reference/varNameConflictsWithImportInDifferentPartOfModule.js +++ b/tests/baselines/reference/varNameConflictsWithImportInDifferentPartOfModule.js @@ -15,5 +15,5 @@ var M1; })(M1 || (M1 = {})); var M1; (function (M1) { - M1.q = M1.s; // Should be an error but isn't + M1.q = M1.s; // Should be an error but isn't })(M1 || (M1 = {})); diff --git a/tests/baselines/reference/voidArrayLit.js b/tests/baselines/reference/voidArrayLit.js index 81506fa30ae..2e967e1c3f0 100644 --- a/tests/baselines/reference/voidArrayLit.js +++ b/tests/baselines/reference/voidArrayLit.js @@ -7,7 +7,7 @@ foo((()=>{})()); // error //// [voidArrayLit.js] var va = [(function () { -})()]; // ok +})()]; // ok (function () { })(); function foo(s) { diff --git a/tests/baselines/reference/voidFunctionAssignmentCompat.js b/tests/baselines/reference/voidFunctionAssignmentCompat.js index ef260dfae9a..4d77c2a18c1 100644 --- a/tests/baselines/reference/voidFunctionAssignmentCompat.js +++ b/tests/baselines/reference/voidFunctionAssignmentCompat.js @@ -44,19 +44,19 @@ execVoid(function () { var fra = function () { return function () { }; -}; // should work +}; // should work var frv = function () { return function () { return 0; }; -}; // should work +}; // should work var fra3 = (function () { return function (v) { return v; }; -})(); // should work +})(); // should work var frv3 = (function () { return function () { return 0; }; -})(); // should work +})(); // should work diff --git a/tests/baselines/reference/widenToAny1.js b/tests/baselines/reference/widenToAny1.js index f1bdc7ac004..3dfa78babca 100644 --- a/tests/baselines/reference/widenToAny1.js +++ b/tests/baselines/reference/widenToAny1.js @@ -10,4 +10,4 @@ var z1: number = foo1({ x: undefined, y: "def" }); // Best common type is any function foo1(f1) { return undefined; } -var z1 = foo1({ x: undefined, y: "def" }); // Best common type is any +var z1 = foo1({ x: undefined, y: "def" }); // Best common type is any diff --git a/tests/baselines/reference/widenToAny2.js b/tests/baselines/reference/widenToAny2.js index 572b33b03a4..4b19a2ce6e7 100644 --- a/tests/baselines/reference/widenToAny2.js +++ b/tests/baselines/reference/widenToAny2.js @@ -9,4 +9,4 @@ var z3:number = foo3([undefined, "def"]); // Type is any, but should be string function foo3(x) { return undefined; } -var z3 = foo3([undefined, "def"]); // Type is any, but should be string +var z3 = foo3([undefined, "def"]); // Type is any, but should be string diff --git a/tests/baselines/reference/widenedTypes.js b/tests/baselines/reference/widenedTypes.js index 05d1ef221e5..a5648c6f93a 100644 --- a/tests/baselines/reference/widenedTypes.js +++ b/tests/baselines/reference/widenedTypes.js @@ -41,5 +41,5 @@ var u = [3, (y = null)]; u[3] = ""; var ob = { x: "" }; // Highlights the difference between array literals and object literals -var arr = [3, null]; // not assignable because null is not widened. BCT is {} +var arr = [3, null]; // not assignable because null is not widened. BCT is {} var obj = { x: 3, y: null }; // assignable because null is widened, and therefore BCT is any diff --git a/tests/baselines/reference/witness.js b/tests/baselines/reference/witness.js index 8ece6169477..e686efc535f 100644 --- a/tests/baselines/reference/witness.js +++ b/tests/baselines/reference/witness.js @@ -142,7 +142,7 @@ var qq: any; //// [witness.js] // Initializers -var varInit = varInit; // any +var varInit = varInit; // any var pInit; function fn(pInit) { if (pInit === void 0) { pInit = pInit; } @@ -217,7 +217,7 @@ function overload1() { function fnArg2() { return overload1(fnArg2); } -var t = fnArg2(); // t: should be 'any', but is 'string' +var t = fnArg2(); // t: should be 'any', but is 'string' // New operator var C = (function () { function C() { @@ -238,7 +238,7 @@ function fn5() { var a; return new a(fn5); } -var fn5r = fn5(); // fn5r: should be 'any', but is 'number' +var fn5r = fn5(); // fn5r: should be 'any', but is 'number' // Property access var propAcc1 = { m: propAcc1.m @@ -254,7 +254,7 @@ var M2; // Property access of class instance type var C2 = (function () { function C2() { - this.n = this.n; // n: any + this.n = this.n; // n: any } return C2; })(); diff --git a/tests/cases/compiler/commentsFunction.ts b/tests/cases/compiler/commentsFunction.ts index cc6cf8ca63b..f26816054ee 100644 --- a/tests/cases/compiler/commentsFunction.ts +++ b/tests/cases/compiler/commentsFunction.ts @@ -24,4 +24,15 @@ var fooFunc = function FooFunctionValue(/** fooFunctionValue param */ b: string) var lambdaFoo = /** this is lambda comment*/ (/**param a*/a: number, /**param b*/b: number) => a + b; var lambddaNoVarComment = /** this is lambda multiplication*/ (/**param a*/a: number, /**param b*/b: number) => a * b; lambdaFoo(10, 20); -lambddaNoVarComment(10, 20); \ No newline at end of file +lambddaNoVarComment(10, 20); + +function blah(a: string /* multiline trailing comment +multiline */) { +} + +function blah2(a: string /* single line multiple trailing comments */ /* second */) { +} + +function blah3(a: string // trailing commen single line + ) { +} \ No newline at end of file