From f0f5a0d71ee9f7966f10459ddf10468b3e4887f9 Mon Sep 17 00:00:00 2001 From: Vladimir Matveev Date: Sat, 3 Oct 2015 00:20:15 -0700 Subject: [PATCH] updated command line options, accepted baselines --- src/compiler/binder.ts | 22 +- src/compiler/commandLineParser.ts | 8 +- src/compiler/diagnosticMessages.json | 4 +- src/compiler/types.ts | 4 +- src/compiler/utilities.ts | 2 +- .../reference/assignmentLHSIsValue.errors.txt | 5 +- .../bestCommonTypeReturnStatement.errors.txt | 18 + .../bestCommonTypeReturnStatement.symbols | 34 - .../bestCommonTypeReturnStatement.types | 39 - .../reference/breakTarget3.errors.txt | 11 + .../baselines/reference/breakTarget3.symbols | 7 - tests/baselines/reference/breakTarget3.types | 13 - .../reference/breakTarget4.errors.txt | 11 + .../baselines/reference/breakTarget4.symbols | 7 - tests/baselines/reference/breakTarget4.types | 13 - .../reference/breakTarget5.errors.txt | 5 +- ...utReturnTypeAnnotationInference.errors.txt | 126 + ...thoutReturnTypeAnnotationInference.symbols | 255 -- ...WithoutReturnTypeAnnotationInference.types | 296 -- tests/baselines/reference/cf.errors.txt | 72 + tests/baselines/reference/cf.symbols | 111 - tests/baselines/reference/cf.types | 169 - .../reference/commentsAtEndOfFile1.errors.txt | 10 + .../reference/commentsAtEndOfFile1.symbols | 6 - .../reference/commentsAtEndOfFile1.types | 7 - .../compoundAssignmentLHSIsValue.errors.txt | 5 +- .../conditionalExpressions2.errors.txt | 15 + .../reference/conditionalExpressions2.symbols | 33 - .../reference/conditionalExpressions2.types | 68 - ...nstDeclarations-invalidContexts.errors.txt | 8 +- .../constDeclarations-scopes.errors.txt | 8 +- ...constDeclarations-validContexts.errors.txt | 8 +- ...torWithIncompleteTypeAnnotation.errors.txt | 8 +- ...ontinueNotInIterationStatement4.errors.txt | 5 +- .../reference/continueTarget3.errors.txt | 11 + .../reference/continueTarget3.symbols | 7 - .../baselines/reference/continueTarget3.types | 13 - .../reference/continueTarget4.errors.txt | 11 + .../reference/continueTarget4.symbols | 7 - .../baselines/reference/continueTarget4.types | 13 - .../reference/continueTarget5.errors.txt | 5 +- .../doWhileBreakStatements.errors.txt | 50 + .../reference/doWhileBreakStatements.symbols | 41 - .../reference/doWhileBreakStatements.types | 80 - .../doWhileContinueStatements.errors.txt | 44 + .../doWhileContinueStatements.symbols | 41 - .../reference/doWhileContinueStatements.types | 80 - .../reference/downlevelLetConst16.errors.txt | 8 +- .../reference/downlevelLetConst17.errors.txt | 73 + .../reference/downlevelLetConst17.symbols | 134 - .../reference/downlevelLetConst17.types | 169 - .../reference/downlevelLetConst18.errors.txt | 5 +- .../reference/duplicateLabel1.errors.txt | 5 +- .../reference/duplicateLabel2.errors.txt | 5 +- .../reference/duplicateLabel3.errors.txt | 17 + .../reference/duplicateLabel3.symbols | 11 - .../baselines/reference/duplicateLabel3.types | 18 - .../reference/duplicateLabel4.errors.txt | 16 + .../reference/duplicateLabel4.symbols | 9 - .../baselines/reference/duplicateLabel4.types | 14 - .../duplicateLocalVariable1.errors.txt | 8 +- .../duplicateVariablesByScope.errors.txt | 37 + .../duplicateVariablesByScope.symbols | 56 - .../reference/duplicateVariablesByScope.types | 72 - .../es6ClassSuperCodegenBug.errors.txt | 19 + .../reference/es6ClassSuperCodegenBug.symbols | 24 - .../reference/es6ClassSuperCodegenBug.types | 32 - .../reference/escapedIdentifiers.errors.txt | 146 + .../reference/escapedIdentifiers.symbols | 260 -- .../reference/escapedIdentifiers.types | 351 -- tests/baselines/reference/for.errors.txt | 5 +- .../reference/forBreakStatements.errors.txt | 49 + .../reference/forBreakStatements.symbols | 40 - .../reference/forBreakStatements.types | 63 - .../forContinueStatements.errors.txt | 43 + .../reference/forContinueStatements.symbols | 40 - .../reference/forContinueStatements.types | 63 - .../reference/forInBreakStatements.errors.txt | 46 + .../reference/forInBreakStatements.symbols | 58 - .../reference/forInBreakStatements.types | 92 - .../forInContinueStatements.errors.txt | 46 + .../reference/forInContinueStatements.symbols | 58 - .../reference/forInContinueStatements.types | 92 - .../reference/forStatements.errors.txt | 52 + .../baselines/reference/forStatements.symbols | 145 - tests/baselines/reference/forStatements.types | 164 - ...orStatementsMultipleInvalidDecl.errors.txt | 5 +- .../forStatementsMultipleValidDecl.errors.txt | 39 + .../forStatementsMultipleValidDecl.symbols | 110 - .../forStatementsMultipleValidDecl.types | 140 - .../functionImplementationErrors.errors.txt | 35 +- .../functionImplementations.errors.txt | 183 + .../reference/functionImplementations.symbols | 344 -- .../reference/functionImplementations.types | 416 -- .../reference/functionOverloads12.errors.txt | 10 + .../reference/functionOverloads12.symbols | 10 - .../reference/functionOverloads12.types | 13 - .../reference/functionReturn.errors.txt | 23 + .../reference/functionReturn.symbols | 30 - .../baselines/reference/functionReturn.types | 35 - ...ionWithMultipleReturnStatements.errors.txt | 17 +- ...onWithMultipleReturnStatements2.errors.txt | 26 +- .../functionWithNoBestCommonType1.errors.txt | 5 +- .../functionWithNoBestCommonType2.errors.txt | 5 +- ...gReturnStatementsAndExpressions.errors.txt | 11 +- .../generatedContextualTyping.errors.txt | 393 ++ .../generatedContextualTyping.symbols | 2831 ------------- .../reference/generatedContextualTyping.types | 3768 ----------------- .../reference/ifDoWhileStatements.errors.txt | 168 + .../reference/ifDoWhileStatements.symbols | 336 -- .../reference/ifDoWhileStatements.types | 433 -- .../ifElseWithStatements1.errors.txt | 8 +- ...edFunctionReturnTypeIsEmptyType.errors.txt | 5 +- ...taticPropertyOverridingAccessor.errors.txt | 5 +- .../interfaceExtendingClass2.errors.txt | 5 +- .../interfaceWithPrivateMember.errors.txt | 5 +- .../invalidDoWhileBreakStatements.errors.txt | 8 +- ...nvalidDoWhileContinueStatements.errors.txt | 8 +- .../invalidForBreakStatements.errors.txt | 8 +- .../invalidForContinueStatements.errors.txt | 8 +- .../invalidForInBreakStatements.errors.txt | 17 +- .../invalidForInContinueStatements.errors.txt | 17 +- .../invalidThrowStatement.errors.txt | 5 +- .../invalidWhileBreakStatements.errors.txt | 8 +- .../invalidWhileContinueStatements.errors.txt | 8 +- .../letAndVarRedeclaration.errors.txt | 5 +- ...letDeclarations-invalidContexts.errors.txt | 8 +- .../letDeclarations-scopes.errors.txt | 11 +- .../letDeclarations-validContexts.errors.txt | 20 +- .../reference/localTypes4.errors.txt | 5 +- tests/baselines/reference/null.errors.txt | 30 + tests/baselines/reference/null.symbols | 44 - tests/baselines/reference/null.types | 59 - ...overloadOnConstAsTypeAnnotation.errors.txt | 7 +- .../reference/parser10.1.1-8gs.errors.txt | 5 +- .../reference/parser768531.errors.txt | 8 + .../baselines/reference/parser768531.symbols | 4 - tests/baselines/reference/parser768531.types | 8 - ...serErrorRecovery_ModuleElement1.errors.txt | 5 +- .../parserLabeledStatement1.d.errors.txt | 5 +- .../reference/parser_breakTarget3.errors.txt | 11 + .../reference/parser_breakTarget3.symbols | 7 - .../reference/parser_breakTarget3.types | 13 - .../reference/parser_breakTarget4.errors.txt | 11 + .../reference/parser_breakTarget4.symbols | 7 - .../reference/parser_breakTarget4.types | 13 - .../reference/parser_breakTarget5.errors.txt | 5 +- ...ontinueNotInIterationStatement4.errors.txt | 5 +- .../parser_continueTarget3.errors.txt | 11 + .../reference/parser_continueTarget3.symbols | 7 - .../reference/parser_continueTarget3.types | 13 - .../parser_continueTarget4.errors.txt | 11 + .../reference/parser_continueTarget4.symbols | 7 - .../reference/parser_continueTarget4.types | 13 - .../parser_continueTarget5.errors.txt | 5 +- .../parser_duplicateLabel1.errors.txt | 5 +- .../parser_duplicateLabel2.errors.txt | 5 +- .../parser_duplicateLabel3.errors.txt | 17 + .../reference/parser_duplicateLabel3.symbols | 11 - .../reference/parser_duplicateLabel3.types | 18 - .../parser_duplicateLabel4.errors.txt | 16 + .../reference/parser_duplicateLabel4.symbols | 9 - .../reference/parser_duplicateLabel4.types | 14 - ...ionCannotNameReturnTypeDeclFile.errors.txt | 38 +- .../reference/reachabilityChecks1.errors.txt | 24 +- .../reference/reachabilityChecks2.errors.txt | 4 +- .../reference/reachabilityChecks3.errors.txt | 15 +- .../reference/reachabilityChecks3.js | 11 +- .../reference/reachabilityChecks5.errors.txt | 4 +- .../reference/recursiveLetConst.errors.txt | 5 +- .../reference/recursiveMods.errors.txt | 29 + .../baselines/reference/recursiveMods.symbols | 47 - tests/baselines/reference/recursiveMods.types | 53 - .../recursiveNamedLambdaCall.errors.txt | 5 +- .../reference/reservedWords2.errors.txt | 5 +- .../reference/returnStatement1.errors.txt | 12 + .../reference/returnStatement1.symbols | 14 - .../reference/returnStatement1.types | 17 - .../reference/scanner10.1.1-8gs.errors.txt | 5 +- .../reference/setterWithReturn.errors.txt | 5 +- .../sourceMapValidationFor.errors.txt | 5 +- .../sourceMapValidationLabeled.errors.txt | 8 + .../sourceMapValidationLabeled.symbols | 5 - .../sourceMapValidationLabeled.types | 8 - .../switchBreakStatements.errors.txt | 67 + .../reference/switchBreakStatements.symbols | 58 - .../reference/switchBreakStatements.types | 126 - .../reference/systemModule8.errors.txt | 36 + .../baselines/reference/systemModule8.symbols | 92 - tests/baselines/reference/systemModule8.types | 143 - .../throwInEnclosingStatements.errors.txt | 52 + .../throwInEnclosingStatements.symbols | 93 - .../throwInEnclosingStatements.types | 109 - .../reference/throwStatements.errors.txt | 91 + .../reference/throwStatements.symbols | 215 - .../baselines/reference/throwStatements.types | 266 -- .../reference/throwWithoutNewLine2.errors.txt | 7 +- .../typeGuardFunctionErrors.errors.txt | 5 +- .../typeofOperatorWithAnyOtherType.errors.txt | 11 +- .../typeofOperatorWithBooleanType.errors.txt | 59 + .../typeofOperatorWithBooleanType.symbols | 130 - .../typeofOperatorWithBooleanType.types | 176 - .../typeofOperatorWithEnumType.errors.txt | 33 + .../typeofOperatorWithEnumType.symbols | 69 - .../typeofOperatorWithEnumType.types | 98 - .../typeofOperatorWithNumberType.errors.txt | 69 + .../typeofOperatorWithNumberType.symbols | 168 - .../typeofOperatorWithNumberType.types | 233 - .../typeofOperatorWithStringType.errors.txt | 69 + .../typeofOperatorWithStringType.symbols | 167 - .../typeofOperatorWithStringType.types | 233 - .../reference/undeclaredVarEmit.errors.txt | 5 +- ...lidMultipleVariableDeclarations.errors.txt | 45 + .../validMultipleVariableDeclarations.symbols | 118 - .../validMultipleVariableDeclarations.types | 152 - .../reference/whileBreakStatements.errors.txt | 54 + .../reference/whileBreakStatements.symbols | 45 - .../reference/whileBreakStatements.types | 89 - .../whileContinueStatements.errors.txt | 59 + .../reference/whileContinueStatements.symbols | 56 - .../reference/whileContinueStatements.types | 110 - tests/cases/compiler/reachabilityChecks1.ts | 2 +- tests/cases/compiler/reachabilityChecks2.ts | 2 +- tests/cases/compiler/reachabilityChecks3.ts | 9 +- tests/cases/compiler/reachabilityChecks5.ts | 2 +- .../unclosedFunctionErrorRecovery3.ts | 1 + tests/webTestServer.ts | 1 - 227 files changed, 3047 insertions(+), 15217 deletions(-) create mode 100644 tests/baselines/reference/bestCommonTypeReturnStatement.errors.txt delete mode 100644 tests/baselines/reference/bestCommonTypeReturnStatement.symbols delete mode 100644 tests/baselines/reference/bestCommonTypeReturnStatement.types create mode 100644 tests/baselines/reference/breakTarget3.errors.txt delete mode 100644 tests/baselines/reference/breakTarget3.symbols delete mode 100644 tests/baselines/reference/breakTarget3.types create mode 100644 tests/baselines/reference/breakTarget4.errors.txt delete mode 100644 tests/baselines/reference/breakTarget4.symbols delete mode 100644 tests/baselines/reference/breakTarget4.types create mode 100644 tests/baselines/reference/callSignatureWithoutReturnTypeAnnotationInference.errors.txt delete mode 100644 tests/baselines/reference/callSignatureWithoutReturnTypeAnnotationInference.symbols delete mode 100644 tests/baselines/reference/callSignatureWithoutReturnTypeAnnotationInference.types create mode 100644 tests/baselines/reference/cf.errors.txt delete mode 100644 tests/baselines/reference/cf.symbols delete mode 100644 tests/baselines/reference/cf.types create mode 100644 tests/baselines/reference/commentsAtEndOfFile1.errors.txt delete mode 100644 tests/baselines/reference/commentsAtEndOfFile1.symbols delete mode 100644 tests/baselines/reference/commentsAtEndOfFile1.types create mode 100644 tests/baselines/reference/conditionalExpressions2.errors.txt delete mode 100644 tests/baselines/reference/conditionalExpressions2.symbols delete mode 100644 tests/baselines/reference/conditionalExpressions2.types create mode 100644 tests/baselines/reference/continueTarget3.errors.txt delete mode 100644 tests/baselines/reference/continueTarget3.symbols delete mode 100644 tests/baselines/reference/continueTarget3.types create mode 100644 tests/baselines/reference/continueTarget4.errors.txt delete mode 100644 tests/baselines/reference/continueTarget4.symbols delete mode 100644 tests/baselines/reference/continueTarget4.types create mode 100644 tests/baselines/reference/doWhileBreakStatements.errors.txt delete mode 100644 tests/baselines/reference/doWhileBreakStatements.symbols delete mode 100644 tests/baselines/reference/doWhileBreakStatements.types create mode 100644 tests/baselines/reference/doWhileContinueStatements.errors.txt delete mode 100644 tests/baselines/reference/doWhileContinueStatements.symbols delete mode 100644 tests/baselines/reference/doWhileContinueStatements.types create mode 100644 tests/baselines/reference/downlevelLetConst17.errors.txt delete mode 100644 tests/baselines/reference/downlevelLetConst17.symbols delete mode 100644 tests/baselines/reference/downlevelLetConst17.types create mode 100644 tests/baselines/reference/duplicateLabel3.errors.txt delete mode 100644 tests/baselines/reference/duplicateLabel3.symbols delete mode 100644 tests/baselines/reference/duplicateLabel3.types create mode 100644 tests/baselines/reference/duplicateLabel4.errors.txt delete mode 100644 tests/baselines/reference/duplicateLabel4.symbols delete mode 100644 tests/baselines/reference/duplicateLabel4.types create mode 100644 tests/baselines/reference/duplicateVariablesByScope.errors.txt delete mode 100644 tests/baselines/reference/duplicateVariablesByScope.symbols delete mode 100644 tests/baselines/reference/duplicateVariablesByScope.types create mode 100644 tests/baselines/reference/es6ClassSuperCodegenBug.errors.txt delete mode 100644 tests/baselines/reference/es6ClassSuperCodegenBug.symbols delete mode 100644 tests/baselines/reference/es6ClassSuperCodegenBug.types create mode 100644 tests/baselines/reference/escapedIdentifiers.errors.txt delete mode 100644 tests/baselines/reference/escapedIdentifiers.symbols delete mode 100644 tests/baselines/reference/escapedIdentifiers.types create mode 100644 tests/baselines/reference/forBreakStatements.errors.txt delete mode 100644 tests/baselines/reference/forBreakStatements.symbols delete mode 100644 tests/baselines/reference/forBreakStatements.types create mode 100644 tests/baselines/reference/forContinueStatements.errors.txt delete mode 100644 tests/baselines/reference/forContinueStatements.symbols delete mode 100644 tests/baselines/reference/forContinueStatements.types create mode 100644 tests/baselines/reference/forInBreakStatements.errors.txt delete mode 100644 tests/baselines/reference/forInBreakStatements.symbols delete mode 100644 tests/baselines/reference/forInBreakStatements.types create mode 100644 tests/baselines/reference/forInContinueStatements.errors.txt delete mode 100644 tests/baselines/reference/forInContinueStatements.symbols delete mode 100644 tests/baselines/reference/forInContinueStatements.types create mode 100644 tests/baselines/reference/forStatements.errors.txt delete mode 100644 tests/baselines/reference/forStatements.symbols delete mode 100644 tests/baselines/reference/forStatements.types create mode 100644 tests/baselines/reference/forStatementsMultipleValidDecl.errors.txt delete mode 100644 tests/baselines/reference/forStatementsMultipleValidDecl.symbols delete mode 100644 tests/baselines/reference/forStatementsMultipleValidDecl.types create mode 100644 tests/baselines/reference/functionImplementations.errors.txt delete mode 100644 tests/baselines/reference/functionImplementations.symbols delete mode 100644 tests/baselines/reference/functionImplementations.types create mode 100644 tests/baselines/reference/functionOverloads12.errors.txt delete mode 100644 tests/baselines/reference/functionOverloads12.symbols delete mode 100644 tests/baselines/reference/functionOverloads12.types create mode 100644 tests/baselines/reference/functionReturn.errors.txt delete mode 100644 tests/baselines/reference/functionReturn.symbols delete mode 100644 tests/baselines/reference/functionReturn.types create mode 100644 tests/baselines/reference/generatedContextualTyping.errors.txt delete mode 100644 tests/baselines/reference/generatedContextualTyping.symbols delete mode 100644 tests/baselines/reference/generatedContextualTyping.types create mode 100644 tests/baselines/reference/ifDoWhileStatements.errors.txt delete mode 100644 tests/baselines/reference/ifDoWhileStatements.symbols delete mode 100644 tests/baselines/reference/ifDoWhileStatements.types create mode 100644 tests/baselines/reference/null.errors.txt delete mode 100644 tests/baselines/reference/null.symbols delete mode 100644 tests/baselines/reference/null.types create mode 100644 tests/baselines/reference/parser768531.errors.txt delete mode 100644 tests/baselines/reference/parser768531.symbols delete mode 100644 tests/baselines/reference/parser768531.types create mode 100644 tests/baselines/reference/parser_breakTarget3.errors.txt delete mode 100644 tests/baselines/reference/parser_breakTarget3.symbols delete mode 100644 tests/baselines/reference/parser_breakTarget3.types create mode 100644 tests/baselines/reference/parser_breakTarget4.errors.txt delete mode 100644 tests/baselines/reference/parser_breakTarget4.symbols delete mode 100644 tests/baselines/reference/parser_breakTarget4.types create mode 100644 tests/baselines/reference/parser_continueTarget3.errors.txt delete mode 100644 tests/baselines/reference/parser_continueTarget3.symbols delete mode 100644 tests/baselines/reference/parser_continueTarget3.types create mode 100644 tests/baselines/reference/parser_continueTarget4.errors.txt delete mode 100644 tests/baselines/reference/parser_continueTarget4.symbols delete mode 100644 tests/baselines/reference/parser_continueTarget4.types create mode 100644 tests/baselines/reference/parser_duplicateLabel3.errors.txt delete mode 100644 tests/baselines/reference/parser_duplicateLabel3.symbols delete mode 100644 tests/baselines/reference/parser_duplicateLabel3.types create mode 100644 tests/baselines/reference/parser_duplicateLabel4.errors.txt delete mode 100644 tests/baselines/reference/parser_duplicateLabel4.symbols delete mode 100644 tests/baselines/reference/parser_duplicateLabel4.types create mode 100644 tests/baselines/reference/recursiveMods.errors.txt delete mode 100644 tests/baselines/reference/recursiveMods.symbols delete mode 100644 tests/baselines/reference/recursiveMods.types create mode 100644 tests/baselines/reference/returnStatement1.errors.txt delete mode 100644 tests/baselines/reference/returnStatement1.symbols delete mode 100644 tests/baselines/reference/returnStatement1.types create mode 100644 tests/baselines/reference/sourceMapValidationLabeled.errors.txt delete mode 100644 tests/baselines/reference/sourceMapValidationLabeled.symbols delete mode 100644 tests/baselines/reference/sourceMapValidationLabeled.types create mode 100644 tests/baselines/reference/switchBreakStatements.errors.txt delete mode 100644 tests/baselines/reference/switchBreakStatements.symbols delete mode 100644 tests/baselines/reference/switchBreakStatements.types create mode 100644 tests/baselines/reference/systemModule8.errors.txt delete mode 100644 tests/baselines/reference/systemModule8.symbols delete mode 100644 tests/baselines/reference/systemModule8.types create mode 100644 tests/baselines/reference/throwInEnclosingStatements.errors.txt delete mode 100644 tests/baselines/reference/throwInEnclosingStatements.symbols delete mode 100644 tests/baselines/reference/throwInEnclosingStatements.types create mode 100644 tests/baselines/reference/throwStatements.errors.txt delete mode 100644 tests/baselines/reference/throwStatements.symbols delete mode 100644 tests/baselines/reference/throwStatements.types create mode 100644 tests/baselines/reference/typeofOperatorWithBooleanType.errors.txt delete mode 100644 tests/baselines/reference/typeofOperatorWithBooleanType.symbols delete mode 100644 tests/baselines/reference/typeofOperatorWithBooleanType.types create mode 100644 tests/baselines/reference/typeofOperatorWithEnumType.errors.txt delete mode 100644 tests/baselines/reference/typeofOperatorWithEnumType.symbols delete mode 100644 tests/baselines/reference/typeofOperatorWithEnumType.types create mode 100644 tests/baselines/reference/typeofOperatorWithNumberType.errors.txt delete mode 100644 tests/baselines/reference/typeofOperatorWithNumberType.symbols delete mode 100644 tests/baselines/reference/typeofOperatorWithNumberType.types create mode 100644 tests/baselines/reference/typeofOperatorWithStringType.errors.txt delete mode 100644 tests/baselines/reference/typeofOperatorWithStringType.symbols delete mode 100644 tests/baselines/reference/typeofOperatorWithStringType.types create mode 100644 tests/baselines/reference/validMultipleVariableDeclarations.errors.txt delete mode 100644 tests/baselines/reference/validMultipleVariableDeclarations.symbols delete mode 100644 tests/baselines/reference/validMultipleVariableDeclarations.types create mode 100644 tests/baselines/reference/whileBreakStatements.errors.txt delete mode 100644 tests/baselines/reference/whileBreakStatements.symbols delete mode 100644 tests/baselines/reference/whileBreakStatements.types create mode 100644 tests/baselines/reference/whileContinueStatements.errors.txt delete mode 100644 tests/baselines/reference/whileContinueStatements.symbols delete mode 100644 tests/baselines/reference/whileContinueStatements.types diff --git a/src/compiler/binder.ts b/src/compiler/binder.ts index 8211509f580..9414b93de3f 100644 --- a/src/compiler/binder.ts +++ b/src/compiler/binder.ts @@ -557,14 +557,11 @@ namespace ts { function bindBreakOrContinueStatement(n: BreakOrContinueStatement): boolean { // call bind on label (don't affect reachability) bind(n.label); - if (n.kind === SyntaxKind.BreakStatement) { - jumpToLabel(n.label, currentReachabilityState); + // for continue case touch label so it will be marked a used + const isValidJump = jumpToLabel(n.label, n.kind === SyntaxKind.BreakStatement ? currentReachabilityState : Reachability.Unreachable); + if (isValidJump) { + currentReachabilityState = Reachability.Unreachable; } - else { - jumpToLabel(n.label, Reachability.Unreachable); // touch label so it will be marked a used - } - currentReachabilityState = Reachability.Unreachable; - return true; } @@ -1406,7 +1403,7 @@ namespace ts { initializeReachabilityStateIfNecessary(); if (innerMergedState === Reachability.Unintialized) { - if (label && options.noUnusedLabels) { + if (label && !options.allowUnusedLabels) { file.bindDiagnostics.push(createDiagnosticForNode(label, Diagnostics.Unused_label)); } currentReachabilityState = outerState; @@ -1416,17 +1413,18 @@ namespace ts { } } - function jumpToLabel(label: Identifier, outerState: Reachability): void { + function jumpToLabel(label: Identifier, outerState: Reachability): boolean { initializeReachabilityStateIfNecessary(); const index = label ? labelIndexMap[label.text] : lastOrUndefined(implicitLabels); if (index === undefined) { // reference to unknown label or // break/continue used outside of loops - return; + return false; } const stateAtLabel = labelStack[index]; labelStack[index] = stateAtLabel === Reachability.Unintialized ? outerState : or(stateAtLabel, outerState); + return true; } function checkUnreachable(node: Node): boolean { @@ -1455,7 +1453,7 @@ namespace ts { // Rationale: we don't want to report errors on non-initialized var's since they are hoisted // On the other side we do want to report errors on non-initialized 'lets' because of TDZ const reportUnreachableCode = - options.noUnreachableCode && + !options.allowUnreachableCode && !isInAmbientContext(node) && ( node.kind !== SyntaxKind.VariableStatement || @@ -1464,7 +1462,7 @@ namespace ts { ); if (reportUnreachableCode) { - file.bindDiagnostics.push(createDiagnosticForNode(node, Diagnostics.Unreachable_code_detected)); + errorOnFirstToken(node, Diagnostics.Unreachable_code_detected); } } case Reachability.ReportedUnreachable: diff --git a/src/compiler/commandLineParser.ts b/src/compiler/commandLineParser.ts index a159604c099..e9919d31008 100644 --- a/src/compiler/commandLineParser.ts +++ b/src/compiler/commandLineParser.ts @@ -248,9 +248,9 @@ namespace ts { error: Diagnostics.Argument_for_moduleResolution_option_must_be_node_or_classic, }, { - name: "noUnusedLabels", + name: "allowUnusedLabels", type: "boolean", - description: Diagnostics.Report_error_on_unused_labels + description: Diagnostics.Do_not_report_errors_on_unused_labels }, { name: "noImplicitReturns", @@ -263,9 +263,9 @@ namespace ts { description: Diagnostics.Report_errors_for_fallthrough_cases_in_switch_statement }, { - name: "noUnreachableCode", + name: "allowUnreachableCode", type: "boolean", - description: Diagnostics.Report_errors_on_unreachable_code + description: Diagnostics.Do_not_report_errors_on_unreachable_code } ]; diff --git a/src/compiler/diagnosticMessages.json b/src/compiler/diagnosticMessages.json index 2917d333138..3552fec1226 100644 --- a/src/compiler/diagnosticMessages.json +++ b/src/compiler/diagnosticMessages.json @@ -2302,7 +2302,7 @@ "category": "Message", "code": 6072 }, - "Report error on unused labels.": { + "Do not report errors on unused labels.": { "category": "Message", "code": 6073 }, @@ -2314,7 +2314,7 @@ "category": "Message", "code": 6075 }, - "Report errors on unreachable code.": { + "Do not report errors on unreachable code.": { "category": "Message", "code": 6076 }, diff --git a/src/compiler/types.ts b/src/compiler/types.ts index a93a4587c1b..efc510d2f14 100644 --- a/src/compiler/types.ts +++ b/src/compiler/types.ts @@ -2075,10 +2075,10 @@ namespace ts { experimentalAsyncFunctions?: boolean; emitDecoratorMetadata?: boolean; moduleResolution?: ModuleResolutionKind; - noUnusedLabels?: boolean; + allowUnusedLabels?: boolean; + allowUnreachableCode?: boolean; noImplicitReturns?: boolean; noFallthroughCasesInSwitch?: boolean; - noUnreachableCode?: boolean; /* @internal */ stripInternal?: boolean; // Skip checking lib.d.ts to help speed up tests. diff --git a/src/compiler/utilities.ts b/src/compiler/utilities.ts index 452f59f0f03..06f71177447 100644 --- a/src/compiler/utilities.ts +++ b/src/compiler/utilities.ts @@ -1203,7 +1203,7 @@ namespace ts { case SyntaxKind.LabeledStatement: case SyntaxKind.ReturnStatement: case SyntaxKind.SwitchStatement: - case SyntaxKind.ThrowKeyword: + case SyntaxKind.ThrowStatement: case SyntaxKind.TryStatement: case SyntaxKind.VariableStatement: case SyntaxKind.WhileStatement: diff --git a/tests/baselines/reference/assignmentLHSIsValue.errors.txt b/tests/baselines/reference/assignmentLHSIsValue.errors.txt index cf747b44b3e..bf253df5e70 100644 --- a/tests/baselines/reference/assignmentLHSIsValue.errors.txt +++ b/tests/baselines/reference/assignmentLHSIsValue.errors.txt @@ -13,6 +13,7 @@ tests/cases/conformance/expressions/assignmentOperator/assignmentLHSIsValue.ts(2 tests/cases/conformance/expressions/assignmentOperator/assignmentLHSIsValue.ts(30,1): error TS2364: Invalid left-hand side of assignment expression. tests/cases/conformance/expressions/assignmentOperator/assignmentLHSIsValue.ts(31,1): error TS2364: Invalid left-hand side of assignment expression. tests/cases/conformance/expressions/assignmentOperator/assignmentLHSIsValue.ts(32,1): error TS2364: Invalid left-hand side of assignment expression. +tests/cases/conformance/expressions/assignmentOperator/assignmentLHSIsValue.ts(35,3): error TS7028: Unused label. tests/cases/conformance/expressions/assignmentOperator/assignmentLHSIsValue.ts(35,9): error TS1128: Declaration or statement expected. tests/cases/conformance/expressions/assignmentOperator/assignmentLHSIsValue.ts(38,2): error TS2364: Invalid left-hand side of assignment expression. tests/cases/conformance/expressions/assignmentOperator/assignmentLHSIsValue.ts(38,6): error TS2364: Invalid left-hand side of assignment expression. @@ -38,7 +39,7 @@ tests/cases/conformance/expressions/assignmentOperator/assignmentLHSIsValue.ts(6 tests/cases/conformance/expressions/assignmentOperator/assignmentLHSIsValue.ts(70,1): error TS2364: Invalid left-hand side of assignment expression. -==== tests/cases/conformance/expressions/assignmentOperator/assignmentLHSIsValue.ts (38 errors) ==== +==== tests/cases/conformance/expressions/assignmentOperator/assignmentLHSIsValue.ts (39 errors) ==== // expected error for all the LHS of assignments var value; @@ -104,6 +105,8 @@ tests/cases/conformance/expressions/assignmentOperator/assignmentLHSIsValue.ts(7 // object literals { a: 0} = value; + ~ +!!! error TS7028: Unused label. ~ !!! error TS1128: Declaration or statement expected. diff --git a/tests/baselines/reference/bestCommonTypeReturnStatement.errors.txt b/tests/baselines/reference/bestCommonTypeReturnStatement.errors.txt new file mode 100644 index 00000000000..af83d53a722 --- /dev/null +++ b/tests/baselines/reference/bestCommonTypeReturnStatement.errors.txt @@ -0,0 +1,18 @@ +tests/cases/compiler/bestCommonTypeReturnStatement.ts(7,5): error TS7027: Unreachable code detected. + + +==== tests/cases/compiler/bestCommonTypeReturnStatement.ts (1 errors) ==== + interface IPromise { + then(successCallback: (promiseValue: T) => any, errorCallback?: (reason: any) => any): IPromise; + } + + function f() { + if (true) return b(); + return d(); + ~~~~~~ +!!! error TS7027: Unreachable code detected. + } + + + function b(): IPromise { return null; } + function d(): IPromise { return null; } \ No newline at end of file diff --git a/tests/baselines/reference/bestCommonTypeReturnStatement.symbols b/tests/baselines/reference/bestCommonTypeReturnStatement.symbols deleted file mode 100644 index 43e04ef037d..00000000000 --- a/tests/baselines/reference/bestCommonTypeReturnStatement.symbols +++ /dev/null @@ -1,34 +0,0 @@ -=== tests/cases/compiler/bestCommonTypeReturnStatement.ts === -interface IPromise { ->IPromise : Symbol(IPromise, Decl(bestCommonTypeReturnStatement.ts, 0, 0)) ->T : Symbol(T, Decl(bestCommonTypeReturnStatement.ts, 0, 19)) - - then(successCallback: (promiseValue: T) => any, errorCallback?: (reason: any) => any): IPromise; ->then : Symbol(then, Decl(bestCommonTypeReturnStatement.ts, 0, 23)) ->successCallback : Symbol(successCallback, Decl(bestCommonTypeReturnStatement.ts, 1, 9)) ->promiseValue : Symbol(promiseValue, Decl(bestCommonTypeReturnStatement.ts, 1, 27)) ->T : Symbol(T, Decl(bestCommonTypeReturnStatement.ts, 0, 19)) ->errorCallback : Symbol(errorCallback, Decl(bestCommonTypeReturnStatement.ts, 1, 51)) ->reason : Symbol(reason, Decl(bestCommonTypeReturnStatement.ts, 1, 69)) ->IPromise : Symbol(IPromise, Decl(bestCommonTypeReturnStatement.ts, 0, 0)) -} - -function f() { ->f : Symbol(f, Decl(bestCommonTypeReturnStatement.ts, 2, 1)) - - if (true) return b(); ->b : Symbol(b, Decl(bestCommonTypeReturnStatement.ts, 7, 1)) - - return d(); ->d : Symbol(d, Decl(bestCommonTypeReturnStatement.ts, 10, 45)) -} - - -function b(): IPromise { return null; } ->b : Symbol(b, Decl(bestCommonTypeReturnStatement.ts, 7, 1)) ->IPromise : Symbol(IPromise, Decl(bestCommonTypeReturnStatement.ts, 0, 0)) - -function d(): IPromise { return null; } ->d : Symbol(d, Decl(bestCommonTypeReturnStatement.ts, 10, 45)) ->IPromise : Symbol(IPromise, Decl(bestCommonTypeReturnStatement.ts, 0, 0)) - diff --git a/tests/baselines/reference/bestCommonTypeReturnStatement.types b/tests/baselines/reference/bestCommonTypeReturnStatement.types deleted file mode 100644 index 28974f064a5..00000000000 --- a/tests/baselines/reference/bestCommonTypeReturnStatement.types +++ /dev/null @@ -1,39 +0,0 @@ -=== tests/cases/compiler/bestCommonTypeReturnStatement.ts === -interface IPromise { ->IPromise : IPromise ->T : T - - then(successCallback: (promiseValue: T) => any, errorCallback?: (reason: any) => any): IPromise; ->then : (successCallback: (promiseValue: T) => any, errorCallback?: (reason: any) => any) => IPromise ->successCallback : (promiseValue: T) => any ->promiseValue : T ->T : T ->errorCallback : (reason: any) => any ->reason : any ->IPromise : IPromise -} - -function f() { ->f : () => IPromise - - if (true) return b(); ->true : boolean ->b() : IPromise ->b : () => IPromise - - return d(); ->d() : IPromise ->d : () => IPromise -} - - -function b(): IPromise { return null; } ->b : () => IPromise ->IPromise : IPromise ->null : null - -function d(): IPromise { return null; } ->d : () => IPromise ->IPromise : IPromise ->null : null - diff --git a/tests/baselines/reference/breakTarget3.errors.txt b/tests/baselines/reference/breakTarget3.errors.txt new file mode 100644 index 00000000000..aff8887c15e --- /dev/null +++ b/tests/baselines/reference/breakTarget3.errors.txt @@ -0,0 +1,11 @@ +tests/cases/compiler/breakTarget3.ts(2,1): error TS7028: Unused label. + + +==== tests/cases/compiler/breakTarget3.ts (1 errors) ==== + target1: + target2: + ~~~~~~~ +!!! error TS7028: Unused label. + while (true) { + break target1; + } \ No newline at end of file diff --git a/tests/baselines/reference/breakTarget3.symbols b/tests/baselines/reference/breakTarget3.symbols deleted file mode 100644 index 580706bbd4a..00000000000 --- a/tests/baselines/reference/breakTarget3.symbols +++ /dev/null @@ -1,7 +0,0 @@ -=== tests/cases/compiler/breakTarget3.ts === -target1: -No type information for this code.target2: -No type information for this code.while (true) { -No type information for this code. break target1; -No type information for this code.} -No type information for this code. \ No newline at end of file diff --git a/tests/baselines/reference/breakTarget3.types b/tests/baselines/reference/breakTarget3.types deleted file mode 100644 index 785bf00ef6e..00000000000 --- a/tests/baselines/reference/breakTarget3.types +++ /dev/null @@ -1,13 +0,0 @@ -=== tests/cases/compiler/breakTarget3.ts === -target1: ->target1 : any - -target2: ->target2 : any - -while (true) { ->true : boolean - - break target1; ->target1 : any -} diff --git a/tests/baselines/reference/breakTarget4.errors.txt b/tests/baselines/reference/breakTarget4.errors.txt new file mode 100644 index 00000000000..d1283de2fa0 --- /dev/null +++ b/tests/baselines/reference/breakTarget4.errors.txt @@ -0,0 +1,11 @@ +tests/cases/compiler/breakTarget4.ts(1,1): error TS7028: Unused label. + + +==== tests/cases/compiler/breakTarget4.ts (1 errors) ==== + target1: + ~~~~~~~ +!!! error TS7028: Unused label. + target2: + while (true) { + break target2; + } \ No newline at end of file diff --git a/tests/baselines/reference/breakTarget4.symbols b/tests/baselines/reference/breakTarget4.symbols deleted file mode 100644 index aba35ddcfdf..00000000000 --- a/tests/baselines/reference/breakTarget4.symbols +++ /dev/null @@ -1,7 +0,0 @@ -=== tests/cases/compiler/breakTarget4.ts === -target1: -No type information for this code.target2: -No type information for this code.while (true) { -No type information for this code. break target2; -No type information for this code.} -No type information for this code. \ No newline at end of file diff --git a/tests/baselines/reference/breakTarget4.types b/tests/baselines/reference/breakTarget4.types deleted file mode 100644 index eb4c14f6386..00000000000 --- a/tests/baselines/reference/breakTarget4.types +++ /dev/null @@ -1,13 +0,0 @@ -=== tests/cases/compiler/breakTarget4.ts === -target1: ->target1 : any - -target2: ->target2 : any - -while (true) { ->true : boolean - - break target2; ->target2 : any -} diff --git a/tests/baselines/reference/breakTarget5.errors.txt b/tests/baselines/reference/breakTarget5.errors.txt index a54a415b990..55a454ee68b 100644 --- a/tests/baselines/reference/breakTarget5.errors.txt +++ b/tests/baselines/reference/breakTarget5.errors.txt @@ -1,8 +1,11 @@ +tests/cases/compiler/breakTarget5.ts(1,1): error TS7028: Unused label. tests/cases/compiler/breakTarget5.ts(5,7): error TS1107: Jump target cannot cross function boundary. -==== tests/cases/compiler/breakTarget5.ts (1 errors) ==== +==== tests/cases/compiler/breakTarget5.ts (2 errors) ==== target: + ~~~~~~ +!!! error TS7028: Unused label. while (true) { function f() { while (true) { diff --git a/tests/baselines/reference/callSignatureWithoutReturnTypeAnnotationInference.errors.txt b/tests/baselines/reference/callSignatureWithoutReturnTypeAnnotationInference.errors.txt new file mode 100644 index 00000000000..06eca28b512 --- /dev/null +++ b/tests/baselines/reference/callSignatureWithoutReturnTypeAnnotationInference.errors.txt @@ -0,0 +1,126 @@ +tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignatureWithoutReturnTypeAnnotationInference.ts(28,9): error TS7027: Unreachable code detected. + + +==== tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignatureWithoutReturnTypeAnnotationInference.ts (1 errors) ==== + // Call signatures without a return type should infer one from the function body (if present) + + // Simple types + function foo(x) { + return 1; + } + var r = foo(1); + + function foo2(x) { + return foo(x); + } + var r2 = foo2(1); + + function foo3() { + return foo3(); + } + var r3 = foo3(); + + function foo4(x: T) { + return x; + } + var r4 = foo4(1); + + function foo5(x) { + if (true) { + return 1; + } else { + return 2; + ~~~~~~ +!!! error TS7027: Unreachable code detected. + } + } + var r5 = foo5(1); + + function foo6(x) { + try { + } + catch (e) { + return []; + } + finally { + return []; + } + } + var r6 = foo6(1); + + function foo7(x) { + return typeof x; + } + var r7 = foo7(1); + + // object types + function foo8(x: number) { + return { x: x }; + } + var r8 = foo8(1); + + interface I { + foo: string; + } + function foo9(x: number) { + var i: I; + return i; + } + var r9 = foo9(1); + + class C { + foo: string; + } + function foo10(x: number) { + var c: C; + return c; + } + var r10 = foo10(1); + + module M { + export var x = 1; + export class C { foo: string } + } + function foo11() { + return M; + } + var r11 = foo11(); + + // merged declarations + interface I2 { + x: number; + } + interface I2 { + y: number; + } + function foo12() { + var i2: I2; + return i2; + } + var r12 = foo12(); + + function m1() { return 1; } + module m1 { export var y = 2; } + function foo13() { + return m1; + } + var r13 = foo13(); + + class c1 { + foo: string; + constructor(x) { } + } + module c1 { + export var x = 1; + } + function foo14() { + return c1; + } + var r14 = foo14(); + + enum e1 { A } + module e1 { export var y = 1; } + function foo15() { + return e1; + } + var r15 = foo15(); \ No newline at end of file diff --git a/tests/baselines/reference/callSignatureWithoutReturnTypeAnnotationInference.symbols b/tests/baselines/reference/callSignatureWithoutReturnTypeAnnotationInference.symbols deleted file mode 100644 index 1c5a6786ab7..00000000000 --- a/tests/baselines/reference/callSignatureWithoutReturnTypeAnnotationInference.symbols +++ /dev/null @@ -1,255 +0,0 @@ -=== tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignatureWithoutReturnTypeAnnotationInference.ts === -// Call signatures without a return type should infer one from the function body (if present) - -// Simple types -function foo(x) { ->foo : Symbol(foo, Decl(callSignatureWithoutReturnTypeAnnotationInference.ts, 0, 0)) ->x : Symbol(x, Decl(callSignatureWithoutReturnTypeAnnotationInference.ts, 3, 13)) - - return 1; -} -var r = foo(1); ->r : Symbol(r, Decl(callSignatureWithoutReturnTypeAnnotationInference.ts, 6, 3)) ->foo : Symbol(foo, Decl(callSignatureWithoutReturnTypeAnnotationInference.ts, 0, 0)) - -function foo2(x) { ->foo2 : Symbol(foo2, Decl(callSignatureWithoutReturnTypeAnnotationInference.ts, 6, 15)) ->x : Symbol(x, Decl(callSignatureWithoutReturnTypeAnnotationInference.ts, 8, 14)) - - return foo(x); ->foo : Symbol(foo, Decl(callSignatureWithoutReturnTypeAnnotationInference.ts, 0, 0)) ->x : Symbol(x, Decl(callSignatureWithoutReturnTypeAnnotationInference.ts, 8, 14)) -} -var r2 = foo2(1); ->r2 : Symbol(r2, Decl(callSignatureWithoutReturnTypeAnnotationInference.ts, 11, 3)) ->foo2 : Symbol(foo2, Decl(callSignatureWithoutReturnTypeAnnotationInference.ts, 6, 15)) - -function foo3() { ->foo3 : Symbol(foo3, Decl(callSignatureWithoutReturnTypeAnnotationInference.ts, 11, 17)) - - return foo3(); ->foo3 : Symbol(foo3, Decl(callSignatureWithoutReturnTypeAnnotationInference.ts, 11, 17)) -} -var r3 = foo3(); ->r3 : Symbol(r3, Decl(callSignatureWithoutReturnTypeAnnotationInference.ts, 16, 3)) ->foo3 : Symbol(foo3, Decl(callSignatureWithoutReturnTypeAnnotationInference.ts, 11, 17)) - -function foo4(x: T) { ->foo4 : Symbol(foo4, Decl(callSignatureWithoutReturnTypeAnnotationInference.ts, 16, 16)) ->T : Symbol(T, Decl(callSignatureWithoutReturnTypeAnnotationInference.ts, 18, 14)) ->x : Symbol(x, Decl(callSignatureWithoutReturnTypeAnnotationInference.ts, 18, 17)) ->T : Symbol(T, Decl(callSignatureWithoutReturnTypeAnnotationInference.ts, 18, 14)) - - return x; ->x : Symbol(x, Decl(callSignatureWithoutReturnTypeAnnotationInference.ts, 18, 17)) -} -var r4 = foo4(1); ->r4 : Symbol(r4, Decl(callSignatureWithoutReturnTypeAnnotationInference.ts, 21, 3)) ->foo4 : Symbol(foo4, Decl(callSignatureWithoutReturnTypeAnnotationInference.ts, 16, 16)) - -function foo5(x) { ->foo5 : Symbol(foo5, Decl(callSignatureWithoutReturnTypeAnnotationInference.ts, 21, 17)) ->x : Symbol(x, Decl(callSignatureWithoutReturnTypeAnnotationInference.ts, 23, 14)) - - if (true) { - return 1; - } else { - return 2; - } -} -var r5 = foo5(1); ->r5 : Symbol(r5, Decl(callSignatureWithoutReturnTypeAnnotationInference.ts, 30, 3)) ->foo5 : Symbol(foo5, Decl(callSignatureWithoutReturnTypeAnnotationInference.ts, 21, 17)) - -function foo6(x) { ->foo6 : Symbol(foo6, Decl(callSignatureWithoutReturnTypeAnnotationInference.ts, 30, 17)) ->x : Symbol(x, Decl(callSignatureWithoutReturnTypeAnnotationInference.ts, 32, 14)) - - try { - } - catch (e) { ->e : Symbol(e, Decl(callSignatureWithoutReturnTypeAnnotationInference.ts, 35, 11)) - - return []; - } - finally { - return []; - } -} -var r6 = foo6(1); ->r6 : Symbol(r6, Decl(callSignatureWithoutReturnTypeAnnotationInference.ts, 42, 3)) ->foo6 : Symbol(foo6, Decl(callSignatureWithoutReturnTypeAnnotationInference.ts, 30, 17)) - -function foo7(x) { ->foo7 : Symbol(foo7, Decl(callSignatureWithoutReturnTypeAnnotationInference.ts, 42, 17)) ->x : Symbol(x, Decl(callSignatureWithoutReturnTypeAnnotationInference.ts, 44, 14)) - - return typeof x; ->x : Symbol(x, Decl(callSignatureWithoutReturnTypeAnnotationInference.ts, 44, 14)) -} -var r7 = foo7(1); ->r7 : Symbol(r7, Decl(callSignatureWithoutReturnTypeAnnotationInference.ts, 47, 3)) ->foo7 : Symbol(foo7, Decl(callSignatureWithoutReturnTypeAnnotationInference.ts, 42, 17)) - -// object types -function foo8(x: number) { ->foo8 : Symbol(foo8, Decl(callSignatureWithoutReturnTypeAnnotationInference.ts, 47, 17)) ->x : Symbol(x, Decl(callSignatureWithoutReturnTypeAnnotationInference.ts, 50, 14)) - - return { x: x }; ->x : Symbol(x, Decl(callSignatureWithoutReturnTypeAnnotationInference.ts, 51, 12)) ->x : Symbol(x, Decl(callSignatureWithoutReturnTypeAnnotationInference.ts, 50, 14)) -} -var r8 = foo8(1); ->r8 : Symbol(r8, Decl(callSignatureWithoutReturnTypeAnnotationInference.ts, 53, 3)) ->foo8 : Symbol(foo8, Decl(callSignatureWithoutReturnTypeAnnotationInference.ts, 47, 17)) - -interface I { ->I : Symbol(I, Decl(callSignatureWithoutReturnTypeAnnotationInference.ts, 53, 17)) - - foo: string; ->foo : Symbol(foo, Decl(callSignatureWithoutReturnTypeAnnotationInference.ts, 55, 13)) -} -function foo9(x: number) { ->foo9 : Symbol(foo9, Decl(callSignatureWithoutReturnTypeAnnotationInference.ts, 57, 1)) ->x : Symbol(x, Decl(callSignatureWithoutReturnTypeAnnotationInference.ts, 58, 14)) - - var i: I; ->i : Symbol(i, Decl(callSignatureWithoutReturnTypeAnnotationInference.ts, 59, 7)) ->I : Symbol(I, Decl(callSignatureWithoutReturnTypeAnnotationInference.ts, 53, 17)) - - return i; ->i : Symbol(i, Decl(callSignatureWithoutReturnTypeAnnotationInference.ts, 59, 7)) -} -var r9 = foo9(1); ->r9 : Symbol(r9, Decl(callSignatureWithoutReturnTypeAnnotationInference.ts, 62, 3)) ->foo9 : Symbol(foo9, Decl(callSignatureWithoutReturnTypeAnnotationInference.ts, 57, 1)) - -class C { ->C : Symbol(C, Decl(callSignatureWithoutReturnTypeAnnotationInference.ts, 62, 17)) - - foo: string; ->foo : Symbol(foo, Decl(callSignatureWithoutReturnTypeAnnotationInference.ts, 64, 9)) -} -function foo10(x: number) { ->foo10 : Symbol(foo10, Decl(callSignatureWithoutReturnTypeAnnotationInference.ts, 66, 1)) ->x : Symbol(x, Decl(callSignatureWithoutReturnTypeAnnotationInference.ts, 67, 15)) - - var c: C; ->c : Symbol(c, Decl(callSignatureWithoutReturnTypeAnnotationInference.ts, 68, 7)) ->C : Symbol(C, Decl(callSignatureWithoutReturnTypeAnnotationInference.ts, 62, 17)) - - return c; ->c : Symbol(c, Decl(callSignatureWithoutReturnTypeAnnotationInference.ts, 68, 7)) -} -var r10 = foo10(1); ->r10 : Symbol(r10, Decl(callSignatureWithoutReturnTypeAnnotationInference.ts, 71, 3)) ->foo10 : Symbol(foo10, Decl(callSignatureWithoutReturnTypeAnnotationInference.ts, 66, 1)) - -module M { ->M : Symbol(M, Decl(callSignatureWithoutReturnTypeAnnotationInference.ts, 71, 19)) - - export var x = 1; ->x : Symbol(x, Decl(callSignatureWithoutReturnTypeAnnotationInference.ts, 74, 14)) - - export class C { foo: string } ->C : Symbol(C, Decl(callSignatureWithoutReturnTypeAnnotationInference.ts, 74, 21)) ->foo : Symbol(foo, Decl(callSignatureWithoutReturnTypeAnnotationInference.ts, 75, 20)) -} -function foo11() { ->foo11 : Symbol(foo11, Decl(callSignatureWithoutReturnTypeAnnotationInference.ts, 76, 1)) - - return M; ->M : Symbol(M, Decl(callSignatureWithoutReturnTypeAnnotationInference.ts, 71, 19)) -} -var r11 = foo11(); ->r11 : Symbol(r11, Decl(callSignatureWithoutReturnTypeAnnotationInference.ts, 80, 3)) ->foo11 : Symbol(foo11, Decl(callSignatureWithoutReturnTypeAnnotationInference.ts, 76, 1)) - -// merged declarations -interface I2 { ->I2 : Symbol(I2, Decl(callSignatureWithoutReturnTypeAnnotationInference.ts, 80, 18), Decl(callSignatureWithoutReturnTypeAnnotationInference.ts, 85, 1)) - - x: number; ->x : Symbol(x, Decl(callSignatureWithoutReturnTypeAnnotationInference.ts, 83, 14)) -} -interface I2 { ->I2 : Symbol(I2, Decl(callSignatureWithoutReturnTypeAnnotationInference.ts, 80, 18), Decl(callSignatureWithoutReturnTypeAnnotationInference.ts, 85, 1)) - - y: number; ->y : Symbol(y, Decl(callSignatureWithoutReturnTypeAnnotationInference.ts, 86, 14)) -} -function foo12() { ->foo12 : Symbol(foo12, Decl(callSignatureWithoutReturnTypeAnnotationInference.ts, 88, 1)) - - var i2: I2; ->i2 : Symbol(i2, Decl(callSignatureWithoutReturnTypeAnnotationInference.ts, 90, 7)) ->I2 : Symbol(I2, Decl(callSignatureWithoutReturnTypeAnnotationInference.ts, 80, 18), Decl(callSignatureWithoutReturnTypeAnnotationInference.ts, 85, 1)) - - return i2; ->i2 : Symbol(i2, Decl(callSignatureWithoutReturnTypeAnnotationInference.ts, 90, 7)) -} -var r12 = foo12(); ->r12 : Symbol(r12, Decl(callSignatureWithoutReturnTypeAnnotationInference.ts, 93, 3)) ->foo12 : Symbol(foo12, Decl(callSignatureWithoutReturnTypeAnnotationInference.ts, 88, 1)) - -function m1() { return 1; } ->m1 : Symbol(m1, Decl(callSignatureWithoutReturnTypeAnnotationInference.ts, 93, 18), Decl(callSignatureWithoutReturnTypeAnnotationInference.ts, 95, 27)) - -module m1 { export var y = 2; } ->m1 : Symbol(m1, Decl(callSignatureWithoutReturnTypeAnnotationInference.ts, 93, 18), Decl(callSignatureWithoutReturnTypeAnnotationInference.ts, 95, 27)) ->y : Symbol(y, Decl(callSignatureWithoutReturnTypeAnnotationInference.ts, 96, 22)) - -function foo13() { ->foo13 : Symbol(foo13, Decl(callSignatureWithoutReturnTypeAnnotationInference.ts, 96, 31)) - - return m1; ->m1 : Symbol(m1, Decl(callSignatureWithoutReturnTypeAnnotationInference.ts, 93, 18), Decl(callSignatureWithoutReturnTypeAnnotationInference.ts, 95, 27)) -} -var r13 = foo13(); ->r13 : Symbol(r13, Decl(callSignatureWithoutReturnTypeAnnotationInference.ts, 100, 3)) ->foo13 : Symbol(foo13, Decl(callSignatureWithoutReturnTypeAnnotationInference.ts, 96, 31)) - -class c1 { ->c1 : Symbol(c1, Decl(callSignatureWithoutReturnTypeAnnotationInference.ts, 100, 18), Decl(callSignatureWithoutReturnTypeAnnotationInference.ts, 105, 1)) - - foo: string; ->foo : Symbol(foo, Decl(callSignatureWithoutReturnTypeAnnotationInference.ts, 102, 10)) - - constructor(x) { } ->x : Symbol(x, Decl(callSignatureWithoutReturnTypeAnnotationInference.ts, 104, 16)) -} -module c1 { ->c1 : Symbol(c1, Decl(callSignatureWithoutReturnTypeAnnotationInference.ts, 100, 18), Decl(callSignatureWithoutReturnTypeAnnotationInference.ts, 105, 1)) - - export var x = 1; ->x : Symbol(x, Decl(callSignatureWithoutReturnTypeAnnotationInference.ts, 107, 14)) -} -function foo14() { ->foo14 : Symbol(foo14, Decl(callSignatureWithoutReturnTypeAnnotationInference.ts, 108, 1)) - - return c1; ->c1 : Symbol(c1, Decl(callSignatureWithoutReturnTypeAnnotationInference.ts, 100, 18), Decl(callSignatureWithoutReturnTypeAnnotationInference.ts, 105, 1)) -} -var r14 = foo14(); ->r14 : Symbol(r14, Decl(callSignatureWithoutReturnTypeAnnotationInference.ts, 112, 3)) ->foo14 : Symbol(foo14, Decl(callSignatureWithoutReturnTypeAnnotationInference.ts, 108, 1)) - -enum e1 { A } ->e1 : Symbol(e1, Decl(callSignatureWithoutReturnTypeAnnotationInference.ts, 112, 18), Decl(callSignatureWithoutReturnTypeAnnotationInference.ts, 114, 13)) ->A : Symbol(e1.A, Decl(callSignatureWithoutReturnTypeAnnotationInference.ts, 114, 9)) - -module e1 { export var y = 1; } ->e1 : Symbol(e1, Decl(callSignatureWithoutReturnTypeAnnotationInference.ts, 112, 18), Decl(callSignatureWithoutReturnTypeAnnotationInference.ts, 114, 13)) ->y : Symbol(y, Decl(callSignatureWithoutReturnTypeAnnotationInference.ts, 115, 22)) - -function foo15() { ->foo15 : Symbol(foo15, Decl(callSignatureWithoutReturnTypeAnnotationInference.ts, 115, 31)) - - return e1; ->e1 : Symbol(e1, Decl(callSignatureWithoutReturnTypeAnnotationInference.ts, 112, 18), Decl(callSignatureWithoutReturnTypeAnnotationInference.ts, 114, 13)) -} -var r15 = foo15(); ->r15 : Symbol(r15, Decl(callSignatureWithoutReturnTypeAnnotationInference.ts, 119, 3)) ->foo15 : Symbol(foo15, Decl(callSignatureWithoutReturnTypeAnnotationInference.ts, 115, 31)) - diff --git a/tests/baselines/reference/callSignatureWithoutReturnTypeAnnotationInference.types b/tests/baselines/reference/callSignatureWithoutReturnTypeAnnotationInference.types deleted file mode 100644 index 760451eb9c1..00000000000 --- a/tests/baselines/reference/callSignatureWithoutReturnTypeAnnotationInference.types +++ /dev/null @@ -1,296 +0,0 @@ -=== tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignatureWithoutReturnTypeAnnotationInference.ts === -// Call signatures without a return type should infer one from the function body (if present) - -// Simple types -function foo(x) { ->foo : (x: any) => number ->x : any - - return 1; ->1 : number -} -var r = foo(1); ->r : number ->foo(1) : number ->foo : (x: any) => number ->1 : number - -function foo2(x) { ->foo2 : (x: any) => number ->x : any - - return foo(x); ->foo(x) : number ->foo : (x: any) => number ->x : any -} -var r2 = foo2(1); ->r2 : number ->foo2(1) : number ->foo2 : (x: any) => number ->1 : number - -function foo3() { ->foo3 : () => any - - return foo3(); ->foo3() : any ->foo3 : () => any -} -var r3 = foo3(); ->r3 : any ->foo3() : any ->foo3 : () => any - -function foo4(x: T) { ->foo4 : (x: T) => T ->T : T ->x : T ->T : T - - return x; ->x : T -} -var r4 = foo4(1); ->r4 : number ->foo4(1) : number ->foo4 : (x: T) => T ->1 : number - -function foo5(x) { ->foo5 : (x: any) => number ->x : any - - if (true) { ->true : boolean - - return 1; ->1 : number - - } else { - return 2; ->2 : number - } -} -var r5 = foo5(1); ->r5 : number ->foo5(1) : number ->foo5 : (x: any) => number ->1 : number - -function foo6(x) { ->foo6 : (x: any) => any[] ->x : any - - try { - } - catch (e) { ->e : any - - return []; ->[] : undefined[] - } - finally { - return []; ->[] : undefined[] - } -} -var r6 = foo6(1); ->r6 : any[] ->foo6(1) : any[] ->foo6 : (x: any) => any[] ->1 : number - -function foo7(x) { ->foo7 : (x: any) => string ->x : any - - return typeof x; ->typeof x : string ->x : any -} -var r7 = foo7(1); ->r7 : string ->foo7(1) : string ->foo7 : (x: any) => string ->1 : number - -// object types -function foo8(x: number) { ->foo8 : (x: number) => { x: number; } ->x : number - - return { x: x }; ->{ x: x } : { x: number; } ->x : number ->x : number -} -var r8 = foo8(1); ->r8 : { x: number; } ->foo8(1) : { x: number; } ->foo8 : (x: number) => { x: number; } ->1 : number - -interface I { ->I : I - - foo: string; ->foo : string -} -function foo9(x: number) { ->foo9 : (x: number) => I ->x : number - - var i: I; ->i : I ->I : I - - return i; ->i : I -} -var r9 = foo9(1); ->r9 : I ->foo9(1) : I ->foo9 : (x: number) => I ->1 : number - -class C { ->C : C - - foo: string; ->foo : string -} -function foo10(x: number) { ->foo10 : (x: number) => C ->x : number - - var c: C; ->c : C ->C : C - - return c; ->c : C -} -var r10 = foo10(1); ->r10 : C ->foo10(1) : C ->foo10 : (x: number) => C ->1 : number - -module M { ->M : typeof M - - export var x = 1; ->x : number ->1 : number - - export class C { foo: string } ->C : C ->foo : string -} -function foo11() { ->foo11 : () => typeof M - - return M; ->M : typeof M -} -var r11 = foo11(); ->r11 : typeof M ->foo11() : typeof M ->foo11 : () => typeof M - -// merged declarations -interface I2 { ->I2 : I2 - - x: number; ->x : number -} -interface I2 { ->I2 : I2 - - y: number; ->y : number -} -function foo12() { ->foo12 : () => I2 - - var i2: I2; ->i2 : I2 ->I2 : I2 - - return i2; ->i2 : I2 -} -var r12 = foo12(); ->r12 : I2 ->foo12() : I2 ->foo12 : () => I2 - -function m1() { return 1; } ->m1 : typeof m1 ->1 : number - -module m1 { export var y = 2; } ->m1 : typeof m1 ->y : number ->2 : number - -function foo13() { ->foo13 : () => typeof m1 - - return m1; ->m1 : typeof m1 -} -var r13 = foo13(); ->r13 : typeof m1 ->foo13() : typeof m1 ->foo13 : () => typeof m1 - -class c1 { ->c1 : c1 - - foo: string; ->foo : string - - constructor(x) { } ->x : any -} -module c1 { ->c1 : typeof c1 - - export var x = 1; ->x : number ->1 : number -} -function foo14() { ->foo14 : () => typeof c1 - - return c1; ->c1 : typeof c1 -} -var r14 = foo14(); ->r14 : typeof c1 ->foo14() : typeof c1 ->foo14 : () => typeof c1 - -enum e1 { A } ->e1 : e1 ->A : e1 - -module e1 { export var y = 1; } ->e1 : typeof e1 ->y : number ->1 : number - -function foo15() { ->foo15 : () => typeof e1 - - return e1; ->e1 : typeof e1 -} -var r15 = foo15(); ->r15 : typeof e1 ->foo15() : typeof e1 ->foo15 : () => typeof e1 - diff --git a/tests/baselines/reference/cf.errors.txt b/tests/baselines/reference/cf.errors.txt new file mode 100644 index 00000000000..75b285c37c6 --- /dev/null +++ b/tests/baselines/reference/cf.errors.txt @@ -0,0 +1,72 @@ +tests/cases/compiler/cf.ts(9,13): error TS7027: Unreachable code detected. +tests/cases/compiler/cf.ts(21,17): error TS7027: Unreachable code detected. +tests/cases/compiler/cf.ts(32,13): error TS7027: Unreachable code detected. +tests/cases/compiler/cf.ts(36,13): error TS7027: Unreachable code detected. + + +==== tests/cases/compiler/cf.ts (4 errors) ==== + function f() { + var z; + var x=10; + var y=3; + + L1: for (var i=0;i<19;i++) { + if (y==7) { + continue L1; + x=11; + ~ +!!! error TS7027: Unreachable code detected. + } + if (y==3) { + y++; + } + else { + y--; + } + do { + y+=2; + if (y==20) { + break; + x=12; + ~ +!!! error TS7027: Unreachable code detected. + } + } while (y<41); + y++; + } + while (y>2) { + y=y>>1; + } + L2: try { + L3: if (xf : Symbol(f, Decl(cf.ts, 0, 0)) - - var z; ->z : Symbol(z, Decl(cf.ts, 1, 7)) - - var x=10; ->x : Symbol(x, Decl(cf.ts, 2, 7)) - - var y=3; ->y : Symbol(y, Decl(cf.ts, 3, 7)) - - L1: for (var i=0;i<19;i++) { ->i : Symbol(i, Decl(cf.ts, 5, 16)) ->i : Symbol(i, Decl(cf.ts, 5, 16)) ->i : Symbol(i, Decl(cf.ts, 5, 16)) - - if (y==7) { ->y : Symbol(y, Decl(cf.ts, 3, 7)) - - continue L1; - x=11; ->x : Symbol(x, Decl(cf.ts, 2, 7)) - } - if (y==3) { ->y : Symbol(y, Decl(cf.ts, 3, 7)) - - y++; ->y : Symbol(y, Decl(cf.ts, 3, 7)) - } - else { - y--; ->y : Symbol(y, Decl(cf.ts, 3, 7)) - } - do { - y+=2; ->y : Symbol(y, Decl(cf.ts, 3, 7)) - - if (y==20) { ->y : Symbol(y, Decl(cf.ts, 3, 7)) - - break; - x=12; ->x : Symbol(x, Decl(cf.ts, 2, 7)) - } - } while (y<41); ->y : Symbol(y, Decl(cf.ts, 3, 7)) - - y++; ->y : Symbol(y, Decl(cf.ts, 3, 7)) - } - while (y>2) { ->y : Symbol(y, Decl(cf.ts, 3, 7)) - - y=y>>1; ->y : Symbol(y, Decl(cf.ts, 3, 7)) ->y : Symbol(y, Decl(cf.ts, 3, 7)) - } - L2: try { - L3: if (xx : Symbol(x, Decl(cf.ts, 2, 7)) ->y : Symbol(y, Decl(cf.ts, 3, 7)) - - break L2; - x=13; ->x : Symbol(x, Decl(cf.ts, 2, 7)) - } - else { - break L3; - x=14; ->x : Symbol(x, Decl(cf.ts, 2, 7)) - } - } - catch (e) { ->e : Symbol(e, Decl(cf.ts, 38, 11)) - - x++; ->x : Symbol(x, Decl(cf.ts, 2, 7)) - } - finally { - x+=3; ->x : Symbol(x, Decl(cf.ts, 2, 7)) - } - y++; ->y : Symbol(y, Decl(cf.ts, 3, 7)) - - for (var k=0;k<10;k++) { ->k : Symbol(k, Decl(cf.ts, 45, 12)) ->k : Symbol(k, Decl(cf.ts, 45, 12)) ->k : Symbol(k, Decl(cf.ts, 45, 12)) - - z; ->z : Symbol(z, Decl(cf.ts, 1, 7)) - - break; - } - for (k=0;k<10;k++) { ->k : Symbol(k, Decl(cf.ts, 45, 12)) ->k : Symbol(k, Decl(cf.ts, 45, 12)) ->k : Symbol(k, Decl(cf.ts, 45, 12)) - - if (k==6) { ->k : Symbol(k, Decl(cf.ts, 45, 12)) - - continue; - } - break; - } -} - diff --git a/tests/baselines/reference/cf.types b/tests/baselines/reference/cf.types deleted file mode 100644 index 397e3469ece..00000000000 --- a/tests/baselines/reference/cf.types +++ /dev/null @@ -1,169 +0,0 @@ -=== tests/cases/compiler/cf.ts === -function f() { ->f : () => void - - var z; ->z : any - - var x=10; ->x : number ->10 : number - - var y=3; ->y : number ->3 : number - - L1: for (var i=0;i<19;i++) { ->L1 : any ->i : number ->0 : number ->i<19 : boolean ->i : number ->19 : number ->i++ : number ->i : number - - if (y==7) { ->y==7 : boolean ->y : number ->7 : number - - continue L1; ->L1 : any - - x=11; ->x=11 : number ->x : number ->11 : number - } - if (y==3) { ->y==3 : boolean ->y : number ->3 : number - - y++; ->y++ : number ->y : number - } - else { - y--; ->y-- : number ->y : number - } - do { - y+=2; ->y+=2 : number ->y : number ->2 : number - - if (y==20) { ->y==20 : boolean ->y : number ->20 : number - - break; - x=12; ->x=12 : number ->x : number ->12 : number - } - } while (y<41); ->y<41 : boolean ->y : number ->41 : number - - y++; ->y++ : number ->y : number - } - while (y>2) { ->y>2 : boolean ->y : number ->2 : number - - y=y>>1; ->y=y>>1 : number ->y : number ->y>>1 : number ->y : number ->1 : number - } - L2: try { ->L2 : any - - L3: if (xL3 : any ->xx : number ->y : number - - break L2; ->L2 : any - - x=13; ->x=13 : number ->x : number ->13 : number - } - else { - break L3; ->L3 : any - - x=14; ->x=14 : number ->x : number ->14 : number - } - } - catch (e) { ->e : any - - x++; ->x++ : number ->x : number - } - finally { - x+=3; ->x+=3 : number ->x : number ->3 : number - } - y++; ->y++ : number ->y : number - - for (var k=0;k<10;k++) { ->k : number ->0 : number ->k<10 : boolean ->k : number ->10 : number ->k++ : number ->k : number - - z; ->z : any - - break; - } - for (k=0;k<10;k++) { ->k=0 : number ->k : number ->0 : number ->k<10 : boolean ->k : number ->10 : number ->k++ : number ->k : number - - if (k==6) { ->k==6 : boolean ->k : number ->6 : number - - continue; - } - break; - } -} - diff --git a/tests/baselines/reference/commentsAtEndOfFile1.errors.txt b/tests/baselines/reference/commentsAtEndOfFile1.errors.txt new file mode 100644 index 00000000000..dd689841659 --- /dev/null +++ b/tests/baselines/reference/commentsAtEndOfFile1.errors.txt @@ -0,0 +1,10 @@ +tests/cases/compiler/commentsAtEndOfFile1.ts(1,1): error TS7028: Unused label. + + +==== tests/cases/compiler/commentsAtEndOfFile1.ts (1 errors) ==== + Input: + ~~~~~ +!!! error TS7028: Unused label. + ; + //Testing two + \ No newline at end of file diff --git a/tests/baselines/reference/commentsAtEndOfFile1.symbols b/tests/baselines/reference/commentsAtEndOfFile1.symbols deleted file mode 100644 index c09a435f1a7..00000000000 --- a/tests/baselines/reference/commentsAtEndOfFile1.symbols +++ /dev/null @@ -1,6 +0,0 @@ -=== tests/cases/compiler/commentsAtEndOfFile1.ts === -Input: -No type information for this code.; -No type information for this code.//Testing two -No type information for this code. -No type information for this code. \ No newline at end of file diff --git a/tests/baselines/reference/commentsAtEndOfFile1.types b/tests/baselines/reference/commentsAtEndOfFile1.types deleted file mode 100644 index 6bac6757061..00000000000 --- a/tests/baselines/reference/commentsAtEndOfFile1.types +++ /dev/null @@ -1,7 +0,0 @@ -=== tests/cases/compiler/commentsAtEndOfFile1.ts === -Input: ->Input : any - -; -//Testing two - diff --git a/tests/baselines/reference/compoundAssignmentLHSIsValue.errors.txt b/tests/baselines/reference/compoundAssignmentLHSIsValue.errors.txt index 7b26fc4bf9e..645e34bcfa7 100644 --- a/tests/baselines/reference/compoundAssignmentLHSIsValue.errors.txt +++ b/tests/baselines/reference/compoundAssignmentLHSIsValue.errors.txt @@ -28,6 +28,7 @@ tests/cases/conformance/expressions/assignmentOperator/compoundAssignmentLHSIsVa tests/cases/conformance/expressions/assignmentOperator/compoundAssignmentLHSIsValue.ts(53,1): error TS2364: Invalid left-hand side of assignment expression. tests/cases/conformance/expressions/assignmentOperator/compoundAssignmentLHSIsValue.ts(54,1): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. tests/cases/conformance/expressions/assignmentOperator/compoundAssignmentLHSIsValue.ts(55,1): error TS2364: Invalid left-hand side of assignment expression. +tests/cases/conformance/expressions/assignmentOperator/compoundAssignmentLHSIsValue.ts(58,3): error TS7028: Unused label. tests/cases/conformance/expressions/assignmentOperator/compoundAssignmentLHSIsValue.ts(58,9): error TS1128: Declaration or statement expected. tests/cases/conformance/expressions/assignmentOperator/compoundAssignmentLHSIsValue.ts(59,9): error TS1128: Declaration or statement expected. tests/cases/conformance/expressions/assignmentOperator/compoundAssignmentLHSIsValue.ts(62,1): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. @@ -74,7 +75,7 @@ tests/cases/conformance/expressions/assignmentOperator/compoundAssignmentLHSIsVa tests/cases/conformance/expressions/assignmentOperator/compoundAssignmentLHSIsValue.ts(122,1): error TS2364: Invalid left-hand side of assignment expression. -==== tests/cases/conformance/expressions/assignmentOperator/compoundAssignmentLHSIsValue.ts (74 errors) ==== +==== tests/cases/conformance/expressions/assignmentOperator/compoundAssignmentLHSIsValue.ts (75 errors) ==== // expected error for all the LHS of compound assignments (arithmetic and addition) var value; @@ -193,6 +194,8 @@ tests/cases/conformance/expressions/assignmentOperator/compoundAssignmentLHSIsVa // object literals { a: 0} *= value; + ~ +!!! error TS7028: Unused label. ~~ !!! error TS1128: Declaration or statement expected. { a: 0} += value; diff --git a/tests/baselines/reference/conditionalExpressions2.errors.txt b/tests/baselines/reference/conditionalExpressions2.errors.txt new file mode 100644 index 00000000000..3fb44a840b3 --- /dev/null +++ b/tests/baselines/reference/conditionalExpressions2.errors.txt @@ -0,0 +1,15 @@ +tests/cases/compiler/conditionalExpressions2.ts(9,54): error TS7027: Unreachable code detected. + + +==== tests/cases/compiler/conditionalExpressions2.ts (1 errors) ==== + var a = false ? 1 : null; + var b = false ? undefined : 0; + var c = false ? 1 : 0; + var d = false ? false : true; + var e = false ? "foo" : "bar"; + var f = false ? null : undefined; + var g = true ? {g:5} : null; + var h = [{h:5}, null]; + function i() { if (true) { return { x: 5 }; } else { return null; } } + ~~~~~~ +!!! error TS7027: Unreachable code detected. \ No newline at end of file diff --git a/tests/baselines/reference/conditionalExpressions2.symbols b/tests/baselines/reference/conditionalExpressions2.symbols deleted file mode 100644 index 63c8b417477..00000000000 --- a/tests/baselines/reference/conditionalExpressions2.symbols +++ /dev/null @@ -1,33 +0,0 @@ -=== tests/cases/compiler/conditionalExpressions2.ts === -var a = false ? 1 : null; ->a : Symbol(a, Decl(conditionalExpressions2.ts, 0, 3)) - -var b = false ? undefined : 0; ->b : Symbol(b, Decl(conditionalExpressions2.ts, 1, 3)) ->undefined : Symbol(undefined) - -var c = false ? 1 : 0; ->c : Symbol(c, Decl(conditionalExpressions2.ts, 2, 3)) - -var d = false ? false : true; ->d : Symbol(d, Decl(conditionalExpressions2.ts, 3, 3)) - -var e = false ? "foo" : "bar"; ->e : Symbol(e, Decl(conditionalExpressions2.ts, 4, 3)) - -var f = false ? null : undefined; ->f : Symbol(f, Decl(conditionalExpressions2.ts, 5, 3)) ->undefined : Symbol(undefined) - -var g = true ? {g:5} : null; ->g : Symbol(g, Decl(conditionalExpressions2.ts, 6, 3)) ->g : Symbol(g, Decl(conditionalExpressions2.ts, 6, 16)) - -var h = [{h:5}, null]; ->h : Symbol(h, Decl(conditionalExpressions2.ts, 7, 3)) ->h : Symbol(h, Decl(conditionalExpressions2.ts, 7, 10)) - -function i() { if (true) { return { x: 5 }; } else { return null; } } ->i : Symbol(i, Decl(conditionalExpressions2.ts, 7, 22)) ->x : Symbol(x, Decl(conditionalExpressions2.ts, 8, 35)) - diff --git a/tests/baselines/reference/conditionalExpressions2.types b/tests/baselines/reference/conditionalExpressions2.types deleted file mode 100644 index 5f49410b1e4..00000000000 --- a/tests/baselines/reference/conditionalExpressions2.types +++ /dev/null @@ -1,68 +0,0 @@ -=== tests/cases/compiler/conditionalExpressions2.ts === -var a = false ? 1 : null; ->a : number ->false ? 1 : null : number ->false : boolean ->1 : number ->null : null - -var b = false ? undefined : 0; ->b : number ->false ? undefined : 0 : number ->false : boolean ->undefined : undefined ->0 : number - -var c = false ? 1 : 0; ->c : number ->false ? 1 : 0 : number ->false : boolean ->1 : number ->0 : number - -var d = false ? false : true; ->d : boolean ->false ? false : true : boolean ->false : boolean ->false : boolean ->true : boolean - -var e = false ? "foo" : "bar"; ->e : string ->false ? "foo" : "bar" : string ->false : boolean ->"foo" : string ->"bar" : string - -var f = false ? null : undefined; ->f : any ->false ? null : undefined : null ->false : boolean ->null : null ->undefined : undefined - -var g = true ? {g:5} : null; ->g : { g: number; } ->true ? {g:5} : null : { g: number; } ->true : boolean ->{g:5} : { g: number; } ->g : number ->5 : number ->null : null - -var h = [{h:5}, null]; ->h : { h: number; }[] ->[{h:5}, null] : { h: number; }[] ->{h:5} : { h: number; } ->h : number ->5 : number ->null : null - -function i() { if (true) { return { x: 5 }; } else { return null; } } ->i : () => { x: number; } ->true : boolean ->{ x: 5 } : { x: number; } ->x : number ->5 : number ->null : null - diff --git a/tests/baselines/reference/constDeclarations-invalidContexts.errors.txt b/tests/baselines/reference/constDeclarations-invalidContexts.errors.txt index 20ec5b0c25b..56273924ac1 100644 --- a/tests/baselines/reference/constDeclarations-invalidContexts.errors.txt +++ b/tests/baselines/reference/constDeclarations-invalidContexts.errors.txt @@ -1,6 +1,8 @@ tests/cases/compiler/constDeclarations-invalidContexts.ts(4,5): error TS1156: 'const' declarations can only be declared inside a block. +tests/cases/compiler/constDeclarations-invalidContexts.ts(6,5): error TS7027: Unreachable code detected. tests/cases/compiler/constDeclarations-invalidContexts.ts(6,5): error TS1156: 'const' declarations can only be declared inside a block. tests/cases/compiler/constDeclarations-invalidContexts.ts(9,5): error TS1156: 'const' declarations can only be declared inside a block. +tests/cases/compiler/constDeclarations-invalidContexts.ts(11,1): error TS7027: Unreachable code detected. tests/cases/compiler/constDeclarations-invalidContexts.ts(12,5): error TS1156: 'const' declarations can only be declared inside a block. tests/cases/compiler/constDeclarations-invalidContexts.ts(16,7): error TS2410: All symbols within a 'with' block will be resolved to 'any'. tests/cases/compiler/constDeclarations-invalidContexts.ts(20,5): error TS1156: 'const' declarations can only be declared inside a block. @@ -9,7 +11,7 @@ tests/cases/compiler/constDeclarations-invalidContexts.ts(26,12): error TS1156: tests/cases/compiler/constDeclarations-invalidContexts.ts(29,29): error TS1156: 'const' declarations can only be declared inside a block. -==== tests/cases/compiler/constDeclarations-invalidContexts.ts (9 errors) ==== +==== tests/cases/compiler/constDeclarations-invalidContexts.ts (11 errors) ==== // Errors, const must be defined inside a block if (true) @@ -18,6 +20,8 @@ tests/cases/compiler/constDeclarations-invalidContexts.ts(29,29): error TS1156: !!! error TS1156: 'const' declarations can only be declared inside a block. else const c2 = 0; + ~~~~~ +!!! error TS7027: Unreachable code detected. ~~~~~~~~~~~~~ !!! error TS1156: 'const' declarations can only be declared inside a block. @@ -27,6 +31,8 @@ tests/cases/compiler/constDeclarations-invalidContexts.ts(29,29): error TS1156: !!! error TS1156: 'const' declarations can only be declared inside a block. do + ~~ +!!! error TS7027: Unreachable code detected. const c4 = 0; ~~~~~~~~~~~~~ !!! error TS1156: 'const' declarations can only be declared inside a block. diff --git a/tests/baselines/reference/constDeclarations-scopes.errors.txt b/tests/baselines/reference/constDeclarations-scopes.errors.txt index 138acd9b16d..4c9f7ce5163 100644 --- a/tests/baselines/reference/constDeclarations-scopes.errors.txt +++ b/tests/baselines/reference/constDeclarations-scopes.errors.txt @@ -1,7 +1,9 @@ +tests/cases/compiler/constDeclarations-scopes.ts(13,5): error TS7027: Unreachable code detected. +tests/cases/compiler/constDeclarations-scopes.ts(22,1): error TS7027: Unreachable code detected. tests/cases/compiler/constDeclarations-scopes.ts(28,7): error TS2410: All symbols within a 'with' block will be resolved to 'any'. -==== tests/cases/compiler/constDeclarations-scopes.ts (1 errors) ==== +==== tests/cases/compiler/constDeclarations-scopes.ts (3 errors) ==== // global const c = "string"; @@ -15,6 +17,8 @@ tests/cases/compiler/constDeclarations-scopes.ts(28,7): error TS2410: All symbol } else { const c = 0; + ~~~~~ +!!! error TS7027: Unreachable code detected. n = c; } @@ -24,6 +28,8 @@ tests/cases/compiler/constDeclarations-scopes.ts(28,7): error TS2410: All symbol } do { + ~~ +!!! error TS7027: Unreachable code detected. const c = 0; n = c; } while (true); diff --git a/tests/baselines/reference/constDeclarations-validContexts.errors.txt b/tests/baselines/reference/constDeclarations-validContexts.errors.txt index 7af16a53cbe..e55e5f578ba 100644 --- a/tests/baselines/reference/constDeclarations-validContexts.errors.txt +++ b/tests/baselines/reference/constDeclarations-validContexts.errors.txt @@ -1,7 +1,9 @@ +tests/cases/compiler/constDeclarations-validContexts.ts(8,5): error TS7027: Unreachable code detected. +tests/cases/compiler/constDeclarations-validContexts.ts(15,1): error TS7027: Unreachable code detected. tests/cases/compiler/constDeclarations-validContexts.ts(20,7): error TS2410: All symbols within a 'with' block will be resolved to 'any'. -==== tests/cases/compiler/constDeclarations-validContexts.ts (1 errors) ==== +==== tests/cases/compiler/constDeclarations-validContexts.ts (3 errors) ==== // Control flow statements with blocks @@ -10,6 +12,8 @@ tests/cases/compiler/constDeclarations-validContexts.ts(20,7): error TS2410: All } else { const c2 = 0; + ~~~~~ +!!! error TS7027: Unreachable code detected. } while (true) { @@ -17,6 +21,8 @@ tests/cases/compiler/constDeclarations-validContexts.ts(20,7): error TS2410: All } do { + ~~ +!!! error TS7027: Unreachable code detected. const c4 = 0; } while (true); diff --git a/tests/baselines/reference/constructorWithIncompleteTypeAnnotation.errors.txt b/tests/baselines/reference/constructorWithIncompleteTypeAnnotation.errors.txt index 12f397ff06c..56213610b83 100644 --- a/tests/baselines/reference/constructorWithIncompleteTypeAnnotation.errors.txt +++ b/tests/baselines/reference/constructorWithIncompleteTypeAnnotation.errors.txt @@ -9,6 +9,7 @@ tests/cases/compiler/constructorWithIncompleteTypeAnnotation.ts(27,18): error TS tests/cases/compiler/constructorWithIncompleteTypeAnnotation.ts(27,26): error TS2304: Cannot find name 'bfs'. tests/cases/compiler/constructorWithIncompleteTypeAnnotation.ts(28,30): error TS1005: '=' expected. tests/cases/compiler/constructorWithIncompleteTypeAnnotation.ts(31,18): error TS1109: Expression expected. +tests/cases/compiler/constructorWithIncompleteTypeAnnotation.ts(31,18): error TS7027: Unreachable code detected. tests/cases/compiler/constructorWithIncompleteTypeAnnotation.ts(34,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. tests/cases/compiler/constructorWithIncompleteTypeAnnotation.ts(34,26): error TS1005: ';' expected. tests/cases/compiler/constructorWithIncompleteTypeAnnotation.ts(34,28): error TS2304: Cannot find name 'bfs'. @@ -52,6 +53,7 @@ tests/cases/compiler/constructorWithIncompleteTypeAnnotation.ts(235,28): error T tests/cases/compiler/constructorWithIncompleteTypeAnnotation.ts(235,36): error TS1005: ';' expected. tests/cases/compiler/constructorWithIncompleteTypeAnnotation.ts(238,9): error TS1128: Declaration or statement expected. tests/cases/compiler/constructorWithIncompleteTypeAnnotation.ts(238,16): error TS2304: Cannot find name 'method2'. +tests/cases/compiler/constructorWithIncompleteTypeAnnotation.ts(238,16): error TS7027: Unreachable code detected. tests/cases/compiler/constructorWithIncompleteTypeAnnotation.ts(238,26): error TS1005: ';' expected. tests/cases/compiler/constructorWithIncompleteTypeAnnotation.ts(241,5): error TS1128: Declaration or statement expected. tests/cases/compiler/constructorWithIncompleteTypeAnnotation.ts(246,25): error TS2339: Property 'method1' does not exist on type 'B'. @@ -83,7 +85,7 @@ tests/cases/compiler/constructorWithIncompleteTypeAnnotation.ts(259,55): error T tests/cases/compiler/constructorWithIncompleteTypeAnnotation.ts(261,1): error TS1128: Declaration or statement expected. -==== tests/cases/compiler/constructorWithIncompleteTypeAnnotation.ts (83 errors) ==== +==== tests/cases/compiler/constructorWithIncompleteTypeAnnotation.ts (85 errors) ==== declare module "fs" { export class File { constructor(filename: string); @@ -140,6 +142,8 @@ tests/cases/compiler/constructorWithIncompleteTypeAnnotation.ts(261,1): error TS ^ ~ !!! error TS1109: Expression expected. + ~ +!!! error TS7027: Unreachable code detected. retValue = bfs.TYPES(); @@ -433,6 +437,8 @@ tests/cases/compiler/constructorWithIncompleteTypeAnnotation.ts(261,1): error TS !!! error TS1128: Declaration or statement expected. ~~~~~~~ !!! error TS2304: Cannot find name 'method2'. + ~~~~~~~ +!!! error TS7027: Unreachable code detected. ~ !!! error TS1005: ';' expected. return 2 * this.method1(2); diff --git a/tests/baselines/reference/continueNotInIterationStatement4.errors.txt b/tests/baselines/reference/continueNotInIterationStatement4.errors.txt index 1c80f7057b8..3f0d57ac45d 100644 --- a/tests/baselines/reference/continueNotInIterationStatement4.errors.txt +++ b/tests/baselines/reference/continueNotInIterationStatement4.errors.txt @@ -1,8 +1,11 @@ +tests/cases/compiler/continueNotInIterationStatement4.ts(1,1): error TS7028: Unused label. tests/cases/compiler/continueNotInIterationStatement4.ts(4,5): error TS1107: Jump target cannot cross function boundary. -==== tests/cases/compiler/continueNotInIterationStatement4.ts (1 errors) ==== +==== tests/cases/compiler/continueNotInIterationStatement4.ts (2 errors) ==== TWO: + ~~~ +!!! error TS7028: Unused label. while (true){ var x = () => { continue TWO; diff --git a/tests/baselines/reference/continueTarget3.errors.txt b/tests/baselines/reference/continueTarget3.errors.txt new file mode 100644 index 00000000000..a3f6b64e7c6 --- /dev/null +++ b/tests/baselines/reference/continueTarget3.errors.txt @@ -0,0 +1,11 @@ +tests/cases/compiler/continueTarget3.ts(2,1): error TS7028: Unused label. + + +==== tests/cases/compiler/continueTarget3.ts (1 errors) ==== + target1: + target2: + ~~~~~~~ +!!! error TS7028: Unused label. + while (true) { + continue target1; + } \ No newline at end of file diff --git a/tests/baselines/reference/continueTarget3.symbols b/tests/baselines/reference/continueTarget3.symbols deleted file mode 100644 index a1b930f2f5a..00000000000 --- a/tests/baselines/reference/continueTarget3.symbols +++ /dev/null @@ -1,7 +0,0 @@ -=== tests/cases/compiler/continueTarget3.ts === -target1: -No type information for this code.target2: -No type information for this code.while (true) { -No type information for this code. continue target1; -No type information for this code.} -No type information for this code. \ No newline at end of file diff --git a/tests/baselines/reference/continueTarget3.types b/tests/baselines/reference/continueTarget3.types deleted file mode 100644 index 3336b47772c..00000000000 --- a/tests/baselines/reference/continueTarget3.types +++ /dev/null @@ -1,13 +0,0 @@ -=== tests/cases/compiler/continueTarget3.ts === -target1: ->target1 : any - -target2: ->target2 : any - -while (true) { ->true : boolean - - continue target1; ->target1 : any -} diff --git a/tests/baselines/reference/continueTarget4.errors.txt b/tests/baselines/reference/continueTarget4.errors.txt new file mode 100644 index 00000000000..d8f3cc12892 --- /dev/null +++ b/tests/baselines/reference/continueTarget4.errors.txt @@ -0,0 +1,11 @@ +tests/cases/compiler/continueTarget4.ts(1,1): error TS7028: Unused label. + + +==== tests/cases/compiler/continueTarget4.ts (1 errors) ==== + target1: + ~~~~~~~ +!!! error TS7028: Unused label. + target2: + while (true) { + continue target2; + } \ No newline at end of file diff --git a/tests/baselines/reference/continueTarget4.symbols b/tests/baselines/reference/continueTarget4.symbols deleted file mode 100644 index ea1989a3e4d..00000000000 --- a/tests/baselines/reference/continueTarget4.symbols +++ /dev/null @@ -1,7 +0,0 @@ -=== tests/cases/compiler/continueTarget4.ts === -target1: -No type information for this code.target2: -No type information for this code.while (true) { -No type information for this code. continue target2; -No type information for this code.} -No type information for this code. \ No newline at end of file diff --git a/tests/baselines/reference/continueTarget4.types b/tests/baselines/reference/continueTarget4.types deleted file mode 100644 index 5d2b7c29bbe..00000000000 --- a/tests/baselines/reference/continueTarget4.types +++ /dev/null @@ -1,13 +0,0 @@ -=== tests/cases/compiler/continueTarget4.ts === -target1: ->target1 : any - -target2: ->target2 : any - -while (true) { ->true : boolean - - continue target2; ->target2 : any -} diff --git a/tests/baselines/reference/continueTarget5.errors.txt b/tests/baselines/reference/continueTarget5.errors.txt index 401c5874ee0..6f0d3a2f6bf 100644 --- a/tests/baselines/reference/continueTarget5.errors.txt +++ b/tests/baselines/reference/continueTarget5.errors.txt @@ -1,8 +1,11 @@ +tests/cases/compiler/continueTarget5.ts(1,1): error TS7028: Unused label. tests/cases/compiler/continueTarget5.ts(5,7): error TS1107: Jump target cannot cross function boundary. -==== tests/cases/compiler/continueTarget5.ts (1 errors) ==== +==== tests/cases/compiler/continueTarget5.ts (2 errors) ==== target: + ~~~~~~ +!!! error TS7028: Unused label. while (true) { function f() { while (true) { diff --git a/tests/baselines/reference/doWhileBreakStatements.errors.txt b/tests/baselines/reference/doWhileBreakStatements.errors.txt new file mode 100644 index 00000000000..e31109858cf --- /dev/null +++ b/tests/baselines/reference/doWhileBreakStatements.errors.txt @@ -0,0 +1,50 @@ +tests/cases/conformance/statements/breakStatements/doWhileBreakStatements.ts(11,1): error TS7028: Unused label. +tests/cases/conformance/statements/breakStatements/doWhileBreakStatements.ts(19,5): error TS7028: Unused label. +tests/cases/conformance/statements/breakStatements/doWhileBreakStatements.ts(30,1): error TS7027: Unreachable code detected. + + +==== tests/cases/conformance/statements/breakStatements/doWhileBreakStatements.ts (3 errors) ==== + do { + break; + } while(true) + + ONE: + do { + break ONE; + } + while (true) + + TWO: + ~~~ +!!! error TS7028: Unused label. + THREE: + do { + break THREE; + }while (true) + + FOUR: + do { + FIVE: + ~~~~ +!!! error TS7028: Unused label. + do { + break FOUR; + }while (true) + }while (true) + + do { + SIX: + do break SIX; while(true) + }while (true) + + SEVEN: + ~~~~~ +!!! error TS7027: Unreachable code detected. + do do do break SEVEN; while (true) while (true) while (true) + + EIGHT: + do{ + var fn = function () { } + break EIGHT; + }while(true) + \ No newline at end of file diff --git a/tests/baselines/reference/doWhileBreakStatements.symbols b/tests/baselines/reference/doWhileBreakStatements.symbols deleted file mode 100644 index 7d9db9a5ebb..00000000000 --- a/tests/baselines/reference/doWhileBreakStatements.symbols +++ /dev/null @@ -1,41 +0,0 @@ -=== tests/cases/conformance/statements/breakStatements/doWhileBreakStatements.ts === -do { - break; -} while(true) - -ONE: -do { - break ONE; -} -while (true) - -TWO: -THREE: -do { - break THREE; -}while (true) - -FOUR: -do { - FIVE: - do { - break FOUR; - }while (true) -}while (true) - -do { - SIX: - do break SIX; while(true) -}while (true) - -SEVEN: -do do do break SEVEN; while (true) while (true) while (true) - -EIGHT: -do{ - var fn = function () { } ->fn : Symbol(fn, Decl(doWhileBreakStatements.ts, 34, 7)) - - break EIGHT; -}while(true) - diff --git a/tests/baselines/reference/doWhileBreakStatements.types b/tests/baselines/reference/doWhileBreakStatements.types deleted file mode 100644 index c3ca932910a..00000000000 --- a/tests/baselines/reference/doWhileBreakStatements.types +++ /dev/null @@ -1,80 +0,0 @@ -=== tests/cases/conformance/statements/breakStatements/doWhileBreakStatements.ts === -do { - break; -} while(true) ->true : boolean - -ONE: ->ONE : any - -do { - break ONE; ->ONE : any -} -while (true) ->true : boolean - -TWO: ->TWO : any - -THREE: ->THREE : any - -do { - break THREE; ->THREE : any - -}while (true) ->true : boolean - -FOUR: ->FOUR : any - -do { - FIVE: ->FIVE : any - - do { - break FOUR; ->FOUR : any - - }while (true) ->true : boolean - -}while (true) ->true : boolean - -do { - SIX: ->SIX : any - - do break SIX; while(true) ->SIX : any ->true : boolean - -}while (true) ->true : boolean - -SEVEN: ->SEVEN : any - -do do do break SEVEN; while (true) while (true) while (true) ->SEVEN : any ->true : boolean ->true : boolean ->true : boolean - -EIGHT: ->EIGHT : any - -do{ - var fn = function () { } ->fn : () => void ->function () { } : () => void - - break EIGHT; ->EIGHT : any - -}while(true) ->true : boolean - diff --git a/tests/baselines/reference/doWhileContinueStatements.errors.txt b/tests/baselines/reference/doWhileContinueStatements.errors.txt new file mode 100644 index 00000000000..491e1242e2f --- /dev/null +++ b/tests/baselines/reference/doWhileContinueStatements.errors.txt @@ -0,0 +1,44 @@ +tests/cases/conformance/statements/continueStatements/doWhileContinueStatements.ts(5,1): error TS7027: Unreachable code detected. + + +==== tests/cases/conformance/statements/continueStatements/doWhileContinueStatements.ts (1 errors) ==== + do { + continue; + } while(true) + + ONE: + ~~~ +!!! error TS7027: Unreachable code detected. + do { + continue ONE; + } + while (true) + + TWO: + THREE: + do { + continue THREE; + }while (true) + + FOUR: + do { + FIVE: + do { + continue FOUR; + }while (true) + }while (true) + + do { + SIX: + do continue SIX; while(true) + }while (true) + + SEVEN: + do do do continue SEVEN; while (true) while (true) while (true) + + EIGHT: + do{ + var fn = function () { } + continue EIGHT; + }while(true) + \ No newline at end of file diff --git a/tests/baselines/reference/doWhileContinueStatements.symbols b/tests/baselines/reference/doWhileContinueStatements.symbols deleted file mode 100644 index e4c6d577d5a..00000000000 --- a/tests/baselines/reference/doWhileContinueStatements.symbols +++ /dev/null @@ -1,41 +0,0 @@ -=== tests/cases/conformance/statements/continueStatements/doWhileContinueStatements.ts === -do { - continue; -} while(true) - -ONE: -do { - continue ONE; -} -while (true) - -TWO: -THREE: -do { - continue THREE; -}while (true) - -FOUR: -do { - FIVE: - do { - continue FOUR; - }while (true) -}while (true) - -do { - SIX: - do continue SIX; while(true) -}while (true) - -SEVEN: -do do do continue SEVEN; while (true) while (true) while (true) - -EIGHT: -do{ - var fn = function () { } ->fn : Symbol(fn, Decl(doWhileContinueStatements.ts, 34, 7)) - - continue EIGHT; -}while(true) - diff --git a/tests/baselines/reference/doWhileContinueStatements.types b/tests/baselines/reference/doWhileContinueStatements.types deleted file mode 100644 index 90c9f59842a..00000000000 --- a/tests/baselines/reference/doWhileContinueStatements.types +++ /dev/null @@ -1,80 +0,0 @@ -=== tests/cases/conformance/statements/continueStatements/doWhileContinueStatements.ts === -do { - continue; -} while(true) ->true : boolean - -ONE: ->ONE : any - -do { - continue ONE; ->ONE : any -} -while (true) ->true : boolean - -TWO: ->TWO : any - -THREE: ->THREE : any - -do { - continue THREE; ->THREE : any - -}while (true) ->true : boolean - -FOUR: ->FOUR : any - -do { - FIVE: ->FIVE : any - - do { - continue FOUR; ->FOUR : any - - }while (true) ->true : boolean - -}while (true) ->true : boolean - -do { - SIX: ->SIX : any - - do continue SIX; while(true) ->SIX : any ->true : boolean - -}while (true) ->true : boolean - -SEVEN: ->SEVEN : any - -do do do continue SEVEN; while (true) while (true) while (true) ->SEVEN : any ->true : boolean ->true : boolean ->true : boolean - -EIGHT: ->EIGHT : any - -do{ - var fn = function () { } ->fn : () => void ->function () { } : () => void - - continue EIGHT; ->EIGHT : any - -}while(true) ->true : boolean - diff --git a/tests/baselines/reference/downlevelLetConst16.errors.txt b/tests/baselines/reference/downlevelLetConst16.errors.txt index 905d1a607e8..a6651574b9e 100644 --- a/tests/baselines/reference/downlevelLetConst16.errors.txt +++ b/tests/baselines/reference/downlevelLetConst16.errors.txt @@ -1,4 +1,6 @@ +tests/cases/compiler/downlevelLetConst16.ts(151,5): error TS7027: Unreachable code detected. tests/cases/compiler/downlevelLetConst16.ts(151,15): error TS2525: Initializer provides no value for this binding element and the binding element has no default value. +tests/cases/compiler/downlevelLetConst16.ts(164,5): error TS7027: Unreachable code detected. tests/cases/compiler/downlevelLetConst16.ts(164,17): error TS2525: Initializer provides no value for this binding element and the binding element has no default value. tests/cases/compiler/downlevelLetConst16.ts(195,14): error TS2461: Type 'undefined' is not an array type. tests/cases/compiler/downlevelLetConst16.ts(202,15): error TS2459: Type 'undefined' has no property 'a' and no string index signature. @@ -6,7 +8,7 @@ tests/cases/compiler/downlevelLetConst16.ts(216,16): error TS2461: Type 'undefin tests/cases/compiler/downlevelLetConst16.ts(223,17): error TS2459: Type 'undefined' has no property 'a' and no string index signature. -==== tests/cases/compiler/downlevelLetConst16.ts (6 errors) ==== +==== tests/cases/compiler/downlevelLetConst16.ts (8 errors) ==== 'use strict' declare function use(a: any); @@ -158,6 +160,8 @@ tests/cases/compiler/downlevelLetConst16.ts(223,17): error TS2459: Type 'undefin use(x); } for (let [y] = []; ;) { + ~~~ +!!! error TS7027: Unreachable code detected. ~ !!! error TS2525: Initializer provides no value for this binding element and the binding element has no default value. use(y); @@ -173,6 +177,8 @@ tests/cases/compiler/downlevelLetConst16.ts(223,17): error TS2459: Type 'undefin use(x); } for (const [y] = []; ;) { + ~~~ +!!! error TS7027: Unreachable code detected. ~ !!! error TS2525: Initializer provides no value for this binding element and the binding element has no default value. use(y); diff --git a/tests/baselines/reference/downlevelLetConst17.errors.txt b/tests/baselines/reference/downlevelLetConst17.errors.txt new file mode 100644 index 00000000000..0365b638449 --- /dev/null +++ b/tests/baselines/reference/downlevelLetConst17.errors.txt @@ -0,0 +1,73 @@ +tests/cases/compiler/downlevelLetConst17.ts(9,1): error TS7027: Unreachable code detected. + + +==== tests/cases/compiler/downlevelLetConst17.ts (1 errors) ==== + 'use strict' + + declare function use(a: any); + + var x; + for (let x = 10; ;) { + use(x); + } + use(x); + ~~~ +!!! error TS7027: Unreachable code detected. + + for (const x = 10; ;) { + use(x); + } + + for (; ;) { + let x = 10; + use(x); + x = 1; + } + + for (; ;) { + const x = 10; + use(x); + } + + for (let x; ;) { + use(x); + x = 1; + } + + for (; ;) { + let x; + use(x); + x = 1; + } + + while (true) { + let x; + use(x); + } + + while (true) { + const x = true; + use(x); + } + + do { + let x; + use(x); + } while (true); + + do { + let x; + use(x); + } while (true); + + for (let x in []) { + use(x); + } + + for (const x in []) { + use(x); + } + + for (const x of []) { + use(x); + } \ No newline at end of file diff --git a/tests/baselines/reference/downlevelLetConst17.symbols b/tests/baselines/reference/downlevelLetConst17.symbols deleted file mode 100644 index 809a835774c..00000000000 --- a/tests/baselines/reference/downlevelLetConst17.symbols +++ /dev/null @@ -1,134 +0,0 @@ -=== tests/cases/compiler/downlevelLetConst17.ts === -'use strict' - -declare function use(a: any); ->use : Symbol(use, Decl(downlevelLetConst17.ts, 0, 12)) ->a : Symbol(a, Decl(downlevelLetConst17.ts, 2, 21)) - -var x; ->x : Symbol(x, Decl(downlevelLetConst17.ts, 4, 3)) - -for (let x = 10; ;) { ->x : Symbol(x, Decl(downlevelLetConst17.ts, 5, 8)) - - use(x); ->use : Symbol(use, Decl(downlevelLetConst17.ts, 0, 12)) ->x : Symbol(x, Decl(downlevelLetConst17.ts, 5, 8)) -} -use(x); ->use : Symbol(use, Decl(downlevelLetConst17.ts, 0, 12)) ->x : Symbol(x, Decl(downlevelLetConst17.ts, 4, 3)) - -for (const x = 10; ;) { ->x : Symbol(x, Decl(downlevelLetConst17.ts, 10, 10)) - - use(x); ->use : Symbol(use, Decl(downlevelLetConst17.ts, 0, 12)) ->x : Symbol(x, Decl(downlevelLetConst17.ts, 10, 10)) -} - -for (; ;) { - let x = 10; ->x : Symbol(x, Decl(downlevelLetConst17.ts, 15, 7)) - - use(x); ->use : Symbol(use, Decl(downlevelLetConst17.ts, 0, 12)) ->x : Symbol(x, Decl(downlevelLetConst17.ts, 15, 7)) - - x = 1; ->x : Symbol(x, Decl(downlevelLetConst17.ts, 15, 7)) -} - -for (; ;) { - const x = 10; ->x : Symbol(x, Decl(downlevelLetConst17.ts, 21, 9)) - - use(x); ->use : Symbol(use, Decl(downlevelLetConst17.ts, 0, 12)) ->x : Symbol(x, Decl(downlevelLetConst17.ts, 21, 9)) -} - -for (let x; ;) { ->x : Symbol(x, Decl(downlevelLetConst17.ts, 25, 8)) - - use(x); ->use : Symbol(use, Decl(downlevelLetConst17.ts, 0, 12)) ->x : Symbol(x, Decl(downlevelLetConst17.ts, 25, 8)) - - x = 1; ->x : Symbol(x, Decl(downlevelLetConst17.ts, 25, 8)) -} - -for (; ;) { - let x; ->x : Symbol(x, Decl(downlevelLetConst17.ts, 31, 7)) - - use(x); ->use : Symbol(use, Decl(downlevelLetConst17.ts, 0, 12)) ->x : Symbol(x, Decl(downlevelLetConst17.ts, 31, 7)) - - x = 1; ->x : Symbol(x, Decl(downlevelLetConst17.ts, 31, 7)) -} - -while (true) { - let x; ->x : Symbol(x, Decl(downlevelLetConst17.ts, 37, 7)) - - use(x); ->use : Symbol(use, Decl(downlevelLetConst17.ts, 0, 12)) ->x : Symbol(x, Decl(downlevelLetConst17.ts, 37, 7)) -} - -while (true) { - const x = true; ->x : Symbol(x, Decl(downlevelLetConst17.ts, 42, 9)) - - use(x); ->use : Symbol(use, Decl(downlevelLetConst17.ts, 0, 12)) ->x : Symbol(x, Decl(downlevelLetConst17.ts, 42, 9)) -} - -do { - let x; ->x : Symbol(x, Decl(downlevelLetConst17.ts, 47, 7)) - - use(x); ->use : Symbol(use, Decl(downlevelLetConst17.ts, 0, 12)) ->x : Symbol(x, Decl(downlevelLetConst17.ts, 47, 7)) - -} while (true); - -do { - let x; ->x : Symbol(x, Decl(downlevelLetConst17.ts, 52, 7)) - - use(x); ->use : Symbol(use, Decl(downlevelLetConst17.ts, 0, 12)) ->x : Symbol(x, Decl(downlevelLetConst17.ts, 52, 7)) - -} while (true); - -for (let x in []) { ->x : Symbol(x, Decl(downlevelLetConst17.ts, 56, 8)) - - use(x); ->use : Symbol(use, Decl(downlevelLetConst17.ts, 0, 12)) ->x : Symbol(x, Decl(downlevelLetConst17.ts, 56, 8)) -} - -for (const x in []) { ->x : Symbol(x, Decl(downlevelLetConst17.ts, 60, 10)) - - use(x); ->use : Symbol(use, Decl(downlevelLetConst17.ts, 0, 12)) ->x : Symbol(x, Decl(downlevelLetConst17.ts, 60, 10)) -} - -for (const x of []) { ->x : Symbol(x, Decl(downlevelLetConst17.ts, 64, 10)) - - use(x); ->use : Symbol(use, Decl(downlevelLetConst17.ts, 0, 12)) ->x : Symbol(x, Decl(downlevelLetConst17.ts, 64, 10)) -} diff --git a/tests/baselines/reference/downlevelLetConst17.types b/tests/baselines/reference/downlevelLetConst17.types deleted file mode 100644 index 824abcc76be..00000000000 --- a/tests/baselines/reference/downlevelLetConst17.types +++ /dev/null @@ -1,169 +0,0 @@ -=== tests/cases/compiler/downlevelLetConst17.ts === -'use strict' ->'use strict' : string - -declare function use(a: any); ->use : (a: any) => any ->a : any - -var x; ->x : any - -for (let x = 10; ;) { ->x : number ->10 : number - - use(x); ->use(x) : any ->use : (a: any) => any ->x : number -} -use(x); ->use(x) : any ->use : (a: any) => any ->x : any - -for (const x = 10; ;) { ->x : number ->10 : number - - use(x); ->use(x) : any ->use : (a: any) => any ->x : number -} - -for (; ;) { - let x = 10; ->x : number ->10 : number - - use(x); ->use(x) : any ->use : (a: any) => any ->x : number - - x = 1; ->x = 1 : number ->x : number ->1 : number -} - -for (; ;) { - const x = 10; ->x : number ->10 : number - - use(x); ->use(x) : any ->use : (a: any) => any ->x : number -} - -for (let x; ;) { ->x : any - - use(x); ->use(x) : any ->use : (a: any) => any ->x : any - - x = 1; ->x = 1 : number ->x : any ->1 : number -} - -for (; ;) { - let x; ->x : any - - use(x); ->use(x) : any ->use : (a: any) => any ->x : any - - x = 1; ->x = 1 : number ->x : any ->1 : number -} - -while (true) { ->true : boolean - - let x; ->x : any - - use(x); ->use(x) : any ->use : (a: any) => any ->x : any -} - -while (true) { ->true : boolean - - const x = true; ->x : boolean ->true : boolean - - use(x); ->use(x) : any ->use : (a: any) => any ->x : boolean -} - -do { - let x; ->x : any - - use(x); ->use(x) : any ->use : (a: any) => any ->x : any - -} while (true); ->true : boolean - -do { - let x; ->x : any - - use(x); ->use(x) : any ->use : (a: any) => any ->x : any - -} while (true); ->true : boolean - -for (let x in []) { ->x : any ->[] : undefined[] - - use(x); ->use(x) : any ->use : (a: any) => any ->x : any -} - -for (const x in []) { ->x : any ->[] : undefined[] - - use(x); ->use(x) : any ->use : (a: any) => any ->x : any -} - -for (const x of []) { ->x : any ->[] : undefined[] - - use(x); ->use(x) : any ->use : (a: any) => any ->x : any -} diff --git a/tests/baselines/reference/downlevelLetConst18.errors.txt b/tests/baselines/reference/downlevelLetConst18.errors.txt index 8f30b0f802a..5d9d24a4d6d 100644 --- a/tests/baselines/reference/downlevelLetConst18.errors.txt +++ b/tests/baselines/reference/downlevelLetConst18.errors.txt @@ -1,6 +1,7 @@ tests/cases/compiler/downlevelLetConst18.ts(3,1): error TS4091: Loop contains block-scoped variable 'x' referenced by a function in the loop. This is only supported in ECMAScript 6 or higher. tests/cases/compiler/downlevelLetConst18.ts(4,14): error TS2393: Duplicate function implementation. tests/cases/compiler/downlevelLetConst18.ts(7,1): error TS4091: Loop contains block-scoped variable 'x' referenced by a function in the loop. This is only supported in ECMAScript 6 or higher. +tests/cases/compiler/downlevelLetConst18.ts(7,1): error TS7027: Unreachable code detected. tests/cases/compiler/downlevelLetConst18.ts(8,14): error TS2393: Duplicate function implementation. tests/cases/compiler/downlevelLetConst18.ts(11,1): error TS4091: Loop contains block-scoped variable 'x' referenced by a function in the loop. This is only supported in ECMAScript 6 or higher. tests/cases/compiler/downlevelLetConst18.ts(15,1): error TS4091: Loop contains block-scoped variable 'x' referenced by a function in the loop. This is only supported in ECMAScript 6 or higher. @@ -9,7 +10,7 @@ tests/cases/compiler/downlevelLetConst18.ts(23,1): error TS4091: Loop contains b tests/cases/compiler/downlevelLetConst18.ts(27,1): error TS4091: Loop contains block-scoped variable 'x' referenced by a function in the loop. This is only supported in ECMAScript 6 or higher. -==== tests/cases/compiler/downlevelLetConst18.ts (9 errors) ==== +==== tests/cases/compiler/downlevelLetConst18.ts (10 errors) ==== 'use strict' for (let x; ;) { @@ -23,6 +24,8 @@ tests/cases/compiler/downlevelLetConst18.ts(27,1): error TS4091: Loop contains b for (let x; ;) { ~~~ !!! error TS4091: Loop contains block-scoped variable 'x' referenced by a function in the loop. This is only supported in ECMAScript 6 or higher. + ~~~ +!!! error TS7027: Unreachable code detected. function foo() { x }; ~~~ !!! error TS2393: Duplicate function implementation. diff --git a/tests/baselines/reference/duplicateLabel1.errors.txt b/tests/baselines/reference/duplicateLabel1.errors.txt index b34f1f771e0..2f89b400e21 100644 --- a/tests/baselines/reference/duplicateLabel1.errors.txt +++ b/tests/baselines/reference/duplicateLabel1.errors.txt @@ -1,8 +1,11 @@ +tests/cases/compiler/duplicateLabel1.ts(1,1): error TS7028: Unused label. tests/cases/compiler/duplicateLabel1.ts(2,1): error TS1114: Duplicate label 'target' -==== tests/cases/compiler/duplicateLabel1.ts (1 errors) ==== +==== tests/cases/compiler/duplicateLabel1.ts (2 errors) ==== target: + ~~~~~~ +!!! error TS7028: Unused label. target: ~~~~~~ !!! error TS1114: Duplicate label 'target' diff --git a/tests/baselines/reference/duplicateLabel2.errors.txt b/tests/baselines/reference/duplicateLabel2.errors.txt index 307596cf4e8..f150879c010 100644 --- a/tests/baselines/reference/duplicateLabel2.errors.txt +++ b/tests/baselines/reference/duplicateLabel2.errors.txt @@ -1,8 +1,11 @@ +tests/cases/compiler/duplicateLabel2.ts(1,1): error TS7028: Unused label. tests/cases/compiler/duplicateLabel2.ts(3,3): error TS1114: Duplicate label 'target' -==== tests/cases/compiler/duplicateLabel2.ts (1 errors) ==== +==== tests/cases/compiler/duplicateLabel2.ts (2 errors) ==== target: + ~~~~~~ +!!! error TS7028: Unused label. while (true) { target: ~~~~~~ diff --git a/tests/baselines/reference/duplicateLabel3.errors.txt b/tests/baselines/reference/duplicateLabel3.errors.txt new file mode 100644 index 00000000000..f256176f1e0 --- /dev/null +++ b/tests/baselines/reference/duplicateLabel3.errors.txt @@ -0,0 +1,17 @@ +tests/cases/compiler/duplicateLabel3.ts(1,1): error TS7028: Unused label. +tests/cases/compiler/duplicateLabel3.ts(4,5): error TS7028: Unused label. + + +==== tests/cases/compiler/duplicateLabel3.ts (2 errors) ==== + target: + ~~~~~~ +!!! error TS7028: Unused label. + while (true) { + function f() { + target: + ~~~~~~ +!!! error TS7028: Unused label. + while (true) { + } + } + } \ No newline at end of file diff --git a/tests/baselines/reference/duplicateLabel3.symbols b/tests/baselines/reference/duplicateLabel3.symbols deleted file mode 100644 index 07d0ded2923..00000000000 --- a/tests/baselines/reference/duplicateLabel3.symbols +++ /dev/null @@ -1,11 +0,0 @@ -=== tests/cases/compiler/duplicateLabel3.ts === -target: -while (true) { - function f() { ->f : Symbol(f, Decl(duplicateLabel3.ts, 1, 14)) - - target: - while (true) { - } - } -} diff --git a/tests/baselines/reference/duplicateLabel3.types b/tests/baselines/reference/duplicateLabel3.types deleted file mode 100644 index 8d75b08c768..00000000000 --- a/tests/baselines/reference/duplicateLabel3.types +++ /dev/null @@ -1,18 +0,0 @@ -=== tests/cases/compiler/duplicateLabel3.ts === -target: ->target : any - -while (true) { ->true : boolean - - function f() { ->f : () => void - - target: ->target : any - - while (true) { ->true : boolean - } - } -} diff --git a/tests/baselines/reference/duplicateLabel4.errors.txt b/tests/baselines/reference/duplicateLabel4.errors.txt new file mode 100644 index 00000000000..516a4b2324b --- /dev/null +++ b/tests/baselines/reference/duplicateLabel4.errors.txt @@ -0,0 +1,16 @@ +tests/cases/compiler/duplicateLabel4.ts(1,1): error TS7028: Unused label. +tests/cases/compiler/duplicateLabel4.ts(5,1): error TS7027: Unreachable code detected. + + +==== tests/cases/compiler/duplicateLabel4.ts (2 errors) ==== + target: + ~~~~~~ +!!! error TS7028: Unused label. + while (true) { + } + + target: + ~~~~~~ +!!! error TS7027: Unreachable code detected. + while (true) { + } \ No newline at end of file diff --git a/tests/baselines/reference/duplicateLabel4.symbols b/tests/baselines/reference/duplicateLabel4.symbols deleted file mode 100644 index c671abcef35..00000000000 --- a/tests/baselines/reference/duplicateLabel4.symbols +++ /dev/null @@ -1,9 +0,0 @@ -=== tests/cases/compiler/duplicateLabel4.ts === -target: -No type information for this code.while (true) { -No type information for this code.} -No type information for this code. -No type information for this code.target: -No type information for this code.while (true) { -No type information for this code.} -No type information for this code. \ No newline at end of file diff --git a/tests/baselines/reference/duplicateLabel4.types b/tests/baselines/reference/duplicateLabel4.types deleted file mode 100644 index 9238986b582..00000000000 --- a/tests/baselines/reference/duplicateLabel4.types +++ /dev/null @@ -1,14 +0,0 @@ -=== tests/cases/compiler/duplicateLabel4.ts === -target: ->target : any - -while (true) { ->true : boolean -} - -target: ->target : any - -while (true) { ->true : boolean -} diff --git a/tests/baselines/reference/duplicateLocalVariable1.errors.txt b/tests/baselines/reference/duplicateLocalVariable1.errors.txt index e4217d4d411..890470f6c11 100644 --- a/tests/baselines/reference/duplicateLocalVariable1.errors.txt +++ b/tests/baselines/reference/duplicateLocalVariable1.errors.txt @@ -1,7 +1,9 @@ +tests/cases/compiler/duplicateLocalVariable1.ts(64,92): error TS7027: Unreachable code detected. +tests/cases/compiler/duplicateLocalVariable1.ts(65,122): error TS7027: Unreachable code detected. tests/cases/compiler/duplicateLocalVariable1.ts(185,22): error TS2403: Subsequent variable declarations must have the same type. Variable 'i' must be of type 'any', but here has type 'number'. -==== tests/cases/compiler/duplicateLocalVariable1.ts (1 errors) ==== +==== tests/cases/compiler/duplicateLocalVariable1.ts (3 errors) ==== //import FileManager = require('filemanager'); //import App = require('app'); @@ -66,7 +68,11 @@ tests/cases/compiler/duplicateLocalVariable1.ts(185,22): error TS2403: Subsequen // First 3 are for simple harness validation testRunner.addTest(new TestCase("Basic test", function () { return true; })); testRunner.addTest(new TestCase("Test for any error", function () { throw new Error(); return false; }, "")); + ~~~~~~ +!!! error TS7027: Unreachable code detected. testRunner.addTest(new TestCase("Test RegEx error message match", function () { throw new Error("Should also pass"); return false; }, "Should [also]+ pass")); + ~~~~~~ +!!! error TS7027: Unreachable code detected. testRunner.addTest(new TestCase("Test array compare true", function () { return TestRunner.arrayCompare([1, 2, 3], [1, 2, 3]); })); testRunner.addTest(new TestCase("Test array compare false", function () { return !TestRunner.arrayCompare([3, 2, 3], [1, 2, 3]); })); diff --git a/tests/baselines/reference/duplicateVariablesByScope.errors.txt b/tests/baselines/reference/duplicateVariablesByScope.errors.txt new file mode 100644 index 00000000000..e101b2b0e0d --- /dev/null +++ b/tests/baselines/reference/duplicateVariablesByScope.errors.txt @@ -0,0 +1,37 @@ +tests/cases/compiler/duplicateVariablesByScope.ts(18,9): error TS7027: Unreachable code detected. + + +==== tests/cases/compiler/duplicateVariablesByScope.ts (1 errors) ==== + // duplicate local variables are only reported at global scope + + module M { + for (var j = 0; j < 10; j++) { + } + + for (var j = 0; j < 10; j++) { + } + } + + function foo() { + var x = 2; + var x = 1; + if (true) { + var result = 1; + } + else { + var result = 2; + ~~~ +!!! error TS7027: Unreachable code detected. + } + } + + class C { + foo() { + try { + var x = 1; + } + catch (e) { + var x = 2; + } + } + } \ No newline at end of file diff --git a/tests/baselines/reference/duplicateVariablesByScope.symbols b/tests/baselines/reference/duplicateVariablesByScope.symbols deleted file mode 100644 index bc94dc9b807..00000000000 --- a/tests/baselines/reference/duplicateVariablesByScope.symbols +++ /dev/null @@ -1,56 +0,0 @@ -=== tests/cases/compiler/duplicateVariablesByScope.ts === -// duplicate local variables are only reported at global scope - -module M { ->M : Symbol(M, Decl(duplicateVariablesByScope.ts, 0, 0)) - - for (var j = 0; j < 10; j++) { ->j : Symbol(j, Decl(duplicateVariablesByScope.ts, 3, 12), Decl(duplicateVariablesByScope.ts, 6, 12)) ->j : Symbol(j, Decl(duplicateVariablesByScope.ts, 3, 12), Decl(duplicateVariablesByScope.ts, 6, 12)) ->j : Symbol(j, Decl(duplicateVariablesByScope.ts, 3, 12), Decl(duplicateVariablesByScope.ts, 6, 12)) - } - - for (var j = 0; j < 10; j++) { ->j : Symbol(j, Decl(duplicateVariablesByScope.ts, 3, 12), Decl(duplicateVariablesByScope.ts, 6, 12)) ->j : Symbol(j, Decl(duplicateVariablesByScope.ts, 3, 12), Decl(duplicateVariablesByScope.ts, 6, 12)) ->j : Symbol(j, Decl(duplicateVariablesByScope.ts, 3, 12), Decl(duplicateVariablesByScope.ts, 6, 12)) - } -} - -function foo() { ->foo : Symbol(foo, Decl(duplicateVariablesByScope.ts, 8, 1)) - - var x = 2; ->x : Symbol(x, Decl(duplicateVariablesByScope.ts, 11, 7), Decl(duplicateVariablesByScope.ts, 12, 7)) - - var x = 1; ->x : Symbol(x, Decl(duplicateVariablesByScope.ts, 11, 7), Decl(duplicateVariablesByScope.ts, 12, 7)) - - if (true) { - var result = 1; ->result : Symbol(result, Decl(duplicateVariablesByScope.ts, 14, 11), Decl(duplicateVariablesByScope.ts, 17, 11)) - } - else { - var result = 2; ->result : Symbol(result, Decl(duplicateVariablesByScope.ts, 14, 11), Decl(duplicateVariablesByScope.ts, 17, 11)) - } -} - -class C { ->C : Symbol(C, Decl(duplicateVariablesByScope.ts, 19, 1)) - - foo() { ->foo : Symbol(foo, Decl(duplicateVariablesByScope.ts, 21, 9)) - - try { - var x = 1; ->x : Symbol(x, Decl(duplicateVariablesByScope.ts, 24, 15), Decl(duplicateVariablesByScope.ts, 27, 15)) - } - catch (e) { ->e : Symbol(e, Decl(duplicateVariablesByScope.ts, 26, 15)) - - var x = 2; ->x : Symbol(x, Decl(duplicateVariablesByScope.ts, 24, 15), Decl(duplicateVariablesByScope.ts, 27, 15)) - } - } -} diff --git a/tests/baselines/reference/duplicateVariablesByScope.types b/tests/baselines/reference/duplicateVariablesByScope.types deleted file mode 100644 index 42d8cae2a3c..00000000000 --- a/tests/baselines/reference/duplicateVariablesByScope.types +++ /dev/null @@ -1,72 +0,0 @@ -=== tests/cases/compiler/duplicateVariablesByScope.ts === -// duplicate local variables are only reported at global scope - -module M { ->M : typeof M - - for (var j = 0; j < 10; j++) { ->j : number ->0 : number ->j < 10 : boolean ->j : number ->10 : number ->j++ : number ->j : number - } - - for (var j = 0; j < 10; j++) { ->j : number ->0 : number ->j < 10 : boolean ->j : number ->10 : number ->j++ : number ->j : number - } -} - -function foo() { ->foo : () => void - - var x = 2; ->x : number ->2 : number - - var x = 1; ->x : number ->1 : number - - if (true) { ->true : boolean - - var result = 1; ->result : number ->1 : number - } - else { - var result = 2; ->result : number ->2 : number - } -} - -class C { ->C : C - - foo() { ->foo : () => void - - try { - var x = 1; ->x : number ->1 : number - } - catch (e) { ->e : any - - var x = 2; ->x : number ->2 : number - } - } -} diff --git a/tests/baselines/reference/es6ClassSuperCodegenBug.errors.txt b/tests/baselines/reference/es6ClassSuperCodegenBug.errors.txt new file mode 100644 index 00000000000..f30719a2792 --- /dev/null +++ b/tests/baselines/reference/es6ClassSuperCodegenBug.errors.txt @@ -0,0 +1,19 @@ +tests/cases/compiler/es6ClassSuperCodegenBug.ts(9,10): error TS7027: Unreachable code detected. + + +==== tests/cases/compiler/es6ClassSuperCodegenBug.ts (1 errors) ==== + class A { + constructor(str1:string, str2:string) {} + } + class B extends A { + constructor() { + if (true) { + super('a1', 'b1'); + } else { + super('a2', 'b2'); + ~~~~~ +!!! error TS7027: Unreachable code detected. + } + } + } + \ No newline at end of file diff --git a/tests/baselines/reference/es6ClassSuperCodegenBug.symbols b/tests/baselines/reference/es6ClassSuperCodegenBug.symbols deleted file mode 100644 index d520ec3ceb1..00000000000 --- a/tests/baselines/reference/es6ClassSuperCodegenBug.symbols +++ /dev/null @@ -1,24 +0,0 @@ -=== tests/cases/compiler/es6ClassSuperCodegenBug.ts === -class A { ->A : Symbol(A, Decl(es6ClassSuperCodegenBug.ts, 0, 0)) - - constructor(str1:string, str2:string) {} ->str1 : Symbol(str1, Decl(es6ClassSuperCodegenBug.ts, 1, 13)) ->str2 : Symbol(str2, Decl(es6ClassSuperCodegenBug.ts, 1, 25)) -} -class B extends A { ->B : Symbol(B, Decl(es6ClassSuperCodegenBug.ts, 2, 1)) ->A : Symbol(A, Decl(es6ClassSuperCodegenBug.ts, 0, 0)) - - constructor() { - if (true) { - super('a1', 'b1'); ->super : Symbol(A, Decl(es6ClassSuperCodegenBug.ts, 0, 0)) - - } else { - super('a2', 'b2'); ->super : Symbol(A, Decl(es6ClassSuperCodegenBug.ts, 0, 0)) - } - } -} - diff --git a/tests/baselines/reference/es6ClassSuperCodegenBug.types b/tests/baselines/reference/es6ClassSuperCodegenBug.types deleted file mode 100644 index bdf8ebde8f2..00000000000 --- a/tests/baselines/reference/es6ClassSuperCodegenBug.types +++ /dev/null @@ -1,32 +0,0 @@ -=== tests/cases/compiler/es6ClassSuperCodegenBug.ts === -class A { ->A : A - - constructor(str1:string, str2:string) {} ->str1 : string ->str2 : string -} -class B extends A { ->B : B ->A : A - - constructor() { - if (true) { ->true : boolean - - super('a1', 'b1'); ->super('a1', 'b1') : void ->super : typeof A ->'a1' : string ->'b1' : string - - } else { - super('a2', 'b2'); ->super('a2', 'b2') : void ->super : typeof A ->'a2' : string ->'b2' : string - } - } -} - diff --git a/tests/baselines/reference/escapedIdentifiers.errors.txt b/tests/baselines/reference/escapedIdentifiers.errors.txt new file mode 100644 index 00000000000..8f7d735ceed --- /dev/null +++ b/tests/baselines/reference/escapedIdentifiers.errors.txt @@ -0,0 +1,146 @@ +tests/cases/compiler/escapedIdentifiers.ts(93,1): error TS7028: Unused label. +tests/cases/compiler/escapedIdentifiers.ts(96,8): error TS7027: Unreachable code detected. +tests/cases/compiler/escapedIdentifiers.ts(100,1): error TS7028: Unused label. +tests/cases/compiler/escapedIdentifiers.ts(103,8): error TS7027: Unreachable code detected. +tests/cases/compiler/escapedIdentifiers.ts(107,1): error TS7028: Unused label. +tests/cases/compiler/escapedIdentifiers.ts(110,8): error TS7027: Unreachable code detected. +tests/cases/compiler/escapedIdentifiers.ts(114,1): error TS7028: Unused label. +tests/cases/compiler/escapedIdentifiers.ts(117,8): error TS7027: Unreachable code detected. + + +==== tests/cases/compiler/escapedIdentifiers.ts (8 errors) ==== + /* + 0 .. \u0030 + 9 .. \u0039 + + A .. \u0041 + Z .. \u005a + + a .. \u0061 + z .. \u00za + */ + + // var decl + var \u0061 = 1; + a ++; + \u0061 ++; + + var b = 1; + b ++; + \u0062 ++; + + // modules + module moduleType1 { + export var baz1: number; + } + module moduleType\u0032 { + export var baz2: number; + } + + moduleType1.baz1 = 3; + moduleType\u0031.baz1 = 3; + moduleType2.baz2 = 3; + moduleType\u0032.baz2 = 3; + + // classes + + class classType1 { + public foo1: number; + } + class classType\u0032 { + public foo2: number; + } + + var classType1Object1 = new classType1(); + classType1Object1.foo1 = 2; + var classType1Object2 = new classType\u0031(); + classType1Object2.foo1 = 2; + var classType2Object1 = new classType2(); + classType2Object1.foo2 = 2; + var classType2Object2 = new classType\u0032(); + classType2Object2.foo2 = 2; + + // interfaces + interface interfaceType1 { + bar1: number; + } + interface interfaceType\u0032 { + bar2: number; + } + + var interfaceType1Object1 = { bar1: 0 }; + interfaceType1Object1.bar1 = 2; + var interfaceType1Object2 = { bar1: 0 }; + interfaceType1Object2.bar1 = 2; + var interfaceType2Object1 = { bar2: 0 }; + interfaceType2Object1.bar2 = 2; + var interfaceType2Object2 = { bar2: 0 }; + interfaceType2Object2.bar2 = 2; + + + // arguments + class testClass { + public func(arg1: number, arg\u0032: string, arg\u0033: boolean, arg4: number) { + arg\u0031 = 1; + arg2 = 'string'; + arg\u0033 = true; + arg4 = 2; + } + } + + // constructors + class constructorTestClass { + constructor (public arg1: number,public arg\u0032: string,public arg\u0033: boolean,public arg4: number) { + } + } + var constructorTestObject = new constructorTestClass(1, 'string', true, 2); + constructorTestObject.arg\u0031 = 1; + constructorTestObject.arg2 = 'string'; + constructorTestObject.arg\u0033 = true; + constructorTestObject.arg4 = 2; + + // Lables + + l\u0061bel1: + ~~~~~~~~~~~ +!!! error TS7028: Unused label. + while (false) + { + while(false) + ~~~~~ +!!! error TS7027: Unreachable code detected. + continue label1; // it will go to next iteration of outer loop + } + + label2: + ~~~~~~ +!!! error TS7028: Unused label. + while (false) + { + while(false) + ~~~~~ +!!! error TS7027: Unreachable code detected. + continue l\u0061bel2; // it will go to next iteration of outer loop + } + + label3: + ~~~~~~ +!!! error TS7028: Unused label. + while (false) + { + while(false) + ~~~~~ +!!! error TS7027: Unreachable code detected. + continue label3; // it will go to next iteration of outer loop + } + + l\u0061bel4: + ~~~~~~~~~~~ +!!! error TS7028: Unused label. + while (false) + { + while(false) + ~~~~~ +!!! error TS7027: Unreachable code detected. + continue l\u0061bel4; // it will go to next iteration of outer loop + } \ No newline at end of file diff --git a/tests/baselines/reference/escapedIdentifiers.symbols b/tests/baselines/reference/escapedIdentifiers.symbols deleted file mode 100644 index 6c84b25647f..00000000000 --- a/tests/baselines/reference/escapedIdentifiers.symbols +++ /dev/null @@ -1,260 +0,0 @@ -=== tests/cases/compiler/escapedIdentifiers.ts === -/* - 0 .. \u0030 - 9 .. \u0039 - - A .. \u0041 - Z .. \u005a - - a .. \u0061 - z .. \u00za -*/ - -// var decl -var \u0061 = 1; ->\u0061 : Symbol(\u0061, Decl(escapedIdentifiers.ts, 12, 3)) - -a ++; ->a : Symbol(\u0061, Decl(escapedIdentifiers.ts, 12, 3)) - -\u0061 ++; ->\u0061 : Symbol(\u0061, Decl(escapedIdentifiers.ts, 12, 3)) - -var b = 1; ->b : Symbol(b, Decl(escapedIdentifiers.ts, 16, 3)) - -b ++; ->b : Symbol(b, Decl(escapedIdentifiers.ts, 16, 3)) - -\u0062 ++; ->\u0062 : Symbol(b, Decl(escapedIdentifiers.ts, 16, 3)) - -// modules -module moduleType1 { ->moduleType1 : Symbol(moduleType1, Decl(escapedIdentifiers.ts, 18, 10)) - - export var baz1: number; ->baz1 : Symbol(baz1, Decl(escapedIdentifiers.ts, 22, 14)) -} -module moduleType\u0032 { ->moduleType\u0032 : Symbol(moduleType\u0032, Decl(escapedIdentifiers.ts, 23, 1)) - - export var baz2: number; ->baz2 : Symbol(baz2, Decl(escapedIdentifiers.ts, 25, 14)) -} - -moduleType1.baz1 = 3; ->moduleType1.baz1 : Symbol(moduleType1.baz1, Decl(escapedIdentifiers.ts, 22, 14)) ->moduleType1 : Symbol(moduleType1, Decl(escapedIdentifiers.ts, 18, 10)) ->baz1 : Symbol(moduleType1.baz1, Decl(escapedIdentifiers.ts, 22, 14)) - -moduleType\u0031.baz1 = 3; ->moduleType\u0031.baz1 : Symbol(moduleType1.baz1, Decl(escapedIdentifiers.ts, 22, 14)) ->moduleType\u0031 : Symbol(moduleType1, Decl(escapedIdentifiers.ts, 18, 10)) ->baz1 : Symbol(moduleType1.baz1, Decl(escapedIdentifiers.ts, 22, 14)) - -moduleType2.baz2 = 3; ->moduleType2.baz2 : Symbol(moduleType\u0032.baz2, Decl(escapedIdentifiers.ts, 25, 14)) ->moduleType2 : Symbol(moduleType\u0032, Decl(escapedIdentifiers.ts, 23, 1)) ->baz2 : Symbol(moduleType\u0032.baz2, Decl(escapedIdentifiers.ts, 25, 14)) - -moduleType\u0032.baz2 = 3; ->moduleType\u0032.baz2 : Symbol(moduleType\u0032.baz2, Decl(escapedIdentifiers.ts, 25, 14)) ->moduleType\u0032 : Symbol(moduleType\u0032, Decl(escapedIdentifiers.ts, 23, 1)) ->baz2 : Symbol(moduleType\u0032.baz2, Decl(escapedIdentifiers.ts, 25, 14)) - -// classes - -class classType1 { ->classType1 : Symbol(classType1, Decl(escapedIdentifiers.ts, 31, 26)) - - public foo1: number; ->foo1 : Symbol(foo1, Decl(escapedIdentifiers.ts, 35, 18)) -} -class classType\u0032 { ->classType\u0032 : Symbol(classType\u0032, Decl(escapedIdentifiers.ts, 37, 1)) - - public foo2: number; ->foo2 : Symbol(foo2, Decl(escapedIdentifiers.ts, 38, 23)) -} - -var classType1Object1 = new classType1(); ->classType1Object1 : Symbol(classType1Object1, Decl(escapedIdentifiers.ts, 42, 3)) ->classType1 : Symbol(classType1, Decl(escapedIdentifiers.ts, 31, 26)) - -classType1Object1.foo1 = 2; ->classType1Object1.foo1 : Symbol(classType1.foo1, Decl(escapedIdentifiers.ts, 35, 18)) ->classType1Object1 : Symbol(classType1Object1, Decl(escapedIdentifiers.ts, 42, 3)) ->foo1 : Symbol(classType1.foo1, Decl(escapedIdentifiers.ts, 35, 18)) - -var classType1Object2 = new classType\u0031(); ->classType1Object2 : Symbol(classType1Object2, Decl(escapedIdentifiers.ts, 44, 3)) ->classType\u0031 : Symbol(classType1, Decl(escapedIdentifiers.ts, 31, 26)) - -classType1Object2.foo1 = 2; ->classType1Object2.foo1 : Symbol(classType1.foo1, Decl(escapedIdentifiers.ts, 35, 18)) ->classType1Object2 : Symbol(classType1Object2, Decl(escapedIdentifiers.ts, 44, 3)) ->foo1 : Symbol(classType1.foo1, Decl(escapedIdentifiers.ts, 35, 18)) - -var classType2Object1 = new classType2(); ->classType2Object1 : Symbol(classType2Object1, Decl(escapedIdentifiers.ts, 46, 3)) ->classType2 : Symbol(classType\u0032, Decl(escapedIdentifiers.ts, 37, 1)) - -classType2Object1.foo2 = 2; ->classType2Object1.foo2 : Symbol(classType\u0032.foo2, Decl(escapedIdentifiers.ts, 38, 23)) ->classType2Object1 : Symbol(classType2Object1, Decl(escapedIdentifiers.ts, 46, 3)) ->foo2 : Symbol(classType\u0032.foo2, Decl(escapedIdentifiers.ts, 38, 23)) - -var classType2Object2 = new classType\u0032(); ->classType2Object2 : Symbol(classType2Object2, Decl(escapedIdentifiers.ts, 48, 3)) ->classType\u0032 : Symbol(classType\u0032, Decl(escapedIdentifiers.ts, 37, 1)) - -classType2Object2.foo2 = 2; ->classType2Object2.foo2 : Symbol(classType\u0032.foo2, Decl(escapedIdentifiers.ts, 38, 23)) ->classType2Object2 : Symbol(classType2Object2, Decl(escapedIdentifiers.ts, 48, 3)) ->foo2 : Symbol(classType\u0032.foo2, Decl(escapedIdentifiers.ts, 38, 23)) - -// interfaces -interface interfaceType1 { ->interfaceType1 : Symbol(interfaceType1, Decl(escapedIdentifiers.ts, 49, 27)) - - bar1: number; ->bar1 : Symbol(bar1, Decl(escapedIdentifiers.ts, 52, 26)) -} -interface interfaceType\u0032 { ->interfaceType\u0032 : Symbol(interfaceType\u0032, Decl(escapedIdentifiers.ts, 54, 1)) - - bar2: number; ->bar2 : Symbol(bar2, Decl(escapedIdentifiers.ts, 55, 31)) -} - -var interfaceType1Object1 = { bar1: 0 }; ->interfaceType1Object1 : Symbol(interfaceType1Object1, Decl(escapedIdentifiers.ts, 59, 3)) ->interfaceType1 : Symbol(interfaceType1, Decl(escapedIdentifiers.ts, 49, 27)) ->bar1 : Symbol(bar1, Decl(escapedIdentifiers.ts, 59, 45)) - -interfaceType1Object1.bar1 = 2; ->interfaceType1Object1.bar1 : Symbol(interfaceType1.bar1, Decl(escapedIdentifiers.ts, 52, 26)) ->interfaceType1Object1 : Symbol(interfaceType1Object1, Decl(escapedIdentifiers.ts, 59, 3)) ->bar1 : Symbol(interfaceType1.bar1, Decl(escapedIdentifiers.ts, 52, 26)) - -var interfaceType1Object2 = { bar1: 0 }; ->interfaceType1Object2 : Symbol(interfaceType1Object2, Decl(escapedIdentifiers.ts, 61, 3)) ->interfaceType\u0031 : Symbol(interfaceType1, Decl(escapedIdentifiers.ts, 49, 27)) ->bar1 : Symbol(bar1, Decl(escapedIdentifiers.ts, 61, 50)) - -interfaceType1Object2.bar1 = 2; ->interfaceType1Object2.bar1 : Symbol(interfaceType1.bar1, Decl(escapedIdentifiers.ts, 52, 26)) ->interfaceType1Object2 : Symbol(interfaceType1Object2, Decl(escapedIdentifiers.ts, 61, 3)) ->bar1 : Symbol(interfaceType1.bar1, Decl(escapedIdentifiers.ts, 52, 26)) - -var interfaceType2Object1 = { bar2: 0 }; ->interfaceType2Object1 : Symbol(interfaceType2Object1, Decl(escapedIdentifiers.ts, 63, 3)) ->interfaceType2 : Symbol(interfaceType\u0032, Decl(escapedIdentifiers.ts, 54, 1)) ->bar2 : Symbol(bar2, Decl(escapedIdentifiers.ts, 63, 45)) - -interfaceType2Object1.bar2 = 2; ->interfaceType2Object1.bar2 : Symbol(interfaceType\u0032.bar2, Decl(escapedIdentifiers.ts, 55, 31)) ->interfaceType2Object1 : Symbol(interfaceType2Object1, Decl(escapedIdentifiers.ts, 63, 3)) ->bar2 : Symbol(interfaceType\u0032.bar2, Decl(escapedIdentifiers.ts, 55, 31)) - -var interfaceType2Object2 = { bar2: 0 }; ->interfaceType2Object2 : Symbol(interfaceType2Object2, Decl(escapedIdentifiers.ts, 65, 3)) ->interfaceType\u0032 : Symbol(interfaceType\u0032, Decl(escapedIdentifiers.ts, 54, 1)) ->bar2 : Symbol(bar2, Decl(escapedIdentifiers.ts, 65, 50)) - -interfaceType2Object2.bar2 = 2; ->interfaceType2Object2.bar2 : Symbol(interfaceType\u0032.bar2, Decl(escapedIdentifiers.ts, 55, 31)) ->interfaceType2Object2 : Symbol(interfaceType2Object2, Decl(escapedIdentifiers.ts, 65, 3)) ->bar2 : Symbol(interfaceType\u0032.bar2, Decl(escapedIdentifiers.ts, 55, 31)) - - -// arguments -class testClass { ->testClass : Symbol(testClass, Decl(escapedIdentifiers.ts, 66, 31)) - - public func(arg1: number, arg\u0032: string, arg\u0033: boolean, arg4: number) { ->func : Symbol(func, Decl(escapedIdentifiers.ts, 70, 17)) ->arg1 : Symbol(arg1, Decl(escapedIdentifiers.ts, 71, 16)) ->arg\u0032 : Symbol(arg\u0032, Decl(escapedIdentifiers.ts, 71, 29)) ->arg\u0033 : Symbol(arg\u0033, Decl(escapedIdentifiers.ts, 71, 48)) ->arg4 : Symbol(arg4, Decl(escapedIdentifiers.ts, 71, 68)) - - arg\u0031 = 1; ->arg\u0031 : Symbol(arg1, Decl(escapedIdentifiers.ts, 71, 16)) - - arg2 = 'string'; ->arg2 : Symbol(arg\u0032, Decl(escapedIdentifiers.ts, 71, 29)) - - arg\u0033 = true; ->arg\u0033 : Symbol(arg\u0033, Decl(escapedIdentifiers.ts, 71, 48)) - - arg4 = 2; ->arg4 : Symbol(arg4, Decl(escapedIdentifiers.ts, 71, 68)) - } -} - -// constructors -class constructorTestClass { ->constructorTestClass : Symbol(constructorTestClass, Decl(escapedIdentifiers.ts, 77, 1)) - - constructor (public arg1: number,public arg\u0032: string,public arg\u0033: boolean,public arg4: number) { ->arg1 : Symbol(arg1, Decl(escapedIdentifiers.ts, 81, 17)) ->arg\u0032 : Symbol(arg\u0032, Decl(escapedIdentifiers.ts, 81, 37)) ->arg\u0033 : Symbol(arg\u0033, Decl(escapedIdentifiers.ts, 81, 62)) ->arg4 : Symbol(arg4, Decl(escapedIdentifiers.ts, 81, 88)) - } -} -var constructorTestObject = new constructorTestClass(1, 'string', true, 2); ->constructorTestObject : Symbol(constructorTestObject, Decl(escapedIdentifiers.ts, 84, 3)) ->constructorTestClass : Symbol(constructorTestClass, Decl(escapedIdentifiers.ts, 77, 1)) - -constructorTestObject.arg\u0031 = 1; ->constructorTestObject.arg\u0031 : Symbol(constructorTestClass.arg1, Decl(escapedIdentifiers.ts, 81, 17)) ->constructorTestObject : Symbol(constructorTestObject, Decl(escapedIdentifiers.ts, 84, 3)) ->arg\u0031 : Symbol(constructorTestClass.arg1, Decl(escapedIdentifiers.ts, 81, 17)) - -constructorTestObject.arg2 = 'string'; ->constructorTestObject.arg2 : Symbol(constructorTestClass.arg\u0032, Decl(escapedIdentifiers.ts, 81, 37)) ->constructorTestObject : Symbol(constructorTestObject, Decl(escapedIdentifiers.ts, 84, 3)) ->arg2 : Symbol(constructorTestClass.arg\u0032, Decl(escapedIdentifiers.ts, 81, 37)) - -constructorTestObject.arg\u0033 = true; ->constructorTestObject.arg\u0033 : Symbol(constructorTestClass.arg\u0033, Decl(escapedIdentifiers.ts, 81, 62)) ->constructorTestObject : Symbol(constructorTestObject, Decl(escapedIdentifiers.ts, 84, 3)) ->arg\u0033 : Symbol(constructorTestClass.arg\u0033, Decl(escapedIdentifiers.ts, 81, 62)) - -constructorTestObject.arg4 = 2; ->constructorTestObject.arg4 : Symbol(constructorTestClass.arg4, Decl(escapedIdentifiers.ts, 81, 88)) ->constructorTestObject : Symbol(constructorTestObject, Decl(escapedIdentifiers.ts, 84, 3)) ->arg4 : Symbol(constructorTestClass.arg4, Decl(escapedIdentifiers.ts, 81, 88)) - -// Lables - -l\u0061bel1: - while (false) - { - while(false) - continue label1; // it will go to next iteration of outer loop - } - -label2: - while (false) - { - while(false) - continue l\u0061bel2; // it will go to next iteration of outer loop - } - -label3: - while (false) - { - while(false) - continue label3; // it will go to next iteration of outer loop - } - -l\u0061bel4: - while (false) - { - while(false) - continue l\u0061bel4; // it will go to next iteration of outer loop - } diff --git a/tests/baselines/reference/escapedIdentifiers.types b/tests/baselines/reference/escapedIdentifiers.types deleted file mode 100644 index b32d21a48cb..00000000000 --- a/tests/baselines/reference/escapedIdentifiers.types +++ /dev/null @@ -1,351 +0,0 @@ -=== tests/cases/compiler/escapedIdentifiers.ts === -/* - 0 .. \u0030 - 9 .. \u0039 - - A .. \u0041 - Z .. \u005a - - a .. \u0061 - z .. \u00za -*/ - -// var decl -var \u0061 = 1; ->\u0061 : number ->1 : number - -a ++; ->a ++ : number ->a : number - -\u0061 ++; ->\u0061 ++ : number ->\u0061 : number - -var b = 1; ->b : number ->1 : number - -b ++; ->b ++ : number ->b : number - -\u0062 ++; ->\u0062 ++ : number ->\u0062 : number - -// modules -module moduleType1 { ->moduleType1 : typeof moduleType1 - - export var baz1: number; ->baz1 : number -} -module moduleType\u0032 { ->moduleType\u0032 : typeof moduleType\u0032 - - export var baz2: number; ->baz2 : number -} - -moduleType1.baz1 = 3; ->moduleType1.baz1 = 3 : number ->moduleType1.baz1 : number ->moduleType1 : typeof moduleType1 ->baz1 : number ->3 : number - -moduleType\u0031.baz1 = 3; ->moduleType\u0031.baz1 = 3 : number ->moduleType\u0031.baz1 : number ->moduleType\u0031 : typeof moduleType1 ->baz1 : number ->3 : number - -moduleType2.baz2 = 3; ->moduleType2.baz2 = 3 : number ->moduleType2.baz2 : number ->moduleType2 : typeof moduleType\u0032 ->baz2 : number ->3 : number - -moduleType\u0032.baz2 = 3; ->moduleType\u0032.baz2 = 3 : number ->moduleType\u0032.baz2 : number ->moduleType\u0032 : typeof moduleType\u0032 ->baz2 : number ->3 : number - -// classes - -class classType1 { ->classType1 : classType1 - - public foo1: number; ->foo1 : number -} -class classType\u0032 { ->classType\u0032 : classType\u0032 - - public foo2: number; ->foo2 : number -} - -var classType1Object1 = new classType1(); ->classType1Object1 : classType1 ->new classType1() : classType1 ->classType1 : typeof classType1 - -classType1Object1.foo1 = 2; ->classType1Object1.foo1 = 2 : number ->classType1Object1.foo1 : number ->classType1Object1 : classType1 ->foo1 : number ->2 : number - -var classType1Object2 = new classType\u0031(); ->classType1Object2 : classType1 ->new classType\u0031() : classType1 ->classType\u0031 : typeof classType1 - -classType1Object2.foo1 = 2; ->classType1Object2.foo1 = 2 : number ->classType1Object2.foo1 : number ->classType1Object2 : classType1 ->foo1 : number ->2 : number - -var classType2Object1 = new classType2(); ->classType2Object1 : classType\u0032 ->new classType2() : classType\u0032 ->classType2 : typeof classType\u0032 - -classType2Object1.foo2 = 2; ->classType2Object1.foo2 = 2 : number ->classType2Object1.foo2 : number ->classType2Object1 : classType\u0032 ->foo2 : number ->2 : number - -var classType2Object2 = new classType\u0032(); ->classType2Object2 : classType\u0032 ->new classType\u0032() : classType\u0032 ->classType\u0032 : typeof classType\u0032 - -classType2Object2.foo2 = 2; ->classType2Object2.foo2 = 2 : number ->classType2Object2.foo2 : number ->classType2Object2 : classType\u0032 ->foo2 : number ->2 : number - -// interfaces -interface interfaceType1 { ->interfaceType1 : interfaceType1 - - bar1: number; ->bar1 : number -} -interface interfaceType\u0032 { ->interfaceType\u0032 : interfaceType\u0032 - - bar2: number; ->bar2 : number -} - -var interfaceType1Object1 = { bar1: 0 }; ->interfaceType1Object1 : interfaceType1 ->{ bar1: 0 } : interfaceType1 ->interfaceType1 : interfaceType1 ->{ bar1: 0 } : { bar1: number; } ->bar1 : number ->0 : number - -interfaceType1Object1.bar1 = 2; ->interfaceType1Object1.bar1 = 2 : number ->interfaceType1Object1.bar1 : number ->interfaceType1Object1 : interfaceType1 ->bar1 : number ->2 : number - -var interfaceType1Object2 = { bar1: 0 }; ->interfaceType1Object2 : interfaceType1 ->{ bar1: 0 } : interfaceType1 ->interfaceType\u0031 : interfaceType1 ->{ bar1: 0 } : { bar1: number; } ->bar1 : number ->0 : number - -interfaceType1Object2.bar1 = 2; ->interfaceType1Object2.bar1 = 2 : number ->interfaceType1Object2.bar1 : number ->interfaceType1Object2 : interfaceType1 ->bar1 : number ->2 : number - -var interfaceType2Object1 = { bar2: 0 }; ->interfaceType2Object1 : interfaceType\u0032 ->{ bar2: 0 } : interfaceType\u0032 ->interfaceType2 : interfaceType\u0032 ->{ bar2: 0 } : { bar2: number; } ->bar2 : number ->0 : number - -interfaceType2Object1.bar2 = 2; ->interfaceType2Object1.bar2 = 2 : number ->interfaceType2Object1.bar2 : number ->interfaceType2Object1 : interfaceType\u0032 ->bar2 : number ->2 : number - -var interfaceType2Object2 = { bar2: 0 }; ->interfaceType2Object2 : interfaceType\u0032 ->{ bar2: 0 } : interfaceType\u0032 ->interfaceType\u0032 : interfaceType\u0032 ->{ bar2: 0 } : { bar2: number; } ->bar2 : number ->0 : number - -interfaceType2Object2.bar2 = 2; ->interfaceType2Object2.bar2 = 2 : number ->interfaceType2Object2.bar2 : number ->interfaceType2Object2 : interfaceType\u0032 ->bar2 : number ->2 : number - - -// arguments -class testClass { ->testClass : testClass - - public func(arg1: number, arg\u0032: string, arg\u0033: boolean, arg4: number) { ->func : (arg1: number, arg\u0032: string, arg\u0033: boolean, arg4: number) => void ->arg1 : number ->arg\u0032 : string ->arg\u0033 : boolean ->arg4 : number - - arg\u0031 = 1; ->arg\u0031 = 1 : number ->arg\u0031 : number ->1 : number - - arg2 = 'string'; ->arg2 = 'string' : string ->arg2 : string ->'string' : string - - arg\u0033 = true; ->arg\u0033 = true : boolean ->arg\u0033 : boolean ->true : boolean - - arg4 = 2; ->arg4 = 2 : number ->arg4 : number ->2 : number - } -} - -// constructors -class constructorTestClass { ->constructorTestClass : constructorTestClass - - constructor (public arg1: number,public arg\u0032: string,public arg\u0033: boolean,public arg4: number) { ->arg1 : number ->arg\u0032 : string ->arg\u0033 : boolean ->arg4 : number - } -} -var constructorTestObject = new constructorTestClass(1, 'string', true, 2); ->constructorTestObject : constructorTestClass ->new constructorTestClass(1, 'string', true, 2) : constructorTestClass ->constructorTestClass : typeof constructorTestClass ->1 : number ->'string' : string ->true : boolean ->2 : number - -constructorTestObject.arg\u0031 = 1; ->constructorTestObject.arg\u0031 = 1 : number ->constructorTestObject.arg\u0031 : number ->constructorTestObject : constructorTestClass ->arg\u0031 : number ->1 : number - -constructorTestObject.arg2 = 'string'; ->constructorTestObject.arg2 = 'string' : string ->constructorTestObject.arg2 : string ->constructorTestObject : constructorTestClass ->arg2 : string ->'string' : string - -constructorTestObject.arg\u0033 = true; ->constructorTestObject.arg\u0033 = true : boolean ->constructorTestObject.arg\u0033 : boolean ->constructorTestObject : constructorTestClass ->arg\u0033 : boolean ->true : boolean - -constructorTestObject.arg4 = 2; ->constructorTestObject.arg4 = 2 : number ->constructorTestObject.arg4 : number ->constructorTestObject : constructorTestClass ->arg4 : number ->2 : number - -// Lables - -l\u0061bel1: ->l\u0061bel1 : any - - while (false) ->false : boolean - { - while(false) ->false : boolean - - continue label1; // it will go to next iteration of outer loop ->label1 : any - } - -label2: ->label2 : any - - while (false) ->false : boolean - { - while(false) ->false : boolean - - continue l\u0061bel2; // it will go to next iteration of outer loop ->l\u0061bel2 : any - } - -label3: ->label3 : any - - while (false) ->false : boolean - { - while(false) ->false : boolean - - continue label3; // it will go to next iteration of outer loop ->label3 : any - } - -l\u0061bel4: ->l\u0061bel4 : any - - while (false) ->false : boolean - { - while(false) ->false : boolean - - continue l\u0061bel4; // it will go to next iteration of outer loop ->l\u0061bel4 : any - } diff --git a/tests/baselines/reference/for.errors.txt b/tests/baselines/reference/for.errors.txt index 41ed5765c9a..34de6a4b114 100644 --- a/tests/baselines/reference/for.errors.txt +++ b/tests/baselines/reference/for.errors.txt @@ -1,7 +1,8 @@ +tests/cases/compiler/for.ts(29,1): error TS7027: Unreachable code detected. tests/cases/compiler/for.ts(29,6): error TS1109: Expression expected. -==== tests/cases/compiler/for.ts (1 errors) ==== +==== tests/cases/compiler/for.ts (2 errors) ==== for (var i = 0; i < 10; i++) { // ok var x1 = i; } @@ -31,6 +32,8 @@ tests/cases/compiler/for.ts(29,6): error TS1109: Expression expected. } for () { // error + ~~~ +!!! error TS7027: Unreachable code detected. ~ !!! error TS1109: Expression expected. } \ No newline at end of file diff --git a/tests/baselines/reference/forBreakStatements.errors.txt b/tests/baselines/reference/forBreakStatements.errors.txt new file mode 100644 index 00000000000..2b42afc9be2 --- /dev/null +++ b/tests/baselines/reference/forBreakStatements.errors.txt @@ -0,0 +1,49 @@ +tests/cases/conformance/statements/breakStatements/forBreakStatements.ts(10,1): error TS7028: Unused label. +tests/cases/conformance/statements/breakStatements/forBreakStatements.ts(18,5): error TS7028: Unused label. +tests/cases/conformance/statements/breakStatements/forBreakStatements.ts(29,1): error TS7027: Unreachable code detected. + + +==== tests/cases/conformance/statements/breakStatements/forBreakStatements.ts (3 errors) ==== + for (; ;) { + break; + } + + ONE: + for (; ;) { + break ONE; + } + + TWO: + ~~~ +!!! error TS7028: Unused label. + THREE: + for (; ;) { + break THREE; + } + + FOUR: + for (; ;) { + FIVE: + ~~~~ +!!! error TS7028: Unused label. + for (; ;) { + break FOUR; + } + } + + for (; ;) { + SIX: + for (; ;) break SIX; + } + + SEVEN: + ~~~~~ +!!! error TS7027: Unreachable code detected. + for (; ;) for (; ;) for (; ;) break SEVEN; + + EIGHT: + for (; ;) { + var fn = function () { } + break EIGHT; + } + \ No newline at end of file diff --git a/tests/baselines/reference/forBreakStatements.symbols b/tests/baselines/reference/forBreakStatements.symbols deleted file mode 100644 index 76db9309a39..00000000000 --- a/tests/baselines/reference/forBreakStatements.symbols +++ /dev/null @@ -1,40 +0,0 @@ -=== tests/cases/conformance/statements/breakStatements/forBreakStatements.ts === -for (; ;) { - break; -} - -ONE: -for (; ;) { - break ONE; -} - -TWO: -THREE: -for (; ;) { - break THREE; -} - -FOUR: -for (; ;) { - FIVE: - for (; ;) { - break FOUR; - } -} - -for (; ;) { - SIX: - for (; ;) break SIX; -} - -SEVEN: -for (; ;) for (; ;) for (; ;) break SEVEN; - -EIGHT: -for (; ;) { - var fn = function () { } ->fn : Symbol(fn, Decl(forBreakStatements.ts, 33, 7)) - - break EIGHT; -} - diff --git a/tests/baselines/reference/forBreakStatements.types b/tests/baselines/reference/forBreakStatements.types deleted file mode 100644 index 8469a85bd19..00000000000 --- a/tests/baselines/reference/forBreakStatements.types +++ /dev/null @@ -1,63 +0,0 @@ -=== tests/cases/conformance/statements/breakStatements/forBreakStatements.ts === -for (; ;) { - break; -} - -ONE: ->ONE : any - -for (; ;) { - break ONE; ->ONE : any -} - -TWO: ->TWO : any - -THREE: ->THREE : any - -for (; ;) { - break THREE; ->THREE : any -} - -FOUR: ->FOUR : any - -for (; ;) { - FIVE: ->FIVE : any - - for (; ;) { - break FOUR; ->FOUR : any - } -} - -for (; ;) { - SIX: ->SIX : any - - for (; ;) break SIX; ->SIX : any -} - -SEVEN: ->SEVEN : any - -for (; ;) for (; ;) for (; ;) break SEVEN; ->SEVEN : any - -EIGHT: ->EIGHT : any - -for (; ;) { - var fn = function () { } ->fn : () => void ->function () { } : () => void - - break EIGHT; ->EIGHT : any -} - diff --git a/tests/baselines/reference/forContinueStatements.errors.txt b/tests/baselines/reference/forContinueStatements.errors.txt new file mode 100644 index 00000000000..b7a4cc35546 --- /dev/null +++ b/tests/baselines/reference/forContinueStatements.errors.txt @@ -0,0 +1,43 @@ +tests/cases/conformance/statements/continueStatements/forContinueStatements.ts(5,1): error TS7027: Unreachable code detected. + + +==== tests/cases/conformance/statements/continueStatements/forContinueStatements.ts (1 errors) ==== + for (; ;) { + continue; + } + + ONE: + ~~~ +!!! error TS7027: Unreachable code detected. + for (; ;) { + continue ONE; + } + + TWO: + THREE: + for (; ;) { + continue THREE; + } + + FOUR: + for (; ;) { + FIVE: + for (; ;) { + continue FOUR; + } + } + + for (; ;) { + SIX: + for (; ;) continue SIX; + } + + SEVEN: + for (; ;) for (; ;) for (; ;) continue SEVEN; + + EIGHT: + for (; ;) { + var fn = function () { } + continue EIGHT; + } + \ No newline at end of file diff --git a/tests/baselines/reference/forContinueStatements.symbols b/tests/baselines/reference/forContinueStatements.symbols deleted file mode 100644 index e24eb2aaa92..00000000000 --- a/tests/baselines/reference/forContinueStatements.symbols +++ /dev/null @@ -1,40 +0,0 @@ -=== tests/cases/conformance/statements/continueStatements/forContinueStatements.ts === -for (; ;) { - continue; -} - -ONE: -for (; ;) { - continue ONE; -} - -TWO: -THREE: -for (; ;) { - continue THREE; -} - -FOUR: -for (; ;) { - FIVE: - for (; ;) { - continue FOUR; - } -} - -for (; ;) { - SIX: - for (; ;) continue SIX; -} - -SEVEN: -for (; ;) for (; ;) for (; ;) continue SEVEN; - -EIGHT: -for (; ;) { - var fn = function () { } ->fn : Symbol(fn, Decl(forContinueStatements.ts, 33, 7)) - - continue EIGHT; -} - diff --git a/tests/baselines/reference/forContinueStatements.types b/tests/baselines/reference/forContinueStatements.types deleted file mode 100644 index 79b78e83345..00000000000 --- a/tests/baselines/reference/forContinueStatements.types +++ /dev/null @@ -1,63 +0,0 @@ -=== tests/cases/conformance/statements/continueStatements/forContinueStatements.ts === -for (; ;) { - continue; -} - -ONE: ->ONE : any - -for (; ;) { - continue ONE; ->ONE : any -} - -TWO: ->TWO : any - -THREE: ->THREE : any - -for (; ;) { - continue THREE; ->THREE : any -} - -FOUR: ->FOUR : any - -for (; ;) { - FIVE: ->FIVE : any - - for (; ;) { - continue FOUR; ->FOUR : any - } -} - -for (; ;) { - SIX: ->SIX : any - - for (; ;) continue SIX; ->SIX : any -} - -SEVEN: ->SEVEN : any - -for (; ;) for (; ;) for (; ;) continue SEVEN; ->SEVEN : any - -EIGHT: ->EIGHT : any - -for (; ;) { - var fn = function () { } ->fn : () => void ->function () { } : () => void - - continue EIGHT; ->EIGHT : any -} - diff --git a/tests/baselines/reference/forInBreakStatements.errors.txt b/tests/baselines/reference/forInBreakStatements.errors.txt new file mode 100644 index 00000000000..8bbbf2d38ee --- /dev/null +++ b/tests/baselines/reference/forInBreakStatements.errors.txt @@ -0,0 +1,46 @@ +tests/cases/conformance/statements/breakStatements/forInBreakStatements.ts(10,1): error TS7028: Unused label. +tests/cases/conformance/statements/breakStatements/forInBreakStatements.ts(18,5): error TS7028: Unused label. + + +==== tests/cases/conformance/statements/breakStatements/forInBreakStatements.ts (2 errors) ==== + for(var x in {}) { + break; + } + + ONE: + for(var x in {}) { + break ONE; + } + + TWO: + ~~~ +!!! error TS7028: Unused label. + THREE: + for(var x in {}) { + break THREE; + } + + FOUR: + for(var x in {}) { + FIVE: + ~~~~ +!!! error TS7028: Unused label. + for(var x in {}) { + break FOUR; + } + } + + for(var x in {}) { + SIX: + for(var x in {}) break SIX; + } + + SEVEN: + for (var x in {}) for (var x in {}) for (var x in {}) break SEVEN; + + EIGHT: + for (var x in {}){ + var fn = function () { } + break EIGHT; + } + \ No newline at end of file diff --git a/tests/baselines/reference/forInBreakStatements.symbols b/tests/baselines/reference/forInBreakStatements.symbols deleted file mode 100644 index 7984edc3fd6..00000000000 --- a/tests/baselines/reference/forInBreakStatements.symbols +++ /dev/null @@ -1,58 +0,0 @@ -=== tests/cases/conformance/statements/breakStatements/forInBreakStatements.ts === -for(var x in {}) { ->x : Symbol(x, Decl(forInBreakStatements.ts, 0, 7), Decl(forInBreakStatements.ts, 5, 7), Decl(forInBreakStatements.ts, 11, 7), Decl(forInBreakStatements.ts, 16, 7), Decl(forInBreakStatements.ts, 18, 11), Decl(forInBreakStatements.ts, 23, 7), Decl(forInBreakStatements.ts, 25, 11), Decl(forInBreakStatements.ts, 29, 8), Decl(forInBreakStatements.ts, 29, 26), Decl(forInBreakStatements.ts, 29, 44), Decl(forInBreakStatements.ts, 32, 8)) - - break; -} - -ONE: -for(var x in {}) { ->x : Symbol(x, Decl(forInBreakStatements.ts, 0, 7), Decl(forInBreakStatements.ts, 5, 7), Decl(forInBreakStatements.ts, 11, 7), Decl(forInBreakStatements.ts, 16, 7), Decl(forInBreakStatements.ts, 18, 11), Decl(forInBreakStatements.ts, 23, 7), Decl(forInBreakStatements.ts, 25, 11), Decl(forInBreakStatements.ts, 29, 8), Decl(forInBreakStatements.ts, 29, 26), Decl(forInBreakStatements.ts, 29, 44), Decl(forInBreakStatements.ts, 32, 8)) - - break ONE; -} - -TWO: -THREE: -for(var x in {}) { ->x : Symbol(x, Decl(forInBreakStatements.ts, 0, 7), Decl(forInBreakStatements.ts, 5, 7), Decl(forInBreakStatements.ts, 11, 7), Decl(forInBreakStatements.ts, 16, 7), Decl(forInBreakStatements.ts, 18, 11), Decl(forInBreakStatements.ts, 23, 7), Decl(forInBreakStatements.ts, 25, 11), Decl(forInBreakStatements.ts, 29, 8), Decl(forInBreakStatements.ts, 29, 26), Decl(forInBreakStatements.ts, 29, 44), Decl(forInBreakStatements.ts, 32, 8)) - - break THREE; -} - -FOUR: -for(var x in {}) { ->x : Symbol(x, Decl(forInBreakStatements.ts, 0, 7), Decl(forInBreakStatements.ts, 5, 7), Decl(forInBreakStatements.ts, 11, 7), Decl(forInBreakStatements.ts, 16, 7), Decl(forInBreakStatements.ts, 18, 11), Decl(forInBreakStatements.ts, 23, 7), Decl(forInBreakStatements.ts, 25, 11), Decl(forInBreakStatements.ts, 29, 8), Decl(forInBreakStatements.ts, 29, 26), Decl(forInBreakStatements.ts, 29, 44), Decl(forInBreakStatements.ts, 32, 8)) - - FIVE: - for(var x in {}) { ->x : Symbol(x, Decl(forInBreakStatements.ts, 0, 7), Decl(forInBreakStatements.ts, 5, 7), Decl(forInBreakStatements.ts, 11, 7), Decl(forInBreakStatements.ts, 16, 7), Decl(forInBreakStatements.ts, 18, 11), Decl(forInBreakStatements.ts, 23, 7), Decl(forInBreakStatements.ts, 25, 11), Decl(forInBreakStatements.ts, 29, 8), Decl(forInBreakStatements.ts, 29, 26), Decl(forInBreakStatements.ts, 29, 44), Decl(forInBreakStatements.ts, 32, 8)) - - break FOUR; - } -} - -for(var x in {}) { ->x : Symbol(x, Decl(forInBreakStatements.ts, 0, 7), Decl(forInBreakStatements.ts, 5, 7), Decl(forInBreakStatements.ts, 11, 7), Decl(forInBreakStatements.ts, 16, 7), Decl(forInBreakStatements.ts, 18, 11), Decl(forInBreakStatements.ts, 23, 7), Decl(forInBreakStatements.ts, 25, 11), Decl(forInBreakStatements.ts, 29, 8), Decl(forInBreakStatements.ts, 29, 26), Decl(forInBreakStatements.ts, 29, 44), Decl(forInBreakStatements.ts, 32, 8)) - - SIX: - for(var x in {}) break SIX; ->x : Symbol(x, Decl(forInBreakStatements.ts, 0, 7), Decl(forInBreakStatements.ts, 5, 7), Decl(forInBreakStatements.ts, 11, 7), Decl(forInBreakStatements.ts, 16, 7), Decl(forInBreakStatements.ts, 18, 11), Decl(forInBreakStatements.ts, 23, 7), Decl(forInBreakStatements.ts, 25, 11), Decl(forInBreakStatements.ts, 29, 8), Decl(forInBreakStatements.ts, 29, 26), Decl(forInBreakStatements.ts, 29, 44), Decl(forInBreakStatements.ts, 32, 8)) -} - -SEVEN: -for (var x in {}) for (var x in {}) for (var x in {}) break SEVEN; ->x : Symbol(x, Decl(forInBreakStatements.ts, 0, 7), Decl(forInBreakStatements.ts, 5, 7), Decl(forInBreakStatements.ts, 11, 7), Decl(forInBreakStatements.ts, 16, 7), Decl(forInBreakStatements.ts, 18, 11), Decl(forInBreakStatements.ts, 23, 7), Decl(forInBreakStatements.ts, 25, 11), Decl(forInBreakStatements.ts, 29, 8), Decl(forInBreakStatements.ts, 29, 26), Decl(forInBreakStatements.ts, 29, 44), Decl(forInBreakStatements.ts, 32, 8)) ->x : Symbol(x, Decl(forInBreakStatements.ts, 0, 7), Decl(forInBreakStatements.ts, 5, 7), Decl(forInBreakStatements.ts, 11, 7), Decl(forInBreakStatements.ts, 16, 7), Decl(forInBreakStatements.ts, 18, 11), Decl(forInBreakStatements.ts, 23, 7), Decl(forInBreakStatements.ts, 25, 11), Decl(forInBreakStatements.ts, 29, 8), Decl(forInBreakStatements.ts, 29, 26), Decl(forInBreakStatements.ts, 29, 44), Decl(forInBreakStatements.ts, 32, 8)) ->x : Symbol(x, Decl(forInBreakStatements.ts, 0, 7), Decl(forInBreakStatements.ts, 5, 7), Decl(forInBreakStatements.ts, 11, 7), Decl(forInBreakStatements.ts, 16, 7), Decl(forInBreakStatements.ts, 18, 11), Decl(forInBreakStatements.ts, 23, 7), Decl(forInBreakStatements.ts, 25, 11), Decl(forInBreakStatements.ts, 29, 8), Decl(forInBreakStatements.ts, 29, 26), Decl(forInBreakStatements.ts, 29, 44), Decl(forInBreakStatements.ts, 32, 8)) - -EIGHT: -for (var x in {}){ ->x : Symbol(x, Decl(forInBreakStatements.ts, 0, 7), Decl(forInBreakStatements.ts, 5, 7), Decl(forInBreakStatements.ts, 11, 7), Decl(forInBreakStatements.ts, 16, 7), Decl(forInBreakStatements.ts, 18, 11), Decl(forInBreakStatements.ts, 23, 7), Decl(forInBreakStatements.ts, 25, 11), Decl(forInBreakStatements.ts, 29, 8), Decl(forInBreakStatements.ts, 29, 26), Decl(forInBreakStatements.ts, 29, 44), Decl(forInBreakStatements.ts, 32, 8)) - - var fn = function () { } ->fn : Symbol(fn, Decl(forInBreakStatements.ts, 33, 7)) - - break EIGHT; -} - diff --git a/tests/baselines/reference/forInBreakStatements.types b/tests/baselines/reference/forInBreakStatements.types deleted file mode 100644 index 05ea8e35feb..00000000000 --- a/tests/baselines/reference/forInBreakStatements.types +++ /dev/null @@ -1,92 +0,0 @@ -=== tests/cases/conformance/statements/breakStatements/forInBreakStatements.ts === -for(var x in {}) { ->x : any ->{} : {} - - break; -} - -ONE: ->ONE : any - -for(var x in {}) { ->x : any ->{} : {} - - break ONE; ->ONE : any -} - -TWO: ->TWO : any - -THREE: ->THREE : any - -for(var x in {}) { ->x : any ->{} : {} - - break THREE; ->THREE : any -} - -FOUR: ->FOUR : any - -for(var x in {}) { ->x : any ->{} : {} - - FIVE: ->FIVE : any - - for(var x in {}) { ->x : any ->{} : {} - - break FOUR; ->FOUR : any - } -} - -for(var x in {}) { ->x : any ->{} : {} - - SIX: ->SIX : any - - for(var x in {}) break SIX; ->x : any ->{} : {} ->SIX : any -} - -SEVEN: ->SEVEN : any - -for (var x in {}) for (var x in {}) for (var x in {}) break SEVEN; ->x : any ->{} : {} ->x : any ->{} : {} ->x : any ->{} : {} ->SEVEN : any - -EIGHT: ->EIGHT : any - -for (var x in {}){ ->x : any ->{} : {} - - var fn = function () { } ->fn : () => void ->function () { } : () => void - - break EIGHT; ->EIGHT : any -} - diff --git a/tests/baselines/reference/forInContinueStatements.errors.txt b/tests/baselines/reference/forInContinueStatements.errors.txt new file mode 100644 index 00000000000..7a3a74e5aee --- /dev/null +++ b/tests/baselines/reference/forInContinueStatements.errors.txt @@ -0,0 +1,46 @@ +tests/cases/conformance/statements/continueStatements/forInContinueStatements.ts(10,1): error TS7028: Unused label. +tests/cases/conformance/statements/continueStatements/forInContinueStatements.ts(18,5): error TS7028: Unused label. + + +==== tests/cases/conformance/statements/continueStatements/forInContinueStatements.ts (2 errors) ==== + for(var x in {}) { + continue; + } + + ONE: + for(var x in {}) { + continue ONE; + } + + TWO: + ~~~ +!!! error TS7028: Unused label. + THREE: + for(var x in {}) { + continue THREE; + } + + FOUR: + for(var x in {}) { + FIVE: + ~~~~ +!!! error TS7028: Unused label. + for(var x in {}) { + continue FOUR; + } + } + + for(var x in {}) { + SIX: + for(var x in {}) continue SIX; + } + + SEVEN: + for (var x in {}) for (var x in {}) for (var x in {}) continue SEVEN; + + EIGHT: + for (var x in {}){ + var fn = function () { } + continue EIGHT; + } + \ No newline at end of file diff --git a/tests/baselines/reference/forInContinueStatements.symbols b/tests/baselines/reference/forInContinueStatements.symbols deleted file mode 100644 index 88129a50d21..00000000000 --- a/tests/baselines/reference/forInContinueStatements.symbols +++ /dev/null @@ -1,58 +0,0 @@ -=== tests/cases/conformance/statements/continueStatements/forInContinueStatements.ts === -for(var x in {}) { ->x : Symbol(x, Decl(forInContinueStatements.ts, 0, 7), Decl(forInContinueStatements.ts, 5, 7), Decl(forInContinueStatements.ts, 11, 7), Decl(forInContinueStatements.ts, 16, 7), Decl(forInContinueStatements.ts, 18, 11), Decl(forInContinueStatements.ts, 23, 7), Decl(forInContinueStatements.ts, 25, 11), Decl(forInContinueStatements.ts, 29, 8), Decl(forInContinueStatements.ts, 29, 26), Decl(forInContinueStatements.ts, 29, 44), Decl(forInContinueStatements.ts, 32, 8)) - - continue; -} - -ONE: -for(var x in {}) { ->x : Symbol(x, Decl(forInContinueStatements.ts, 0, 7), Decl(forInContinueStatements.ts, 5, 7), Decl(forInContinueStatements.ts, 11, 7), Decl(forInContinueStatements.ts, 16, 7), Decl(forInContinueStatements.ts, 18, 11), Decl(forInContinueStatements.ts, 23, 7), Decl(forInContinueStatements.ts, 25, 11), Decl(forInContinueStatements.ts, 29, 8), Decl(forInContinueStatements.ts, 29, 26), Decl(forInContinueStatements.ts, 29, 44), Decl(forInContinueStatements.ts, 32, 8)) - - continue ONE; -} - -TWO: -THREE: -for(var x in {}) { ->x : Symbol(x, Decl(forInContinueStatements.ts, 0, 7), Decl(forInContinueStatements.ts, 5, 7), Decl(forInContinueStatements.ts, 11, 7), Decl(forInContinueStatements.ts, 16, 7), Decl(forInContinueStatements.ts, 18, 11), Decl(forInContinueStatements.ts, 23, 7), Decl(forInContinueStatements.ts, 25, 11), Decl(forInContinueStatements.ts, 29, 8), Decl(forInContinueStatements.ts, 29, 26), Decl(forInContinueStatements.ts, 29, 44), Decl(forInContinueStatements.ts, 32, 8)) - - continue THREE; -} - -FOUR: -for(var x in {}) { ->x : Symbol(x, Decl(forInContinueStatements.ts, 0, 7), Decl(forInContinueStatements.ts, 5, 7), Decl(forInContinueStatements.ts, 11, 7), Decl(forInContinueStatements.ts, 16, 7), Decl(forInContinueStatements.ts, 18, 11), Decl(forInContinueStatements.ts, 23, 7), Decl(forInContinueStatements.ts, 25, 11), Decl(forInContinueStatements.ts, 29, 8), Decl(forInContinueStatements.ts, 29, 26), Decl(forInContinueStatements.ts, 29, 44), Decl(forInContinueStatements.ts, 32, 8)) - - FIVE: - for(var x in {}) { ->x : Symbol(x, Decl(forInContinueStatements.ts, 0, 7), Decl(forInContinueStatements.ts, 5, 7), Decl(forInContinueStatements.ts, 11, 7), Decl(forInContinueStatements.ts, 16, 7), Decl(forInContinueStatements.ts, 18, 11), Decl(forInContinueStatements.ts, 23, 7), Decl(forInContinueStatements.ts, 25, 11), Decl(forInContinueStatements.ts, 29, 8), Decl(forInContinueStatements.ts, 29, 26), Decl(forInContinueStatements.ts, 29, 44), Decl(forInContinueStatements.ts, 32, 8)) - - continue FOUR; - } -} - -for(var x in {}) { ->x : Symbol(x, Decl(forInContinueStatements.ts, 0, 7), Decl(forInContinueStatements.ts, 5, 7), Decl(forInContinueStatements.ts, 11, 7), Decl(forInContinueStatements.ts, 16, 7), Decl(forInContinueStatements.ts, 18, 11), Decl(forInContinueStatements.ts, 23, 7), Decl(forInContinueStatements.ts, 25, 11), Decl(forInContinueStatements.ts, 29, 8), Decl(forInContinueStatements.ts, 29, 26), Decl(forInContinueStatements.ts, 29, 44), Decl(forInContinueStatements.ts, 32, 8)) - - SIX: - for(var x in {}) continue SIX; ->x : Symbol(x, Decl(forInContinueStatements.ts, 0, 7), Decl(forInContinueStatements.ts, 5, 7), Decl(forInContinueStatements.ts, 11, 7), Decl(forInContinueStatements.ts, 16, 7), Decl(forInContinueStatements.ts, 18, 11), Decl(forInContinueStatements.ts, 23, 7), Decl(forInContinueStatements.ts, 25, 11), Decl(forInContinueStatements.ts, 29, 8), Decl(forInContinueStatements.ts, 29, 26), Decl(forInContinueStatements.ts, 29, 44), Decl(forInContinueStatements.ts, 32, 8)) -} - -SEVEN: -for (var x in {}) for (var x in {}) for (var x in {}) continue SEVEN; ->x : Symbol(x, Decl(forInContinueStatements.ts, 0, 7), Decl(forInContinueStatements.ts, 5, 7), Decl(forInContinueStatements.ts, 11, 7), Decl(forInContinueStatements.ts, 16, 7), Decl(forInContinueStatements.ts, 18, 11), Decl(forInContinueStatements.ts, 23, 7), Decl(forInContinueStatements.ts, 25, 11), Decl(forInContinueStatements.ts, 29, 8), Decl(forInContinueStatements.ts, 29, 26), Decl(forInContinueStatements.ts, 29, 44), Decl(forInContinueStatements.ts, 32, 8)) ->x : Symbol(x, Decl(forInContinueStatements.ts, 0, 7), Decl(forInContinueStatements.ts, 5, 7), Decl(forInContinueStatements.ts, 11, 7), Decl(forInContinueStatements.ts, 16, 7), Decl(forInContinueStatements.ts, 18, 11), Decl(forInContinueStatements.ts, 23, 7), Decl(forInContinueStatements.ts, 25, 11), Decl(forInContinueStatements.ts, 29, 8), Decl(forInContinueStatements.ts, 29, 26), Decl(forInContinueStatements.ts, 29, 44), Decl(forInContinueStatements.ts, 32, 8)) ->x : Symbol(x, Decl(forInContinueStatements.ts, 0, 7), Decl(forInContinueStatements.ts, 5, 7), Decl(forInContinueStatements.ts, 11, 7), Decl(forInContinueStatements.ts, 16, 7), Decl(forInContinueStatements.ts, 18, 11), Decl(forInContinueStatements.ts, 23, 7), Decl(forInContinueStatements.ts, 25, 11), Decl(forInContinueStatements.ts, 29, 8), Decl(forInContinueStatements.ts, 29, 26), Decl(forInContinueStatements.ts, 29, 44), Decl(forInContinueStatements.ts, 32, 8)) - -EIGHT: -for (var x in {}){ ->x : Symbol(x, Decl(forInContinueStatements.ts, 0, 7), Decl(forInContinueStatements.ts, 5, 7), Decl(forInContinueStatements.ts, 11, 7), Decl(forInContinueStatements.ts, 16, 7), Decl(forInContinueStatements.ts, 18, 11), Decl(forInContinueStatements.ts, 23, 7), Decl(forInContinueStatements.ts, 25, 11), Decl(forInContinueStatements.ts, 29, 8), Decl(forInContinueStatements.ts, 29, 26), Decl(forInContinueStatements.ts, 29, 44), Decl(forInContinueStatements.ts, 32, 8)) - - var fn = function () { } ->fn : Symbol(fn, Decl(forInContinueStatements.ts, 33, 7)) - - continue EIGHT; -} - diff --git a/tests/baselines/reference/forInContinueStatements.types b/tests/baselines/reference/forInContinueStatements.types deleted file mode 100644 index 95637345fa6..00000000000 --- a/tests/baselines/reference/forInContinueStatements.types +++ /dev/null @@ -1,92 +0,0 @@ -=== tests/cases/conformance/statements/continueStatements/forInContinueStatements.ts === -for(var x in {}) { ->x : any ->{} : {} - - continue; -} - -ONE: ->ONE : any - -for(var x in {}) { ->x : any ->{} : {} - - continue ONE; ->ONE : any -} - -TWO: ->TWO : any - -THREE: ->THREE : any - -for(var x in {}) { ->x : any ->{} : {} - - continue THREE; ->THREE : any -} - -FOUR: ->FOUR : any - -for(var x in {}) { ->x : any ->{} : {} - - FIVE: ->FIVE : any - - for(var x in {}) { ->x : any ->{} : {} - - continue FOUR; ->FOUR : any - } -} - -for(var x in {}) { ->x : any ->{} : {} - - SIX: ->SIX : any - - for(var x in {}) continue SIX; ->x : any ->{} : {} ->SIX : any -} - -SEVEN: ->SEVEN : any - -for (var x in {}) for (var x in {}) for (var x in {}) continue SEVEN; ->x : any ->{} : {} ->x : any ->{} : {} ->x : any ->{} : {} ->SEVEN : any - -EIGHT: ->EIGHT : any - -for (var x in {}){ ->x : any ->{} : {} - - var fn = function () { } ->fn : () => void ->function () { } : () => void - - continue EIGHT; ->EIGHT : any -} - diff --git a/tests/baselines/reference/forStatements.errors.txt b/tests/baselines/reference/forStatements.errors.txt new file mode 100644 index 00000000000..5f1e6f10c79 --- /dev/null +++ b/tests/baselines/reference/forStatements.errors.txt @@ -0,0 +1,52 @@ +tests/cases/conformance/statements/forStatements/forStatements.ts(26,1): error TS7027: Unreachable code detected. + + +==== tests/cases/conformance/statements/forStatements/forStatements.ts (1 errors) ==== + interface I { + id: number; + } + + class C implements I { + id: number; + } + + class D{ + source: T; + recurse: D; + wrapped: D> + } + + function F(x: string): number { return 42; } + + module M { + export class A { + name: string; + } + + export function F2(x: number): string { return x.toString(); } + } + + for(var aNumber: number = 9.9;;){} + for(var aString: string = 'this is a string';;){} + ~~~ +!!! error TS7027: Unreachable code detected. + for(var aDate: Date = new Date(12);;){} + for(var anObject: Object = new Object();;){} + + for(var anAny: any = null;;){} + for(var aSecondAny: any = undefined;;){} + for(var aVoid: void = undefined;;){} + + for(var anInterface: I = new C();;){} + for(var aClass: C = new C();;){} + for(var aGenericClass: D = new D();;){} + for(var anObjectLiteral: I = { id: 12 };;){} + for(var anOtherObjectLiteral: { id: number } = new C();;){} + + for(var aFunction: typeof F = F;;){} + for(var anOtherFunction: (x: string) => number = F;;){} + for(var aLambda: typeof F = (x) => 2;;){} + + for(var aModule: typeof M = M;;){} + for(var aClassInModule: M.A = new M.A();;){} + for(var aFunctionInModule: typeof M.F2 = (x) => 'this is a string';;){} \ No newline at end of file diff --git a/tests/baselines/reference/forStatements.symbols b/tests/baselines/reference/forStatements.symbols deleted file mode 100644 index 6f7c6d6cdbe..00000000000 --- a/tests/baselines/reference/forStatements.symbols +++ /dev/null @@ -1,145 +0,0 @@ -=== tests/cases/conformance/statements/forStatements/forStatements.ts === -interface I { ->I : Symbol(I, Decl(forStatements.ts, 0, 0)) - - id: number; ->id : Symbol(id, Decl(forStatements.ts, 0, 13)) -} - -class C implements I { ->C : Symbol(C, Decl(forStatements.ts, 2, 1)) ->I : Symbol(I, Decl(forStatements.ts, 0, 0)) - - id: number; ->id : Symbol(id, Decl(forStatements.ts, 4, 22)) -} - -class D{ ->D : Symbol(D, Decl(forStatements.ts, 6, 1)) ->T : Symbol(T, Decl(forStatements.ts, 8, 8)) - - source: T; ->source : Symbol(source, Decl(forStatements.ts, 8, 11)) ->T : Symbol(T, Decl(forStatements.ts, 8, 8)) - - recurse: D; ->recurse : Symbol(recurse, Decl(forStatements.ts, 9, 14)) ->D : Symbol(D, Decl(forStatements.ts, 6, 1)) ->T : Symbol(T, Decl(forStatements.ts, 8, 8)) - - wrapped: D> ->wrapped : Symbol(wrapped, Decl(forStatements.ts, 10, 18)) ->D : Symbol(D, Decl(forStatements.ts, 6, 1)) ->D : Symbol(D, Decl(forStatements.ts, 6, 1)) ->T : Symbol(T, Decl(forStatements.ts, 8, 8)) -} - -function F(x: string): number { return 42; } ->F : Symbol(F, Decl(forStatements.ts, 12, 1)) ->x : Symbol(x, Decl(forStatements.ts, 14, 11)) - -module M { ->M : Symbol(M, Decl(forStatements.ts, 14, 44)) - - export class A { ->A : Symbol(A, Decl(forStatements.ts, 16, 10)) - - name: string; ->name : Symbol(name, Decl(forStatements.ts, 17, 20)) - } - - export function F2(x: number): string { return x.toString(); } ->F2 : Symbol(F2, Decl(forStatements.ts, 19, 5)) ->x : Symbol(x, Decl(forStatements.ts, 21, 23)) ->x.toString : Symbol(Number.toString, Decl(lib.d.ts, 458, 18)) ->x : Symbol(x, Decl(forStatements.ts, 21, 23)) ->toString : Symbol(Number.toString, Decl(lib.d.ts, 458, 18)) -} - -for(var aNumber: number = 9.9;;){} ->aNumber : Symbol(aNumber, Decl(forStatements.ts, 24, 7)) - -for(var aString: string = 'this is a string';;){} ->aString : Symbol(aString, Decl(forStatements.ts, 25, 7)) - -for(var aDate: Date = new Date(12);;){} ->aDate : Symbol(aDate, Decl(forStatements.ts, 26, 7)) ->Date : Symbol(Date, Decl(lib.d.ts, 633, 23), Decl(lib.d.ts, 815, 11)) ->Date : Symbol(Date, Decl(lib.d.ts, 633, 23), Decl(lib.d.ts, 815, 11)) - -for(var anObject: Object = new Object();;){} ->anObject : Symbol(anObject, Decl(forStatements.ts, 27, 7)) ->Object : Symbol(Object, Decl(lib.d.ts, 92, 1), Decl(lib.d.ts, 223, 11)) ->Object : Symbol(Object, Decl(lib.d.ts, 92, 1), Decl(lib.d.ts, 223, 11)) - -for(var anAny: any = null;;){} ->anAny : Symbol(anAny, Decl(forStatements.ts, 29, 7)) - -for(var aSecondAny: any = undefined;;){} ->aSecondAny : Symbol(aSecondAny, Decl(forStatements.ts, 30, 7)) ->undefined : Symbol(undefined) - -for(var aVoid: void = undefined;;){} ->aVoid : Symbol(aVoid, Decl(forStatements.ts, 31, 7)) ->undefined : Symbol(undefined) - -for(var anInterface: I = new C();;){} ->anInterface : Symbol(anInterface, Decl(forStatements.ts, 33, 7)) ->I : Symbol(I, Decl(forStatements.ts, 0, 0)) ->C : Symbol(C, Decl(forStatements.ts, 2, 1)) - -for(var aClass: C = new C();;){} ->aClass : Symbol(aClass, Decl(forStatements.ts, 34, 7)) ->C : Symbol(C, Decl(forStatements.ts, 2, 1)) ->C : Symbol(C, Decl(forStatements.ts, 2, 1)) - -for(var aGenericClass: D = new D();;){} ->aGenericClass : Symbol(aGenericClass, Decl(forStatements.ts, 35, 7)) ->D : Symbol(D, Decl(forStatements.ts, 6, 1)) ->D : Symbol(D, Decl(forStatements.ts, 6, 1)) - -for(var anObjectLiteral: I = { id: 12 };;){} ->anObjectLiteral : Symbol(anObjectLiteral, Decl(forStatements.ts, 36, 7)) ->I : Symbol(I, Decl(forStatements.ts, 0, 0)) ->id : Symbol(id, Decl(forStatements.ts, 36, 30)) - -for(var anOtherObjectLiteral: { id: number } = new C();;){} ->anOtherObjectLiteral : Symbol(anOtherObjectLiteral, Decl(forStatements.ts, 37, 7)) ->id : Symbol(id, Decl(forStatements.ts, 37, 31)) ->C : Symbol(C, Decl(forStatements.ts, 2, 1)) - -for(var aFunction: typeof F = F;;){} ->aFunction : Symbol(aFunction, Decl(forStatements.ts, 39, 7)) ->F : Symbol(F, Decl(forStatements.ts, 12, 1)) ->F : Symbol(F, Decl(forStatements.ts, 12, 1)) - -for(var anOtherFunction: (x: string) => number = F;;){} ->anOtherFunction : Symbol(anOtherFunction, Decl(forStatements.ts, 40, 7)) ->x : Symbol(x, Decl(forStatements.ts, 40, 26)) ->F : Symbol(F, Decl(forStatements.ts, 12, 1)) - -for(var aLambda: typeof F = (x) => 2;;){} ->aLambda : Symbol(aLambda, Decl(forStatements.ts, 41, 7)) ->F : Symbol(F, Decl(forStatements.ts, 12, 1)) ->x : Symbol(x, Decl(forStatements.ts, 41, 29)) - -for(var aModule: typeof M = M;;){} ->aModule : Symbol(aModule, Decl(forStatements.ts, 43, 7)) ->M : Symbol(M, Decl(forStatements.ts, 14, 44)) ->M : Symbol(M, Decl(forStatements.ts, 14, 44)) - -for(var aClassInModule: M.A = new M.A();;){} ->aClassInModule : Symbol(aClassInModule, Decl(forStatements.ts, 44, 7)) ->M : Symbol(M, Decl(forStatements.ts, 14, 44)) ->A : Symbol(M.A, Decl(forStatements.ts, 16, 10)) ->M.A : Symbol(M.A, Decl(forStatements.ts, 16, 10)) ->M : Symbol(M, Decl(forStatements.ts, 14, 44)) ->A : Symbol(M.A, Decl(forStatements.ts, 16, 10)) - -for(var aFunctionInModule: typeof M.F2 = (x) => 'this is a string';;){} ->aFunctionInModule : Symbol(aFunctionInModule, Decl(forStatements.ts, 45, 7)) ->M.F2 : Symbol(M.F2, Decl(forStatements.ts, 19, 5)) ->M : Symbol(M, Decl(forStatements.ts, 14, 44)) ->F2 : Symbol(M.F2, Decl(forStatements.ts, 19, 5)) ->x : Symbol(x, Decl(forStatements.ts, 45, 42)) - diff --git a/tests/baselines/reference/forStatements.types b/tests/baselines/reference/forStatements.types deleted file mode 100644 index 3fbcf2dbfb2..00000000000 --- a/tests/baselines/reference/forStatements.types +++ /dev/null @@ -1,164 +0,0 @@ -=== tests/cases/conformance/statements/forStatements/forStatements.ts === -interface I { ->I : I - - id: number; ->id : number -} - -class C implements I { ->C : C ->I : I - - id: number; ->id : number -} - -class D{ ->D : D ->T : T - - source: T; ->source : T ->T : T - - recurse: D; ->recurse : D ->D : D ->T : T - - wrapped: D> ->wrapped : D> ->D : D ->D : D ->T : T -} - -function F(x: string): number { return 42; } ->F : (x: string) => number ->x : string ->42 : number - -module M { ->M : typeof M - - export class A { ->A : A - - name: string; ->name : string - } - - export function F2(x: number): string { return x.toString(); } ->F2 : (x: number) => string ->x : number ->x.toString() : string ->x.toString : (radix?: number) => string ->x : number ->toString : (radix?: number) => string -} - -for(var aNumber: number = 9.9;;){} ->aNumber : number ->9.9 : number - -for(var aString: string = 'this is a string';;){} ->aString : string ->'this is a string' : string - -for(var aDate: Date = new Date(12);;){} ->aDate : Date ->Date : Date ->new Date(12) : Date ->Date : DateConstructor ->12 : number - -for(var anObject: Object = new Object();;){} ->anObject : Object ->Object : Object ->new Object() : Object ->Object : ObjectConstructor - -for(var anAny: any = null;;){} ->anAny : any ->null : null - -for(var aSecondAny: any = undefined;;){} ->aSecondAny : any ->undefined : undefined - -for(var aVoid: void = undefined;;){} ->aVoid : void ->undefined : undefined - -for(var anInterface: I = new C();;){} ->anInterface : I ->I : I ->new C() : C ->C : typeof C - -for(var aClass: C = new C();;){} ->aClass : C ->C : C ->new C() : C ->C : typeof C - -for(var aGenericClass: D = new D();;){} ->aGenericClass : D ->D : D ->new D() : D ->D : typeof D - -for(var anObjectLiteral: I = { id: 12 };;){} ->anObjectLiteral : I ->I : I ->{ id: 12 } : { id: number; } ->id : number ->12 : number - -for(var anOtherObjectLiteral: { id: number } = new C();;){} ->anOtherObjectLiteral : { id: number; } ->id : number ->new C() : C ->C : typeof C - -for(var aFunction: typeof F = F;;){} ->aFunction : (x: string) => number ->F : (x: string) => number ->F : (x: string) => number - -for(var anOtherFunction: (x: string) => number = F;;){} ->anOtherFunction : (x: string) => number ->x : string ->F : (x: string) => number - -for(var aLambda: typeof F = (x) => 2;;){} ->aLambda : (x: string) => number ->F : (x: string) => number ->(x) => 2 : (x: string) => number ->x : string ->2 : number - -for(var aModule: typeof M = M;;){} ->aModule : typeof M ->M : typeof M ->M : typeof M - -for(var aClassInModule: M.A = new M.A();;){} ->aClassInModule : M.A ->M : any ->A : M.A ->new M.A() : M.A ->M.A : typeof M.A ->M : typeof M ->A : typeof M.A - -for(var aFunctionInModule: typeof M.F2 = (x) => 'this is a string';;){} ->aFunctionInModule : (x: number) => string ->M.F2 : (x: number) => string ->M : typeof M ->F2 : (x: number) => string ->(x) => 'this is a string' : (x: number) => string ->x : number ->'this is a string' : string - diff --git a/tests/baselines/reference/forStatementsMultipleInvalidDecl.errors.txt b/tests/baselines/reference/forStatementsMultipleInvalidDecl.errors.txt index 53ecb88363d..fa1c87824d7 100644 --- a/tests/baselines/reference/forStatementsMultipleInvalidDecl.errors.txt +++ b/tests/baselines/reference/forStatementsMultipleInvalidDecl.errors.txt @@ -1,3 +1,4 @@ +tests/cases/conformance/statements/forStatements/forStatementsMultipleInvalidDecl.ts(32,1): error TS7027: Unreachable code detected. tests/cases/conformance/statements/forStatements/forStatementsMultipleInvalidDecl.ts(32,10): error TS2403: Subsequent variable declarations must have the same type. Variable 'a' must be of type 'any', but here has type 'number'. tests/cases/conformance/statements/forStatements/forStatementsMultipleInvalidDecl.ts(33,10): error TS2403: Subsequent variable declarations must have the same type. Variable 'a' must be of type 'any', but here has type 'string'. tests/cases/conformance/statements/forStatements/forStatementsMultipleInvalidDecl.ts(34,10): error TS2403: Subsequent variable declarations must have the same type. Variable 'a' must be of type 'any', but here has type 'C'. @@ -12,7 +13,7 @@ tests/cases/conformance/statements/forStatements/forStatementsMultipleInvalidDec tests/cases/conformance/statements/forStatements/forStatementsMultipleInvalidDecl.ts(53,10): error TS2403: Subsequent variable declarations must have the same type. Variable 'm' must be of type 'typeof M', but here has type 'typeof A'. -==== tests/cases/conformance/statements/forStatements/forStatementsMultipleInvalidDecl.ts (12 errors) ==== +==== tests/cases/conformance/statements/forStatements/forStatementsMultipleInvalidDecl.ts (13 errors) ==== interface I { id: number; } @@ -45,6 +46,8 @@ tests/cases/conformance/statements/forStatements/forStatementsMultipleInvalidDec // all of these are errors for( var a: any;;){} for( var a = 1;;){} + ~~~ +!!! error TS7027: Unreachable code detected. ~ !!! error TS2403: Subsequent variable declarations must have the same type. Variable 'a' must be of type 'any', but here has type 'number'. for( var a = 'a string';;){} diff --git a/tests/baselines/reference/forStatementsMultipleValidDecl.errors.txt b/tests/baselines/reference/forStatementsMultipleValidDecl.errors.txt new file mode 100644 index 00000000000..eb871af31c0 --- /dev/null +++ b/tests/baselines/reference/forStatementsMultipleValidDecl.errors.txt @@ -0,0 +1,39 @@ +tests/cases/conformance/statements/forStatements/forStatementsMultipleValidDecl.ts(4,1): error TS7027: Unreachable code detected. + + +==== tests/cases/conformance/statements/forStatements/forStatementsMultipleValidDecl.ts (1 errors) ==== + // all expected to be valid + + for (var x: number; ;) { } + for (var x = 2; ;) { } + ~~~ +!!! error TS7027: Unreachable code detected. + + for (var x = undefined; ;) { } + // new declaration space, making redeclaring x as a string valid + function declSpace() { + for (var x = 'this is a string'; ;) { } + } + interface Point { x: number; y: number; } + + for (var p: Point; ;) { } + for (var p = { x: 1, y: 2 }; ;) { } + for (var p: Point = { x: 0, y: undefined }; ;) { } + for (var p = { x: 1, y: undefined }; ;) { } + for (var p: { x: number; y: number; } = { x: 1, y: 2 }; ;) { } + for (var p = <{ x: number; y: number; }>{ x: 0, y: undefined }; ;) { } + for (var p: typeof p; ;) { } + + for (var fn = function (s: string) { return 42; }; ;) { } + for (var fn = (s: string) => 3; ;) { } + for (var fn: (s: string) => number; ;) { } + for (var fn: { (s: string): number }; ;) { } + for (var fn = <(s: string) => number> null; ;) { } + for (var fn: typeof fn; ;) { } + + for (var a: string[]; ;) { } + for (var a = ['a', 'b']; ;) { } + for (var a = []; ;) { } + for (var a: string[] = []; ;) { } + for (var a = new Array(); ;) { } + for (var a: typeof a; ;) { } \ No newline at end of file diff --git a/tests/baselines/reference/forStatementsMultipleValidDecl.symbols b/tests/baselines/reference/forStatementsMultipleValidDecl.symbols deleted file mode 100644 index 6a98fbf133e..00000000000 --- a/tests/baselines/reference/forStatementsMultipleValidDecl.symbols +++ /dev/null @@ -1,110 +0,0 @@ -=== tests/cases/conformance/statements/forStatements/forStatementsMultipleValidDecl.ts === -// all expected to be valid - -for (var x: number; ;) { } ->x : Symbol(x, Decl(forStatementsMultipleValidDecl.ts, 2, 8), Decl(forStatementsMultipleValidDecl.ts, 3, 8), Decl(forStatementsMultipleValidDecl.ts, 5, 8)) - -for (var x = 2; ;) { } ->x : Symbol(x, Decl(forStatementsMultipleValidDecl.ts, 2, 8), Decl(forStatementsMultipleValidDecl.ts, 3, 8), Decl(forStatementsMultipleValidDecl.ts, 5, 8)) - -for (var x = undefined; ;) { } ->x : Symbol(x, Decl(forStatementsMultipleValidDecl.ts, 2, 8), Decl(forStatementsMultipleValidDecl.ts, 3, 8), Decl(forStatementsMultipleValidDecl.ts, 5, 8)) ->undefined : Symbol(undefined) - -// new declaration space, making redeclaring x as a string valid -function declSpace() { ->declSpace : Symbol(declSpace, Decl(forStatementsMultipleValidDecl.ts, 5, 38)) - - for (var x = 'this is a string'; ;) { } ->x : Symbol(x, Decl(forStatementsMultipleValidDecl.ts, 8, 12)) -} -interface Point { x: number; y: number; } ->Point : Symbol(Point, Decl(forStatementsMultipleValidDecl.ts, 9, 1)) ->x : Symbol(x, Decl(forStatementsMultipleValidDecl.ts, 10, 17)) ->y : Symbol(y, Decl(forStatementsMultipleValidDecl.ts, 10, 28)) - -for (var p: Point; ;) { } ->p : Symbol(p, Decl(forStatementsMultipleValidDecl.ts, 12, 8), Decl(forStatementsMultipleValidDecl.ts, 13, 8), Decl(forStatementsMultipleValidDecl.ts, 14, 8), Decl(forStatementsMultipleValidDecl.ts, 15, 8), Decl(forStatementsMultipleValidDecl.ts, 16, 8), Decl(forStatementsMultipleValidDecl.ts, 17, 8), Decl(forStatementsMultipleValidDecl.ts, 18, 8)) ->Point : Symbol(Point, Decl(forStatementsMultipleValidDecl.ts, 9, 1)) - -for (var p = { x: 1, y: 2 }; ;) { } ->p : Symbol(p, Decl(forStatementsMultipleValidDecl.ts, 12, 8), Decl(forStatementsMultipleValidDecl.ts, 13, 8), Decl(forStatementsMultipleValidDecl.ts, 14, 8), Decl(forStatementsMultipleValidDecl.ts, 15, 8), Decl(forStatementsMultipleValidDecl.ts, 16, 8), Decl(forStatementsMultipleValidDecl.ts, 17, 8), Decl(forStatementsMultipleValidDecl.ts, 18, 8)) ->x : Symbol(x, Decl(forStatementsMultipleValidDecl.ts, 13, 14)) ->y : Symbol(y, Decl(forStatementsMultipleValidDecl.ts, 13, 20)) - -for (var p: Point = { x: 0, y: undefined }; ;) { } ->p : Symbol(p, Decl(forStatementsMultipleValidDecl.ts, 12, 8), Decl(forStatementsMultipleValidDecl.ts, 13, 8), Decl(forStatementsMultipleValidDecl.ts, 14, 8), Decl(forStatementsMultipleValidDecl.ts, 15, 8), Decl(forStatementsMultipleValidDecl.ts, 16, 8), Decl(forStatementsMultipleValidDecl.ts, 17, 8), Decl(forStatementsMultipleValidDecl.ts, 18, 8)) ->Point : Symbol(Point, Decl(forStatementsMultipleValidDecl.ts, 9, 1)) ->x : Symbol(x, Decl(forStatementsMultipleValidDecl.ts, 14, 21)) ->y : Symbol(y, Decl(forStatementsMultipleValidDecl.ts, 14, 27)) ->undefined : Symbol(undefined) - -for (var p = { x: 1, y: undefined }; ;) { } ->p : Symbol(p, Decl(forStatementsMultipleValidDecl.ts, 12, 8), Decl(forStatementsMultipleValidDecl.ts, 13, 8), Decl(forStatementsMultipleValidDecl.ts, 14, 8), Decl(forStatementsMultipleValidDecl.ts, 15, 8), Decl(forStatementsMultipleValidDecl.ts, 16, 8), Decl(forStatementsMultipleValidDecl.ts, 17, 8), Decl(forStatementsMultipleValidDecl.ts, 18, 8)) ->x : Symbol(x, Decl(forStatementsMultipleValidDecl.ts, 15, 14)) ->y : Symbol(y, Decl(forStatementsMultipleValidDecl.ts, 15, 20)) ->undefined : Symbol(undefined) - -for (var p: { x: number; y: number; } = { x: 1, y: 2 }; ;) { } ->p : Symbol(p, Decl(forStatementsMultipleValidDecl.ts, 12, 8), Decl(forStatementsMultipleValidDecl.ts, 13, 8), Decl(forStatementsMultipleValidDecl.ts, 14, 8), Decl(forStatementsMultipleValidDecl.ts, 15, 8), Decl(forStatementsMultipleValidDecl.ts, 16, 8), Decl(forStatementsMultipleValidDecl.ts, 17, 8), Decl(forStatementsMultipleValidDecl.ts, 18, 8)) ->x : Symbol(x, Decl(forStatementsMultipleValidDecl.ts, 16, 13)) ->y : Symbol(y, Decl(forStatementsMultipleValidDecl.ts, 16, 24)) ->x : Symbol(x, Decl(forStatementsMultipleValidDecl.ts, 16, 41)) ->y : Symbol(y, Decl(forStatementsMultipleValidDecl.ts, 16, 47)) - -for (var p = <{ x: number; y: number; }>{ x: 0, y: undefined }; ;) { } ->p : Symbol(p, Decl(forStatementsMultipleValidDecl.ts, 12, 8), Decl(forStatementsMultipleValidDecl.ts, 13, 8), Decl(forStatementsMultipleValidDecl.ts, 14, 8), Decl(forStatementsMultipleValidDecl.ts, 15, 8), Decl(forStatementsMultipleValidDecl.ts, 16, 8), Decl(forStatementsMultipleValidDecl.ts, 17, 8), Decl(forStatementsMultipleValidDecl.ts, 18, 8)) ->x : Symbol(x, Decl(forStatementsMultipleValidDecl.ts, 17, 15)) ->y : Symbol(y, Decl(forStatementsMultipleValidDecl.ts, 17, 26)) ->x : Symbol(x, Decl(forStatementsMultipleValidDecl.ts, 17, 41)) ->y : Symbol(y, Decl(forStatementsMultipleValidDecl.ts, 17, 47)) ->undefined : Symbol(undefined) - -for (var p: typeof p; ;) { } ->p : Symbol(p, Decl(forStatementsMultipleValidDecl.ts, 12, 8), Decl(forStatementsMultipleValidDecl.ts, 13, 8), Decl(forStatementsMultipleValidDecl.ts, 14, 8), Decl(forStatementsMultipleValidDecl.ts, 15, 8), Decl(forStatementsMultipleValidDecl.ts, 16, 8), Decl(forStatementsMultipleValidDecl.ts, 17, 8), Decl(forStatementsMultipleValidDecl.ts, 18, 8)) ->p : Symbol(p, Decl(forStatementsMultipleValidDecl.ts, 12, 8), Decl(forStatementsMultipleValidDecl.ts, 13, 8), Decl(forStatementsMultipleValidDecl.ts, 14, 8), Decl(forStatementsMultipleValidDecl.ts, 15, 8), Decl(forStatementsMultipleValidDecl.ts, 16, 8), Decl(forStatementsMultipleValidDecl.ts, 17, 8), Decl(forStatementsMultipleValidDecl.ts, 18, 8)) - -for (var fn = function (s: string) { return 42; }; ;) { } ->fn : Symbol(fn, Decl(forStatementsMultipleValidDecl.ts, 20, 8), Decl(forStatementsMultipleValidDecl.ts, 21, 8), Decl(forStatementsMultipleValidDecl.ts, 22, 8), Decl(forStatementsMultipleValidDecl.ts, 23, 8), Decl(forStatementsMultipleValidDecl.ts, 24, 8), Decl(forStatementsMultipleValidDecl.ts, 25, 8)) ->s : Symbol(s, Decl(forStatementsMultipleValidDecl.ts, 20, 24)) - -for (var fn = (s: string) => 3; ;) { } ->fn : Symbol(fn, Decl(forStatementsMultipleValidDecl.ts, 20, 8), Decl(forStatementsMultipleValidDecl.ts, 21, 8), Decl(forStatementsMultipleValidDecl.ts, 22, 8), Decl(forStatementsMultipleValidDecl.ts, 23, 8), Decl(forStatementsMultipleValidDecl.ts, 24, 8), Decl(forStatementsMultipleValidDecl.ts, 25, 8)) ->s : Symbol(s, Decl(forStatementsMultipleValidDecl.ts, 21, 15)) - -for (var fn: (s: string) => number; ;) { } ->fn : Symbol(fn, Decl(forStatementsMultipleValidDecl.ts, 20, 8), Decl(forStatementsMultipleValidDecl.ts, 21, 8), Decl(forStatementsMultipleValidDecl.ts, 22, 8), Decl(forStatementsMultipleValidDecl.ts, 23, 8), Decl(forStatementsMultipleValidDecl.ts, 24, 8), Decl(forStatementsMultipleValidDecl.ts, 25, 8)) ->s : Symbol(s, Decl(forStatementsMultipleValidDecl.ts, 22, 14)) - -for (var fn: { (s: string): number }; ;) { } ->fn : Symbol(fn, Decl(forStatementsMultipleValidDecl.ts, 20, 8), Decl(forStatementsMultipleValidDecl.ts, 21, 8), Decl(forStatementsMultipleValidDecl.ts, 22, 8), Decl(forStatementsMultipleValidDecl.ts, 23, 8), Decl(forStatementsMultipleValidDecl.ts, 24, 8), Decl(forStatementsMultipleValidDecl.ts, 25, 8)) ->s : Symbol(s, Decl(forStatementsMultipleValidDecl.ts, 23, 16)) - -for (var fn = <(s: string) => number> null; ;) { } ->fn : Symbol(fn, Decl(forStatementsMultipleValidDecl.ts, 20, 8), Decl(forStatementsMultipleValidDecl.ts, 21, 8), Decl(forStatementsMultipleValidDecl.ts, 22, 8), Decl(forStatementsMultipleValidDecl.ts, 23, 8), Decl(forStatementsMultipleValidDecl.ts, 24, 8), Decl(forStatementsMultipleValidDecl.ts, 25, 8)) ->s : Symbol(s, Decl(forStatementsMultipleValidDecl.ts, 24, 16)) - -for (var fn: typeof fn; ;) { } ->fn : Symbol(fn, Decl(forStatementsMultipleValidDecl.ts, 20, 8), Decl(forStatementsMultipleValidDecl.ts, 21, 8), Decl(forStatementsMultipleValidDecl.ts, 22, 8), Decl(forStatementsMultipleValidDecl.ts, 23, 8), Decl(forStatementsMultipleValidDecl.ts, 24, 8), Decl(forStatementsMultipleValidDecl.ts, 25, 8)) ->fn : Symbol(fn, Decl(forStatementsMultipleValidDecl.ts, 20, 8), Decl(forStatementsMultipleValidDecl.ts, 21, 8), Decl(forStatementsMultipleValidDecl.ts, 22, 8), Decl(forStatementsMultipleValidDecl.ts, 23, 8), Decl(forStatementsMultipleValidDecl.ts, 24, 8), Decl(forStatementsMultipleValidDecl.ts, 25, 8)) - -for (var a: string[]; ;) { } ->a : Symbol(a, Decl(forStatementsMultipleValidDecl.ts, 27, 8), Decl(forStatementsMultipleValidDecl.ts, 28, 8), Decl(forStatementsMultipleValidDecl.ts, 29, 8), Decl(forStatementsMultipleValidDecl.ts, 30, 8), Decl(forStatementsMultipleValidDecl.ts, 31, 8), Decl(forStatementsMultipleValidDecl.ts, 32, 8)) - -for (var a = ['a', 'b']; ;) { } ->a : Symbol(a, Decl(forStatementsMultipleValidDecl.ts, 27, 8), Decl(forStatementsMultipleValidDecl.ts, 28, 8), Decl(forStatementsMultipleValidDecl.ts, 29, 8), Decl(forStatementsMultipleValidDecl.ts, 30, 8), Decl(forStatementsMultipleValidDecl.ts, 31, 8), Decl(forStatementsMultipleValidDecl.ts, 32, 8)) - -for (var a = []; ;) { } ->a : Symbol(a, Decl(forStatementsMultipleValidDecl.ts, 27, 8), Decl(forStatementsMultipleValidDecl.ts, 28, 8), Decl(forStatementsMultipleValidDecl.ts, 29, 8), Decl(forStatementsMultipleValidDecl.ts, 30, 8), Decl(forStatementsMultipleValidDecl.ts, 31, 8), Decl(forStatementsMultipleValidDecl.ts, 32, 8)) - -for (var a: string[] = []; ;) { } ->a : Symbol(a, Decl(forStatementsMultipleValidDecl.ts, 27, 8), Decl(forStatementsMultipleValidDecl.ts, 28, 8), Decl(forStatementsMultipleValidDecl.ts, 29, 8), Decl(forStatementsMultipleValidDecl.ts, 30, 8), Decl(forStatementsMultipleValidDecl.ts, 31, 8), Decl(forStatementsMultipleValidDecl.ts, 32, 8)) - -for (var a = new Array(); ;) { } ->a : Symbol(a, Decl(forStatementsMultipleValidDecl.ts, 27, 8), Decl(forStatementsMultipleValidDecl.ts, 28, 8), Decl(forStatementsMultipleValidDecl.ts, 29, 8), Decl(forStatementsMultipleValidDecl.ts, 30, 8), Decl(forStatementsMultipleValidDecl.ts, 31, 8), Decl(forStatementsMultipleValidDecl.ts, 32, 8)) ->Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11)) - -for (var a: typeof a; ;) { } ->a : Symbol(a, Decl(forStatementsMultipleValidDecl.ts, 27, 8), Decl(forStatementsMultipleValidDecl.ts, 28, 8), Decl(forStatementsMultipleValidDecl.ts, 29, 8), Decl(forStatementsMultipleValidDecl.ts, 30, 8), Decl(forStatementsMultipleValidDecl.ts, 31, 8), Decl(forStatementsMultipleValidDecl.ts, 32, 8)) ->a : Symbol(a, Decl(forStatementsMultipleValidDecl.ts, 27, 8), Decl(forStatementsMultipleValidDecl.ts, 28, 8), Decl(forStatementsMultipleValidDecl.ts, 29, 8), Decl(forStatementsMultipleValidDecl.ts, 30, 8), Decl(forStatementsMultipleValidDecl.ts, 31, 8), Decl(forStatementsMultipleValidDecl.ts, 32, 8)) - diff --git a/tests/baselines/reference/forStatementsMultipleValidDecl.types b/tests/baselines/reference/forStatementsMultipleValidDecl.types deleted file mode 100644 index 9b9af5b850e..00000000000 --- a/tests/baselines/reference/forStatementsMultipleValidDecl.types +++ /dev/null @@ -1,140 +0,0 @@ -=== tests/cases/conformance/statements/forStatements/forStatementsMultipleValidDecl.ts === -// all expected to be valid - -for (var x: number; ;) { } ->x : number - -for (var x = 2; ;) { } ->x : number ->2 : number - -for (var x = undefined; ;) { } ->x : number ->undefined : number ->undefined : undefined - -// new declaration space, making redeclaring x as a string valid -function declSpace() { ->declSpace : () => void - - for (var x = 'this is a string'; ;) { } ->x : string ->'this is a string' : string -} -interface Point { x: number; y: number; } ->Point : Point ->x : number ->y : number - -for (var p: Point; ;) { } ->p : Point ->Point : Point - -for (var p = { x: 1, y: 2 }; ;) { } ->p : Point ->{ x: 1, y: 2 } : { x: number; y: number; } ->x : number ->1 : number ->y : number ->2 : number - -for (var p: Point = { x: 0, y: undefined }; ;) { } ->p : Point ->Point : Point ->{ x: 0, y: undefined } : { x: number; y: undefined; } ->x : number ->0 : number ->y : undefined ->undefined : undefined - -for (var p = { x: 1, y: undefined }; ;) { } ->p : Point ->{ x: 1, y: undefined } : { x: number; y: number; } ->x : number ->1 : number ->y : number ->undefined : number ->undefined : undefined - -for (var p: { x: number; y: number; } = { x: 1, y: 2 }; ;) { } ->p : Point ->x : number ->y : number ->{ x: 1, y: 2 } : { x: number; y: number; } ->x : number ->1 : number ->y : number ->2 : number - -for (var p = <{ x: number; y: number; }>{ x: 0, y: undefined }; ;) { } ->p : Point -><{ x: number; y: number; }>{ x: 0, y: undefined } : { x: number; y: number; } ->x : number ->y : number ->{ x: 0, y: undefined } : { x: number; y: undefined; } ->x : number ->0 : number ->y : undefined ->undefined : undefined - -for (var p: typeof p; ;) { } ->p : Point ->p : Point - -for (var fn = function (s: string) { return 42; }; ;) { } ->fn : (s: string) => number ->function (s: string) { return 42; } : (s: string) => number ->s : string ->42 : number - -for (var fn = (s: string) => 3; ;) { } ->fn : (s: string) => number ->(s: string) => 3 : (s: string) => number ->s : string ->3 : number - -for (var fn: (s: string) => number; ;) { } ->fn : (s: string) => number ->s : string - -for (var fn: { (s: string): number }; ;) { } ->fn : (s: string) => number ->s : string - -for (var fn = <(s: string) => number> null; ;) { } ->fn : (s: string) => number -><(s: string) => number> null : (s: string) => number ->s : string ->null : null - -for (var fn: typeof fn; ;) { } ->fn : (s: string) => number ->fn : (s: string) => number - -for (var a: string[]; ;) { } ->a : string[] - -for (var a = ['a', 'b']; ;) { } ->a : string[] ->['a', 'b'] : string[] ->'a' : string ->'b' : string - -for (var a = []; ;) { } ->a : string[] ->[] : string[] ->[] : undefined[] - -for (var a: string[] = []; ;) { } ->a : string[] ->[] : undefined[] - -for (var a = new Array(); ;) { } ->a : string[] ->new Array() : string[] ->Array : ArrayConstructor - -for (var a: typeof a; ;) { } ->a : string[] ->a : string[] - diff --git a/tests/baselines/reference/functionImplementationErrors.errors.txt b/tests/baselines/reference/functionImplementationErrors.errors.txt index 1ab438e340b..bde939a1578 100644 --- a/tests/baselines/reference/functionImplementationErrors.errors.txt +++ b/tests/baselines/reference/functionImplementationErrors.errors.txt @@ -1,31 +1,46 @@ tests/cases/conformance/functions/functionImplementationErrors.ts(2,10): error TS2354: No best common type exists among return expressions. +tests/cases/conformance/functions/functionImplementationErrors.ts(4,5): error TS7027: Unreachable code detected. tests/cases/conformance/functions/functionImplementationErrors.ts(6,19): error TS2354: No best common type exists among return expressions. +tests/cases/conformance/functions/functionImplementationErrors.ts(8,5): error TS7027: Unreachable code detected. tests/cases/conformance/functions/functionImplementationErrors.ts(10,10): error TS2354: No best common type exists among return expressions. +tests/cases/conformance/functions/functionImplementationErrors.ts(12,5): error TS7027: Unreachable code detected. tests/cases/conformance/functions/functionImplementationErrors.ts(16,10): error TS2354: No best common type exists among return expressions. +tests/cases/conformance/functions/functionImplementationErrors.ts(20,9): error TS7027: Unreachable code detected. tests/cases/conformance/functions/functionImplementationErrors.ts(25,16): error TS2355: A function whose declared type is neither 'void' nor 'any' must return a value. tests/cases/conformance/functions/functionImplementationErrors.ts(30,17): error TS2373: Initializer of parameter 'n' cannot reference identifier 'm' declared after it. tests/cases/conformance/functions/functionImplementationErrors.ts(35,17): error TS2373: Initializer of parameter 'n' cannot reference identifier 'm' declared after it. +tests/cases/conformance/functions/functionImplementationErrors.ts(42,5): error TS7027: Unreachable code detected. tests/cases/conformance/functions/functionImplementationErrors.ts(49,10): error TS2354: No best common type exists among return expressions. +tests/cases/conformance/functions/functionImplementationErrors.ts(51,5): error TS7027: Unreachable code detected. tests/cases/conformance/functions/functionImplementationErrors.ts(53,10): error TS2354: No best common type exists among return expressions. +tests/cases/conformance/functions/functionImplementationErrors.ts(55,5): error TS7027: Unreachable code detected. tests/cases/conformance/functions/functionImplementationErrors.ts(57,11): error TS2354: No best common type exists among return expressions. +tests/cases/conformance/functions/functionImplementationErrors.ts(59,5): error TS7027: Unreachable code detected. tests/cases/conformance/functions/functionImplementationErrors.ts(61,10): error TS2354: No best common type exists among return expressions. +tests/cases/conformance/functions/functionImplementationErrors.ts(63,5): error TS7027: Unreachable code detected. tests/cases/conformance/functions/functionImplementationErrors.ts(65,11): error TS2354: No best common type exists among return expressions. +tests/cases/conformance/functions/functionImplementationErrors.ts(67,5): error TS7027: Unreachable code detected. tests/cases/conformance/functions/functionImplementationErrors.ts(69,11): error TS2354: No best common type exists among return expressions. +tests/cases/conformance/functions/functionImplementationErrors.ts(71,5): error TS7027: Unreachable code detected. -==== tests/cases/conformance/functions/functionImplementationErrors.ts (13 errors) ==== +==== tests/cases/conformance/functions/functionImplementationErrors.ts (24 errors) ==== // FunctionExpression with no return type annotation with multiple return statements with unrelated types var f1 = function () { ~~~~~~~~ !!! error TS2354: No best common type exists among return expressions. return ''; return 3; + ~~~~~~ +!!! error TS7027: Unreachable code detected. }; var f2 = function x() { ~ !!! error TS2354: No best common type exists among return expressions. return ''; return 3; + ~~~~~~ +!!! error TS7027: Unreachable code detected. }; var f3 = () => { ~~~~~~~ @@ -33,6 +48,8 @@ tests/cases/conformance/functions/functionImplementationErrors.ts(69,11): error ~~~~~~~~~~~~~~ return 3; ~~~~~~~~~~~~~ + ~~~~~~ +!!! error TS7027: Unreachable code detected. }; ~ !!! error TS2354: No best common type exists among return expressions. @@ -45,6 +62,8 @@ tests/cases/conformance/functions/functionImplementationErrors.ts(69,11): error return ['']; } else { return [1]; + ~~~~~~ +!!! error TS7027: Unreachable code detected. } } @@ -73,6 +92,8 @@ tests/cases/conformance/functions/functionImplementationErrors.ts(69,11): error undefined === function (): number { throw undefined; var x = 4; + ~~~ +!!! error TS7027: Unreachable code detected. }; class Base { private x; } @@ -84,12 +105,16 @@ tests/cases/conformance/functions/functionImplementationErrors.ts(69,11): error !!! error TS2354: No best common type exists among return expressions. return new Derived1(); return new Derived2(); + ~~~~~~ +!!! error TS7027: Unreachable code detected. } var f9 = function () { ~~~~~~~~ !!! error TS2354: No best common type exists among return expressions. return new Derived1(); return new Derived2(); + ~~~~~~ +!!! error TS7027: Unreachable code detected. }; var f10 = () => { ~~~~~~~ @@ -97,6 +122,8 @@ tests/cases/conformance/functions/functionImplementationErrors.ts(69,11): error ~~~~~~~~~~~~~~~~~~~~~~~~~~ return new Derived2(); ~~~~~~~~~~~~~~~~~~~~~~~~~~ + ~~~~~~ +!!! error TS7027: Unreachable code detected. }; ~ !!! error TS2354: No best common type exists among return expressions. @@ -105,12 +132,16 @@ tests/cases/conformance/functions/functionImplementationErrors.ts(69,11): error !!! error TS2354: No best common type exists among return expressions. return new Base(); return new AnotherClass(); + ~~~~~~ +!!! error TS7027: Unreachable code detected. } var f12 = function () { ~~~~~~~~ !!! error TS2354: No best common type exists among return expressions. return new Base(); return new AnotherClass(); + ~~~~~~ +!!! error TS7027: Unreachable code detected. }; var f13 = () => { ~~~~~~~ @@ -118,6 +149,8 @@ tests/cases/conformance/functions/functionImplementationErrors.ts(69,11): error ~~~~~~~~~~~~~~~~~~~~~~ return new AnotherClass(); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ~~~~~~ +!!! error TS7027: Unreachable code detected. }; ~ !!! error TS2354: No best common type exists among return expressions. diff --git a/tests/baselines/reference/functionImplementations.errors.txt b/tests/baselines/reference/functionImplementations.errors.txt new file mode 100644 index 00000000000..f3e4d6404c6 --- /dev/null +++ b/tests/baselines/reference/functionImplementations.errors.txt @@ -0,0 +1,183 @@ +tests/cases/conformance/functions/functionImplementations.ts(69,5): error TS7027: Unreachable code detected. +tests/cases/conformance/functions/functionImplementations.ts(81,24): error TS7027: Unreachable code detected. +tests/cases/conformance/functions/functionImplementations.ts(86,24): error TS7027: Unreachable code detected. +tests/cases/conformance/functions/functionImplementations.ts(137,5): error TS7027: Unreachable code detected. +tests/cases/conformance/functions/functionImplementations.ts(141,5): error TS7027: Unreachable code detected. +tests/cases/conformance/functions/functionImplementations.ts(146,5): error TS7027: Unreachable code detected. +tests/cases/conformance/functions/functionImplementations.ts(150,5): error TS7027: Unreachable code detected. +tests/cases/conformance/functions/functionImplementations.ts(154,5): error TS7027: Unreachable code detected. + + +==== tests/cases/conformance/functions/functionImplementations.ts (8 errors) ==== + // FunctionExpression with no return type annotation and no return statement returns void + var v: void = function () { } (); + + // FunctionExpression f with no return type annotation and directly references f in its body returns any + var a: any = function f() { + return f; + }; + var a: any = function f() { + return f(); + }; + + // FunctionExpression f with no return type annotation and indirectly references f in its body returns any + var a: any = function f() { + var x = f; + return x; + }; + + // Two mutually recursive function implementations with no return type annotations + function rec1() { + return rec2(); + } + function rec2() { + return rec1(); + } + var a = rec1(); + var a = rec2(); + + // Two mutually recursive function implementations with return type annotation in one + function rec3(): number { + return rec4(); + } + function rec4() { + return rec3(); + } + var n: number; + var n = rec3(); + var n = rec4(); + + // FunctionExpression with no return type annotation and returns a number + var n = function () { + return 3; + } (); + + // FunctionExpression with no return type annotation and returns null + var nu = null; + var nu = function () { + return null; + } (); + + // FunctionExpression with no return type annotation and returns undefined + var un = undefined; + var un = function () { + return undefined; + } (); + + // FunctionExpression with no return type annotation and returns a type parameter type + var n = function (x: T) { + return x; + } (4); + + // FunctionExpression with no return type annotation and returns a constrained type parameter type + var n = function (x: T) { + return x; + } (4); + + // FunctionExpression with no return type annotation with multiple return statements with identical types + var n = function () { + return 3; + return 5; + ~~~~~~ +!!! error TS7027: Unreachable code detected. + }(); + + // Otherwise, the inferred return type is the first of the types of the return statement expressions + // in the function body that is a supertype of each of the others, + // ignoring return statements with no expressions. + // A compile - time error occurs if no return statement expression has a type that is a supertype of each of the others. + // FunctionExpression with no return type annotation with multiple return statements with subtype relation between returns + class Base { private m; } + class Derived extends Base { private q; } + var b: Base; + var b = function () { + return new Base(); return new Derived(); + ~~~~~~ +!!! error TS7027: Unreachable code detected. + } (); + + // FunctionExpression with no return type annotation with multiple return statements with one a recursive call + var a = function f() { + return new Base(); return new Derived(); return f(); // ? + ~~~~~~ +!!! error TS7027: Unreachable code detected. + } (); + + // FunctionExpression with non -void return type annotation with a single throw statement + undefined === function (): number { + throw undefined; + }; + + // Type of 'this' in function implementation is 'any' + function thisFunc() { + var x = this; + var x: any; + } + + // Function signature with optional parameter, no type annotation and initializer has initializer's type + function opt1(n = 4) { + var m = n; + var m: number; + } + + // Function signature with optional parameter, no type annotation and initializer has initializer's widened type + function opt2(n = { x: null, y: undefined }) { + var m = n; + var m: { x: any; y: any }; + } + + // Function signature with initializer referencing other parameter to the left + function opt3(n: number, m = n) { + var y = m; + var y: number; + } + + // Function signature with optional parameter has correct codegen + // (tested above) + + // FunctionExpression with non -void return type annotation return with no expression + function f6(): number { + return; + } + + class Derived2 extends Base { private r: string; } + class AnotherClass { private x } + // if f is a contextually typed function expression, the inferred return type is the union type + // of the types of the return statement expressions in the function body, + // ignoring return statements with no expressions. + var f7: (x: number) => string | number = x => { // should be (x: number) => number | string + if (x < 0) { return x; } + return x.toString(); + } + var f8: (x: number) => any = x => { // should be (x: number) => Base + return new Base(); + return new Derived2(); + ~~~~~~ +!!! error TS7027: Unreachable code detected. + } + var f9: (x: number) => any = x => { // should be (x: number) => Base + return new Base(); + return new Derived(); + ~~~~~~ +!!! error TS7027: Unreachable code detected. + return new Derived2(); + } + var f10: (x: number) => any = x => { // should be (x: number) => Derived | Derived1 + return new Derived(); + return new Derived2(); + ~~~~~~ +!!! error TS7027: Unreachable code detected. + } + var f11: (x: number) => any = x => { // should be (x: number) => Base | AnotherClass + return new Base(); + return new AnotherClass(); + ~~~~~~ +!!! error TS7027: Unreachable code detected. + } + var f12: (x: number) => any = x => { // should be (x: number) => Base | AnotherClass + return new Base(); + return; // should be ignored + ~~~~~~ +!!! error TS7027: Unreachable code detected. + return new AnotherClass(); + } \ No newline at end of file diff --git a/tests/baselines/reference/functionImplementations.symbols b/tests/baselines/reference/functionImplementations.symbols deleted file mode 100644 index f9205f37650..00000000000 --- a/tests/baselines/reference/functionImplementations.symbols +++ /dev/null @@ -1,344 +0,0 @@ -=== tests/cases/conformance/functions/functionImplementations.ts === -// FunctionExpression with no return type annotation and no return statement returns void -var v: void = function () { } (); ->v : Symbol(v, Decl(functionImplementations.ts, 1, 3)) - -// FunctionExpression f with no return type annotation and directly references f in its body returns any -var a: any = function f() { ->a : Symbol(a, Decl(functionImplementations.ts, 4, 3), Decl(functionImplementations.ts, 7, 3), Decl(functionImplementations.ts, 12, 3), Decl(functionImplementations.ts, 24, 3), Decl(functionImplementations.ts, 25, 3), Decl(functionImplementations.ts, 84, 3)) ->f : Symbol(f, Decl(functionImplementations.ts, 4, 12)) - - return f; ->f : Symbol(f, Decl(functionImplementations.ts, 4, 12)) - -}; -var a: any = function f() { ->a : Symbol(a, Decl(functionImplementations.ts, 4, 3), Decl(functionImplementations.ts, 7, 3), Decl(functionImplementations.ts, 12, 3), Decl(functionImplementations.ts, 24, 3), Decl(functionImplementations.ts, 25, 3), Decl(functionImplementations.ts, 84, 3)) ->f : Symbol(f, Decl(functionImplementations.ts, 7, 12)) - - return f(); ->f : Symbol(f, Decl(functionImplementations.ts, 7, 12)) - -}; - -// FunctionExpression f with no return type annotation and indirectly references f in its body returns any -var a: any = function f() { ->a : Symbol(a, Decl(functionImplementations.ts, 4, 3), Decl(functionImplementations.ts, 7, 3), Decl(functionImplementations.ts, 12, 3), Decl(functionImplementations.ts, 24, 3), Decl(functionImplementations.ts, 25, 3), Decl(functionImplementations.ts, 84, 3)) ->f : Symbol(f, Decl(functionImplementations.ts, 12, 12)) - - var x = f; ->x : Symbol(x, Decl(functionImplementations.ts, 13, 7)) ->f : Symbol(f, Decl(functionImplementations.ts, 12, 12)) - - return x; ->x : Symbol(x, Decl(functionImplementations.ts, 13, 7)) - -}; - -// Two mutually recursive function implementations with no return type annotations -function rec1() { ->rec1 : Symbol(rec1, Decl(functionImplementations.ts, 15, 2)) - - return rec2(); ->rec2 : Symbol(rec2, Decl(functionImplementations.ts, 20, 1)) -} -function rec2() { ->rec2 : Symbol(rec2, Decl(functionImplementations.ts, 20, 1)) - - return rec1(); ->rec1 : Symbol(rec1, Decl(functionImplementations.ts, 15, 2)) -} -var a = rec1(); ->a : Symbol(a, Decl(functionImplementations.ts, 4, 3), Decl(functionImplementations.ts, 7, 3), Decl(functionImplementations.ts, 12, 3), Decl(functionImplementations.ts, 24, 3), Decl(functionImplementations.ts, 25, 3), Decl(functionImplementations.ts, 84, 3)) ->rec1 : Symbol(rec1, Decl(functionImplementations.ts, 15, 2)) - -var a = rec2(); ->a : Symbol(a, Decl(functionImplementations.ts, 4, 3), Decl(functionImplementations.ts, 7, 3), Decl(functionImplementations.ts, 12, 3), Decl(functionImplementations.ts, 24, 3), Decl(functionImplementations.ts, 25, 3), Decl(functionImplementations.ts, 84, 3)) ->rec2 : Symbol(rec2, Decl(functionImplementations.ts, 20, 1)) - -// Two mutually recursive function implementations with return type annotation in one -function rec3(): number { ->rec3 : Symbol(rec3, Decl(functionImplementations.ts, 25, 15)) - - return rec4(); ->rec4 : Symbol(rec4, Decl(functionImplementations.ts, 30, 1)) -} -function rec4() { ->rec4 : Symbol(rec4, Decl(functionImplementations.ts, 30, 1)) - - return rec3(); ->rec3 : Symbol(rec3, Decl(functionImplementations.ts, 25, 15)) -} -var n: number; ->n : Symbol(n, Decl(functionImplementations.ts, 34, 3), Decl(functionImplementations.ts, 35, 3), Decl(functionImplementations.ts, 36, 3), Decl(functionImplementations.ts, 39, 3), Decl(functionImplementations.ts, 56, 3), Decl(functionImplementations.ts, 61, 3), Decl(functionImplementations.ts, 66, 3)) - -var n = rec3(); ->n : Symbol(n, Decl(functionImplementations.ts, 34, 3), Decl(functionImplementations.ts, 35, 3), Decl(functionImplementations.ts, 36, 3), Decl(functionImplementations.ts, 39, 3), Decl(functionImplementations.ts, 56, 3), Decl(functionImplementations.ts, 61, 3), Decl(functionImplementations.ts, 66, 3)) ->rec3 : Symbol(rec3, Decl(functionImplementations.ts, 25, 15)) - -var n = rec4(); ->n : Symbol(n, Decl(functionImplementations.ts, 34, 3), Decl(functionImplementations.ts, 35, 3), Decl(functionImplementations.ts, 36, 3), Decl(functionImplementations.ts, 39, 3), Decl(functionImplementations.ts, 56, 3), Decl(functionImplementations.ts, 61, 3), Decl(functionImplementations.ts, 66, 3)) ->rec4 : Symbol(rec4, Decl(functionImplementations.ts, 30, 1)) - -// FunctionExpression with no return type annotation and returns a number -var n = function () { ->n : Symbol(n, Decl(functionImplementations.ts, 34, 3), Decl(functionImplementations.ts, 35, 3), Decl(functionImplementations.ts, 36, 3), Decl(functionImplementations.ts, 39, 3), Decl(functionImplementations.ts, 56, 3), Decl(functionImplementations.ts, 61, 3), Decl(functionImplementations.ts, 66, 3)) - - return 3; -} (); - -// FunctionExpression with no return type annotation and returns null -var nu = null; ->nu : Symbol(nu, Decl(functionImplementations.ts, 44, 3), Decl(functionImplementations.ts, 45, 3)) - -var nu = function () { ->nu : Symbol(nu, Decl(functionImplementations.ts, 44, 3), Decl(functionImplementations.ts, 45, 3)) - - return null; -} (); - -// FunctionExpression with no return type annotation and returns undefined -var un = undefined; ->un : Symbol(un, Decl(functionImplementations.ts, 50, 3), Decl(functionImplementations.ts, 51, 3)) ->undefined : Symbol(undefined) - -var un = function () { ->un : Symbol(un, Decl(functionImplementations.ts, 50, 3), Decl(functionImplementations.ts, 51, 3)) - - return undefined; ->undefined : Symbol(undefined) - -} (); - -// FunctionExpression with no return type annotation and returns a type parameter type -var n = function (x: T) { ->n : Symbol(n, Decl(functionImplementations.ts, 34, 3), Decl(functionImplementations.ts, 35, 3), Decl(functionImplementations.ts, 36, 3), Decl(functionImplementations.ts, 39, 3), Decl(functionImplementations.ts, 56, 3), Decl(functionImplementations.ts, 61, 3), Decl(functionImplementations.ts, 66, 3)) ->T : Symbol(T, Decl(functionImplementations.ts, 56, 18)) ->x : Symbol(x, Decl(functionImplementations.ts, 56, 21)) ->T : Symbol(T, Decl(functionImplementations.ts, 56, 18)) - - return x; ->x : Symbol(x, Decl(functionImplementations.ts, 56, 21)) - -} (4); - -// FunctionExpression with no return type annotation and returns a constrained type parameter type -var n = function (x: T) { ->n : Symbol(n, Decl(functionImplementations.ts, 34, 3), Decl(functionImplementations.ts, 35, 3), Decl(functionImplementations.ts, 36, 3), Decl(functionImplementations.ts, 39, 3), Decl(functionImplementations.ts, 56, 3), Decl(functionImplementations.ts, 61, 3), Decl(functionImplementations.ts, 66, 3)) ->T : Symbol(T, Decl(functionImplementations.ts, 61, 18)) ->x : Symbol(x, Decl(functionImplementations.ts, 61, 32)) ->T : Symbol(T, Decl(functionImplementations.ts, 61, 18)) - - return x; ->x : Symbol(x, Decl(functionImplementations.ts, 61, 32)) - -} (4); - -// FunctionExpression with no return type annotation with multiple return statements with identical types -var n = function () { ->n : Symbol(n, Decl(functionImplementations.ts, 34, 3), Decl(functionImplementations.ts, 35, 3), Decl(functionImplementations.ts, 36, 3), Decl(functionImplementations.ts, 39, 3), Decl(functionImplementations.ts, 56, 3), Decl(functionImplementations.ts, 61, 3), Decl(functionImplementations.ts, 66, 3)) - - return 3; - return 5; -}(); - -// Otherwise, the inferred return type is the first of the types of the return statement expressions -// in the function body that is a supertype of each of the others, -// ignoring return statements with no expressions. -// A compile - time error occurs if no return statement expression has a type that is a supertype of each of the others. -// FunctionExpression with no return type annotation with multiple return statements with subtype relation between returns -class Base { private m; } ->Base : Symbol(Base, Decl(functionImplementations.ts, 69, 4)) ->m : Symbol(m, Decl(functionImplementations.ts, 76, 12)) - -class Derived extends Base { private q; } ->Derived : Symbol(Derived, Decl(functionImplementations.ts, 76, 25)) ->Base : Symbol(Base, Decl(functionImplementations.ts, 69, 4)) ->q : Symbol(q, Decl(functionImplementations.ts, 77, 28)) - -var b: Base; ->b : Symbol(b, Decl(functionImplementations.ts, 78, 3), Decl(functionImplementations.ts, 79, 3)) ->Base : Symbol(Base, Decl(functionImplementations.ts, 69, 4)) - -var b = function () { ->b : Symbol(b, Decl(functionImplementations.ts, 78, 3), Decl(functionImplementations.ts, 79, 3)) - - return new Base(); return new Derived(); ->Base : Symbol(Base, Decl(functionImplementations.ts, 69, 4)) ->Derived : Symbol(Derived, Decl(functionImplementations.ts, 76, 25)) - -} (); - -// FunctionExpression with no return type annotation with multiple return statements with one a recursive call -var a = function f() { ->a : Symbol(a, Decl(functionImplementations.ts, 4, 3), Decl(functionImplementations.ts, 7, 3), Decl(functionImplementations.ts, 12, 3), Decl(functionImplementations.ts, 24, 3), Decl(functionImplementations.ts, 25, 3), Decl(functionImplementations.ts, 84, 3)) ->f : Symbol(f, Decl(functionImplementations.ts, 84, 7)) - - return new Base(); return new Derived(); return f(); // ? ->Base : Symbol(Base, Decl(functionImplementations.ts, 69, 4)) ->Derived : Symbol(Derived, Decl(functionImplementations.ts, 76, 25)) ->f : Symbol(f, Decl(functionImplementations.ts, 84, 7)) - -} (); - -// FunctionExpression with non -void return type annotation with a single throw statement -undefined === function (): number { ->undefined : Symbol(undefined) - - throw undefined; ->undefined : Symbol(undefined) - -}; - -// Type of 'this' in function implementation is 'any' -function thisFunc() { ->thisFunc : Symbol(thisFunc, Decl(functionImplementations.ts, 91, 2)) - - var x = this; ->x : Symbol(x, Decl(functionImplementations.ts, 95, 7), Decl(functionImplementations.ts, 96, 7)) - - var x: any; ->x : Symbol(x, Decl(functionImplementations.ts, 95, 7), Decl(functionImplementations.ts, 96, 7)) -} - -// Function signature with optional parameter, no type annotation and initializer has initializer's type -function opt1(n = 4) { ->opt1 : Symbol(opt1, Decl(functionImplementations.ts, 97, 1)) ->n : Symbol(n, Decl(functionImplementations.ts, 100, 14)) - - var m = n; ->m : Symbol(m, Decl(functionImplementations.ts, 101, 7), Decl(functionImplementations.ts, 102, 7)) ->n : Symbol(n, Decl(functionImplementations.ts, 100, 14)) - - var m: number; ->m : Symbol(m, Decl(functionImplementations.ts, 101, 7), Decl(functionImplementations.ts, 102, 7)) -} - -// Function signature with optional parameter, no type annotation and initializer has initializer's widened type -function opt2(n = { x: null, y: undefined }) { ->opt2 : Symbol(opt2, Decl(functionImplementations.ts, 103, 1)) ->n : Symbol(n, Decl(functionImplementations.ts, 106, 14)) ->x : Symbol(x, Decl(functionImplementations.ts, 106, 19)) ->y : Symbol(y, Decl(functionImplementations.ts, 106, 28)) ->undefined : Symbol(undefined) - - var m = n; ->m : Symbol(m, Decl(functionImplementations.ts, 107, 7), Decl(functionImplementations.ts, 108, 7)) ->n : Symbol(n, Decl(functionImplementations.ts, 106, 14)) - - var m: { x: any; y: any }; ->m : Symbol(m, Decl(functionImplementations.ts, 107, 7), Decl(functionImplementations.ts, 108, 7)) ->x : Symbol(x, Decl(functionImplementations.ts, 108, 12)) ->y : Symbol(y, Decl(functionImplementations.ts, 108, 20)) -} - -// Function signature with initializer referencing other parameter to the left -function opt3(n: number, m = n) { ->opt3 : Symbol(opt3, Decl(functionImplementations.ts, 109, 1)) ->n : Symbol(n, Decl(functionImplementations.ts, 112, 14)) ->m : Symbol(m, Decl(functionImplementations.ts, 112, 24)) ->n : Symbol(n, Decl(functionImplementations.ts, 112, 14)) - - var y = m; ->y : Symbol(y, Decl(functionImplementations.ts, 113, 7), Decl(functionImplementations.ts, 114, 7)) ->m : Symbol(m, Decl(functionImplementations.ts, 112, 24)) - - var y: number; ->y : Symbol(y, Decl(functionImplementations.ts, 113, 7), Decl(functionImplementations.ts, 114, 7)) -} - -// Function signature with optional parameter has correct codegen -// (tested above) - -// FunctionExpression with non -void return type annotation return with no expression -function f6(): number { ->f6 : Symbol(f6, Decl(functionImplementations.ts, 115, 1)) - - return; -} - -class Derived2 extends Base { private r: string; } ->Derived2 : Symbol(Derived2, Decl(functionImplementations.ts, 123, 1)) ->Base : Symbol(Base, Decl(functionImplementations.ts, 69, 4)) ->r : Symbol(r, Decl(functionImplementations.ts, 125, 29)) - -class AnotherClass { private x } ->AnotherClass : Symbol(AnotherClass, Decl(functionImplementations.ts, 125, 50)) ->x : Symbol(x, Decl(functionImplementations.ts, 126, 20)) - -// if f is a contextually typed function expression, the inferred return type is the union type -// of the types of the return statement expressions in the function body, -// ignoring return statements with no expressions. -var f7: (x: number) => string | number = x => { // should be (x: number) => number | string ->f7 : Symbol(f7, Decl(functionImplementations.ts, 130, 3)) ->x : Symbol(x, Decl(functionImplementations.ts, 130, 9)) ->x : Symbol(x, Decl(functionImplementations.ts, 130, 40)) - - if (x < 0) { return x; } ->x : Symbol(x, Decl(functionImplementations.ts, 130, 40)) ->x : Symbol(x, Decl(functionImplementations.ts, 130, 40)) - - return x.toString(); ->x.toString : Symbol(Number.toString, Decl(lib.d.ts, 458, 18)) ->x : Symbol(x, Decl(functionImplementations.ts, 130, 40)) ->toString : Symbol(Number.toString, Decl(lib.d.ts, 458, 18)) -} -var f8: (x: number) => any = x => { // should be (x: number) => Base ->f8 : Symbol(f8, Decl(functionImplementations.ts, 134, 3)) ->x : Symbol(x, Decl(functionImplementations.ts, 134, 9)) ->x : Symbol(x, Decl(functionImplementations.ts, 134, 28)) - - return new Base(); ->Base : Symbol(Base, Decl(functionImplementations.ts, 69, 4)) - - return new Derived2(); ->Derived2 : Symbol(Derived2, Decl(functionImplementations.ts, 123, 1)) -} -var f9: (x: number) => any = x => { // should be (x: number) => Base ->f9 : Symbol(f9, Decl(functionImplementations.ts, 138, 3)) ->x : Symbol(x, Decl(functionImplementations.ts, 138, 9)) ->x : Symbol(x, Decl(functionImplementations.ts, 138, 28)) - - return new Base(); ->Base : Symbol(Base, Decl(functionImplementations.ts, 69, 4)) - - return new Derived(); ->Derived : Symbol(Derived, Decl(functionImplementations.ts, 76, 25)) - - return new Derived2(); ->Derived2 : Symbol(Derived2, Decl(functionImplementations.ts, 123, 1)) -} -var f10: (x: number) => any = x => { // should be (x: number) => Derived | Derived1 ->f10 : Symbol(f10, Decl(functionImplementations.ts, 143, 3)) ->x : Symbol(x, Decl(functionImplementations.ts, 143, 10)) ->x : Symbol(x, Decl(functionImplementations.ts, 143, 29)) - - return new Derived(); ->Derived : Symbol(Derived, Decl(functionImplementations.ts, 76, 25)) - - return new Derived2(); ->Derived2 : Symbol(Derived2, Decl(functionImplementations.ts, 123, 1)) -} -var f11: (x: number) => any = x => { // should be (x: number) => Base | AnotherClass ->f11 : Symbol(f11, Decl(functionImplementations.ts, 147, 3)) ->x : Symbol(x, Decl(functionImplementations.ts, 147, 10)) ->x : Symbol(x, Decl(functionImplementations.ts, 147, 29)) - - return new Base(); ->Base : Symbol(Base, Decl(functionImplementations.ts, 69, 4)) - - return new AnotherClass(); ->AnotherClass : Symbol(AnotherClass, Decl(functionImplementations.ts, 125, 50)) -} -var f12: (x: number) => any = x => { // should be (x: number) => Base | AnotherClass ->f12 : Symbol(f12, Decl(functionImplementations.ts, 151, 3)) ->x : Symbol(x, Decl(functionImplementations.ts, 151, 10)) ->x : Symbol(x, Decl(functionImplementations.ts, 151, 29)) - - return new Base(); ->Base : Symbol(Base, Decl(functionImplementations.ts, 69, 4)) - - return; // should be ignored - return new AnotherClass(); ->AnotherClass : Symbol(AnotherClass, Decl(functionImplementations.ts, 125, 50)) -} diff --git a/tests/baselines/reference/functionImplementations.types b/tests/baselines/reference/functionImplementations.types deleted file mode 100644 index 1398e2974f0..00000000000 --- a/tests/baselines/reference/functionImplementations.types +++ /dev/null @@ -1,416 +0,0 @@ -=== tests/cases/conformance/functions/functionImplementations.ts === -// FunctionExpression with no return type annotation and no return statement returns void -var v: void = function () { } (); ->v : void ->function () { } () : void ->function () { } : () => void - -// FunctionExpression f with no return type annotation and directly references f in its body returns any -var a: any = function f() { ->a : any ->function f() { return f;} : () => any ->f : () => any - - return f; ->f : () => any - -}; -var a: any = function f() { ->a : any ->function f() { return f();} : () => any ->f : () => any - - return f(); ->f() : any ->f : () => any - -}; - -// FunctionExpression f with no return type annotation and indirectly references f in its body returns any -var a: any = function f() { ->a : any ->function f() { var x = f; return x;} : () => any ->f : () => any - - var x = f; ->x : () => any ->f : () => any - - return x; ->x : () => any - -}; - -// Two mutually recursive function implementations with no return type annotations -function rec1() { ->rec1 : () => any - - return rec2(); ->rec2() : any ->rec2 : () => any -} -function rec2() { ->rec2 : () => any - - return rec1(); ->rec1() : any ->rec1 : () => any -} -var a = rec1(); ->a : any ->rec1() : any ->rec1 : () => any - -var a = rec2(); ->a : any ->rec2() : any ->rec2 : () => any - -// Two mutually recursive function implementations with return type annotation in one -function rec3(): number { ->rec3 : () => number - - return rec4(); ->rec4() : number ->rec4 : () => number -} -function rec4() { ->rec4 : () => number - - return rec3(); ->rec3() : number ->rec3 : () => number -} -var n: number; ->n : number - -var n = rec3(); ->n : number ->rec3() : number ->rec3 : () => number - -var n = rec4(); ->n : number ->rec4() : number ->rec4 : () => number - -// FunctionExpression with no return type annotation and returns a number -var n = function () { ->n : number ->function () { return 3;} () : number ->function () { return 3;} : () => number - - return 3; ->3 : number - -} (); - -// FunctionExpression with no return type annotation and returns null -var nu = null; ->nu : any ->null : null - -var nu = function () { ->nu : any ->function () { return null;} () : any ->function () { return null;} : () => any - - return null; ->null : null - -} (); - -// FunctionExpression with no return type annotation and returns undefined -var un = undefined; ->un : any ->undefined : undefined - -var un = function () { ->un : any ->function () { return undefined;} () : any ->function () { return undefined;} : () => any - - return undefined; ->undefined : undefined - -} (); - -// FunctionExpression with no return type annotation and returns a type parameter type -var n = function (x: T) { ->n : number ->function (x: T) { return x;} (4) : number ->function (x: T) { return x;} : (x: T) => T ->T : T ->x : T ->T : T - - return x; ->x : T - -} (4); ->4 : number - -// FunctionExpression with no return type annotation and returns a constrained type parameter type -var n = function (x: T) { ->n : number ->function (x: T) { return x;} (4) : number ->function (x: T) { return x;} : (x: T) => T ->T : T ->x : T ->T : T - - return x; ->x : T - -} (4); ->4 : number - -// FunctionExpression with no return type annotation with multiple return statements with identical types -var n = function () { ->n : number ->function () { return 3; return 5;}() : number ->function () { return 3; return 5;} : () => number - - return 3; ->3 : number - - return 5; ->5 : number - -}(); - -// Otherwise, the inferred return type is the first of the types of the return statement expressions -// in the function body that is a supertype of each of the others, -// ignoring return statements with no expressions. -// A compile - time error occurs if no return statement expression has a type that is a supertype of each of the others. -// FunctionExpression with no return type annotation with multiple return statements with subtype relation between returns -class Base { private m; } ->Base : Base ->m : any - -class Derived extends Base { private q; } ->Derived : Derived ->Base : Base ->q : any - -var b: Base; ->b : Base ->Base : Base - -var b = function () { ->b : Base ->function () { return new Base(); return new Derived();} () : Base ->function () { return new Base(); return new Derived();} : () => Base - - return new Base(); return new Derived(); ->new Base() : Base ->Base : typeof Base ->new Derived() : Derived ->Derived : typeof Derived - -} (); - -// FunctionExpression with no return type annotation with multiple return statements with one a recursive call -var a = function f() { ->a : any ->function f() { return new Base(); return new Derived(); return f(); // ?} () : any ->function f() { return new Base(); return new Derived(); return f(); // ?} : () => any ->f : () => any - - return new Base(); return new Derived(); return f(); // ? ->new Base() : Base ->Base : typeof Base ->new Derived() : Derived ->Derived : typeof Derived ->f() : any ->f : () => any - -} (); - -// FunctionExpression with non -void return type annotation with a single throw statement -undefined === function (): number { ->undefined === function (): number { throw undefined;} : boolean ->undefined : undefined ->function (): number { throw undefined;} : () => number - - throw undefined; ->undefined : undefined - -}; - -// Type of 'this' in function implementation is 'any' -function thisFunc() { ->thisFunc : () => void - - var x = this; ->x : any ->this : any - - var x: any; ->x : any -} - -// Function signature with optional parameter, no type annotation and initializer has initializer's type -function opt1(n = 4) { ->opt1 : (n?: number) => void ->n : number ->4 : number - - var m = n; ->m : number ->n : number - - var m: number; ->m : number -} - -// Function signature with optional parameter, no type annotation and initializer has initializer's widened type -function opt2(n = { x: null, y: undefined }) { ->opt2 : (n?: { x: any; y: any; }) => void ->n : { x: any; y: any; } ->{ x: null, y: undefined } : { x: null; y: undefined; } ->x : null ->null : null ->y : undefined ->undefined : undefined - - var m = n; ->m : { x: any; y: any; } ->n : { x: any; y: any; } - - var m: { x: any; y: any }; ->m : { x: any; y: any; } ->x : any ->y : any -} - -// Function signature with initializer referencing other parameter to the left -function opt3(n: number, m = n) { ->opt3 : (n: number, m?: number) => void ->n : number ->m : number ->n : number - - var y = m; ->y : number ->m : number - - var y: number; ->y : number -} - -// Function signature with optional parameter has correct codegen -// (tested above) - -// FunctionExpression with non -void return type annotation return with no expression -function f6(): number { ->f6 : () => number - - return; -} - -class Derived2 extends Base { private r: string; } ->Derived2 : Derived2 ->Base : Base ->r : string - -class AnotherClass { private x } ->AnotherClass : AnotherClass ->x : any - -// if f is a contextually typed function expression, the inferred return type is the union type -// of the types of the return statement expressions in the function body, -// ignoring return statements with no expressions. -var f7: (x: number) => string | number = x => { // should be (x: number) => number | string ->f7 : (x: number) => string | number ->x : number ->x => { // should be (x: number) => number | string if (x < 0) { return x; } return x.toString();} : (x: number) => number | string ->x : number - - if (x < 0) { return x; } ->x < 0 : boolean ->x : number ->0 : number ->x : number - - return x.toString(); ->x.toString() : string ->x.toString : (radix?: number) => string ->x : number ->toString : (radix?: number) => string -} -var f8: (x: number) => any = x => { // should be (x: number) => Base ->f8 : (x: number) => any ->x : number ->x => { // should be (x: number) => Base return new Base(); return new Derived2();} : (x: number) => Base ->x : number - - return new Base(); ->new Base() : Base ->Base : typeof Base - - return new Derived2(); ->new Derived2() : Derived2 ->Derived2 : typeof Derived2 -} -var f9: (x: number) => any = x => { // should be (x: number) => Base ->f9 : (x: number) => any ->x : number ->x => { // should be (x: number) => Base return new Base(); return new Derived(); return new Derived2();} : (x: number) => Base ->x : number - - return new Base(); ->new Base() : Base ->Base : typeof Base - - return new Derived(); ->new Derived() : Derived ->Derived : typeof Derived - - return new Derived2(); ->new Derived2() : Derived2 ->Derived2 : typeof Derived2 -} -var f10: (x: number) => any = x => { // should be (x: number) => Derived | Derived1 ->f10 : (x: number) => any ->x : number ->x => { // should be (x: number) => Derived | Derived1 return new Derived(); return new Derived2();} : (x: number) => Derived | Derived2 ->x : number - - return new Derived(); ->new Derived() : Derived ->Derived : typeof Derived - - return new Derived2(); ->new Derived2() : Derived2 ->Derived2 : typeof Derived2 -} -var f11: (x: number) => any = x => { // should be (x: number) => Base | AnotherClass ->f11 : (x: number) => any ->x : number ->x => { // should be (x: number) => Base | AnotherClass return new Base(); return new AnotherClass();} : (x: number) => Base | AnotherClass ->x : number - - return new Base(); ->new Base() : Base ->Base : typeof Base - - return new AnotherClass(); ->new AnotherClass() : AnotherClass ->AnotherClass : typeof AnotherClass -} -var f12: (x: number) => any = x => { // should be (x: number) => Base | AnotherClass ->f12 : (x: number) => any ->x : number ->x => { // should be (x: number) => Base | AnotherClass return new Base(); return; // should be ignored return new AnotherClass();} : (x: number) => Base | AnotherClass ->x : number - - return new Base(); ->new Base() : Base ->Base : typeof Base - - return; // should be ignored - return new AnotherClass(); ->new AnotherClass() : AnotherClass ->AnotherClass : typeof AnotherClass -} diff --git a/tests/baselines/reference/functionOverloads12.errors.txt b/tests/baselines/reference/functionOverloads12.errors.txt new file mode 100644 index 00000000000..fac5cd71afe --- /dev/null +++ b/tests/baselines/reference/functionOverloads12.errors.txt @@ -0,0 +1,10 @@ +tests/cases/compiler/functionOverloads12.ts(3,48): error TS7027: Unreachable code detected. + + +==== tests/cases/compiler/functionOverloads12.ts (1 errors) ==== + function foo():string; + function foo():number; + function foo():any { if (true) return ""; else return 0;} + ~~~~~~ +!!! error TS7027: Unreachable code detected. + \ No newline at end of file diff --git a/tests/baselines/reference/functionOverloads12.symbols b/tests/baselines/reference/functionOverloads12.symbols deleted file mode 100644 index 583e7f5c045..00000000000 --- a/tests/baselines/reference/functionOverloads12.symbols +++ /dev/null @@ -1,10 +0,0 @@ -=== tests/cases/compiler/functionOverloads12.ts === -function foo():string; ->foo : Symbol(foo, Decl(functionOverloads12.ts, 0, 0), Decl(functionOverloads12.ts, 0, 22), Decl(functionOverloads12.ts, 1, 22)) - -function foo():number; ->foo : Symbol(foo, Decl(functionOverloads12.ts, 0, 0), Decl(functionOverloads12.ts, 0, 22), Decl(functionOverloads12.ts, 1, 22)) - -function foo():any { if (true) return ""; else return 0;} ->foo : Symbol(foo, Decl(functionOverloads12.ts, 0, 0), Decl(functionOverloads12.ts, 0, 22), Decl(functionOverloads12.ts, 1, 22)) - diff --git a/tests/baselines/reference/functionOverloads12.types b/tests/baselines/reference/functionOverloads12.types deleted file mode 100644 index 20f5ee5d556..00000000000 --- a/tests/baselines/reference/functionOverloads12.types +++ /dev/null @@ -1,13 +0,0 @@ -=== tests/cases/compiler/functionOverloads12.ts === -function foo():string; ->foo : { (): string; (): number; } - -function foo():number; ->foo : { (): string; (): number; } - -function foo():any { if (true) return ""; else return 0;} ->foo : { (): string; (): number; } ->true : boolean ->"" : string ->0 : number - diff --git a/tests/baselines/reference/functionReturn.errors.txt b/tests/baselines/reference/functionReturn.errors.txt new file mode 100644 index 00000000000..d5f78b2534d --- /dev/null +++ b/tests/baselines/reference/functionReturn.errors.txt @@ -0,0 +1,23 @@ +tests/cases/compiler/functionReturn.ts(9,5): error TS7027: Unreachable code detected. +tests/cases/compiler/functionReturn.ts(13,5): error TS7027: Unreachable code detected. + + +==== tests/cases/compiler/functionReturn.ts (2 errors) ==== + function f0(): void { } + function f1() { + var n: any = f0(); + } + function f2(): any { } + function f3(): string { return; } + function f4(): string { + return ''; + return; + ~~~~~~ +!!! error TS7027: Unreachable code detected. + } + function f5(): string { + return ''; + return undefined; + ~~~~~~ +!!! error TS7027: Unreachable code detected. + } \ No newline at end of file diff --git a/tests/baselines/reference/functionReturn.symbols b/tests/baselines/reference/functionReturn.symbols deleted file mode 100644 index 9c6b794b3d0..00000000000 --- a/tests/baselines/reference/functionReturn.symbols +++ /dev/null @@ -1,30 +0,0 @@ -=== tests/cases/compiler/functionReturn.ts === -function f0(): void { } ->f0 : Symbol(f0, Decl(functionReturn.ts, 0, 0)) - -function f1() { ->f1 : Symbol(f1, Decl(functionReturn.ts, 0, 23)) - - var n: any = f0(); ->n : Symbol(n, Decl(functionReturn.ts, 2, 7)) ->f0 : Symbol(f0, Decl(functionReturn.ts, 0, 0)) -} -function f2(): any { } ->f2 : Symbol(f2, Decl(functionReturn.ts, 3, 1)) - -function f3(): string { return; } ->f3 : Symbol(f3, Decl(functionReturn.ts, 4, 22)) - -function f4(): string { ->f4 : Symbol(f4, Decl(functionReturn.ts, 5, 33)) - - return ''; - return; -} -function f5(): string { ->f5 : Symbol(f5, Decl(functionReturn.ts, 9, 1)) - - return ''; - return undefined; ->undefined : Symbol(undefined) -} diff --git a/tests/baselines/reference/functionReturn.types b/tests/baselines/reference/functionReturn.types deleted file mode 100644 index 6fc9d680db9..00000000000 --- a/tests/baselines/reference/functionReturn.types +++ /dev/null @@ -1,35 +0,0 @@ -=== tests/cases/compiler/functionReturn.ts === -function f0(): void { } ->f0 : () => void - -function f1() { ->f1 : () => void - - var n: any = f0(); ->n : any ->f0() : void ->f0 : () => void -} -function f2(): any { } ->f2 : () => any - -function f3(): string { return; } ->f3 : () => string - -function f4(): string { ->f4 : () => string - - return ''; ->'' : string - - return; -} -function f5(): string { ->f5 : () => string - - return ''; ->'' : string - - return undefined; ->undefined : undefined -} diff --git a/tests/baselines/reference/functionWithMultipleReturnStatements.errors.txt b/tests/baselines/reference/functionWithMultipleReturnStatements.errors.txt index 8a57d8e08e6..4c21fc6814c 100644 --- a/tests/baselines/reference/functionWithMultipleReturnStatements.errors.txt +++ b/tests/baselines/reference/functionWithMultipleReturnStatements.errors.txt @@ -1,15 +1,20 @@ tests/cases/conformance/types/typeRelationships/bestCommonType/functionWithMultipleReturnStatements.ts(4,10): error TS2354: No best common type exists among return expressions. +tests/cases/conformance/types/typeRelationships/bestCommonType/functionWithMultipleReturnStatements.ts(8,9): error TS7027: Unreachable code detected. tests/cases/conformance/types/typeRelationships/bestCommonType/functionWithMultipleReturnStatements.ts(12,10): error TS2354: No best common type exists among return expressions. +tests/cases/conformance/types/typeRelationships/bestCommonType/functionWithMultipleReturnStatements.ts(15,12): error TS7027: Unreachable code detected. tests/cases/conformance/types/typeRelationships/bestCommonType/functionWithMultipleReturnStatements.ts(22,10): error TS2354: No best common type exists among return expressions. tests/cases/conformance/types/typeRelationships/bestCommonType/functionWithMultipleReturnStatements.ts(31,10): error TS2354: No best common type exists among return expressions. tests/cases/conformance/types/typeRelationships/bestCommonType/functionWithMultipleReturnStatements.ts(43,10): error TS2354: No best common type exists among return expressions. +tests/cases/conformance/types/typeRelationships/bestCommonType/functionWithMultipleReturnStatements.ts(45,5): error TS7027: Unreachable code detected. tests/cases/conformance/types/typeRelationships/bestCommonType/functionWithMultipleReturnStatements.ts(48,10): error TS2354: No best common type exists among return expressions. +tests/cases/conformance/types/typeRelationships/bestCommonType/functionWithMultipleReturnStatements.ts(52,9): error TS7027: Unreachable code detected. tests/cases/conformance/types/typeRelationships/bestCommonType/functionWithMultipleReturnStatements.ts(56,10): error TS2354: No best common type exists among return expressions. tests/cases/conformance/types/typeRelationships/bestCommonType/functionWithMultipleReturnStatements.ts(56,13): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. tests/cases/conformance/types/typeRelationships/bestCommonType/functionWithMultipleReturnStatements.ts(56,26): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. +tests/cases/conformance/types/typeRelationships/bestCommonType/functionWithMultipleReturnStatements.ts(60,9): error TS7027: Unreachable code detected. -==== tests/cases/conformance/types/typeRelationships/bestCommonType/functionWithMultipleReturnStatements.ts (9 errors) ==== +==== tests/cases/conformance/types/typeRelationships/bestCommonType/functionWithMultipleReturnStatements.ts (14 errors) ==== // return type of a function with multiple returns is the BCT of each return statement // it is an error if there is no single BCT, these are error cases @@ -20,6 +25,8 @@ tests/cases/conformance/types/typeRelationships/bestCommonType/functionWithMulti return 1; } else { return ''; + ~~~~~~ +!!! error TS7027: Unreachable code detected. } } @@ -29,6 +36,8 @@ tests/cases/conformance/types/typeRelationships/bestCommonType/functionWithMulti if (true) { return 1; } else if (false) { + ~~ +!!! error TS7027: Unreachable code detected. return 2; } else { return ''; @@ -65,6 +74,8 @@ tests/cases/conformance/types/typeRelationships/bestCommonType/functionWithMulti !!! error TS2354: No best common type exists among return expressions. return 1; return ''; + ~~~~~~ +!!! error TS7027: Unreachable code detected. } function f6(x: T, y:U) { @@ -74,6 +85,8 @@ tests/cases/conformance/types/typeRelationships/bestCommonType/functionWithMulti return x; } else { return y; + ~~~~~~ +!!! error TS7027: Unreachable code detected. } } @@ -88,6 +101,8 @@ tests/cases/conformance/types/typeRelationships/bestCommonType/functionWithMulti return x; } else { return y; + ~~~~~~ +!!! error TS7027: Unreachable code detected. } } \ No newline at end of file diff --git a/tests/baselines/reference/functionWithMultipleReturnStatements2.errors.txt b/tests/baselines/reference/functionWithMultipleReturnStatements2.errors.txt index bbaa5a85578..a965a1a9a99 100644 --- a/tests/baselines/reference/functionWithMultipleReturnStatements2.errors.txt +++ b/tests/baselines/reference/functionWithMultipleReturnStatements2.errors.txt @@ -1,8 +1,16 @@ +tests/cases/conformance/types/typeRelationships/bestCommonType/functionWithMultipleReturnStatements2.ts(8,9): error TS7027: Unreachable code detected. +tests/cases/conformance/types/typeRelationships/bestCommonType/functionWithMultipleReturnStatements2.ts(15,12): error TS7027: Unreachable code detected. +tests/cases/conformance/types/typeRelationships/bestCommonType/functionWithMultipleReturnStatements2.ts(36,5): error TS7027: Unreachable code detected. +tests/cases/conformance/types/typeRelationships/bestCommonType/functionWithMultipleReturnStatements2.ts(43,9): error TS7027: Unreachable code detected. tests/cases/conformance/types/typeRelationships/bestCommonType/functionWithMultipleReturnStatements2.ts(58,10): error TS2354: No best common type exists among return expressions. +tests/cases/conformance/types/typeRelationships/bestCommonType/functionWithMultipleReturnStatements2.ts(62,9): error TS7027: Unreachable code detected. tests/cases/conformance/types/typeRelationships/bestCommonType/functionWithMultipleReturnStatements2.ts(67,10): error TS2354: No best common type exists among return expressions. +tests/cases/conformance/types/typeRelationships/bestCommonType/functionWithMultipleReturnStatements2.ts(71,9): error TS7027: Unreachable code detected. +tests/cases/conformance/types/typeRelationships/bestCommonType/functionWithMultipleReturnStatements2.ts(80,9): error TS7027: Unreachable code detected. +tests/cases/conformance/types/typeRelationships/bestCommonType/functionWithMultipleReturnStatements2.ts(89,9): error TS7027: Unreachable code detected. -==== tests/cases/conformance/types/typeRelationships/bestCommonType/functionWithMultipleReturnStatements2.ts (2 errors) ==== +==== tests/cases/conformance/types/typeRelationships/bestCommonType/functionWithMultipleReturnStatements2.ts (10 errors) ==== // return type of a function with multiple returns is the BCT of each return statement // no errors expected here @@ -11,6 +19,8 @@ tests/cases/conformance/types/typeRelationships/bestCommonType/functionWithMulti return 1; } else { return null; + ~~~~~~ +!!! error TS7027: Unreachable code detected. } } @@ -18,6 +28,8 @@ tests/cases/conformance/types/typeRelationships/bestCommonType/functionWithMulti if (true) { return 1; } else if (false) { + ~~ +!!! error TS7027: Unreachable code detected. return null; } else { return 2; @@ -39,6 +51,8 @@ tests/cases/conformance/types/typeRelationships/bestCommonType/functionWithMulti function f5() { return 1; return new Object(); + ~~~~~~ +!!! error TS7027: Unreachable code detected. } function f6(x: T) { @@ -46,6 +60,8 @@ tests/cases/conformance/types/typeRelationships/bestCommonType/functionWithMulti return x; } else { return null; + ~~~~~~ +!!! error TS7027: Unreachable code detected. } } @@ -67,6 +83,8 @@ tests/cases/conformance/types/typeRelationships/bestCommonType/functionWithMulti return a; } else { return b; + ~~~~~~ +!!! error TS7027: Unreachable code detected. } } @@ -78,6 +96,8 @@ tests/cases/conformance/types/typeRelationships/bestCommonType/functionWithMulti return b; } else { return a; + ~~~~~~ +!!! error TS7027: Unreachable code detected. } } @@ -87,6 +107,8 @@ tests/cases/conformance/types/typeRelationships/bestCommonType/functionWithMulti return (x: number) => { } } else { return (x: Object) => { } + ~~~~~~ +!!! error TS7027: Unreachable code detected. } } @@ -96,5 +118,7 @@ tests/cases/conformance/types/typeRelationships/bestCommonType/functionWithMulti return (x: Object) => { } } else { return (x: number) => { } + ~~~~~~ +!!! error TS7027: Unreachable code detected. } } \ No newline at end of file diff --git a/tests/baselines/reference/functionWithNoBestCommonType1.errors.txt b/tests/baselines/reference/functionWithNoBestCommonType1.errors.txt index 3c8fef3eb49..4cc440ee397 100644 --- a/tests/baselines/reference/functionWithNoBestCommonType1.errors.txt +++ b/tests/baselines/reference/functionWithNoBestCommonType1.errors.txt @@ -1,12 +1,15 @@ tests/cases/compiler/functionWithNoBestCommonType1.ts(1,10): error TS2354: No best common type exists among return expressions. +tests/cases/compiler/functionWithNoBestCommonType1.ts(3,5): error TS7027: Unreachable code detected. -==== tests/cases/compiler/functionWithNoBestCommonType1.ts (1 errors) ==== +==== tests/cases/compiler/functionWithNoBestCommonType1.ts (2 errors) ==== function foo() { ~~~ !!! error TS2354: No best common type exists among return expressions. return true; return bar(); + ~~~~~~ +!!! error TS7027: Unreachable code detected. } function bar(): void { diff --git a/tests/baselines/reference/functionWithNoBestCommonType2.errors.txt b/tests/baselines/reference/functionWithNoBestCommonType2.errors.txt index 981e330d9b5..a93161b27b8 100644 --- a/tests/baselines/reference/functionWithNoBestCommonType2.errors.txt +++ b/tests/baselines/reference/functionWithNoBestCommonType2.errors.txt @@ -1,12 +1,15 @@ tests/cases/compiler/functionWithNoBestCommonType2.ts(1,9): error TS2354: No best common type exists among return expressions. +tests/cases/compiler/functionWithNoBestCommonType2.ts(3,4): error TS7027: Unreachable code detected. -==== tests/cases/compiler/functionWithNoBestCommonType2.ts (1 errors) ==== +==== tests/cases/compiler/functionWithNoBestCommonType2.ts (2 errors) ==== var v = function () { ~~~~~~~~ !!! error TS2354: No best common type exists among return expressions. return true; return bar(); + ~~~~~~ +!!! error TS7027: Unreachable code detected. }; function bar(): void { diff --git a/tests/baselines/reference/functionsMissingReturnStatementsAndExpressions.errors.txt b/tests/baselines/reference/functionsMissingReturnStatementsAndExpressions.errors.txt index 88b0c8d5e14..3a128de4cee 100644 --- a/tests/baselines/reference/functionsMissingReturnStatementsAndExpressions.errors.txt +++ b/tests/baselines/reference/functionsMissingReturnStatementsAndExpressions.errors.txt @@ -1,9 +1,12 @@ tests/cases/compiler/functionsMissingReturnStatementsAndExpressions.ts(2,16): error TS2355: A function whose declared type is neither 'void' nor 'any' must return a value. +tests/cases/compiler/functionsMissingReturnStatementsAndExpressions.ts(68,5): error TS7027: Unreachable code detected. +tests/cases/compiler/functionsMissingReturnStatementsAndExpressions.ts(74,5): error TS7027: Unreachable code detected. tests/cases/compiler/functionsMissingReturnStatementsAndExpressions.ts(94,16): error TS2378: A 'get' accessor must return a value. +tests/cases/compiler/functionsMissingReturnStatementsAndExpressions.ts(116,9): error TS7027: Unreachable code detected. tests/cases/compiler/functionsMissingReturnStatementsAndExpressions.ts(117,5): error TS1003: Identifier expected. -==== tests/cases/compiler/functionsMissingReturnStatementsAndExpressions.ts (3 errors) ==== +==== tests/cases/compiler/functionsMissingReturnStatementsAndExpressions.ts (6 errors) ==== function f1(): string { ~~~~~~ @@ -74,12 +77,16 @@ tests/cases/compiler/functionsMissingReturnStatementsAndExpressions.ts(117,5): e // if no return statements are present but we are annotated. throw undefined; throw null; + ~~~~~ +!!! error TS7027: Unreachable code detected. } function f15(): number { // Fine, since we have a return statement somewhere. throw undefined; throw null; + ~~~~~ +!!! error TS7027: Unreachable code detected. return; } @@ -124,6 +131,8 @@ tests/cases/compiler/functionsMissingReturnStatementsAndExpressions.ts(117,5): e // if no return statements are present but we are a get accessor. throw null; throw undefined. + ~~~~~ +!!! error TS7027: Unreachable code detected. } ~ !!! error TS1003: Identifier expected. diff --git a/tests/baselines/reference/generatedContextualTyping.errors.txt b/tests/baselines/reference/generatedContextualTyping.errors.txt new file mode 100644 index 00000000000..a2f95cdcb23 --- /dev/null +++ b/tests/baselines/reference/generatedContextualTyping.errors.txt @@ -0,0 +1,393 @@ +tests/cases/conformance/expressions/contextualTyping/generatedContextualTyping.ts(150,56): error TS7027: Unreachable code detected. +tests/cases/conformance/expressions/contextualTyping/generatedContextualTyping.ts(151,72): error TS7027: Unreachable code detected. +tests/cases/conformance/expressions/contextualTyping/generatedContextualTyping.ts(152,78): error TS7027: Unreachable code detected. +tests/cases/conformance/expressions/contextualTyping/generatedContextualTyping.ts(153,59): error TS7027: Unreachable code detected. +tests/cases/conformance/expressions/contextualTyping/generatedContextualTyping.ts(154,75): error TS7027: Unreachable code detected. +tests/cases/conformance/expressions/contextualTyping/generatedContextualTyping.ts(155,81): error TS7027: Unreachable code detected. +tests/cases/conformance/expressions/contextualTyping/generatedContextualTyping.ts(156,44): error TS7027: Unreachable code detected. +tests/cases/conformance/expressions/contextualTyping/generatedContextualTyping.ts(157,49): error TS7027: Unreachable code detected. +tests/cases/conformance/expressions/contextualTyping/generatedContextualTyping.ts(158,60): error TS7027: Unreachable code detected. +tests/cases/conformance/expressions/contextualTyping/generatedContextualTyping.ts(159,59): error TS7027: Unreachable code detected. +tests/cases/conformance/expressions/contextualTyping/generatedContextualTyping.ts(160,84): error TS7027: Unreachable code detected. +tests/cases/conformance/expressions/contextualTyping/generatedContextualTyping.ts(161,77): error TS7027: Unreachable code detected. + + +==== tests/cases/conformance/expressions/contextualTyping/generatedContextualTyping.ts (12 errors) ==== + class Base { private p; } + class Derived1 extends Base { private m; } + class Derived2 extends Base { private n; } + interface Genric { func(n: T[]); } + var b = new Base(), d1 = new Derived1(), d2 = new Derived2(); + var x1: () => Base[] = () => [d1, d2]; + var x2: () => Base[] = function() { return [d1, d2] }; + var x3: () => Base[] = function named() { return [d1, d2] }; + var x4: { (): Base[]; } = () => [d1, d2]; + var x5: { (): Base[]; } = function() { return [d1, d2] }; + var x6: { (): Base[]; } = function named() { return [d1, d2] }; + var x7: Base[] = [d1, d2]; + var x8: Array = [d1, d2]; + var x9: { [n: number]: Base; } = [d1, d2]; + var x10: {n: Base[]; } = { n: [d1, d2] }; + var x11: (s: Base[]) => any = n => { var n: Base[]; return null; }; + var x12: Genric = { func: n => { return [d1, d2]; } }; + class x13 { member: () => Base[] = () => [d1, d2] } + class x14 { member: () => Base[] = function() { return [d1, d2] } } + class x15 { member: () => Base[] = function named() { return [d1, d2] } } + class x16 { member: { (): Base[]; } = () => [d1, d2] } + class x17 { member: { (): Base[]; } = function() { return [d1, d2] } } + class x18 { member: { (): Base[]; } = function named() { return [d1, d2] } } + class x19 { member: Base[] = [d1, d2] } + class x20 { member: Array = [d1, d2] } + class x21 { member: { [n: number]: Base; } = [d1, d2] } + class x22 { member: {n: Base[]; } = { n: [d1, d2] } } + class x23 { member: (s: Base[]) => any = n => { var n: Base[]; return null; } } + class x24 { member: Genric = { func: n => { return [d1, d2]; } } } + class x25 { private member: () => Base[] = () => [d1, d2] } + class x26 { private member: () => Base[] = function() { return [d1, d2] } } + class x27 { private member: () => Base[] = function named() { return [d1, d2] } } + class x28 { private member: { (): Base[]; } = () => [d1, d2] } + class x29 { private member: { (): Base[]; } = function() { return [d1, d2] } } + class x30 { private member: { (): Base[]; } = function named() { return [d1, d2] } } + class x31 { private member: Base[] = [d1, d2] } + class x32 { private member: Array = [d1, d2] } + class x33 { private member: { [n: number]: Base; } = [d1, d2] } + class x34 { private member: {n: Base[]; } = { n: [d1, d2] } } + class x35 { private member: (s: Base[]) => any = n => { var n: Base[]; return null; } } + class x36 { private member: Genric = { func: n => { return [d1, d2]; } } } + class x37 { public member: () => Base[] = () => [d1, d2] } + class x38 { public member: () => Base[] = function() { return [d1, d2] } } + class x39 { public member: () => Base[] = function named() { return [d1, d2] } } + class x40 { public member: { (): Base[]; } = () => [d1, d2] } + class x41 { public member: { (): Base[]; } = function() { return [d1, d2] } } + class x42 { public member: { (): Base[]; } = function named() { return [d1, d2] } } + class x43 { public member: Base[] = [d1, d2] } + class x44 { public member: Array = [d1, d2] } + class x45 { public member: { [n: number]: Base; } = [d1, d2] } + class x46 { public member: {n: Base[]; } = { n: [d1, d2] } } + class x47 { public member: (s: Base[]) => any = n => { var n: Base[]; return null; } } + class x48 { public member: Genric = { func: n => { return [d1, d2]; } } } + class x49 { static member: () => Base[] = () => [d1, d2] } + class x50 { static member: () => Base[] = function() { return [d1, d2] } } + class x51 { static member: () => Base[] = function named() { return [d1, d2] } } + class x52 { static member: { (): Base[]; } = () => [d1, d2] } + class x53 { static member: { (): Base[]; } = function() { return [d1, d2] } } + class x54 { static member: { (): Base[]; } = function named() { return [d1, d2] } } + class x55 { static member: Base[] = [d1, d2] } + class x56 { static member: Array = [d1, d2] } + class x57 { static member: { [n: number]: Base; } = [d1, d2] } + class x58 { static member: {n: Base[]; } = { n: [d1, d2] } } + class x59 { static member: (s: Base[]) => any = n => { var n: Base[]; return null; } } + class x60 { static member: Genric = { func: n => { return [d1, d2]; } } } + class x61 { private static member: () => Base[] = () => [d1, d2] } + class x62 { private static member: () => Base[] = function() { return [d1, d2] } } + class x63 { private static member: () => Base[] = function named() { return [d1, d2] } } + class x64 { private static member: { (): Base[]; } = () => [d1, d2] } + class x65 { private static member: { (): Base[]; } = function() { return [d1, d2] } } + class x66 { private static member: { (): Base[]; } = function named() { return [d1, d2] } } + class x67 { private static member: Base[] = [d1, d2] } + class x68 { private static member: Array = [d1, d2] } + class x69 { private static member: { [n: number]: Base; } = [d1, d2] } + class x70 { private static member: {n: Base[]; } = { n: [d1, d2] } } + class x71 { private static member: (s: Base[]) => any = n => { var n: Base[]; return null; } } + class x72 { private static member: Genric = { func: n => { return [d1, d2]; } } } + class x73 { public static member: () => Base[] = () => [d1, d2] } + class x74 { public static member: () => Base[] = function() { return [d1, d2] } } + class x75 { public static member: () => Base[] = function named() { return [d1, d2] } } + class x76 { public static member: { (): Base[]; } = () => [d1, d2] } + class x77 { public static member: { (): Base[]; } = function() { return [d1, d2] } } + class x78 { public static member: { (): Base[]; } = function named() { return [d1, d2] } } + class x79 { public static member: Base[] = [d1, d2] } + class x80 { public static member: Array = [d1, d2] } + class x81 { public static member: { [n: number]: Base; } = [d1, d2] } + class x82 { public static member: {n: Base[]; } = { n: [d1, d2] } } + class x83 { public static member: (s: Base[]) => any = n => { var n: Base[]; return null; } } + class x84 { public static member: Genric = { func: n => { return [d1, d2]; } } } + class x85 { constructor(parm: () => Base[] = () => [d1, d2]) { } } + class x86 { constructor(parm: () => Base[] = function() { return [d1, d2] }) { } } + class x87 { constructor(parm: () => Base[] = function named() { return [d1, d2] }) { } } + class x88 { constructor(parm: { (): Base[]; } = () => [d1, d2]) { } } + class x89 { constructor(parm: { (): Base[]; } = function() { return [d1, d2] }) { } } + class x90 { constructor(parm: { (): Base[]; } = function named() { return [d1, d2] }) { } } + class x91 { constructor(parm: Base[] = [d1, d2]) { } } + class x92 { constructor(parm: Array = [d1, d2]) { } } + class x93 { constructor(parm: { [n: number]: Base; } = [d1, d2]) { } } + class x94 { constructor(parm: {n: Base[]; } = { n: [d1, d2] }) { } } + class x95 { constructor(parm: (s: Base[]) => any = n => { var n: Base[]; return null; }) { } } + class x96 { constructor(parm: Genric = { func: n => { return [d1, d2]; } }) { } } + class x97 { constructor(public parm: () => Base[] = () => [d1, d2]) { } } + class x98 { constructor(public parm: () => Base[] = function() { return [d1, d2] }) { } } + class x99 { constructor(public parm: () => Base[] = function named() { return [d1, d2] }) { } } + class x100 { constructor(public parm: { (): Base[]; } = () => [d1, d2]) { } } + class x101 { constructor(public parm: { (): Base[]; } = function() { return [d1, d2] }) { } } + class x102 { constructor(public parm: { (): Base[]; } = function named() { return [d1, d2] }) { } } + class x103 { constructor(public parm: Base[] = [d1, d2]) { } } + class x104 { constructor(public parm: Array = [d1, d2]) { } } + class x105 { constructor(public parm: { [n: number]: Base; } = [d1, d2]) { } } + class x106 { constructor(public parm: {n: Base[]; } = { n: [d1, d2] }) { } } + class x107 { constructor(public parm: (s: Base[]) => any = n => { var n: Base[]; return null; }) { } } + class x108 { constructor(public parm: Genric = { func: n => { return [d1, d2]; } }) { } } + class x109 { constructor(private parm: () => Base[] = () => [d1, d2]) { } } + class x110 { constructor(private parm: () => Base[] = function() { return [d1, d2] }) { } } + class x111 { constructor(private parm: () => Base[] = function named() { return [d1, d2] }) { } } + class x112 { constructor(private parm: { (): Base[]; } = () => [d1, d2]) { } } + class x113 { constructor(private parm: { (): Base[]; } = function() { return [d1, d2] }) { } } + class x114 { constructor(private parm: { (): Base[]; } = function named() { return [d1, d2] }) { } } + class x115 { constructor(private parm: Base[] = [d1, d2]) { } } + class x116 { constructor(private parm: Array = [d1, d2]) { } } + class x117 { constructor(private parm: { [n: number]: Base; } = [d1, d2]) { } } + class x118 { constructor(private parm: {n: Base[]; } = { n: [d1, d2] }) { } } + class x119 { constructor(private parm: (s: Base[]) => any = n => { var n: Base[]; return null; }) { } } + class x120 { constructor(private parm: Genric = { func: n => { return [d1, d2]; } }) { } } + function x121(parm: () => Base[] = () => [d1, d2]) { } + function x122(parm: () => Base[] = function() { return [d1, d2] }) { } + function x123(parm: () => Base[] = function named() { return [d1, d2] }) { } + function x124(parm: { (): Base[]; } = () => [d1, d2]) { } + function x125(parm: { (): Base[]; } = function() { return [d1, d2] }) { } + function x126(parm: { (): Base[]; } = function named() { return [d1, d2] }) { } + function x127(parm: Base[] = [d1, d2]) { } + function x128(parm: Array = [d1, d2]) { } + function x129(parm: { [n: number]: Base; } = [d1, d2]) { } + function x130(parm: {n: Base[]; } = { n: [d1, d2] }) { } + function x131(parm: (s: Base[]) => any = n => { var n: Base[]; return null; }) { } + function x132(parm: Genric = { func: n => { return [d1, d2]; } }) { } + function x133(): () => Base[] { return () => [d1, d2]; } + function x134(): () => Base[] { return function() { return [d1, d2] }; } + function x135(): () => Base[] { return function named() { return [d1, d2] }; } + function x136(): { (): Base[]; } { return () => [d1, d2]; } + function x137(): { (): Base[]; } { return function() { return [d1, d2] }; } + function x138(): { (): Base[]; } { return function named() { return [d1, d2] }; } + function x139(): Base[] { return [d1, d2]; } + function x140(): Array { return [d1, d2]; } + function x141(): { [n: number]: Base; } { return [d1, d2]; } + function x142(): {n: Base[]; } { return { n: [d1, d2] }; } + function x143(): (s: Base[]) => any { return n => { var n: Base[]; return null; }; } + function x144(): Genric { return { func: n => { return [d1, d2]; } }; } + function x145(): () => Base[] { return () => [d1, d2]; return () => [d1, d2]; } + ~~~~~~ +!!! error TS7027: Unreachable code detected. + function x146(): () => Base[] { return function() { return [d1, d2] }; return function() { return [d1, d2] }; } + ~~~~~~ +!!! error TS7027: Unreachable code detected. + function x147(): () => Base[] { return function named() { return [d1, d2] }; return function named() { return [d1, d2] }; } + ~~~~~~ +!!! error TS7027: Unreachable code detected. + function x148(): { (): Base[]; } { return () => [d1, d2]; return () => [d1, d2]; } + ~~~~~~ +!!! error TS7027: Unreachable code detected. + function x149(): { (): Base[]; } { return function() { return [d1, d2] }; return function() { return [d1, d2] }; } + ~~~~~~ +!!! error TS7027: Unreachable code detected. + function x150(): { (): Base[]; } { return function named() { return [d1, d2] }; return function named() { return [d1, d2] }; } + ~~~~~~ +!!! error TS7027: Unreachable code detected. + function x151(): Base[] { return [d1, d2]; return [d1, d2]; } + ~~~~~~ +!!! error TS7027: Unreachable code detected. + function x152(): Array { return [d1, d2]; return [d1, d2]; } + ~~~~~~ +!!! error TS7027: Unreachable code detected. + function x153(): { [n: number]: Base; } { return [d1, d2]; return [d1, d2]; } + ~~~~~~ +!!! error TS7027: Unreachable code detected. + function x154(): {n: Base[]; } { return { n: [d1, d2] }; return { n: [d1, d2] }; } + ~~~~~~ +!!! error TS7027: Unreachable code detected. + function x155(): (s: Base[]) => any { return n => { var n: Base[]; return null; }; return n => { var n: Base[]; return null; }; } + ~~~~~~ +!!! error TS7027: Unreachable code detected. + function x156(): Genric { return { func: n => { return [d1, d2]; } }; return { func: n => { return [d1, d2]; } }; } + ~~~~~~ +!!! error TS7027: Unreachable code detected. + var x157: () => () => Base[] = () => { return () => [d1, d2]; }; + var x158: () => () => Base[] = () => { return function() { return [d1, d2] }; }; + var x159: () => () => Base[] = () => { return function named() { return [d1, d2] }; }; + var x160: () => { (): Base[]; } = () => { return () => [d1, d2]; }; + var x161: () => { (): Base[]; } = () => { return function() { return [d1, d2] }; }; + var x162: () => { (): Base[]; } = () => { return function named() { return [d1, d2] }; }; + var x163: () => Base[] = () => { return [d1, d2]; }; + var x164: () => Array = () => { return [d1, d2]; }; + var x165: () => { [n: number]: Base; } = () => { return [d1, d2]; }; + var x166: () => {n: Base[]; } = () => { return { n: [d1, d2] }; }; + var x167: () => (s: Base[]) => any = () => { return n => { var n: Base[]; return null; }; }; + var x168: () => Genric = () => { return { func: n => { return [d1, d2]; } }; }; + var x169: () => () => Base[] = function() { return () => [d1, d2]; }; + var x170: () => () => Base[] = function() { return function() { return [d1, d2] }; }; + var x171: () => () => Base[] = function() { return function named() { return [d1, d2] }; }; + var x172: () => { (): Base[]; } = function() { return () => [d1, d2]; }; + var x173: () => { (): Base[]; } = function() { return function() { return [d1, d2] }; }; + var x174: () => { (): Base[]; } = function() { return function named() { return [d1, d2] }; }; + var x175: () => Base[] = function() { return [d1, d2]; }; + var x176: () => Array = function() { return [d1, d2]; }; + var x177: () => { [n: number]: Base; } = function() { return [d1, d2]; }; + var x178: () => {n: Base[]; } = function() { return { n: [d1, d2] }; }; + var x179: () => (s: Base[]) => any = function() { return n => { var n: Base[]; return null; }; }; + var x180: () => Genric = function() { return { func: n => { return [d1, d2]; } }; }; + module x181 { var t: () => Base[] = () => [d1, d2]; } + module x182 { var t: () => Base[] = function() { return [d1, d2] }; } + module x183 { var t: () => Base[] = function named() { return [d1, d2] }; } + module x184 { var t: { (): Base[]; } = () => [d1, d2]; } + module x185 { var t: { (): Base[]; } = function() { return [d1, d2] }; } + module x186 { var t: { (): Base[]; } = function named() { return [d1, d2] }; } + module x187 { var t: Base[] = [d1, d2]; } + module x188 { var t: Array = [d1, d2]; } + module x189 { var t: { [n: number]: Base; } = [d1, d2]; } + module x190 { var t: {n: Base[]; } = { n: [d1, d2] }; } + module x191 { var t: (s: Base[]) => any = n => { var n: Base[]; return null; }; } + module x192 { var t: Genric = { func: n => { return [d1, d2]; } }; } + module x193 { export var t: () => Base[] = () => [d1, d2]; } + module x194 { export var t: () => Base[] = function() { return [d1, d2] }; } + module x195 { export var t: () => Base[] = function named() { return [d1, d2] }; } + module x196 { export var t: { (): Base[]; } = () => [d1, d2]; } + module x197 { export var t: { (): Base[]; } = function() { return [d1, d2] }; } + module x198 { export var t: { (): Base[]; } = function named() { return [d1, d2] }; } + module x199 { export var t: Base[] = [d1, d2]; } + module x200 { export var t: Array = [d1, d2]; } + module x201 { export var t: { [n: number]: Base; } = [d1, d2]; } + module x202 { export var t: {n: Base[]; } = { n: [d1, d2] }; } + module x203 { export var t: (s: Base[]) => any = n => { var n: Base[]; return null; }; } + module x204 { export var t: Genric = { func: n => { return [d1, d2]; } }; } + var x206 = <() => Base[]>function() { return [d1, d2] }; + var x207 = <() => Base[]>function named() { return [d1, d2] }; + var x209 = <{ (): Base[]; }>function() { return [d1, d2] }; + var x210 = <{ (): Base[]; }>function named() { return [d1, d2] }; + var x211 = [d1, d2]; + var x212 = >[d1, d2]; + var x213 = <{ [n: number]: Base; }>[d1, d2]; + var x214 = <{n: Base[]; } >{ n: [d1, d2] }; + var x216 = >{ func: n => { return [d1, d2]; } }; + var x217 = (<() => Base[]>undefined) || function() { return [d1, d2] }; + var x218 = (<() => Base[]>undefined) || function named() { return [d1, d2] }; + var x219 = (<{ (): Base[]; }>undefined) || function() { return [d1, d2] }; + var x220 = (<{ (): Base[]; }>undefined) || function named() { return [d1, d2] }; + var x221 = (undefined) || [d1, d2]; + var x222 = (>undefined) || [d1, d2]; + var x223 = (<{ [n: number]: Base; }>undefined) || [d1, d2]; + var x224 = (<{n: Base[]; } >undefined) || { n: [d1, d2] }; + var x225: () => Base[]; x225 = () => [d1, d2]; + var x226: () => Base[]; x226 = function() { return [d1, d2] }; + var x227: () => Base[]; x227 = function named() { return [d1, d2] }; + var x228: { (): Base[]; }; x228 = () => [d1, d2]; + var x229: { (): Base[]; }; x229 = function() { return [d1, d2] }; + var x230: { (): Base[]; }; x230 = function named() { return [d1, d2] }; + var x231: Base[]; x231 = [d1, d2]; + var x232: Array; x232 = [d1, d2]; + var x233: { [n: number]: Base; }; x233 = [d1, d2]; + var x234: {n: Base[]; } ; x234 = { n: [d1, d2] }; + var x235: (s: Base[]) => any; x235 = n => { var n: Base[]; return null; }; + var x236: Genric; x236 = { func: n => { return [d1, d2]; } }; + var x237: { n: () => Base[]; } = { n: () => [d1, d2] }; + var x238: { n: () => Base[]; } = { n: function() { return [d1, d2] } }; + var x239: { n: () => Base[]; } = { n: function named() { return [d1, d2] } }; + var x240: { n: { (): Base[]; }; } = { n: () => [d1, d2] }; + var x241: { n: { (): Base[]; }; } = { n: function() { return [d1, d2] } }; + var x242: { n: { (): Base[]; }; } = { n: function named() { return [d1, d2] } }; + var x243: { n: Base[]; } = { n: [d1, d2] }; + var x244: { n: Array; } = { n: [d1, d2] }; + var x245: { n: { [n: number]: Base; }; } = { n: [d1, d2] }; + var x246: { n: {n: Base[]; } ; } = { n: { n: [d1, d2] } }; + var x247: { n: (s: Base[]) => any; } = { n: n => { var n: Base[]; return null; } }; + var x248: { n: Genric; } = { n: { func: n => { return [d1, d2]; } } }; + var x252: { (): Base[]; }[] = [() => [d1, d2]]; + var x253: { (): Base[]; }[] = [function() { return [d1, d2] }]; + var x254: { (): Base[]; }[] = [function named() { return [d1, d2] }]; + var x255: Base[][] = [[d1, d2]]; + var x256: Array[] = [[d1, d2]]; + var x257: { [n: number]: Base; }[] = [[d1, d2]]; + var x258: {n: Base[]; } [] = [{ n: [d1, d2] }]; + var x260: Genric[] = [{ func: n => { return [d1, d2]; } }]; + var x261: () => Base[] = function() { return [d1, d2] } || undefined; + var x262: () => Base[] = function named() { return [d1, d2] } || undefined; + var x263: { (): Base[]; } = function() { return [d1, d2] } || undefined; + var x264: { (): Base[]; } = function named() { return [d1, d2] } || undefined; + var x265: Base[] = [d1, d2] || undefined; + var x266: Array = [d1, d2] || undefined; + var x267: { [n: number]: Base; } = [d1, d2] || undefined; + var x268: {n: Base[]; } = { n: [d1, d2] } || undefined; + var x269: () => Base[] = undefined || function() { return [d1, d2] }; + var x270: () => Base[] = undefined || function named() { return [d1, d2] }; + var x271: { (): Base[]; } = undefined || function() { return [d1, d2] }; + var x272: { (): Base[]; } = undefined || function named() { return [d1, d2] }; + var x273: Base[] = undefined || [d1, d2]; + var x274: Array = undefined || [d1, d2]; + var x275: { [n: number]: Base; } = undefined || [d1, d2]; + var x276: {n: Base[]; } = undefined || { n: [d1, d2] }; + var x277: () => Base[] = function() { return [d1, d2] } || function() { return [d1, d2] }; + var x278: () => Base[] = function named() { return [d1, d2] } || function named() { return [d1, d2] }; + var x279: { (): Base[]; } = function() { return [d1, d2] } || function() { return [d1, d2] }; + var x280: { (): Base[]; } = function named() { return [d1, d2] } || function named() { return [d1, d2] }; + var x281: Base[] = [d1, d2] || [d1, d2]; + var x282: Array = [d1, d2] || [d1, d2]; + var x283: { [n: number]: Base; } = [d1, d2] || [d1, d2]; + var x284: {n: Base[]; } = { n: [d1, d2] } || { n: [d1, d2] }; + var x285: () => Base[] = true ? () => [d1, d2] : () => [d1, d2]; + var x286: () => Base[] = true ? function() { return [d1, d2] } : function() { return [d1, d2] }; + var x287: () => Base[] = true ? function named() { return [d1, d2] } : function named() { return [d1, d2] }; + var x288: { (): Base[]; } = true ? () => [d1, d2] : () => [d1, d2]; + var x289: { (): Base[]; } = true ? function() { return [d1, d2] } : function() { return [d1, d2] }; + var x290: { (): Base[]; } = true ? function named() { return [d1, d2] } : function named() { return [d1, d2] }; + var x291: Base[] = true ? [d1, d2] : [d1, d2]; + var x292: Array = true ? [d1, d2] : [d1, d2]; + var x293: { [n: number]: Base; } = true ? [d1, d2] : [d1, d2]; + var x294: {n: Base[]; } = true ? { n: [d1, d2] } : { n: [d1, d2] }; + var x295: (s: Base[]) => any = true ? n => { var n: Base[]; return null; } : n => { var n: Base[]; return null; }; + var x296: Genric = true ? { func: n => { return [d1, d2]; } } : { func: n => { return [d1, d2]; } }; + var x297: () => Base[] = true ? undefined : () => [d1, d2]; + var x298: () => Base[] = true ? undefined : function() { return [d1, d2] }; + var x299: () => Base[] = true ? undefined : function named() { return [d1, d2] }; + var x300: { (): Base[]; } = true ? undefined : () => [d1, d2]; + var x301: { (): Base[]; } = true ? undefined : function() { return [d1, d2] }; + var x302: { (): Base[]; } = true ? undefined : function named() { return [d1, d2] }; + var x303: Base[] = true ? undefined : [d1, d2]; + var x304: Array = true ? undefined : [d1, d2]; + var x305: { [n: number]: Base; } = true ? undefined : [d1, d2]; + var x306: {n: Base[]; } = true ? undefined : { n: [d1, d2] }; + var x307: (s: Base[]) => any = true ? undefined : n => { var n: Base[]; return null; }; + var x308: Genric = true ? undefined : { func: n => { return [d1, d2]; } }; + var x309: () => Base[] = true ? () => [d1, d2] : undefined; + var x310: () => Base[] = true ? function() { return [d1, d2] } : undefined; + var x311: () => Base[] = true ? function named() { return [d1, d2] } : undefined; + var x312: { (): Base[]; } = true ? () => [d1, d2] : undefined; + var x313: { (): Base[]; } = true ? function() { return [d1, d2] } : undefined; + var x314: { (): Base[]; } = true ? function named() { return [d1, d2] } : undefined; + var x315: Base[] = true ? [d1, d2] : undefined; + var x316: Array = true ? [d1, d2] : undefined; + var x317: { [n: number]: Base; } = true ? [d1, d2] : undefined; + var x318: {n: Base[]; } = true ? { n: [d1, d2] } : undefined; + var x319: (s: Base[]) => any = true ? n => { var n: Base[]; return null; } : undefined; + var x320: Genric = true ? { func: n => { return [d1, d2]; } } : undefined; + function x321(n: () => Base[]) { }; x321(() => [d1, d2]); + function x322(n: () => Base[]) { }; x322(function() { return [d1, d2] }); + function x323(n: () => Base[]) { }; x323(function named() { return [d1, d2] }); + function x324(n: { (): Base[]; }) { }; x324(() => [d1, d2]); + function x325(n: { (): Base[]; }) { }; x325(function() { return [d1, d2] }); + function x326(n: { (): Base[]; }) { }; x326(function named() { return [d1, d2] }); + function x327(n: Base[]) { }; x327([d1, d2]); + function x328(n: Array) { }; x328([d1, d2]); + function x329(n: { [n: number]: Base; }) { }; x329([d1, d2]); + function x330(n: {n: Base[]; } ) { }; x330({ n: [d1, d2] }); + function x331(n: (s: Base[]) => any) { }; x331(n => { var n: Base[]; return null; }); + function x332(n: Genric) { }; x332({ func: n => { return [d1, d2]; } }); + var x333 = (n: () => Base[]) => n; x333(() => [d1, d2]); + var x334 = (n: () => Base[]) => n; x334(function() { return [d1, d2] }); + var x335 = (n: () => Base[]) => n; x335(function named() { return [d1, d2] }); + var x336 = (n: { (): Base[]; }) => n; x336(() => [d1, d2]); + var x337 = (n: { (): Base[]; }) => n; x337(function() { return [d1, d2] }); + var x338 = (n: { (): Base[]; }) => n; x338(function named() { return [d1, d2] }); + var x339 = (n: Base[]) => n; x339([d1, d2]); + var x340 = (n: Array) => n; x340([d1, d2]); + var x341 = (n: { [n: number]: Base; }) => n; x341([d1, d2]); + var x342 = (n: {n: Base[]; } ) => n; x342({ n: [d1, d2] }); + var x343 = (n: (s: Base[]) => any) => n; x343(n => { var n: Base[]; return null; }); + var x344 = (n: Genric) => n; x344({ func: n => { return [d1, d2]; } }); + var x345 = function(n: () => Base[]) { }; x345(() => [d1, d2]); + var x346 = function(n: () => Base[]) { }; x346(function() { return [d1, d2] }); + var x347 = function(n: () => Base[]) { }; x347(function named() { return [d1, d2] }); + var x348 = function(n: { (): Base[]; }) { }; x348(() => [d1, d2]); + var x349 = function(n: { (): Base[]; }) { }; x349(function() { return [d1, d2] }); + var x350 = function(n: { (): Base[]; }) { }; x350(function named() { return [d1, d2] }); + var x351 = function(n: Base[]) { }; x351([d1, d2]); + var x352 = function(n: Array) { }; x352([d1, d2]); + var x353 = function(n: { [n: number]: Base; }) { }; x353([d1, d2]); + var x354 = function(n: {n: Base[]; } ) { }; x354({ n: [d1, d2] }); + var x355 = function(n: (s: Base[]) => any) { }; x355(n => { var n: Base[]; return null; }); + var x356 = function(n: Genric) { }; x356({ func: n => { return [d1, d2]; } }); \ No newline at end of file diff --git a/tests/baselines/reference/generatedContextualTyping.symbols b/tests/baselines/reference/generatedContextualTyping.symbols deleted file mode 100644 index 287b7be66d0..00000000000 --- a/tests/baselines/reference/generatedContextualTyping.symbols +++ /dev/null @@ -1,2831 +0,0 @@ -=== tests/cases/conformance/expressions/contextualTyping/generatedContextualTyping.ts === -class Base { private p; } ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) ->p : Symbol(p, Decl(generatedContextualTyping.ts, 0, 12)) - -class Derived1 extends Base { private m; } ->Derived1 : Symbol(Derived1, Decl(generatedContextualTyping.ts, 0, 25)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) ->m : Symbol(m, Decl(generatedContextualTyping.ts, 1, 29)) - -class Derived2 extends Base { private n; } ->Derived2 : Symbol(Derived2, Decl(generatedContextualTyping.ts, 1, 42)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) ->n : Symbol(n, Decl(generatedContextualTyping.ts, 2, 29)) - -interface Genric { func(n: T[]); } ->Genric : Symbol(Genric, Decl(generatedContextualTyping.ts, 2, 42)) ->T : Symbol(T, Decl(generatedContextualTyping.ts, 3, 17)) ->func : Symbol(func, Decl(generatedContextualTyping.ts, 3, 21)) ->n : Symbol(n, Decl(generatedContextualTyping.ts, 3, 27)) ->T : Symbol(T, Decl(generatedContextualTyping.ts, 3, 17)) - -var b = new Base(), d1 = new Derived1(), d2 = new Derived2(); ->b : Symbol(b, Decl(generatedContextualTyping.ts, 4, 3)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) ->d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) ->Derived1 : Symbol(Derived1, Decl(generatedContextualTyping.ts, 0, 25)) ->d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) ->Derived2 : Symbol(Derived2, Decl(generatedContextualTyping.ts, 1, 42)) - -var x1: () => Base[] = () => [d1, d2]; ->x1 : Symbol(x1, Decl(generatedContextualTyping.ts, 5, 3)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) ->d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) ->d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) - -var x2: () => Base[] = function() { return [d1, d2] }; ->x2 : Symbol(x2, Decl(generatedContextualTyping.ts, 6, 3)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) ->d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) ->d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) - -var x3: () => Base[] = function named() { return [d1, d2] }; ->x3 : Symbol(x3, Decl(generatedContextualTyping.ts, 7, 3)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) ->named : Symbol(named, Decl(generatedContextualTyping.ts, 7, 22)) ->d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) ->d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) - -var x4: { (): Base[]; } = () => [d1, d2]; ->x4 : Symbol(x4, Decl(generatedContextualTyping.ts, 8, 3)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) ->d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) ->d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) - -var x5: { (): Base[]; } = function() { return [d1, d2] }; ->x5 : Symbol(x5, Decl(generatedContextualTyping.ts, 9, 3)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) ->d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) ->d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) - -var x6: { (): Base[]; } = function named() { return [d1, d2] }; ->x6 : Symbol(x6, Decl(generatedContextualTyping.ts, 10, 3)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) ->named : Symbol(named, Decl(generatedContextualTyping.ts, 10, 25)) ->d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) ->d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) - -var x7: Base[] = [d1, d2]; ->x7 : Symbol(x7, Decl(generatedContextualTyping.ts, 11, 3)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) ->d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) ->d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) - -var x8: Array = [d1, d2]; ->x8 : Symbol(x8, Decl(generatedContextualTyping.ts, 12, 3)) ->Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) ->d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) ->d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) - -var x9: { [n: number]: Base; } = [d1, d2]; ->x9 : Symbol(x9, Decl(generatedContextualTyping.ts, 13, 3)) ->n : Symbol(n, Decl(generatedContextualTyping.ts, 13, 11)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) ->d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) ->d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) - -var x10: {n: Base[]; } = { n: [d1, d2] }; ->x10 : Symbol(x10, Decl(generatedContextualTyping.ts, 14, 3)) ->n : Symbol(n, Decl(generatedContextualTyping.ts, 14, 10)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) ->n : Symbol(n, Decl(generatedContextualTyping.ts, 14, 27)) ->d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) ->d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) - -var x11: (s: Base[]) => any = n => { var n: Base[]; return null; }; ->x11 : Symbol(x11, Decl(generatedContextualTyping.ts, 15, 3)) ->s : Symbol(s, Decl(generatedContextualTyping.ts, 15, 10)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) ->n : Symbol(n, Decl(generatedContextualTyping.ts, 15, 29), Decl(generatedContextualTyping.ts, 15, 40)) ->n : Symbol(n, Decl(generatedContextualTyping.ts, 15, 29), Decl(generatedContextualTyping.ts, 15, 40)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) - -var x12: Genric = { func: n => { return [d1, d2]; } }; ->x12 : Symbol(x12, Decl(generatedContextualTyping.ts, 16, 3)) ->Genric : Symbol(Genric, Decl(generatedContextualTyping.ts, 2, 42)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) ->func : Symbol(func, Decl(generatedContextualTyping.ts, 16, 25)) ->n : Symbol(n, Decl(generatedContextualTyping.ts, 16, 31)) ->d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) ->d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) - -class x13 { member: () => Base[] = () => [d1, d2] } ->x13 : Symbol(x13, Decl(generatedContextualTyping.ts, 16, 60)) ->member : Symbol(member, Decl(generatedContextualTyping.ts, 17, 11)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) ->d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) ->d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) - -class x14 { member: () => Base[] = function() { return [d1, d2] } } ->x14 : Symbol(x14, Decl(generatedContextualTyping.ts, 17, 51)) ->member : Symbol(member, Decl(generatedContextualTyping.ts, 18, 11)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) ->d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) ->d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) - -class x15 { member: () => Base[] = function named() { return [d1, d2] } } ->x15 : Symbol(x15, Decl(generatedContextualTyping.ts, 18, 67)) ->member : Symbol(member, Decl(generatedContextualTyping.ts, 19, 11)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) ->named : Symbol(named, Decl(generatedContextualTyping.ts, 19, 34)) ->d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) ->d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) - -class x16 { member: { (): Base[]; } = () => [d1, d2] } ->x16 : Symbol(x16, Decl(generatedContextualTyping.ts, 19, 73)) ->member : Symbol(member, Decl(generatedContextualTyping.ts, 20, 11)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) ->d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) ->d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) - -class x17 { member: { (): Base[]; } = function() { return [d1, d2] } } ->x17 : Symbol(x17, Decl(generatedContextualTyping.ts, 20, 54)) ->member : Symbol(member, Decl(generatedContextualTyping.ts, 21, 11)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) ->d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) ->d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) - -class x18 { member: { (): Base[]; } = function named() { return [d1, d2] } } ->x18 : Symbol(x18, Decl(generatedContextualTyping.ts, 21, 70)) ->member : Symbol(member, Decl(generatedContextualTyping.ts, 22, 11)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) ->named : Symbol(named, Decl(generatedContextualTyping.ts, 22, 37)) ->d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) ->d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) - -class x19 { member: Base[] = [d1, d2] } ->x19 : Symbol(x19, Decl(generatedContextualTyping.ts, 22, 76)) ->member : Symbol(member, Decl(generatedContextualTyping.ts, 23, 11)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) ->d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) ->d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) - -class x20 { member: Array = [d1, d2] } ->x20 : Symbol(x20, Decl(generatedContextualTyping.ts, 23, 39)) ->member : Symbol(member, Decl(generatedContextualTyping.ts, 24, 11)) ->Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) ->d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) ->d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) - -class x21 { member: { [n: number]: Base; } = [d1, d2] } ->x21 : Symbol(x21, Decl(generatedContextualTyping.ts, 24, 44)) ->member : Symbol(member, Decl(generatedContextualTyping.ts, 25, 11)) ->n : Symbol(n, Decl(generatedContextualTyping.ts, 25, 23)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) ->d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) ->d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) - -class x22 { member: {n: Base[]; } = { n: [d1, d2] } } ->x22 : Symbol(x22, Decl(generatedContextualTyping.ts, 25, 55)) ->member : Symbol(member, Decl(generatedContextualTyping.ts, 26, 11)) ->n : Symbol(n, Decl(generatedContextualTyping.ts, 26, 21)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) ->n : Symbol(n, Decl(generatedContextualTyping.ts, 26, 38)) ->d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) ->d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) - -class x23 { member: (s: Base[]) => any = n => { var n: Base[]; return null; } } ->x23 : Symbol(x23, Decl(generatedContextualTyping.ts, 26, 54)) ->member : Symbol(member, Decl(generatedContextualTyping.ts, 27, 11)) ->s : Symbol(s, Decl(generatedContextualTyping.ts, 27, 21)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) ->n : Symbol(n, Decl(generatedContextualTyping.ts, 27, 40), Decl(generatedContextualTyping.ts, 27, 51)) ->n : Symbol(n, Decl(generatedContextualTyping.ts, 27, 40), Decl(generatedContextualTyping.ts, 27, 51)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) - -class x24 { member: Genric = { func: n => { return [d1, d2]; } } } ->x24 : Symbol(x24, Decl(generatedContextualTyping.ts, 27, 79)) ->member : Symbol(member, Decl(generatedContextualTyping.ts, 28, 11)) ->Genric : Symbol(Genric, Decl(generatedContextualTyping.ts, 2, 42)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) ->func : Symbol(func, Decl(generatedContextualTyping.ts, 28, 36)) ->n : Symbol(n, Decl(generatedContextualTyping.ts, 28, 42)) ->d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) ->d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) - -class x25 { private member: () => Base[] = () => [d1, d2] } ->x25 : Symbol(x25, Decl(generatedContextualTyping.ts, 28, 72)) ->member : Symbol(member, Decl(generatedContextualTyping.ts, 29, 11)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) ->d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) ->d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) - -class x26 { private member: () => Base[] = function() { return [d1, d2] } } ->x26 : Symbol(x26, Decl(generatedContextualTyping.ts, 29, 59)) ->member : Symbol(member, Decl(generatedContextualTyping.ts, 30, 11)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) ->d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) ->d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) - -class x27 { private member: () => Base[] = function named() { return [d1, d2] } } ->x27 : Symbol(x27, Decl(generatedContextualTyping.ts, 30, 75)) ->member : Symbol(member, Decl(generatedContextualTyping.ts, 31, 11)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) ->named : Symbol(named, Decl(generatedContextualTyping.ts, 31, 42)) ->d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) ->d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) - -class x28 { private member: { (): Base[]; } = () => [d1, d2] } ->x28 : Symbol(x28, Decl(generatedContextualTyping.ts, 31, 81)) ->member : Symbol(member, Decl(generatedContextualTyping.ts, 32, 11)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) ->d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) ->d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) - -class x29 { private member: { (): Base[]; } = function() { return [d1, d2] } } ->x29 : Symbol(x29, Decl(generatedContextualTyping.ts, 32, 62)) ->member : Symbol(member, Decl(generatedContextualTyping.ts, 33, 11)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) ->d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) ->d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) - -class x30 { private member: { (): Base[]; } = function named() { return [d1, d2] } } ->x30 : Symbol(x30, Decl(generatedContextualTyping.ts, 33, 78)) ->member : Symbol(member, Decl(generatedContextualTyping.ts, 34, 11)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) ->named : Symbol(named, Decl(generatedContextualTyping.ts, 34, 45)) ->d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) ->d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) - -class x31 { private member: Base[] = [d1, d2] } ->x31 : Symbol(x31, Decl(generatedContextualTyping.ts, 34, 84)) ->member : Symbol(member, Decl(generatedContextualTyping.ts, 35, 11)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) ->d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) ->d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) - -class x32 { private member: Array = [d1, d2] } ->x32 : Symbol(x32, Decl(generatedContextualTyping.ts, 35, 47)) ->member : Symbol(member, Decl(generatedContextualTyping.ts, 36, 11)) ->Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) ->d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) ->d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) - -class x33 { private member: { [n: number]: Base; } = [d1, d2] } ->x33 : Symbol(x33, Decl(generatedContextualTyping.ts, 36, 52)) ->member : Symbol(member, Decl(generatedContextualTyping.ts, 37, 11)) ->n : Symbol(n, Decl(generatedContextualTyping.ts, 37, 31)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) ->d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) ->d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) - -class x34 { private member: {n: Base[]; } = { n: [d1, d2] } } ->x34 : Symbol(x34, Decl(generatedContextualTyping.ts, 37, 63)) ->member : Symbol(member, Decl(generatedContextualTyping.ts, 38, 11)) ->n : Symbol(n, Decl(generatedContextualTyping.ts, 38, 29)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) ->n : Symbol(n, Decl(generatedContextualTyping.ts, 38, 46)) ->d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) ->d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) - -class x35 { private member: (s: Base[]) => any = n => { var n: Base[]; return null; } } ->x35 : Symbol(x35, Decl(generatedContextualTyping.ts, 38, 62)) ->member : Symbol(member, Decl(generatedContextualTyping.ts, 39, 11)) ->s : Symbol(s, Decl(generatedContextualTyping.ts, 39, 29)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) ->n : Symbol(n, Decl(generatedContextualTyping.ts, 39, 48), Decl(generatedContextualTyping.ts, 39, 59)) ->n : Symbol(n, Decl(generatedContextualTyping.ts, 39, 48), Decl(generatedContextualTyping.ts, 39, 59)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) - -class x36 { private member: Genric = { func: n => { return [d1, d2]; } } } ->x36 : Symbol(x36, Decl(generatedContextualTyping.ts, 39, 87)) ->member : Symbol(member, Decl(generatedContextualTyping.ts, 40, 11)) ->Genric : Symbol(Genric, Decl(generatedContextualTyping.ts, 2, 42)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) ->func : Symbol(func, Decl(generatedContextualTyping.ts, 40, 44)) ->n : Symbol(n, Decl(generatedContextualTyping.ts, 40, 50)) ->d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) ->d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) - -class x37 { public member: () => Base[] = () => [d1, d2] } ->x37 : Symbol(x37, Decl(generatedContextualTyping.ts, 40, 80)) ->member : Symbol(member, Decl(generatedContextualTyping.ts, 41, 11)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) ->d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) ->d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) - -class x38 { public member: () => Base[] = function() { return [d1, d2] } } ->x38 : Symbol(x38, Decl(generatedContextualTyping.ts, 41, 58)) ->member : Symbol(member, Decl(generatedContextualTyping.ts, 42, 11)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) ->d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) ->d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) - -class x39 { public member: () => Base[] = function named() { return [d1, d2] } } ->x39 : Symbol(x39, Decl(generatedContextualTyping.ts, 42, 74)) ->member : Symbol(member, Decl(generatedContextualTyping.ts, 43, 11)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) ->named : Symbol(named, Decl(generatedContextualTyping.ts, 43, 41)) ->d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) ->d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) - -class x40 { public member: { (): Base[]; } = () => [d1, d2] } ->x40 : Symbol(x40, Decl(generatedContextualTyping.ts, 43, 80)) ->member : Symbol(member, Decl(generatedContextualTyping.ts, 44, 11)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) ->d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) ->d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) - -class x41 { public member: { (): Base[]; } = function() { return [d1, d2] } } ->x41 : Symbol(x41, Decl(generatedContextualTyping.ts, 44, 61)) ->member : Symbol(member, Decl(generatedContextualTyping.ts, 45, 11)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) ->d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) ->d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) - -class x42 { public member: { (): Base[]; } = function named() { return [d1, d2] } } ->x42 : Symbol(x42, Decl(generatedContextualTyping.ts, 45, 77)) ->member : Symbol(member, Decl(generatedContextualTyping.ts, 46, 11)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) ->named : Symbol(named, Decl(generatedContextualTyping.ts, 46, 44)) ->d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) ->d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) - -class x43 { public member: Base[] = [d1, d2] } ->x43 : Symbol(x43, Decl(generatedContextualTyping.ts, 46, 83)) ->member : Symbol(member, Decl(generatedContextualTyping.ts, 47, 11)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) ->d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) ->d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) - -class x44 { public member: Array = [d1, d2] } ->x44 : Symbol(x44, Decl(generatedContextualTyping.ts, 47, 46)) ->member : Symbol(member, Decl(generatedContextualTyping.ts, 48, 11)) ->Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) ->d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) ->d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) - -class x45 { public member: { [n: number]: Base; } = [d1, d2] } ->x45 : Symbol(x45, Decl(generatedContextualTyping.ts, 48, 51)) ->member : Symbol(member, Decl(generatedContextualTyping.ts, 49, 11)) ->n : Symbol(n, Decl(generatedContextualTyping.ts, 49, 30)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) ->d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) ->d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) - -class x46 { public member: {n: Base[]; } = { n: [d1, d2] } } ->x46 : Symbol(x46, Decl(generatedContextualTyping.ts, 49, 62)) ->member : Symbol(member, Decl(generatedContextualTyping.ts, 50, 11)) ->n : Symbol(n, Decl(generatedContextualTyping.ts, 50, 28)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) ->n : Symbol(n, Decl(generatedContextualTyping.ts, 50, 45)) ->d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) ->d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) - -class x47 { public member: (s: Base[]) => any = n => { var n: Base[]; return null; } } ->x47 : Symbol(x47, Decl(generatedContextualTyping.ts, 50, 61)) ->member : Symbol(member, Decl(generatedContextualTyping.ts, 51, 11)) ->s : Symbol(s, Decl(generatedContextualTyping.ts, 51, 28)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) ->n : Symbol(n, Decl(generatedContextualTyping.ts, 51, 47), Decl(generatedContextualTyping.ts, 51, 58)) ->n : Symbol(n, Decl(generatedContextualTyping.ts, 51, 47), Decl(generatedContextualTyping.ts, 51, 58)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) - -class x48 { public member: Genric = { func: n => { return [d1, d2]; } } } ->x48 : Symbol(x48, Decl(generatedContextualTyping.ts, 51, 86)) ->member : Symbol(member, Decl(generatedContextualTyping.ts, 52, 11)) ->Genric : Symbol(Genric, Decl(generatedContextualTyping.ts, 2, 42)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) ->func : Symbol(func, Decl(generatedContextualTyping.ts, 52, 43)) ->n : Symbol(n, Decl(generatedContextualTyping.ts, 52, 49)) ->d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) ->d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) - -class x49 { static member: () => Base[] = () => [d1, d2] } ->x49 : Symbol(x49, Decl(generatedContextualTyping.ts, 52, 79)) ->member : Symbol(x49.member, Decl(generatedContextualTyping.ts, 53, 11)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) ->d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) ->d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) - -class x50 { static member: () => Base[] = function() { return [d1, d2] } } ->x50 : Symbol(x50, Decl(generatedContextualTyping.ts, 53, 58)) ->member : Symbol(x50.member, Decl(generatedContextualTyping.ts, 54, 11)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) ->d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) ->d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) - -class x51 { static member: () => Base[] = function named() { return [d1, d2] } } ->x51 : Symbol(x51, Decl(generatedContextualTyping.ts, 54, 74)) ->member : Symbol(x51.member, Decl(generatedContextualTyping.ts, 55, 11)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) ->named : Symbol(named, Decl(generatedContextualTyping.ts, 55, 41)) ->d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) ->d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) - -class x52 { static member: { (): Base[]; } = () => [d1, d2] } ->x52 : Symbol(x52, Decl(generatedContextualTyping.ts, 55, 80)) ->member : Symbol(x52.member, Decl(generatedContextualTyping.ts, 56, 11)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) ->d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) ->d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) - -class x53 { static member: { (): Base[]; } = function() { return [d1, d2] } } ->x53 : Symbol(x53, Decl(generatedContextualTyping.ts, 56, 61)) ->member : Symbol(x53.member, Decl(generatedContextualTyping.ts, 57, 11)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) ->d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) ->d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) - -class x54 { static member: { (): Base[]; } = function named() { return [d1, d2] } } ->x54 : Symbol(x54, Decl(generatedContextualTyping.ts, 57, 77)) ->member : Symbol(x54.member, Decl(generatedContextualTyping.ts, 58, 11)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) ->named : Symbol(named, Decl(generatedContextualTyping.ts, 58, 44)) ->d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) ->d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) - -class x55 { static member: Base[] = [d1, d2] } ->x55 : Symbol(x55, Decl(generatedContextualTyping.ts, 58, 83)) ->member : Symbol(x55.member, Decl(generatedContextualTyping.ts, 59, 11)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) ->d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) ->d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) - -class x56 { static member: Array = [d1, d2] } ->x56 : Symbol(x56, Decl(generatedContextualTyping.ts, 59, 46)) ->member : Symbol(x56.member, Decl(generatedContextualTyping.ts, 60, 11)) ->Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) ->d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) ->d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) - -class x57 { static member: { [n: number]: Base; } = [d1, d2] } ->x57 : Symbol(x57, Decl(generatedContextualTyping.ts, 60, 51)) ->member : Symbol(x57.member, Decl(generatedContextualTyping.ts, 61, 11)) ->n : Symbol(n, Decl(generatedContextualTyping.ts, 61, 30)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) ->d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) ->d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) - -class x58 { static member: {n: Base[]; } = { n: [d1, d2] } } ->x58 : Symbol(x58, Decl(generatedContextualTyping.ts, 61, 62)) ->member : Symbol(x58.member, Decl(generatedContextualTyping.ts, 62, 11)) ->n : Symbol(n, Decl(generatedContextualTyping.ts, 62, 28)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) ->n : Symbol(n, Decl(generatedContextualTyping.ts, 62, 45)) ->d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) ->d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) - -class x59 { static member: (s: Base[]) => any = n => { var n: Base[]; return null; } } ->x59 : Symbol(x59, Decl(generatedContextualTyping.ts, 62, 61)) ->member : Symbol(x59.member, Decl(generatedContextualTyping.ts, 63, 11)) ->s : Symbol(s, Decl(generatedContextualTyping.ts, 63, 28)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) ->n : Symbol(n, Decl(generatedContextualTyping.ts, 63, 47), Decl(generatedContextualTyping.ts, 63, 58)) ->n : Symbol(n, Decl(generatedContextualTyping.ts, 63, 47), Decl(generatedContextualTyping.ts, 63, 58)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) - -class x60 { static member: Genric = { func: n => { return [d1, d2]; } } } ->x60 : Symbol(x60, Decl(generatedContextualTyping.ts, 63, 86)) ->member : Symbol(x60.member, Decl(generatedContextualTyping.ts, 64, 11)) ->Genric : Symbol(Genric, Decl(generatedContextualTyping.ts, 2, 42)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) ->func : Symbol(func, Decl(generatedContextualTyping.ts, 64, 43)) ->n : Symbol(n, Decl(generatedContextualTyping.ts, 64, 49)) ->d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) ->d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) - -class x61 { private static member: () => Base[] = () => [d1, d2] } ->x61 : Symbol(x61, Decl(generatedContextualTyping.ts, 64, 79)) ->member : Symbol(x61.member, Decl(generatedContextualTyping.ts, 65, 11)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) ->d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) ->d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) - -class x62 { private static member: () => Base[] = function() { return [d1, d2] } } ->x62 : Symbol(x62, Decl(generatedContextualTyping.ts, 65, 66)) ->member : Symbol(x62.member, Decl(generatedContextualTyping.ts, 66, 11)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) ->d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) ->d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) - -class x63 { private static member: () => Base[] = function named() { return [d1, d2] } } ->x63 : Symbol(x63, Decl(generatedContextualTyping.ts, 66, 82)) ->member : Symbol(x63.member, Decl(generatedContextualTyping.ts, 67, 11)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) ->named : Symbol(named, Decl(generatedContextualTyping.ts, 67, 49)) ->d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) ->d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) - -class x64 { private static member: { (): Base[]; } = () => [d1, d2] } ->x64 : Symbol(x64, Decl(generatedContextualTyping.ts, 67, 88)) ->member : Symbol(x64.member, Decl(generatedContextualTyping.ts, 68, 11)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) ->d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) ->d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) - -class x65 { private static member: { (): Base[]; } = function() { return [d1, d2] } } ->x65 : Symbol(x65, Decl(generatedContextualTyping.ts, 68, 69)) ->member : Symbol(x65.member, Decl(generatedContextualTyping.ts, 69, 11)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) ->d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) ->d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) - -class x66 { private static member: { (): Base[]; } = function named() { return [d1, d2] } } ->x66 : Symbol(x66, Decl(generatedContextualTyping.ts, 69, 85)) ->member : Symbol(x66.member, Decl(generatedContextualTyping.ts, 70, 11)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) ->named : Symbol(named, Decl(generatedContextualTyping.ts, 70, 52)) ->d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) ->d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) - -class x67 { private static member: Base[] = [d1, d2] } ->x67 : Symbol(x67, Decl(generatedContextualTyping.ts, 70, 91)) ->member : Symbol(x67.member, Decl(generatedContextualTyping.ts, 71, 11)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) ->d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) ->d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) - -class x68 { private static member: Array = [d1, d2] } ->x68 : Symbol(x68, Decl(generatedContextualTyping.ts, 71, 54)) ->member : Symbol(x68.member, Decl(generatedContextualTyping.ts, 72, 11)) ->Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) ->d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) ->d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) - -class x69 { private static member: { [n: number]: Base; } = [d1, d2] } ->x69 : Symbol(x69, Decl(generatedContextualTyping.ts, 72, 59)) ->member : Symbol(x69.member, Decl(generatedContextualTyping.ts, 73, 11)) ->n : Symbol(n, Decl(generatedContextualTyping.ts, 73, 38)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) ->d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) ->d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) - -class x70 { private static member: {n: Base[]; } = { n: [d1, d2] } } ->x70 : Symbol(x70, Decl(generatedContextualTyping.ts, 73, 70)) ->member : Symbol(x70.member, Decl(generatedContextualTyping.ts, 74, 11)) ->n : Symbol(n, Decl(generatedContextualTyping.ts, 74, 36)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) ->n : Symbol(n, Decl(generatedContextualTyping.ts, 74, 53)) ->d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) ->d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) - -class x71 { private static member: (s: Base[]) => any = n => { var n: Base[]; return null; } } ->x71 : Symbol(x71, Decl(generatedContextualTyping.ts, 74, 69)) ->member : Symbol(x71.member, Decl(generatedContextualTyping.ts, 75, 11)) ->s : Symbol(s, Decl(generatedContextualTyping.ts, 75, 36)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) ->n : Symbol(n, Decl(generatedContextualTyping.ts, 75, 55), Decl(generatedContextualTyping.ts, 75, 66)) ->n : Symbol(n, Decl(generatedContextualTyping.ts, 75, 55), Decl(generatedContextualTyping.ts, 75, 66)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) - -class x72 { private static member: Genric = { func: n => { return [d1, d2]; } } } ->x72 : Symbol(x72, Decl(generatedContextualTyping.ts, 75, 94)) ->member : Symbol(x72.member, Decl(generatedContextualTyping.ts, 76, 11)) ->Genric : Symbol(Genric, Decl(generatedContextualTyping.ts, 2, 42)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) ->func : Symbol(func, Decl(generatedContextualTyping.ts, 76, 51)) ->n : Symbol(n, Decl(generatedContextualTyping.ts, 76, 57)) ->d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) ->d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) - -class x73 { public static member: () => Base[] = () => [d1, d2] } ->x73 : Symbol(x73, Decl(generatedContextualTyping.ts, 76, 87)) ->member : Symbol(x73.member, Decl(generatedContextualTyping.ts, 77, 11)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) ->d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) ->d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) - -class x74 { public static member: () => Base[] = function() { return [d1, d2] } } ->x74 : Symbol(x74, Decl(generatedContextualTyping.ts, 77, 65)) ->member : Symbol(x74.member, Decl(generatedContextualTyping.ts, 78, 11)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) ->d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) ->d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) - -class x75 { public static member: () => Base[] = function named() { return [d1, d2] } } ->x75 : Symbol(x75, Decl(generatedContextualTyping.ts, 78, 81)) ->member : Symbol(x75.member, Decl(generatedContextualTyping.ts, 79, 11)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) ->named : Symbol(named, Decl(generatedContextualTyping.ts, 79, 48)) ->d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) ->d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) - -class x76 { public static member: { (): Base[]; } = () => [d1, d2] } ->x76 : Symbol(x76, Decl(generatedContextualTyping.ts, 79, 87)) ->member : Symbol(x76.member, Decl(generatedContextualTyping.ts, 80, 11)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) ->d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) ->d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) - -class x77 { public static member: { (): Base[]; } = function() { return [d1, d2] } } ->x77 : Symbol(x77, Decl(generatedContextualTyping.ts, 80, 68)) ->member : Symbol(x77.member, Decl(generatedContextualTyping.ts, 81, 11)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) ->d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) ->d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) - -class x78 { public static member: { (): Base[]; } = function named() { return [d1, d2] } } ->x78 : Symbol(x78, Decl(generatedContextualTyping.ts, 81, 84)) ->member : Symbol(x78.member, Decl(generatedContextualTyping.ts, 82, 11)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) ->named : Symbol(named, Decl(generatedContextualTyping.ts, 82, 51)) ->d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) ->d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) - -class x79 { public static member: Base[] = [d1, d2] } ->x79 : Symbol(x79, Decl(generatedContextualTyping.ts, 82, 90)) ->member : Symbol(x79.member, Decl(generatedContextualTyping.ts, 83, 11)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) ->d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) ->d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) - -class x80 { public static member: Array = [d1, d2] } ->x80 : Symbol(x80, Decl(generatedContextualTyping.ts, 83, 53)) ->member : Symbol(x80.member, Decl(generatedContextualTyping.ts, 84, 11)) ->Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) ->d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) ->d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) - -class x81 { public static member: { [n: number]: Base; } = [d1, d2] } ->x81 : Symbol(x81, Decl(generatedContextualTyping.ts, 84, 58)) ->member : Symbol(x81.member, Decl(generatedContextualTyping.ts, 85, 11)) ->n : Symbol(n, Decl(generatedContextualTyping.ts, 85, 37)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) ->d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) ->d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) - -class x82 { public static member: {n: Base[]; } = { n: [d1, d2] } } ->x82 : Symbol(x82, Decl(generatedContextualTyping.ts, 85, 69)) ->member : Symbol(x82.member, Decl(generatedContextualTyping.ts, 86, 11)) ->n : Symbol(n, Decl(generatedContextualTyping.ts, 86, 35)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) ->n : Symbol(n, Decl(generatedContextualTyping.ts, 86, 52)) ->d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) ->d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) - -class x83 { public static member: (s: Base[]) => any = n => { var n: Base[]; return null; } } ->x83 : Symbol(x83, Decl(generatedContextualTyping.ts, 86, 68)) ->member : Symbol(x83.member, Decl(generatedContextualTyping.ts, 87, 11)) ->s : Symbol(s, Decl(generatedContextualTyping.ts, 87, 35)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) ->n : Symbol(n, Decl(generatedContextualTyping.ts, 87, 54), Decl(generatedContextualTyping.ts, 87, 65)) ->n : Symbol(n, Decl(generatedContextualTyping.ts, 87, 54), Decl(generatedContextualTyping.ts, 87, 65)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) - -class x84 { public static member: Genric = { func: n => { return [d1, d2]; } } } ->x84 : Symbol(x84, Decl(generatedContextualTyping.ts, 87, 93)) ->member : Symbol(x84.member, Decl(generatedContextualTyping.ts, 88, 11)) ->Genric : Symbol(Genric, Decl(generatedContextualTyping.ts, 2, 42)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) ->func : Symbol(func, Decl(generatedContextualTyping.ts, 88, 50)) ->n : Symbol(n, Decl(generatedContextualTyping.ts, 88, 56)) ->d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) ->d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) - -class x85 { constructor(parm: () => Base[] = () => [d1, d2]) { } } ->x85 : Symbol(x85, Decl(generatedContextualTyping.ts, 88, 86)) ->parm : Symbol(parm, Decl(generatedContextualTyping.ts, 89, 24)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) ->d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) ->d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) - -class x86 { constructor(parm: () => Base[] = function() { return [d1, d2] }) { } } ->x86 : Symbol(x86, Decl(generatedContextualTyping.ts, 89, 66)) ->parm : Symbol(parm, Decl(generatedContextualTyping.ts, 90, 24)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) ->d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) ->d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) - -class x87 { constructor(parm: () => Base[] = function named() { return [d1, d2] }) { } } ->x87 : Symbol(x87, Decl(generatedContextualTyping.ts, 90, 82)) ->parm : Symbol(parm, Decl(generatedContextualTyping.ts, 91, 24)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) ->named : Symbol(named, Decl(generatedContextualTyping.ts, 91, 44)) ->d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) ->d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) - -class x88 { constructor(parm: { (): Base[]; } = () => [d1, d2]) { } } ->x88 : Symbol(x88, Decl(generatedContextualTyping.ts, 91, 88)) ->parm : Symbol(parm, Decl(generatedContextualTyping.ts, 92, 24)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) ->d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) ->d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) - -class x89 { constructor(parm: { (): Base[]; } = function() { return [d1, d2] }) { } } ->x89 : Symbol(x89, Decl(generatedContextualTyping.ts, 92, 69)) ->parm : Symbol(parm, Decl(generatedContextualTyping.ts, 93, 24)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) ->d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) ->d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) - -class x90 { constructor(parm: { (): Base[]; } = function named() { return [d1, d2] }) { } } ->x90 : Symbol(x90, Decl(generatedContextualTyping.ts, 93, 85)) ->parm : Symbol(parm, Decl(generatedContextualTyping.ts, 94, 24)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) ->named : Symbol(named, Decl(generatedContextualTyping.ts, 94, 47)) ->d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) ->d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) - -class x91 { constructor(parm: Base[] = [d1, d2]) { } } ->x91 : Symbol(x91, Decl(generatedContextualTyping.ts, 94, 91)) ->parm : Symbol(parm, Decl(generatedContextualTyping.ts, 95, 24)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) ->d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) ->d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) - -class x92 { constructor(parm: Array = [d1, d2]) { } } ->x92 : Symbol(x92, Decl(generatedContextualTyping.ts, 95, 54)) ->parm : Symbol(parm, Decl(generatedContextualTyping.ts, 96, 24)) ->Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) ->d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) ->d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) - -class x93 { constructor(parm: { [n: number]: Base; } = [d1, d2]) { } } ->x93 : Symbol(x93, Decl(generatedContextualTyping.ts, 96, 59)) ->parm : Symbol(parm, Decl(generatedContextualTyping.ts, 97, 24)) ->n : Symbol(n, Decl(generatedContextualTyping.ts, 97, 33)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) ->d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) ->d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) - -class x94 { constructor(parm: {n: Base[]; } = { n: [d1, d2] }) { } } ->x94 : Symbol(x94, Decl(generatedContextualTyping.ts, 97, 70)) ->parm : Symbol(parm, Decl(generatedContextualTyping.ts, 98, 24)) ->n : Symbol(n, Decl(generatedContextualTyping.ts, 98, 31)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) ->n : Symbol(n, Decl(generatedContextualTyping.ts, 98, 48)) ->d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) ->d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) - -class x95 { constructor(parm: (s: Base[]) => any = n => { var n: Base[]; return null; }) { } } ->x95 : Symbol(x95, Decl(generatedContextualTyping.ts, 98, 69)) ->parm : Symbol(parm, Decl(generatedContextualTyping.ts, 99, 24)) ->s : Symbol(s, Decl(generatedContextualTyping.ts, 99, 31)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) ->n : Symbol(n, Decl(generatedContextualTyping.ts, 99, 50), Decl(generatedContextualTyping.ts, 99, 61)) ->n : Symbol(n, Decl(generatedContextualTyping.ts, 99, 50), Decl(generatedContextualTyping.ts, 99, 61)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) - -class x96 { constructor(parm: Genric = { func: n => { return [d1, d2]; } }) { } } ->x96 : Symbol(x96, Decl(generatedContextualTyping.ts, 99, 94)) ->parm : Symbol(parm, Decl(generatedContextualTyping.ts, 100, 24)) ->Genric : Symbol(Genric, Decl(generatedContextualTyping.ts, 2, 42)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) ->func : Symbol(func, Decl(generatedContextualTyping.ts, 100, 46)) ->n : Symbol(n, Decl(generatedContextualTyping.ts, 100, 52)) ->d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) ->d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) - -class x97 { constructor(public parm: () => Base[] = () => [d1, d2]) { } } ->x97 : Symbol(x97, Decl(generatedContextualTyping.ts, 100, 87)) ->parm : Symbol(parm, Decl(generatedContextualTyping.ts, 101, 24)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) ->d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) ->d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) - -class x98 { constructor(public parm: () => Base[] = function() { return [d1, d2] }) { } } ->x98 : Symbol(x98, Decl(generatedContextualTyping.ts, 101, 73)) ->parm : Symbol(parm, Decl(generatedContextualTyping.ts, 102, 24)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) ->d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) ->d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) - -class x99 { constructor(public parm: () => Base[] = function named() { return [d1, d2] }) { } } ->x99 : Symbol(x99, Decl(generatedContextualTyping.ts, 102, 89)) ->parm : Symbol(parm, Decl(generatedContextualTyping.ts, 103, 24)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) ->named : Symbol(named, Decl(generatedContextualTyping.ts, 103, 51)) ->d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) ->d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) - -class x100 { constructor(public parm: { (): Base[]; } = () => [d1, d2]) { } } ->x100 : Symbol(x100, Decl(generatedContextualTyping.ts, 103, 95)) ->parm : Symbol(parm, Decl(generatedContextualTyping.ts, 104, 25)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) ->d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) ->d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) - -class x101 { constructor(public parm: { (): Base[]; } = function() { return [d1, d2] }) { } } ->x101 : Symbol(x101, Decl(generatedContextualTyping.ts, 104, 77)) ->parm : Symbol(parm, Decl(generatedContextualTyping.ts, 105, 25)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) ->d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) ->d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) - -class x102 { constructor(public parm: { (): Base[]; } = function named() { return [d1, d2] }) { } } ->x102 : Symbol(x102, Decl(generatedContextualTyping.ts, 105, 93)) ->parm : Symbol(parm, Decl(generatedContextualTyping.ts, 106, 25)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) ->named : Symbol(named, Decl(generatedContextualTyping.ts, 106, 55)) ->d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) ->d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) - -class x103 { constructor(public parm: Base[] = [d1, d2]) { } } ->x103 : Symbol(x103, Decl(generatedContextualTyping.ts, 106, 99)) ->parm : Symbol(parm, Decl(generatedContextualTyping.ts, 107, 25)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) ->d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) ->d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) - -class x104 { constructor(public parm: Array = [d1, d2]) { } } ->x104 : Symbol(x104, Decl(generatedContextualTyping.ts, 107, 62)) ->parm : Symbol(parm, Decl(generatedContextualTyping.ts, 108, 25)) ->Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) ->d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) ->d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) - -class x105 { constructor(public parm: { [n: number]: Base; } = [d1, d2]) { } } ->x105 : Symbol(x105, Decl(generatedContextualTyping.ts, 108, 67)) ->parm : Symbol(parm, Decl(generatedContextualTyping.ts, 109, 25)) ->n : Symbol(n, Decl(generatedContextualTyping.ts, 109, 41)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) ->d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) ->d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) - -class x106 { constructor(public parm: {n: Base[]; } = { n: [d1, d2] }) { } } ->x106 : Symbol(x106, Decl(generatedContextualTyping.ts, 109, 78)) ->parm : Symbol(parm, Decl(generatedContextualTyping.ts, 110, 25)) ->n : Symbol(n, Decl(generatedContextualTyping.ts, 110, 39)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) ->n : Symbol(n, Decl(generatedContextualTyping.ts, 110, 56)) ->d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) ->d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) - -class x107 { constructor(public parm: (s: Base[]) => any = n => { var n: Base[]; return null; }) { } } ->x107 : Symbol(x107, Decl(generatedContextualTyping.ts, 110, 77)) ->parm : Symbol(parm, Decl(generatedContextualTyping.ts, 111, 25)) ->s : Symbol(s, Decl(generatedContextualTyping.ts, 111, 39)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) ->n : Symbol(n, Decl(generatedContextualTyping.ts, 111, 58), Decl(generatedContextualTyping.ts, 111, 69)) ->n : Symbol(n, Decl(generatedContextualTyping.ts, 111, 58), Decl(generatedContextualTyping.ts, 111, 69)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) - -class x108 { constructor(public parm: Genric = { func: n => { return [d1, d2]; } }) { } } ->x108 : Symbol(x108, Decl(generatedContextualTyping.ts, 111, 102)) ->parm : Symbol(parm, Decl(generatedContextualTyping.ts, 112, 25)) ->Genric : Symbol(Genric, Decl(generatedContextualTyping.ts, 2, 42)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) ->func : Symbol(func, Decl(generatedContextualTyping.ts, 112, 54)) ->n : Symbol(n, Decl(generatedContextualTyping.ts, 112, 60)) ->d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) ->d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) - -class x109 { constructor(private parm: () => Base[] = () => [d1, d2]) { } } ->x109 : Symbol(x109, Decl(generatedContextualTyping.ts, 112, 95)) ->parm : Symbol(parm, Decl(generatedContextualTyping.ts, 113, 25)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) ->d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) ->d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) - -class x110 { constructor(private parm: () => Base[] = function() { return [d1, d2] }) { } } ->x110 : Symbol(x110, Decl(generatedContextualTyping.ts, 113, 75)) ->parm : Symbol(parm, Decl(generatedContextualTyping.ts, 114, 25)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) ->d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) ->d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) - -class x111 { constructor(private parm: () => Base[] = function named() { return [d1, d2] }) { } } ->x111 : Symbol(x111, Decl(generatedContextualTyping.ts, 114, 91)) ->parm : Symbol(parm, Decl(generatedContextualTyping.ts, 115, 25)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) ->named : Symbol(named, Decl(generatedContextualTyping.ts, 115, 53)) ->d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) ->d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) - -class x112 { constructor(private parm: { (): Base[]; } = () => [d1, d2]) { } } ->x112 : Symbol(x112, Decl(generatedContextualTyping.ts, 115, 97)) ->parm : Symbol(parm, Decl(generatedContextualTyping.ts, 116, 25)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) ->d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) ->d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) - -class x113 { constructor(private parm: { (): Base[]; } = function() { return [d1, d2] }) { } } ->x113 : Symbol(x113, Decl(generatedContextualTyping.ts, 116, 78)) ->parm : Symbol(parm, Decl(generatedContextualTyping.ts, 117, 25)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) ->d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) ->d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) - -class x114 { constructor(private parm: { (): Base[]; } = function named() { return [d1, d2] }) { } } ->x114 : Symbol(x114, Decl(generatedContextualTyping.ts, 117, 94)) ->parm : Symbol(parm, Decl(generatedContextualTyping.ts, 118, 25)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) ->named : Symbol(named, Decl(generatedContextualTyping.ts, 118, 56)) ->d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) ->d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) - -class x115 { constructor(private parm: Base[] = [d1, d2]) { } } ->x115 : Symbol(x115, Decl(generatedContextualTyping.ts, 118, 100)) ->parm : Symbol(parm, Decl(generatedContextualTyping.ts, 119, 25)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) ->d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) ->d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) - -class x116 { constructor(private parm: Array = [d1, d2]) { } } ->x116 : Symbol(x116, Decl(generatedContextualTyping.ts, 119, 63)) ->parm : Symbol(parm, Decl(generatedContextualTyping.ts, 120, 25)) ->Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) ->d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) ->d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) - -class x117 { constructor(private parm: { [n: number]: Base; } = [d1, d2]) { } } ->x117 : Symbol(x117, Decl(generatedContextualTyping.ts, 120, 68)) ->parm : Symbol(parm, Decl(generatedContextualTyping.ts, 121, 25)) ->n : Symbol(n, Decl(generatedContextualTyping.ts, 121, 42)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) ->d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) ->d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) - -class x118 { constructor(private parm: {n: Base[]; } = { n: [d1, d2] }) { } } ->x118 : Symbol(x118, Decl(generatedContextualTyping.ts, 121, 79)) ->parm : Symbol(parm, Decl(generatedContextualTyping.ts, 122, 25)) ->n : Symbol(n, Decl(generatedContextualTyping.ts, 122, 40)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) ->n : Symbol(n, Decl(generatedContextualTyping.ts, 122, 57)) ->d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) ->d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) - -class x119 { constructor(private parm: (s: Base[]) => any = n => { var n: Base[]; return null; }) { } } ->x119 : Symbol(x119, Decl(generatedContextualTyping.ts, 122, 78)) ->parm : Symbol(parm, Decl(generatedContextualTyping.ts, 123, 25)) ->s : Symbol(s, Decl(generatedContextualTyping.ts, 123, 40)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) ->n : Symbol(n, Decl(generatedContextualTyping.ts, 123, 59), Decl(generatedContextualTyping.ts, 123, 70)) ->n : Symbol(n, Decl(generatedContextualTyping.ts, 123, 59), Decl(generatedContextualTyping.ts, 123, 70)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) - -class x120 { constructor(private parm: Genric = { func: n => { return [d1, d2]; } }) { } } ->x120 : Symbol(x120, Decl(generatedContextualTyping.ts, 123, 103)) ->parm : Symbol(parm, Decl(generatedContextualTyping.ts, 124, 25)) ->Genric : Symbol(Genric, Decl(generatedContextualTyping.ts, 2, 42)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) ->func : Symbol(func, Decl(generatedContextualTyping.ts, 124, 55)) ->n : Symbol(n, Decl(generatedContextualTyping.ts, 124, 61)) ->d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) ->d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) - -function x121(parm: () => Base[] = () => [d1, d2]) { } ->x121 : Symbol(x121, Decl(generatedContextualTyping.ts, 124, 96)) ->parm : Symbol(parm, Decl(generatedContextualTyping.ts, 125, 14)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) ->d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) ->d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) - -function x122(parm: () => Base[] = function() { return [d1, d2] }) { } ->x122 : Symbol(x122, Decl(generatedContextualTyping.ts, 125, 54)) ->parm : Symbol(parm, Decl(generatedContextualTyping.ts, 126, 14)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) ->d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) ->d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) - -function x123(parm: () => Base[] = function named() { return [d1, d2] }) { } ->x123 : Symbol(x123, Decl(generatedContextualTyping.ts, 126, 70)) ->parm : Symbol(parm, Decl(generatedContextualTyping.ts, 127, 14)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) ->named : Symbol(named, Decl(generatedContextualTyping.ts, 127, 34)) ->d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) ->d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) - -function x124(parm: { (): Base[]; } = () => [d1, d2]) { } ->x124 : Symbol(x124, Decl(generatedContextualTyping.ts, 127, 76)) ->parm : Symbol(parm, Decl(generatedContextualTyping.ts, 128, 14)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) ->d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) ->d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) - -function x125(parm: { (): Base[]; } = function() { return [d1, d2] }) { } ->x125 : Symbol(x125, Decl(generatedContextualTyping.ts, 128, 57)) ->parm : Symbol(parm, Decl(generatedContextualTyping.ts, 129, 14)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) ->d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) ->d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) - -function x126(parm: { (): Base[]; } = function named() { return [d1, d2] }) { } ->x126 : Symbol(x126, Decl(generatedContextualTyping.ts, 129, 73)) ->parm : Symbol(parm, Decl(generatedContextualTyping.ts, 130, 14)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) ->named : Symbol(named, Decl(generatedContextualTyping.ts, 130, 37)) ->d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) ->d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) - -function x127(parm: Base[] = [d1, d2]) { } ->x127 : Symbol(x127, Decl(generatedContextualTyping.ts, 130, 79)) ->parm : Symbol(parm, Decl(generatedContextualTyping.ts, 131, 14)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) ->d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) ->d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) - -function x128(parm: Array = [d1, d2]) { } ->x128 : Symbol(x128, Decl(generatedContextualTyping.ts, 131, 42)) ->parm : Symbol(parm, Decl(generatedContextualTyping.ts, 132, 14)) ->Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) ->d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) ->d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) - -function x129(parm: { [n: number]: Base; } = [d1, d2]) { } ->x129 : Symbol(x129, Decl(generatedContextualTyping.ts, 132, 47)) ->parm : Symbol(parm, Decl(generatedContextualTyping.ts, 133, 14)) ->n : Symbol(n, Decl(generatedContextualTyping.ts, 133, 23)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) ->d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) ->d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) - -function x130(parm: {n: Base[]; } = { n: [d1, d2] }) { } ->x130 : Symbol(x130, Decl(generatedContextualTyping.ts, 133, 58)) ->parm : Symbol(parm, Decl(generatedContextualTyping.ts, 134, 14)) ->n : Symbol(n, Decl(generatedContextualTyping.ts, 134, 21)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) ->n : Symbol(n, Decl(generatedContextualTyping.ts, 134, 38)) ->d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) ->d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) - -function x131(parm: (s: Base[]) => any = n => { var n: Base[]; return null; }) { } ->x131 : Symbol(x131, Decl(generatedContextualTyping.ts, 134, 57)) ->parm : Symbol(parm, Decl(generatedContextualTyping.ts, 135, 14)) ->s : Symbol(s, Decl(generatedContextualTyping.ts, 135, 21)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) ->n : Symbol(n, Decl(generatedContextualTyping.ts, 135, 40), Decl(generatedContextualTyping.ts, 135, 51)) ->n : Symbol(n, Decl(generatedContextualTyping.ts, 135, 40), Decl(generatedContextualTyping.ts, 135, 51)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) - -function x132(parm: Genric = { func: n => { return [d1, d2]; } }) { } ->x132 : Symbol(x132, Decl(generatedContextualTyping.ts, 135, 82)) ->parm : Symbol(parm, Decl(generatedContextualTyping.ts, 136, 14)) ->Genric : Symbol(Genric, Decl(generatedContextualTyping.ts, 2, 42)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) ->func : Symbol(func, Decl(generatedContextualTyping.ts, 136, 36)) ->n : Symbol(n, Decl(generatedContextualTyping.ts, 136, 42)) ->d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) ->d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) - -function x133(): () => Base[] { return () => [d1, d2]; } ->x133 : Symbol(x133, Decl(generatedContextualTyping.ts, 136, 75)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) ->d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) ->d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) - -function x134(): () => Base[] { return function() { return [d1, d2] }; } ->x134 : Symbol(x134, Decl(generatedContextualTyping.ts, 137, 56)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) ->d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) ->d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) - -function x135(): () => Base[] { return function named() { return [d1, d2] }; } ->x135 : Symbol(x135, Decl(generatedContextualTyping.ts, 138, 72)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) ->named : Symbol(named, Decl(generatedContextualTyping.ts, 139, 38)) ->d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) ->d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) - -function x136(): { (): Base[]; } { return () => [d1, d2]; } ->x136 : Symbol(x136, Decl(generatedContextualTyping.ts, 139, 78)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) ->d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) ->d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) - -function x137(): { (): Base[]; } { return function() { return [d1, d2] }; } ->x137 : Symbol(x137, Decl(generatedContextualTyping.ts, 140, 59)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) ->d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) ->d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) - -function x138(): { (): Base[]; } { return function named() { return [d1, d2] }; } ->x138 : Symbol(x138, Decl(generatedContextualTyping.ts, 141, 75)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) ->named : Symbol(named, Decl(generatedContextualTyping.ts, 142, 41)) ->d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) ->d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) - -function x139(): Base[] { return [d1, d2]; } ->x139 : Symbol(x139, Decl(generatedContextualTyping.ts, 142, 81)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) ->d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) ->d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) - -function x140(): Array { return [d1, d2]; } ->x140 : Symbol(x140, Decl(generatedContextualTyping.ts, 143, 44)) ->Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) ->d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) ->d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) - -function x141(): { [n: number]: Base; } { return [d1, d2]; } ->x141 : Symbol(x141, Decl(generatedContextualTyping.ts, 144, 49)) ->n : Symbol(n, Decl(generatedContextualTyping.ts, 145, 20)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) ->d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) ->d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) - -function x142(): {n: Base[]; } { return { n: [d1, d2] }; } ->x142 : Symbol(x142, Decl(generatedContextualTyping.ts, 145, 60)) ->n : Symbol(n, Decl(generatedContextualTyping.ts, 146, 18)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) ->n : Symbol(n, Decl(generatedContextualTyping.ts, 146, 42)) ->d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) ->d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) - -function x143(): (s: Base[]) => any { return n => { var n: Base[]; return null; }; } ->x143 : Symbol(x143, Decl(generatedContextualTyping.ts, 146, 59)) ->s : Symbol(s, Decl(generatedContextualTyping.ts, 147, 18)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) ->n : Symbol(n, Decl(generatedContextualTyping.ts, 147, 44), Decl(generatedContextualTyping.ts, 147, 55)) ->n : Symbol(n, Decl(generatedContextualTyping.ts, 147, 44), Decl(generatedContextualTyping.ts, 147, 55)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) - -function x144(): Genric { return { func: n => { return [d1, d2]; } }; } ->x144 : Symbol(x144, Decl(generatedContextualTyping.ts, 147, 84)) ->Genric : Symbol(Genric, Decl(generatedContextualTyping.ts, 2, 42)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) ->func : Symbol(func, Decl(generatedContextualTyping.ts, 148, 40)) ->n : Symbol(n, Decl(generatedContextualTyping.ts, 148, 46)) ->d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) ->d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) - -function x145(): () => Base[] { return () => [d1, d2]; return () => [d1, d2]; } ->x145 : Symbol(x145, Decl(generatedContextualTyping.ts, 148, 77)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) ->d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) ->d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) ->d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) ->d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) - -function x146(): () => Base[] { return function() { return [d1, d2] }; return function() { return [d1, d2] }; } ->x146 : Symbol(x146, Decl(generatedContextualTyping.ts, 149, 79)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) ->d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) ->d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) ->d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) ->d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) - -function x147(): () => Base[] { return function named() { return [d1, d2] }; return function named() { return [d1, d2] }; } ->x147 : Symbol(x147, Decl(generatedContextualTyping.ts, 150, 111)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) ->named : Symbol(named, Decl(generatedContextualTyping.ts, 151, 38)) ->d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) ->d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) ->named : Symbol(named, Decl(generatedContextualTyping.ts, 151, 83)) ->d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) ->d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) - -function x148(): { (): Base[]; } { return () => [d1, d2]; return () => [d1, d2]; } ->x148 : Symbol(x148, Decl(generatedContextualTyping.ts, 151, 123)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) ->d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) ->d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) ->d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) ->d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) - -function x149(): { (): Base[]; } { return function() { return [d1, d2] }; return function() { return [d1, d2] }; } ->x149 : Symbol(x149, Decl(generatedContextualTyping.ts, 152, 82)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) ->d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) ->d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) ->d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) ->d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) - -function x150(): { (): Base[]; } { return function named() { return [d1, d2] }; return function named() { return [d1, d2] }; } ->x150 : Symbol(x150, Decl(generatedContextualTyping.ts, 153, 114)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) ->named : Symbol(named, Decl(generatedContextualTyping.ts, 154, 41)) ->d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) ->d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) ->named : Symbol(named, Decl(generatedContextualTyping.ts, 154, 86)) ->d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) ->d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) - -function x151(): Base[] { return [d1, d2]; return [d1, d2]; } ->x151 : Symbol(x151, Decl(generatedContextualTyping.ts, 154, 126)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) ->d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) ->d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) ->d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) ->d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) - -function x152(): Array { return [d1, d2]; return [d1, d2]; } ->x152 : Symbol(x152, Decl(generatedContextualTyping.ts, 155, 61)) ->Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) ->d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) ->d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) ->d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) ->d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) - -function x153(): { [n: number]: Base; } { return [d1, d2]; return [d1, d2]; } ->x153 : Symbol(x153, Decl(generatedContextualTyping.ts, 156, 66)) ->n : Symbol(n, Decl(generatedContextualTyping.ts, 157, 20)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) ->d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) ->d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) ->d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) ->d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) - -function x154(): {n: Base[]; } { return { n: [d1, d2] }; return { n: [d1, d2] }; } ->x154 : Symbol(x154, Decl(generatedContextualTyping.ts, 157, 77)) ->n : Symbol(n, Decl(generatedContextualTyping.ts, 158, 18)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) ->n : Symbol(n, Decl(generatedContextualTyping.ts, 158, 42)) ->d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) ->d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) ->n : Symbol(n, Decl(generatedContextualTyping.ts, 158, 66)) ->d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) ->d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) - -function x155(): (s: Base[]) => any { return n => { var n: Base[]; return null; }; return n => { var n: Base[]; return null; }; } ->x155 : Symbol(x155, Decl(generatedContextualTyping.ts, 158, 83)) ->s : Symbol(s, Decl(generatedContextualTyping.ts, 159, 18)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) ->n : Symbol(n, Decl(generatedContextualTyping.ts, 159, 44), Decl(generatedContextualTyping.ts, 159, 55)) ->n : Symbol(n, Decl(generatedContextualTyping.ts, 159, 44), Decl(generatedContextualTyping.ts, 159, 55)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) ->n : Symbol(n, Decl(generatedContextualTyping.ts, 159, 89), Decl(generatedContextualTyping.ts, 159, 100)) ->n : Symbol(n, Decl(generatedContextualTyping.ts, 159, 89), Decl(generatedContextualTyping.ts, 159, 100)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) - -function x156(): Genric { return { func: n => { return [d1, d2]; } }; return { func: n => { return [d1, d2]; } }; } ->x156 : Symbol(x156, Decl(generatedContextualTyping.ts, 159, 129)) ->Genric : Symbol(Genric, Decl(generatedContextualTyping.ts, 2, 42)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) ->func : Symbol(func, Decl(generatedContextualTyping.ts, 160, 40)) ->n : Symbol(n, Decl(generatedContextualTyping.ts, 160, 46)) ->d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) ->d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) ->func : Symbol(func, Decl(generatedContextualTyping.ts, 160, 84)) ->n : Symbol(n, Decl(generatedContextualTyping.ts, 160, 90)) ->d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) ->d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) - -var x157: () => () => Base[] = () => { return () => [d1, d2]; }; ->x157 : Symbol(x157, Decl(generatedContextualTyping.ts, 161, 3)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) ->d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) ->d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) - -var x158: () => () => Base[] = () => { return function() { return [d1, d2] }; }; ->x158 : Symbol(x158, Decl(generatedContextualTyping.ts, 162, 3)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) ->d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) ->d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) - -var x159: () => () => Base[] = () => { return function named() { return [d1, d2] }; }; ->x159 : Symbol(x159, Decl(generatedContextualTyping.ts, 163, 3)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) ->named : Symbol(named, Decl(generatedContextualTyping.ts, 163, 45)) ->d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) ->d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) - -var x160: () => { (): Base[]; } = () => { return () => [d1, d2]; }; ->x160 : Symbol(x160, Decl(generatedContextualTyping.ts, 164, 3)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) ->d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) ->d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) - -var x161: () => { (): Base[]; } = () => { return function() { return [d1, d2] }; }; ->x161 : Symbol(x161, Decl(generatedContextualTyping.ts, 165, 3)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) ->d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) ->d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) - -var x162: () => { (): Base[]; } = () => { return function named() { return [d1, d2] }; }; ->x162 : Symbol(x162, Decl(generatedContextualTyping.ts, 166, 3)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) ->named : Symbol(named, Decl(generatedContextualTyping.ts, 166, 48)) ->d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) ->d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) - -var x163: () => Base[] = () => { return [d1, d2]; }; ->x163 : Symbol(x163, Decl(generatedContextualTyping.ts, 167, 3)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) ->d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) ->d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) - -var x164: () => Array = () => { return [d1, d2]; }; ->x164 : Symbol(x164, Decl(generatedContextualTyping.ts, 168, 3)) ->Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) ->d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) ->d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) - -var x165: () => { [n: number]: Base; } = () => { return [d1, d2]; }; ->x165 : Symbol(x165, Decl(generatedContextualTyping.ts, 169, 3)) ->n : Symbol(n, Decl(generatedContextualTyping.ts, 169, 19)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) ->d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) ->d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) - -var x166: () => {n: Base[]; } = () => { return { n: [d1, d2] }; }; ->x166 : Symbol(x166, Decl(generatedContextualTyping.ts, 170, 3)) ->n : Symbol(n, Decl(generatedContextualTyping.ts, 170, 17)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) ->n : Symbol(n, Decl(generatedContextualTyping.ts, 170, 49)) ->d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) ->d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) - -var x167: () => (s: Base[]) => any = () => { return n => { var n: Base[]; return null; }; }; ->x167 : Symbol(x167, Decl(generatedContextualTyping.ts, 171, 3)) ->s : Symbol(s, Decl(generatedContextualTyping.ts, 171, 17)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) ->n : Symbol(n, Decl(generatedContextualTyping.ts, 171, 51), Decl(generatedContextualTyping.ts, 171, 62)) ->n : Symbol(n, Decl(generatedContextualTyping.ts, 171, 51), Decl(generatedContextualTyping.ts, 171, 62)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) - -var x168: () => Genric = () => { return { func: n => { return [d1, d2]; } }; }; ->x168 : Symbol(x168, Decl(generatedContextualTyping.ts, 172, 3)) ->Genric : Symbol(Genric, Decl(generatedContextualTyping.ts, 2, 42)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) ->func : Symbol(func, Decl(generatedContextualTyping.ts, 172, 47)) ->n : Symbol(n, Decl(generatedContextualTyping.ts, 172, 53)) ->d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) ->d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) - -var x169: () => () => Base[] = function() { return () => [d1, d2]; }; ->x169 : Symbol(x169, Decl(generatedContextualTyping.ts, 173, 3)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) ->d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) ->d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) - -var x170: () => () => Base[] = function() { return function() { return [d1, d2] }; }; ->x170 : Symbol(x170, Decl(generatedContextualTyping.ts, 174, 3)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) ->d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) ->d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) - -var x171: () => () => Base[] = function() { return function named() { return [d1, d2] }; }; ->x171 : Symbol(x171, Decl(generatedContextualTyping.ts, 175, 3)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) ->named : Symbol(named, Decl(generatedContextualTyping.ts, 175, 50)) ->d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) ->d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) - -var x172: () => { (): Base[]; } = function() { return () => [d1, d2]; }; ->x172 : Symbol(x172, Decl(generatedContextualTyping.ts, 176, 3)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) ->d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) ->d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) - -var x173: () => { (): Base[]; } = function() { return function() { return [d1, d2] }; }; ->x173 : Symbol(x173, Decl(generatedContextualTyping.ts, 177, 3)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) ->d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) ->d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) - -var x174: () => { (): Base[]; } = function() { return function named() { return [d1, d2] }; }; ->x174 : Symbol(x174, Decl(generatedContextualTyping.ts, 178, 3)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) ->named : Symbol(named, Decl(generatedContextualTyping.ts, 178, 53)) ->d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) ->d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) - -var x175: () => Base[] = function() { return [d1, d2]; }; ->x175 : Symbol(x175, Decl(generatedContextualTyping.ts, 179, 3)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) ->d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) ->d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) - -var x176: () => Array = function() { return [d1, d2]; }; ->x176 : Symbol(x176, Decl(generatedContextualTyping.ts, 180, 3)) ->Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) ->d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) ->d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) - -var x177: () => { [n: number]: Base; } = function() { return [d1, d2]; }; ->x177 : Symbol(x177, Decl(generatedContextualTyping.ts, 181, 3)) ->n : Symbol(n, Decl(generatedContextualTyping.ts, 181, 19)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) ->d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) ->d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) - -var x178: () => {n: Base[]; } = function() { return { n: [d1, d2] }; }; ->x178 : Symbol(x178, Decl(generatedContextualTyping.ts, 182, 3)) ->n : Symbol(n, Decl(generatedContextualTyping.ts, 182, 17)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) ->n : Symbol(n, Decl(generatedContextualTyping.ts, 182, 54)) ->d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) ->d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) - -var x179: () => (s: Base[]) => any = function() { return n => { var n: Base[]; return null; }; }; ->x179 : Symbol(x179, Decl(generatedContextualTyping.ts, 183, 3)) ->s : Symbol(s, Decl(generatedContextualTyping.ts, 183, 17)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) ->n : Symbol(n, Decl(generatedContextualTyping.ts, 183, 56), Decl(generatedContextualTyping.ts, 183, 67)) ->n : Symbol(n, Decl(generatedContextualTyping.ts, 183, 56), Decl(generatedContextualTyping.ts, 183, 67)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) - -var x180: () => Genric = function() { return { func: n => { return [d1, d2]; } }; }; ->x180 : Symbol(x180, Decl(generatedContextualTyping.ts, 184, 3)) ->Genric : Symbol(Genric, Decl(generatedContextualTyping.ts, 2, 42)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) ->func : Symbol(func, Decl(generatedContextualTyping.ts, 184, 52)) ->n : Symbol(n, Decl(generatedContextualTyping.ts, 184, 58)) ->d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) ->d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) - -module x181 { var t: () => Base[] = () => [d1, d2]; } ->x181 : Symbol(x181, Decl(generatedContextualTyping.ts, 184, 90)) ->t : Symbol(t, Decl(generatedContextualTyping.ts, 185, 17)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) ->d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) ->d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) - -module x182 { var t: () => Base[] = function() { return [d1, d2] }; } ->x182 : Symbol(x182, Decl(generatedContextualTyping.ts, 185, 53)) ->t : Symbol(t, Decl(generatedContextualTyping.ts, 186, 17)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) ->d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) ->d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) - -module x183 { var t: () => Base[] = function named() { return [d1, d2] }; } ->x183 : Symbol(x183, Decl(generatedContextualTyping.ts, 186, 69)) ->t : Symbol(t, Decl(generatedContextualTyping.ts, 187, 17)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) ->named : Symbol(named, Decl(generatedContextualTyping.ts, 187, 35)) ->d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) ->d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) - -module x184 { var t: { (): Base[]; } = () => [d1, d2]; } ->x184 : Symbol(x184, Decl(generatedContextualTyping.ts, 187, 75)) ->t : Symbol(t, Decl(generatedContextualTyping.ts, 188, 17)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) ->d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) ->d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) - -module x185 { var t: { (): Base[]; } = function() { return [d1, d2] }; } ->x185 : Symbol(x185, Decl(generatedContextualTyping.ts, 188, 56)) ->t : Symbol(t, Decl(generatedContextualTyping.ts, 189, 17)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) ->d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) ->d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) - -module x186 { var t: { (): Base[]; } = function named() { return [d1, d2] }; } ->x186 : Symbol(x186, Decl(generatedContextualTyping.ts, 189, 72)) ->t : Symbol(t, Decl(generatedContextualTyping.ts, 190, 17)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) ->named : Symbol(named, Decl(generatedContextualTyping.ts, 190, 38)) ->d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) ->d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) - -module x187 { var t: Base[] = [d1, d2]; } ->x187 : Symbol(x187, Decl(generatedContextualTyping.ts, 190, 78)) ->t : Symbol(t, Decl(generatedContextualTyping.ts, 191, 17)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) ->d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) ->d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) - -module x188 { var t: Array = [d1, d2]; } ->x188 : Symbol(x188, Decl(generatedContextualTyping.ts, 191, 41)) ->t : Symbol(t, Decl(generatedContextualTyping.ts, 192, 17)) ->Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) ->d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) ->d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) - -module x189 { var t: { [n: number]: Base; } = [d1, d2]; } ->x189 : Symbol(x189, Decl(generatedContextualTyping.ts, 192, 46)) ->t : Symbol(t, Decl(generatedContextualTyping.ts, 193, 17)) ->n : Symbol(n, Decl(generatedContextualTyping.ts, 193, 24)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) ->d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) ->d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) - -module x190 { var t: {n: Base[]; } = { n: [d1, d2] }; } ->x190 : Symbol(x190, Decl(generatedContextualTyping.ts, 193, 57)) ->t : Symbol(t, Decl(generatedContextualTyping.ts, 194, 17)) ->n : Symbol(n, Decl(generatedContextualTyping.ts, 194, 22)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) ->n : Symbol(n, Decl(generatedContextualTyping.ts, 194, 39)) ->d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) ->d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) - -module x191 { var t: (s: Base[]) => any = n => { var n: Base[]; return null; }; } ->x191 : Symbol(x191, Decl(generatedContextualTyping.ts, 194, 56)) ->t : Symbol(t, Decl(generatedContextualTyping.ts, 195, 17)) ->s : Symbol(s, Decl(generatedContextualTyping.ts, 195, 22)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) ->n : Symbol(n, Decl(generatedContextualTyping.ts, 195, 41), Decl(generatedContextualTyping.ts, 195, 52)) ->n : Symbol(n, Decl(generatedContextualTyping.ts, 195, 41), Decl(generatedContextualTyping.ts, 195, 52)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) - -module x192 { var t: Genric = { func: n => { return [d1, d2]; } }; } ->x192 : Symbol(x192, Decl(generatedContextualTyping.ts, 195, 81)) ->t : Symbol(t, Decl(generatedContextualTyping.ts, 196, 17)) ->Genric : Symbol(Genric, Decl(generatedContextualTyping.ts, 2, 42)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) ->func : Symbol(func, Decl(generatedContextualTyping.ts, 196, 37)) ->n : Symbol(n, Decl(generatedContextualTyping.ts, 196, 43)) ->d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) ->d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) - -module x193 { export var t: () => Base[] = () => [d1, d2]; } ->x193 : Symbol(x193, Decl(generatedContextualTyping.ts, 196, 74)) ->t : Symbol(t, Decl(generatedContextualTyping.ts, 197, 24)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) ->d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) ->d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) - -module x194 { export var t: () => Base[] = function() { return [d1, d2] }; } ->x194 : Symbol(x194, Decl(generatedContextualTyping.ts, 197, 60)) ->t : Symbol(t, Decl(generatedContextualTyping.ts, 198, 24)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) ->d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) ->d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) - -module x195 { export var t: () => Base[] = function named() { return [d1, d2] }; } ->x195 : Symbol(x195, Decl(generatedContextualTyping.ts, 198, 76)) ->t : Symbol(t, Decl(generatedContextualTyping.ts, 199, 24)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) ->named : Symbol(named, Decl(generatedContextualTyping.ts, 199, 42)) ->d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) ->d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) - -module x196 { export var t: { (): Base[]; } = () => [d1, d2]; } ->x196 : Symbol(x196, Decl(generatedContextualTyping.ts, 199, 82)) ->t : Symbol(t, Decl(generatedContextualTyping.ts, 200, 24)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) ->d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) ->d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) - -module x197 { export var t: { (): Base[]; } = function() { return [d1, d2] }; } ->x197 : Symbol(x197, Decl(generatedContextualTyping.ts, 200, 63)) ->t : Symbol(t, Decl(generatedContextualTyping.ts, 201, 24)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) ->d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) ->d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) - -module x198 { export var t: { (): Base[]; } = function named() { return [d1, d2] }; } ->x198 : Symbol(x198, Decl(generatedContextualTyping.ts, 201, 79)) ->t : Symbol(t, Decl(generatedContextualTyping.ts, 202, 24)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) ->named : Symbol(named, Decl(generatedContextualTyping.ts, 202, 45)) ->d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) ->d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) - -module x199 { export var t: Base[] = [d1, d2]; } ->x199 : Symbol(x199, Decl(generatedContextualTyping.ts, 202, 85)) ->t : Symbol(t, Decl(generatedContextualTyping.ts, 203, 24)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) ->d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) ->d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) - -module x200 { export var t: Array = [d1, d2]; } ->x200 : Symbol(x200, Decl(generatedContextualTyping.ts, 203, 48)) ->t : Symbol(t, Decl(generatedContextualTyping.ts, 204, 24)) ->Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) ->d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) ->d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) - -module x201 { export var t: { [n: number]: Base; } = [d1, d2]; } ->x201 : Symbol(x201, Decl(generatedContextualTyping.ts, 204, 53)) ->t : Symbol(t, Decl(generatedContextualTyping.ts, 205, 24)) ->n : Symbol(n, Decl(generatedContextualTyping.ts, 205, 31)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) ->d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) ->d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) - -module x202 { export var t: {n: Base[]; } = { n: [d1, d2] }; } ->x202 : Symbol(x202, Decl(generatedContextualTyping.ts, 205, 64)) ->t : Symbol(t, Decl(generatedContextualTyping.ts, 206, 24)) ->n : Symbol(n, Decl(generatedContextualTyping.ts, 206, 29)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) ->n : Symbol(n, Decl(generatedContextualTyping.ts, 206, 46)) ->d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) ->d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) - -module x203 { export var t: (s: Base[]) => any = n => { var n: Base[]; return null; }; } ->x203 : Symbol(x203, Decl(generatedContextualTyping.ts, 206, 63)) ->t : Symbol(t, Decl(generatedContextualTyping.ts, 207, 24)) ->s : Symbol(s, Decl(generatedContextualTyping.ts, 207, 29)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) ->n : Symbol(n, Decl(generatedContextualTyping.ts, 207, 48), Decl(generatedContextualTyping.ts, 207, 59)) ->n : Symbol(n, Decl(generatedContextualTyping.ts, 207, 48), Decl(generatedContextualTyping.ts, 207, 59)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) - -module x204 { export var t: Genric = { func: n => { return [d1, d2]; } }; } ->x204 : Symbol(x204, Decl(generatedContextualTyping.ts, 207, 88)) ->t : Symbol(t, Decl(generatedContextualTyping.ts, 208, 24)) ->Genric : Symbol(Genric, Decl(generatedContextualTyping.ts, 2, 42)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) ->func : Symbol(func, Decl(generatedContextualTyping.ts, 208, 44)) ->n : Symbol(n, Decl(generatedContextualTyping.ts, 208, 50)) ->d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) ->d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) - -var x206 = <() => Base[]>function() { return [d1, d2] }; ->x206 : Symbol(x206, Decl(generatedContextualTyping.ts, 209, 3)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) ->d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) ->d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) - -var x207 = <() => Base[]>function named() { return [d1, d2] }; ->x207 : Symbol(x207, Decl(generatedContextualTyping.ts, 210, 3)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) ->named : Symbol(named, Decl(generatedContextualTyping.ts, 210, 25)) ->d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) ->d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) - -var x209 = <{ (): Base[]; }>function() { return [d1, d2] }; ->x209 : Symbol(x209, Decl(generatedContextualTyping.ts, 211, 3)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) ->d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) ->d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) - -var x210 = <{ (): Base[]; }>function named() { return [d1, d2] }; ->x210 : Symbol(x210, Decl(generatedContextualTyping.ts, 212, 3)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) ->named : Symbol(named, Decl(generatedContextualTyping.ts, 212, 28)) ->d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) ->d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) - -var x211 = [d1, d2]; ->x211 : Symbol(x211, Decl(generatedContextualTyping.ts, 213, 3)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) ->d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) ->d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) - -var x212 = >[d1, d2]; ->x212 : Symbol(x212, Decl(generatedContextualTyping.ts, 214, 3)) ->Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) ->d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) ->d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) - -var x213 = <{ [n: number]: Base; }>[d1, d2]; ->x213 : Symbol(x213, Decl(generatedContextualTyping.ts, 215, 3)) ->n : Symbol(n, Decl(generatedContextualTyping.ts, 215, 15)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) ->d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) ->d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) - -var x214 = <{n: Base[]; } >{ n: [d1, d2] }; ->x214 : Symbol(x214, Decl(generatedContextualTyping.ts, 216, 3)) ->n : Symbol(n, Decl(generatedContextualTyping.ts, 216, 13)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) ->n : Symbol(n, Decl(generatedContextualTyping.ts, 216, 28)) ->d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) ->d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) - -var x216 = >{ func: n => { return [d1, d2]; } }; ->x216 : Symbol(x216, Decl(generatedContextualTyping.ts, 217, 3)) ->Genric : Symbol(Genric, Decl(generatedContextualTyping.ts, 2, 42)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) ->func : Symbol(func, Decl(generatedContextualTyping.ts, 217, 26)) ->n : Symbol(n, Decl(generatedContextualTyping.ts, 217, 32)) ->d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) ->d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) - -var x217 = (<() => Base[]>undefined) || function() { return [d1, d2] }; ->x217 : Symbol(x217, Decl(generatedContextualTyping.ts, 218, 3)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) ->undefined : Symbol(undefined) ->d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) ->d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) - -var x218 = (<() => Base[]>undefined) || function named() { return [d1, d2] }; ->x218 : Symbol(x218, Decl(generatedContextualTyping.ts, 219, 3)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) ->undefined : Symbol(undefined) ->named : Symbol(named, Decl(generatedContextualTyping.ts, 219, 39)) ->d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) ->d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) - -var x219 = (<{ (): Base[]; }>undefined) || function() { return [d1, d2] }; ->x219 : Symbol(x219, Decl(generatedContextualTyping.ts, 220, 3)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) ->undefined : Symbol(undefined) ->d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) ->d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) - -var x220 = (<{ (): Base[]; }>undefined) || function named() { return [d1, d2] }; ->x220 : Symbol(x220, Decl(generatedContextualTyping.ts, 221, 3)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) ->undefined : Symbol(undefined) ->named : Symbol(named, Decl(generatedContextualTyping.ts, 221, 42)) ->d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) ->d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) - -var x221 = (undefined) || [d1, d2]; ->x221 : Symbol(x221, Decl(generatedContextualTyping.ts, 222, 3)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) ->undefined : Symbol(undefined) ->d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) ->d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) - -var x222 = (>undefined) || [d1, d2]; ->x222 : Symbol(x222, Decl(generatedContextualTyping.ts, 223, 3)) ->Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) ->undefined : Symbol(undefined) ->d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) ->d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) - -var x223 = (<{ [n: number]: Base; }>undefined) || [d1, d2]; ->x223 : Symbol(x223, Decl(generatedContextualTyping.ts, 224, 3)) ->n : Symbol(n, Decl(generatedContextualTyping.ts, 224, 16)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) ->undefined : Symbol(undefined) ->d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) ->d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) - -var x224 = (<{n: Base[]; } >undefined) || { n: [d1, d2] }; ->x224 : Symbol(x224, Decl(generatedContextualTyping.ts, 225, 3)) ->n : Symbol(n, Decl(generatedContextualTyping.ts, 225, 14)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) ->undefined : Symbol(undefined) ->n : Symbol(n, Decl(generatedContextualTyping.ts, 225, 43)) ->d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) ->d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) - -var x225: () => Base[]; x225 = () => [d1, d2]; ->x225 : Symbol(x225, Decl(generatedContextualTyping.ts, 226, 3)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) ->x225 : Symbol(x225, Decl(generatedContextualTyping.ts, 226, 3)) ->d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) ->d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) - -var x226: () => Base[]; x226 = function() { return [d1, d2] }; ->x226 : Symbol(x226, Decl(generatedContextualTyping.ts, 227, 3)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) ->x226 : Symbol(x226, Decl(generatedContextualTyping.ts, 227, 3)) ->d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) ->d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) - -var x227: () => Base[]; x227 = function named() { return [d1, d2] }; ->x227 : Symbol(x227, Decl(generatedContextualTyping.ts, 228, 3)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) ->x227 : Symbol(x227, Decl(generatedContextualTyping.ts, 228, 3)) ->named : Symbol(named, Decl(generatedContextualTyping.ts, 228, 30)) ->d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) ->d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) - -var x228: { (): Base[]; }; x228 = () => [d1, d2]; ->x228 : Symbol(x228, Decl(generatedContextualTyping.ts, 229, 3)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) ->x228 : Symbol(x228, Decl(generatedContextualTyping.ts, 229, 3)) ->d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) ->d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) - -var x229: { (): Base[]; }; x229 = function() { return [d1, d2] }; ->x229 : Symbol(x229, Decl(generatedContextualTyping.ts, 230, 3)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) ->x229 : Symbol(x229, Decl(generatedContextualTyping.ts, 230, 3)) ->d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) ->d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) - -var x230: { (): Base[]; }; x230 = function named() { return [d1, d2] }; ->x230 : Symbol(x230, Decl(generatedContextualTyping.ts, 231, 3)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) ->x230 : Symbol(x230, Decl(generatedContextualTyping.ts, 231, 3)) ->named : Symbol(named, Decl(generatedContextualTyping.ts, 231, 33)) ->d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) ->d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) - -var x231: Base[]; x231 = [d1, d2]; ->x231 : Symbol(x231, Decl(generatedContextualTyping.ts, 232, 3)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) ->x231 : Symbol(x231, Decl(generatedContextualTyping.ts, 232, 3)) ->d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) ->d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) - -var x232: Array; x232 = [d1, d2]; ->x232 : Symbol(x232, Decl(generatedContextualTyping.ts, 233, 3)) ->Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) ->x232 : Symbol(x232, Decl(generatedContextualTyping.ts, 233, 3)) ->d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) ->d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) - -var x233: { [n: number]: Base; }; x233 = [d1, d2]; ->x233 : Symbol(x233, Decl(generatedContextualTyping.ts, 234, 3)) ->n : Symbol(n, Decl(generatedContextualTyping.ts, 234, 13)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) ->x233 : Symbol(x233, Decl(generatedContextualTyping.ts, 234, 3)) ->d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) ->d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) - -var x234: {n: Base[]; } ; x234 = { n: [d1, d2] }; ->x234 : Symbol(x234, Decl(generatedContextualTyping.ts, 235, 3)) ->n : Symbol(n, Decl(generatedContextualTyping.ts, 235, 11)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) ->x234 : Symbol(x234, Decl(generatedContextualTyping.ts, 235, 3)) ->n : Symbol(n, Decl(generatedContextualTyping.ts, 235, 34)) ->d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) ->d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) - -var x235: (s: Base[]) => any; x235 = n => { var n: Base[]; return null; }; ->x235 : Symbol(x235, Decl(generatedContextualTyping.ts, 236, 3)) ->s : Symbol(s, Decl(generatedContextualTyping.ts, 236, 11)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) ->x235 : Symbol(x235, Decl(generatedContextualTyping.ts, 236, 3)) ->n : Symbol(n, Decl(generatedContextualTyping.ts, 236, 36), Decl(generatedContextualTyping.ts, 236, 47)) ->n : Symbol(n, Decl(generatedContextualTyping.ts, 236, 36), Decl(generatedContextualTyping.ts, 236, 47)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) - -var x236: Genric; x236 = { func: n => { return [d1, d2]; } }; ->x236 : Symbol(x236, Decl(generatedContextualTyping.ts, 237, 3)) ->Genric : Symbol(Genric, Decl(generatedContextualTyping.ts, 2, 42)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) ->x236 : Symbol(x236, Decl(generatedContextualTyping.ts, 237, 3)) ->func : Symbol(func, Decl(generatedContextualTyping.ts, 237, 32)) ->n : Symbol(n, Decl(generatedContextualTyping.ts, 237, 38)) ->d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) ->d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) - -var x237: { n: () => Base[]; } = { n: () => [d1, d2] }; ->x237 : Symbol(x237, Decl(generatedContextualTyping.ts, 238, 3)) ->n : Symbol(n, Decl(generatedContextualTyping.ts, 238, 11)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) ->n : Symbol(n, Decl(generatedContextualTyping.ts, 238, 34)) ->d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) ->d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) - -var x238: { n: () => Base[]; } = { n: function() { return [d1, d2] } }; ->x238 : Symbol(x238, Decl(generatedContextualTyping.ts, 239, 3)) ->n : Symbol(n, Decl(generatedContextualTyping.ts, 239, 11)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) ->n : Symbol(n, Decl(generatedContextualTyping.ts, 239, 34)) ->d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) ->d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) - -var x239: { n: () => Base[]; } = { n: function named() { return [d1, d2] } }; ->x239 : Symbol(x239, Decl(generatedContextualTyping.ts, 240, 3)) ->n : Symbol(n, Decl(generatedContextualTyping.ts, 240, 11)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) ->n : Symbol(n, Decl(generatedContextualTyping.ts, 240, 34)) ->named : Symbol(named, Decl(generatedContextualTyping.ts, 240, 37)) ->d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) ->d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) - -var x240: { n: { (): Base[]; }; } = { n: () => [d1, d2] }; ->x240 : Symbol(x240, Decl(generatedContextualTyping.ts, 241, 3)) ->n : Symbol(n, Decl(generatedContextualTyping.ts, 241, 11)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) ->n : Symbol(n, Decl(generatedContextualTyping.ts, 241, 37)) ->d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) ->d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) - -var x241: { n: { (): Base[]; }; } = { n: function() { return [d1, d2] } }; ->x241 : Symbol(x241, Decl(generatedContextualTyping.ts, 242, 3)) ->n : Symbol(n, Decl(generatedContextualTyping.ts, 242, 11)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) ->n : Symbol(n, Decl(generatedContextualTyping.ts, 242, 37)) ->d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) ->d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) - -var x242: { n: { (): Base[]; }; } = { n: function named() { return [d1, d2] } }; ->x242 : Symbol(x242, Decl(generatedContextualTyping.ts, 243, 3)) ->n : Symbol(n, Decl(generatedContextualTyping.ts, 243, 11)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) ->n : Symbol(n, Decl(generatedContextualTyping.ts, 243, 37)) ->named : Symbol(named, Decl(generatedContextualTyping.ts, 243, 40)) ->d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) ->d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) - -var x243: { n: Base[]; } = { n: [d1, d2] }; ->x243 : Symbol(x243, Decl(generatedContextualTyping.ts, 244, 3)) ->n : Symbol(n, Decl(generatedContextualTyping.ts, 244, 11)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) ->n : Symbol(n, Decl(generatedContextualTyping.ts, 244, 28)) ->d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) ->d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) - -var x244: { n: Array; } = { n: [d1, d2] }; ->x244 : Symbol(x244, Decl(generatedContextualTyping.ts, 245, 3)) ->n : Symbol(n, Decl(generatedContextualTyping.ts, 245, 11)) ->Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) ->n : Symbol(n, Decl(generatedContextualTyping.ts, 245, 33)) ->d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) ->d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) - -var x245: { n: { [n: number]: Base; }; } = { n: [d1, d2] }; ->x245 : Symbol(x245, Decl(generatedContextualTyping.ts, 246, 3)) ->n : Symbol(n, Decl(generatedContextualTyping.ts, 246, 11)) ->n : Symbol(n, Decl(generatedContextualTyping.ts, 246, 18)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) ->n : Symbol(n, Decl(generatedContextualTyping.ts, 246, 44)) ->d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) ->d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) - -var x246: { n: {n: Base[]; } ; } = { n: { n: [d1, d2] } }; ->x246 : Symbol(x246, Decl(generatedContextualTyping.ts, 247, 3)) ->n : Symbol(n, Decl(generatedContextualTyping.ts, 247, 11)) ->n : Symbol(n, Decl(generatedContextualTyping.ts, 247, 16)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) ->n : Symbol(n, Decl(generatedContextualTyping.ts, 247, 36)) ->n : Symbol(n, Decl(generatedContextualTyping.ts, 247, 41)) ->d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) ->d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) - -var x247: { n: (s: Base[]) => any; } = { n: n => { var n: Base[]; return null; } }; ->x247 : Symbol(x247, Decl(generatedContextualTyping.ts, 248, 3)) ->n : Symbol(n, Decl(generatedContextualTyping.ts, 248, 11)) ->s : Symbol(s, Decl(generatedContextualTyping.ts, 248, 16)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) ->n : Symbol(n, Decl(generatedContextualTyping.ts, 248, 40)) ->n : Symbol(n, Decl(generatedContextualTyping.ts, 248, 43), Decl(generatedContextualTyping.ts, 248, 54)) ->n : Symbol(n, Decl(generatedContextualTyping.ts, 248, 43), Decl(generatedContextualTyping.ts, 248, 54)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) - -var x248: { n: Genric; } = { n: { func: n => { return [d1, d2]; } } }; ->x248 : Symbol(x248, Decl(generatedContextualTyping.ts, 249, 3)) ->n : Symbol(n, Decl(generatedContextualTyping.ts, 249, 11)) ->Genric : Symbol(Genric, Decl(generatedContextualTyping.ts, 2, 42)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) ->n : Symbol(n, Decl(generatedContextualTyping.ts, 249, 34)) ->func : Symbol(func, Decl(generatedContextualTyping.ts, 249, 39)) ->n : Symbol(n, Decl(generatedContextualTyping.ts, 249, 45)) ->d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) ->d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) - -var x252: { (): Base[]; }[] = [() => [d1, d2]]; ->x252 : Symbol(x252, Decl(generatedContextualTyping.ts, 250, 3)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) ->d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) ->d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) - -var x253: { (): Base[]; }[] = [function() { return [d1, d2] }]; ->x253 : Symbol(x253, Decl(generatedContextualTyping.ts, 251, 3)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) ->d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) ->d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) - -var x254: { (): Base[]; }[] = [function named() { return [d1, d2] }]; ->x254 : Symbol(x254, Decl(generatedContextualTyping.ts, 252, 3)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) ->named : Symbol(named, Decl(generatedContextualTyping.ts, 252, 31)) ->d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) ->d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) - -var x255: Base[][] = [[d1, d2]]; ->x255 : Symbol(x255, Decl(generatedContextualTyping.ts, 253, 3)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) ->d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) ->d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) - -var x256: Array[] = [[d1, d2]]; ->x256 : Symbol(x256, Decl(generatedContextualTyping.ts, 254, 3)) ->Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) ->d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) ->d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) - -var x257: { [n: number]: Base; }[] = [[d1, d2]]; ->x257 : Symbol(x257, Decl(generatedContextualTyping.ts, 255, 3)) ->n : Symbol(n, Decl(generatedContextualTyping.ts, 255, 13)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) ->d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) ->d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) - -var x258: {n: Base[]; } [] = [{ n: [d1, d2] }]; ->x258 : Symbol(x258, Decl(generatedContextualTyping.ts, 256, 3)) ->n : Symbol(n, Decl(generatedContextualTyping.ts, 256, 11)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) ->n : Symbol(n, Decl(generatedContextualTyping.ts, 256, 31)) ->d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) ->d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) - -var x260: Genric[] = [{ func: n => { return [d1, d2]; } }]; ->x260 : Symbol(x260, Decl(generatedContextualTyping.ts, 257, 3)) ->Genric : Symbol(Genric, Decl(generatedContextualTyping.ts, 2, 42)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) ->func : Symbol(func, Decl(generatedContextualTyping.ts, 257, 29)) ->n : Symbol(n, Decl(generatedContextualTyping.ts, 257, 35)) ->d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) ->d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) - -var x261: () => Base[] = function() { return [d1, d2] } || undefined; ->x261 : Symbol(x261, Decl(generatedContextualTyping.ts, 258, 3)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) ->d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) ->d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) ->undefined : Symbol(undefined) - -var x262: () => Base[] = function named() { return [d1, d2] } || undefined; ->x262 : Symbol(x262, Decl(generatedContextualTyping.ts, 259, 3)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) ->named : Symbol(named, Decl(generatedContextualTyping.ts, 259, 24)) ->d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) ->d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) ->undefined : Symbol(undefined) - -var x263: { (): Base[]; } = function() { return [d1, d2] } || undefined; ->x263 : Symbol(x263, Decl(generatedContextualTyping.ts, 260, 3)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) ->d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) ->d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) ->undefined : Symbol(undefined) - -var x264: { (): Base[]; } = function named() { return [d1, d2] } || undefined; ->x264 : Symbol(x264, Decl(generatedContextualTyping.ts, 261, 3)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) ->named : Symbol(named, Decl(generatedContextualTyping.ts, 261, 27)) ->d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) ->d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) ->undefined : Symbol(undefined) - -var x265: Base[] = [d1, d2] || undefined; ->x265 : Symbol(x265, Decl(generatedContextualTyping.ts, 262, 3)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) ->d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) ->d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) ->undefined : Symbol(undefined) - -var x266: Array = [d1, d2] || undefined; ->x266 : Symbol(x266, Decl(generatedContextualTyping.ts, 263, 3)) ->Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) ->d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) ->d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) ->undefined : Symbol(undefined) - -var x267: { [n: number]: Base; } = [d1, d2] || undefined; ->x267 : Symbol(x267, Decl(generatedContextualTyping.ts, 264, 3)) ->n : Symbol(n, Decl(generatedContextualTyping.ts, 264, 13)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) ->d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) ->d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) ->undefined : Symbol(undefined) - -var x268: {n: Base[]; } = { n: [d1, d2] } || undefined; ->x268 : Symbol(x268, Decl(generatedContextualTyping.ts, 265, 3)) ->n : Symbol(n, Decl(generatedContextualTyping.ts, 265, 11)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) ->n : Symbol(n, Decl(generatedContextualTyping.ts, 265, 28)) ->d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) ->d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) ->undefined : Symbol(undefined) - -var x269: () => Base[] = undefined || function() { return [d1, d2] }; ->x269 : Symbol(x269, Decl(generatedContextualTyping.ts, 266, 3)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) ->undefined : Symbol(undefined) ->d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) ->d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) - -var x270: () => Base[] = undefined || function named() { return [d1, d2] }; ->x270 : Symbol(x270, Decl(generatedContextualTyping.ts, 267, 3)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) ->undefined : Symbol(undefined) ->named : Symbol(named, Decl(generatedContextualTyping.ts, 267, 37)) ->d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) ->d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) - -var x271: { (): Base[]; } = undefined || function() { return [d1, d2] }; ->x271 : Symbol(x271, Decl(generatedContextualTyping.ts, 268, 3)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) ->undefined : Symbol(undefined) ->d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) ->d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) - -var x272: { (): Base[]; } = undefined || function named() { return [d1, d2] }; ->x272 : Symbol(x272, Decl(generatedContextualTyping.ts, 269, 3)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) ->undefined : Symbol(undefined) ->named : Symbol(named, Decl(generatedContextualTyping.ts, 269, 40)) ->d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) ->d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) - -var x273: Base[] = undefined || [d1, d2]; ->x273 : Symbol(x273, Decl(generatedContextualTyping.ts, 270, 3)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) ->undefined : Symbol(undefined) ->d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) ->d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) - -var x274: Array = undefined || [d1, d2]; ->x274 : Symbol(x274, Decl(generatedContextualTyping.ts, 271, 3)) ->Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) ->undefined : Symbol(undefined) ->d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) ->d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) - -var x275: { [n: number]: Base; } = undefined || [d1, d2]; ->x275 : Symbol(x275, Decl(generatedContextualTyping.ts, 272, 3)) ->n : Symbol(n, Decl(generatedContextualTyping.ts, 272, 13)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) ->undefined : Symbol(undefined) ->d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) ->d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) - -var x276: {n: Base[]; } = undefined || { n: [d1, d2] }; ->x276 : Symbol(x276, Decl(generatedContextualTyping.ts, 273, 3)) ->n : Symbol(n, Decl(generatedContextualTyping.ts, 273, 11)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) ->undefined : Symbol(undefined) ->n : Symbol(n, Decl(generatedContextualTyping.ts, 273, 41)) ->d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) ->d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) - -var x277: () => Base[] = function() { return [d1, d2] } || function() { return [d1, d2] }; ->x277 : Symbol(x277, Decl(generatedContextualTyping.ts, 274, 3)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) ->d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) ->d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) ->d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) ->d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) - -var x278: () => Base[] = function named() { return [d1, d2] } || function named() { return [d1, d2] }; ->x278 : Symbol(x278, Decl(generatedContextualTyping.ts, 275, 3)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) ->named : Symbol(named, Decl(generatedContextualTyping.ts, 275, 24)) ->d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) ->d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) ->named : Symbol(named, Decl(generatedContextualTyping.ts, 275, 64)) ->d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) ->d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) - -var x279: { (): Base[]; } = function() { return [d1, d2] } || function() { return [d1, d2] }; ->x279 : Symbol(x279, Decl(generatedContextualTyping.ts, 276, 3)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) ->d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) ->d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) ->d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) ->d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) - -var x280: { (): Base[]; } = function named() { return [d1, d2] } || function named() { return [d1, d2] }; ->x280 : Symbol(x280, Decl(generatedContextualTyping.ts, 277, 3)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) ->named : Symbol(named, Decl(generatedContextualTyping.ts, 277, 27)) ->d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) ->d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) ->named : Symbol(named, Decl(generatedContextualTyping.ts, 277, 67)) ->d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) ->d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) - -var x281: Base[] = [d1, d2] || [d1, d2]; ->x281 : Symbol(x281, Decl(generatedContextualTyping.ts, 278, 3)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) ->d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) ->d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) ->d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) ->d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) - -var x282: Array = [d1, d2] || [d1, d2]; ->x282 : Symbol(x282, Decl(generatedContextualTyping.ts, 279, 3)) ->Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) ->d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) ->d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) ->d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) ->d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) - -var x283: { [n: number]: Base; } = [d1, d2] || [d1, d2]; ->x283 : Symbol(x283, Decl(generatedContextualTyping.ts, 280, 3)) ->n : Symbol(n, Decl(generatedContextualTyping.ts, 280, 13)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) ->d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) ->d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) ->d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) ->d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) - -var x284: {n: Base[]; } = { n: [d1, d2] } || { n: [d1, d2] }; ->x284 : Symbol(x284, Decl(generatedContextualTyping.ts, 281, 3)) ->n : Symbol(n, Decl(generatedContextualTyping.ts, 281, 11)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) ->n : Symbol(n, Decl(generatedContextualTyping.ts, 281, 28)) ->d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) ->d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) ->n : Symbol(n, Decl(generatedContextualTyping.ts, 281, 47)) ->d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) ->d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) - -var x285: () => Base[] = true ? () => [d1, d2] : () => [d1, d2]; ->x285 : Symbol(x285, Decl(generatedContextualTyping.ts, 282, 3)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) ->d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) ->d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) ->d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) ->d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) - -var x286: () => Base[] = true ? function() { return [d1, d2] } : function() { return [d1, d2] }; ->x286 : Symbol(x286, Decl(generatedContextualTyping.ts, 283, 3)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) ->d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) ->d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) ->d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) ->d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) - -var x287: () => Base[] = true ? function named() { return [d1, d2] } : function named() { return [d1, d2] }; ->x287 : Symbol(x287, Decl(generatedContextualTyping.ts, 284, 3)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) ->named : Symbol(named, Decl(generatedContextualTyping.ts, 284, 31)) ->d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) ->d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) ->named : Symbol(named, Decl(generatedContextualTyping.ts, 284, 70)) ->d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) ->d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) - -var x288: { (): Base[]; } = true ? () => [d1, d2] : () => [d1, d2]; ->x288 : Symbol(x288, Decl(generatedContextualTyping.ts, 285, 3)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) ->d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) ->d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) ->d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) ->d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) - -var x289: { (): Base[]; } = true ? function() { return [d1, d2] } : function() { return [d1, d2] }; ->x289 : Symbol(x289, Decl(generatedContextualTyping.ts, 286, 3)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) ->d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) ->d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) ->d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) ->d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) - -var x290: { (): Base[]; } = true ? function named() { return [d1, d2] } : function named() { return [d1, d2] }; ->x290 : Symbol(x290, Decl(generatedContextualTyping.ts, 287, 3)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) ->named : Symbol(named, Decl(generatedContextualTyping.ts, 287, 34)) ->d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) ->d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) ->named : Symbol(named, Decl(generatedContextualTyping.ts, 287, 73)) ->d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) ->d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) - -var x291: Base[] = true ? [d1, d2] : [d1, d2]; ->x291 : Symbol(x291, Decl(generatedContextualTyping.ts, 288, 3)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) ->d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) ->d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) ->d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) ->d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) - -var x292: Array = true ? [d1, d2] : [d1, d2]; ->x292 : Symbol(x292, Decl(generatedContextualTyping.ts, 289, 3)) ->Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) ->d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) ->d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) ->d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) ->d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) - -var x293: { [n: number]: Base; } = true ? [d1, d2] : [d1, d2]; ->x293 : Symbol(x293, Decl(generatedContextualTyping.ts, 290, 3)) ->n : Symbol(n, Decl(generatedContextualTyping.ts, 290, 13)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) ->d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) ->d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) ->d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) ->d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) - -var x294: {n: Base[]; } = true ? { n: [d1, d2] } : { n: [d1, d2] }; ->x294 : Symbol(x294, Decl(generatedContextualTyping.ts, 291, 3)) ->n : Symbol(n, Decl(generatedContextualTyping.ts, 291, 11)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) ->n : Symbol(n, Decl(generatedContextualTyping.ts, 291, 35)) ->d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) ->d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) ->n : Symbol(n, Decl(generatedContextualTyping.ts, 291, 53)) ->d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) ->d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) - -var x295: (s: Base[]) => any = true ? n => { var n: Base[]; return null; } : n => { var n: Base[]; return null; }; ->x295 : Symbol(x295, Decl(generatedContextualTyping.ts, 292, 3)) ->s : Symbol(s, Decl(generatedContextualTyping.ts, 292, 11)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) ->n : Symbol(n, Decl(generatedContextualTyping.ts, 292, 37), Decl(generatedContextualTyping.ts, 292, 48)) ->n : Symbol(n, Decl(generatedContextualTyping.ts, 292, 37), Decl(generatedContextualTyping.ts, 292, 48)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) ->n : Symbol(n, Decl(generatedContextualTyping.ts, 292, 76), Decl(generatedContextualTyping.ts, 292, 87)) ->n : Symbol(n, Decl(generatedContextualTyping.ts, 292, 76), Decl(generatedContextualTyping.ts, 292, 87)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) - -var x296: Genric = true ? { func: n => { return [d1, d2]; } } : { func: n => { return [d1, d2]; } }; ->x296 : Symbol(x296, Decl(generatedContextualTyping.ts, 293, 3)) ->Genric : Symbol(Genric, Decl(generatedContextualTyping.ts, 2, 42)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) ->func : Symbol(func, Decl(generatedContextualTyping.ts, 293, 33)) ->n : Symbol(n, Decl(generatedContextualTyping.ts, 293, 39)) ->d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) ->d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) ->func : Symbol(func, Decl(generatedContextualTyping.ts, 293, 71)) ->n : Symbol(n, Decl(generatedContextualTyping.ts, 293, 77)) ->d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) ->d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) - -var x297: () => Base[] = true ? undefined : () => [d1, d2]; ->x297 : Symbol(x297, Decl(generatedContextualTyping.ts, 294, 3)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) ->undefined : Symbol(undefined) ->d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) ->d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) - -var x298: () => Base[] = true ? undefined : function() { return [d1, d2] }; ->x298 : Symbol(x298, Decl(generatedContextualTyping.ts, 295, 3)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) ->undefined : Symbol(undefined) ->d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) ->d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) - -var x299: () => Base[] = true ? undefined : function named() { return [d1, d2] }; ->x299 : Symbol(x299, Decl(generatedContextualTyping.ts, 296, 3)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) ->undefined : Symbol(undefined) ->named : Symbol(named, Decl(generatedContextualTyping.ts, 296, 43)) ->d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) ->d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) - -var x300: { (): Base[]; } = true ? undefined : () => [d1, d2]; ->x300 : Symbol(x300, Decl(generatedContextualTyping.ts, 297, 3)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) ->undefined : Symbol(undefined) ->d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) ->d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) - -var x301: { (): Base[]; } = true ? undefined : function() { return [d1, d2] }; ->x301 : Symbol(x301, Decl(generatedContextualTyping.ts, 298, 3)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) ->undefined : Symbol(undefined) ->d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) ->d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) - -var x302: { (): Base[]; } = true ? undefined : function named() { return [d1, d2] }; ->x302 : Symbol(x302, Decl(generatedContextualTyping.ts, 299, 3)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) ->undefined : Symbol(undefined) ->named : Symbol(named, Decl(generatedContextualTyping.ts, 299, 46)) ->d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) ->d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) - -var x303: Base[] = true ? undefined : [d1, d2]; ->x303 : Symbol(x303, Decl(generatedContextualTyping.ts, 300, 3)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) ->undefined : Symbol(undefined) ->d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) ->d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) - -var x304: Array = true ? undefined : [d1, d2]; ->x304 : Symbol(x304, Decl(generatedContextualTyping.ts, 301, 3)) ->Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) ->undefined : Symbol(undefined) ->d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) ->d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) - -var x305: { [n: number]: Base; } = true ? undefined : [d1, d2]; ->x305 : Symbol(x305, Decl(generatedContextualTyping.ts, 302, 3)) ->n : Symbol(n, Decl(generatedContextualTyping.ts, 302, 13)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) ->undefined : Symbol(undefined) ->d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) ->d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) - -var x306: {n: Base[]; } = true ? undefined : { n: [d1, d2] }; ->x306 : Symbol(x306, Decl(generatedContextualTyping.ts, 303, 3)) ->n : Symbol(n, Decl(generatedContextualTyping.ts, 303, 11)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) ->undefined : Symbol(undefined) ->n : Symbol(n, Decl(generatedContextualTyping.ts, 303, 47)) ->d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) ->d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) - -var x307: (s: Base[]) => any = true ? undefined : n => { var n: Base[]; return null; }; ->x307 : Symbol(x307, Decl(generatedContextualTyping.ts, 304, 3)) ->s : Symbol(s, Decl(generatedContextualTyping.ts, 304, 11)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) ->undefined : Symbol(undefined) ->n : Symbol(n, Decl(generatedContextualTyping.ts, 304, 49), Decl(generatedContextualTyping.ts, 304, 60)) ->n : Symbol(n, Decl(generatedContextualTyping.ts, 304, 49), Decl(generatedContextualTyping.ts, 304, 60)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) - -var x308: Genric = true ? undefined : { func: n => { return [d1, d2]; } }; ->x308 : Symbol(x308, Decl(generatedContextualTyping.ts, 305, 3)) ->Genric : Symbol(Genric, Decl(generatedContextualTyping.ts, 2, 42)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) ->undefined : Symbol(undefined) ->func : Symbol(func, Decl(generatedContextualTyping.ts, 305, 45)) ->n : Symbol(n, Decl(generatedContextualTyping.ts, 305, 51)) ->d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) ->d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) - -var x309: () => Base[] = true ? () => [d1, d2] : undefined; ->x309 : Symbol(x309, Decl(generatedContextualTyping.ts, 306, 3)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) ->d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) ->d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) ->undefined : Symbol(undefined) - -var x310: () => Base[] = true ? function() { return [d1, d2] } : undefined; ->x310 : Symbol(x310, Decl(generatedContextualTyping.ts, 307, 3)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) ->d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) ->d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) ->undefined : Symbol(undefined) - -var x311: () => Base[] = true ? function named() { return [d1, d2] } : undefined; ->x311 : Symbol(x311, Decl(generatedContextualTyping.ts, 308, 3)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) ->named : Symbol(named, Decl(generatedContextualTyping.ts, 308, 31)) ->d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) ->d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) ->undefined : Symbol(undefined) - -var x312: { (): Base[]; } = true ? () => [d1, d2] : undefined; ->x312 : Symbol(x312, Decl(generatedContextualTyping.ts, 309, 3)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) ->d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) ->d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) ->undefined : Symbol(undefined) - -var x313: { (): Base[]; } = true ? function() { return [d1, d2] } : undefined; ->x313 : Symbol(x313, Decl(generatedContextualTyping.ts, 310, 3)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) ->d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) ->d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) ->undefined : Symbol(undefined) - -var x314: { (): Base[]; } = true ? function named() { return [d1, d2] } : undefined; ->x314 : Symbol(x314, Decl(generatedContextualTyping.ts, 311, 3)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) ->named : Symbol(named, Decl(generatedContextualTyping.ts, 311, 34)) ->d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) ->d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) ->undefined : Symbol(undefined) - -var x315: Base[] = true ? [d1, d2] : undefined; ->x315 : Symbol(x315, Decl(generatedContextualTyping.ts, 312, 3)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) ->d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) ->d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) ->undefined : Symbol(undefined) - -var x316: Array = true ? [d1, d2] : undefined; ->x316 : Symbol(x316, Decl(generatedContextualTyping.ts, 313, 3)) ->Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) ->d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) ->d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) ->undefined : Symbol(undefined) - -var x317: { [n: number]: Base; } = true ? [d1, d2] : undefined; ->x317 : Symbol(x317, Decl(generatedContextualTyping.ts, 314, 3)) ->n : Symbol(n, Decl(generatedContextualTyping.ts, 314, 13)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) ->d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) ->d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) ->undefined : Symbol(undefined) - -var x318: {n: Base[]; } = true ? { n: [d1, d2] } : undefined; ->x318 : Symbol(x318, Decl(generatedContextualTyping.ts, 315, 3)) ->n : Symbol(n, Decl(generatedContextualTyping.ts, 315, 11)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) ->n : Symbol(n, Decl(generatedContextualTyping.ts, 315, 35)) ->d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) ->d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) ->undefined : Symbol(undefined) - -var x319: (s: Base[]) => any = true ? n => { var n: Base[]; return null; } : undefined; ->x319 : Symbol(x319, Decl(generatedContextualTyping.ts, 316, 3)) ->s : Symbol(s, Decl(generatedContextualTyping.ts, 316, 11)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) ->n : Symbol(n, Decl(generatedContextualTyping.ts, 316, 37), Decl(generatedContextualTyping.ts, 316, 48)) ->n : Symbol(n, Decl(generatedContextualTyping.ts, 316, 37), Decl(generatedContextualTyping.ts, 316, 48)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) ->undefined : Symbol(undefined) - -var x320: Genric = true ? { func: n => { return [d1, d2]; } } : undefined; ->x320 : Symbol(x320, Decl(generatedContextualTyping.ts, 317, 3)) ->Genric : Symbol(Genric, Decl(generatedContextualTyping.ts, 2, 42)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) ->func : Symbol(func, Decl(generatedContextualTyping.ts, 317, 33)) ->n : Symbol(n, Decl(generatedContextualTyping.ts, 317, 39)) ->d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) ->d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) ->undefined : Symbol(undefined) - -function x321(n: () => Base[]) { }; x321(() => [d1, d2]); ->x321 : Symbol(x321, Decl(generatedContextualTyping.ts, 317, 80)) ->n : Symbol(n, Decl(generatedContextualTyping.ts, 318, 14)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) ->x321 : Symbol(x321, Decl(generatedContextualTyping.ts, 317, 80)) ->d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) ->d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) - -function x322(n: () => Base[]) { }; x322(function() { return [d1, d2] }); ->x322 : Symbol(x322, Decl(generatedContextualTyping.ts, 318, 57)) ->n : Symbol(n, Decl(generatedContextualTyping.ts, 319, 14)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) ->x322 : Symbol(x322, Decl(generatedContextualTyping.ts, 318, 57)) ->d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) ->d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) - -function x323(n: () => Base[]) { }; x323(function named() { return [d1, d2] }); ->x323 : Symbol(x323, Decl(generatedContextualTyping.ts, 319, 73)) ->n : Symbol(n, Decl(generatedContextualTyping.ts, 320, 14)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) ->x323 : Symbol(x323, Decl(generatedContextualTyping.ts, 319, 73)) ->named : Symbol(named, Decl(generatedContextualTyping.ts, 320, 41)) ->d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) ->d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) - -function x324(n: { (): Base[]; }) { }; x324(() => [d1, d2]); ->x324 : Symbol(x324, Decl(generatedContextualTyping.ts, 320, 79)) ->n : Symbol(n, Decl(generatedContextualTyping.ts, 321, 14)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) ->x324 : Symbol(x324, Decl(generatedContextualTyping.ts, 320, 79)) ->d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) ->d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) - -function x325(n: { (): Base[]; }) { }; x325(function() { return [d1, d2] }); ->x325 : Symbol(x325, Decl(generatedContextualTyping.ts, 321, 60)) ->n : Symbol(n, Decl(generatedContextualTyping.ts, 322, 14)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) ->x325 : Symbol(x325, Decl(generatedContextualTyping.ts, 321, 60)) ->d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) ->d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) - -function x326(n: { (): Base[]; }) { }; x326(function named() { return [d1, d2] }); ->x326 : Symbol(x326, Decl(generatedContextualTyping.ts, 322, 76)) ->n : Symbol(n, Decl(generatedContextualTyping.ts, 323, 14)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) ->x326 : Symbol(x326, Decl(generatedContextualTyping.ts, 322, 76)) ->named : Symbol(named, Decl(generatedContextualTyping.ts, 323, 44)) ->d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) ->d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) - -function x327(n: Base[]) { }; x327([d1, d2]); ->x327 : Symbol(x327, Decl(generatedContextualTyping.ts, 323, 82)) ->n : Symbol(n, Decl(generatedContextualTyping.ts, 324, 14)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) ->x327 : Symbol(x327, Decl(generatedContextualTyping.ts, 323, 82)) ->d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) ->d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) - -function x328(n: Array) { }; x328([d1, d2]); ->x328 : Symbol(x328, Decl(generatedContextualTyping.ts, 324, 45)) ->n : Symbol(n, Decl(generatedContextualTyping.ts, 325, 14)) ->Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) ->x328 : Symbol(x328, Decl(generatedContextualTyping.ts, 324, 45)) ->d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) ->d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) - -function x329(n: { [n: number]: Base; }) { }; x329([d1, d2]); ->x329 : Symbol(x329, Decl(generatedContextualTyping.ts, 325, 50)) ->n : Symbol(n, Decl(generatedContextualTyping.ts, 326, 14)) ->n : Symbol(n, Decl(generatedContextualTyping.ts, 326, 20)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) ->x329 : Symbol(x329, Decl(generatedContextualTyping.ts, 325, 50)) ->d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) ->d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) - -function x330(n: {n: Base[]; } ) { }; x330({ n: [d1, d2] }); ->x330 : Symbol(x330, Decl(generatedContextualTyping.ts, 326, 61)) ->n : Symbol(n, Decl(generatedContextualTyping.ts, 327, 14)) ->n : Symbol(n, Decl(generatedContextualTyping.ts, 327, 18)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) ->x330 : Symbol(x330, Decl(generatedContextualTyping.ts, 326, 61)) ->n : Symbol(n, Decl(generatedContextualTyping.ts, 327, 44)) ->d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) ->d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) - -function x331(n: (s: Base[]) => any) { }; x331(n => { var n: Base[]; return null; }); ->x331 : Symbol(x331, Decl(generatedContextualTyping.ts, 327, 60)) ->n : Symbol(n, Decl(generatedContextualTyping.ts, 328, 14)) ->s : Symbol(s, Decl(generatedContextualTyping.ts, 328, 18)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) ->x331 : Symbol(x331, Decl(generatedContextualTyping.ts, 327, 60)) ->n : Symbol(n, Decl(generatedContextualTyping.ts, 328, 47), Decl(generatedContextualTyping.ts, 328, 57)) ->n : Symbol(n, Decl(generatedContextualTyping.ts, 328, 47), Decl(generatedContextualTyping.ts, 328, 57)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) - -function x332(n: Genric) { }; x332({ func: n => { return [d1, d2]; } }); ->x332 : Symbol(x332, Decl(generatedContextualTyping.ts, 328, 85)) ->n : Symbol(n, Decl(generatedContextualTyping.ts, 329, 14)) ->Genric : Symbol(Genric, Decl(generatedContextualTyping.ts, 2, 42)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) ->x332 : Symbol(x332, Decl(generatedContextualTyping.ts, 328, 85)) ->func : Symbol(func, Decl(generatedContextualTyping.ts, 329, 42)) ->n : Symbol(n, Decl(generatedContextualTyping.ts, 329, 48)) ->d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) ->d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) - -var x333 = (n: () => Base[]) => n; x333(() => [d1, d2]); ->x333 : Symbol(x333, Decl(generatedContextualTyping.ts, 330, 3)) ->n : Symbol(n, Decl(generatedContextualTyping.ts, 330, 12)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) ->n : Symbol(n, Decl(generatedContextualTyping.ts, 330, 12)) ->x333 : Symbol(x333, Decl(generatedContextualTyping.ts, 330, 3)) ->d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) ->d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) - -var x334 = (n: () => Base[]) => n; x334(function() { return [d1, d2] }); ->x334 : Symbol(x334, Decl(generatedContextualTyping.ts, 331, 3)) ->n : Symbol(n, Decl(generatedContextualTyping.ts, 331, 12)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) ->n : Symbol(n, Decl(generatedContextualTyping.ts, 331, 12)) ->x334 : Symbol(x334, Decl(generatedContextualTyping.ts, 331, 3)) ->d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) ->d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) - -var x335 = (n: () => Base[]) => n; x335(function named() { return [d1, d2] }); ->x335 : Symbol(x335, Decl(generatedContextualTyping.ts, 332, 3)) ->n : Symbol(n, Decl(generatedContextualTyping.ts, 332, 12)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) ->n : Symbol(n, Decl(generatedContextualTyping.ts, 332, 12)) ->x335 : Symbol(x335, Decl(generatedContextualTyping.ts, 332, 3)) ->named : Symbol(named, Decl(generatedContextualTyping.ts, 332, 40)) ->d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) ->d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) - -var x336 = (n: { (): Base[]; }) => n; x336(() => [d1, d2]); ->x336 : Symbol(x336, Decl(generatedContextualTyping.ts, 333, 3)) ->n : Symbol(n, Decl(generatedContextualTyping.ts, 333, 12)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) ->n : Symbol(n, Decl(generatedContextualTyping.ts, 333, 12)) ->x336 : Symbol(x336, Decl(generatedContextualTyping.ts, 333, 3)) ->d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) ->d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) - -var x337 = (n: { (): Base[]; }) => n; x337(function() { return [d1, d2] }); ->x337 : Symbol(x337, Decl(generatedContextualTyping.ts, 334, 3)) ->n : Symbol(n, Decl(generatedContextualTyping.ts, 334, 12)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) ->n : Symbol(n, Decl(generatedContextualTyping.ts, 334, 12)) ->x337 : Symbol(x337, Decl(generatedContextualTyping.ts, 334, 3)) ->d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) ->d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) - -var x338 = (n: { (): Base[]; }) => n; x338(function named() { return [d1, d2] }); ->x338 : Symbol(x338, Decl(generatedContextualTyping.ts, 335, 3)) ->n : Symbol(n, Decl(generatedContextualTyping.ts, 335, 12)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) ->n : Symbol(n, Decl(generatedContextualTyping.ts, 335, 12)) ->x338 : Symbol(x338, Decl(generatedContextualTyping.ts, 335, 3)) ->named : Symbol(named, Decl(generatedContextualTyping.ts, 335, 43)) ->d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) ->d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) - -var x339 = (n: Base[]) => n; x339([d1, d2]); ->x339 : Symbol(x339, Decl(generatedContextualTyping.ts, 336, 3)) ->n : Symbol(n, Decl(generatedContextualTyping.ts, 336, 12)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) ->n : Symbol(n, Decl(generatedContextualTyping.ts, 336, 12)) ->x339 : Symbol(x339, Decl(generatedContextualTyping.ts, 336, 3)) ->d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) ->d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) - -var x340 = (n: Array) => n; x340([d1, d2]); ->x340 : Symbol(x340, Decl(generatedContextualTyping.ts, 337, 3)) ->n : Symbol(n, Decl(generatedContextualTyping.ts, 337, 12)) ->Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) ->n : Symbol(n, Decl(generatedContextualTyping.ts, 337, 12)) ->x340 : Symbol(x340, Decl(generatedContextualTyping.ts, 337, 3)) ->d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) ->d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) - -var x341 = (n: { [n: number]: Base; }) => n; x341([d1, d2]); ->x341 : Symbol(x341, Decl(generatedContextualTyping.ts, 338, 3)) ->n : Symbol(n, Decl(generatedContextualTyping.ts, 338, 12)) ->n : Symbol(n, Decl(generatedContextualTyping.ts, 338, 18)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) ->n : Symbol(n, Decl(generatedContextualTyping.ts, 338, 12)) ->x341 : Symbol(x341, Decl(generatedContextualTyping.ts, 338, 3)) ->d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) ->d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) - -var x342 = (n: {n: Base[]; } ) => n; x342({ n: [d1, d2] }); ->x342 : Symbol(x342, Decl(generatedContextualTyping.ts, 339, 3)) ->n : Symbol(n, Decl(generatedContextualTyping.ts, 339, 12)) ->n : Symbol(n, Decl(generatedContextualTyping.ts, 339, 16)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) ->n : Symbol(n, Decl(generatedContextualTyping.ts, 339, 12)) ->x342 : Symbol(x342, Decl(generatedContextualTyping.ts, 339, 3)) ->n : Symbol(n, Decl(generatedContextualTyping.ts, 339, 43)) ->d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) ->d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) - -var x343 = (n: (s: Base[]) => any) => n; x343(n => { var n: Base[]; return null; }); ->x343 : Symbol(x343, Decl(generatedContextualTyping.ts, 340, 3)) ->n : Symbol(n, Decl(generatedContextualTyping.ts, 340, 12)) ->s : Symbol(s, Decl(generatedContextualTyping.ts, 340, 16)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) ->n : Symbol(n, Decl(generatedContextualTyping.ts, 340, 12)) ->x343 : Symbol(x343, Decl(generatedContextualTyping.ts, 340, 3)) ->n : Symbol(n, Decl(generatedContextualTyping.ts, 340, 46), Decl(generatedContextualTyping.ts, 340, 56)) ->n : Symbol(n, Decl(generatedContextualTyping.ts, 340, 46), Decl(generatedContextualTyping.ts, 340, 56)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) - -var x344 = (n: Genric) => n; x344({ func: n => { return [d1, d2]; } }); ->x344 : Symbol(x344, Decl(generatedContextualTyping.ts, 341, 3)) ->n : Symbol(n, Decl(generatedContextualTyping.ts, 341, 12)) ->Genric : Symbol(Genric, Decl(generatedContextualTyping.ts, 2, 42)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) ->n : Symbol(n, Decl(generatedContextualTyping.ts, 341, 12)) ->x344 : Symbol(x344, Decl(generatedContextualTyping.ts, 341, 3)) ->func : Symbol(func, Decl(generatedContextualTyping.ts, 341, 41)) ->n : Symbol(n, Decl(generatedContextualTyping.ts, 341, 47)) ->d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) ->d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) - -var x345 = function(n: () => Base[]) { }; x345(() => [d1, d2]); ->x345 : Symbol(x345, Decl(generatedContextualTyping.ts, 342, 3)) ->n : Symbol(n, Decl(generatedContextualTyping.ts, 342, 20)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) ->x345 : Symbol(x345, Decl(generatedContextualTyping.ts, 342, 3)) ->d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) ->d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) - -var x346 = function(n: () => Base[]) { }; x346(function() { return [d1, d2] }); ->x346 : Symbol(x346, Decl(generatedContextualTyping.ts, 343, 3)) ->n : Symbol(n, Decl(generatedContextualTyping.ts, 343, 20)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) ->x346 : Symbol(x346, Decl(generatedContextualTyping.ts, 343, 3)) ->d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) ->d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) - -var x347 = function(n: () => Base[]) { }; x347(function named() { return [d1, d2] }); ->x347 : Symbol(x347, Decl(generatedContextualTyping.ts, 344, 3)) ->n : Symbol(n, Decl(generatedContextualTyping.ts, 344, 20)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) ->x347 : Symbol(x347, Decl(generatedContextualTyping.ts, 344, 3)) ->named : Symbol(named, Decl(generatedContextualTyping.ts, 344, 47)) ->d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) ->d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) - -var x348 = function(n: { (): Base[]; }) { }; x348(() => [d1, d2]); ->x348 : Symbol(x348, Decl(generatedContextualTyping.ts, 345, 3)) ->n : Symbol(n, Decl(generatedContextualTyping.ts, 345, 20)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) ->x348 : Symbol(x348, Decl(generatedContextualTyping.ts, 345, 3)) ->d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) ->d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) - -var x349 = function(n: { (): Base[]; }) { }; x349(function() { return [d1, d2] }); ->x349 : Symbol(x349, Decl(generatedContextualTyping.ts, 346, 3)) ->n : Symbol(n, Decl(generatedContextualTyping.ts, 346, 20)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) ->x349 : Symbol(x349, Decl(generatedContextualTyping.ts, 346, 3)) ->d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) ->d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) - -var x350 = function(n: { (): Base[]; }) { }; x350(function named() { return [d1, d2] }); ->x350 : Symbol(x350, Decl(generatedContextualTyping.ts, 347, 3)) ->n : Symbol(n, Decl(generatedContextualTyping.ts, 347, 20)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) ->x350 : Symbol(x350, Decl(generatedContextualTyping.ts, 347, 3)) ->named : Symbol(named, Decl(generatedContextualTyping.ts, 347, 50)) ->d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) ->d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) - -var x351 = function(n: Base[]) { }; x351([d1, d2]); ->x351 : Symbol(x351, Decl(generatedContextualTyping.ts, 348, 3)) ->n : Symbol(n, Decl(generatedContextualTyping.ts, 348, 20)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) ->x351 : Symbol(x351, Decl(generatedContextualTyping.ts, 348, 3)) ->d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) ->d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) - -var x352 = function(n: Array) { }; x352([d1, d2]); ->x352 : Symbol(x352, Decl(generatedContextualTyping.ts, 349, 3)) ->n : Symbol(n, Decl(generatedContextualTyping.ts, 349, 20)) ->Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) ->x352 : Symbol(x352, Decl(generatedContextualTyping.ts, 349, 3)) ->d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) ->d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) - -var x353 = function(n: { [n: number]: Base; }) { }; x353([d1, d2]); ->x353 : Symbol(x353, Decl(generatedContextualTyping.ts, 350, 3)) ->n : Symbol(n, Decl(generatedContextualTyping.ts, 350, 20)) ->n : Symbol(n, Decl(generatedContextualTyping.ts, 350, 26)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) ->x353 : Symbol(x353, Decl(generatedContextualTyping.ts, 350, 3)) ->d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) ->d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) - -var x354 = function(n: {n: Base[]; } ) { }; x354({ n: [d1, d2] }); ->x354 : Symbol(x354, Decl(generatedContextualTyping.ts, 351, 3)) ->n : Symbol(n, Decl(generatedContextualTyping.ts, 351, 20)) ->n : Symbol(n, Decl(generatedContextualTyping.ts, 351, 24)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) ->x354 : Symbol(x354, Decl(generatedContextualTyping.ts, 351, 3)) ->n : Symbol(n, Decl(generatedContextualTyping.ts, 351, 50)) ->d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) ->d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) - -var x355 = function(n: (s: Base[]) => any) { }; x355(n => { var n: Base[]; return null; }); ->x355 : Symbol(x355, Decl(generatedContextualTyping.ts, 352, 3)) ->n : Symbol(n, Decl(generatedContextualTyping.ts, 352, 20)) ->s : Symbol(s, Decl(generatedContextualTyping.ts, 352, 24)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) ->x355 : Symbol(x355, Decl(generatedContextualTyping.ts, 352, 3)) ->n : Symbol(n, Decl(generatedContextualTyping.ts, 352, 53), Decl(generatedContextualTyping.ts, 352, 63)) ->n : Symbol(n, Decl(generatedContextualTyping.ts, 352, 53), Decl(generatedContextualTyping.ts, 352, 63)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) - -var x356 = function(n: Genric) { }; x356({ func: n => { return [d1, d2]; } }); ->x356 : Symbol(x356, Decl(generatedContextualTyping.ts, 353, 3)) ->n : Symbol(n, Decl(generatedContextualTyping.ts, 353, 20)) ->Genric : Symbol(Genric, Decl(generatedContextualTyping.ts, 2, 42)) ->Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) ->x356 : Symbol(x356, Decl(generatedContextualTyping.ts, 353, 3)) ->func : Symbol(func, Decl(generatedContextualTyping.ts, 353, 48)) ->n : Symbol(n, Decl(generatedContextualTyping.ts, 353, 54)) ->d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) ->d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) - diff --git a/tests/baselines/reference/generatedContextualTyping.types b/tests/baselines/reference/generatedContextualTyping.types deleted file mode 100644 index e8f434d31a8..00000000000 --- a/tests/baselines/reference/generatedContextualTyping.types +++ /dev/null @@ -1,3768 +0,0 @@ -=== tests/cases/conformance/expressions/contextualTyping/generatedContextualTyping.ts === -class Base { private p; } ->Base : Base ->p : any - -class Derived1 extends Base { private m; } ->Derived1 : Derived1 ->Base : Base ->m : any - -class Derived2 extends Base { private n; } ->Derived2 : Derived2 ->Base : Base ->n : any - -interface Genric { func(n: T[]); } ->Genric : Genric ->T : T ->func : (n: T[]) => any ->n : T[] ->T : T - -var b = new Base(), d1 = new Derived1(), d2 = new Derived2(); ->b : Base ->new Base() : Base ->Base : typeof Base ->d1 : Derived1 ->new Derived1() : Derived1 ->Derived1 : typeof Derived1 ->d2 : Derived2 ->new Derived2() : Derived2 ->Derived2 : typeof Derived2 - -var x1: () => Base[] = () => [d1, d2]; ->x1 : () => Base[] ->Base : Base ->() => [d1, d2] : () => (Derived1 | Derived2)[] ->[d1, d2] : (Derived1 | Derived2)[] ->d1 : Derived1 ->d2 : Derived2 - -var x2: () => Base[] = function() { return [d1, d2] }; ->x2 : () => Base[] ->Base : Base ->function() { return [d1, d2] } : () => (Derived1 | Derived2)[] ->[d1, d2] : (Derived1 | Derived2)[] ->d1 : Derived1 ->d2 : Derived2 - -var x3: () => Base[] = function named() { return [d1, d2] }; ->x3 : () => Base[] ->Base : Base ->function named() { return [d1, d2] } : () => (Derived1 | Derived2)[] ->named : () => (Derived1 | Derived2)[] ->[d1, d2] : (Derived1 | Derived2)[] ->d1 : Derived1 ->d2 : Derived2 - -var x4: { (): Base[]; } = () => [d1, d2]; ->x4 : () => Base[] ->Base : Base ->() => [d1, d2] : () => (Derived1 | Derived2)[] ->[d1, d2] : (Derived1 | Derived2)[] ->d1 : Derived1 ->d2 : Derived2 - -var x5: { (): Base[]; } = function() { return [d1, d2] }; ->x5 : () => Base[] ->Base : Base ->function() { return [d1, d2] } : () => (Derived1 | Derived2)[] ->[d1, d2] : (Derived1 | Derived2)[] ->d1 : Derived1 ->d2 : Derived2 - -var x6: { (): Base[]; } = function named() { return [d1, d2] }; ->x6 : () => Base[] ->Base : Base ->function named() { return [d1, d2] } : () => (Derived1 | Derived2)[] ->named : () => (Derived1 | Derived2)[] ->[d1, d2] : (Derived1 | Derived2)[] ->d1 : Derived1 ->d2 : Derived2 - -var x7: Base[] = [d1, d2]; ->x7 : Base[] ->Base : Base ->[d1, d2] : (Derived1 | Derived2)[] ->d1 : Derived1 ->d2 : Derived2 - -var x8: Array = [d1, d2]; ->x8 : Base[] ->Array : T[] ->Base : Base ->[d1, d2] : (Derived1 | Derived2)[] ->d1 : Derived1 ->d2 : Derived2 - -var x9: { [n: number]: Base; } = [d1, d2]; ->x9 : { [n: number]: Base; } ->n : number ->Base : Base ->[d1, d2] : (Derived1 | Derived2)[] ->d1 : Derived1 ->d2 : Derived2 - -var x10: {n: Base[]; } = { n: [d1, d2] }; ->x10 : { n: Base[]; } ->n : Base[] ->Base : Base ->{ n: [d1, d2] } : { n: (Derived1 | Derived2)[]; } ->n : (Derived1 | Derived2)[] ->[d1, d2] : (Derived1 | Derived2)[] ->d1 : Derived1 ->d2 : Derived2 - -var x11: (s: Base[]) => any = n => { var n: Base[]; return null; }; ->x11 : (s: Base[]) => any ->s : Base[] ->Base : Base ->n => { var n: Base[]; return null; } : (n: Base[]) => any ->n : Base[] ->n : Base[] ->Base : Base ->null : null - -var x12: Genric = { func: n => { return [d1, d2]; } }; ->x12 : Genric ->Genric : Genric ->Base : Base ->{ func: n => { return [d1, d2]; } } : { func: (n: Base[]) => (Derived1 | Derived2)[]; } ->func : (n: Base[]) => (Derived1 | Derived2)[] ->n => { return [d1, d2]; } : (n: Base[]) => (Derived1 | Derived2)[] ->n : Base[] ->[d1, d2] : (Derived1 | Derived2)[] ->d1 : Derived1 ->d2 : Derived2 - -class x13 { member: () => Base[] = () => [d1, d2] } ->x13 : x13 ->member : () => Base[] ->Base : Base ->() => [d1, d2] : () => (Derived1 | Derived2)[] ->[d1, d2] : (Derived1 | Derived2)[] ->d1 : Derived1 ->d2 : Derived2 - -class x14 { member: () => Base[] = function() { return [d1, d2] } } ->x14 : x14 ->member : () => Base[] ->Base : Base ->function() { return [d1, d2] } : () => (Derived1 | Derived2)[] ->[d1, d2] : (Derived1 | Derived2)[] ->d1 : Derived1 ->d2 : Derived2 - -class x15 { member: () => Base[] = function named() { return [d1, d2] } } ->x15 : x15 ->member : () => Base[] ->Base : Base ->function named() { return [d1, d2] } : () => (Derived1 | Derived2)[] ->named : () => (Derived1 | Derived2)[] ->[d1, d2] : (Derived1 | Derived2)[] ->d1 : Derived1 ->d2 : Derived2 - -class x16 { member: { (): Base[]; } = () => [d1, d2] } ->x16 : x16 ->member : () => Base[] ->Base : Base ->() => [d1, d2] : () => (Derived1 | Derived2)[] ->[d1, d2] : (Derived1 | Derived2)[] ->d1 : Derived1 ->d2 : Derived2 - -class x17 { member: { (): Base[]; } = function() { return [d1, d2] } } ->x17 : x17 ->member : () => Base[] ->Base : Base ->function() { return [d1, d2] } : () => (Derived1 | Derived2)[] ->[d1, d2] : (Derived1 | Derived2)[] ->d1 : Derived1 ->d2 : Derived2 - -class x18 { member: { (): Base[]; } = function named() { return [d1, d2] } } ->x18 : x18 ->member : () => Base[] ->Base : Base ->function named() { return [d1, d2] } : () => (Derived1 | Derived2)[] ->named : () => (Derived1 | Derived2)[] ->[d1, d2] : (Derived1 | Derived2)[] ->d1 : Derived1 ->d2 : Derived2 - -class x19 { member: Base[] = [d1, d2] } ->x19 : x19 ->member : Base[] ->Base : Base ->[d1, d2] : (Derived1 | Derived2)[] ->d1 : Derived1 ->d2 : Derived2 - -class x20 { member: Array = [d1, d2] } ->x20 : x20 ->member : Base[] ->Array : T[] ->Base : Base ->[d1, d2] : (Derived1 | Derived2)[] ->d1 : Derived1 ->d2 : Derived2 - -class x21 { member: { [n: number]: Base; } = [d1, d2] } ->x21 : x21 ->member : { [n: number]: Base; } ->n : number ->Base : Base ->[d1, d2] : (Derived1 | Derived2)[] ->d1 : Derived1 ->d2 : Derived2 - -class x22 { member: {n: Base[]; } = { n: [d1, d2] } } ->x22 : x22 ->member : { n: Base[]; } ->n : Base[] ->Base : Base ->{ n: [d1, d2] } : { n: (Derived1 | Derived2)[]; } ->n : (Derived1 | Derived2)[] ->[d1, d2] : (Derived1 | Derived2)[] ->d1 : Derived1 ->d2 : Derived2 - -class x23 { member: (s: Base[]) => any = n => { var n: Base[]; return null; } } ->x23 : x23 ->member : (s: Base[]) => any ->s : Base[] ->Base : Base ->n => { var n: Base[]; return null; } : (n: Base[]) => any ->n : Base[] ->n : Base[] ->Base : Base ->null : null - -class x24 { member: Genric = { func: n => { return [d1, d2]; } } } ->x24 : x24 ->member : Genric ->Genric : Genric ->Base : Base ->{ func: n => { return [d1, d2]; } } : { func: (n: Base[]) => (Derived1 | Derived2)[]; } ->func : (n: Base[]) => (Derived1 | Derived2)[] ->n => { return [d1, d2]; } : (n: Base[]) => (Derived1 | Derived2)[] ->n : Base[] ->[d1, d2] : (Derived1 | Derived2)[] ->d1 : Derived1 ->d2 : Derived2 - -class x25 { private member: () => Base[] = () => [d1, d2] } ->x25 : x25 ->member : () => Base[] ->Base : Base ->() => [d1, d2] : () => (Derived1 | Derived2)[] ->[d1, d2] : (Derived1 | Derived2)[] ->d1 : Derived1 ->d2 : Derived2 - -class x26 { private member: () => Base[] = function() { return [d1, d2] } } ->x26 : x26 ->member : () => Base[] ->Base : Base ->function() { return [d1, d2] } : () => (Derived1 | Derived2)[] ->[d1, d2] : (Derived1 | Derived2)[] ->d1 : Derived1 ->d2 : Derived2 - -class x27 { private member: () => Base[] = function named() { return [d1, d2] } } ->x27 : x27 ->member : () => Base[] ->Base : Base ->function named() { return [d1, d2] } : () => (Derived1 | Derived2)[] ->named : () => (Derived1 | Derived2)[] ->[d1, d2] : (Derived1 | Derived2)[] ->d1 : Derived1 ->d2 : Derived2 - -class x28 { private member: { (): Base[]; } = () => [d1, d2] } ->x28 : x28 ->member : () => Base[] ->Base : Base ->() => [d1, d2] : () => (Derived1 | Derived2)[] ->[d1, d2] : (Derived1 | Derived2)[] ->d1 : Derived1 ->d2 : Derived2 - -class x29 { private member: { (): Base[]; } = function() { return [d1, d2] } } ->x29 : x29 ->member : () => Base[] ->Base : Base ->function() { return [d1, d2] } : () => (Derived1 | Derived2)[] ->[d1, d2] : (Derived1 | Derived2)[] ->d1 : Derived1 ->d2 : Derived2 - -class x30 { private member: { (): Base[]; } = function named() { return [d1, d2] } } ->x30 : x30 ->member : () => Base[] ->Base : Base ->function named() { return [d1, d2] } : () => (Derived1 | Derived2)[] ->named : () => (Derived1 | Derived2)[] ->[d1, d2] : (Derived1 | Derived2)[] ->d1 : Derived1 ->d2 : Derived2 - -class x31 { private member: Base[] = [d1, d2] } ->x31 : x31 ->member : Base[] ->Base : Base ->[d1, d2] : (Derived1 | Derived2)[] ->d1 : Derived1 ->d2 : Derived2 - -class x32 { private member: Array = [d1, d2] } ->x32 : x32 ->member : Base[] ->Array : T[] ->Base : Base ->[d1, d2] : (Derived1 | Derived2)[] ->d1 : Derived1 ->d2 : Derived2 - -class x33 { private member: { [n: number]: Base; } = [d1, d2] } ->x33 : x33 ->member : { [n: number]: Base; } ->n : number ->Base : Base ->[d1, d2] : (Derived1 | Derived2)[] ->d1 : Derived1 ->d2 : Derived2 - -class x34 { private member: {n: Base[]; } = { n: [d1, d2] } } ->x34 : x34 ->member : { n: Base[]; } ->n : Base[] ->Base : Base ->{ n: [d1, d2] } : { n: (Derived1 | Derived2)[]; } ->n : (Derived1 | Derived2)[] ->[d1, d2] : (Derived1 | Derived2)[] ->d1 : Derived1 ->d2 : Derived2 - -class x35 { private member: (s: Base[]) => any = n => { var n: Base[]; return null; } } ->x35 : x35 ->member : (s: Base[]) => any ->s : Base[] ->Base : Base ->n => { var n: Base[]; return null; } : (n: Base[]) => any ->n : Base[] ->n : Base[] ->Base : Base ->null : null - -class x36 { private member: Genric = { func: n => { return [d1, d2]; } } } ->x36 : x36 ->member : Genric ->Genric : Genric ->Base : Base ->{ func: n => { return [d1, d2]; } } : { func: (n: Base[]) => (Derived1 | Derived2)[]; } ->func : (n: Base[]) => (Derived1 | Derived2)[] ->n => { return [d1, d2]; } : (n: Base[]) => (Derived1 | Derived2)[] ->n : Base[] ->[d1, d2] : (Derived1 | Derived2)[] ->d1 : Derived1 ->d2 : Derived2 - -class x37 { public member: () => Base[] = () => [d1, d2] } ->x37 : x37 ->member : () => Base[] ->Base : Base ->() => [d1, d2] : () => (Derived1 | Derived2)[] ->[d1, d2] : (Derived1 | Derived2)[] ->d1 : Derived1 ->d2 : Derived2 - -class x38 { public member: () => Base[] = function() { return [d1, d2] } } ->x38 : x38 ->member : () => Base[] ->Base : Base ->function() { return [d1, d2] } : () => (Derived1 | Derived2)[] ->[d1, d2] : (Derived1 | Derived2)[] ->d1 : Derived1 ->d2 : Derived2 - -class x39 { public member: () => Base[] = function named() { return [d1, d2] } } ->x39 : x39 ->member : () => Base[] ->Base : Base ->function named() { return [d1, d2] } : () => (Derived1 | Derived2)[] ->named : () => (Derived1 | Derived2)[] ->[d1, d2] : (Derived1 | Derived2)[] ->d1 : Derived1 ->d2 : Derived2 - -class x40 { public member: { (): Base[]; } = () => [d1, d2] } ->x40 : x40 ->member : () => Base[] ->Base : Base ->() => [d1, d2] : () => (Derived1 | Derived2)[] ->[d1, d2] : (Derived1 | Derived2)[] ->d1 : Derived1 ->d2 : Derived2 - -class x41 { public member: { (): Base[]; } = function() { return [d1, d2] } } ->x41 : x41 ->member : () => Base[] ->Base : Base ->function() { return [d1, d2] } : () => (Derived1 | Derived2)[] ->[d1, d2] : (Derived1 | Derived2)[] ->d1 : Derived1 ->d2 : Derived2 - -class x42 { public member: { (): Base[]; } = function named() { return [d1, d2] } } ->x42 : x42 ->member : () => Base[] ->Base : Base ->function named() { return [d1, d2] } : () => (Derived1 | Derived2)[] ->named : () => (Derived1 | Derived2)[] ->[d1, d2] : (Derived1 | Derived2)[] ->d1 : Derived1 ->d2 : Derived2 - -class x43 { public member: Base[] = [d1, d2] } ->x43 : x43 ->member : Base[] ->Base : Base ->[d1, d2] : (Derived1 | Derived2)[] ->d1 : Derived1 ->d2 : Derived2 - -class x44 { public member: Array = [d1, d2] } ->x44 : x44 ->member : Base[] ->Array : T[] ->Base : Base ->[d1, d2] : (Derived1 | Derived2)[] ->d1 : Derived1 ->d2 : Derived2 - -class x45 { public member: { [n: number]: Base; } = [d1, d2] } ->x45 : x45 ->member : { [n: number]: Base; } ->n : number ->Base : Base ->[d1, d2] : (Derived1 | Derived2)[] ->d1 : Derived1 ->d2 : Derived2 - -class x46 { public member: {n: Base[]; } = { n: [d1, d2] } } ->x46 : x46 ->member : { n: Base[]; } ->n : Base[] ->Base : Base ->{ n: [d1, d2] } : { n: (Derived1 | Derived2)[]; } ->n : (Derived1 | Derived2)[] ->[d1, d2] : (Derived1 | Derived2)[] ->d1 : Derived1 ->d2 : Derived2 - -class x47 { public member: (s: Base[]) => any = n => { var n: Base[]; return null; } } ->x47 : x47 ->member : (s: Base[]) => any ->s : Base[] ->Base : Base ->n => { var n: Base[]; return null; } : (n: Base[]) => any ->n : Base[] ->n : Base[] ->Base : Base ->null : null - -class x48 { public member: Genric = { func: n => { return [d1, d2]; } } } ->x48 : x48 ->member : Genric ->Genric : Genric ->Base : Base ->{ func: n => { return [d1, d2]; } } : { func: (n: Base[]) => (Derived1 | Derived2)[]; } ->func : (n: Base[]) => (Derived1 | Derived2)[] ->n => { return [d1, d2]; } : (n: Base[]) => (Derived1 | Derived2)[] ->n : Base[] ->[d1, d2] : (Derived1 | Derived2)[] ->d1 : Derived1 ->d2 : Derived2 - -class x49 { static member: () => Base[] = () => [d1, d2] } ->x49 : x49 ->member : () => Base[] ->Base : Base ->() => [d1, d2] : () => (Derived1 | Derived2)[] ->[d1, d2] : (Derived1 | Derived2)[] ->d1 : Derived1 ->d2 : Derived2 - -class x50 { static member: () => Base[] = function() { return [d1, d2] } } ->x50 : x50 ->member : () => Base[] ->Base : Base ->function() { return [d1, d2] } : () => (Derived1 | Derived2)[] ->[d1, d2] : (Derived1 | Derived2)[] ->d1 : Derived1 ->d2 : Derived2 - -class x51 { static member: () => Base[] = function named() { return [d1, d2] } } ->x51 : x51 ->member : () => Base[] ->Base : Base ->function named() { return [d1, d2] } : () => (Derived1 | Derived2)[] ->named : () => (Derived1 | Derived2)[] ->[d1, d2] : (Derived1 | Derived2)[] ->d1 : Derived1 ->d2 : Derived2 - -class x52 { static member: { (): Base[]; } = () => [d1, d2] } ->x52 : x52 ->member : () => Base[] ->Base : Base ->() => [d1, d2] : () => (Derived1 | Derived2)[] ->[d1, d2] : (Derived1 | Derived2)[] ->d1 : Derived1 ->d2 : Derived2 - -class x53 { static member: { (): Base[]; } = function() { return [d1, d2] } } ->x53 : x53 ->member : () => Base[] ->Base : Base ->function() { return [d1, d2] } : () => (Derived1 | Derived2)[] ->[d1, d2] : (Derived1 | Derived2)[] ->d1 : Derived1 ->d2 : Derived2 - -class x54 { static member: { (): Base[]; } = function named() { return [d1, d2] } } ->x54 : x54 ->member : () => Base[] ->Base : Base ->function named() { return [d1, d2] } : () => (Derived1 | Derived2)[] ->named : () => (Derived1 | Derived2)[] ->[d1, d2] : (Derived1 | Derived2)[] ->d1 : Derived1 ->d2 : Derived2 - -class x55 { static member: Base[] = [d1, d2] } ->x55 : x55 ->member : Base[] ->Base : Base ->[d1, d2] : (Derived1 | Derived2)[] ->d1 : Derived1 ->d2 : Derived2 - -class x56 { static member: Array = [d1, d2] } ->x56 : x56 ->member : Base[] ->Array : T[] ->Base : Base ->[d1, d2] : (Derived1 | Derived2)[] ->d1 : Derived1 ->d2 : Derived2 - -class x57 { static member: { [n: number]: Base; } = [d1, d2] } ->x57 : x57 ->member : { [n: number]: Base; } ->n : number ->Base : Base ->[d1, d2] : (Derived1 | Derived2)[] ->d1 : Derived1 ->d2 : Derived2 - -class x58 { static member: {n: Base[]; } = { n: [d1, d2] } } ->x58 : x58 ->member : { n: Base[]; } ->n : Base[] ->Base : Base ->{ n: [d1, d2] } : { n: (Derived1 | Derived2)[]; } ->n : (Derived1 | Derived2)[] ->[d1, d2] : (Derived1 | Derived2)[] ->d1 : Derived1 ->d2 : Derived2 - -class x59 { static member: (s: Base[]) => any = n => { var n: Base[]; return null; } } ->x59 : x59 ->member : (s: Base[]) => any ->s : Base[] ->Base : Base ->n => { var n: Base[]; return null; } : (n: Base[]) => any ->n : Base[] ->n : Base[] ->Base : Base ->null : null - -class x60 { static member: Genric = { func: n => { return [d1, d2]; } } } ->x60 : x60 ->member : Genric ->Genric : Genric ->Base : Base ->{ func: n => { return [d1, d2]; } } : { func: (n: Base[]) => (Derived1 | Derived2)[]; } ->func : (n: Base[]) => (Derived1 | Derived2)[] ->n => { return [d1, d2]; } : (n: Base[]) => (Derived1 | Derived2)[] ->n : Base[] ->[d1, d2] : (Derived1 | Derived2)[] ->d1 : Derived1 ->d2 : Derived2 - -class x61 { private static member: () => Base[] = () => [d1, d2] } ->x61 : x61 ->member : () => Base[] ->Base : Base ->() => [d1, d2] : () => (Derived1 | Derived2)[] ->[d1, d2] : (Derived1 | Derived2)[] ->d1 : Derived1 ->d2 : Derived2 - -class x62 { private static member: () => Base[] = function() { return [d1, d2] } } ->x62 : x62 ->member : () => Base[] ->Base : Base ->function() { return [d1, d2] } : () => (Derived1 | Derived2)[] ->[d1, d2] : (Derived1 | Derived2)[] ->d1 : Derived1 ->d2 : Derived2 - -class x63 { private static member: () => Base[] = function named() { return [d1, d2] } } ->x63 : x63 ->member : () => Base[] ->Base : Base ->function named() { return [d1, d2] } : () => (Derived1 | Derived2)[] ->named : () => (Derived1 | Derived2)[] ->[d1, d2] : (Derived1 | Derived2)[] ->d1 : Derived1 ->d2 : Derived2 - -class x64 { private static member: { (): Base[]; } = () => [d1, d2] } ->x64 : x64 ->member : () => Base[] ->Base : Base ->() => [d1, d2] : () => (Derived1 | Derived2)[] ->[d1, d2] : (Derived1 | Derived2)[] ->d1 : Derived1 ->d2 : Derived2 - -class x65 { private static member: { (): Base[]; } = function() { return [d1, d2] } } ->x65 : x65 ->member : () => Base[] ->Base : Base ->function() { return [d1, d2] } : () => (Derived1 | Derived2)[] ->[d1, d2] : (Derived1 | Derived2)[] ->d1 : Derived1 ->d2 : Derived2 - -class x66 { private static member: { (): Base[]; } = function named() { return [d1, d2] } } ->x66 : x66 ->member : () => Base[] ->Base : Base ->function named() { return [d1, d2] } : () => (Derived1 | Derived2)[] ->named : () => (Derived1 | Derived2)[] ->[d1, d2] : (Derived1 | Derived2)[] ->d1 : Derived1 ->d2 : Derived2 - -class x67 { private static member: Base[] = [d1, d2] } ->x67 : x67 ->member : Base[] ->Base : Base ->[d1, d2] : (Derived1 | Derived2)[] ->d1 : Derived1 ->d2 : Derived2 - -class x68 { private static member: Array = [d1, d2] } ->x68 : x68 ->member : Base[] ->Array : T[] ->Base : Base ->[d1, d2] : (Derived1 | Derived2)[] ->d1 : Derived1 ->d2 : Derived2 - -class x69 { private static member: { [n: number]: Base; } = [d1, d2] } ->x69 : x69 ->member : { [n: number]: Base; } ->n : number ->Base : Base ->[d1, d2] : (Derived1 | Derived2)[] ->d1 : Derived1 ->d2 : Derived2 - -class x70 { private static member: {n: Base[]; } = { n: [d1, d2] } } ->x70 : x70 ->member : { n: Base[]; } ->n : Base[] ->Base : Base ->{ n: [d1, d2] } : { n: (Derived1 | Derived2)[]; } ->n : (Derived1 | Derived2)[] ->[d1, d2] : (Derived1 | Derived2)[] ->d1 : Derived1 ->d2 : Derived2 - -class x71 { private static member: (s: Base[]) => any = n => { var n: Base[]; return null; } } ->x71 : x71 ->member : (s: Base[]) => any ->s : Base[] ->Base : Base ->n => { var n: Base[]; return null; } : (n: Base[]) => any ->n : Base[] ->n : Base[] ->Base : Base ->null : null - -class x72 { private static member: Genric = { func: n => { return [d1, d2]; } } } ->x72 : x72 ->member : Genric ->Genric : Genric ->Base : Base ->{ func: n => { return [d1, d2]; } } : { func: (n: Base[]) => (Derived1 | Derived2)[]; } ->func : (n: Base[]) => (Derived1 | Derived2)[] ->n => { return [d1, d2]; } : (n: Base[]) => (Derived1 | Derived2)[] ->n : Base[] ->[d1, d2] : (Derived1 | Derived2)[] ->d1 : Derived1 ->d2 : Derived2 - -class x73 { public static member: () => Base[] = () => [d1, d2] } ->x73 : x73 ->member : () => Base[] ->Base : Base ->() => [d1, d2] : () => (Derived1 | Derived2)[] ->[d1, d2] : (Derived1 | Derived2)[] ->d1 : Derived1 ->d2 : Derived2 - -class x74 { public static member: () => Base[] = function() { return [d1, d2] } } ->x74 : x74 ->member : () => Base[] ->Base : Base ->function() { return [d1, d2] } : () => (Derived1 | Derived2)[] ->[d1, d2] : (Derived1 | Derived2)[] ->d1 : Derived1 ->d2 : Derived2 - -class x75 { public static member: () => Base[] = function named() { return [d1, d2] } } ->x75 : x75 ->member : () => Base[] ->Base : Base ->function named() { return [d1, d2] } : () => (Derived1 | Derived2)[] ->named : () => (Derived1 | Derived2)[] ->[d1, d2] : (Derived1 | Derived2)[] ->d1 : Derived1 ->d2 : Derived2 - -class x76 { public static member: { (): Base[]; } = () => [d1, d2] } ->x76 : x76 ->member : () => Base[] ->Base : Base ->() => [d1, d2] : () => (Derived1 | Derived2)[] ->[d1, d2] : (Derived1 | Derived2)[] ->d1 : Derived1 ->d2 : Derived2 - -class x77 { public static member: { (): Base[]; } = function() { return [d1, d2] } } ->x77 : x77 ->member : () => Base[] ->Base : Base ->function() { return [d1, d2] } : () => (Derived1 | Derived2)[] ->[d1, d2] : (Derived1 | Derived2)[] ->d1 : Derived1 ->d2 : Derived2 - -class x78 { public static member: { (): Base[]; } = function named() { return [d1, d2] } } ->x78 : x78 ->member : () => Base[] ->Base : Base ->function named() { return [d1, d2] } : () => (Derived1 | Derived2)[] ->named : () => (Derived1 | Derived2)[] ->[d1, d2] : (Derived1 | Derived2)[] ->d1 : Derived1 ->d2 : Derived2 - -class x79 { public static member: Base[] = [d1, d2] } ->x79 : x79 ->member : Base[] ->Base : Base ->[d1, d2] : (Derived1 | Derived2)[] ->d1 : Derived1 ->d2 : Derived2 - -class x80 { public static member: Array = [d1, d2] } ->x80 : x80 ->member : Base[] ->Array : T[] ->Base : Base ->[d1, d2] : (Derived1 | Derived2)[] ->d1 : Derived1 ->d2 : Derived2 - -class x81 { public static member: { [n: number]: Base; } = [d1, d2] } ->x81 : x81 ->member : { [n: number]: Base; } ->n : number ->Base : Base ->[d1, d2] : (Derived1 | Derived2)[] ->d1 : Derived1 ->d2 : Derived2 - -class x82 { public static member: {n: Base[]; } = { n: [d1, d2] } } ->x82 : x82 ->member : { n: Base[]; } ->n : Base[] ->Base : Base ->{ n: [d1, d2] } : { n: (Derived1 | Derived2)[]; } ->n : (Derived1 | Derived2)[] ->[d1, d2] : (Derived1 | Derived2)[] ->d1 : Derived1 ->d2 : Derived2 - -class x83 { public static member: (s: Base[]) => any = n => { var n: Base[]; return null; } } ->x83 : x83 ->member : (s: Base[]) => any ->s : Base[] ->Base : Base ->n => { var n: Base[]; return null; } : (n: Base[]) => any ->n : Base[] ->n : Base[] ->Base : Base ->null : null - -class x84 { public static member: Genric = { func: n => { return [d1, d2]; } } } ->x84 : x84 ->member : Genric ->Genric : Genric ->Base : Base ->{ func: n => { return [d1, d2]; } } : { func: (n: Base[]) => (Derived1 | Derived2)[]; } ->func : (n: Base[]) => (Derived1 | Derived2)[] ->n => { return [d1, d2]; } : (n: Base[]) => (Derived1 | Derived2)[] ->n : Base[] ->[d1, d2] : (Derived1 | Derived2)[] ->d1 : Derived1 ->d2 : Derived2 - -class x85 { constructor(parm: () => Base[] = () => [d1, d2]) { } } ->x85 : x85 ->parm : () => Base[] ->Base : Base ->() => [d1, d2] : () => (Derived1 | Derived2)[] ->[d1, d2] : (Derived1 | Derived2)[] ->d1 : Derived1 ->d2 : Derived2 - -class x86 { constructor(parm: () => Base[] = function() { return [d1, d2] }) { } } ->x86 : x86 ->parm : () => Base[] ->Base : Base ->function() { return [d1, d2] } : () => (Derived1 | Derived2)[] ->[d1, d2] : (Derived1 | Derived2)[] ->d1 : Derived1 ->d2 : Derived2 - -class x87 { constructor(parm: () => Base[] = function named() { return [d1, d2] }) { } } ->x87 : x87 ->parm : () => Base[] ->Base : Base ->function named() { return [d1, d2] } : () => (Derived1 | Derived2)[] ->named : () => (Derived1 | Derived2)[] ->[d1, d2] : (Derived1 | Derived2)[] ->d1 : Derived1 ->d2 : Derived2 - -class x88 { constructor(parm: { (): Base[]; } = () => [d1, d2]) { } } ->x88 : x88 ->parm : () => Base[] ->Base : Base ->() => [d1, d2] : () => (Derived1 | Derived2)[] ->[d1, d2] : (Derived1 | Derived2)[] ->d1 : Derived1 ->d2 : Derived2 - -class x89 { constructor(parm: { (): Base[]; } = function() { return [d1, d2] }) { } } ->x89 : x89 ->parm : () => Base[] ->Base : Base ->function() { return [d1, d2] } : () => (Derived1 | Derived2)[] ->[d1, d2] : (Derived1 | Derived2)[] ->d1 : Derived1 ->d2 : Derived2 - -class x90 { constructor(parm: { (): Base[]; } = function named() { return [d1, d2] }) { } } ->x90 : x90 ->parm : () => Base[] ->Base : Base ->function named() { return [d1, d2] } : () => (Derived1 | Derived2)[] ->named : () => (Derived1 | Derived2)[] ->[d1, d2] : (Derived1 | Derived2)[] ->d1 : Derived1 ->d2 : Derived2 - -class x91 { constructor(parm: Base[] = [d1, d2]) { } } ->x91 : x91 ->parm : Base[] ->Base : Base ->[d1, d2] : (Derived1 | Derived2)[] ->d1 : Derived1 ->d2 : Derived2 - -class x92 { constructor(parm: Array = [d1, d2]) { } } ->x92 : x92 ->parm : Base[] ->Array : T[] ->Base : Base ->[d1, d2] : (Derived1 | Derived2)[] ->d1 : Derived1 ->d2 : Derived2 - -class x93 { constructor(parm: { [n: number]: Base; } = [d1, d2]) { } } ->x93 : x93 ->parm : { [n: number]: Base; } ->n : number ->Base : Base ->[d1, d2] : (Derived1 | Derived2)[] ->d1 : Derived1 ->d2 : Derived2 - -class x94 { constructor(parm: {n: Base[]; } = { n: [d1, d2] }) { } } ->x94 : x94 ->parm : { n: Base[]; } ->n : Base[] ->Base : Base ->{ n: [d1, d2] } : { n: (Derived1 | Derived2)[]; } ->n : (Derived1 | Derived2)[] ->[d1, d2] : (Derived1 | Derived2)[] ->d1 : Derived1 ->d2 : Derived2 - -class x95 { constructor(parm: (s: Base[]) => any = n => { var n: Base[]; return null; }) { } } ->x95 : x95 ->parm : (s: Base[]) => any ->s : Base[] ->Base : Base ->n => { var n: Base[]; return null; } : (n: Base[]) => any ->n : Base[] ->n : Base[] ->Base : Base ->null : null - -class x96 { constructor(parm: Genric = { func: n => { return [d1, d2]; } }) { } } ->x96 : x96 ->parm : Genric ->Genric : Genric ->Base : Base ->{ func: n => { return [d1, d2]; } } : { func: (n: Base[]) => (Derived1 | Derived2)[]; } ->func : (n: Base[]) => (Derived1 | Derived2)[] ->n => { return [d1, d2]; } : (n: Base[]) => (Derived1 | Derived2)[] ->n : Base[] ->[d1, d2] : (Derived1 | Derived2)[] ->d1 : Derived1 ->d2 : Derived2 - -class x97 { constructor(public parm: () => Base[] = () => [d1, d2]) { } } ->x97 : x97 ->parm : () => Base[] ->Base : Base ->() => [d1, d2] : () => (Derived1 | Derived2)[] ->[d1, d2] : (Derived1 | Derived2)[] ->d1 : Derived1 ->d2 : Derived2 - -class x98 { constructor(public parm: () => Base[] = function() { return [d1, d2] }) { } } ->x98 : x98 ->parm : () => Base[] ->Base : Base ->function() { return [d1, d2] } : () => (Derived1 | Derived2)[] ->[d1, d2] : (Derived1 | Derived2)[] ->d1 : Derived1 ->d2 : Derived2 - -class x99 { constructor(public parm: () => Base[] = function named() { return [d1, d2] }) { } } ->x99 : x99 ->parm : () => Base[] ->Base : Base ->function named() { return [d1, d2] } : () => (Derived1 | Derived2)[] ->named : () => (Derived1 | Derived2)[] ->[d1, d2] : (Derived1 | Derived2)[] ->d1 : Derived1 ->d2 : Derived2 - -class x100 { constructor(public parm: { (): Base[]; } = () => [d1, d2]) { } } ->x100 : x100 ->parm : () => Base[] ->Base : Base ->() => [d1, d2] : () => (Derived1 | Derived2)[] ->[d1, d2] : (Derived1 | Derived2)[] ->d1 : Derived1 ->d2 : Derived2 - -class x101 { constructor(public parm: { (): Base[]; } = function() { return [d1, d2] }) { } } ->x101 : x101 ->parm : () => Base[] ->Base : Base ->function() { return [d1, d2] } : () => (Derived1 | Derived2)[] ->[d1, d2] : (Derived1 | Derived2)[] ->d1 : Derived1 ->d2 : Derived2 - -class x102 { constructor(public parm: { (): Base[]; } = function named() { return [d1, d2] }) { } } ->x102 : x102 ->parm : () => Base[] ->Base : Base ->function named() { return [d1, d2] } : () => (Derived1 | Derived2)[] ->named : () => (Derived1 | Derived2)[] ->[d1, d2] : (Derived1 | Derived2)[] ->d1 : Derived1 ->d2 : Derived2 - -class x103 { constructor(public parm: Base[] = [d1, d2]) { } } ->x103 : x103 ->parm : Base[] ->Base : Base ->[d1, d2] : (Derived1 | Derived2)[] ->d1 : Derived1 ->d2 : Derived2 - -class x104 { constructor(public parm: Array = [d1, d2]) { } } ->x104 : x104 ->parm : Base[] ->Array : T[] ->Base : Base ->[d1, d2] : (Derived1 | Derived2)[] ->d1 : Derived1 ->d2 : Derived2 - -class x105 { constructor(public parm: { [n: number]: Base; } = [d1, d2]) { } } ->x105 : x105 ->parm : { [n: number]: Base; } ->n : number ->Base : Base ->[d1, d2] : (Derived1 | Derived2)[] ->d1 : Derived1 ->d2 : Derived2 - -class x106 { constructor(public parm: {n: Base[]; } = { n: [d1, d2] }) { } } ->x106 : x106 ->parm : { n: Base[]; } ->n : Base[] ->Base : Base ->{ n: [d1, d2] } : { n: (Derived1 | Derived2)[]; } ->n : (Derived1 | Derived2)[] ->[d1, d2] : (Derived1 | Derived2)[] ->d1 : Derived1 ->d2 : Derived2 - -class x107 { constructor(public parm: (s: Base[]) => any = n => { var n: Base[]; return null; }) { } } ->x107 : x107 ->parm : (s: Base[]) => any ->s : Base[] ->Base : Base ->n => { var n: Base[]; return null; } : (n: Base[]) => any ->n : Base[] ->n : Base[] ->Base : Base ->null : null - -class x108 { constructor(public parm: Genric = { func: n => { return [d1, d2]; } }) { } } ->x108 : x108 ->parm : Genric ->Genric : Genric ->Base : Base ->{ func: n => { return [d1, d2]; } } : { func: (n: Base[]) => (Derived1 | Derived2)[]; } ->func : (n: Base[]) => (Derived1 | Derived2)[] ->n => { return [d1, d2]; } : (n: Base[]) => (Derived1 | Derived2)[] ->n : Base[] ->[d1, d2] : (Derived1 | Derived2)[] ->d1 : Derived1 ->d2 : Derived2 - -class x109 { constructor(private parm: () => Base[] = () => [d1, d2]) { } } ->x109 : x109 ->parm : () => Base[] ->Base : Base ->() => [d1, d2] : () => (Derived1 | Derived2)[] ->[d1, d2] : (Derived1 | Derived2)[] ->d1 : Derived1 ->d2 : Derived2 - -class x110 { constructor(private parm: () => Base[] = function() { return [d1, d2] }) { } } ->x110 : x110 ->parm : () => Base[] ->Base : Base ->function() { return [d1, d2] } : () => (Derived1 | Derived2)[] ->[d1, d2] : (Derived1 | Derived2)[] ->d1 : Derived1 ->d2 : Derived2 - -class x111 { constructor(private parm: () => Base[] = function named() { return [d1, d2] }) { } } ->x111 : x111 ->parm : () => Base[] ->Base : Base ->function named() { return [d1, d2] } : () => (Derived1 | Derived2)[] ->named : () => (Derived1 | Derived2)[] ->[d1, d2] : (Derived1 | Derived2)[] ->d1 : Derived1 ->d2 : Derived2 - -class x112 { constructor(private parm: { (): Base[]; } = () => [d1, d2]) { } } ->x112 : x112 ->parm : () => Base[] ->Base : Base ->() => [d1, d2] : () => (Derived1 | Derived2)[] ->[d1, d2] : (Derived1 | Derived2)[] ->d1 : Derived1 ->d2 : Derived2 - -class x113 { constructor(private parm: { (): Base[]; } = function() { return [d1, d2] }) { } } ->x113 : x113 ->parm : () => Base[] ->Base : Base ->function() { return [d1, d2] } : () => (Derived1 | Derived2)[] ->[d1, d2] : (Derived1 | Derived2)[] ->d1 : Derived1 ->d2 : Derived2 - -class x114 { constructor(private parm: { (): Base[]; } = function named() { return [d1, d2] }) { } } ->x114 : x114 ->parm : () => Base[] ->Base : Base ->function named() { return [d1, d2] } : () => (Derived1 | Derived2)[] ->named : () => (Derived1 | Derived2)[] ->[d1, d2] : (Derived1 | Derived2)[] ->d1 : Derived1 ->d2 : Derived2 - -class x115 { constructor(private parm: Base[] = [d1, d2]) { } } ->x115 : x115 ->parm : Base[] ->Base : Base ->[d1, d2] : (Derived1 | Derived2)[] ->d1 : Derived1 ->d2 : Derived2 - -class x116 { constructor(private parm: Array = [d1, d2]) { } } ->x116 : x116 ->parm : Base[] ->Array : T[] ->Base : Base ->[d1, d2] : (Derived1 | Derived2)[] ->d1 : Derived1 ->d2 : Derived2 - -class x117 { constructor(private parm: { [n: number]: Base; } = [d1, d2]) { } } ->x117 : x117 ->parm : { [n: number]: Base; } ->n : number ->Base : Base ->[d1, d2] : (Derived1 | Derived2)[] ->d1 : Derived1 ->d2 : Derived2 - -class x118 { constructor(private parm: {n: Base[]; } = { n: [d1, d2] }) { } } ->x118 : x118 ->parm : { n: Base[]; } ->n : Base[] ->Base : Base ->{ n: [d1, d2] } : { n: (Derived1 | Derived2)[]; } ->n : (Derived1 | Derived2)[] ->[d1, d2] : (Derived1 | Derived2)[] ->d1 : Derived1 ->d2 : Derived2 - -class x119 { constructor(private parm: (s: Base[]) => any = n => { var n: Base[]; return null; }) { } } ->x119 : x119 ->parm : (s: Base[]) => any ->s : Base[] ->Base : Base ->n => { var n: Base[]; return null; } : (n: Base[]) => any ->n : Base[] ->n : Base[] ->Base : Base ->null : null - -class x120 { constructor(private parm: Genric = { func: n => { return [d1, d2]; } }) { } } ->x120 : x120 ->parm : Genric ->Genric : Genric ->Base : Base ->{ func: n => { return [d1, d2]; } } : { func: (n: Base[]) => (Derived1 | Derived2)[]; } ->func : (n: Base[]) => (Derived1 | Derived2)[] ->n => { return [d1, d2]; } : (n: Base[]) => (Derived1 | Derived2)[] ->n : Base[] ->[d1, d2] : (Derived1 | Derived2)[] ->d1 : Derived1 ->d2 : Derived2 - -function x121(parm: () => Base[] = () => [d1, d2]) { } ->x121 : (parm?: () => Base[]) => void ->parm : () => Base[] ->Base : Base ->() => [d1, d2] : () => (Derived1 | Derived2)[] ->[d1, d2] : (Derived1 | Derived2)[] ->d1 : Derived1 ->d2 : Derived2 - -function x122(parm: () => Base[] = function() { return [d1, d2] }) { } ->x122 : (parm?: () => Base[]) => void ->parm : () => Base[] ->Base : Base ->function() { return [d1, d2] } : () => (Derived1 | Derived2)[] ->[d1, d2] : (Derived1 | Derived2)[] ->d1 : Derived1 ->d2 : Derived2 - -function x123(parm: () => Base[] = function named() { return [d1, d2] }) { } ->x123 : (parm?: () => Base[]) => void ->parm : () => Base[] ->Base : Base ->function named() { return [d1, d2] } : () => (Derived1 | Derived2)[] ->named : () => (Derived1 | Derived2)[] ->[d1, d2] : (Derived1 | Derived2)[] ->d1 : Derived1 ->d2 : Derived2 - -function x124(parm: { (): Base[]; } = () => [d1, d2]) { } ->x124 : (parm?: () => Base[]) => void ->parm : () => Base[] ->Base : Base ->() => [d1, d2] : () => (Derived1 | Derived2)[] ->[d1, d2] : (Derived1 | Derived2)[] ->d1 : Derived1 ->d2 : Derived2 - -function x125(parm: { (): Base[]; } = function() { return [d1, d2] }) { } ->x125 : (parm?: () => Base[]) => void ->parm : () => Base[] ->Base : Base ->function() { return [d1, d2] } : () => (Derived1 | Derived2)[] ->[d1, d2] : (Derived1 | Derived2)[] ->d1 : Derived1 ->d2 : Derived2 - -function x126(parm: { (): Base[]; } = function named() { return [d1, d2] }) { } ->x126 : (parm?: () => Base[]) => void ->parm : () => Base[] ->Base : Base ->function named() { return [d1, d2] } : () => (Derived1 | Derived2)[] ->named : () => (Derived1 | Derived2)[] ->[d1, d2] : (Derived1 | Derived2)[] ->d1 : Derived1 ->d2 : Derived2 - -function x127(parm: Base[] = [d1, d2]) { } ->x127 : (parm?: Base[]) => void ->parm : Base[] ->Base : Base ->[d1, d2] : (Derived1 | Derived2)[] ->d1 : Derived1 ->d2 : Derived2 - -function x128(parm: Array = [d1, d2]) { } ->x128 : (parm?: Base[]) => void ->parm : Base[] ->Array : T[] ->Base : Base ->[d1, d2] : (Derived1 | Derived2)[] ->d1 : Derived1 ->d2 : Derived2 - -function x129(parm: { [n: number]: Base; } = [d1, d2]) { } ->x129 : (parm?: { [n: number]: Base; }) => void ->parm : { [n: number]: Base; } ->n : number ->Base : Base ->[d1, d2] : (Derived1 | Derived2)[] ->d1 : Derived1 ->d2 : Derived2 - -function x130(parm: {n: Base[]; } = { n: [d1, d2] }) { } ->x130 : (parm?: { n: Base[]; }) => void ->parm : { n: Base[]; } ->n : Base[] ->Base : Base ->{ n: [d1, d2] } : { n: (Derived1 | Derived2)[]; } ->n : (Derived1 | Derived2)[] ->[d1, d2] : (Derived1 | Derived2)[] ->d1 : Derived1 ->d2 : Derived2 - -function x131(parm: (s: Base[]) => any = n => { var n: Base[]; return null; }) { } ->x131 : (parm?: (s: Base[]) => any) => void ->parm : (s: Base[]) => any ->s : Base[] ->Base : Base ->n => { var n: Base[]; return null; } : (n: Base[]) => any ->n : Base[] ->n : Base[] ->Base : Base ->null : null - -function x132(parm: Genric = { func: n => { return [d1, d2]; } }) { } ->x132 : (parm?: Genric) => void ->parm : Genric ->Genric : Genric ->Base : Base ->{ func: n => { return [d1, d2]; } } : { func: (n: Base[]) => (Derived1 | Derived2)[]; } ->func : (n: Base[]) => (Derived1 | Derived2)[] ->n => { return [d1, d2]; } : (n: Base[]) => (Derived1 | Derived2)[] ->n : Base[] ->[d1, d2] : (Derived1 | Derived2)[] ->d1 : Derived1 ->d2 : Derived2 - -function x133(): () => Base[] { return () => [d1, d2]; } ->x133 : () => () => Base[] ->Base : Base ->() => [d1, d2] : () => (Derived1 | Derived2)[] ->[d1, d2] : (Derived1 | Derived2)[] ->d1 : Derived1 ->d2 : Derived2 - -function x134(): () => Base[] { return function() { return [d1, d2] }; } ->x134 : () => () => Base[] ->Base : Base ->function() { return [d1, d2] } : () => (Derived1 | Derived2)[] ->[d1, d2] : (Derived1 | Derived2)[] ->d1 : Derived1 ->d2 : Derived2 - -function x135(): () => Base[] { return function named() { return [d1, d2] }; } ->x135 : () => () => Base[] ->Base : Base ->function named() { return [d1, d2] } : () => (Derived1 | Derived2)[] ->named : () => (Derived1 | Derived2)[] ->[d1, d2] : (Derived1 | Derived2)[] ->d1 : Derived1 ->d2 : Derived2 - -function x136(): { (): Base[]; } { return () => [d1, d2]; } ->x136 : () => () => Base[] ->Base : Base ->() => [d1, d2] : () => (Derived1 | Derived2)[] ->[d1, d2] : (Derived1 | Derived2)[] ->d1 : Derived1 ->d2 : Derived2 - -function x137(): { (): Base[]; } { return function() { return [d1, d2] }; } ->x137 : () => () => Base[] ->Base : Base ->function() { return [d1, d2] } : () => (Derived1 | Derived2)[] ->[d1, d2] : (Derived1 | Derived2)[] ->d1 : Derived1 ->d2 : Derived2 - -function x138(): { (): Base[]; } { return function named() { return [d1, d2] }; } ->x138 : () => () => Base[] ->Base : Base ->function named() { return [d1, d2] } : () => (Derived1 | Derived2)[] ->named : () => (Derived1 | Derived2)[] ->[d1, d2] : (Derived1 | Derived2)[] ->d1 : Derived1 ->d2 : Derived2 - -function x139(): Base[] { return [d1, d2]; } ->x139 : () => Base[] ->Base : Base ->[d1, d2] : (Derived1 | Derived2)[] ->d1 : Derived1 ->d2 : Derived2 - -function x140(): Array { return [d1, d2]; } ->x140 : () => Base[] ->Array : T[] ->Base : Base ->[d1, d2] : (Derived1 | Derived2)[] ->d1 : Derived1 ->d2 : Derived2 - -function x141(): { [n: number]: Base; } { return [d1, d2]; } ->x141 : () => { [n: number]: Base; } ->n : number ->Base : Base ->[d1, d2] : (Derived1 | Derived2)[] ->d1 : Derived1 ->d2 : Derived2 - -function x142(): {n: Base[]; } { return { n: [d1, d2] }; } ->x142 : () => { n: Base[]; } ->n : Base[] ->Base : Base ->{ n: [d1, d2] } : { n: (Derived1 | Derived2)[]; } ->n : (Derived1 | Derived2)[] ->[d1, d2] : (Derived1 | Derived2)[] ->d1 : Derived1 ->d2 : Derived2 - -function x143(): (s: Base[]) => any { return n => { var n: Base[]; return null; }; } ->x143 : () => (s: Base[]) => any ->s : Base[] ->Base : Base ->n => { var n: Base[]; return null; } : (n: Base[]) => any ->n : Base[] ->n : Base[] ->Base : Base ->null : null - -function x144(): Genric { return { func: n => { return [d1, d2]; } }; } ->x144 : () => Genric ->Genric : Genric ->Base : Base ->{ func: n => { return [d1, d2]; } } : { func: (n: Base[]) => (Derived1 | Derived2)[]; } ->func : (n: Base[]) => (Derived1 | Derived2)[] ->n => { return [d1, d2]; } : (n: Base[]) => (Derived1 | Derived2)[] ->n : Base[] ->[d1, d2] : (Derived1 | Derived2)[] ->d1 : Derived1 ->d2 : Derived2 - -function x145(): () => Base[] { return () => [d1, d2]; return () => [d1, d2]; } ->x145 : () => () => Base[] ->Base : Base ->() => [d1, d2] : () => (Derived1 | Derived2)[] ->[d1, d2] : (Derived1 | Derived2)[] ->d1 : Derived1 ->d2 : Derived2 ->() => [d1, d2] : () => (Derived1 | Derived2)[] ->[d1, d2] : (Derived1 | Derived2)[] ->d1 : Derived1 ->d2 : Derived2 - -function x146(): () => Base[] { return function() { return [d1, d2] }; return function() { return [d1, d2] }; } ->x146 : () => () => Base[] ->Base : Base ->function() { return [d1, d2] } : () => (Derived1 | Derived2)[] ->[d1, d2] : (Derived1 | Derived2)[] ->d1 : Derived1 ->d2 : Derived2 ->function() { return [d1, d2] } : () => (Derived1 | Derived2)[] ->[d1, d2] : (Derived1 | Derived2)[] ->d1 : Derived1 ->d2 : Derived2 - -function x147(): () => Base[] { return function named() { return [d1, d2] }; return function named() { return [d1, d2] }; } ->x147 : () => () => Base[] ->Base : Base ->function named() { return [d1, d2] } : () => (Derived1 | Derived2)[] ->named : () => (Derived1 | Derived2)[] ->[d1, d2] : (Derived1 | Derived2)[] ->d1 : Derived1 ->d2 : Derived2 ->function named() { return [d1, d2] } : () => (Derived1 | Derived2)[] ->named : () => (Derived1 | Derived2)[] ->[d1, d2] : (Derived1 | Derived2)[] ->d1 : Derived1 ->d2 : Derived2 - -function x148(): { (): Base[]; } { return () => [d1, d2]; return () => [d1, d2]; } ->x148 : () => () => Base[] ->Base : Base ->() => [d1, d2] : () => (Derived1 | Derived2)[] ->[d1, d2] : (Derived1 | Derived2)[] ->d1 : Derived1 ->d2 : Derived2 ->() => [d1, d2] : () => (Derived1 | Derived2)[] ->[d1, d2] : (Derived1 | Derived2)[] ->d1 : Derived1 ->d2 : Derived2 - -function x149(): { (): Base[]; } { return function() { return [d1, d2] }; return function() { return [d1, d2] }; } ->x149 : () => () => Base[] ->Base : Base ->function() { return [d1, d2] } : () => (Derived1 | Derived2)[] ->[d1, d2] : (Derived1 | Derived2)[] ->d1 : Derived1 ->d2 : Derived2 ->function() { return [d1, d2] } : () => (Derived1 | Derived2)[] ->[d1, d2] : (Derived1 | Derived2)[] ->d1 : Derived1 ->d2 : Derived2 - -function x150(): { (): Base[]; } { return function named() { return [d1, d2] }; return function named() { return [d1, d2] }; } ->x150 : () => () => Base[] ->Base : Base ->function named() { return [d1, d2] } : () => (Derived1 | Derived2)[] ->named : () => (Derived1 | Derived2)[] ->[d1, d2] : (Derived1 | Derived2)[] ->d1 : Derived1 ->d2 : Derived2 ->function named() { return [d1, d2] } : () => (Derived1 | Derived2)[] ->named : () => (Derived1 | Derived2)[] ->[d1, d2] : (Derived1 | Derived2)[] ->d1 : Derived1 ->d2 : Derived2 - -function x151(): Base[] { return [d1, d2]; return [d1, d2]; } ->x151 : () => Base[] ->Base : Base ->[d1, d2] : (Derived1 | Derived2)[] ->d1 : Derived1 ->d2 : Derived2 ->[d1, d2] : (Derived1 | Derived2)[] ->d1 : Derived1 ->d2 : Derived2 - -function x152(): Array { return [d1, d2]; return [d1, d2]; } ->x152 : () => Base[] ->Array : T[] ->Base : Base ->[d1, d2] : (Derived1 | Derived2)[] ->d1 : Derived1 ->d2 : Derived2 ->[d1, d2] : (Derived1 | Derived2)[] ->d1 : Derived1 ->d2 : Derived2 - -function x153(): { [n: number]: Base; } { return [d1, d2]; return [d1, d2]; } ->x153 : () => { [n: number]: Base; } ->n : number ->Base : Base ->[d1, d2] : (Derived1 | Derived2)[] ->d1 : Derived1 ->d2 : Derived2 ->[d1, d2] : (Derived1 | Derived2)[] ->d1 : Derived1 ->d2 : Derived2 - -function x154(): {n: Base[]; } { return { n: [d1, d2] }; return { n: [d1, d2] }; } ->x154 : () => { n: Base[]; } ->n : Base[] ->Base : Base ->{ n: [d1, d2] } : { n: (Derived1 | Derived2)[]; } ->n : (Derived1 | Derived2)[] ->[d1, d2] : (Derived1 | Derived2)[] ->d1 : Derived1 ->d2 : Derived2 ->{ n: [d1, d2] } : { n: (Derived1 | Derived2)[]; } ->n : (Derived1 | Derived2)[] ->[d1, d2] : (Derived1 | Derived2)[] ->d1 : Derived1 ->d2 : Derived2 - -function x155(): (s: Base[]) => any { return n => { var n: Base[]; return null; }; return n => { var n: Base[]; return null; }; } ->x155 : () => (s: Base[]) => any ->s : Base[] ->Base : Base ->n => { var n: Base[]; return null; } : (n: Base[]) => any ->n : Base[] ->n : Base[] ->Base : Base ->null : null ->n => { var n: Base[]; return null; } : (n: Base[]) => any ->n : Base[] ->n : Base[] ->Base : Base ->null : null - -function x156(): Genric { return { func: n => { return [d1, d2]; } }; return { func: n => { return [d1, d2]; } }; } ->x156 : () => Genric ->Genric : Genric ->Base : Base ->{ func: n => { return [d1, d2]; } } : { func: (n: Base[]) => (Derived1 | Derived2)[]; } ->func : (n: Base[]) => (Derived1 | Derived2)[] ->n => { return [d1, d2]; } : (n: Base[]) => (Derived1 | Derived2)[] ->n : Base[] ->[d1, d2] : (Derived1 | Derived2)[] ->d1 : Derived1 ->d2 : Derived2 ->{ func: n => { return [d1, d2]; } } : { func: (n: Base[]) => (Derived1 | Derived2)[]; } ->func : (n: Base[]) => (Derived1 | Derived2)[] ->n => { return [d1, d2]; } : (n: Base[]) => (Derived1 | Derived2)[] ->n : Base[] ->[d1, d2] : (Derived1 | Derived2)[] ->d1 : Derived1 ->d2 : Derived2 - -var x157: () => () => Base[] = () => { return () => [d1, d2]; }; ->x157 : () => () => Base[] ->Base : Base ->() => { return () => [d1, d2]; } : () => () => (Derived1 | Derived2)[] ->() => [d1, d2] : () => (Derived1 | Derived2)[] ->[d1, d2] : (Derived1 | Derived2)[] ->d1 : Derived1 ->d2 : Derived2 - -var x158: () => () => Base[] = () => { return function() { return [d1, d2] }; }; ->x158 : () => () => Base[] ->Base : Base ->() => { return function() { return [d1, d2] }; } : () => () => (Derived1 | Derived2)[] ->function() { return [d1, d2] } : () => (Derived1 | Derived2)[] ->[d1, d2] : (Derived1 | Derived2)[] ->d1 : Derived1 ->d2 : Derived2 - -var x159: () => () => Base[] = () => { return function named() { return [d1, d2] }; }; ->x159 : () => () => Base[] ->Base : Base ->() => { return function named() { return [d1, d2] }; } : () => () => (Derived1 | Derived2)[] ->function named() { return [d1, d2] } : () => (Derived1 | Derived2)[] ->named : () => (Derived1 | Derived2)[] ->[d1, d2] : (Derived1 | Derived2)[] ->d1 : Derived1 ->d2 : Derived2 - -var x160: () => { (): Base[]; } = () => { return () => [d1, d2]; }; ->x160 : () => () => Base[] ->Base : Base ->() => { return () => [d1, d2]; } : () => () => (Derived1 | Derived2)[] ->() => [d1, d2] : () => (Derived1 | Derived2)[] ->[d1, d2] : (Derived1 | Derived2)[] ->d1 : Derived1 ->d2 : Derived2 - -var x161: () => { (): Base[]; } = () => { return function() { return [d1, d2] }; }; ->x161 : () => () => Base[] ->Base : Base ->() => { return function() { return [d1, d2] }; } : () => () => (Derived1 | Derived2)[] ->function() { return [d1, d2] } : () => (Derived1 | Derived2)[] ->[d1, d2] : (Derived1 | Derived2)[] ->d1 : Derived1 ->d2 : Derived2 - -var x162: () => { (): Base[]; } = () => { return function named() { return [d1, d2] }; }; ->x162 : () => () => Base[] ->Base : Base ->() => { return function named() { return [d1, d2] }; } : () => () => (Derived1 | Derived2)[] ->function named() { return [d1, d2] } : () => (Derived1 | Derived2)[] ->named : () => (Derived1 | Derived2)[] ->[d1, d2] : (Derived1 | Derived2)[] ->d1 : Derived1 ->d2 : Derived2 - -var x163: () => Base[] = () => { return [d1, d2]; }; ->x163 : () => Base[] ->Base : Base ->() => { return [d1, d2]; } : () => (Derived1 | Derived2)[] ->[d1, d2] : (Derived1 | Derived2)[] ->d1 : Derived1 ->d2 : Derived2 - -var x164: () => Array = () => { return [d1, d2]; }; ->x164 : () => Base[] ->Array : T[] ->Base : Base ->() => { return [d1, d2]; } : () => (Derived1 | Derived2)[] ->[d1, d2] : (Derived1 | Derived2)[] ->d1 : Derived1 ->d2 : Derived2 - -var x165: () => { [n: number]: Base; } = () => { return [d1, d2]; }; ->x165 : () => { [n: number]: Base; } ->n : number ->Base : Base ->() => { return [d1, d2]; } : () => (Derived1 | Derived2)[] ->[d1, d2] : (Derived1 | Derived2)[] ->d1 : Derived1 ->d2 : Derived2 - -var x166: () => {n: Base[]; } = () => { return { n: [d1, d2] }; }; ->x166 : () => { n: Base[]; } ->n : Base[] ->Base : Base ->() => { return { n: [d1, d2] }; } : () => { n: (Derived1 | Derived2)[]; } ->{ n: [d1, d2] } : { n: (Derived1 | Derived2)[]; } ->n : (Derived1 | Derived2)[] ->[d1, d2] : (Derived1 | Derived2)[] ->d1 : Derived1 ->d2 : Derived2 - -var x167: () => (s: Base[]) => any = () => { return n => { var n: Base[]; return null; }; }; ->x167 : () => (s: Base[]) => any ->s : Base[] ->Base : Base ->() => { return n => { var n: Base[]; return null; }; } : () => (n: Base[]) => any ->n => { var n: Base[]; return null; } : (n: Base[]) => any ->n : Base[] ->n : Base[] ->Base : Base ->null : null - -var x168: () => Genric = () => { return { func: n => { return [d1, d2]; } }; }; ->x168 : () => Genric ->Genric : Genric ->Base : Base ->() => { return { func: n => { return [d1, d2]; } }; } : () => { func: (n: Base[]) => (Derived1 | Derived2)[]; } ->{ func: n => { return [d1, d2]; } } : { func: (n: Base[]) => (Derived1 | Derived2)[]; } ->func : (n: Base[]) => (Derived1 | Derived2)[] ->n => { return [d1, d2]; } : (n: Base[]) => (Derived1 | Derived2)[] ->n : Base[] ->[d1, d2] : (Derived1 | Derived2)[] ->d1 : Derived1 ->d2 : Derived2 - -var x169: () => () => Base[] = function() { return () => [d1, d2]; }; ->x169 : () => () => Base[] ->Base : Base ->function() { return () => [d1, d2]; } : () => () => (Derived1 | Derived2)[] ->() => [d1, d2] : () => (Derived1 | Derived2)[] ->[d1, d2] : (Derived1 | Derived2)[] ->d1 : Derived1 ->d2 : Derived2 - -var x170: () => () => Base[] = function() { return function() { return [d1, d2] }; }; ->x170 : () => () => Base[] ->Base : Base ->function() { return function() { return [d1, d2] }; } : () => () => (Derived1 | Derived2)[] ->function() { return [d1, d2] } : () => (Derived1 | Derived2)[] ->[d1, d2] : (Derived1 | Derived2)[] ->d1 : Derived1 ->d2 : Derived2 - -var x171: () => () => Base[] = function() { return function named() { return [d1, d2] }; }; ->x171 : () => () => Base[] ->Base : Base ->function() { return function named() { return [d1, d2] }; } : () => () => (Derived1 | Derived2)[] ->function named() { return [d1, d2] } : () => (Derived1 | Derived2)[] ->named : () => (Derived1 | Derived2)[] ->[d1, d2] : (Derived1 | Derived2)[] ->d1 : Derived1 ->d2 : Derived2 - -var x172: () => { (): Base[]; } = function() { return () => [d1, d2]; }; ->x172 : () => () => Base[] ->Base : Base ->function() { return () => [d1, d2]; } : () => () => (Derived1 | Derived2)[] ->() => [d1, d2] : () => (Derived1 | Derived2)[] ->[d1, d2] : (Derived1 | Derived2)[] ->d1 : Derived1 ->d2 : Derived2 - -var x173: () => { (): Base[]; } = function() { return function() { return [d1, d2] }; }; ->x173 : () => () => Base[] ->Base : Base ->function() { return function() { return [d1, d2] }; } : () => () => (Derived1 | Derived2)[] ->function() { return [d1, d2] } : () => (Derived1 | Derived2)[] ->[d1, d2] : (Derived1 | Derived2)[] ->d1 : Derived1 ->d2 : Derived2 - -var x174: () => { (): Base[]; } = function() { return function named() { return [d1, d2] }; }; ->x174 : () => () => Base[] ->Base : Base ->function() { return function named() { return [d1, d2] }; } : () => () => (Derived1 | Derived2)[] ->function named() { return [d1, d2] } : () => (Derived1 | Derived2)[] ->named : () => (Derived1 | Derived2)[] ->[d1, d2] : (Derived1 | Derived2)[] ->d1 : Derived1 ->d2 : Derived2 - -var x175: () => Base[] = function() { return [d1, d2]; }; ->x175 : () => Base[] ->Base : Base ->function() { return [d1, d2]; } : () => (Derived1 | Derived2)[] ->[d1, d2] : (Derived1 | Derived2)[] ->d1 : Derived1 ->d2 : Derived2 - -var x176: () => Array = function() { return [d1, d2]; }; ->x176 : () => Base[] ->Array : T[] ->Base : Base ->function() { return [d1, d2]; } : () => (Derived1 | Derived2)[] ->[d1, d2] : (Derived1 | Derived2)[] ->d1 : Derived1 ->d2 : Derived2 - -var x177: () => { [n: number]: Base; } = function() { return [d1, d2]; }; ->x177 : () => { [n: number]: Base; } ->n : number ->Base : Base ->function() { return [d1, d2]; } : () => (Derived1 | Derived2)[] ->[d1, d2] : (Derived1 | Derived2)[] ->d1 : Derived1 ->d2 : Derived2 - -var x178: () => {n: Base[]; } = function() { return { n: [d1, d2] }; }; ->x178 : () => { n: Base[]; } ->n : Base[] ->Base : Base ->function() { return { n: [d1, d2] }; } : () => { n: (Derived1 | Derived2)[]; } ->{ n: [d1, d2] } : { n: (Derived1 | Derived2)[]; } ->n : (Derived1 | Derived2)[] ->[d1, d2] : (Derived1 | Derived2)[] ->d1 : Derived1 ->d2 : Derived2 - -var x179: () => (s: Base[]) => any = function() { return n => { var n: Base[]; return null; }; }; ->x179 : () => (s: Base[]) => any ->s : Base[] ->Base : Base ->function() { return n => { var n: Base[]; return null; }; } : () => (n: Base[]) => any ->n => { var n: Base[]; return null; } : (n: Base[]) => any ->n : Base[] ->n : Base[] ->Base : Base ->null : null - -var x180: () => Genric = function() { return { func: n => { return [d1, d2]; } }; }; ->x180 : () => Genric ->Genric : Genric ->Base : Base ->function() { return { func: n => { return [d1, d2]; } }; } : () => { func: (n: Base[]) => (Derived1 | Derived2)[]; } ->{ func: n => { return [d1, d2]; } } : { func: (n: Base[]) => (Derived1 | Derived2)[]; } ->func : (n: Base[]) => (Derived1 | Derived2)[] ->n => { return [d1, d2]; } : (n: Base[]) => (Derived1 | Derived2)[] ->n : Base[] ->[d1, d2] : (Derived1 | Derived2)[] ->d1 : Derived1 ->d2 : Derived2 - -module x181 { var t: () => Base[] = () => [d1, d2]; } ->x181 : typeof x181 ->t : () => Base[] ->Base : Base ->() => [d1, d2] : () => (Derived1 | Derived2)[] ->[d1, d2] : (Derived1 | Derived2)[] ->d1 : Derived1 ->d2 : Derived2 - -module x182 { var t: () => Base[] = function() { return [d1, d2] }; } ->x182 : typeof x182 ->t : () => Base[] ->Base : Base ->function() { return [d1, d2] } : () => (Derived1 | Derived2)[] ->[d1, d2] : (Derived1 | Derived2)[] ->d1 : Derived1 ->d2 : Derived2 - -module x183 { var t: () => Base[] = function named() { return [d1, d2] }; } ->x183 : typeof x183 ->t : () => Base[] ->Base : Base ->function named() { return [d1, d2] } : () => (Derived1 | Derived2)[] ->named : () => (Derived1 | Derived2)[] ->[d1, d2] : (Derived1 | Derived2)[] ->d1 : Derived1 ->d2 : Derived2 - -module x184 { var t: { (): Base[]; } = () => [d1, d2]; } ->x184 : typeof x184 ->t : () => Base[] ->Base : Base ->() => [d1, d2] : () => (Derived1 | Derived2)[] ->[d1, d2] : (Derived1 | Derived2)[] ->d1 : Derived1 ->d2 : Derived2 - -module x185 { var t: { (): Base[]; } = function() { return [d1, d2] }; } ->x185 : typeof x185 ->t : () => Base[] ->Base : Base ->function() { return [d1, d2] } : () => (Derived1 | Derived2)[] ->[d1, d2] : (Derived1 | Derived2)[] ->d1 : Derived1 ->d2 : Derived2 - -module x186 { var t: { (): Base[]; } = function named() { return [d1, d2] }; } ->x186 : typeof x186 ->t : () => Base[] ->Base : Base ->function named() { return [d1, d2] } : () => (Derived1 | Derived2)[] ->named : () => (Derived1 | Derived2)[] ->[d1, d2] : (Derived1 | Derived2)[] ->d1 : Derived1 ->d2 : Derived2 - -module x187 { var t: Base[] = [d1, d2]; } ->x187 : typeof x187 ->t : Base[] ->Base : Base ->[d1, d2] : (Derived1 | Derived2)[] ->d1 : Derived1 ->d2 : Derived2 - -module x188 { var t: Array = [d1, d2]; } ->x188 : typeof x188 ->t : Base[] ->Array : T[] ->Base : Base ->[d1, d2] : (Derived1 | Derived2)[] ->d1 : Derived1 ->d2 : Derived2 - -module x189 { var t: { [n: number]: Base; } = [d1, d2]; } ->x189 : typeof x189 ->t : { [n: number]: Base; } ->n : number ->Base : Base ->[d1, d2] : (Derived1 | Derived2)[] ->d1 : Derived1 ->d2 : Derived2 - -module x190 { var t: {n: Base[]; } = { n: [d1, d2] }; } ->x190 : typeof x190 ->t : { n: Base[]; } ->n : Base[] ->Base : Base ->{ n: [d1, d2] } : { n: (Derived1 | Derived2)[]; } ->n : (Derived1 | Derived2)[] ->[d1, d2] : (Derived1 | Derived2)[] ->d1 : Derived1 ->d2 : Derived2 - -module x191 { var t: (s: Base[]) => any = n => { var n: Base[]; return null; }; } ->x191 : typeof x191 ->t : (s: Base[]) => any ->s : Base[] ->Base : Base ->n => { var n: Base[]; return null; } : (n: Base[]) => any ->n : Base[] ->n : Base[] ->Base : Base ->null : null - -module x192 { var t: Genric = { func: n => { return [d1, d2]; } }; } ->x192 : typeof x192 ->t : Genric ->Genric : Genric ->Base : Base ->{ func: n => { return [d1, d2]; } } : { func: (n: Base[]) => (Derived1 | Derived2)[]; } ->func : (n: Base[]) => (Derived1 | Derived2)[] ->n => { return [d1, d2]; } : (n: Base[]) => (Derived1 | Derived2)[] ->n : Base[] ->[d1, d2] : (Derived1 | Derived2)[] ->d1 : Derived1 ->d2 : Derived2 - -module x193 { export var t: () => Base[] = () => [d1, d2]; } ->x193 : typeof x193 ->t : () => Base[] ->Base : Base ->() => [d1, d2] : () => (Derived1 | Derived2)[] ->[d1, d2] : (Derived1 | Derived2)[] ->d1 : Derived1 ->d2 : Derived2 - -module x194 { export var t: () => Base[] = function() { return [d1, d2] }; } ->x194 : typeof x194 ->t : () => Base[] ->Base : Base ->function() { return [d1, d2] } : () => (Derived1 | Derived2)[] ->[d1, d2] : (Derived1 | Derived2)[] ->d1 : Derived1 ->d2 : Derived2 - -module x195 { export var t: () => Base[] = function named() { return [d1, d2] }; } ->x195 : typeof x195 ->t : () => Base[] ->Base : Base ->function named() { return [d1, d2] } : () => (Derived1 | Derived2)[] ->named : () => (Derived1 | Derived2)[] ->[d1, d2] : (Derived1 | Derived2)[] ->d1 : Derived1 ->d2 : Derived2 - -module x196 { export var t: { (): Base[]; } = () => [d1, d2]; } ->x196 : typeof x196 ->t : () => Base[] ->Base : Base ->() => [d1, d2] : () => (Derived1 | Derived2)[] ->[d1, d2] : (Derived1 | Derived2)[] ->d1 : Derived1 ->d2 : Derived2 - -module x197 { export var t: { (): Base[]; } = function() { return [d1, d2] }; } ->x197 : typeof x197 ->t : () => Base[] ->Base : Base ->function() { return [d1, d2] } : () => (Derived1 | Derived2)[] ->[d1, d2] : (Derived1 | Derived2)[] ->d1 : Derived1 ->d2 : Derived2 - -module x198 { export var t: { (): Base[]; } = function named() { return [d1, d2] }; } ->x198 : typeof x198 ->t : () => Base[] ->Base : Base ->function named() { return [d1, d2] } : () => (Derived1 | Derived2)[] ->named : () => (Derived1 | Derived2)[] ->[d1, d2] : (Derived1 | Derived2)[] ->d1 : Derived1 ->d2 : Derived2 - -module x199 { export var t: Base[] = [d1, d2]; } ->x199 : typeof x199 ->t : Base[] ->Base : Base ->[d1, d2] : (Derived1 | Derived2)[] ->d1 : Derived1 ->d2 : Derived2 - -module x200 { export var t: Array = [d1, d2]; } ->x200 : typeof x200 ->t : Base[] ->Array : T[] ->Base : Base ->[d1, d2] : (Derived1 | Derived2)[] ->d1 : Derived1 ->d2 : Derived2 - -module x201 { export var t: { [n: number]: Base; } = [d1, d2]; } ->x201 : typeof x201 ->t : { [n: number]: Base; } ->n : number ->Base : Base ->[d1, d2] : (Derived1 | Derived2)[] ->d1 : Derived1 ->d2 : Derived2 - -module x202 { export var t: {n: Base[]; } = { n: [d1, d2] }; } ->x202 : typeof x202 ->t : { n: Base[]; } ->n : Base[] ->Base : Base ->{ n: [d1, d2] } : { n: (Derived1 | Derived2)[]; } ->n : (Derived1 | Derived2)[] ->[d1, d2] : (Derived1 | Derived2)[] ->d1 : Derived1 ->d2 : Derived2 - -module x203 { export var t: (s: Base[]) => any = n => { var n: Base[]; return null; }; } ->x203 : typeof x203 ->t : (s: Base[]) => any ->s : Base[] ->Base : Base ->n => { var n: Base[]; return null; } : (n: Base[]) => any ->n : Base[] ->n : Base[] ->Base : Base ->null : null - -module x204 { export var t: Genric = { func: n => { return [d1, d2]; } }; } ->x204 : typeof x204 ->t : Genric ->Genric : Genric ->Base : Base ->{ func: n => { return [d1, d2]; } } : { func: (n: Base[]) => (Derived1 | Derived2)[]; } ->func : (n: Base[]) => (Derived1 | Derived2)[] ->n => { return [d1, d2]; } : (n: Base[]) => (Derived1 | Derived2)[] ->n : Base[] ->[d1, d2] : (Derived1 | Derived2)[] ->d1 : Derived1 ->d2 : Derived2 - -var x206 = <() => Base[]>function() { return [d1, d2] }; ->x206 : () => Base[] -><() => Base[]>function() { return [d1, d2] } : () => Base[] ->Base : Base ->function() { return [d1, d2] } : () => (Derived1 | Derived2)[] ->[d1, d2] : (Derived1 | Derived2)[] ->d1 : Derived1 ->d2 : Derived2 - -var x207 = <() => Base[]>function named() { return [d1, d2] }; ->x207 : () => Base[] -><() => Base[]>function named() { return [d1, d2] } : () => Base[] ->Base : Base ->function named() { return [d1, d2] } : () => (Derived1 | Derived2)[] ->named : () => (Derived1 | Derived2)[] ->[d1, d2] : (Derived1 | Derived2)[] ->d1 : Derived1 ->d2 : Derived2 - -var x209 = <{ (): Base[]; }>function() { return [d1, d2] }; ->x209 : () => Base[] -><{ (): Base[]; }>function() { return [d1, d2] } : () => Base[] ->Base : Base ->function() { return [d1, d2] } : () => (Derived1 | Derived2)[] ->[d1, d2] : (Derived1 | Derived2)[] ->d1 : Derived1 ->d2 : Derived2 - -var x210 = <{ (): Base[]; }>function named() { return [d1, d2] }; ->x210 : () => Base[] -><{ (): Base[]; }>function named() { return [d1, d2] } : () => Base[] ->Base : Base ->function named() { return [d1, d2] } : () => (Derived1 | Derived2)[] ->named : () => (Derived1 | Derived2)[] ->[d1, d2] : (Derived1 | Derived2)[] ->d1 : Derived1 ->d2 : Derived2 - -var x211 = [d1, d2]; ->x211 : Base[] ->[d1, d2] : Base[] ->Base : Base ->[d1, d2] : (Derived1 | Derived2)[] ->d1 : Derived1 ->d2 : Derived2 - -var x212 = >[d1, d2]; ->x212 : Base[] ->>[d1, d2] : Base[] ->Array : T[] ->Base : Base ->[d1, d2] : (Derived1 | Derived2)[] ->d1 : Derived1 ->d2 : Derived2 - -var x213 = <{ [n: number]: Base; }>[d1, d2]; ->x213 : { [n: number]: Base; } -><{ [n: number]: Base; }>[d1, d2] : { [n: number]: Base; } ->n : number ->Base : Base ->[d1, d2] : (Derived1 | Derived2)[] ->d1 : Derived1 ->d2 : Derived2 - -var x214 = <{n: Base[]; } >{ n: [d1, d2] }; ->x214 : { n: Base[]; } -><{n: Base[]; } >{ n: [d1, d2] } : { n: Base[]; } ->n : Base[] ->Base : Base ->{ n: [d1, d2] } : { n: (Derived1 | Derived2)[]; } ->n : (Derived1 | Derived2)[] ->[d1, d2] : (Derived1 | Derived2)[] ->d1 : Derived1 ->d2 : Derived2 - -var x216 = >{ func: n => { return [d1, d2]; } }; ->x216 : Genric ->>{ func: n => { return [d1, d2]; } } : Genric ->Genric : Genric ->Base : Base ->{ func: n => { return [d1, d2]; } } : { func: (n: Base[]) => (Derived1 | Derived2)[]; } ->func : (n: Base[]) => (Derived1 | Derived2)[] ->n => { return [d1, d2]; } : (n: Base[]) => (Derived1 | Derived2)[] ->n : Base[] ->[d1, d2] : (Derived1 | Derived2)[] ->d1 : Derived1 ->d2 : Derived2 - -var x217 = (<() => Base[]>undefined) || function() { return [d1, d2] }; ->x217 : () => Base[] ->(<() => Base[]>undefined) || function() { return [d1, d2] } : () => Base[] ->(<() => Base[]>undefined) : () => Base[] -><() => Base[]>undefined : () => Base[] ->Base : Base ->undefined : undefined ->function() { return [d1, d2] } : () => (Derived1 | Derived2)[] ->[d1, d2] : (Derived1 | Derived2)[] ->d1 : Derived1 ->d2 : Derived2 - -var x218 = (<() => Base[]>undefined) || function named() { return [d1, d2] }; ->x218 : () => Base[] ->(<() => Base[]>undefined) || function named() { return [d1, d2] } : () => Base[] ->(<() => Base[]>undefined) : () => Base[] -><() => Base[]>undefined : () => Base[] ->Base : Base ->undefined : undefined ->function named() { return [d1, d2] } : () => (Derived1 | Derived2)[] ->named : () => (Derived1 | Derived2)[] ->[d1, d2] : (Derived1 | Derived2)[] ->d1 : Derived1 ->d2 : Derived2 - -var x219 = (<{ (): Base[]; }>undefined) || function() { return [d1, d2] }; ->x219 : () => Base[] ->(<{ (): Base[]; }>undefined) || function() { return [d1, d2] } : () => Base[] ->(<{ (): Base[]; }>undefined) : () => Base[] -><{ (): Base[]; }>undefined : () => Base[] ->Base : Base ->undefined : undefined ->function() { return [d1, d2] } : () => (Derived1 | Derived2)[] ->[d1, d2] : (Derived1 | Derived2)[] ->d1 : Derived1 ->d2 : Derived2 - -var x220 = (<{ (): Base[]; }>undefined) || function named() { return [d1, d2] }; ->x220 : () => Base[] ->(<{ (): Base[]; }>undefined) || function named() { return [d1, d2] } : () => Base[] ->(<{ (): Base[]; }>undefined) : () => Base[] -><{ (): Base[]; }>undefined : () => Base[] ->Base : Base ->undefined : undefined ->function named() { return [d1, d2] } : () => (Derived1 | Derived2)[] ->named : () => (Derived1 | Derived2)[] ->[d1, d2] : (Derived1 | Derived2)[] ->d1 : Derived1 ->d2 : Derived2 - -var x221 = (undefined) || [d1, d2]; ->x221 : Base[] ->(undefined) || [d1, d2] : Base[] ->(undefined) : Base[] ->undefined : Base[] ->Base : Base ->undefined : undefined ->[d1, d2] : (Derived1 | Derived2)[] ->d1 : Derived1 ->d2 : Derived2 - -var x222 = (>undefined) || [d1, d2]; ->x222 : Base[] ->(>undefined) || [d1, d2] : Base[] ->(>undefined) : Base[] ->>undefined : Base[] ->Array : T[] ->Base : Base ->undefined : undefined ->[d1, d2] : (Derived1 | Derived2)[] ->d1 : Derived1 ->d2 : Derived2 - -var x223 = (<{ [n: number]: Base; }>undefined) || [d1, d2]; ->x223 : { [n: number]: Base; } ->(<{ [n: number]: Base; }>undefined) || [d1, d2] : { [n: number]: Base; } ->(<{ [n: number]: Base; }>undefined) : { [n: number]: Base; } -><{ [n: number]: Base; }>undefined : { [n: number]: Base; } ->n : number ->Base : Base ->undefined : undefined ->[d1, d2] : (Derived1 | Derived2)[] ->d1 : Derived1 ->d2 : Derived2 - -var x224 = (<{n: Base[]; } >undefined) || { n: [d1, d2] }; ->x224 : { n: Base[]; } ->(<{n: Base[]; } >undefined) || { n: [d1, d2] } : { n: Base[]; } ->(<{n: Base[]; } >undefined) : { n: Base[]; } -><{n: Base[]; } >undefined : { n: Base[]; } ->n : Base[] ->Base : Base ->undefined : undefined ->{ n: [d1, d2] } : { n: (Derived1 | Derived2)[]; } ->n : (Derived1 | Derived2)[] ->[d1, d2] : (Derived1 | Derived2)[] ->d1 : Derived1 ->d2 : Derived2 - -var x225: () => Base[]; x225 = () => [d1, d2]; ->x225 : () => Base[] ->Base : Base ->x225 = () => [d1, d2] : () => (Derived1 | Derived2)[] ->x225 : () => Base[] ->() => [d1, d2] : () => (Derived1 | Derived2)[] ->[d1, d2] : (Derived1 | Derived2)[] ->d1 : Derived1 ->d2 : Derived2 - -var x226: () => Base[]; x226 = function() { return [d1, d2] }; ->x226 : () => Base[] ->Base : Base ->x226 = function() { return [d1, d2] } : () => (Derived1 | Derived2)[] ->x226 : () => Base[] ->function() { return [d1, d2] } : () => (Derived1 | Derived2)[] ->[d1, d2] : (Derived1 | Derived2)[] ->d1 : Derived1 ->d2 : Derived2 - -var x227: () => Base[]; x227 = function named() { return [d1, d2] }; ->x227 : () => Base[] ->Base : Base ->x227 = function named() { return [d1, d2] } : () => (Derived1 | Derived2)[] ->x227 : () => Base[] ->function named() { return [d1, d2] } : () => (Derived1 | Derived2)[] ->named : () => (Derived1 | Derived2)[] ->[d1, d2] : (Derived1 | Derived2)[] ->d1 : Derived1 ->d2 : Derived2 - -var x228: { (): Base[]; }; x228 = () => [d1, d2]; ->x228 : () => Base[] ->Base : Base ->x228 = () => [d1, d2] : () => (Derived1 | Derived2)[] ->x228 : () => Base[] ->() => [d1, d2] : () => (Derived1 | Derived2)[] ->[d1, d2] : (Derived1 | Derived2)[] ->d1 : Derived1 ->d2 : Derived2 - -var x229: { (): Base[]; }; x229 = function() { return [d1, d2] }; ->x229 : () => Base[] ->Base : Base ->x229 = function() { return [d1, d2] } : () => (Derived1 | Derived2)[] ->x229 : () => Base[] ->function() { return [d1, d2] } : () => (Derived1 | Derived2)[] ->[d1, d2] : (Derived1 | Derived2)[] ->d1 : Derived1 ->d2 : Derived2 - -var x230: { (): Base[]; }; x230 = function named() { return [d1, d2] }; ->x230 : () => Base[] ->Base : Base ->x230 = function named() { return [d1, d2] } : () => (Derived1 | Derived2)[] ->x230 : () => Base[] ->function named() { return [d1, d2] } : () => (Derived1 | Derived2)[] ->named : () => (Derived1 | Derived2)[] ->[d1, d2] : (Derived1 | Derived2)[] ->d1 : Derived1 ->d2 : Derived2 - -var x231: Base[]; x231 = [d1, d2]; ->x231 : Base[] ->Base : Base ->x231 = [d1, d2] : (Derived1 | Derived2)[] ->x231 : Base[] ->[d1, d2] : (Derived1 | Derived2)[] ->d1 : Derived1 ->d2 : Derived2 - -var x232: Array; x232 = [d1, d2]; ->x232 : Base[] ->Array : T[] ->Base : Base ->x232 = [d1, d2] : (Derived1 | Derived2)[] ->x232 : Base[] ->[d1, d2] : (Derived1 | Derived2)[] ->d1 : Derived1 ->d2 : Derived2 - -var x233: { [n: number]: Base; }; x233 = [d1, d2]; ->x233 : { [n: number]: Base; } ->n : number ->Base : Base ->x233 = [d1, d2] : (Derived1 | Derived2)[] ->x233 : { [n: number]: Base; } ->[d1, d2] : (Derived1 | Derived2)[] ->d1 : Derived1 ->d2 : Derived2 - -var x234: {n: Base[]; } ; x234 = { n: [d1, d2] }; ->x234 : { n: Base[]; } ->n : Base[] ->Base : Base ->x234 = { n: [d1, d2] } : { n: (Derived1 | Derived2)[]; } ->x234 : { n: Base[]; } ->{ n: [d1, d2] } : { n: (Derived1 | Derived2)[]; } ->n : (Derived1 | Derived2)[] ->[d1, d2] : (Derived1 | Derived2)[] ->d1 : Derived1 ->d2 : Derived2 - -var x235: (s: Base[]) => any; x235 = n => { var n: Base[]; return null; }; ->x235 : (s: Base[]) => any ->s : Base[] ->Base : Base ->x235 = n => { var n: Base[]; return null; } : (n: Base[]) => any ->x235 : (s: Base[]) => any ->n => { var n: Base[]; return null; } : (n: Base[]) => any ->n : Base[] ->n : Base[] ->Base : Base ->null : null - -var x236: Genric; x236 = { func: n => { return [d1, d2]; } }; ->x236 : Genric ->Genric : Genric ->Base : Base ->x236 = { func: n => { return [d1, d2]; } } : { func: (n: Base[]) => (Derived1 | Derived2)[]; } ->x236 : Genric ->{ func: n => { return [d1, d2]; } } : { func: (n: Base[]) => (Derived1 | Derived2)[]; } ->func : (n: Base[]) => (Derived1 | Derived2)[] ->n => { return [d1, d2]; } : (n: Base[]) => (Derived1 | Derived2)[] ->n : Base[] ->[d1, d2] : (Derived1 | Derived2)[] ->d1 : Derived1 ->d2 : Derived2 - -var x237: { n: () => Base[]; } = { n: () => [d1, d2] }; ->x237 : { n: () => Base[]; } ->n : () => Base[] ->Base : Base ->{ n: () => [d1, d2] } : { n: () => (Derived1 | Derived2)[]; } ->n : () => (Derived1 | Derived2)[] ->() => [d1, d2] : () => (Derived1 | Derived2)[] ->[d1, d2] : (Derived1 | Derived2)[] ->d1 : Derived1 ->d2 : Derived2 - -var x238: { n: () => Base[]; } = { n: function() { return [d1, d2] } }; ->x238 : { n: () => Base[]; } ->n : () => Base[] ->Base : Base ->{ n: function() { return [d1, d2] } } : { n: () => (Derived1 | Derived2)[]; } ->n : () => (Derived1 | Derived2)[] ->function() { return [d1, d2] } : () => (Derived1 | Derived2)[] ->[d1, d2] : (Derived1 | Derived2)[] ->d1 : Derived1 ->d2 : Derived2 - -var x239: { n: () => Base[]; } = { n: function named() { return [d1, d2] } }; ->x239 : { n: () => Base[]; } ->n : () => Base[] ->Base : Base ->{ n: function named() { return [d1, d2] } } : { n: () => (Derived1 | Derived2)[]; } ->n : () => (Derived1 | Derived2)[] ->function named() { return [d1, d2] } : () => (Derived1 | Derived2)[] ->named : () => (Derived1 | Derived2)[] ->[d1, d2] : (Derived1 | Derived2)[] ->d1 : Derived1 ->d2 : Derived2 - -var x240: { n: { (): Base[]; }; } = { n: () => [d1, d2] }; ->x240 : { n: () => Base[]; } ->n : () => Base[] ->Base : Base ->{ n: () => [d1, d2] } : { n: () => (Derived1 | Derived2)[]; } ->n : () => (Derived1 | Derived2)[] ->() => [d1, d2] : () => (Derived1 | Derived2)[] ->[d1, d2] : (Derived1 | Derived2)[] ->d1 : Derived1 ->d2 : Derived2 - -var x241: { n: { (): Base[]; }; } = { n: function() { return [d1, d2] } }; ->x241 : { n: () => Base[]; } ->n : () => Base[] ->Base : Base ->{ n: function() { return [d1, d2] } } : { n: () => (Derived1 | Derived2)[]; } ->n : () => (Derived1 | Derived2)[] ->function() { return [d1, d2] } : () => (Derived1 | Derived2)[] ->[d1, d2] : (Derived1 | Derived2)[] ->d1 : Derived1 ->d2 : Derived2 - -var x242: { n: { (): Base[]; }; } = { n: function named() { return [d1, d2] } }; ->x242 : { n: () => Base[]; } ->n : () => Base[] ->Base : Base ->{ n: function named() { return [d1, d2] } } : { n: () => (Derived1 | Derived2)[]; } ->n : () => (Derived1 | Derived2)[] ->function named() { return [d1, d2] } : () => (Derived1 | Derived2)[] ->named : () => (Derived1 | Derived2)[] ->[d1, d2] : (Derived1 | Derived2)[] ->d1 : Derived1 ->d2 : Derived2 - -var x243: { n: Base[]; } = { n: [d1, d2] }; ->x243 : { n: Base[]; } ->n : Base[] ->Base : Base ->{ n: [d1, d2] } : { n: (Derived1 | Derived2)[]; } ->n : (Derived1 | Derived2)[] ->[d1, d2] : (Derived1 | Derived2)[] ->d1 : Derived1 ->d2 : Derived2 - -var x244: { n: Array; } = { n: [d1, d2] }; ->x244 : { n: Base[]; } ->n : Base[] ->Array : T[] ->Base : Base ->{ n: [d1, d2] } : { n: (Derived1 | Derived2)[]; } ->n : (Derived1 | Derived2)[] ->[d1, d2] : (Derived1 | Derived2)[] ->d1 : Derived1 ->d2 : Derived2 - -var x245: { n: { [n: number]: Base; }; } = { n: [d1, d2] }; ->x245 : { n: { [n: number]: Base; }; } ->n : { [n: number]: Base; } ->n : number ->Base : Base ->{ n: [d1, d2] } : { n: (Derived1 | Derived2)[]; } ->n : (Derived1 | Derived2)[] ->[d1, d2] : (Derived1 | Derived2)[] ->d1 : Derived1 ->d2 : Derived2 - -var x246: { n: {n: Base[]; } ; } = { n: { n: [d1, d2] } }; ->x246 : { n: { n: Base[]; }; } ->n : { n: Base[]; } ->n : Base[] ->Base : Base ->{ n: { n: [d1, d2] } } : { n: { n: (Derived1 | Derived2)[]; }; } ->n : { n: (Derived1 | Derived2)[]; } ->{ n: [d1, d2] } : { n: (Derived1 | Derived2)[]; } ->n : (Derived1 | Derived2)[] ->[d1, d2] : (Derived1 | Derived2)[] ->d1 : Derived1 ->d2 : Derived2 - -var x247: { n: (s: Base[]) => any; } = { n: n => { var n: Base[]; return null; } }; ->x247 : { n: (s: Base[]) => any; } ->n : (s: Base[]) => any ->s : Base[] ->Base : Base ->{ n: n => { var n: Base[]; return null; } } : { n: (n: Base[]) => any; } ->n : (n: Base[]) => any ->n => { var n: Base[]; return null; } : (n: Base[]) => any ->n : Base[] ->n : Base[] ->Base : Base ->null : null - -var x248: { n: Genric; } = { n: { func: n => { return [d1, d2]; } } }; ->x248 : { n: Genric; } ->n : Genric ->Genric : Genric ->Base : Base ->{ n: { func: n => { return [d1, d2]; } } } : { n: { func: (n: Base[]) => (Derived1 | Derived2)[]; }; } ->n : { func: (n: Base[]) => (Derived1 | Derived2)[]; } ->{ func: n => { return [d1, d2]; } } : { func: (n: Base[]) => (Derived1 | Derived2)[]; } ->func : (n: Base[]) => (Derived1 | Derived2)[] ->n => { return [d1, d2]; } : (n: Base[]) => (Derived1 | Derived2)[] ->n : Base[] ->[d1, d2] : (Derived1 | Derived2)[] ->d1 : Derived1 ->d2 : Derived2 - -var x252: { (): Base[]; }[] = [() => [d1, d2]]; ->x252 : (() => Base[])[] ->Base : Base ->[() => [d1, d2]] : (() => (Derived1 | Derived2)[])[] ->() => [d1, d2] : () => (Derived1 | Derived2)[] ->[d1, d2] : (Derived1 | Derived2)[] ->d1 : Derived1 ->d2 : Derived2 - -var x253: { (): Base[]; }[] = [function() { return [d1, d2] }]; ->x253 : (() => Base[])[] ->Base : Base ->[function() { return [d1, d2] }] : (() => (Derived1 | Derived2)[])[] ->function() { return [d1, d2] } : () => (Derived1 | Derived2)[] ->[d1, d2] : (Derived1 | Derived2)[] ->d1 : Derived1 ->d2 : Derived2 - -var x254: { (): Base[]; }[] = [function named() { return [d1, d2] }]; ->x254 : (() => Base[])[] ->Base : Base ->[function named() { return [d1, d2] }] : (() => (Derived1 | Derived2)[])[] ->function named() { return [d1, d2] } : () => (Derived1 | Derived2)[] ->named : () => (Derived1 | Derived2)[] ->[d1, d2] : (Derived1 | Derived2)[] ->d1 : Derived1 ->d2 : Derived2 - -var x255: Base[][] = [[d1, d2]]; ->x255 : Base[][] ->Base : Base ->[[d1, d2]] : (Derived1 | Derived2)[][] ->[d1, d2] : (Derived1 | Derived2)[] ->d1 : Derived1 ->d2 : Derived2 - -var x256: Array[] = [[d1, d2]]; ->x256 : Base[][] ->Array : T[] ->Base : Base ->[[d1, d2]] : (Derived1 | Derived2)[][] ->[d1, d2] : (Derived1 | Derived2)[] ->d1 : Derived1 ->d2 : Derived2 - -var x257: { [n: number]: Base; }[] = [[d1, d2]]; ->x257 : { [n: number]: Base; }[] ->n : number ->Base : Base ->[[d1, d2]] : (Derived1 | Derived2)[][] ->[d1, d2] : (Derived1 | Derived2)[] ->d1 : Derived1 ->d2 : Derived2 - -var x258: {n: Base[]; } [] = [{ n: [d1, d2] }]; ->x258 : { n: Base[]; }[] ->n : Base[] ->Base : Base ->[{ n: [d1, d2] }] : { n: (Derived1 | Derived2)[]; }[] ->{ n: [d1, d2] } : { n: (Derived1 | Derived2)[]; } ->n : (Derived1 | Derived2)[] ->[d1, d2] : (Derived1 | Derived2)[] ->d1 : Derived1 ->d2 : Derived2 - -var x260: Genric[] = [{ func: n => { return [d1, d2]; } }]; ->x260 : Genric[] ->Genric : Genric ->Base : Base ->[{ func: n => { return [d1, d2]; } }] : { func: (n: Base[]) => (Derived1 | Derived2)[]; }[] ->{ func: n => { return [d1, d2]; } } : { func: (n: Base[]) => (Derived1 | Derived2)[]; } ->func : (n: Base[]) => (Derived1 | Derived2)[] ->n => { return [d1, d2]; } : (n: Base[]) => (Derived1 | Derived2)[] ->n : Base[] ->[d1, d2] : (Derived1 | Derived2)[] ->d1 : Derived1 ->d2 : Derived2 - -var x261: () => Base[] = function() { return [d1, d2] } || undefined; ->x261 : () => Base[] ->Base : Base ->function() { return [d1, d2] } || undefined : () => (Derived1 | Derived2)[] ->function() { return [d1, d2] } : () => (Derived1 | Derived2)[] ->[d1, d2] : (Derived1 | Derived2)[] ->d1 : Derived1 ->d2 : Derived2 ->undefined : undefined - -var x262: () => Base[] = function named() { return [d1, d2] } || undefined; ->x262 : () => Base[] ->Base : Base ->function named() { return [d1, d2] } || undefined : () => (Derived1 | Derived2)[] ->function named() { return [d1, d2] } : () => (Derived1 | Derived2)[] ->named : () => (Derived1 | Derived2)[] ->[d1, d2] : (Derived1 | Derived2)[] ->d1 : Derived1 ->d2 : Derived2 ->undefined : undefined - -var x263: { (): Base[]; } = function() { return [d1, d2] } || undefined; ->x263 : () => Base[] ->Base : Base ->function() { return [d1, d2] } || undefined : () => (Derived1 | Derived2)[] ->function() { return [d1, d2] } : () => (Derived1 | Derived2)[] ->[d1, d2] : (Derived1 | Derived2)[] ->d1 : Derived1 ->d2 : Derived2 ->undefined : undefined - -var x264: { (): Base[]; } = function named() { return [d1, d2] } || undefined; ->x264 : () => Base[] ->Base : Base ->function named() { return [d1, d2] } || undefined : () => (Derived1 | Derived2)[] ->function named() { return [d1, d2] } : () => (Derived1 | Derived2)[] ->named : () => (Derived1 | Derived2)[] ->[d1, d2] : (Derived1 | Derived2)[] ->d1 : Derived1 ->d2 : Derived2 ->undefined : undefined - -var x265: Base[] = [d1, d2] || undefined; ->x265 : Base[] ->Base : Base ->[d1, d2] || undefined : (Derived1 | Derived2)[] ->[d1, d2] : (Derived1 | Derived2)[] ->d1 : Derived1 ->d2 : Derived2 ->undefined : undefined - -var x266: Array = [d1, d2] || undefined; ->x266 : Base[] ->Array : T[] ->Base : Base ->[d1, d2] || undefined : (Derived1 | Derived2)[] ->[d1, d2] : (Derived1 | Derived2)[] ->d1 : Derived1 ->d2 : Derived2 ->undefined : undefined - -var x267: { [n: number]: Base; } = [d1, d2] || undefined; ->x267 : { [n: number]: Base; } ->n : number ->Base : Base ->[d1, d2] || undefined : (Derived1 | Derived2)[] ->[d1, d2] : (Derived1 | Derived2)[] ->d1 : Derived1 ->d2 : Derived2 ->undefined : undefined - -var x268: {n: Base[]; } = { n: [d1, d2] } || undefined; ->x268 : { n: Base[]; } ->n : Base[] ->Base : Base ->{ n: [d1, d2] } || undefined : { n: (Derived1 | Derived2)[]; } ->{ n: [d1, d2] } : { n: (Derived1 | Derived2)[]; } ->n : (Derived1 | Derived2)[] ->[d1, d2] : (Derived1 | Derived2)[] ->d1 : Derived1 ->d2 : Derived2 ->undefined : undefined - -var x269: () => Base[] = undefined || function() { return [d1, d2] }; ->x269 : () => Base[] ->Base : Base ->undefined || function() { return [d1, d2] } : () => (Derived1 | Derived2)[] ->undefined : undefined ->function() { return [d1, d2] } : () => (Derived1 | Derived2)[] ->[d1, d2] : (Derived1 | Derived2)[] ->d1 : Derived1 ->d2 : Derived2 - -var x270: () => Base[] = undefined || function named() { return [d1, d2] }; ->x270 : () => Base[] ->Base : Base ->undefined || function named() { return [d1, d2] } : () => (Derived1 | Derived2)[] ->undefined : undefined ->function named() { return [d1, d2] } : () => (Derived1 | Derived2)[] ->named : () => (Derived1 | Derived2)[] ->[d1, d2] : (Derived1 | Derived2)[] ->d1 : Derived1 ->d2 : Derived2 - -var x271: { (): Base[]; } = undefined || function() { return [d1, d2] }; ->x271 : () => Base[] ->Base : Base ->undefined || function() { return [d1, d2] } : () => (Derived1 | Derived2)[] ->undefined : undefined ->function() { return [d1, d2] } : () => (Derived1 | Derived2)[] ->[d1, d2] : (Derived1 | Derived2)[] ->d1 : Derived1 ->d2 : Derived2 - -var x272: { (): Base[]; } = undefined || function named() { return [d1, d2] }; ->x272 : () => Base[] ->Base : Base ->undefined || function named() { return [d1, d2] } : () => (Derived1 | Derived2)[] ->undefined : undefined ->function named() { return [d1, d2] } : () => (Derived1 | Derived2)[] ->named : () => (Derived1 | Derived2)[] ->[d1, d2] : (Derived1 | Derived2)[] ->d1 : Derived1 ->d2 : Derived2 - -var x273: Base[] = undefined || [d1, d2]; ->x273 : Base[] ->Base : Base ->undefined || [d1, d2] : (Derived1 | Derived2)[] ->undefined : undefined ->[d1, d2] : (Derived1 | Derived2)[] ->d1 : Derived1 ->d2 : Derived2 - -var x274: Array = undefined || [d1, d2]; ->x274 : Base[] ->Array : T[] ->Base : Base ->undefined || [d1, d2] : (Derived1 | Derived2)[] ->undefined : undefined ->[d1, d2] : (Derived1 | Derived2)[] ->d1 : Derived1 ->d2 : Derived2 - -var x275: { [n: number]: Base; } = undefined || [d1, d2]; ->x275 : { [n: number]: Base; } ->n : number ->Base : Base ->undefined || [d1, d2] : (Derived1 | Derived2)[] ->undefined : undefined ->[d1, d2] : (Derived1 | Derived2)[] ->d1 : Derived1 ->d2 : Derived2 - -var x276: {n: Base[]; } = undefined || { n: [d1, d2] }; ->x276 : { n: Base[]; } ->n : Base[] ->Base : Base ->undefined || { n: [d1, d2] } : { n: (Derived1 | Derived2)[]; } ->undefined : undefined ->{ n: [d1, d2] } : { n: (Derived1 | Derived2)[]; } ->n : (Derived1 | Derived2)[] ->[d1, d2] : (Derived1 | Derived2)[] ->d1 : Derived1 ->d2 : Derived2 - -var x277: () => Base[] = function() { return [d1, d2] } || function() { return [d1, d2] }; ->x277 : () => Base[] ->Base : Base ->function() { return [d1, d2] } || function() { return [d1, d2] } : () => (Derived1 | Derived2)[] ->function() { return [d1, d2] } : () => (Derived1 | Derived2)[] ->[d1, d2] : (Derived1 | Derived2)[] ->d1 : Derived1 ->d2 : Derived2 ->function() { return [d1, d2] } : () => (Derived1 | Derived2)[] ->[d1, d2] : (Derived1 | Derived2)[] ->d1 : Derived1 ->d2 : Derived2 - -var x278: () => Base[] = function named() { return [d1, d2] } || function named() { return [d1, d2] }; ->x278 : () => Base[] ->Base : Base ->function named() { return [d1, d2] } || function named() { return [d1, d2] } : () => (Derived1 | Derived2)[] ->function named() { return [d1, d2] } : () => (Derived1 | Derived2)[] ->named : () => (Derived1 | Derived2)[] ->[d1, d2] : (Derived1 | Derived2)[] ->d1 : Derived1 ->d2 : Derived2 ->function named() { return [d1, d2] } : () => (Derived1 | Derived2)[] ->named : () => (Derived1 | Derived2)[] ->[d1, d2] : (Derived1 | Derived2)[] ->d1 : Derived1 ->d2 : Derived2 - -var x279: { (): Base[]; } = function() { return [d1, d2] } || function() { return [d1, d2] }; ->x279 : () => Base[] ->Base : Base ->function() { return [d1, d2] } || function() { return [d1, d2] } : () => (Derived1 | Derived2)[] ->function() { return [d1, d2] } : () => (Derived1 | Derived2)[] ->[d1, d2] : (Derived1 | Derived2)[] ->d1 : Derived1 ->d2 : Derived2 ->function() { return [d1, d2] } : () => (Derived1 | Derived2)[] ->[d1, d2] : (Derived1 | Derived2)[] ->d1 : Derived1 ->d2 : Derived2 - -var x280: { (): Base[]; } = function named() { return [d1, d2] } || function named() { return [d1, d2] }; ->x280 : () => Base[] ->Base : Base ->function named() { return [d1, d2] } || function named() { return [d1, d2] } : () => (Derived1 | Derived2)[] ->function named() { return [d1, d2] } : () => (Derived1 | Derived2)[] ->named : () => (Derived1 | Derived2)[] ->[d1, d2] : (Derived1 | Derived2)[] ->d1 : Derived1 ->d2 : Derived2 ->function named() { return [d1, d2] } : () => (Derived1 | Derived2)[] ->named : () => (Derived1 | Derived2)[] ->[d1, d2] : (Derived1 | Derived2)[] ->d1 : Derived1 ->d2 : Derived2 - -var x281: Base[] = [d1, d2] || [d1, d2]; ->x281 : Base[] ->Base : Base ->[d1, d2] || [d1, d2] : (Derived1 | Derived2)[] ->[d1, d2] : (Derived1 | Derived2)[] ->d1 : Derived1 ->d2 : Derived2 ->[d1, d2] : (Derived1 | Derived2)[] ->d1 : Derived1 ->d2 : Derived2 - -var x282: Array = [d1, d2] || [d1, d2]; ->x282 : Base[] ->Array : T[] ->Base : Base ->[d1, d2] || [d1, d2] : (Derived1 | Derived2)[] ->[d1, d2] : (Derived1 | Derived2)[] ->d1 : Derived1 ->d2 : Derived2 ->[d1, d2] : (Derived1 | Derived2)[] ->d1 : Derived1 ->d2 : Derived2 - -var x283: { [n: number]: Base; } = [d1, d2] || [d1, d2]; ->x283 : { [n: number]: Base; } ->n : number ->Base : Base ->[d1, d2] || [d1, d2] : (Derived1 | Derived2)[] ->[d1, d2] : (Derived1 | Derived2)[] ->d1 : Derived1 ->d2 : Derived2 ->[d1, d2] : (Derived1 | Derived2)[] ->d1 : Derived1 ->d2 : Derived2 - -var x284: {n: Base[]; } = { n: [d1, d2] } || { n: [d1, d2] }; ->x284 : { n: Base[]; } ->n : Base[] ->Base : Base ->{ n: [d1, d2] } || { n: [d1, d2] } : { n: (Derived1 | Derived2)[]; } ->{ n: [d1, d2] } : { n: (Derived1 | Derived2)[]; } ->n : (Derived1 | Derived2)[] ->[d1, d2] : (Derived1 | Derived2)[] ->d1 : Derived1 ->d2 : Derived2 ->{ n: [d1, d2] } : { n: (Derived1 | Derived2)[]; } ->n : (Derived1 | Derived2)[] ->[d1, d2] : (Derived1 | Derived2)[] ->d1 : Derived1 ->d2 : Derived2 - -var x285: () => Base[] = true ? () => [d1, d2] : () => [d1, d2]; ->x285 : () => Base[] ->Base : Base ->true ? () => [d1, d2] : () => [d1, d2] : () => (Derived1 | Derived2)[] ->true : boolean ->() => [d1, d2] : () => (Derived1 | Derived2)[] ->[d1, d2] : (Derived1 | Derived2)[] ->d1 : Derived1 ->d2 : Derived2 ->() => [d1, d2] : () => (Derived1 | Derived2)[] ->[d1, d2] : (Derived1 | Derived2)[] ->d1 : Derived1 ->d2 : Derived2 - -var x286: () => Base[] = true ? function() { return [d1, d2] } : function() { return [d1, d2] }; ->x286 : () => Base[] ->Base : Base ->true ? function() { return [d1, d2] } : function() { return [d1, d2] } : () => (Derived1 | Derived2)[] ->true : boolean ->function() { return [d1, d2] } : () => (Derived1 | Derived2)[] ->[d1, d2] : (Derived1 | Derived2)[] ->d1 : Derived1 ->d2 : Derived2 ->function() { return [d1, d2] } : () => (Derived1 | Derived2)[] ->[d1, d2] : (Derived1 | Derived2)[] ->d1 : Derived1 ->d2 : Derived2 - -var x287: () => Base[] = true ? function named() { return [d1, d2] } : function named() { return [d1, d2] }; ->x287 : () => Base[] ->Base : Base ->true ? function named() { return [d1, d2] } : function named() { return [d1, d2] } : () => (Derived1 | Derived2)[] ->true : boolean ->function named() { return [d1, d2] } : () => (Derived1 | Derived2)[] ->named : () => (Derived1 | Derived2)[] ->[d1, d2] : (Derived1 | Derived2)[] ->d1 : Derived1 ->d2 : Derived2 ->function named() { return [d1, d2] } : () => (Derived1 | Derived2)[] ->named : () => (Derived1 | Derived2)[] ->[d1, d2] : (Derived1 | Derived2)[] ->d1 : Derived1 ->d2 : Derived2 - -var x288: { (): Base[]; } = true ? () => [d1, d2] : () => [d1, d2]; ->x288 : () => Base[] ->Base : Base ->true ? () => [d1, d2] : () => [d1, d2] : () => (Derived1 | Derived2)[] ->true : boolean ->() => [d1, d2] : () => (Derived1 | Derived2)[] ->[d1, d2] : (Derived1 | Derived2)[] ->d1 : Derived1 ->d2 : Derived2 ->() => [d1, d2] : () => (Derived1 | Derived2)[] ->[d1, d2] : (Derived1 | Derived2)[] ->d1 : Derived1 ->d2 : Derived2 - -var x289: { (): Base[]; } = true ? function() { return [d1, d2] } : function() { return [d1, d2] }; ->x289 : () => Base[] ->Base : Base ->true ? function() { return [d1, d2] } : function() { return [d1, d2] } : () => (Derived1 | Derived2)[] ->true : boolean ->function() { return [d1, d2] } : () => (Derived1 | Derived2)[] ->[d1, d2] : (Derived1 | Derived2)[] ->d1 : Derived1 ->d2 : Derived2 ->function() { return [d1, d2] } : () => (Derived1 | Derived2)[] ->[d1, d2] : (Derived1 | Derived2)[] ->d1 : Derived1 ->d2 : Derived2 - -var x290: { (): Base[]; } = true ? function named() { return [d1, d2] } : function named() { return [d1, d2] }; ->x290 : () => Base[] ->Base : Base ->true ? function named() { return [d1, d2] } : function named() { return [d1, d2] } : () => (Derived1 | Derived2)[] ->true : boolean ->function named() { return [d1, d2] } : () => (Derived1 | Derived2)[] ->named : () => (Derived1 | Derived2)[] ->[d1, d2] : (Derived1 | Derived2)[] ->d1 : Derived1 ->d2 : Derived2 ->function named() { return [d1, d2] } : () => (Derived1 | Derived2)[] ->named : () => (Derived1 | Derived2)[] ->[d1, d2] : (Derived1 | Derived2)[] ->d1 : Derived1 ->d2 : Derived2 - -var x291: Base[] = true ? [d1, d2] : [d1, d2]; ->x291 : Base[] ->Base : Base ->true ? [d1, d2] : [d1, d2] : (Derived1 | Derived2)[] ->true : boolean ->[d1, d2] : (Derived1 | Derived2)[] ->d1 : Derived1 ->d2 : Derived2 ->[d1, d2] : (Derived1 | Derived2)[] ->d1 : Derived1 ->d2 : Derived2 - -var x292: Array = true ? [d1, d2] : [d1, d2]; ->x292 : Base[] ->Array : T[] ->Base : Base ->true ? [d1, d2] : [d1, d2] : (Derived1 | Derived2)[] ->true : boolean ->[d1, d2] : (Derived1 | Derived2)[] ->d1 : Derived1 ->d2 : Derived2 ->[d1, d2] : (Derived1 | Derived2)[] ->d1 : Derived1 ->d2 : Derived2 - -var x293: { [n: number]: Base; } = true ? [d1, d2] : [d1, d2]; ->x293 : { [n: number]: Base; } ->n : number ->Base : Base ->true ? [d1, d2] : [d1, d2] : (Derived1 | Derived2)[] ->true : boolean ->[d1, d2] : (Derived1 | Derived2)[] ->d1 : Derived1 ->d2 : Derived2 ->[d1, d2] : (Derived1 | Derived2)[] ->d1 : Derived1 ->d2 : Derived2 - -var x294: {n: Base[]; } = true ? { n: [d1, d2] } : { n: [d1, d2] }; ->x294 : { n: Base[]; } ->n : Base[] ->Base : Base ->true ? { n: [d1, d2] } : { n: [d1, d2] } : { n: (Derived1 | Derived2)[]; } ->true : boolean ->{ n: [d1, d2] } : { n: (Derived1 | Derived2)[]; } ->n : (Derived1 | Derived2)[] ->[d1, d2] : (Derived1 | Derived2)[] ->d1 : Derived1 ->d2 : Derived2 ->{ n: [d1, d2] } : { n: (Derived1 | Derived2)[]; } ->n : (Derived1 | Derived2)[] ->[d1, d2] : (Derived1 | Derived2)[] ->d1 : Derived1 ->d2 : Derived2 - -var x295: (s: Base[]) => any = true ? n => { var n: Base[]; return null; } : n => { var n: Base[]; return null; }; ->x295 : (s: Base[]) => any ->s : Base[] ->Base : Base ->true ? n => { var n: Base[]; return null; } : n => { var n: Base[]; return null; } : (n: Base[]) => any ->true : boolean ->n => { var n: Base[]; return null; } : (n: Base[]) => any ->n : Base[] ->n : Base[] ->Base : Base ->null : null ->n => { var n: Base[]; return null; } : (n: Base[]) => any ->n : Base[] ->n : Base[] ->Base : Base ->null : null - -var x296: Genric = true ? { func: n => { return [d1, d2]; } } : { func: n => { return [d1, d2]; } }; ->x296 : Genric ->Genric : Genric ->Base : Base ->true ? { func: n => { return [d1, d2]; } } : { func: n => { return [d1, d2]; } } : { func: (n: Base[]) => (Derived1 | Derived2)[]; } ->true : boolean ->{ func: n => { return [d1, d2]; } } : { func: (n: Base[]) => (Derived1 | Derived2)[]; } ->func : (n: Base[]) => (Derived1 | Derived2)[] ->n => { return [d1, d2]; } : (n: Base[]) => (Derived1 | Derived2)[] ->n : Base[] ->[d1, d2] : (Derived1 | Derived2)[] ->d1 : Derived1 ->d2 : Derived2 ->{ func: n => { return [d1, d2]; } } : { func: (n: Base[]) => (Derived1 | Derived2)[]; } ->func : (n: Base[]) => (Derived1 | Derived2)[] ->n => { return [d1, d2]; } : (n: Base[]) => (Derived1 | Derived2)[] ->n : Base[] ->[d1, d2] : (Derived1 | Derived2)[] ->d1 : Derived1 ->d2 : Derived2 - -var x297: () => Base[] = true ? undefined : () => [d1, d2]; ->x297 : () => Base[] ->Base : Base ->true ? undefined : () => [d1, d2] : () => (Derived1 | Derived2)[] ->true : boolean ->undefined : undefined ->() => [d1, d2] : () => (Derived1 | Derived2)[] ->[d1, d2] : (Derived1 | Derived2)[] ->d1 : Derived1 ->d2 : Derived2 - -var x298: () => Base[] = true ? undefined : function() { return [d1, d2] }; ->x298 : () => Base[] ->Base : Base ->true ? undefined : function() { return [d1, d2] } : () => (Derived1 | Derived2)[] ->true : boolean ->undefined : undefined ->function() { return [d1, d2] } : () => (Derived1 | Derived2)[] ->[d1, d2] : (Derived1 | Derived2)[] ->d1 : Derived1 ->d2 : Derived2 - -var x299: () => Base[] = true ? undefined : function named() { return [d1, d2] }; ->x299 : () => Base[] ->Base : Base ->true ? undefined : function named() { return [d1, d2] } : () => (Derived1 | Derived2)[] ->true : boolean ->undefined : undefined ->function named() { return [d1, d2] } : () => (Derived1 | Derived2)[] ->named : () => (Derived1 | Derived2)[] ->[d1, d2] : (Derived1 | Derived2)[] ->d1 : Derived1 ->d2 : Derived2 - -var x300: { (): Base[]; } = true ? undefined : () => [d1, d2]; ->x300 : () => Base[] ->Base : Base ->true ? undefined : () => [d1, d2] : () => (Derived1 | Derived2)[] ->true : boolean ->undefined : undefined ->() => [d1, d2] : () => (Derived1 | Derived2)[] ->[d1, d2] : (Derived1 | Derived2)[] ->d1 : Derived1 ->d2 : Derived2 - -var x301: { (): Base[]; } = true ? undefined : function() { return [d1, d2] }; ->x301 : () => Base[] ->Base : Base ->true ? undefined : function() { return [d1, d2] } : () => (Derived1 | Derived2)[] ->true : boolean ->undefined : undefined ->function() { return [d1, d2] } : () => (Derived1 | Derived2)[] ->[d1, d2] : (Derived1 | Derived2)[] ->d1 : Derived1 ->d2 : Derived2 - -var x302: { (): Base[]; } = true ? undefined : function named() { return [d1, d2] }; ->x302 : () => Base[] ->Base : Base ->true ? undefined : function named() { return [d1, d2] } : () => (Derived1 | Derived2)[] ->true : boolean ->undefined : undefined ->function named() { return [d1, d2] } : () => (Derived1 | Derived2)[] ->named : () => (Derived1 | Derived2)[] ->[d1, d2] : (Derived1 | Derived2)[] ->d1 : Derived1 ->d2 : Derived2 - -var x303: Base[] = true ? undefined : [d1, d2]; ->x303 : Base[] ->Base : Base ->true ? undefined : [d1, d2] : (Derived1 | Derived2)[] ->true : boolean ->undefined : undefined ->[d1, d2] : (Derived1 | Derived2)[] ->d1 : Derived1 ->d2 : Derived2 - -var x304: Array = true ? undefined : [d1, d2]; ->x304 : Base[] ->Array : T[] ->Base : Base ->true ? undefined : [d1, d2] : (Derived1 | Derived2)[] ->true : boolean ->undefined : undefined ->[d1, d2] : (Derived1 | Derived2)[] ->d1 : Derived1 ->d2 : Derived2 - -var x305: { [n: number]: Base; } = true ? undefined : [d1, d2]; ->x305 : { [n: number]: Base; } ->n : number ->Base : Base ->true ? undefined : [d1, d2] : (Derived1 | Derived2)[] ->true : boolean ->undefined : undefined ->[d1, d2] : (Derived1 | Derived2)[] ->d1 : Derived1 ->d2 : Derived2 - -var x306: {n: Base[]; } = true ? undefined : { n: [d1, d2] }; ->x306 : { n: Base[]; } ->n : Base[] ->Base : Base ->true ? undefined : { n: [d1, d2] } : { n: (Derived1 | Derived2)[]; } ->true : boolean ->undefined : undefined ->{ n: [d1, d2] } : { n: (Derived1 | Derived2)[]; } ->n : (Derived1 | Derived2)[] ->[d1, d2] : (Derived1 | Derived2)[] ->d1 : Derived1 ->d2 : Derived2 - -var x307: (s: Base[]) => any = true ? undefined : n => { var n: Base[]; return null; }; ->x307 : (s: Base[]) => any ->s : Base[] ->Base : Base ->true ? undefined : n => { var n: Base[]; return null; } : (n: Base[]) => any ->true : boolean ->undefined : undefined ->n => { var n: Base[]; return null; } : (n: Base[]) => any ->n : Base[] ->n : Base[] ->Base : Base ->null : null - -var x308: Genric = true ? undefined : { func: n => { return [d1, d2]; } }; ->x308 : Genric ->Genric : Genric ->Base : Base ->true ? undefined : { func: n => { return [d1, d2]; } } : { func: (n: Base[]) => (Derived1 | Derived2)[]; } ->true : boolean ->undefined : undefined ->{ func: n => { return [d1, d2]; } } : { func: (n: Base[]) => (Derived1 | Derived2)[]; } ->func : (n: Base[]) => (Derived1 | Derived2)[] ->n => { return [d1, d2]; } : (n: Base[]) => (Derived1 | Derived2)[] ->n : Base[] ->[d1, d2] : (Derived1 | Derived2)[] ->d1 : Derived1 ->d2 : Derived2 - -var x309: () => Base[] = true ? () => [d1, d2] : undefined; ->x309 : () => Base[] ->Base : Base ->true ? () => [d1, d2] : undefined : () => (Derived1 | Derived2)[] ->true : boolean ->() => [d1, d2] : () => (Derived1 | Derived2)[] ->[d1, d2] : (Derived1 | Derived2)[] ->d1 : Derived1 ->d2 : Derived2 ->undefined : undefined - -var x310: () => Base[] = true ? function() { return [d1, d2] } : undefined; ->x310 : () => Base[] ->Base : Base ->true ? function() { return [d1, d2] } : undefined : () => (Derived1 | Derived2)[] ->true : boolean ->function() { return [d1, d2] } : () => (Derived1 | Derived2)[] ->[d1, d2] : (Derived1 | Derived2)[] ->d1 : Derived1 ->d2 : Derived2 ->undefined : undefined - -var x311: () => Base[] = true ? function named() { return [d1, d2] } : undefined; ->x311 : () => Base[] ->Base : Base ->true ? function named() { return [d1, d2] } : undefined : () => (Derived1 | Derived2)[] ->true : boolean ->function named() { return [d1, d2] } : () => (Derived1 | Derived2)[] ->named : () => (Derived1 | Derived2)[] ->[d1, d2] : (Derived1 | Derived2)[] ->d1 : Derived1 ->d2 : Derived2 ->undefined : undefined - -var x312: { (): Base[]; } = true ? () => [d1, d2] : undefined; ->x312 : () => Base[] ->Base : Base ->true ? () => [d1, d2] : undefined : () => (Derived1 | Derived2)[] ->true : boolean ->() => [d1, d2] : () => (Derived1 | Derived2)[] ->[d1, d2] : (Derived1 | Derived2)[] ->d1 : Derived1 ->d2 : Derived2 ->undefined : undefined - -var x313: { (): Base[]; } = true ? function() { return [d1, d2] } : undefined; ->x313 : () => Base[] ->Base : Base ->true ? function() { return [d1, d2] } : undefined : () => (Derived1 | Derived2)[] ->true : boolean ->function() { return [d1, d2] } : () => (Derived1 | Derived2)[] ->[d1, d2] : (Derived1 | Derived2)[] ->d1 : Derived1 ->d2 : Derived2 ->undefined : undefined - -var x314: { (): Base[]; } = true ? function named() { return [d1, d2] } : undefined; ->x314 : () => Base[] ->Base : Base ->true ? function named() { return [d1, d2] } : undefined : () => (Derived1 | Derived2)[] ->true : boolean ->function named() { return [d1, d2] } : () => (Derived1 | Derived2)[] ->named : () => (Derived1 | Derived2)[] ->[d1, d2] : (Derived1 | Derived2)[] ->d1 : Derived1 ->d2 : Derived2 ->undefined : undefined - -var x315: Base[] = true ? [d1, d2] : undefined; ->x315 : Base[] ->Base : Base ->true ? [d1, d2] : undefined : (Derived1 | Derived2)[] ->true : boolean ->[d1, d2] : (Derived1 | Derived2)[] ->d1 : Derived1 ->d2 : Derived2 ->undefined : undefined - -var x316: Array = true ? [d1, d2] : undefined; ->x316 : Base[] ->Array : T[] ->Base : Base ->true ? [d1, d2] : undefined : (Derived1 | Derived2)[] ->true : boolean ->[d1, d2] : (Derived1 | Derived2)[] ->d1 : Derived1 ->d2 : Derived2 ->undefined : undefined - -var x317: { [n: number]: Base; } = true ? [d1, d2] : undefined; ->x317 : { [n: number]: Base; } ->n : number ->Base : Base ->true ? [d1, d2] : undefined : (Derived1 | Derived2)[] ->true : boolean ->[d1, d2] : (Derived1 | Derived2)[] ->d1 : Derived1 ->d2 : Derived2 ->undefined : undefined - -var x318: {n: Base[]; } = true ? { n: [d1, d2] } : undefined; ->x318 : { n: Base[]; } ->n : Base[] ->Base : Base ->true ? { n: [d1, d2] } : undefined : { n: (Derived1 | Derived2)[]; } ->true : boolean ->{ n: [d1, d2] } : { n: (Derived1 | Derived2)[]; } ->n : (Derived1 | Derived2)[] ->[d1, d2] : (Derived1 | Derived2)[] ->d1 : Derived1 ->d2 : Derived2 ->undefined : undefined - -var x319: (s: Base[]) => any = true ? n => { var n: Base[]; return null; } : undefined; ->x319 : (s: Base[]) => any ->s : Base[] ->Base : Base ->true ? n => { var n: Base[]; return null; } : undefined : (n: Base[]) => any ->true : boolean ->n => { var n: Base[]; return null; } : (n: Base[]) => any ->n : Base[] ->n : Base[] ->Base : Base ->null : null ->undefined : undefined - -var x320: Genric = true ? { func: n => { return [d1, d2]; } } : undefined; ->x320 : Genric ->Genric : Genric ->Base : Base ->true ? { func: n => { return [d1, d2]; } } : undefined : { func: (n: Base[]) => (Derived1 | Derived2)[]; } ->true : boolean ->{ func: n => { return [d1, d2]; } } : { func: (n: Base[]) => (Derived1 | Derived2)[]; } ->func : (n: Base[]) => (Derived1 | Derived2)[] ->n => { return [d1, d2]; } : (n: Base[]) => (Derived1 | Derived2)[] ->n : Base[] ->[d1, d2] : (Derived1 | Derived2)[] ->d1 : Derived1 ->d2 : Derived2 ->undefined : undefined - -function x321(n: () => Base[]) { }; x321(() => [d1, d2]); ->x321 : (n: () => Base[]) => void ->n : () => Base[] ->Base : Base ->x321(() => [d1, d2]) : void ->x321 : (n: () => Base[]) => void ->() => [d1, d2] : () => (Derived1 | Derived2)[] ->[d1, d2] : (Derived1 | Derived2)[] ->d1 : Derived1 ->d2 : Derived2 - -function x322(n: () => Base[]) { }; x322(function() { return [d1, d2] }); ->x322 : (n: () => Base[]) => void ->n : () => Base[] ->Base : Base ->x322(function() { return [d1, d2] }) : void ->x322 : (n: () => Base[]) => void ->function() { return [d1, d2] } : () => (Derived1 | Derived2)[] ->[d1, d2] : (Derived1 | Derived2)[] ->d1 : Derived1 ->d2 : Derived2 - -function x323(n: () => Base[]) { }; x323(function named() { return [d1, d2] }); ->x323 : (n: () => Base[]) => void ->n : () => Base[] ->Base : Base ->x323(function named() { return [d1, d2] }) : void ->x323 : (n: () => Base[]) => void ->function named() { return [d1, d2] } : () => (Derived1 | Derived2)[] ->named : () => (Derived1 | Derived2)[] ->[d1, d2] : (Derived1 | Derived2)[] ->d1 : Derived1 ->d2 : Derived2 - -function x324(n: { (): Base[]; }) { }; x324(() => [d1, d2]); ->x324 : (n: () => Base[]) => void ->n : () => Base[] ->Base : Base ->x324(() => [d1, d2]) : void ->x324 : (n: () => Base[]) => void ->() => [d1, d2] : () => (Derived1 | Derived2)[] ->[d1, d2] : (Derived1 | Derived2)[] ->d1 : Derived1 ->d2 : Derived2 - -function x325(n: { (): Base[]; }) { }; x325(function() { return [d1, d2] }); ->x325 : (n: () => Base[]) => void ->n : () => Base[] ->Base : Base ->x325(function() { return [d1, d2] }) : void ->x325 : (n: () => Base[]) => void ->function() { return [d1, d2] } : () => (Derived1 | Derived2)[] ->[d1, d2] : (Derived1 | Derived2)[] ->d1 : Derived1 ->d2 : Derived2 - -function x326(n: { (): Base[]; }) { }; x326(function named() { return [d1, d2] }); ->x326 : (n: () => Base[]) => void ->n : () => Base[] ->Base : Base ->x326(function named() { return [d1, d2] }) : void ->x326 : (n: () => Base[]) => void ->function named() { return [d1, d2] } : () => (Derived1 | Derived2)[] ->named : () => (Derived1 | Derived2)[] ->[d1, d2] : (Derived1 | Derived2)[] ->d1 : Derived1 ->d2 : Derived2 - -function x327(n: Base[]) { }; x327([d1, d2]); ->x327 : (n: Base[]) => void ->n : Base[] ->Base : Base ->x327([d1, d2]) : void ->x327 : (n: Base[]) => void ->[d1, d2] : (Derived1 | Derived2)[] ->d1 : Derived1 ->d2 : Derived2 - -function x328(n: Array) { }; x328([d1, d2]); ->x328 : (n: Base[]) => void ->n : Base[] ->Array : T[] ->Base : Base ->x328([d1, d2]) : void ->x328 : (n: Base[]) => void ->[d1, d2] : (Derived1 | Derived2)[] ->d1 : Derived1 ->d2 : Derived2 - -function x329(n: { [n: number]: Base; }) { }; x329([d1, d2]); ->x329 : (n: { [n: number]: Base; }) => void ->n : { [n: number]: Base; } ->n : number ->Base : Base ->x329([d1, d2]) : void ->x329 : (n: { [n: number]: Base; }) => void ->[d1, d2] : (Derived1 | Derived2)[] ->d1 : Derived1 ->d2 : Derived2 - -function x330(n: {n: Base[]; } ) { }; x330({ n: [d1, d2] }); ->x330 : (n: { n: Base[]; }) => void ->n : { n: Base[]; } ->n : Base[] ->Base : Base ->x330({ n: [d1, d2] }) : void ->x330 : (n: { n: Base[]; }) => void ->{ n: [d1, d2] } : { n: (Derived1 | Derived2)[]; } ->n : (Derived1 | Derived2)[] ->[d1, d2] : (Derived1 | Derived2)[] ->d1 : Derived1 ->d2 : Derived2 - -function x331(n: (s: Base[]) => any) { }; x331(n => { var n: Base[]; return null; }); ->x331 : (n: (s: Base[]) => any) => void ->n : (s: Base[]) => any ->s : Base[] ->Base : Base ->x331(n => { var n: Base[]; return null; }) : void ->x331 : (n: (s: Base[]) => any) => void ->n => { var n: Base[]; return null; } : (n: Base[]) => any ->n : Base[] ->n : Base[] ->Base : Base ->null : null - -function x332(n: Genric) { }; x332({ func: n => { return [d1, d2]; } }); ->x332 : (n: Genric) => void ->n : Genric ->Genric : Genric ->Base : Base ->x332({ func: n => { return [d1, d2]; } }) : void ->x332 : (n: Genric) => void ->{ func: n => { return [d1, d2]; } } : { func: (n: Base[]) => (Derived1 | Derived2)[]; } ->func : (n: Base[]) => (Derived1 | Derived2)[] ->n => { return [d1, d2]; } : (n: Base[]) => (Derived1 | Derived2)[] ->n : Base[] ->[d1, d2] : (Derived1 | Derived2)[] ->d1 : Derived1 ->d2 : Derived2 - -var x333 = (n: () => Base[]) => n; x333(() => [d1, d2]); ->x333 : (n: () => Base[]) => () => Base[] ->(n: () => Base[]) => n : (n: () => Base[]) => () => Base[] ->n : () => Base[] ->Base : Base ->n : () => Base[] ->x333(() => [d1, d2]) : () => Base[] ->x333 : (n: () => Base[]) => () => Base[] ->() => [d1, d2] : () => (Derived1 | Derived2)[] ->[d1, d2] : (Derived1 | Derived2)[] ->d1 : Derived1 ->d2 : Derived2 - -var x334 = (n: () => Base[]) => n; x334(function() { return [d1, d2] }); ->x334 : (n: () => Base[]) => () => Base[] ->(n: () => Base[]) => n : (n: () => Base[]) => () => Base[] ->n : () => Base[] ->Base : Base ->n : () => Base[] ->x334(function() { return [d1, d2] }) : () => Base[] ->x334 : (n: () => Base[]) => () => Base[] ->function() { return [d1, d2] } : () => (Derived1 | Derived2)[] ->[d1, d2] : (Derived1 | Derived2)[] ->d1 : Derived1 ->d2 : Derived2 - -var x335 = (n: () => Base[]) => n; x335(function named() { return [d1, d2] }); ->x335 : (n: () => Base[]) => () => Base[] ->(n: () => Base[]) => n : (n: () => Base[]) => () => Base[] ->n : () => Base[] ->Base : Base ->n : () => Base[] ->x335(function named() { return [d1, d2] }) : () => Base[] ->x335 : (n: () => Base[]) => () => Base[] ->function named() { return [d1, d2] } : () => (Derived1 | Derived2)[] ->named : () => (Derived1 | Derived2)[] ->[d1, d2] : (Derived1 | Derived2)[] ->d1 : Derived1 ->d2 : Derived2 - -var x336 = (n: { (): Base[]; }) => n; x336(() => [d1, d2]); ->x336 : (n: () => Base[]) => () => Base[] ->(n: { (): Base[]; }) => n : (n: () => Base[]) => () => Base[] ->n : () => Base[] ->Base : Base ->n : () => Base[] ->x336(() => [d1, d2]) : () => Base[] ->x336 : (n: () => Base[]) => () => Base[] ->() => [d1, d2] : () => (Derived1 | Derived2)[] ->[d1, d2] : (Derived1 | Derived2)[] ->d1 : Derived1 ->d2 : Derived2 - -var x337 = (n: { (): Base[]; }) => n; x337(function() { return [d1, d2] }); ->x337 : (n: () => Base[]) => () => Base[] ->(n: { (): Base[]; }) => n : (n: () => Base[]) => () => Base[] ->n : () => Base[] ->Base : Base ->n : () => Base[] ->x337(function() { return [d1, d2] }) : () => Base[] ->x337 : (n: () => Base[]) => () => Base[] ->function() { return [d1, d2] } : () => (Derived1 | Derived2)[] ->[d1, d2] : (Derived1 | Derived2)[] ->d1 : Derived1 ->d2 : Derived2 - -var x338 = (n: { (): Base[]; }) => n; x338(function named() { return [d1, d2] }); ->x338 : (n: () => Base[]) => () => Base[] ->(n: { (): Base[]; }) => n : (n: () => Base[]) => () => Base[] ->n : () => Base[] ->Base : Base ->n : () => Base[] ->x338(function named() { return [d1, d2] }) : () => Base[] ->x338 : (n: () => Base[]) => () => Base[] ->function named() { return [d1, d2] } : () => (Derived1 | Derived2)[] ->named : () => (Derived1 | Derived2)[] ->[d1, d2] : (Derived1 | Derived2)[] ->d1 : Derived1 ->d2 : Derived2 - -var x339 = (n: Base[]) => n; x339([d1, d2]); ->x339 : (n: Base[]) => Base[] ->(n: Base[]) => n : (n: Base[]) => Base[] ->n : Base[] ->Base : Base ->n : Base[] ->x339([d1, d2]) : Base[] ->x339 : (n: Base[]) => Base[] ->[d1, d2] : (Derived1 | Derived2)[] ->d1 : Derived1 ->d2 : Derived2 - -var x340 = (n: Array) => n; x340([d1, d2]); ->x340 : (n: Base[]) => Base[] ->(n: Array) => n : (n: Base[]) => Base[] ->n : Base[] ->Array : T[] ->Base : Base ->n : Base[] ->x340([d1, d2]) : Base[] ->x340 : (n: Base[]) => Base[] ->[d1, d2] : (Derived1 | Derived2)[] ->d1 : Derived1 ->d2 : Derived2 - -var x341 = (n: { [n: number]: Base; }) => n; x341([d1, d2]); ->x341 : (n: { [n: number]: Base; }) => { [n: number]: Base; } ->(n: { [n: number]: Base; }) => n : (n: { [n: number]: Base; }) => { [n: number]: Base; } ->n : { [n: number]: Base; } ->n : number ->Base : Base ->n : { [n: number]: Base; } ->x341([d1, d2]) : { [n: number]: Base; } ->x341 : (n: { [n: number]: Base; }) => { [n: number]: Base; } ->[d1, d2] : (Derived1 | Derived2)[] ->d1 : Derived1 ->d2 : Derived2 - -var x342 = (n: {n: Base[]; } ) => n; x342({ n: [d1, d2] }); ->x342 : (n: { n: Base[]; }) => { n: Base[]; } ->(n: {n: Base[]; } ) => n : (n: { n: Base[]; }) => { n: Base[]; } ->n : { n: Base[]; } ->n : Base[] ->Base : Base ->n : { n: Base[]; } ->x342({ n: [d1, d2] }) : { n: Base[]; } ->x342 : (n: { n: Base[]; }) => { n: Base[]; } ->{ n: [d1, d2] } : { n: (Derived1 | Derived2)[]; } ->n : (Derived1 | Derived2)[] ->[d1, d2] : (Derived1 | Derived2)[] ->d1 : Derived1 ->d2 : Derived2 - -var x343 = (n: (s: Base[]) => any) => n; x343(n => { var n: Base[]; return null; }); ->x343 : (n: (s: Base[]) => any) => (s: Base[]) => any ->(n: (s: Base[]) => any) => n : (n: (s: Base[]) => any) => (s: Base[]) => any ->n : (s: Base[]) => any ->s : Base[] ->Base : Base ->n : (s: Base[]) => any ->x343(n => { var n: Base[]; return null; }) : (s: Base[]) => any ->x343 : (n: (s: Base[]) => any) => (s: Base[]) => any ->n => { var n: Base[]; return null; } : (n: Base[]) => any ->n : Base[] ->n : Base[] ->Base : Base ->null : null - -var x344 = (n: Genric) => n; x344({ func: n => { return [d1, d2]; } }); ->x344 : (n: Genric) => Genric ->(n: Genric) => n : (n: Genric) => Genric ->n : Genric ->Genric : Genric ->Base : Base ->n : Genric ->x344({ func: n => { return [d1, d2]; } }) : Genric ->x344 : (n: Genric) => Genric ->{ func: n => { return [d1, d2]; } } : { func: (n: Base[]) => (Derived1 | Derived2)[]; } ->func : (n: Base[]) => (Derived1 | Derived2)[] ->n => { return [d1, d2]; } : (n: Base[]) => (Derived1 | Derived2)[] ->n : Base[] ->[d1, d2] : (Derived1 | Derived2)[] ->d1 : Derived1 ->d2 : Derived2 - -var x345 = function(n: () => Base[]) { }; x345(() => [d1, d2]); ->x345 : (n: () => Base[]) => void ->function(n: () => Base[]) { } : (n: () => Base[]) => void ->n : () => Base[] ->Base : Base ->x345(() => [d1, d2]) : void ->x345 : (n: () => Base[]) => void ->() => [d1, d2] : () => (Derived1 | Derived2)[] ->[d1, d2] : (Derived1 | Derived2)[] ->d1 : Derived1 ->d2 : Derived2 - -var x346 = function(n: () => Base[]) { }; x346(function() { return [d1, d2] }); ->x346 : (n: () => Base[]) => void ->function(n: () => Base[]) { } : (n: () => Base[]) => void ->n : () => Base[] ->Base : Base ->x346(function() { return [d1, d2] }) : void ->x346 : (n: () => Base[]) => void ->function() { return [d1, d2] } : () => (Derived1 | Derived2)[] ->[d1, d2] : (Derived1 | Derived2)[] ->d1 : Derived1 ->d2 : Derived2 - -var x347 = function(n: () => Base[]) { }; x347(function named() { return [d1, d2] }); ->x347 : (n: () => Base[]) => void ->function(n: () => Base[]) { } : (n: () => Base[]) => void ->n : () => Base[] ->Base : Base ->x347(function named() { return [d1, d2] }) : void ->x347 : (n: () => Base[]) => void ->function named() { return [d1, d2] } : () => (Derived1 | Derived2)[] ->named : () => (Derived1 | Derived2)[] ->[d1, d2] : (Derived1 | Derived2)[] ->d1 : Derived1 ->d2 : Derived2 - -var x348 = function(n: { (): Base[]; }) { }; x348(() => [d1, d2]); ->x348 : (n: () => Base[]) => void ->function(n: { (): Base[]; }) { } : (n: () => Base[]) => void ->n : () => Base[] ->Base : Base ->x348(() => [d1, d2]) : void ->x348 : (n: () => Base[]) => void ->() => [d1, d2] : () => (Derived1 | Derived2)[] ->[d1, d2] : (Derived1 | Derived2)[] ->d1 : Derived1 ->d2 : Derived2 - -var x349 = function(n: { (): Base[]; }) { }; x349(function() { return [d1, d2] }); ->x349 : (n: () => Base[]) => void ->function(n: { (): Base[]; }) { } : (n: () => Base[]) => void ->n : () => Base[] ->Base : Base ->x349(function() { return [d1, d2] }) : void ->x349 : (n: () => Base[]) => void ->function() { return [d1, d2] } : () => (Derived1 | Derived2)[] ->[d1, d2] : (Derived1 | Derived2)[] ->d1 : Derived1 ->d2 : Derived2 - -var x350 = function(n: { (): Base[]; }) { }; x350(function named() { return [d1, d2] }); ->x350 : (n: () => Base[]) => void ->function(n: { (): Base[]; }) { } : (n: () => Base[]) => void ->n : () => Base[] ->Base : Base ->x350(function named() { return [d1, d2] }) : void ->x350 : (n: () => Base[]) => void ->function named() { return [d1, d2] } : () => (Derived1 | Derived2)[] ->named : () => (Derived1 | Derived2)[] ->[d1, d2] : (Derived1 | Derived2)[] ->d1 : Derived1 ->d2 : Derived2 - -var x351 = function(n: Base[]) { }; x351([d1, d2]); ->x351 : (n: Base[]) => void ->function(n: Base[]) { } : (n: Base[]) => void ->n : Base[] ->Base : Base ->x351([d1, d2]) : void ->x351 : (n: Base[]) => void ->[d1, d2] : (Derived1 | Derived2)[] ->d1 : Derived1 ->d2 : Derived2 - -var x352 = function(n: Array) { }; x352([d1, d2]); ->x352 : (n: Base[]) => void ->function(n: Array) { } : (n: Base[]) => void ->n : Base[] ->Array : T[] ->Base : Base ->x352([d1, d2]) : void ->x352 : (n: Base[]) => void ->[d1, d2] : (Derived1 | Derived2)[] ->d1 : Derived1 ->d2 : Derived2 - -var x353 = function(n: { [n: number]: Base; }) { }; x353([d1, d2]); ->x353 : (n: { [n: number]: Base; }) => void ->function(n: { [n: number]: Base; }) { } : (n: { [n: number]: Base; }) => void ->n : { [n: number]: Base; } ->n : number ->Base : Base ->x353([d1, d2]) : void ->x353 : (n: { [n: number]: Base; }) => void ->[d1, d2] : (Derived1 | Derived2)[] ->d1 : Derived1 ->d2 : Derived2 - -var x354 = function(n: {n: Base[]; } ) { }; x354({ n: [d1, d2] }); ->x354 : (n: { n: Base[]; }) => void ->function(n: {n: Base[]; } ) { } : (n: { n: Base[]; }) => void ->n : { n: Base[]; } ->n : Base[] ->Base : Base ->x354({ n: [d1, d2] }) : void ->x354 : (n: { n: Base[]; }) => void ->{ n: [d1, d2] } : { n: (Derived1 | Derived2)[]; } ->n : (Derived1 | Derived2)[] ->[d1, d2] : (Derived1 | Derived2)[] ->d1 : Derived1 ->d2 : Derived2 - -var x355 = function(n: (s: Base[]) => any) { }; x355(n => { var n: Base[]; return null; }); ->x355 : (n: (s: Base[]) => any) => void ->function(n: (s: Base[]) => any) { } : (n: (s: Base[]) => any) => void ->n : (s: Base[]) => any ->s : Base[] ->Base : Base ->x355(n => { var n: Base[]; return null; }) : void ->x355 : (n: (s: Base[]) => any) => void ->n => { var n: Base[]; return null; } : (n: Base[]) => any ->n : Base[] ->n : Base[] ->Base : Base ->null : null - -var x356 = function(n: Genric) { }; x356({ func: n => { return [d1, d2]; } }); ->x356 : (n: Genric) => void ->function(n: Genric) { } : (n: Genric) => void ->n : Genric ->Genric : Genric ->Base : Base ->x356({ func: n => { return [d1, d2]; } }) : void ->x356 : (n: Genric) => void ->{ func: n => { return [d1, d2]; } } : { func: (n: Base[]) => (Derived1 | Derived2)[]; } ->func : (n: Base[]) => (Derived1 | Derived2)[] ->n => { return [d1, d2]; } : (n: Base[]) => (Derived1 | Derived2)[] ->n : Base[] ->[d1, d2] : (Derived1 | Derived2)[] ->d1 : Derived1 ->d2 : Derived2 - diff --git a/tests/baselines/reference/ifDoWhileStatements.errors.txt b/tests/baselines/reference/ifDoWhileStatements.errors.txt new file mode 100644 index 00000000000..fb8985e634b --- /dev/null +++ b/tests/baselines/reference/ifDoWhileStatements.errors.txt @@ -0,0 +1,168 @@ +tests/cases/conformance/statements/ifDoWhileStatements/ifDoWhileStatements.ts(42,1): error TS7027: Unreachable code detected. + + +==== tests/cases/conformance/statements/ifDoWhileStatements/ifDoWhileStatements.ts (1 errors) ==== + interface I { + id: number; + } + + class C implements I { + id: number; + name: string; + } + + class C2 extends C { + valid: boolean; + } + + class D{ + source: T; + recurse: D; + wrapped: D> + } + + function F(x: string): number { return 42; } + function F2(x: number): boolean { return x < 42; } + + module M { + export class A { + name: string; + } + + export function F2(x: number): string { return x.toString(); } + } + + module N { + export class A { + id: number; + } + + export function F2(x: number): string { return x.toString(); } + } + + // literals + if (true) { } + while (true) { } + do { }while(true) + ~~ +!!! error TS7027: Unreachable code detected. + + if (null) { } + while (null) { } + do { }while(null) + + if (undefined) { } + while (undefined) { } + do { }while(undefined) + + if (0.0) { } + while (0.0) { } + do { }while(0.0) + + if ('a string') { } + while ('a string') { } + do { }while('a string') + + if ('') { } + while ('') { } + do { }while('') + + if (/[a-z]/) { } + while (/[a-z]/) { } + do { }while(/[a-z]/) + + if ([]) { } + while ([]) { } + do { }while([]) + + if ([1, 2]) { } + while ([1, 2]) { } + do { }while([1, 2]) + + if ({}) { } + while ({}) { } + do { }while({}) + + if ({ x: 1, y: 'a' }) { } + while ({ x: 1, y: 'a' }) { } + do { }while({ x: 1, y: 'a' }) + + if (() => 43) { } + while (() => 43) { } + do { }while(() => 43) + + if (new C()) { } + while (new C()) { } + do { }while(new C()) + + if (new D()) { } + while (new D()) { } + do { }while(new D()) + + // references + var a = true; + if (a) { } + while (a) { } + do { }while(a) + + var b = null; + if (b) { } + while (b) { } + do { }while(b) + + var c = undefined; + if (c) { } + while (c) { } + do { }while(c) + + var d = 0.0; + if (d) { } + while (d) { } + do { }while(d) + + var e = 'a string'; + if (e) { } + while (e) { } + do { }while(e) + + var f = ''; + if (f) { } + while (f) { } + do { }while(f) + + var g = /[a-z]/ + if (g) { } + while (g) { } + do { }while(g) + + var h = []; + if (h) { } + while (h) { } + do { }while(h) + + var i = [1, 2]; + if (i) { } + while (i) { } + do { }while(i) + + var j = {}; + if (j) { } + while (j) { } + do { }while(j) + + var k = { x: 1, y: 'a' }; + if (k) { } + while (k) { } + do { }while(k) + + function fn(x?: string): I { return null; } + if (fn()) { } + while (fn()) { } + do { }while(fn()) + + if (fn) { } + while (fn) { } + do { }while(fn) + + + \ No newline at end of file diff --git a/tests/baselines/reference/ifDoWhileStatements.symbols b/tests/baselines/reference/ifDoWhileStatements.symbols deleted file mode 100644 index 36a990010ef..00000000000 --- a/tests/baselines/reference/ifDoWhileStatements.symbols +++ /dev/null @@ -1,336 +0,0 @@ -=== tests/cases/conformance/statements/ifDoWhileStatements/ifDoWhileStatements.ts === -interface I { ->I : Symbol(I, Decl(ifDoWhileStatements.ts, 0, 0)) - - id: number; ->id : Symbol(id, Decl(ifDoWhileStatements.ts, 0, 13)) -} - -class C implements I { ->C : Symbol(C, Decl(ifDoWhileStatements.ts, 2, 1)) ->I : Symbol(I, Decl(ifDoWhileStatements.ts, 0, 0)) - - id: number; ->id : Symbol(id, Decl(ifDoWhileStatements.ts, 4, 22)) - - name: string; ->name : Symbol(name, Decl(ifDoWhileStatements.ts, 5, 15)) -} - -class C2 extends C { ->C2 : Symbol(C2, Decl(ifDoWhileStatements.ts, 7, 1)) ->C : Symbol(C, Decl(ifDoWhileStatements.ts, 2, 1)) - - valid: boolean; ->valid : Symbol(valid, Decl(ifDoWhileStatements.ts, 9, 20)) -} - -class D{ ->D : Symbol(D, Decl(ifDoWhileStatements.ts, 11, 1)) ->T : Symbol(T, Decl(ifDoWhileStatements.ts, 13, 8)) - - source: T; ->source : Symbol(source, Decl(ifDoWhileStatements.ts, 13, 11)) ->T : Symbol(T, Decl(ifDoWhileStatements.ts, 13, 8)) - - recurse: D; ->recurse : Symbol(recurse, Decl(ifDoWhileStatements.ts, 14, 14)) ->D : Symbol(D, Decl(ifDoWhileStatements.ts, 11, 1)) ->T : Symbol(T, Decl(ifDoWhileStatements.ts, 13, 8)) - - wrapped: D> ->wrapped : Symbol(wrapped, Decl(ifDoWhileStatements.ts, 15, 18)) ->D : Symbol(D, Decl(ifDoWhileStatements.ts, 11, 1)) ->D : Symbol(D, Decl(ifDoWhileStatements.ts, 11, 1)) ->T : Symbol(T, Decl(ifDoWhileStatements.ts, 13, 8)) -} - -function F(x: string): number { return 42; } ->F : Symbol(F, Decl(ifDoWhileStatements.ts, 17, 1)) ->x : Symbol(x, Decl(ifDoWhileStatements.ts, 19, 11)) - -function F2(x: number): boolean { return x < 42; } ->F2 : Symbol(F2, Decl(ifDoWhileStatements.ts, 19, 44)) ->x : Symbol(x, Decl(ifDoWhileStatements.ts, 20, 12)) ->x : Symbol(x, Decl(ifDoWhileStatements.ts, 20, 12)) - -module M { ->M : Symbol(M, Decl(ifDoWhileStatements.ts, 20, 50)) - - export class A { ->A : Symbol(A, Decl(ifDoWhileStatements.ts, 22, 10)) - - name: string; ->name : Symbol(name, Decl(ifDoWhileStatements.ts, 23, 20)) - } - - export function F2(x: number): string { return x.toString(); } ->F2 : Symbol(F2, Decl(ifDoWhileStatements.ts, 25, 5)) ->x : Symbol(x, Decl(ifDoWhileStatements.ts, 27, 23)) ->x.toString : Symbol(Number.toString, Decl(lib.d.ts, 458, 18)) ->x : Symbol(x, Decl(ifDoWhileStatements.ts, 27, 23)) ->toString : Symbol(Number.toString, Decl(lib.d.ts, 458, 18)) -} - -module N { ->N : Symbol(N, Decl(ifDoWhileStatements.ts, 28, 1)) - - export class A { ->A : Symbol(A, Decl(ifDoWhileStatements.ts, 30, 10)) - - id: number; ->id : Symbol(id, Decl(ifDoWhileStatements.ts, 31, 20)) - } - - export function F2(x: number): string { return x.toString(); } ->F2 : Symbol(F2, Decl(ifDoWhileStatements.ts, 33, 5)) ->x : Symbol(x, Decl(ifDoWhileStatements.ts, 35, 23)) ->x.toString : Symbol(Number.toString, Decl(lib.d.ts, 458, 18)) ->x : Symbol(x, Decl(ifDoWhileStatements.ts, 35, 23)) ->toString : Symbol(Number.toString, Decl(lib.d.ts, 458, 18)) -} - -// literals -if (true) { } -while (true) { } -do { }while(true) - -if (null) { } -while (null) { } -do { }while(null) - -if (undefined) { } ->undefined : Symbol(undefined) - -while (undefined) { } ->undefined : Symbol(undefined) - -do { }while(undefined) ->undefined : Symbol(undefined) - -if (0.0) { } -while (0.0) { } -do { }while(0.0) - -if ('a string') { } -while ('a string') { } -do { }while('a string') - -if ('') { } -while ('') { } -do { }while('') - -if (/[a-z]/) { } -while (/[a-z]/) { } -do { }while(/[a-z]/) - -if ([]) { } -while ([]) { } -do { }while([]) - -if ([1, 2]) { } -while ([1, 2]) { } -do { }while([1, 2]) - -if ({}) { } -while ({}) { } -do { }while({}) - -if ({ x: 1, y: 'a' }) { } ->x : Symbol(x, Decl(ifDoWhileStatements.ts, 79, 5)) ->y : Symbol(y, Decl(ifDoWhileStatements.ts, 79, 11)) - -while ({ x: 1, y: 'a' }) { } ->x : Symbol(x, Decl(ifDoWhileStatements.ts, 80, 8)) ->y : Symbol(y, Decl(ifDoWhileStatements.ts, 80, 14)) - -do { }while({ x: 1, y: 'a' }) ->x : Symbol(x, Decl(ifDoWhileStatements.ts, 81, 13)) ->y : Symbol(y, Decl(ifDoWhileStatements.ts, 81, 19)) - -if (() => 43) { } -while (() => 43) { } -do { }while(() => 43) - -if (new C()) { } ->C : Symbol(C, Decl(ifDoWhileStatements.ts, 2, 1)) - -while (new C()) { } ->C : Symbol(C, Decl(ifDoWhileStatements.ts, 2, 1)) - -do { }while(new C()) ->C : Symbol(C, Decl(ifDoWhileStatements.ts, 2, 1)) - -if (new D()) { } ->D : Symbol(D, Decl(ifDoWhileStatements.ts, 11, 1)) ->C : Symbol(C, Decl(ifDoWhileStatements.ts, 2, 1)) - -while (new D()) { } ->D : Symbol(D, Decl(ifDoWhileStatements.ts, 11, 1)) ->C : Symbol(C, Decl(ifDoWhileStatements.ts, 2, 1)) - -do { }while(new D()) ->D : Symbol(D, Decl(ifDoWhileStatements.ts, 11, 1)) ->C : Symbol(C, Decl(ifDoWhileStatements.ts, 2, 1)) - -// references -var a = true; ->a : Symbol(a, Decl(ifDoWhileStatements.ts, 96, 3)) - -if (a) { } ->a : Symbol(a, Decl(ifDoWhileStatements.ts, 96, 3)) - -while (a) { } ->a : Symbol(a, Decl(ifDoWhileStatements.ts, 96, 3)) - -do { }while(a) ->a : Symbol(a, Decl(ifDoWhileStatements.ts, 96, 3)) - -var b = null; ->b : Symbol(b, Decl(ifDoWhileStatements.ts, 101, 3)) - -if (b) { } ->b : Symbol(b, Decl(ifDoWhileStatements.ts, 101, 3)) - -while (b) { } ->b : Symbol(b, Decl(ifDoWhileStatements.ts, 101, 3)) - -do { }while(b) ->b : Symbol(b, Decl(ifDoWhileStatements.ts, 101, 3)) - -var c = undefined; ->c : Symbol(c, Decl(ifDoWhileStatements.ts, 106, 3)) ->undefined : Symbol(undefined) - -if (c) { } ->c : Symbol(c, Decl(ifDoWhileStatements.ts, 106, 3)) - -while (c) { } ->c : Symbol(c, Decl(ifDoWhileStatements.ts, 106, 3)) - -do { }while(c) ->c : Symbol(c, Decl(ifDoWhileStatements.ts, 106, 3)) - -var d = 0.0; ->d : Symbol(d, Decl(ifDoWhileStatements.ts, 111, 3)) - -if (d) { } ->d : Symbol(d, Decl(ifDoWhileStatements.ts, 111, 3)) - -while (d) { } ->d : Symbol(d, Decl(ifDoWhileStatements.ts, 111, 3)) - -do { }while(d) ->d : Symbol(d, Decl(ifDoWhileStatements.ts, 111, 3)) - -var e = 'a string'; ->e : Symbol(e, Decl(ifDoWhileStatements.ts, 116, 3)) - -if (e) { } ->e : Symbol(e, Decl(ifDoWhileStatements.ts, 116, 3)) - -while (e) { } ->e : Symbol(e, Decl(ifDoWhileStatements.ts, 116, 3)) - -do { }while(e) ->e : Symbol(e, Decl(ifDoWhileStatements.ts, 116, 3)) - -var f = ''; ->f : Symbol(f, Decl(ifDoWhileStatements.ts, 121, 3)) - -if (f) { } ->f : Symbol(f, Decl(ifDoWhileStatements.ts, 121, 3)) - -while (f) { } ->f : Symbol(f, Decl(ifDoWhileStatements.ts, 121, 3)) - -do { }while(f) ->f : Symbol(f, Decl(ifDoWhileStatements.ts, 121, 3)) - -var g = /[a-z]/ ->g : Symbol(g, Decl(ifDoWhileStatements.ts, 126, 3)) - -if (g) { } ->g : Symbol(g, Decl(ifDoWhileStatements.ts, 126, 3)) - -while (g) { } ->g : Symbol(g, Decl(ifDoWhileStatements.ts, 126, 3)) - -do { }while(g) ->g : Symbol(g, Decl(ifDoWhileStatements.ts, 126, 3)) - -var h = []; ->h : Symbol(h, Decl(ifDoWhileStatements.ts, 131, 3)) - -if (h) { } ->h : Symbol(h, Decl(ifDoWhileStatements.ts, 131, 3)) - -while (h) { } ->h : Symbol(h, Decl(ifDoWhileStatements.ts, 131, 3)) - -do { }while(h) ->h : Symbol(h, Decl(ifDoWhileStatements.ts, 131, 3)) - -var i = [1, 2]; ->i : Symbol(i, Decl(ifDoWhileStatements.ts, 136, 3)) - -if (i) { } ->i : Symbol(i, Decl(ifDoWhileStatements.ts, 136, 3)) - -while (i) { } ->i : Symbol(i, Decl(ifDoWhileStatements.ts, 136, 3)) - -do { }while(i) ->i : Symbol(i, Decl(ifDoWhileStatements.ts, 136, 3)) - -var j = {}; ->j : Symbol(j, Decl(ifDoWhileStatements.ts, 141, 3)) - -if (j) { } ->j : Symbol(j, Decl(ifDoWhileStatements.ts, 141, 3)) - -while (j) { } ->j : Symbol(j, Decl(ifDoWhileStatements.ts, 141, 3)) - -do { }while(j) ->j : Symbol(j, Decl(ifDoWhileStatements.ts, 141, 3)) - -var k = { x: 1, y: 'a' }; ->k : Symbol(k, Decl(ifDoWhileStatements.ts, 146, 3)) ->x : Symbol(x, Decl(ifDoWhileStatements.ts, 146, 9)) ->y : Symbol(y, Decl(ifDoWhileStatements.ts, 146, 15)) - -if (k) { } ->k : Symbol(k, Decl(ifDoWhileStatements.ts, 146, 3)) - -while (k) { } ->k : Symbol(k, Decl(ifDoWhileStatements.ts, 146, 3)) - -do { }while(k) ->k : Symbol(k, Decl(ifDoWhileStatements.ts, 146, 3)) - -function fn(x?: string): I { return null; } ->fn : Symbol(fn, Decl(ifDoWhileStatements.ts, 149, 14)) ->x : Symbol(x, Decl(ifDoWhileStatements.ts, 151, 12)) ->I : Symbol(I, Decl(ifDoWhileStatements.ts, 0, 0)) - -if (fn()) { } ->fn : Symbol(fn, Decl(ifDoWhileStatements.ts, 149, 14)) - -while (fn()) { } ->fn : Symbol(fn, Decl(ifDoWhileStatements.ts, 149, 14)) - -do { }while(fn()) ->fn : Symbol(fn, Decl(ifDoWhileStatements.ts, 149, 14)) - -if (fn) { } ->fn : Symbol(fn, Decl(ifDoWhileStatements.ts, 149, 14)) - -while (fn) { } ->fn : Symbol(fn, Decl(ifDoWhileStatements.ts, 149, 14)) - -do { }while(fn) ->fn : Symbol(fn, Decl(ifDoWhileStatements.ts, 149, 14)) - - - diff --git a/tests/baselines/reference/ifDoWhileStatements.types b/tests/baselines/reference/ifDoWhileStatements.types deleted file mode 100644 index 92a9df6a4dd..00000000000 --- a/tests/baselines/reference/ifDoWhileStatements.types +++ /dev/null @@ -1,433 +0,0 @@ -=== tests/cases/conformance/statements/ifDoWhileStatements/ifDoWhileStatements.ts === -interface I { ->I : I - - id: number; ->id : number -} - -class C implements I { ->C : C ->I : I - - id: number; ->id : number - - name: string; ->name : string -} - -class C2 extends C { ->C2 : C2 ->C : C - - valid: boolean; ->valid : boolean -} - -class D{ ->D : D ->T : T - - source: T; ->source : T ->T : T - - recurse: D; ->recurse : D ->D : D ->T : T - - wrapped: D> ->wrapped : D> ->D : D ->D : D ->T : T -} - -function F(x: string): number { return 42; } ->F : (x: string) => number ->x : string ->42 : number - -function F2(x: number): boolean { return x < 42; } ->F2 : (x: number) => boolean ->x : number ->x < 42 : boolean ->x : number ->42 : number - -module M { ->M : typeof M - - export class A { ->A : A - - name: string; ->name : string - } - - export function F2(x: number): string { return x.toString(); } ->F2 : (x: number) => string ->x : number ->x.toString() : string ->x.toString : (radix?: number) => string ->x : number ->toString : (radix?: number) => string -} - -module N { ->N : typeof N - - export class A { ->A : A - - id: number; ->id : number - } - - export function F2(x: number): string { return x.toString(); } ->F2 : (x: number) => string ->x : number ->x.toString() : string ->x.toString : (radix?: number) => string ->x : number ->toString : (radix?: number) => string -} - -// literals -if (true) { } ->true : boolean - -while (true) { } ->true : boolean - -do { }while(true) ->true : boolean - -if (null) { } ->null : null - -while (null) { } ->null : null - -do { }while(null) ->null : null - -if (undefined) { } ->undefined : undefined - -while (undefined) { } ->undefined : undefined - -do { }while(undefined) ->undefined : undefined - -if (0.0) { } ->0.0 : number - -while (0.0) { } ->0.0 : number - -do { }while(0.0) ->0.0 : number - -if ('a string') { } ->'a string' : string - -while ('a string') { } ->'a string' : string - -do { }while('a string') ->'a string' : string - -if ('') { } ->'' : string - -while ('') { } ->'' : string - -do { }while('') ->'' : string - -if (/[a-z]/) { } ->/[a-z]/ : RegExp - -while (/[a-z]/) { } ->/[a-z]/ : RegExp - -do { }while(/[a-z]/) ->/[a-z]/ : RegExp - -if ([]) { } ->[] : undefined[] - -while ([]) { } ->[] : undefined[] - -do { }while([]) ->[] : undefined[] - -if ([1, 2]) { } ->[1, 2] : number[] ->1 : number ->2 : number - -while ([1, 2]) { } ->[1, 2] : number[] ->1 : number ->2 : number - -do { }while([1, 2]) ->[1, 2] : number[] ->1 : number ->2 : number - -if ({}) { } ->{} : {} - -while ({}) { } ->{} : {} - -do { }while({}) ->{} : {} - -if ({ x: 1, y: 'a' }) { } ->{ x: 1, y: 'a' } : { x: number; y: string; } ->x : number ->1 : number ->y : string ->'a' : string - -while ({ x: 1, y: 'a' }) { } ->{ x: 1, y: 'a' } : { x: number; y: string; } ->x : number ->1 : number ->y : string ->'a' : string - -do { }while({ x: 1, y: 'a' }) ->{ x: 1, y: 'a' } : { x: number; y: string; } ->x : number ->1 : number ->y : string ->'a' : string - -if (() => 43) { } ->() => 43 : () => number ->43 : number - -while (() => 43) { } ->() => 43 : () => number ->43 : number - -do { }while(() => 43) ->() => 43 : () => number ->43 : number - -if (new C()) { } ->new C() : C ->C : typeof C - -while (new C()) { } ->new C() : C ->C : typeof C - -do { }while(new C()) ->new C() : C ->C : typeof C - -if (new D()) { } ->new D() : D ->D : typeof D ->C : C - -while (new D()) { } ->new D() : D ->D : typeof D ->C : C - -do { }while(new D()) ->new D() : D ->D : typeof D ->C : C - -// references -var a = true; ->a : boolean ->true : boolean - -if (a) { } ->a : boolean - -while (a) { } ->a : boolean - -do { }while(a) ->a : boolean - -var b = null; ->b : any ->null : null - -if (b) { } ->b : any - -while (b) { } ->b : any - -do { }while(b) ->b : any - -var c = undefined; ->c : any ->undefined : undefined - -if (c) { } ->c : any - -while (c) { } ->c : any - -do { }while(c) ->c : any - -var d = 0.0; ->d : number ->0.0 : number - -if (d) { } ->d : number - -while (d) { } ->d : number - -do { }while(d) ->d : number - -var e = 'a string'; ->e : string ->'a string' : string - -if (e) { } ->e : string - -while (e) { } ->e : string - -do { }while(e) ->e : string - -var f = ''; ->f : string ->'' : string - -if (f) { } ->f : string - -while (f) { } ->f : string - -do { }while(f) ->f : string - -var g = /[a-z]/ ->g : RegExp ->/[a-z]/ : RegExp - -if (g) { } ->g : RegExp - -while (g) { } ->g : RegExp - -do { }while(g) ->g : RegExp - -var h = []; ->h : any[] ->[] : undefined[] - -if (h) { } ->h : any[] - -while (h) { } ->h : any[] - -do { }while(h) ->h : any[] - -var i = [1, 2]; ->i : number[] ->[1, 2] : number[] ->1 : number ->2 : number - -if (i) { } ->i : number[] - -while (i) { } ->i : number[] - -do { }while(i) ->i : number[] - -var j = {}; ->j : {} ->{} : {} - -if (j) { } ->j : {} - -while (j) { } ->j : {} - -do { }while(j) ->j : {} - -var k = { x: 1, y: 'a' }; ->k : { x: number; y: string; } ->{ x: 1, y: 'a' } : { x: number; y: string; } ->x : number ->1 : number ->y : string ->'a' : string - -if (k) { } ->k : { x: number; y: string; } - -while (k) { } ->k : { x: number; y: string; } - -do { }while(k) ->k : { x: number; y: string; } - -function fn(x?: string): I { return null; } ->fn : (x?: string) => I ->x : string ->I : I ->null : null - -if (fn()) { } ->fn() : I ->fn : (x?: string) => I - -while (fn()) { } ->fn() : I ->fn : (x?: string) => I - -do { }while(fn()) ->fn() : I ->fn : (x?: string) => I - -if (fn) { } ->fn : (x?: string) => I - -while (fn) { } ->fn : (x?: string) => I - -do { }while(fn) ->fn : (x?: string) => I - - - diff --git a/tests/baselines/reference/ifElseWithStatements1.errors.txt b/tests/baselines/reference/ifElseWithStatements1.errors.txt index 186cff59241..f9fcb33113a 100644 --- a/tests/baselines/reference/ifElseWithStatements1.errors.txt +++ b/tests/baselines/reference/ifElseWithStatements1.errors.txt @@ -1,8 +1,10 @@ tests/cases/compiler/ifElseWithStatements1.ts(2,5): error TS2304: Cannot find name 'f'. tests/cases/compiler/ifElseWithStatements1.ts(4,5): error TS2304: Cannot find name 'f'. +tests/cases/compiler/ifElseWithStatements1.ts(4,5): error TS7027: Unreachable code detected. +tests/cases/compiler/ifElseWithStatements1.ts(10,9): error TS7027: Unreachable code detected. -==== tests/cases/compiler/ifElseWithStatements1.ts (2 errors) ==== +==== tests/cases/compiler/ifElseWithStatements1.ts (4 errors) ==== if (true) f(); ~ @@ -11,11 +13,15 @@ tests/cases/compiler/ifElseWithStatements1.ts(4,5): error TS2304: Cannot find na f(); ~ !!! error TS2304: Cannot find name 'f'. + ~ +!!! error TS7027: Unreachable code detected. function foo(): boolean { if (true) return true; else return false; + ~~~~~~ +!!! error TS7027: Unreachable code detected. } \ No newline at end of file diff --git a/tests/baselines/reference/inferredFunctionReturnTypeIsEmptyType.errors.txt b/tests/baselines/reference/inferredFunctionReturnTypeIsEmptyType.errors.txt index 99819ecad2c..b1d4a1ba6ba 100644 --- a/tests/baselines/reference/inferredFunctionReturnTypeIsEmptyType.errors.txt +++ b/tests/baselines/reference/inferredFunctionReturnTypeIsEmptyType.errors.txt @@ -1,7 +1,8 @@ tests/cases/compiler/inferredFunctionReturnTypeIsEmptyType.ts(1,10): error TS2354: No best common type exists among return expressions. +tests/cases/compiler/inferredFunctionReturnTypeIsEmptyType.ts(6,9): error TS7027: Unreachable code detected. -==== tests/cases/compiler/inferredFunctionReturnTypeIsEmptyType.ts (1 errors) ==== +==== tests/cases/compiler/inferredFunctionReturnTypeIsEmptyType.ts (2 errors) ==== function foo() { ~~~ !!! error TS2354: No best common type exists among return expressions. @@ -10,6 +11,8 @@ tests/cases/compiler/inferredFunctionReturnTypeIsEmptyType.ts(1,10): error TS235 } else { return "42"; + ~~~~~~ +!!! error TS7027: Unreachable code detected. } }; \ No newline at end of file diff --git a/tests/baselines/reference/inheritanceStaticPropertyOverridingAccessor.errors.txt b/tests/baselines/reference/inheritanceStaticPropertyOverridingAccessor.errors.txt index 08aab5b1158..251938cc9c7 100644 --- a/tests/baselines/reference/inheritanceStaticPropertyOverridingAccessor.errors.txt +++ b/tests/baselines/reference/inheritanceStaticPropertyOverridingAccessor.errors.txt @@ -1,13 +1,16 @@ tests/cases/compiler/inheritanceStaticPropertyOverridingAccessor.ts(2,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. +tests/cases/compiler/inheritanceStaticPropertyOverridingAccessor.ts(3,21): error TS7027: Unreachable code detected. tests/cases/compiler/inheritanceStaticPropertyOverridingAccessor.ts(5,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. -==== tests/cases/compiler/inheritanceStaticPropertyOverridingAccessor.ts (2 errors) ==== +==== tests/cases/compiler/inheritanceStaticPropertyOverridingAccessor.ts (3 errors) ==== class a { static get x(): () => string { ~ !!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. return null;; + ~ +!!! error TS7027: Unreachable code detected. } static set x(aValue: () => string) { ~ diff --git a/tests/baselines/reference/interfaceExtendingClass2.errors.txt b/tests/baselines/reference/interfaceExtendingClass2.errors.txt index 3b394d4922a..68bd5e845ac 100644 --- a/tests/baselines/reference/interfaceExtendingClass2.errors.txt +++ b/tests/baselines/reference/interfaceExtendingClass2.errors.txt @@ -1,10 +1,11 @@ tests/cases/conformance/interfaces/interfacesExtendingClasses/interfaceExtendingClass2.ts(11,5): error TS2411: Property 'a' of type '{ toString: () => {}; }' is not assignable to string index type 'Object'. tests/cases/conformance/interfaces/interfacesExtendingClasses/interfaceExtendingClass2.ts(13,13): error TS1131: Property or signature expected. tests/cases/conformance/interfaces/interfacesExtendingClasses/interfaceExtendingClass2.ts(14,9): error TS1128: Declaration or statement expected. +tests/cases/conformance/interfaces/interfacesExtendingClasses/interfaceExtendingClass2.ts(14,10): error TS7027: Unreachable code detected. tests/cases/conformance/interfaces/interfacesExtendingClasses/interfaceExtendingClass2.ts(15,5): error TS1128: Declaration or statement expected. -==== tests/cases/conformance/interfaces/interfacesExtendingClasses/interfaceExtendingClass2.ts (4 errors) ==== +==== tests/cases/conformance/interfaces/interfacesExtendingClasses/interfaceExtendingClass2.ts (5 errors) ==== class Foo { x: string; y() { } @@ -26,6 +27,8 @@ tests/cases/conformance/interfaces/interfacesExtendingClasses/interfaceExtending }; ~ !!! error TS1128: Declaration or statement expected. + ~ +!!! error TS7027: Unreachable code detected. } ~ !!! error TS1128: Declaration or statement expected. \ No newline at end of file diff --git a/tests/baselines/reference/interfaceWithPrivateMember.errors.txt b/tests/baselines/reference/interfaceWithPrivateMember.errors.txt index 7f2542b45a1..aa6dfdc1032 100644 --- a/tests/baselines/reference/interfaceWithPrivateMember.errors.txt +++ b/tests/baselines/reference/interfaceWithPrivateMember.errors.txt @@ -1,11 +1,12 @@ tests/cases/conformance/types/namedTypes/interfaceWithPrivateMember.ts(4,5): error TS1131: Property or signature expected. tests/cases/conformance/types/namedTypes/interfaceWithPrivateMember.ts(8,5): error TS1131: Property or signature expected. tests/cases/conformance/types/namedTypes/interfaceWithPrivateMember.ts(12,5): error TS1131: Property or signature expected. +tests/cases/conformance/types/namedTypes/interfaceWithPrivateMember.ts(12,13): error TS7028: Unused label. tests/cases/conformance/types/namedTypes/interfaceWithPrivateMember.ts(12,16): error TS2304: Cannot find name 'string'. tests/cases/conformance/types/namedTypes/interfaceWithPrivateMember.ts(13,1): error TS1128: Declaration or statement expected. -==== tests/cases/conformance/types/namedTypes/interfaceWithPrivateMember.ts (5 errors) ==== +==== tests/cases/conformance/types/namedTypes/interfaceWithPrivateMember.ts (6 errors) ==== // interfaces do not permit private members, these are errors interface I { @@ -24,6 +25,8 @@ tests/cases/conformance/types/namedTypes/interfaceWithPrivateMember.ts(13,1): er private y: string; ~~~~~~~ !!! error TS1131: Property or signature expected. + ~ +!!! error TS7028: Unused label. ~~~~~~ !!! error TS2304: Cannot find name 'string'. } diff --git a/tests/baselines/reference/invalidDoWhileBreakStatements.errors.txt b/tests/baselines/reference/invalidDoWhileBreakStatements.errors.txt index 65fd55b763b..2a26190534e 100644 --- a/tests/baselines/reference/invalidDoWhileBreakStatements.errors.txt +++ b/tests/baselines/reference/invalidDoWhileBreakStatements.errors.txt @@ -1,12 +1,14 @@ tests/cases/conformance/statements/breakStatements/invalidDoWhileBreakStatements.ts(4,1): error TS1105: A 'break' statement can only be used within an enclosing iteration or switch statement. +tests/cases/conformance/statements/breakStatements/invalidDoWhileBreakStatements.ts(7,1): error TS7028: Unused label. tests/cases/conformance/statements/breakStatements/invalidDoWhileBreakStatements.ts(8,4): error TS1116: A 'break' statement can only jump to a label of an enclosing statement. +tests/cases/conformance/statements/breakStatements/invalidDoWhileBreakStatements.ts(11,1): error TS7027: Unreachable code detected. tests/cases/conformance/statements/breakStatements/invalidDoWhileBreakStatements.ts(14,9): error TS1107: Jump target cannot cross function boundary. tests/cases/conformance/statements/breakStatements/invalidDoWhileBreakStatements.ts(21,9): error TS1107: Jump target cannot cross function boundary. tests/cases/conformance/statements/breakStatements/invalidDoWhileBreakStatements.ts(27,5): error TS1116: A 'break' statement can only jump to a label of an enclosing statement. tests/cases/conformance/statements/breakStatements/invalidDoWhileBreakStatements.ts(37,5): error TS1116: A 'break' statement can only jump to a label of an enclosing statement. -==== tests/cases/conformance/statements/breakStatements/invalidDoWhileBreakStatements.ts (6 errors) ==== +==== tests/cases/conformance/statements/breakStatements/invalidDoWhileBreakStatements.ts (8 errors) ==== // All errors // naked break not allowed @@ -16,12 +18,16 @@ tests/cases/conformance/statements/breakStatements/invalidDoWhileBreakStatements // non-existent label ONE: + ~~~ +!!! error TS7028: Unused label. do break TWO; while (true) ~~~~~~~~~~ !!! error TS1116: A 'break' statement can only jump to a label of an enclosing statement. // break from inside function TWO: + ~~~ +!!! error TS7027: Unreachable code detected. do { var x = () => { break TWO; diff --git a/tests/baselines/reference/invalidDoWhileContinueStatements.errors.txt b/tests/baselines/reference/invalidDoWhileContinueStatements.errors.txt index e9643394d12..b3938d9ba8b 100644 --- a/tests/baselines/reference/invalidDoWhileContinueStatements.errors.txt +++ b/tests/baselines/reference/invalidDoWhileContinueStatements.errors.txt @@ -1,12 +1,14 @@ tests/cases/conformance/statements/continueStatements/invalidDoWhileContinueStatements.ts(4,1): error TS1104: A 'continue' statement can only be used within an enclosing iteration statement. +tests/cases/conformance/statements/continueStatements/invalidDoWhileContinueStatements.ts(7,1): error TS7028: Unused label. tests/cases/conformance/statements/continueStatements/invalidDoWhileContinueStatements.ts(8,4): error TS1115: A 'continue' statement can only jump to a label of an enclosing iteration statement. +tests/cases/conformance/statements/continueStatements/invalidDoWhileContinueStatements.ts(11,1): error TS7027: Unreachable code detected. tests/cases/conformance/statements/continueStatements/invalidDoWhileContinueStatements.ts(14,9): error TS1107: Jump target cannot cross function boundary. tests/cases/conformance/statements/continueStatements/invalidDoWhileContinueStatements.ts(21,9): error TS1107: Jump target cannot cross function boundary. tests/cases/conformance/statements/continueStatements/invalidDoWhileContinueStatements.ts(27,5): error TS1115: A 'continue' statement can only jump to a label of an enclosing iteration statement. tests/cases/conformance/statements/continueStatements/invalidDoWhileContinueStatements.ts(37,5): error TS1115: A 'continue' statement can only jump to a label of an enclosing iteration statement. -==== tests/cases/conformance/statements/continueStatements/invalidDoWhileContinueStatements.ts (6 errors) ==== +==== tests/cases/conformance/statements/continueStatements/invalidDoWhileContinueStatements.ts (8 errors) ==== // All errors // naked continue not allowed @@ -16,12 +18,16 @@ tests/cases/conformance/statements/continueStatements/invalidDoWhileContinueStat // non-existent label ONE: + ~~~ +!!! error TS7028: Unused label. do continue TWO; while (true) ~~~~~~~~~~~~~ !!! error TS1115: A 'continue' statement can only jump to a label of an enclosing iteration statement. // continue from inside function TWO: + ~~~ +!!! error TS7027: Unreachable code detected. do { var x = () => { continue TWO; diff --git a/tests/baselines/reference/invalidForBreakStatements.errors.txt b/tests/baselines/reference/invalidForBreakStatements.errors.txt index 50e4013c0ea..f803cad08e1 100644 --- a/tests/baselines/reference/invalidForBreakStatements.errors.txt +++ b/tests/baselines/reference/invalidForBreakStatements.errors.txt @@ -1,12 +1,14 @@ tests/cases/conformance/statements/breakStatements/invalidForBreakStatements.ts(4,1): error TS1105: A 'break' statement can only be used within an enclosing iteration or switch statement. +tests/cases/conformance/statements/breakStatements/invalidForBreakStatements.ts(7,1): error TS7028: Unused label. tests/cases/conformance/statements/breakStatements/invalidForBreakStatements.ts(8,9): error TS1116: A 'break' statement can only jump to a label of an enclosing statement. +tests/cases/conformance/statements/breakStatements/invalidForBreakStatements.ts(11,1): error TS7027: Unreachable code detected. tests/cases/conformance/statements/breakStatements/invalidForBreakStatements.ts(14,9): error TS1107: Jump target cannot cross function boundary. tests/cases/conformance/statements/breakStatements/invalidForBreakStatements.ts(21,9): error TS1107: Jump target cannot cross function boundary. tests/cases/conformance/statements/breakStatements/invalidForBreakStatements.ts(27,5): error TS1116: A 'break' statement can only jump to a label of an enclosing statement. tests/cases/conformance/statements/breakStatements/invalidForBreakStatements.ts(36,5): error TS1116: A 'break' statement can only jump to a label of an enclosing statement. -==== tests/cases/conformance/statements/breakStatements/invalidForBreakStatements.ts (6 errors) ==== +==== tests/cases/conformance/statements/breakStatements/invalidForBreakStatements.ts (8 errors) ==== // All errors // naked break not allowed @@ -16,12 +18,16 @@ tests/cases/conformance/statements/breakStatements/invalidForBreakStatements.ts( // non-existent label ONE: + ~~~ +!!! error TS7028: Unused label. for(;;) break TWO; ~~~~~~~~~~ !!! error TS1116: A 'break' statement can only jump to a label of an enclosing statement. // break from inside function TWO: + ~~~ +!!! error TS7027: Unreachable code detected. for(;;) { var x = () => { break TWO; diff --git a/tests/baselines/reference/invalidForContinueStatements.errors.txt b/tests/baselines/reference/invalidForContinueStatements.errors.txt index 3af47370df1..9a252a2c572 100644 --- a/tests/baselines/reference/invalidForContinueStatements.errors.txt +++ b/tests/baselines/reference/invalidForContinueStatements.errors.txt @@ -1,12 +1,14 @@ tests/cases/conformance/statements/continueStatements/invalidForContinueStatements.ts(4,1): error TS1104: A 'continue' statement can only be used within an enclosing iteration statement. +tests/cases/conformance/statements/continueStatements/invalidForContinueStatements.ts(7,1): error TS7028: Unused label. tests/cases/conformance/statements/continueStatements/invalidForContinueStatements.ts(8,9): error TS1115: A 'continue' statement can only jump to a label of an enclosing iteration statement. +tests/cases/conformance/statements/continueStatements/invalidForContinueStatements.ts(11,1): error TS7027: Unreachable code detected. tests/cases/conformance/statements/continueStatements/invalidForContinueStatements.ts(14,9): error TS1107: Jump target cannot cross function boundary. tests/cases/conformance/statements/continueStatements/invalidForContinueStatements.ts(21,9): error TS1107: Jump target cannot cross function boundary. tests/cases/conformance/statements/continueStatements/invalidForContinueStatements.ts(27,5): error TS1115: A 'continue' statement can only jump to a label of an enclosing iteration statement. tests/cases/conformance/statements/continueStatements/invalidForContinueStatements.ts(36,5): error TS1115: A 'continue' statement can only jump to a label of an enclosing iteration statement. -==== tests/cases/conformance/statements/continueStatements/invalidForContinueStatements.ts (6 errors) ==== +==== tests/cases/conformance/statements/continueStatements/invalidForContinueStatements.ts (8 errors) ==== // All errors // naked continue not allowed @@ -16,12 +18,16 @@ tests/cases/conformance/statements/continueStatements/invalidForContinueStatemen // non-existent label ONE: + ~~~ +!!! error TS7028: Unused label. for(;;) continue TWO; ~~~~~~~~~~~~~ !!! error TS1115: A 'continue' statement can only jump to a label of an enclosing iteration statement. // continue from inside function TWO: + ~~~ +!!! error TS7027: Unreachable code detected. for(;;) { var x = () => { continue TWO; diff --git a/tests/baselines/reference/invalidForInBreakStatements.errors.txt b/tests/baselines/reference/invalidForInBreakStatements.errors.txt index d83304ab1c6..a575970ff88 100644 --- a/tests/baselines/reference/invalidForInBreakStatements.errors.txt +++ b/tests/baselines/reference/invalidForInBreakStatements.errors.txt @@ -1,12 +1,17 @@ tests/cases/conformance/statements/breakStatements/invalidForInBreakStatements.ts(4,1): error TS1105: A 'break' statement can only be used within an enclosing iteration or switch statement. +tests/cases/conformance/statements/breakStatements/invalidForInBreakStatements.ts(7,1): error TS7028: Unused label. tests/cases/conformance/statements/breakStatements/invalidForInBreakStatements.ts(8,19): error TS1116: A 'break' statement can only jump to a label of an enclosing statement. +tests/cases/conformance/statements/breakStatements/invalidForInBreakStatements.ts(11,1): error TS7028: Unused label. tests/cases/conformance/statements/breakStatements/invalidForInBreakStatements.ts(14,9): error TS1107: Jump target cannot cross function boundary. +tests/cases/conformance/statements/breakStatements/invalidForInBreakStatements.ts(18,1): error TS7028: Unused label. tests/cases/conformance/statements/breakStatements/invalidForInBreakStatements.ts(21,9): error TS1107: Jump target cannot cross function boundary. tests/cases/conformance/statements/breakStatements/invalidForInBreakStatements.ts(27,5): error TS1116: A 'break' statement can only jump to a label of an enclosing statement. +tests/cases/conformance/statements/breakStatements/invalidForInBreakStatements.ts(28,5): error TS7028: Unused label. +tests/cases/conformance/statements/breakStatements/invalidForInBreakStatements.ts(33,1): error TS7028: Unused label. tests/cases/conformance/statements/breakStatements/invalidForInBreakStatements.ts(37,5): error TS1116: A 'break' statement can only jump to a label of an enclosing statement. -==== tests/cases/conformance/statements/breakStatements/invalidForInBreakStatements.ts (6 errors) ==== +==== tests/cases/conformance/statements/breakStatements/invalidForInBreakStatements.ts (11 errors) ==== // All errors // naked break not allowed @@ -16,12 +21,16 @@ tests/cases/conformance/statements/breakStatements/invalidForInBreakStatements.t // non-existent label ONE: + ~~~ +!!! error TS7028: Unused label. for (var x in {}) break TWO; ~~~~~~~~~~ !!! error TS1116: A 'break' statement can only jump to a label of an enclosing statement. // break from inside function TWO: + ~~~ +!!! error TS7028: Unused label. for (var x in {}) { var fn = () => { break TWO; @@ -31,6 +40,8 @@ tests/cases/conformance/statements/breakStatements/invalidForInBreakStatements.t } THREE: + ~~~~~ +!!! error TS7028: Unused label. for (var x in {}) { var fn = function () { break THREE; @@ -45,11 +56,15 @@ tests/cases/conformance/statements/breakStatements/invalidForInBreakStatements.t ~~~~~~~~~~~ !!! error TS1116: A 'break' statement can only jump to a label of an enclosing statement. FIVE: + ~~~~ +!!! error TS7028: Unused label. for (var x in {}) { } } // label on non-loop statement NINE: + ~~~~ +!!! error TS7028: Unused label. var y = 12; for (var x in {}) { diff --git a/tests/baselines/reference/invalidForInContinueStatements.errors.txt b/tests/baselines/reference/invalidForInContinueStatements.errors.txt index 7353a22d9cd..15b515742a9 100644 --- a/tests/baselines/reference/invalidForInContinueStatements.errors.txt +++ b/tests/baselines/reference/invalidForInContinueStatements.errors.txt @@ -1,12 +1,17 @@ tests/cases/conformance/statements/continueStatements/invalidForInContinueStatements.ts(4,1): error TS1104: A 'continue' statement can only be used within an enclosing iteration statement. +tests/cases/conformance/statements/continueStatements/invalidForInContinueStatements.ts(7,1): error TS7028: Unused label. tests/cases/conformance/statements/continueStatements/invalidForInContinueStatements.ts(8,19): error TS1115: A 'continue' statement can only jump to a label of an enclosing iteration statement. +tests/cases/conformance/statements/continueStatements/invalidForInContinueStatements.ts(11,1): error TS7028: Unused label. tests/cases/conformance/statements/continueStatements/invalidForInContinueStatements.ts(14,9): error TS1107: Jump target cannot cross function boundary. +tests/cases/conformance/statements/continueStatements/invalidForInContinueStatements.ts(18,1): error TS7028: Unused label. tests/cases/conformance/statements/continueStatements/invalidForInContinueStatements.ts(21,9): error TS1107: Jump target cannot cross function boundary. tests/cases/conformance/statements/continueStatements/invalidForInContinueStatements.ts(27,5): error TS1115: A 'continue' statement can only jump to a label of an enclosing iteration statement. +tests/cases/conformance/statements/continueStatements/invalidForInContinueStatements.ts(28,5): error TS7028: Unused label. +tests/cases/conformance/statements/continueStatements/invalidForInContinueStatements.ts(33,1): error TS7028: Unused label. tests/cases/conformance/statements/continueStatements/invalidForInContinueStatements.ts(37,5): error TS1115: A 'continue' statement can only jump to a label of an enclosing iteration statement. -==== tests/cases/conformance/statements/continueStatements/invalidForInContinueStatements.ts (6 errors) ==== +==== tests/cases/conformance/statements/continueStatements/invalidForInContinueStatements.ts (11 errors) ==== // All errors // naked continue not allowed @@ -16,12 +21,16 @@ tests/cases/conformance/statements/continueStatements/invalidForInContinueStatem // non-existent label ONE: + ~~~ +!!! error TS7028: Unused label. for (var x in {}) continue TWO; ~~~~~~~~~~~~~ !!! error TS1115: A 'continue' statement can only jump to a label of an enclosing iteration statement. // continue from inside function TWO: + ~~~ +!!! error TS7028: Unused label. for (var x in {}) { var fn = () => { continue TWO; @@ -31,6 +40,8 @@ tests/cases/conformance/statements/continueStatements/invalidForInContinueStatem } THREE: + ~~~~~ +!!! error TS7028: Unused label. for (var x in {}) { var fn = function () { continue THREE; @@ -45,11 +56,15 @@ tests/cases/conformance/statements/continueStatements/invalidForInContinueStatem ~~~~~~~~~~~~~~ !!! error TS1115: A 'continue' statement can only jump to a label of an enclosing iteration statement. FIVE: + ~~~~ +!!! error TS7028: Unused label. for (var x in {}) { } } // label on non-loop statement NINE: + ~~~~ +!!! error TS7028: Unused label. var y = 12; for (var x in {}) { diff --git a/tests/baselines/reference/invalidThrowStatement.errors.txt b/tests/baselines/reference/invalidThrowStatement.errors.txt index b30549a217c..d72fd7e2acd 100644 --- a/tests/baselines/reference/invalidThrowStatement.errors.txt +++ b/tests/baselines/reference/invalidThrowStatement.errors.txt @@ -1,8 +1,9 @@ tests/cases/conformance/statements/throwStatements/invalidThrowStatement.ts(1,6): error TS1109: Expression expected. tests/cases/conformance/statements/throwStatements/invalidThrowStatement.ts(3,1): error TS1128: Declaration or statement expected. +tests/cases/conformance/statements/throwStatements/invalidThrowStatement.ts(3,8): error TS7027: Unreachable code detected. -==== tests/cases/conformance/statements/throwStatements/invalidThrowStatement.ts (2 errors) ==== +==== tests/cases/conformance/statements/throwStatements/invalidThrowStatement.ts (3 errors) ==== throw; ~ !!! error TS1109: Expression expected. @@ -10,4 +11,6 @@ tests/cases/conformance/statements/throwStatements/invalidThrowStatement.ts(3,1) export throw null; ~~~~~~ !!! error TS1128: Declaration or statement expected. + ~~~~~ +!!! error TS7027: Unreachable code detected. \ No newline at end of file diff --git a/tests/baselines/reference/invalidWhileBreakStatements.errors.txt b/tests/baselines/reference/invalidWhileBreakStatements.errors.txt index 54adc2856d7..7d4f86b3e9d 100644 --- a/tests/baselines/reference/invalidWhileBreakStatements.errors.txt +++ b/tests/baselines/reference/invalidWhileBreakStatements.errors.txt @@ -1,12 +1,14 @@ tests/cases/conformance/statements/breakStatements/invalidWhileBreakStatements.ts(4,1): error TS1105: A 'break' statement can only be used within an enclosing iteration or switch statement. +tests/cases/conformance/statements/breakStatements/invalidWhileBreakStatements.ts(7,1): error TS7028: Unused label. tests/cases/conformance/statements/breakStatements/invalidWhileBreakStatements.ts(8,14): error TS1116: A 'break' statement can only jump to a label of an enclosing statement. +tests/cases/conformance/statements/breakStatements/invalidWhileBreakStatements.ts(11,1): error TS7027: Unreachable code detected. tests/cases/conformance/statements/breakStatements/invalidWhileBreakStatements.ts(14,9): error TS1107: Jump target cannot cross function boundary. tests/cases/conformance/statements/breakStatements/invalidWhileBreakStatements.ts(21,9): error TS1107: Jump target cannot cross function boundary. tests/cases/conformance/statements/breakStatements/invalidWhileBreakStatements.ts(27,5): error TS1116: A 'break' statement can only jump to a label of an enclosing statement. tests/cases/conformance/statements/breakStatements/invalidWhileBreakStatements.ts(37,5): error TS1116: A 'break' statement can only jump to a label of an enclosing statement. -==== tests/cases/conformance/statements/breakStatements/invalidWhileBreakStatements.ts (6 errors) ==== +==== tests/cases/conformance/statements/breakStatements/invalidWhileBreakStatements.ts (8 errors) ==== // All errors // naked break not allowed @@ -16,12 +18,16 @@ tests/cases/conformance/statements/breakStatements/invalidWhileBreakStatements.t // non-existent label ONE: + ~~~ +!!! error TS7028: Unused label. while (true) break TWO; ~~~~~~~~~~ !!! error TS1116: A 'break' statement can only jump to a label of an enclosing statement. // break from inside function TWO: + ~~~ +!!! error TS7027: Unreachable code detected. while (true){ var x = () => { break TWO; diff --git a/tests/baselines/reference/invalidWhileContinueStatements.errors.txt b/tests/baselines/reference/invalidWhileContinueStatements.errors.txt index 462b244efd4..fdc84d84f2e 100644 --- a/tests/baselines/reference/invalidWhileContinueStatements.errors.txt +++ b/tests/baselines/reference/invalidWhileContinueStatements.errors.txt @@ -1,12 +1,14 @@ tests/cases/conformance/statements/continueStatements/invalidWhileContinueStatements.ts(4,1): error TS1104: A 'continue' statement can only be used within an enclosing iteration statement. +tests/cases/conformance/statements/continueStatements/invalidWhileContinueStatements.ts(7,1): error TS7028: Unused label. tests/cases/conformance/statements/continueStatements/invalidWhileContinueStatements.ts(8,14): error TS1115: A 'continue' statement can only jump to a label of an enclosing iteration statement. +tests/cases/conformance/statements/continueStatements/invalidWhileContinueStatements.ts(11,1): error TS7027: Unreachable code detected. tests/cases/conformance/statements/continueStatements/invalidWhileContinueStatements.ts(14,9): error TS1107: Jump target cannot cross function boundary. tests/cases/conformance/statements/continueStatements/invalidWhileContinueStatements.ts(21,9): error TS1107: Jump target cannot cross function boundary. tests/cases/conformance/statements/continueStatements/invalidWhileContinueStatements.ts(27,5): error TS1115: A 'continue' statement can only jump to a label of an enclosing iteration statement. tests/cases/conformance/statements/continueStatements/invalidWhileContinueStatements.ts(37,5): error TS1115: A 'continue' statement can only jump to a label of an enclosing iteration statement. -==== tests/cases/conformance/statements/continueStatements/invalidWhileContinueStatements.ts (6 errors) ==== +==== tests/cases/conformance/statements/continueStatements/invalidWhileContinueStatements.ts (8 errors) ==== // All errors // naked continue not allowed @@ -16,12 +18,16 @@ tests/cases/conformance/statements/continueStatements/invalidWhileContinueStatem // non-existent label ONE: + ~~~ +!!! error TS7028: Unused label. while (true) continue TWO; ~~~~~~~~~~~~~ !!! error TS1115: A 'continue' statement can only jump to a label of an enclosing iteration statement. // continue from inside function TWO: + ~~~ +!!! error TS7027: Unreachable code detected. while (true){ var x = () => { continue TWO; diff --git a/tests/baselines/reference/letAndVarRedeclaration.errors.txt b/tests/baselines/reference/letAndVarRedeclaration.errors.txt index 48704f61040..3c523154c3f 100644 --- a/tests/baselines/reference/letAndVarRedeclaration.errors.txt +++ b/tests/baselines/reference/letAndVarRedeclaration.errors.txt @@ -17,11 +17,12 @@ tests/cases/compiler/letAndVarRedeclaration.ts(38,5): error TS2451: Cannot redec tests/cases/compiler/letAndVarRedeclaration.ts(39,10): error TS2451: Cannot redeclare block-scoped variable 'x11'. tests/cases/compiler/letAndVarRedeclaration.ts(43,9): error TS2451: Cannot redeclare block-scoped variable 'x11'. tests/cases/compiler/letAndVarRedeclaration.ts(44,14): error TS2451: Cannot redeclare block-scoped variable 'x11'. +tests/cases/compiler/letAndVarRedeclaration.ts(48,1): error TS7027: Unreachable code detected. tests/cases/compiler/letAndVarRedeclaration.ts(49,9): error TS2451: Cannot redeclare block-scoped variable 'x11'. tests/cases/compiler/letAndVarRedeclaration.ts(50,14): error TS2451: Cannot redeclare block-scoped variable 'x11'. -==== tests/cases/compiler/letAndVarRedeclaration.ts (21 errors) ==== +==== tests/cases/compiler/letAndVarRedeclaration.ts (22 errors) ==== let e0 ~~ @@ -108,6 +109,8 @@ tests/cases/compiler/letAndVarRedeclaration.ts(50,14): error TS2451: Cannot rede } module M2 { + ~~~~~~ +!!! error TS7027: Unreachable code detected. let x11; ~~~ !!! error TS2451: Cannot redeclare block-scoped variable 'x11'. diff --git a/tests/baselines/reference/letDeclarations-invalidContexts.errors.txt b/tests/baselines/reference/letDeclarations-invalidContexts.errors.txt index 1ece1f31433..f3144b52500 100644 --- a/tests/baselines/reference/letDeclarations-invalidContexts.errors.txt +++ b/tests/baselines/reference/letDeclarations-invalidContexts.errors.txt @@ -1,6 +1,8 @@ tests/cases/compiler/letDeclarations-invalidContexts.ts(4,5): error TS1157: 'let' declarations can only be declared inside a block. +tests/cases/compiler/letDeclarations-invalidContexts.ts(6,5): error TS7027: Unreachable code detected. tests/cases/compiler/letDeclarations-invalidContexts.ts(6,5): error TS1157: 'let' declarations can only be declared inside a block. tests/cases/compiler/letDeclarations-invalidContexts.ts(9,5): error TS1157: 'let' declarations can only be declared inside a block. +tests/cases/compiler/letDeclarations-invalidContexts.ts(11,1): error TS7027: Unreachable code detected. tests/cases/compiler/letDeclarations-invalidContexts.ts(12,5): error TS1157: 'let' declarations can only be declared inside a block. tests/cases/compiler/letDeclarations-invalidContexts.ts(16,7): error TS2410: All symbols within a 'with' block will be resolved to 'any'. tests/cases/compiler/letDeclarations-invalidContexts.ts(20,5): error TS1157: 'let' declarations can only be declared inside a block. @@ -9,7 +11,7 @@ tests/cases/compiler/letDeclarations-invalidContexts.ts(26,12): error TS1157: 'l tests/cases/compiler/letDeclarations-invalidContexts.ts(29,29): error TS1157: 'let' declarations can only be declared inside a block. -==== tests/cases/compiler/letDeclarations-invalidContexts.ts (9 errors) ==== +==== tests/cases/compiler/letDeclarations-invalidContexts.ts (11 errors) ==== // Errors, let must be defined inside a block if (true) @@ -18,6 +20,8 @@ tests/cases/compiler/letDeclarations-invalidContexts.ts(29,29): error TS1157: 'l !!! error TS1157: 'let' declarations can only be declared inside a block. else let l2 = 0; + ~~~ +!!! error TS7027: Unreachable code detected. ~~~~~~~~~~~ !!! error TS1157: 'let' declarations can only be declared inside a block. @@ -27,6 +31,8 @@ tests/cases/compiler/letDeclarations-invalidContexts.ts(29,29): error TS1157: 'l !!! error TS1157: 'let' declarations can only be declared inside a block. do + ~~ +!!! error TS7027: Unreachable code detected. let l4 = 0; ~~~~~~~~~~~ !!! error TS1157: 'let' declarations can only be declared inside a block. diff --git a/tests/baselines/reference/letDeclarations-scopes.errors.txt b/tests/baselines/reference/letDeclarations-scopes.errors.txt index 5c89ea98049..49072f30e98 100644 --- a/tests/baselines/reference/letDeclarations-scopes.errors.txt +++ b/tests/baselines/reference/letDeclarations-scopes.errors.txt @@ -1,7 +1,10 @@ +tests/cases/compiler/letDeclarations-scopes.ts(13,5): error TS7027: Unreachable code detected. +tests/cases/compiler/letDeclarations-scopes.ts(22,1): error TS7027: Unreachable code detected. tests/cases/compiler/letDeclarations-scopes.ts(28,7): error TS2410: All symbols within a 'with' block will be resolved to 'any'. +tests/cases/compiler/letDeclarations-scopes.ts(120,5): error TS7028: Unused label. -==== tests/cases/compiler/letDeclarations-scopes.ts (1 errors) ==== +==== tests/cases/compiler/letDeclarations-scopes.ts (4 errors) ==== // global let l = "string"; @@ -15,6 +18,8 @@ tests/cases/compiler/letDeclarations-scopes.ts(28,7): error TS2410: All symbols } else { let l = 0; + ~~~ +!!! error TS7027: Unreachable code detected. n = l; } @@ -24,6 +29,8 @@ tests/cases/compiler/letDeclarations-scopes.ts(28,7): error TS2410: All symbols } do { + ~~ +!!! error TS7027: Unreachable code detected. let l = 0; n = l; } while (true); @@ -124,6 +131,8 @@ tests/cases/compiler/letDeclarations-scopes.ts(28,7): error TS2410: All symbols } lable: let l2 = 0; + ~~~~~ +!!! error TS7028: Unused label. } // methods diff --git a/tests/baselines/reference/letDeclarations-validContexts.errors.txt b/tests/baselines/reference/letDeclarations-validContexts.errors.txt index 3f3b7a2634f..f5e8022191b 100644 --- a/tests/baselines/reference/letDeclarations-validContexts.errors.txt +++ b/tests/baselines/reference/letDeclarations-validContexts.errors.txt @@ -1,7 +1,13 @@ +tests/cases/compiler/letDeclarations-validContexts.ts(8,5): error TS7027: Unreachable code detected. +tests/cases/compiler/letDeclarations-validContexts.ts(15,1): error TS7027: Unreachable code detected. tests/cases/compiler/letDeclarations-validContexts.ts(20,7): error TS2410: All symbols within a 'with' block will be resolved to 'any'. +tests/cases/compiler/letDeclarations-validContexts.ts(132,5): error TS7028: Unused label. +tests/cases/compiler/letDeclarations-validContexts.ts(134,9): error TS7028: Unused label. +tests/cases/compiler/letDeclarations-validContexts.ts(139,5): error TS7028: Unused label. +tests/cases/compiler/letDeclarations-validContexts.ts(141,9): error TS7028: Unused label. -==== tests/cases/compiler/letDeclarations-validContexts.ts (1 errors) ==== +==== tests/cases/compiler/letDeclarations-validContexts.ts (7 errors) ==== // Control flow statements with blocks @@ -10,6 +16,8 @@ tests/cases/compiler/letDeclarations-validContexts.ts(20,7): error TS2410: All s } else { let l2 = 0; + ~~~ +!!! error TS7027: Unreachable code detected. } while (true) { @@ -17,6 +25,8 @@ tests/cases/compiler/letDeclarations-validContexts.ts(20,7): error TS2410: All s } do { + ~~ +!!! error TS7027: Unreachable code detected. let l4 = 0; } while (true); @@ -136,14 +146,22 @@ tests/cases/compiler/letDeclarations-validContexts.ts(20,7): error TS2410: All s function f3() { label: let l32 = 0; + ~~~~~ +!!! error TS7028: Unused label. { label2: let l33 = 0; + ~~~~~~ +!!! error TS7028: Unused label. } } module m3 { label: let l34 = 0; + ~~~~~ +!!! error TS7028: Unused label. { label2: let l35 = 0; + ~~~~~~ +!!! error TS7028: Unused label. } } \ No newline at end of file diff --git a/tests/baselines/reference/localTypes4.errors.txt b/tests/baselines/reference/localTypes4.errors.txt index cad9d30c933..d6a3f0ce699 100644 --- a/tests/baselines/reference/localTypes4.errors.txt +++ b/tests/baselines/reference/localTypes4.errors.txt @@ -2,9 +2,10 @@ tests/cases/conformance/types/localTypes/localTypes4.ts(10,19): error TS2304: Ca tests/cases/conformance/types/localTypes/localTypes4.ts(10,23): error TS2304: Cannot find name 'T'. tests/cases/conformance/types/localTypes/localTypes4.ts(18,16): error TS2300: Duplicate identifier 'T'. tests/cases/conformance/types/localTypes/localTypes4.ts(19,19): error TS2300: Duplicate identifier 'T'. +tests/cases/conformance/types/localTypes/localTypes4.ts(35,9): error TS7027: Unreachable code detected. -==== tests/cases/conformance/types/localTypes/localTypes4.ts (4 errors) ==== +==== tests/cases/conformance/types/localTypes/localTypes4.ts (5 errors) ==== function f1() { // Type parameters are in scope in parameters and return types function f(x: T): T { @@ -48,6 +49,8 @@ tests/cases/conformance/types/localTypes/localTypes4.ts(19,19): error TS2300: Du } else { v.x = 20; + ~ +!!! error TS7027: Unreachable code detected. } } \ No newline at end of file diff --git a/tests/baselines/reference/null.errors.txt b/tests/baselines/reference/null.errors.txt new file mode 100644 index 00000000000..b516720b241 --- /dev/null +++ b/tests/baselines/reference/null.errors.txt @@ -0,0 +1,30 @@ +tests/cases/compiler/null.ts(8,5): error TS7027: Unreachable code detected. +tests/cases/compiler/null.ts(12,5): error TS7027: Unreachable code detected. + + +==== tests/cases/compiler/null.ts (2 errors) ==== + var x=null; + var y=3+x; + var z=3+null; + class C { + } + function f() { + return null; + return new C(); + ~~~~~~ +!!! error TS7027: Unreachable code detected. + } + function g() { + return null; + return 3; + ~~~~~~ +!!! error TS7027: Unreachable code detected. + } + interface I { + x:any; + y:number; + } + var w:I={x:null,y:3}; + + + \ No newline at end of file diff --git a/tests/baselines/reference/null.symbols b/tests/baselines/reference/null.symbols deleted file mode 100644 index 148cd1586b2..00000000000 --- a/tests/baselines/reference/null.symbols +++ /dev/null @@ -1,44 +0,0 @@ -=== tests/cases/compiler/null.ts === -var x=null; ->x : Symbol(x, Decl(null.ts, 0, 3)) - -var y=3+x; ->y : Symbol(y, Decl(null.ts, 1, 3)) ->x : Symbol(x, Decl(null.ts, 0, 3)) - -var z=3+null; ->z : Symbol(z, Decl(null.ts, 2, 3)) - -class C { ->C : Symbol(C, Decl(null.ts, 2, 13)) -} -function f() { ->f : Symbol(f, Decl(null.ts, 4, 1)) - - return null; - return new C(); ->C : Symbol(C, Decl(null.ts, 2, 13)) -} -function g() { ->g : Symbol(g, Decl(null.ts, 8, 1)) - - return null; - return 3; -} -interface I { ->I : Symbol(I, Decl(null.ts, 12, 1)) - - x:any; ->x : Symbol(x, Decl(null.ts, 13, 13)) - - y:number; ->y : Symbol(y, Decl(null.ts, 14, 10)) -} -var w:I={x:null,y:3}; ->w : Symbol(w, Decl(null.ts, 17, 3)) ->I : Symbol(I, Decl(null.ts, 12, 1)) ->x : Symbol(x, Decl(null.ts, 17, 9)) ->y : Symbol(y, Decl(null.ts, 17, 16)) - - - diff --git a/tests/baselines/reference/null.types b/tests/baselines/reference/null.types deleted file mode 100644 index 7df551b1bde..00000000000 --- a/tests/baselines/reference/null.types +++ /dev/null @@ -1,59 +0,0 @@ -=== tests/cases/compiler/null.ts === -var x=null; ->x : any ->null : null - -var y=3+x; ->y : any ->3+x : any ->3 : number ->x : any - -var z=3+null; ->z : number ->3+null : number ->3 : number ->null : null - -class C { ->C : C -} -function f() { ->f : () => C - - return null; ->null : null - - return new C(); ->new C() : C ->C : typeof C -} -function g() { ->g : () => number - - return null; ->null : null - - return 3; ->3 : number -} -interface I { ->I : I - - x:any; ->x : any - - y:number; ->y : number -} -var w:I={x:null,y:3}; ->w : I ->I : I ->{x:null,y:3} : { x: null; y: number; } ->x : null ->null : null ->y : number ->3 : number - - - diff --git a/tests/baselines/reference/overloadOnConstAsTypeAnnotation.errors.txt b/tests/baselines/reference/overloadOnConstAsTypeAnnotation.errors.txt index 079951880ab..48f1ce1bd13 100644 --- a/tests/baselines/reference/overloadOnConstAsTypeAnnotation.errors.txt +++ b/tests/baselines/reference/overloadOnConstAsTypeAnnotation.errors.txt @@ -1,10 +1,13 @@ tests/cases/compiler/overloadOnConstAsTypeAnnotation.ts(1,8): error TS2382: Specialized overload signature is not assignable to any non-specialized signature. tests/cases/compiler/overloadOnConstAsTypeAnnotation.ts(1,37): error TS1005: ';' expected. +tests/cases/compiler/overloadOnConstAsTypeAnnotation.ts(1,53): error TS7027: Unreachable code detected. -==== tests/cases/compiler/overloadOnConstAsTypeAnnotation.ts (2 errors) ==== +==== tests/cases/compiler/overloadOnConstAsTypeAnnotation.ts (3 errors) ==== var f: (x: 'hi') => number = ('hi') => { return 1; }; ~~~~~~~~~~~~~~~~~~~ !!! error TS2382: Specialized overload signature is not assignable to any non-specialized signature. ~~ -!!! error TS1005: ';' expected. \ No newline at end of file +!!! error TS1005: ';' expected. + ~ +!!! error TS7027: Unreachable code detected. \ No newline at end of file diff --git a/tests/baselines/reference/parser10.1.1-8gs.errors.txt b/tests/baselines/reference/parser10.1.1-8gs.errors.txt index 185665d23da..c321ca1fff8 100644 --- a/tests/baselines/reference/parser10.1.1-8gs.errors.txt +++ b/tests/baselines/reference/parser10.1.1-8gs.errors.txt @@ -1,8 +1,9 @@ tests/cases/conformance/parser/ecmascript5/parser10.1.1-8gs.ts(16,7): error TS2304: Cannot find name 'NotEarlyError'. +tests/cases/conformance/parser/ecmascript5/parser10.1.1-8gs.ts(17,1): error TS7027: Unreachable code detected. tests/cases/conformance/parser/ecmascript5/parser10.1.1-8gs.ts(17,5): error TS1212: Identifier expected. 'public' is a reserved word in strict mode -==== tests/cases/conformance/parser/ecmascript5/parser10.1.1-8gs.ts (2 errors) ==== +==== tests/cases/conformance/parser/ecmascript5/parser10.1.1-8gs.ts (3 errors) ==== /// Copyright (c) 2012 Ecma International. All rights reserved. /// Ecma International makes this code available under the terms and conditions set /// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the @@ -22,6 +23,8 @@ tests/cases/conformance/parser/ecmascript5/parser10.1.1-8gs.ts(17,5): error TS12 ~~~~~~~~~~~~~ !!! error TS2304: Cannot find name 'NotEarlyError'. var public = 1; + ~~~ +!!! error TS7027: Unreachable code detected. ~~~~~~ !!! error TS1212: Identifier expected. 'public' is a reserved word in strict mode \ No newline at end of file diff --git a/tests/baselines/reference/parser768531.errors.txt b/tests/baselines/reference/parser768531.errors.txt new file mode 100644 index 00000000000..8298431e0e0 --- /dev/null +++ b/tests/baselines/reference/parser768531.errors.txt @@ -0,0 +1,8 @@ +tests/cases/conformance/parser/ecmascript5/Fuzz/parser768531.ts(1,2): error TS7028: Unused label. + + +==== tests/cases/conformance/parser/ecmascript5/Fuzz/parser768531.ts (1 errors) ==== + {a: 3} + ~ +!!! error TS7028: Unused label. + /x/ \ No newline at end of file diff --git a/tests/baselines/reference/parser768531.symbols b/tests/baselines/reference/parser768531.symbols deleted file mode 100644 index 2da2298c8e2..00000000000 --- a/tests/baselines/reference/parser768531.symbols +++ /dev/null @@ -1,4 +0,0 @@ -=== tests/cases/conformance/parser/ecmascript5/Fuzz/parser768531.ts === -{a: 3} -No type information for this code./x/ -No type information for this code. \ No newline at end of file diff --git a/tests/baselines/reference/parser768531.types b/tests/baselines/reference/parser768531.types deleted file mode 100644 index f1bcedefae9..00000000000 --- a/tests/baselines/reference/parser768531.types +++ /dev/null @@ -1,8 +0,0 @@ -=== tests/cases/conformance/parser/ecmascript5/Fuzz/parser768531.ts === -{a: 3} ->a : any ->3 : number - -/x/ ->/x/ : RegExp - diff --git a/tests/baselines/reference/parserErrorRecovery_ModuleElement1.errors.txt b/tests/baselines/reference/parserErrorRecovery_ModuleElement1.errors.txt index 4b8be3e17ad..05b31b7af8e 100644 --- a/tests/baselines/reference/parserErrorRecovery_ModuleElement1.errors.txt +++ b/tests/baselines/reference/parserErrorRecovery_ModuleElement1.errors.txt @@ -1,13 +1,16 @@ tests/cases/conformance/parser/ecmascript5/ErrorRecovery/ModuleElements/parserErrorRecovery_ModuleElement1.ts(2,1): error TS1128: Declaration or statement expected. +tests/cases/conformance/parser/ecmascript5/ErrorRecovery/ModuleElements/parserErrorRecovery_ModuleElement1.ts(3,1): error TS7027: Unreachable code detected. tests/cases/conformance/parser/ecmascript5/ErrorRecovery/ModuleElements/parserErrorRecovery_ModuleElement1.ts(4,1): error TS1128: Declaration or statement expected. -==== tests/cases/conformance/parser/ecmascript5/ErrorRecovery/ModuleElements/parserErrorRecovery_ModuleElement1.ts (2 errors) ==== +==== tests/cases/conformance/parser/ecmascript5/ErrorRecovery/ModuleElements/parserErrorRecovery_ModuleElement1.ts (3 errors) ==== return foo; } ~ !!! error TS1128: Declaration or statement expected. return bar; + ~~~~~~ +!!! error TS7027: Unreachable code detected. } ~ !!! error TS1128: Declaration or statement expected. \ No newline at end of file diff --git a/tests/baselines/reference/parserLabeledStatement1.d.errors.txt b/tests/baselines/reference/parserLabeledStatement1.d.errors.txt index 11de61548a3..2ce51b0bb4c 100644 --- a/tests/baselines/reference/parserLabeledStatement1.d.errors.txt +++ b/tests/baselines/reference/parserLabeledStatement1.d.errors.txt @@ -1,11 +1,14 @@ tests/cases/conformance/parser/ecmascript5/Statements/parserLabeledStatement1.d.ts(1,1): error TS1036: Statements are not allowed in ambient contexts. +tests/cases/conformance/parser/ecmascript5/Statements/parserLabeledStatement1.d.ts(1,1): error TS7028: Unused label. tests/cases/conformance/parser/ecmascript5/Statements/parserLabeledStatement1.d.ts(2,3): error TS2304: Cannot find name 'bar'. -==== tests/cases/conformance/parser/ecmascript5/Statements/parserLabeledStatement1.d.ts (2 errors) ==== +==== tests/cases/conformance/parser/ecmascript5/Statements/parserLabeledStatement1.d.ts (3 errors) ==== foo: ~~~ !!! error TS1036: Statements are not allowed in ambient contexts. + ~~~ +!!! error TS7028: Unused label. bar(); ~~~ !!! error TS2304: Cannot find name 'bar'. \ No newline at end of file diff --git a/tests/baselines/reference/parser_breakTarget3.errors.txt b/tests/baselines/reference/parser_breakTarget3.errors.txt new file mode 100644 index 00000000000..ad3123eda79 --- /dev/null +++ b/tests/baselines/reference/parser_breakTarget3.errors.txt @@ -0,0 +1,11 @@ +tests/cases/conformance/parser/ecmascript5/Statements/BreakStatements/parser_breakTarget3.ts(2,1): error TS7028: Unused label. + + +==== tests/cases/conformance/parser/ecmascript5/Statements/BreakStatements/parser_breakTarget3.ts (1 errors) ==== + target1: + target2: + ~~~~~~~ +!!! error TS7028: Unused label. + while (true) { + break target1; + } \ No newline at end of file diff --git a/tests/baselines/reference/parser_breakTarget3.symbols b/tests/baselines/reference/parser_breakTarget3.symbols deleted file mode 100644 index 99ec413987a..00000000000 --- a/tests/baselines/reference/parser_breakTarget3.symbols +++ /dev/null @@ -1,7 +0,0 @@ -=== tests/cases/conformance/parser/ecmascript5/Statements/BreakStatements/parser_breakTarget3.ts === -target1: -No type information for this code.target2: -No type information for this code.while (true) { -No type information for this code. break target1; -No type information for this code.} -No type information for this code. \ No newline at end of file diff --git a/tests/baselines/reference/parser_breakTarget3.types b/tests/baselines/reference/parser_breakTarget3.types deleted file mode 100644 index 7cdcb74d7da..00000000000 --- a/tests/baselines/reference/parser_breakTarget3.types +++ /dev/null @@ -1,13 +0,0 @@ -=== tests/cases/conformance/parser/ecmascript5/Statements/BreakStatements/parser_breakTarget3.ts === -target1: ->target1 : any - -target2: ->target2 : any - -while (true) { ->true : boolean - - break target1; ->target1 : any -} diff --git a/tests/baselines/reference/parser_breakTarget4.errors.txt b/tests/baselines/reference/parser_breakTarget4.errors.txt new file mode 100644 index 00000000000..8c61b20b0ed --- /dev/null +++ b/tests/baselines/reference/parser_breakTarget4.errors.txt @@ -0,0 +1,11 @@ +tests/cases/conformance/parser/ecmascript5/Statements/BreakStatements/parser_breakTarget4.ts(1,1): error TS7028: Unused label. + + +==== tests/cases/conformance/parser/ecmascript5/Statements/BreakStatements/parser_breakTarget4.ts (1 errors) ==== + target1: + ~~~~~~~ +!!! error TS7028: Unused label. + target2: + while (true) { + break target2; + } \ No newline at end of file diff --git a/tests/baselines/reference/parser_breakTarget4.symbols b/tests/baselines/reference/parser_breakTarget4.symbols deleted file mode 100644 index 042df67d9b2..00000000000 --- a/tests/baselines/reference/parser_breakTarget4.symbols +++ /dev/null @@ -1,7 +0,0 @@ -=== tests/cases/conformance/parser/ecmascript5/Statements/BreakStatements/parser_breakTarget4.ts === -target1: -No type information for this code.target2: -No type information for this code.while (true) { -No type information for this code. break target2; -No type information for this code.} -No type information for this code. \ No newline at end of file diff --git a/tests/baselines/reference/parser_breakTarget4.types b/tests/baselines/reference/parser_breakTarget4.types deleted file mode 100644 index 7315175800e..00000000000 --- a/tests/baselines/reference/parser_breakTarget4.types +++ /dev/null @@ -1,13 +0,0 @@ -=== tests/cases/conformance/parser/ecmascript5/Statements/BreakStatements/parser_breakTarget4.ts === -target1: ->target1 : any - -target2: ->target2 : any - -while (true) { ->true : boolean - - break target2; ->target2 : any -} diff --git a/tests/baselines/reference/parser_breakTarget5.errors.txt b/tests/baselines/reference/parser_breakTarget5.errors.txt index 8221cbebb4c..5943649c97b 100644 --- a/tests/baselines/reference/parser_breakTarget5.errors.txt +++ b/tests/baselines/reference/parser_breakTarget5.errors.txt @@ -1,8 +1,11 @@ +tests/cases/conformance/parser/ecmascript5/Statements/BreakStatements/parser_breakTarget5.ts(1,1): error TS7028: Unused label. tests/cases/conformance/parser/ecmascript5/Statements/BreakStatements/parser_breakTarget5.ts(5,7): error TS1107: Jump target cannot cross function boundary. -==== tests/cases/conformance/parser/ecmascript5/Statements/BreakStatements/parser_breakTarget5.ts (1 errors) ==== +==== tests/cases/conformance/parser/ecmascript5/Statements/BreakStatements/parser_breakTarget5.ts (2 errors) ==== target: + ~~~~~~ +!!! error TS7028: Unused label. while (true) { function f() { while (true) { diff --git a/tests/baselines/reference/parser_continueNotInIterationStatement4.errors.txt b/tests/baselines/reference/parser_continueNotInIterationStatement4.errors.txt index efade17a52a..94392259568 100644 --- a/tests/baselines/reference/parser_continueNotInIterationStatement4.errors.txt +++ b/tests/baselines/reference/parser_continueNotInIterationStatement4.errors.txt @@ -1,8 +1,11 @@ +tests/cases/conformance/parser/ecmascript5/Statements/ContinueStatements/parser_continueNotInIterationStatement4.ts(1,1): error TS7028: Unused label. tests/cases/conformance/parser/ecmascript5/Statements/ContinueStatements/parser_continueNotInIterationStatement4.ts(4,5): error TS1107: Jump target cannot cross function boundary. -==== tests/cases/conformance/parser/ecmascript5/Statements/ContinueStatements/parser_continueNotInIterationStatement4.ts (1 errors) ==== +==== tests/cases/conformance/parser/ecmascript5/Statements/ContinueStatements/parser_continueNotInIterationStatement4.ts (2 errors) ==== TWO: + ~~~ +!!! error TS7028: Unused label. while (true){ var x = () => { continue TWO; diff --git a/tests/baselines/reference/parser_continueTarget3.errors.txt b/tests/baselines/reference/parser_continueTarget3.errors.txt new file mode 100644 index 00000000000..4871cb275e7 --- /dev/null +++ b/tests/baselines/reference/parser_continueTarget3.errors.txt @@ -0,0 +1,11 @@ +tests/cases/conformance/parser/ecmascript5/Statements/ContinueStatements/parser_continueTarget3.ts(2,1): error TS7028: Unused label. + + +==== tests/cases/conformance/parser/ecmascript5/Statements/ContinueStatements/parser_continueTarget3.ts (1 errors) ==== + target1: + target2: + ~~~~~~~ +!!! error TS7028: Unused label. + while (true) { + continue target1; + } \ No newline at end of file diff --git a/tests/baselines/reference/parser_continueTarget3.symbols b/tests/baselines/reference/parser_continueTarget3.symbols deleted file mode 100644 index 2038671d215..00000000000 --- a/tests/baselines/reference/parser_continueTarget3.symbols +++ /dev/null @@ -1,7 +0,0 @@ -=== tests/cases/conformance/parser/ecmascript5/Statements/ContinueStatements/parser_continueTarget3.ts === -target1: -No type information for this code.target2: -No type information for this code.while (true) { -No type information for this code. continue target1; -No type information for this code.} -No type information for this code. \ No newline at end of file diff --git a/tests/baselines/reference/parser_continueTarget3.types b/tests/baselines/reference/parser_continueTarget3.types deleted file mode 100644 index 33c931c7959..00000000000 --- a/tests/baselines/reference/parser_continueTarget3.types +++ /dev/null @@ -1,13 +0,0 @@ -=== tests/cases/conformance/parser/ecmascript5/Statements/ContinueStatements/parser_continueTarget3.ts === -target1: ->target1 : any - -target2: ->target2 : any - -while (true) { ->true : boolean - - continue target1; ->target1 : any -} diff --git a/tests/baselines/reference/parser_continueTarget4.errors.txt b/tests/baselines/reference/parser_continueTarget4.errors.txt new file mode 100644 index 00000000000..6089ea60cf7 --- /dev/null +++ b/tests/baselines/reference/parser_continueTarget4.errors.txt @@ -0,0 +1,11 @@ +tests/cases/conformance/parser/ecmascript5/Statements/ContinueStatements/parser_continueTarget4.ts(1,1): error TS7028: Unused label. + + +==== tests/cases/conformance/parser/ecmascript5/Statements/ContinueStatements/parser_continueTarget4.ts (1 errors) ==== + target1: + ~~~~~~~ +!!! error TS7028: Unused label. + target2: + while (true) { + continue target2; + } \ No newline at end of file diff --git a/tests/baselines/reference/parser_continueTarget4.symbols b/tests/baselines/reference/parser_continueTarget4.symbols deleted file mode 100644 index 2b47099715e..00000000000 --- a/tests/baselines/reference/parser_continueTarget4.symbols +++ /dev/null @@ -1,7 +0,0 @@ -=== tests/cases/conformance/parser/ecmascript5/Statements/ContinueStatements/parser_continueTarget4.ts === -target1: -No type information for this code.target2: -No type information for this code.while (true) { -No type information for this code. continue target2; -No type information for this code.} -No type information for this code. \ No newline at end of file diff --git a/tests/baselines/reference/parser_continueTarget4.types b/tests/baselines/reference/parser_continueTarget4.types deleted file mode 100644 index cb0367283ce..00000000000 --- a/tests/baselines/reference/parser_continueTarget4.types +++ /dev/null @@ -1,13 +0,0 @@ -=== tests/cases/conformance/parser/ecmascript5/Statements/ContinueStatements/parser_continueTarget4.ts === -target1: ->target1 : any - -target2: ->target2 : any - -while (true) { ->true : boolean - - continue target2; ->target2 : any -} diff --git a/tests/baselines/reference/parser_continueTarget5.errors.txt b/tests/baselines/reference/parser_continueTarget5.errors.txt index ffeee7a07b3..b9b1f2edb94 100644 --- a/tests/baselines/reference/parser_continueTarget5.errors.txt +++ b/tests/baselines/reference/parser_continueTarget5.errors.txt @@ -1,8 +1,11 @@ +tests/cases/conformance/parser/ecmascript5/Statements/ContinueStatements/parser_continueTarget5.ts(1,1): error TS7028: Unused label. tests/cases/conformance/parser/ecmascript5/Statements/ContinueStatements/parser_continueTarget5.ts(5,7): error TS1107: Jump target cannot cross function boundary. -==== tests/cases/conformance/parser/ecmascript5/Statements/ContinueStatements/parser_continueTarget5.ts (1 errors) ==== +==== tests/cases/conformance/parser/ecmascript5/Statements/ContinueStatements/parser_continueTarget5.ts (2 errors) ==== target: + ~~~~~~ +!!! error TS7028: Unused label. while (true) { function f() { while (true) { diff --git a/tests/baselines/reference/parser_duplicateLabel1.errors.txt b/tests/baselines/reference/parser_duplicateLabel1.errors.txt index 4733a240e36..a4319aaa7b9 100644 --- a/tests/baselines/reference/parser_duplicateLabel1.errors.txt +++ b/tests/baselines/reference/parser_duplicateLabel1.errors.txt @@ -1,8 +1,11 @@ +tests/cases/conformance/parser/ecmascript5/Statements/LabeledStatements/parser_duplicateLabel1.ts(1,1): error TS7028: Unused label. tests/cases/conformance/parser/ecmascript5/Statements/LabeledStatements/parser_duplicateLabel1.ts(2,1): error TS1114: Duplicate label 'target' -==== tests/cases/conformance/parser/ecmascript5/Statements/LabeledStatements/parser_duplicateLabel1.ts (1 errors) ==== +==== tests/cases/conformance/parser/ecmascript5/Statements/LabeledStatements/parser_duplicateLabel1.ts (2 errors) ==== target: + ~~~~~~ +!!! error TS7028: Unused label. target: ~~~~~~ !!! error TS1114: Duplicate label 'target' diff --git a/tests/baselines/reference/parser_duplicateLabel2.errors.txt b/tests/baselines/reference/parser_duplicateLabel2.errors.txt index 92078593e47..123949fa5aa 100644 --- a/tests/baselines/reference/parser_duplicateLabel2.errors.txt +++ b/tests/baselines/reference/parser_duplicateLabel2.errors.txt @@ -1,8 +1,11 @@ +tests/cases/conformance/parser/ecmascript5/Statements/LabeledStatements/parser_duplicateLabel2.ts(1,1): error TS7028: Unused label. tests/cases/conformance/parser/ecmascript5/Statements/LabeledStatements/parser_duplicateLabel2.ts(3,3): error TS1114: Duplicate label 'target' -==== tests/cases/conformance/parser/ecmascript5/Statements/LabeledStatements/parser_duplicateLabel2.ts (1 errors) ==== +==== tests/cases/conformance/parser/ecmascript5/Statements/LabeledStatements/parser_duplicateLabel2.ts (2 errors) ==== target: + ~~~~~~ +!!! error TS7028: Unused label. while (true) { target: ~~~~~~ diff --git a/tests/baselines/reference/parser_duplicateLabel3.errors.txt b/tests/baselines/reference/parser_duplicateLabel3.errors.txt new file mode 100644 index 00000000000..a933588f538 --- /dev/null +++ b/tests/baselines/reference/parser_duplicateLabel3.errors.txt @@ -0,0 +1,17 @@ +tests/cases/conformance/parser/ecmascript5/Statements/LabeledStatements/parser_duplicateLabel3.ts(1,1): error TS7028: Unused label. +tests/cases/conformance/parser/ecmascript5/Statements/LabeledStatements/parser_duplicateLabel3.ts(4,5): error TS7028: Unused label. + + +==== tests/cases/conformance/parser/ecmascript5/Statements/LabeledStatements/parser_duplicateLabel3.ts (2 errors) ==== + target: + ~~~~~~ +!!! error TS7028: Unused label. + while (true) { + function f() { + target: + ~~~~~~ +!!! error TS7028: Unused label. + while (true) { + } + } + } \ No newline at end of file diff --git a/tests/baselines/reference/parser_duplicateLabel3.symbols b/tests/baselines/reference/parser_duplicateLabel3.symbols deleted file mode 100644 index 20627a0e2b8..00000000000 --- a/tests/baselines/reference/parser_duplicateLabel3.symbols +++ /dev/null @@ -1,11 +0,0 @@ -=== tests/cases/conformance/parser/ecmascript5/Statements/LabeledStatements/parser_duplicateLabel3.ts === -target: -while (true) { - function f() { ->f : Symbol(f, Decl(parser_duplicateLabel3.ts, 1, 14)) - - target: - while (true) { - } - } -} diff --git a/tests/baselines/reference/parser_duplicateLabel3.types b/tests/baselines/reference/parser_duplicateLabel3.types deleted file mode 100644 index 05cfe708161..00000000000 --- a/tests/baselines/reference/parser_duplicateLabel3.types +++ /dev/null @@ -1,18 +0,0 @@ -=== tests/cases/conformance/parser/ecmascript5/Statements/LabeledStatements/parser_duplicateLabel3.ts === -target: ->target : any - -while (true) { ->true : boolean - - function f() { ->f : () => void - - target: ->target : any - - while (true) { ->true : boolean - } - } -} diff --git a/tests/baselines/reference/parser_duplicateLabel4.errors.txt b/tests/baselines/reference/parser_duplicateLabel4.errors.txt new file mode 100644 index 00000000000..4a0108ebe06 --- /dev/null +++ b/tests/baselines/reference/parser_duplicateLabel4.errors.txt @@ -0,0 +1,16 @@ +tests/cases/conformance/parser/ecmascript5/Statements/LabeledStatements/parser_duplicateLabel4.ts(1,1): error TS7028: Unused label. +tests/cases/conformance/parser/ecmascript5/Statements/LabeledStatements/parser_duplicateLabel4.ts(5,1): error TS7027: Unreachable code detected. + + +==== tests/cases/conformance/parser/ecmascript5/Statements/LabeledStatements/parser_duplicateLabel4.ts (2 errors) ==== + target: + ~~~~~~ +!!! error TS7028: Unused label. + while (true) { + } + + target: + ~~~~~~ +!!! error TS7027: Unreachable code detected. + while (true) { + } \ No newline at end of file diff --git a/tests/baselines/reference/parser_duplicateLabel4.symbols b/tests/baselines/reference/parser_duplicateLabel4.symbols deleted file mode 100644 index 564531bf71b..00000000000 --- a/tests/baselines/reference/parser_duplicateLabel4.symbols +++ /dev/null @@ -1,9 +0,0 @@ -=== tests/cases/conformance/parser/ecmascript5/Statements/LabeledStatements/parser_duplicateLabel4.ts === -target: -No type information for this code.while (true) { -No type information for this code.} -No type information for this code. -No type information for this code.target: -No type information for this code.while (true) { -No type information for this code.} -No type information for this code. \ No newline at end of file diff --git a/tests/baselines/reference/parser_duplicateLabel4.types b/tests/baselines/reference/parser_duplicateLabel4.types deleted file mode 100644 index d09529301ca..00000000000 --- a/tests/baselines/reference/parser_duplicateLabel4.types +++ /dev/null @@ -1,14 +0,0 @@ -=== tests/cases/conformance/parser/ecmascript5/Statements/LabeledStatements/parser_duplicateLabel4.ts === -target: ->target : any - -while (true) { ->true : boolean -} - -target: ->target : any - -while (true) { ->true : boolean -} diff --git a/tests/baselines/reference/privacyFunctionCannotNameReturnTypeDeclFile.errors.txt b/tests/baselines/reference/privacyFunctionCannotNameReturnTypeDeclFile.errors.txt index bc6229815f5..0f148b6a20e 100644 --- a/tests/baselines/reference/privacyFunctionCannotNameReturnTypeDeclFile.errors.txt +++ b/tests/baselines/reference/privacyFunctionCannotNameReturnTypeDeclFile.errors.txt @@ -1,7 +1,19 @@ tests/cases/compiler/privacyFunctionReturnTypeDeclFile_consumer.ts(3,12): error TS4050: Return type of public static method from exported class has or is using name 'Widget1' from external module "tests/cases/compiler/privacyFunctionReturnTypeDeclFile_Widgets" but cannot be named. +tests/cases/compiler/privacyFunctionReturnTypeDeclFile_consumer.ts(7,49): error TS7027: Unreachable code detected. tests/cases/compiler/privacyFunctionReturnTypeDeclFile_consumer.ts(9,5): error TS4053: Return type of public method from exported class has or is using name 'Widget1' from external module "tests/cases/compiler/privacyFunctionReturnTypeDeclFile_Widgets" but cannot be named. +tests/cases/compiler/privacyFunctionReturnTypeDeclFile_consumer.ts(10,49): error TS7027: Unreachable code detected. +tests/cases/compiler/privacyFunctionReturnTypeDeclFile_consumer.ts(13,49): error TS7027: Unreachable code detected. tests/cases/compiler/privacyFunctionReturnTypeDeclFile_consumer.ts(15,12): error TS4050: Return type of public static method from exported class has or is using name 'Widget3' from external module "GlobalWidgets" but cannot be named. +tests/cases/compiler/privacyFunctionReturnTypeDeclFile_consumer.ts(19,49): error TS7027: Unreachable code detected. tests/cases/compiler/privacyFunctionReturnTypeDeclFile_consumer.ts(21,5): error TS4053: Return type of public method from exported class has or is using name 'Widget3' from external module "GlobalWidgets" but cannot be named. +tests/cases/compiler/privacyFunctionReturnTypeDeclFile_consumer.ts(22,49): error TS7027: Unreachable code detected. +tests/cases/compiler/privacyFunctionReturnTypeDeclFile_consumer.ts(25,49): error TS7027: Unreachable code detected. +tests/cases/compiler/privacyFunctionReturnTypeDeclFile_consumer.ts(34,49): error TS7027: Unreachable code detected. +tests/cases/compiler/privacyFunctionReturnTypeDeclFile_consumer.ts(37,49): error TS7027: Unreachable code detected. +tests/cases/compiler/privacyFunctionReturnTypeDeclFile_consumer.ts(40,49): error TS7027: Unreachable code detected. +tests/cases/compiler/privacyFunctionReturnTypeDeclFile_consumer.ts(46,49): error TS7027: Unreachable code detected. +tests/cases/compiler/privacyFunctionReturnTypeDeclFile_consumer.ts(49,49): error TS7027: Unreachable code detected. +tests/cases/compiler/privacyFunctionReturnTypeDeclFile_consumer.ts(52,49): error TS7027: Unreachable code detected. tests/cases/compiler/privacyFunctionReturnTypeDeclFile_consumer.ts(56,17): error TS4058: Return type of exported function has or is using name 'Widget1' from external module "tests/cases/compiler/privacyFunctionReturnTypeDeclFile_Widgets" but cannot be named. tests/cases/compiler/privacyFunctionReturnTypeDeclFile_consumer.ts(62,17): error TS4058: Return type of exported function has or is using name 'Widget3' from external module "GlobalWidgets" but cannot be named. tests/cases/compiler/privacyFunctionReturnTypeDeclFile_consumer.ts(70,12): error TS4050: Return type of public static method from exported class has or is using name 'SpecializedWidget.Widget2' from external module "tests/cases/compiler/privacyFunctionReturnTypeDeclFile_Widgets" but cannot be named. @@ -12,7 +24,7 @@ tests/cases/compiler/privacyFunctionReturnTypeDeclFile_consumer.ts(83,17): error tests/cases/compiler/privacyFunctionReturnTypeDeclFile_consumer.ts(86,17): error TS4058: Return type of exported function has or is using name 'SpecializedGlobalWidget.Widget4' from external module "GlobalWidgets" but cannot be named. -==== tests/cases/compiler/privacyFunctionReturnTypeDeclFile_consumer.ts (12 errors) ==== +==== tests/cases/compiler/privacyFunctionReturnTypeDeclFile_consumer.ts (24 errors) ==== import exporter = require("./privacyFunctionReturnTypeDeclFile_exporter"); export class publicClassWithWithPrivateParmeterTypes { static myPublicStaticMethod() { // Error @@ -22,14 +34,20 @@ tests/cases/compiler/privacyFunctionReturnTypeDeclFile_consumer.ts(86,17): error } private static myPrivateStaticMethod() { return exporter.createExportedWidget1();; + ~ +!!! error TS7027: Unreachable code detected. } myPublicMethod() { // Error ~~~~~~~~~~~~~~ !!! error TS4053: Return type of public method from exported class has or is using name 'Widget1' from external module "tests/cases/compiler/privacyFunctionReturnTypeDeclFile_Widgets" but cannot be named. return exporter.createExportedWidget1();; + ~ +!!! error TS7027: Unreachable code detected. } private myPrivateMethod() { return exporter.createExportedWidget1();; + ~ +!!! error TS7027: Unreachable code detected. } static myPublicStaticMethod1() { // Error ~~~~~~~~~~~~~~~~~~~~~ @@ -38,14 +56,20 @@ tests/cases/compiler/privacyFunctionReturnTypeDeclFile_consumer.ts(86,17): error } private static myPrivateStaticMethod1() { return exporter.createExportedWidget3();; + ~ +!!! error TS7027: Unreachable code detected. } myPublicMethod1() { // Error ~~~~~~~~~~~~~~~ !!! error TS4053: Return type of public method from exported class has or is using name 'Widget3' from external module "GlobalWidgets" but cannot be named. return exporter.createExportedWidget3();; + ~ +!!! error TS7027: Unreachable code detected. } private myPrivateMethod1() { return exporter.createExportedWidget3();; + ~ +!!! error TS7027: Unreachable code detected. } } @@ -55,24 +79,36 @@ tests/cases/compiler/privacyFunctionReturnTypeDeclFile_consumer.ts(86,17): error } private static myPrivateStaticMethod() { return exporter.createExportedWidget1();; + ~ +!!! error TS7027: Unreachable code detected. } myPublicMethod() { return exporter.createExportedWidget1();; + ~ +!!! error TS7027: Unreachable code detected. } private myPrivateMethod() { return exporter.createExportedWidget1();; + ~ +!!! error TS7027: Unreachable code detected. } static myPublicStaticMethod1() { return exporter.createExportedWidget3(); } private static myPrivateStaticMethod1() { return exporter.createExportedWidget3();; + ~ +!!! error TS7027: Unreachable code detected. } myPublicMethod1() { return exporter.createExportedWidget3();; + ~ +!!! error TS7027: Unreachable code detected. } private myPrivateMethod1() { return exporter.createExportedWidget3();; + ~ +!!! error TS7027: Unreachable code detected. } } diff --git a/tests/baselines/reference/reachabilityChecks1.errors.txt b/tests/baselines/reference/reachabilityChecks1.errors.txt index 7708867c26c..18a453969a1 100644 --- a/tests/baselines/reference/reachabilityChecks1.errors.txt +++ b/tests/baselines/reference/reachabilityChecks1.errors.txt @@ -1,23 +1,23 @@ tests/cases/compiler/reachabilityChecks1.ts(3,1): error TS7027: Unreachable code detected. tests/cases/compiler/reachabilityChecks1.ts(7,5): error TS7027: Unreachable code detected. -tests/cases/compiler/reachabilityChecks1.ts(19,12): error TS7027: Unreachable code detected. -tests/cases/compiler/reachabilityChecks1.ts(31,12): error TS7027: Unreachable code detected. -tests/cases/compiler/reachabilityChecks1.ts(48,11): error TS7027: Unreachable code detected. -tests/cases/compiler/reachabilityChecks1.ts(61,10): error TS7027: Unreachable code detected. -tests/cases/compiler/reachabilityChecks1.ts(70,16): error TS7027: Unreachable code detected. +tests/cases/compiler/reachabilityChecks1.ts(19,5): error TS7027: Unreachable code detected. +tests/cases/compiler/reachabilityChecks1.ts(31,5): error TS7027: Unreachable code detected. +tests/cases/compiler/reachabilityChecks1.ts(48,5): error TS7027: Unreachable code detected. +tests/cases/compiler/reachabilityChecks1.ts(61,5): error TS7027: Unreachable code detected. +tests/cases/compiler/reachabilityChecks1.ts(70,5): error TS7027: Unreachable code detected. ==== tests/cases/compiler/reachabilityChecks1.ts (7 errors) ==== while (true); var x = 1; - ~~~~~~~~~~ + ~~~ !!! error TS7027: Unreachable code detected. module A { while (true); let x; - ~~~~~~ + ~~~ !!! error TS7027: Unreachable code detected. } @@ -31,7 +31,7 @@ tests/cases/compiler/reachabilityChecks1.ts(70,16): error TS7027: Unreachable co module A2 { while (true); module A { - ~ + ~~~~~~ !!! error TS7027: Unreachable code detected. var x = 1; } @@ -45,7 +45,7 @@ tests/cases/compiler/reachabilityChecks1.ts(70,16): error TS7027: Unreachable co module A4 { while (true); module A { - ~ + ~~~~~~ !!! error TS7027: Unreachable code detected. const enum E { X } } @@ -64,7 +64,7 @@ tests/cases/compiler/reachabilityChecks1.ts(70,16): error TS7027: Unreachable co function f2() { return; class A { - ~ + ~~~~~ !!! error TS7027: Unreachable code detected. } } @@ -79,7 +79,7 @@ tests/cases/compiler/reachabilityChecks1.ts(70,16): error TS7027: Unreachable co do { } while (true); enum E { - ~ + ~~~~ !!! error TS7027: Unreachable code detected. X = 1 } @@ -90,7 +90,7 @@ tests/cases/compiler/reachabilityChecks1.ts(70,16): error TS7027: Unreachable co throw new Error(); } const enum E { - ~ + ~~~~~ !!! error TS7027: Unreachable code detected. X = 1 } diff --git a/tests/baselines/reference/reachabilityChecks2.errors.txt b/tests/baselines/reference/reachabilityChecks2.errors.txt index 3de7adc50a6..cd48f84f8e1 100644 --- a/tests/baselines/reference/reachabilityChecks2.errors.txt +++ b/tests/baselines/reference/reachabilityChecks2.errors.txt @@ -1,4 +1,4 @@ -tests/cases/compiler/reachabilityChecks2.ts(5,8): error TS7027: Unreachable code detected. +tests/cases/compiler/reachabilityChecks2.ts(5,1): error TS7027: Unreachable code detected. ==== tests/cases/compiler/reachabilityChecks2.ts (1 errors) ==== @@ -7,7 +7,7 @@ tests/cases/compiler/reachabilityChecks2.ts(5,8): error TS7027: Unreachable code const enum E { X } module A4 { - ~~ + ~~~~~~ !!! error TS7027: Unreachable code detected. while (true); module A { diff --git a/tests/baselines/reference/reachabilityChecks3.errors.txt b/tests/baselines/reference/reachabilityChecks3.errors.txt index 993ab571b2e..1114f245f44 100644 --- a/tests/baselines/reference/reachabilityChecks3.errors.txt +++ b/tests/baselines/reference/reachabilityChecks3.errors.txt @@ -1,7 +1,9 @@ tests/cases/compiler/reachabilityChecks3.ts(3,1): error TS7028: Unused label. +tests/cases/compiler/reachabilityChecks3.ts(12,5): error TS7028: Unused label. +tests/cases/compiler/reachabilityChecks3.ts(15,17): error TS7028: Unused label. -==== tests/cases/compiler/reachabilityChecks3.ts (1 errors) ==== +==== tests/cases/compiler/reachabilityChecks3.ts (3 errors) ==== let x = 1; loop: while (true) { @@ -13,4 +15,13 @@ tests/cases/compiler/reachabilityChecks3.ts(3,1): error TS7028: Unused label. else { x++; } - } \ No newline at end of file + } + { + x: 100 + ~ +!!! error TS7028: Unused label. + } + + var y = () => { f: 1 } + ~ +!!! error TS7028: Unused label. \ No newline at end of file diff --git a/tests/baselines/reference/reachabilityChecks3.js b/tests/baselines/reference/reachabilityChecks3.js index 4de316d1ddc..dd22453938d 100644 --- a/tests/baselines/reference/reachabilityChecks3.js +++ b/tests/baselines/reference/reachabilityChecks3.js @@ -8,7 +8,12 @@ loop: while (true) { else { x++; } -} +} +{ + x: 100 +} + +var y = () => { f: 1 } //// [reachabilityChecks3.js] var x = 1; @@ -20,3 +25,7 @@ loop: while (true) { x++; } } +{ + x: 100; +} +var y = function () { f: 1; }; diff --git a/tests/baselines/reference/reachabilityChecks5.errors.txt b/tests/baselines/reference/reachabilityChecks5.errors.txt index c30dfa71817..147dbe264a3 100644 --- a/tests/baselines/reference/reachabilityChecks5.errors.txt +++ b/tests/baselines/reference/reachabilityChecks5.errors.txt @@ -109,7 +109,7 @@ tests/cases/compiler/reachabilityChecks5.ts(123,13): error TS7027: Unreachable c } else { return 1; - ~~~~~~~~~ + ~~~~~~ !!! error TS7027: Unreachable code detected. } } @@ -152,7 +152,7 @@ tests/cases/compiler/reachabilityChecks5.ts(123,13): error TS7027: Unreachable c break test; } while (true); x++; - ~~~~ + ~ !!! error TS7027: Unreachable code detected. } while (true); } diff --git a/tests/baselines/reference/recursiveLetConst.errors.txt b/tests/baselines/reference/recursiveLetConst.errors.txt index b02d0819a3f..88ecb379e5e 100644 --- a/tests/baselines/reference/recursiveLetConst.errors.txt +++ b/tests/baselines/reference/recursiveLetConst.errors.txt @@ -3,6 +3,7 @@ tests/cases/compiler/recursiveLetConst.ts(3,12): error TS2448: Block-scoped vari tests/cases/compiler/recursiveLetConst.ts(4,11): error TS2448: Block-scoped variable 'y' used before its declaration. tests/cases/compiler/recursiveLetConst.ts(5,14): error TS2448: Block-scoped variable 'y1' used before its declaration. tests/cases/compiler/recursiveLetConst.ts(6,14): error TS2448: Block-scoped variable 'v' used before its declaration. +tests/cases/compiler/recursiveLetConst.ts(7,1): error TS7027: Unreachable code detected. tests/cases/compiler/recursiveLetConst.ts(7,16): error TS2448: Block-scoped variable 'v' used before its declaration. tests/cases/compiler/recursiveLetConst.ts(8,15): error TS2448: Block-scoped variable 'v' used before its declaration. tests/cases/compiler/recursiveLetConst.ts(9,15): error TS2448: Block-scoped variable 'v' used before its declaration. @@ -10,7 +11,7 @@ tests/cases/compiler/recursiveLetConst.ts(10,17): error TS2448: Block-scoped var tests/cases/compiler/recursiveLetConst.ts(11,11): error TS2448: Block-scoped variable 'x2' used before its declaration. -==== tests/cases/compiler/recursiveLetConst.ts (10 errors) ==== +==== tests/cases/compiler/recursiveLetConst.ts (11 errors) ==== 'use strict' let x = x + 1; ~ @@ -28,6 +29,8 @@ tests/cases/compiler/recursiveLetConst.ts(11,11): error TS2448: Block-scoped var ~ !!! error TS2448: Block-scoped variable 'v' used before its declaration. for (let [v] = v; ;) { } + ~~~ +!!! error TS7027: Unreachable code detected. ~ !!! error TS2448: Block-scoped variable 'v' used before its declaration. for (let v in v) { } diff --git a/tests/baselines/reference/recursiveMods.errors.txt b/tests/baselines/reference/recursiveMods.errors.txt new file mode 100644 index 00000000000..6adba78d004 --- /dev/null +++ b/tests/baselines/reference/recursiveMods.errors.txt @@ -0,0 +1,29 @@ +tests/cases/compiler/recursiveMods.ts(9,3): error TS7027: Unreachable code detected. + + +==== tests/cases/compiler/recursiveMods.ts (1 errors) ==== + export module Foo { + export class C {} + } + + export module Foo { + + function Bar() : C { + if (true) { return Bar();} + return new C(); + ~~~~~~ +!!! error TS7027: Unreachable code detected. + } + + function Baz() : C { + var c = Baz(); + return Bar(); + } + + function Gar() { + var c : C = Baz(); + return; + } + + } + \ No newline at end of file diff --git a/tests/baselines/reference/recursiveMods.symbols b/tests/baselines/reference/recursiveMods.symbols deleted file mode 100644 index 1e7e8fa1c84..00000000000 --- a/tests/baselines/reference/recursiveMods.symbols +++ /dev/null @@ -1,47 +0,0 @@ -=== tests/cases/compiler/recursiveMods.ts === -export module Foo { ->Foo : Symbol(Foo, Decl(recursiveMods.ts, 0, 0), Decl(recursiveMods.ts, 2, 1)) - - export class C {} ->C : Symbol(C, Decl(recursiveMods.ts, 0, 19)) -} - -export module Foo { ->Foo : Symbol(Foo, Decl(recursiveMods.ts, 0, 0), Decl(recursiveMods.ts, 2, 1)) - - function Bar() : C { ->Bar : Symbol(Bar, Decl(recursiveMods.ts, 4, 19)) ->C : Symbol(C, Decl(recursiveMods.ts, 0, 19)) - - if (true) { return Bar();} ->Bar : Symbol(Bar, Decl(recursiveMods.ts, 4, 19)) - - return new C(); ->C : Symbol(C, Decl(recursiveMods.ts, 0, 19)) - } - - function Baz() : C { ->Baz : Symbol(Baz, Decl(recursiveMods.ts, 9, 2)) ->C : Symbol(C, Decl(recursiveMods.ts, 0, 19)) - - var c = Baz(); ->c : Symbol(c, Decl(recursiveMods.ts, 12, 5)) ->Baz : Symbol(Baz, Decl(recursiveMods.ts, 9, 2)) - - return Bar(); ->Bar : Symbol(Bar, Decl(recursiveMods.ts, 4, 19)) - } - - function Gar() { ->Gar : Symbol(Gar, Decl(recursiveMods.ts, 14, 2)) - - var c : C = Baz(); ->c : Symbol(c, Decl(recursiveMods.ts, 17, 5)) ->C : Symbol(C, Decl(recursiveMods.ts, 0, 19)) ->Baz : Symbol(Baz, Decl(recursiveMods.ts, 9, 2)) - - return; - } - -} - diff --git a/tests/baselines/reference/recursiveMods.types b/tests/baselines/reference/recursiveMods.types deleted file mode 100644 index d7f28f84975..00000000000 --- a/tests/baselines/reference/recursiveMods.types +++ /dev/null @@ -1,53 +0,0 @@ -=== tests/cases/compiler/recursiveMods.ts === -export module Foo { ->Foo : typeof Foo - - export class C {} ->C : C -} - -export module Foo { ->Foo : typeof Foo - - function Bar() : C { ->Bar : () => C ->C : C - - if (true) { return Bar();} ->true : boolean ->Bar() : C ->Bar : () => C - - return new C(); ->new C() : C ->C : typeof C - } - - function Baz() : C { ->Baz : () => C ->C : C - - var c = Baz(); ->c : C ->Baz() : C ->Baz : () => C - - return Bar(); ->Bar() : C ->Bar : () => C - } - - function Gar() { ->Gar : () => void - - var c : C = Baz(); ->c : C ->C : C ->Baz() : C ->Baz : () => C - - return; - } - -} - diff --git a/tests/baselines/reference/recursiveNamedLambdaCall.errors.txt b/tests/baselines/reference/recursiveNamedLambdaCall.errors.txt index 7729d1e780f..04ddc371ac7 100644 --- a/tests/baselines/reference/recursiveNamedLambdaCall.errors.txt +++ b/tests/baselines/reference/recursiveNamedLambdaCall.errors.txt @@ -1,11 +1,12 @@ tests/cases/compiler/recursiveNamedLambdaCall.ts(3,8): error TS2304: Cannot find name 'top'. tests/cases/compiler/recursiveNamedLambdaCall.ts(3,15): error TS2304: Cannot find name 'top'. +tests/cases/compiler/recursiveNamedLambdaCall.ts(7,6): error TS7027: Unreachable code detected. tests/cases/compiler/recursiveNamedLambdaCall.ts(8,7): error TS2304: Cannot find name 'top'. tests/cases/compiler/recursiveNamedLambdaCall.ts(10,14): error TS2304: Cannot find name 'setTimeout'. tests/cases/compiler/recursiveNamedLambdaCall.ts(14,6): error TS2304: Cannot find name 'detach'. -==== tests/cases/compiler/recursiveNamedLambdaCall.ts (5 errors) ==== +==== tests/cases/compiler/recursiveNamedLambdaCall.ts (6 errors) ==== var promise = function( obj ) { if ( top && top.doScroll ) { @@ -17,6 +18,8 @@ tests/cases/compiler/recursiveNamedLambdaCall.ts(14,6): error TS2304: Cannot fin if ( false ) { try { + ~~~ +!!! error TS7027: Unreachable code detected. top.doScroll("left"); ~~~ !!! error TS2304: Cannot find name 'top'. diff --git a/tests/baselines/reference/reservedWords2.errors.txt b/tests/baselines/reference/reservedWords2.errors.txt index 090b2d0d43e..d6e2d04073d 100644 --- a/tests/baselines/reference/reservedWords2.errors.txt +++ b/tests/baselines/reference/reservedWords2.errors.txt @@ -14,6 +14,7 @@ tests/cases/compiler/reservedWords2.ts(5,9): error TS2300: Duplicate identifier tests/cases/compiler/reservedWords2.ts(5,10): error TS1003: Identifier expected. tests/cases/compiler/reservedWords2.ts(5,18): error TS1005: '=>' expected. tests/cases/compiler/reservedWords2.ts(6,1): error TS2304: Cannot find name 'module'. +tests/cases/compiler/reservedWords2.ts(6,1): error TS7027: Unreachable code detected. tests/cases/compiler/reservedWords2.ts(6,8): error TS1005: ';' expected. tests/cases/compiler/reservedWords2.ts(7,11): error TS2300: Duplicate identifier '(Missing)'. tests/cases/compiler/reservedWords2.ts(7,11): error TS1005: ':' expected. @@ -31,7 +32,7 @@ tests/cases/compiler/reservedWords2.ts(10,5): error TS2300: Duplicate identifier tests/cases/compiler/reservedWords2.ts(10,6): error TS1003: Identifier expected. -==== tests/cases/compiler/reservedWords2.ts (31 errors) ==== +==== tests/cases/compiler/reservedWords2.ts (32 errors) ==== import while = require("dfdf"); ~~~~~~ !!! error TS1148: Cannot compile modules unless the '--module' flag is provided. @@ -70,6 +71,8 @@ tests/cases/compiler/reservedWords2.ts(10,6): error TS1003: Identifier expected. module void {} ~~~~~~ !!! error TS2304: Cannot find name 'module'. + ~~~~~~ +!!! error TS7027: Unreachable code detected. ~~~~ !!! error TS1005: ';' expected. var {while, return} = { while: 1, return: 2 }; diff --git a/tests/baselines/reference/returnStatement1.errors.txt b/tests/baselines/reference/returnStatement1.errors.txt new file mode 100644 index 00000000000..af17564a874 --- /dev/null +++ b/tests/baselines/reference/returnStatement1.errors.txt @@ -0,0 +1,12 @@ +tests/cases/compiler/returnStatement1.ts(5,5): error TS7027: Unreachable code detected. + + +==== tests/cases/compiler/returnStatement1.ts (1 errors) ==== + function f() { + return function (s) { + var x = s; + }; + ("harmless extra line"); + ~ +!!! error TS7027: Unreachable code detected. + } \ No newline at end of file diff --git a/tests/baselines/reference/returnStatement1.symbols b/tests/baselines/reference/returnStatement1.symbols deleted file mode 100644 index acec9f76003..00000000000 --- a/tests/baselines/reference/returnStatement1.symbols +++ /dev/null @@ -1,14 +0,0 @@ -=== tests/cases/compiler/returnStatement1.ts === -function f() { ->f : Symbol(f, Decl(returnStatement1.ts, 0, 0)) - - return function (s) { ->s : Symbol(s, Decl(returnStatement1.ts, 1, 21)) - - var x = s; ->x : Symbol(x, Decl(returnStatement1.ts, 2, 11)) ->s : Symbol(s, Decl(returnStatement1.ts, 1, 21)) - - }; - ("harmless extra line"); -} diff --git a/tests/baselines/reference/returnStatement1.types b/tests/baselines/reference/returnStatement1.types deleted file mode 100644 index ff30148af5a..00000000000 --- a/tests/baselines/reference/returnStatement1.types +++ /dev/null @@ -1,17 +0,0 @@ -=== tests/cases/compiler/returnStatement1.ts === -function f() { ->f : () => (s: any) => void - - return function (s) { ->function (s) { var x = s; } : (s: any) => void ->s : any - - var x = s; ->x : any ->s : any - - }; - ("harmless extra line"); ->("harmless extra line") : string ->"harmless extra line" : string -} diff --git a/tests/baselines/reference/scanner10.1.1-8gs.errors.txt b/tests/baselines/reference/scanner10.1.1-8gs.errors.txt index 54cd92dc0ca..23d89cdf7ff 100644 --- a/tests/baselines/reference/scanner10.1.1-8gs.errors.txt +++ b/tests/baselines/reference/scanner10.1.1-8gs.errors.txt @@ -1,8 +1,9 @@ tests/cases/conformance/scanner/ecmascript5/scanner10.1.1-8gs.ts(16,7): error TS2304: Cannot find name 'NotEarlyError'. +tests/cases/conformance/scanner/ecmascript5/scanner10.1.1-8gs.ts(17,1): error TS7027: Unreachable code detected. tests/cases/conformance/scanner/ecmascript5/scanner10.1.1-8gs.ts(17,5): error TS1212: Identifier expected. 'public' is a reserved word in strict mode -==== tests/cases/conformance/scanner/ecmascript5/scanner10.1.1-8gs.ts (2 errors) ==== +==== tests/cases/conformance/scanner/ecmascript5/scanner10.1.1-8gs.ts (3 errors) ==== /// Copyright (c) 2012 Ecma International. All rights reserved. /// Ecma International makes this code available under the terms and conditions set /// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the @@ -22,6 +23,8 @@ tests/cases/conformance/scanner/ecmascript5/scanner10.1.1-8gs.ts(17,5): error TS ~~~~~~~~~~~~~ !!! error TS2304: Cannot find name 'NotEarlyError'. var public = 1; + ~~~ +!!! error TS7027: Unreachable code detected. ~~~~~~ !!! error TS1212: Identifier expected. 'public' is a reserved word in strict mode \ No newline at end of file diff --git a/tests/baselines/reference/setterWithReturn.errors.txt b/tests/baselines/reference/setterWithReturn.errors.txt index 481116327b8..6aed49105b8 100644 --- a/tests/baselines/reference/setterWithReturn.errors.txt +++ b/tests/baselines/reference/setterWithReturn.errors.txt @@ -1,9 +1,10 @@ tests/cases/compiler/setterWithReturn.ts(2,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. tests/cases/compiler/setterWithReturn.ts(4,20): error TS2408: Setters cannot return a value. +tests/cases/compiler/setterWithReturn.ts(7,13): error TS7027: Unreachable code detected. tests/cases/compiler/setterWithReturn.ts(7,20): error TS2408: Setters cannot return a value. -==== tests/cases/compiler/setterWithReturn.ts (3 errors) ==== +==== tests/cases/compiler/setterWithReturn.ts (4 errors) ==== class C234 { public set p1(arg1) { ~~ @@ -15,6 +16,8 @@ tests/cases/compiler/setterWithReturn.ts(7,20): error TS2408: Setters cannot ret } else { return 0; + ~~~~~~ +!!! error TS7027: Unreachable code detected. ~ !!! error TS2408: Setters cannot return a value. } diff --git a/tests/baselines/reference/sourceMapValidationFor.errors.txt b/tests/baselines/reference/sourceMapValidationFor.errors.txt index 7fe75d640d2..6949d7545ed 100644 --- a/tests/baselines/reference/sourceMapValidationFor.errors.txt +++ b/tests/baselines/reference/sourceMapValidationFor.errors.txt @@ -1,8 +1,9 @@ tests/cases/compiler/sourceMapValidationFor.ts(2,5): error TS2304: Cannot find name 'WScript'. tests/cases/compiler/sourceMapValidationFor.ts(6,5): error TS2304: Cannot find name 'WScript'. +tests/cases/compiler/sourceMapValidationFor.ts(20,1): error TS7027: Unreachable code detected. -==== tests/cases/compiler/sourceMapValidationFor.ts (2 errors) ==== +==== tests/cases/compiler/sourceMapValidationFor.ts (3 errors) ==== for (var i = 0; i < 10; i++) { WScript.Echo("i: " + i); ~~~~~~~ @@ -27,6 +28,8 @@ tests/cases/compiler/sourceMapValidationFor.ts(6,5): error TS2304: Cannot find n for (var k = 0;; k++) { } for (k = 0;; k++) + ~~~ +!!! error TS7027: Unreachable code detected. { } for (; k < 10; k++) { diff --git a/tests/baselines/reference/sourceMapValidationLabeled.errors.txt b/tests/baselines/reference/sourceMapValidationLabeled.errors.txt new file mode 100644 index 00000000000..e9cf1fb3db8 --- /dev/null +++ b/tests/baselines/reference/sourceMapValidationLabeled.errors.txt @@ -0,0 +1,8 @@ +tests/cases/compiler/sourceMapValidationLabeled.ts(1,1): error TS7028: Unused label. + + +==== tests/cases/compiler/sourceMapValidationLabeled.ts (1 errors) ==== + x: + ~ +!!! error TS7028: Unused label. + var b = 10; \ No newline at end of file diff --git a/tests/baselines/reference/sourceMapValidationLabeled.symbols b/tests/baselines/reference/sourceMapValidationLabeled.symbols deleted file mode 100644 index 2a3c4f5606c..00000000000 --- a/tests/baselines/reference/sourceMapValidationLabeled.symbols +++ /dev/null @@ -1,5 +0,0 @@ -=== tests/cases/compiler/sourceMapValidationLabeled.ts === -x: -var b = 10; ->b : Symbol(b, Decl(sourceMapValidationLabeled.ts, 1, 3)) - diff --git a/tests/baselines/reference/sourceMapValidationLabeled.types b/tests/baselines/reference/sourceMapValidationLabeled.types deleted file mode 100644 index 3058869cb0b..00000000000 --- a/tests/baselines/reference/sourceMapValidationLabeled.types +++ /dev/null @@ -1,8 +0,0 @@ -=== tests/cases/compiler/sourceMapValidationLabeled.ts === -x: ->x : any - -var b = 10; ->b : number ->10 : number - diff --git a/tests/baselines/reference/switchBreakStatements.errors.txt b/tests/baselines/reference/switchBreakStatements.errors.txt new file mode 100644 index 00000000000..77577e485da --- /dev/null +++ b/tests/baselines/reference/switchBreakStatements.errors.txt @@ -0,0 +1,67 @@ +tests/cases/conformance/statements/breakStatements/switchBreakStatements.ts(12,1): error TS7028: Unused label. +tests/cases/conformance/statements/breakStatements/switchBreakStatements.ts(22,9): error TS7028: Unused label. +tests/cases/conformance/statements/breakStatements/switchBreakStatements.ts(46,25): error TS7027: Unreachable code detected. + + +==== tests/cases/conformance/statements/breakStatements/switchBreakStatements.ts (3 errors) ==== + switch ('') { + case 'a': + break; + } + + ONE: + switch ('') { + case 'a': + break ONE; + } + + TWO: + ~~~ +!!! error TS7028: Unused label. + THREE: + switch ('') { + case 'a': + break THREE; + } + + FOUR: + switch ('') { + case 'a': + FIVE: + ~~~~ +!!! error TS7028: Unused label. + switch ('') { + case 'a': + break FOUR; + } + } + + switch ('') { + case 'a': + SIX: + switch ('') { + case 'a': + break SIX; + } + } + + SEVEN: + switch ('') { + case 'a': + switch ('') { + case 'a': + switch ('') { + case 'a': + break SEVEN; + EIGHT: + ~~~~~ +!!! error TS7027: Unreachable code detected. + switch ('') { + case 'a': + var fn = function () { } + break EIGHT; + } + } + } + } + \ No newline at end of file diff --git a/tests/baselines/reference/switchBreakStatements.symbols b/tests/baselines/reference/switchBreakStatements.symbols deleted file mode 100644 index 22626241881..00000000000 --- a/tests/baselines/reference/switchBreakStatements.symbols +++ /dev/null @@ -1,58 +0,0 @@ -=== tests/cases/conformance/statements/breakStatements/switchBreakStatements.ts === -switch ('') { - case 'a': - break; -} - -ONE: -switch ('') { - case 'a': - break ONE; -} - -TWO: -THREE: -switch ('') { - case 'a': - break THREE; -} - -FOUR: -switch ('') { - case 'a': - FIVE: - switch ('') { - case 'a': - break FOUR; - } -} - -switch ('') { - case 'a': - SIX: - switch ('') { - case 'a': - break SIX; - } -} - -SEVEN: -switch ('') { - case 'a': - switch ('') { - case 'a': - switch ('') { - case 'a': - break SEVEN; - EIGHT: - switch ('') { - case 'a': - var fn = function () { } ->fn : Symbol(fn, Decl(switchBreakStatements.ts, 48, 35)) - - break EIGHT; - } - } - } -} - diff --git a/tests/baselines/reference/switchBreakStatements.types b/tests/baselines/reference/switchBreakStatements.types deleted file mode 100644 index c8847a5dc34..00000000000 --- a/tests/baselines/reference/switchBreakStatements.types +++ /dev/null @@ -1,126 +0,0 @@ -=== tests/cases/conformance/statements/breakStatements/switchBreakStatements.ts === -switch ('') { ->'' : string - - case 'a': ->'a' : string - - break; -} - -ONE: ->ONE : any - -switch ('') { ->'' : string - - case 'a': ->'a' : string - - break ONE; ->ONE : any -} - -TWO: ->TWO : any - -THREE: ->THREE : any - -switch ('') { ->'' : string - - case 'a': ->'a' : string - - break THREE; ->THREE : any -} - -FOUR: ->FOUR : any - -switch ('') { ->'' : string - - case 'a': ->'a' : string - - FIVE: ->FIVE : any - - switch ('') { ->'' : string - - case 'a': ->'a' : string - - break FOUR; ->FOUR : any - } -} - -switch ('') { ->'' : string - - case 'a': ->'a' : string - - SIX: ->SIX : any - - switch ('') { ->'' : string - - case 'a': ->'a' : string - - break SIX; ->SIX : any - } -} - -SEVEN: ->SEVEN : any - -switch ('') { ->'' : string - - case 'a': ->'a' : string - - switch ('') { ->'' : string - - case 'a': ->'a' : string - - switch ('') { ->'' : string - - case 'a': ->'a' : string - - break SEVEN; ->SEVEN : any - - EIGHT: ->EIGHT : any - - switch ('') { ->'' : string - - case 'a': ->'a' : string - - var fn = function () { } ->fn : () => void ->function () { } : () => void - - break EIGHT; ->EIGHT : any - } - } - } -} - diff --git a/tests/baselines/reference/systemModule8.errors.txt b/tests/baselines/reference/systemModule8.errors.txt new file mode 100644 index 00000000000..17a37e57d24 --- /dev/null +++ b/tests/baselines/reference/systemModule8.errors.txt @@ -0,0 +1,36 @@ +tests/cases/compiler/systemModule8.ts(19,1): error TS7027: Unreachable code detected. + + +==== tests/cases/compiler/systemModule8.ts (1 errors) ==== + + export var x; + x = 1; + x++; + x--; + ++x; + --x; + x += 1; + x -= 1; + x *= 1; + x /= 1; + x |= 1; + x &= 1; + x + 1; + x - 1; + x & 1; + x | 1; + for (x = 5;;x++) {} + for (x = 8;;x--) {} + ~~~ +!!! error TS7027: Unreachable code detected. + for (x = 15;;++x) {} + for (x = 18;;--x) {} + + for (let x = 50;;) {} + function foo() { + x = 100; + } + + export let [y] = [1]; + export const {a: z0, b: {c: z1}} = {a: true, b: {c: "123"}}; + for ([x] of [[1]]) {} \ No newline at end of file diff --git a/tests/baselines/reference/systemModule8.symbols b/tests/baselines/reference/systemModule8.symbols deleted file mode 100644 index 719d48e4592..00000000000 --- a/tests/baselines/reference/systemModule8.symbols +++ /dev/null @@ -1,92 +0,0 @@ -=== tests/cases/compiler/systemModule8.ts === - -export var x; ->x : Symbol(x, Decl(systemModule8.ts, 1, 10)) - -x = 1; ->x : Symbol(x, Decl(systemModule8.ts, 1, 10)) - -x++; ->x : Symbol(x, Decl(systemModule8.ts, 1, 10)) - -x--; ->x : Symbol(x, Decl(systemModule8.ts, 1, 10)) - -++x; ->x : Symbol(x, Decl(systemModule8.ts, 1, 10)) - ---x; ->x : Symbol(x, Decl(systemModule8.ts, 1, 10)) - -x += 1; ->x : Symbol(x, Decl(systemModule8.ts, 1, 10)) - -x -= 1; ->x : Symbol(x, Decl(systemModule8.ts, 1, 10)) - -x *= 1; ->x : Symbol(x, Decl(systemModule8.ts, 1, 10)) - -x /= 1; ->x : Symbol(x, Decl(systemModule8.ts, 1, 10)) - -x |= 1; ->x : Symbol(x, Decl(systemModule8.ts, 1, 10)) - -x &= 1; ->x : Symbol(x, Decl(systemModule8.ts, 1, 10)) - -x + 1; ->x : Symbol(x, Decl(systemModule8.ts, 1, 10)) - -x - 1; ->x : Symbol(x, Decl(systemModule8.ts, 1, 10)) - -x & 1; ->x : Symbol(x, Decl(systemModule8.ts, 1, 10)) - -x | 1; ->x : Symbol(x, Decl(systemModule8.ts, 1, 10)) - -for (x = 5;;x++) {} ->x : Symbol(x, Decl(systemModule8.ts, 1, 10)) ->x : Symbol(x, Decl(systemModule8.ts, 1, 10)) - -for (x = 8;;x--) {} ->x : Symbol(x, Decl(systemModule8.ts, 1, 10)) ->x : Symbol(x, Decl(systemModule8.ts, 1, 10)) - -for (x = 15;;++x) {} ->x : Symbol(x, Decl(systemModule8.ts, 1, 10)) ->x : Symbol(x, Decl(systemModule8.ts, 1, 10)) - -for (x = 18;;--x) {} ->x : Symbol(x, Decl(systemModule8.ts, 1, 10)) ->x : Symbol(x, Decl(systemModule8.ts, 1, 10)) - -for (let x = 50;;) {} ->x : Symbol(x, Decl(systemModule8.ts, 22, 8)) - -function foo() { ->foo : Symbol(foo, Decl(systemModule8.ts, 22, 21)) - - x = 100; ->x : Symbol(x, Decl(systemModule8.ts, 1, 10)) -} - -export let [y] = [1]; ->y : Symbol(y, Decl(systemModule8.ts, 27, 12)) - -export const {a: z0, b: {c: z1}} = {a: true, b: {c: "123"}}; ->a : Symbol(a, Decl(systemModule8.ts, 28, 36)) ->z0 : Symbol(z0, Decl(systemModule8.ts, 28, 14)) ->b : Symbol(b, Decl(systemModule8.ts, 28, 44)) ->c : Symbol(c, Decl(systemModule8.ts, 28, 49)) ->z1 : Symbol(z1, Decl(systemModule8.ts, 28, 25)) ->a : Symbol(a, Decl(systemModule8.ts, 28, 36)) ->b : Symbol(b, Decl(systemModule8.ts, 28, 44)) ->c : Symbol(c, Decl(systemModule8.ts, 28, 49)) - -for ([x] of [[1]]) {} ->x : Symbol(x, Decl(systemModule8.ts, 1, 10)) - diff --git a/tests/baselines/reference/systemModule8.types b/tests/baselines/reference/systemModule8.types deleted file mode 100644 index 2c3dd1e48bb..00000000000 --- a/tests/baselines/reference/systemModule8.types +++ /dev/null @@ -1,143 +0,0 @@ -=== tests/cases/compiler/systemModule8.ts === - -export var x; ->x : any - -x = 1; ->x = 1 : number ->x : any ->1 : number - -x++; ->x++ : number ->x : any - -x--; ->x-- : number ->x : any - -++x; ->++x : number ->x : any - ---x; ->--x : number ->x : any - -x += 1; ->x += 1 : any ->x : any ->1 : number - -x -= 1; ->x -= 1 : number ->x : any ->1 : number - -x *= 1; ->x *= 1 : number ->x : any ->1 : number - -x /= 1; ->x /= 1 : number ->x : any ->1 : number - -x |= 1; ->x |= 1 : number ->x : any ->1 : number - -x &= 1; ->x &= 1 : number ->x : any ->1 : number - -x + 1; ->x + 1 : any ->x : any ->1 : number - -x - 1; ->x - 1 : number ->x : any ->1 : number - -x & 1; ->x & 1 : number ->x : any ->1 : number - -x | 1; ->x | 1 : number ->x : any ->1 : number - -for (x = 5;;x++) {} ->x = 5 : number ->x : any ->5 : number ->x++ : number ->x : any - -for (x = 8;;x--) {} ->x = 8 : number ->x : any ->8 : number ->x-- : number ->x : any - -for (x = 15;;++x) {} ->x = 15 : number ->x : any ->15 : number ->++x : number ->x : any - -for (x = 18;;--x) {} ->x = 18 : number ->x : any ->18 : number ->--x : number ->x : any - -for (let x = 50;;) {} ->x : number ->50 : number - -function foo() { ->foo : () => void - - x = 100; ->x = 100 : number ->x : any ->100 : number -} - -export let [y] = [1]; ->y : number ->[1] : [number] ->1 : number - -export const {a: z0, b: {c: z1}} = {a: true, b: {c: "123"}}; ->a : any ->z0 : boolean ->b : any ->c : any ->z1 : string ->{a: true, b: {c: "123"}} : { a: boolean; b: { c: string; }; } ->a : boolean ->true : boolean ->b : { c: string; } ->{c: "123"} : { c: string; } ->c : string ->"123" : string - -for ([x] of [[1]]) {} ->[x] : any[] ->x : any ->[[1]] : number[][] ->[1] : number[] ->1 : number - diff --git a/tests/baselines/reference/throwInEnclosingStatements.errors.txt b/tests/baselines/reference/throwInEnclosingStatements.errors.txt new file mode 100644 index 00000000000..1d225a45fe8 --- /dev/null +++ b/tests/baselines/reference/throwInEnclosingStatements.errors.txt @@ -0,0 +1,52 @@ +tests/cases/conformance/statements/throwStatements/throwInEnclosingStatements.ts(15,1): error TS7027: Unreachable code detected. + + +==== tests/cases/conformance/statements/throwStatements/throwInEnclosingStatements.ts (1 errors) ==== + function fn(x) { + throw x; + } + + (x: T) => { throw x; } + + var y: string; + switch (y) { + case 'a': + throw y; + default: + throw y; + } + + var z = 0; + ~~~ +!!! error TS7027: Unreachable code detected. + while (z < 10) { + throw z; + } + + for (var i = 0; ;) { throw i; } + + for (var idx in {}) { throw idx; } + + do { throw null; }while(true) + + var j = 0; + while (j < 0) { throw j; } + + class C { + private value: T; + biz() { + throw this.value; + } + + constructor() { + throw this; + } + } + + var aa = { + id:12, + biz() { + throw this; + } + } + \ No newline at end of file diff --git a/tests/baselines/reference/throwInEnclosingStatements.symbols b/tests/baselines/reference/throwInEnclosingStatements.symbols deleted file mode 100644 index 007894047de..00000000000 --- a/tests/baselines/reference/throwInEnclosingStatements.symbols +++ /dev/null @@ -1,93 +0,0 @@ -=== tests/cases/conformance/statements/throwStatements/throwInEnclosingStatements.ts === -function fn(x) { ->fn : Symbol(fn, Decl(throwInEnclosingStatements.ts, 0, 0)) ->x : Symbol(x, Decl(throwInEnclosingStatements.ts, 0, 12)) - - throw x; ->x : Symbol(x, Decl(throwInEnclosingStatements.ts, 0, 12)) -} - -(x: T) => { throw x; } ->T : Symbol(T, Decl(throwInEnclosingStatements.ts, 4, 1)) ->x : Symbol(x, Decl(throwInEnclosingStatements.ts, 4, 4)) ->T : Symbol(T, Decl(throwInEnclosingStatements.ts, 4, 1)) ->x : Symbol(x, Decl(throwInEnclosingStatements.ts, 4, 4)) - -var y: string; ->y : Symbol(y, Decl(throwInEnclosingStatements.ts, 6, 3)) - -switch (y) { ->y : Symbol(y, Decl(throwInEnclosingStatements.ts, 6, 3)) - - case 'a': - throw y; ->y : Symbol(y, Decl(throwInEnclosingStatements.ts, 6, 3)) - - default: - throw y; ->y : Symbol(y, Decl(throwInEnclosingStatements.ts, 6, 3)) -} - -var z = 0; ->z : Symbol(z, Decl(throwInEnclosingStatements.ts, 14, 3)) - -while (z < 10) { ->z : Symbol(z, Decl(throwInEnclosingStatements.ts, 14, 3)) - - throw z; ->z : Symbol(z, Decl(throwInEnclosingStatements.ts, 14, 3)) -} - -for (var i = 0; ;) { throw i; } ->i : Symbol(i, Decl(throwInEnclosingStatements.ts, 19, 8)) ->i : Symbol(i, Decl(throwInEnclosingStatements.ts, 19, 8)) - -for (var idx in {}) { throw idx; } ->idx : Symbol(idx, Decl(throwInEnclosingStatements.ts, 21, 8)) ->idx : Symbol(idx, Decl(throwInEnclosingStatements.ts, 21, 8)) - -do { throw null; }while(true) - -var j = 0; ->j : Symbol(j, Decl(throwInEnclosingStatements.ts, 25, 3)) - -while (j < 0) { throw j; } ->j : Symbol(j, Decl(throwInEnclosingStatements.ts, 25, 3)) ->j : Symbol(j, Decl(throwInEnclosingStatements.ts, 25, 3)) - -class C { ->C : Symbol(C, Decl(throwInEnclosingStatements.ts, 26, 26)) ->T : Symbol(T, Decl(throwInEnclosingStatements.ts, 28, 8)) - - private value: T; ->value : Symbol(value, Decl(throwInEnclosingStatements.ts, 28, 12)) ->T : Symbol(T, Decl(throwInEnclosingStatements.ts, 28, 8)) - - biz() { ->biz : Symbol(biz, Decl(throwInEnclosingStatements.ts, 29, 21)) - - throw this.value; ->this.value : Symbol(value, Decl(throwInEnclosingStatements.ts, 28, 12)) ->this : Symbol(C, Decl(throwInEnclosingStatements.ts, 26, 26)) ->value : Symbol(value, Decl(throwInEnclosingStatements.ts, 28, 12)) - } - - constructor() { - throw this; ->this : Symbol(C, Decl(throwInEnclosingStatements.ts, 26, 26)) - } -} - -var aa = { ->aa : Symbol(aa, Decl(throwInEnclosingStatements.ts, 39, 3)) - - id:12, ->id : Symbol(id, Decl(throwInEnclosingStatements.ts, 39, 10)) - - biz() { ->biz : Symbol(biz, Decl(throwInEnclosingStatements.ts, 40, 10)) - - throw this; - } -} - diff --git a/tests/baselines/reference/throwInEnclosingStatements.types b/tests/baselines/reference/throwInEnclosingStatements.types deleted file mode 100644 index bcff8653d52..00000000000 --- a/tests/baselines/reference/throwInEnclosingStatements.types +++ /dev/null @@ -1,109 +0,0 @@ -=== tests/cases/conformance/statements/throwStatements/throwInEnclosingStatements.ts === -function fn(x) { ->fn : (x: any) => void ->x : any - - throw x; ->x : any -} - -(x: T) => { throw x; } ->(x: T) => { throw x; } : (x: T) => void ->T : T ->x : T ->T : T ->x : T - -var y: string; ->y : string - -switch (y) { ->y : string - - case 'a': ->'a' : string - - throw y; ->y : string - - default: - throw y; ->y : string -} - -var z = 0; ->z : number ->0 : number - -while (z < 10) { ->z < 10 : boolean ->z : number ->10 : number - - throw z; ->z : number -} - -for (var i = 0; ;) { throw i; } ->i : number ->0 : number ->i : number - -for (var idx in {}) { throw idx; } ->idx : any ->{} : {} ->idx : any - -do { throw null; }while(true) ->null : null ->true : boolean - -var j = 0; ->j : number ->0 : number - -while (j < 0) { throw j; } ->j < 0 : boolean ->j : number ->0 : number ->j : number - -class C { ->C : C ->T : T - - private value: T; ->value : T ->T : T - - biz() { ->biz : () => void - - throw this.value; ->this.value : T ->this : this ->value : T - } - - constructor() { - throw this; ->this : this - } -} - -var aa = { ->aa : { id: number; biz(): void; } ->{ id:12, biz() { throw this; }} : { id: number; biz(): void; } - - id:12, ->id : number ->12 : number - - biz() { ->biz : () => void - - throw this; ->this : any - } -} - diff --git a/tests/baselines/reference/throwStatements.errors.txt b/tests/baselines/reference/throwStatements.errors.txt new file mode 100644 index 00000000000..e2e15bd503a --- /dev/null +++ b/tests/baselines/reference/throwStatements.errors.txt @@ -0,0 +1,91 @@ +tests/cases/conformance/statements/throwStatements/throwStatements.ts(29,1): error TS7027: Unreachable code detected. + + +==== tests/cases/conformance/statements/throwStatements/throwStatements.ts (1 errors) ==== + // all legal + + interface I { + id: number; + } + + class C implements I { + id: number; + } + + class D{ + source: T; + recurse: D; + wrapped: D> + } + + function F(x: string): number { return 42; } + + module M { + export class A { + name: string; + } + + export function F2(x: number): string { return x.toString(); } + } + + var aNumber = 9.9; + throw aNumber; + var aString = 'this is a string'; + ~~~ +!!! error TS7027: Unreachable code detected. + throw aString; + var aDate = new Date(12); + throw aDate; + var anObject = new Object(); + throw anObject; + + var anAny = null; + throw anAny; + var anOtherAny = new C(); + throw anOtherAny; + var anUndefined = undefined; + throw anUndefined; + + var aClass = new C(); + throw aClass; + var aGenericClass = new D(); + throw aGenericClass; + var anObjectLiteral = { id: 12 }; + throw anObjectLiteral; + + var aFunction = F; + throw aFunction; + throw aFunction(''); + var aLambda = (x) => 2; + throw aLambda; + throw aLambda(1); + + var aModule = M; + throw aModule; + throw typeof M; + var aClassInModule = new M.A(); + throw aClassInModule; + var aFunctionInModule = M.F2; + throw aFunctionInModule; + + // no initializer or annotation, so this is an 'any' + var x; + throw x; + + // literals + throw 0.0; + throw false; + throw null; + throw undefined; + throw 'a string'; + throw function () { return 'a string' }; + throw (x:T) => 42; + throw { x: 12, y: 13 }; + throw []; + throw ['a', ['b']]; + throw /[a-z]/; + throw new Date(); + throw new C(); + throw new Object(); + throw new D(); + \ No newline at end of file diff --git a/tests/baselines/reference/throwStatements.symbols b/tests/baselines/reference/throwStatements.symbols deleted file mode 100644 index cb65755a145..00000000000 --- a/tests/baselines/reference/throwStatements.symbols +++ /dev/null @@ -1,215 +0,0 @@ -=== tests/cases/conformance/statements/throwStatements/throwStatements.ts === -// all legal - -interface I { ->I : Symbol(I, Decl(throwStatements.ts, 0, 0)) - - id: number; ->id : Symbol(id, Decl(throwStatements.ts, 2, 13)) -} - -class C implements I { ->C : Symbol(C, Decl(throwStatements.ts, 4, 1)) ->I : Symbol(I, Decl(throwStatements.ts, 0, 0)) - - id: number; ->id : Symbol(id, Decl(throwStatements.ts, 6, 22)) -} - -class D{ ->D : Symbol(D, Decl(throwStatements.ts, 8, 1)) ->T : Symbol(T, Decl(throwStatements.ts, 10, 8)) - - source: T; ->source : Symbol(source, Decl(throwStatements.ts, 10, 11)) ->T : Symbol(T, Decl(throwStatements.ts, 10, 8)) - - recurse: D; ->recurse : Symbol(recurse, Decl(throwStatements.ts, 11, 14)) ->D : Symbol(D, Decl(throwStatements.ts, 8, 1)) ->T : Symbol(T, Decl(throwStatements.ts, 10, 8)) - - wrapped: D> ->wrapped : Symbol(wrapped, Decl(throwStatements.ts, 12, 18)) ->D : Symbol(D, Decl(throwStatements.ts, 8, 1)) ->D : Symbol(D, Decl(throwStatements.ts, 8, 1)) ->T : Symbol(T, Decl(throwStatements.ts, 10, 8)) -} - -function F(x: string): number { return 42; } ->F : Symbol(F, Decl(throwStatements.ts, 14, 1)) ->x : Symbol(x, Decl(throwStatements.ts, 16, 11)) - -module M { ->M : Symbol(M, Decl(throwStatements.ts, 16, 44)) - - export class A { ->A : Symbol(A, Decl(throwStatements.ts, 18, 10)) - - name: string; ->name : Symbol(name, Decl(throwStatements.ts, 19, 20)) - } - - export function F2(x: number): string { return x.toString(); } ->F2 : Symbol(F2, Decl(throwStatements.ts, 21, 5)) ->x : Symbol(x, Decl(throwStatements.ts, 23, 23)) ->x.toString : Symbol(Number.toString, Decl(lib.d.ts, 458, 18)) ->x : Symbol(x, Decl(throwStatements.ts, 23, 23)) ->toString : Symbol(Number.toString, Decl(lib.d.ts, 458, 18)) -} - -var aNumber = 9.9; ->aNumber : Symbol(aNumber, Decl(throwStatements.ts, 26, 3)) - -throw aNumber; ->aNumber : Symbol(aNumber, Decl(throwStatements.ts, 26, 3)) - -var aString = 'this is a string'; ->aString : Symbol(aString, Decl(throwStatements.ts, 28, 3)) - -throw aString; ->aString : Symbol(aString, Decl(throwStatements.ts, 28, 3)) - -var aDate = new Date(12); ->aDate : Symbol(aDate, Decl(throwStatements.ts, 30, 3)) ->Date : Symbol(Date, Decl(lib.d.ts, 633, 23), Decl(lib.d.ts, 815, 11)) - -throw aDate; ->aDate : Symbol(aDate, Decl(throwStatements.ts, 30, 3)) - -var anObject = new Object(); ->anObject : Symbol(anObject, Decl(throwStatements.ts, 32, 3)) ->Object : Symbol(Object, Decl(lib.d.ts, 92, 1), Decl(lib.d.ts, 223, 11)) - -throw anObject; ->anObject : Symbol(anObject, Decl(throwStatements.ts, 32, 3)) - -var anAny = null; ->anAny : Symbol(anAny, Decl(throwStatements.ts, 35, 3)) - -throw anAny; ->anAny : Symbol(anAny, Decl(throwStatements.ts, 35, 3)) - -var anOtherAny = new C(); ->anOtherAny : Symbol(anOtherAny, Decl(throwStatements.ts, 37, 3)) ->C : Symbol(C, Decl(throwStatements.ts, 4, 1)) - -throw anOtherAny; ->anOtherAny : Symbol(anOtherAny, Decl(throwStatements.ts, 37, 3)) - -var anUndefined = undefined; ->anUndefined : Symbol(anUndefined, Decl(throwStatements.ts, 39, 3)) ->undefined : Symbol(undefined) - -throw anUndefined; ->anUndefined : Symbol(anUndefined, Decl(throwStatements.ts, 39, 3)) - -var aClass = new C(); ->aClass : Symbol(aClass, Decl(throwStatements.ts, 42, 3)) ->C : Symbol(C, Decl(throwStatements.ts, 4, 1)) - -throw aClass; ->aClass : Symbol(aClass, Decl(throwStatements.ts, 42, 3)) - -var aGenericClass = new D(); ->aGenericClass : Symbol(aGenericClass, Decl(throwStatements.ts, 44, 3)) ->D : Symbol(D, Decl(throwStatements.ts, 8, 1)) - -throw aGenericClass; ->aGenericClass : Symbol(aGenericClass, Decl(throwStatements.ts, 44, 3)) - -var anObjectLiteral = { id: 12 }; ->anObjectLiteral : Symbol(anObjectLiteral, Decl(throwStatements.ts, 46, 3)) ->id : Symbol(id, Decl(throwStatements.ts, 46, 23)) - -throw anObjectLiteral; ->anObjectLiteral : Symbol(anObjectLiteral, Decl(throwStatements.ts, 46, 3)) - -var aFunction = F; ->aFunction : Symbol(aFunction, Decl(throwStatements.ts, 49, 3)) ->F : Symbol(F, Decl(throwStatements.ts, 14, 1)) - -throw aFunction; ->aFunction : Symbol(aFunction, Decl(throwStatements.ts, 49, 3)) - -throw aFunction(''); ->aFunction : Symbol(aFunction, Decl(throwStatements.ts, 49, 3)) - -var aLambda = (x) => 2; ->aLambda : Symbol(aLambda, Decl(throwStatements.ts, 52, 3)) ->x : Symbol(x, Decl(throwStatements.ts, 52, 15)) - -throw aLambda; ->aLambda : Symbol(aLambda, Decl(throwStatements.ts, 52, 3)) - -throw aLambda(1); ->aLambda : Symbol(aLambda, Decl(throwStatements.ts, 52, 3)) - -var aModule = M; ->aModule : Symbol(aModule, Decl(throwStatements.ts, 56, 3)) ->M : Symbol(M, Decl(throwStatements.ts, 16, 44)) - -throw aModule; ->aModule : Symbol(aModule, Decl(throwStatements.ts, 56, 3)) - -throw typeof M; ->M : Symbol(M, Decl(throwStatements.ts, 16, 44)) - -var aClassInModule = new M.A(); ->aClassInModule : Symbol(aClassInModule, Decl(throwStatements.ts, 59, 3)) ->M.A : Symbol(M.A, Decl(throwStatements.ts, 18, 10)) ->M : Symbol(M, Decl(throwStatements.ts, 16, 44)) ->A : Symbol(M.A, Decl(throwStatements.ts, 18, 10)) - -throw aClassInModule; ->aClassInModule : Symbol(aClassInModule, Decl(throwStatements.ts, 59, 3)) - -var aFunctionInModule = M.F2; ->aFunctionInModule : Symbol(aFunctionInModule, Decl(throwStatements.ts, 61, 3)) ->M.F2 : Symbol(M.F2, Decl(throwStatements.ts, 21, 5)) ->M : Symbol(M, Decl(throwStatements.ts, 16, 44)) ->F2 : Symbol(M.F2, Decl(throwStatements.ts, 21, 5)) - -throw aFunctionInModule; ->aFunctionInModule : Symbol(aFunctionInModule, Decl(throwStatements.ts, 61, 3)) - -// no initializer or annotation, so this is an 'any' -var x; ->x : Symbol(x, Decl(throwStatements.ts, 65, 3)) - -throw x; ->x : Symbol(x, Decl(throwStatements.ts, 65, 3)) - -// literals -throw 0.0; -throw false; -throw null; -throw undefined; ->undefined : Symbol(undefined) - -throw 'a string'; -throw function () { return 'a string' }; -throw (x:T) => 42; ->T : Symbol(T, Decl(throwStatements.ts, 75, 7)) ->x : Symbol(x, Decl(throwStatements.ts, 75, 10)) ->T : Symbol(T, Decl(throwStatements.ts, 75, 7)) - -throw { x: 12, y: 13 }; ->x : Symbol(x, Decl(throwStatements.ts, 76, 7)) ->y : Symbol(y, Decl(throwStatements.ts, 76, 14)) - -throw []; -throw ['a', ['b']]; -throw /[a-z]/; -throw new Date(); ->Date : Symbol(Date, Decl(lib.d.ts, 633, 23), Decl(lib.d.ts, 815, 11)) - -throw new C(); ->C : Symbol(C, Decl(throwStatements.ts, 4, 1)) - -throw new Object(); ->Object : Symbol(Object, Decl(lib.d.ts, 92, 1), Decl(lib.d.ts, 223, 11)) - -throw new D(); ->D : Symbol(D, Decl(throwStatements.ts, 8, 1)) - diff --git a/tests/baselines/reference/throwStatements.types b/tests/baselines/reference/throwStatements.types deleted file mode 100644 index 3d365a1b65a..00000000000 --- a/tests/baselines/reference/throwStatements.types +++ /dev/null @@ -1,266 +0,0 @@ -=== tests/cases/conformance/statements/throwStatements/throwStatements.ts === -// all legal - -interface I { ->I : I - - id: number; ->id : number -} - -class C implements I { ->C : C ->I : I - - id: number; ->id : number -} - -class D{ ->D : D ->T : T - - source: T; ->source : T ->T : T - - recurse: D; ->recurse : D ->D : D ->T : T - - wrapped: D> ->wrapped : D> ->D : D ->D : D ->T : T -} - -function F(x: string): number { return 42; } ->F : (x: string) => number ->x : string ->42 : number - -module M { ->M : typeof M - - export class A { ->A : A - - name: string; ->name : string - } - - export function F2(x: number): string { return x.toString(); } ->F2 : (x: number) => string ->x : number ->x.toString() : string ->x.toString : (radix?: number) => string ->x : number ->toString : (radix?: number) => string -} - -var aNumber = 9.9; ->aNumber : number ->9.9 : number - -throw aNumber; ->aNumber : number - -var aString = 'this is a string'; ->aString : string ->'this is a string' : string - -throw aString; ->aString : string - -var aDate = new Date(12); ->aDate : Date ->new Date(12) : Date ->Date : DateConstructor ->12 : number - -throw aDate; ->aDate : Date - -var anObject = new Object(); ->anObject : Object ->new Object() : Object ->Object : ObjectConstructor - -throw anObject; ->anObject : Object - -var anAny = null; ->anAny : any ->null : null - -throw anAny; ->anAny : any - -var anOtherAny = new C(); ->anOtherAny : any -> new C() : any ->new C() : C ->C : typeof C - -throw anOtherAny; ->anOtherAny : any - -var anUndefined = undefined; ->anUndefined : any ->undefined : undefined - -throw anUndefined; ->anUndefined : any - -var aClass = new C(); ->aClass : C ->new C() : C ->C : typeof C - -throw aClass; ->aClass : C - -var aGenericClass = new D(); ->aGenericClass : D ->new D() : D ->D : typeof D - -throw aGenericClass; ->aGenericClass : D - -var anObjectLiteral = { id: 12 }; ->anObjectLiteral : { id: number; } ->{ id: 12 } : { id: number; } ->id : number ->12 : number - -throw anObjectLiteral; ->anObjectLiteral : { id: number; } - -var aFunction = F; ->aFunction : (x: string) => number ->F : (x: string) => number - -throw aFunction; ->aFunction : (x: string) => number - -throw aFunction(''); ->aFunction('') : number ->aFunction : (x: string) => number ->'' : string - -var aLambda = (x) => 2; ->aLambda : (x: any) => number ->(x) => 2 : (x: any) => number ->x : any ->2 : number - -throw aLambda; ->aLambda : (x: any) => number - -throw aLambda(1); ->aLambda(1) : number ->aLambda : (x: any) => number ->1 : number - -var aModule = M; ->aModule : typeof M ->M : typeof M - -throw aModule; ->aModule : typeof M - -throw typeof M; ->typeof M : string ->M : typeof M - -var aClassInModule = new M.A(); ->aClassInModule : M.A ->new M.A() : M.A ->M.A : typeof M.A ->M : typeof M ->A : typeof M.A - -throw aClassInModule; ->aClassInModule : M.A - -var aFunctionInModule = M.F2; ->aFunctionInModule : (x: number) => string ->M.F2 : (x: number) => string ->M : typeof M ->F2 : (x: number) => string - -throw aFunctionInModule; ->aFunctionInModule : (x: number) => string - -// no initializer or annotation, so this is an 'any' -var x; ->x : any - -throw x; ->x : any - -// literals -throw 0.0; ->0.0 : number - -throw false; ->false : boolean - -throw null; ->null : null - -throw undefined; ->undefined : undefined - -throw 'a string'; ->'a string' : string - -throw function () { return 'a string' }; ->function () { return 'a string' } : () => string ->'a string' : string - -throw (x:T) => 42; ->(x:T) => 42 : (x: T) => number ->T : T ->x : T ->T : T ->42 : number - -throw { x: 12, y: 13 }; ->{ x: 12, y: 13 } : { x: number; y: number; } ->x : number ->12 : number ->y : number ->13 : number - -throw []; ->[] : undefined[] - -throw ['a', ['b']]; ->['a', ['b']] : (string | string[])[] ->'a' : string ->['b'] : string[] ->'b' : string - -throw /[a-z]/; ->/[a-z]/ : RegExp - -throw new Date(); ->new Date() : Date ->Date : DateConstructor - -throw new C(); ->new C() : C ->C : typeof C - -throw new Object(); ->new Object() : Object ->Object : ObjectConstructor - -throw new D(); ->new D() : D ->D : typeof D - diff --git a/tests/baselines/reference/throwWithoutNewLine2.errors.txt b/tests/baselines/reference/throwWithoutNewLine2.errors.txt index 6930d240e7b..83f4e4cc246 100644 --- a/tests/baselines/reference/throwWithoutNewLine2.errors.txt +++ b/tests/baselines/reference/throwWithoutNewLine2.errors.txt @@ -1,11 +1,14 @@ tests/cases/compiler/throwWithoutNewLine2.ts(1,6): error TS1142: Line break not permitted here. tests/cases/compiler/throwWithoutNewLine2.ts(2,1): error TS2304: Cannot find name 'a'. +tests/cases/compiler/throwWithoutNewLine2.ts(2,1): error TS7027: Unreachable code detected. -==== tests/cases/compiler/throwWithoutNewLine2.ts (2 errors) ==== +==== tests/cases/compiler/throwWithoutNewLine2.ts (3 errors) ==== throw !!! error TS1142: Line break not permitted here. a; ~ -!!! error TS2304: Cannot find name 'a'. \ No newline at end of file +!!! error TS2304: Cannot find name 'a'. + ~ +!!! error TS7027: Unreachable code detected. \ No newline at end of file diff --git a/tests/baselines/reference/typeGuardFunctionErrors.errors.txt b/tests/baselines/reference/typeGuardFunctionErrors.errors.txt index b178b02c6b4..ca06e4f63a2 100644 --- a/tests/baselines/reference/typeGuardFunctionErrors.errors.txt +++ b/tests/baselines/reference/typeGuardFunctionErrors.errors.txt @@ -9,6 +9,7 @@ tests/cases/conformance/expressions/typeGuards/typeGuardFunctionErrors.ts(38,51) Property 'propA' is missing in type 'B'. tests/cases/conformance/expressions/typeGuards/typeGuardFunctionErrors.ts(42,56): error TS2322: Type 'number' is not assignable to type 'string'. tests/cases/conformance/expressions/typeGuards/typeGuardFunctionErrors.ts(46,56): error TS2322: Type 'T[]' is not assignable to type 'string'. +tests/cases/conformance/expressions/typeGuards/typeGuardFunctionErrors.ts(50,1): error TS7027: Unreachable code detected. tests/cases/conformance/expressions/typeGuards/typeGuardFunctionErrors.ts(60,7): error TS2339: Property 'propB' does not exist on type 'A'. tests/cases/conformance/expressions/typeGuards/typeGuardFunctionErrors.ts(65,7): error TS2339: Property 'propB' does not exist on type 'A'. tests/cases/conformance/expressions/typeGuards/typeGuardFunctionErrors.ts(70,7): error TS2339: Property 'propB' does not exist on type 'A'. @@ -37,7 +38,7 @@ tests/cases/conformance/expressions/typeGuards/typeGuardFunctionErrors.ts(133,34 tests/cases/conformance/expressions/typeGuards/typeGuardFunctionErrors.ts(137,39): error TS1230: A type predicate cannot reference element 'p1' in a binding pattern. -==== tests/cases/conformance/expressions/typeGuards/typeGuardFunctionErrors.ts (31 errors) ==== +==== tests/cases/conformance/expressions/typeGuards/typeGuardFunctionErrors.ts (32 errors) ==== class A { propA: number; @@ -109,6 +110,8 @@ tests/cases/conformance/expressions/typeGuards/typeGuardFunctionErrors.ts(137,39 } let a: A; + ~~~ +!!! error TS7027: Unreachable code detected. let b: B; declare function isB(p1): p1 is B; diff --git a/tests/baselines/reference/typeofOperatorWithAnyOtherType.errors.txt b/tests/baselines/reference/typeofOperatorWithAnyOtherType.errors.txt index 6112b61ceb6..0139c96b3f9 100644 --- a/tests/baselines/reference/typeofOperatorWithAnyOtherType.errors.txt +++ b/tests/baselines/reference/typeofOperatorWithAnyOtherType.errors.txt @@ -1,9 +1,12 @@ tests/cases/conformance/expressions/unaryOperators/typeofOperator/typeofOperatorWithAnyOtherType.ts(46,32): error TS2365: Operator '+' cannot be applied to types 'undefined' and 'undefined'. tests/cases/conformance/expressions/unaryOperators/typeofOperator/typeofOperatorWithAnyOtherType.ts(47,32): error TS2365: Operator '+' cannot be applied to types 'null' and 'null'. tests/cases/conformance/expressions/unaryOperators/typeofOperator/typeofOperatorWithAnyOtherType.ts(48,32): error TS2365: Operator '+' cannot be applied to types 'undefined' and 'undefined'. +tests/cases/conformance/expressions/unaryOperators/typeofOperator/typeofOperatorWithAnyOtherType.ts(68,1): error TS7028: Unused label. +tests/cases/conformance/expressions/unaryOperators/typeofOperator/typeofOperatorWithAnyOtherType.ts(69,1): error TS7028: Unused label. +tests/cases/conformance/expressions/unaryOperators/typeofOperator/typeofOperatorWithAnyOtherType.ts(70,1): error TS7028: Unused label. -==== tests/cases/conformance/expressions/unaryOperators/typeofOperator/typeofOperatorWithAnyOtherType.ts (3 errors) ==== +==== tests/cases/conformance/expressions/unaryOperators/typeofOperator/typeofOperatorWithAnyOtherType.ts (6 errors) ==== // typeof operator on any type var ANY: any; @@ -78,8 +81,14 @@ tests/cases/conformance/expressions/unaryOperators/typeofOperator/typeofOperator var x: any[]; var r: () => any; z: typeof ANY; + ~ +!!! error TS7028: Unused label. x: typeof ANY2; + ~ +!!! error TS7028: Unused label. r: typeof foo; + ~ +!!! error TS7028: Unused label. z: typeof objA.a; z: typeof A.foo; z: typeof M.n; diff --git a/tests/baselines/reference/typeofOperatorWithBooleanType.errors.txt b/tests/baselines/reference/typeofOperatorWithBooleanType.errors.txt new file mode 100644 index 00000000000..9c4e2495660 --- /dev/null +++ b/tests/baselines/reference/typeofOperatorWithBooleanType.errors.txt @@ -0,0 +1,59 @@ +tests/cases/conformance/expressions/unaryOperators/typeofOperator/typeofOperatorWithBooleanType.ts(44,1): error TS7028: Unused label. +tests/cases/conformance/expressions/unaryOperators/typeofOperator/typeofOperatorWithBooleanType.ts(45,1): error TS7028: Unused label. + + +==== tests/cases/conformance/expressions/unaryOperators/typeofOperator/typeofOperatorWithBooleanType.ts (2 errors) ==== + // typeof operator on boolean type + var BOOLEAN: boolean; + + function foo(): boolean { return true; } + + class A { + public a: boolean; + static foo() { return false; } + } + module M { + export var n: boolean; + } + + var objA = new A(); + + // boolean type var + var ResultIsString1 = typeof BOOLEAN; + + // boolean type literal + var ResultIsString2 = typeof true; + var ResultIsString3 = typeof { x: true, y: false }; + + // boolean type expressions + var ResultIsString4 = typeof objA.a; + var ResultIsString5 = typeof M.n; + var ResultIsString6 = typeof foo(); + var ResultIsString7 = typeof A.foo(); + + // multiple typeof operator + var ResultIsString8 = typeof typeof BOOLEAN; + + // miss assignment operators + typeof true; + typeof BOOLEAN; + typeof foo(); + typeof true, false; + typeof objA.a; + typeof M.n; + + // use typeof in type query + var z: boolean; + var x: boolean[]; + var r: () => boolean; + z: typeof BOOLEAN; + ~ +!!! error TS7028: Unused label. + r: typeof foo; + ~ +!!! error TS7028: Unused label. + var y = { a: true, b: false}; + z: typeof y.a; + z: typeof objA.a; + z: typeof A.foo; + z: typeof M.n; \ No newline at end of file diff --git a/tests/baselines/reference/typeofOperatorWithBooleanType.symbols b/tests/baselines/reference/typeofOperatorWithBooleanType.symbols deleted file mode 100644 index 39276e61625..00000000000 --- a/tests/baselines/reference/typeofOperatorWithBooleanType.symbols +++ /dev/null @@ -1,130 +0,0 @@ -=== tests/cases/conformance/expressions/unaryOperators/typeofOperator/typeofOperatorWithBooleanType.ts === -// typeof operator on boolean type -var BOOLEAN: boolean; ->BOOLEAN : Symbol(BOOLEAN, Decl(typeofOperatorWithBooleanType.ts, 1, 3)) - -function foo(): boolean { return true; } ->foo : Symbol(foo, Decl(typeofOperatorWithBooleanType.ts, 1, 21)) - -class A { ->A : Symbol(A, Decl(typeofOperatorWithBooleanType.ts, 3, 40)) - - public a: boolean; ->a : Symbol(a, Decl(typeofOperatorWithBooleanType.ts, 5, 9)) - - static foo() { return false; } ->foo : Symbol(A.foo, Decl(typeofOperatorWithBooleanType.ts, 6, 22)) -} -module M { ->M : Symbol(M, Decl(typeofOperatorWithBooleanType.ts, 8, 1)) - - export var n: boolean; ->n : Symbol(n, Decl(typeofOperatorWithBooleanType.ts, 10, 14)) -} - -var objA = new A(); ->objA : Symbol(objA, Decl(typeofOperatorWithBooleanType.ts, 13, 3)) ->A : Symbol(A, Decl(typeofOperatorWithBooleanType.ts, 3, 40)) - -// boolean type var -var ResultIsString1 = typeof BOOLEAN; ->ResultIsString1 : Symbol(ResultIsString1, Decl(typeofOperatorWithBooleanType.ts, 16, 3)) ->BOOLEAN : Symbol(BOOLEAN, Decl(typeofOperatorWithBooleanType.ts, 1, 3)) - -// boolean type literal -var ResultIsString2 = typeof true; ->ResultIsString2 : Symbol(ResultIsString2, Decl(typeofOperatorWithBooleanType.ts, 19, 3)) - -var ResultIsString3 = typeof { x: true, y: false }; ->ResultIsString3 : Symbol(ResultIsString3, Decl(typeofOperatorWithBooleanType.ts, 20, 3)) ->x : Symbol(x, Decl(typeofOperatorWithBooleanType.ts, 20, 30)) ->y : Symbol(y, Decl(typeofOperatorWithBooleanType.ts, 20, 39)) - -// boolean type expressions -var ResultIsString4 = typeof objA.a; ->ResultIsString4 : Symbol(ResultIsString4, Decl(typeofOperatorWithBooleanType.ts, 23, 3)) ->objA.a : Symbol(A.a, Decl(typeofOperatorWithBooleanType.ts, 5, 9)) ->objA : Symbol(objA, Decl(typeofOperatorWithBooleanType.ts, 13, 3)) ->a : Symbol(A.a, Decl(typeofOperatorWithBooleanType.ts, 5, 9)) - -var ResultIsString5 = typeof M.n; ->ResultIsString5 : Symbol(ResultIsString5, Decl(typeofOperatorWithBooleanType.ts, 24, 3)) ->M.n : Symbol(M.n, Decl(typeofOperatorWithBooleanType.ts, 10, 14)) ->M : Symbol(M, Decl(typeofOperatorWithBooleanType.ts, 8, 1)) ->n : Symbol(M.n, Decl(typeofOperatorWithBooleanType.ts, 10, 14)) - -var ResultIsString6 = typeof foo(); ->ResultIsString6 : Symbol(ResultIsString6, Decl(typeofOperatorWithBooleanType.ts, 25, 3)) ->foo : Symbol(foo, Decl(typeofOperatorWithBooleanType.ts, 1, 21)) - -var ResultIsString7 = typeof A.foo(); ->ResultIsString7 : Symbol(ResultIsString7, Decl(typeofOperatorWithBooleanType.ts, 26, 3)) ->A.foo : Symbol(A.foo, Decl(typeofOperatorWithBooleanType.ts, 6, 22)) ->A : Symbol(A, Decl(typeofOperatorWithBooleanType.ts, 3, 40)) ->foo : Symbol(A.foo, Decl(typeofOperatorWithBooleanType.ts, 6, 22)) - -// multiple typeof operator -var ResultIsString8 = typeof typeof BOOLEAN; ->ResultIsString8 : Symbol(ResultIsString8, Decl(typeofOperatorWithBooleanType.ts, 29, 3)) ->BOOLEAN : Symbol(BOOLEAN, Decl(typeofOperatorWithBooleanType.ts, 1, 3)) - -// miss assignment operators -typeof true; -typeof BOOLEAN; ->BOOLEAN : Symbol(BOOLEAN, Decl(typeofOperatorWithBooleanType.ts, 1, 3)) - -typeof foo(); ->foo : Symbol(foo, Decl(typeofOperatorWithBooleanType.ts, 1, 21)) - -typeof true, false; -typeof objA.a; ->objA.a : Symbol(A.a, Decl(typeofOperatorWithBooleanType.ts, 5, 9)) ->objA : Symbol(objA, Decl(typeofOperatorWithBooleanType.ts, 13, 3)) ->a : Symbol(A.a, Decl(typeofOperatorWithBooleanType.ts, 5, 9)) - -typeof M.n; ->M.n : Symbol(M.n, Decl(typeofOperatorWithBooleanType.ts, 10, 14)) ->M : Symbol(M, Decl(typeofOperatorWithBooleanType.ts, 8, 1)) ->n : Symbol(M.n, Decl(typeofOperatorWithBooleanType.ts, 10, 14)) - -// use typeof in type query -var z: boolean; ->z : Symbol(z, Decl(typeofOperatorWithBooleanType.ts, 40, 3)) - -var x: boolean[]; ->x : Symbol(x, Decl(typeofOperatorWithBooleanType.ts, 41, 3)) - -var r: () => boolean; ->r : Symbol(r, Decl(typeofOperatorWithBooleanType.ts, 42, 3)) - -z: typeof BOOLEAN; ->BOOLEAN : Symbol(BOOLEAN, Decl(typeofOperatorWithBooleanType.ts, 1, 3)) - -r: typeof foo; ->foo : Symbol(foo, Decl(typeofOperatorWithBooleanType.ts, 1, 21)) - -var y = { a: true, b: false}; ->y : Symbol(y, Decl(typeofOperatorWithBooleanType.ts, 45, 3)) ->a : Symbol(a, Decl(typeofOperatorWithBooleanType.ts, 45, 9)) ->b : Symbol(b, Decl(typeofOperatorWithBooleanType.ts, 45, 18)) - -z: typeof y.a; ->y.a : Symbol(a, Decl(typeofOperatorWithBooleanType.ts, 45, 9)) ->y : Symbol(y, Decl(typeofOperatorWithBooleanType.ts, 45, 3)) ->a : Symbol(a, Decl(typeofOperatorWithBooleanType.ts, 45, 9)) - -z: typeof objA.a; ->objA.a : Symbol(A.a, Decl(typeofOperatorWithBooleanType.ts, 5, 9)) ->objA : Symbol(objA, Decl(typeofOperatorWithBooleanType.ts, 13, 3)) ->a : Symbol(A.a, Decl(typeofOperatorWithBooleanType.ts, 5, 9)) - -z: typeof A.foo; ->A.foo : Symbol(A.foo, Decl(typeofOperatorWithBooleanType.ts, 6, 22)) ->A : Symbol(A, Decl(typeofOperatorWithBooleanType.ts, 3, 40)) ->foo : Symbol(A.foo, Decl(typeofOperatorWithBooleanType.ts, 6, 22)) - -z: typeof M.n; ->M.n : Symbol(M.n, Decl(typeofOperatorWithBooleanType.ts, 10, 14)) ->M : Symbol(M, Decl(typeofOperatorWithBooleanType.ts, 8, 1)) ->n : Symbol(M.n, Decl(typeofOperatorWithBooleanType.ts, 10, 14)) - diff --git a/tests/baselines/reference/typeofOperatorWithBooleanType.types b/tests/baselines/reference/typeofOperatorWithBooleanType.types deleted file mode 100644 index 06cd7466a18..00000000000 --- a/tests/baselines/reference/typeofOperatorWithBooleanType.types +++ /dev/null @@ -1,176 +0,0 @@ -=== tests/cases/conformance/expressions/unaryOperators/typeofOperator/typeofOperatorWithBooleanType.ts === -// typeof operator on boolean type -var BOOLEAN: boolean; ->BOOLEAN : boolean - -function foo(): boolean { return true; } ->foo : () => boolean ->true : boolean - -class A { ->A : A - - public a: boolean; ->a : boolean - - static foo() { return false; } ->foo : () => boolean ->false : boolean -} -module M { ->M : typeof M - - export var n: boolean; ->n : boolean -} - -var objA = new A(); ->objA : A ->new A() : A ->A : typeof A - -// boolean type var -var ResultIsString1 = typeof BOOLEAN; ->ResultIsString1 : string ->typeof BOOLEAN : string ->BOOLEAN : boolean - -// boolean type literal -var ResultIsString2 = typeof true; ->ResultIsString2 : string ->typeof true : string ->true : boolean - -var ResultIsString3 = typeof { x: true, y: false }; ->ResultIsString3 : string ->typeof { x: true, y: false } : string ->{ x: true, y: false } : { x: boolean; y: boolean; } ->x : boolean ->true : boolean ->y : boolean ->false : boolean - -// boolean type expressions -var ResultIsString4 = typeof objA.a; ->ResultIsString4 : string ->typeof objA.a : string ->objA.a : boolean ->objA : A ->a : boolean - -var ResultIsString5 = typeof M.n; ->ResultIsString5 : string ->typeof M.n : string ->M.n : boolean ->M : typeof M ->n : boolean - -var ResultIsString6 = typeof foo(); ->ResultIsString6 : string ->typeof foo() : string ->foo() : boolean ->foo : () => boolean - -var ResultIsString7 = typeof A.foo(); ->ResultIsString7 : string ->typeof A.foo() : string ->A.foo() : boolean ->A.foo : () => boolean ->A : typeof A ->foo : () => boolean - -// multiple typeof operator -var ResultIsString8 = typeof typeof BOOLEAN; ->ResultIsString8 : string ->typeof typeof BOOLEAN : string ->typeof BOOLEAN : string ->BOOLEAN : boolean - -// miss assignment operators -typeof true; ->typeof true : string ->true : boolean - -typeof BOOLEAN; ->typeof BOOLEAN : string ->BOOLEAN : boolean - -typeof foo(); ->typeof foo() : string ->foo() : boolean ->foo : () => boolean - -typeof true, false; ->typeof true, false : boolean ->typeof true : string ->true : boolean ->false : boolean - -typeof objA.a; ->typeof objA.a : string ->objA.a : boolean ->objA : A ->a : boolean - -typeof M.n; ->typeof M.n : string ->M.n : boolean ->M : typeof M ->n : boolean - -// use typeof in type query -var z: boolean; ->z : boolean - -var x: boolean[]; ->x : boolean[] - -var r: () => boolean; ->r : () => boolean - -z: typeof BOOLEAN; ->z : any ->typeof BOOLEAN : string ->BOOLEAN : boolean - -r: typeof foo; ->r : any ->typeof foo : string ->foo : () => boolean - -var y = { a: true, b: false}; ->y : { a: boolean; b: boolean; } ->{ a: true, b: false} : { a: boolean; b: boolean; } ->a : boolean ->true : boolean ->b : boolean ->false : boolean - -z: typeof y.a; ->z : any ->typeof y.a : string ->y.a : boolean ->y : { a: boolean; b: boolean; } ->a : boolean - -z: typeof objA.a; ->z : any ->typeof objA.a : string ->objA.a : boolean ->objA : A ->a : boolean - -z: typeof A.foo; ->z : any ->typeof A.foo : string ->A.foo : () => boolean ->A : typeof A ->foo : () => boolean - -z: typeof M.n; ->z : any ->typeof M.n : string ->M.n : boolean ->M : typeof M ->n : boolean - diff --git a/tests/baselines/reference/typeofOperatorWithEnumType.errors.txt b/tests/baselines/reference/typeofOperatorWithEnumType.errors.txt new file mode 100644 index 00000000000..6e473b7487d --- /dev/null +++ b/tests/baselines/reference/typeofOperatorWithEnumType.errors.txt @@ -0,0 +1,33 @@ +tests/cases/conformance/expressions/unaryOperators/typeofOperator/typeofOperatorWithEnumType.ts(26,1): error TS7028: Unused label. + + +==== tests/cases/conformance/expressions/unaryOperators/typeofOperator/typeofOperatorWithEnumType.ts (1 errors) ==== + // typeof operator on enum type + + enum ENUM { }; + enum ENUM1 { A, B, "" }; + + // enum type var + var ResultIsString1 = typeof ENUM; + var ResultIsString2 = typeof ENUM1; + + // enum type expressions + var ResultIsString3 = typeof ENUM1["A"]; + var ResultIsString4 = typeof (ENUM[0] + ENUM1["B"]); + + // multiple typeof operators + var ResultIsString5 = typeof typeof ENUM; + var ResultIsString6 = typeof typeof typeof (ENUM[0] + ENUM1.B); + + // miss assignment operators + typeof ENUM; + typeof ENUM1; + typeof ENUM1["B"]; + typeof ENUM, ENUM1; + + // use typeof in type query + enum z { }; + z: typeof ENUM; + ~ +!!! error TS7028: Unused label. + z: typeof ENUM1; \ No newline at end of file diff --git a/tests/baselines/reference/typeofOperatorWithEnumType.symbols b/tests/baselines/reference/typeofOperatorWithEnumType.symbols deleted file mode 100644 index 3ae150ece03..00000000000 --- a/tests/baselines/reference/typeofOperatorWithEnumType.symbols +++ /dev/null @@ -1,69 +0,0 @@ -=== tests/cases/conformance/expressions/unaryOperators/typeofOperator/typeofOperatorWithEnumType.ts === -// typeof operator on enum type - -enum ENUM { }; ->ENUM : Symbol(ENUM, Decl(typeofOperatorWithEnumType.ts, 0, 0)) - -enum ENUM1 { A, B, "" }; ->ENUM1 : Symbol(ENUM1, Decl(typeofOperatorWithEnumType.ts, 2, 14)) ->A : Symbol(ENUM1.A, Decl(typeofOperatorWithEnumType.ts, 3, 12)) ->B : Symbol(ENUM1.B, Decl(typeofOperatorWithEnumType.ts, 3, 15)) - -// enum type var -var ResultIsString1 = typeof ENUM; ->ResultIsString1 : Symbol(ResultIsString1, Decl(typeofOperatorWithEnumType.ts, 6, 3)) ->ENUM : Symbol(ENUM, Decl(typeofOperatorWithEnumType.ts, 0, 0)) - -var ResultIsString2 = typeof ENUM1; ->ResultIsString2 : Symbol(ResultIsString2, Decl(typeofOperatorWithEnumType.ts, 7, 3)) ->ENUM1 : Symbol(ENUM1, Decl(typeofOperatorWithEnumType.ts, 2, 14)) - -// enum type expressions -var ResultIsString3 = typeof ENUM1["A"]; ->ResultIsString3 : Symbol(ResultIsString3, Decl(typeofOperatorWithEnumType.ts, 10, 3)) ->ENUM1 : Symbol(ENUM1, Decl(typeofOperatorWithEnumType.ts, 2, 14)) ->"A" : Symbol(ENUM1.A, Decl(typeofOperatorWithEnumType.ts, 3, 12)) - -var ResultIsString4 = typeof (ENUM[0] + ENUM1["B"]); ->ResultIsString4 : Symbol(ResultIsString4, Decl(typeofOperatorWithEnumType.ts, 11, 3)) ->ENUM : Symbol(ENUM, Decl(typeofOperatorWithEnumType.ts, 0, 0)) ->ENUM1 : Symbol(ENUM1, Decl(typeofOperatorWithEnumType.ts, 2, 14)) ->"B" : Symbol(ENUM1.B, Decl(typeofOperatorWithEnumType.ts, 3, 15)) - -// multiple typeof operators -var ResultIsString5 = typeof typeof ENUM; ->ResultIsString5 : Symbol(ResultIsString5, Decl(typeofOperatorWithEnumType.ts, 14, 3)) ->ENUM : Symbol(ENUM, Decl(typeofOperatorWithEnumType.ts, 0, 0)) - -var ResultIsString6 = typeof typeof typeof (ENUM[0] + ENUM1.B); ->ResultIsString6 : Symbol(ResultIsString6, Decl(typeofOperatorWithEnumType.ts, 15, 3)) ->ENUM : Symbol(ENUM, Decl(typeofOperatorWithEnumType.ts, 0, 0)) ->ENUM1.B : Symbol(ENUM1.B, Decl(typeofOperatorWithEnumType.ts, 3, 15)) ->ENUM1 : Symbol(ENUM1, Decl(typeofOperatorWithEnumType.ts, 2, 14)) ->B : Symbol(ENUM1.B, Decl(typeofOperatorWithEnumType.ts, 3, 15)) - -// miss assignment operators -typeof ENUM; ->ENUM : Symbol(ENUM, Decl(typeofOperatorWithEnumType.ts, 0, 0)) - -typeof ENUM1; ->ENUM1 : Symbol(ENUM1, Decl(typeofOperatorWithEnumType.ts, 2, 14)) - -typeof ENUM1["B"]; ->ENUM1 : Symbol(ENUM1, Decl(typeofOperatorWithEnumType.ts, 2, 14)) ->"B" : Symbol(ENUM1.B, Decl(typeofOperatorWithEnumType.ts, 3, 15)) - -typeof ENUM, ENUM1; ->ENUM : Symbol(ENUM, Decl(typeofOperatorWithEnumType.ts, 0, 0)) ->ENUM1 : Symbol(ENUM1, Decl(typeofOperatorWithEnumType.ts, 2, 14)) - -// use typeof in type query -enum z { }; ->z : Symbol(z, Decl(typeofOperatorWithEnumType.ts, 21, 19)) - -z: typeof ENUM; ->ENUM : Symbol(ENUM, Decl(typeofOperatorWithEnumType.ts, 0, 0)) - -z: typeof ENUM1; ->ENUM1 : Symbol(ENUM1, Decl(typeofOperatorWithEnumType.ts, 2, 14)) - diff --git a/tests/baselines/reference/typeofOperatorWithEnumType.types b/tests/baselines/reference/typeofOperatorWithEnumType.types deleted file mode 100644 index 82bf699a22f..00000000000 --- a/tests/baselines/reference/typeofOperatorWithEnumType.types +++ /dev/null @@ -1,98 +0,0 @@ -=== tests/cases/conformance/expressions/unaryOperators/typeofOperator/typeofOperatorWithEnumType.ts === -// typeof operator on enum type - -enum ENUM { }; ->ENUM : ENUM - -enum ENUM1 { A, B, "" }; ->ENUM1 : ENUM1 ->A : ENUM1 ->B : ENUM1 - -// enum type var -var ResultIsString1 = typeof ENUM; ->ResultIsString1 : string ->typeof ENUM : string ->ENUM : typeof ENUM - -var ResultIsString2 = typeof ENUM1; ->ResultIsString2 : string ->typeof ENUM1 : string ->ENUM1 : typeof ENUM1 - -// enum type expressions -var ResultIsString3 = typeof ENUM1["A"]; ->ResultIsString3 : string ->typeof ENUM1["A"] : string ->ENUM1["A"] : ENUM1 ->ENUM1 : typeof ENUM1 ->"A" : string - -var ResultIsString4 = typeof (ENUM[0] + ENUM1["B"]); ->ResultIsString4 : string ->typeof (ENUM[0] + ENUM1["B"]) : string ->(ENUM[0] + ENUM1["B"]) : string ->ENUM[0] + ENUM1["B"] : string ->ENUM[0] : string ->ENUM : typeof ENUM ->0 : number ->ENUM1["B"] : ENUM1 ->ENUM1 : typeof ENUM1 ->"B" : string - -// multiple typeof operators -var ResultIsString5 = typeof typeof ENUM; ->ResultIsString5 : string ->typeof typeof ENUM : string ->typeof ENUM : string ->ENUM : typeof ENUM - -var ResultIsString6 = typeof typeof typeof (ENUM[0] + ENUM1.B); ->ResultIsString6 : string ->typeof typeof typeof (ENUM[0] + ENUM1.B) : string ->typeof typeof (ENUM[0] + ENUM1.B) : string ->typeof (ENUM[0] + ENUM1.B) : string ->(ENUM[0] + ENUM1.B) : string ->ENUM[0] + ENUM1.B : string ->ENUM[0] : string ->ENUM : typeof ENUM ->0 : number ->ENUM1.B : ENUM1 ->ENUM1 : typeof ENUM1 ->B : ENUM1 - -// miss assignment operators -typeof ENUM; ->typeof ENUM : string ->ENUM : typeof ENUM - -typeof ENUM1; ->typeof ENUM1 : string ->ENUM1 : typeof ENUM1 - -typeof ENUM1["B"]; ->typeof ENUM1["B"] : string ->ENUM1["B"] : ENUM1 ->ENUM1 : typeof ENUM1 ->"B" : string - -typeof ENUM, ENUM1; ->typeof ENUM, ENUM1 : typeof ENUM1 ->typeof ENUM : string ->ENUM : typeof ENUM ->ENUM1 : typeof ENUM1 - -// use typeof in type query -enum z { }; ->z : z - -z: typeof ENUM; ->z : any ->typeof ENUM : string ->ENUM : typeof ENUM - -z: typeof ENUM1; ->z : any ->typeof ENUM1 : string ->ENUM1 : typeof ENUM1 - diff --git a/tests/baselines/reference/typeofOperatorWithNumberType.errors.txt b/tests/baselines/reference/typeofOperatorWithNumberType.errors.txt new file mode 100644 index 00000000000..b84d3798ab0 --- /dev/null +++ b/tests/baselines/reference/typeofOperatorWithNumberType.errors.txt @@ -0,0 +1,69 @@ +tests/cases/conformance/expressions/unaryOperators/typeofOperator/typeofOperatorWithNumberType.ts(50,1): error TS7028: Unused label. +tests/cases/conformance/expressions/unaryOperators/typeofOperator/typeofOperatorWithNumberType.ts(51,1): error TS7028: Unused label. +tests/cases/conformance/expressions/unaryOperators/typeofOperator/typeofOperatorWithNumberType.ts(52,1): error TS7028: Unused label. + + +==== tests/cases/conformance/expressions/unaryOperators/typeofOperator/typeofOperatorWithNumberType.ts (3 errors) ==== + // typeof operator on number type + var NUMBER: number; + var NUMBER1: number[] = [1, 2]; + + function foo(): number { return 1; } + + class A { + public a: number; + static foo() { return 1; } + } + module M { + export var n: number; + } + + var objA = new A(); + + // number type var + var ResultIsString1 = typeof NUMBER; + var ResultIsString2 = typeof NUMBER1; + + // number type literal + var ResultIsString3 = typeof 1; + var ResultIsString4 = typeof { x: 1, y: 2}; + var ResultIsString5 = typeof { x: 1, y: (n: number) => { return n; } }; + + // number type expressions + var ResultIsString6 = typeof objA.a; + var ResultIsString7 = typeof M.n; + var ResultIsString8 = typeof NUMBER1[0]; + var ResultIsString9 = typeof foo(); + var ResultIsString10 = typeof A.foo(); + var ResultIsString11 = typeof (NUMBER + NUMBER); + + // multiple typeof operators + var ResultIsString12 = typeof typeof NUMBER; + var ResultIsString13 = typeof typeof typeof (NUMBER + NUMBER); + + // miss assignment operators + typeof 1; + typeof NUMBER; + typeof NUMBER1; + typeof foo(); + typeof objA.a; + typeof M.n; + typeof objA.a, M.n; + + // use typeof in type query + var z: number; + var x: number[]; + z: typeof NUMBER; + ~ +!!! error TS7028: Unused label. + x: typeof NUMBER1; + ~ +!!! error TS7028: Unused label. + r: typeof foo; + ~ +!!! error TS7028: Unused label. + var y = { a: 1, b: 2 }; + z: typeof y.a; + z: typeof objA.a; + z: typeof A.foo; + z: typeof M.n; \ No newline at end of file diff --git a/tests/baselines/reference/typeofOperatorWithNumberType.symbols b/tests/baselines/reference/typeofOperatorWithNumberType.symbols deleted file mode 100644 index df49b7dccb6..00000000000 --- a/tests/baselines/reference/typeofOperatorWithNumberType.symbols +++ /dev/null @@ -1,168 +0,0 @@ -=== tests/cases/conformance/expressions/unaryOperators/typeofOperator/typeofOperatorWithNumberType.ts === -// typeof operator on number type -var NUMBER: number; ->NUMBER : Symbol(NUMBER, Decl(typeofOperatorWithNumberType.ts, 1, 3)) - -var NUMBER1: number[] = [1, 2]; ->NUMBER1 : Symbol(NUMBER1, Decl(typeofOperatorWithNumberType.ts, 2, 3)) - -function foo(): number { return 1; } ->foo : Symbol(foo, Decl(typeofOperatorWithNumberType.ts, 2, 31)) - -class A { ->A : Symbol(A, Decl(typeofOperatorWithNumberType.ts, 4, 36)) - - public a: number; ->a : Symbol(a, Decl(typeofOperatorWithNumberType.ts, 6, 9)) - - static foo() { return 1; } ->foo : Symbol(A.foo, Decl(typeofOperatorWithNumberType.ts, 7, 21)) -} -module M { ->M : Symbol(M, Decl(typeofOperatorWithNumberType.ts, 9, 1)) - - export var n: number; ->n : Symbol(n, Decl(typeofOperatorWithNumberType.ts, 11, 14)) -} - -var objA = new A(); ->objA : Symbol(objA, Decl(typeofOperatorWithNumberType.ts, 14, 3)) ->A : Symbol(A, Decl(typeofOperatorWithNumberType.ts, 4, 36)) - -// number type var -var ResultIsString1 = typeof NUMBER; ->ResultIsString1 : Symbol(ResultIsString1, Decl(typeofOperatorWithNumberType.ts, 17, 3)) ->NUMBER : Symbol(NUMBER, Decl(typeofOperatorWithNumberType.ts, 1, 3)) - -var ResultIsString2 = typeof NUMBER1; ->ResultIsString2 : Symbol(ResultIsString2, Decl(typeofOperatorWithNumberType.ts, 18, 3)) ->NUMBER1 : Symbol(NUMBER1, Decl(typeofOperatorWithNumberType.ts, 2, 3)) - -// number type literal -var ResultIsString3 = typeof 1; ->ResultIsString3 : Symbol(ResultIsString3, Decl(typeofOperatorWithNumberType.ts, 21, 3)) - -var ResultIsString4 = typeof { x: 1, y: 2}; ->ResultIsString4 : Symbol(ResultIsString4, Decl(typeofOperatorWithNumberType.ts, 22, 3)) ->x : Symbol(x, Decl(typeofOperatorWithNumberType.ts, 22, 30)) ->y : Symbol(y, Decl(typeofOperatorWithNumberType.ts, 22, 36)) - -var ResultIsString5 = typeof { x: 1, y: (n: number) => { return n; } }; ->ResultIsString5 : Symbol(ResultIsString5, Decl(typeofOperatorWithNumberType.ts, 23, 3)) ->x : Symbol(x, Decl(typeofOperatorWithNumberType.ts, 23, 30)) ->y : Symbol(y, Decl(typeofOperatorWithNumberType.ts, 23, 36)) ->n : Symbol(n, Decl(typeofOperatorWithNumberType.ts, 23, 41)) ->n : Symbol(n, Decl(typeofOperatorWithNumberType.ts, 23, 41)) - -// number type expressions -var ResultIsString6 = typeof objA.a; ->ResultIsString6 : Symbol(ResultIsString6, Decl(typeofOperatorWithNumberType.ts, 26, 3)) ->objA.a : Symbol(A.a, Decl(typeofOperatorWithNumberType.ts, 6, 9)) ->objA : Symbol(objA, Decl(typeofOperatorWithNumberType.ts, 14, 3)) ->a : Symbol(A.a, Decl(typeofOperatorWithNumberType.ts, 6, 9)) - -var ResultIsString7 = typeof M.n; ->ResultIsString7 : Symbol(ResultIsString7, Decl(typeofOperatorWithNumberType.ts, 27, 3)) ->M.n : Symbol(M.n, Decl(typeofOperatorWithNumberType.ts, 11, 14)) ->M : Symbol(M, Decl(typeofOperatorWithNumberType.ts, 9, 1)) ->n : Symbol(M.n, Decl(typeofOperatorWithNumberType.ts, 11, 14)) - -var ResultIsString8 = typeof NUMBER1[0]; ->ResultIsString8 : Symbol(ResultIsString8, Decl(typeofOperatorWithNumberType.ts, 28, 3)) ->NUMBER1 : Symbol(NUMBER1, Decl(typeofOperatorWithNumberType.ts, 2, 3)) - -var ResultIsString9 = typeof foo(); ->ResultIsString9 : Symbol(ResultIsString9, Decl(typeofOperatorWithNumberType.ts, 29, 3)) ->foo : Symbol(foo, Decl(typeofOperatorWithNumberType.ts, 2, 31)) - -var ResultIsString10 = typeof A.foo(); ->ResultIsString10 : Symbol(ResultIsString10, Decl(typeofOperatorWithNumberType.ts, 30, 3)) ->A.foo : Symbol(A.foo, Decl(typeofOperatorWithNumberType.ts, 7, 21)) ->A : Symbol(A, Decl(typeofOperatorWithNumberType.ts, 4, 36)) ->foo : Symbol(A.foo, Decl(typeofOperatorWithNumberType.ts, 7, 21)) - -var ResultIsString11 = typeof (NUMBER + NUMBER); ->ResultIsString11 : Symbol(ResultIsString11, Decl(typeofOperatorWithNumberType.ts, 31, 3)) ->NUMBER : Symbol(NUMBER, Decl(typeofOperatorWithNumberType.ts, 1, 3)) ->NUMBER : Symbol(NUMBER, Decl(typeofOperatorWithNumberType.ts, 1, 3)) - -// multiple typeof operators -var ResultIsString12 = typeof typeof NUMBER; ->ResultIsString12 : Symbol(ResultIsString12, Decl(typeofOperatorWithNumberType.ts, 34, 3)) ->NUMBER : Symbol(NUMBER, Decl(typeofOperatorWithNumberType.ts, 1, 3)) - -var ResultIsString13 = typeof typeof typeof (NUMBER + NUMBER); ->ResultIsString13 : Symbol(ResultIsString13, Decl(typeofOperatorWithNumberType.ts, 35, 3)) ->NUMBER : Symbol(NUMBER, Decl(typeofOperatorWithNumberType.ts, 1, 3)) ->NUMBER : Symbol(NUMBER, Decl(typeofOperatorWithNumberType.ts, 1, 3)) - -// miss assignment operators -typeof 1; -typeof NUMBER; ->NUMBER : Symbol(NUMBER, Decl(typeofOperatorWithNumberType.ts, 1, 3)) - -typeof NUMBER1; ->NUMBER1 : Symbol(NUMBER1, Decl(typeofOperatorWithNumberType.ts, 2, 3)) - -typeof foo(); ->foo : Symbol(foo, Decl(typeofOperatorWithNumberType.ts, 2, 31)) - -typeof objA.a; ->objA.a : Symbol(A.a, Decl(typeofOperatorWithNumberType.ts, 6, 9)) ->objA : Symbol(objA, Decl(typeofOperatorWithNumberType.ts, 14, 3)) ->a : Symbol(A.a, Decl(typeofOperatorWithNumberType.ts, 6, 9)) - -typeof M.n; ->M.n : Symbol(M.n, Decl(typeofOperatorWithNumberType.ts, 11, 14)) ->M : Symbol(M, Decl(typeofOperatorWithNumberType.ts, 9, 1)) ->n : Symbol(M.n, Decl(typeofOperatorWithNumberType.ts, 11, 14)) - -typeof objA.a, M.n; ->objA.a : Symbol(A.a, Decl(typeofOperatorWithNumberType.ts, 6, 9)) ->objA : Symbol(objA, Decl(typeofOperatorWithNumberType.ts, 14, 3)) ->a : Symbol(A.a, Decl(typeofOperatorWithNumberType.ts, 6, 9)) ->M.n : Symbol(M.n, Decl(typeofOperatorWithNumberType.ts, 11, 14)) ->M : Symbol(M, Decl(typeofOperatorWithNumberType.ts, 9, 1)) ->n : Symbol(M.n, Decl(typeofOperatorWithNumberType.ts, 11, 14)) - -// use typeof in type query -var z: number; ->z : Symbol(z, Decl(typeofOperatorWithNumberType.ts, 47, 3)) - -var x: number[]; ->x : Symbol(x, Decl(typeofOperatorWithNumberType.ts, 48, 3)) - -z: typeof NUMBER; ->NUMBER : Symbol(NUMBER, Decl(typeofOperatorWithNumberType.ts, 1, 3)) - -x: typeof NUMBER1; ->NUMBER1 : Symbol(NUMBER1, Decl(typeofOperatorWithNumberType.ts, 2, 3)) - -r: typeof foo; ->foo : Symbol(foo, Decl(typeofOperatorWithNumberType.ts, 2, 31)) - -var y = { a: 1, b: 2 }; ->y : Symbol(y, Decl(typeofOperatorWithNumberType.ts, 52, 3)) ->a : Symbol(a, Decl(typeofOperatorWithNumberType.ts, 52, 9)) ->b : Symbol(b, Decl(typeofOperatorWithNumberType.ts, 52, 15)) - -z: typeof y.a; ->y.a : Symbol(a, Decl(typeofOperatorWithNumberType.ts, 52, 9)) ->y : Symbol(y, Decl(typeofOperatorWithNumberType.ts, 52, 3)) ->a : Symbol(a, Decl(typeofOperatorWithNumberType.ts, 52, 9)) - -z: typeof objA.a; ->objA.a : Symbol(A.a, Decl(typeofOperatorWithNumberType.ts, 6, 9)) ->objA : Symbol(objA, Decl(typeofOperatorWithNumberType.ts, 14, 3)) ->a : Symbol(A.a, Decl(typeofOperatorWithNumberType.ts, 6, 9)) - -z: typeof A.foo; ->A.foo : Symbol(A.foo, Decl(typeofOperatorWithNumberType.ts, 7, 21)) ->A : Symbol(A, Decl(typeofOperatorWithNumberType.ts, 4, 36)) ->foo : Symbol(A.foo, Decl(typeofOperatorWithNumberType.ts, 7, 21)) - -z: typeof M.n; ->M.n : Symbol(M.n, Decl(typeofOperatorWithNumberType.ts, 11, 14)) ->M : Symbol(M, Decl(typeofOperatorWithNumberType.ts, 9, 1)) ->n : Symbol(M.n, Decl(typeofOperatorWithNumberType.ts, 11, 14)) - diff --git a/tests/baselines/reference/typeofOperatorWithNumberType.types b/tests/baselines/reference/typeofOperatorWithNumberType.types deleted file mode 100644 index b80e6b1d4a8..00000000000 --- a/tests/baselines/reference/typeofOperatorWithNumberType.types +++ /dev/null @@ -1,233 +0,0 @@ -=== tests/cases/conformance/expressions/unaryOperators/typeofOperator/typeofOperatorWithNumberType.ts === -// typeof operator on number type -var NUMBER: number; ->NUMBER : number - -var NUMBER1: number[] = [1, 2]; ->NUMBER1 : number[] ->[1, 2] : number[] ->1 : number ->2 : number - -function foo(): number { return 1; } ->foo : () => number ->1 : number - -class A { ->A : A - - public a: number; ->a : number - - static foo() { return 1; } ->foo : () => number ->1 : number -} -module M { ->M : typeof M - - export var n: number; ->n : number -} - -var objA = new A(); ->objA : A ->new A() : A ->A : typeof A - -// number type var -var ResultIsString1 = typeof NUMBER; ->ResultIsString1 : string ->typeof NUMBER : string ->NUMBER : number - -var ResultIsString2 = typeof NUMBER1; ->ResultIsString2 : string ->typeof NUMBER1 : string ->NUMBER1 : number[] - -// number type literal -var ResultIsString3 = typeof 1; ->ResultIsString3 : string ->typeof 1 : string ->1 : number - -var ResultIsString4 = typeof { x: 1, y: 2}; ->ResultIsString4 : string ->typeof { x: 1, y: 2} : string ->{ x: 1, y: 2} : { x: number; y: number; } ->x : number ->1 : number ->y : number ->2 : number - -var ResultIsString5 = typeof { x: 1, y: (n: number) => { return n; } }; ->ResultIsString5 : string ->typeof { x: 1, y: (n: number) => { return n; } } : string ->{ x: 1, y: (n: number) => { return n; } } : { x: number; y: (n: number) => number; } ->x : number ->1 : number ->y : (n: number) => number ->(n: number) => { return n; } : (n: number) => number ->n : number ->n : number - -// number type expressions -var ResultIsString6 = typeof objA.a; ->ResultIsString6 : string ->typeof objA.a : string ->objA.a : number ->objA : A ->a : number - -var ResultIsString7 = typeof M.n; ->ResultIsString7 : string ->typeof M.n : string ->M.n : number ->M : typeof M ->n : number - -var ResultIsString8 = typeof NUMBER1[0]; ->ResultIsString8 : string ->typeof NUMBER1[0] : string ->NUMBER1[0] : number ->NUMBER1 : number[] ->0 : number - -var ResultIsString9 = typeof foo(); ->ResultIsString9 : string ->typeof foo() : string ->foo() : number ->foo : () => number - -var ResultIsString10 = typeof A.foo(); ->ResultIsString10 : string ->typeof A.foo() : string ->A.foo() : number ->A.foo : () => number ->A : typeof A ->foo : () => number - -var ResultIsString11 = typeof (NUMBER + NUMBER); ->ResultIsString11 : string ->typeof (NUMBER + NUMBER) : string ->(NUMBER + NUMBER) : number ->NUMBER + NUMBER : number ->NUMBER : number ->NUMBER : number - -// multiple typeof operators -var ResultIsString12 = typeof typeof NUMBER; ->ResultIsString12 : string ->typeof typeof NUMBER : string ->typeof NUMBER : string ->NUMBER : number - -var ResultIsString13 = typeof typeof typeof (NUMBER + NUMBER); ->ResultIsString13 : string ->typeof typeof typeof (NUMBER + NUMBER) : string ->typeof typeof (NUMBER + NUMBER) : string ->typeof (NUMBER + NUMBER) : string ->(NUMBER + NUMBER) : number ->NUMBER + NUMBER : number ->NUMBER : number ->NUMBER : number - -// miss assignment operators -typeof 1; ->typeof 1 : string ->1 : number - -typeof NUMBER; ->typeof NUMBER : string ->NUMBER : number - -typeof NUMBER1; ->typeof NUMBER1 : string ->NUMBER1 : number[] - -typeof foo(); ->typeof foo() : string ->foo() : number ->foo : () => number - -typeof objA.a; ->typeof objA.a : string ->objA.a : number ->objA : A ->a : number - -typeof M.n; ->typeof M.n : string ->M.n : number ->M : typeof M ->n : number - -typeof objA.a, M.n; ->typeof objA.a, M.n : number ->typeof objA.a : string ->objA.a : number ->objA : A ->a : number ->M.n : number ->M : typeof M ->n : number - -// use typeof in type query -var z: number; ->z : number - -var x: number[]; ->x : number[] - -z: typeof NUMBER; ->z : any ->typeof NUMBER : string ->NUMBER : number - -x: typeof NUMBER1; ->x : any ->typeof NUMBER1 : string ->NUMBER1 : number[] - -r: typeof foo; ->r : any ->typeof foo : string ->foo : () => number - -var y = { a: 1, b: 2 }; ->y : { a: number; b: number; } ->{ a: 1, b: 2 } : { a: number; b: number; } ->a : number ->1 : number ->b : number ->2 : number - -z: typeof y.a; ->z : any ->typeof y.a : string ->y.a : number ->y : { a: number; b: number; } ->a : number - -z: typeof objA.a; ->z : any ->typeof objA.a : string ->objA.a : number ->objA : A ->a : number - -z: typeof A.foo; ->z : any ->typeof A.foo : string ->A.foo : () => number ->A : typeof A ->foo : () => number - -z: typeof M.n; ->z : any ->typeof M.n : string ->M.n : number ->M : typeof M ->n : number - diff --git a/tests/baselines/reference/typeofOperatorWithStringType.errors.txt b/tests/baselines/reference/typeofOperatorWithStringType.errors.txt new file mode 100644 index 00000000000..37b2cafab37 --- /dev/null +++ b/tests/baselines/reference/typeofOperatorWithStringType.errors.txt @@ -0,0 +1,69 @@ +tests/cases/conformance/expressions/unaryOperators/typeofOperator/typeofOperatorWithStringType.ts(50,1): error TS7028: Unused label. +tests/cases/conformance/expressions/unaryOperators/typeofOperator/typeofOperatorWithStringType.ts(51,1): error TS7028: Unused label. +tests/cases/conformance/expressions/unaryOperators/typeofOperator/typeofOperatorWithStringType.ts(52,1): error TS7028: Unused label. + + +==== tests/cases/conformance/expressions/unaryOperators/typeofOperator/typeofOperatorWithStringType.ts (3 errors) ==== + // typeof operator on string type + var STRING: string; + var STRING1: string[] = ["", "abc"]; + + function foo(): string { return "abc"; } + + class A { + public a: string; + static foo() { return ""; } + } + module M { + export var n: string; + } + + var objA = new A(); + + // string type var + var ResultIsString1 = typeof STRING; + var ResultIsString2 = typeof STRING1; + + // string type literal + var ResultIsString3 = typeof ""; + var ResultIsString4 = typeof { x: "", y: "" }; + var ResultIsString5 = typeof { x: "", y: (s: string) => { return s; } }; + + // string type expressions + var ResultIsString6 = typeof objA.a; + var ResultIsString7 = typeof M.n; + var ResultIsString8 = typeof STRING1[0]; + var ResultIsString9 = typeof foo(); + var ResultIsString10 = typeof A.foo(); + var ResultIsString11 = typeof (STRING + STRING); + var ResultIsString12 = typeof STRING.charAt(0); + + // multiple typeof operators + var ResultIsString13 = typeof typeof STRING; + var ResultIsString14 = typeof typeof typeof (STRING + STRING); + + // miss assignment operators + typeof ""; + typeof STRING; + typeof STRING1; + typeof foo(); + typeof objA.a, M.n; + + // use typeof in type query + var z: string; + var x: string[]; + var r: () => string; + z: typeof STRING; + ~ +!!! error TS7028: Unused label. + x: typeof STRING1; + ~ +!!! error TS7028: Unused label. + r: typeof foo; + ~ +!!! error TS7028: Unused label. + var y = { a: "", b: "" }; + z: typeof y.a; + z: typeof objA.a; + z: typeof A.foo; + z: typeof M.n; \ No newline at end of file diff --git a/tests/baselines/reference/typeofOperatorWithStringType.symbols b/tests/baselines/reference/typeofOperatorWithStringType.symbols deleted file mode 100644 index 6da22469f83..00000000000 --- a/tests/baselines/reference/typeofOperatorWithStringType.symbols +++ /dev/null @@ -1,167 +0,0 @@ -=== tests/cases/conformance/expressions/unaryOperators/typeofOperator/typeofOperatorWithStringType.ts === -// typeof operator on string type -var STRING: string; ->STRING : Symbol(STRING, Decl(typeofOperatorWithStringType.ts, 1, 3)) - -var STRING1: string[] = ["", "abc"]; ->STRING1 : Symbol(STRING1, Decl(typeofOperatorWithStringType.ts, 2, 3)) - -function foo(): string { return "abc"; } ->foo : Symbol(foo, Decl(typeofOperatorWithStringType.ts, 2, 36)) - -class A { ->A : Symbol(A, Decl(typeofOperatorWithStringType.ts, 4, 40)) - - public a: string; ->a : Symbol(a, Decl(typeofOperatorWithStringType.ts, 6, 9)) - - static foo() { return ""; } ->foo : Symbol(A.foo, Decl(typeofOperatorWithStringType.ts, 7, 21)) -} -module M { ->M : Symbol(M, Decl(typeofOperatorWithStringType.ts, 9, 1)) - - export var n: string; ->n : Symbol(n, Decl(typeofOperatorWithStringType.ts, 11, 14)) -} - -var objA = new A(); ->objA : Symbol(objA, Decl(typeofOperatorWithStringType.ts, 14, 3)) ->A : Symbol(A, Decl(typeofOperatorWithStringType.ts, 4, 40)) - -// string type var -var ResultIsString1 = typeof STRING; ->ResultIsString1 : Symbol(ResultIsString1, Decl(typeofOperatorWithStringType.ts, 17, 3)) ->STRING : Symbol(STRING, Decl(typeofOperatorWithStringType.ts, 1, 3)) - -var ResultIsString2 = typeof STRING1; ->ResultIsString2 : Symbol(ResultIsString2, Decl(typeofOperatorWithStringType.ts, 18, 3)) ->STRING1 : Symbol(STRING1, Decl(typeofOperatorWithStringType.ts, 2, 3)) - -// string type literal -var ResultIsString3 = typeof ""; ->ResultIsString3 : Symbol(ResultIsString3, Decl(typeofOperatorWithStringType.ts, 21, 3)) - -var ResultIsString4 = typeof { x: "", y: "" }; ->ResultIsString4 : Symbol(ResultIsString4, Decl(typeofOperatorWithStringType.ts, 22, 3)) ->x : Symbol(x, Decl(typeofOperatorWithStringType.ts, 22, 30)) ->y : Symbol(y, Decl(typeofOperatorWithStringType.ts, 22, 37)) - -var ResultIsString5 = typeof { x: "", y: (s: string) => { return s; } }; ->ResultIsString5 : Symbol(ResultIsString5, Decl(typeofOperatorWithStringType.ts, 23, 3)) ->x : Symbol(x, Decl(typeofOperatorWithStringType.ts, 23, 30)) ->y : Symbol(y, Decl(typeofOperatorWithStringType.ts, 23, 37)) ->s : Symbol(s, Decl(typeofOperatorWithStringType.ts, 23, 42)) ->s : Symbol(s, Decl(typeofOperatorWithStringType.ts, 23, 42)) - -// string type expressions -var ResultIsString6 = typeof objA.a; ->ResultIsString6 : Symbol(ResultIsString6, Decl(typeofOperatorWithStringType.ts, 26, 3)) ->objA.a : Symbol(A.a, Decl(typeofOperatorWithStringType.ts, 6, 9)) ->objA : Symbol(objA, Decl(typeofOperatorWithStringType.ts, 14, 3)) ->a : Symbol(A.a, Decl(typeofOperatorWithStringType.ts, 6, 9)) - -var ResultIsString7 = typeof M.n; ->ResultIsString7 : Symbol(ResultIsString7, Decl(typeofOperatorWithStringType.ts, 27, 3)) ->M.n : Symbol(M.n, Decl(typeofOperatorWithStringType.ts, 11, 14)) ->M : Symbol(M, Decl(typeofOperatorWithStringType.ts, 9, 1)) ->n : Symbol(M.n, Decl(typeofOperatorWithStringType.ts, 11, 14)) - -var ResultIsString8 = typeof STRING1[0]; ->ResultIsString8 : Symbol(ResultIsString8, Decl(typeofOperatorWithStringType.ts, 28, 3)) ->STRING1 : Symbol(STRING1, Decl(typeofOperatorWithStringType.ts, 2, 3)) - -var ResultIsString9 = typeof foo(); ->ResultIsString9 : Symbol(ResultIsString9, Decl(typeofOperatorWithStringType.ts, 29, 3)) ->foo : Symbol(foo, Decl(typeofOperatorWithStringType.ts, 2, 36)) - -var ResultIsString10 = typeof A.foo(); ->ResultIsString10 : Symbol(ResultIsString10, Decl(typeofOperatorWithStringType.ts, 30, 3)) ->A.foo : Symbol(A.foo, Decl(typeofOperatorWithStringType.ts, 7, 21)) ->A : Symbol(A, Decl(typeofOperatorWithStringType.ts, 4, 40)) ->foo : Symbol(A.foo, Decl(typeofOperatorWithStringType.ts, 7, 21)) - -var ResultIsString11 = typeof (STRING + STRING); ->ResultIsString11 : Symbol(ResultIsString11, Decl(typeofOperatorWithStringType.ts, 31, 3)) ->STRING : Symbol(STRING, Decl(typeofOperatorWithStringType.ts, 1, 3)) ->STRING : Symbol(STRING, Decl(typeofOperatorWithStringType.ts, 1, 3)) - -var ResultIsString12 = typeof STRING.charAt(0); ->ResultIsString12 : Symbol(ResultIsString12, Decl(typeofOperatorWithStringType.ts, 32, 3)) ->STRING.charAt : Symbol(String.charAt, Decl(lib.d.ts, 279, 23)) ->STRING : Symbol(STRING, Decl(typeofOperatorWithStringType.ts, 1, 3)) ->charAt : Symbol(String.charAt, Decl(lib.d.ts, 279, 23)) - -// multiple typeof operators -var ResultIsString13 = typeof typeof STRING; ->ResultIsString13 : Symbol(ResultIsString13, Decl(typeofOperatorWithStringType.ts, 35, 3)) ->STRING : Symbol(STRING, Decl(typeofOperatorWithStringType.ts, 1, 3)) - -var ResultIsString14 = typeof typeof typeof (STRING + STRING); ->ResultIsString14 : Symbol(ResultIsString14, Decl(typeofOperatorWithStringType.ts, 36, 3)) ->STRING : Symbol(STRING, Decl(typeofOperatorWithStringType.ts, 1, 3)) ->STRING : Symbol(STRING, Decl(typeofOperatorWithStringType.ts, 1, 3)) - -// miss assignment operators -typeof ""; -typeof STRING; ->STRING : Symbol(STRING, Decl(typeofOperatorWithStringType.ts, 1, 3)) - -typeof STRING1; ->STRING1 : Symbol(STRING1, Decl(typeofOperatorWithStringType.ts, 2, 3)) - -typeof foo(); ->foo : Symbol(foo, Decl(typeofOperatorWithStringType.ts, 2, 36)) - -typeof objA.a, M.n; ->objA.a : Symbol(A.a, Decl(typeofOperatorWithStringType.ts, 6, 9)) ->objA : Symbol(objA, Decl(typeofOperatorWithStringType.ts, 14, 3)) ->a : Symbol(A.a, Decl(typeofOperatorWithStringType.ts, 6, 9)) ->M.n : Symbol(M.n, Decl(typeofOperatorWithStringType.ts, 11, 14)) ->M : Symbol(M, Decl(typeofOperatorWithStringType.ts, 9, 1)) ->n : Symbol(M.n, Decl(typeofOperatorWithStringType.ts, 11, 14)) - -// use typeof in type query -var z: string; ->z : Symbol(z, Decl(typeofOperatorWithStringType.ts, 46, 3)) - -var x: string[]; ->x : Symbol(x, Decl(typeofOperatorWithStringType.ts, 47, 3)) - -var r: () => string; ->r : Symbol(r, Decl(typeofOperatorWithStringType.ts, 48, 3)) - -z: typeof STRING; ->STRING : Symbol(STRING, Decl(typeofOperatorWithStringType.ts, 1, 3)) - -x: typeof STRING1; ->STRING1 : Symbol(STRING1, Decl(typeofOperatorWithStringType.ts, 2, 3)) - -r: typeof foo; ->foo : Symbol(foo, Decl(typeofOperatorWithStringType.ts, 2, 36)) - -var y = { a: "", b: "" }; ->y : Symbol(y, Decl(typeofOperatorWithStringType.ts, 52, 3)) ->a : Symbol(a, Decl(typeofOperatorWithStringType.ts, 52, 9)) ->b : Symbol(b, Decl(typeofOperatorWithStringType.ts, 52, 16)) - -z: typeof y.a; ->y.a : Symbol(a, Decl(typeofOperatorWithStringType.ts, 52, 9)) ->y : Symbol(y, Decl(typeofOperatorWithStringType.ts, 52, 3)) ->a : Symbol(a, Decl(typeofOperatorWithStringType.ts, 52, 9)) - -z: typeof objA.a; ->objA.a : Symbol(A.a, Decl(typeofOperatorWithStringType.ts, 6, 9)) ->objA : Symbol(objA, Decl(typeofOperatorWithStringType.ts, 14, 3)) ->a : Symbol(A.a, Decl(typeofOperatorWithStringType.ts, 6, 9)) - -z: typeof A.foo; ->A.foo : Symbol(A.foo, Decl(typeofOperatorWithStringType.ts, 7, 21)) ->A : Symbol(A, Decl(typeofOperatorWithStringType.ts, 4, 40)) ->foo : Symbol(A.foo, Decl(typeofOperatorWithStringType.ts, 7, 21)) - -z: typeof M.n; ->M.n : Symbol(M.n, Decl(typeofOperatorWithStringType.ts, 11, 14)) ->M : Symbol(M, Decl(typeofOperatorWithStringType.ts, 9, 1)) ->n : Symbol(M.n, Decl(typeofOperatorWithStringType.ts, 11, 14)) - diff --git a/tests/baselines/reference/typeofOperatorWithStringType.types b/tests/baselines/reference/typeofOperatorWithStringType.types deleted file mode 100644 index 3ae657a9951..00000000000 --- a/tests/baselines/reference/typeofOperatorWithStringType.types +++ /dev/null @@ -1,233 +0,0 @@ -=== tests/cases/conformance/expressions/unaryOperators/typeofOperator/typeofOperatorWithStringType.ts === -// typeof operator on string type -var STRING: string; ->STRING : string - -var STRING1: string[] = ["", "abc"]; ->STRING1 : string[] ->["", "abc"] : string[] ->"" : string ->"abc" : string - -function foo(): string { return "abc"; } ->foo : () => string ->"abc" : string - -class A { ->A : A - - public a: string; ->a : string - - static foo() { return ""; } ->foo : () => string ->"" : string -} -module M { ->M : typeof M - - export var n: string; ->n : string -} - -var objA = new A(); ->objA : A ->new A() : A ->A : typeof A - -// string type var -var ResultIsString1 = typeof STRING; ->ResultIsString1 : string ->typeof STRING : string ->STRING : string - -var ResultIsString2 = typeof STRING1; ->ResultIsString2 : string ->typeof STRING1 : string ->STRING1 : string[] - -// string type literal -var ResultIsString3 = typeof ""; ->ResultIsString3 : string ->typeof "" : string ->"" : string - -var ResultIsString4 = typeof { x: "", y: "" }; ->ResultIsString4 : string ->typeof { x: "", y: "" } : string ->{ x: "", y: "" } : { x: string; y: string; } ->x : string ->"" : string ->y : string ->"" : string - -var ResultIsString5 = typeof { x: "", y: (s: string) => { return s; } }; ->ResultIsString5 : string ->typeof { x: "", y: (s: string) => { return s; } } : string ->{ x: "", y: (s: string) => { return s; } } : { x: string; y: (s: string) => string; } ->x : string ->"" : string ->y : (s: string) => string ->(s: string) => { return s; } : (s: string) => string ->s : string ->s : string - -// string type expressions -var ResultIsString6 = typeof objA.a; ->ResultIsString6 : string ->typeof objA.a : string ->objA.a : string ->objA : A ->a : string - -var ResultIsString7 = typeof M.n; ->ResultIsString7 : string ->typeof M.n : string ->M.n : string ->M : typeof M ->n : string - -var ResultIsString8 = typeof STRING1[0]; ->ResultIsString8 : string ->typeof STRING1[0] : string ->STRING1[0] : string ->STRING1 : string[] ->0 : number - -var ResultIsString9 = typeof foo(); ->ResultIsString9 : string ->typeof foo() : string ->foo() : string ->foo : () => string - -var ResultIsString10 = typeof A.foo(); ->ResultIsString10 : string ->typeof A.foo() : string ->A.foo() : string ->A.foo : () => string ->A : typeof A ->foo : () => string - -var ResultIsString11 = typeof (STRING + STRING); ->ResultIsString11 : string ->typeof (STRING + STRING) : string ->(STRING + STRING) : string ->STRING + STRING : string ->STRING : string ->STRING : string - -var ResultIsString12 = typeof STRING.charAt(0); ->ResultIsString12 : string ->typeof STRING.charAt(0) : string ->STRING.charAt(0) : string ->STRING.charAt : (pos: number) => string ->STRING : string ->charAt : (pos: number) => string ->0 : number - -// multiple typeof operators -var ResultIsString13 = typeof typeof STRING; ->ResultIsString13 : string ->typeof typeof STRING : string ->typeof STRING : string ->STRING : string - -var ResultIsString14 = typeof typeof typeof (STRING + STRING); ->ResultIsString14 : string ->typeof typeof typeof (STRING + STRING) : string ->typeof typeof (STRING + STRING) : string ->typeof (STRING + STRING) : string ->(STRING + STRING) : string ->STRING + STRING : string ->STRING : string ->STRING : string - -// miss assignment operators -typeof ""; ->typeof "" : string ->"" : string - -typeof STRING; ->typeof STRING : string ->STRING : string - -typeof STRING1; ->typeof STRING1 : string ->STRING1 : string[] - -typeof foo(); ->typeof foo() : string ->foo() : string ->foo : () => string - -typeof objA.a, M.n; ->typeof objA.a, M.n : string ->typeof objA.a : string ->objA.a : string ->objA : A ->a : string ->M.n : string ->M : typeof M ->n : string - -// use typeof in type query -var z: string; ->z : string - -var x: string[]; ->x : string[] - -var r: () => string; ->r : () => string - -z: typeof STRING; ->z : any ->typeof STRING : string ->STRING : string - -x: typeof STRING1; ->x : any ->typeof STRING1 : string ->STRING1 : string[] - -r: typeof foo; ->r : any ->typeof foo : string ->foo : () => string - -var y = { a: "", b: "" }; ->y : { a: string; b: string; } ->{ a: "", b: "" } : { a: string; b: string; } ->a : string ->"" : string ->b : string ->"" : string - -z: typeof y.a; ->z : any ->typeof y.a : string ->y.a : string ->y : { a: string; b: string; } ->a : string - -z: typeof objA.a; ->z : any ->typeof objA.a : string ->objA.a : string ->objA : A ->a : string - -z: typeof A.foo; ->z : any ->typeof A.foo : string ->A.foo : () => string ->A : typeof A ->foo : () => string - -z: typeof M.n; ->z : any ->typeof M.n : string ->M.n : string ->M : typeof M ->n : string - diff --git a/tests/baselines/reference/undeclaredVarEmit.errors.txt b/tests/baselines/reference/undeclaredVarEmit.errors.txt index af6298b61d2..a95323aa362 100644 --- a/tests/baselines/reference/undeclaredVarEmit.errors.txt +++ b/tests/baselines/reference/undeclaredVarEmit.errors.txt @@ -1,7 +1,10 @@ +tests/cases/compiler/undeclaredVarEmit.ts(1,1): error TS7028: Unused label. tests/cases/compiler/undeclaredVarEmit.ts(1,4): error TS2304: Cannot find name 'number'. -==== tests/cases/compiler/undeclaredVarEmit.ts (1 errors) ==== +==== tests/cases/compiler/undeclaredVarEmit.ts (2 errors) ==== f: number; + ~ +!!! error TS7028: Unused label. ~~~~~~ !!! error TS2304: Cannot find name 'number'. \ No newline at end of file diff --git a/tests/baselines/reference/validMultipleVariableDeclarations.errors.txt b/tests/baselines/reference/validMultipleVariableDeclarations.errors.txt new file mode 100644 index 00000000000..8f751e9efee --- /dev/null +++ b/tests/baselines/reference/validMultipleVariableDeclarations.errors.txt @@ -0,0 +1,45 @@ +tests/cases/conformance/statements/VariableStatements/validMultipleVariableDeclarations.ts(9,1): error TS7027: Unreachable code detected. + + +==== tests/cases/conformance/statements/VariableStatements/validMultipleVariableDeclarations.ts (1 errors) ==== + // all expected to be valid + + var x: number; + var x = 2; + if (true) { + var x = 3; + for (var x = 0; ;) { } + } + var x = undefined; + ~~~ +!!! error TS7027: Unreachable code detected. + + // new declaration space, making redeclaring x as a string valid + function declSpace() { + var x = 'this is a string'; + } + + interface Point { x: number; y: number; } + + var p: Point; + var p = { x: 1, y: 2 }; + var p: Point = { x: 0, y: undefined }; + var p = { x: 1, y: undefined }; + var p: { x: number; y: number; } = { x: 1, y: 2 }; + var p = <{ x: number; y: number; }>{ x: 0, y: undefined }; + var p: typeof p; + + var fn = function (s: string) { return 42; } + var fn = (s: string) => 3; + var fn: (s: string) => number; + var fn: { (s: string): number }; + var fn = <(s: string) => number> null; + var fn: typeof fn; + + var a: string[]; + var a = ['a', 'b'] + var a = []; + var a: string[] = []; + var a = new Array(); + var a: typeof a; + \ No newline at end of file diff --git a/tests/baselines/reference/validMultipleVariableDeclarations.symbols b/tests/baselines/reference/validMultipleVariableDeclarations.symbols deleted file mode 100644 index 467c061c6fa..00000000000 --- a/tests/baselines/reference/validMultipleVariableDeclarations.symbols +++ /dev/null @@ -1,118 +0,0 @@ -=== tests/cases/conformance/statements/VariableStatements/validMultipleVariableDeclarations.ts === -// all expected to be valid - -var x: number; ->x : Symbol(x, Decl(validMultipleVariableDeclarations.ts, 2, 3), Decl(validMultipleVariableDeclarations.ts, 3, 3), Decl(validMultipleVariableDeclarations.ts, 5, 7), Decl(validMultipleVariableDeclarations.ts, 6, 12), Decl(validMultipleVariableDeclarations.ts, 8, 3)) - -var x = 2; ->x : Symbol(x, Decl(validMultipleVariableDeclarations.ts, 2, 3), Decl(validMultipleVariableDeclarations.ts, 3, 3), Decl(validMultipleVariableDeclarations.ts, 5, 7), Decl(validMultipleVariableDeclarations.ts, 6, 12), Decl(validMultipleVariableDeclarations.ts, 8, 3)) - -if (true) { - var x = 3; ->x : Symbol(x, Decl(validMultipleVariableDeclarations.ts, 2, 3), Decl(validMultipleVariableDeclarations.ts, 3, 3), Decl(validMultipleVariableDeclarations.ts, 5, 7), Decl(validMultipleVariableDeclarations.ts, 6, 12), Decl(validMultipleVariableDeclarations.ts, 8, 3)) - - for (var x = 0; ;) { } ->x : Symbol(x, Decl(validMultipleVariableDeclarations.ts, 2, 3), Decl(validMultipleVariableDeclarations.ts, 3, 3), Decl(validMultipleVariableDeclarations.ts, 5, 7), Decl(validMultipleVariableDeclarations.ts, 6, 12), Decl(validMultipleVariableDeclarations.ts, 8, 3)) -} -var x = undefined; ->x : Symbol(x, Decl(validMultipleVariableDeclarations.ts, 2, 3), Decl(validMultipleVariableDeclarations.ts, 3, 3), Decl(validMultipleVariableDeclarations.ts, 5, 7), Decl(validMultipleVariableDeclarations.ts, 6, 12), Decl(validMultipleVariableDeclarations.ts, 8, 3)) ->undefined : Symbol(undefined) - -// new declaration space, making redeclaring x as a string valid -function declSpace() { ->declSpace : Symbol(declSpace, Decl(validMultipleVariableDeclarations.ts, 8, 26)) - - var x = 'this is a string'; ->x : Symbol(x, Decl(validMultipleVariableDeclarations.ts, 12, 7)) -} - -interface Point { x: number; y: number; } ->Point : Symbol(Point, Decl(validMultipleVariableDeclarations.ts, 13, 1)) ->x : Symbol(x, Decl(validMultipleVariableDeclarations.ts, 15, 17)) ->y : Symbol(y, Decl(validMultipleVariableDeclarations.ts, 15, 28)) - -var p: Point; ->p : Symbol(p, Decl(validMultipleVariableDeclarations.ts, 17, 3), Decl(validMultipleVariableDeclarations.ts, 18, 3), Decl(validMultipleVariableDeclarations.ts, 19, 3), Decl(validMultipleVariableDeclarations.ts, 20, 3), Decl(validMultipleVariableDeclarations.ts, 21, 3), Decl(validMultipleVariableDeclarations.ts, 22, 3), Decl(validMultipleVariableDeclarations.ts, 23, 3)) ->Point : Symbol(Point, Decl(validMultipleVariableDeclarations.ts, 13, 1)) - -var p = { x: 1, y: 2 }; ->p : Symbol(p, Decl(validMultipleVariableDeclarations.ts, 17, 3), Decl(validMultipleVariableDeclarations.ts, 18, 3), Decl(validMultipleVariableDeclarations.ts, 19, 3), Decl(validMultipleVariableDeclarations.ts, 20, 3), Decl(validMultipleVariableDeclarations.ts, 21, 3), Decl(validMultipleVariableDeclarations.ts, 22, 3), Decl(validMultipleVariableDeclarations.ts, 23, 3)) ->x : Symbol(x, Decl(validMultipleVariableDeclarations.ts, 18, 9)) ->y : Symbol(y, Decl(validMultipleVariableDeclarations.ts, 18, 15)) - -var p: Point = { x: 0, y: undefined }; ->p : Symbol(p, Decl(validMultipleVariableDeclarations.ts, 17, 3), Decl(validMultipleVariableDeclarations.ts, 18, 3), Decl(validMultipleVariableDeclarations.ts, 19, 3), Decl(validMultipleVariableDeclarations.ts, 20, 3), Decl(validMultipleVariableDeclarations.ts, 21, 3), Decl(validMultipleVariableDeclarations.ts, 22, 3), Decl(validMultipleVariableDeclarations.ts, 23, 3)) ->Point : Symbol(Point, Decl(validMultipleVariableDeclarations.ts, 13, 1)) ->x : Symbol(x, Decl(validMultipleVariableDeclarations.ts, 19, 16)) ->y : Symbol(y, Decl(validMultipleVariableDeclarations.ts, 19, 22)) ->undefined : Symbol(undefined) - -var p = { x: 1, y: undefined }; ->p : Symbol(p, Decl(validMultipleVariableDeclarations.ts, 17, 3), Decl(validMultipleVariableDeclarations.ts, 18, 3), Decl(validMultipleVariableDeclarations.ts, 19, 3), Decl(validMultipleVariableDeclarations.ts, 20, 3), Decl(validMultipleVariableDeclarations.ts, 21, 3), Decl(validMultipleVariableDeclarations.ts, 22, 3), Decl(validMultipleVariableDeclarations.ts, 23, 3)) ->x : Symbol(x, Decl(validMultipleVariableDeclarations.ts, 20, 9)) ->y : Symbol(y, Decl(validMultipleVariableDeclarations.ts, 20, 15)) ->undefined : Symbol(undefined) - -var p: { x: number; y: number; } = { x: 1, y: 2 }; ->p : Symbol(p, Decl(validMultipleVariableDeclarations.ts, 17, 3), Decl(validMultipleVariableDeclarations.ts, 18, 3), Decl(validMultipleVariableDeclarations.ts, 19, 3), Decl(validMultipleVariableDeclarations.ts, 20, 3), Decl(validMultipleVariableDeclarations.ts, 21, 3), Decl(validMultipleVariableDeclarations.ts, 22, 3), Decl(validMultipleVariableDeclarations.ts, 23, 3)) ->x : Symbol(x, Decl(validMultipleVariableDeclarations.ts, 21, 8)) ->y : Symbol(y, Decl(validMultipleVariableDeclarations.ts, 21, 19)) ->x : Symbol(x, Decl(validMultipleVariableDeclarations.ts, 21, 36)) ->y : Symbol(y, Decl(validMultipleVariableDeclarations.ts, 21, 42)) - -var p = <{ x: number; y: number; }>{ x: 0, y: undefined }; ->p : Symbol(p, Decl(validMultipleVariableDeclarations.ts, 17, 3), Decl(validMultipleVariableDeclarations.ts, 18, 3), Decl(validMultipleVariableDeclarations.ts, 19, 3), Decl(validMultipleVariableDeclarations.ts, 20, 3), Decl(validMultipleVariableDeclarations.ts, 21, 3), Decl(validMultipleVariableDeclarations.ts, 22, 3), Decl(validMultipleVariableDeclarations.ts, 23, 3)) ->x : Symbol(x, Decl(validMultipleVariableDeclarations.ts, 22, 10)) ->y : Symbol(y, Decl(validMultipleVariableDeclarations.ts, 22, 21)) ->x : Symbol(x, Decl(validMultipleVariableDeclarations.ts, 22, 36)) ->y : Symbol(y, Decl(validMultipleVariableDeclarations.ts, 22, 42)) ->undefined : Symbol(undefined) - -var p: typeof p; ->p : Symbol(p, Decl(validMultipleVariableDeclarations.ts, 17, 3), Decl(validMultipleVariableDeclarations.ts, 18, 3), Decl(validMultipleVariableDeclarations.ts, 19, 3), Decl(validMultipleVariableDeclarations.ts, 20, 3), Decl(validMultipleVariableDeclarations.ts, 21, 3), Decl(validMultipleVariableDeclarations.ts, 22, 3), Decl(validMultipleVariableDeclarations.ts, 23, 3)) ->p : Symbol(p, Decl(validMultipleVariableDeclarations.ts, 17, 3), Decl(validMultipleVariableDeclarations.ts, 18, 3), Decl(validMultipleVariableDeclarations.ts, 19, 3), Decl(validMultipleVariableDeclarations.ts, 20, 3), Decl(validMultipleVariableDeclarations.ts, 21, 3), Decl(validMultipleVariableDeclarations.ts, 22, 3), Decl(validMultipleVariableDeclarations.ts, 23, 3)) - -var fn = function (s: string) { return 42; } ->fn : Symbol(fn, Decl(validMultipleVariableDeclarations.ts, 25, 3), Decl(validMultipleVariableDeclarations.ts, 26, 3), Decl(validMultipleVariableDeclarations.ts, 27, 3), Decl(validMultipleVariableDeclarations.ts, 28, 3), Decl(validMultipleVariableDeclarations.ts, 29, 3), Decl(validMultipleVariableDeclarations.ts, 30, 3)) ->s : Symbol(s, Decl(validMultipleVariableDeclarations.ts, 25, 19)) - -var fn = (s: string) => 3; ->fn : Symbol(fn, Decl(validMultipleVariableDeclarations.ts, 25, 3), Decl(validMultipleVariableDeclarations.ts, 26, 3), Decl(validMultipleVariableDeclarations.ts, 27, 3), Decl(validMultipleVariableDeclarations.ts, 28, 3), Decl(validMultipleVariableDeclarations.ts, 29, 3), Decl(validMultipleVariableDeclarations.ts, 30, 3)) ->s : Symbol(s, Decl(validMultipleVariableDeclarations.ts, 26, 10)) - -var fn: (s: string) => number; ->fn : Symbol(fn, Decl(validMultipleVariableDeclarations.ts, 25, 3), Decl(validMultipleVariableDeclarations.ts, 26, 3), Decl(validMultipleVariableDeclarations.ts, 27, 3), Decl(validMultipleVariableDeclarations.ts, 28, 3), Decl(validMultipleVariableDeclarations.ts, 29, 3), Decl(validMultipleVariableDeclarations.ts, 30, 3)) ->s : Symbol(s, Decl(validMultipleVariableDeclarations.ts, 27, 9)) - -var fn: { (s: string): number }; ->fn : Symbol(fn, Decl(validMultipleVariableDeclarations.ts, 25, 3), Decl(validMultipleVariableDeclarations.ts, 26, 3), Decl(validMultipleVariableDeclarations.ts, 27, 3), Decl(validMultipleVariableDeclarations.ts, 28, 3), Decl(validMultipleVariableDeclarations.ts, 29, 3), Decl(validMultipleVariableDeclarations.ts, 30, 3)) ->s : Symbol(s, Decl(validMultipleVariableDeclarations.ts, 28, 11)) - -var fn = <(s: string) => number> null; ->fn : Symbol(fn, Decl(validMultipleVariableDeclarations.ts, 25, 3), Decl(validMultipleVariableDeclarations.ts, 26, 3), Decl(validMultipleVariableDeclarations.ts, 27, 3), Decl(validMultipleVariableDeclarations.ts, 28, 3), Decl(validMultipleVariableDeclarations.ts, 29, 3), Decl(validMultipleVariableDeclarations.ts, 30, 3)) ->s : Symbol(s, Decl(validMultipleVariableDeclarations.ts, 29, 11)) - -var fn: typeof fn; ->fn : Symbol(fn, Decl(validMultipleVariableDeclarations.ts, 25, 3), Decl(validMultipleVariableDeclarations.ts, 26, 3), Decl(validMultipleVariableDeclarations.ts, 27, 3), Decl(validMultipleVariableDeclarations.ts, 28, 3), Decl(validMultipleVariableDeclarations.ts, 29, 3), Decl(validMultipleVariableDeclarations.ts, 30, 3)) ->fn : Symbol(fn, Decl(validMultipleVariableDeclarations.ts, 25, 3), Decl(validMultipleVariableDeclarations.ts, 26, 3), Decl(validMultipleVariableDeclarations.ts, 27, 3), Decl(validMultipleVariableDeclarations.ts, 28, 3), Decl(validMultipleVariableDeclarations.ts, 29, 3), Decl(validMultipleVariableDeclarations.ts, 30, 3)) - -var a: string[]; ->a : Symbol(a, Decl(validMultipleVariableDeclarations.ts, 32, 3), Decl(validMultipleVariableDeclarations.ts, 33, 3), Decl(validMultipleVariableDeclarations.ts, 34, 3), Decl(validMultipleVariableDeclarations.ts, 35, 3), Decl(validMultipleVariableDeclarations.ts, 36, 3), Decl(validMultipleVariableDeclarations.ts, 37, 3)) - -var a = ['a', 'b'] ->a : Symbol(a, Decl(validMultipleVariableDeclarations.ts, 32, 3), Decl(validMultipleVariableDeclarations.ts, 33, 3), Decl(validMultipleVariableDeclarations.ts, 34, 3), Decl(validMultipleVariableDeclarations.ts, 35, 3), Decl(validMultipleVariableDeclarations.ts, 36, 3), Decl(validMultipleVariableDeclarations.ts, 37, 3)) - -var a = []; ->a : Symbol(a, Decl(validMultipleVariableDeclarations.ts, 32, 3), Decl(validMultipleVariableDeclarations.ts, 33, 3), Decl(validMultipleVariableDeclarations.ts, 34, 3), Decl(validMultipleVariableDeclarations.ts, 35, 3), Decl(validMultipleVariableDeclarations.ts, 36, 3), Decl(validMultipleVariableDeclarations.ts, 37, 3)) - -var a: string[] = []; ->a : Symbol(a, Decl(validMultipleVariableDeclarations.ts, 32, 3), Decl(validMultipleVariableDeclarations.ts, 33, 3), Decl(validMultipleVariableDeclarations.ts, 34, 3), Decl(validMultipleVariableDeclarations.ts, 35, 3), Decl(validMultipleVariableDeclarations.ts, 36, 3), Decl(validMultipleVariableDeclarations.ts, 37, 3)) - -var a = new Array(); ->a : Symbol(a, Decl(validMultipleVariableDeclarations.ts, 32, 3), Decl(validMultipleVariableDeclarations.ts, 33, 3), Decl(validMultipleVariableDeclarations.ts, 34, 3), Decl(validMultipleVariableDeclarations.ts, 35, 3), Decl(validMultipleVariableDeclarations.ts, 36, 3), Decl(validMultipleVariableDeclarations.ts, 37, 3)) ->Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11)) - -var a: typeof a; ->a : Symbol(a, Decl(validMultipleVariableDeclarations.ts, 32, 3), Decl(validMultipleVariableDeclarations.ts, 33, 3), Decl(validMultipleVariableDeclarations.ts, 34, 3), Decl(validMultipleVariableDeclarations.ts, 35, 3), Decl(validMultipleVariableDeclarations.ts, 36, 3), Decl(validMultipleVariableDeclarations.ts, 37, 3)) ->a : Symbol(a, Decl(validMultipleVariableDeclarations.ts, 32, 3), Decl(validMultipleVariableDeclarations.ts, 33, 3), Decl(validMultipleVariableDeclarations.ts, 34, 3), Decl(validMultipleVariableDeclarations.ts, 35, 3), Decl(validMultipleVariableDeclarations.ts, 36, 3), Decl(validMultipleVariableDeclarations.ts, 37, 3)) - diff --git a/tests/baselines/reference/validMultipleVariableDeclarations.types b/tests/baselines/reference/validMultipleVariableDeclarations.types deleted file mode 100644 index 966128350b0..00000000000 --- a/tests/baselines/reference/validMultipleVariableDeclarations.types +++ /dev/null @@ -1,152 +0,0 @@ -=== tests/cases/conformance/statements/VariableStatements/validMultipleVariableDeclarations.ts === -// all expected to be valid - -var x: number; ->x : number - -var x = 2; ->x : number ->2 : number - -if (true) { ->true : boolean - - var x = 3; ->x : number ->3 : number - - for (var x = 0; ;) { } ->x : number ->0 : number -} -var x = undefined; ->x : number ->undefined : number ->undefined : undefined - -// new declaration space, making redeclaring x as a string valid -function declSpace() { ->declSpace : () => void - - var x = 'this is a string'; ->x : string ->'this is a string' : string -} - -interface Point { x: number; y: number; } ->Point : Point ->x : number ->y : number - -var p: Point; ->p : Point ->Point : Point - -var p = { x: 1, y: 2 }; ->p : Point ->{ x: 1, y: 2 } : { x: number; y: number; } ->x : number ->1 : number ->y : number ->2 : number - -var p: Point = { x: 0, y: undefined }; ->p : Point ->Point : Point ->{ x: 0, y: undefined } : { x: number; y: undefined; } ->x : number ->0 : number ->y : undefined ->undefined : undefined - -var p = { x: 1, y: undefined }; ->p : Point ->{ x: 1, y: undefined } : { x: number; y: number; } ->x : number ->1 : number ->y : number ->undefined : number ->undefined : undefined - -var p: { x: number; y: number; } = { x: 1, y: 2 }; ->p : Point ->x : number ->y : number ->{ x: 1, y: 2 } : { x: number; y: number; } ->x : number ->1 : number ->y : number ->2 : number - -var p = <{ x: number; y: number; }>{ x: 0, y: undefined }; ->p : Point -><{ x: number; y: number; }>{ x: 0, y: undefined } : { x: number; y: number; } ->x : number ->y : number ->{ x: 0, y: undefined } : { x: number; y: undefined; } ->x : number ->0 : number ->y : undefined ->undefined : undefined - -var p: typeof p; ->p : Point ->p : Point - -var fn = function (s: string) { return 42; } ->fn : (s: string) => number ->function (s: string) { return 42; } : (s: string) => number ->s : string ->42 : number - -var fn = (s: string) => 3; ->fn : (s: string) => number ->(s: string) => 3 : (s: string) => number ->s : string ->3 : number - -var fn: (s: string) => number; ->fn : (s: string) => number ->s : string - -var fn: { (s: string): number }; ->fn : (s: string) => number ->s : string - -var fn = <(s: string) => number> null; ->fn : (s: string) => number -><(s: string) => number> null : (s: string) => number ->s : string ->null : null - -var fn: typeof fn; ->fn : (s: string) => number ->fn : (s: string) => number - -var a: string[]; ->a : string[] - -var a = ['a', 'b'] ->a : string[] ->['a', 'b'] : string[] ->'a' : string ->'b' : string - -var a = []; ->a : string[] ->[] : string[] ->[] : undefined[] - -var a: string[] = []; ->a : string[] ->[] : undefined[] - -var a = new Array(); ->a : string[] ->new Array() : string[] ->Array : ArrayConstructor - -var a: typeof a; ->a : string[] ->a : string[] - diff --git a/tests/baselines/reference/whileBreakStatements.errors.txt b/tests/baselines/reference/whileBreakStatements.errors.txt new file mode 100644 index 00000000000..7c63dc59d3c --- /dev/null +++ b/tests/baselines/reference/whileBreakStatements.errors.txt @@ -0,0 +1,54 @@ +tests/cases/conformance/statements/breakStatements/whileBreakStatements.ts(11,1): error TS7028: Unused label. +tests/cases/conformance/statements/breakStatements/whileBreakStatements.ts(19,5): error TS7028: Unused label. +tests/cases/conformance/statements/breakStatements/whileBreakStatements.ts(31,1): error TS7027: Unreachable code detected. + + +==== tests/cases/conformance/statements/breakStatements/whileBreakStatements.ts (3 errors) ==== + while(true) { + break; + } + + ONE: + + while (true) { + break ONE; + } + + TWO: + ~~~ +!!! error TS7028: Unused label. + THREE: + while (true) { + break THREE; + } + + FOUR: + while (true) { + FIVE: + ~~~~ +!!! error TS7028: Unused label. + while (true) { + break FOUR; + } + } + + while (true) { + SIX: + while (true) + break SIX; + } + + SEVEN: + ~~~~~ +!!! error TS7027: Unreachable code detected. + while (true) + while (true) + while (true) + break SEVEN; + + EIGHT: + while (true) { + var fn = function () { } + break EIGHT; + } + \ No newline at end of file diff --git a/tests/baselines/reference/whileBreakStatements.symbols b/tests/baselines/reference/whileBreakStatements.symbols deleted file mode 100644 index 2ac7721621d..00000000000 --- a/tests/baselines/reference/whileBreakStatements.symbols +++ /dev/null @@ -1,45 +0,0 @@ -=== tests/cases/conformance/statements/breakStatements/whileBreakStatements.ts === -while(true) { - break; -} - -ONE: - -while (true) { - break ONE; -} - -TWO: -THREE: -while (true) { - break THREE; -} - -FOUR: -while (true) { - FIVE: - while (true) { - break FOUR; - } -} - -while (true) { - SIX: - while (true) - break SIX; -} - -SEVEN: -while (true) - while (true) - while (true) - break SEVEN; - -EIGHT: -while (true) { - var fn = function () { } ->fn : Symbol(fn, Decl(whileBreakStatements.ts, 38, 7)) - - break EIGHT; -} - diff --git a/tests/baselines/reference/whileBreakStatements.types b/tests/baselines/reference/whileBreakStatements.types deleted file mode 100644 index e7ca0a5322f..00000000000 --- a/tests/baselines/reference/whileBreakStatements.types +++ /dev/null @@ -1,89 +0,0 @@ -=== tests/cases/conformance/statements/breakStatements/whileBreakStatements.ts === -while(true) { ->true : boolean - - break; -} - -ONE: ->ONE : any - -while (true) { ->true : boolean - - break ONE; ->ONE : any -} - -TWO: ->TWO : any - -THREE: ->THREE : any - -while (true) { ->true : boolean - - break THREE; ->THREE : any -} - -FOUR: ->FOUR : any - -while (true) { ->true : boolean - - FIVE: ->FIVE : any - - while (true) { ->true : boolean - - break FOUR; ->FOUR : any - } -} - -while (true) { ->true : boolean - - SIX: ->SIX : any - - while (true) ->true : boolean - - break SIX; ->SIX : any -} - -SEVEN: ->SEVEN : any - -while (true) ->true : boolean - - while (true) ->true : boolean - - while (true) ->true : boolean - - break SEVEN; ->SEVEN : any - -EIGHT: ->EIGHT : any - -while (true) { ->true : boolean - - var fn = function () { } ->fn : () => void ->function () { } : () => void - - break EIGHT; ->EIGHT : any -} - diff --git a/tests/baselines/reference/whileContinueStatements.errors.txt b/tests/baselines/reference/whileContinueStatements.errors.txt new file mode 100644 index 00000000000..c2009b02600 --- /dev/null +++ b/tests/baselines/reference/whileContinueStatements.errors.txt @@ -0,0 +1,59 @@ +tests/cases/conformance/statements/continueStatements/whileContinueStatements.ts(5,1): error TS7027: Unreachable code detected. + + +==== tests/cases/conformance/statements/continueStatements/whileContinueStatements.ts (1 errors) ==== + while(true) { + continue; + } + + while (true) { + ~~~~~ +!!! error TS7027: Unreachable code detected. + if (true) { + continue; + } + } + + ONE: + + while (true) { + continue ONE; + } + + TWO: + THREE: + while (true) { + continue THREE; + } + + FOUR: + while (true) { + FIVE: + while (true) { + continue FOUR; + } + } + + while (true) { + SIX: + while (true) + continue SIX; + } + + SEVEN: + while (true) + while (true) + while (true) + continue SEVEN; + + EIGHT: + while (true) { + var fn = function () { } + continue EIGHT; + } + + NINE: + while (true) { + if (true) { continue NINE; } + } + \ No newline at end of file diff --git a/tests/baselines/reference/whileContinueStatements.symbols b/tests/baselines/reference/whileContinueStatements.symbols deleted file mode 100644 index 67508556f70..00000000000 --- a/tests/baselines/reference/whileContinueStatements.symbols +++ /dev/null @@ -1,56 +0,0 @@ -=== tests/cases/conformance/statements/continueStatements/whileContinueStatements.ts === -while(true) { - continue; -} - -while (true) { - if (true) { - continue; - } -} - -ONE: - -while (true) { - continue ONE; -} - -TWO: -THREE: -while (true) { - continue THREE; -} - -FOUR: -while (true) { - FIVE: - while (true) { - continue FOUR; - } -} - -while (true) { - SIX: - while (true) - continue SIX; -} - -SEVEN: -while (true) - while (true) - while (true) - continue SEVEN; - -EIGHT: -while (true) { - var fn = function () { } ->fn : Symbol(fn, Decl(whileContinueStatements.ts, 44, 7)) - - continue EIGHT; -} - -NINE: -while (true) { - if (true) { continue NINE; } -} - diff --git a/tests/baselines/reference/whileContinueStatements.types b/tests/baselines/reference/whileContinueStatements.types deleted file mode 100644 index 6bf371cde9e..00000000000 --- a/tests/baselines/reference/whileContinueStatements.types +++ /dev/null @@ -1,110 +0,0 @@ -=== tests/cases/conformance/statements/continueStatements/whileContinueStatements.ts === -while(true) { ->true : boolean - - continue; -} - -while (true) { ->true : boolean - - if (true) { ->true : boolean - - continue; - } -} - -ONE: ->ONE : any - -while (true) { ->true : boolean - - continue ONE; ->ONE : any -} - -TWO: ->TWO : any - -THREE: ->THREE : any - -while (true) { ->true : boolean - - continue THREE; ->THREE : any -} - -FOUR: ->FOUR : any - -while (true) { ->true : boolean - - FIVE: ->FIVE : any - - while (true) { ->true : boolean - - continue FOUR; ->FOUR : any - } -} - -while (true) { ->true : boolean - - SIX: ->SIX : any - - while (true) ->true : boolean - - continue SIX; ->SIX : any -} - -SEVEN: ->SEVEN : any - -while (true) ->true : boolean - - while (true) ->true : boolean - - while (true) ->true : boolean - - continue SEVEN; ->SEVEN : any - -EIGHT: ->EIGHT : any - -while (true) { ->true : boolean - - var fn = function () { } ->fn : () => void ->function () { } : () => void - - continue EIGHT; ->EIGHT : any -} - -NINE: ->NINE : any - -while (true) { ->true : boolean - - if (true) { continue NINE; } ->true : boolean ->NINE : any -} - diff --git a/tests/cases/compiler/reachabilityChecks1.ts b/tests/cases/compiler/reachabilityChecks1.ts index ce009e13456..6430556a203 100644 --- a/tests/cases/compiler/reachabilityChecks1.ts +++ b/tests/cases/compiler/reachabilityChecks1.ts @@ -1,4 +1,4 @@ -// @noUnreachableCode: true +// @allowUnreachableCode: false // @preserveConstEnums: true while (true); diff --git a/tests/cases/compiler/reachabilityChecks2.ts b/tests/cases/compiler/reachabilityChecks2.ts index 9a2b519ca4c..5a7a8aaab58 100644 --- a/tests/cases/compiler/reachabilityChecks2.ts +++ b/tests/cases/compiler/reachabilityChecks2.ts @@ -1,4 +1,4 @@ -// @noUnreachableCode: true +// @allowUnreachableCode: false // @preserveConstEnums: false while (true) { } diff --git a/tests/cases/compiler/reachabilityChecks3.ts b/tests/cases/compiler/reachabilityChecks3.ts index 362c64e1349..19f57e55b67 100644 --- a/tests/cases/compiler/reachabilityChecks3.ts +++ b/tests/cases/compiler/reachabilityChecks3.ts @@ -1,4 +1,4 @@ -// @noUnusedLabels: true +// @allowUnusedLabels: false let x = 1; loop: while (true) { @@ -8,4 +8,9 @@ loop: while (true) { else { x++; } -} \ No newline at end of file +} +{ + x: 100 +} + +var y = () => { f: 1 } \ No newline at end of file diff --git a/tests/cases/compiler/reachabilityChecks5.ts b/tests/cases/compiler/reachabilityChecks5.ts index 24134e238b9..97df11ccb79 100644 --- a/tests/cases/compiler/reachabilityChecks5.ts +++ b/tests/cases/compiler/reachabilityChecks5.ts @@ -1,4 +1,4 @@ -// @noUnreachableCode: true +// @allowUnreachableCode: false // @noImplicitReturns: true function f0(x): number { diff --git a/tests/cases/fourslash/unclosedFunctionErrorRecovery3.ts b/tests/cases/fourslash/unclosedFunctionErrorRecovery3.ts index bcb79811a62..7a52ddc2c32 100644 --- a/tests/cases/fourslash/unclosedFunctionErrorRecovery3.ts +++ b/tests/cases/fourslash/unclosedFunctionErrorRecovery3.ts @@ -1,4 +1,5 @@ /// +// @allowUnreachableCode: true //// class alpha { static beta() return 5; } } //// /**/ var gamma = alpha.beta() * 5; diff --git a/tests/webTestServer.ts b/tests/webTestServer.ts index 6d3144eeaec..aba6dd81982 100644 --- a/tests/webTestServer.ts +++ b/tests/webTestServer.ts @@ -191,7 +191,6 @@ function getRequestOperation(req: http.ServerRequest, filename: string) { } return RequestType.Unknown } - return RequestType.Unknown } function handleRequestOperation(req: http.ServerRequest, res: http.ServerResponse, operation: RequestType, reqPath: string) {